create-leo-app 0.7.3 → 0.8.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +3 -3
- package/dist/index.mjs +38 -38
- package/package.json +5 -7
- package/template-extension/package.json +4 -4
- package/template-nextjs-ts/package.json +9 -9
- package/template-node/package.json +2 -2
- package/template-node-ts/package.json +5 -5
- package/template-offline-public-transaction-ts/package.json +5 -5
- package/template-react-leo/README.md +3 -8
- package/template-react-leo/package.json +23 -23
- package/template-react-leo/vite.config.js +2 -1
- package/template-react-managed-worker/README.md +1 -3
- package/template-react-managed-worker/package.json +22 -22
- package/template-react-managed-worker/vite.config.js +2 -1
- package/template-react-ts/README.md +3 -8
- package/template-react-ts/package.json +28 -28
- package/template-react-ts/vite.config.ts +2 -1
- package/template-vanilla/main.js +1 -1
- package/template-vanilla/package.json +3 -3
- package/template-vanilla/vite.config.js +3 -1
- package/template-nextjs-ts/node_modules/@types/node/LICENSE +0 -21
- package/template-nextjs-ts/node_modules/@types/node/README.md +0 -15
- package/template-nextjs-ts/node_modules/@types/node/assert/strict.d.ts +0 -8
- package/template-nextjs-ts/node_modules/@types/node/assert.d.ts +0 -1040
- package/template-nextjs-ts/node_modules/@types/node/async_hooks.d.ts +0 -541
- package/template-nextjs-ts/node_modules/@types/node/buffer.d.ts +0 -2301
- package/template-nextjs-ts/node_modules/@types/node/child_process.d.ts +0 -1544
- package/template-nextjs-ts/node_modules/@types/node/cluster.d.ts +0 -578
- package/template-nextjs-ts/node_modules/@types/node/console.d.ts +0 -452
- package/template-nextjs-ts/node_modules/@types/node/constants.d.ts +0 -19
- package/template-nextjs-ts/node_modules/@types/node/crypto.d.ts +0 -4524
- package/template-nextjs-ts/node_modules/@types/node/dgram.d.ts +0 -596
- package/template-nextjs-ts/node_modules/@types/node/diagnostics_channel.d.ts +0 -554
- package/template-nextjs-ts/node_modules/@types/node/dns/promises.d.ts +0 -476
- package/template-nextjs-ts/node_modules/@types/node/dns.d.ts +0 -864
- package/template-nextjs-ts/node_modules/@types/node/dom-events.d.ts +0 -124
- package/template-nextjs-ts/node_modules/@types/node/domain.d.ts +0 -170
- package/template-nextjs-ts/node_modules/@types/node/events.d.ts +0 -931
- package/template-nextjs-ts/node_modules/@types/node/fs/promises.d.ts +0 -1245
- package/template-nextjs-ts/node_modules/@types/node/fs.d.ts +0 -4317
- package/template-nextjs-ts/node_modules/@types/node/globals.d.ts +0 -503
- package/template-nextjs-ts/node_modules/@types/node/globals.global.d.ts +0 -1
- package/template-nextjs-ts/node_modules/@types/node/http.d.ts +0 -1908
- package/template-nextjs-ts/node_modules/@types/node/http2.d.ts +0 -2418
- package/template-nextjs-ts/node_modules/@types/node/https.d.ts +0 -550
- package/template-nextjs-ts/node_modules/@types/node/index.d.ts +0 -89
- package/template-nextjs-ts/node_modules/@types/node/inspector.d.ts +0 -3696
- package/template-nextjs-ts/node_modules/@types/node/module.d.ts +0 -315
- package/template-nextjs-ts/node_modules/@types/node/net.d.ts +0 -999
- package/template-nextjs-ts/node_modules/@types/node/os.d.ts +0 -495
- package/template-nextjs-ts/node_modules/@types/node/package.json +0 -217
- package/template-nextjs-ts/node_modules/@types/node/path.d.ts +0 -191
- package/template-nextjs-ts/node_modules/@types/node/perf_hooks.d.ts +0 -934
- package/template-nextjs-ts/node_modules/@types/node/process.d.ts +0 -1879
- package/template-nextjs-ts/node_modules/@types/node/punycode.d.ts +0 -117
- package/template-nextjs-ts/node_modules/@types/node/querystring.d.ts +0 -153
- package/template-nextjs-ts/node_modules/@types/node/readline/promises.d.ts +0 -150
- package/template-nextjs-ts/node_modules/@types/node/readline.d.ts +0 -540
- package/template-nextjs-ts/node_modules/@types/node/repl.d.ts +0 -430
- package/template-nextjs-ts/node_modules/@types/node/sea.d.ts +0 -153
- package/template-nextjs-ts/node_modules/@types/node/stream/consumers.d.ts +0 -12
- package/template-nextjs-ts/node_modules/@types/node/stream/promises.d.ts +0 -83
- package/template-nextjs-ts/node_modules/@types/node/stream/web.d.ts +0 -521
- package/template-nextjs-ts/node_modules/@types/node/stream.d.ts +0 -1707
- package/template-nextjs-ts/node_modules/@types/node/string_decoder.d.ts +0 -67
- package/template-nextjs-ts/node_modules/@types/node/test.d.ts +0 -1874
- package/template-nextjs-ts/node_modules/@types/node/timers/promises.d.ts +0 -97
- package/template-nextjs-ts/node_modules/@types/node/timers.d.ts +0 -240
- package/template-nextjs-ts/node_modules/@types/node/tls.d.ts +0 -1217
- package/template-nextjs-ts/node_modules/@types/node/trace_events.d.ts +0 -197
- package/template-nextjs-ts/node_modules/@types/node/tty.d.ts +0 -208
- package/template-nextjs-ts/node_modules/@types/node/url.d.ts +0 -952
- package/template-nextjs-ts/node_modules/@types/node/util.d.ts +0 -2298
- package/template-nextjs-ts/node_modules/@types/node/v8.d.ts +0 -808
- package/template-nextjs-ts/node_modules/@types/node/vm.d.ts +0 -924
- package/template-nextjs-ts/node_modules/@types/node/wasi.d.ts +0 -181
- package/template-nextjs-ts/node_modules/@types/node/worker_threads.d.ts +0 -694
- package/template-nextjs-ts/node_modules/@types/node/zlib.d.ts +0 -539
- package/template-react-ts/node_modules/@types/node/LICENSE +0 -21
- package/template-react-ts/node_modules/@types/node/README.md +0 -15
- package/template-react-ts/node_modules/@types/node/assert/strict.d.ts +0 -8
- package/template-react-ts/node_modules/@types/node/assert.d.ts +0 -1040
- package/template-react-ts/node_modules/@types/node/async_hooks.d.ts +0 -541
- package/template-react-ts/node_modules/@types/node/buffer.d.ts +0 -2301
- package/template-react-ts/node_modules/@types/node/child_process.d.ts +0 -1544
- package/template-react-ts/node_modules/@types/node/cluster.d.ts +0 -578
- package/template-react-ts/node_modules/@types/node/console.d.ts +0 -452
- package/template-react-ts/node_modules/@types/node/constants.d.ts +0 -19
- package/template-react-ts/node_modules/@types/node/crypto.d.ts +0 -4524
- package/template-react-ts/node_modules/@types/node/dgram.d.ts +0 -596
- package/template-react-ts/node_modules/@types/node/diagnostics_channel.d.ts +0 -554
- package/template-react-ts/node_modules/@types/node/dns/promises.d.ts +0 -476
- package/template-react-ts/node_modules/@types/node/dns.d.ts +0 -864
- package/template-react-ts/node_modules/@types/node/dom-events.d.ts +0 -124
- package/template-react-ts/node_modules/@types/node/domain.d.ts +0 -170
- package/template-react-ts/node_modules/@types/node/events.d.ts +0 -931
- package/template-react-ts/node_modules/@types/node/fs/promises.d.ts +0 -1245
- package/template-react-ts/node_modules/@types/node/fs.d.ts +0 -4317
- package/template-react-ts/node_modules/@types/node/globals.d.ts +0 -503
- package/template-react-ts/node_modules/@types/node/globals.global.d.ts +0 -1
- package/template-react-ts/node_modules/@types/node/http.d.ts +0 -1908
- package/template-react-ts/node_modules/@types/node/http2.d.ts +0 -2418
- package/template-react-ts/node_modules/@types/node/https.d.ts +0 -550
- package/template-react-ts/node_modules/@types/node/index.d.ts +0 -89
- package/template-react-ts/node_modules/@types/node/inspector.d.ts +0 -3696
- package/template-react-ts/node_modules/@types/node/module.d.ts +0 -315
- package/template-react-ts/node_modules/@types/node/net.d.ts +0 -999
- package/template-react-ts/node_modules/@types/node/os.d.ts +0 -495
- package/template-react-ts/node_modules/@types/node/package.json +0 -217
- package/template-react-ts/node_modules/@types/node/path.d.ts +0 -191
- package/template-react-ts/node_modules/@types/node/perf_hooks.d.ts +0 -934
- package/template-react-ts/node_modules/@types/node/process.d.ts +0 -1879
- package/template-react-ts/node_modules/@types/node/punycode.d.ts +0 -117
- package/template-react-ts/node_modules/@types/node/querystring.d.ts +0 -153
- package/template-react-ts/node_modules/@types/node/readline/promises.d.ts +0 -150
- package/template-react-ts/node_modules/@types/node/readline.d.ts +0 -540
- package/template-react-ts/node_modules/@types/node/repl.d.ts +0 -430
- package/template-react-ts/node_modules/@types/node/sea.d.ts +0 -153
- package/template-react-ts/node_modules/@types/node/stream/consumers.d.ts +0 -12
- package/template-react-ts/node_modules/@types/node/stream/promises.d.ts +0 -83
- package/template-react-ts/node_modules/@types/node/stream/web.d.ts +0 -521
- package/template-react-ts/node_modules/@types/node/stream.d.ts +0 -1707
- package/template-react-ts/node_modules/@types/node/string_decoder.d.ts +0 -67
- package/template-react-ts/node_modules/@types/node/test.d.ts +0 -1874
- package/template-react-ts/node_modules/@types/node/timers/promises.d.ts +0 -97
- package/template-react-ts/node_modules/@types/node/timers.d.ts +0 -240
- package/template-react-ts/node_modules/@types/node/tls.d.ts +0 -1217
- package/template-react-ts/node_modules/@types/node/trace_events.d.ts +0 -197
- package/template-react-ts/node_modules/@types/node/tty.d.ts +0 -208
- package/template-react-ts/node_modules/@types/node/url.d.ts +0 -952
- package/template-react-ts/node_modules/@types/node/util.d.ts +0 -2298
- package/template-react-ts/node_modules/@types/node/v8.d.ts +0 -808
- package/template-react-ts/node_modules/@types/node/vm.d.ts +0 -924
- package/template-react-ts/node_modules/@types/node/wasi.d.ts +0 -181
- package/template-react-ts/node_modules/@types/node/worker_threads.d.ts +0 -694
- package/template-react-ts/node_modules/@types/node/zlib.d.ts +0 -539
- package/template-react-ts/node_modules/diff/CONTRIBUTING.md +0 -39
- package/template-react-ts/node_modules/diff/LICENSE +0 -31
- package/template-react-ts/node_modules/diff/README.md +0 -207
- package/template-react-ts/node_modules/diff/dist/diff.js +0 -1585
- package/template-react-ts/node_modules/diff/dist/diff.min.js +0 -38
- package/template-react-ts/node_modules/diff/lib/convert/dmp.js +0 -32
- package/template-react-ts/node_modules/diff/lib/convert/xml.js +0 -42
- package/template-react-ts/node_modules/diff/lib/diff/array.js +0 -45
- package/template-react-ts/node_modules/diff/lib/diff/base.js +0 -304
- package/template-react-ts/node_modules/diff/lib/diff/character.js +0 -37
- package/template-react-ts/node_modules/diff/lib/diff/css.js +0 -41
- package/template-react-ts/node_modules/diff/lib/diff/json.js +0 -163
- package/template-react-ts/node_modules/diff/lib/diff/line.js +0 -89
- package/template-react-ts/node_modules/diff/lib/diff/sentence.js +0 -41
- package/template-react-ts/node_modules/diff/lib/diff/word.js +0 -107
- package/template-react-ts/node_modules/diff/lib/index.es6.js +0 -1519
- package/template-react-ts/node_modules/diff/lib/index.js +0 -216
- package/template-react-ts/node_modules/diff/lib/patch/apply.js +0 -243
- package/template-react-ts/node_modules/diff/lib/patch/create.js +0 -247
- package/template-react-ts/node_modules/diff/lib/patch/merge.js +0 -609
- package/template-react-ts/node_modules/diff/lib/patch/parse.js +0 -156
- package/template-react-ts/node_modules/diff/lib/util/array.js +0 -32
- package/template-react-ts/node_modules/diff/lib/util/distance-iterator.js +0 -57
- package/template-react-ts/node_modules/diff/lib/util/params.js +0 -24
- package/template-react-ts/node_modules/diff/package.json +0 -73
- package/template-react-ts/node_modules/diff/release-notes.md +0 -261
- package/template-react-ts/node_modules/diff/runtime.js +0 -3
- package/template-react-ts/node_modules/ts-node/LICENSE +0 -21
- package/template-react-ts/node_modules/ts-node/README.md +0 -1442
- package/template-react-ts/node_modules/ts-node/child-loader.mjs +0 -8
- package/template-react-ts/node_modules/ts-node/dist/bin-cwd.d.ts +0 -2
- package/template-react-ts/node_modules/ts-node/dist/bin-cwd.js +0 -6
- package/template-react-ts/node_modules/ts-node/dist/bin-cwd.js.map +0 -1
- package/template-react-ts/node_modules/ts-node/dist/bin-esm.d.ts +0 -2
- package/template-react-ts/node_modules/ts-node/dist/bin-esm.js +0 -6
- package/template-react-ts/node_modules/ts-node/dist/bin-esm.js.map +0 -1
- package/template-react-ts/node_modules/ts-node/dist/bin-script-deprecated.d.ts +0 -2
- package/template-react-ts/node_modules/ts-node/dist/bin-script-deprecated.js +0 -7
- package/template-react-ts/node_modules/ts-node/dist/bin-script-deprecated.js.map +0 -1
- package/template-react-ts/node_modules/ts-node/dist/bin-script.d.ts +0 -2
- package/template-react-ts/node_modules/ts-node/dist/bin-script.js +0 -6
- package/template-react-ts/node_modules/ts-node/dist/bin-script.js.map +0 -1
- package/template-react-ts/node_modules/ts-node/dist/bin-transpile.d.ts +0 -2
- package/template-react-ts/node_modules/ts-node/dist/bin-transpile.js +0 -6
- package/template-react-ts/node_modules/ts-node/dist/bin-transpile.js.map +0 -1
- package/template-react-ts/node_modules/ts-node/dist/bin.d.ts +0 -11
- package/template-react-ts/node_modules/ts-node/dist/bin.js +0 -581
- package/template-react-ts/node_modules/ts-node/dist/bin.js.map +0 -1
- package/template-react-ts/node_modules/ts-node/dist/child/argv-payload.d.ts +0 -1
- package/template-react-ts/node_modules/ts-node/dist/child/argv-payload.js +0 -19
- package/template-react-ts/node_modules/ts-node/dist/child/argv-payload.js.map +0 -1
- package/template-react-ts/node_modules/ts-node/dist/child/child-entrypoint.d.ts +0 -1
- package/template-react-ts/node_modules/ts-node/dist/child/child-entrypoint.js +0 -24
- package/template-react-ts/node_modules/ts-node/dist/child/child-entrypoint.js.map +0 -1
- package/template-react-ts/node_modules/ts-node/dist/child/child-loader.d.ts +0 -1
- package/template-react-ts/node_modules/ts-node/dist/child/child-loader.js +0 -32
- package/template-react-ts/node_modules/ts-node/dist/child/child-loader.js.map +0 -1
- package/template-react-ts/node_modules/ts-node/dist/child/child-require.d.ts +0 -7
- package/template-react-ts/node_modules/ts-node/dist/child/child-require.js +0 -22
- package/template-react-ts/node_modules/ts-node/dist/child/child-require.js.map +0 -1
- package/template-react-ts/node_modules/ts-node/dist/child/spawn-child.d.ts +0 -1
- package/template-react-ts/node_modules/ts-node/dist/child/spawn-child.js +0 -49
- package/template-react-ts/node_modules/ts-node/dist/child/spawn-child.js.map +0 -1
- package/template-react-ts/node_modules/ts-node/dist/cjs-resolve-hooks.d.ts +0 -1
- package/template-react-ts/node_modules/ts-node/dist/cjs-resolve-hooks.js +0 -29
- package/template-react-ts/node_modules/ts-node/dist/cjs-resolve-hooks.js.map +0 -1
- package/template-react-ts/node_modules/ts-node/dist/configuration.d.ts +0 -1
- package/template-react-ts/node_modules/ts-node/dist/configuration.js +0 -308
- package/template-react-ts/node_modules/ts-node/dist/configuration.js.map +0 -1
- package/template-react-ts/node_modules/ts-node/dist/esm.d.ts +0 -53
- package/template-react-ts/node_modules/ts-node/dist/esm.js +0 -228
- package/template-react-ts/node_modules/ts-node/dist/esm.js.map +0 -1
- package/template-react-ts/node_modules/ts-node/dist/file-extensions.d.ts +0 -1
- package/template-react-ts/node_modules/ts-node/dist/file-extensions.js +0 -133
- package/template-react-ts/node_modules/ts-node/dist/file-extensions.js.map +0 -1
- package/template-react-ts/node_modules/ts-node/dist/index.d.ts +0 -332
- package/template-react-ts/node_modules/ts-node/dist/index.js +0 -953
- package/template-react-ts/node_modules/ts-node/dist/index.js.map +0 -1
- package/template-react-ts/node_modules/ts-node/dist/module-type-classifier.d.ts +0 -1
- package/template-react-ts/node_modules/ts-node/dist/module-type-classifier.js +0 -64
- package/template-react-ts/node_modules/ts-node/dist/module-type-classifier.js.map +0 -1
- package/template-react-ts/node_modules/ts-node/dist/node-module-type-classifier.d.ts +0 -1
- package/template-react-ts/node_modules/ts-node/dist/node-module-type-classifier.js +0 -39
- package/template-react-ts/node_modules/ts-node/dist/node-module-type-classifier.js.map +0 -1
- package/template-react-ts/node_modules/ts-node/dist/repl.d.ts +0 -78
- package/template-react-ts/node_modules/ts-node/dist/repl.js +0 -561
- package/template-react-ts/node_modules/ts-node/dist/repl.js.map +0 -1
- package/template-react-ts/node_modules/ts-node/dist/resolver-functions.d.ts +0 -1
- package/template-react-ts/node_modules/ts-node/dist/resolver-functions.js +0 -143
- package/template-react-ts/node_modules/ts-node/dist/resolver-functions.js.map +0 -1
- package/template-react-ts/node_modules/ts-node/dist/transpilers/swc.d.ts +0 -11
- package/template-react-ts/node_modules/ts-node/dist/transpilers/swc.js +0 -218
- package/template-react-ts/node_modules/ts-node/dist/transpilers/swc.js.map +0 -1
- package/template-react-ts/node_modules/ts-node/dist/transpilers/types.d.ts +0 -35
- package/template-react-ts/node_modules/ts-node/dist/transpilers/types.js +0 -3
- package/template-react-ts/node_modules/ts-node/dist/transpilers/types.js.map +0 -1
- package/template-react-ts/node_modules/ts-node/dist/ts-compiler-types.d.ts +0 -63
- package/template-react-ts/node_modules/ts-node/dist/ts-compiler-types.js +0 -3
- package/template-react-ts/node_modules/ts-node/dist/ts-compiler-types.js.map +0 -1
- package/template-react-ts/node_modules/ts-node/dist/ts-internals.d.ts +0 -6
- package/template-react-ts/node_modules/ts-node/dist/ts-internals.js +0 -321
- package/template-react-ts/node_modules/ts-node/dist/ts-internals.js.map +0 -1
- package/template-react-ts/node_modules/ts-node/dist/ts-transpile-module.d.ts +0 -1
- package/template-react-ts/node_modules/ts-node/dist/ts-transpile-module.js +0 -100
- package/template-react-ts/node_modules/ts-node/dist/ts-transpile-module.js.map +0 -1
- package/template-react-ts/node_modules/ts-node/dist/tsconfig-schema.d.ts +0 -13
- package/template-react-ts/node_modules/ts-node/dist/tsconfig-schema.js +0 -3
- package/template-react-ts/node_modules/ts-node/dist/tsconfig-schema.js.map +0 -1
- package/template-react-ts/node_modules/ts-node/dist/tsconfigs.d.ts +0 -1
- package/template-react-ts/node_modules/ts-node/dist/tsconfigs.js +0 -36
- package/template-react-ts/node_modules/ts-node/dist/tsconfigs.js.map +0 -1
- package/template-react-ts/node_modules/ts-node/dist/util.d.ts +0 -4
- package/template-react-ts/node_modules/ts-node/dist/util.js +0 -175
- package/template-react-ts/node_modules/ts-node/dist/util.js.map +0 -1
- package/template-react-ts/node_modules/ts-node/dist-raw/NODE-LICENSE.md +0 -24
- package/template-react-ts/node_modules/ts-node/dist-raw/README.md +0 -36
- package/template-react-ts/node_modules/ts-node/dist-raw/node-internal-constants.js +0 -4
- package/template-react-ts/node_modules/ts-node/dist-raw/node-internal-errors.js +0 -82
- package/template-react-ts/node_modules/ts-node/dist-raw/node-internal-modules-cjs-helpers.js +0 -89
- package/template-react-ts/node_modules/ts-node/dist-raw/node-internal-modules-cjs-loader.js +0 -593
- package/template-react-ts/node_modules/ts-node/dist-raw/node-internal-modules-esm-get_format.js +0 -106
- package/template-react-ts/node_modules/ts-node/dist-raw/node-internal-modules-esm-resolve.js +0 -962
- package/template-react-ts/node_modules/ts-node/dist-raw/node-internal-modules-package_json_reader.js +0 -44
- package/template-react-ts/node_modules/ts-node/dist-raw/node-internal-repl-await.js +0 -254
- package/template-react-ts/node_modules/ts-node/dist-raw/node-internalBinding-fs.js +0 -58
- package/template-react-ts/node_modules/ts-node/dist-raw/node-nativemodule.js +0 -9
- package/template-react-ts/node_modules/ts-node/dist-raw/node-options.js +0 -103
- package/template-react-ts/node_modules/ts-node/dist-raw/node-primordials.js +0 -37
- package/template-react-ts/node_modules/ts-node/dist-raw/runmain-hack.js +0 -9
- package/template-react-ts/node_modules/ts-node/esm/transpile-only.mjs +0 -8
- package/template-react-ts/node_modules/ts-node/esm.mjs +0 -8
- package/template-react-ts/node_modules/ts-node/node10/tsconfig.json +0 -3
- package/template-react-ts/node_modules/ts-node/node12/tsconfig.json +0 -3
- package/template-react-ts/node_modules/ts-node/node14/tsconfig.json +0 -3
- package/template-react-ts/node_modules/ts-node/node16/tsconfig.json +0 -3
- package/template-react-ts/node_modules/ts-node/package.json +0 -182
- package/template-react-ts/node_modules/ts-node/register/files.js +0 -3
- package/template-react-ts/node_modules/ts-node/register/index.js +0 -1
- package/template-react-ts/node_modules/ts-node/register/transpile-only.js +0 -3
- package/template-react-ts/node_modules/ts-node/register/type-check.js +0 -3
- package/template-react-ts/node_modules/ts-node/transpilers/swc-experimental.js +0 -1
- package/template-react-ts/node_modules/ts-node/transpilers/swc.js +0 -1
- package/template-react-ts/node_modules/ts-node/tsconfig.schema.json +0 -183
- package/template-react-ts/node_modules/ts-node/tsconfig.schemastore-schema.json +0 -1326
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"bin.js","sourceRoot":"","sources":["../src/bin.ts"],"names":[],"mappings":";;;;AAEA,+BAA4E;AAC5E,+BAA+B;AAC/B,iCAAkC;AAClC,IAAI,GAAyB,CAAC;AAC9B,iCAA4E;AAC5E,iCAWgB;AAChB,mCAQiB;AAEjB,qGAAuF;AACvF,qDAAkD;AAClD,mDAAoD;AAEpD;;;;;;;;GAQG;AACH,SAAgB,IAAI,CAClB,OAAiB,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,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AM;YACR,CAAC,CAAC,IAAA,cAAO,EAAC,MAAM,EAAE,EAAE,MAAM,EAAE,OAAO,CAAC,MAAM,CAAC,KAAK,EAAE,CAAC,CACtD,CAAC;KACH;AACH,CAAC;AAED,IAAI,OAAO,CAAC,IAAI,KAAK,MAAM,EAAE;IAC3B,IAAI,EAAE,CAAC;CACR","sourcesContent":["#!/usr/bin/env node\n\nimport { join, resolve, dirname, parse as parsePath, relative } from 'path';\nimport { inspect } from 'util';\nimport Module = require('module');\nlet arg: typeof import('arg');\nimport { parse, createRequire, hasOwnProperty, versionGteLt } from './util';\nimport {\n EVAL_FILENAME,\n EvalState,\n createRepl,\n ReplService,\n setupContext,\n STDIN_FILENAME,\n EvalAwarePartialHost,\n EVAL_NAME,\n STDIN_NAME,\n REPL_FILENAME,\n} from './repl';\nimport {\n VERSION,\n TSError,\n register,\n createEsmHooks,\n createFromPreloadedConfig,\n DEFAULTS,\n ExperimentalSpecifierResolution,\n} from './index';\nimport type { TSInternal } from './ts-compiler-types';\nimport { addBuiltinLibsToObject } from '../dist-raw/node-internal-modules-cjs-helpers';\nimport { callInChild } from './child/spawn-child';\nimport { findAndReadConfig } from './configuration';\n\n/**\n * Main `bin` functionality.\n *\n * This file is split into a chain of functions (phases), each one adding to a shared state object.\n * This is done so that the next function can either be invoked in-process or, if necessary, invoked in a child process.\n *\n * The functions are intentionally given uncreative names and left in the same order as the original code, to make a\n * smaller git diff.\n */\nexport function main(\n argv: string[] = process.argv.slice(2),\n entrypointArgs: Record<string, any> = {}\n) {\n const args = parseArgv(argv, entrypointArgs);\n const state: BootstrapState = {\n shouldUseChildProcess: false,\n isInChildProcess: false,\n isCli: true,\n tsNodeScript: __filename,\n parseArgvResult: args,\n };\n return bootstrap(state);\n}\n\n/**\n * @internal\n * Describes state of CLI bootstrapping.\n * Can be marshalled when necessary to resume bootstrapping in a child process.\n */\nexport interface BootstrapState {\n isInChildProcess: boolean;\n shouldUseChildProcess: boolean;\n /**\n * True if bootstrapping the ts-node CLI process or the direct child necessitated by `--esm`.\n * false if bootstrapping a subsequently `fork()`ed child.\n */\n isCli: boolean;\n tsNodeScript: string;\n parseArgvResult: ReturnType<typeof parseArgv>;\n phase2Result?: ReturnType<typeof phase2>;\n phase3Result?: ReturnType<typeof phase3>;\n}\n\n/** @internal */\nexport function bootstrap(state: BootstrapState) {\n if (!state.phase2Result) {\n state.phase2Result = phase2(state);\n if (state.shouldUseChildProcess && !state.isInChildProcess) {\n // Note: When transitioning into the child-process after `phase2`,\n // the updated working directory needs to be preserved.\n return callInChild(state);\n }\n }\n if (!state.phase3Result) {\n state.phase3Result = phase3(state);\n if (state.shouldUseChildProcess && !state.isInChildProcess) {\n // Note: When transitioning into the child-process after `phase2`,\n // the updated working directory needs to be preserved.\n return callInChild(state);\n }\n }\n return phase4(state);\n}\n\nfunction parseArgv(argv: string[], entrypointArgs: Record<string, any>) {\n arg ??= require('arg');\n // HACK: technically, this function is not marked @internal so it's possible\n // that libraries in the wild are doing `require('ts-node/dist/bin').main({'--transpile-only': true})`\n // We can mark this function @internal in next major release.\n // For now, rewrite args to avoid a breaking change.\n entrypointArgs = { ...entrypointArgs };\n for (const key of Object.keys(entrypointArgs)) {\n entrypointArgs[\n key.replace(\n /([a-z])-([a-z])/g,\n (_$0, $1, $2: string) => `${$1}${$2.toUpperCase()}`\n )\n ] = entrypointArgs[key];\n }\n\n const args = {\n ...entrypointArgs,\n ...arg(\n {\n // Node.js-like options.\n '--eval': String,\n '--interactive': Boolean,\n '--print': Boolean,\n '--require': [String],\n\n // CLI options.\n '--help': Boolean,\n '--cwdMode': Boolean,\n '--scriptMode': Boolean,\n '--version': arg.COUNT,\n '--showConfig': Boolean,\n '--esm': Boolean,\n\n // Project options.\n '--cwd': String,\n '--files': Boolean,\n '--compiler': String,\n '--compilerOptions': parse,\n '--project': String,\n '--ignoreDiagnostics': [String],\n '--ignore': [String],\n '--transpileOnly': Boolean,\n '--transpiler': String,\n '--swc': Boolean,\n '--typeCheck': Boolean,\n '--compilerHost': Boolean,\n '--pretty': Boolean,\n '--skipProject': Boolean,\n '--skipIgnore': Boolean,\n '--preferTsExts': Boolean,\n '--logError': Boolean,\n '--emit': Boolean,\n '--scope': Boolean,\n '--scopeDir': String,\n '--noExperimentalReplAwait': Boolean,\n '--experimentalSpecifierResolution': String,\n\n // Aliases.\n '-e': '--eval',\n '-i': '--interactive',\n '-p': '--print',\n '-r': '--require',\n '-h': '--help',\n '-s': '--script-mode',\n '-v': '--version',\n '-T': '--transpileOnly',\n '-H': '--compilerHost',\n '-I': '--ignore',\n '-P': '--project',\n '-C': '--compiler',\n '-D': '--ignoreDiagnostics',\n '-O': '--compilerOptions',\n '--dir': '--cwd',\n\n // Support both tsc-style camelCase and node-style hypen-case for *all* flags\n '--cwd-mode': '--cwdMode',\n '--script-mode': '--scriptMode',\n '--show-config': '--showConfig',\n '--compiler-options': '--compilerOptions',\n '--ignore-diagnostics': '--ignoreDiagnostics',\n '--transpile-only': '--transpileOnly',\n '--type-check': '--typeCheck',\n '--compiler-host': '--compilerHost',\n '--skip-project': '--skipProject',\n '--skip-ignore': '--skipIgnore',\n '--prefer-ts-exts': '--preferTsExts',\n '--log-error': '--logError',\n '--scope-dir': '--scopeDir',\n '--no-experimental-repl-await': '--noExperimentalReplAwait',\n '--experimental-specifier-resolution':\n '--experimentalSpecifierResolution',\n },\n {\n argv,\n stopAtPositional: true,\n }\n ),\n };\n\n // Only setting defaults for CLI-specific flags\n // Anything passed to `register()` can be `undefined`; `create()` will apply\n // defaults.\n const {\n '--cwd': cwdArg,\n '--help': help = false,\n '--scriptMode': scriptMode,\n '--cwdMode': cwdMode,\n '--version': version = 0,\n '--showConfig': showConfig,\n '--require': argsRequire = [],\n '--eval': code = undefined,\n '--print': print = false,\n '--interactive': interactive = false,\n '--files': files,\n '--compiler': compiler,\n '--compilerOptions': compilerOptions,\n '--project': project,\n '--ignoreDiagnostics': ignoreDiagnostics,\n '--ignore': ignore,\n '--transpileOnly': transpileOnly,\n '--typeCheck': typeCheck,\n '--transpiler': transpiler,\n '--swc': swc,\n '--compilerHost': compilerHost,\n '--pretty': pretty,\n '--skipProject': skipProject,\n '--skipIgnore': skipIgnore,\n '--preferTsExts': preferTsExts,\n '--logError': logError,\n '--emit': emit,\n '--scope': scope = undefined,\n '--scopeDir': scopeDir = undefined,\n '--noExperimentalReplAwait': noExperimentalReplAwait,\n '--experimentalSpecifierResolution': experimentalSpecifierResolution,\n '--esm': esm,\n _: restArgs,\n } = args;\n return {\n // Note: argv and restArgs may be overwritten by child process\n argv: process.argv,\n restArgs,\n\n cwdArg,\n help,\n scriptMode,\n cwdMode,\n version,\n showConfig,\n argsRequire,\n code,\n print,\n interactive,\n files,\n compiler,\n compilerOptions,\n project,\n ignoreDiagnostics,\n ignore,\n transpileOnly,\n typeCheck,\n transpiler,\n swc,\n compilerHost,\n pretty,\n skipProject,\n skipIgnore,\n preferTsExts,\n logError,\n emit,\n scope,\n scopeDir,\n noExperimentalReplAwait,\n experimentalSpecifierResolution,\n esm,\n };\n}\n\nfunction phase2(payload: BootstrapState) {\n const { help, version, cwdArg, esm } = payload.parseArgvResult;\n\n if (help) {\n console.log(`\nUsage: ts-node [options] [ -e script | script.ts ] [arguments]\n\nOptions:\n\n -e, --eval [code] Evaluate code\n -p, --print Print result of \\`--eval\\`\n -r, --require [path] Require a node module before execution\n -i, --interactive Opens the REPL even if stdin does not appear to be a terminal\n\n --esm Bootstrap with the ESM loader, enabling full ESM support\n --swc Use the faster swc transpiler\n\n -h, --help Print CLI usage\n -v, --version Print module version information. -vvv to print additional information\n --showConfig Print resolved configuration and exit\n\n -T, --transpileOnly Use TypeScript's faster \\`transpileModule\\` or a third-party transpiler\n -H, --compilerHost Use TypeScript's compiler host API\n -I, --ignore [pattern] Override the path patterns to skip compilation\n -P, --project [path] Path to TypeScript JSON project file\n -C, --compiler [name] Specify a custom TypeScript compiler\n --transpiler [name] Specify a third-party, non-typechecking transpiler\n -D, --ignoreDiagnostics [code] Ignore TypeScript warnings by diagnostic code\n -O, --compilerOptions [opts] JSON object to merge with compiler options\n\n --cwd Behave as if invoked within this working directory.\n --files Load \\`files\\`, \\`include\\` and \\`exclude\\` from \\`tsconfig.json\\` on startup\n --pretty Use pretty diagnostic formatter (usually enabled by default)\n --cwdMode Use current directory instead of <script.ts> for config resolution\n --skipProject Skip reading \\`tsconfig.json\\`\n --skipIgnore Skip \\`--ignore\\` checks\n --emit Emit output files into \\`.ts-node\\` directory\n --scope Scope compiler to files within \\`scopeDir\\`. Anything outside this directory is ignored.\n --scopeDir Directory for \\`--scope\\`\n --preferTsExts Prefer importing TypeScript files over JavaScript files\n --logError Logs TypeScript errors to stderr instead of throwing exceptions\n --noExperimentalReplAwait Disable top-level await in REPL. Equivalent to node's --no-experimental-repl-await\n --experimentalSpecifierResolution [node|explicit]\n Equivalent to node's --experimental-specifier-resolution\n`);\n\n process.exit(0);\n }\n\n // Output project information.\n if (version === 1) {\n console.log(`v${VERSION}`);\n process.exit(0);\n }\n\n const cwd = cwdArg ? resolve(cwdArg) : process.cwd();\n\n // If ESM is explicitly enabled through the flag, stage3 should be run in a child process\n // with the ESM loaders configured.\n if (esm) payload.shouldUseChildProcess = true;\n\n return {\n cwd,\n };\n}\n\nfunction phase3(payload: BootstrapState) {\n const {\n emit,\n files,\n pretty,\n transpileOnly,\n transpiler,\n noExperimentalReplAwait,\n typeCheck,\n swc,\n compilerHost,\n ignore,\n preferTsExts,\n logError,\n scriptMode,\n cwdMode,\n project,\n skipProject,\n skipIgnore,\n compiler,\n ignoreDiagnostics,\n compilerOptions,\n argsRequire,\n scope,\n scopeDir,\n esm,\n experimentalSpecifierResolution,\n } = payload.parseArgvResult;\n const { cwd } = payload.phase2Result!;\n\n // NOTE: When we transition to a child process for ESM, the entry-point script determined\n // here might not be the one used later in `phase4`. This can happen when we execute the\n // original entry-point but then the process forks itself using e.g. `child_process.fork`.\n // We will always use the original TS project in forked processes anyway, so it is\n // expected and acceptable to retrieve the entry-point information here in `phase2`.\n // See: https://github.com/TypeStrong/ts-node/issues/1812.\n const { entryPointPath } = getEntryPointInfo(payload);\n\n const preloadedConfig = findAndReadConfig({\n cwd,\n emit,\n files,\n pretty,\n transpileOnly: transpileOnly ?? transpiler != null ? true : undefined,\n experimentalReplAwait: noExperimentalReplAwait ? false : undefined,\n typeCheck,\n transpiler,\n swc,\n compilerHost,\n ignore,\n logError,\n projectSearchDir: getProjectSearchDir(\n cwd,\n scriptMode,\n cwdMode,\n entryPointPath\n ),\n project,\n skipProject,\n skipIgnore,\n compiler,\n ignoreDiagnostics,\n compilerOptions,\n require: argsRequire,\n scope,\n scopeDir,\n preferTsExts,\n esm,\n experimentalSpecifierResolution:\n experimentalSpecifierResolution as ExperimentalSpecifierResolution,\n });\n\n // If ESM is enabled through the parsed tsconfig, stage4 should be run in a child\n // process with the ESM loaders configured.\n if (preloadedConfig.options.esm) payload.shouldUseChildProcess = true;\n\n return { preloadedConfig };\n}\n\n/**\n * Determines the entry-point information from the argv and phase2 result. This\n * method will be invoked in two places:\n *\n * 1. In phase 3 to be able to find a project from the potential entry-point script.\n * 2. In phase 4 to determine the actual entry-point script.\n *\n * Note that we need to explicitly re-resolve the entry-point information in the final\n * stage because the previous stage information could be modified when the bootstrap\n * invocation transitioned into a child process for ESM.\n *\n * Stages before (phase 4) can and will be cached by the child process through the Brotli\n * configuration and entry-point information is only reliable in the final phase. More\n * details can be found in here: https://github.com/TypeStrong/ts-node/issues/1812.\n */\nfunction getEntryPointInfo(state: BootstrapState) {\n const { code, interactive, restArgs } = state.parseArgvResult!;\n const { cwd } = state.phase2Result!;\n const { isCli } = state;\n\n // Figure out which we are executing: piped stdin, --eval, REPL, and/or entrypoint\n // This is complicated because node's behavior is complicated\n // `node -e code -i ./script.js` ignores -e\n const executeEval = code != null && !(interactive && restArgs.length);\n const executeEntrypoint = !executeEval && restArgs.length > 0;\n const executeRepl =\n !executeEntrypoint &&\n (interactive || (process.stdin.isTTY && !executeEval));\n const executeStdin = !executeEval && !executeRepl && !executeEntrypoint;\n\n /**\n * Unresolved. May point to a symlink, not realpath. May be missing file extension\n * NOTE: resolution relative to cwd option (not `process.cwd()`) is legacy backwards-compat; should be changed in next major: https://github.com/TypeStrong/ts-node/issues/1834\n */\n const entryPointPath = executeEntrypoint\n ? isCli\n ? resolve(cwd, restArgs[0])\n : resolve(restArgs[0])\n : undefined;\n\n return {\n executeEval,\n executeEntrypoint,\n executeRepl,\n executeStdin,\n entryPointPath,\n };\n}\n\nfunction phase4(payload: BootstrapState) {\n const { isInChildProcess, tsNodeScript } = payload;\n const { version, showConfig, restArgs, code, print, argv } =\n payload.parseArgvResult;\n const { cwd } = payload.phase2Result!;\n const { preloadedConfig } = payload.phase3Result!;\n\n const {\n entryPointPath,\n executeEntrypoint,\n executeEval,\n executeRepl,\n executeStdin,\n } = getEntryPointInfo(payload);\n\n /**\n * <repl>, [stdin], and [eval] are all essentially virtual files that do not exist on disc and are backed by a REPL\n * service to handle eval-ing of code.\n */\n interface VirtualFileState {\n state: EvalState;\n repl: ReplService;\n module?: Module;\n }\n let evalStuff: VirtualFileState | undefined;\n let replStuff: VirtualFileState | undefined;\n let stdinStuff: VirtualFileState | undefined;\n let evalAwarePartialHost: EvalAwarePartialHost | undefined = undefined;\n if (executeEval) {\n const state = new EvalState(join(cwd, EVAL_FILENAME));\n evalStuff = {\n state,\n repl: createRepl({\n state,\n composeWithEvalAwarePartialHost: evalAwarePartialHost,\n ignoreDiagnosticsThatAreAnnoyingInInteractiveRepl: false,\n }),\n };\n ({ evalAwarePartialHost } = evalStuff.repl);\n // Create a local module instance based on `cwd`.\n const module = (evalStuff.module = new Module(EVAL_NAME));\n module.filename = evalStuff.state.path;\n module.paths = (Module as any)._nodeModulePaths(cwd);\n }\n if (executeStdin) {\n const state = new EvalState(join(cwd, STDIN_FILENAME));\n stdinStuff = {\n state,\n repl: createRepl({\n state,\n composeWithEvalAwarePartialHost: evalAwarePartialHost,\n ignoreDiagnosticsThatAreAnnoyingInInteractiveRepl: false,\n }),\n };\n ({ evalAwarePartialHost } = stdinStuff.repl);\n // Create a local module instance based on `cwd`.\n const module = (stdinStuff.module = new Module(STDIN_NAME));\n module.filename = stdinStuff.state.path;\n module.paths = (Module as any)._nodeModulePaths(cwd);\n }\n if (executeRepl) {\n const state = new EvalState(join(cwd, REPL_FILENAME));\n replStuff = {\n state,\n repl: createRepl({\n state,\n composeWithEvalAwarePartialHost: evalAwarePartialHost,\n }),\n };\n ({ evalAwarePartialHost } = replStuff.repl);\n }\n\n // Register the TypeScript compiler instance.\n const service = createFromPreloadedConfig({\n // Since this struct may have been marshalled across thread or process boundaries, we must restore\n // un-marshall-able values.\n ...preloadedConfig,\n options: {\n ...preloadedConfig.options,\n readFile: evalAwarePartialHost?.readFile ?? undefined,\n fileExists: evalAwarePartialHost?.fileExists ?? undefined,\n tsTrace: DEFAULTS.tsTrace,\n },\n });\n register(service);\n if (isInChildProcess)\n (\n require('./child/child-loader') as typeof import('./child/child-loader')\n ).lateBindHooks(createEsmHooks(service));\n\n // Bind REPL service to ts-node compiler service (chicken-and-egg problem)\n replStuff?.repl.setService(service);\n evalStuff?.repl.setService(service);\n stdinStuff?.repl.setService(service);\n\n // Output project information.\n if (version === 2) {\n console.log(`ts-node v${VERSION}`);\n console.log(`node ${process.version}`);\n console.log(`compiler v${service.ts.version}`);\n process.exit(0);\n }\n if (version >= 3) {\n console.log(`ts-node v${VERSION} ${dirname(__dirname)}`);\n console.log(`node ${process.version}`);\n console.log(\n `compiler v${service.ts.version} ${service.compilerPath ?? ''}`\n );\n process.exit(0);\n }\n\n if (showConfig) {\n const ts = service.ts as any as TSInternal;\n if (typeof ts.convertToTSConfig !== 'function') {\n console.error(\n 'Error: --showConfig requires a typescript versions >=3.2 that support --showConfig'\n );\n process.exit(1);\n }\n let moduleTypes = undefined;\n if (service.options.moduleTypes) {\n // Assumption: this codepath requires CLI invocation, so moduleTypes must have come from a tsconfig, not API.\n const showRelativeTo = dirname(service.configFilePath!);\n moduleTypes = {} as Record<string, string>;\n for (const [key, value] of Object.entries(service.options.moduleTypes)) {\n moduleTypes[\n relative(\n showRelativeTo,\n resolve(service.options.optionBasePaths?.moduleTypes!, key)\n )\n ] = value;\n }\n }\n const json = {\n ['ts-node']: {\n ...service.options,\n require: service.options.require?.length\n ? service.options.require\n : undefined,\n moduleTypes,\n optionBasePaths: undefined,\n compilerOptions: undefined,\n project: service.configFilePath ?? service.options.project,\n },\n ...ts.convertToTSConfig(\n service.config,\n service.configFilePath ?? join(cwd, 'ts-node-implicit-tsconfig.json'),\n service.ts.sys\n ),\n };\n console.log(\n // Assumes that all configuration options which can possibly be specified via the CLI are JSON-compatible.\n // If, in the future, we must log functions, for example readFile and fileExists, then we can implement a JSON\n // replacer function.\n JSON.stringify(json, null, 2)\n );\n process.exit(0);\n }\n\n // Prepend `ts-node` arguments to CLI for child processes.\n process.execArgv.push(\n tsNodeScript,\n ...argv.slice(2, argv.length - restArgs.length)\n );\n\n // TODO this comes from BootstrapState\n process.argv = [process.argv[1]]\n .concat(executeEntrypoint ? ([entryPointPath] as string[]) : [])\n .concat(restArgs.slice(executeEntrypoint ? 1 : 0));\n\n // Execute the main contents (either eval, script or piped).\n if (executeEntrypoint) {\n if (\n payload.isInChildProcess &&\n versionGteLt(process.versions.node, '18.6.0')\n ) {\n // HACK workaround node regression\n require('../dist-raw/runmain-hack.js').run(entryPointPath);\n } else {\n Module.runMain();\n }\n } else {\n // Note: eval and repl may both run, but never with stdin.\n // If stdin runs, eval and repl will not.\n if (executeEval) {\n addBuiltinLibsToObject(global);\n evalAndExitOnTsError(\n evalStuff!.repl,\n evalStuff!.module!,\n code!,\n print,\n 'eval'\n );\n }\n\n if (executeRepl) {\n replStuff!.repl.start();\n }\n\n if (executeStdin) {\n let buffer = code || '';\n process.stdin.on('data', (chunk: Buffer) => (buffer += chunk));\n process.stdin.on('end', () => {\n evalAndExitOnTsError(\n stdinStuff!.repl,\n stdinStuff!.module!,\n buffer,\n // `echo 123 | node -p` still prints 123\n print,\n 'stdin'\n );\n });\n }\n }\n}\n\n/**\n * Get project search path from args.\n */\nfunction getProjectSearchDir(\n cwd?: string,\n scriptMode?: boolean,\n cwdMode?: boolean,\n scriptPath?: string\n) {\n // Validate `--script-mode` / `--cwd-mode` / `--cwd` usage is correct.\n if (scriptMode && cwdMode) {\n throw new TypeError('--cwd-mode cannot be combined with --script-mode');\n }\n if (scriptMode && !scriptPath) {\n throw new TypeError(\n '--script-mode must be used with a script name, e.g. `ts-node --script-mode <script.ts>`'\n );\n }\n const doScriptMode =\n scriptMode === true ? true : cwdMode === true ? false : !!scriptPath;\n if (doScriptMode) {\n // Use node's own resolution behavior to ensure we follow symlinks.\n // scriptPath may omit file extension or point to a directory with or without package.json.\n // This happens before we are registered, so we tell node's resolver to consider ts, tsx, and jsx files.\n // In extremely rare cases, is is technically possible to resolve the wrong directory,\n // because we do not yet know preferTsExts, jsx, nor allowJs.\n // See also, justification why this will not happen in real-world situations:\n // https://github.com/TypeStrong/ts-node/pull/1009#issuecomment-613017081\n const exts = ['.js', '.jsx', '.ts', '.tsx'];\n const extsTemporarilyInstalled: string[] = [];\n for (const ext of exts) {\n if (!hasOwnProperty(require.extensions, ext)) {\n extsTemporarilyInstalled.push(ext);\n require.extensions[ext] = function () {};\n }\n }\n try {\n return dirname(requireResolveNonCached(scriptPath!));\n } finally {\n for (const ext of extsTemporarilyInstalled) {\n delete require.extensions[ext];\n }\n }\n }\n\n return cwd;\n}\n\nconst guaranteedNonexistentDirectoryPrefix = resolve(__dirname, 'doesnotexist');\nlet guaranteedNonexistentDirectorySuffix = 0;\n\n/**\n * require.resolve an absolute path, tricking node into *not* caching the results.\n * Necessary so that we do not pollute require.resolve cache prior to installing require.extensions\n *\n * Is a terrible hack, because node does not expose the necessary cache invalidation APIs\n * https://stackoverflow.com/questions/59865584/how-to-invalidate-cached-require-resolve-results\n */\nfunction requireResolveNonCached(absoluteModuleSpecifier: string) {\n // node <= 12.1.x fallback: The trick below triggers a node bug on old versions.\n // On these old versions, pollute the require cache instead. This is a deliberate\n // ts-node limitation that will *rarely* manifest, and will not matter once node 12\n // is end-of-life'd on 2022-04-30\n const isSupportedNodeVersion = versionGteLt(process.versions.node, '12.2.0');\n if (!isSupportedNodeVersion) return require.resolve(absoluteModuleSpecifier);\n\n const { dir, base } = parsePath(absoluteModuleSpecifier);\n const relativeModuleSpecifier = `./${base}`;\n\n const req = createRequire(\n join(dir, 'imaginaryUncacheableRequireResolveScript')\n );\n return req.resolve(relativeModuleSpecifier, {\n paths: [\n `${guaranteedNonexistentDirectoryPrefix}${guaranteedNonexistentDirectorySuffix++}`,\n ...(req.resolve.paths(relativeModuleSpecifier) || []),\n ],\n });\n}\n\n/**\n * Evaluate an [eval] or [stdin] script\n */\nfunction evalAndExitOnTsError(\n replService: ReplService,\n module: Module,\n code: string,\n isPrinted: boolean,\n filenameAndDirname: 'eval' | 'stdin'\n) {\n let result: any;\n setupContext(global, module, filenameAndDirname);\n\n try {\n result = replService.evalCode(code);\n } catch (error) {\n if (error instanceof TSError) {\n console.error(error);\n process.exit(1);\n }\n\n throw error;\n }\n\n if (isPrinted) {\n console.log(\n typeof result === 'string'\n ? result\n : inspect(result, { colors: process.stdout.isTTY })\n );\n }\n}\n\nif (require.main === module) {\n main();\n}\n"]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.decompress = exports.compress = exports.argPrefix = void 0;
|
|
4
|
-
const zlib_1 = require("zlib");
|
|
5
|
-
/** @internal */
|
|
6
|
-
exports.argPrefix = '--brotli-base64-config=';
|
|
7
|
-
/** @internal */
|
|
8
|
-
function compress(object) {
|
|
9
|
-
return (0, zlib_1.brotliCompressSync)(Buffer.from(JSON.stringify(object), 'utf8'), {
|
|
10
|
-
[zlib_1.constants.BROTLI_PARAM_QUALITY]: zlib_1.constants.BROTLI_MIN_QUALITY,
|
|
11
|
-
}).toString('base64');
|
|
12
|
-
}
|
|
13
|
-
exports.compress = compress;
|
|
14
|
-
/** @internal */
|
|
15
|
-
function decompress(str) {
|
|
16
|
-
return JSON.parse((0, zlib_1.brotliDecompressSync)(Buffer.from(str, 'base64')).toString());
|
|
17
|
-
}
|
|
18
|
-
exports.decompress = decompress;
|
|
19
|
-
//# sourceMappingURL=argv-payload.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"argv-payload.js","sourceRoot":"","sources":["../../src/child/argv-payload.ts"],"names":[],"mappings":";;;AAAA,+BAA2E;AAE3E,gBAAgB;AACH,QAAA,SAAS,GAAG,yBAAyB,CAAC;AAEnD,gBAAgB;AAChB,SAAgB,QAAQ,CAAC,MAAW;IAClC,OAAO,IAAA,yBAAkB,EAAC,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,EAAE,MAAM,CAAC,EAAE;QACrE,CAAC,gBAAS,CAAC,oBAAoB,CAAC,EAAE,gBAAS,CAAC,kBAAkB;KAC/D,CAAC,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC;AACxB,CAAC;AAJD,4BAIC;AAED,gBAAgB;AAChB,SAAgB,UAAU,CAAC,GAAW;IACpC,OAAO,IAAI,CAAC,KAAK,CACf,IAAA,2BAAoB,EAAC,MAAM,CAAC,IAAI,CAAC,GAAG,EAAE,QAAQ,CAAC,CAAC,CAAC,QAAQ,EAAE,CAC5D,CAAC;AACJ,CAAC;AAJD,gCAIC","sourcesContent":["import { brotliCompressSync, brotliDecompressSync, constants } from 'zlib';\n\n/** @internal */\nexport const argPrefix = '--brotli-base64-config=';\n\n/** @internal */\nexport function compress(object: any) {\n return brotliCompressSync(Buffer.from(JSON.stringify(object), 'utf8'), {\n [constants.BROTLI_PARAM_QUALITY]: constants.BROTLI_MIN_QUALITY,\n }).toString('base64');\n}\n\n/** @internal */\nexport function decompress(str: string) {\n return JSON.parse(\n brotliDecompressSync(Buffer.from(str, 'base64')).toString()\n );\n}\n"]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const bin_1 = require("../bin");
|
|
4
|
-
const argv_payload_1 = require("./argv-payload");
|
|
5
|
-
const base64ConfigArg = process.argv[2];
|
|
6
|
-
if (!base64ConfigArg.startsWith(argv_payload_1.argPrefix))
|
|
7
|
-
throw new Error('unexpected argv');
|
|
8
|
-
const base64Payload = base64ConfigArg.slice(argv_payload_1.argPrefix.length);
|
|
9
|
-
const state = (0, argv_payload_1.decompress)(base64Payload);
|
|
10
|
-
state.isInChildProcess = true;
|
|
11
|
-
state.tsNodeScript = __filename;
|
|
12
|
-
state.parseArgvResult.argv = process.argv;
|
|
13
|
-
state.parseArgvResult.restArgs = process.argv.slice(3);
|
|
14
|
-
// Modify and re-compress the payload delivered to subsequent child processes.
|
|
15
|
-
// This logic may be refactored into bin.ts by https://github.com/TypeStrong/ts-node/issues/1831
|
|
16
|
-
if (state.isCli) {
|
|
17
|
-
const stateForChildren = {
|
|
18
|
-
...state,
|
|
19
|
-
isCli: false,
|
|
20
|
-
};
|
|
21
|
-
state.parseArgvResult.argv[2] = `${argv_payload_1.argPrefix}${(0, argv_payload_1.compress)(stateForChildren)}`;
|
|
22
|
-
}
|
|
23
|
-
(0, bin_1.bootstrap)(state);
|
|
24
|
-
//# sourceMappingURL=child-entrypoint.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"child-entrypoint.js","sourceRoot":"","sources":["../../src/child/child-entrypoint.ts"],"names":[],"mappings":";;AAAA,gCAAmD;AACnD,iDAAiE;AAEjE,MAAM,eAAe,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AACxC,IAAI,CAAC,eAAe,CAAC,UAAU,CAAC,wBAAS,CAAC;IAAE,MAAM,IAAI,KAAK,CAAC,iBAAiB,CAAC,CAAC;AAC/E,MAAM,aAAa,GAAG,eAAe,CAAC,KAAK,CAAC,wBAAS,CAAC,MAAM,CAAC,CAAC;AAC9D,MAAM,KAAK,GAAG,IAAA,yBAAU,EAAC,aAAa,CAAmB,CAAC;AAE1D,KAAK,CAAC,gBAAgB,GAAG,IAAI,CAAC;AAC9B,KAAK,CAAC,YAAY,GAAG,UAAU,CAAC;AAChC,KAAK,CAAC,eAAe,CAAC,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC;AAC1C,KAAK,CAAC,eAAe,CAAC,QAAQ,GAAG,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;AAEvD,8EAA8E;AAC9E,gGAAgG;AAChG,IAAI,KAAK,CAAC,KAAK,EAAE;IACf,MAAM,gBAAgB,GAAmB;QACvC,GAAG,KAAK;QACR,KAAK,EAAE,KAAK;KACb,CAAC;IACF,KAAK,CAAC,eAAe,CAAC,IAAI,CAAC,CAAC,CAAC,GAAG,GAAG,wBAAS,GAAG,IAAA,uBAAQ,EAAC,gBAAgB,CAAC,EAAE,CAAC;CAC7E;AAED,IAAA,eAAS,EAAC,KAAK,CAAC,CAAC","sourcesContent":["import { BootstrapState, bootstrap } from '../bin';\nimport { argPrefix, compress, decompress } from './argv-payload';\n\nconst base64ConfigArg = process.argv[2];\nif (!base64ConfigArg.startsWith(argPrefix)) throw new Error('unexpected argv');\nconst base64Payload = base64ConfigArg.slice(argPrefix.length);\nconst state = decompress(base64Payload) as BootstrapState;\n\nstate.isInChildProcess = true;\nstate.tsNodeScript = __filename;\nstate.parseArgvResult.argv = process.argv;\nstate.parseArgvResult.restArgs = process.argv.slice(3);\n\n// Modify and re-compress the payload delivered to subsequent child processes.\n// This logic may be refactored into bin.ts by https://github.com/TypeStrong/ts-node/issues/1831\nif (state.isCli) {\n const stateForChildren: BootstrapState = {\n ...state,\n isCli: false,\n };\n state.parseArgvResult.argv[2] = `${argPrefix}${compress(stateForChildren)}`;\n}\n\nbootstrap(state);\n"]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var _a;
|
|
3
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
-
exports.transformSource = exports.getFormat = exports.load = exports.resolve = exports.lateBindHooks = void 0;
|
|
5
|
-
const esm_1 = require("../esm");
|
|
6
|
-
let hooks;
|
|
7
|
-
/** @internal */
|
|
8
|
-
function lateBindHooks(_hooks) {
|
|
9
|
-
hooks = _hooks;
|
|
10
|
-
}
|
|
11
|
-
exports.lateBindHooks = lateBindHooks;
|
|
12
|
-
const proxy = {
|
|
13
|
-
resolve(...args) {
|
|
14
|
-
var _a;
|
|
15
|
-
return ((_a = hooks === null || hooks === void 0 ? void 0 : hooks.resolve) !== null && _a !== void 0 ? _a : args[2])(...args);
|
|
16
|
-
},
|
|
17
|
-
load(...args) {
|
|
18
|
-
var _a;
|
|
19
|
-
return ((_a = hooks === null || hooks === void 0 ? void 0 : hooks.load) !== null && _a !== void 0 ? _a : args[2])(...args);
|
|
20
|
-
},
|
|
21
|
-
getFormat(...args) {
|
|
22
|
-
var _a;
|
|
23
|
-
return ((_a = hooks === null || hooks === void 0 ? void 0 : hooks.getFormat) !== null && _a !== void 0 ? _a : args[2])(...args);
|
|
24
|
-
},
|
|
25
|
-
transformSource(...args) {
|
|
26
|
-
var _a;
|
|
27
|
-
return ((_a = hooks === null || hooks === void 0 ? void 0 : hooks.transformSource) !== null && _a !== void 0 ? _a : args[2])(...args);
|
|
28
|
-
},
|
|
29
|
-
};
|
|
30
|
-
/** @internal */
|
|
31
|
-
_a = (0, esm_1.filterHooksByAPIVersion)(proxy), exports.resolve = _a.resolve, exports.load = _a.load, exports.getFormat = _a.getFormat, exports.transformSource = _a.transformSource;
|
|
32
|
-
//# sourceMappingURL=child-loader.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"child-loader.js","sourceRoot":"","sources":["../../src/child/child-loader.ts"],"names":[],"mappings":";;;;AACA,gCAAiD;AAEjD,IAAI,KAAgD,CAAC;AAErD,gBAAgB;AAChB,SAAgB,aAAa,CAC3B,MAAiD;IAEjD,KAAK,GAAG,MAAmD,CAAC;AAC9D,CAAC;AAJD,sCAIC;AAED,MAAM,KAAK,GAA8C;IACvD,OAAO,CAAC,GAAG,IAAgD;;QACzD,OAAO,CAAC,MAAA,KAAK,aAAL,KAAK,uBAAL,KAAK,CAAE,OAAO,mCAAI,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,IAAI,CAAC,CAAC;IAC9C,CAAC;IACD,IAAI,CAAC,GAAG,IAA6C;;QACnD,OAAO,CAAC,MAAA,KAAK,aAAL,KAAK,uBAAL,KAAK,CAAE,IAAI,mCAAI,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,IAAI,CAAC,CAAC;IAC3C,CAAC;IACD,SAAS,CAAC,GAAG,IAAkD;;QAC7D,OAAO,CAAC,MAAA,KAAK,aAAL,KAAK,uBAAL,KAAK,CAAE,SAAS,mCAAI,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,IAAI,CAAC,CAAC;IAChD,CAAC;IACD,eAAe,CAAC,GAAG,IAAwD;;QACzE,OAAO,CAAC,MAAA,KAAK,aAAL,KAAK,uBAAL,KAAK,CAAE,eAAe,mCAAI,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,IAAI,CAAC,CAAC;IACtD,CAAC;CACF,CAAC;AAEF,gBAAgB;AACH,KACX,IAAA,6BAAuB,EAAC,KAAK,CAA8C,EAD9D,eAAO,eAAE,YAAI,YAAE,iBAAS,iBAAE,uBAAe,sBACsB","sourcesContent":["import type { NodeLoaderHooksAPI1, NodeLoaderHooksAPI2 } from '..';\nimport { filterHooksByAPIVersion } from '../esm';\n\nlet hooks: NodeLoaderHooksAPI1 & NodeLoaderHooksAPI2;\n\n/** @internal */\nexport function lateBindHooks(\n _hooks: NodeLoaderHooksAPI1 | NodeLoaderHooksAPI2\n) {\n hooks = _hooks as NodeLoaderHooksAPI1 & NodeLoaderHooksAPI2;\n}\n\nconst proxy: NodeLoaderHooksAPI1 & NodeLoaderHooksAPI2 = {\n resolve(...args: Parameters<NodeLoaderHooksAPI1['resolve']>) {\n return (hooks?.resolve ?? args[2])(...args);\n },\n load(...args: Parameters<NodeLoaderHooksAPI2['load']>) {\n return (hooks?.load ?? args[2])(...args);\n },\n getFormat(...args: Parameters<NodeLoaderHooksAPI1['getFormat']>) {\n return (hooks?.getFormat ?? args[2])(...args);\n },\n transformSource(...args: Parameters<NodeLoaderHooksAPI1['transformSource']>) {\n return (hooks?.transformSource ?? args[2])(...args);\n },\n};\n\n/** @internal */\nexport const { resolve, load, getFormat, transformSource } =\n filterHooksByAPIVersion(proxy) as NodeLoaderHooksAPI1 & NodeLoaderHooksAPI2;\n"]}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
interface EventEmitterInternals {
|
|
2
|
-
_events: Record<string, Function | Array<Function>>;
|
|
3
|
-
}
|
|
4
|
-
declare const _process: EventEmitterInternals;
|
|
5
|
-
declare let originalOnWarning: Function | undefined;
|
|
6
|
-
declare const messageMatch: RegExp;
|
|
7
|
-
declare function onWarning(this: any, warning: Error, ...rest: any[]): any;
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
const _process = process;
|
|
3
|
-
// Not shown here: Additional logic to correctly interact with process's events, either using this direct manipulation, or via the API
|
|
4
|
-
let originalOnWarning;
|
|
5
|
-
if (Array.isArray(_process._events.warning)) {
|
|
6
|
-
originalOnWarning = _process._events.warning[0];
|
|
7
|
-
_process._events.warning[0] = onWarning;
|
|
8
|
-
}
|
|
9
|
-
else {
|
|
10
|
-
originalOnWarning = _process._events.warning;
|
|
11
|
-
_process._events.warning = onWarning;
|
|
12
|
-
}
|
|
13
|
-
const messageMatch = /(?:--(?:experimental-)?loader\b|\bCustom ESM Loaders\b)/;
|
|
14
|
-
function onWarning(warning, ...rest) {
|
|
15
|
-
// Suppress warning about how `--loader` is experimental
|
|
16
|
-
if ((warning === null || warning === void 0 ? void 0 : warning.name) === 'ExperimentalWarning' &&
|
|
17
|
-
messageMatch.test(warning === null || warning === void 0 ? void 0 : warning.message))
|
|
18
|
-
return;
|
|
19
|
-
// Will be undefined if `--no-warnings`
|
|
20
|
-
return originalOnWarning === null || originalOnWarning === void 0 ? void 0 : originalOnWarning.call(this, warning, ...rest);
|
|
21
|
-
}
|
|
22
|
-
//# sourceMappingURL=child-require.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"child-require.js","sourceRoot":"","sources":["../../src/child/child-require.ts"],"names":[],"mappings":";AAGA,MAAM,QAAQ,GAAG,OAAuC,CAAC;AAEzD,sIAAsI;AAEtI,IAAI,iBAAuC,CAAC;AAC5C,IAAI,KAAK,CAAC,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAC,OAAO,CAAC,EAAE;IAC3C,iBAAiB,GAAG,QAAQ,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC;IAChD,QAAQ,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC,CAAC,GAAG,SAAS,CAAC;CACzC;KAAM;IACL,iBAAiB,GAAG,QAAQ,CAAC,OAAO,CAAC,OAAO,CAAC;IAC7C,QAAQ,CAAC,OAAO,CAAC,OAAO,GAAG,SAAS,CAAC;CACtC;AAED,MAAM,YAAY,GAAG,yDAAyD,CAAC;AAC/E,SAAS,SAAS,CAAY,OAAc,EAAE,GAAG,IAAW;IAC1D,wDAAwD;IACxD,IACE,CAAA,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,IAAI,MAAK,qBAAqB;QACvC,YAAY,CAAC,IAAI,CAAC,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,OAAO,CAAC;QAEnC,OAAO;IACT,uCAAuC;IACvC,OAAO,iBAAiB,aAAjB,iBAAiB,uBAAjB,iBAAiB,CAAE,IAAI,CAAC,IAAI,EAAE,OAAO,EAAE,GAAG,IAAI,CAAC,CAAC;AACzD,CAAC","sourcesContent":["interface EventEmitterInternals {\n _events: Record<string, Function | Array<Function>>;\n}\nconst _process = process as any as EventEmitterInternals;\n\n// Not shown here: Additional logic to correctly interact with process's events, either using this direct manipulation, or via the API\n\nlet originalOnWarning: Function | undefined;\nif (Array.isArray(_process._events.warning)) {\n originalOnWarning = _process._events.warning[0];\n _process._events.warning[0] = onWarning;\n} else {\n originalOnWarning = _process._events.warning;\n _process._events.warning = onWarning;\n}\n\nconst messageMatch = /(?:--(?:experimental-)?loader\\b|\\bCustom ESM Loaders\\b)/;\nfunction onWarning(this: any, warning: Error, ...rest: any[]) {\n // Suppress warning about how `--loader` is experimental\n if (\n warning?.name === 'ExperimentalWarning' &&\n messageMatch.test(warning?.message)\n )\n return;\n // Will be undefined if `--no-warnings`\n return originalOnWarning?.call(this, warning, ...rest);\n}\n"]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.callInChild = void 0;
|
|
4
|
-
const child_process_1 = require("child_process");
|
|
5
|
-
const url_1 = require("url");
|
|
6
|
-
const util_1 = require("../util");
|
|
7
|
-
const argv_payload_1 = require("./argv-payload");
|
|
8
|
-
/**
|
|
9
|
-
* @internal
|
|
10
|
-
* @param state Bootstrap state to be transferred into the child process.
|
|
11
|
-
* @param targetCwd Working directory to be preserved when transitioning to
|
|
12
|
-
* the child process.
|
|
13
|
-
*/
|
|
14
|
-
function callInChild(state) {
|
|
15
|
-
if (!(0, util_1.versionGteLt)(process.versions.node, '12.17.0')) {
|
|
16
|
-
throw new Error('`ts-node-esm` and `ts-node --esm` require node version 12.17.0 or newer.');
|
|
17
|
-
}
|
|
18
|
-
const child = (0, child_process_1.spawn)(process.execPath, [
|
|
19
|
-
'--require',
|
|
20
|
-
require.resolve('./child-require.js'),
|
|
21
|
-
'--loader',
|
|
22
|
-
// Node on Windows doesn't like `c:\` absolute paths here; must be `file:///c:/`
|
|
23
|
-
(0, url_1.pathToFileURL)(require.resolve('../../child-loader.mjs')).toString(),
|
|
24
|
-
require.resolve('./child-entrypoint.js'),
|
|
25
|
-
`${argv_payload_1.argPrefix}${(0, argv_payload_1.compress)(state)}`,
|
|
26
|
-
...state.parseArgvResult.restArgs,
|
|
27
|
-
], {
|
|
28
|
-
stdio: 'inherit',
|
|
29
|
-
argv0: process.argv0,
|
|
30
|
-
});
|
|
31
|
-
child.on('error', (error) => {
|
|
32
|
-
console.error(error);
|
|
33
|
-
process.exit(1);
|
|
34
|
-
});
|
|
35
|
-
child.on('exit', (code) => {
|
|
36
|
-
child.removeAllListeners();
|
|
37
|
-
process.off('SIGINT', sendSignalToChild);
|
|
38
|
-
process.off('SIGTERM', sendSignalToChild);
|
|
39
|
-
process.exitCode = code === null ? 1 : code;
|
|
40
|
-
});
|
|
41
|
-
// Ignore sigint and sigterm in parent; pass them to child
|
|
42
|
-
process.on('SIGINT', sendSignalToChild);
|
|
43
|
-
process.on('SIGTERM', sendSignalToChild);
|
|
44
|
-
function sendSignalToChild(signal) {
|
|
45
|
-
process.kill(child.pid, signal);
|
|
46
|
-
}
|
|
47
|
-
}
|
|
48
|
-
exports.callInChild = callInChild;
|
|
49
|
-
//# sourceMappingURL=spawn-child.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"spawn-child.js","sourceRoot":"","sources":["../../src/child/spawn-child.ts"],"names":[],"mappings":";;;AACA,iDAAsC;AACtC,6BAAoC;AACpC,kCAAuC;AACvC,iDAAqD;AAErD;;;;;GAKG;AACH,SAAgB,WAAW,CAAC,KAAqB;IAC/C,IAAI,CAAC,IAAA,mBAAY,EAAC,OAAO,CAAC,QAAQ,CAAC,IAAI,EAAE,SAAS,CAAC,EAAE;QACnD,MAAM,IAAI,KAAK,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OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,GAAG,EAAE,MAAM,CAAC,CAAC;IAClC,CAAC;AACH,CAAC;AAvCD,kCAuCC","sourcesContent":["import type { BootstrapState } from '../bin';\nimport { spawn } from 'child_process';\nimport { pathToFileURL } from 'url';\nimport { versionGteLt } from '../util';\nimport { argPrefix, compress } from './argv-payload';\n\n/**\n * @internal\n * @param state Bootstrap state to be transferred into the child process.\n * @param targetCwd Working directory to be preserved when transitioning to\n * the child process.\n */\nexport function callInChild(state: BootstrapState) {\n if (!versionGteLt(process.versions.node, '12.17.0')) {\n throw new Error(\n '`ts-node-esm` and `ts-node --esm` require node version 12.17.0 or newer.'\n );\n }\n const child = spawn(\n process.execPath,\n [\n '--require',\n require.resolve('./child-require.js'),\n '--loader',\n // Node on Windows doesn't like `c:\\` absolute paths here; must be `file:///c:/`\n pathToFileURL(require.resolve('../../child-loader.mjs')).toString(),\n require.resolve('./child-entrypoint.js'),\n `${argPrefix}${compress(state)}`,\n ...state.parseArgvResult.restArgs,\n ],\n {\n stdio: 'inherit',\n argv0: process.argv0,\n }\n );\n child.on('error', (error) => {\n console.error(error);\n process.exit(1);\n });\n child.on('exit', (code) => {\n child.removeAllListeners();\n process.off('SIGINT', sendSignalToChild);\n process.off('SIGTERM', sendSignalToChild);\n process.exitCode = code === null ? 1 : code;\n });\n // Ignore sigint and sigterm in parent; pass them to child\n process.on('SIGINT', sendSignalToChild);\n process.on('SIGTERM', sendSignalToChild);\n function sendSignalToChild(signal: string) {\n process.kill(child.pid, signal);\n }\n}\n"]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.installCommonjsResolveHooksIfNecessary = void 0;
|
|
4
|
-
/**
|
|
5
|
-
* @internal
|
|
6
|
-
*/
|
|
7
|
-
function installCommonjsResolveHooksIfNecessary(tsNodeService) {
|
|
8
|
-
const Module = require('module');
|
|
9
|
-
const originalResolveFilename = Module._resolveFilename;
|
|
10
|
-
const originalFindPath = Module._findPath;
|
|
11
|
-
const shouldInstallHook = tsNodeService.options.experimentalResolver;
|
|
12
|
-
if (shouldInstallHook) {
|
|
13
|
-
const { Module_findPath, Module_resolveFilename } = tsNodeService.getNodeCjsLoader();
|
|
14
|
-
Module._resolveFilename = _resolveFilename;
|
|
15
|
-
Module._findPath = _findPath;
|
|
16
|
-
function _resolveFilename(request, parent, isMain, options, ...rest) {
|
|
17
|
-
if (!tsNodeService.enabled())
|
|
18
|
-
return originalResolveFilename.call(this, request, parent, isMain, options, ...rest);
|
|
19
|
-
return Module_resolveFilename.call(this, request, parent, isMain, options, ...rest);
|
|
20
|
-
}
|
|
21
|
-
function _findPath() {
|
|
22
|
-
if (!tsNodeService.enabled())
|
|
23
|
-
return originalFindPath.apply(this, arguments);
|
|
24
|
-
return Module_findPath.apply(this, arguments);
|
|
25
|
-
}
|
|
26
|
-
}
|
|
27
|
-
}
|
|
28
|
-
exports.installCommonjsResolveHooksIfNecessary = installCommonjsResolveHooksIfNecessary;
|
|
29
|
-
//# sourceMappingURL=cjs-resolve-hooks.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"cjs-resolve-hooks.js","sourceRoot":"","sources":["../src/cjs-resolve-hooks.ts"],"names":[],"mappings":";;;AAoBA;;GAEG;AACH,SAAgB,sCAAsC,CAAC,aAAsB;IAC3E,MAAM,MAAM,GAAG,OAAO,CAAC,QAAQ,CAAmC,CAAC;IACnE,MAAM,uBAAuB,GAAG,MAAM,CAAC,gBAAgB,CAAC;IACxD,MAAM,gBAAgB,GAAG,MAAM,CAAC,SAAS,CAAC;IAC1C,MAAM,iBAAiB,GAAG,aAAa,CAAC,OAAO,CAAC,oBAAoB,CAAC;IACrE,IAAI,iBAAiB,EAAE;QACrB,MAAM,EAAE,eAAe,EAAE,sBAAsB,EAAE,GAC/C,aAAa,CAAC,gBAAgB,EAAE,CAAC;QACnC,MAAM,CAAC,gBAAgB,GAAG,gBAAgB,CAAC;QAC3C,MAAM,CAAC,SAAS,GAAG,SAAS,CAAC;QAC7B,SAAS,gBAAgB,CAEvB,OAAe,EACf,MAAe,EACf,MAAgB,EAChB,OAAsC,EACtC,GAAG,IAAQ;YAEX,IAAI,CAAC,aAAa,CAAC,OAAO,EAAE;gBAC1B,OAAO,uBAAuB,CAAC,IAAI,CACjC,IAAI,EACJ,OAAO,EACP,MAAM,EACN,MAAM,EACN,OAAO,EACP,GAAG,IAAI,CACR,CAAC;YAEJ,OAAO,sBAAsB,CAAC,IAAI,CAChC,IAAI,EACJ,OAAO,EACP,MAAM,EACN,MAAM,EACN,OAAO,EACP,GAAG,IAAI,CACR,CAAC;QACJ,CAAC;QACD,SAAS,SAAS;YAChB,IAAI,CAAC,aAAa,CAAC,OAAO,EAAE;gBAC1B,OAAO,gBAAgB,CAAC,KAAK,CAAC,IAAI,EAAE,SAAgB,CAAC,CAAC;YACxD,OAAO,eAAe,CAAC,KAAK,CAAC,IAAI,EAAE,SAAgB,CAAC,CAAC;QACvD,CAAC;KACF;AACH,CAAC;AA3CD,wFA2CC","sourcesContent":["import type Module = require('module');\nimport type { Service } from '.';\n\n/** @internal */\nexport type ModuleConstructorWithInternals = typeof Module & {\n _resolveFilename(\n request: string,\n parent?: Module,\n isMain?: boolean,\n options?: ModuleResolveFilenameOptions,\n ...rest: any[]\n ): string;\n _preloadModules(requests?: string[]): void;\n _findPath(request: string, paths: string[], isMain: boolean): string;\n};\n\ninterface ModuleResolveFilenameOptions {\n paths?: Array<string>;\n}\n\n/**\n * @internal\n */\nexport function installCommonjsResolveHooksIfNecessary(tsNodeService: Service) {\n const Module = require('module') as ModuleConstructorWithInternals;\n const originalResolveFilename = Module._resolveFilename;\n const originalFindPath = Module._findPath;\n const shouldInstallHook = tsNodeService.options.experimentalResolver;\n if (shouldInstallHook) {\n const { Module_findPath, Module_resolveFilename } =\n tsNodeService.getNodeCjsLoader();\n Module._resolveFilename = _resolveFilename;\n Module._findPath = _findPath;\n function _resolveFilename(\n this: any,\n request: string,\n parent?: Module,\n isMain?: boolean,\n options?: ModuleResolveFilenameOptions,\n ...rest: []\n ): string {\n if (!tsNodeService.enabled())\n return originalResolveFilename.call(\n this,\n request,\n parent,\n isMain,\n options,\n ...rest\n );\n\n return Module_resolveFilename.call(\n this,\n request,\n parent,\n isMain,\n options,\n ...rest\n );\n }\n function _findPath(this: any): string {\n if (!tsNodeService.enabled())\n return originalFindPath.apply(this, arguments as any);\n return Module_findPath.apply(this, arguments as any);\n }\n }\n}\n"]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|