(
code: string,
maxBuffer: number,
stage: 'validation' | 'execution',
signal: AbortSignal
)
| 120 | } |
| 121 | |
| 122 | private async runScript( |
| 123 | code: string, |
| 124 | maxBuffer: number, |
| 125 | stage: 'validation' | 'execution', |
| 126 | signal: AbortSignal |
| 127 | ): Promise<ExecutionResult> { |
| 128 | throwIfAborted(signal); |
| 129 | const pending = this.customExecutor |
| 130 | ? this.runCustomScript(code, maxBuffer, stage, signal) |
| 131 | : this.executor(code, maxBuffer, signal); |
| 132 | this.running.add(pending); |
| 133 | try { |
| 134 | const result = await pending; |
| 135 | throwIfAborted(signal); |
| 136 | return result; |
| 137 | } finally { |
| 138 | this.running.delete(pending); |
| 139 | } |
| 140 | } |
| 141 | |
| 142 | private async runCustomScript( |
| 143 | code: string, |
no test coverage detected