(input: MultiStepInput, state: Partial<ConnectionState>)
| 77 | } |
| 78 | |
| 79 | async setUsername(input: MultiStepInput, state: Partial<ConnectionState>) { |
| 80 | state.user = await input.showInputBox({ |
| 81 | title: this.TITLE, |
| 82 | step: input.CurrentStepNumber, |
| 83 | totalSteps: this.TotalSteps, |
| 84 | prompt: 'The PostgreSQL user to authenticate as', |
| 85 | placeholder: 'ex. root', |
| 86 | ignoreFocusOut: true, |
| 87 | value: (typeof state.user === 'string') ? state.user : '', |
| 88 | validate: async (value) => (!value || !value.trim()) ? 'Username is required' : '' |
| 89 | }); |
| 90 | return (input: MultiStepInput) => this.setPassword(input, state); |
| 91 | } |
| 92 | |
| 93 | async setPassword(input: MultiStepInput, state: Partial<ConnectionState>) { |
| 94 | state.password = await input.showInputBox({ |
no test coverage detected