| 312 | } |
| 313 | |
| 314 | export class ContinueOnInteractor implements IInteractor { |
| 315 | static ID = 'continueOn'; |
| 316 | |
| 317 | constructor(private readonly continueOn: string) { } |
| 318 | |
| 319 | get id(): string { |
| 320 | return ContinueOnInteractor.ID; |
| 321 | } |
| 322 | |
| 323 | async onData(data: string, _cancelToken?: vscode.CancellationToken): Promise<IInteraction> { |
| 324 | const result: IInteraction = { postAction: 'keep' }; |
| 325 | const pattern: string = escapeStringForRegex(this.continueOn); |
| 326 | const re: RegExp = new RegExp(pattern, 'g'); |
| 327 | if (data.match(re)) { |
| 328 | result.continue = true; |
| 329 | } |
| 330 | return result; |
| 331 | } |
| 332 | } |
| 333 | |
| 334 | export class ConnectionFailureInteractor implements IInteractor { |
| 335 | static ID = 'connectionFailure'; |
nothing calls this directly
no outgoing calls
no test coverage detected