@modern-js/utils 2.12.1-alpha.1 → 2.12.1-alpha.3
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/cjs/compiled.js +3 -3
- package/dist/cjs/import.js +1 -1
- package/dist/compiled/address/index.js +1 -0
- package/dist/compiled/address/lib/address.d.ts +28 -0
- package/dist/compiled/address/package.json +1 -0
- package/dist/compiled/ajv/codegen.js +1 -0
- package/dist/compiled/ajv/index.js +9 -0
- package/dist/compiled/ajv/license +22 -0
- package/dist/compiled/ajv/package.json +1 -0
- package/dist/compiled/ajv/types/ajv.d.ts +16 -0
- package/dist/compiled/ajv/types/compile/codegen/code.d.ts +40 -0
- package/dist/compiled/ajv/types/compile/codegen/index.d.ts +79 -0
- package/dist/compiled/ajv/types/compile/codegen/scope.d.ts +79 -0
- package/dist/compiled/ajv/types/compile/errors.d.ts +13 -0
- package/dist/compiled/ajv/types/compile/index.d.ts +80 -0
- package/dist/compiled/ajv/types/compile/ref_error.d.ts +6 -0
- package/dist/compiled/ajv/types/compile/resolve.d.ts +12 -0
- package/dist/compiled/ajv/types/compile/rules.d.ts +28 -0
- package/dist/compiled/ajv/types/compile/util.d.ts +40 -0
- package/dist/compiled/ajv/types/compile/validate/index.d.ts +42 -0
- package/dist/compiled/ajv/types/compile/validate/subschema.d.ts +47 -0
- package/dist/compiled/ajv/types/core.d.ts +173 -0
- package/dist/compiled/ajv/types/runtime/validation_error.d.ts +7 -0
- package/dist/compiled/ajv/types/types/index.d.ts +183 -0
- package/dist/compiled/ajv/types/types/json-schema.d.ts +124 -0
- package/dist/compiled/ajv/types/types/jtd-schema.d.ts +169 -0
- package/dist/compiled/ajv/types/vocabularies/errors.d.ts +1 -0
- package/dist/compiled/ajv/uri-js.d.ts +59 -0
- package/dist/compiled/ajv-keywords/index.d.ts +1 -0
- package/dist/compiled/ajv-keywords/index.js +1 -0
- package/dist/compiled/ajv-keywords/license +21 -0
- package/dist/compiled/ajv-keywords/package.json +1 -0
- package/dist/compiled/better-ajv-errors/index.d.ts +1 -0
- package/dist/compiled/better-ajv-errors/index.js +1 -0
- package/dist/compiled/better-ajv-errors/license +13 -0
- package/dist/compiled/better-ajv-errors/package.json +1 -0
- package/dist/compiled/browserslist/index.d.ts +178 -0
- package/dist/compiled/browserslist/index.js +1 -0
- package/dist/compiled/browserslist/license +20 -0
- package/dist/compiled/browserslist/package.json +1 -0
- package/dist/compiled/chalk/index.d.ts +415 -0
- package/dist/compiled/chalk/index.js +1 -0
- package/dist/compiled/chalk/license +9 -0
- package/dist/compiled/chalk/package.json +1 -0
- package/dist/compiled/chokidar/anymatch/index.d.ts +19 -0
- package/dist/compiled/chokidar/fsevents.node +0 -0
- package/dist/compiled/chokidar/index.js +40 -0
- package/dist/compiled/chokidar/license +21 -0
- package/dist/compiled/chokidar/package.json +1 -0
- package/dist/compiled/chokidar/types/index.d.ts +188 -0
- package/dist/compiled/commander/index.js +1 -0
- package/dist/compiled/commander/license +22 -0
- package/dist/compiled/commander/package.json +1 -0
- package/dist/compiled/commander/typings/index.d.ts +890 -0
- package/dist/compiled/debug/index.d.ts +54 -0
- package/dist/compiled/debug/index.js +1 -0
- package/dist/compiled/debug/license +20 -0
- package/dist/compiled/debug/ms/index.d.ts +25 -0
- package/dist/compiled/debug/package.json +1 -0
- package/dist/compiled/dotenv/index.js +1 -0
- package/dist/compiled/dotenv/license +23 -0
- package/dist/compiled/dotenv/package.json +1 -0
- package/dist/compiled/dotenv/types/index.d.ts +59 -0
- package/dist/compiled/dotenv-expand/index.d.ts +15 -0
- package/dist/compiled/dotenv-expand/index.js +1 -0
- package/dist/compiled/dotenv-expand/license +24 -0
- package/dist/compiled/dotenv-expand/package.json +1 -0
- package/dist/compiled/execa/index.d.ts +564 -0
- package/dist/compiled/execa/index.js +1 -0
- package/dist/compiled/execa/license +9 -0
- package/dist/compiled/execa/package.json +1 -0
- package/dist/compiled/fast-glob/@nodelib/fs.scandir/out/adapters/fs.d.ts +20 -0
- package/dist/compiled/fast-glob/@nodelib/fs.scandir/out/index.d.ts +12 -0
- package/dist/compiled/fast-glob/@nodelib/fs.scandir/out/providers/async.d.ts +7 -0
- package/dist/compiled/fast-glob/@nodelib/fs.scandir/out/settings.d.ts +20 -0
- package/dist/compiled/fast-glob/@nodelib/fs.scandir/out/types/index.d.ts +20 -0
- package/dist/compiled/fast-glob/@nodelib/fs.stat/out/adapters/fs.d.ts +13 -0
- package/dist/compiled/fast-glob/@nodelib/fs.stat/out/index.d.ts +12 -0
- package/dist/compiled/fast-glob/@nodelib/fs.stat/out/providers/async.d.ts +4 -0
- package/dist/compiled/fast-glob/@nodelib/fs.stat/out/settings.d.ts +16 -0
- package/dist/compiled/fast-glob/@nodelib/fs.stat/out/types/index.d.ts +4 -0
- package/dist/compiled/fast-glob/@nodelib/fs.walk/out/index.d.ts +14 -0
- package/dist/compiled/fast-glob/@nodelib/fs.walk/out/providers/async.d.ts +12 -0
- package/dist/compiled/fast-glob/@nodelib/fs.walk/out/readers/async.d.ts +30 -0
- package/dist/compiled/fast-glob/@nodelib/fs.walk/out/readers/reader.d.ts +6 -0
- package/dist/compiled/fast-glob/@nodelib/fs.walk/out/settings.d.ts +30 -0
- package/dist/compiled/fast-glob/@nodelib/fs.walk/out/types/index.d.ts +8 -0
- package/dist/compiled/fast-glob/index.js +37 -0
- package/dist/compiled/fast-glob/license +21 -0
- package/dist/compiled/fast-glob/out/index.d.ts +27 -0
- package/dist/compiled/fast-glob/out/managers/tasks.d.ts +22 -0
- package/dist/compiled/fast-glob/out/settings.d.ts +164 -0
- package/dist/compiled/fast-glob/out/types/index.d.ts +31 -0
- package/dist/compiled/fast-glob/package.json +1 -0
- package/dist/compiled/filesize/filesize.d.ts +131 -0
- package/dist/compiled/filesize/index.js +9 -0
- package/dist/compiled/filesize/license +28 -0
- package/dist/compiled/filesize/package.json +1 -0
- package/dist/compiled/fs-extra/index.d.ts +563 -0
- package/dist/compiled/fs-extra/index.js +1 -0
- package/dist/compiled/fs-extra/license +15 -0
- package/dist/compiled/fs-extra/package.json +1 -0
- package/dist/compiled/glob/index.d.ts +91 -0
- package/dist/compiled/glob/index.js +1 -0
- package/dist/compiled/glob/license +21 -0
- package/dist/compiled/glob/minimatch/index.d.ts +204 -0
- package/dist/compiled/glob/package.json +1 -0
- package/dist/compiled/globby/index.d.ts +186 -0
- package/dist/compiled/globby/index.js +1 -0
- package/dist/compiled/globby/license +9 -0
- package/dist/compiled/globby/package.json +1 -0
- package/dist/compiled/gzip-size/index.d.ts +96 -0
- package/dist/compiled/gzip-size/index.js +1 -0
- package/dist/compiled/gzip-size/license +9 -0
- package/dist/compiled/gzip-size/package.json +1 -0
- package/dist/compiled/import-lazy/index.d.ts +26 -0
- package/dist/compiled/import-lazy/index.js +1 -0
- package/dist/compiled/import-lazy/license +9 -0
- package/dist/compiled/import-lazy/package.json +1 -0
- package/dist/compiled/inquirer/index.d.ts +997 -0
- package/dist/compiled/inquirer/index.js +9 -0
- package/dist/compiled/inquirer/lib/objects/choice.d.ts +65 -0
- package/dist/compiled/inquirer/lib/objects/choices.d.ts +206 -0
- package/dist/compiled/inquirer/lib/objects/separator.d.ts +37 -0
- package/dist/compiled/inquirer/lib/ui/baseUI.d.ts +37 -0
- package/dist/compiled/inquirer/lib/ui/bottom-bar.d.ts +65 -0
- package/dist/compiled/inquirer/lib/ui/prompt.d.ts +104 -0
- package/dist/compiled/inquirer/license +22 -0
- package/dist/compiled/inquirer/package.json +1 -0
- package/dist/compiled/inquirer/through/index.d.ts +25 -0
- package/dist/compiled/js-yaml/index.d.ts +154 -0
- package/dist/compiled/js-yaml/index.js +1 -0
- package/dist/compiled/js-yaml/license +21 -0
- package/dist/compiled/js-yaml/package.json +1 -0
- package/dist/compiled/json5/index.js +1 -0
- package/dist/compiled/json5/lib/index.d.ts +4 -0
- package/dist/compiled/json5/lib/parse.d.ts +15 -0
- package/dist/compiled/json5/lib/stringify.d.ts +89 -0
- package/dist/compiled/json5/package.json +1 -0
- package/dist/compiled/lodash/common/array.d.ts +2126 -0
- package/dist/compiled/lodash/common/collection.d.ts +1930 -0
- package/dist/compiled/lodash/common/common.d.ts +280 -0
- package/dist/compiled/lodash/common/date.d.ts +23 -0
- package/dist/compiled/lodash/common/function.d.ts +1446 -0
- package/dist/compiled/lodash/common/lang.d.ts +1693 -0
- package/dist/compiled/lodash/common/math.d.ts +405 -0
- package/dist/compiled/lodash/common/number.d.ts +131 -0
- package/dist/compiled/lodash/common/object.d.ts +2519 -0
- package/dist/compiled/lodash/common/seq.d.ts +210 -0
- package/dist/compiled/lodash/common/string.d.ts +788 -0
- package/dist/compiled/lodash/common/util.d.ts +1220 -0
- package/dist/compiled/lodash/index.d.ts +46 -0
- package/dist/compiled/lodash/index.js +5 -0
- package/dist/compiled/lodash/license +47 -0
- package/dist/compiled/lodash/package.json +1 -0
- package/dist/compiled/mime-types/index.d.ts +14 -0
- package/dist/compiled/mime-types/index.js +14 -0
- package/dist/compiled/mime-types/license +23 -0
- package/dist/compiled/mime-types/package.json +1 -0
- package/dist/compiled/minimist/index.d.ts +95 -0
- package/dist/compiled/minimist/index.js +1 -0
- package/dist/compiled/minimist/license +18 -0
- package/dist/compiled/minimist/package.json +1 -0
- package/dist/compiled/nanoid/index.d.ts +91 -0
- package/dist/compiled/nanoid/index.js +1 -0
- package/dist/compiled/nanoid/license +20 -0
- package/dist/compiled/nanoid/package.json +1 -0
- package/dist/compiled/ora/cli-spinners/index.d.ts +125 -0
- package/dist/compiled/ora/index.d.ts +277 -0
- package/dist/compiled/ora/index.js +3 -0
- package/dist/compiled/ora/license +9 -0
- package/dist/compiled/ora/package.json +1 -0
- package/dist/compiled/pkg-up/index.d.ts +48 -0
- package/dist/compiled/pkg-up/index.js +1 -0
- package/dist/compiled/pkg-up/license +9 -0
- package/dist/compiled/pkg-up/package.json +1 -0
- package/dist/compiled/recursive-readdir/index.d.ts +21 -0
- package/dist/compiled/recursive-readdir/index.js +1 -0
- package/dist/compiled/recursive-readdir/license +21 -0
- package/dist/compiled/recursive-readdir/package.json +1 -0
- package/dist/compiled/schema-utils3/index.d.ts +1 -0
- package/dist/compiled/schema-utils3/index.js +3 -0
- package/dist/compiled/schema-utils3/license +20 -0
- package/dist/compiled/schema-utils3/package.json +1 -0
- package/dist/compiled/semver/classes/comparator.d.ts +17 -0
- package/dist/compiled/semver/classes/range.d.ts +21 -0
- package/dist/compiled/semver/classes/semver.d.ts +62 -0
- package/dist/compiled/semver/functions/clean.d.ts +8 -0
- package/dist/compiled/semver/functions/cmp.d.ts +16 -0
- package/dist/compiled/semver/functions/coerce.d.ts +12 -0
- package/dist/compiled/semver/functions/compare-build.d.ts +16 -0
- package/dist/compiled/semver/functions/compare-loose.d.ts +5 -0
- package/dist/compiled/semver/functions/compare.d.ts +20 -0
- package/dist/compiled/semver/functions/diff.d.ts +13 -0
- package/dist/compiled/semver/functions/eq.d.ts +9 -0
- package/dist/compiled/semver/functions/gt.d.ts +9 -0
- package/dist/compiled/semver/functions/gte.d.ts +9 -0
- package/dist/compiled/semver/functions/inc.d.ts +15 -0
- package/dist/compiled/semver/functions/lt.d.ts +9 -0
- package/dist/compiled/semver/functions/lte.d.ts +8 -0
- package/dist/compiled/semver/functions/major.d.ts +9 -0
- package/dist/compiled/semver/functions/minor.d.ts +9 -0
- package/dist/compiled/semver/functions/neq.d.ts +9 -0
- package/dist/compiled/semver/functions/parse.d.ts +12 -0
- package/dist/compiled/semver/functions/patch.d.ts +9 -0
- package/dist/compiled/semver/functions/prerelease.d.ts +12 -0
- package/dist/compiled/semver/functions/rcompare.d.ts +15 -0
- package/dist/compiled/semver/functions/rsort.d.ts +9 -0
- package/dist/compiled/semver/functions/satisfies.d.ts +14 -0
- package/dist/compiled/semver/functions/sort.d.ts +9 -0
- package/dist/compiled/semver/functions/valid.d.ts +11 -0
- package/dist/compiled/semver/index.d.ts +133 -0
- package/dist/compiled/semver/index.js +1 -0
- package/dist/compiled/semver/internals/identifiers.d.ts +13 -0
- package/dist/compiled/semver/license +15 -0
- package/dist/compiled/semver/package.json +1 -0
- package/dist/compiled/semver/ranges/gtr.d.ts +14 -0
- package/dist/compiled/semver/ranges/intersects.d.ts +13 -0
- package/dist/compiled/semver/ranges/ltr.d.ts +14 -0
- package/dist/compiled/semver/ranges/max-satisfying.d.ts +14 -0
- package/dist/compiled/semver/ranges/min-satisfying.d.ts +14 -0
- package/dist/compiled/semver/ranges/min-version.d.ts +10 -0
- package/dist/compiled/semver/ranges/outside.d.ts +15 -0
- package/dist/compiled/semver/ranges/simplify.d.ts +14 -0
- package/dist/compiled/semver/ranges/subset.d.ts +13 -0
- package/dist/compiled/semver/ranges/to-comparators.d.ts +9 -0
- package/dist/compiled/semver/ranges/valid.d.ts +12 -0
- package/dist/compiled/signale/index.d.ts +162 -0
- package/dist/compiled/signale/index.js +1 -0
- package/dist/compiled/signale/package.json +1 -0
- package/dist/compiled/slash/index.d.ts +25 -0
- package/dist/compiled/slash/index.js +1 -0
- package/dist/compiled/slash/license +9 -0
- package/dist/compiled/slash/package.json +1 -0
- package/dist/compiled/strip-ansi/index.d.ts +17 -0
- package/dist/compiled/strip-ansi/index.js +1 -0
- package/dist/compiled/strip-ansi/license +9 -0
- package/dist/compiled/strip-ansi/package.json +1 -0
- package/dist/compiled/tsconfig-paths/index.js +1 -0
- package/dist/compiled/tsconfig-paths/lib/config-loader.d.ts +33 -0
- package/dist/compiled/tsconfig-paths/lib/filesystem.d.ts +34 -0
- package/dist/compiled/tsconfig-paths/lib/index.d.ts +5 -0
- package/dist/compiled/tsconfig-paths/lib/mapping-entry.d.ts +18 -0
- package/dist/compiled/tsconfig-paths/lib/match-path-async.d.ts +21 -0
- package/dist/compiled/tsconfig-paths/lib/match-path-sync.d.ts +32 -0
- package/dist/compiled/tsconfig-paths/lib/register.d.ts +12 -0
- package/dist/compiled/tsconfig-paths/lib/try-path.d.ts +15 -0
- package/dist/compiled/tsconfig-paths/lib/tsconfig-loader.d.ts +28 -0
- package/dist/compiled/tsconfig-paths/license +21 -0
- package/dist/compiled/tsconfig-paths/package.json +1 -0
- package/dist/compiled/upath/index.js +1 -0
- package/dist/compiled/upath/license +22 -0
- package/dist/compiled/upath/package.json +1 -0
- package/dist/compiled/upath/upath.d.ts +241 -0
- package/dist/compiled/url-join/index.d.ts +17 -0
- package/dist/compiled/url-join/index.js +1 -0
- package/dist/compiled/url-join/license +21 -0
- package/dist/compiled/url-join/package.json +1 -0
- package/dist/compiled/webpack-chain/index.js +1 -0
- package/dist/compiled/webpack-chain/license +373 -0
- package/dist/compiled/webpack-chain/package.json +1 -0
- package/dist/compiled/webpack-chain/types/index.d.ts +388 -0
- package/dist/compiled/webpack-dev-middleware/index.js +7 -0
- package/dist/compiled/webpack-dev-middleware/license +20 -0
- package/dist/compiled/webpack-dev-middleware/package.json +1 -0
- package/dist/compiled/webpack-dev-middleware/types/index.d.ts +262 -0
- package/dist/esm/compiled.js +3 -3
- package/dist/esm/import.js +1 -1
- package/dist/esm-node/compiled.js +3 -3
- package/dist/esm-node/import.js +1 -1
- package/package.json +1 -1
@@ -0,0 +1,564 @@
|
|
1
|
+
/// <reference types="node"/>
|
2
|
+
import {ChildProcess} from 'child_process';
|
3
|
+
import {Stream, Readable as ReadableStream} from 'stream';
|
4
|
+
|
5
|
+
declare namespace execa {
|
6
|
+
type StdioOption =
|
7
|
+
| 'pipe'
|
8
|
+
| 'ipc'
|
9
|
+
| 'ignore'
|
10
|
+
| 'inherit'
|
11
|
+
| Stream
|
12
|
+
| number
|
13
|
+
| undefined;
|
14
|
+
|
15
|
+
interface CommonOptions<EncodingType> {
|
16
|
+
/**
|
17
|
+
Kill the spawned process when the parent process exits unless either:
|
18
|
+
- the spawned process is [`detached`](https://nodejs.org/api/child_process.html#child_process_options_detached)
|
19
|
+
- the parent process is terminated abruptly, for example, with `SIGKILL` as opposed to `SIGTERM` or a normal exit
|
20
|
+
|
21
|
+
@default true
|
22
|
+
*/
|
23
|
+
readonly cleanup?: boolean;
|
24
|
+
|
25
|
+
/**
|
26
|
+
Prefer locally installed binaries when looking for a binary to execute.
|
27
|
+
|
28
|
+
If you `$ npm install foo`, you can then `execa('foo')`.
|
29
|
+
|
30
|
+
@default false
|
31
|
+
*/
|
32
|
+
readonly preferLocal?: boolean;
|
33
|
+
|
34
|
+
/**
|
35
|
+
Preferred path to find locally installed binaries in (use with `preferLocal`).
|
36
|
+
|
37
|
+
@default process.cwd()
|
38
|
+
*/
|
39
|
+
readonly localDir?: string;
|
40
|
+
|
41
|
+
/**
|
42
|
+
Path to the Node.js executable to use in child processes.
|
43
|
+
|
44
|
+
This can be either an absolute path or a path relative to the `cwd` option.
|
45
|
+
|
46
|
+
Requires `preferLocal` to be `true`.
|
47
|
+
|
48
|
+
For example, this can be used together with [`get-node`](https://github.com/ehmicky/get-node) to run a specific Node.js version in a child process.
|
49
|
+
|
50
|
+
@default process.execPath
|
51
|
+
*/
|
52
|
+
readonly execPath?: string;
|
53
|
+
|
54
|
+
/**
|
55
|
+
Buffer the output from the spawned process. When set to `false`, you must read the output of `stdout` and `stderr` (or `all` if the `all` option is `true`). Otherwise the returned promise will not be resolved/rejected.
|
56
|
+
|
57
|
+
If the spawned process fails, `error.stdout`, `error.stderr`, and `error.all` will contain the buffered data.
|
58
|
+
|
59
|
+
@default true
|
60
|
+
*/
|
61
|
+
readonly buffer?: boolean;
|
62
|
+
|
63
|
+
/**
|
64
|
+
Same options as [`stdio`](https://nodejs.org/dist/latest-v6.x/docs/api/child_process.html#child_process_options_stdio).
|
65
|
+
|
66
|
+
@default 'pipe'
|
67
|
+
*/
|
68
|
+
readonly stdin?: StdioOption;
|
69
|
+
|
70
|
+
/**
|
71
|
+
Same options as [`stdio`](https://nodejs.org/dist/latest-v6.x/docs/api/child_process.html#child_process_options_stdio).
|
72
|
+
|
73
|
+
@default 'pipe'
|
74
|
+
*/
|
75
|
+
readonly stdout?: StdioOption;
|
76
|
+
|
77
|
+
/**
|
78
|
+
Same options as [`stdio`](https://nodejs.org/dist/latest-v6.x/docs/api/child_process.html#child_process_options_stdio).
|
79
|
+
|
80
|
+
@default 'pipe'
|
81
|
+
*/
|
82
|
+
readonly stderr?: StdioOption;
|
83
|
+
|
84
|
+
/**
|
85
|
+
Setting this to `false` resolves the promise with the error instead of rejecting it.
|
86
|
+
|
87
|
+
@default true
|
88
|
+
*/
|
89
|
+
readonly reject?: boolean;
|
90
|
+
|
91
|
+
/**
|
92
|
+
Add an `.all` property on the promise and the resolved value. The property contains the output of the process with `stdout` and `stderr` interleaved.
|
93
|
+
|
94
|
+
@default false
|
95
|
+
*/
|
96
|
+
readonly all?: boolean;
|
97
|
+
|
98
|
+
/**
|
99
|
+
Strip the final [newline character](https://en.wikipedia.org/wiki/Newline) from the output.
|
100
|
+
|
101
|
+
@default true
|
102
|
+
*/
|
103
|
+
readonly stripFinalNewline?: boolean;
|
104
|
+
|
105
|
+
/**
|
106
|
+
Set to `false` if you don't want to extend the environment variables when providing the `env` property.
|
107
|
+
|
108
|
+
@default true
|
109
|
+
*/
|
110
|
+
readonly extendEnv?: boolean;
|
111
|
+
|
112
|
+
/**
|
113
|
+
Current working directory of the child process.
|
114
|
+
|
115
|
+
@default process.cwd()
|
116
|
+
*/
|
117
|
+
readonly cwd?: string;
|
118
|
+
|
119
|
+
/**
|
120
|
+
Environment key-value pairs. Extends automatically from `process.env`. Set `extendEnv` to `false` if you don't want this.
|
121
|
+
|
122
|
+
@default process.env
|
123
|
+
*/
|
124
|
+
readonly env?: NodeJS.ProcessEnv;
|
125
|
+
|
126
|
+
/**
|
127
|
+
Explicitly set the value of `argv[0]` sent to the child process. This will be set to `command` or `file` if not specified.
|
128
|
+
*/
|
129
|
+
readonly argv0?: string;
|
130
|
+
|
131
|
+
/**
|
132
|
+
Child's [stdio](https://nodejs.org/api/child_process.html#child_process_options_stdio) configuration.
|
133
|
+
|
134
|
+
@default 'pipe'
|
135
|
+
*/
|
136
|
+
readonly stdio?: 'pipe' | 'ignore' | 'inherit' | readonly StdioOption[];
|
137
|
+
|
138
|
+
/**
|
139
|
+
Specify the kind of serialization used for sending messages between processes when using the `stdio: 'ipc'` option or `execa.node()`:
|
140
|
+
- `json`: Uses `JSON.stringify()` and `JSON.parse()`.
|
141
|
+
- `advanced`: Uses [`v8.serialize()`](https://nodejs.org/api/v8.html#v8_v8_serialize_value)
|
142
|
+
|
143
|
+
Requires Node.js `13.2.0` or later.
|
144
|
+
|
145
|
+
[More info.](https://nodejs.org/api/child_process.html#child_process_advanced_serialization)
|
146
|
+
|
147
|
+
@default 'json'
|
148
|
+
*/
|
149
|
+
readonly serialization?: 'json' | 'advanced';
|
150
|
+
|
151
|
+
/**
|
152
|
+
Prepare child to run independently of its parent process. Specific behavior [depends on the platform](https://nodejs.org/api/child_process.html#child_process_options_detached).
|
153
|
+
|
154
|
+
@default false
|
155
|
+
*/
|
156
|
+
readonly detached?: boolean;
|
157
|
+
|
158
|
+
/**
|
159
|
+
Sets the user identity of the process.
|
160
|
+
*/
|
161
|
+
readonly uid?: number;
|
162
|
+
|
163
|
+
/**
|
164
|
+
Sets the group identity of the process.
|
165
|
+
*/
|
166
|
+
readonly gid?: number;
|
167
|
+
|
168
|
+
/**
|
169
|
+
If `true`, runs `command` inside of a shell. Uses `/bin/sh` on UNIX and `cmd.exe` on Windows. A different shell can be specified as a string. The shell should understand the `-c` switch on UNIX or `/d /s /c` on Windows.
|
170
|
+
|
171
|
+
We recommend against using this option since it is:
|
172
|
+
- not cross-platform, encouraging shell-specific syntax.
|
173
|
+
- slower, because of the additional shell interpretation.
|
174
|
+
- unsafe, potentially allowing command injection.
|
175
|
+
|
176
|
+
@default false
|
177
|
+
*/
|
178
|
+
readonly shell?: boolean | string;
|
179
|
+
|
180
|
+
/**
|
181
|
+
Specify the character encoding used to decode the `stdout` and `stderr` output. If set to `null`, then `stdout` and `stderr` will be a `Buffer` instead of a string.
|
182
|
+
|
183
|
+
@default 'utf8'
|
184
|
+
*/
|
185
|
+
readonly encoding?: EncodingType;
|
186
|
+
|
187
|
+
/**
|
188
|
+
If `timeout` is greater than `0`, the parent will send the signal identified by the `killSignal` property (the default is `SIGTERM`) if the child runs longer than `timeout` milliseconds.
|
189
|
+
|
190
|
+
@default 0
|
191
|
+
*/
|
192
|
+
readonly timeout?: number;
|
193
|
+
|
194
|
+
/**
|
195
|
+
Largest amount of data in bytes allowed on `stdout` or `stderr`. Default: 100 MB.
|
196
|
+
|
197
|
+
@default 100_000_000
|
198
|
+
*/
|
199
|
+
readonly maxBuffer?: number;
|
200
|
+
|
201
|
+
/**
|
202
|
+
Signal value to be used when the spawned process will be killed.
|
203
|
+
|
204
|
+
@default 'SIGTERM'
|
205
|
+
*/
|
206
|
+
readonly killSignal?: string | number;
|
207
|
+
|
208
|
+
/**
|
209
|
+
If `true`, no quoting or escaping of arguments is done on Windows. Ignored on other platforms. This is set to `true` automatically when the `shell` option is `true`.
|
210
|
+
|
211
|
+
@default false
|
212
|
+
*/
|
213
|
+
readonly windowsVerbatimArguments?: boolean;
|
214
|
+
|
215
|
+
/**
|
216
|
+
On Windows, do not create a new console window. Please note this also prevents `CTRL-C` [from working](https://github.com/nodejs/node/issues/29837) on Windows.
|
217
|
+
|
218
|
+
@default true
|
219
|
+
*/
|
220
|
+
readonly windowsHide?: boolean;
|
221
|
+
}
|
222
|
+
|
223
|
+
interface Options<EncodingType = string> extends CommonOptions<EncodingType> {
|
224
|
+
/**
|
225
|
+
Write some input to the `stdin` of your binary.
|
226
|
+
*/
|
227
|
+
readonly input?: string | Buffer | ReadableStream;
|
228
|
+
}
|
229
|
+
|
230
|
+
interface SyncOptions<EncodingType = string> extends CommonOptions<EncodingType> {
|
231
|
+
/**
|
232
|
+
Write some input to the `stdin` of your binary.
|
233
|
+
*/
|
234
|
+
readonly input?: string | Buffer;
|
235
|
+
}
|
236
|
+
|
237
|
+
interface NodeOptions<EncodingType = string> extends Options<EncodingType> {
|
238
|
+
/**
|
239
|
+
The Node.js executable to use.
|
240
|
+
|
241
|
+
@default process.execPath
|
242
|
+
*/
|
243
|
+
readonly nodePath?: string;
|
244
|
+
|
245
|
+
/**
|
246
|
+
List of [CLI options](https://nodejs.org/api/cli.html#cli_options) passed to the Node.js executable.
|
247
|
+
|
248
|
+
@default process.execArgv
|
249
|
+
*/
|
250
|
+
readonly nodeOptions?: string[];
|
251
|
+
}
|
252
|
+
|
253
|
+
interface ExecaReturnBase<StdoutStderrType> {
|
254
|
+
/**
|
255
|
+
The file and arguments that were run, for logging purposes.
|
256
|
+
|
257
|
+
This is not escaped and should not be executed directly as a process, including using `execa()` or `execa.command()`.
|
258
|
+
*/
|
259
|
+
command: string;
|
260
|
+
|
261
|
+
/**
|
262
|
+
Same as `command` but escaped.
|
263
|
+
|
264
|
+
This is meant to be copy and pasted into a shell, for debugging purposes.
|
265
|
+
Since the escaping is fairly basic, this should not be executed directly as a process, including using `execa()` or `execa.command()`.
|
266
|
+
*/
|
267
|
+
escapedCommand: string;
|
268
|
+
|
269
|
+
/**
|
270
|
+
The numeric exit code of the process that was run.
|
271
|
+
*/
|
272
|
+
exitCode: number;
|
273
|
+
|
274
|
+
/**
|
275
|
+
The output of the process on stdout.
|
276
|
+
*/
|
277
|
+
stdout: StdoutStderrType;
|
278
|
+
|
279
|
+
/**
|
280
|
+
The output of the process on stderr.
|
281
|
+
*/
|
282
|
+
stderr: StdoutStderrType;
|
283
|
+
|
284
|
+
/**
|
285
|
+
Whether the process failed to run.
|
286
|
+
*/
|
287
|
+
failed: boolean;
|
288
|
+
|
289
|
+
/**
|
290
|
+
Whether the process timed out.
|
291
|
+
*/
|
292
|
+
timedOut: boolean;
|
293
|
+
|
294
|
+
/**
|
295
|
+
Whether the process was killed.
|
296
|
+
*/
|
297
|
+
killed: boolean;
|
298
|
+
|
299
|
+
/**
|
300
|
+
The name of the signal that was used to terminate the process. For example, `SIGFPE`.
|
301
|
+
|
302
|
+
If a signal terminated the process, this property is defined and included in the error message. Otherwise it is `undefined`.
|
303
|
+
*/
|
304
|
+
signal?: string;
|
305
|
+
|
306
|
+
/**
|
307
|
+
A human-friendly description of the signal that was used to terminate the process. For example, `Floating point arithmetic error`.
|
308
|
+
|
309
|
+
If a signal terminated the process, this property is defined and included in the error message. Otherwise it is `undefined`. It is also `undefined` when the signal is very uncommon which should seldomly happen.
|
310
|
+
*/
|
311
|
+
signalDescription?: string;
|
312
|
+
}
|
313
|
+
|
314
|
+
interface ExecaSyncReturnValue<StdoutErrorType = string>
|
315
|
+
extends ExecaReturnBase<StdoutErrorType> {
|
316
|
+
}
|
317
|
+
|
318
|
+
/**
|
319
|
+
Result of a child process execution. On success this is a plain object. On failure this is also an `Error` instance.
|
320
|
+
|
321
|
+
The child process fails when:
|
322
|
+
- its exit code is not `0`
|
323
|
+
- it was killed with a signal
|
324
|
+
- timing out
|
325
|
+
- being canceled
|
326
|
+
- there's not enough memory or there are already too many child processes
|
327
|
+
*/
|
328
|
+
interface ExecaReturnValue<StdoutErrorType = string>
|
329
|
+
extends ExecaSyncReturnValue<StdoutErrorType> {
|
330
|
+
/**
|
331
|
+
The output of the process with `stdout` and `stderr` interleaved.
|
332
|
+
|
333
|
+
This is `undefined` if either:
|
334
|
+
- the `all` option is `false` (default value)
|
335
|
+
- `execa.sync()` was used
|
336
|
+
*/
|
337
|
+
all?: StdoutErrorType;
|
338
|
+
|
339
|
+
/**
|
340
|
+
Whether the process was canceled.
|
341
|
+
*/
|
342
|
+
isCanceled: boolean;
|
343
|
+
}
|
344
|
+
|
345
|
+
interface ExecaSyncError<StdoutErrorType = string>
|
346
|
+
extends Error,
|
347
|
+
ExecaReturnBase<StdoutErrorType> {
|
348
|
+
/**
|
349
|
+
Error message when the child process failed to run. In addition to the underlying error message, it also contains some information related to why the child process errored.
|
350
|
+
|
351
|
+
The child process stderr then stdout are appended to the end, separated with newlines and not interleaved.
|
352
|
+
*/
|
353
|
+
message: string;
|
354
|
+
|
355
|
+
/**
|
356
|
+
This is the same as the `message` property except it does not include the child process stdout/stderr.
|
357
|
+
*/
|
358
|
+
shortMessage: string;
|
359
|
+
|
360
|
+
/**
|
361
|
+
Original error message. This is the same as the `message` property except it includes neither the child process stdout/stderr nor some additional information added by Execa.
|
362
|
+
|
363
|
+
This is `undefined` unless the child process exited due to an `error` event or a timeout.
|
364
|
+
*/
|
365
|
+
originalMessage?: string;
|
366
|
+
}
|
367
|
+
|
368
|
+
interface ExecaError<StdoutErrorType = string>
|
369
|
+
extends ExecaSyncError<StdoutErrorType> {
|
370
|
+
/**
|
371
|
+
The output of the process with `stdout` and `stderr` interleaved.
|
372
|
+
|
373
|
+
This is `undefined` if either:
|
374
|
+
- the `all` option is `false` (default value)
|
375
|
+
- `execa.sync()` was used
|
376
|
+
*/
|
377
|
+
all?: StdoutErrorType;
|
378
|
+
|
379
|
+
/**
|
380
|
+
Whether the process was canceled.
|
381
|
+
*/
|
382
|
+
isCanceled: boolean;
|
383
|
+
}
|
384
|
+
|
385
|
+
interface KillOptions {
|
386
|
+
/**
|
387
|
+
Milliseconds to wait for the child process to terminate before sending `SIGKILL`.
|
388
|
+
|
389
|
+
Can be disabled with `false`.
|
390
|
+
|
391
|
+
@default 5000
|
392
|
+
*/
|
393
|
+
forceKillAfterTimeout?: number | false;
|
394
|
+
}
|
395
|
+
|
396
|
+
interface ExecaChildPromise<StdoutErrorType> {
|
397
|
+
/**
|
398
|
+
Stream combining/interleaving [`stdout`](https://nodejs.org/api/child_process.html#child_process_subprocess_stdout) and [`stderr`](https://nodejs.org/api/child_process.html#child_process_subprocess_stderr).
|
399
|
+
|
400
|
+
This is `undefined` if either:
|
401
|
+
- the `all` option is `false` (the default value)
|
402
|
+
- both `stdout` and `stderr` options are set to [`'inherit'`, `'ipc'`, `Stream` or `integer`](https://nodejs.org/dist/latest-v6.x/docs/api/child_process.html#child_process_options_stdio)
|
403
|
+
*/
|
404
|
+
all?: ReadableStream;
|
405
|
+
|
406
|
+
catch<ResultType = never>(
|
407
|
+
onRejected?: (reason: ExecaError<StdoutErrorType>) => ResultType | PromiseLike<ResultType>
|
408
|
+
): Promise<ExecaReturnValue<StdoutErrorType> | ResultType>;
|
409
|
+
|
410
|
+
/**
|
411
|
+
Same as the original [`child_process#kill()`](https://nodejs.org/api/child_process.html#child_process_subprocess_kill_signal), except if `signal` is `SIGTERM` (the default value) and the child process is not terminated after 5 seconds, force it by sending `SIGKILL`.
|
412
|
+
*/
|
413
|
+
kill(signal?: string, options?: KillOptions): void;
|
414
|
+
|
415
|
+
/**
|
416
|
+
Similar to [`childProcess.kill()`](https://nodejs.org/api/child_process.html#child_process_subprocess_kill_signal). This is preferred when cancelling the child process execution as the error is more descriptive and [`childProcessResult.isCanceled`](#iscanceled) is set to `true`.
|
417
|
+
*/
|
418
|
+
cancel(): void;
|
419
|
+
}
|
420
|
+
|
421
|
+
type ExecaChildProcess<StdoutErrorType = string> = ChildProcess &
|
422
|
+
ExecaChildPromise<StdoutErrorType> &
|
423
|
+
Promise<ExecaReturnValue<StdoutErrorType>>;
|
424
|
+
}
|
425
|
+
|
426
|
+
declare const execa: {
|
427
|
+
/**
|
428
|
+
Execute a file.
|
429
|
+
|
430
|
+
Think of this as a mix of `child_process.execFile` and `child_process.spawn`.
|
431
|
+
|
432
|
+
@param file - The program/script to execute.
|
433
|
+
@param arguments - Arguments to pass to `file` on execution.
|
434
|
+
@returns A [`child_process` instance](https://nodejs.org/api/child_process.html#child_process_class_childprocess), which is enhanced to also be a `Promise` for a result `Object` with `stdout` and `stderr` properties.
|
435
|
+
|
436
|
+
@example
|
437
|
+
```
|
438
|
+
import execa = require('./execa');
|
439
|
+
|
440
|
+
(async () => {
|
441
|
+
const {stdout} = await execa('echo', ['unicorns']);
|
442
|
+
console.log(stdout);
|
443
|
+
//=> 'unicorns'
|
444
|
+
|
445
|
+
// Cancelling a spawned process
|
446
|
+
|
447
|
+
const subprocess = execa('node');
|
448
|
+
|
449
|
+
setTimeout(() => {
|
450
|
+
subprocess.cancel()
|
451
|
+
}, 1000);
|
452
|
+
|
453
|
+
try {
|
454
|
+
await subprocess;
|
455
|
+
} catch (error) {
|
456
|
+
console.log(subprocess.killed); // true
|
457
|
+
console.log(error.isCanceled); // true
|
458
|
+
}
|
459
|
+
})();
|
460
|
+
|
461
|
+
// Pipe the child process stdout to the current stdout
|
462
|
+
execa('echo', ['unicorns']).stdout.pipe(process.stdout);
|
463
|
+
```
|
464
|
+
*/
|
465
|
+
(
|
466
|
+
file: string,
|
467
|
+
arguments?: readonly string[],
|
468
|
+
options?: execa.Options
|
469
|
+
): execa.ExecaChildProcess;
|
470
|
+
(
|
471
|
+
file: string,
|
472
|
+
arguments?: readonly string[],
|
473
|
+
options?: execa.Options<null>
|
474
|
+
): execa.ExecaChildProcess<Buffer>;
|
475
|
+
(file: string, options?: execa.Options): execa.ExecaChildProcess;
|
476
|
+
(file: string, options?: execa.Options<null>): execa.ExecaChildProcess<
|
477
|
+
Buffer
|
478
|
+
>;
|
479
|
+
|
480
|
+
/**
|
481
|
+
Execute a file synchronously.
|
482
|
+
|
483
|
+
This method throws an `Error` if the command fails.
|
484
|
+
|
485
|
+
@param file - The program/script to execute.
|
486
|
+
@param arguments - Arguments to pass to `file` on execution.
|
487
|
+
@returns A result `Object` with `stdout` and `stderr` properties.
|
488
|
+
*/
|
489
|
+
sync(
|
490
|
+
file: string,
|
491
|
+
arguments?: readonly string[],
|
492
|
+
options?: execa.SyncOptions
|
493
|
+
): execa.ExecaSyncReturnValue;
|
494
|
+
sync(
|
495
|
+
file: string,
|
496
|
+
arguments?: readonly string[],
|
497
|
+
options?: execa.SyncOptions<null>
|
498
|
+
): execa.ExecaSyncReturnValue<Buffer>;
|
499
|
+
sync(file: string, options?: execa.SyncOptions): execa.ExecaSyncReturnValue;
|
500
|
+
sync(
|
501
|
+
file: string,
|
502
|
+
options?: execa.SyncOptions<null>
|
503
|
+
): execa.ExecaSyncReturnValue<Buffer>;
|
504
|
+
|
505
|
+
/**
|
506
|
+
Same as `execa()` except both file and arguments are specified in a single `command` string. For example, `execa('echo', ['unicorns'])` is the same as `execa.command('echo unicorns')`.
|
507
|
+
|
508
|
+
If the file or an argument contains spaces, they must be escaped with backslashes. This matters especially if `command` is not a constant but a variable, for example with `__dirname` or `process.cwd()`. Except for spaces, no escaping/quoting is needed.
|
509
|
+
|
510
|
+
The `shell` option must be used if the `command` uses shell-specific features (for example, `&&` or `||`), as opposed to being a simple `file` followed by its `arguments`.
|
511
|
+
|
512
|
+
@param command - The program/script to execute and its arguments.
|
513
|
+
@returns A [`child_process` instance](https://nodejs.org/api/child_process.html#child_process_class_childprocess), which is enhanced to also be a `Promise` for a result `Object` with `stdout` and `stderr` properties.
|
514
|
+
|
515
|
+
@example
|
516
|
+
```
|
517
|
+
import execa = require('./execa');
|
518
|
+
|
519
|
+
(async () => {
|
520
|
+
const {stdout} = await execa.command('echo unicorns');
|
521
|
+
console.log(stdout);
|
522
|
+
//=> 'unicorns'
|
523
|
+
})();
|
524
|
+
```
|
525
|
+
*/
|
526
|
+
command(command: string, options?: execa.Options): execa.ExecaChildProcess;
|
527
|
+
command(command: string, options?: execa.Options<null>): execa.ExecaChildProcess<Buffer>;
|
528
|
+
|
529
|
+
/**
|
530
|
+
Same as `execa.command()` but synchronous.
|
531
|
+
|
532
|
+
@param command - The program/script to execute and its arguments.
|
533
|
+
@returns A result `Object` with `stdout` and `stderr` properties.
|
534
|
+
*/
|
535
|
+
commandSync(command: string, options?: execa.SyncOptions): execa.ExecaSyncReturnValue;
|
536
|
+
commandSync(command: string, options?: execa.SyncOptions<null>): execa.ExecaSyncReturnValue<Buffer>;
|
537
|
+
|
538
|
+
/**
|
539
|
+
Execute a Node.js script as a child process.
|
540
|
+
|
541
|
+
Same as `execa('node', [scriptPath, ...arguments], options)` except (like [`child_process#fork()`](https://nodejs.org/api/child_process.html#child_process_child_process_fork_modulepath_args_options)):
|
542
|
+
- the current Node version and options are used. This can be overridden using the `nodePath` and `nodeArguments` options.
|
543
|
+
- the `shell` option cannot be used
|
544
|
+
- an extra channel [`ipc`](https://nodejs.org/api/child_process.html#child_process_options_stdio) is passed to [`stdio`](#stdio)
|
545
|
+
|
546
|
+
@param scriptPath - Node.js script to execute.
|
547
|
+
@param arguments - Arguments to pass to `scriptPath` on execution.
|
548
|
+
@returns A [`child_process` instance](https://nodejs.org/api/child_process.html#child_process_class_childprocess), which is enhanced to also be a `Promise` for a result `Object` with `stdout` and `stderr` properties.
|
549
|
+
*/
|
550
|
+
node(
|
551
|
+
scriptPath: string,
|
552
|
+
arguments?: readonly string[],
|
553
|
+
options?: execa.NodeOptions
|
554
|
+
): execa.ExecaChildProcess;
|
555
|
+
node(
|
556
|
+
scriptPath: string,
|
557
|
+
arguments?: readonly string[],
|
558
|
+
options?: execa.Options<null>
|
559
|
+
): execa.ExecaChildProcess<Buffer>;
|
560
|
+
node(scriptPath: string, options?: execa.Options): execa.ExecaChildProcess;
|
561
|
+
node(scriptPath: string, options?: execa.Options<null>): execa.ExecaChildProcess<Buffer>;
|
562
|
+
};
|
563
|
+
|
564
|
+
export = execa;
|
@@ -0,0 +1 @@
|
|
1
|
+
(()=>{var e={328:(e,t,n)=>{"use strict";const r=n(81);const o=n(529);const s=n(170);function spawn(e,t,n){const i=o(e,t,n);const a=r.spawn(i.command,i.args,i.options);s.hookChildProcess(a,i);return a}function spawnSync(e,t,n){const i=o(e,t,n);const a=r.spawnSync(i.command,i.args,i.options);a.error=a.error||s.verifyENOENTSync(a.status,i);return a}e.exports=spawn;e.exports.spawn=spawn;e.exports.sync=spawnSync;e.exports._parse=o;e.exports._enoent=s},170:e=>{"use strict";const t=process.platform==="win32";function notFoundError(e,t){return Object.assign(new Error(`${t} ${e.command} ENOENT`),{code:"ENOENT",errno:"ENOENT",syscall:`${t} ${e.command}`,path:e.command,spawnargs:e.args})}function hookChildProcess(e,n){if(!t){return}const r=e.emit;e.emit=function(t,o){if(t==="exit"){const t=verifyENOENT(o,n,"spawn");if(t){return r.call(e,"error",t)}}return r.apply(e,arguments)}}function verifyENOENT(e,n){if(t&&e===1&&!n.file){return notFoundError(n.original,"spawn")}return null}function verifyENOENTSync(e,n){if(t&&e===1&&!n.file){return notFoundError(n.original,"spawnSync")}return null}e.exports={hookChildProcess:hookChildProcess,verifyENOENT:verifyENOENT,verifyENOENTSync:verifyENOENTSync,notFoundError:notFoundError}},529:(e,t,n)=>{"use strict";const r=n(17);const o=n(499);const s=n(24);const i=n(91);const a=process.platform==="win32";const c=/\.(?:com|exe)$/i;const d=/node_modules[\\/].bin[\\/][^\\/]+\.cmd$/i;function detectShebang(e){e.file=o(e);const t=e.file&&i(e.file);if(t){e.args.unshift(e.file);e.command=t;return o(e)}return e.file}function parseNonShell(e){if(!a){return e}const t=detectShebang(e);const n=!c.test(t);if(e.options.forceShell||n){const n=d.test(t);e.command=r.normalize(e.command);e.command=s.command(e.command);e.args=e.args.map((e=>s.argument(e,n)));const o=[e.command].concat(e.args).join(" ");e.args=["/d","/s","/c",`"${o}"`];e.command=process.env.comspec||"cmd.exe";e.options.windowsVerbatimArguments=true}return e}function parse(e,t,n){if(t&&!Array.isArray(t)){n=t;t=null}t=t?t.slice(0):[];n=Object.assign({},n);const r={command:e,args:t,options:n,file:undefined,original:{command:e,args:t}};return n.shell?r:parseNonShell(r)}e.exports=parse},24:e=>{"use strict";const t=/([()\][%!^"`<>&|;, *?])/g;function escapeCommand(e){e=e.replace(t,"^$1");return e}function escapeArgument(e,n){e=`${e}`;e=e.replace(/(\\*)"/g,'$1$1\\"');e=e.replace(/(\\*)$/,"$1$1");e=`"${e}"`;e=e.replace(t,"^$1");if(n){e=e.replace(t,"^$1")}return e}e.exports.command=escapeCommand;e.exports.argument=escapeArgument},91:(e,t,n)=>{"use strict";const r=n(147);const o=n(256);function readShebang(e){const t=150;const n=Buffer.alloc(t);let s;try{s=r.openSync(e,"r");r.readSync(s,n,0,t,0);r.closeSync(s)}catch(e){}return o(n.toString())}e.exports=readShebang},499:(e,t,n)=>{"use strict";const r=n(17);const o=n(85);const s=n(460);function resolveCommandAttempt(e,t){const n=e.options.env||process.env;const i=process.cwd();const a=e.options.cwd!=null;const c=a&&process.chdir!==undefined&&!process.chdir.disabled;if(c){try{process.chdir(e.options.cwd)}catch(e){}}let d;try{d=o.sync(e.command,{path:n[s({env:n})],pathExt:t?r.delimiter:undefined})}catch(e){}finally{if(c){process.chdir(i)}}if(d){d=r.resolve(a?e.options.cwd:"",d)}return d}function resolveCommand(e){return resolveCommandAttempt(e)||resolveCommandAttempt(e,true)}e.exports=resolveCommand},632:(e,t,n)=>{"use strict";const r=n(17);const o=n(81);const s=n(328);const i=n(133);const a=n(136);const c=n(591);const d=n(324);const u=n(166);const{spawnedKill:l,spawnedCancel:f,setupTimeout:p,validateTimeout:m,setExitHandler:g}=n(878);const{handleInput:x,getSpawnedResult:h,makeAllStream:y,validateInputSync:b}=n(533);const{mergePromise:S,getSpawnedPromise:v}=n(210);const{joinCommand:w,parseCommand:E,getEscapedCommand:I}=n(192);const T=1e3*1e3*100;const getEnv=({env:e,extendEnv:t,preferLocal:n,localDir:r,execPath:o})=>{const s=t?{...process.env,...e}:e;if(n){return a.env({env:s,cwd:r,execPath:o})}return s};const handleArguments=(e,t,n={})=>{const o=s._parse(e,t,n);e=o.command;t=o.args;n=o.options;n={maxBuffer:T,buffer:true,stripFinalNewline:true,extendEnv:true,preferLocal:false,localDir:n.cwd||process.cwd(),execPath:process.execPath,encoding:"utf8",reject:true,cleanup:true,all:false,windowsHide:true,...n};n.env=getEnv(n);n.stdio=u(n);if(process.platform==="win32"&&r.basename(e,".exe")==="cmd"){t.unshift("/q")}return{file:e,args:t,options:n,parsed:o}};const handleOutput=(e,t,n)=>{if(typeof t!=="string"&&!Buffer.isBuffer(t)){return n===undefined?undefined:""}if(e.stripFinalNewline){return i(t)}return t};const execa=(e,t,n)=>{const r=handleArguments(e,t,n);const s=w(e,t);const i=I(e,t);m(r.options);let a;try{a=o.spawn(r.file,r.args,r.options)}catch(e){const t=new o.ChildProcess;const n=Promise.reject(d({error:e,stdout:"",stderr:"",all:"",command:s,escapedCommand:i,parsed:r,timedOut:false,isCanceled:false,killed:false}));return S(t,n)}const u=v(a);const b=p(a,r.options,u);const E=g(a,r.options,b);const T={isCanceled:false};a.kill=l.bind(null,a.kill.bind(a));a.cancel=f.bind(null,a,T);const handlePromise=async()=>{const[{error:e,exitCode:t,signal:n,timedOut:o},c,u,l]=await h(a,r.options,E);const f=handleOutput(r.options,c);const p=handleOutput(r.options,u);const m=handleOutput(r.options,l);if(e||t!==0||n!==null){const c=d({error:e,exitCode:t,signal:n,stdout:f,stderr:p,all:m,command:s,escapedCommand:i,parsed:r,timedOut:o,isCanceled:T.isCanceled,killed:a.killed});if(!r.options.reject){return c}throw c}return{command:s,escapedCommand:i,exitCode:0,stdout:f,stderr:p,all:m,failed:false,timedOut:false,isCanceled:false,killed:false}};const C=c(handlePromise);x(a,r.options.input);a.all=y(a,r.options);return S(a,C)};e.exports=execa;e.exports.sync=(e,t,n)=>{const r=handleArguments(e,t,n);const s=w(e,t);const i=I(e,t);b(r.options);let a;try{a=o.spawnSync(r.file,r.args,r.options)}catch(e){throw d({error:e,stdout:"",stderr:"",all:"",command:s,escapedCommand:i,parsed:r,timedOut:false,isCanceled:false,killed:false})}const c=handleOutput(r.options,a.stdout,a.error);const u=handleOutput(r.options,a.stderr,a.error);if(a.error||a.status!==0||a.signal!==null){const e=d({stdout:c,stderr:u,error:a.error,signal:a.signal,exitCode:a.status,command:s,escapedCommand:i,parsed:r,timedOut:a.error&&a.error.code==="ETIMEDOUT",isCanceled:false,killed:a.signal!==null});if(!r.options.reject){return e}throw e}return{command:s,escapedCommand:i,exitCode:0,stdout:c,stderr:u,failed:false,timedOut:false,isCanceled:false,killed:false}};e.exports.command=(e,t)=>{const[n,...r]=E(e);return execa(n,r,t)};e.exports.commandSync=(e,t)=>{const[n,...r]=E(e);return execa.sync(n,r,t)};e.exports.node=(e,t,n={})=>{if(t&&!Array.isArray(t)&&typeof t==="object"){n=t;t=[]}const r=u.node(n);const o=process.execArgv.filter((e=>!e.startsWith("--inspect")));const{nodePath:s=process.execPath,nodeOptions:i=o}=n;return execa(s,[...i,e,...Array.isArray(t)?t:[]],{...n,stdin:undefined,stdout:undefined,stderr:undefined,stdio:r,shell:false})}},192:e=>{"use strict";const normalizeArgs=(e,t=[])=>{if(!Array.isArray(t)){return[e]}return[e,...t]};const t=/^[\w.-]+$/;const n=/"/g;const escapeArg=e=>{if(typeof e!=="string"||t.test(e)){return e}return`"${e.replace(n,'\\"')}"`};const joinCommand=(e,t)=>normalizeArgs(e,t).join(" ");const getEscapedCommand=(e,t)=>normalizeArgs(e,t).map((e=>escapeArg(e))).join(" ");const r=/ +/g;const parseCommand=e=>{const t=[];for(const n of e.trim().split(r)){const e=t[t.length-1];if(e&&e.endsWith("\\")){t[t.length-1]=`${e.slice(0,-1)} ${n}`}else{t.push(n)}}return t};e.exports={joinCommand:joinCommand,getEscapedCommand:getEscapedCommand,parseCommand:parseCommand}},324:(e,t,n)=>{"use strict";const{signalsByName:r}=n(882);const getErrorPrefix=({timedOut:e,timeout:t,errorCode:n,signal:r,signalDescription:o,exitCode:s,isCanceled:i})=>{if(e){return`timed out after ${t} milliseconds`}if(i){return"was canceled"}if(n!==undefined){return`failed with ${n}`}if(r!==undefined){return`was killed with ${r} (${o})`}if(s!==undefined){return`failed with exit code ${s}`}return"failed"};const makeError=({stdout:e,stderr:t,all:n,error:o,signal:s,exitCode:i,command:a,escapedCommand:c,timedOut:d,isCanceled:u,killed:l,parsed:{options:{timeout:f}}})=>{i=i===null?undefined:i;s=s===null?undefined:s;const p=s===undefined?undefined:r[s].description;const m=o&&o.code;const g=getErrorPrefix({timedOut:d,timeout:f,errorCode:m,signal:s,signalDescription:p,exitCode:i,isCanceled:u});const x=`Command ${g}: ${a}`;const h=Object.prototype.toString.call(o)==="[object Error]";const y=h?`${x}\n${o.message}`:x;const b=[y,t,e].filter(Boolean).join("\n");if(h){o.originalMessage=o.message;o.message=b}else{o=new Error(b)}o.shortMessage=y;o.command=a;o.escapedCommand=c;o.exitCode=i;o.signal=s;o.signalDescription=p;o.stdout=e;o.stderr=t;if(n!==undefined){o.all=n}if("bufferedData"in o){delete o.bufferedData}o.failed=true;o.timedOut=Boolean(d);o.isCanceled=u;o.killed=l&&!d;return o};e.exports=makeError},878:(e,t,n)=>{"use strict";const r=n(37);const o=n(580);const s=1e3*5;const spawnedKill=(e,t="SIGTERM",n={})=>{const r=e(t);setKillTimeout(e,t,n,r);return r};const setKillTimeout=(e,t,n,r)=>{if(!shouldForceKill(t,n,r)){return}const o=getForceKillAfterTimeout(n);const s=setTimeout((()=>{e("SIGKILL")}),o);if(s.unref){s.unref()}};const shouldForceKill=(e,{forceKillAfterTimeout:t},n)=>isSigterm(e)&&t!==false&&n;const isSigterm=e=>e===r.constants.signals.SIGTERM||typeof e==="string"&&e.toUpperCase()==="SIGTERM";const getForceKillAfterTimeout=({forceKillAfterTimeout:e=true})=>{if(e===true){return s}if(!Number.isFinite(e)||e<0){throw new TypeError(`Expected the \`forceKillAfterTimeout\` option to be a non-negative integer, got \`${e}\` (${typeof e})`)}return e};const spawnedCancel=(e,t)=>{const n=e.kill();if(n){t.isCanceled=true}};const timeoutKill=(e,t,n)=>{e.kill(t);n(Object.assign(new Error("Timed out"),{timedOut:true,signal:t}))};const setupTimeout=(e,{timeout:t,killSignal:n="SIGTERM"},r)=>{if(t===0||t===undefined){return r}let o;const s=new Promise(((r,s)=>{o=setTimeout((()=>{timeoutKill(e,n,s)}),t)}));const i=r.finally((()=>{clearTimeout(o)}));return Promise.race([s,i])};const validateTimeout=({timeout:e})=>{if(e!==undefined&&(!Number.isFinite(e)||e<0)){throw new TypeError(`Expected the \`timeout\` option to be a non-negative integer, got \`${e}\` (${typeof e})`)}};const setExitHandler=async(e,{cleanup:t,detached:n},r)=>{if(!t||n){return r}const s=o((()=>{e.kill()}));return r.finally((()=>{s()}))};e.exports={spawnedKill:spawnedKill,spawnedCancel:spawnedCancel,setupTimeout:setupTimeout,validateTimeout:validateTimeout,setExitHandler:setExitHandler}},210:e=>{"use strict";const t=(async()=>{})().constructor.prototype;const n=["then","catch","finally"].map((e=>[e,Reflect.getOwnPropertyDescriptor(t,e)]));const mergePromise=(e,t)=>{for(const[r,o]of n){const n=typeof t==="function"?(...e)=>Reflect.apply(o.value,t(),e):o.value.bind(t);Reflect.defineProperty(e,r,{...o,value:n})}return e};const getSpawnedPromise=e=>new Promise(((t,n)=>{e.on("exit",((e,n)=>{t({exitCode:e,signal:n})}));e.on("error",(e=>{n(e)}));if(e.stdin){e.stdin.on("error",(e=>{n(e)}))}}));e.exports={mergePromise:mergePromise,getSpawnedPromise:getSpawnedPromise}},166:e=>{"use strict";const t=["stdin","stdout","stderr"];const hasAlias=e=>t.some((t=>e[t]!==undefined));const normalizeStdio=e=>{if(!e){return}const{stdio:n}=e;if(n===undefined){return t.map((t=>e[t]))}if(hasAlias(e)){throw new Error(`It's not possible to provide \`stdio\` in combination with one of ${t.map((e=>`\`${e}\``)).join(", ")}`)}if(typeof n==="string"){return n}if(!Array.isArray(n)){throw new TypeError(`Expected \`stdio\` to be of type \`string\` or \`Array\`, got \`${typeof n}\``)}const r=Math.max(n.length,t.length);return Array.from({length:r},((e,t)=>n[t]))};e.exports=normalizeStdio;e.exports.node=e=>{const t=normalizeStdio(e);if(t==="ipc"){return"ipc"}if(t===undefined||typeof t==="string"){return[t,t,t,"ipc"]}if(t.includes("ipc")){return t}return[...t,"ipc"]}},533:(e,t,n)=>{"use strict";const r=n(434);const o=n(981);const s=n(853);const handleInput=(e,t)=>{if(t===undefined||e.stdin===undefined){return}if(r(t)){t.pipe(e.stdin)}else{e.stdin.end(t)}};const makeAllStream=(e,{all:t})=>{if(!t||!e.stdout&&!e.stderr){return}const n=s();if(e.stdout){n.add(e.stdout)}if(e.stderr){n.add(e.stderr)}return n};const getBufferedData=async(e,t)=>{if(!e){return}e.destroy();try{return await t}catch(e){return e.bufferedData}};const getStreamPromise=(e,{encoding:t,buffer:n,maxBuffer:r})=>{if(!e||!n){return}if(t){return o(e,{encoding:t,maxBuffer:r})}return o.buffer(e,{maxBuffer:r})};const getSpawnedResult=async({stdout:e,stderr:t,all:n},{encoding:r,buffer:o,maxBuffer:s},i)=>{const a=getStreamPromise(e,{encoding:r,buffer:o,maxBuffer:s});const c=getStreamPromise(t,{encoding:r,buffer:o,maxBuffer:s});const d=getStreamPromise(n,{encoding:r,buffer:o,maxBuffer:s*2});try{return await Promise.all([i,a,c,d])}catch(r){return Promise.all([{error:r,signal:r.signal,timedOut:r.timedOut},getBufferedData(e,a),getBufferedData(t,c),getBufferedData(n,d)])}};const validateInputSync=({input:e})=>{if(r(e)){throw new TypeError("The `input` option cannot be a stream in sync mode")}};e.exports={handleInput:handleInput,makeAllStream:makeAllStream,getSpawnedResult:getSpawnedResult,validateInputSync:validateInputSync}},782:(e,t,n)=>{"use strict";const{PassThrough:r}=n(781);e.exports=e=>{e={...e};const{array:t}=e;let{encoding:n}=e;const o=n==="buffer";let s=false;if(t){s=!(n||o)}else{n=n||"utf8"}if(o){n=null}const i=new r({objectMode:s});if(n){i.setEncoding(n)}let a=0;const c=[];i.on("data",(e=>{c.push(e);if(s){a=c.length}else{a+=e.length}}));i.getBufferedValue=()=>{if(t){return c}return o?Buffer.concat(c,a):c.join("")};i.getBufferedLength=()=>a;return i}},981:(e,t,n)=>{"use strict";const{constants:r}=n(300);const o=n(781);const{promisify:s}=n(837);const i=n(782);const a=s(o.pipeline);class MaxBufferError extends Error{constructor(){super("maxBuffer exceeded");this.name="MaxBufferError"}}async function getStream(e,t){if(!e){throw new Error("Expected a stream")}t={maxBuffer:Infinity,...t};const{maxBuffer:n}=t;const o=i(t);await new Promise(((t,s)=>{const rejectPromise=e=>{if(e&&o.getBufferedLength()<=r.MAX_LENGTH){e.bufferedData=o.getBufferedValue()}s(e)};(async()=>{try{await a(e,o);t()}catch(e){rejectPromise(e)}})();o.on("data",(()=>{if(o.getBufferedLength()>n){rejectPromise(new MaxBufferError)}}))}));return o.getBufferedValue()}e.exports=getStream;e.exports.buffer=(e,t)=>getStream(e,{...t,encoding:"buffer"});e.exports.array=(e,t)=>getStream(e,{...t,array:true});e.exports.MaxBufferError=MaxBufferError},221:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.SIGNALS=void 0;const n=[{name:"SIGHUP",number:1,action:"terminate",description:"Terminal closed",standard:"posix"},{name:"SIGINT",number:2,action:"terminate",description:"User interruption with CTRL-C",standard:"ansi"},{name:"SIGQUIT",number:3,action:"core",description:"User interruption with CTRL-\\",standard:"posix"},{name:"SIGILL",number:4,action:"core",description:"Invalid machine instruction",standard:"ansi"},{name:"SIGTRAP",number:5,action:"core",description:"Debugger breakpoint",standard:"posix"},{name:"SIGABRT",number:6,action:"core",description:"Aborted",standard:"ansi"},{name:"SIGIOT",number:6,action:"core",description:"Aborted",standard:"bsd"},{name:"SIGBUS",number:7,action:"core",description:"Bus error due to misaligned, non-existing address or paging error",standard:"bsd"},{name:"SIGEMT",number:7,action:"terminate",description:"Command should be emulated but is not implemented",standard:"other"},{name:"SIGFPE",number:8,action:"core",description:"Floating point arithmetic error",standard:"ansi"},{name:"SIGKILL",number:9,action:"terminate",description:"Forced termination",standard:"posix",forced:true},{name:"SIGUSR1",number:10,action:"terminate",description:"Application-specific signal",standard:"posix"},{name:"SIGSEGV",number:11,action:"core",description:"Segmentation fault",standard:"ansi"},{name:"SIGUSR2",number:12,action:"terminate",description:"Application-specific signal",standard:"posix"},{name:"SIGPIPE",number:13,action:"terminate",description:"Broken pipe or socket",standard:"posix"},{name:"SIGALRM",number:14,action:"terminate",description:"Timeout or timer",standard:"posix"},{name:"SIGTERM",number:15,action:"terminate",description:"Termination",standard:"ansi"},{name:"SIGSTKFLT",number:16,action:"terminate",description:"Stack is empty or overflowed",standard:"other"},{name:"SIGCHLD",number:17,action:"ignore",description:"Child process terminated, paused or unpaused",standard:"posix"},{name:"SIGCLD",number:17,action:"ignore",description:"Child process terminated, paused or unpaused",standard:"other"},{name:"SIGCONT",number:18,action:"unpause",description:"Unpaused",standard:"posix",forced:true},{name:"SIGSTOP",number:19,action:"pause",description:"Paused",standard:"posix",forced:true},{name:"SIGTSTP",number:20,action:"pause",description:'Paused using CTRL-Z or "suspend"',standard:"posix"},{name:"SIGTTIN",number:21,action:"pause",description:"Background process cannot read terminal input",standard:"posix"},{name:"SIGBREAK",number:21,action:"terminate",description:"User interruption with CTRL-BREAK",standard:"other"},{name:"SIGTTOU",number:22,action:"pause",description:"Background process cannot write to terminal output",standard:"posix"},{name:"SIGURG",number:23,action:"ignore",description:"Socket received out-of-band data",standard:"bsd"},{name:"SIGXCPU",number:24,action:"core",description:"Process timed out",standard:"bsd"},{name:"SIGXFSZ",number:25,action:"core",description:"File too big",standard:"bsd"},{name:"SIGVTALRM",number:26,action:"terminate",description:"Timeout or timer",standard:"bsd"},{name:"SIGPROF",number:27,action:"terminate",description:"Timeout or timer",standard:"bsd"},{name:"SIGWINCH",number:28,action:"ignore",description:"Terminal window size changed",standard:"bsd"},{name:"SIGIO",number:29,action:"terminate",description:"I/O is available",standard:"other"},{name:"SIGPOLL",number:29,action:"terminate",description:"Watched event",standard:"other"},{name:"SIGINFO",number:29,action:"ignore",description:"Request for process information",standard:"other"},{name:"SIGPWR",number:30,action:"terminate",description:"Device running out of power",standard:"systemv"},{name:"SIGSYS",number:31,action:"core",description:"Invalid system call",standard:"other"},{name:"SIGUNUSED",number:31,action:"terminate",description:"Invalid system call",standard:"other"}];t.SIGNALS=n},882:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.signalsByNumber=t.signalsByName=void 0;var r=n(37);var o=n(922);var s=n(840);const getSignalsByName=function(){const e=(0,o.getSignals)();return e.reduce(getSignalByName,{})};const getSignalByName=function(e,{name:t,number:n,description:r,supported:o,action:s,forced:i,standard:a}){return{...e,[t]:{name:t,number:n,description:r,supported:o,action:s,forced:i,standard:a}}};const i=getSignalsByName();t.signalsByName=i;const getSignalsByNumber=function(){const e=(0,o.getSignals)();const t=s.SIGRTMAX+1;const n=Array.from({length:t},((t,n)=>getSignalByNumber(n,e)));return Object.assign({},...n)};const getSignalByNumber=function(e,t){const n=findSignalByNumber(e,t);if(n===undefined){return{}}const{name:r,description:o,supported:s,action:i,forced:a,standard:c}=n;return{[e]:{name:r,number:e,description:o,supported:s,action:i,forced:a,standard:c}}};const findSignalByNumber=function(e,t){const n=t.find((({name:t})=>r.constants.signals[t]===e));if(n!==undefined){return n}return t.find((t=>t.number===e))};const a=getSignalsByNumber();t.signalsByNumber=a},840:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.SIGRTMAX=t.getRealtimeSignals=void 0;const getRealtimeSignals=function(){const e=r-n+1;return Array.from({length:e},getRealtimeSignal)};t.getRealtimeSignals=getRealtimeSignals;const getRealtimeSignal=function(e,t){return{name:`SIGRT${t+1}`,number:n+t,action:"terminate",description:"Application-specific signal (realtime)",standard:"posix"}};const n=34;const r=64;t.SIGRTMAX=r},922:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.getSignals=void 0;var r=n(37);var o=n(221);var s=n(840);const getSignals=function(){const e=(0,s.getRealtimeSignals)();const t=[...o.SIGNALS,...e].map(normalizeSignal);return t};t.getSignals=getSignals;const normalizeSignal=function({name:e,number:t,description:n,action:o,forced:s=false,standard:i}){const{signals:{[e]:a}}=r.constants;const c=a!==undefined;const d=c?a:t;return{name:e,number:d,description:n,supported:c,action:o,forced:s,standard:i}}},434:e=>{"use strict";const isStream=e=>e!==null&&typeof e==="object"&&typeof e.pipe==="function";isStream.writable=e=>isStream(e)&&e.writable!==false&&typeof e._write==="function"&&typeof e._writableState==="object";isStream.readable=e=>isStream(e)&&e.readable!==false&&typeof e._read==="function"&&typeof e._readableState==="object";isStream.duplex=e=>isStream.writable(e)&&isStream.readable(e);isStream.transform=e=>isStream.duplex(e)&&typeof e._transform==="function";e.exports=isStream},212:(e,t,n)=>{var r=n(147);var o;if(process.platform==="win32"||global.TESTING_WINDOWS){o=n(476)}else{o=n(836)}e.exports=isexe;isexe.sync=sync;function isexe(e,t,n){if(typeof t==="function"){n=t;t={}}if(!n){if(typeof Promise!=="function"){throw new TypeError("callback not provided")}return new Promise((function(n,r){isexe(e,t||{},(function(e,t){if(e){r(e)}else{n(t)}}))}))}o(e,t||{},(function(e,r){if(e){if(e.code==="EACCES"||t&&t.ignoreErrors){e=null;r=false}}n(e,r)}))}function sync(e,t){try{return o.sync(e,t||{})}catch(e){if(t&&t.ignoreErrors||e.code==="EACCES"){return false}else{throw e}}}},836:(e,t,n)=>{e.exports=isexe;isexe.sync=sync;var r=n(147);function isexe(e,t,n){r.stat(e,(function(e,r){n(e,e?false:checkStat(r,t))}))}function sync(e,t){return checkStat(r.statSync(e),t)}function checkStat(e,t){return e.isFile()&&checkMode(e,t)}function checkMode(e,t){var n=e.mode;var r=e.uid;var o=e.gid;var s=t.uid!==undefined?t.uid:process.getuid&&process.getuid();var i=t.gid!==undefined?t.gid:process.getgid&&process.getgid();var a=parseInt("100",8);var c=parseInt("010",8);var d=parseInt("001",8);var u=a|c;var l=n&d||n&c&&o===i||n&a&&r===s||n&u&&s===0;return l}},476:(e,t,n)=>{e.exports=isexe;isexe.sync=sync;var r=n(147);function checkPathExt(e,t){var n=t.pathExt!==undefined?t.pathExt:process.env.PATHEXT;if(!n){return true}n=n.split(";");if(n.indexOf("")!==-1){return true}for(var r=0;r<n.length;r++){var o=n[r].toLowerCase();if(o&&e.substr(-o.length).toLowerCase()===o){return true}}return false}function checkStat(e,t,n){if(!e.isSymbolicLink()&&!e.isFile()){return false}return checkPathExt(t,n)}function isexe(e,t,n){r.stat(e,(function(r,o){n(r,r?false:checkStat(o,e,t))}))}function sync(e,t){return checkStat(r.statSync(e),e,t)}},853:(e,t,n)=>{"use strict";const{PassThrough:r}=n(781);e.exports=function(){var e=[];var t=new r({objectMode:true});t.setMaxListeners(0);t.add=add;t.isEmpty=isEmpty;t.on("unpipe",remove);Array.prototype.slice.call(arguments).forEach(add);return t;function add(n){if(Array.isArray(n)){n.forEach(add);return this}e.push(n);n.once("end",remove.bind(null,n));n.once("error",t.emit.bind(t,"error"));n.pipe(t,{end:false});return this}function isEmpty(){return e.length==0}function remove(n){e=e.filter((function(e){return e!==n}));if(!e.length&&t.readable){t.end()}}}},693:e=>{"use strict";const mimicFn=(e,t)=>{for(const n of Reflect.ownKeys(t)){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}return e};e.exports=mimicFn;e.exports["default"]=mimicFn},136:(e,t,n)=>{"use strict";const r=n(17);const o=n(460);const npmRunPath=e=>{e={cwd:process.cwd(),path:process.env[o()],execPath:process.execPath,...e};let t;let n=r.resolve(e.cwd);const s=[];while(t!==n){s.push(r.join(n,"node_modules/.bin"));t=n;n=r.resolve(n,"..")}const i=r.resolve(e.cwd,e.execPath,"..");s.push(i);return s.concat(e.path).join(r.delimiter)};e.exports=npmRunPath;e.exports["default"]=npmRunPath;e.exports.env=t=>{t={env:process.env,...t};const n={...t.env};const r=o({env:n});t.path=n[r];n[r]=e.exports(t);return n}},591:(e,t,n)=>{"use strict";const r=n(693);const o=new WeakMap;const onetime=(e,t={})=>{if(typeof e!=="function"){throw new TypeError("Expected a function")}let n;let s=0;const i=e.displayName||e.name||"<anonymous>";const onetime=function(...r){o.set(onetime,++s);if(s===1){n=e.apply(this,r);e=null}else if(t.throw===true){throw new Error(`Function \`${i}\` can only be called once`)}return n};r(onetime,e);o.set(onetime,s);return onetime};e.exports=onetime;e.exports["default"]=onetime;e.exports.callCount=e=>{if(!o.has(e)){throw new Error(`The given function \`${e.name}\` is not wrapped by the \`onetime\` package`)}return o.get(e)}},460:e=>{"use strict";const pathKey=(e={})=>{const t=e.env||process.env;const n=e.platform||process.platform;if(n!=="win32"){return"PATH"}return Object.keys(t).reverse().find((e=>e.toUpperCase()==="PATH"))||"Path"};e.exports=pathKey;e.exports["default"]=pathKey},256:(e,t,n)=>{"use strict";const r=n(609);e.exports=(e="")=>{const t=e.match(r);if(!t){return null}const[n,o]=t[0].replace(/#! ?/,"").split(" ");const s=n.split("/").pop();if(s==="env"){return o}return o?`${s} ${o}`:s}},609:e=>{"use strict";e.exports=/^#!(.*)/},580:(e,t,n)=>{var r=global.process;const processOk=function(e){return e&&typeof e==="object"&&typeof e.removeListener==="function"&&typeof e.emit==="function"&&typeof e.reallyExit==="function"&&typeof e.listeners==="function"&&typeof e.kill==="function"&&typeof e.pid==="number"&&typeof e.on==="function"};if(!processOk(r)){e.exports=function(){return function(){}}}else{var o=n(491);var s=n(357);var i=/^win/i.test(r.platform);var a=n(361);if(typeof a!=="function"){a=a.EventEmitter}var c;if(r.__signal_exit_emitter__){c=r.__signal_exit_emitter__}else{c=r.__signal_exit_emitter__=new a;c.count=0;c.emitted={}}if(!c.infinite){c.setMaxListeners(Infinity);c.infinite=true}e.exports=function(e,t){if(!processOk(global.process)){return function(){}}o.equal(typeof e,"function","a callback must be provided for exit handler");if(f===false){p()}var n="exit";if(t&&t.alwaysLast){n="afterexit"}var remove=function(){c.removeListener(n,e);if(c.listeners("exit").length===0&&c.listeners("afterexit").length===0){d()}};c.on(n,e);return remove};var d=function unload(){if(!f||!processOk(global.process)){return}f=false;s.forEach((function(e){try{r.removeListener(e,l[e])}catch(e){}}));r.emit=x;r.reallyExit=m;c.count-=1};e.exports.unload=d;var u=function emit(e,t,n){if(c.emitted[e]){return}c.emitted[e]=true;c.emit(e,t,n)};var l={};s.forEach((function(e){l[e]=function listener(){if(!processOk(global.process)){return}var t=r.listeners(e);if(t.length===c.count){d();u("exit",null,e);u("afterexit",null,e);if(i&&e==="SIGHUP"){e="SIGINT"}r.kill(r.pid,e)}}}));e.exports.signals=function(){return s};var f=false;var p=function load(){if(f||!processOk(global.process)){return}f=true;c.count+=1;s=s.filter((function(e){try{r.on(e,l[e]);return true}catch(e){return false}}));r.emit=h;r.reallyExit=g};e.exports.load=p;var m=r.reallyExit;var g=function processReallyExit(e){if(!processOk(global.process)){return}r.exitCode=e||0;u("exit",r.exitCode,null);u("afterexit",r.exitCode,null);m.call(r,r.exitCode)};var x=r.emit;var h=function processEmit(e,t){if(e==="exit"&&processOk(global.process)){if(t!==undefined){r.exitCode=t}var n=x.apply(this,arguments);u("exit",r.exitCode,null);u("afterexit",r.exitCode,null);return n}else{return x.apply(this,arguments)}}}},357:e=>{e.exports=["SIGABRT","SIGALRM","SIGHUP","SIGINT","SIGTERM"];if(process.platform!=="win32"){e.exports.push("SIGVTALRM","SIGXCPU","SIGXFSZ","SIGUSR2","SIGTRAP","SIGSYS","SIGQUIT","SIGIOT")}if(process.platform==="linux"){e.exports.push("SIGIO","SIGPOLL","SIGPWR","SIGSTKFLT","SIGUNUSED")}},133:e=>{"use strict";e.exports=e=>{const t=typeof e==="string"?"\n":"\n".charCodeAt();const n=typeof e==="string"?"\r":"\r".charCodeAt();if(e[e.length-1]===t){e=e.slice(0,e.length-1)}if(e[e.length-1]===n){e=e.slice(0,e.length-1)}return e}},85:(e,t,n)=>{const r=process.platform==="win32"||process.env.OSTYPE==="cygwin"||process.env.OSTYPE==="msys";const o=n(17);const s=r?";":":";const i=n(212);const getNotFoundError=e=>Object.assign(new Error(`not found: ${e}`),{code:"ENOENT"});const getPathInfo=(e,t)=>{const n=t.colon||s;const o=e.match(/\//)||r&&e.match(/\\/)?[""]:[...r?[process.cwd()]:[],...(t.path||process.env.PATH||"").split(n)];const i=r?t.pathExt||process.env.PATHEXT||".EXE;.CMD;.BAT;.COM":"";const a=r?i.split(n):[""];if(r){if(e.indexOf(".")!==-1&&a[0]!=="")a.unshift("")}return{pathEnv:o,pathExt:a,pathExtExe:i}};const which=(e,t,n)=>{if(typeof t==="function"){n=t;t={}}if(!t)t={};const{pathEnv:r,pathExt:s,pathExtExe:a}=getPathInfo(e,t);const c=[];const step=n=>new Promise(((s,i)=>{if(n===r.length)return t.all&&c.length?s(c):i(getNotFoundError(e));const a=r[n];const d=/^".*"$/.test(a)?a.slice(1,-1):a;const u=o.join(d,e);const l=!d&&/^\.[\\\/]/.test(e)?e.slice(0,2)+u:u;s(subStep(l,n,0))}));const subStep=(e,n,r)=>new Promise(((o,d)=>{if(r===s.length)return o(step(n+1));const u=s[r];i(e+u,{pathExt:a},((s,i)=>{if(!s&&i){if(t.all)c.push(e+u);else return o(e+u)}return o(subStep(e,n,r+1))}))}));return n?step(0).then((e=>n(null,e)),n):step(0)};const whichSync=(e,t)=>{t=t||{};const{pathEnv:n,pathExt:r,pathExtExe:s}=getPathInfo(e,t);const a=[];for(let c=0;c<n.length;c++){const d=n[c];const u=/^".*"$/.test(d)?d.slice(1,-1):d;const l=o.join(u,e);const f=!u&&/^\.[\\\/]/.test(e)?e.slice(0,2)+l:l;for(let e=0;e<r.length;e++){const n=f+r[e];try{const e=i.sync(n,{pathExt:s});if(e){if(t.all)a.push(n);else return n}}catch(e){}}}if(t.all&&a.length)return a;if(t.nothrow)return null;throw getNotFoundError(e)};e.exports=which;which.sync=whichSync},491:e=>{"use strict";e.exports=require("assert")},300:e=>{"use strict";e.exports=require("buffer")},81:e=>{"use strict";e.exports=require("child_process")},361:e=>{"use strict";e.exports=require("events")},147:e=>{"use strict";e.exports=require("fs")},37:e=>{"use strict";e.exports=require("os")},17:e=>{"use strict";e.exports=require("path")},781:e=>{"use strict";e.exports=require("stream")},837:e=>{"use strict";e.exports=require("util")}};var t={};function __nccwpck_require__(n){var r=t[n];if(r!==undefined){return r.exports}var o=t[n]={exports:{}};var s=true;try{e[n](o,o.exports,__nccwpck_require__);s=false}finally{if(s)delete t[n]}return o.exports}if(typeof __nccwpck_require__!=="undefined")__nccwpck_require__.ab=__dirname+"/";var n=__nccwpck_require__(632);module.exports=n})();
|
@@ -0,0 +1,9 @@
|
|
1
|
+
MIT License
|
2
|
+
|
3
|
+
Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (https://sindresorhus.com)
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
6
|
+
|
7
|
+
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
8
|
+
|
9
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
@@ -0,0 +1 @@
|
|
1
|
+
{"name":"execa","author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"https://sindresorhus.com"},"version":"5.1.1","funding":"https://github.com/sindresorhus/execa?sponsor=1","license":"MIT"}
|
@@ -0,0 +1,20 @@
|
|
1
|
+
import type * as fsStat from '../../../@nodelib/fs.stat';
|
2
|
+
import type { Dirent, ErrnoException } from '../types';
|
3
|
+
export interface ReaddirAsynchronousMethod {
|
4
|
+
(filepath: string, options: {
|
5
|
+
withFileTypes: true;
|
6
|
+
}, callback: (error: ErrnoException | null, files: Dirent[]) => void): void;
|
7
|
+
(filepath: string, callback: (error: ErrnoException | null, files: string[]) => void): void;
|
8
|
+
}
|
9
|
+
export interface ReaddirSynchronousMethod {
|
10
|
+
(filepath: string, options: {
|
11
|
+
withFileTypes: true;
|
12
|
+
}): Dirent[];
|
13
|
+
(filepath: string): string[];
|
14
|
+
}
|
15
|
+
export declare type FileSystemAdapter = fsStat.FileSystemAdapter & {
|
16
|
+
readdir: ReaddirAsynchronousMethod;
|
17
|
+
readdirSync: ReaddirSynchronousMethod;
|
18
|
+
};
|
19
|
+
export declare const FILE_SYSTEM_ADAPTER: FileSystemAdapter;
|
20
|
+
export declare function createFileSystemAdapter(fsMethods?: Partial<FileSystemAdapter>): FileSystemAdapter;
|