(state: BootstrapState)
| 76 | |
| 77 | /** @internal */ |
| 78 | export function bootstrap(state: BootstrapState) { |
| 79 | if (!state.phase2Result) { |
| 80 | state.phase2Result = phase2(state); |
| 81 | if (state.shouldUseChildProcess && !state.isInChildProcess) { |
| 82 | // Note: When transitioning into the child-process after `phase2`, |
| 83 | // the updated working directory needs to be preserved. |
| 84 | return callInChild(state); |
| 85 | } |
| 86 | } |
| 87 | if (!state.phase3Result) { |
| 88 | state.phase3Result = phase3(state); |
| 89 | if (state.shouldUseChildProcess && !state.isInChildProcess) { |
| 90 | // Note: When transitioning into the child-process after `phase2`, |
| 91 | // the updated working directory needs to be preserved. |
| 92 | return callInChild(state); |
| 93 | } |
| 94 | } |
| 95 | return phase4(state); |
| 96 | } |
| 97 | |
| 98 | function parseArgv(argv: string[], entrypointArgs: Record<string, any>) { |
| 99 | arg ??= require('arg'); |
no test coverage detected
searching dependent graphs…