@tapjs/processinfo 3.1.8 → 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/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/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/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/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 +6 -16
- 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/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
package/LICENSE.md
ADDED
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
# Blue Oak Model License
|
|
2
|
+
|
|
3
|
+
Version 1.0.0
|
|
4
|
+
|
|
5
|
+
## Purpose
|
|
6
|
+
|
|
7
|
+
This license gives everyone as much permission to work with
|
|
8
|
+
this software as possible, while protecting contributors
|
|
9
|
+
from liability.
|
|
10
|
+
|
|
11
|
+
## Acceptance
|
|
12
|
+
|
|
13
|
+
In order to receive this license, you must agree to its
|
|
14
|
+
rules. The rules of this license are both obligations
|
|
15
|
+
under that agreement and conditions to your license.
|
|
16
|
+
You must not do anything with this software that triggers
|
|
17
|
+
a rule that you cannot or will not follow.
|
|
18
|
+
|
|
19
|
+
## Copyright
|
|
20
|
+
|
|
21
|
+
Each contributor licenses you to do everything with this
|
|
22
|
+
software that would otherwise infringe that contributor's
|
|
23
|
+
copyright in it.
|
|
24
|
+
|
|
25
|
+
## Notices
|
|
26
|
+
|
|
27
|
+
You must ensure that everyone who gets a copy of
|
|
28
|
+
any part of this software from you, with or without
|
|
29
|
+
changes, also gets the text of this license or a link to
|
|
30
|
+
<https://blueoakcouncil.org/license/1.0.0>.
|
|
31
|
+
|
|
32
|
+
## Excuse
|
|
33
|
+
|
|
34
|
+
If anyone notifies you in writing that you have not
|
|
35
|
+
complied with [Notices](#notices), you can keep your
|
|
36
|
+
license by taking all practical steps to comply within 30
|
|
37
|
+
days after the notice. If you do not do so, your license
|
|
38
|
+
ends immediately.
|
|
39
|
+
|
|
40
|
+
## Patent
|
|
41
|
+
|
|
42
|
+
Each contributor licenses you to do everything with this
|
|
43
|
+
software that would otherwise infringe any patent claims
|
|
44
|
+
they can license or become able to license.
|
|
45
|
+
|
|
46
|
+
## Reliability
|
|
47
|
+
|
|
48
|
+
No contributor can revoke this license.
|
|
49
|
+
|
|
50
|
+
## No Liability
|
|
51
|
+
|
|
52
|
+
***As far as the law allows, this software comes as is,
|
|
53
|
+
without any warranty or condition, and no contributor
|
|
54
|
+
will be liable to anyone for any damages related to this
|
|
55
|
+
software or this license, under any kind of legal claim.***
|
|
@@ -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"}
|
|
@@ -14,8 +14,9 @@ const canonicalSource = (s) => {
|
|
|
14
14
|
const u = new URL(s);
|
|
15
15
|
const hash = u.hash;
|
|
16
16
|
const search = u.search;
|
|
17
|
-
return String((0, url_1.pathToFileURL)((0, exports.canonicalPath)((0, url_1.fileURLToPath)(s)))) +
|
|
18
|
-
hash +
|
|
17
|
+
return (String((0, url_1.pathToFileURL)((0, exports.canonicalPath)((0, url_1.fileURLToPath)(s)))) +
|
|
18
|
+
hash +
|
|
19
|
+
search);
|
|
19
20
|
}
|
|
20
21
|
// re-resolve it relative to the cwd
|
|
21
22
|
// 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,+BAAwC;AACxC,6BAAkD;AAClD,MAAM,GAAG,GAAG,OAAO,CAAC,GAAG,EAAE,CAAA;AAElB,MAAM,eAAe,GAAG,CAAC,CAAS,EA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AG,GAAG,IAAA,eAAQ,EAAC,GAAG,EAAE,CAAC,CAAC,CAAA;IAC5B,CAAC,GAAG,IAAA,cAAO,EAAC,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;AAVY,QAAA,aAAa,iBAUzB","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 @@
|
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YACA,OAAO,GAAG,IAAI,CAAA;YACd,IAAI,GAAG,EAAE,CAAA;SACV;QACD,OAAO,eAAe,CAAC,wBAAU,CAAC,CAChC,IAAI,EACJ,IAAA,yBAAS,EAAC,OAAO,IAAI,EAAE,EAAE,IAAA,2BAAU,EAAC,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,wBAAR,QAAQ,QA4IxB;AAmCD,SAAgB,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,IAAA,4BAAc,EACnB,IAAI,EACJ,IAAI,IAAI,EAAE,EACV,IAAA,yBAAS,EAAC,OAAO,IAAI,EAAE,EAAE,IAAA,2BAAU,EAAC,CAAC,CAAC,EAAE,IAAI,CAAC,CAC9C,CAAA;AACH,CAAC;AA7BD,oCA6BC;AAWD,SAAgB,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,IAAA,oBAAM,EAAC,UAAU,EAAE,IAAI,EAAE,IAAA,yBAAS,EAAC,OAAO,IAAI,EAAE,EAAE,IAAA,2BAAU,EAAC,CAAC,CAAC,EAAE,IAAI,CAAC,CAAC,CAAA;AAChF,CAAC;AAVD,oBAUC","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,iDAmCsB;AAGtB,qDAA6C;AAC7C,mDAA2D;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,SAAgB,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,IAAA,qBAAO,EACZ,GAAG,EACH,IAAI,IAAI,EAAE,EACV,IAAA,yBAAS,EAAC,OAAO,IAAI,EAAE,EAAE,IAAA,2BAAU,EAAC,CAAC,CAAC,EAAE,IAAI,CAAC,CAC9C,CAAA;AACH,CAAC;AAjCD,sBAiCC;AAmCD,SAAgB,SAAS,CACvB,GAAW,EACX,IAIyB,EACzB,OAGoC;IAEpC,IAAI,UAAU,CAAmB,IAAI,CAAC,EAAE;QACtC,OAAO,GAAG,IAAI,CAAA;QACd,IAAI,GAAG,EAAE,CAAA;KACV;IACD,OAAO,IAAA,yBAAW,EAChB,GAAG,EACH,IAAI,IAAI,EAAE,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B,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,wBAAR,QAAQ,QA4IxB;AAmCD,SAAgB,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,IAAA,4BAAc,EACnB,IAAI,EACJ,IAAI,IAAI,EAAE,EACV,IAAA,yBAAS,EAAC,OAAO,IAAI,EAAE,EAAE,IAAA,2BAAU,EAAC,CAAC,CAAC,EAAE,IAAI,CAAC,CAC9C,CAAA;AACH,CAAC;AA7BD,oCA6BC;AAWD,SAAgB,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,IAAA,oBAAM,EACX,UAAU,EACV,IAAI,EACJ,IAAA,yBAAS,EAAC,OAAO,IAAI,EAAE,EAAE,IAAA,2BAAU,EAAC,CAAC,CAAC,EAAE,IAAI,CAAC,CAC9C,CAAA;AACH,CAAC;AAdD,oBAcC","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,mCAAiD;AACjD,qDAA4C;AAE5C,MAAM,UAAU,GAAG,IAAI,GAAG,EAAqB,CAAA;AAExC,MAAM,iBAAiB,GAAG,CAC/B,CAAe,EACgB,EAAE;IACjC,gEAAgE;IAChE,mEAAmE;IACnE,MAAM,GAAG,GAAG,IAAA,0BAAS,EAAC,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,IAAA,sBAAa,EAAC,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;AApBY,QAAA,iBAAiB,qBAoB7B","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,mCAAiD;AACjD,qDAA4C;AAE5C,MAAM,UAAU,GAAG,IAAI,GAAG,EAAqB,CAAA;AAExC,MAAM,iBAAiB,GAAG,CAC/B,CAAe,EACgB,EAAE;IACjC,gEAAgE;IAChE,mEAAmE;IACnE,MAAM,GAAG,GAAG,IAAA,0BAAS,EAAC,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,IAAA,sBAAa,EAAC,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;AApBY,QAAA,iBAAiB,qBAoB7B","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"}
|
|
@@ -6,15 +6,11 @@ const p = process;
|
|
|
6
6
|
exports.fakeMains = ['<eval>', '<repl>', '<unknown>'];
|
|
7
7
|
const getMain = () => {
|
|
8
8
|
const argv1 = p.argv[1];
|
|
9
|
-
return argv1?.startsWith('file://')
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
? '<eval>'
|
|
15
|
-
: Object.getOwnPropertyDescriptor(globalThis, 'repl')
|
|
16
|
-
? '<repl>'
|
|
17
|
-
: '<unknown>';
|
|
9
|
+
return (argv1?.startsWith('file://') ? (0, url_1.fileURLToPath)(argv1)
|
|
10
|
+
: typeof argv1 === 'string' ? argv1
|
|
11
|
+
: p._eval ? '<eval>'
|
|
12
|
+
: Object.getOwnPropertyDescriptor(globalThis, 'repl') ? '<repl>'
|
|
13
|
+
: '<unknown>');
|
|
18
14
|
};
|
|
19
15
|
exports.getMain = getMain;
|
|
20
16
|
//# sourceMappingURL=get-main.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"get-main.js","sourceRoot":"","sources":["../../src/get-main.ts"],"names":[],"mappings":";;;AAAA,6BAAmC;AAEnC,MAAM,CAAC,GAAG,OAET,CAAA;AAEY,QAAA,SAAS,GAAG,CAAC,QAAQ,EAAE,QAAQ,EAAE,WAAW,CAAC,CAAA;AAEnD,MAAM,OAAO,GAAG,GAAG,EAAE;IAC1B,MAAM,KAAK,GAAG,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAAA;IACvB,OAAO,KAAK,EAAE,UAAU,CAAC,SAAS,CAAC
|
|
1
|
+
{"version":3,"file":"get-main.js","sourceRoot":"","sources":["../../src/get-main.ts"],"names":[],"mappings":";;;AAAA,6BAAmC;AAEnC,MAAM,CAAC,GAAG,OAET,CAAA;AAEY,QAAA,SAAS,GAAG,CAAC,QAAQ,EAAE,QAAQ,EAAE,WAAW,CAAC,CAAA;AAEnD,MAAM,OAAO,GAAG,GAAG,EAAE;IAC1B,MAAM,KAAK,GAAG,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAAA;IACvB,OAAO,CACL,KAAK,EAAE,UAAU,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,IAAA,mBAAa,EAAC,KAAK,CAAC;QACnD,CAAC,CAAC,OAAO,KAAK,KAAK,QAAQ,CAAC,CAAC,CAAC,KAAK;YACnC,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,QAAQ;gBACpB,CAAC,CAAC,MAAM,CAAC,wBAAwB,CAAC,UAAU,EAAE,MAAM,CAAC,CAAC,CAAC,CAAC,QAAQ;oBAChE,CAAC,CAAC,WAAW,CACd,CAAA;AACH,CAAC,CAAA;AATY,QAAA,OAAO,WASnB","sourcesContent":["import { fileURLToPath } from 'url'\n\nconst p = process as NodeJS.Process & {\n _eval?: string\n}\n\nexport const fakeMains = ['<eval>', '<repl>', '<unknown>']\n\nexport const getMain = () => {\n const argv1 = p.argv[1]\n return (\n argv1?.startsWith('file://') ? fileURLToPath(argv1)\n : typeof argv1 === 'string' ? argv1\n : p._eval ? '<eval>'\n : Object.getOwnPropertyDescriptor(globalThis, 'repl') ? '<repl>'\n : '<unknown>'\n )\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAAA,yDAQ2B;AAE3B,qDAAkC;AAClC,yDAAsC;AAGtC,2BAAyE;AACzE,0CAAiE;AACjE,+BAAwC;AACxC,qDAA6C;AAC7C,iDAAuD;AACvD,iEAAwD;AAExD,MAAM,CAAC,GAAG,OAAO,CAAA;AACjB,MAAM,OAAO,GAAG,KAAK,EAAE,CAAS,EAAE,KAAgC,EAAE,EAAE;IACpE,KAAK,CAAC,GAAG,CAAC,CAAC,EAAE,MAAM,IAAA,eAAI,EAAC,CAAC,CAAC,CAAC,KAAK,CAAC,GAAG,EAAE,CAAC,IAAI,CAAC,CAAC,CAAA;AAC/C,CAAC,CAAA;AAED,MAAa,WAAW;IACtB,GAAG,CAAQ;IACX,OAAO,CAAQ;IACf,KAAK,GA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,SAAS;QAClB,OAAO,4BAAS,CAAA;IAClB,CAAC;IAED,MAAM,KAAK,IAAI;QACb,OAAO,uBAAI,CAAA;IACb,CAAC;IAED,MAAM,KAAK,QAAQ;QACjB,OAAO,2BAAQ,CAAA;IACjB,CAAC;IAED,MAAM,KAAK,QAAQ;QACjB,OAAO,2BAAQ,CAAA;IACjB,CAAC;IAED,MAAM,KAAK,YAAY;QACrB,OAAO,+BAAY,CAAA;IACrB,CAAC;IAED,MAAM,KAAK,IAAI;QACb,OAAO,uBAAI,CAAA;IACb,CAAC;CACF;AArPD,kCAqPC","sourcesContent":["import {\n exec,\n execFile,\n execFileSync,\n execSync,\n fork,\n spawn,\n spawnSync,\n} from './child_process.js'\n\nexport * from './child_process.js'\nexport * from './process-info-node.js'\nexport { WithExternalID } from './spawn-opts.js'\n\nimport { mkdirSync, readdirSync, rmSync, Stats, writeFileSync } from 'fs'\nimport { mkdir, readdir, rm, stat, writeFile } from 'fs/promises'\nimport { basename, resolve } from 'path'\nimport { getExclude } from './get-exclude.js'\nimport { safeJSON, safeJSONSync } from './json-file.js'\nimport { ProcessInfoNode } from './process-info-node.js'\n\nconst p = process\nconst tryStat = async (f: string, stats: Map<string, Stats | null>) => {\n stats.set(f, await stat(f).catch(() => null))\n}\n\nexport class ProcessInfo {\n dir: string\n exclude: RegExp\n roots: Set<ProcessInfoNode> = new Set()\n uuids: Map<string, ProcessInfoNode> = new Map()\n files: Map<string, Set<ProcessInfoNode>> = new Map()\n pendingRoot: Map<string, Set<ProcessInfoNode>> = new Map()\n pendingParent: Map<string, Set<ProcessInfoNode>> = new Map()\n externalIDs: Map<string, ProcessInfoNode> = new Map()\n\n static async load({\n dir = resolve(p.cwd(), '.tap/processinfo'),\n exclude = /(^|\\\\|\\/)node_modules(\\\\|\\/|$)/,\n }): Promise<ProcessInfo> {\n const pi = new ProcessInfo({ dir, exclude })\n await pi.load()\n return pi\n }\n\n static loadSync({\n dir = resolve(p.cwd(), '.tap/processinfo'),\n exclude = /(^|\\\\|\\/)node_modules(\\\\|\\/|$)/,\n }): ProcessInfo {\n const pi = new ProcessInfo({ dir, exclude })\n pi.loadSync()\n return pi\n }\n\n constructor({\n dir = resolve(p.cwd(), '.tap/processinfo'),\n exclude = /(^|\\\\|\\/)node_modules(\\\\|\\/|$)/,\n } = {}) {\n this.dir = dir\n this.exclude = exclude\n }\n\n clear() {\n this.roots.clear()\n this.files.clear()\n this.uuids.clear()\n this.externalIDs.clear()\n }\n\n async save() {\n await mkdir(this.dir, { recursive: true })\n const writes = []\n for (const [uuid, info] of this.uuids.entries()) {\n const f = `${this.dir}/${uuid}.json`\n writes.push(writeFile(f, JSON.stringify(info) + '\\n', 'utf8'))\n }\n await Promise.all(writes)\n }\n\n async saveSync() {\n mkdirSync(this.dir, { recursive: true })\n for (const [uuid, info] of this.uuids.entries()) {\n const f = `${this.dir}/${uuid}.json`\n writeFileSync(f, JSON.stringify(info) + '\\n', 'utf8')\n }\n }\n\n async erase() {\n this.clear()\n await rm(this.dir, { recursive: true })\n }\n\n eraseSync() {\n this.clear()\n rmSync(this.dir, { recursive: true })\n }\n\n async load() {\n const promises = []\n for (const entry of await readdir(this.dir).catch(() => [])) {\n const uuid = basename(entry, '.json')\n if (this.uuids.has(uuid)) {\n continue\n }\n const f = resolve(this.dir, entry)\n promises.push(\n safeJSON(f).then(data => {\n if (!data.uuid || data.uuid !== uuid) {\n return\n }\n new ProcessInfoNode(data).link(this)\n })\n )\n }\n await Promise.all(promises)\n\n return this\n }\n\n loadSync() {\n let entries: string[]\n try {\n entries = readdirSync(this.dir)\n } catch (_) {\n entries = []\n }\n for (const entry of entries) {\n const uuid = basename(entry, '.json')\n if (this.uuids.has(uuid)) {\n continue\n }\n const f = resolve(this.dir, entry)\n const data = safeJSONSync(f)\n if (!data.uuid || data.uuid !== uuid) {\n continue\n }\n new ProcessInfoNode(data).link(this)\n }\n\n return this\n }\n\n #statFiles(\n node: ProcessInfoNode,\n stats: Map<string, Stats | null>,\n exclude: RegExp\n ) {\n const promises: Promise<void>[] = []\n\n for (const f of node.files) {\n if (exclude.test(f)) continue\n // race\n /* c8 ignore start */\n if (stats.has(f)) continue\n /* c8 ignore stop */\n promises.push(tryStat(f, stats))\n const src = node.sources[f]\n if (src) {\n for (const s of src) {\n /* c8 ignore start */\n if (stats.has(s)) continue\n /* c8 ignore stop */\n promises.push(tryStat(s, stats))\n }\n }\n }\n for (const c of node.descendants ?? []) {\n promises.push(...this.#statFiles(c, stats, exclude))\n }\n return promises\n }\n\n // if any files are newer than the date, or null, then add it\n // if a file has changed, but its sources haven't, then assume\n // it's still the same content, and not \"changed\"\n #hasNewerFiles(\n node: ProcessInfoNode,\n stats: Map<string, Stats | null>,\n exclude: RegExp\n ) {\n const p = Date.parse(node.date)\n for (const f of node.files) {\n if (exclude.test(f)) continue\n const st = stats.get(f)\n if (!st) {\n return true\n }\n let c = Number(st.mtime) > p\n if (!c) continue\n const src = node.sources[f]\n if (!src?.length) return true\n else {\n for (const s of src) {\n const sst = stats.get(s)\n if (!sst || Number(sst.mtime) > p) {\n return true\n }\n }\n }\n }\n // no direct files are newer, check descendants\n // if one of them have a changed file, then that's a yes\n for (const c of node.descendants ?? []) {\n if (this.#hasNewerFiles(c, stats, exclude)) {\n return true\n }\n }\n return false\n }\n\n /**\n * Get a subset of this.externalIDs where one or more of the\n * files have changed since the date on the node.\n */\n async externalIDsChanged(\n filter: (p: string, node: ProcessInfoNode) => boolean = () => true\n ) {\n const exclude = getExclude('_TAPJS_PROCESSINFO_EXCLUDE_', false)\n const changed = new Map<string, ProcessInfoNode>()\n const promises: Promise<void>[] = []\n const stats = new Map<string, Stats | null>()\n for (const [id, node] of this.externalIDs.entries()) {\n if (!filter(id, node)) continue\n promises.push(...this.#statFiles(node, stats, exclude))\n }\n // consider limiting with promise-call-limit?\n await Promise.all(promises)\n\n for (const [id, node] of this.externalIDs.entries()) {\n if (filter(id, node) && this.#hasNewerFiles(node, stats, exclude)) {\n changed.set(id, node)\n }\n }\n return changed\n }\n\n static get Node() {\n return ProcessInfoNode\n }\n\n static get ProcessInfo() {\n return ProcessInfo\n }\n\n static get spawn() {\n return spawn\n }\n\n static get spawnSync() {\n return spawnSync\n }\n\n static get exec() {\n return exec\n }\n\n static get execSync() {\n return execSync\n }\n\n static get execFile() {\n return execFile\n }\n\n static get execFileSync() {\n return execFileSync\n }\n\n static get fork() {\n return fork\n }\n}\n"]}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAAA,yDAQ2B;AAE3B,qDAAkC;AAClC,yDAAsC;AAGtC,2BAAyE;AACzE,0CAAiE;AACjE,+BAAwC;AACxC,qDAA6C;AAC7C,iDAAuD;AACvD,iEAAwD;AAExD,MAAM,CAAC,GAAG,OAAO,CAAA;AACjB,MAAM,OAAO,GAAG,KAAK,EAAE,CAAS,EAAE,KAAgC,EAAE,EAAE;IACpE,KAAK,CAAC,GAAG,CAAC,CAAC,EAAE,MAAM,IAAA,eAAI,EAAC,CAAC,CAAC,CAAC,KAAK,CAAC,GAAG,EAAE,CAAC,IAAI,CAAC,CAAC,CAAA;AAC/C,CAAC,CAAA;AAED,MAAa,WAAW;IACtB,GAAG,CAAQ;IACX,OAAO,CAAQ;IACf,KAAK,GAAyB,IAAI,GAAG,EAAE,CAAA;IACvC,KAAK,GAAiC,IAAI,GAAG,EAAE,CAAA;IAC/C,KAAK,GAAsC,IAAI,GAAG,EAAE,CAAA;IACpD,WAAW,GAAsC,IAAI,GAAG,EAAE,CAAA;IAC1D,aAAa,GAAsC,IAAI,GAAG,EAAE,CAAA;IAC5D,WAAW,GAAiC,IAAI,GAAG,EAAE,CAAA;IAErD,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC,EAChB,GAAG,GAAG,IAAA,cAAO,EAAC,CAAC,CAAC,GAAG,EAAE,EAAE,kBAAkB,CAAC,EAC1C,OAAO,GAAG,gCAAgC,GAC3C;QACC,MAAM,EAAE,GAAG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,\n} from './child_process.js'\n\nexport * from './child_process.js'\nexport * from './process-info-node.js'\nexport { WithExternalID } from './spawn-opts.js'\n\nimport { mkdirSync, readdirSync, rmSync, Stats, writeFileSync } from 'fs'\nimport { mkdir, readdir, rm, stat, writeFile } from 'fs/promises'\nimport { basename, resolve } from 'path'\nimport { getExclude } from './get-exclude.js'\nimport { safeJSON, safeJSONSync } from './json-file.js'\nimport { ProcessInfoNode } from './process-info-node.js'\n\nconst p = process\nconst tryStat = async (f: string, stats: Map<string, Stats | null>) => {\n stats.set(f, await stat(f).catch(() => null))\n}\n\nexport class ProcessInfo {\n dir: string\n exclude: RegExp\n roots: Set<ProcessInfoNode> = new Set()\n uuids: Map<string, ProcessInfoNode> = new Map()\n files: Map<string, Set<ProcessInfoNode>> = new Map()\n pendingRoot: Map<string, Set<ProcessInfoNode>> = new Map()\n pendingParent: Map<string, Set<ProcessInfoNode>> = new Map()\n externalIDs: Map<string, ProcessInfoNode> = new Map()\n\n static async load({\n dir = resolve(p.cwd(), '.tap/processinfo'),\n exclude = /(^|\\\\|\\/)node_modules(\\\\|\\/|$)/,\n }): Promise<ProcessInfo> {\n const pi = new ProcessInfo({ dir, exclude })\n await pi.load()\n return pi\n }\n\n static loadSync({\n dir = resolve(p.cwd(), '.tap/processinfo'),\n exclude = /(^|\\\\|\\/)node_modules(\\\\|\\/|$)/,\n }): ProcessInfo {\n const pi = new ProcessInfo({ dir, exclude })\n pi.loadSync()\n return pi\n }\n\n constructor({\n dir = resolve(p.cwd(), '.tap/processinfo'),\n exclude = /(^|\\\\|\\/)node_modules(\\\\|\\/|$)/,\n } = {}) {\n this.dir = dir\n this.exclude = exclude\n }\n\n clear() {\n this.roots.clear()\n this.files.clear()\n this.uuids.clear()\n this.externalIDs.clear()\n }\n\n async save() {\n await mkdir(this.dir, { recursive: true })\n const writes = []\n for (const [uuid, info] of this.uuids.entries()) {\n const f = `${this.dir}/${uuid}.json`\n writes.push(writeFile(f, JSON.stringify(info) + '\\n', 'utf8'))\n }\n await Promise.all(writes)\n }\n\n async saveSync() {\n mkdirSync(this.dir, { recursive: true })\n for (const [uuid, info] of this.uuids.entries()) {\n const f = `${this.dir}/${uuid}.json`\n writeFileSync(f, JSON.stringify(info) + '\\n', 'utf8')\n }\n }\n\n async erase() {\n this.clear()\n await rm(this.dir, { recursive: true })\n }\n\n eraseSync() {\n this.clear()\n rmSync(this.dir, { recursive: true })\n }\n\n async load() {\n const promises = []\n for (const entry of await readdir(this.dir).catch(() => [])) {\n const uuid = basename(entry, '.json')\n if (this.uuids.has(uuid)) {\n continue\n }\n const f = resolve(this.dir, entry)\n promises.push(\n safeJSON(f).then(data => {\n if (!data.uuid || data.uuid !== uuid) {\n return\n }\n new ProcessInfoNode(data).link(this)\n }),\n )\n }\n await Promise.all(promises)\n\n return this\n }\n\n loadSync() {\n let entries: string[]\n try {\n entries = readdirSync(this.dir)\n } catch (_) {\n entries = []\n }\n for (const entry of entries) {\n const uuid = basename(entry, '.json')\n if (this.uuids.has(uuid)) {\n continue\n }\n const f = resolve(this.dir, entry)\n const data = safeJSONSync(f)\n if (!data.uuid || data.uuid !== uuid) {\n continue\n }\n new ProcessInfoNode(data).link(this)\n }\n\n return this\n }\n\n #statFiles(\n node: ProcessInfoNode,\n stats: Map<string, Stats | null>,\n exclude: RegExp,\n ) {\n const promises: Promise<void>[] = []\n\n for (const f of node.files) {\n if (exclude.test(f)) continue\n // race\n /* c8 ignore start */\n if (stats.has(f)) continue\n /* c8 ignore stop */\n promises.push(tryStat(f, stats))\n const src = node.sources[f]\n if (src) {\n for (const s of src) {\n /* c8 ignore start */\n if (stats.has(s)) continue\n /* c8 ignore stop */\n promises.push(tryStat(s, stats))\n }\n }\n }\n for (const c of node.descendants ?? []) {\n promises.push(...this.#statFiles(c, stats, exclude))\n }\n return promises\n }\n\n // if any files are newer than the date, or null, then add it\n // if a file has changed, but its sources haven't, then assume\n // it's still the same content, and not \"changed\"\n #hasNewerFiles(\n node: ProcessInfoNode,\n stats: Map<string, Stats | null>,\n exclude: RegExp,\n ) {\n const p = Date.parse(node.date)\n for (const f of node.files) {\n if (exclude.test(f)) continue\n const st = stats.get(f)\n if (!st) {\n return true\n }\n let c = Number(st.mtime) > p\n if (!c) continue\n const src = node.sources[f]\n if (!src?.length) return true\n else {\n for (const s of src) {\n const sst = stats.get(s)\n if (!sst || Number(sst.mtime) > p) {\n return true\n }\n }\n }\n }\n // no direct files are newer, check descendants\n // if one of them have a changed file, then that's a yes\n for (const c of node.descendants ?? []) {\n if (this.#hasNewerFiles(c, stats, exclude)) {\n return true\n }\n }\n return false\n }\n\n /**\n * Get a subset of this.externalIDs where one or more of the\n * files have changed since the date on the node.\n */\n async externalIDsChanged(\n filter: (p: string, node: ProcessInfoNode) => boolean = () => true,\n ) {\n const exclude = getExclude('_TAPJS_PROCESSINFO_EXCLUDE_', false)\n const changed = new Map<string, ProcessInfoNode>()\n const promises: Promise<void>[] = []\n const stats = new Map<string, Stats | null>()\n for (const [id, node] of this.externalIDs.entries()) {\n if (!filter(id, node)) continue\n promises.push(...this.#statFiles(node, stats, exclude))\n }\n // consider limiting with promise-call-limit?\n await Promise.all(promises)\n\n for (const [id, node] of this.externalIDs.entries()) {\n if (filter(id, node) && this.#hasNewerFiles(node, stats, exclude)) {\n changed.set(id, node)\n }\n }\n return changed\n }\n\n static get Node() {\n return ProcessInfoNode\n }\n\n static get ProcessInfo() {\n return ProcessInfo\n }\n\n static get spawn() {\n return spawn\n }\n\n static get spawnSync() {\n return spawnSync\n }\n\n static get exec() {\n return exec\n }\n\n static get execSync() {\n return execSync\n }\n\n static get execFile() {\n return execFile\n }\n\n static get execFileSync() {\n return execFileSync\n }\n\n static get fork() {\n return fork\n }\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"line-lengths.js","sourceRoot":"","sources":["../../src/line-lengths.ts"],"names":[],"mappings":";AAAA,wEAAwE;;;AAExE,6BAAmC;AAEnC,MAAM,IAAI,GAAG,MAAM,CAAC,GA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AAC,CAAA;AAC5B,CAAC,CAAA;AAHY,QAAA,cAAc,kBAG1B","sourcesContent":["// TODO: Refactor once https://github.com/nodejs/node/issues/48460 fixed\n\nimport { fileURLToPath } from 'url'\n\nconst kLLC = Symbol.for('@tapjs/processinfo lineLength cache')\nconst g = global as {\n [kLLC]?: Map<string, number[]>\n}\nconst cache = g[kLLC] || new Map<string, number[]>()\ng[kLLC] = cache\n\nconst sourceMapComment = '//# sourceMappingURL='\nexport const saveLineLengths = (\n filename: string,\n content?: string | Buffer
|
|
1
|
+
{"version":3,"file":"line-lengths.js","sourceRoot":"","sources":["../../src/line-lengths.ts"],"names":[],"mappings":";AAAA,wEAAwE;;;AAExE,6BAAmC;AAEnC,MAAM,IAAI,GAAG,MAAM,CAAC,GAAG,CAAC,qCAAqC,CAAC,CAAA;AAC9D,MAAM,CAAC,GAAG,MAET,CAAA;AACD,MAAM,KAAK,GAAG,CAAC,CAAC,IAAI,CAAC,IAAI,IAAI,GAAG,EAAoB,CAAA;AACpD,CAAC,CAAC,IAAI,CAAC,GAAG,KAAK,CAAA;AAEf,MAAM,gBAAgB,GAAG,uBAAuB,CAAA;AACzC,MAAM,eAAe,GAAG,CAC7B,QAAgB,EAChB,OAAyB,EACzB,EAAE;IACF,IAAI,OAAO,KAAK,SAAS;QAAE,OAAM;IACjC,IAAI,OAAO,OAAO,KAAK,QAAQ;QAAE,OAAO,GAAG,MAAM,CAAC,OAAO,CAAC,CAAA;IAC1D,IAAI,QAAQ,CAAC,UAAU,CAAC,SAAS,CAAC;QAAE,QAAQ,GAAG,IAAA,mBAAa,EAAC,QAAQ,CAAC,CAAA;IACtE,mCAAmC;IACnC,sEAAsE;IACtE,uDAAuD;IACvD,MAAM,IAAI,GAAG,OAAO,CAAC,OAAO,EAAE,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,GAAG,EAAE,CAAA;IAChD,IAAI,KAAK,CAAC,GAAG,CAAC,QAAQ,CAAC,IAAI,CAAC,IAAI,EAAE,UAAU,CAAC,gBAAgB,CAAC;QAAE,OAAM;IACtE,MAAM,EAAE,GAAG,OAAO,CAAC,KAAK,CAAC,kBAAkB,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,MAAM,CAAC,CAAA;IAE/D,KAAK,CAAC,GAAG,CAAC,QAAQ,EAAE,EAAE,CAAC,CAAA;AACzB,CAAC,CAAA;AAfY,QAAA,eAAe,mBAe3B;AAEM,MAAM,cAAc,GAAG,CAAC,QAAgB,EAAE,EAAE;IACjD,IAAI,QAAQ,CAAC,UAAU,CAAC,SAAS,CAAC;QAAE,QAAQ,GAAG,IAAA,mBAAa,EAAC,QAAQ,CAAC,CAAA;IACtE,OAAO,KAAK,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAA;AAC5B,CAAC,CAAA;AAHY,QAAA,cAAc,kBAG1B","sourcesContent":["// TODO: Refactor once https://github.com/nodejs/node/issues/48460 fixed\n\nimport { fileURLToPath } from 'url'\n\nconst kLLC = Symbol.for('@tapjs/processinfo lineLength cache')\nconst g = global as {\n [kLLC]?: Map<string, number[]>\n}\nconst cache = g[kLLC] || new Map<string, number[]>()\ng[kLLC] = cache\n\nconst sourceMapComment = '//# sourceMappingURL='\nexport const saveLineLengths = (\n filename: string,\n content?: string | Buffer,\n) => {\n if (content === undefined) return\n if (typeof content === 'object') content = String(content)\n if (filename.startsWith('file://')) filename = fileURLToPath(filename)\n // no need if it's not sourcemapped\n // don't cache an empty array, though, because ts-node files will show\n // up first as source, and then as their built content.\n const last = content.trimEnd().split('\\n').pop()\n if (cache.has(filename) || !last?.startsWith(sourceMapComment)) return\n const ll = content.split(/\\n|\\u2028|\\u2029/).map(l => l.length)\n\n cache.set(filename, ll)\n}\n\nexport const getLineLengths = (filename: string) => {\n if (filename.startsWith('file://')) filename = fileURLToPath(filename)\n return cache.get(filename)\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"loader-paths.d.ts","sourceRoot":"","sources":["../../src/loader-paths.ts"],"names":[],"mappings":"AAKA,eAAO,MAAM,YAAY,QAA+C,CAAA;AACxE,eAAO,MAAM,YAAY,QAAwC,CAAA;AAIjE,eAAO,MAAM,WAAW,MAAO,MAAM,KAAG,
|
|
1
|
+
{"version":3,"file":"loader-paths.d.ts","sourceRoot":"","sources":["../../src/loader-paths.ts"],"names":[],"mappings":"AAKA,eAAO,MAAM,YAAY,QAA+C,CAAA;AACxE,eAAO,MAAM,YAAY,QAAwC,CAAA;AAIjE,eAAO,MAAM,WAAW,MAAO,MAAM,KAAG,OAQvC,CAAA;AAED,eAAO,MAAM,WAAW,MAAO,MAAM,KAAG,OAQvC,CAAA"}
|
|
@@ -9,18 +9,14 @@ exports.importLoader = (0, get_import_meta_url_js_1.getImportMetaURL)('../esm/im
|
|
|
9
9
|
const legacyLoaderPath = (0, url_1.fileURLToPath)(exports.legacyLoader);
|
|
10
10
|
const importLoaderPath = (0, url_1.fileURLToPath)(exports.importLoader);
|
|
11
11
|
const legacyMatch = (p) => {
|
|
12
|
-
const d = p.startsWith('file://')
|
|
13
|
-
? (0, url_1.fileURLToPath)(p)
|
|
14
|
-
: decodeURIComponent(p);
|
|
12
|
+
const d = p.startsWith('file://') ? (0, url_1.fileURLToPath)(p) : decodeURIComponent(p);
|
|
15
13
|
return (d === '@tapjs/processinfo/loader' ||
|
|
16
14
|
p === exports.legacyLoader ||
|
|
17
15
|
(0, path_1.resolve)(d) === legacyLoaderPath);
|
|
18
16
|
};
|
|
19
17
|
exports.legacyMatch = legacyMatch;
|
|
20
18
|
const importMatch = (p) => {
|
|
21
|
-
const d = p.startsWith('file://')
|
|
22
|
-
? (0, url_1.fileURLToPath)(p)
|
|
23
|
-
: decodeURIComponent(p);
|
|
19
|
+
const d = p.startsWith('file://') ? (0, url_1.fileURLToPath)(p) : decodeURIComponent(p);
|
|
24
20
|
return (d === '@tapjs/processinfo/import' ||
|
|
25
21
|
p === exports.importLoader ||
|
|
26
22
|
(0, path_1.resolve)(d) === importLoaderPath);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"loader-paths.js","sourceRoot":"","sources":["../../src/loader-paths.ts"],"names":[],"mappings":";;;AAAA,+BAA8B;AAC9B,qEAA2D;AAE3D,6BAAmC;AAEtB,QAAA,YAAY,GAAG,IAAA,yCAAgB,EAAC,0BAA0B,CAAC,CAAA;AAC3D,QAAA,YAAY,GAAG,IAAA,yCAAgB,EAAC,mBAAmB,CAAC,CAAA;AACjE,MAAM,gBAAgB,GAAG,IAAA,mBAAa,EAAC,oBAAY,CAAC,CAAA;AACpD,MAAM,gBAAgB,GAAG,IAAA,mBAAa,EAAC,oBAAY,CAAC,CAAA;AAE7C,MAAM,WAAW,GAAG,CAAC,CAAS,EAAW,EAAE;IAChD,MAAM,CAAC,
|
|
1
|
+
{"version":3,"file":"loader-paths.js","sourceRoot":"","sources":["../../src/loader-paths.ts"],"names":[],"mappings":";;;AAAA,+BAA8B;AAC9B,qEAA2D;AAE3D,6BAAmC;AAEtB,QAAA,YAAY,GAAG,IAAA,yCAAgB,EAAC,0BAA0B,CAAC,CAAA;AAC3D,QAAA,YAAY,GAAG,IAAA,yCAAgB,EAAC,mBAAmB,CAAC,CAAA;AACjE,MAAM,gBAAgB,GAAG,IAAA,mBAAa,EAAC,oBAAY,CAAC,CAAA;AACpD,MAAM,gBAAgB,GAAG,IAAA,mBAAa,EAAC,oBAAY,CAAC,CAAA;AAE7C,MAAM,WAAW,GAAG,CAAC,CAAS,EAAW,EAAE;IAChD,MAAM,CAAC,GACL,CAAC,CAAC,UAAU,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,IAAA,mBAAa,EAAC,CAAC,CAAC,CAAC,CAAC,CAAC,kBAAkB,CAAC,CAAC,CAAC,CAAA;IACpE,OAAO,CACL,CAAC,KAAK,2BAA2B;QACjC,CAAC,KAAK,oBAAY;QAClB,IAAA,cAAO,EAAC,CAAC,CAAC,KAAK,gBAAgB,CAChC,CAAA;AACH,CAAC,CAAA;AARY,QAAA,WAAW,eAQvB;AAEM,MAAM,WAAW,GAAG,CAAC,CAAS,EAAW,EAAE;IAChD,MAAM,CAAC,GACL,CAAC,CAAC,UAAU,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,IAAA,mBAAa,EAAC,CAAC,CAAC,CAAC,CAAC,CAAC,kBAAkB,CAAC,CAAC,CAAC,CAAA;IACpE,OAAO,CACL,CAAC,KAAK,2BAA2B;QACjC,CAAC,KAAK,oBAAY;QAClB,IAAA,cAAO,EAAC,CAAC,CAAC,KAAK,gBAAgB,CAChC,CAAA;AACH,CAAC,CAAA;AARY,QAAA,WAAW,eAQvB","sourcesContent":["import { resolve } from 'path'\nimport { getImportMetaURL } from './get-import-meta-url.js'\n\nimport { fileURLToPath } from 'url'\n\nexport const legacyLoader = getImportMetaURL('../esm/loader-legacy.mjs')\nexport const importLoader = getImportMetaURL('../esm/import.mjs')\nconst legacyLoaderPath = fileURLToPath(legacyLoader)\nconst importLoaderPath = fileURLToPath(importLoader)\n\nexport const legacyMatch = (p: string): boolean => {\n const d =\n p.startsWith('file://') ? fileURLToPath(p) : decodeURIComponent(p)\n return (\n d === '@tapjs/processinfo/loader' ||\n p === legacyLoader ||\n resolve(d) === legacyLoaderPath\n )\n}\n\nexport const importMatch = (p: string): boolean => {\n const d =\n p.startsWith('file://') ? fileURLToPath(p) : decodeURIComponent(p)\n return (\n d === '@tapjs/processinfo/import' ||\n p === importLoader ||\n resolve(d) === importLoaderPath\n )\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"node-options-env.d.ts","sourceRoot":"","sources":["../../src/node-options-env.ts"],"names":[],"mappings":";;;;
|
|
1
|
+
{"version":3,"file":"node-options-env.d.ts","sourceRoot":"","sources":["../../src/node-options-env.ts"],"names":[],"mappings":";;;;AAqKA,eAAO,MAAM,cAAc,QACpB,OAAO,UAAU,QAChB,SAAS,MAAM,EAAE,WAKxB,CAAA"}
|
|
@@ -4,9 +4,8 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
exports.nodeOptionsEnv = void 0;
|
|
7
|
-
const
|
|
7
|
+
const node_options_to_argv_1 = require("node-options-to-argv");
|
|
8
8
|
const loader_paths_js_1 = require("./loader-paths.js");
|
|
9
|
-
const node_options_to_argv_js_1 = require("./node-options-to-argv.js");
|
|
10
9
|
const node_module_1 = __importDefault(require("node:module"));
|
|
11
10
|
const getKeyValue = (args, i) => {
|
|
12
11
|
const arg = args[i];
|
|
@@ -155,14 +154,14 @@ const addLoader = (args) => {
|
|
|
155
154
|
result.push(`${addKey}=${addValue}`);
|
|
156
155
|
return !useImport ? addIgnoreLoadersWarning(result) : result;
|
|
157
156
|
};
|
|
158
|
-
const addIgnoreLoadersWarning = (args) => args.includes('--no-warnings') ||
|
|
159
|
-
args.includes('--no-warnings=ExperimentalLoader')
|
|
160
|
-
|
|
157
|
+
const addIgnoreLoadersWarning = (args) => (args.includes('--no-warnings') ||
|
|
158
|
+
args.includes('--no-warnings=ExperimentalLoader')) ?
|
|
159
|
+
args
|
|
161
160
|
: args.concat('--no-warnings');
|
|
162
161
|
const nodeOptionsEnv = (env, args) => {
|
|
163
162
|
// if we already have the loader in args, don't add to NODE_OPTIONS
|
|
164
|
-
const no = (0,
|
|
165
|
-
return (0,
|
|
163
|
+
const no = (0, node_options_to_argv_1.nodeOptionsToArgv)(env.NODE_OPTIONS);
|
|
164
|
+
return (0, node_options_to_argv_1.argvToNodeOptions)(hasLoader(args) ? rmLoader(no) : addLoader(no));
|
|
166
165
|
};
|
|
167
166
|
exports.nodeOptionsEnv = nodeOptionsEnv;
|
|
168
167
|
//# sourceMappingURL=node-options-env.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"node-options-env.js","sourceRoot":"","sources":["../../src/node-options-env.ts"],"names":[],"mappings":";;;;;;AAAA,uEAA6D;AAC7D,uDAK0B;AAC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\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;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atch,\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"]}
|