-
-
Notifications
You must be signed in to change notification settings - Fork 532
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fixup! Consistently perform bootstrap and encode Brotli config for im…
…proved caching/reduced complexity Re-add fast-path for ESM when we detect it before phase3. And simplify code.
- Loading branch information
1 parent
e43b665
commit 9c0a5a9
Showing
5 changed files
with
85 additions
and
70 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,17 @@ | ||
import { completeBootstrap, BootstrapStateForChild } from '../bin'; | ||
import { | ||
completeBootstrap, | ||
BootstrapStateInitialProcess, | ||
BootstrapStateForForkedProcesses, | ||
} from '../bin'; | ||
import { argPrefix, decompress } from './argv-payload'; | ||
|
||
const base64ConfigArg = process.argv[2]; | ||
if (!base64ConfigArg.startsWith(argPrefix)) throw new Error('unexpected argv'); | ||
const base64Payload = base64ConfigArg.slice(argPrefix.length); | ||
const state = decompress(base64Payload) as BootstrapStateForChild; | ||
const state = decompress(base64Payload) as | ||
| BootstrapStateForForkedProcesses | ||
| BootstrapStateInitialProcess; | ||
|
||
state.parseArgvResult.restArgs = process.argv.slice(3); | ||
state.restArgs = process.argv.slice(3); | ||
|
||
completeBootstrap(state); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters