@tapjs/processinfo 2.5.5 → 3.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +5 -5
- package/dist/cjs/argv-to-node-options.d.ts.map +1 -1
- package/dist/cjs/argv-to-node-options.js.map +1 -1
- package/dist/cjs/child_process.d.ts.map +1 -1
- package/dist/cjs/child_process.js.map +1 -1
- package/dist/cjs/find-source-map-safe.d.ts +3 -0
- package/dist/cjs/find-source-map-safe.d.ts.map +1 -0
- package/dist/cjs/find-source-map-safe.js +15 -0
- package/dist/cjs/find-source-map-safe.js.map +1 -0
- package/dist/cjs/get-exclude.d.ts.map +1 -1
- package/dist/cjs/get-exclude.js.map +1 -1
- package/dist/cjs/get-import-meta-url-cjs.d.ts.map +1 -0
- package/dist/cjs/get-import-meta-url-cjs.js.map +1 -0
- package/dist/cjs/get-import-meta-url.d.ts +2 -0
- package/dist/cjs/get-import-meta-url.js +13 -0
- package/dist/cjs/get-main.d.ts +3 -0
- package/dist/cjs/get-main.d.ts.map +1 -0
- package/dist/cjs/get-main.js +20 -0
- package/dist/cjs/get-main.js.map +1 -0
- package/dist/cjs/get-process-info.d.ts +1 -21
- package/dist/cjs/get-process-info.d.ts.map +1 -1
- package/dist/cjs/get-process-info.js +21 -16
- package/dist/cjs/get-process-info.js.map +1 -1
- package/dist/cjs/index.d.ts +0 -1
- package/dist/cjs/index.d.ts.map +1 -1
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/json-file.d.ts.map +1 -1
- package/dist/cjs/json-file.js.map +1 -1
- package/dist/cjs/line-lengths.d.ts.map +1 -1
- package/dist/cjs/line-lengths.js.map +1 -1
- package/dist/cjs/loader-paths.d.ts +4 -4
- package/dist/cjs/loader-paths.d.ts.map +1 -1
- package/dist/cjs/loader-paths.js +19 -27
- package/dist/cjs/loader-paths.js.map +1 -1
- package/dist/cjs/node-options-env.d.ts +1 -1
- package/dist/cjs/node-options-env.d.ts.map +1 -1
- package/dist/cjs/node-options-env.js +69 -42
- package/dist/cjs/node-options-env.js.map +1 -1
- package/dist/cjs/node-options-to-argv.d.ts.map +1 -1
- package/dist/cjs/node-options-to-argv.js.map +1 -1
- package/dist/cjs/process-info-node.d.ts +20 -1
- package/dist/cjs/process-info-node.d.ts.map +1 -1
- package/dist/cjs/process-info-node.js.map +1 -1
- package/dist/cjs/register-cjs.d.ts.map +1 -1
- package/dist/cjs/register-cjs.js.map +1 -1
- package/dist/cjs/register-coverage.d.ts +1 -1
- package/dist/cjs/register-coverage.d.ts.map +1 -1
- package/dist/cjs/register-coverage.js +2 -11
- package/dist/cjs/register-coverage.js.map +1 -1
- package/dist/cjs/register-env.d.ts.map +1 -1
- package/dist/cjs/register-env.js +5 -2
- package/dist/cjs/register-env.js.map +1 -1
- package/dist/cjs/register-process-end.d.ts.map +1 -1
- package/dist/cjs/register-process-end.js +2 -2
- package/dist/cjs/register-process-end.js.map +1 -1
- package/dist/cjs/register-require.d.ts +2 -0
- package/dist/cjs/register-require.d.ts.map +1 -0
- package/dist/cjs/register-require.js +27 -0
- package/dist/cjs/register-require.js.map +1 -0
- package/dist/cjs/require-resolve-cjs.d.ts.map +1 -1
- package/dist/cjs/require-resolve-cjs.js.map +1 -1
- package/dist/cjs/spawn-opts.d.ts.map +1 -1
- package/dist/cjs/spawn-opts.js +1 -1
- package/dist/cjs/spawn-opts.js.map +1 -1
- package/dist/mjs/argv-to-node-options.d.ts.map +1 -1
- package/dist/mjs/argv-to-node-options.js.map +1 -1
- package/dist/mjs/child_process.d.ts.map +1 -1
- package/dist/mjs/child_process.js.map +1 -1
- package/dist/mjs/esm.d.mts +7 -9
- package/dist/mjs/esm.d.mts.map +1 -1
- package/dist/mjs/esm.mjs +27 -16
- package/dist/mjs/esm.mjs.map +1 -1
- package/dist/mjs/find-source-map-safe.d.ts +3 -0
- package/dist/mjs/find-source-map-safe.d.ts.map +1 -0
- package/dist/mjs/find-source-map-safe.js +11 -0
- package/dist/mjs/find-source-map-safe.js.map +1 -0
- package/dist/mjs/get-exclude.d.ts.map +1 -1
- package/dist/mjs/get-exclude.js.map +1 -1
- package/dist/mjs/get-import-meta-url-mjs.d.ts.map +1 -0
- package/dist/mjs/get-import-meta-url-mjs.js.map +1 -0
- package/dist/mjs/get-import-meta-url.d.ts +8 -0
- package/dist/mjs/get-import-meta-url.js +8 -0
- package/dist/mjs/get-main.d.ts +3 -0
- package/dist/mjs/get-main.d.ts.map +1 -0
- package/dist/mjs/get-main.js +16 -0
- package/dist/mjs/get-main.js.map +1 -0
- package/dist/mjs/get-process-info.d.ts +1 -21
- package/dist/mjs/get-process-info.d.ts.map +1 -1
- package/dist/mjs/get-process-info.js +21 -16
- package/dist/mjs/get-process-info.js.map +1 -1
- package/dist/mjs/hooks.d.mts +10 -0
- package/dist/mjs/hooks.d.mts.map +1 -0
- package/dist/mjs/hooks.mjs +83 -0
- package/dist/mjs/hooks.mjs.map +1 -0
- package/dist/mjs/import.d.mts +2 -0
- package/dist/mjs/import.d.mts.map +1 -0
- package/dist/mjs/import.mjs +24 -0
- package/dist/mjs/import.mjs.map +1 -0
- package/dist/mjs/index.d.ts +0 -1
- package/dist/mjs/index.d.ts.map +1 -1
- package/dist/mjs/index.js.map +1 -1
- package/dist/mjs/json-file.d.ts.map +1 -1
- package/dist/mjs/json-file.js.map +1 -1
- package/dist/mjs/line-lengths.d.ts.map +1 -1
- package/dist/mjs/line-lengths.js.map +1 -1
- package/dist/mjs/loader-legacy.d.mts +2 -0
- package/dist/mjs/loader-legacy.d.mts.map +1 -0
- package/dist/mjs/loader-legacy.mjs +2 -0
- package/dist/mjs/loader-legacy.mjs.map +1 -0
- package/dist/mjs/loader-paths.d.ts +4 -4
- package/dist/mjs/loader-paths.d.ts.map +1 -1
- package/dist/mjs/loader-paths.js +18 -26
- package/dist/mjs/loader-paths.js.map +1 -1
- package/dist/mjs/loader.d.mts +2 -0
- package/dist/mjs/loader.d.mts.map +1 -0
- package/dist/mjs/loader.mjs +2 -0
- package/dist/mjs/loader.mjs.map +1 -0
- package/dist/mjs/node-options-env.d.ts +1 -1
- package/dist/mjs/node-options-env.d.ts.map +1 -1
- package/dist/mjs/node-options-env.js +67 -43
- package/dist/mjs/node-options-env.js.map +1 -1
- package/dist/mjs/node-options-to-argv.d.ts.map +1 -1
- package/dist/mjs/node-options-to-argv.js.map +1 -1
- package/dist/mjs/process-info-node.d.ts +20 -1
- package/dist/mjs/process-info-node.d.ts.map +1 -1
- package/dist/mjs/process-info-node.js.map +1 -1
- package/dist/mjs/register-coverage.d.ts +1 -1
- package/dist/mjs/register-coverage.d.ts.map +1 -1
- package/dist/mjs/register-coverage.js +1 -10
- package/dist/mjs/register-coverage.js.map +1 -1
- package/dist/mjs/register-env.d.ts.map +1 -1
- package/dist/mjs/register-env.js +5 -2
- package/dist/mjs/register-env.js.map +1 -1
- package/dist/mjs/register-process-end.d.ts.map +1 -1
- package/dist/mjs/register-process-end.js +2 -2
- package/dist/mjs/register-process-end.js.map +1 -1
- package/dist/mjs/register-require.d.ts +2 -0
- package/dist/mjs/register-require.d.ts.map +1 -0
- package/dist/mjs/{register-cjs.js → register-require.js} +4 -4
- package/dist/mjs/register-require.js.map +1 -0
- package/dist/mjs/require-resolve-mjs.d.ts.map +1 -0
- package/dist/mjs/require-resolve-mjs.js.map +1 -0
- package/dist/mjs/require-resolve.d.ts +1 -1
- package/dist/mjs/require-resolve.js +1 -1
- package/dist/mjs/spawn-opts.d.ts.map +1 -1
- package/dist/mjs/spawn-opts.js +1 -1
- package/dist/mjs/spawn-opts.js.map +1 -1
- package/package.json +16 -14
- package/dist/cjs/cjs.d.ts +0 -2
- package/dist/cjs/cjs.d.ts.map +0 -1
- package/dist/cjs/cjs.js +0 -5
- package/dist/cjs/cjs.js.map +0 -1
- package/dist/mjs/register-cjs.d.ts +0 -2
- package/dist/mjs/register-cjs.d.ts.map +0 -1
- package/dist/mjs/register-cjs.js.map +0 -1
- package/dist/mjs/require-resolve.d.ts.map +0 -1
- package/dist/mjs/require-resolve.js.map +0 -1
- /package/dist/cjs/{register-cjs.d.ts → register.d.ts} +0 -0
- /package/dist/cjs/{register-cjs.js → register.js} +0 -0
package/README.md
CHANGED
|
@@ -14,11 +14,11 @@ Run the top level process with a `--loader` or `--require` argument to
|
|
|
14
14
|
track all Node.js child processes.
|
|
15
15
|
|
|
16
16
|
```sh
|
|
17
|
-
# wrap both CommonJS and ESM
|
|
18
|
-
node --loader=@tapjs/processinfo file.js
|
|
17
|
+
# wrap both CommonJS and ESM, node versions less than 20.6
|
|
18
|
+
node --loader=@tapjs/processinfo/loader file.js
|
|
19
19
|
|
|
20
|
-
#
|
|
21
|
-
node --
|
|
20
|
+
# for node versions 20.6 and higher:
|
|
21
|
+
node --import=@tapjs/processinfo/import
|
|
22
22
|
```
|
|
23
23
|
|
|
24
24
|
To spawn a wrapped process from JavaScript, you can run:
|
|
@@ -64,7 +64,7 @@ executes.
|
|
|
64
64
|
To load the process info data, use the exported `ProcessInfo` class.
|
|
65
65
|
|
|
66
66
|
```js
|
|
67
|
-
|
|
67
|
+
import { ProcessInfo } from '@tapjs/processinfo'
|
|
68
68
|
|
|
69
69
|
// returns
|
|
70
70
|
// {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"argv-to-node-options.d.ts","sourceRoot":"","sources":["../../
|
|
1
|
+
{"version":3,"file":"argv-to-node-options.d.ts","sourceRoot":"","sources":["../../src/argv-to-node-options.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,iBAAiB,SAAU,SAAS,MAAM,EAAE,WACD,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"argv-to-node-options.js","sourceRoot":"","sources":["../../
|
|
1
|
+
{"version":3,"file":"argv-to-node-options.js","sourceRoot":"","sources":["../../src/argv-to-node-options.ts"],"names":[],"mappings":";;;AAAO,MAAM,iBAAiB,GAAG,CAAC,IAAuB,EAAE,EAAE,CAC3D,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,CAAC,OAAO,CAAC,IAAI,EAAE,KAAK,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAA;AAD3C,QAAA,iBAAiB,qBAC0B","sourcesContent":["export const argvToNodeOptions = (argv: readonly string[]) =>\n argv.map(o => `\"${o.replace(/\"/g, '\\\\\"')}\"`).join(' ')\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"child_process.d.ts","sourceRoot":"","sources":["../../lib/child_process.ts"],"names":[],"mappings":";;;;AAEA,OAAO,EACL,YAAY,EACZ,mBAAmB,EACnB,8BAA8B,EAE9B,aAAa,EAEb,iBAAiB,EACjB,eAAe,EACf,iCAAiC,EACjC,gCAAgC,EAChC,iCAAiC,EAEjC,mBAAmB,EACnB,qCAAqC,EACrC,qCAAqC,EACrC,WAAW,EAEX,eAAe,EACf,iCAAiC,EACjC,iCAAiC,EAEjC,WAAW,EACX,gBAAgB,EAEhB,YAAY,EACZ,wBAAwB,EACxB,0BAA0B,EAE1B,gBAAgB,EAChB,kCAAkC,EAClC,kCAAkC,EAClC,gBAAgB,EAChB,SAAS,EACT,SAAS,EACV,MAAM,eAAe,CAAA;AACtB,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,IAAI,CAAA;AAC/C,OAAO,KAAK,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,QAAQ,CAAA;AAEhD,OAAO,EAAa,cAAc,EAAE,MAAM,iBAAiB,CAAA;AAqB3D,wBAAgB,KAAK,CACnB,OAAO,EAAE,MAAM,EACf,OAAO,CAAC,EAAE,cAAc,CAAC,wBAAwB,CAAC,GACjD,8BAA8B,CAAA;AACjC,wBAAgB,KAAK,CACnB,OAAO,EAAE,MAAM,EACf,OAAO,EAAE,cAAc,CACrB,0BAA0B,CAAC,SAAS,EAAE,SAAS,EAAE,SAAS,CAAC,CAC5D,GACA,mBAAmB,CAAC,QAAQ,EAAE,QAAQ,EAAE,QAAQ,CAAC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OAAO,IAAI,EAAE,EAAE,IAAA,2BAAU,EAAC,CAAC,CAAC,CAAC,CAAC,CAAA;AAC1E,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)))\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))\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)),\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))\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))\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)))\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,EAAC,GAAG,EAAE,IAAI,IAAI,EAAE,EAAE,IAAA,yBAAS,EAAC,OAAO,IAAI,EAAE,EAAE,IAAA,2BAAU,EAAC,CAAC,CAAC,CAAC,CAAC,CAAA;AAC1E,CAAC;AA7BD,sBA6BC;AAmCD,SAAgB,SAAS,CACvB,GAAW,EACX,IAIyB,EACzB,OAGoC;IAEpC,IAAI,UAAU,CAAmB,IAAI,CAAC,EAAE;Q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O,IAAI,EAAE,EAAE,IAAA,2BAAU,EAAC,CAAC,CAAC,CAAC,CACxC,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,CAAC,CACxC,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,CAAC,CAAC,CAAA;AAC1E,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)))\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))\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)),\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))\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))\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)))\n}\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"find-source-map-safe.d.ts","sourceRoot":"","sources":["../../src/find-source-map-safe.ts"],"names":[],"mappings":";AAIA,eAAO,MAAM,iBAAiB,MAAO,MAAM,2CAI1C,CAAA"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.findSourceMapSafe = void 0;
|
|
4
|
+
const module_1 = require("module");
|
|
5
|
+
// this can throw in some cases in node 19
|
|
6
|
+
/* c8 ignore start */
|
|
7
|
+
const findSourceMapSafe = (s) => {
|
|
8
|
+
try {
|
|
9
|
+
return (0, module_1.findSourceMap)(s);
|
|
10
|
+
}
|
|
11
|
+
catch { }
|
|
12
|
+
};
|
|
13
|
+
exports.findSourceMapSafe = findSourceMapSafe;
|
|
14
|
+
/* c8 ignore stop */
|
|
15
|
+
//# sourceMappingURL=find-source-map-safe.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"find-source-map-safe.js","sourceRoot":"","sources":["../../src/find-source-map-safe.ts"],"names":[],"mappings":";;;AAAA,mCAAsC;AAEtC,0CAA0C;AAC1C,qBAAqB;AACd,MAAM,iBAAiB,GAAG,CAAC,CAAS,EAAE,EAAE;IAC7C,IAAI;QACF,OAAO,IAAA,sBAAa,EAAC,CAAC,CAAC,CAAA;KACxB;IAAC,MAAM,GAAE;AACZ,CAAC,CAAA;AAJY,QAAA,iBAAiB,qBAI7B;AACD,oBAAoB","sourcesContent":["import { findSourceMap } from 'module'\n\n// this can throw in some cases in node 19\n/* c8 ignore start */\nexport const findSourceMapSafe = (s: string) => {\n try {\n return findSourceMap(s)\n } catch {}\n}\n/* c8 ignore stop */\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"get-exclude.d.ts","sourceRoot":"","sources":["../../
|
|
1
|
+
{"version":3,"file":"get-exclude.d.ts","sourceRoot":"","sources":["../../src/get-exclude.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,cAAc,QACuG,CAAA;AAclI,eAAO,MAAM,UAAU,MAAO,MAAM,iCAKnC,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"get-exclude.js","sourceRoot":"","sources":["../../
|
|
1
|
+
{"version":3,"file":"get-exclude.js","sourceRoot":"","sources":["../../src/get-exclude.ts"],"names":[],"mappings":";;;AAAa,QAAA,cAAc,GACzB,gIAAgI,CAAA;AAElI,MAAM,YAAY,GAAG,CAAC,GAAuB,EAAsB,EAAE;IACnE,IAAI,CAAC,GAAG;QAAE,OAAM;IAChB,MAAM,MAAM,GAAG,GAAG,CAAC,KAAK,CAAC,oBAAoB,CAAC,CAAA;IAC9C,IAAI,MAAM,EAAE;QACV,IAAI;YACF,OAAO,IAAI,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,MAAM,CAAC,CAAC,CAAC,CAAC,CAAA;SACxC;QAAC,OAAO,CAAC,EAAE,GAAE;KACf;AACH,CAAC,CAAA;AAED,MAAM,IAAI,GAAG,OAAO,CAAA;AAEb,MAAM,UAAU,GAAG,CAAC,CAAS,EAAE,UAAU,GAAG,IAAI,EAAE,EAAE;IACzD,MAAM,GAAG,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,CAAA;IACvB,MAAM,OAAO,GAAG,YAAY,CAAC,GAAG,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC,CAAC,sBAAc,CAAC,CAAC,CAAC,IAAI,CAAC,CAAA;IACzE,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,GAAG,MAAM,CAAC,OAAO,CAAC,CAAA;IAC7B,OAAO,OAAO,CAAA;AAChB,CAAC,CAAA;AALY,QAAA,UAAU,cAKtB","sourcesContent":["export const defaultExclude =\n /(^|[\\\\\\/])(node_modules|\\.tap|tap-testdir-.*?|tap-snapshots|tests?|[^\\\\\\/]+\\.test\\.([cm]?[jt]s|[jt]sx?)|__tests?__)([\\\\\\/]|$)/i\n\nconst parseExclude = (src: string | undefined): RegExp | undefined => {\n if (!src) return\n const parsed = src.match(/^\\/(.*)\\/([a-z]*)$/)\n if (parsed) {\n try {\n return new RegExp(parsed[1], parsed[2])\n } catch (e) {}\n }\n}\n\nconst proc = process\n\nexport const getExclude = (k: string, useDefault = true) => {\n const src = proc.env[k]\n const exclude = parseExclude(src) || (useDefault ? defaultExclude : /$./)\n proc.env[k] = String(exclude)\n return exclude\n}\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"get-import-meta-url-cjs.d.ts","sourceRoot":"","sources":["../../src/get-import-meta-url-cjs.ts"],"names":[],"mappings":"AAOA,eAAO,MAAM,gBAAgB,WAAY,MAAM,WACK,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"get-import-meta-url-cjs.js","sourceRoot":"","sources":["../../src/get-import-meta-url-cjs.ts"],"names":[],"mappings":";;;AAAA;;;;;GAKG;AACH,6BAAmC;AAC5B,MAAM,gBAAgB,GAAG,CAAC,MAAc,EAAE,EAAE,CACjD,MAAM,CAAC,IAAI,GAAG,CAAC,MAAM,EAAE,IAAA,mBAAa,EAAC,UAAU,CAAC,CAAC,CAAC,CAAA;AADvC,QAAA,gBAAgB,oBACuB","sourcesContent":["/**\n * Get the import.meta.url for a module\n * abstracted to be able to do CJS and ESM versions.\n *\n * CommonJS version\n */\nimport { pathToFileURL } from 'url'\nexport const getImportMetaURL = (target: string) =>\n String(new URL(target, pathToFileURL(__filename)))\n"]}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getImportMetaURL = void 0;
|
|
4
|
+
/**
|
|
5
|
+
* Get the import.meta.url for a module
|
|
6
|
+
* abstracted to be able to do CJS and ESM versions.
|
|
7
|
+
*
|
|
8
|
+
* CommonJS version
|
|
9
|
+
*/
|
|
10
|
+
const url_1 = require("url");
|
|
11
|
+
const getImportMetaURL = (target) => String(new URL(target, (0, url_1.pathToFileURL)(__filename)));
|
|
12
|
+
exports.getImportMetaURL = getImportMetaURL;
|
|
13
|
+
//# sourceMappingURL=get-import-meta-url-cjs.js.map
|
|
@@ -0,0 +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,cAWnB,CAAA"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getMain = exports.fakeMains = void 0;
|
|
4
|
+
const url_1 = require("url");
|
|
5
|
+
const p = process;
|
|
6
|
+
exports.fakeMains = ['<eval>', '<repl>', '<unknown>'];
|
|
7
|
+
const getMain = () => {
|
|
8
|
+
const argv1 = p.argv[1];
|
|
9
|
+
return argv1?.startsWith('file://')
|
|
10
|
+
? (0, url_1.fileURLToPath)(argv1)
|
|
11
|
+
: typeof argv1 === 'string'
|
|
12
|
+
? argv1
|
|
13
|
+
: p._eval
|
|
14
|
+
? '<eval>'
|
|
15
|
+
: Object.getOwnPropertyDescriptor(globalThis, 'repl')
|
|
16
|
+
? '<repl>'
|
|
17
|
+
: '<unknown>';
|
|
18
|
+
};
|
|
19
|
+
exports.getMain = getMain;
|
|
20
|
+
//# sourceMappingURL=get-main.js.map
|
|
@@ -0,0 +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;QACjC,CAAC,CAAC,IAAA,mBAAa,EAAC,KAAK,CAAC;QACtB,CAAC,CAAC,OAAO,KAAK,KAAK,QAAQ;YAC3B,CAAC,CAAC,KAAK;YACP,CAAC,CAAC,CAAC,CAAC,KAAK;gBACT,CAAC,CAAC,QAAQ;gBACV,CAAC,CAAC,MAAM,CAAC,wBAAwB,CAAC,UAAU,EAAE,MAAM,CAAC;oBACrD,CAAC,CAAC,QAAQ;oBACV,CAAC,CAAC,WAAW,CAAA;AACjB,CAAC,CAAA;AAXY,QAAA,OAAO,WAWnB","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 argv1?.startsWith('file://')\n ? fileURLToPath(argv1)\n : typeof argv1 === 'string'\n ? argv1\n : p._eval\n ? '<eval>'\n : Object.getOwnPropertyDescriptor(globalThis, 'repl')\n ? '<repl>'\n : '<unknown>'\n}\n"]}
|
|
@@ -1,24 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
export interface ProcessInfoNodeData {
|
|
3
|
-
hrstart?: [number, number];
|
|
4
|
-
date: string;
|
|
5
|
-
argv: string[];
|
|
6
|
-
execArgv: string[];
|
|
7
|
-
NODE_OPTIONS?: string;
|
|
8
|
-
cwd: string;
|
|
9
|
-
pid: number;
|
|
10
|
-
ppid: number;
|
|
11
|
-
parent: string | null;
|
|
12
|
-
uuid: string;
|
|
13
|
-
files: string[];
|
|
14
|
-
sources: Record<string, string[]>;
|
|
15
|
-
root?: string | null;
|
|
16
|
-
externalID?: string | null;
|
|
17
|
-
code?: number | null;
|
|
18
|
-
signal?: NodeJS.Signals | null;
|
|
19
|
-
runtime?: number;
|
|
20
|
-
globalsAdded?: string[];
|
|
21
|
-
}
|
|
1
|
+
import { ProcessInfoNodeData } from './process-info-node.js';
|
|
22
2
|
export declare const reset: () => {
|
|
23
3
|
getProcessInfo: () => ProcessInfoNodeData;
|
|
24
4
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"get-process-info.d.ts","sourceRoot":"","sources":["../../
|
|
1
|
+
{"version":3,"file":"get-process-info.d.ts","sourceRoot":"","sources":["../../src/get-process-info.ts"],"names":[],"mappings":"AASA,OAAO,EAAE,mBAAmB,EAAE,MAAM,wBAAwB,CAAA;AA4B5D,eAAO,MAAM,KAAK;0BAKgB,mBAAmB;CAFpD,CAAA;AAED,eAAO,MAAM,cAAc,QAAO,mBAiDjC,CAAA"}
|
|
@@ -4,23 +4,25 @@ exports.getProcessInfo = exports.reset = void 0;
|
|
|
4
4
|
// we always want this
|
|
5
5
|
const p = process;
|
|
6
6
|
p.setSourceMapsEnabled(true);
|
|
7
|
-
const node_url_1 = require("node:url");
|
|
8
7
|
const uuid_1 = require("uuid");
|
|
8
|
+
const get_main_js_1 = require("./get-main.js");
|
|
9
9
|
const envKey = (k) => `_TAPJS_PROCESSINFO_${k.toUpperCase()}_`;
|
|
10
10
|
const getEnv = (k) => p.env[envKey(k)];
|
|
11
11
|
const setEnv = (k, v) => (p.env[envKey(k)] = v);
|
|
12
12
|
const delEnv = (k) => delete p.env[envKey(k)];
|
|
13
|
-
const register_cjs_js_1 = require("./register-cjs.js");
|
|
14
13
|
const register_coverage_js_1 = require("./register-coverage.js");
|
|
15
14
|
const register_env_js_1 = require("./register-env.js");
|
|
16
15
|
const register_process_end_js_1 = require("./register-process-end.js");
|
|
17
|
-
|
|
18
|
-
//
|
|
19
|
-
//
|
|
20
|
-
//
|
|
16
|
+
const register_require_js_1 = require("./register-require.js");
|
|
17
|
+
// this module is hybridized. In node v20.0 = v20.6, it's the *commonjs* one
|
|
18
|
+
// that gets loaded, because the esm loader context can't modify the main
|
|
19
|
+
// thread except via communication over the port to the globalPreload env. So,
|
|
20
|
+
// we have to store our singleton on the global.
|
|
21
21
|
//
|
|
22
22
|
// If it later loads the esm form of this module, that's fine, because it'll
|
|
23
23
|
// see the global processInfo object, and not re-register anything.
|
|
24
|
+
//
|
|
25
|
+
// CJS registration can be removed once node < 20.6 is no longer supported.
|
|
24
26
|
const kProcessInfo = Symbol.for('@tapjs/processinfo.ProcessInfoNodeData');
|
|
25
27
|
const g = global;
|
|
26
28
|
// only used for tests so we can simulate multiple processes
|
|
@@ -32,11 +34,6 @@ exports.reset = reset;
|
|
|
32
34
|
const getProcessInfo = () => {
|
|
33
35
|
if (g[kProcessInfo])
|
|
34
36
|
return g[kProcessInfo];
|
|
35
|
-
const argv1 = p.argv[1];
|
|
36
|
-
// we only test this in CJS, but file:// only prepended in ESM
|
|
37
|
-
/* c8 ignore start */
|
|
38
|
-
const main = argv1.startsWith('file://') ? (0, node_url_1.fileURLToPath)(argv1) : argv1;
|
|
39
|
-
/* c8 ignore stop */
|
|
40
37
|
g[kProcessInfo] = {
|
|
41
38
|
hrstart: p.hrtime(),
|
|
42
39
|
date: new Date().toISOString(),
|
|
@@ -48,7 +45,7 @@ const getProcessInfo = () => {
|
|
|
48
45
|
ppid: p.ppid,
|
|
49
46
|
parent: getEnv('parent') || null,
|
|
50
47
|
uuid: (0, uuid_1.v4)(),
|
|
51
|
-
files: [
|
|
48
|
+
files: [(0, get_main_js_1.getMain)()],
|
|
52
49
|
sources: Object.create(null),
|
|
53
50
|
};
|
|
54
51
|
if (!g[kProcessInfo].parent) {
|
|
@@ -66,10 +63,18 @@ const getProcessInfo = () => {
|
|
|
66
63
|
// externalID only applies to ONE process, not all its children.
|
|
67
64
|
delEnv('external_id');
|
|
68
65
|
}
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
66
|
+
// switch to turn off registration for some tests.
|
|
67
|
+
// excluded from coverage because that's the reason why it's here
|
|
68
|
+
// in the first place, it confuses c8.
|
|
69
|
+
/* c8 ignore start */
|
|
70
|
+
if (process.env.__TAPJS_PROCESSINFO_TESTING_NO_REGISTER__ !==
|
|
71
|
+
String(process.pid)) {
|
|
72
|
+
(0, register_require_js_1.register)();
|
|
73
|
+
(0, register_env_js_1.register)();
|
|
74
|
+
(0, register_coverage_js_1.register)();
|
|
75
|
+
(0, register_process_end_js_1.register)();
|
|
76
|
+
}
|
|
77
|
+
/* c8 ignore stop */
|
|
73
78
|
return g[kProcessInfo];
|
|
74
79
|
};
|
|
75
80
|
exports.getProcessInfo = getProcessInfo;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"get-process-info.js","sourceRoot":"","sources":["../../
|
|
1
|
+
{"version":3,"file":"get-process-info.js","sourceRoot":"","sources":["../../src/get-process-info.ts"],"names":[],"mappings":";;;AAAA,sBAAsB;AACtB,MAAM,CAAC,GAAG,OAGT,CAAA;AACD,CAAC,CAAC,oBAAoB,CAAC,IAAI,CAAC,CAAA;AAE5B,+BAAiC;AACjC,+CAAuC;AAGvC,MAAM,MAAM,GAAG,CAAC,CAAS,EAAE,EAAE,CAAC,sBAAsB,CAAC,CAAC,WAAW,EAAE,GAAG,CAAA;AACtE,MAAM,MAAM,GAAG,CAAC,CAAS,EAAE,EAAE,CAAC,CAAC,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAA;AAC9C,MAAM,MAAM,GAAG,CAAC,CAAS,EAAE,CAAS,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAA;AAC/D,MAAM,MAAM,GAAG,CAAC,CAAS,EAAE,EAAE,CAAC,OAAO,CAAC,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAA;AAErD,iEAAqE;AACrE,uDAA2D;AAC3D,uEAA0E;AAC1E,+DAAmE;AAEnE,6EAA6E;AAC7E,yEAAyE;AACzE,8EAA8E;AAC9E,gDAAgD;AAChD,EAAE;AACF,4EAA4E;AAC5E,mEAAmE;AACnE,EAAE;AACF,2EAA2E;AAE3E,MAAM,YAAY,GAAG,MAAM,CAAC,GAAG,CAAC,wCAAwC,CAAC,CAAA;AACzE,MAAM,CAAC,GAAG,MAET,CAAA;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AAM,CAAC,QAAQ,EAAE,CAAC,CAAC,YAAY,CAAC,CAAC,IAAI,CAAC,CAAA;IACtC,MAAM,UAAU,GAAG,MAAM,CAAC,aAAa,CAAC,CAAA;IACxC,IAAI,UAAU,EAAE;QACd,CAAC,CAAC,YAAY,CAAC,CAAC,UAAU,GAAG,UAAU,CAAA;QACvC,gEAAgE;QAChE,MAAM,CAAC,aAAa,CAAC,CAAA;KACtB;IAED,kDAAkD;IAClD,iEAAiE;IACjE,sCAAsC;IACtC,qBAAqB;IACrB,IACE,OAAO,CAAC,GAAG,CAAC,yCAAyC;QACrD,MAAM,CAAC,OAAO,CAAC,GAAG,CAAC,EACnB;QACA,IAAA,8BAAe,GAAE,CAAA;QACjB,IAAA,0BAAW,GAAE,CAAA;QACb,IAAA,+BAAgB,GAAE,CAAA;QAClB,IAAA,kCAAkB,GAAE,CAAA;KACrB;IACD,oBAAoB;IAEpB,OAAO,CAAC,CAAC,YAAY,CAAC,CAAA;AACxB,CAAC,CAAA;AAjDY,QAAA,cAAc,kBAiD1B","sourcesContent":["// we always want this\nconst p = process as NodeJS.Process & {\n setSourceMapsEnabled(v: boolean): void\n _eval?: string\n}\np.setSourceMapsEnabled(true)\n\nimport { v4 as uuid } from 'uuid'\nimport { getMain } from './get-main.js'\nimport { ProcessInfoNodeData } from './process-info-node.js'\n\nconst envKey = (k: string) => `_TAPJS_PROCESSINFO_${k.toUpperCase()}_`\nconst getEnv = (k: string) => p.env[envKey(k)]\nconst setEnv = (k: string, v: string) => (p.env[envKey(k)] = v)\nconst delEnv = (k: string) => delete p.env[envKey(k)]\n\nimport { register as registerCoverage } from './register-coverage.js'\nimport { register as registerEnv } from './register-env.js'\nimport { register as registerProcessEnd } from './register-process-end.js'\nimport { register as registerRequire } from './register-require.js'\n\n// this module is hybridized. In node v20.0 = v20.6, it's the *commonjs* one\n// that gets loaded, because the esm loader context can't modify the main\n// thread except via communication over the port to the globalPreload env. So,\n// we have to store our singleton on the global.\n//\n// If it later loads the esm form of this module, that's fine, because it'll\n// see the global processInfo object, and not re-register anything.\n//\n// CJS registration can be removed once node < 20.6 is no longer supported.\n\nconst kProcessInfo = Symbol.for('@tapjs/processinfo.ProcessInfoNodeData')\nconst g = global as typeof globalThis & {\n [kProcessInfo]?: ProcessInfoNodeData\n}\n\n// only used for tests so we can simulate multiple processes\nexport const reset = () => {\n g[kProcessInfo] = undefined\n return { getProcessInfo }\n}\n\nexport const getProcessInfo = (): ProcessInfoNodeData => {\n if (g[kProcessInfo]) return g[kProcessInfo]\n\n g[kProcessInfo] = {\n hrstart: p.hrtime(),\n date: new Date().toISOString(),\n argv: p.argv,\n execArgv: p.execArgv,\n NODE_OPTIONS: p.env.NODE_OPTIONS,\n cwd: p.cwd(),\n pid: p.pid,\n ppid: p.ppid,\n parent: getEnv('parent') || null,\n uuid: uuid(),\n files: [getMain()],\n sources: Object.create(null),\n }\n\n if (!g[kProcessInfo].parent) {\n g[kProcessInfo].root = g[kProcessInfo].uuid\n setEnv('root', g[kProcessInfo].uuid)\n } else {\n g[kProcessInfo].root = getEnv('root')\n }\n // this is the parent of any further child processes\n setEnv('parent', g[kProcessInfo].uuid)\n const externalID = getEnv('external_id')\n if (externalID) {\n g[kProcessInfo].externalID = externalID\n // externalID only applies to ONE process, not all its children.\n delEnv('external_id')\n }\n\n // switch to turn off registration for some tests.\n // excluded from coverage because that's the reason why it's here\n // in the first place, it confuses c8.\n /* c8 ignore start */\n if (\n process.env.__TAPJS_PROCESSINFO_TESTING_NO_REGISTER__ !==\n String(process.pid)\n ) {\n registerRequire()\n registerEnv()\n registerCoverage()\n registerProcessEnd()\n }\n /* c8 ignore stop */\n\n return g[kProcessInfo]\n}\n"]}
|
package/dist/cjs/index.d.ts
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { exec, execFile, execFileSync, execSync, fork, spawn, spawnSync } from './child_process.js';
|
|
2
2
|
export * from './child_process.js';
|
|
3
|
-
export { ProcessInfoNodeData } from './get-process-info.js';
|
|
4
3
|
export * from './process-info-node.js';
|
|
5
4
|
export { WithExternalID } from './spawn-opts.js';
|
|
6
5
|
import { ProcessInfoNode } from './process-info-node.js';
|
package/dist/cjs/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,IAAI,EACJ,QAAQ,EACR,YAAY,EACZ,QAAQ,EACR,IAAI,EACJ,KAAK,EACL,SAAS,EACV,MAAM,oBAAoB,CAAA;AAE3B,cAAc,oBAAoB,CAAA;AAClC,cAAc,wBAAwB,CAAA;AACtC,OAAO,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAA;AAOhD,OAAO,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAA;AAOxD,qBAAa,WAAW;;IACtB,GAAG,EAAE,MAAM,CAAA;IACX,OAAO,EAAE,MAAM,CAAA;IACf,KAAK,EAAE,GAAG,CAAC,eAAe,CAAC,CAAY;IACvC,KAAK,EAAE,GAAG,CAAC,MAAM,EAAE,eAAe,CAAC,CAAY;IAC/C,KAAK,EAAE,GAAG,CAAC,MAAM,EAAE,GAAG,CAAC,eAAe,CAAC,CAAC,CAAY;IACpD,WAAW,EAAE,GAAG,CAAC,MAAM,EAAE,GAAG,CAAC,eAAe,CAAC,CAAC,CAAY;IAC1D,aAAa,EAAE,GAAG,CAAC,MAAM,EAAE,GAAG,CAAC,eAAe,CAAC,CAAC,CAAY;IAC5D,WAAW,EAAE,GAAG,CAAC,MAAM,EAAE,eAAe,CAAC,CAAY;WAExC,IAAI,CAAC,EAChB,GAA0C,EAC1C,OAA0C,GAC3C;;;KAAA,GAAG,OAAO,CAAC,WAAW,CAAC;IAMxB,MAAM,CAAC,QAAQ,CAAC,EACd,GAA0C,EAC1C,OAA0C,GAC3C;;;KAAA,GAAG,WAAW;gBAMH,EACV,GAA0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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;AAnPD,kCAmPC","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 { ProcessInfoNodeData } from './get-process-info.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 if (node.sources[f]) {\n for (const s of node.sources[f]) {\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 if (!node.sources[f]?.length) return true\n else {\n for (const s of node.sources[f]) {\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,IAAI,WAAW,CAAC,EAAE,GAAG,EAAE,OAAO,EAAE,CAAC,CAAA;QAC5C,MAAM,EAAE,CAAC,IAAI,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C/B,QAAQ,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC,UAAU,CAAC,IAAI,EAAE,KAAK,EAAE,OAAO,CAAC,CAAC,CAAA;SACxD;QACD,6CAA6C;QAC7C,MAAM,OAAO,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAA;QAE3B,KAAK,MAAM,CAAC,EAAE,EAAE,IAAI,CAAC,IAAI,IAAI,CAAC,WAAW,CAAC,OAAO,EAAE,EAAE;YACnD,IAAI,MAAM,CAAC,EAAE,EAAE,IAAI,CAAC,IAAI,IAAI,CAAC,cAAc,CAAC,IAAI,EAAE,KAAK,EAAE,OAAO,CAAC,EAAE;gBACjE,OAAO,CAAC,GAAG,CAAC,EAAE,EAAE,IAAI,CAAC,CAAA;aACtB;SACF;QACD,OAAO,OAAO,CAAA;IAChB,CAAC;IAED,MAAM,KAAK,IAAI;QACb,OAAO,sCAAe,CAAA;IACxB,CAAC;IAED,MAAM,KAAK,WAAW;QACpB,OAAO,WAAW,CAAA;IACpB,CAAC;IAED,MAAM,KAAK,KAAK;QACd,OAAO,wBAAK,CAAA;IACd,CAAC;IAED,MAAM,KAAK,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;AAnPD,kCAmPC","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 if (node.sources[f]) {\n for (const s of node.sources[f]) {\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 if (!node.sources[f]?.length) return true\n else {\n for (const s of node.sources[f]) {\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":"json-file.d.ts","sourceRoot":"","sources":["../../
|
|
1
|
+
{"version":3,"file":"json-file.d.ts","sourceRoot":"","sources":["../../src/json-file.ts"],"names":[],"mappings":"AAKA,eAAO,MAAM,YAAY,MAAO,MAAM,QAMrC,CAAA;AAED,eAAO,MAAM,QAAQ,MAAO,MAAM,iBAGZ,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"json-file.js","sourceRoot":"","sources":["../../
|
|
1
|
+
{"version":3,"file":"json-file.js","sourceRoot":"","sources":["../../src/json-file.ts"],"names":[],"mappings":";AAAA,iEAAiE;;;AAEjE,2BAAiC;AACjC,0CAAsC;AAE/B,MAAM,YAAY,GAAG,CAAC,CAAS,EAAE,EAAE;IACxC,IAAI;QACF,OAAO,IAAI,CAAC,KAAK,CAAC,IAAA,iBAAY,EAAC,CAAC,EAAE,MAAM,CAAC,CAAC,CAAA;KAC3C;IAAC,OAAO,CAAC,EAAE;QACV,OAAO,EAAE,CAAA;KACV;AACH,CAAC,CAAA;AANY,QAAA,YAAY,gBAMxB;AAEM,MAAM,QAAQ,GAAG,CAAC,CAAS,EAAE,EAAE,CACpC,IAAA,mBAAQ,EAAC,CAAC,EAAE,MAAM,CAAC;KAChB,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;KACxB,KAAK,CAAC,GAAG,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC,CAAA;AAHT,QAAA,QAAQ,YAGC","sourcesContent":["// read the file and json decode it, if anything fails, return {}\n\nimport { readFileSync } from 'fs'\nimport { readFile } from 'fs/promises'\n\nexport const safeJSONSync = (f: string) => {\n try {\n return JSON.parse(readFileSync(f, 'utf8'))\n } catch (e) {\n return {}\n }\n}\n\nexport const safeJSON = (f: string) =>\n readFile(f, 'utf8')\n .then(d => JSON.parse(d))\n .catch(() => ({}))\n"]}
|