( hook: PendingAsyncHook, exitCode: number, outcome: 'success' | 'error' | 'cancelled', )
| 89 | } |
| 90 | |
| 91 | async function finalizeHook( |
| 92 | hook: PendingAsyncHook, |
| 93 | exitCode: number, |
| 94 | outcome: 'success' | 'error' | 'cancelled', |
| 95 | ): Promise<void> { |
| 96 | hook.stopProgressInterval() |
| 97 | const taskOutput = hook.shellCommand?.taskOutput |
| 98 | const stdout = taskOutput ? await taskOutput.getStdout() : '' |
| 99 | const stderr = taskOutput?.getStderr() ?? '' |
| 100 | hook.shellCommand?.cleanup() |
| 101 | emitHookResponse({ |
| 102 | hookId: hook.hookId, |
| 103 | hookName: hook.hookName, |
| 104 | hookEvent: hook.hookEvent, |
| 105 | output: stdout + stderr, |
| 106 | stdout, |
| 107 | stderr, |
| 108 | exitCode, |
| 109 | outcome, |
| 110 | }) |
| 111 | } |
| 112 | |
| 113 | export async function checkForAsyncHookResponses(): Promise< |
| 114 | Array<{ |
no test coverage detected