| 83 | * this for VS Code launches as we have no way to forcefully close those sssions. |
| 84 | */ |
| 85 | export class StubProgram implements IProgram { |
| 86 | public readonly stopped: Promise<IStopMetadata>; |
| 87 | protected stopDefer!: (data: IStopMetadata) => void; |
| 88 | protected telemetry?: IProcessTelemetry; |
| 89 | |
| 90 | constructor() { |
| 91 | this.stopped = new Promise(resolve => (this.stopDefer = resolve)); |
| 92 | } |
| 93 | |
| 94 | public gotTelemetery(telemetry: IProcessTelemetry) { |
| 95 | this.telemetry = telemetry; |
| 96 | } |
| 97 | |
| 98 | public stop() { |
| 99 | this.stopDefer({ code: 0, killed: true }); |
| 100 | return this.stopped; |
| 101 | } |
| 102 | } |
| 103 | |
| 104 | /** |
| 105 | * Wrapper for the watchdog program. |
nothing calls this directly
no outgoing calls
no test coverage detected