@tapjs/processinfo 3.1.8 → 3.1.10
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 +0 -4
- package/dist/commonjs/child_process.d.ts.map +1 -1
- package/dist/commonjs/child_process.js +8 -8
- package/dist/commonjs/child_process.js.map +1 -1
- package/dist/commonjs/find-source-map-safe.d.ts.map +1 -1
- package/dist/commonjs/find-source-map-safe.js.map +1 -1
- package/dist/commonjs/get-exclude.d.ts.map +1 -1
- package/dist/commonjs/get-exclude.js.map +1 -1
- package/dist/commonjs/get-import-meta-url-cjs.d.cts.map +1 -1
- package/dist/commonjs/get-main.d.ts.map +1 -1
- package/dist/commonjs/get-main.js +5 -9
- package/dist/commonjs/get-main.js.map +1 -1
- package/dist/commonjs/get-process-info.js.map +1 -1
- package/dist/commonjs/index.js.map +1 -1
- package/dist/commonjs/json-file.d.ts.map +1 -1
- package/dist/commonjs/json-file.js.map +1 -1
- package/dist/commonjs/line-lengths.d.ts +0 -1
- package/dist/commonjs/line-lengths.d.ts.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/lookup-sources.d.ts.map +1 -1
- package/dist/commonjs/lookup-sources.js.map +1 -1
- package/dist/commonjs/node-options-env.d.ts +0 -4
- 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 +0 -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 +0 -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/set-sources.d.ts.map +1 -1
- package/dist/commonjs/set-sources.js.map +1 -1
- package/dist/commonjs/spawn-opts.d.ts.map +1 -1
- package/dist/commonjs/spawn-opts.js.map +1 -1
- package/dist/commonjs/url-to-path.d.ts.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 +0 -4
- package/dist/esm/child_process.d.ts.map +1 -1
- package/dist/esm/child_process.js +1 -0
- package/dist/esm/child_process.js.map +1 -1
- package/dist/esm/find-source-map-safe.d.ts.map +1 -1
- package/dist/esm/find-source-map-safe.js.map +1 -1
- package/dist/esm/get-exclude.d.ts.map +1 -1
- package/dist/esm/get-exclude.js.map +1 -1
- package/dist/esm/get-import-meta-url.d.ts.map +1 -1
- package/dist/esm/get-main.d.ts.map +1 -1
- package/dist/esm/get-main.js +5 -9
- package/dist/esm/get-main.js.map +1 -1
- package/dist/esm/get-process-info.js.map +1 -1
- package/dist/esm/hooks.d.mts.map +1 -1
- package/dist/esm/hooks.mjs.map +1 -1
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/json-file.d.ts.map +1 -1
- package/dist/esm/json-file.js.map +1 -1
- package/dist/esm/line-lengths.d.ts +0 -1
- package/dist/esm/line-lengths.d.ts.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/lookup-sources.d.ts.map +1 -1
- package/dist/esm/lookup-sources.js.map +1 -1
- package/dist/esm/node-options-env.d.ts +0 -4
- 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 +0 -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 +0 -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/set-sources.d.ts.map +1 -1
- package/dist/esm/set-sources.js.map +1 -1
- package/dist/esm/spawn-opts.d.ts.map +1 -1
- package/dist/esm/spawn-opts.js.map +1 -1
- package/dist/esm/url-to-path.d.ts.map +1 -1
- package/package.json +13 -18
- 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,
|
|
1
|
+
{"version":3,"file":"canonical-source.d.ts","sourceRoot":"","sources":["../../src/canonical-source.ts"],"names":[],"mappings":"AASA,eAAO,MAAM,eAAe,GAAI,GAAG,MAAM,KAAG,MAe3C,CAAA;AAED,eAAO,MAAM,aAAa,GAAI,GAAG,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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C;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,CAAC;QACzB,CAAC,GAAG,CAAC,CAAC,OAAO,CAAC,sBAAsB,EAAE,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,WAAW,EAAE,CAAC,CAAA;IAC/D,CAAC;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,7 +1,3 @@
|
|
|
1
|
-
/// <reference types="node" />
|
|
2
|
-
/// <reference types="node" />
|
|
3
|
-
/// <reference types="node" />
|
|
4
|
-
/// <reference types="node" />
|
|
5
1
|
import { ChildProcess, ChildProcessByStdio, ChildProcessWithoutNullStreams, ExecException, ExecFileException, ExecFileOptions, ExecFileOptionsWithBufferEncoding, ExecFileOptionsWithOtherEncoding, ExecFileOptionsWithStringEncoding, ExecFileSyncOptions, ExecFileSyncOptionsWithBufferEncoding, ExecFileSyncOptionsWithStringEncoding, ExecOptions, ExecSyncOptions, ExecSyncOptionsWithBufferEncoding, ExecSyncOptionsWithStringEncoding, ForkOptions, PromiseWithChild, SpawnOptions, SpawnOptionsWithoutStdio, SpawnOptionsWithStdioTuple, SpawnSyncOptions, SpawnSyncOptionsWithBufferEncoding, SpawnSyncOptionsWithStringEncoding, SpawnSyncReturns, StdioNull, StdioPipe } from 'child_process';
|
|
6
2
|
import type { ObjectEncodingOptions } from 'fs';
|
|
7
3
|
import type { Readable, Writable } from 'stream';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"child_process.d.ts","sourceRoot":"","sources":["../../src/child_process.ts"],"names":[],"mappings":";;;;AAEA,OAAO,EACL,YAAY,EACZ,mBAAmB,EACnB,8BAA8B,EAE9B,aAAa,EAEb,iBAAiB,EACjB,eAAe,EACf,iCAAiC,EACjC,gCAAgC,EAChC,iCAAiC,EAEjC,mBAAmB,EACnB,qCAAqC,EACrC,qCAAqC,EACrC,WAAW,EAEX,eAAe,EACf,iCAAiC,EACjC,iCAAiC,EAEjC,WAAW,EACX,gBAAgB,EAEhB,YAAY,EACZ,wBAAwB,EACxB,0BAA0B,EAE1B,gBAAgB,EAChB,kCAAkC,EAClC,kCAAkC,EAClC,gBAAgB,EAChB,SAAS,EACT,SAAS,EACV,MAAM,eAAe,CAAA;AACtB,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,IAAI,CAAA;AAC/C,OAAO,KAAK,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,QAAQ,CAAA;AAEhD,OAAO,EAAa,cAAc,EAAE,MAAM,iBAAiB,CAAA;AAqB3D,wBAAgB,KAAK,CACnB,OAAO,EAAE,MAAM,EACf,OAAO,CAAC,EAAE,cAAc,CAAC,wBAAwB,CA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,EAAE,MAAM,EACZ,IAAI,EAAE,aAAa,CAAC,MAAM,CAAC,EAC3B,OAAO,EAAE,cAAc,CAAC,qCAAqC,CAAC,GAC7D,MAAM,CAAA;AACT,wBAAgB,YAAY,CAC1B,IAAI,EAAE,MAAM,EACZ,IAAI,EAAE,aAAa,CAAC,MAAM,CAAC,EAC3B,OAAO,EAAE,cAAc,CAAC,qCAAqC,CAAC,GAC7D,MAAM,CAAA;AACT,wBAAgB,YAAY,CAC1B,IAAI,EAAE,MAAM,EACZ,IAAI,CAAC,EAAE,aAAa,CAAC,MAAM,CAAC,EAC5B,OAAO,CAAC,EAAE,cAAc,CAAC,mBAAmB,CAAC,GAC5C,MAAM,GAAG,MAAM,CAAA;AAgClB,wBAAgB,IAAI,CAClB,UAAU,EAAE,MAAM,EAClB,OAAO,CAAC,EAAE,WAAW,GACpB,YAAY,CAAA;AACf,wBAAgB,IAAI,CAClB,UAAU,EAAE,MAAM,EAClB,IAAI,CAAC,EAAE,aAAa,CAAC,MAAM,CAAC,EAC5B,OAAO,CAAC,EAAE,cAAc,CAAC,WAAW,CAAC,GACpC,YAAY,CAAA"}
|
|
@@ -1,6 +1,12 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.spawn = spawn;
|
|
4
|
+
exports.spawnSync = spawnSync;
|
|
5
|
+
exports.exec = exec;
|
|
6
|
+
exports.execSync = execSync;
|
|
7
|
+
exports.execFile = execFile;
|
|
8
|
+
exports.execFileSync = execFileSync;
|
|
9
|
+
exports.fork = fork;
|
|
4
10
|
// This wraps all of the various spawn methods such that externalID can be
|
|
5
11
|
// set in the options, and ensuring that the proper envs get set.
|
|
6
12
|
const child_process_1 = require("child_process");
|
|
@@ -22,7 +28,6 @@ function spawn(cmd, args, options) {
|
|
|
22
28
|
}
|
|
23
29
|
return (0, child_process_1.spawn)(cmd, args || [], (0, spawn_opts_js_1.spawnOpts)(options || {}, (0, get_exclude_js_1.getExclude)(k), args));
|
|
24
30
|
}
|
|
25
|
-
exports.spawn = spawn;
|
|
26
31
|
function spawnSync(cmd, args, options) {
|
|
27
32
|
if (isNotArray(args)) {
|
|
28
33
|
options = args;
|
|
@@ -30,10 +35,10 @@ function spawnSync(cmd, args, options) {
|
|
|
30
35
|
}
|
|
31
36
|
return (0, child_process_1.spawnSync)(cmd, args || [], (0, spawn_opts_js_1.spawnOpts)(options || {}, (0, get_exclude_js_1.getExclude)(k), args));
|
|
32
37
|
}
|
|
33
|
-
exports.spawnSync = spawnSync;
|
|
34
38
|
function exec(...args) {
|
|
35
39
|
const [cmd, options, callback] = args;
|
|
36
40
|
if (typeof options === 'function') {
|
|
41
|
+
//@ts-ignore
|
|
37
42
|
return (0, child_process_1.exec)(cmd, (0, spawn_opts_js_1.spawnOpts)({}, (0, get_exclude_js_1.getExclude)(k), []), options);
|
|
38
43
|
}
|
|
39
44
|
else if (!options) {
|
|
@@ -41,7 +46,6 @@ function exec(...args) {
|
|
|
41
46
|
}
|
|
42
47
|
return (0, child_process_1.exec)(cmd, (0, spawn_opts_js_1.spawnOpts)(options, (0, get_exclude_js_1.getExclude)(k), []), callback);
|
|
43
48
|
}
|
|
44
|
-
exports.exec = exec;
|
|
45
49
|
(function (exec) {
|
|
46
50
|
function __promisify__(command, options) {
|
|
47
51
|
return customPromisify(child_process_1.exec)(command, (0, spawn_opts_js_1.spawnOpts)(options || {}, (0, get_exclude_js_1.getExclude)(k)));
|
|
@@ -53,7 +57,6 @@ exports.exec = exec;
|
|
|
53
57
|
function execSync(cmd, options) {
|
|
54
58
|
return (0, child_process_1.execSync)(cmd, (0, spawn_opts_js_1.spawnOpts)(options || {}, (0, get_exclude_js_1.getExclude)(k)));
|
|
55
59
|
}
|
|
56
|
-
exports.execSync = execSync;
|
|
57
60
|
function execFile(file, ...execFileArgs) {
|
|
58
61
|
let args = [];
|
|
59
62
|
let options = {};
|
|
@@ -73,7 +76,6 @@ function execFile(file, ...execFileArgs) {
|
|
|
73
76
|
}
|
|
74
77
|
return (0, child_process_1.execFile)(file, args, (0, spawn_opts_js_1.spawnOpts)(options, (0, get_exclude_js_1.getExclude)(k), args), callback);
|
|
75
78
|
}
|
|
76
|
-
exports.execFile = execFile;
|
|
77
79
|
(function (execFile) {
|
|
78
80
|
function __promisify__(file, args, options) {
|
|
79
81
|
if (!!args &&
|
|
@@ -97,7 +99,6 @@ function execFileSync(file, args, options) {
|
|
|
97
99
|
}
|
|
98
100
|
return (0, child_process_1.execFileSync)(file, args || [], (0, spawn_opts_js_1.spawnOpts)(options || {}, (0, get_exclude_js_1.getExclude)(k), args));
|
|
99
101
|
}
|
|
100
|
-
exports.execFileSync = execFileSync;
|
|
101
102
|
function fork(modulePath, args, options) {
|
|
102
103
|
if (isNotArray(args)) {
|
|
103
104
|
options = args;
|
|
@@ -105,5 +106,4 @@ function fork(modulePath, args, options) {
|
|
|
105
106
|
}
|
|
106
107
|
return (0, child_process_1.fork)(modulePath, args, (0, spawn_opts_js_1.spawnOpts)(options || {}, (0, get_exclude_js_1.getExclude)(k), args));
|
|
107
108
|
}
|
|
108
|
-
exports.fork = fork;
|
|
109
109
|
//# sourceMappingURL=child_process.js.map
|
|
@@ -1 +1 @@
|
|
|
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,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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":";;AAyKA,sBAiCC;AAmCD,8BAqBC;AAuED,oBA8BC;AAuFD,4BAYC;AAkID,4BA4BC;AAiLD,oCA6BC;AAWD,oBAcC;AA/0BD,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,CAA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BAAU,EAAC,CAAC,CAAC,EAAE,IAAI,CAAC,CAC9C,CAAA;AACH,CAAC;AAWD,SAAgB,IAAI,CAClB,UAAkB,EAClB,IAA0C,EAC1C,OAAqC;IAErC,IAAI,UAAU,CAAc,IAAI,CAAC,EAAE,CAAC;QAClC,OAAO,GAAG,IAAI,CAAA;QACd,IAAI,GAAG,EAAE,CAAA;IACX,CAAC;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","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): SpawnSyncReturns<string | Buffer> {\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 //@ts-ignore\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.d.ts","sourceRoot":"","sources":["../../src/find-source-map-safe.ts"],"names":[],"mappings":"AAAA,OAAO,EAAiB,SAAS,EAAE,MAAM,QAAQ,CAAA;AAKjD,eAAO,MAAM,iBAAiB,
|
|
1
|
+
{"version":3,"file":"find-source-map-safe.d.ts","sourceRoot":"","sources":["../../src/find-source-map-safe.ts"],"names":[],"mappings":"AAAA,OAAO,EAAiB,SAAS,EAAE,MAAM,QAAQ,CAAA;AAKjD,eAAO,MAAM,iBAAiB,GAC5B,GAAG,MAAM,GAAG,GAAG,KACd,KAAK,GAAG,SAAS,GAAG,SAkBtB,CAAA"}
|
|
@@ -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;
|
|
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,CAAC;QACH,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;IACvB,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,KAAK,CAAA;IACd,CAAC;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-exclude.d.ts","sourceRoot":"","sources":["../../src/get-exclude.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,cAAc,QACuG,CAAA;AAgBlI,eAAO,MAAM,UAAU,
|
|
1
|
+
{"version":3,"file":"get-exclude.d.ts","sourceRoot":"","sources":["../../src/get-exclude.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,cAAc,QACuG,CAAA;AAgBlI,eAAO,MAAM,UAAU,GAAI,GAAG,MAAM,EAAE,oBAAiB,WAKtD,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
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,CAEjB,CAAA;IAC5B,IAAI,MAAM,EAAE;
|
|
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,CAEjB,CAAA;IAC5B,IAAI,MAAM,EAAE,CAAC;QACX,IAAI,CAAC;YACH,OAAO,IAAI,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,MAAM,CAAC,CAAC,CAAC,CAAC,CAAA;QACzC,CAAC;QAAC,OAAO,CAAC,EAAE,CAAC,CAAA,CAAC;IAChB,CAAC;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]*)$/) as\n | null\n | [string, string, string]\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"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"get-import-meta-url-cjs.d.cts","sourceRoot":"","sources":["../../src/get-import-meta-url-cjs.cts"],"names":[],"mappings":"AAOA,eAAO,MAAM,gBAAgB,
|
|
1
|
+
{"version":3,"file":"get-import-meta-url-cjs.d.cts","sourceRoot":"","sources":["../../src/get-import-meta-url-cjs.cts"],"names":[],"mappings":"AAOA,eAAO,MAAM,gBAAgB,GAAI,QAAQ,MAAM,WACK,CAAA"}
|
|
@@ -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":"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,+BAA8B;AAC9B,+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;AAED,4DAA4D;AACrD,MAAM,KAAK,GAAG,GAAG,EAAE;IACxB,CAAC,CAAC,YAAY,CAAC,GAAG,SAAS,CAAA;IAC3B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Y,CAAC,CAAC,IAAI,GAAG,MAAM,CAAC,MAAM,CAAC,CAAA;IACvC,CAAC;IACD,oDAAoD;IACpD,MAAM,CAAC,QAAQ,EAAE,CAAC,CAAC,YAAY,CAAC,CAAC,IAAI,CAAC,CAAA;IACtC,MAAM,UAAU,GAAG,MAAM,CAAC,aAAa,CAAC,CAAA;IACxC,IAAI,UAAU,EAAE,CAAC;QACf,CAAC,CAAC,YAAY,CAAC,CAAC,UAAU,GAAG,UAAU,CAAA;QACvC,gEAAgE;QAChE,MAAM,CAAC,aAAa,CAAC,CAAA;IACvB,CAAC;IAED,kDAAkD;IAClD,iEAAiE;IACjE,sCAAsC;IACtC,qBAAqB;IACrB,IACE,OAAO,CAAC,GAAG,CAAC,yCAAyC;QACrD,MAAM,CAAC,OAAO,CAAC,GAAG,CAAC,EACnB,CAAC;QACD,IAAA,8BAAe,GAAE,CAAA;QACjB,IAAA,0BAAW,GAAE,CAAA;QACb,IAAA,+BAAgB,GAAE,CAAA;QAClB,IAAA,kCAAkB,GAAE,CAAA;IACtB,CAAC;IACD,oBAAoB;IAEpB,OAAO,CAAC,CAAC,YAAY,CAAC,CAAA;AACxB,CAAC,CAAA;AArDY,QAAA,cAAc,kBAqD1B","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 { resolve } from 'path'\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 if (process.env.TAP_BEFORE)\n g[kProcessInfo].files.push(resolve(process.env.TAP_BEFORE))\n if (process.env.TAP_AFTER)\n g[kProcessInfo].files.push(resolve(process.env.TAP_AFTER))\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"]}
|
|
@@ -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,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,EAAE,CAAA;QACf,OAAO,EAAE,CAAA;IACX,CAAC;IAED,MAAM,CAAC,QAAQ,CA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AAI,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;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,CA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C,IAAI,IAAI,CAAC,WAAW,CAAC,OAAO,EAAE,EAAE,CAAC;YACpD,IAAI,MAAM,CAAC,EAAE,EAAE,IAAI,CAAC,IAAI,IAAI,CAAC,cAAc,CAAC,IAAI,EAAE,KAAK,EAAE,OAAO,CAAC,EAAE,CAAC;gBAClE,OAAO,CAAC,GAAG,CAAC,EAAE,EAAE,IAAI,CAAC,CAAA;YACvB,CAAC;QACH,CAAC;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;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 +1 @@
|
|
|
1
|
-
{"version":3,"file":"json-file.d.ts","sourceRoot":"","sources":["../../src/json-file.ts"],"names":[],"mappings":"AAKA,eAAO,MAAM,YAAY,
|
|
1
|
+
{"version":3,"file":"json-file.d.ts","sourceRoot":"","sources":["../../src/json-file.ts"],"names":[],"mappings":"AAKA,eAAO,MAAM,YAAY,GAAI,GAAG,MAAM,QAMrC,CAAA;AAED,eAAO,MAAM,QAAQ,GAAI,GAAG,MAAM,iBAGZ,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
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;
|
|
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,CAAC;QACH,OAAO,IAAI,CAAC,KAAK,CAAC,IAAA,iBAAY,EAAC,CAAC,EAAE,MAAM,CAAC,CAAC,CAAA;IAC5C,CAAC;IAAC,OAAO,CAAC,EAAE,CAAC;QACX,OAAO,EAAE,CAAA;IACX,CAAC;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"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"line-lengths.d.ts","sourceRoot":"","sources":["../../src/line-lengths.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"line-lengths.d.ts","sourceRoot":"","sources":["../../src/line-lengths.ts"],"names":[],"mappings":"AAYA,eAAO,MAAM,eAAe,GAC1B,UAAU,MAAM,EAChB,UAAU,MAAM,GAAG,MAAM,SAa1B,CAA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AAA;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
|
|
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"]}
|