@tapjs/processinfo 3.1.7 → 3.1.9
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/LICENSE.md +55 -0
- package/dist/commonjs/canonical-source.d.ts.map +1 -1
- package/dist/commonjs/canonical-source.js +3 -2
- package/dist/commonjs/canonical-source.js.map +1 -1
- package/dist/commonjs/child_process.d.ts.map +1 -1
- package/dist/commonjs/child_process.js.map +1 -1
- package/dist/commonjs/find-source-map-safe.js.map +1 -1
- package/dist/commonjs/get-main.d.ts.map +1 -1
- package/dist/commonjs/get-main.js +5 -9
- package/dist/commonjs/get-main.js.map +1 -1
- package/dist/commonjs/get-process-info.d.ts.map +1 -1
- package/dist/commonjs/get-process-info.js +5 -0
- package/dist/commonjs/get-process-info.js.map +1 -1
- package/dist/commonjs/index.js.map +1 -1
- package/dist/commonjs/line-lengths.js.map +1 -1
- package/dist/commonjs/loader-paths.d.ts.map +1 -1
- package/dist/commonjs/loader-paths.js +2 -6
- package/dist/commonjs/loader-paths.js.map +1 -1
- package/dist/commonjs/node-options-env.d.ts.map +1 -1
- package/dist/commonjs/node-options-env.js +6 -7
- package/dist/commonjs/node-options-env.js.map +1 -1
- package/dist/commonjs/package.json +3 -1
- package/dist/commonjs/path-to-url.d.ts.map +1 -1
- package/dist/commonjs/path-to-url.js +2 -4
- package/dist/commonjs/path-to-url.js.map +1 -1
- package/dist/commonjs/process-info-node.d.ts.map +1 -1
- package/dist/commonjs/process-info-node.js +3 -4
- package/dist/commonjs/process-info-node.js.map +1 -1
- package/dist/commonjs/register-coverage.d.ts.map +1 -1
- package/dist/commonjs/register-coverage.js +2 -2
- package/dist/commonjs/register-coverage.js.map +1 -1
- package/dist/commonjs/register-env.d.ts.map +1 -1
- package/dist/commonjs/register-env.js +4 -1
- package/dist/commonjs/register-env.js.map +1 -1
- package/dist/commonjs/register-process-end.js.map +1 -1
- package/dist/commonjs/register-require.js.map +1 -1
- package/dist/commonjs/spawn-opts.js.map +1 -1
- package/dist/esm/canonical-source.d.ts.map +1 -1
- package/dist/esm/canonical-source.js +3 -2
- package/dist/esm/canonical-source.js.map +1 -1
- package/dist/esm/child_process.d.ts.map +1 -1
- package/dist/esm/child_process.js.map +1 -1
- package/dist/esm/find-source-map-safe.js.map +1 -1
- package/dist/esm/get-main.d.ts.map +1 -1
- package/dist/esm/get-main.js +5 -9
- package/dist/esm/get-main.js.map +1 -1
- package/dist/esm/get-process-info.d.ts.map +1 -1
- package/dist/esm/get-process-info.js +5 -0
- package/dist/esm/get-process-info.js.map +1 -1
- package/dist/esm/hooks.mjs.map +1 -1
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/line-lengths.js.map +1 -1
- package/dist/esm/loader-paths.d.ts.map +1 -1
- package/dist/esm/loader-paths.js +2 -6
- package/dist/esm/loader-paths.js.map +1 -1
- package/dist/esm/node-options-env.d.ts.map +1 -1
- package/dist/esm/node-options-env.js +4 -5
- package/dist/esm/node-options-env.js.map +1 -1
- package/dist/esm/package.json +3 -1
- package/dist/esm/path-to-url.d.ts.map +1 -1
- package/dist/esm/path-to-url.js +2 -4
- package/dist/esm/path-to-url.js.map +1 -1
- package/dist/esm/process-info-node.d.ts.map +1 -1
- package/dist/esm/process-info-node.js +3 -4
- package/dist/esm/process-info-node.js.map +1 -1
- package/dist/esm/register-coverage.d.ts.map +1 -1
- package/dist/esm/register-coverage.js +2 -2
- package/dist/esm/register-coverage.js.map +1 -1
- package/dist/esm/register-env.d.ts.map +1 -1
- package/dist/esm/register-env.js +4 -1
- package/dist/esm/register-env.js.map +1 -1
- package/dist/esm/register-process-end.js.map +1 -1
- package/dist/esm/register-require.js.map +1 -1
- package/dist/esm/spawn-opts.js.map +1 -1
- package/package.json +7 -17
- package/LICENSE +0 -15
- package/dist/commonjs/argv-to-node-options.d.ts +0 -2
- package/dist/commonjs/argv-to-node-options.d.ts.map +0 -1
- package/dist/commonjs/argv-to-node-options.js +0 -6
- package/dist/commonjs/argv-to-node-options.js.map +0 -1
- package/dist/commonjs/get-import-meta-url.d.ts.map +0 -1
- package/dist/commonjs/get-import-meta-url.js.map +0 -1
- package/dist/commonjs/node-options-to-argv.d.ts +0 -2
- package/dist/commonjs/node-options-to-argv.d.ts.map +0 -1
- package/dist/commonjs/node-options-to-argv.js +0 -58
- package/dist/commonjs/node-options-to-argv.js.map +0 -1
- package/dist/esm/argv-to-node-options.d.ts +0 -2
- package/dist/esm/argv-to-node-options.d.ts.map +0 -1
- package/dist/esm/argv-to-node-options.js +0 -2
- package/dist/esm/argv-to-node-options.js.map +0 -1
- package/dist/esm/node-options-to-argv.d.ts +0 -2
- package/dist/esm/node-options-to-argv.d.ts.map +0 -1
- package/dist/esm/node-options-to-argv.js +0 -54
- package/dist/esm/node-options-to-argv.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"node-options-env.js","sourceRoot":"","sources":["../../src/node-options-env.ts"],"names":[],"mappings":";;;;;;AAAA,uEAA6D;AAC7D,uDAK0B;AAC1B,uEAA6D;AAE7D,8DAAgC;AAEhC,MAAM,WAAW,GAAG,CAClB,IAAuB,EACvB,CAAS,EAC8B,EAAE;IACzC,MAAM,GAAG,GAAG,IAAI,CAAC,CAAC,CAAC,CAAA;IACnB,qBAAqB;IACrB,IAAI,OAAO,GAAG,KAAK,QAAQ;QAAE,MAAM,IAAI,KAAK,CAAC,aAAa,CAAC,CAAA;IAC3D,oBAAoB;IACpB,IAAI,GAAG,CAAC,QAAQ,CAAC,GAAG,CAAC,EAAE;QACrB,MAAM,CAAC,CAAC,EAAE,GAAG,IAAI,CAAC,GAAG,GAAG,CAAC,KAAK,CAAC,GAAG,CAA0B,CAAA;QAC5D,OAAO,CAAC,IAAI,EAAE,CAAC,EAAE,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAA;KACjC;SAAM,IAAI,CAAC,GAAG,IAAI,CAAC,MAAM,GAAG,CAAC,EAAE;QAC9B,OAAO,CAAC,KAAK,EAAE,GAA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EAAE,EAAE,CAC1D,IAAI,CAAC,QAAQ,CAAC,eAAe,CAAC;IAC9B,IAAI,CAAC,QAAQ,CAAC,kCAAkC,CAAC;IAC/C,CAAC,CAAC,IAAI;IACN,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,eAAe,CAAC,CAAA;AAE3B,MAAM,cAAc,GAAG,CAC5B,GAAsB,EACtB,IAAuB,EACvB,EAAE;IACF,mEAAmE;IACnE,MAAM,EAAE,GAAG,IAAA,2CAAiB,EAAC,GAAG,CAAC,YAAY,CAAC,CAAA;IAC9C,OAAO,IAAA,2CAAiB,EAAC,SAAS,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,EAAE,CAAC,CAAC,CAAA;AAC1E,CAAC,CAAA;AAPY,QAAA,cAAc,kBAO1B","sourcesContent":["import { argvToNodeOptions } from './argv-to-node-options.js'\nimport {\n importLoader,\n importMatch,\n legacyLoader,\n legacyMatch,\n} from './loader-paths.js'\nimport { nodeOptionsToArgv } from './node-options-to-argv.js'\n\nimport Module from 'node:module'\n\nconst getKeyValue = (\n args: readonly string[],\n i: number\n): [boolean, string, string | undefined] => {\n const arg = args[i]\n /* c8 ignore start */\n if (typeof arg !== 'string') throw new Error('invalid arg')\n /* c8 ignore stop */\n if (arg.includes('=')) {\n const [k, ...rest] = arg.split('=') as [string, ...string[]]\n return [true, k, rest.join('=')]\n } else if (i < args.length - 1) {\n return [false, arg, args[i + 1]]\n } else {\n return [false, arg, undefined]\n }\n}\n\nconst useImport = !!(Module as { register?: (...a: any[]) => any })\n .register\n\n// JUST test if we need to do anything at all with the env.\n// if the loader is set already in the args, even incorrectly, return true\nconst hasLoader = (args: readonly string[]): boolean => {\n for (let i = 0; i < args.length; i++) {\n const arg = args[i]\n /* c8 ignore start */\n if (typeof arg !== 'string') throw new Error('invalid arg')\n /* c8 ignore stop */\n if (!arg.startsWith('--') || arg === '--') break\n const [eq, k, v] = getKeyValue(args, i)\n if (!v) {\n // wasn't a key-value pair\n continue\n }\n if (!eq) i++\n if (\n (k === '--experimental-loader' || k === '--loader') &&\n legacyMatch(v)\n ) {\n return true\n }\n if (k === '--import' && importMatch(v)) return true\n }\n return false\n}\n\nconst rmLoader = (args: string[]) => {\n const doNotWantKeys = ['--experimental-loader', '--loader', '--import']\n\n const result: string[] = []\n\n let doubledash = false\n for (let i = 0; i < args.length; i++) {\n const arg = args[i]\n /* c8 ignore start */\n if (typeof arg !== 'string') throw new Error('invalid arg')\n /* c8 ignore stop */\n if (!arg.startsWith('--') || doubledash) {\n result.push(arg)\n continue\n }\n if (arg === '--') {\n result.push(arg)\n doubledash = true\n continue\n }\n\n const [eq, k, v] = getKeyValue(args, i)\n if (!v) {\n // wasn't a key-value pair\n result.push(arg)\n continue\n }\n if (!eq) i++\n if (doNotWantKeys.includes(k) && (importMatch(v) || legacyMatch(v))) {\n // it's ours, remove it\n continue\n }\n // not ours, leave it\n result.push(arg)\n const next = args[i]\n if (!eq && typeof next === 'string') result.push(next)\n continue\n }\n return result\n}\n\nconst addLoader = (args: string[]) => {\n const addKey = useImport ? '--import' : '--loader'\n const addValue = useImport ? importLoader : legacyLoader\n const doNotWantKeys = [\n '--experimental-loader',\n useImport ? '--loader' : '--import',\n ]\n const test = useImport ? importMatch : legacyMatch\n\n const result: string[] = []\n\n let doubledash = false\n let found = false\n for (let i = 0; i < args.length; i++) {\n const arg = args[i]\n /* c8 ignore start */\n if (typeof arg !== 'string') throw new Error('invalid arg')\n /* c8 ignore stop */\n if (!arg.startsWith('--') || doubledash) {\n result.push(arg)\n continue\n }\n if (arg === '--') {\n result.push(arg)\n doubledash = true\n continue\n }\n\n const [eq, k, v] = getKeyValue(args, i)\n if (!v) {\n // wasn't a key-value pair\n result.push(arg)\n continue\n }\n if (!eq) i++\n if (doNotWantKeys.includes(k) && (importMatch(v) || legacyMatch(v))) {\n // it's ours, but not how we want it, omit\n continue\n }\n\n if (k === addKey && test(v)) {\n // already present, don't let it be set multiple times.\n if (found) continue\n found = true\n result.push(arg)\n const next = args[i]\n if (!eq && typeof next === 'string') result.push(next)\n } else {\n // not ours\n result.push(arg)\n const next = args[i]\n if (!eq && typeof next === 'string') result.push(next)\n continue\n }\n }\n if (!found) result.push(`${addKey}=${addValue}`)\n return !useImport ? addIgnoreLoadersWarning(result) : result\n}\n\nconst addIgnoreLoadersWarning = (args: readonly string[]) =>\n args.includes('--no-warnings') ||\n args.includes('--no-warnings=ExperimentalLoader')\n ? args\n : args.concat('--no-warnings')\n\nexport const nodeOptionsEnv = (\n env: NodeJS.ProcessEnv,\n args: readonly string[]\n) => {\n // if we already have the loader in args, don't add to NODE_OPTIONS\n const no = nodeOptionsToArgv(env.NODE_OPTIONS)\n return argvToNodeOptions(hasLoader(args) ? rmLoader(no) : addLoader(no))\n}\n"]}
|
|
1
|
+
{"version":3,"file":"node-options-env.js","sourceRoot":"","sources":["../../src/node-options-env.ts"],"names":[],"mappings":";;;;;;AAAA,+DAA2E;AAC3E,uDAK0B;AAE1B,8DAAgC;AAEhC,MAAM,WAAW,GAAG,CAClB,IAAuB,EACvB,CAAS,EAC8B,EAAE;IACzC,MAAM,GAAG,GAAG,IAAI,CAAC,CAAC,CAAC,CAAA;IACnB,qBAAqB;IACrB,IAAI,OAAO,GAAG,KAAK,QAAQ;QAAE,MAAM,IAAI,KAAK,CAAC,aAAa,CAAC,CAAA;IAC3D,oBAAoB;IACpB,IAAI,GAAG,CAAC,QAAQ,CAAC,GAAG,CAAC,EAAE;QACrB,MAAM,CAAC,CAAC,EAAE,GAAG,IAAI,CAAC,GAAG,GAAG,CAAC,KAAK,CAAC,GAAG,CAA0B,CAAA;QAC5D,OAAO,CAAC,IAAI,EAAE,CAAC,EAAE,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAA;KACjC;SAAM,IAAI,CAAC,GAAG,IAAI,CAAC,MAAM,GAAG,CAAC,EAAE;QAC9B,OAAO,CAAC,KAAK,EAAE,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uB,EAAE,EAAE,CAC1D,CACE,IAAI,CAAC,QAAQ,CAAC,eAAe,CAAC;IAC9B,IAAI,CAAC,QAAQ,CAAC,kCAAkC,CAAC,CAClD,CAAC,CAAC;IACD,IAAI;IACN,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,eAAe,CAAC,CAAA;AAEzB,MAAM,cAAc,GAAG,CAC5B,GAAsB,EACtB,IAAuB,EACvB,EAAE;IACF,mEAAmE;IACnE,MAAM,EAAE,GAAG,IAAA,wCAAiB,EAAC,GAAG,CAAC,YAAY,CAAC,CAAA;IAC9C,OAAO,IAAA,wCAAiB,EAAC,SAAS,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,EAAE,CAAC,CAAC,CAAA;AAC1E,CAAC,CAAA;AAPY,QAAA,cAAc,kBAO1B","sourcesContent":["import { nodeOptionsToArgv, argvToNodeOptions } from 'node-options-to-argv'\nimport {\n importLoader,\n importMatch,\n legacyLoader,\n legacyMatch,\n} from './loader-paths.js'\n\nimport Module from 'node:module'\n\nconst getKeyValue = (\n args: readonly string[],\n i: number,\n): [boolean, string, string | undefined] => {\n const arg = args[i]\n /* c8 ignore start */\n if (typeof arg !== 'string') throw new Error('invalid arg')\n /* c8 ignore stop */\n if (arg.includes('=')) {\n const [k, ...rest] = arg.split('=') as [string, ...string[]]\n return [true, k, rest.join('=')]\n } else if (i < args.length - 1) {\n return [false, arg, args[i + 1]]\n } else {\n return [false, arg, undefined]\n }\n}\n\nconst useImport = !!(Module as { register?: (...a: any[]) => any })\n .register\n\n// JUST test if we need to do anything at all with the env.\n// if the loader is set already in the args, even incorrectly, return true\nconst hasLoader = (args: readonly string[]): boolean => {\n for (let i = 0; i < args.length; i++) {\n const arg = args[i]\n /* c8 ignore start */\n if (typeof arg !== 'string') throw new Error('invalid arg')\n /* c8 ignore stop */\n if (!arg.startsWith('--') || arg === '--') break\n const [eq, k, v] = getKeyValue(args, i)\n if (!v) {\n // wasn't a key-value pair\n continue\n }\n if (!eq) i++\n if (\n (k === '--experimental-loader' || k === '--loader') &&\n legacyMatch(v)\n ) {\n return true\n }\n if (k === '--import' && importMatch(v)) return true\n }\n return false\n}\n\nconst rmLoader = (args: string[]) => {\n const doNotWantKeys = ['--experimental-loader', '--loader', '--import']\n\n const result: string[] = []\n\n let doubledash = false\n for (let i = 0; i < args.length; i++) {\n const arg = args[i]\n /* c8 ignore start */\n if (typeof arg !== 'string') throw new Error('invalid arg')\n /* c8 ignore stop */\n if (!arg.startsWith('--') || doubledash) {\n result.push(arg)\n continue\n }\n if (arg === '--') {\n result.push(arg)\n doubledash = true\n continue\n }\n\n const [eq, k, v] = getKeyValue(args, i)\n if (!v) {\n // wasn't a key-value pair\n result.push(arg)\n continue\n }\n if (!eq) i++\n if (doNotWantKeys.includes(k) && (importMatch(v) || legacyMatch(v))) {\n // it's ours, remove it\n continue\n }\n // not ours, leave it\n result.push(arg)\n const next = args[i]\n if (!eq && typeof next === 'string') result.push(next)\n continue\n }\n return result\n}\n\nconst addLoader = (args: string[]) => {\n const addKey = useImport ? '--import' : '--loader'\n const addValue = useImport ? importLoader : legacyLoader\n const doNotWantKeys = [\n '--experimental-loader',\n useImport ? '--loader' : '--import',\n ]\n const test = useImport ? importMatch : legacyMatch\n\n const result: string[] = []\n\n let doubledash = false\n let found = false\n for (let i = 0; i < args.length; i++) {\n const arg = args[i]\n /* c8 ignore start */\n if (typeof arg !== 'string') throw new Error('invalid arg')\n /* c8 ignore stop */\n if (!arg.startsWith('--') || doubledash) {\n result.push(arg)\n continue\n }\n if (arg === '--') {\n result.push(arg)\n doubledash = true\n continue\n }\n\n const [eq, k, v] = getKeyValue(args, i)\n if (!v) {\n // wasn't a key-value pair\n result.push(arg)\n continue\n }\n if (!eq) i++\n if (doNotWantKeys.includes(k) && (importMatch(v) || legacyMatch(v))) {\n // it's ours, but not how we want it, omit\n continue\n }\n\n if (k === addKey && test(v)) {\n // already present, don't let it be set multiple times.\n if (found) continue\n found = true\n result.push(arg)\n const next = args[i]\n if (!eq && typeof next === 'string') result.push(next)\n } else {\n // not ours\n result.push(arg)\n const next = args[i]\n if (!eq && typeof next === 'string') result.push(next)\n continue\n }\n }\n if (!found) result.push(`${addKey}=${addValue}`)\n return !useImport ? addIgnoreLoadersWarning(result) : result\n}\n\nconst addIgnoreLoadersWarning = (args: readonly string[]) =>\n (\n args.includes('--no-warnings') ||\n args.includes('--no-warnings=ExperimentalLoader')\n ) ?\n args\n : args.concat('--no-warnings')\n\nexport const nodeOptionsEnv = (\n env: NodeJS.ProcessEnv,\n args: readonly string[],\n) => {\n // if we already have the loader in args, don't add to NODE_OPTIONS\n const no = nodeOptionsToArgv(env.NODE_OPTIONS)\n return argvToNodeOptions(hasLoader(args) ? rmLoader(no) : addLoader(no))\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"path-to-url.d.ts","sourceRoot":"","sources":["../../src/path-to-url.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,SAAS,MAAO,MAAM,GAAG,GAAG,KAAG,
|
|
1
|
+
{"version":3,"file":"path-to-url.d.ts","sourceRoot":"","sources":["../../src/path-to-url.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,SAAS,MAAO,MAAM,GAAG,GAAG,KAAG,MAGhB,CAAA"}
|
|
@@ -2,10 +2,8 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.pathToURL = void 0;
|
|
4
4
|
const url_1 = require("url");
|
|
5
|
-
const pathToURL = (s) => typeof s === 'object'
|
|
6
|
-
?
|
|
7
|
-
: s.startsWith('file://')
|
|
8
|
-
? s
|
|
5
|
+
const pathToURL = (s) => typeof s === 'object' ? String(s)
|
|
6
|
+
: s.startsWith('file://') ? s
|
|
9
7
|
: String((0, url_1.pathToFileURL)(s));
|
|
10
8
|
exports.pathToURL = pathToURL;
|
|
11
9
|
//# sourceMappingURL=path-to-url.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"path-to-url.js","sourceRoot":"","sources":["../../src/path-to-url.ts"],"names":[],"mappings":";;;AAAA,6BAAmC;AAE5B,MAAM,SAAS,GAAG,CAAC,CAAe,EAAU,EAAE,CACnD,OAAO,CAAC,KAAK,QAAQ
|
|
1
|
+
{"version":3,"file":"path-to-url.js","sourceRoot":"","sources":["../../src/path-to-url.ts"],"names":[],"mappings":";;;AAAA,6BAAmC;AAE5B,MAAM,SAAS,GAAG,CAAC,CAAe,EAAU,EAAE,CACnD,OAAO,CAAC,KAAK,QAAQ,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC;IACjC,CAAC,CAAC,CAAC,CAAC,UAAU,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,CAAC;QAC7B,CAAC,CAAC,MAAM,CAAC,IAAA,mBAAa,EAAC,CAAC,CAAC,CAAC,CAAA;AAHf,QAAA,SAAS,aAGM","sourcesContent":["import { pathToFileURL } from 'url'\n\nexport const pathToURL = (s: string | URL): string =>\n typeof s === 'object' ? String(s)\n : s.startsWith('file://') ? s\n : String(pathToFileURL(s))\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"process-info-node.d.ts","sourceRoot":"","sources":["../../src/process-info-node.ts"],"names":[],"mappings":";AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,YAAY,CAAA;AAE7C,MAAM,WAAW,mBAAmB;IAElC,OAAO,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;IAG1B,IAAI,EAAE,MAAM,CAAA;IACZ,IAAI,EAAE,MAAM,EAAE,CAAA;IACd,QAAQ,EAAE,MAAM,EAAE,CAAA;IAClB,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,GAAG,EAAE,MAAM,CAAA;IACX,GAAG,EAAE,MAAM,CAAA;IACX,IAAI,EAAE,MAAM,CAAA;IACZ,MAAM,EAAE,MAAM,GAAG,IAAI,CAAA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,CAAA;IACb,IAAI,EAAG,MAAM,CAAA;IACb,IAAI,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IACpB,MAAM,CAAC,EAAE,MAAM,CAAC,OAAO,GAAG,IAAI,CAAA;IAC9B,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,YAAY,CAAC,EAAE,MAAM,EAAE,CAAA;IACvB,KAAK,EAAE,MAAM,EAAE,CAAK;IACpB,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,EAAE,CAAC,CAAsB;IACvD,MAAM,CAAC,EAAE,eAAe,GAAG,IAAI,CAAO;IACtC,IAAI,CAAC,EAAE,eAAe,GAAG,IAAI,CAAO;IACpC,QAAQ,CAAC,EAAE,GAAG,CAAC,eAAe,CAAC,GAAG,IAAI,CAAO;IAC7C,WAAW,EAAE,GAAG,CAAC,eAAe,CAAC,GAAG,IAAI,CAAO;IAC/C,UAAU,EAAE,MAAM,GAAG,IAAI,CAAO;gBAIpB,IAAI,EAAE,mBAAmB;IAKrC,MAAM;;;IAaN,IAAI,CAAC,EAAE,EAAE,WAAW;CA0ErB"}
|
|
@@ -29,10 +29,9 @@ class ProcessInfoNode {
|
|
|
29
29
|
toJSON() {
|
|
30
30
|
return Object.fromEntries(Object.entries(this)
|
|
31
31
|
.filter(([_, val]) => val !== null && val !== undefined)
|
|
32
|
-
.map(([key, val]) => val instanceof ProcessInfoNode
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
? [key, [...val].map(c => c.uuid)]
|
|
32
|
+
.map(([key, val]) => val instanceof ProcessInfoNode ? [key, val.uuid]
|
|
33
|
+
: key === 'children' || key === 'descendants' ?
|
|
34
|
+
[key, [...val].map(c => c.uuid)]
|
|
36
35
|
: [key, val]));
|
|
37
36
|
}
|
|
38
37
|
link(db) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"process-info-node.js","sourceRoot":"","sources":["../../src/process-info-node.ts"],"names":[],"mappings":";;;AA4BA,MAAa,eAAe;IAC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ACV,EAAE,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,EAAE,IAAI,GAAG,CAAkB,CAAC,IAAI,CAAC,CAAC,CAAC,CAAA;aAClD;iBAAM;gBACL,KAAK,CAAC,GAAG,CAAC,IAAI,CAAC,CAAA;aAChB;SACF;QAED,IAAI,IAAI,CAAC,UAAU,EAAE;YACnB,0BAA0B;YAC1B,MAAM,CAAC,GAAG,EAAE,CAAC,WAAW,CAAC,GAAG,CAAC,IAAI,CAAC,UAAU,CAAC,CAAA;YAC7C,IAAI,CAAC,IAAI,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE;gBACnD,OAAM;aACP;YACD,EAAE,CAAC,WAAW,CAAC,GAAG,CAAC,IAAI,CAAC,UAAU,EAAE,IAAI,CAAC,CAAA;SAC1C;IACH,CAAC;CACF;AAnHD,0CAmHC","sourcesContent":["import type { ProcessInfo } from './index.js'\n\nexport interface ProcessInfoNodeData {\n // set initially, but deleted before it is written\n hrstart?: [number, number]\n\n // always set\n date: string\n argv: string[]\n execArgv: string[]\n NODE_OPTIONS?: string\n cwd: string\n pid: number\n ppid: number\n parent: string | null\n uuid: string\n files: string[]\n sources: Record<string, string[]>\n\n // fields that are only set when the process completes\n root?: string | null\n externalID?: string | null\n code?: number | null\n signal?: NodeJS.Signals | null\n runtime?: number\n globalsAdded?: string[]\n}\n\nexport class ProcessInfoNode {\n date!: string\n argv!: string[]\n execArgv!: string[]\n NODE_OPTIONS?: string\n cwd!: string\n pid!: number\n ppid!: number\n uuid!: string\n code?: number | null\n signal?: NodeJS.Signals | null\n runtime?: number\n globalsAdded?: string[]\n files: string[] = []\n sources: Record<string, string[]> = Object.create(null)\n parent?: ProcessInfoNode | null = null\n root?: ProcessInfoNode | null = null\n children?: Set<ProcessInfoNode> | null = null\n descendants: Set<ProcessInfoNode> | null = null\n externalID: string | null = null\n\n #data: ProcessInfoNodeData\n\n constructor(data: ProcessInfoNodeData) {\n this.#data = data\n Object.assign(this, data)\n }\n\n toJSON() {\n return Object.fromEntries(\n Object.entries(this)\n .filter(([_, val]) => val !== null && val !== undefined)\n .map(([key, val]) =>\n val instanceof ProcessInfoNode ? [key, val.uuid]\n : key === 'children' || key === 'descendants' ?\n [key, [...val].map(c => c.uuid)]\n : [key, val],\n ),\n )\n }\n\n link(db: ProcessInfo) {\n db.uuids.set(this.uuid, this)\n if (this.#data.parent) {\n this.parent = db.uuids.get(this.#data.parent) || this.parent\n }\n if (this.#data.root) {\n this.root = db.uuids.get(this.#data.root) ?? this.root\n }\n\n if (this.parent === null) {\n this.root = this\n const pendingRoot = db.pendingRoot.get(this.uuid)\n if (pendingRoot) {\n this.descendants = pendingRoot\n for (const n of pendingRoot) {\n n.root = this\n }\n db.pendingRoot.delete(this.uuid)\n }\n db.roots.add(this)\n } else if (typeof this.root === 'string') {\n const pendingRoot = db.pendingRoot.get(this.root)\n if (pendingRoot) {\n pendingRoot.add(this)\n } else {\n db.pendingRoot.set(this.root, new Set([this]))\n }\n } else if (this.root) {\n this.root.descendants ??= new Set()\n this.root.descendants.add(this)\n }\n\n if (typeof this.parent === 'string') {\n const pendingParent = db.pendingParent.get(this.parent)\n if (pendingParent) {\n pendingParent.add(this)\n } else {\n db.pendingParent.set(this.parent, new Set([this]))\n }\n } else if (this.parent) {\n if (!this.parent.children) {\n this.parent.children = new Set([this])\n } else {\n this.parent.children.add(this)\n }\n }\n\n const pendingParent = db.pendingParent.get(this.uuid)\n if (pendingParent) {\n this.children = pendingParent\n for (const n of this.children) {\n n.parent = this\n }\n db.pendingParent.delete(this.uuid)\n }\n\n for (const f of this.files as string[]) {\n const files = db.files.get(f)\n if (!files) {\n db.files.set(f, new Set<ProcessInfoNode>([this]))\n } else {\n files.add(this)\n }\n }\n\n if (this.externalID) {\n // newer tagged entry wins\n const e = db.externalIDs.get(this.externalID)\n if (e && Date.parse(e.date) > Date.parse(this.date)) {\n return\n }\n db.externalIDs.set(this.externalID, this)\n }\n }\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"register-coverage.d.ts","sourceRoot":"","sources":["../../src/register-coverage.ts"],"names":[],"mappings":";AAKA,OAAO,EAAE,OAAO,EAAE,MAAM,gBAAgB,CAAA;AASxC,OAAO,EAAE,mBAAmB,EAAE,MAAM,wBAAwB,CAAA;AAE5D,eAAO,IAAI,OAAO,EAAE,OAAO,GAAG,SAAqB,CAAA;
|
|
1
|
+
{"version":3,"file":"register-coverage.d.ts","sourceRoot":"","sources":["../../src/register-coverage.ts"],"names":[],"mappings":";AAKA,OAAO,EAAE,OAAO,EAAE,MAAM,gBAAgB,CAAA;AASxC,OAAO,EAAE,mBAAmB,EAAE,MAAM,wBAAwB,CAAA;AAE5D,eAAO,IAAI,OAAO,EAAE,OAAO,GAAG,SAAqB,CAAA;AAyEnD,eAAO,MAAM,QAAQ,YAYpB,CAAA;AAGD,eAAO,MAAM,oBAAoB,QAC1B,MAAM,eACE,mBAAmB,SAuEjC,CAAA"}
|
|
@@ -32,8 +32,8 @@ const uncoveredFiles = cxEnv
|
|
|
32
32
|
.trim()
|
|
33
33
|
.split('\n')
|
|
34
34
|
.filter(f => !!f);
|
|
35
|
-
const exclude = p.env._TAPJS_PROCESSINFO_COV_EXCLUDE_
|
|
36
|
-
|
|
35
|
+
const exclude = p.env._TAPJS_PROCESSINFO_COV_EXCLUDE_ ?
|
|
36
|
+
(0, get_exclude_js_1.getExclude)('_TAPJS_PROCESSINFO_COV_EXCLUDE_', false)
|
|
37
37
|
: /[\\\/]node_modules[\\\/]/;
|
|
38
38
|
const fileEx = (0, get_exclude_js_1.getExclude)('_TAPJS_PROCESSINFO_EXCLUDE_', false);
|
|
39
39
|
const fileCovered = (f, sources = [], files = []) => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"register-coverage.js","sourceRoot":"","sources":["../../src/register-coverage.ts"],"names":[],"mappings":";;;AAAA,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AAC,CAAC,GAAG,IAAI,EAAE,MAAM,CAAC,CAAA;QAC7D,qBAAqB;IACvB,CAAC,CAAC,CAAA;AACJ,CAAC,CAAA;AAzEY,QAAA,oBAAoB,wBAyEhC;AACD,oBAAoB","sourcesContent":["// start tracking coverage, unless disabled explicltly\n// export so that we know to collect at the end of the process\nconst p = process\nconst enabled = p.env._TAPJS_PROCESSINFO_COVERAGE_ !== '0'\nimport { mkdirSync, writeFileSync } from 'node:fs'\nimport { Session } from 'node:inspector'\nimport { SourceMapPayload } from 'node:module'\nimport { resolve } from 'node:path'\nimport { fileURLToPath } from 'node:url'\nimport { canonicalSource } from './canonical-source.js'\nimport { findSourceMapSafe } from './find-source-map-safe.js'\nimport { getExclude } from './get-exclude.js'\nimport { getLineLengths } from './line-lengths.js'\nimport { lookupSources } from './lookup-sources.js'\nimport { ProcessInfoNodeData } from './process-info-node.js'\n\nexport let SESSION: Session | undefined = undefined\n\n// This is a \\n delimited list of files to show coverage for\n// If not set, or empty, then coverage is included for all files\n// that pass the exclusion RegExp filter. If included in this list,\n// then coverage will be recorded, even if it matches exclude.\nconst cfEnv = p.env._TAPJS_PROCESSINFO_COV_FILES_ || ''\nconst coveredFiles: string[] = cfEnv\n .trim()\n .split('\\n')\n .filter(f => !!f)\n\n// NB: coverage exclusion is in addition to processinfo\n// exclusion. Only show coverage for a file we care\n// about at least somewhat, but coverage is a subset.\nconst cxEnv = p.env._TAPJS_PROCESSINFO_COV_EXCLUDE_FILES_ || ''\nconst uncoveredFiles: string[] = cxEnv\n .trim()\n .split('\\n')\n .filter(f => !!f)\n\nconst exclude = p.env._TAPJS_PROCESSINFO_COV_EXCLUDE_\n ? getExclude('_TAPJS_PROCESSINFO_COV_EXCLUDE_', false)\n : /[\\\\\\/]node_modules[\\\\\\/]/\nconst fileEx = getExclude('_TAPJS_PROCESSINFO_EXCLUDE_', false)\n\nconst fileCovered = (\n f: string,\n sources: string[] = [],\n files: string[] = []\n) => {\n const testFiles = [f]\n for (const src of sources || []) {\n testFiles.push(\n resolve(src.startsWith('file://') ? fileURLToPath(src) : src)\n )\n }\n\n // never include coverage if the file is fully ignored.\n if (!testFiles.some(f => files.includes(f))) {\n // just in case it was missed somehow, make sure it *should* be excluded\n for (const f of testFiles) {\n if (fileEx.test(f)) {\n return false\n }\n }\n // otherwise, it was missed by the loader recording somehow\n // this can happen with commonjs transpilations in some cases\n files.push(f)\n }\n\n // if at least one of them are explicitly covered, then include it,\n // otherwise omit if we explicitly listed\n if (coveredFiles.length) {\n return testFiles.some(f => coveredFiles.includes(f))\n }\n\n // if any of the filenames are explicitly excluded, no coverage\n // otherwise, it is covered\n return !testFiles.some(\n f => uncoveredFiles.includes(f) || exclude?.test(f)\n )\n}\n\n// C8 can't see that this function runs, best theory is that it\n// collides with what it's doing with the coverage it's collecting\n// This ignore can possibly be removed once this is being tested\n// with a version of tap that uses this library, but it might just\n// be an unresolveable bootstrap problem.\n// The test does verify that it ran, because otherwise, there would\n// be no coverage, and it verifies that it gets the expected coverage.\n/* c8 ignore start */\nexport const register = () => {\n if (!enabled) return\n p.env._TAPJS_PROCESSINFO_COVERAGE_ = '1'\n\n SESSION = new Session()\n SESSION.connect()\n SESSION.post('Profiler.enable')\n SESSION.post('Runtime.enable')\n SESSION.post('Profiler.startPreciseCoverage', {\n callCount: true,\n detailed: true,\n })\n}\n/* c8 ignore stop */\n\nexport const coverageOnProcessEnd = (\n cwd: string,\n processInfo: ProcessInfoNodeData\n) => {\n // Similar to the coverage tracking bootstrap problem above, c8\n // doesn't see that this function runs, even though it DOES see\n // that the function defined below runs, which is weird.\n /* c8 ignore start */\n if (!SESSION) return\n const session = SESSION\n\n const f = `${cwd}/.tap/coverage/${processInfo.uuid}.json`\n mkdirSync(`${cwd}/.tap/coverage`, { recursive: true })\n\n session.post('Profiler.takePreciseCoverage', (er, cov) => {\n session.post('Profiler.stopPreciseCoverage')\n /* c8 ignore stop */\n\n // something very strange and bad happened\n /* c8 ignore start */\n if (er) {\n throw er\n }\n /* c8 ignore stop */\n\n // Create a source-map-cache that c8 uses in report generation\n const sourceMapCache: {\n [k: string]: {\n lineLengths: number[]\n data: SourceMapPayload\n }\n } = {}\n Object.assign(cov, {\n 'source-map-cache': sourceMapCache,\n })\n\n cov.result = cov.result.filter(obj => {\n if (!/^file:/.test(obj.url)) {\n return false\n }\n obj.url = canonicalSource(obj.url)\n const f = fileURLToPath(obj.url)\n // see if it has a source map\n // need to look up via the url, not the file path, because mocks\n // attach a tapmock search param, which is in node's internal key.\n const sources = lookupSources(obj.url, true)\n if (!fileCovered(f, sources, processInfo.files)) {\n return false\n }\n // Most of the time this will be cached at the time of recording, but\n // if it's the last module loaded, or transpiled in-place by ts-node,\n // the sourcemap won't be pre-loaded and will have to be looked up.\n const s = findSourceMapSafe(obj.url)\n const { payload } = s || { payload: null }\n if (payload) {\n sourceMapCache[obj.url] = Object.assign(Object.create(null), {\n /* c8 ignore start */\n // node's SourceMap objects provide this as of 20.5.0\n //@ts-ignore\n lineLengths: s?.lineLengths || getLineLengths(f),\n /* c8 ignore stop */\n data: {\n ...payload,\n sources: payload.sources?.map(s => canonicalSource(s)),\n },\n })\n }\n return true\n })\n\n writeFileSync(f, JSON.stringify(cov, null, 2) + '\\n', 'utf8')\n /* c8 ignore start */\n })\n}\n/* c8 ignore stop */\n"]}
|
|
1
|
+
{"version":3,"file":"register-coverage.js","sourceRoot":"","sources":["../../src/register-coverage.ts"],"names":[],"mappings":";;;AAAA,sDAAsD;AACtD,8DAA8D;AAC9D,MAAM,CAAC,GAAG,OAAO,CAAA;AACjB,MAAM,OAAO,GAAG,CAAC,CAAC,GAAG,CAAC,4BAA4B,KAAK,GAAG,CAAA;AAC1D,qCAAkD;AAClD,mDAAwC;AAExC,yCAAmC;AACnC,uCAAwC;AACxC,+DAAuD;AACvD,uEAA6D;AAC7D,qDAA6C;AAC7C,uDAAkD;AAClD,2DAAmD;AAGxC,QAAA,OAAO,GAAwB,SAAS,CAAA;AAEnD,4DAA4D;AAC5D,gEA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,CAAC,WAAW,CAAC,CAAC,EAAE,OAAO,EAAE,WAAW,CAAC,KAAK,CAAC,EAAE;gBAC/C,OAAO,KAAK,CAAA;aACb;YACD,qEAAqE;YACrE,qEAAqE;YACrE,mEAAmE;YACnE,MAAM,CAAC,GAAG,IAAA,2CAAiB,EAAC,GAAG,CAAC,GAAG,CAAC,CAAA;YACpC,MAAM,EAAE,OAAO,EAAE,GAAG,CAAC,IAAI,EAAE,OAAO,EAAE,IAAI,EAAE,CAAA;YAC1C,IAAI,OAAO,EAAE;gBACX,cAAc,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,EAAE;oBAC3D,qBAAqB;oBACrB,qDAAqD;oBACrD,YAAY;oBACZ,WAAW,EAAE,CAAC,EAAE,WAAW,IAAI,IAAA,gCAAc,EAAC,CAAC,CAAC;oBAChD,oBAAoB;oBACpB,IAAI,EAAE;wBACJ,GAAG,OAAO;wBACV,OAAO,EAAE,OAAO,CAAC,OAAO,EAAE,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,IAAA,qCAAe,EAAC,CAAC,CAAC,CAAC;qBACvD;iBACF,CAAC,CAAA;aACH;YACD,OAAO,IAAI,CAAA;QACb,CAAC,CAAC,CAAA;QAEF,IAAA,uBAAa,EAAC,CAAC,EAAE,IAAI,CAAC,SAAS,CAAC,GAAG,EAAE,IAAI,EAAE,CAAC,CAAC,GAAG,IAAI,EAAE,MAAM,CAAC,CAAA;QAC7D,qBAAqB;IACvB,CAAC,CAAC,CAAA;AACJ,CAAC,CAAA;AAzEY,QAAA,oBAAoB,wBAyEhC;AACD,oBAAoB","sourcesContent":["// start tracking coverage, unless disabled explicltly\n// export so that we know to collect at the end of the process\nconst p = process\nconst enabled = p.env._TAPJS_PROCESSINFO_COVERAGE_ !== '0'\nimport { mkdirSync, writeFileSync } from 'node:fs'\nimport { Session } from 'node:inspector'\nimport { SourceMapPayload } from 'node:module'\nimport { resolve } from 'node:path'\nimport { fileURLToPath } from 'node:url'\nimport { canonicalSource } from './canonical-source.js'\nimport { findSourceMapSafe } from './find-source-map-safe.js'\nimport { getExclude } from './get-exclude.js'\nimport { getLineLengths } from './line-lengths.js'\nimport { lookupSources } from './lookup-sources.js'\nimport { ProcessInfoNodeData } from './process-info-node.js'\n\nexport let SESSION: Session | undefined = undefined\n\n// This is a \\n delimited list of files to show coverage for\n// If not set, or empty, then coverage is included for all files\n// that pass the exclusion RegExp filter. If included in this list,\n// then coverage will be recorded, even if it matches exclude.\nconst cfEnv = p.env._TAPJS_PROCESSINFO_COV_FILES_ || ''\nconst coveredFiles: string[] = cfEnv\n .trim()\n .split('\\n')\n .filter(f => !!f)\n\n// NB: coverage exclusion is in addition to processinfo\n// exclusion. Only show coverage for a file we care\n// about at least somewhat, but coverage is a subset.\nconst cxEnv = p.env._TAPJS_PROCESSINFO_COV_EXCLUDE_FILES_ || ''\nconst uncoveredFiles: string[] = cxEnv\n .trim()\n .split('\\n')\n .filter(f => !!f)\n\nconst exclude =\n p.env._TAPJS_PROCESSINFO_COV_EXCLUDE_ ?\n getExclude('_TAPJS_PROCESSINFO_COV_EXCLUDE_', false)\n : /[\\\\\\/]node_modules[\\\\\\/]/\nconst fileEx = getExclude('_TAPJS_PROCESSINFO_EXCLUDE_', false)\n\nconst fileCovered = (\n f: string,\n sources: string[] = [],\n files: string[] = [],\n) => {\n const testFiles = [f]\n for (const src of sources || []) {\n testFiles.push(\n resolve(src.startsWith('file://') ? fileURLToPath(src) : src),\n )\n }\n\n // never include coverage if the file is fully ignored.\n if (!testFiles.some(f => files.includes(f))) {\n // just in case it was missed somehow, make sure it *should* be excluded\n for (const f of testFiles) {\n if (fileEx.test(f)) {\n return false\n }\n }\n // otherwise, it was missed by the loader recording somehow\n // this can happen with commonjs transpilations in some cases\n files.push(f)\n }\n\n // if at least one of them are explicitly covered, then include it,\n // otherwise omit if we explicitly listed\n if (coveredFiles.length) {\n return testFiles.some(f => coveredFiles.includes(f))\n }\n\n // if any of the filenames are explicitly excluded, no coverage\n // otherwise, it is covered\n return !testFiles.some(\n f => uncoveredFiles.includes(f) || exclude?.test(f),\n )\n}\n\n// C8 can't see that this function runs, best theory is that it\n// collides with what it's doing with the coverage it's collecting\n// This ignore can possibly be removed once this is being tested\n// with a version of tap that uses this library, but it might just\n// be an unresolveable bootstrap problem.\n// The test does verify that it ran, because otherwise, there would\n// be no coverage, and it verifies that it gets the expected coverage.\n/* c8 ignore start */\nexport const register = () => {\n if (!enabled) return\n p.env._TAPJS_PROCESSINFO_COVERAGE_ = '1'\n\n SESSION = new Session()\n SESSION.connect()\n SESSION.post('Profiler.enable')\n SESSION.post('Runtime.enable')\n SESSION.post('Profiler.startPreciseCoverage', {\n callCount: true,\n detailed: true,\n })\n}\n/* c8 ignore stop */\n\nexport const coverageOnProcessEnd = (\n cwd: string,\n processInfo: ProcessInfoNodeData,\n) => {\n // Similar to the coverage tracking bootstrap problem above, c8\n // doesn't see that this function runs, even though it DOES see\n // that the function defined below runs, which is weird.\n /* c8 ignore start */\n if (!SESSION) return\n const session = SESSION\n\n const f = `${cwd}/.tap/coverage/${processInfo.uuid}.json`\n mkdirSync(`${cwd}/.tap/coverage`, { recursive: true })\n\n session.post('Profiler.takePreciseCoverage', (er, cov) => {\n session.post('Profiler.stopPreciseCoverage')\n /* c8 ignore stop */\n\n // something very strange and bad happened\n /* c8 ignore start */\n if (er) {\n throw er\n }\n /* c8 ignore stop */\n\n // Create a source-map-cache that c8 uses in report generation\n const sourceMapCache: {\n [k: string]: {\n lineLengths: number[]\n data: SourceMapPayload\n }\n } = {}\n Object.assign(cov, {\n 'source-map-cache': sourceMapCache,\n })\n\n cov.result = cov.result.filter(obj => {\n if (!/^file:/.test(obj.url)) {\n return false\n }\n obj.url = canonicalSource(obj.url)\n const f = fileURLToPath(obj.url)\n // see if it has a source map\n // need to look up via the url, not the file path, because mocks\n // attach a tapmock search param, which is in node's internal key.\n const sources = lookupSources(obj.url, true)\n if (!fileCovered(f, sources, processInfo.files)) {\n return false\n }\n // Most of the time this will be cached at the time of recording, but\n // if it's the last module loaded, or transpiled in-place by ts-node,\n // the sourcemap won't be pre-loaded and will have to be looked up.\n const s = findSourceMapSafe(obj.url)\n const { payload } = s || { payload: null }\n if (payload) {\n sourceMapCache[obj.url] = Object.assign(Object.create(null), {\n /* c8 ignore start */\n // node's SourceMap objects provide this as of 20.5.0\n //@ts-ignore\n lineLengths: s?.lineLengths || getLineLengths(f),\n /* c8 ignore stop */\n data: {\n ...payload,\n sources: payload.sources?.map(s => canonicalSource(s)),\n },\n })\n }\n return true\n })\n\n writeFileSync(f, JSON.stringify(cov, null, 2) + '\\n', 'utf8')\n /* c8 ignore start */\n })\n}\n/* c8 ignore stop */\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"register-env.d.ts","sourceRoot":"","sources":["../../src/register-env.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"register-env.d.ts","sourceRoot":"","sources":["../../src/register-env.ts"],"names":[],"mappings":"AA4BA,eAAO,MAAM,QAAQ,YAQpB,CAAA"}
|
|
@@ -16,7 +16,10 @@ const getEnvs = (env, args = []) => {
|
|
|
16
16
|
return Object.fromEntries(Object.entries(p.env)
|
|
17
17
|
.filter(([k]) => !(env && hasOwnProperty.call(env, k)) && envRE.test(k))
|
|
18
18
|
.concat([
|
|
19
|
-
[
|
|
19
|
+
[
|
|
20
|
+
'NODE_OPTIONS',
|
|
21
|
+
(0, node_options_env_js_1.nodeOptionsEnv)(env?.NODE_OPTIONS ? env : p.env, args),
|
|
22
|
+
],
|
|
20
23
|
]));
|
|
21
24
|
};
|
|
22
25
|
const register = () => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"register-env.js","sourceRoot":"","sources":["../../src/register-env.ts"],"names":[],"mappings":";;;;;;AAAA,wEAA6C;AAC7C,+DAAsD;AAEtD,MAAM,CAAC,GAAG,OAAO,CAAA;AACjB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CAAA;IACZ,CAAC,CAAC,CAAA;AACJ,CAAC,CAAA;AARY,QAAA,QAAQ,YAQpB","sourcesContent":["import processOnSpawn from 'process-on-spawn'\nimport { nodeOptionsEnv } from './node-options-env.js'\n\nconst p = process\nconst envRE = /^_TAPJS_PROCESSINFO_/\nconst { hasOwnProperty } = Object.prototype\n\nconst getEnvs = (\n env?: NodeJS.ProcessEnv,\n args: readonly string[] = [],\n) => {\n // load it here so that it isn't cached before the loader attaches\n // in self-test scenario.\n // copy all of OUR envs, if not specifically set on the env object\n return Object.fromEntries(\n Object.entries(p.env)\n .filter(\n ([k]) => !(env && hasOwnProperty.call(env, k)) && envRE.test(k),\n )\n .concat([\n [\n 'NODE_OPTIONS',\n nodeOptionsEnv(env?.NODE_OPTIONS ? env : p.env, args),\n ],\n ]),\n )\n}\n\nexport const register = () => {\n processOnSpawn.addListener(obj => {\n obj.env = {\n ...(obj.env || p.env),\n ...getEnvs(obj.env, obj.args),\n }\n return obj\n })\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"register-process-end.js","sourceRoot":"","sources":["../../src/register-process-end.ts"],"names":[],"mappings":";;;AAAA,6CAAoC;AACpC,+DAAsD;AAEtD,2BAA6C;AAC7C,iEAA6D;AAC7D,qDAA6C;AAE7C,MAAM,IAAI,GAAG,OAAO,CAAA;AAEpB,MAAM,GAAG,GAAG,IAAI,CAAC,GAAG,CAAC,uBAAuB,IAAI,IAAI,CAAC,GAAG,EAAE,CAAA;AAC1D,IAAI,CAAC,GAAG,CAAC,uBAAuB,GAAG,GAAG,CAAA;AACtC,MAAM,OAAO,GAAG,IAAI,GAAG,CAAC,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,CAAA;AAErC,MAAM,QAAQ,GAAG,GAAG,EAAE;IAC3B,IAAA,oBAAM,EACJ,CAAC,IAAI,EAAE,MAAM,EAAE,EAAE;QACf,MAAM,WAAW,GAAG,IAAA,oCAAc,GAAE,CAAA;QACpC,WA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essInfo } from './get-process-info.js'\n\nimport { mkdirSync, writeFileSync } from 'fs'\nimport { coverageOnProcessEnd } from './register-coverage.js'\nimport { setSources } from './set-sources.js'\n\nconst proc = process\n\nconst cwd = proc.env._TAPJS_PROCESSINFO_CWD_ || proc.cwd()\nproc.env._TAPJS_PROCESSINFO_CWD_ = cwd\nconst globals = new Set(Object.keys(global))\n\nexport const register = () => {\n onExit(\n (code, signal) => {\n const processInfo = getProcessInfo()\n processInfo.code = code\n processInfo.signal = signal\n const runtime = proc.hrtime(processInfo.hrstart)\n delete processInfo.hrstart\n processInfo.files = [...new Set(processInfo.files)]\n // try to find the actual sources of the files we loaded\n // This can't be done up front, because the sourcemap isn't\n // present during the load phase, since it's in the contents.\n setSources(processInfo)\n processInfo.runtime = runtime[0] * 1e3 + runtime[1] / 1e6\n const globalsAdded = Object.keys(global).filter(k => !globals.has(k))\n if (globalsAdded.length) {\n processInfo.globalsAdded = globalsAdded\n }\n\n const f = `${cwd}/.tap/processinfo/${processInfo.uuid}.json`\n mkdirSync(`${cwd}/.tap/processinfo`, { recursive: true })\n writeFileSync(f, JSON.stringify(processInfo, null, 2) + '\\n', 'utf8')\n coverageOnProcessEnd(cwd, processInfo)\n },\n { alwaysLast: true }
|
|
1
|
+
{"version":3,"file":"register-process-end.js","sourceRoot":"","sources":["../../src/register-process-end.ts"],"names":[],"mappings":";;;AAAA,6CAAoC;AACpC,+DAAsD;AAEtD,2BAA6C;AAC7C,iEAA6D;AAC7D,qDAA6C;AAE7C,MAAM,IAAI,GAAG,OAAO,CAAA;AAEpB,MAAM,GAAG,GAAG,IAAI,CAAC,GAAG,CAAC,uBAAuB,IAAI,IAAI,CAAC,GAAG,EAAE,CAAA;AAC1D,IAAI,CAAC,GAAG,CAAC,uBAAuB,GAAG,GAAG,CAAA;AACtC,MAAM,OAAO,GAAG,IAAI,GAAG,CAAC,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,CAAA;AAErC,MAAM,QAAQ,GAAG,GAA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D,EAAE,UAAU,EAAE,IAAI,EAAE,CACrB,CAAA;AACH,CAAC,CAAA;AA1BY,QAAA,QAAQ,YA0BpB","sourcesContent":["import { onExit } from 'signal-exit'\nimport { getProcessInfo } from './get-process-info.js'\n\nimport { mkdirSync, writeFileSync } from 'fs'\nimport { coverageOnProcessEnd } from './register-coverage.js'\nimport { setSources } from './set-sources.js'\n\nconst proc = process\n\nconst cwd = proc.env._TAPJS_PROCESSINFO_CWD_ || proc.cwd()\nproc.env._TAPJS_PROCESSINFO_CWD_ = cwd\nconst globals = new Set(Object.keys(global))\n\nexport const register = () => {\n onExit(\n (code, signal) => {\n const processInfo = getProcessInfo()\n processInfo.code = code\n processInfo.signal = signal\n const runtime = proc.hrtime(processInfo.hrstart)\n delete processInfo.hrstart\n processInfo.files = [...new Set(processInfo.files)]\n // try to find the actual sources of the files we loaded\n // This can't be done up front, because the sourcemap isn't\n // present during the load phase, since it's in the contents.\n setSources(processInfo)\n processInfo.runtime = runtime[0] * 1e3 + runtime[1] / 1e6\n const globalsAdded = Object.keys(global).filter(k => !globals.has(k))\n if (globalsAdded.length) {\n processInfo.globalsAdded = globalsAdded\n }\n\n const f = `${cwd}/.tap/processinfo/${processInfo.uuid}.json`\n mkdirSync(`${cwd}/.tap/processinfo`, { recursive: true })\n writeFileSync(f, JSON.stringify(processInfo, null, 2) + '\\n', 'utf8')\n coverageOnProcessEnd(cwd, processInfo)\n },\n { alwaysLast: true },\n )\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"register-require.js","sourceRoot":"","sources":["../../src/register-require.ts"],"names":[],"mappings":";;;AAAA,2DAA2D;AAC3D,qCAAiC;AACjC,qDAA6C;AAC7C,+DAAsD;AACtD,uDAAmD;AAEnD,MAAM,gBAAgB,GAAG,MAAM,CAAC,GAAG,CAAC,oCAAoC,CAAC,CAAA;AACzE,MAAM,CAAC,GAAG,MAET,CAAA;AAEM,MAAM,QAAQ,GAAG,GAAG,EAAE;IAC3B,IAAI,CAAC,CAAC,gBAAgB,CAAC;QAAE,OAAM;IAC/B,CAAC,CAAC,gBAAgB,CAAC,GAAG,IAAI,CAAA;IAC1B,wDAAwD;IACxD,MAAM,OAAO,GAAG,IAAA,2BAAU,EAAC,6BAA6B,EAAE,KAAK,CAAC,CAAA;IAChE,IAAA,iBAAO,EACL,CAAC,IAAI,EAAE,QAAQ,EAAE,EAAE;QACjB,IAAA,oCAAc,GAAE,CAAC,KAAK,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAA;QACrC,IAAA,iCAAe,EAAC,QAAQ,EAAE,IAAI,CAAC,CAAA;QAC/B,OAAO,IAAI,CAAA;IACb,CAAC,EACD;QACE,IAAI,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC;QACpD,OAAO,EAAE,QAAQ,CAAC,EAAE,CAAC,CAAC,OAAO,CAAC,IAAI,CAAC,QAAQ,CAAC;KAC7C,CACF,CAAA;AACH,CAAC,CAAA;AAhBY,QAAA,QAAQ,YAgBpB","sourcesContent":["// commonjs style loader hook, modifying require.extensions\nimport { addHook } from 'pirates'\nimport { getExclude } from './get-exclude.js'\nimport { getProcessInfo } from './get-process-info.js'\nimport { saveLineLengths } from './line-lengths.js'\n\nconst kRegisterRequire = Symbol.for('@tapjs/processinfo.registerRequire')\nconst g = global as typeof globalThis & {\n [kRegisterRequire]?: boolean\n}\n\nexport const register = () => {\n if (g[kRegisterRequire]) return\n g[kRegisterRequire] = true\n // by default we include everything in processInfo.files\n const exclude = getExclude('_TAPJS_PROCESSINFO_EXCLUDE_', false)\n addHook(\n (code, filename) => {\n getProcessInfo().files.push(filename)\n saveLineLengths(filename, code)\n return code\n },\n {\n exts: ['.js', '.cjs', '.ts', '.cts', '.jsx', '.tsx'],\n matcher: filename => !exclude.test(filename),\n }
|
|
1
|
+
{"version":3,"file":"register-require.js","sourceRoot":"","sources":["../../src/register-require.ts"],"names":[],"mappings":";;;AAAA,2DAA2D;AAC3D,qCAAiC;AACjC,qDAA6C;AAC7C,+DAAsD;AACtD,uDAAmD;AAEnD,MAAM,gBAAgB,GAAG,MAAM,CAAC,GAAG,CAAC,oCAAoC,CAAC,CAAA;AACzE,MAAM,CAAC,GAAG,MAET,CAAA;AAEM,MAAM,QAAQ,GAAG,GAAG,EAAE;IAC3B,IAAI,CAAC,CAAC,gBAAgB,CAAC;QAAE,OAAM;IAC/B,CAAC,CAAC,gBAAgB,CAAC,GAAG,IAAI,CAAA;IAC1B,wDAAwD;IACxD,MAAM,OAAO,GAAG,IAAA,2BAAU,EAAC,6BAA6B,EAAE,KAAK,CAAC,CAAA;IAChE,IAAA,iBAAO,EACL,CAAC,IAAI,EAAE,QAAQ,EAAE,EAAE;QACjB,IAAA,oCAAc,GAAE,CAAC,KAAK,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAA;QACrC,IAAA,iCAAe,EAAC,QAAQ,EAAE,IAAI,CAAC,CAAA;QAC/B,OAAO,IAAI,CAAA;IACb,CAAC,EACD;QACE,IAAI,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC;QACpD,OAAO,EAAE,QAAQ,CAAC,EAAE,CAAC,CAAC,OAAO,CAAC,IAAI,CAAC,QAAQ,CAAC;KAC7C,CACF,CAAA;AACH,CAAC,CAAA;AAhBY,QAAA,QAAQ,YAgBpB","sourcesContent":["// commonjs style loader hook, modifying require.extensions\nimport { addHook } from 'pirates'\nimport { getExclude } from './get-exclude.js'\nimport { getProcessInfo } from './get-process-info.js'\nimport { saveLineLengths } from './line-lengths.js'\n\nconst kRegisterRequire = Symbol.for('@tapjs/processinfo.registerRequire')\nconst g = global as typeof globalThis & {\n [kRegisterRequire]?: boolean\n}\n\nexport const register = () => {\n if (g[kRegisterRequire]) return\n g[kRegisterRequire] = true\n // by default we include everything in processInfo.files\n const exclude = getExclude('_TAPJS_PROCESSINFO_EXCLUDE_', false)\n addHook(\n (code, filename) => {\n getProcessInfo().files.push(filename)\n saveLineLengths(filename, code)\n return code\n },\n {\n exts: ['.js', '.cjs', '.ts', '.cts', '.jsx', '.tsx'],\n matcher: filename => !exclude.test(filename),\n },\n )\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"spawn-opts.js","sourceRoot":"","sources":["../../src/spawn-opts.ts"],"names":[],"mappings":";;;AACA,+DAAsD;AAGtD,MAAM,CAAC,GAAG,OAAO,CAAA;AAEV,MAAM,SAAS,GAAG,CACvB,OAA0B,EAC1B,OAAyB,EACzB,IAAwB,EAC4B,EAAE;IACtD,MAAM,EAAE,UAAU,EAAE,GAAG,IAAI,EAAE,GAAG,OAAO,CAAA;IACvC,MAAM,GAAG,GAAG,EAAE,GAAG,CAAC,OAAO,CAAC,GAAG,IAAI,CAAC,CAAC,GAAG,CAAC,EAAE,CAAA;IACzC,kEAAkE;IAClE,MAAM,CAAC,GAAG;QACR,GAAG,CAAC,OAAO,CAAC,QAAQ,IAAI,EAAE,CAAC;QAC3B,GAAG,CAAC,IAAI,IAAI,EAAE,CAAC;QACf,GAAG,CAAC,OAAO,CAAC,IAAI,IAAI,EAAE,CAAC;KACxB,CAAA;IACD,GAAG,CAAC,YAAY,GAAG,IAAA,oCAAc,EAAC,GAAG,EAAE,CAAC,CAAC,CAAA;IACzC,IAAI,UAAU,EAAE;QACd,GAAG,CAAC,+BAA+B,GAAG,UAAU,CAAA;KACjD;IACD,IAAI,OAAO,EAAE;QACX,GAAG,CAAC,2BAA2B,GAAG,MAAM,CAAC,OAAO,CAAC,CAAA;KAClD;IACD,OAAO,EAAE,GAAG,IAAI,EAAE,GAAG,EAAE,CAAA;AACzB,CAAC,CAAA;AArBY,QAAA,SAAS,aAqBrB","sourcesContent":["import { ProcessEnvOptions } from 'child_process'\nimport { nodeOptionsEnv } from './node-options-env.js'\n\nexport type WithExternalID<T> = T & { externalID?: string }\nconst p = process\n\nexport const spawnOpts = <T extends { [k: string]: any }>(\n options: WithExternalID<T>,\n exclude?: RegExp | string,\n args?: readonly string[]
|
|
1
|
+
{"version":3,"file":"spawn-opts.js","sourceRoot":"","sources":["../../src/spawn-opts.ts"],"names":[],"mappings":";;;AACA,+DAAsD;AAGtD,MAAM,CAAC,GAAG,OAAO,CAAA;AAEV,MAAM,SAAS,GAAG,CACvB,OAA0B,EAC1B,OAAyB,EACzB,IAAwB,EAC4B,EAAE;IACtD,MAAM,EAAE,UAAU,EAAE,GAAG,IAAI,EAAE,GAAG,OAAO,CAAA;IACvC,MAAM,GAAG,GAAG,EAAE,GAAG,CAAC,OAAO,CAAC,GAAG,IAAI,CAAC,CAAC,GAAG,CAAC,EAAE,CAAA;IACzC,kEAAkE;IAClE,MAAM,CAAC,GAAG;QACR,GAAG,CAAC,OAAO,CAAC,QAAQ,IAAI,EAAE,CAAC;QAC3B,GAAG,CAAC,IAAI,IAAI,EAAE,CAAC;QACf,GAAG,CAAC,OAAO,CAAC,IAAI,IAAI,EAAE,CAAC;KACxB,CAAA;IACD,GAAG,CAAC,YAAY,GAAG,IAAA,oCAAc,EAAC,GAAG,EAAE,CAAC,CAAC,CAAA;IACzC,IAAI,UAAU,EAAE;QACd,GAAG,CAAC,+BAA+B,GAAG,UAAU,CAAA;KACjD;IACD,IAAI,OAAO,EAAE;QACX,GAAG,CAAC,2BAA2B,GAAG,MAAM,CAAC,OAAO,CAAC,CAAA;KAClD;IACD,OAAO,EAAE,GAAG,IAAI,EAAE,GAAG,EAAE,CAAA;AACzB,CAAC,CAAA;AArBY,QAAA,SAAS,aAqBrB","sourcesContent":["import { ProcessEnvOptions } from 'child_process'\nimport { nodeOptionsEnv } from './node-options-env.js'\n\nexport type WithExternalID<T> = T & { externalID?: string }\nconst p = process\n\nexport const spawnOpts = <T extends { [k: string]: any }>(\n options: WithExternalID<T>,\n exclude?: RegExp | string,\n args?: readonly string[],\n): Omit<T, 'externalID'> & { env: ProcessEnvOptions } => {\n const { externalID, ...rest } = options\n const env = { ...(options.env || p.env) }\n // only add if lacking in args, but this can come in multiple ways\n const a = [\n ...(options.execArgv ?? []),\n ...(args ?? []),\n ...(options.args ?? []),\n ]\n env.NODE_OPTIONS = nodeOptionsEnv(env, a)\n if (externalID) {\n env._TAPJS_PROCESSINFO_EXTERNAL_ID_ = externalID\n }\n if (exclude) {\n env._TAPJS_PROCESSINFO_EXCLUDE_ = String(exclude)\n }\n return { ...rest, env }\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"canonical-source.d.ts","sourceRoot":"","sources":["../../src/canonical-source.ts"],"names":[],"mappings":"AASA,eAAO,MAAM,eAAe,MAAO,MAAM,KAAG,
|
|
1
|
+
{"version":3,"file":"canonical-source.d.ts","sourceRoot":"","sources":["../../src/canonical-source.ts"],"names":[],"mappings":"AASA,eAAO,MAAM,eAAe,MAAO,MAAM,KAAG,MAe3C,CAAA;AAED,eAAO,MAAM,aAAa,MAAO,MAAM,KAAG,MAUzC,CAAA"}
|
|
@@ -11,8 +11,9 @@ export const canonicalSource = (s) => {
|
|
|
11
11
|
const u = new URL(s);
|
|
12
12
|
const hash = u.hash;
|
|
13
13
|
const search = u.search;
|
|
14
|
-
return String(pathToFileURL(canonicalPath(fileURLToPath(s)))) +
|
|
15
|
-
hash +
|
|
14
|
+
return (String(pathToFileURL(canonicalPath(fileURLToPath(s)))) +
|
|
15
|
+
hash +
|
|
16
|
+
search);
|
|
16
17
|
}
|
|
17
18
|
// re-resolve it relative to the cwd
|
|
18
19
|
// back to a file: url
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"canonical-source.js","sourceRoot":"","sources":["../../src/canonical-source.ts"],"names":[],"mappings":"AAAA,oDAAoD;AACpD,sDAAsD;AACtD,0DAA0D;AAC1D,sCAAsC;AAEtC,OAAO,EAAE,QAAQ,EAAE,OAAO,EAAE,MAAM,MAAM,CAAA;AACxC,OAAO,EAAE,aAAa,EAAE,aAAa,EAAE,MAAM,KAAK,CAAA;AA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aAAa,CAAC,CAAC,CAAC,CAAC,CAAC,CAAA;AAChD,CAAC,CAAA;AAED,MAAM,CAAC,MAAM,aAAa,GAAG,CAAC,CAAS,EAAU,EAAE;IACjD,MAAM,GAAG,GAAG,QAAQ,CAAC,GAAG,EAAE,CAAC,CAAC,CAAA;IAC5B,CAAC,GAAG,OAAO,CAAC,GAAG,EAAE,GAAG,CAAC,CAAA;IACrB,2BAA2B;IAC3B,IAAI,SAAS,CAAC,IAAI,CAAC,CAAC,CAAC;QAAE,CAAC,GAAG,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,WAAW,EAAE,GAAG,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,CAAA;IACrE,uBAAuB;IACvB,IAAI,CAAC,CAAC,UAAU,CAAC,MAAM,CAAC,EAAE;QACxB,CAAC,GAAG,CAAC,CAAC,OAAO,CAAC,sBAAsB,EAAE,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,WAAW,EAAE,CAAC,CAAA;KAC9D;IACD,OAAO,CAAC,CAAA;AACV,CAAC,CAAA","sourcesContent":["// The sources reported in sourcemaps can be fickle,\n// and istanbul's reporting doesn't handle it so well.\n// So, we canonicalize all entries in sources to a file://\n// url with consistent capitalization.\n\nimport { relative, resolve } from 'path'\nimport { fileURLToPath, pathToFileURL } from 'url'\nconst cwd = process.cwd()\n\nexport const canonicalSource = (s: string): string => {\n // convert to a path\n if (s.startsWith('file://')) {\n const u = new URL(s)\n const hash = u.hash\n const search = u.search\n return (\n String(pathToFileURL(canonicalPath(fileURLToPath(s)))) +\n hash +\n search\n )\n }\n // re-resolve it relative to the cwd\n // back to a file: url\n return String(pathToFileURL(canonicalPath(s)))\n}\n\nexport const canonicalPath = (s: string): string => {\n const rel = relative(cwd, s)\n s = resolve(cwd, rel)\n // capitalize drive letters\n if (/^[a-z]:/.test(s)) s = s.charAt(0).toUpperCase() + s.substring(1)\n // capitalize UNC paths\n if (s.startsWith('\\\\\\\\')) {\n s = s.replace(/\\\\\\\\[^\\\\]+\\\\[^\\\\]+\\\\/, _0 => _0.toUpperCase())\n }\n return s\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"child_process.d.ts","sourceRoot":"","sources":["../../src/child_process.ts"],"names":[],"mappings":";;;;AAEA,OAAO,EACL,YAAY,EACZ,mBAAmB,EACnB,8BAA8B,EAE9B,aAAa,EAEb,iBAAiB,EACjB,eAAe,EACf,iCAAiC,EACjC,gCAAgC,EAChC,iCAAiC,EAEjC,mBAAmB,EACnB,qCAAqC,EACrC,qCAAqC,EACrC,WAAW,EAEX,eAAe,EACf,iCAAiC,EACjC,iCAAiC,EAEjC,WAAW,EACX,gBAAgB,EAEhB,YAAY,EACZ,wBAAwB,EACxB,0BAA0B,EAE1B,gBAAgB,EAChB,kCAAkC,EAClC,kCAAkC,EAClC,gBAAgB,EAChB,SAAS,EACT,SAAS,EACV,MAAM,eAAe,CAAA;AACtB,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,IAAI,CAAA;AAC/C,OAAO,KAAK,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,QAAQ,CAAA;AAEhD,OAAO,EAAa,cAAc,EAAE,MAAM,iBAAiB,CAAA;AAqB3D,wBAAgB,KAAK,CACnB,OAAO,EAAE,MAAM,EACf,OAAO,CAAC,EAAE,cAAc,CAAC,wBAAwB,CAAC,GACjD,8BAA8B,CAAA;AACjC,wBAAgB,KAAK,CACnB,OAAO,EAAE,MAAM,EACf,OAAO,EAAE,cAAc,CACrB,0BAA0B,CAAC,SAAS,EAAE,SAAS,EAAE,SAAS,CAAC,CAC5D,GACA,mBAAmB,CAAC,QAAQ,EAAE,QAAQ,EAAE,QAAQ,CAAC,CAAA;AACpD,wBAAgB,KAAK,CACnB,OAAO,EAAE,MAAM,EACf,OAAO,EAAE,cAAc,CACrB,0BAA0B,CAAC,SAAS,EAAE,SAAS,EAAE,SAAS,CAAC,CAC5D,GACA,mBAAmB,CAAC,QAAQ,EA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AAChF,CAAC","sourcesContent":["// This wraps all of the various spawn methods such that externalID can be\n// set in the options, and ensuring that the proper envs get set.\nimport {\n ChildProcess,\n ChildProcessByStdio,\n ChildProcessWithoutNullStreams,\n exec as cpExec,\n ExecException,\n execFile as cpExecFile,\n ExecFileException,\n ExecFileOptions,\n ExecFileOptionsWithBufferEncoding,\n ExecFileOptionsWithOtherEncoding,\n ExecFileOptionsWithStringEncoding,\n execFileSync as cpExecFileSync,\n ExecFileSyncOptions,\n ExecFileSyncOptionsWithBufferEncoding,\n ExecFileSyncOptionsWithStringEncoding,\n ExecOptions,\n execSync as cpExecSync,\n ExecSyncOptions,\n ExecSyncOptionsWithBufferEncoding,\n ExecSyncOptionsWithStringEncoding,\n fork as cpFork,\n ForkOptions,\n PromiseWithChild,\n spawn as cpSpawn,\n SpawnOptions,\n SpawnOptionsWithoutStdio,\n SpawnOptionsWithStdioTuple,\n spawnSync as cpSpawnSync,\n SpawnSyncOptions,\n SpawnSyncOptionsWithBufferEncoding,\n SpawnSyncOptionsWithStringEncoding,\n SpawnSyncReturns,\n StdioNull,\n StdioPipe,\n} from 'child_process'\nimport type { ObjectEncodingOptions } from 'fs'\nimport type { Readable, Writable } from 'stream'\nimport { getExclude } from './get-exclude.js'\nimport { spawnOpts, WithExternalID } from './spawn-opts.js'\n\nconst promisify = Symbol.for('nodejs.util.promisify.custom')\n\n// pull the old __promisify__ out of node's declared namespaces\ntype CP<T extends { __promisify__: any }> = T & {\n [promisify]: T['__promisify__']\n}\ntype OldCP = { __promisify__: (...a: any) => any }\nconst customPromisify = <T extends OldCP>(e: T) =>\n // the node types list it as __promisify__ but it's actually the symbol\n /* c8 ignore start */\n (e as CP<T>)[promisify] || e.__promisify__\n/* c8 ignore stop */\n\nconst k = '_TAPJS_PROCESSINFO_EXCLUDE_'\n\n// coercion function when we know it's an array or something else\nconst isNotArray = <T extends { [k: string]: any }>(o: any): o is T =>\n !!o && typeof o === 'object' && !Array.isArray(o)\n\nexport function spawn(\n command: string,\n options?: WithExternalID<SpawnOptionsWithoutStdio>\n): ChildProcessWithoutNullStreams\nexport function spawn(\n command: string,\n options: WithExternalID<\n SpawnOptionsWithStdioTuple<StdioPipe, StdioPipe, StdioPipe>\n >\n): ChildProcessByStdio<Writable, Readable, Readable>\nexport function spawn(\n command: string,\n options: WithExternalID<\n SpawnOptionsWithStdioTuple<StdioPipe, StdioPipe, StdioNull>\n >\n): ChildProcessByStdio<Writable, Readable, null>\nexport function spawn(\n command: string,\n options: WithExternalID<\n SpawnOptionsWithStdioTuple<StdioPipe, StdioNull, StdioPipe>\n >\n): ChildProcessByStdio<Writable, null, Readable>\nexport function spawn(\n command: string,\n options: WithExternalID<\n SpawnOptionsWithStdioTuple<StdioNull, StdioPipe, StdioPipe>\n >\n): ChildProcessByStdio<null, Readable, Readable>\nexport function spawn(\n command: string,\n options: WithExternalID<\n SpawnOptionsWithStdioTuple<StdioPipe, StdioNull, StdioNull>\n >\n): ChildProcessByStdio<Writable, null, null>\nexport function spawn(\n command: string,\n options: WithExternalID<\n SpawnOptionsWithStdioTuple<StdioNull, StdioPipe, StdioNull>\n >\n): ChildProcessByStdio<null, Readable, null>\nexport function spawn(\n command: string,\n options: WithExternalID<\n SpawnOptionsWithStdioTuple<StdioNull, StdioNull, StdioPipe>\n >\n): ChildProcessByStdio<null, null, Readable>\nexport function spawn(\n command: string,\n options: WithExternalID<\n SpawnOptionsWithStdioTuple<StdioNull, StdioNull, StdioNull>\n >\n): ChildProcessByStdio<null, null, null>\nexport function spawn(\n command: string,\n options: WithExternalID<SpawnOptions>\n): ChildProcess\nexport function spawn(\n command: string,\n args?: ReadonlyArray<string>,\n options?: SpawnOptionsWithoutStdio\n): ChildProcessWithoutNullStreams\nexport function spawn(\n command: string,\n args: ReadonlyArray<string>,\n options: SpawnOptionsWithStdioTuple<StdioPipe, StdioPipe, StdioPipe>\n): ChildProcessByStdio<Writable, Readable, Readable>\nexport function spawn(\n command: string,\n args: ReadonlyArray<string>,\n options: SpawnOptionsWithStdioTuple<StdioPipe, StdioPipe, StdioNull>\n): ChildProcessByStdio<Writable, Readable, null>\nexport function spawn(\n command: string,\n args: ReadonlyArray<string>,\n options: SpawnOptionsWithStdioTuple<StdioPipe, StdioNull, StdioPipe>\n): ChildProcessByStdio<Writable, null, Readable>\nexport function spawn(\n command: string,\n args: ReadonlyArray<string>,\n options: SpawnOptionsWithStdioTuple<StdioNull, StdioPipe, StdioPipe>\n): ChildProcessByStdio<null, Readable, Readable>\nexport function spawn(\n command: string,\n args: ReadonlyArray<string>,\n options: SpawnOptionsWithStdioTuple<StdioPipe, StdioNull, StdioNull>\n): ChildProcessByStdio<Writable, null, null>\nexport function spawn(\n command: string,\n args: ReadonlyArray<string>,\n options: SpawnOptionsWithStdioTuple<StdioNull, StdioPipe, StdioNull>\n): ChildProcessByStdio<null, Readable, null>\nexport function spawn(\n command: string,\n args: ReadonlyArray<string>,\n options: SpawnOptionsWithStdioTuple<StdioNull, StdioNull, StdioPipe>\n): ChildProcessByStdio<null, null, Readable>\nexport function spawn(\n command: string,\n args: ReadonlyArray<string>,\n options: SpawnOptionsWithStdioTuple<StdioNull, StdioNull, StdioNull>\n): ChildProcessByStdio<null, null, null>\nexport function spawn(\n command: string,\n args: ReadonlyArray<string>,\n options: SpawnOptions\n): ChildProcess\n\nexport function spawn(\n cmd: string,\n args?:\n | ReadonlyArray<string>\n | WithExternalID<SpawnOptions>\n | WithExternalID<SpawnOptionsWithoutStdio>\n | WithExternalID<\n SpawnOptionsWithStdioTuple<\n StdioNull | StdioPipe,\n StdioNull | StdioPipe,\n StdioNull | StdioPipe\n >\n >,\n options?:\n | WithExternalID<SpawnOptions>\n | WithExternalID<SpawnOptionsWithoutStdio>\n | WithExternalID<\n SpawnOptionsWithStdioTuple<\n StdioNull | StdioPipe,\n StdioNull | StdioPipe,\n StdioNull | StdioPipe\n >\n >\n): ChildProcess | ChildProcessWithoutNullStreams {\n if (isNotArray<SpawnOptions>(args)) {\n options = args\n args = []\n }\n return cpSpawn(cmd, args || [], spawnOpts(options || {}, getExclude(k), args))\n}\n\nexport function spawnSync(command: string): SpawnSyncReturns<Buffer>\nexport function spawnSync(\n command: string,\n options: WithExternalID<SpawnSyncOptionsWithStringEncoding>\n): SpawnSyncReturns<string>\nexport function spawnSync(\n command: string,\n options: WithExternalID<SpawnSyncOptionsWithBufferEncoding>\n): SpawnSyncReturns<Buffer>\nexport function spawnSync(\n command: string,\n options?: WithExternalID<SpawnSyncOptions>\n): SpawnSyncReturns<string | Buffer>\nexport function spawnSync(\n command: string,\n args: ReadonlyArray<string>\n): SpawnSyncReturns<Buffer>\nexport function spawnSync(\n command: string,\n args: ReadonlyArray<string>,\n options: WithExternalID<SpawnSyncOptionsWithStringEncoding>\n): SpawnSyncReturns<string>\nexport function spawnSync(\n command: string,\n args: ReadonlyArray<string>,\n options: WithExternalID<SpawnSyncOptionsWithBufferEncoding>\n): SpawnSyncReturns<Buffer>\nexport function spawnSync(\n command: string,\n args?: ReadonlyArray<string>,\n options?: WithExternalID<SpawnSyncOptions>\n): SpawnSyncReturns<string | Buffer>\n\nexport function spawnSync(\n cmd: string,\n args?:\n | WithExternalID<SpawnSyncOptionsWithStringEncoding>\n | WithExternalID<SpawnSyncOptionsWithBufferEncoding>\n | WithExternalID<SpawnSyncOptions>\n | ReadonlyArray<string>,\n options?:\n | WithExternalID<SpawnSyncOptionsWithStringEncoding>\n | WithExternalID<SpawnSyncOptionsWithBufferEncoding>\n | WithExternalID<SpawnSyncOptions>\n) {\n if (isNotArray<SpawnSyncOptions>(args)) {\n options = args\n args = []\n }\n return cpSpawnSync(\n cmd,\n args || [],\n spawnOpts(options || {}, getExclude(k), args)\n )\n}\n\nexport type ExecArgs =\n | [\n command: string,\n callback?: (\n error: ExecException | null,\n stdout: string,\n stderr: string\n ) => void\n ]\n | [\n command: string,\n options: WithExternalID<\n {\n encoding: 'buffer' | null\n } & ExecOptions\n >,\n callback?: (\n error: ExecException | null,\n stdout: Buffer,\n stderr: Buffer\n ) => void\n ]\n | [\n command: string,\n options: WithExternalID<\n {\n encoding: BufferEncoding\n } & ExecOptions\n >,\n callback?: (\n error: ExecException | null,\n stdout: string,\n stderr: string\n ) => void\n ]\n | [\n command: string,\n options: WithExternalID<\n {\n encoding: BufferEncoding\n } & ExecOptions\n >,\n callback?: (\n error: ExecException | null,\n stdout: string | Buffer,\n stderr: string | Buffer\n ) => void\n ]\n | [\n command: string,\n options: WithExternalID<ExecOptions>,\n callback?: (\n error: ExecException | null,\n stdout: string,\n stderr: string\n ) => void\n ]\n | [\n command: string,\n options:\n | WithExternalID<ObjectEncodingOptions & ExecOptions>\n | undefined\n | null,\n callback?: (\n error: ExecException | null,\n stdout: string | Buffer,\n stderr: string | Buffer\n ) => void\n ]\nexport function exec(...args: ExecArgs): ChildProcess {\n const [cmd, options, callback] = args\n if (typeof options === 'function') {\n return cpExec(cmd, spawnOpts<ExecOptions>({}, getExclude(k), []), options)\n } else if (!options) {\n return cpExec(\n cmd,\n spawnOpts<ExecOptions>({}, getExclude(k), []),\n callback as (\n error: ExecException | null,\n stdout: string | Buffer,\n stderr: string | Buffer\n ) => void\n )\n }\n\n return cpExec(\n cmd,\n spawnOpts(options, getExclude(k), []),\n callback as (\n error: ExecException | null,\n stdout: string | Buffer,\n stderr: string | Buffer\n ) => void\n )\n}\n\nexport namespace exec {\n export function __promisify__(command: string): PromiseWithChild<{\n stdout: string\n stderr: string\n }>\n export function __promisify__(\n command: string,\n options: WithExternalID<\n {\n encoding: 'buffer' | null\n } & ExecOptions\n >\n ): PromiseWithChild<{\n stdout: Buffer\n stderr: Buffer\n }>\n export function __promisify__(\n command: string,\n options: WithExternalID<\n {\n encoding: BufferEncoding\n } & ExecOptions\n >\n ): PromiseWithChild<{\n stdout: string\n stderr: string\n }>\n export function __promisify__(\n command: string,\n options: WithExternalID<ExecOptions>\n ): PromiseWithChild<{\n stdout: string\n stderr: string\n }>\n export function __promisify__(\n command: string,\n options?: WithExternalID<ObjectEncodingOptions & ExecOptions> | null\n ): PromiseWithChild<{\n stdout: string | Buffer\n stderr: string | Buffer\n }>\n export function __promisify__(\n command: string,\n options?:\n | WithExternalID<\n {\n encoding: 'buffer' | null\n } & ExecOptions\n >\n | WithExternalID<\n {\n encoding: BufferEncoding\n } & ExecOptions\n >\n | WithExternalID<ExecOptions>\n | WithExternalID<ObjectEncodingOptions & ExecOptions>\n | null\n ): PromiseWithChild<{\n stdout: string | Buffer\n stderr: string | Buffer\n }> {\n return customPromisify(cpExec)(\n command,\n spawnOpts(options || {}, getExclude(k))\n )\n }\n\n Object.assign(exec, { [promisify]: __promisify__ })\n /* c8 ignore start */\n}\n/* c8 ignore stop */\n\nexport function execSync(command: string): Buffer\nexport function execSync(\n command: string,\n options: WithExternalID<ExecSyncOptionsWithStringEncoding>\n): string\nexport function execSync(\n command: string,\n options: WithExternalID<ExecSyncOptionsWithBufferEncoding>\n): Buffer\nexport function execSync(\n command: string,\n options?: WithExternalID<ExecSyncOptions>\n): string | Buffer\nexport function execSync(\n cmd: string,\n options?:\n | WithExternalID<ExecSyncOptions>\n | WithExternalID<ExecSyncOptionsWithBufferEncoding>\n | WithExternalID<ExecSyncOptionsWithStringEncoding>\n | WithExternalID<ExecSyncOptionsWithBufferEncoding>\n): string | Buffer {\n return cpExecSync(\n cmd,\n spawnOpts<ExecSyncOptions>(options || {}, getExclude(k))\n )\n}\n\nexport type ExecFileArgs =\n | []\n | [\n options:\n | WithExternalID<ObjectEncodingOptions & ExecFileOptions>\n | undefined\n | null\n ]\n | [args?: ReadonlyArray<string> | null]\n | [\n args: ReadonlyArray<string> | undefined | null,\n options:\n | WithExternalID<ObjectEncodingOptions & ExecFileOptions>\n | undefined\n | null\n ]\n | [\n callback: (\n error: ExecFileException | null,\n stdout: string,\n stderr: string\n ) => void\n ]\n | [\n args: ReadonlyArray<string> | undefined | null,\n callback: (\n error: ExecFileException | null,\n stdout: string,\n stderr: string\n ) => void\n ]\n | [\n options: WithExternalID<ExecFileOptionsWithBufferEncoding>,\n callback: (\n error: ExecFileException | null,\n stdout: Buffer,\n stderr: Buffer\n ) => void\n ]\n | [\n args: ReadonlyArray<string> | undefined | null,\n options: WithExternalID<ExecFileOptionsWithBufferEncoding>,\n callback: (\n error: ExecFileException | null,\n stdout: Buffer,\n stderr: Buffer\n ) => void\n ]\n | [\n options: WithExternalID<ExecFileOptionsWithStringEncoding>,\n callback: (\n error: ExecFileException | null,\n stdout: string,\n stderr: string\n ) => void\n ]\n | [\n args: ReadonlyArray<string> | undefined | null,\n options: WithExternalID<ExecFileOptionsWithStringEncoding>,\n callback: (\n error: ExecFileException | null,\n stdout: string,\n stderr: string\n ) => void\n ]\n | [\n options: WithExternalID<ExecFileOptionsWithOtherEncoding>,\n callback: (\n error: ExecFileException | null,\n stdout: string | Buffer,\n stderr: string | Buffer\n ) => void\n ]\n | [\n args: ReadonlyArray<string> | undefined | null,\n options: WithExternalID<ExecFileOptionsWithOtherEncoding>,\n callback: (\n error: ExecFileException | null,\n stdout: string | Buffer,\n stderr: string | Buffer\n ) => void\n ]\n | [\n options: WithExternalID<ExecFileOptions>,\n callback: (\n error: ExecFileException | null,\n stdout: string,\n stderr: string\n ) => void\n ]\n | [\n args: ReadonlyArray<string> | undefined | null,\n options: WithExternalID<ExecFileOptions>,\n callback: (\n error: ExecFileException | null,\n stdout: string,\n stderr: string\n ) => void\n ]\n | [\n options:\n | WithExternalID<ObjectEncodingOptions & ExecFileOptions>\n | undefined\n | null,\n callback:\n | ((\n error: ExecFileException | null,\n stdout: string | Buffer,\n stderr: string | Buffer\n ) => void)\n | undefined\n | null\n ]\n | [\n args: ReadonlyArray<string> | undefined | null,\n options:\n | WithExternalID<ObjectEncodingOptions & ExecFileOptions>\n | undefined\n | null,\n callback:\n | ((\n error: ExecFileException | null,\n stdout: string | Buffer,\n stderr: string | Buffer\n ) => void)\n | undefined\n | null\n ]\nexport function execFile(\n file: string,\n ...execFileArgs: ExecFileArgs\n): ChildProcess {\n let args = []\n let options: WithExternalID<ObjectEncodingOptions & ExecFileOptions> = {}\n let callback: ((...a: any) => any) | undefined = undefined\n for (const arg of execFileArgs) {\n if (Array.isArray(arg)) {\n args = arg\n } else if (\n arg &&\n typeof arg === 'object' &&\n isNotArray<WithExternalID<ObjectEncodingOptions & ExecFileOptions>>(\n arg\n )\n ) {\n options = arg\n } else if (typeof arg === 'function') {\n callback = arg\n }\n }\n return cpExecFile(\n file,\n args,\n spawnOpts(options, getExclude(k), args),\n callback\n )\n}\n\nexport namespace execFile {\n export function __promisify__(file: string): PromiseWithChild<{\n stdout: string\n stderr: string\n }>\n export function __promisify__(\n file: string,\n args: ReadonlyArray<string> | undefined | null\n ): PromiseWithChild<{\n stdout: string\n stderr: string\n }>\n export function __promisify__(\n file: string,\n options: WithExternalID<ExecFileOptionsWithBufferEncoding>\n ): PromiseWithChild<{\n stdout: Buffer\n stderr: Buffer\n }>\n export function __promisify__(\n file: string,\n args: ReadonlyArray<string> | undefined | null,\n options: WithExternalID<ExecFileOptionsWithBufferEncoding>\n ): PromiseWithChild<{\n stdout: Buffer\n stderr: Buffer\n }>\n export function __promisify__(\n file: string,\n options: WithExternalID<ExecFileOptionsWithStringEncoding>\n ): PromiseWithChild<{\n stdout: string\n stderr: string\n }>\n export function __promisify__(\n file: string,\n args: ReadonlyArray<string> | undefined | null,\n options: WithExternalID<ExecFileOptionsWithStringEncoding>\n ): PromiseWithChild<{\n stdout: string\n stderr: string\n }>\n export function __promisify__(\n file: string,\n options: WithExternalID<ExecFileOptionsWithOtherEncoding>\n ): PromiseWithChild<{\n stdout: string | Buffer\n stderr: string | Buffer\n }>\n export function __promisify__(\n file: string,\n args: ReadonlyArray<string> | undefined | null,\n options: WithExternalID<ExecFileOptionsWithOtherEncoding>\n ): PromiseWithChild<{\n stdout: string | Buffer\n stderr: string | Buffer\n }>\n export function __promisify__(\n file: string,\n options: WithExternalID<ExecFileOptions>\n ): PromiseWithChild<{\n stdout: string\n stderr: string\n }>\n export function __promisify__(\n file: string,\n args: ReadonlyArray<string> | undefined | null,\n options: WithExternalID<ExecFileOptions>\n ): PromiseWithChild<{\n stdout: string\n stderr: string\n }>\n export function __promisify__(\n file: string,\n options:\n | WithExternalID<ObjectEncodingOptions & ExecFileOptions>\n | undefined\n | null\n ): PromiseWithChild<{\n stdout: string | Buffer\n stderr: string | Buffer\n }>\n export function __promisify__(\n file: string,\n args: ReadonlyArray<string> | undefined | null,\n options:\n | WithExternalID<ObjectEncodingOptions & ExecFileOptions>\n | undefined\n | null\n ): PromiseWithChild<{\n stdout: string | Buffer\n stderr: string | Buffer\n }>\n export function __promisify__(\n file: string,\n args?:\n | ReadonlyArray<string>\n | undefined\n | null\n | WithExternalID<ExecFileOptionsWithBufferEncoding>\n | WithExternalID<ExecFileOptionsWithStringEncoding>\n | WithExternalID<ExecFileOptionsWithOtherEncoding>\n | WithExternalID<ExecFileOptions>\n | WithExternalID<ObjectEncodingOptions & ExecFileOptions>\n | WithExternalID<ObjectEncodingOptions & ExecFileOptions>,\n options?:\n | undefined\n | null\n | WithExternalID<ExecFileOptionsWithBufferEncoding>\n | WithExternalID<ExecFileOptionsWithStringEncoding>\n | WithExternalID<ExecFileOptionsWithOtherEncoding>\n | WithExternalID<ExecFileOptions>\n | WithExternalID<ObjectEncodingOptions & ExecFileOptions>\n | WithExternalID<ObjectEncodingOptions & ExecFileOptions>\n ): PromiseWithChild<{\n stdout: string | Buffer\n stderr: string | Buffer\n }> {\n if (\n !!args &&\n typeof args === 'object' &&\n isNotArray<\n | WithExternalID<ExecFileOptionsWithBufferEncoding>\n | WithExternalID<ExecFileOptionsWithStringEncoding>\n | WithExternalID<ExecFileOptionsWithOtherEncoding>\n | WithExternalID<ExecFileOptions>\n | WithExternalID<ObjectEncodingOptions & ExecFileOptions>\n | WithExternalID<ObjectEncodingOptions & ExecFileOptions>\n >(args)\n ) {\n options = args\n args = []\n }\n return customPromisify(cpExecFile)(\n file,\n spawnOpts(options || {}, getExclude(k), args as readonly string[])\n )\n }\n Object.assign(execFile, { [promisify]: __promisify__ })\n /* c8 ignore start */\n}\n/* c8 ignore stop */\n\nexport function execFileSync(file: string): Buffer\nexport function execFileSync(\n file: string,\n options: WithExternalID<ExecFileSyncOptionsWithStringEncoding>\n): string\nexport function execFileSync(\n file: string,\n options: WithExternalID<ExecFileSyncOptionsWithBufferEncoding>\n): Buffer\nexport function execFileSync(\n file: string,\n options?: WithExternalID<ExecFileSyncOptions>\n): string | Buffer\nexport function execFileSync(\n file: string,\n args: ReadonlyArray<string>\n): Buffer\nexport function execFileSync(\n file: string,\n args: ReadonlyArray<string>,\n options: WithExternalID<ExecFileSyncOptionsWithStringEncoding>\n): string\nexport function execFileSync(\n file: string,\n args: ReadonlyArray<string>,\n options: WithExternalID<ExecFileSyncOptionsWithBufferEncoding>\n): Buffer\nexport function execFileSync(\n file: string,\n args?: ReadonlyArray<string>,\n options?: WithExternalID<ExecFileSyncOptions>\n): string | Buffer\nexport function execFileSync(\n file: string,\n args?:\n | ReadonlyArray<string>\n | WithExternalID<ExecFileSyncOptions>\n | WithExternalID<ExecFileSyncOptionsWithStringEncoding>\n | WithExternalID<ExecFileSyncOptionsWithBufferEncoding>,\n options?:\n | WithExternalID<ExecFileSyncOptions>\n | WithExternalID<ExecFileSyncOptionsWithStringEncoding>\n | WithExternalID<ExecFileSyncOptionsWithBufferEncoding>\n): string | Buffer {\n if (\n args &&\n typeof args === 'object' &&\n isNotArray<\n | WithExternalID<ExecFileSyncOptions>\n | WithExternalID<ExecFileSyncOptionsWithStringEncoding>\n | WithExternalID<ExecFileSyncOptionsWithBufferEncoding>\n >(args)\n ) {\n options = args\n args = []\n }\n return cpExecFileSync(\n file,\n args || [],\n spawnOpts(options || {}, getExclude(k), args)\n )\n}\n\nexport function fork(\n modulePath: string,\n options?: ForkOptions\n): ChildProcess\nexport function fork(\n modulePath: string,\n args?: ReadonlyArray<string>,\n options?: WithExternalID<ForkOptions>\n): ChildProcess\nexport function fork(\n modulePath: string,\n args?: ForkOptions | ReadonlyArray<string>,\n options?: WithExternalID<ForkOptions>\n): ChildProcess {\n if (isNotArray<ForkOptions>(args)) {\n options = args\n args = []\n }\n return cpFork(modulePath, args, spawnOpts(options || {}, getExclude(k), args))\n}\n"]}
|
|
1
|
+
{"version":3,"file":"child_process.js","sourceRoot":"","sources":["../../src/child_process.ts"],"names":[],"mappings":"AAAA,0EAA0E;AAC1E,iEAAiE;AACjE,OAAO,EAIL,IAAI,IAAI,MAAM,EAEd,QAAQ,IAAI,UAAU,EAMtB,YAAY,IAAI,cAAc,EAK9B,QAAQ,IAAI,UAAU,EAItB,IAAI,IAAI,MAAM,EAGd,KAAK,IAAI,OAAO,EAIhB,SAAS,IAAI,WAAW,GAOzB,MAAM,eAAe,CAAA;AAGtB,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAA;AAC7C,OAAO,EAAE,SAAS,EAAkB,MAAM,iBAAiB,CAAA;AAE3D,MAAM,SAAS,GAAG,MAAM,CAAC,GAAG,CAAC,8BAA8B,CAAC,CAAA;AAO5D,MAAM,eAAe,GAAG,CAAkB,CAAI,EAAE,EAAE;AAChD,uEAAuE;AACvE,qBAAqB;AACpB,CAAW,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC,aAAa,CAAA;AAC5C,oBAAoB;AAEpB,MAAM,CAAC,GAAG,6BAA6B,CAAA;AAEvC,iEAAiE;AACjE,MAAM,UAAU,GAAG,CAAiC,CAAM,EAAU,EAAE,CACpE,CAAC,CAAC,CAAC,IAAI,OAAO,CAAC,KAAK,QAAQ,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,CAAA;AA6GnD,MAAM,UAAU,KAAK,CACnB,GAAW,EACX,IAUK,EACL,OASK;IAEL,IAAI,UAAU,CAAe,IAAI,CAAC,EAAE;QAClC,OAAO,GAAG,IAAI,CAAA;QACd,IAAI,GAAG,EAAE,CAAA;KACV;IACD,OAAO,OAAO,CACZ,GAAG,EACH,IAAI,IAAI,EAAE,EACV,SAAS,CAAC,OAAO,IAAI,EAAE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,CAAC,CAChC,IAAI,EACJ,SAAS,CAAC,OAAO,IAAI,EAAE,EAAE,UAAU,CAAC,CAAC,CAAC,EAAE,IAAyB,CAAC,CACnE,CAAA;IACH,CAAC;IA5Ce,sBAAa,gBA4C5B,CAAA;IACD,MAAM,CAAC,MAAM,CAAC,QAAQ,EAAE,EAAE,CAAC,SAAS,CAAC,EAAE,aAAa,EAAE,CAAC,CAAA;IACvD,qBAAqB;AACvB,CAAC,EA5IgB,QAAQ,KAAR,QAAQ,QA4IxB;AAmCD,MAAM,UAAU,YAAY,CAC1B,IAAY,EACZ,IAIyD,EACzD,OAGyD;IAEzD,IACE,IAAI;QACJ,OAAO,IAAI,KAAK,QAAQ;QACxB,UAAU,CAIR,IAAI,CAAC,EACP;QACA,OAAO,GAAG,IAAI,CAAA;QACd,IAAI,GAAG,EAAE,CAAA;KACV;IACD,OAAO,cAAc,CACnB,IAAI,EACJ,IAAI,IAAI,EAAE,EACV,SAAS,CAAC,OAAO,IAAI,EAAE,EAAE,UAAU,CAAC,CAAC,CAAC,EAAE,IAAI,CAAC,CAC9C,CAAA;AACH,CAAC;AAWD,MAAM,UAAU,IAAI,CAClB,UAAkB,EAClB,IAA0C,EAC1C,OAAqC;IAErC,IAAI,UAAU,CAAc,IAAI,CAAC,EAAE;QACjC,OAAO,GAAG,IAAI,CAAA;QACd,IAAI,GAAG,EAAE,CAAA;KACV;IACD,OAAO,MAAM,CACX,UAAU,EACV,IAAI,EACJ,SAAS,CAAC,OAAO,IAAI,EAAE,EAAE,UAAU,CAAC,CAAC,CAAC,EAAE,IAAI,CAAC,CAC9C,CAAA;AACH,CAAC","sourcesContent":["// This wraps all of the various spawn methods such that externalID can be\n// set in the options, and ensuring that the proper envs get set.\nimport {\n ChildProcess,\n ChildProcessByStdio,\n ChildProcessWithoutNullStreams,\n exec as cpExec,\n ExecException,\n execFile as cpExecFile,\n ExecFileException,\n ExecFileOptions,\n ExecFileOptionsWithBufferEncoding,\n ExecFileOptionsWithOtherEncoding,\n ExecFileOptionsWithStringEncoding,\n execFileSync as cpExecFileSync,\n ExecFileSyncOptions,\n ExecFileSyncOptionsWithBufferEncoding,\n ExecFileSyncOptionsWithStringEncoding,\n ExecOptions,\n execSync as cpExecSync,\n ExecSyncOptions,\n ExecSyncOptionsWithBufferEncoding,\n ExecSyncOptionsWithStringEncoding,\n fork as cpFork,\n ForkOptions,\n PromiseWithChild,\n spawn as cpSpawn,\n SpawnOptions,\n SpawnOptionsWithoutStdio,\n SpawnOptionsWithStdioTuple,\n spawnSync as cpSpawnSync,\n SpawnSyncOptions,\n SpawnSyncOptionsWithBufferEncoding,\n SpawnSyncOptionsWithStringEncoding,\n SpawnSyncReturns,\n StdioNull,\n StdioPipe,\n} from 'child_process'\nimport type { ObjectEncodingOptions } from 'fs'\nimport type { Readable, Writable } from 'stream'\nimport { getExclude } from './get-exclude.js'\nimport { spawnOpts, WithExternalID } from './spawn-opts.js'\n\nconst promisify = Symbol.for('nodejs.util.promisify.custom')\n\n// pull the old __promisify__ out of node's declared namespaces\ntype CP<T extends { __promisify__: any }> = T & {\n [promisify]: T['__promisify__']\n}\ntype OldCP = { __promisify__: (...a: any) => any }\nconst customPromisify = <T extends OldCP>(e: T) =>\n // the node types list it as __promisify__ but it's actually the symbol\n /* c8 ignore start */\n (e as CP<T>)[promisify] || e.__promisify__\n/* c8 ignore stop */\n\nconst k = '_TAPJS_PROCESSINFO_EXCLUDE_'\n\n// coercion function when we know it's an array or something else\nconst isNotArray = <T extends { [k: string]: any }>(o: any): o is T =>\n !!o && typeof o === 'object' && !Array.isArray(o)\n\nexport function spawn(\n command: string,\n options?: WithExternalID<SpawnOptionsWithoutStdio>,\n): ChildProcessWithoutNullStreams\nexport function spawn(\n command: string,\n options: WithExternalID<\n SpawnOptionsWithStdioTuple<StdioPipe, StdioPipe, StdioPipe>\n >,\n): ChildProcessByStdio<Writable, Readable, Readable>\nexport function spawn(\n command: string,\n options: WithExternalID<\n SpawnOptionsWithStdioTuple<StdioPipe, StdioPipe, StdioNull>\n >,\n): ChildProcessByStdio<Writable, Readable, null>\nexport function spawn(\n command: string,\n options: WithExternalID<\n SpawnOptionsWithStdioTuple<StdioPipe, StdioNull, StdioPipe>\n >,\n): ChildProcessByStdio<Writable, null, Readable>\nexport function spawn(\n command: string,\n options: WithExternalID<\n SpawnOptionsWithStdioTuple<StdioNull, StdioPipe, StdioPipe>\n >,\n): ChildProcessByStdio<null, Readable, Readable>\nexport function spawn(\n command: string,\n options: WithExternalID<\n SpawnOptionsWithStdioTuple<StdioPipe, StdioNull, StdioNull>\n >,\n): ChildProcessByStdio<Writable, null, null>\nexport function spawn(\n command: string,\n options: WithExternalID<\n SpawnOptionsWithStdioTuple<StdioNull, StdioPipe, StdioNull>\n >,\n): ChildProcessByStdio<null, Readable, null>\nexport function spawn(\n command: string,\n options: WithExternalID<\n SpawnOptionsWithStdioTuple<StdioNull, StdioNull, StdioPipe>\n >,\n): ChildProcessByStdio<null, null, Readable>\nexport function spawn(\n command: string,\n options: WithExternalID<\n SpawnOptionsWithStdioTuple<StdioNull, StdioNull, StdioNull>\n >,\n): ChildProcessByStdio<null, null, null>\nexport function spawn(\n command: string,\n options: WithExternalID<SpawnOptions>,\n): ChildProcess\nexport function spawn(\n command: string,\n args?: ReadonlyArray<string>,\n options?: SpawnOptionsWithoutStdio,\n): ChildProcessWithoutNullStreams\nexport function spawn(\n command: string,\n args: ReadonlyArray<string>,\n options: SpawnOptionsWithStdioTuple<StdioPipe, StdioPipe, StdioPipe>,\n): ChildProcessByStdio<Writable, Readable, Readable>\nexport function spawn(\n command: string,\n args: ReadonlyArray<string>,\n options: SpawnOptionsWithStdioTuple<StdioPipe, StdioPipe, StdioNull>,\n): ChildProcessByStdio<Writable, Readable, null>\nexport function spawn(\n command: string,\n args: ReadonlyArray<string>,\n options: SpawnOptionsWithStdioTuple<StdioPipe, StdioNull, StdioPipe>,\n): ChildProcessByStdio<Writable, null, Readable>\nexport function spawn(\n command: string,\n args: ReadonlyArray<string>,\n options: SpawnOptionsWithStdioTuple<StdioNull, StdioPipe, StdioPipe>,\n): ChildProcessByStdio<null, Readable, Readable>\nexport function spawn(\n command: string,\n args: ReadonlyArray<string>,\n options: SpawnOptionsWithStdioTuple<StdioPipe, StdioNull, StdioNull>,\n): ChildProcessByStdio<Writable, null, null>\nexport function spawn(\n command: string,\n args: ReadonlyArray<string>,\n options: SpawnOptionsWithStdioTuple<StdioNull, StdioPipe, StdioNull>,\n): ChildProcessByStdio<null, Readable, null>\nexport function spawn(\n command: string,\n args: ReadonlyArray<string>,\n options: SpawnOptionsWithStdioTuple<StdioNull, StdioNull, StdioPipe>,\n): ChildProcessByStdio<null, null, Readable>\nexport function spawn(\n command: string,\n args: ReadonlyArray<string>,\n options: SpawnOptionsWithStdioTuple<StdioNull, StdioNull, StdioNull>,\n): ChildProcessByStdio<null, null, null>\nexport function spawn(\n command: string,\n args: ReadonlyArray<string>,\n options: SpawnOptions,\n): ChildProcess\n\nexport function spawn(\n cmd: string,\n args?:\n | ReadonlyArray<string>\n | WithExternalID<SpawnOptions>\n | WithExternalID<SpawnOptionsWithoutStdio>\n | WithExternalID<\n SpawnOptionsWithStdioTuple<\n StdioNull | StdioPipe,\n StdioNull | StdioPipe,\n StdioNull | StdioPipe\n >\n >,\n options?:\n | WithExternalID<SpawnOptions>\n | WithExternalID<SpawnOptionsWithoutStdio>\n | WithExternalID<\n SpawnOptionsWithStdioTuple<\n StdioNull | StdioPipe,\n StdioNull | StdioPipe,\n StdioNull | StdioPipe\n >\n >,\n): ChildProcess | ChildProcessWithoutNullStreams {\n if (isNotArray<SpawnOptions>(args)) {\n options = args\n args = []\n }\n return cpSpawn(\n cmd,\n args || [],\n spawnOpts(options || {}, getExclude(k), args),\n )\n}\n\nexport function spawnSync(command: string): SpawnSyncReturns<Buffer>\nexport function spawnSync(\n command: string,\n options: WithExternalID<SpawnSyncOptionsWithStringEncoding>,\n): SpawnSyncReturns<string>\nexport function spawnSync(\n command: string,\n options: WithExternalID<SpawnSyncOptionsWithBufferEncoding>,\n): SpawnSyncReturns<Buffer>\nexport function spawnSync(\n command: string,\n options?: WithExternalID<SpawnSyncOptions>,\n): SpawnSyncReturns<string | Buffer>\nexport function spawnSync(\n command: string,\n args: ReadonlyArray<string>,\n): SpawnSyncReturns<Buffer>\nexport function spawnSync(\n command: string,\n args: ReadonlyArray<string>,\n options: WithExternalID<SpawnSyncOptionsWithStringEncoding>,\n): SpawnSyncReturns<string>\nexport function spawnSync(\n command: string,\n args: ReadonlyArray<string>,\n options: WithExternalID<SpawnSyncOptionsWithBufferEncoding>,\n): SpawnSyncReturns<Buffer>\nexport function spawnSync(\n command: string,\n args?: ReadonlyArray<string>,\n options?: WithExternalID<SpawnSyncOptions>,\n): SpawnSyncReturns<string | Buffer>\n\nexport function spawnSync(\n cmd: string,\n args?:\n | WithExternalID<SpawnSyncOptionsWithStringEncoding>\n | WithExternalID<SpawnSyncOptionsWithBufferEncoding>\n | WithExternalID<SpawnSyncOptions>\n | ReadonlyArray<string>,\n options?:\n | WithExternalID<SpawnSyncOptionsWithStringEncoding>\n | WithExternalID<SpawnSyncOptionsWithBufferEncoding>\n | WithExternalID<SpawnSyncOptions>,\n) {\n if (isNotArray<SpawnSyncOptions>(args)) {\n options = args\n args = []\n }\n return cpSpawnSync(\n cmd,\n args || [],\n spawnOpts(options || {}, getExclude(k), args),\n )\n}\n\nexport type ExecArgs =\n | [\n command: string,\n callback?: (\n error: ExecException | null,\n stdout: string,\n stderr: string,\n ) => void,\n ]\n | [\n command: string,\n options: WithExternalID<\n {\n encoding: 'buffer' | null\n } & ExecOptions\n >,\n callback?: (\n error: ExecException | null,\n stdout: Buffer,\n stderr: Buffer,\n ) => void,\n ]\n | [\n command: string,\n options: WithExternalID<\n {\n encoding: BufferEncoding\n } & ExecOptions\n >,\n callback?: (\n error: ExecException | null,\n stdout: string,\n stderr: string,\n ) => void,\n ]\n | [\n command: string,\n options: WithExternalID<\n {\n encoding: BufferEncoding\n } & ExecOptions\n >,\n callback?: (\n error: ExecException | null,\n stdout: string | Buffer,\n stderr: string | Buffer,\n ) => void,\n ]\n | [\n command: string,\n options: WithExternalID<ExecOptions>,\n callback?: (\n error: ExecException | null,\n stdout: string,\n stderr: string,\n ) => void,\n ]\n | [\n command: string,\n options:\n | WithExternalID<ObjectEncodingOptions & ExecOptions>\n | undefined\n | null,\n callback?: (\n error: ExecException | null,\n stdout: string | Buffer,\n stderr: string | Buffer,\n ) => void,\n ]\nexport function exec(...args: ExecArgs): ChildProcess {\n const [cmd, options, callback] = args\n if (typeof options === 'function') {\n return cpExec(\n cmd,\n spawnOpts<ExecOptions>({}, getExclude(k), []),\n options,\n )\n } else if (!options) {\n return cpExec(\n cmd,\n spawnOpts<ExecOptions>({}, getExclude(k), []),\n callback as (\n error: ExecException | null,\n stdout: string | Buffer,\n stderr: string | Buffer,\n ) => void,\n )\n }\n\n return cpExec(\n cmd,\n spawnOpts(options, getExclude(k), []),\n callback as (\n error: ExecException | null,\n stdout: string | Buffer,\n stderr: string | Buffer,\n ) => void,\n )\n}\n\nexport namespace exec {\n export function __promisify__(command: string): PromiseWithChild<{\n stdout: string\n stderr: string\n }>\n export function __promisify__(\n command: string,\n options: WithExternalID<\n {\n encoding: 'buffer' | null\n } & ExecOptions\n >,\n ): PromiseWithChild<{\n stdout: Buffer\n stderr: Buffer\n }>\n export function __promisify__(\n command: string,\n options: WithExternalID<\n {\n encoding: BufferEncoding\n } & ExecOptions\n >,\n ): PromiseWithChild<{\n stdout: string\n stderr: string\n }>\n export function __promisify__(\n command: string,\n options: WithExternalID<ExecOptions>,\n ): PromiseWithChild<{\n stdout: string\n stderr: string\n }>\n export function __promisify__(\n command: string,\n options?: WithExternalID<ObjectEncodingOptions & ExecOptions> | null,\n ): PromiseWithChild<{\n stdout: string | Buffer\n stderr: string | Buffer\n }>\n export function __promisify__(\n command: string,\n options?:\n | WithExternalID<\n {\n encoding: 'buffer' | null\n } & ExecOptions\n >\n | WithExternalID<\n {\n encoding: BufferEncoding\n } & ExecOptions\n >\n | WithExternalID<ExecOptions>\n | WithExternalID<ObjectEncodingOptions & ExecOptions>\n | null,\n ): PromiseWithChild<{\n stdout: string | Buffer\n stderr: string | Buffer\n }> {\n return customPromisify(cpExec)(\n command,\n spawnOpts(options || {}, getExclude(k)),\n )\n }\n\n Object.assign(exec, { [promisify]: __promisify__ })\n /* c8 ignore start */\n}\n/* c8 ignore stop */\n\nexport function execSync(command: string): Buffer\nexport function execSync(\n command: string,\n options: WithExternalID<ExecSyncOptionsWithStringEncoding>,\n): string\nexport function execSync(\n command: string,\n options: WithExternalID<ExecSyncOptionsWithBufferEncoding>,\n): Buffer\nexport function execSync(\n command: string,\n options?: WithExternalID<ExecSyncOptions>,\n): string | Buffer\nexport function execSync(\n cmd: string,\n options?:\n | WithExternalID<ExecSyncOptions>\n | WithExternalID<ExecSyncOptionsWithBufferEncoding>\n | WithExternalID<ExecSyncOptionsWithStringEncoding>\n | WithExternalID<ExecSyncOptionsWithBufferEncoding>,\n): string | Buffer {\n return cpExecSync(\n cmd,\n spawnOpts<ExecSyncOptions>(options || {}, getExclude(k)),\n )\n}\n\nexport type ExecFileArgs =\n | []\n | [\n options:\n | WithExternalID<ObjectEncodingOptions & ExecFileOptions>\n | undefined\n | null,\n ]\n | [args?: ReadonlyArray<string> | null]\n | [\n args: ReadonlyArray<string> | undefined | null,\n options:\n | WithExternalID<ObjectEncodingOptions & ExecFileOptions>\n | undefined\n | null,\n ]\n | [\n callback: (\n error: ExecFileException | null,\n stdout: string,\n stderr: string,\n ) => void,\n ]\n | [\n args: ReadonlyArray<string> | undefined | null,\n callback: (\n error: ExecFileException | null,\n stdout: string,\n stderr: string,\n ) => void,\n ]\n | [\n options: WithExternalID<ExecFileOptionsWithBufferEncoding>,\n callback: (\n error: ExecFileException | null,\n stdout: Buffer,\n stderr: Buffer,\n ) => void,\n ]\n | [\n args: ReadonlyArray<string> | undefined | null,\n options: WithExternalID<ExecFileOptionsWithBufferEncoding>,\n callback: (\n error: ExecFileException | null,\n stdout: Buffer,\n stderr: Buffer,\n ) => void,\n ]\n | [\n options: WithExternalID<ExecFileOptionsWithStringEncoding>,\n callback: (\n error: ExecFileException | null,\n stdout: string,\n stderr: string,\n ) => void,\n ]\n | [\n args: ReadonlyArray<string> | undefined | null,\n options: WithExternalID<ExecFileOptionsWithStringEncoding>,\n callback: (\n error: ExecFileException | null,\n stdout: string,\n stderr: string,\n ) => void,\n ]\n | [\n options: WithExternalID<ExecFileOptionsWithOtherEncoding>,\n callback: (\n error: ExecFileException | null,\n stdout: string | Buffer,\n stderr: string | Buffer,\n ) => void,\n ]\n | [\n args: ReadonlyArray<string> | undefined | null,\n options: WithExternalID<ExecFileOptionsWithOtherEncoding>,\n callback: (\n error: ExecFileException | null,\n stdout: string | Buffer,\n stderr: string | Buffer,\n ) => void,\n ]\n | [\n options: WithExternalID<ExecFileOptions>,\n callback: (\n error: ExecFileException | null,\n stdout: string,\n stderr: string,\n ) => void,\n ]\n | [\n args: ReadonlyArray<string> | undefined | null,\n options: WithExternalID<ExecFileOptions>,\n callback: (\n error: ExecFileException | null,\n stdout: string,\n stderr: string,\n ) => void,\n ]\n | [\n options:\n | WithExternalID<ObjectEncodingOptions & ExecFileOptions>\n | undefined\n | null,\n callback:\n | ((\n error: ExecFileException | null,\n stdout: string | Buffer,\n stderr: string | Buffer,\n ) => void)\n | undefined\n | null,\n ]\n | [\n args: ReadonlyArray<string> | undefined | null,\n options:\n | WithExternalID<ObjectEncodingOptions & ExecFileOptions>\n | undefined\n | null,\n callback:\n | ((\n error: ExecFileException | null,\n stdout: string | Buffer,\n stderr: string | Buffer,\n ) => void)\n | undefined\n | null,\n ]\nexport function execFile(\n file: string,\n ...execFileArgs: ExecFileArgs\n): ChildProcess {\n let args = []\n let options: WithExternalID<ObjectEncodingOptions & ExecFileOptions> = {}\n let callback: ((...a: any) => any) | undefined = undefined\n for (const arg of execFileArgs) {\n if (Array.isArray(arg)) {\n args = arg\n } else if (\n arg &&\n typeof arg === 'object' &&\n isNotArray<WithExternalID<ObjectEncodingOptions & ExecFileOptions>>(\n arg,\n )\n ) {\n options = arg\n } else if (typeof arg === 'function') {\n callback = arg\n }\n }\n return cpExecFile(\n file,\n args,\n spawnOpts(options, getExclude(k), args),\n callback,\n )\n}\n\nexport namespace execFile {\n export function __promisify__(file: string): PromiseWithChild<{\n stdout: string\n stderr: string\n }>\n export function __promisify__(\n file: string,\n args: ReadonlyArray<string> | undefined | null,\n ): PromiseWithChild<{\n stdout: string\n stderr: string\n }>\n export function __promisify__(\n file: string,\n options: WithExternalID<ExecFileOptionsWithBufferEncoding>,\n ): PromiseWithChild<{\n stdout: Buffer\n stderr: Buffer\n }>\n export function __promisify__(\n file: string,\n args: ReadonlyArray<string> | undefined | null,\n options: WithExternalID<ExecFileOptionsWithBufferEncoding>,\n ): PromiseWithChild<{\n stdout: Buffer\n stderr: Buffer\n }>\n export function __promisify__(\n file: string,\n options: WithExternalID<ExecFileOptionsWithStringEncoding>,\n ): PromiseWithChild<{\n stdout: string\n stderr: string\n }>\n export function __promisify__(\n file: string,\n args: ReadonlyArray<string> | undefined | null,\n options: WithExternalID<ExecFileOptionsWithStringEncoding>,\n ): PromiseWithChild<{\n stdout: string\n stderr: string\n }>\n export function __promisify__(\n file: string,\n options: WithExternalID<ExecFileOptionsWithOtherEncoding>,\n ): PromiseWithChild<{\n stdout: string | Buffer\n stderr: string | Buffer\n }>\n export function __promisify__(\n file: string,\n args: ReadonlyArray<string> | undefined | null,\n options: WithExternalID<ExecFileOptionsWithOtherEncoding>,\n ): PromiseWithChild<{\n stdout: string | Buffer\n stderr: string | Buffer\n }>\n export function __promisify__(\n file: string,\n options: WithExternalID<ExecFileOptions>,\n ): PromiseWithChild<{\n stdout: string\n stderr: string\n }>\n export function __promisify__(\n file: string,\n args: ReadonlyArray<string> | undefined | null,\n options: WithExternalID<ExecFileOptions>,\n ): PromiseWithChild<{\n stdout: string\n stderr: string\n }>\n export function __promisify__(\n file: string,\n options:\n | WithExternalID<ObjectEncodingOptions & ExecFileOptions>\n | undefined\n | null,\n ): PromiseWithChild<{\n stdout: string | Buffer\n stderr: string | Buffer\n }>\n export function __promisify__(\n file: string,\n args: ReadonlyArray<string> | undefined | null,\n options:\n | WithExternalID<ObjectEncodingOptions & ExecFileOptions>\n | undefined\n | null,\n ): PromiseWithChild<{\n stdout: string | Buffer\n stderr: string | Buffer\n }>\n export function __promisify__(\n file: string,\n args?:\n | ReadonlyArray<string>\n | undefined\n | null\n | WithExternalID<ExecFileOptionsWithBufferEncoding>\n | WithExternalID<ExecFileOptionsWithStringEncoding>\n | WithExternalID<ExecFileOptionsWithOtherEncoding>\n | WithExternalID<ExecFileOptions>\n | WithExternalID<ObjectEncodingOptions & ExecFileOptions>\n | WithExternalID<ObjectEncodingOptions & ExecFileOptions>,\n options?:\n | undefined\n | null\n | WithExternalID<ExecFileOptionsWithBufferEncoding>\n | WithExternalID<ExecFileOptionsWithStringEncoding>\n | WithExternalID<ExecFileOptionsWithOtherEncoding>\n | WithExternalID<ExecFileOptions>\n | WithExternalID<ObjectEncodingOptions & ExecFileOptions>\n | WithExternalID<ObjectEncodingOptions & ExecFileOptions>,\n ): PromiseWithChild<{\n stdout: string | Buffer\n stderr: string | Buffer\n }> {\n if (\n !!args &&\n typeof args === 'object' &&\n isNotArray<\n | WithExternalID<ExecFileOptionsWithBufferEncoding>\n | WithExternalID<ExecFileOptionsWithStringEncoding>\n | WithExternalID<ExecFileOptionsWithOtherEncoding>\n | WithExternalID<ExecFileOptions>\n | WithExternalID<ObjectEncodingOptions & ExecFileOptions>\n | WithExternalID<ObjectEncodingOptions & ExecFileOptions>\n >(args)\n ) {\n options = args\n args = []\n }\n return customPromisify(cpExecFile)(\n file,\n spawnOpts(options || {}, getExclude(k), args as readonly string[]),\n )\n }\n Object.assign(execFile, { [promisify]: __promisify__ })\n /* c8 ignore start */\n}\n/* c8 ignore stop */\n\nexport function execFileSync(file: string): Buffer\nexport function execFileSync(\n file: string,\n options: WithExternalID<ExecFileSyncOptionsWithStringEncoding>,\n): string\nexport function execFileSync(\n file: string,\n options: WithExternalID<ExecFileSyncOptionsWithBufferEncoding>,\n): Buffer\nexport function execFileSync(\n file: string,\n options?: WithExternalID<ExecFileSyncOptions>,\n): string | Buffer\nexport function execFileSync(\n file: string,\n args: ReadonlyArray<string>,\n): Buffer\nexport function execFileSync(\n file: string,\n args: ReadonlyArray<string>,\n options: WithExternalID<ExecFileSyncOptionsWithStringEncoding>,\n): string\nexport function execFileSync(\n file: string,\n args: ReadonlyArray<string>,\n options: WithExternalID<ExecFileSyncOptionsWithBufferEncoding>,\n): Buffer\nexport function execFileSync(\n file: string,\n args?: ReadonlyArray<string>,\n options?: WithExternalID<ExecFileSyncOptions>,\n): string | Buffer\nexport function execFileSync(\n file: string,\n args?:\n | ReadonlyArray<string>\n | WithExternalID<ExecFileSyncOptions>\n | WithExternalID<ExecFileSyncOptionsWithStringEncoding>\n | WithExternalID<ExecFileSyncOptionsWithBufferEncoding>,\n options?:\n | WithExternalID<ExecFileSyncOptions>\n | WithExternalID<ExecFileSyncOptionsWithStringEncoding>\n | WithExternalID<ExecFileSyncOptionsWithBufferEncoding>,\n): string | Buffer {\n if (\n args &&\n typeof args === 'object' &&\n isNotArray<\n | WithExternalID<ExecFileSyncOptions>\n | WithExternalID<ExecFileSyncOptionsWithStringEncoding>\n | WithExternalID<ExecFileSyncOptionsWithBufferEncoding>\n >(args)\n ) {\n options = args\n args = []\n }\n return cpExecFileSync(\n file,\n args || [],\n spawnOpts(options || {}, getExclude(k), args),\n )\n}\n\nexport function fork(\n modulePath: string,\n options?: ForkOptions,\n): ChildProcess\nexport function fork(\n modulePath: string,\n args?: ReadonlyArray<string>,\n options?: WithExternalID<ForkOptions>,\n): ChildProcess\nexport function fork(\n modulePath: string,\n args?: ForkOptions | ReadonlyArray<string>,\n options?: WithExternalID<ForkOptions>,\n): ChildProcess {\n if (isNotArray<ForkOptions>(args)) {\n options = args\n args = []\n }\n return cpFork(\n modulePath,\n args,\n spawnOpts(options || {}, getExclude(k), args),\n )\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"find-source-map-safe.js","sourceRoot":"","sources":["../../src/find-source-map-safe.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAa,MAAM,QAAQ,CAAA;AACjD,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAA;AAE5C,MAAM,UAAU,GAAG,IAAI,GAAG,EAAqB,CAAA;AAE/C,MAAM,CAAC,MAAM,iBAAiB,GAAG,CAC/B,CAAe,EACgB,EAAE;IACjC,gEAAgE;IAChE,mEAAmE;IACnE,MAAM,GAAG,GAAG,SAAS,CAAC,CAAC,CAAC,CAAA;IACxB,MAAM,CAAC,GAAG,UAAU,CAAC,GAAG,CAAC,GAAG,CAAC,CAAA;IAC7B,IAAI,CAAC;QAAE,OAAO,CAAC,CAAA;IAEf,oEAAoE;IACpE,IAAI;QACF,MAAM,EAAE,GAAG,aAAa,CAAC,GAAG,CAAC,CAAA;QAC7B,IAAI,EAAE;YAAE,UAAU,CAAC,GAAG,CAAC,GAAG,EAAE,EAAE,CAAC,CAAA;QAC/B,OAAO,EAAE,CAAA;QACT,yBAAyB;QACzB,qBAAqB;KACtB;IAAC,MAAM;QACN,OAAO,KAAK,CAAA;KACb;IACD,oBAAoB;AACtB,CAAC,CAAA","sourcesContent":["import { findSourceMap, SourceMap } from 'module'\nimport { pathToURL } from './path-to-url.js'\n\nconst sourceMaps = new Map<string, SourceMap>()\n\nexport const findSourceMapSafe = (\n s: string | URL
|
|
1
|
+
{"version":3,"file":"find-source-map-safe.js","sourceRoot":"","sources":["../../src/find-source-map-safe.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAa,MAAM,QAAQ,CAAA;AACjD,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAA;AAE5C,MAAM,UAAU,GAAG,IAAI,GAAG,EAAqB,CAAA;AAE/C,MAAM,CAAC,MAAM,iBAAiB,GAAG,CAC/B,CAAe,EACgB,EAAE;IACjC,gEAAgE;IAChE,mEAAmE;IACnE,MAAM,GAAG,GAAG,SAAS,CAAC,CAAC,CAAC,CAAA;IACxB,MAAM,CAAC,GAAG,UAAU,CAAC,GAAG,CAAC,GAAG,CAAC,CAAA;IAC7B,IAAI,CAAC;QAAE,OAAO,CAAC,CAAA;IAEf,oEAAoE;IACpE,IAAI;QACF,MAAM,EAAE,GAAG,aAAa,CAAC,GAAG,CAAC,CAAA;QAC7B,IAAI,EAAE;YAAE,UAAU,CAAC,GAAG,CAAC,GAAG,EAAE,EAAE,CAAC,CAAA;QAC/B,OAAO,EAAE,CAAA;QACT,yBAAyB;QACzB,qBAAqB;KACtB;IAAC,MAAM;QACN,OAAO,KAAK,CAAA;KACb;IACD,oBAAoB;AACtB,CAAC,CAAA","sourcesContent":["import { findSourceMap, SourceMap } from 'module'\nimport { pathToURL } from './path-to-url.js'\n\nconst sourceMaps = new Map<string, SourceMap>()\n\nexport const findSourceMapSafe = (\n s: string | URL,\n): false | undefined | SourceMap => {\n // Have to look up by URL, because the ?tapmock param will be in\n // the internal key used by node, as those are \"different\" modules.\n const mod = pathToURL(s)\n const c = sourceMaps.get(mod)\n if (c) return c\n\n // this can throw in some cases, eg if the sourcemap file is missing\n try {\n const sm = findSourceMap(mod)\n if (sm) sourceMaps.set(mod, sm)\n return sm\n // only throws on node 20\n /* c8 ignore start */\n } catch {\n return false\n }\n /* c8 ignore stop */\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"get-main.d.ts","sourceRoot":"","sources":["../../src/get-main.ts"],"names":[],"mappings":"AAMA,eAAO,MAAM,SAAS,UAAoC,CAAA;AAE1D,eAAO,MAAM,OAAO,
|
|
1
|
+
{"version":3,"file":"get-main.d.ts","sourceRoot":"","sources":["../../src/get-main.ts"],"names":[],"mappings":"AAMA,eAAO,MAAM,SAAS,UAAoC,CAAA;AAE1D,eAAO,MAAM,OAAO,cASnB,CAAA"}
|
package/dist/esm/get-main.js
CHANGED
|
@@ -3,14 +3,10 @@ const p = process;
|
|
|
3
3
|
export const fakeMains = ['<eval>', '<repl>', '<unknown>'];
|
|
4
4
|
export const getMain = () => {
|
|
5
5
|
const argv1 = p.argv[1];
|
|
6
|
-
return argv1?.startsWith('file://')
|
|
7
|
-
?
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
? '<eval>'
|
|
12
|
-
: Object.getOwnPropertyDescriptor(globalThis, 'repl')
|
|
13
|
-
? '<repl>'
|
|
14
|
-
: '<unknown>';
|
|
6
|
+
return (argv1?.startsWith('file://') ? fileURLToPath(argv1)
|
|
7
|
+
: typeof argv1 === 'string' ? argv1
|
|
8
|
+
: p._eval ? '<eval>'
|
|
9
|
+
: Object.getOwnPropertyDescriptor(globalThis, 'repl') ? '<repl>'
|
|
10
|
+
: '<unknown>');
|
|
15
11
|
};
|
|
16
12
|
//# sourceMappingURL=get-main.js.map
|