@storybook/addon-vitest 10.1.0-alpha.9 → 10.1.0-beta.1
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/dist/_browser-chunks/chunk-TJXI7EIW.js +61 -0
- package/dist/_node-chunks/chunk-3NMZMB7I.js +71 -0
- package/dist/_node-chunks/chunk-FUZOQ3FW.js +339 -0
- package/dist/_node-chunks/chunk-GK6RMDY2.js +138 -0
- package/dist/_node-chunks/chunk-HKXN64KX.js +45 -0
- package/dist/_node-chunks/chunk-LVG5WDH3.js +158 -0
- package/dist/_node-chunks/chunk-MZFBI7ON.js +61 -0
- package/dist/_node-chunks/chunk-NMJA4RKJ.js +38 -0
- package/dist/_node-chunks/chunk-R65ONYP6.js +44 -0
- package/dist/_node-chunks/{chunk-WMX7UISE.js → chunk-XHKBPQ3A.js} +15 -24
- package/dist/index.js +1 -5
- package/dist/manager.js +274 -491
- package/dist/node/coverage-reporter.js +319 -864
- package/dist/node/vitest.js +201 -456
- package/dist/postinstall.js +497 -1502
- package/dist/preset.js +166 -349
- package/dist/vitest-plugin/global-setup.js +52 -107
- package/dist/vitest-plugin/index.js +1163 -2378
- package/dist/vitest-plugin/setup-file.js +6 -12
- package/dist/vitest-plugin/test-utils.js +31 -71
- package/package.json +3 -7
- package/dist/_browser-chunks/chunk-CAYLRBRX.js +0 -77
- package/dist/_browser-chunks/chunk-JK72E6FR.js +0 -6
- package/dist/_node-chunks/chunk-4TORVAZH.js +0 -105
- package/dist/_node-chunks/chunk-6Q62BC44.js +0 -37
- package/dist/_node-chunks/chunk-EQRHHTTK.js +0 -98
- package/dist/_node-chunks/chunk-EWGF3LDY.js +0 -481
- package/dist/_node-chunks/chunk-RDCJFLHV.js +0 -247
- package/dist/_node-chunks/chunk-W5CYX7PP.js +0 -50
- package/dist/_node-chunks/chunk-XKCUKATS.js +0 -2574
|
@@ -1,2574 +0,0 @@
|
|
|
1
|
-
import CJS_COMPAT_NODE_URL_6xsmo987rp5 from 'node:url';
|
|
2
|
-
import CJS_COMPAT_NODE_PATH_6xsmo987rp5 from 'node:path';
|
|
3
|
-
import CJS_COMPAT_NODE_MODULE_6xsmo987rp5 from "node:module";
|
|
4
|
-
|
|
5
|
-
var __filename = CJS_COMPAT_NODE_URL_6xsmo987rp5.fileURLToPath(import.meta.url);
|
|
6
|
-
var __dirname = CJS_COMPAT_NODE_PATH_6xsmo987rp5.dirname(__filename);
|
|
7
|
-
var require = CJS_COMPAT_NODE_MODULE_6xsmo987rp5.createRequire(import.meta.url);
|
|
8
|
-
|
|
9
|
-
// ------------------------------------------------------------
|
|
10
|
-
// end of CJS compatibility banner, injected by Storybook's esbuild configuration
|
|
11
|
-
// ------------------------------------------------------------
|
|
12
|
-
import {
|
|
13
|
-
dirname,
|
|
14
|
-
join
|
|
15
|
-
} from "./chunk-RDCJFLHV.js";
|
|
16
|
-
import {
|
|
17
|
-
__commonJS,
|
|
18
|
-
__name,
|
|
19
|
-
__require,
|
|
20
|
-
__toESM
|
|
21
|
-
} from "./chunk-W5CYX7PP.js";
|
|
22
|
-
|
|
23
|
-
// ../../node_modules/isexe/windows.js
|
|
24
|
-
var require_windows = __commonJS({
|
|
25
|
-
"../../node_modules/isexe/windows.js"(exports, module) {
|
|
26
|
-
module.exports = isexe;
|
|
27
|
-
isexe.sync = sync;
|
|
28
|
-
var fs = __require("fs");
|
|
29
|
-
function checkPathExt(path3, options) {
|
|
30
|
-
var pathext = options.pathExt !== void 0 ? options.pathExt : process.env.PATHEXT;
|
|
31
|
-
if (!pathext) {
|
|
32
|
-
return true;
|
|
33
|
-
}
|
|
34
|
-
pathext = pathext.split(";");
|
|
35
|
-
if (pathext.indexOf("") !== -1) {
|
|
36
|
-
return true;
|
|
37
|
-
}
|
|
38
|
-
for (var i = 0; i < pathext.length; i++) {
|
|
39
|
-
var p = pathext[i].toLowerCase();
|
|
40
|
-
if (p && path3.substr(-p.length).toLowerCase() === p) {
|
|
41
|
-
return true;
|
|
42
|
-
}
|
|
43
|
-
}
|
|
44
|
-
return false;
|
|
45
|
-
}
|
|
46
|
-
__name(checkPathExt, "checkPathExt");
|
|
47
|
-
function checkStat(stat, path3, options) {
|
|
48
|
-
if (!stat.isSymbolicLink() && !stat.isFile()) {
|
|
49
|
-
return false;
|
|
50
|
-
}
|
|
51
|
-
return checkPathExt(path3, options);
|
|
52
|
-
}
|
|
53
|
-
__name(checkStat, "checkStat");
|
|
54
|
-
function isexe(path3, options, cb) {
|
|
55
|
-
fs.stat(path3, function(er, stat) {
|
|
56
|
-
cb(er, er ? false : checkStat(stat, path3, options));
|
|
57
|
-
});
|
|
58
|
-
}
|
|
59
|
-
__name(isexe, "isexe");
|
|
60
|
-
function sync(path3, options) {
|
|
61
|
-
return checkStat(fs.statSync(path3), path3, options);
|
|
62
|
-
}
|
|
63
|
-
__name(sync, "sync");
|
|
64
|
-
}
|
|
65
|
-
});
|
|
66
|
-
|
|
67
|
-
// ../../node_modules/isexe/mode.js
|
|
68
|
-
var require_mode = __commonJS({
|
|
69
|
-
"../../node_modules/isexe/mode.js"(exports, module) {
|
|
70
|
-
module.exports = isexe;
|
|
71
|
-
isexe.sync = sync;
|
|
72
|
-
var fs = __require("fs");
|
|
73
|
-
function isexe(path3, options, cb) {
|
|
74
|
-
fs.stat(path3, function(er, stat) {
|
|
75
|
-
cb(er, er ? false : checkStat(stat, options));
|
|
76
|
-
});
|
|
77
|
-
}
|
|
78
|
-
__name(isexe, "isexe");
|
|
79
|
-
function sync(path3, options) {
|
|
80
|
-
return checkStat(fs.statSync(path3), options);
|
|
81
|
-
}
|
|
82
|
-
__name(sync, "sync");
|
|
83
|
-
function checkStat(stat, options) {
|
|
84
|
-
return stat.isFile() && checkMode(stat, options);
|
|
85
|
-
}
|
|
86
|
-
__name(checkStat, "checkStat");
|
|
87
|
-
function checkMode(stat, options) {
|
|
88
|
-
var mod = stat.mode;
|
|
89
|
-
var uid = stat.uid;
|
|
90
|
-
var gid = stat.gid;
|
|
91
|
-
var myUid = options.uid !== void 0 ? options.uid : process.getuid && process.getuid();
|
|
92
|
-
var myGid = options.gid !== void 0 ? options.gid : process.getgid && process.getgid();
|
|
93
|
-
var u = parseInt("100", 8);
|
|
94
|
-
var g = parseInt("010", 8);
|
|
95
|
-
var o = parseInt("001", 8);
|
|
96
|
-
var ug = u | g;
|
|
97
|
-
var ret = mod & o || mod & g && gid === myGid || mod & u && uid === myUid || mod & ug && myUid === 0;
|
|
98
|
-
return ret;
|
|
99
|
-
}
|
|
100
|
-
__name(checkMode, "checkMode");
|
|
101
|
-
}
|
|
102
|
-
});
|
|
103
|
-
|
|
104
|
-
// ../../node_modules/isexe/index.js
|
|
105
|
-
var require_isexe = __commonJS({
|
|
106
|
-
"../../node_modules/isexe/index.js"(exports, module) {
|
|
107
|
-
var fs = __require("fs");
|
|
108
|
-
var core;
|
|
109
|
-
if (process.platform === "win32" || global.TESTING_WINDOWS) {
|
|
110
|
-
core = require_windows();
|
|
111
|
-
} else {
|
|
112
|
-
core = require_mode();
|
|
113
|
-
}
|
|
114
|
-
module.exports = isexe;
|
|
115
|
-
isexe.sync = sync;
|
|
116
|
-
function isexe(path3, options, cb) {
|
|
117
|
-
if (typeof options === "function") {
|
|
118
|
-
cb = options;
|
|
119
|
-
options = {};
|
|
120
|
-
}
|
|
121
|
-
if (!cb) {
|
|
122
|
-
if (typeof Promise !== "function") {
|
|
123
|
-
throw new TypeError("callback not provided");
|
|
124
|
-
}
|
|
125
|
-
return new Promise(function(resolve, reject) {
|
|
126
|
-
isexe(path3, options || {}, function(er, is) {
|
|
127
|
-
if (er) {
|
|
128
|
-
reject(er);
|
|
129
|
-
} else {
|
|
130
|
-
resolve(is);
|
|
131
|
-
}
|
|
132
|
-
});
|
|
133
|
-
});
|
|
134
|
-
}
|
|
135
|
-
core(path3, options || {}, function(er, is) {
|
|
136
|
-
if (er) {
|
|
137
|
-
if (er.code === "EACCES" || options && options.ignoreErrors) {
|
|
138
|
-
er = null;
|
|
139
|
-
is = false;
|
|
140
|
-
}
|
|
141
|
-
}
|
|
142
|
-
cb(er, is);
|
|
143
|
-
});
|
|
144
|
-
}
|
|
145
|
-
__name(isexe, "isexe");
|
|
146
|
-
function sync(path3, options) {
|
|
147
|
-
try {
|
|
148
|
-
return core.sync(path3, options || {});
|
|
149
|
-
} catch (er) {
|
|
150
|
-
if (options && options.ignoreErrors || er.code === "EACCES") {
|
|
151
|
-
return false;
|
|
152
|
-
} else {
|
|
153
|
-
throw er;
|
|
154
|
-
}
|
|
155
|
-
}
|
|
156
|
-
}
|
|
157
|
-
__name(sync, "sync");
|
|
158
|
-
}
|
|
159
|
-
});
|
|
160
|
-
|
|
161
|
-
// ../../node_modules/which/which.js
|
|
162
|
-
var require_which = __commonJS({
|
|
163
|
-
"../../node_modules/which/which.js"(exports, module) {
|
|
164
|
-
var isWindows2 = process.platform === "win32" || process.env.OSTYPE === "cygwin" || process.env.OSTYPE === "msys";
|
|
165
|
-
var path3 = __require("path");
|
|
166
|
-
var COLON = isWindows2 ? ";" : ":";
|
|
167
|
-
var isexe = require_isexe();
|
|
168
|
-
var getNotFoundError = /* @__PURE__ */ __name((cmd) => Object.assign(new Error(`not found: ${cmd}`), { code: "ENOENT" }), "getNotFoundError");
|
|
169
|
-
var getPathInfo = /* @__PURE__ */ __name((cmd, opt) => {
|
|
170
|
-
const colon = opt.colon || COLON;
|
|
171
|
-
const pathEnv = cmd.match(/\//) || isWindows2 && cmd.match(/\\/) ? [""] : [
|
|
172
|
-
// windows always checks the cwd first
|
|
173
|
-
...isWindows2 ? [process.cwd()] : [],
|
|
174
|
-
...(opt.path || process.env.PATH || /* istanbul ignore next: very unusual */
|
|
175
|
-
"").split(colon)
|
|
176
|
-
];
|
|
177
|
-
const pathExtExe = isWindows2 ? opt.pathExt || process.env.PATHEXT || ".EXE;.CMD;.BAT;.COM" : "";
|
|
178
|
-
const pathExt = isWindows2 ? pathExtExe.split(colon) : [""];
|
|
179
|
-
if (isWindows2) {
|
|
180
|
-
if (cmd.indexOf(".") !== -1 && pathExt[0] !== "")
|
|
181
|
-
pathExt.unshift("");
|
|
182
|
-
}
|
|
183
|
-
return {
|
|
184
|
-
pathEnv,
|
|
185
|
-
pathExt,
|
|
186
|
-
pathExtExe
|
|
187
|
-
};
|
|
188
|
-
}, "getPathInfo");
|
|
189
|
-
var which = /* @__PURE__ */ __name((cmd, opt, cb) => {
|
|
190
|
-
if (typeof opt === "function") {
|
|
191
|
-
cb = opt;
|
|
192
|
-
opt = {};
|
|
193
|
-
}
|
|
194
|
-
if (!opt)
|
|
195
|
-
opt = {};
|
|
196
|
-
const { pathEnv, pathExt, pathExtExe } = getPathInfo(cmd, opt);
|
|
197
|
-
const found = [];
|
|
198
|
-
const step = /* @__PURE__ */ __name((i) => new Promise((resolve, reject) => {
|
|
199
|
-
if (i === pathEnv.length)
|
|
200
|
-
return opt.all && found.length ? resolve(found) : reject(getNotFoundError(cmd));
|
|
201
|
-
const ppRaw = pathEnv[i];
|
|
202
|
-
const pathPart = /^".*"$/.test(ppRaw) ? ppRaw.slice(1, -1) : ppRaw;
|
|
203
|
-
const pCmd = path3.join(pathPart, cmd);
|
|
204
|
-
const p = !pathPart && /^\.[\\\/]/.test(cmd) ? cmd.slice(0, 2) + pCmd : pCmd;
|
|
205
|
-
resolve(subStep(p, i, 0));
|
|
206
|
-
}), "step");
|
|
207
|
-
const subStep = /* @__PURE__ */ __name((p, i, ii) => new Promise((resolve, reject) => {
|
|
208
|
-
if (ii === pathExt.length)
|
|
209
|
-
return resolve(step(i + 1));
|
|
210
|
-
const ext = pathExt[ii];
|
|
211
|
-
isexe(p + ext, { pathExt: pathExtExe }, (er, is) => {
|
|
212
|
-
if (!er && is) {
|
|
213
|
-
if (opt.all)
|
|
214
|
-
found.push(p + ext);
|
|
215
|
-
else
|
|
216
|
-
return resolve(p + ext);
|
|
217
|
-
}
|
|
218
|
-
return resolve(subStep(p, i, ii + 1));
|
|
219
|
-
});
|
|
220
|
-
}), "subStep");
|
|
221
|
-
return cb ? step(0).then((res) => cb(null, res), cb) : step(0);
|
|
222
|
-
}, "which");
|
|
223
|
-
var whichSync = /* @__PURE__ */ __name((cmd, opt) => {
|
|
224
|
-
opt = opt || {};
|
|
225
|
-
const { pathEnv, pathExt, pathExtExe } = getPathInfo(cmd, opt);
|
|
226
|
-
const found = [];
|
|
227
|
-
for (let i = 0; i < pathEnv.length; i++) {
|
|
228
|
-
const ppRaw = pathEnv[i];
|
|
229
|
-
const pathPart = /^".*"$/.test(ppRaw) ? ppRaw.slice(1, -1) : ppRaw;
|
|
230
|
-
const pCmd = path3.join(pathPart, cmd);
|
|
231
|
-
const p = !pathPart && /^\.[\\\/]/.test(cmd) ? cmd.slice(0, 2) + pCmd : pCmd;
|
|
232
|
-
for (let j = 0; j < pathExt.length; j++) {
|
|
233
|
-
const cur = p + pathExt[j];
|
|
234
|
-
try {
|
|
235
|
-
const is = isexe.sync(cur, { pathExt: pathExtExe });
|
|
236
|
-
if (is) {
|
|
237
|
-
if (opt.all)
|
|
238
|
-
found.push(cur);
|
|
239
|
-
else
|
|
240
|
-
return cur;
|
|
241
|
-
}
|
|
242
|
-
} catch (ex) {
|
|
243
|
-
}
|
|
244
|
-
}
|
|
245
|
-
}
|
|
246
|
-
if (opt.all && found.length)
|
|
247
|
-
return found;
|
|
248
|
-
if (opt.nothrow)
|
|
249
|
-
return null;
|
|
250
|
-
throw getNotFoundError(cmd);
|
|
251
|
-
}, "whichSync");
|
|
252
|
-
module.exports = which;
|
|
253
|
-
which.sync = whichSync;
|
|
254
|
-
}
|
|
255
|
-
});
|
|
256
|
-
|
|
257
|
-
// ../../node_modules/path-key/index.js
|
|
258
|
-
var require_path_key = __commonJS({
|
|
259
|
-
"../../node_modules/path-key/index.js"(exports, module) {
|
|
260
|
-
"use strict";
|
|
261
|
-
var pathKey2 = /* @__PURE__ */ __name((options = {}) => {
|
|
262
|
-
const environment = options.env || process.env;
|
|
263
|
-
const platform = options.platform || process.platform;
|
|
264
|
-
if (platform !== "win32") {
|
|
265
|
-
return "PATH";
|
|
266
|
-
}
|
|
267
|
-
return Object.keys(environment).reverse().find((key) => key.toUpperCase() === "PATH") || "Path";
|
|
268
|
-
}, "pathKey");
|
|
269
|
-
module.exports = pathKey2;
|
|
270
|
-
module.exports.default = pathKey2;
|
|
271
|
-
}
|
|
272
|
-
});
|
|
273
|
-
|
|
274
|
-
// ../../node_modules/cross-spawn/lib/util/resolveCommand.js
|
|
275
|
-
var require_resolveCommand = __commonJS({
|
|
276
|
-
"../../node_modules/cross-spawn/lib/util/resolveCommand.js"(exports, module) {
|
|
277
|
-
"use strict";
|
|
278
|
-
var path3 = __require("path");
|
|
279
|
-
var which = require_which();
|
|
280
|
-
var getPathKey = require_path_key();
|
|
281
|
-
function resolveCommandAttempt(parsed, withoutPathExt) {
|
|
282
|
-
const env = parsed.options.env || process.env;
|
|
283
|
-
const cwd = process.cwd();
|
|
284
|
-
const hasCustomCwd = parsed.options.cwd != null;
|
|
285
|
-
const shouldSwitchCwd = hasCustomCwd && process.chdir !== void 0 && !process.chdir.disabled;
|
|
286
|
-
if (shouldSwitchCwd) {
|
|
287
|
-
try {
|
|
288
|
-
process.chdir(parsed.options.cwd);
|
|
289
|
-
} catch (err) {
|
|
290
|
-
}
|
|
291
|
-
}
|
|
292
|
-
let resolved;
|
|
293
|
-
try {
|
|
294
|
-
resolved = which.sync(parsed.command, {
|
|
295
|
-
path: env[getPathKey({ env })],
|
|
296
|
-
pathExt: withoutPathExt ? path3.delimiter : void 0
|
|
297
|
-
});
|
|
298
|
-
} catch (e) {
|
|
299
|
-
} finally {
|
|
300
|
-
if (shouldSwitchCwd) {
|
|
301
|
-
process.chdir(cwd);
|
|
302
|
-
}
|
|
303
|
-
}
|
|
304
|
-
if (resolved) {
|
|
305
|
-
resolved = path3.resolve(hasCustomCwd ? parsed.options.cwd : "", resolved);
|
|
306
|
-
}
|
|
307
|
-
return resolved;
|
|
308
|
-
}
|
|
309
|
-
__name(resolveCommandAttempt, "resolveCommandAttempt");
|
|
310
|
-
function resolveCommand(parsed) {
|
|
311
|
-
return resolveCommandAttempt(parsed) || resolveCommandAttempt(parsed, true);
|
|
312
|
-
}
|
|
313
|
-
__name(resolveCommand, "resolveCommand");
|
|
314
|
-
module.exports = resolveCommand;
|
|
315
|
-
}
|
|
316
|
-
});
|
|
317
|
-
|
|
318
|
-
// ../../node_modules/cross-spawn/lib/util/escape.js
|
|
319
|
-
var require_escape = __commonJS({
|
|
320
|
-
"../../node_modules/cross-spawn/lib/util/escape.js"(exports, module) {
|
|
321
|
-
"use strict";
|
|
322
|
-
var metaCharsRegExp = /([()\][%!^"`<>&|;, *?])/g;
|
|
323
|
-
function escapeCommand(arg) {
|
|
324
|
-
arg = arg.replace(metaCharsRegExp, "^$1");
|
|
325
|
-
return arg;
|
|
326
|
-
}
|
|
327
|
-
__name(escapeCommand, "escapeCommand");
|
|
328
|
-
function escapeArgument(arg, doubleEscapeMetaChars) {
|
|
329
|
-
arg = `${arg}`;
|
|
330
|
-
arg = arg.replace(/(?=(\\+?)?)\1"/g, '$1$1\\"');
|
|
331
|
-
arg = arg.replace(/(?=(\\+?)?)\1$/, "$1$1");
|
|
332
|
-
arg = `"${arg}"`;
|
|
333
|
-
arg = arg.replace(metaCharsRegExp, "^$1");
|
|
334
|
-
if (doubleEscapeMetaChars) {
|
|
335
|
-
arg = arg.replace(metaCharsRegExp, "^$1");
|
|
336
|
-
}
|
|
337
|
-
return arg;
|
|
338
|
-
}
|
|
339
|
-
__name(escapeArgument, "escapeArgument");
|
|
340
|
-
module.exports.command = escapeCommand;
|
|
341
|
-
module.exports.argument = escapeArgument;
|
|
342
|
-
}
|
|
343
|
-
});
|
|
344
|
-
|
|
345
|
-
// ../../node_modules/shebang-regex/index.js
|
|
346
|
-
var require_shebang_regex = __commonJS({
|
|
347
|
-
"../../node_modules/shebang-regex/index.js"(exports, module) {
|
|
348
|
-
"use strict";
|
|
349
|
-
module.exports = /^#!(.*)/;
|
|
350
|
-
}
|
|
351
|
-
});
|
|
352
|
-
|
|
353
|
-
// ../../node_modules/shebang-command/index.js
|
|
354
|
-
var require_shebang_command = __commonJS({
|
|
355
|
-
"../../node_modules/shebang-command/index.js"(exports, module) {
|
|
356
|
-
"use strict";
|
|
357
|
-
var shebangRegex = require_shebang_regex();
|
|
358
|
-
module.exports = (string = "") => {
|
|
359
|
-
const match = string.match(shebangRegex);
|
|
360
|
-
if (!match) {
|
|
361
|
-
return null;
|
|
362
|
-
}
|
|
363
|
-
const [path3, argument] = match[0].replace(/#! ?/, "").split(" ");
|
|
364
|
-
const binary = path3.split("/").pop();
|
|
365
|
-
if (binary === "env") {
|
|
366
|
-
return argument;
|
|
367
|
-
}
|
|
368
|
-
return argument ? `${binary} ${argument}` : binary;
|
|
369
|
-
};
|
|
370
|
-
}
|
|
371
|
-
});
|
|
372
|
-
|
|
373
|
-
// ../../node_modules/cross-spawn/lib/util/readShebang.js
|
|
374
|
-
var require_readShebang = __commonJS({
|
|
375
|
-
"../../node_modules/cross-spawn/lib/util/readShebang.js"(exports, module) {
|
|
376
|
-
"use strict";
|
|
377
|
-
var fs = __require("fs");
|
|
378
|
-
var shebangCommand = require_shebang_command();
|
|
379
|
-
function readShebang(command) {
|
|
380
|
-
const size = 150;
|
|
381
|
-
const buffer = Buffer.alloc(size);
|
|
382
|
-
let fd;
|
|
383
|
-
try {
|
|
384
|
-
fd = fs.openSync(command, "r");
|
|
385
|
-
fs.readSync(fd, buffer, 0, size, 0);
|
|
386
|
-
fs.closeSync(fd);
|
|
387
|
-
} catch (e) {
|
|
388
|
-
}
|
|
389
|
-
return shebangCommand(buffer.toString());
|
|
390
|
-
}
|
|
391
|
-
__name(readShebang, "readShebang");
|
|
392
|
-
module.exports = readShebang;
|
|
393
|
-
}
|
|
394
|
-
});
|
|
395
|
-
|
|
396
|
-
// ../../node_modules/cross-spawn/lib/parse.js
|
|
397
|
-
var require_parse = __commonJS({
|
|
398
|
-
"../../node_modules/cross-spawn/lib/parse.js"(exports, module) {
|
|
399
|
-
"use strict";
|
|
400
|
-
var path3 = __require("path");
|
|
401
|
-
var resolveCommand = require_resolveCommand();
|
|
402
|
-
var escape = require_escape();
|
|
403
|
-
var readShebang = require_readShebang();
|
|
404
|
-
var isWin = process.platform === "win32";
|
|
405
|
-
var isExecutableRegExp = /\.(?:com|exe)$/i;
|
|
406
|
-
var isCmdShimRegExp = /node_modules[\\/].bin[\\/][^\\/]+\.cmd$/i;
|
|
407
|
-
function detectShebang(parsed) {
|
|
408
|
-
parsed.file = resolveCommand(parsed);
|
|
409
|
-
const shebang = parsed.file && readShebang(parsed.file);
|
|
410
|
-
if (shebang) {
|
|
411
|
-
parsed.args.unshift(parsed.file);
|
|
412
|
-
parsed.command = shebang;
|
|
413
|
-
return resolveCommand(parsed);
|
|
414
|
-
}
|
|
415
|
-
return parsed.file;
|
|
416
|
-
}
|
|
417
|
-
__name(detectShebang, "detectShebang");
|
|
418
|
-
function parseNonShell(parsed) {
|
|
419
|
-
if (!isWin) {
|
|
420
|
-
return parsed;
|
|
421
|
-
}
|
|
422
|
-
const commandFile = detectShebang(parsed);
|
|
423
|
-
const needsShell = !isExecutableRegExp.test(commandFile);
|
|
424
|
-
if (parsed.options.forceShell || needsShell) {
|
|
425
|
-
const needsDoubleEscapeMetaChars = isCmdShimRegExp.test(commandFile);
|
|
426
|
-
parsed.command = path3.normalize(parsed.command);
|
|
427
|
-
parsed.command = escape.command(parsed.command);
|
|
428
|
-
parsed.args = parsed.args.map((arg) => escape.argument(arg, needsDoubleEscapeMetaChars));
|
|
429
|
-
const shellCommand = [parsed.command].concat(parsed.args).join(" ");
|
|
430
|
-
parsed.args = ["/d", "/s", "/c", `"${shellCommand}"`];
|
|
431
|
-
parsed.command = process.env.comspec || "cmd.exe";
|
|
432
|
-
parsed.options.windowsVerbatimArguments = true;
|
|
433
|
-
}
|
|
434
|
-
return parsed;
|
|
435
|
-
}
|
|
436
|
-
__name(parseNonShell, "parseNonShell");
|
|
437
|
-
function parse(command, args, options) {
|
|
438
|
-
if (args && !Array.isArray(args)) {
|
|
439
|
-
options = args;
|
|
440
|
-
args = null;
|
|
441
|
-
}
|
|
442
|
-
args = args ? args.slice(0) : [];
|
|
443
|
-
options = Object.assign({}, options);
|
|
444
|
-
const parsed = {
|
|
445
|
-
command,
|
|
446
|
-
args,
|
|
447
|
-
options,
|
|
448
|
-
file: void 0,
|
|
449
|
-
original: {
|
|
450
|
-
command,
|
|
451
|
-
args
|
|
452
|
-
}
|
|
453
|
-
};
|
|
454
|
-
return options.shell ? parsed : parseNonShell(parsed);
|
|
455
|
-
}
|
|
456
|
-
__name(parse, "parse");
|
|
457
|
-
module.exports = parse;
|
|
458
|
-
}
|
|
459
|
-
});
|
|
460
|
-
|
|
461
|
-
// ../../node_modules/cross-spawn/lib/enoent.js
|
|
462
|
-
var require_enoent = __commonJS({
|
|
463
|
-
"../../node_modules/cross-spawn/lib/enoent.js"(exports, module) {
|
|
464
|
-
"use strict";
|
|
465
|
-
var isWin = process.platform === "win32";
|
|
466
|
-
function notFoundError(original, syscall) {
|
|
467
|
-
return Object.assign(new Error(`${syscall} ${original.command} ENOENT`), {
|
|
468
|
-
code: "ENOENT",
|
|
469
|
-
errno: "ENOENT",
|
|
470
|
-
syscall: `${syscall} ${original.command}`,
|
|
471
|
-
path: original.command,
|
|
472
|
-
spawnargs: original.args
|
|
473
|
-
});
|
|
474
|
-
}
|
|
475
|
-
__name(notFoundError, "notFoundError");
|
|
476
|
-
function hookChildProcess(cp, parsed) {
|
|
477
|
-
if (!isWin) {
|
|
478
|
-
return;
|
|
479
|
-
}
|
|
480
|
-
const originalEmit = cp.emit;
|
|
481
|
-
cp.emit = function(name, arg1) {
|
|
482
|
-
if (name === "exit") {
|
|
483
|
-
const err = verifyENOENT(arg1, parsed);
|
|
484
|
-
if (err) {
|
|
485
|
-
return originalEmit.call(cp, "error", err);
|
|
486
|
-
}
|
|
487
|
-
}
|
|
488
|
-
return originalEmit.apply(cp, arguments);
|
|
489
|
-
};
|
|
490
|
-
}
|
|
491
|
-
__name(hookChildProcess, "hookChildProcess");
|
|
492
|
-
function verifyENOENT(status, parsed) {
|
|
493
|
-
if (isWin && status === 1 && !parsed.file) {
|
|
494
|
-
return notFoundError(parsed.original, "spawn");
|
|
495
|
-
}
|
|
496
|
-
return null;
|
|
497
|
-
}
|
|
498
|
-
__name(verifyENOENT, "verifyENOENT");
|
|
499
|
-
function verifyENOENTSync(status, parsed) {
|
|
500
|
-
if (isWin && status === 1 && !parsed.file) {
|
|
501
|
-
return notFoundError(parsed.original, "spawnSync");
|
|
502
|
-
}
|
|
503
|
-
return null;
|
|
504
|
-
}
|
|
505
|
-
__name(verifyENOENTSync, "verifyENOENTSync");
|
|
506
|
-
module.exports = {
|
|
507
|
-
hookChildProcess,
|
|
508
|
-
verifyENOENT,
|
|
509
|
-
verifyENOENTSync,
|
|
510
|
-
notFoundError
|
|
511
|
-
};
|
|
512
|
-
}
|
|
513
|
-
});
|
|
514
|
-
|
|
515
|
-
// ../../node_modules/cross-spawn/index.js
|
|
516
|
-
var require_cross_spawn = __commonJS({
|
|
517
|
-
"../../node_modules/cross-spawn/index.js"(exports, module) {
|
|
518
|
-
"use strict";
|
|
519
|
-
var cp = __require("child_process");
|
|
520
|
-
var parse = require_parse();
|
|
521
|
-
var enoent = require_enoent();
|
|
522
|
-
function spawn(command, args, options) {
|
|
523
|
-
const parsed = parse(command, args, options);
|
|
524
|
-
const spawned = cp.spawn(parsed.command, parsed.args, parsed.options);
|
|
525
|
-
enoent.hookChildProcess(spawned, parsed);
|
|
526
|
-
return spawned;
|
|
527
|
-
}
|
|
528
|
-
__name(spawn, "spawn");
|
|
529
|
-
function spawnSync(command, args, options) {
|
|
530
|
-
const parsed = parse(command, args, options);
|
|
531
|
-
const result = cp.spawnSync(parsed.command, parsed.args, parsed.options);
|
|
532
|
-
result.error = result.error || enoent.verifyENOENTSync(result.status, parsed);
|
|
533
|
-
return result;
|
|
534
|
-
}
|
|
535
|
-
__name(spawnSync, "spawnSync");
|
|
536
|
-
module.exports = spawn;
|
|
537
|
-
module.exports.spawn = spawn;
|
|
538
|
-
module.exports.sync = spawnSync;
|
|
539
|
-
module.exports._parse = parse;
|
|
540
|
-
module.exports._enoent = enoent;
|
|
541
|
-
}
|
|
542
|
-
});
|
|
543
|
-
|
|
544
|
-
// ../../node_modules/merge-stream/index.js
|
|
545
|
-
var require_merge_stream = __commonJS({
|
|
546
|
-
"../../node_modules/merge-stream/index.js"(exports, module) {
|
|
547
|
-
"use strict";
|
|
548
|
-
var { PassThrough } = __require("stream");
|
|
549
|
-
module.exports = function() {
|
|
550
|
-
var sources = [];
|
|
551
|
-
var output = new PassThrough({ objectMode: true });
|
|
552
|
-
output.setMaxListeners(0);
|
|
553
|
-
output.add = add;
|
|
554
|
-
output.isEmpty = isEmpty;
|
|
555
|
-
output.on("unpipe", remove);
|
|
556
|
-
Array.prototype.slice.call(arguments).forEach(add);
|
|
557
|
-
return output;
|
|
558
|
-
function add(source) {
|
|
559
|
-
if (Array.isArray(source)) {
|
|
560
|
-
source.forEach(add);
|
|
561
|
-
return this;
|
|
562
|
-
}
|
|
563
|
-
sources.push(source);
|
|
564
|
-
source.once("end", remove.bind(null, source));
|
|
565
|
-
source.once("error", output.emit.bind(output, "error"));
|
|
566
|
-
source.pipe(output, { end: false });
|
|
567
|
-
return this;
|
|
568
|
-
}
|
|
569
|
-
__name(add, "add");
|
|
570
|
-
function isEmpty() {
|
|
571
|
-
return sources.length == 0;
|
|
572
|
-
}
|
|
573
|
-
__name(isEmpty, "isEmpty");
|
|
574
|
-
function remove(source) {
|
|
575
|
-
sources = sources.filter(function(it) {
|
|
576
|
-
return it !== source;
|
|
577
|
-
});
|
|
578
|
-
if (!sources.length && output.readable) {
|
|
579
|
-
output.end();
|
|
580
|
-
}
|
|
581
|
-
}
|
|
582
|
-
__name(remove, "remove");
|
|
583
|
-
};
|
|
584
|
-
}
|
|
585
|
-
});
|
|
586
|
-
|
|
587
|
-
// node_modules/execa/index.js
|
|
588
|
-
var import_cross_spawn = __toESM(require_cross_spawn(), 1);
|
|
589
|
-
import { Buffer as Buffer3 } from "node:buffer";
|
|
590
|
-
import path2 from "node:path";
|
|
591
|
-
import childProcess from "node:child_process";
|
|
592
|
-
import process6 from "node:process";
|
|
593
|
-
|
|
594
|
-
// ../../node_modules/strip-final-newline/index.js
|
|
595
|
-
function stripFinalNewline(input) {
|
|
596
|
-
const LF = typeof input === "string" ? "\n" : "\n".charCodeAt();
|
|
597
|
-
const CR = typeof input === "string" ? "\r" : "\r".charCodeAt();
|
|
598
|
-
if (input[input.length - 1] === LF) {
|
|
599
|
-
input = input.slice(0, -1);
|
|
600
|
-
}
|
|
601
|
-
if (input[input.length - 1] === CR) {
|
|
602
|
-
input = input.slice(0, -1);
|
|
603
|
-
}
|
|
604
|
-
return input;
|
|
605
|
-
}
|
|
606
|
-
__name(stripFinalNewline, "stripFinalNewline");
|
|
607
|
-
|
|
608
|
-
// node_modules/npm-run-path/index.js
|
|
609
|
-
import process2 from "node:process";
|
|
610
|
-
import path from "node:path";
|
|
611
|
-
import { fileURLToPath } from "node:url";
|
|
612
|
-
|
|
613
|
-
// node_modules/path-key/index.js
|
|
614
|
-
function pathKey(options = {}) {
|
|
615
|
-
const {
|
|
616
|
-
env = process.env,
|
|
617
|
-
platform = process.platform
|
|
618
|
-
} = options;
|
|
619
|
-
if (platform !== "win32") {
|
|
620
|
-
return "PATH";
|
|
621
|
-
}
|
|
622
|
-
return Object.keys(env).reverse().find((key) => key.toUpperCase() === "PATH") || "Path";
|
|
623
|
-
}
|
|
624
|
-
__name(pathKey, "pathKey");
|
|
625
|
-
|
|
626
|
-
// node_modules/npm-run-path/index.js
|
|
627
|
-
var npmRunPath = /* @__PURE__ */ __name(({
|
|
628
|
-
cwd = process2.cwd(),
|
|
629
|
-
path: pathOption = process2.env[pathKey()],
|
|
630
|
-
preferLocal = true,
|
|
631
|
-
execPath = process2.execPath,
|
|
632
|
-
addExecPath = true
|
|
633
|
-
} = {}) => {
|
|
634
|
-
const cwdString = cwd instanceof URL ? fileURLToPath(cwd) : cwd;
|
|
635
|
-
const cwdPath = path.resolve(cwdString);
|
|
636
|
-
const result = [];
|
|
637
|
-
if (preferLocal) {
|
|
638
|
-
applyPreferLocal(result, cwdPath);
|
|
639
|
-
}
|
|
640
|
-
if (addExecPath) {
|
|
641
|
-
applyExecPath(result, execPath, cwdPath);
|
|
642
|
-
}
|
|
643
|
-
return [...result, pathOption].join(path.delimiter);
|
|
644
|
-
}, "npmRunPath");
|
|
645
|
-
var applyPreferLocal = /* @__PURE__ */ __name((result, cwdPath) => {
|
|
646
|
-
let previous;
|
|
647
|
-
while (previous !== cwdPath) {
|
|
648
|
-
result.push(path.join(cwdPath, "node_modules/.bin"));
|
|
649
|
-
previous = cwdPath;
|
|
650
|
-
cwdPath = path.resolve(cwdPath, "..");
|
|
651
|
-
}
|
|
652
|
-
}, "applyPreferLocal");
|
|
653
|
-
var applyExecPath = /* @__PURE__ */ __name((result, execPath, cwdPath) => {
|
|
654
|
-
const execPathString = execPath instanceof URL ? fileURLToPath(execPath) : execPath;
|
|
655
|
-
result.push(path.resolve(cwdPath, execPathString, ".."));
|
|
656
|
-
}, "applyExecPath");
|
|
657
|
-
var npmRunPathEnv = /* @__PURE__ */ __name(({ env = process2.env, ...options } = {}) => {
|
|
658
|
-
env = { ...env };
|
|
659
|
-
const pathName = pathKey({ env });
|
|
660
|
-
options.path = env[pathName];
|
|
661
|
-
env[pathName] = npmRunPath(options);
|
|
662
|
-
return env;
|
|
663
|
-
}, "npmRunPathEnv");
|
|
664
|
-
|
|
665
|
-
// node_modules/mimic-fn/index.js
|
|
666
|
-
var copyProperty = /* @__PURE__ */ __name((to, from, property, ignoreNonConfigurable) => {
|
|
667
|
-
if (property === "length" || property === "prototype") {
|
|
668
|
-
return;
|
|
669
|
-
}
|
|
670
|
-
if (property === "arguments" || property === "caller") {
|
|
671
|
-
return;
|
|
672
|
-
}
|
|
673
|
-
const toDescriptor = Object.getOwnPropertyDescriptor(to, property);
|
|
674
|
-
const fromDescriptor = Object.getOwnPropertyDescriptor(from, property);
|
|
675
|
-
if (!canCopyProperty(toDescriptor, fromDescriptor) && ignoreNonConfigurable) {
|
|
676
|
-
return;
|
|
677
|
-
}
|
|
678
|
-
Object.defineProperty(to, property, fromDescriptor);
|
|
679
|
-
}, "copyProperty");
|
|
680
|
-
var canCopyProperty = /* @__PURE__ */ __name(function(toDescriptor, fromDescriptor) {
|
|
681
|
-
return toDescriptor === void 0 || toDescriptor.configurable || toDescriptor.writable === fromDescriptor.writable && toDescriptor.enumerable === fromDescriptor.enumerable && toDescriptor.configurable === fromDescriptor.configurable && (toDescriptor.writable || toDescriptor.value === fromDescriptor.value);
|
|
682
|
-
}, "canCopyProperty");
|
|
683
|
-
var changePrototype = /* @__PURE__ */ __name((to, from) => {
|
|
684
|
-
const fromPrototype = Object.getPrototypeOf(from);
|
|
685
|
-
if (fromPrototype === Object.getPrototypeOf(to)) {
|
|
686
|
-
return;
|
|
687
|
-
}
|
|
688
|
-
Object.setPrototypeOf(to, fromPrototype);
|
|
689
|
-
}, "changePrototype");
|
|
690
|
-
var wrappedToString = /* @__PURE__ */ __name((withName, fromBody) => `/* Wrapped ${withName}*/
|
|
691
|
-
${fromBody}`, "wrappedToString");
|
|
692
|
-
var toStringDescriptor = Object.getOwnPropertyDescriptor(Function.prototype, "toString");
|
|
693
|
-
var toStringName = Object.getOwnPropertyDescriptor(Function.prototype.toString, "name");
|
|
694
|
-
var changeToString = /* @__PURE__ */ __name((to, from, name) => {
|
|
695
|
-
const withName = name === "" ? "" : `with ${name.trim()}() `;
|
|
696
|
-
const newToString = wrappedToString.bind(null, withName, from.toString());
|
|
697
|
-
Object.defineProperty(newToString, "name", toStringName);
|
|
698
|
-
Object.defineProperty(to, "toString", { ...toStringDescriptor, value: newToString });
|
|
699
|
-
}, "changeToString");
|
|
700
|
-
function mimicFunction(to, from, { ignoreNonConfigurable = false } = {}) {
|
|
701
|
-
const { name } = to;
|
|
702
|
-
for (const property of Reflect.ownKeys(from)) {
|
|
703
|
-
copyProperty(to, from, property, ignoreNonConfigurable);
|
|
704
|
-
}
|
|
705
|
-
changePrototype(to, from);
|
|
706
|
-
changeToString(to, from, name);
|
|
707
|
-
return to;
|
|
708
|
-
}
|
|
709
|
-
__name(mimicFunction, "mimicFunction");
|
|
710
|
-
|
|
711
|
-
// node_modules/onetime/index.js
|
|
712
|
-
var calledFunctions = /* @__PURE__ */ new WeakMap();
|
|
713
|
-
var onetime = /* @__PURE__ */ __name((function_, options = {}) => {
|
|
714
|
-
if (typeof function_ !== "function") {
|
|
715
|
-
throw new TypeError("Expected a function");
|
|
716
|
-
}
|
|
717
|
-
let returnValue;
|
|
718
|
-
let callCount = 0;
|
|
719
|
-
const functionName = function_.displayName || function_.name || "<anonymous>";
|
|
720
|
-
const onetime2 = /* @__PURE__ */ __name(function(...arguments_) {
|
|
721
|
-
calledFunctions.set(onetime2, ++callCount);
|
|
722
|
-
if (callCount === 1) {
|
|
723
|
-
returnValue = function_.apply(this, arguments_);
|
|
724
|
-
function_ = null;
|
|
725
|
-
} else if (options.throw === true) {
|
|
726
|
-
throw new Error(`Function \`${functionName}\` can only be called once`);
|
|
727
|
-
}
|
|
728
|
-
return returnValue;
|
|
729
|
-
}, "onetime");
|
|
730
|
-
mimicFunction(onetime2, function_);
|
|
731
|
-
calledFunctions.set(onetime2, callCount);
|
|
732
|
-
return onetime2;
|
|
733
|
-
}, "onetime");
|
|
734
|
-
onetime.callCount = (function_) => {
|
|
735
|
-
if (!calledFunctions.has(function_)) {
|
|
736
|
-
throw new Error(`The given function \`${function_.name}\` is not wrapped by the \`onetime\` package`);
|
|
737
|
-
}
|
|
738
|
-
return calledFunctions.get(function_);
|
|
739
|
-
};
|
|
740
|
-
var onetime_default = onetime;
|
|
741
|
-
|
|
742
|
-
// node_modules/execa/lib/error.js
|
|
743
|
-
import process3 from "node:process";
|
|
744
|
-
|
|
745
|
-
// node_modules/human-signals/build/src/main.js
|
|
746
|
-
import { constants as constants2 } from "node:os";
|
|
747
|
-
|
|
748
|
-
// node_modules/human-signals/build/src/realtime.js
|
|
749
|
-
var getRealtimeSignals = /* @__PURE__ */ __name(() => {
|
|
750
|
-
const length = SIGRTMAX - SIGRTMIN + 1;
|
|
751
|
-
return Array.from({ length }, getRealtimeSignal);
|
|
752
|
-
}, "getRealtimeSignals");
|
|
753
|
-
var getRealtimeSignal = /* @__PURE__ */ __name((value, index) => ({
|
|
754
|
-
name: `SIGRT${index + 1}`,
|
|
755
|
-
number: SIGRTMIN + index,
|
|
756
|
-
action: "terminate",
|
|
757
|
-
description: "Application-specific signal (realtime)",
|
|
758
|
-
standard: "posix"
|
|
759
|
-
}), "getRealtimeSignal");
|
|
760
|
-
var SIGRTMIN = 34;
|
|
761
|
-
var SIGRTMAX = 64;
|
|
762
|
-
|
|
763
|
-
// node_modules/human-signals/build/src/signals.js
|
|
764
|
-
import { constants } from "node:os";
|
|
765
|
-
|
|
766
|
-
// node_modules/human-signals/build/src/core.js
|
|
767
|
-
var SIGNALS = [
|
|
768
|
-
{
|
|
769
|
-
name: "SIGHUP",
|
|
770
|
-
number: 1,
|
|
771
|
-
action: "terminate",
|
|
772
|
-
description: "Terminal closed",
|
|
773
|
-
standard: "posix"
|
|
774
|
-
},
|
|
775
|
-
{
|
|
776
|
-
name: "SIGINT",
|
|
777
|
-
number: 2,
|
|
778
|
-
action: "terminate",
|
|
779
|
-
description: "User interruption with CTRL-C",
|
|
780
|
-
standard: "ansi"
|
|
781
|
-
},
|
|
782
|
-
{
|
|
783
|
-
name: "SIGQUIT",
|
|
784
|
-
number: 3,
|
|
785
|
-
action: "core",
|
|
786
|
-
description: "User interruption with CTRL-\\",
|
|
787
|
-
standard: "posix"
|
|
788
|
-
},
|
|
789
|
-
{
|
|
790
|
-
name: "SIGILL",
|
|
791
|
-
number: 4,
|
|
792
|
-
action: "core",
|
|
793
|
-
description: "Invalid machine instruction",
|
|
794
|
-
standard: "ansi"
|
|
795
|
-
},
|
|
796
|
-
{
|
|
797
|
-
name: "SIGTRAP",
|
|
798
|
-
number: 5,
|
|
799
|
-
action: "core",
|
|
800
|
-
description: "Debugger breakpoint",
|
|
801
|
-
standard: "posix"
|
|
802
|
-
},
|
|
803
|
-
{
|
|
804
|
-
name: "SIGABRT",
|
|
805
|
-
number: 6,
|
|
806
|
-
action: "core",
|
|
807
|
-
description: "Aborted",
|
|
808
|
-
standard: "ansi"
|
|
809
|
-
},
|
|
810
|
-
{
|
|
811
|
-
name: "SIGIOT",
|
|
812
|
-
number: 6,
|
|
813
|
-
action: "core",
|
|
814
|
-
description: "Aborted",
|
|
815
|
-
standard: "bsd"
|
|
816
|
-
},
|
|
817
|
-
{
|
|
818
|
-
name: "SIGBUS",
|
|
819
|
-
number: 7,
|
|
820
|
-
action: "core",
|
|
821
|
-
description: "Bus error due to misaligned, non-existing address or paging error",
|
|
822
|
-
standard: "bsd"
|
|
823
|
-
},
|
|
824
|
-
{
|
|
825
|
-
name: "SIGEMT",
|
|
826
|
-
number: 7,
|
|
827
|
-
action: "terminate",
|
|
828
|
-
description: "Command should be emulated but is not implemented",
|
|
829
|
-
standard: "other"
|
|
830
|
-
},
|
|
831
|
-
{
|
|
832
|
-
name: "SIGFPE",
|
|
833
|
-
number: 8,
|
|
834
|
-
action: "core",
|
|
835
|
-
description: "Floating point arithmetic error",
|
|
836
|
-
standard: "ansi"
|
|
837
|
-
},
|
|
838
|
-
{
|
|
839
|
-
name: "SIGKILL",
|
|
840
|
-
number: 9,
|
|
841
|
-
action: "terminate",
|
|
842
|
-
description: "Forced termination",
|
|
843
|
-
standard: "posix",
|
|
844
|
-
forced: true
|
|
845
|
-
},
|
|
846
|
-
{
|
|
847
|
-
name: "SIGUSR1",
|
|
848
|
-
number: 10,
|
|
849
|
-
action: "terminate",
|
|
850
|
-
description: "Application-specific signal",
|
|
851
|
-
standard: "posix"
|
|
852
|
-
},
|
|
853
|
-
{
|
|
854
|
-
name: "SIGSEGV",
|
|
855
|
-
number: 11,
|
|
856
|
-
action: "core",
|
|
857
|
-
description: "Segmentation fault",
|
|
858
|
-
standard: "ansi"
|
|
859
|
-
},
|
|
860
|
-
{
|
|
861
|
-
name: "SIGUSR2",
|
|
862
|
-
number: 12,
|
|
863
|
-
action: "terminate",
|
|
864
|
-
description: "Application-specific signal",
|
|
865
|
-
standard: "posix"
|
|
866
|
-
},
|
|
867
|
-
{
|
|
868
|
-
name: "SIGPIPE",
|
|
869
|
-
number: 13,
|
|
870
|
-
action: "terminate",
|
|
871
|
-
description: "Broken pipe or socket",
|
|
872
|
-
standard: "posix"
|
|
873
|
-
},
|
|
874
|
-
{
|
|
875
|
-
name: "SIGALRM",
|
|
876
|
-
number: 14,
|
|
877
|
-
action: "terminate",
|
|
878
|
-
description: "Timeout or timer",
|
|
879
|
-
standard: "posix"
|
|
880
|
-
},
|
|
881
|
-
{
|
|
882
|
-
name: "SIGTERM",
|
|
883
|
-
number: 15,
|
|
884
|
-
action: "terminate",
|
|
885
|
-
description: "Termination",
|
|
886
|
-
standard: "ansi"
|
|
887
|
-
},
|
|
888
|
-
{
|
|
889
|
-
name: "SIGSTKFLT",
|
|
890
|
-
number: 16,
|
|
891
|
-
action: "terminate",
|
|
892
|
-
description: "Stack is empty or overflowed",
|
|
893
|
-
standard: "other"
|
|
894
|
-
},
|
|
895
|
-
{
|
|
896
|
-
name: "SIGCHLD",
|
|
897
|
-
number: 17,
|
|
898
|
-
action: "ignore",
|
|
899
|
-
description: "Child process terminated, paused or unpaused",
|
|
900
|
-
standard: "posix"
|
|
901
|
-
},
|
|
902
|
-
{
|
|
903
|
-
name: "SIGCLD",
|
|
904
|
-
number: 17,
|
|
905
|
-
action: "ignore",
|
|
906
|
-
description: "Child process terminated, paused or unpaused",
|
|
907
|
-
standard: "other"
|
|
908
|
-
},
|
|
909
|
-
{
|
|
910
|
-
name: "SIGCONT",
|
|
911
|
-
number: 18,
|
|
912
|
-
action: "unpause",
|
|
913
|
-
description: "Unpaused",
|
|
914
|
-
standard: "posix",
|
|
915
|
-
forced: true
|
|
916
|
-
},
|
|
917
|
-
{
|
|
918
|
-
name: "SIGSTOP",
|
|
919
|
-
number: 19,
|
|
920
|
-
action: "pause",
|
|
921
|
-
description: "Paused",
|
|
922
|
-
standard: "posix",
|
|
923
|
-
forced: true
|
|
924
|
-
},
|
|
925
|
-
{
|
|
926
|
-
name: "SIGTSTP",
|
|
927
|
-
number: 20,
|
|
928
|
-
action: "pause",
|
|
929
|
-
description: 'Paused using CTRL-Z or "suspend"',
|
|
930
|
-
standard: "posix"
|
|
931
|
-
},
|
|
932
|
-
{
|
|
933
|
-
name: "SIGTTIN",
|
|
934
|
-
number: 21,
|
|
935
|
-
action: "pause",
|
|
936
|
-
description: "Background process cannot read terminal input",
|
|
937
|
-
standard: "posix"
|
|
938
|
-
},
|
|
939
|
-
{
|
|
940
|
-
name: "SIGBREAK",
|
|
941
|
-
number: 21,
|
|
942
|
-
action: "terminate",
|
|
943
|
-
description: "User interruption with CTRL-BREAK",
|
|
944
|
-
standard: "other"
|
|
945
|
-
},
|
|
946
|
-
{
|
|
947
|
-
name: "SIGTTOU",
|
|
948
|
-
number: 22,
|
|
949
|
-
action: "pause",
|
|
950
|
-
description: "Background process cannot write to terminal output",
|
|
951
|
-
standard: "posix"
|
|
952
|
-
},
|
|
953
|
-
{
|
|
954
|
-
name: "SIGURG",
|
|
955
|
-
number: 23,
|
|
956
|
-
action: "ignore",
|
|
957
|
-
description: "Socket received out-of-band data",
|
|
958
|
-
standard: "bsd"
|
|
959
|
-
},
|
|
960
|
-
{
|
|
961
|
-
name: "SIGXCPU",
|
|
962
|
-
number: 24,
|
|
963
|
-
action: "core",
|
|
964
|
-
description: "Process timed out",
|
|
965
|
-
standard: "bsd"
|
|
966
|
-
},
|
|
967
|
-
{
|
|
968
|
-
name: "SIGXFSZ",
|
|
969
|
-
number: 25,
|
|
970
|
-
action: "core",
|
|
971
|
-
description: "File too big",
|
|
972
|
-
standard: "bsd"
|
|
973
|
-
},
|
|
974
|
-
{
|
|
975
|
-
name: "SIGVTALRM",
|
|
976
|
-
number: 26,
|
|
977
|
-
action: "terminate",
|
|
978
|
-
description: "Timeout or timer",
|
|
979
|
-
standard: "bsd"
|
|
980
|
-
},
|
|
981
|
-
{
|
|
982
|
-
name: "SIGPROF",
|
|
983
|
-
number: 27,
|
|
984
|
-
action: "terminate",
|
|
985
|
-
description: "Timeout or timer",
|
|
986
|
-
standard: "bsd"
|
|
987
|
-
},
|
|
988
|
-
{
|
|
989
|
-
name: "SIGWINCH",
|
|
990
|
-
number: 28,
|
|
991
|
-
action: "ignore",
|
|
992
|
-
description: "Terminal window size changed",
|
|
993
|
-
standard: "bsd"
|
|
994
|
-
},
|
|
995
|
-
{
|
|
996
|
-
name: "SIGIO",
|
|
997
|
-
number: 29,
|
|
998
|
-
action: "terminate",
|
|
999
|
-
description: "I/O is available",
|
|
1000
|
-
standard: "other"
|
|
1001
|
-
},
|
|
1002
|
-
{
|
|
1003
|
-
name: "SIGPOLL",
|
|
1004
|
-
number: 29,
|
|
1005
|
-
action: "terminate",
|
|
1006
|
-
description: "Watched event",
|
|
1007
|
-
standard: "other"
|
|
1008
|
-
},
|
|
1009
|
-
{
|
|
1010
|
-
name: "SIGINFO",
|
|
1011
|
-
number: 29,
|
|
1012
|
-
action: "ignore",
|
|
1013
|
-
description: "Request for process information",
|
|
1014
|
-
standard: "other"
|
|
1015
|
-
},
|
|
1016
|
-
{
|
|
1017
|
-
name: "SIGPWR",
|
|
1018
|
-
number: 30,
|
|
1019
|
-
action: "terminate",
|
|
1020
|
-
description: "Device running out of power",
|
|
1021
|
-
standard: "systemv"
|
|
1022
|
-
},
|
|
1023
|
-
{
|
|
1024
|
-
name: "SIGSYS",
|
|
1025
|
-
number: 31,
|
|
1026
|
-
action: "core",
|
|
1027
|
-
description: "Invalid system call",
|
|
1028
|
-
standard: "other"
|
|
1029
|
-
},
|
|
1030
|
-
{
|
|
1031
|
-
name: "SIGUNUSED",
|
|
1032
|
-
number: 31,
|
|
1033
|
-
action: "terminate",
|
|
1034
|
-
description: "Invalid system call",
|
|
1035
|
-
standard: "other"
|
|
1036
|
-
}
|
|
1037
|
-
];
|
|
1038
|
-
|
|
1039
|
-
// node_modules/human-signals/build/src/signals.js
|
|
1040
|
-
var getSignals = /* @__PURE__ */ __name(() => {
|
|
1041
|
-
const realtimeSignals = getRealtimeSignals();
|
|
1042
|
-
const signals2 = [...SIGNALS, ...realtimeSignals].map(normalizeSignal);
|
|
1043
|
-
return signals2;
|
|
1044
|
-
}, "getSignals");
|
|
1045
|
-
var normalizeSignal = /* @__PURE__ */ __name(({
|
|
1046
|
-
name,
|
|
1047
|
-
number: defaultNumber,
|
|
1048
|
-
description,
|
|
1049
|
-
action,
|
|
1050
|
-
forced = false,
|
|
1051
|
-
standard
|
|
1052
|
-
}) => {
|
|
1053
|
-
const {
|
|
1054
|
-
signals: { [name]: constantSignal }
|
|
1055
|
-
} = constants;
|
|
1056
|
-
const supported = constantSignal !== void 0;
|
|
1057
|
-
const number = supported ? constantSignal : defaultNumber;
|
|
1058
|
-
return { name, number, description, supported, action, forced, standard };
|
|
1059
|
-
}, "normalizeSignal");
|
|
1060
|
-
|
|
1061
|
-
// node_modules/human-signals/build/src/main.js
|
|
1062
|
-
var getSignalsByName = /* @__PURE__ */ __name(() => {
|
|
1063
|
-
const signals2 = getSignals();
|
|
1064
|
-
return Object.fromEntries(signals2.map(getSignalByName));
|
|
1065
|
-
}, "getSignalsByName");
|
|
1066
|
-
var getSignalByName = /* @__PURE__ */ __name(({
|
|
1067
|
-
name,
|
|
1068
|
-
number,
|
|
1069
|
-
description,
|
|
1070
|
-
supported,
|
|
1071
|
-
action,
|
|
1072
|
-
forced,
|
|
1073
|
-
standard
|
|
1074
|
-
}) => [name, { name, number, description, supported, action, forced, standard }], "getSignalByName");
|
|
1075
|
-
var signalsByName = getSignalsByName();
|
|
1076
|
-
var getSignalsByNumber = /* @__PURE__ */ __name(() => {
|
|
1077
|
-
const signals2 = getSignals();
|
|
1078
|
-
const length = SIGRTMAX + 1;
|
|
1079
|
-
const signalsA = Array.from(
|
|
1080
|
-
{ length },
|
|
1081
|
-
(value, number) => getSignalByNumber(number, signals2)
|
|
1082
|
-
);
|
|
1083
|
-
return Object.assign({}, ...signalsA);
|
|
1084
|
-
}, "getSignalsByNumber");
|
|
1085
|
-
var getSignalByNumber = /* @__PURE__ */ __name((number, signals2) => {
|
|
1086
|
-
const signal = findSignalByNumber(number, signals2);
|
|
1087
|
-
if (signal === void 0) {
|
|
1088
|
-
return {};
|
|
1089
|
-
}
|
|
1090
|
-
const { name, description, supported, action, forced, standard } = signal;
|
|
1091
|
-
return {
|
|
1092
|
-
[number]: {
|
|
1093
|
-
name,
|
|
1094
|
-
number,
|
|
1095
|
-
description,
|
|
1096
|
-
supported,
|
|
1097
|
-
action,
|
|
1098
|
-
forced,
|
|
1099
|
-
standard
|
|
1100
|
-
}
|
|
1101
|
-
};
|
|
1102
|
-
}, "getSignalByNumber");
|
|
1103
|
-
var findSignalByNumber = /* @__PURE__ */ __name((number, signals2) => {
|
|
1104
|
-
const signal = signals2.find(({ name }) => constants2.signals[name] === number);
|
|
1105
|
-
if (signal !== void 0) {
|
|
1106
|
-
return signal;
|
|
1107
|
-
}
|
|
1108
|
-
return signals2.find((signalA) => signalA.number === number);
|
|
1109
|
-
}, "findSignalByNumber");
|
|
1110
|
-
var signalsByNumber = getSignalsByNumber();
|
|
1111
|
-
|
|
1112
|
-
// node_modules/execa/lib/error.js
|
|
1113
|
-
var getErrorPrefix = /* @__PURE__ */ __name(({ timedOut, timeout, errorCode, signal, signalDescription, exitCode, isCanceled }) => {
|
|
1114
|
-
if (timedOut) {
|
|
1115
|
-
return `timed out after ${timeout} milliseconds`;
|
|
1116
|
-
}
|
|
1117
|
-
if (isCanceled) {
|
|
1118
|
-
return "was canceled";
|
|
1119
|
-
}
|
|
1120
|
-
if (errorCode !== void 0) {
|
|
1121
|
-
return `failed with ${errorCode}`;
|
|
1122
|
-
}
|
|
1123
|
-
if (signal !== void 0) {
|
|
1124
|
-
return `was killed with ${signal} (${signalDescription})`;
|
|
1125
|
-
}
|
|
1126
|
-
if (exitCode !== void 0) {
|
|
1127
|
-
return `failed with exit code ${exitCode}`;
|
|
1128
|
-
}
|
|
1129
|
-
return "failed";
|
|
1130
|
-
}, "getErrorPrefix");
|
|
1131
|
-
var makeError = /* @__PURE__ */ __name(({
|
|
1132
|
-
stdout,
|
|
1133
|
-
stderr,
|
|
1134
|
-
all,
|
|
1135
|
-
error,
|
|
1136
|
-
signal,
|
|
1137
|
-
exitCode,
|
|
1138
|
-
command,
|
|
1139
|
-
escapedCommand,
|
|
1140
|
-
timedOut,
|
|
1141
|
-
isCanceled,
|
|
1142
|
-
killed,
|
|
1143
|
-
parsed: { options: { timeout, cwd = process3.cwd() } }
|
|
1144
|
-
}) => {
|
|
1145
|
-
exitCode = exitCode === null ? void 0 : exitCode;
|
|
1146
|
-
signal = signal === null ? void 0 : signal;
|
|
1147
|
-
const signalDescription = signal === void 0 ? void 0 : signalsByName[signal].description;
|
|
1148
|
-
const errorCode = error && error.code;
|
|
1149
|
-
const prefix = getErrorPrefix({ timedOut, timeout, errorCode, signal, signalDescription, exitCode, isCanceled });
|
|
1150
|
-
const execaMessage = `Command ${prefix}: ${command}`;
|
|
1151
|
-
const isError = Object.prototype.toString.call(error) === "[object Error]";
|
|
1152
|
-
const shortMessage = isError ? `${execaMessage}
|
|
1153
|
-
${error.message}` : execaMessage;
|
|
1154
|
-
const message = [shortMessage, stderr, stdout].filter(Boolean).join("\n");
|
|
1155
|
-
if (isError) {
|
|
1156
|
-
error.originalMessage = error.message;
|
|
1157
|
-
error.message = message;
|
|
1158
|
-
} else {
|
|
1159
|
-
error = new Error(message);
|
|
1160
|
-
}
|
|
1161
|
-
error.shortMessage = shortMessage;
|
|
1162
|
-
error.command = command;
|
|
1163
|
-
error.escapedCommand = escapedCommand;
|
|
1164
|
-
error.exitCode = exitCode;
|
|
1165
|
-
error.signal = signal;
|
|
1166
|
-
error.signalDescription = signalDescription;
|
|
1167
|
-
error.stdout = stdout;
|
|
1168
|
-
error.stderr = stderr;
|
|
1169
|
-
error.cwd = cwd;
|
|
1170
|
-
if (all !== void 0) {
|
|
1171
|
-
error.all = all;
|
|
1172
|
-
}
|
|
1173
|
-
if ("bufferedData" in error) {
|
|
1174
|
-
delete error.bufferedData;
|
|
1175
|
-
}
|
|
1176
|
-
error.failed = true;
|
|
1177
|
-
error.timedOut = Boolean(timedOut);
|
|
1178
|
-
error.isCanceled = isCanceled;
|
|
1179
|
-
error.killed = killed && !timedOut;
|
|
1180
|
-
return error;
|
|
1181
|
-
}, "makeError");
|
|
1182
|
-
|
|
1183
|
-
// node_modules/execa/lib/stdio.js
|
|
1184
|
-
var aliases = ["stdin", "stdout", "stderr"];
|
|
1185
|
-
var hasAlias = /* @__PURE__ */ __name((options) => aliases.some((alias) => options[alias] !== void 0), "hasAlias");
|
|
1186
|
-
var normalizeStdio = /* @__PURE__ */ __name((options) => {
|
|
1187
|
-
if (!options) {
|
|
1188
|
-
return;
|
|
1189
|
-
}
|
|
1190
|
-
const { stdio } = options;
|
|
1191
|
-
if (stdio === void 0) {
|
|
1192
|
-
return aliases.map((alias) => options[alias]);
|
|
1193
|
-
}
|
|
1194
|
-
if (hasAlias(options)) {
|
|
1195
|
-
throw new Error(`It's not possible to provide \`stdio\` in combination with one of ${aliases.map((alias) => `\`${alias}\``).join(", ")}`);
|
|
1196
|
-
}
|
|
1197
|
-
if (typeof stdio === "string") {
|
|
1198
|
-
return stdio;
|
|
1199
|
-
}
|
|
1200
|
-
if (!Array.isArray(stdio)) {
|
|
1201
|
-
throw new TypeError(`Expected \`stdio\` to be of type \`string\` or \`Array\`, got \`${typeof stdio}\``);
|
|
1202
|
-
}
|
|
1203
|
-
const length = Math.max(stdio.length, aliases.length);
|
|
1204
|
-
return Array.from({ length }, (value, index) => stdio[index]);
|
|
1205
|
-
}, "normalizeStdio");
|
|
1206
|
-
var normalizeStdioNode = /* @__PURE__ */ __name((options) => {
|
|
1207
|
-
const stdio = normalizeStdio(options);
|
|
1208
|
-
if (stdio === "ipc") {
|
|
1209
|
-
return "ipc";
|
|
1210
|
-
}
|
|
1211
|
-
if (stdio === void 0 || typeof stdio === "string") {
|
|
1212
|
-
return [stdio, stdio, stdio, "ipc"];
|
|
1213
|
-
}
|
|
1214
|
-
if (stdio.includes("ipc")) {
|
|
1215
|
-
return stdio;
|
|
1216
|
-
}
|
|
1217
|
-
return [...stdio, "ipc"];
|
|
1218
|
-
}, "normalizeStdioNode");
|
|
1219
|
-
|
|
1220
|
-
// node_modules/execa/lib/kill.js
|
|
1221
|
-
import os from "node:os";
|
|
1222
|
-
|
|
1223
|
-
// node_modules/signal-exit/dist/mjs/signals.js
|
|
1224
|
-
var signals = [];
|
|
1225
|
-
signals.push("SIGHUP", "SIGINT", "SIGTERM");
|
|
1226
|
-
if (process.platform !== "win32") {
|
|
1227
|
-
signals.push(
|
|
1228
|
-
"SIGALRM",
|
|
1229
|
-
"SIGABRT",
|
|
1230
|
-
"SIGVTALRM",
|
|
1231
|
-
"SIGXCPU",
|
|
1232
|
-
"SIGXFSZ",
|
|
1233
|
-
"SIGUSR2",
|
|
1234
|
-
"SIGTRAP",
|
|
1235
|
-
"SIGSYS",
|
|
1236
|
-
"SIGQUIT",
|
|
1237
|
-
"SIGIOT"
|
|
1238
|
-
// should detect profiler and enable/disable accordingly.
|
|
1239
|
-
// see #21
|
|
1240
|
-
// 'SIGPROF'
|
|
1241
|
-
);
|
|
1242
|
-
}
|
|
1243
|
-
if (process.platform === "linux") {
|
|
1244
|
-
signals.push("SIGIO", "SIGPOLL", "SIGPWR", "SIGSTKFLT");
|
|
1245
|
-
}
|
|
1246
|
-
|
|
1247
|
-
// node_modules/signal-exit/dist/mjs/index.js
|
|
1248
|
-
var processOk = /* @__PURE__ */ __name((process7) => !!process7 && typeof process7 === "object" && typeof process7.removeListener === "function" && typeof process7.emit === "function" && typeof process7.reallyExit === "function" && typeof process7.listeners === "function" && typeof process7.kill === "function" && typeof process7.pid === "number" && typeof process7.on === "function", "processOk");
|
|
1249
|
-
var kExitEmitter = Symbol.for("signal-exit emitter");
|
|
1250
|
-
var global2 = globalThis;
|
|
1251
|
-
var ObjectDefineProperty = Object.defineProperty.bind(Object);
|
|
1252
|
-
var Emitter = class {
|
|
1253
|
-
static {
|
|
1254
|
-
__name(this, "Emitter");
|
|
1255
|
-
}
|
|
1256
|
-
emitted = {
|
|
1257
|
-
afterExit: false,
|
|
1258
|
-
exit: false
|
|
1259
|
-
};
|
|
1260
|
-
listeners = {
|
|
1261
|
-
afterExit: [],
|
|
1262
|
-
exit: []
|
|
1263
|
-
};
|
|
1264
|
-
count = 0;
|
|
1265
|
-
id = Math.random();
|
|
1266
|
-
constructor() {
|
|
1267
|
-
if (global2[kExitEmitter]) {
|
|
1268
|
-
return global2[kExitEmitter];
|
|
1269
|
-
}
|
|
1270
|
-
ObjectDefineProperty(global2, kExitEmitter, {
|
|
1271
|
-
value: this,
|
|
1272
|
-
writable: false,
|
|
1273
|
-
enumerable: false,
|
|
1274
|
-
configurable: false
|
|
1275
|
-
});
|
|
1276
|
-
}
|
|
1277
|
-
on(ev, fn) {
|
|
1278
|
-
this.listeners[ev].push(fn);
|
|
1279
|
-
}
|
|
1280
|
-
removeListener(ev, fn) {
|
|
1281
|
-
const list = this.listeners[ev];
|
|
1282
|
-
const i = list.indexOf(fn);
|
|
1283
|
-
if (i === -1) {
|
|
1284
|
-
return;
|
|
1285
|
-
}
|
|
1286
|
-
if (i === 0 && list.length === 1) {
|
|
1287
|
-
list.length = 0;
|
|
1288
|
-
} else {
|
|
1289
|
-
list.splice(i, 1);
|
|
1290
|
-
}
|
|
1291
|
-
}
|
|
1292
|
-
emit(ev, code, signal) {
|
|
1293
|
-
if (this.emitted[ev]) {
|
|
1294
|
-
return false;
|
|
1295
|
-
}
|
|
1296
|
-
this.emitted[ev] = true;
|
|
1297
|
-
let ret = false;
|
|
1298
|
-
for (const fn of this.listeners[ev]) {
|
|
1299
|
-
ret = fn(code, signal) === true || ret;
|
|
1300
|
-
}
|
|
1301
|
-
if (ev === "exit") {
|
|
1302
|
-
ret = this.emit("afterExit", code, signal) || ret;
|
|
1303
|
-
}
|
|
1304
|
-
return ret;
|
|
1305
|
-
}
|
|
1306
|
-
};
|
|
1307
|
-
var SignalExitBase = class {
|
|
1308
|
-
static {
|
|
1309
|
-
__name(this, "SignalExitBase");
|
|
1310
|
-
}
|
|
1311
|
-
};
|
|
1312
|
-
var signalExitWrap = /* @__PURE__ */ __name((handler) => {
|
|
1313
|
-
return {
|
|
1314
|
-
onExit(cb, opts) {
|
|
1315
|
-
return handler.onExit(cb, opts);
|
|
1316
|
-
},
|
|
1317
|
-
load() {
|
|
1318
|
-
return handler.load();
|
|
1319
|
-
},
|
|
1320
|
-
unload() {
|
|
1321
|
-
return handler.unload();
|
|
1322
|
-
}
|
|
1323
|
-
};
|
|
1324
|
-
}, "signalExitWrap");
|
|
1325
|
-
var SignalExitFallback = class extends SignalExitBase {
|
|
1326
|
-
static {
|
|
1327
|
-
__name(this, "SignalExitFallback");
|
|
1328
|
-
}
|
|
1329
|
-
onExit() {
|
|
1330
|
-
return () => {
|
|
1331
|
-
};
|
|
1332
|
-
}
|
|
1333
|
-
load() {
|
|
1334
|
-
}
|
|
1335
|
-
unload() {
|
|
1336
|
-
}
|
|
1337
|
-
};
|
|
1338
|
-
var SignalExit = class extends SignalExitBase {
|
|
1339
|
-
static {
|
|
1340
|
-
__name(this, "SignalExit");
|
|
1341
|
-
}
|
|
1342
|
-
// "SIGHUP" throws an `ENOSYS` error on Windows,
|
|
1343
|
-
// so use a supported signal instead
|
|
1344
|
-
/* c8 ignore start */
|
|
1345
|
-
#hupSig = process4.platform === "win32" ? "SIGINT" : "SIGHUP";
|
|
1346
|
-
/* c8 ignore stop */
|
|
1347
|
-
#emitter = new Emitter();
|
|
1348
|
-
#process;
|
|
1349
|
-
#originalProcessEmit;
|
|
1350
|
-
#originalProcessReallyExit;
|
|
1351
|
-
#sigListeners = {};
|
|
1352
|
-
#loaded = false;
|
|
1353
|
-
constructor(process7) {
|
|
1354
|
-
super();
|
|
1355
|
-
this.#process = process7;
|
|
1356
|
-
this.#sigListeners = {};
|
|
1357
|
-
for (const sig of signals) {
|
|
1358
|
-
this.#sigListeners[sig] = () => {
|
|
1359
|
-
const listeners = this.#process.listeners(sig);
|
|
1360
|
-
let { count } = this.#emitter;
|
|
1361
|
-
const p = process7;
|
|
1362
|
-
if (typeof p.__signal_exit_emitter__ === "object" && typeof p.__signal_exit_emitter__.count === "number") {
|
|
1363
|
-
count += p.__signal_exit_emitter__.count;
|
|
1364
|
-
}
|
|
1365
|
-
if (listeners.length === count) {
|
|
1366
|
-
this.unload();
|
|
1367
|
-
const ret = this.#emitter.emit("exit", null, sig);
|
|
1368
|
-
const s = sig === "SIGHUP" ? this.#hupSig : sig;
|
|
1369
|
-
if (!ret)
|
|
1370
|
-
process7.kill(process7.pid, s);
|
|
1371
|
-
}
|
|
1372
|
-
};
|
|
1373
|
-
}
|
|
1374
|
-
this.#originalProcessReallyExit = process7.reallyExit;
|
|
1375
|
-
this.#originalProcessEmit = process7.emit;
|
|
1376
|
-
}
|
|
1377
|
-
onExit(cb, opts) {
|
|
1378
|
-
if (!processOk(this.#process)) {
|
|
1379
|
-
return () => {
|
|
1380
|
-
};
|
|
1381
|
-
}
|
|
1382
|
-
if (this.#loaded === false) {
|
|
1383
|
-
this.load();
|
|
1384
|
-
}
|
|
1385
|
-
const ev = opts?.alwaysLast ? "afterExit" : "exit";
|
|
1386
|
-
this.#emitter.on(ev, cb);
|
|
1387
|
-
return () => {
|
|
1388
|
-
this.#emitter.removeListener(ev, cb);
|
|
1389
|
-
if (this.#emitter.listeners["exit"].length === 0 && this.#emitter.listeners["afterExit"].length === 0) {
|
|
1390
|
-
this.unload();
|
|
1391
|
-
}
|
|
1392
|
-
};
|
|
1393
|
-
}
|
|
1394
|
-
load() {
|
|
1395
|
-
if (this.#loaded) {
|
|
1396
|
-
return;
|
|
1397
|
-
}
|
|
1398
|
-
this.#loaded = true;
|
|
1399
|
-
this.#emitter.count += 1;
|
|
1400
|
-
for (const sig of signals) {
|
|
1401
|
-
try {
|
|
1402
|
-
const fn = this.#sigListeners[sig];
|
|
1403
|
-
if (fn)
|
|
1404
|
-
this.#process.on(sig, fn);
|
|
1405
|
-
} catch (_) {
|
|
1406
|
-
}
|
|
1407
|
-
}
|
|
1408
|
-
this.#process.emit = (ev, ...a) => {
|
|
1409
|
-
return this.#processEmit(ev, ...a);
|
|
1410
|
-
};
|
|
1411
|
-
this.#process.reallyExit = (code) => {
|
|
1412
|
-
return this.#processReallyExit(code);
|
|
1413
|
-
};
|
|
1414
|
-
}
|
|
1415
|
-
unload() {
|
|
1416
|
-
if (!this.#loaded) {
|
|
1417
|
-
return;
|
|
1418
|
-
}
|
|
1419
|
-
this.#loaded = false;
|
|
1420
|
-
signals.forEach((sig) => {
|
|
1421
|
-
const listener = this.#sigListeners[sig];
|
|
1422
|
-
if (!listener) {
|
|
1423
|
-
throw new Error("Listener not defined for signal: " + sig);
|
|
1424
|
-
}
|
|
1425
|
-
try {
|
|
1426
|
-
this.#process.removeListener(sig, listener);
|
|
1427
|
-
} catch (_) {
|
|
1428
|
-
}
|
|
1429
|
-
});
|
|
1430
|
-
this.#process.emit = this.#originalProcessEmit;
|
|
1431
|
-
this.#process.reallyExit = this.#originalProcessReallyExit;
|
|
1432
|
-
this.#emitter.count -= 1;
|
|
1433
|
-
}
|
|
1434
|
-
#processReallyExit(code) {
|
|
1435
|
-
if (!processOk(this.#process)) {
|
|
1436
|
-
return 0;
|
|
1437
|
-
}
|
|
1438
|
-
this.#process.exitCode = code || 0;
|
|
1439
|
-
this.#emitter.emit("exit", this.#process.exitCode, null);
|
|
1440
|
-
return this.#originalProcessReallyExit.call(this.#process, this.#process.exitCode);
|
|
1441
|
-
}
|
|
1442
|
-
#processEmit(ev, ...args) {
|
|
1443
|
-
const og = this.#originalProcessEmit;
|
|
1444
|
-
if (ev === "exit" && processOk(this.#process)) {
|
|
1445
|
-
if (typeof args[0] === "number") {
|
|
1446
|
-
this.#process.exitCode = args[0];
|
|
1447
|
-
}
|
|
1448
|
-
const ret = og.call(this.#process, ev, ...args);
|
|
1449
|
-
this.#emitter.emit("exit", this.#process.exitCode, null);
|
|
1450
|
-
return ret;
|
|
1451
|
-
} else {
|
|
1452
|
-
return og.call(this.#process, ev, ...args);
|
|
1453
|
-
}
|
|
1454
|
-
}
|
|
1455
|
-
};
|
|
1456
|
-
var process4 = globalThis.process;
|
|
1457
|
-
var {
|
|
1458
|
-
/**
|
|
1459
|
-
* Called when the process is exiting, whether via signal, explicit
|
|
1460
|
-
* exit, or running out of stuff to do.
|
|
1461
|
-
*
|
|
1462
|
-
* If the global process object is not suitable for instrumentation,
|
|
1463
|
-
* then this will be a no-op.
|
|
1464
|
-
*
|
|
1465
|
-
* Returns a function that may be used to unload signal-exit.
|
|
1466
|
-
*/
|
|
1467
|
-
onExit,
|
|
1468
|
-
/**
|
|
1469
|
-
* Load the listeners. Likely you never need to call this, unless
|
|
1470
|
-
* doing a rather deep integration with signal-exit functionality.
|
|
1471
|
-
* Mostly exposed for the benefit of testing.
|
|
1472
|
-
*
|
|
1473
|
-
* @internal
|
|
1474
|
-
*/
|
|
1475
|
-
load,
|
|
1476
|
-
/**
|
|
1477
|
-
* Unload the listeners. Likely you never need to call this, unless
|
|
1478
|
-
* doing a rather deep integration with signal-exit functionality.
|
|
1479
|
-
* Mostly exposed for the benefit of testing.
|
|
1480
|
-
*
|
|
1481
|
-
* @internal
|
|
1482
|
-
*/
|
|
1483
|
-
unload
|
|
1484
|
-
} = signalExitWrap(processOk(process4) ? new SignalExit(process4) : new SignalExitFallback());
|
|
1485
|
-
|
|
1486
|
-
// node_modules/execa/lib/kill.js
|
|
1487
|
-
var DEFAULT_FORCE_KILL_TIMEOUT = 1e3 * 5;
|
|
1488
|
-
var spawnedKill = /* @__PURE__ */ __name((kill, signal = "SIGTERM", options = {}) => {
|
|
1489
|
-
const killResult = kill(signal);
|
|
1490
|
-
setKillTimeout(kill, signal, options, killResult);
|
|
1491
|
-
return killResult;
|
|
1492
|
-
}, "spawnedKill");
|
|
1493
|
-
var setKillTimeout = /* @__PURE__ */ __name((kill, signal, options, killResult) => {
|
|
1494
|
-
if (!shouldForceKill(signal, options, killResult)) {
|
|
1495
|
-
return;
|
|
1496
|
-
}
|
|
1497
|
-
const timeout = getForceKillAfterTimeout(options);
|
|
1498
|
-
const t = setTimeout(() => {
|
|
1499
|
-
kill("SIGKILL");
|
|
1500
|
-
}, timeout);
|
|
1501
|
-
if (t.unref) {
|
|
1502
|
-
t.unref();
|
|
1503
|
-
}
|
|
1504
|
-
}, "setKillTimeout");
|
|
1505
|
-
var shouldForceKill = /* @__PURE__ */ __name((signal, { forceKillAfterTimeout }, killResult) => isSigterm(signal) && forceKillAfterTimeout !== false && killResult, "shouldForceKill");
|
|
1506
|
-
var isSigterm = /* @__PURE__ */ __name((signal) => signal === os.constants.signals.SIGTERM || typeof signal === "string" && signal.toUpperCase() === "SIGTERM", "isSigterm");
|
|
1507
|
-
var getForceKillAfterTimeout = /* @__PURE__ */ __name(({ forceKillAfterTimeout = true }) => {
|
|
1508
|
-
if (forceKillAfterTimeout === true) {
|
|
1509
|
-
return DEFAULT_FORCE_KILL_TIMEOUT;
|
|
1510
|
-
}
|
|
1511
|
-
if (!Number.isFinite(forceKillAfterTimeout) || forceKillAfterTimeout < 0) {
|
|
1512
|
-
throw new TypeError(`Expected the \`forceKillAfterTimeout\` option to be a non-negative integer, got \`${forceKillAfterTimeout}\` (${typeof forceKillAfterTimeout})`);
|
|
1513
|
-
}
|
|
1514
|
-
return forceKillAfterTimeout;
|
|
1515
|
-
}, "getForceKillAfterTimeout");
|
|
1516
|
-
var spawnedCancel = /* @__PURE__ */ __name((spawned, context) => {
|
|
1517
|
-
const killResult = spawned.kill();
|
|
1518
|
-
if (killResult) {
|
|
1519
|
-
context.isCanceled = true;
|
|
1520
|
-
}
|
|
1521
|
-
}, "spawnedCancel");
|
|
1522
|
-
var timeoutKill = /* @__PURE__ */ __name((spawned, signal, reject) => {
|
|
1523
|
-
spawned.kill(signal);
|
|
1524
|
-
reject(Object.assign(new Error("Timed out"), { timedOut: true, signal }));
|
|
1525
|
-
}, "timeoutKill");
|
|
1526
|
-
var setupTimeout = /* @__PURE__ */ __name((spawned, { timeout, killSignal = "SIGTERM" }, spawnedPromise) => {
|
|
1527
|
-
if (timeout === 0 || timeout === void 0) {
|
|
1528
|
-
return spawnedPromise;
|
|
1529
|
-
}
|
|
1530
|
-
let timeoutId;
|
|
1531
|
-
const timeoutPromise = new Promise((resolve, reject) => {
|
|
1532
|
-
timeoutId = setTimeout(() => {
|
|
1533
|
-
timeoutKill(spawned, killSignal, reject);
|
|
1534
|
-
}, timeout);
|
|
1535
|
-
});
|
|
1536
|
-
const safeSpawnedPromise = spawnedPromise.finally(() => {
|
|
1537
|
-
clearTimeout(timeoutId);
|
|
1538
|
-
});
|
|
1539
|
-
return Promise.race([timeoutPromise, safeSpawnedPromise]);
|
|
1540
|
-
}, "setupTimeout");
|
|
1541
|
-
var validateTimeout = /* @__PURE__ */ __name(({ timeout }) => {
|
|
1542
|
-
if (timeout !== void 0 && (!Number.isFinite(timeout) || timeout < 0)) {
|
|
1543
|
-
throw new TypeError(`Expected the \`timeout\` option to be a non-negative integer, got \`${timeout}\` (${typeof timeout})`);
|
|
1544
|
-
}
|
|
1545
|
-
}, "validateTimeout");
|
|
1546
|
-
var setExitHandler = /* @__PURE__ */ __name(async (spawned, { cleanup, detached }, timedPromise) => {
|
|
1547
|
-
if (!cleanup || detached) {
|
|
1548
|
-
return timedPromise;
|
|
1549
|
-
}
|
|
1550
|
-
const removeExitHandler = onExit(() => {
|
|
1551
|
-
spawned.kill();
|
|
1552
|
-
});
|
|
1553
|
-
return timedPromise.finally(() => {
|
|
1554
|
-
removeExitHandler();
|
|
1555
|
-
});
|
|
1556
|
-
}, "setExitHandler");
|
|
1557
|
-
|
|
1558
|
-
// node_modules/execa/lib/pipe.js
|
|
1559
|
-
import { createWriteStream } from "node:fs";
|
|
1560
|
-
import { ChildProcess } from "node:child_process";
|
|
1561
|
-
|
|
1562
|
-
// node_modules/is-stream/index.js
|
|
1563
|
-
function isStream(stream) {
|
|
1564
|
-
return stream !== null && typeof stream === "object" && typeof stream.pipe === "function";
|
|
1565
|
-
}
|
|
1566
|
-
__name(isStream, "isStream");
|
|
1567
|
-
function isWritableStream(stream) {
|
|
1568
|
-
return isStream(stream) && stream.writable !== false && typeof stream._write === "function" && typeof stream._writableState === "object";
|
|
1569
|
-
}
|
|
1570
|
-
__name(isWritableStream, "isWritableStream");
|
|
1571
|
-
|
|
1572
|
-
// node_modules/execa/lib/pipe.js
|
|
1573
|
-
var isExecaChildProcess = /* @__PURE__ */ __name((target) => target instanceof ChildProcess && typeof target.then === "function", "isExecaChildProcess");
|
|
1574
|
-
var pipeToTarget = /* @__PURE__ */ __name((spawned, streamName, target) => {
|
|
1575
|
-
if (typeof target === "string") {
|
|
1576
|
-
spawned[streamName].pipe(createWriteStream(target));
|
|
1577
|
-
return spawned;
|
|
1578
|
-
}
|
|
1579
|
-
if (isWritableStream(target)) {
|
|
1580
|
-
spawned[streamName].pipe(target);
|
|
1581
|
-
return spawned;
|
|
1582
|
-
}
|
|
1583
|
-
if (!isExecaChildProcess(target)) {
|
|
1584
|
-
throw new TypeError("The second argument must be a string, a stream or an Execa child process.");
|
|
1585
|
-
}
|
|
1586
|
-
if (!isWritableStream(target.stdin)) {
|
|
1587
|
-
throw new TypeError("The target child process's stdin must be available.");
|
|
1588
|
-
}
|
|
1589
|
-
spawned[streamName].pipe(target.stdin);
|
|
1590
|
-
return target;
|
|
1591
|
-
}, "pipeToTarget");
|
|
1592
|
-
var addPipeMethods = /* @__PURE__ */ __name((spawned) => {
|
|
1593
|
-
if (spawned.stdout !== null) {
|
|
1594
|
-
spawned.pipeStdout = pipeToTarget.bind(void 0, spawned, "stdout");
|
|
1595
|
-
}
|
|
1596
|
-
if (spawned.stderr !== null) {
|
|
1597
|
-
spawned.pipeStderr = pipeToTarget.bind(void 0, spawned, "stderr");
|
|
1598
|
-
}
|
|
1599
|
-
if (spawned.all !== void 0) {
|
|
1600
|
-
spawned.pipeAll = pipeToTarget.bind(void 0, spawned, "all");
|
|
1601
|
-
}
|
|
1602
|
-
}, "addPipeMethods");
|
|
1603
|
-
|
|
1604
|
-
// node_modules/execa/lib/stream.js
|
|
1605
|
-
import { createReadStream, readFileSync } from "node:fs";
|
|
1606
|
-
import { setTimeout as setTimeout2 } from "node:timers/promises";
|
|
1607
|
-
|
|
1608
|
-
// node_modules/get-stream/source/contents.js
|
|
1609
|
-
var getStreamContents = /* @__PURE__ */ __name(async (stream, { init, convertChunk, getSize, truncateChunk, addChunk, getFinalChunk, finalize }, { maxBuffer = Number.POSITIVE_INFINITY } = {}) => {
|
|
1610
|
-
if (!isAsyncIterable(stream)) {
|
|
1611
|
-
throw new Error("The first argument must be a Readable, a ReadableStream, or an async iterable.");
|
|
1612
|
-
}
|
|
1613
|
-
const state = init();
|
|
1614
|
-
state.length = 0;
|
|
1615
|
-
try {
|
|
1616
|
-
for await (const chunk of stream) {
|
|
1617
|
-
const chunkType = getChunkType(chunk);
|
|
1618
|
-
const convertedChunk = convertChunk[chunkType](chunk, state);
|
|
1619
|
-
appendChunk({ convertedChunk, state, getSize, truncateChunk, addChunk, maxBuffer });
|
|
1620
|
-
}
|
|
1621
|
-
appendFinalChunk({ state, convertChunk, getSize, truncateChunk, addChunk, getFinalChunk, maxBuffer });
|
|
1622
|
-
return finalize(state);
|
|
1623
|
-
} catch (error) {
|
|
1624
|
-
error.bufferedData = finalize(state);
|
|
1625
|
-
throw error;
|
|
1626
|
-
}
|
|
1627
|
-
}, "getStreamContents");
|
|
1628
|
-
var appendFinalChunk = /* @__PURE__ */ __name(({ state, getSize, truncateChunk, addChunk, getFinalChunk, maxBuffer }) => {
|
|
1629
|
-
const convertedChunk = getFinalChunk(state);
|
|
1630
|
-
if (convertedChunk !== void 0) {
|
|
1631
|
-
appendChunk({ convertedChunk, state, getSize, truncateChunk, addChunk, maxBuffer });
|
|
1632
|
-
}
|
|
1633
|
-
}, "appendFinalChunk");
|
|
1634
|
-
var appendChunk = /* @__PURE__ */ __name(({ convertedChunk, state, getSize, truncateChunk, addChunk, maxBuffer }) => {
|
|
1635
|
-
const chunkSize = getSize(convertedChunk);
|
|
1636
|
-
const newLength = state.length + chunkSize;
|
|
1637
|
-
if (newLength <= maxBuffer) {
|
|
1638
|
-
addNewChunk(convertedChunk, state, addChunk, newLength);
|
|
1639
|
-
return;
|
|
1640
|
-
}
|
|
1641
|
-
const truncatedChunk = truncateChunk(convertedChunk, maxBuffer - state.length);
|
|
1642
|
-
if (truncatedChunk !== void 0) {
|
|
1643
|
-
addNewChunk(truncatedChunk, state, addChunk, maxBuffer);
|
|
1644
|
-
}
|
|
1645
|
-
throw new MaxBufferError();
|
|
1646
|
-
}, "appendChunk");
|
|
1647
|
-
var addNewChunk = /* @__PURE__ */ __name((convertedChunk, state, addChunk, newLength) => {
|
|
1648
|
-
state.contents = addChunk(convertedChunk, state, newLength);
|
|
1649
|
-
state.length = newLength;
|
|
1650
|
-
}, "addNewChunk");
|
|
1651
|
-
var isAsyncIterable = /* @__PURE__ */ __name((stream) => typeof stream === "object" && stream !== null && typeof stream[Symbol.asyncIterator] === "function", "isAsyncIterable");
|
|
1652
|
-
var getChunkType = /* @__PURE__ */ __name((chunk) => {
|
|
1653
|
-
const typeOfChunk = typeof chunk;
|
|
1654
|
-
if (typeOfChunk === "string") {
|
|
1655
|
-
return "string";
|
|
1656
|
-
}
|
|
1657
|
-
if (typeOfChunk !== "object" || chunk === null) {
|
|
1658
|
-
return "others";
|
|
1659
|
-
}
|
|
1660
|
-
if (globalThis.Buffer?.isBuffer(chunk)) {
|
|
1661
|
-
return "buffer";
|
|
1662
|
-
}
|
|
1663
|
-
const prototypeName = objectToString.call(chunk);
|
|
1664
|
-
if (prototypeName === "[object ArrayBuffer]") {
|
|
1665
|
-
return "arrayBuffer";
|
|
1666
|
-
}
|
|
1667
|
-
if (prototypeName === "[object DataView]") {
|
|
1668
|
-
return "dataView";
|
|
1669
|
-
}
|
|
1670
|
-
if (Number.isInteger(chunk.byteLength) && Number.isInteger(chunk.byteOffset) && objectToString.call(chunk.buffer) === "[object ArrayBuffer]") {
|
|
1671
|
-
return "typedArray";
|
|
1672
|
-
}
|
|
1673
|
-
return "others";
|
|
1674
|
-
}, "getChunkType");
|
|
1675
|
-
var { toString: objectToString } = Object.prototype;
|
|
1676
|
-
var MaxBufferError = class extends Error {
|
|
1677
|
-
static {
|
|
1678
|
-
__name(this, "MaxBufferError");
|
|
1679
|
-
}
|
|
1680
|
-
name = "MaxBufferError";
|
|
1681
|
-
constructor() {
|
|
1682
|
-
super("maxBuffer exceeded");
|
|
1683
|
-
}
|
|
1684
|
-
};
|
|
1685
|
-
|
|
1686
|
-
// node_modules/get-stream/source/utils.js
|
|
1687
|
-
var identity = /* @__PURE__ */ __name((value) => value, "identity");
|
|
1688
|
-
var noop = /* @__PURE__ */ __name(() => void 0, "noop");
|
|
1689
|
-
var getContentsProp = /* @__PURE__ */ __name(({ contents }) => contents, "getContentsProp");
|
|
1690
|
-
var throwObjectStream = /* @__PURE__ */ __name((chunk) => {
|
|
1691
|
-
throw new Error(`Streams in object mode are not supported: ${String(chunk)}`);
|
|
1692
|
-
}, "throwObjectStream");
|
|
1693
|
-
var getLengthProp = /* @__PURE__ */ __name((convertedChunk) => convertedChunk.length, "getLengthProp");
|
|
1694
|
-
|
|
1695
|
-
// node_modules/get-stream/source/array-buffer.js
|
|
1696
|
-
async function getStreamAsArrayBuffer(stream, options) {
|
|
1697
|
-
return getStreamContents(stream, arrayBufferMethods, options);
|
|
1698
|
-
}
|
|
1699
|
-
__name(getStreamAsArrayBuffer, "getStreamAsArrayBuffer");
|
|
1700
|
-
var initArrayBuffer = /* @__PURE__ */ __name(() => ({ contents: new ArrayBuffer(0) }), "initArrayBuffer");
|
|
1701
|
-
var useTextEncoder = /* @__PURE__ */ __name((chunk) => textEncoder.encode(chunk), "useTextEncoder");
|
|
1702
|
-
var textEncoder = new TextEncoder();
|
|
1703
|
-
var useUint8Array = /* @__PURE__ */ __name((chunk) => new Uint8Array(chunk), "useUint8Array");
|
|
1704
|
-
var useUint8ArrayWithOffset = /* @__PURE__ */ __name((chunk) => new Uint8Array(chunk.buffer, chunk.byteOffset, chunk.byteLength), "useUint8ArrayWithOffset");
|
|
1705
|
-
var truncateArrayBufferChunk = /* @__PURE__ */ __name((convertedChunk, chunkSize) => convertedChunk.slice(0, chunkSize), "truncateArrayBufferChunk");
|
|
1706
|
-
var addArrayBufferChunk = /* @__PURE__ */ __name((convertedChunk, { contents, length: previousLength }, length) => {
|
|
1707
|
-
const newContents = hasArrayBufferResize() ? resizeArrayBuffer(contents, length) : resizeArrayBufferSlow(contents, length);
|
|
1708
|
-
new Uint8Array(newContents).set(convertedChunk, previousLength);
|
|
1709
|
-
return newContents;
|
|
1710
|
-
}, "addArrayBufferChunk");
|
|
1711
|
-
var resizeArrayBufferSlow = /* @__PURE__ */ __name((contents, length) => {
|
|
1712
|
-
if (length <= contents.byteLength) {
|
|
1713
|
-
return contents;
|
|
1714
|
-
}
|
|
1715
|
-
const arrayBuffer = new ArrayBuffer(getNewContentsLength(length));
|
|
1716
|
-
new Uint8Array(arrayBuffer).set(new Uint8Array(contents), 0);
|
|
1717
|
-
return arrayBuffer;
|
|
1718
|
-
}, "resizeArrayBufferSlow");
|
|
1719
|
-
var resizeArrayBuffer = /* @__PURE__ */ __name((contents, length) => {
|
|
1720
|
-
if (length <= contents.maxByteLength) {
|
|
1721
|
-
contents.resize(length);
|
|
1722
|
-
return contents;
|
|
1723
|
-
}
|
|
1724
|
-
const arrayBuffer = new ArrayBuffer(length, { maxByteLength: getNewContentsLength(length) });
|
|
1725
|
-
new Uint8Array(arrayBuffer).set(new Uint8Array(contents), 0);
|
|
1726
|
-
return arrayBuffer;
|
|
1727
|
-
}, "resizeArrayBuffer");
|
|
1728
|
-
var getNewContentsLength = /* @__PURE__ */ __name((length) => SCALE_FACTOR ** Math.ceil(Math.log(length) / Math.log(SCALE_FACTOR)), "getNewContentsLength");
|
|
1729
|
-
var SCALE_FACTOR = 2;
|
|
1730
|
-
var finalizeArrayBuffer = /* @__PURE__ */ __name(({ contents, length }) => hasArrayBufferResize() ? contents : contents.slice(0, length), "finalizeArrayBuffer");
|
|
1731
|
-
var hasArrayBufferResize = /* @__PURE__ */ __name(() => "resize" in ArrayBuffer.prototype, "hasArrayBufferResize");
|
|
1732
|
-
var arrayBufferMethods = {
|
|
1733
|
-
init: initArrayBuffer,
|
|
1734
|
-
convertChunk: {
|
|
1735
|
-
string: useTextEncoder,
|
|
1736
|
-
buffer: useUint8Array,
|
|
1737
|
-
arrayBuffer: useUint8Array,
|
|
1738
|
-
dataView: useUint8ArrayWithOffset,
|
|
1739
|
-
typedArray: useUint8ArrayWithOffset,
|
|
1740
|
-
others: throwObjectStream
|
|
1741
|
-
},
|
|
1742
|
-
getSize: getLengthProp,
|
|
1743
|
-
truncateChunk: truncateArrayBufferChunk,
|
|
1744
|
-
addChunk: addArrayBufferChunk,
|
|
1745
|
-
getFinalChunk: noop,
|
|
1746
|
-
finalize: finalizeArrayBuffer
|
|
1747
|
-
};
|
|
1748
|
-
|
|
1749
|
-
// node_modules/get-stream/source/buffer.js
|
|
1750
|
-
async function getStreamAsBuffer(stream, options) {
|
|
1751
|
-
if (!("Buffer" in globalThis)) {
|
|
1752
|
-
throw new Error("getStreamAsBuffer() is only supported in Node.js");
|
|
1753
|
-
}
|
|
1754
|
-
try {
|
|
1755
|
-
return arrayBufferToNodeBuffer(await getStreamAsArrayBuffer(stream, options));
|
|
1756
|
-
} catch (error) {
|
|
1757
|
-
if (error.bufferedData !== void 0) {
|
|
1758
|
-
error.bufferedData = arrayBufferToNodeBuffer(error.bufferedData);
|
|
1759
|
-
}
|
|
1760
|
-
throw error;
|
|
1761
|
-
}
|
|
1762
|
-
}
|
|
1763
|
-
__name(getStreamAsBuffer, "getStreamAsBuffer");
|
|
1764
|
-
var arrayBufferToNodeBuffer = /* @__PURE__ */ __name((arrayBuffer) => globalThis.Buffer.from(arrayBuffer), "arrayBufferToNodeBuffer");
|
|
1765
|
-
|
|
1766
|
-
// node_modules/get-stream/source/string.js
|
|
1767
|
-
async function getStreamAsString(stream, options) {
|
|
1768
|
-
return getStreamContents(stream, stringMethods, options);
|
|
1769
|
-
}
|
|
1770
|
-
__name(getStreamAsString, "getStreamAsString");
|
|
1771
|
-
var initString = /* @__PURE__ */ __name(() => ({ contents: "", textDecoder: new TextDecoder() }), "initString");
|
|
1772
|
-
var useTextDecoder = /* @__PURE__ */ __name((chunk, { textDecoder }) => textDecoder.decode(chunk, { stream: true }), "useTextDecoder");
|
|
1773
|
-
var addStringChunk = /* @__PURE__ */ __name((convertedChunk, { contents }) => contents + convertedChunk, "addStringChunk");
|
|
1774
|
-
var truncateStringChunk = /* @__PURE__ */ __name((convertedChunk, chunkSize) => convertedChunk.slice(0, chunkSize), "truncateStringChunk");
|
|
1775
|
-
var getFinalStringChunk = /* @__PURE__ */ __name(({ textDecoder }) => {
|
|
1776
|
-
const finalChunk = textDecoder.decode();
|
|
1777
|
-
return finalChunk === "" ? void 0 : finalChunk;
|
|
1778
|
-
}, "getFinalStringChunk");
|
|
1779
|
-
var stringMethods = {
|
|
1780
|
-
init: initString,
|
|
1781
|
-
convertChunk: {
|
|
1782
|
-
string: identity,
|
|
1783
|
-
buffer: useTextDecoder,
|
|
1784
|
-
arrayBuffer: useTextDecoder,
|
|
1785
|
-
dataView: useTextDecoder,
|
|
1786
|
-
typedArray: useTextDecoder,
|
|
1787
|
-
others: throwObjectStream
|
|
1788
|
-
},
|
|
1789
|
-
getSize: getLengthProp,
|
|
1790
|
-
truncateChunk: truncateStringChunk,
|
|
1791
|
-
addChunk: addStringChunk,
|
|
1792
|
-
getFinalChunk: getFinalStringChunk,
|
|
1793
|
-
finalize: getContentsProp
|
|
1794
|
-
};
|
|
1795
|
-
|
|
1796
|
-
// node_modules/execa/lib/stream.js
|
|
1797
|
-
var import_merge_stream = __toESM(require_merge_stream(), 1);
|
|
1798
|
-
var validateInputOptions = /* @__PURE__ */ __name((input) => {
|
|
1799
|
-
if (input !== void 0) {
|
|
1800
|
-
throw new TypeError("The `input` and `inputFile` options cannot be both set.");
|
|
1801
|
-
}
|
|
1802
|
-
}, "validateInputOptions");
|
|
1803
|
-
var getInputSync = /* @__PURE__ */ __name(({ input, inputFile }) => {
|
|
1804
|
-
if (typeof inputFile !== "string") {
|
|
1805
|
-
return input;
|
|
1806
|
-
}
|
|
1807
|
-
validateInputOptions(input);
|
|
1808
|
-
return readFileSync(inputFile);
|
|
1809
|
-
}, "getInputSync");
|
|
1810
|
-
var handleInputSync = /* @__PURE__ */ __name((options) => {
|
|
1811
|
-
const input = getInputSync(options);
|
|
1812
|
-
if (isStream(input)) {
|
|
1813
|
-
throw new TypeError("The `input` option cannot be a stream in sync mode");
|
|
1814
|
-
}
|
|
1815
|
-
return input;
|
|
1816
|
-
}, "handleInputSync");
|
|
1817
|
-
var getInput = /* @__PURE__ */ __name(({ input, inputFile }) => {
|
|
1818
|
-
if (typeof inputFile !== "string") {
|
|
1819
|
-
return input;
|
|
1820
|
-
}
|
|
1821
|
-
validateInputOptions(input);
|
|
1822
|
-
return createReadStream(inputFile);
|
|
1823
|
-
}, "getInput");
|
|
1824
|
-
var handleInput = /* @__PURE__ */ __name((spawned, options) => {
|
|
1825
|
-
const input = getInput(options);
|
|
1826
|
-
if (input === void 0) {
|
|
1827
|
-
return;
|
|
1828
|
-
}
|
|
1829
|
-
if (isStream(input)) {
|
|
1830
|
-
input.pipe(spawned.stdin);
|
|
1831
|
-
} else {
|
|
1832
|
-
spawned.stdin.end(input);
|
|
1833
|
-
}
|
|
1834
|
-
}, "handleInput");
|
|
1835
|
-
var makeAllStream = /* @__PURE__ */ __name((spawned, { all }) => {
|
|
1836
|
-
if (!all || !spawned.stdout && !spawned.stderr) {
|
|
1837
|
-
return;
|
|
1838
|
-
}
|
|
1839
|
-
const mixed = (0, import_merge_stream.default)();
|
|
1840
|
-
if (spawned.stdout) {
|
|
1841
|
-
mixed.add(spawned.stdout);
|
|
1842
|
-
}
|
|
1843
|
-
if (spawned.stderr) {
|
|
1844
|
-
mixed.add(spawned.stderr);
|
|
1845
|
-
}
|
|
1846
|
-
return mixed;
|
|
1847
|
-
}, "makeAllStream");
|
|
1848
|
-
var getBufferedData = /* @__PURE__ */ __name(async (stream, streamPromise) => {
|
|
1849
|
-
if (!stream || streamPromise === void 0) {
|
|
1850
|
-
return;
|
|
1851
|
-
}
|
|
1852
|
-
await setTimeout2(0);
|
|
1853
|
-
stream.destroy();
|
|
1854
|
-
try {
|
|
1855
|
-
return await streamPromise;
|
|
1856
|
-
} catch (error) {
|
|
1857
|
-
return error.bufferedData;
|
|
1858
|
-
}
|
|
1859
|
-
}, "getBufferedData");
|
|
1860
|
-
var getStreamPromise = /* @__PURE__ */ __name((stream, { encoding, buffer, maxBuffer }) => {
|
|
1861
|
-
if (!stream || !buffer) {
|
|
1862
|
-
return;
|
|
1863
|
-
}
|
|
1864
|
-
if (encoding === "utf8" || encoding === "utf-8") {
|
|
1865
|
-
return getStreamAsString(stream, { maxBuffer });
|
|
1866
|
-
}
|
|
1867
|
-
if (encoding === null || encoding === "buffer") {
|
|
1868
|
-
return getStreamAsBuffer(stream, { maxBuffer });
|
|
1869
|
-
}
|
|
1870
|
-
return applyEncoding(stream, maxBuffer, encoding);
|
|
1871
|
-
}, "getStreamPromise");
|
|
1872
|
-
var applyEncoding = /* @__PURE__ */ __name(async (stream, maxBuffer, encoding) => {
|
|
1873
|
-
const buffer = await getStreamAsBuffer(stream, { maxBuffer });
|
|
1874
|
-
return buffer.toString(encoding);
|
|
1875
|
-
}, "applyEncoding");
|
|
1876
|
-
var getSpawnedResult = /* @__PURE__ */ __name(async ({ stdout, stderr, all }, { encoding, buffer, maxBuffer }, processDone) => {
|
|
1877
|
-
const stdoutPromise = getStreamPromise(stdout, { encoding, buffer, maxBuffer });
|
|
1878
|
-
const stderrPromise = getStreamPromise(stderr, { encoding, buffer, maxBuffer });
|
|
1879
|
-
const allPromise = getStreamPromise(all, { encoding, buffer, maxBuffer: maxBuffer * 2 });
|
|
1880
|
-
try {
|
|
1881
|
-
return await Promise.all([processDone, stdoutPromise, stderrPromise, allPromise]);
|
|
1882
|
-
} catch (error) {
|
|
1883
|
-
return Promise.all([
|
|
1884
|
-
{ error, signal: error.signal, timedOut: error.timedOut },
|
|
1885
|
-
getBufferedData(stdout, stdoutPromise),
|
|
1886
|
-
getBufferedData(stderr, stderrPromise),
|
|
1887
|
-
getBufferedData(all, allPromise)
|
|
1888
|
-
]);
|
|
1889
|
-
}
|
|
1890
|
-
}, "getSpawnedResult");
|
|
1891
|
-
|
|
1892
|
-
// node_modules/execa/lib/promise.js
|
|
1893
|
-
var nativePromisePrototype = (async () => {
|
|
1894
|
-
})().constructor.prototype;
|
|
1895
|
-
var descriptors = ["then", "catch", "finally"].map((property) => [
|
|
1896
|
-
property,
|
|
1897
|
-
Reflect.getOwnPropertyDescriptor(nativePromisePrototype, property)
|
|
1898
|
-
]);
|
|
1899
|
-
var mergePromise = /* @__PURE__ */ __name((spawned, promise) => {
|
|
1900
|
-
for (const [property, descriptor] of descriptors) {
|
|
1901
|
-
const value = typeof promise === "function" ? (...args) => Reflect.apply(descriptor.value, promise(), args) : descriptor.value.bind(promise);
|
|
1902
|
-
Reflect.defineProperty(spawned, property, { ...descriptor, value });
|
|
1903
|
-
}
|
|
1904
|
-
}, "mergePromise");
|
|
1905
|
-
var getSpawnedPromise = /* @__PURE__ */ __name((spawned) => new Promise((resolve, reject) => {
|
|
1906
|
-
spawned.on("exit", (exitCode, signal) => {
|
|
1907
|
-
resolve({ exitCode, signal });
|
|
1908
|
-
});
|
|
1909
|
-
spawned.on("error", (error) => {
|
|
1910
|
-
reject(error);
|
|
1911
|
-
});
|
|
1912
|
-
if (spawned.stdin) {
|
|
1913
|
-
spawned.stdin.on("error", (error) => {
|
|
1914
|
-
reject(error);
|
|
1915
|
-
});
|
|
1916
|
-
}
|
|
1917
|
-
}), "getSpawnedPromise");
|
|
1918
|
-
|
|
1919
|
-
// node_modules/execa/lib/command.js
|
|
1920
|
-
import { Buffer as Buffer2 } from "node:buffer";
|
|
1921
|
-
import { ChildProcess as ChildProcess2 } from "node:child_process";
|
|
1922
|
-
var normalizeArgs = /* @__PURE__ */ __name((file, args = []) => {
|
|
1923
|
-
if (!Array.isArray(args)) {
|
|
1924
|
-
return [file];
|
|
1925
|
-
}
|
|
1926
|
-
return [file, ...args];
|
|
1927
|
-
}, "normalizeArgs");
|
|
1928
|
-
var NO_ESCAPE_REGEXP = /^[\w.-]+$/;
|
|
1929
|
-
var escapeArg = /* @__PURE__ */ __name((arg) => {
|
|
1930
|
-
if (typeof arg !== "string" || NO_ESCAPE_REGEXP.test(arg)) {
|
|
1931
|
-
return arg;
|
|
1932
|
-
}
|
|
1933
|
-
return `"${arg.replaceAll('"', '\\"')}"`;
|
|
1934
|
-
}, "escapeArg");
|
|
1935
|
-
var joinCommand = /* @__PURE__ */ __name((file, args) => normalizeArgs(file, args).join(" "), "joinCommand");
|
|
1936
|
-
var getEscapedCommand = /* @__PURE__ */ __name((file, args) => normalizeArgs(file, args).map((arg) => escapeArg(arg)).join(" "), "getEscapedCommand");
|
|
1937
|
-
var SPACES_REGEXP = / +/g;
|
|
1938
|
-
var parseExpression = /* @__PURE__ */ __name((expression) => {
|
|
1939
|
-
const typeOfExpression = typeof expression;
|
|
1940
|
-
if (typeOfExpression === "string") {
|
|
1941
|
-
return expression;
|
|
1942
|
-
}
|
|
1943
|
-
if (typeOfExpression === "number") {
|
|
1944
|
-
return String(expression);
|
|
1945
|
-
}
|
|
1946
|
-
if (typeOfExpression === "object" && expression !== null && !(expression instanceof ChildProcess2) && "stdout" in expression) {
|
|
1947
|
-
const typeOfStdout = typeof expression.stdout;
|
|
1948
|
-
if (typeOfStdout === "string") {
|
|
1949
|
-
return expression.stdout;
|
|
1950
|
-
}
|
|
1951
|
-
if (Buffer2.isBuffer(expression.stdout)) {
|
|
1952
|
-
return expression.stdout.toString();
|
|
1953
|
-
}
|
|
1954
|
-
throw new TypeError(`Unexpected "${typeOfStdout}" stdout in template expression`);
|
|
1955
|
-
}
|
|
1956
|
-
throw new TypeError(`Unexpected "${typeOfExpression}" in template expression`);
|
|
1957
|
-
}, "parseExpression");
|
|
1958
|
-
var concatTokens = /* @__PURE__ */ __name((tokens, nextTokens, isNew) => isNew || tokens.length === 0 || nextTokens.length === 0 ? [...tokens, ...nextTokens] : [
|
|
1959
|
-
...tokens.slice(0, -1),
|
|
1960
|
-
`${tokens.at(-1)}${nextTokens[0]}`,
|
|
1961
|
-
...nextTokens.slice(1)
|
|
1962
|
-
], "concatTokens");
|
|
1963
|
-
var parseTemplate = /* @__PURE__ */ __name(({ templates, expressions, tokens, index, template }) => {
|
|
1964
|
-
const templateString = template ?? templates.raw[index];
|
|
1965
|
-
const templateTokens = templateString.split(SPACES_REGEXP).filter(Boolean);
|
|
1966
|
-
const newTokens = concatTokens(
|
|
1967
|
-
tokens,
|
|
1968
|
-
templateTokens,
|
|
1969
|
-
templateString.startsWith(" ")
|
|
1970
|
-
);
|
|
1971
|
-
if (index === expressions.length) {
|
|
1972
|
-
return newTokens;
|
|
1973
|
-
}
|
|
1974
|
-
const expression = expressions[index];
|
|
1975
|
-
const expressionTokens = Array.isArray(expression) ? expression.map((expression2) => parseExpression(expression2)) : [parseExpression(expression)];
|
|
1976
|
-
return concatTokens(
|
|
1977
|
-
newTokens,
|
|
1978
|
-
expressionTokens,
|
|
1979
|
-
templateString.endsWith(" ")
|
|
1980
|
-
);
|
|
1981
|
-
}, "parseTemplate");
|
|
1982
|
-
var parseTemplates = /* @__PURE__ */ __name((templates, expressions) => {
|
|
1983
|
-
let tokens = [];
|
|
1984
|
-
for (const [index, template] of templates.entries()) {
|
|
1985
|
-
tokens = parseTemplate({ templates, expressions, tokens, index, template });
|
|
1986
|
-
}
|
|
1987
|
-
return tokens;
|
|
1988
|
-
}, "parseTemplates");
|
|
1989
|
-
|
|
1990
|
-
// node_modules/execa/lib/verbose.js
|
|
1991
|
-
import { debuglog } from "node:util";
|
|
1992
|
-
import process5 from "node:process";
|
|
1993
|
-
var verboseDefault = debuglog("execa").enabled;
|
|
1994
|
-
var padField = /* @__PURE__ */ __name((field, padding) => String(field).padStart(padding, "0"), "padField");
|
|
1995
|
-
var getTimestamp = /* @__PURE__ */ __name(() => {
|
|
1996
|
-
const date = /* @__PURE__ */ new Date();
|
|
1997
|
-
return `${padField(date.getHours(), 2)}:${padField(date.getMinutes(), 2)}:${padField(date.getSeconds(), 2)}.${padField(date.getMilliseconds(), 3)}`;
|
|
1998
|
-
}, "getTimestamp");
|
|
1999
|
-
var logCommand = /* @__PURE__ */ __name((escapedCommand, { verbose }) => {
|
|
2000
|
-
if (!verbose) {
|
|
2001
|
-
return;
|
|
2002
|
-
}
|
|
2003
|
-
process5.stderr.write(`[${getTimestamp()}] ${escapedCommand}
|
|
2004
|
-
`);
|
|
2005
|
-
}, "logCommand");
|
|
2006
|
-
|
|
2007
|
-
// node_modules/execa/index.js
|
|
2008
|
-
var DEFAULT_MAX_BUFFER = 1e3 * 1e3 * 100;
|
|
2009
|
-
var getEnv = /* @__PURE__ */ __name(({ env: envOption, extendEnv, preferLocal, localDir, execPath }) => {
|
|
2010
|
-
const env = extendEnv ? { ...process6.env, ...envOption } : envOption;
|
|
2011
|
-
if (preferLocal) {
|
|
2012
|
-
return npmRunPathEnv({ env, cwd: localDir, execPath });
|
|
2013
|
-
}
|
|
2014
|
-
return env;
|
|
2015
|
-
}, "getEnv");
|
|
2016
|
-
var handleArguments = /* @__PURE__ */ __name((file, args, options = {}) => {
|
|
2017
|
-
const parsed = import_cross_spawn.default._parse(file, args, options);
|
|
2018
|
-
file = parsed.command;
|
|
2019
|
-
args = parsed.args;
|
|
2020
|
-
options = parsed.options;
|
|
2021
|
-
options = {
|
|
2022
|
-
maxBuffer: DEFAULT_MAX_BUFFER,
|
|
2023
|
-
buffer: true,
|
|
2024
|
-
stripFinalNewline: true,
|
|
2025
|
-
extendEnv: true,
|
|
2026
|
-
preferLocal: false,
|
|
2027
|
-
localDir: options.cwd || process6.cwd(),
|
|
2028
|
-
execPath: process6.execPath,
|
|
2029
|
-
encoding: "utf8",
|
|
2030
|
-
reject: true,
|
|
2031
|
-
cleanup: true,
|
|
2032
|
-
all: false,
|
|
2033
|
-
windowsHide: true,
|
|
2034
|
-
verbose: verboseDefault,
|
|
2035
|
-
...options
|
|
2036
|
-
};
|
|
2037
|
-
options.env = getEnv(options);
|
|
2038
|
-
options.stdio = normalizeStdio(options);
|
|
2039
|
-
if (process6.platform === "win32" && path2.basename(file, ".exe") === "cmd") {
|
|
2040
|
-
args.unshift("/q");
|
|
2041
|
-
}
|
|
2042
|
-
return { file, args, options, parsed };
|
|
2043
|
-
}, "handleArguments");
|
|
2044
|
-
var handleOutput = /* @__PURE__ */ __name((options, value, error) => {
|
|
2045
|
-
if (typeof value !== "string" && !Buffer3.isBuffer(value)) {
|
|
2046
|
-
return error === void 0 ? void 0 : "";
|
|
2047
|
-
}
|
|
2048
|
-
if (options.stripFinalNewline) {
|
|
2049
|
-
return stripFinalNewline(value);
|
|
2050
|
-
}
|
|
2051
|
-
return value;
|
|
2052
|
-
}, "handleOutput");
|
|
2053
|
-
function execa(file, args, options) {
|
|
2054
|
-
const parsed = handleArguments(file, args, options);
|
|
2055
|
-
const command = joinCommand(file, args);
|
|
2056
|
-
const escapedCommand = getEscapedCommand(file, args);
|
|
2057
|
-
logCommand(escapedCommand, parsed.options);
|
|
2058
|
-
validateTimeout(parsed.options);
|
|
2059
|
-
let spawned;
|
|
2060
|
-
try {
|
|
2061
|
-
spawned = childProcess.spawn(parsed.file, parsed.args, parsed.options);
|
|
2062
|
-
} catch (error) {
|
|
2063
|
-
const dummySpawned = new childProcess.ChildProcess();
|
|
2064
|
-
const errorPromise = Promise.reject(makeError({
|
|
2065
|
-
error,
|
|
2066
|
-
stdout: "",
|
|
2067
|
-
stderr: "",
|
|
2068
|
-
all: "",
|
|
2069
|
-
command,
|
|
2070
|
-
escapedCommand,
|
|
2071
|
-
parsed,
|
|
2072
|
-
timedOut: false,
|
|
2073
|
-
isCanceled: false,
|
|
2074
|
-
killed: false
|
|
2075
|
-
}));
|
|
2076
|
-
mergePromise(dummySpawned, errorPromise);
|
|
2077
|
-
return dummySpawned;
|
|
2078
|
-
}
|
|
2079
|
-
const spawnedPromise = getSpawnedPromise(spawned);
|
|
2080
|
-
const timedPromise = setupTimeout(spawned, parsed.options, spawnedPromise);
|
|
2081
|
-
const processDone = setExitHandler(spawned, parsed.options, timedPromise);
|
|
2082
|
-
const context = { isCanceled: false };
|
|
2083
|
-
spawned.kill = spawnedKill.bind(null, spawned.kill.bind(spawned));
|
|
2084
|
-
spawned.cancel = spawnedCancel.bind(null, spawned, context);
|
|
2085
|
-
const handlePromise = /* @__PURE__ */ __name(async () => {
|
|
2086
|
-
const [{ error, exitCode, signal, timedOut }, stdoutResult, stderrResult, allResult] = await getSpawnedResult(spawned, parsed.options, processDone);
|
|
2087
|
-
const stdout = handleOutput(parsed.options, stdoutResult);
|
|
2088
|
-
const stderr = handleOutput(parsed.options, stderrResult);
|
|
2089
|
-
const all = handleOutput(parsed.options, allResult);
|
|
2090
|
-
if (error || exitCode !== 0 || signal !== null) {
|
|
2091
|
-
const returnedError = makeError({
|
|
2092
|
-
error,
|
|
2093
|
-
exitCode,
|
|
2094
|
-
signal,
|
|
2095
|
-
stdout,
|
|
2096
|
-
stderr,
|
|
2097
|
-
all,
|
|
2098
|
-
command,
|
|
2099
|
-
escapedCommand,
|
|
2100
|
-
parsed,
|
|
2101
|
-
timedOut,
|
|
2102
|
-
isCanceled: context.isCanceled || (parsed.options.signal ? parsed.options.signal.aborted : false),
|
|
2103
|
-
killed: spawned.killed
|
|
2104
|
-
});
|
|
2105
|
-
if (!parsed.options.reject) {
|
|
2106
|
-
return returnedError;
|
|
2107
|
-
}
|
|
2108
|
-
throw returnedError;
|
|
2109
|
-
}
|
|
2110
|
-
return {
|
|
2111
|
-
command,
|
|
2112
|
-
escapedCommand,
|
|
2113
|
-
exitCode: 0,
|
|
2114
|
-
stdout,
|
|
2115
|
-
stderr,
|
|
2116
|
-
all,
|
|
2117
|
-
failed: false,
|
|
2118
|
-
timedOut: false,
|
|
2119
|
-
isCanceled: false,
|
|
2120
|
-
killed: false
|
|
2121
|
-
};
|
|
2122
|
-
}, "handlePromise");
|
|
2123
|
-
const handlePromiseOnce = onetime_default(handlePromise);
|
|
2124
|
-
handleInput(spawned, parsed.options);
|
|
2125
|
-
spawned.all = makeAllStream(spawned, parsed.options);
|
|
2126
|
-
addPipeMethods(spawned);
|
|
2127
|
-
mergePromise(spawned, handlePromiseOnce);
|
|
2128
|
-
return spawned;
|
|
2129
|
-
}
|
|
2130
|
-
__name(execa, "execa");
|
|
2131
|
-
function execaSync(file, args, options) {
|
|
2132
|
-
const parsed = handleArguments(file, args, options);
|
|
2133
|
-
const command = joinCommand(file, args);
|
|
2134
|
-
const escapedCommand = getEscapedCommand(file, args);
|
|
2135
|
-
logCommand(escapedCommand, parsed.options);
|
|
2136
|
-
const input = handleInputSync(parsed.options);
|
|
2137
|
-
let result;
|
|
2138
|
-
try {
|
|
2139
|
-
result = childProcess.spawnSync(parsed.file, parsed.args, { ...parsed.options, input });
|
|
2140
|
-
} catch (error) {
|
|
2141
|
-
throw makeError({
|
|
2142
|
-
error,
|
|
2143
|
-
stdout: "",
|
|
2144
|
-
stderr: "",
|
|
2145
|
-
all: "",
|
|
2146
|
-
command,
|
|
2147
|
-
escapedCommand,
|
|
2148
|
-
parsed,
|
|
2149
|
-
timedOut: false,
|
|
2150
|
-
isCanceled: false,
|
|
2151
|
-
killed: false
|
|
2152
|
-
});
|
|
2153
|
-
}
|
|
2154
|
-
const stdout = handleOutput(parsed.options, result.stdout, result.error);
|
|
2155
|
-
const stderr = handleOutput(parsed.options, result.stderr, result.error);
|
|
2156
|
-
if (result.error || result.status !== 0 || result.signal !== null) {
|
|
2157
|
-
const error = makeError({
|
|
2158
|
-
stdout,
|
|
2159
|
-
stderr,
|
|
2160
|
-
error: result.error,
|
|
2161
|
-
signal: result.signal,
|
|
2162
|
-
exitCode: result.status,
|
|
2163
|
-
command,
|
|
2164
|
-
escapedCommand,
|
|
2165
|
-
parsed,
|
|
2166
|
-
timedOut: result.error && result.error.code === "ETIMEDOUT",
|
|
2167
|
-
isCanceled: false,
|
|
2168
|
-
killed: result.signal !== null
|
|
2169
|
-
});
|
|
2170
|
-
if (!parsed.options.reject) {
|
|
2171
|
-
return error;
|
|
2172
|
-
}
|
|
2173
|
-
throw error;
|
|
2174
|
-
}
|
|
2175
|
-
return {
|
|
2176
|
-
command,
|
|
2177
|
-
escapedCommand,
|
|
2178
|
-
exitCode: 0,
|
|
2179
|
-
stdout,
|
|
2180
|
-
stderr,
|
|
2181
|
-
failed: false,
|
|
2182
|
-
timedOut: false,
|
|
2183
|
-
isCanceled: false,
|
|
2184
|
-
killed: false
|
|
2185
|
-
};
|
|
2186
|
-
}
|
|
2187
|
-
__name(execaSync, "execaSync");
|
|
2188
|
-
var normalizeScriptStdin = /* @__PURE__ */ __name(({ input, inputFile, stdio }) => input === void 0 && inputFile === void 0 && stdio === void 0 ? { stdin: "inherit" } : {}, "normalizeScriptStdin");
|
|
2189
|
-
var normalizeScriptOptions = /* @__PURE__ */ __name((options = {}) => ({
|
|
2190
|
-
preferLocal: true,
|
|
2191
|
-
...normalizeScriptStdin(options),
|
|
2192
|
-
...options
|
|
2193
|
-
}), "normalizeScriptOptions");
|
|
2194
|
-
function create$(options) {
|
|
2195
|
-
function $2(templatesOrOptions, ...expressions) {
|
|
2196
|
-
if (!Array.isArray(templatesOrOptions)) {
|
|
2197
|
-
return create$({ ...options, ...templatesOrOptions });
|
|
2198
|
-
}
|
|
2199
|
-
const [file, ...args] = parseTemplates(templatesOrOptions, expressions);
|
|
2200
|
-
return execa(file, args, normalizeScriptOptions(options));
|
|
2201
|
-
}
|
|
2202
|
-
__name($2, "$");
|
|
2203
|
-
$2.sync = (templates, ...expressions) => {
|
|
2204
|
-
if (!Array.isArray(templates)) {
|
|
2205
|
-
throw new TypeError("Please use $(options).sync`command` instead of $.sync(options)`command`.");
|
|
2206
|
-
}
|
|
2207
|
-
const [file, ...args] = parseTemplates(templates, expressions);
|
|
2208
|
-
return execaSync(file, args, normalizeScriptOptions(options));
|
|
2209
|
-
};
|
|
2210
|
-
return $2;
|
|
2211
|
-
}
|
|
2212
|
-
__name(create$, "create$");
|
|
2213
|
-
var $ = create$();
|
|
2214
|
-
function execaNode(scriptPath, args, options = {}) {
|
|
2215
|
-
if (args && !Array.isArray(args) && typeof args === "object") {
|
|
2216
|
-
options = args;
|
|
2217
|
-
args = [];
|
|
2218
|
-
}
|
|
2219
|
-
const stdio = normalizeStdioNode(options);
|
|
2220
|
-
const defaultExecArgv = process6.execArgv.filter((arg) => !arg.startsWith("--inspect"));
|
|
2221
|
-
const {
|
|
2222
|
-
nodePath = process6.execPath,
|
|
2223
|
-
nodeOptions = defaultExecArgv
|
|
2224
|
-
} = options;
|
|
2225
|
-
return execa(
|
|
2226
|
-
nodePath,
|
|
2227
|
-
[
|
|
2228
|
-
...nodeOptions,
|
|
2229
|
-
scriptPath,
|
|
2230
|
-
...Array.isArray(args) ? args : []
|
|
2231
|
-
],
|
|
2232
|
-
{
|
|
2233
|
-
...options,
|
|
2234
|
-
stdin: void 0,
|
|
2235
|
-
stdout: void 0,
|
|
2236
|
-
stderr: void 0,
|
|
2237
|
-
stdio,
|
|
2238
|
-
shell: false
|
|
2239
|
-
}
|
|
2240
|
-
);
|
|
2241
|
-
}
|
|
2242
|
-
__name(execaNode, "execaNode");
|
|
2243
|
-
|
|
2244
|
-
// ../../core/src/shared/utils/module.ts
|
|
2245
|
-
import { fileURLToPath as fileURLToPath2, pathToFileURL } from "node:url";
|
|
2246
|
-
|
|
2247
|
-
// ../../node_modules/exsolve/dist/index.mjs
|
|
2248
|
-
import assert from "node:assert";
|
|
2249
|
-
import v8 from "node:v8";
|
|
2250
|
-
import { format, inspect } from "node:util";
|
|
2251
|
-
var own$1 = {}.hasOwnProperty;
|
|
2252
|
-
var classRegExp = /^([A-Z][a-z\d]*)+$/;
|
|
2253
|
-
var kTypes = /* @__PURE__ */ new Set([
|
|
2254
|
-
"string",
|
|
2255
|
-
"function",
|
|
2256
|
-
"number",
|
|
2257
|
-
"object",
|
|
2258
|
-
// Accept 'Function' and 'Object' as alternative to the lower cased version.
|
|
2259
|
-
"Function",
|
|
2260
|
-
"Object",
|
|
2261
|
-
"boolean",
|
|
2262
|
-
"bigint",
|
|
2263
|
-
"symbol"
|
|
2264
|
-
]);
|
|
2265
|
-
var messages = /* @__PURE__ */ new Map();
|
|
2266
|
-
var nodeInternalPrefix = "__node_internal_";
|
|
2267
|
-
var userStackTraceLimit;
|
|
2268
|
-
function formatList(array, type = "and") {
|
|
2269
|
-
return array.length < 3 ? array.join(` ${type} `) : `${array.slice(0, -1).join(", ")}, ${type} ${array.at(-1)}`;
|
|
2270
|
-
}
|
|
2271
|
-
__name(formatList, "formatList");
|
|
2272
|
-
function createError(sym, value, constructor) {
|
|
2273
|
-
messages.set(sym, value);
|
|
2274
|
-
return makeNodeErrorWithCode(constructor, sym);
|
|
2275
|
-
}
|
|
2276
|
-
__name(createError, "createError");
|
|
2277
|
-
function makeNodeErrorWithCode(Base, key) {
|
|
2278
|
-
return /* @__PURE__ */ __name(function NodeError(...parameters) {
|
|
2279
|
-
const limit = Error.stackTraceLimit;
|
|
2280
|
-
if (isErrorStackTraceLimitWritable()) Error.stackTraceLimit = 0;
|
|
2281
|
-
const error = new Base();
|
|
2282
|
-
if (isErrorStackTraceLimitWritable()) Error.stackTraceLimit = limit;
|
|
2283
|
-
const message = getMessage(key, parameters, error);
|
|
2284
|
-
Object.defineProperties(error, {
|
|
2285
|
-
// Note: no need to implement `kIsNodeError` symbol, would be hard,
|
|
2286
|
-
// probably.
|
|
2287
|
-
message: {
|
|
2288
|
-
value: message,
|
|
2289
|
-
enumerable: false,
|
|
2290
|
-
writable: true,
|
|
2291
|
-
configurable: true
|
|
2292
|
-
},
|
|
2293
|
-
toString: {
|
|
2294
|
-
/** @this {Error} */
|
|
2295
|
-
value() {
|
|
2296
|
-
return `${this.name} [${key}]: ${this.message}`;
|
|
2297
|
-
},
|
|
2298
|
-
enumerable: false,
|
|
2299
|
-
writable: true,
|
|
2300
|
-
configurable: true
|
|
2301
|
-
}
|
|
2302
|
-
});
|
|
2303
|
-
captureLargerStackTrace(error);
|
|
2304
|
-
error.code = key;
|
|
2305
|
-
return error;
|
|
2306
|
-
}, "NodeError");
|
|
2307
|
-
}
|
|
2308
|
-
__name(makeNodeErrorWithCode, "makeNodeErrorWithCode");
|
|
2309
|
-
function isErrorStackTraceLimitWritable() {
|
|
2310
|
-
try {
|
|
2311
|
-
if (v8.startupSnapshot.isBuildingSnapshot()) {
|
|
2312
|
-
return false;
|
|
2313
|
-
}
|
|
2314
|
-
} catch {
|
|
2315
|
-
}
|
|
2316
|
-
const desc = Object.getOwnPropertyDescriptor(Error, "stackTraceLimit");
|
|
2317
|
-
if (desc === void 0) {
|
|
2318
|
-
return Object.isExtensible(Error);
|
|
2319
|
-
}
|
|
2320
|
-
return own$1.call(desc, "writable") && desc.writable !== void 0 ? desc.writable : desc.set !== void 0;
|
|
2321
|
-
}
|
|
2322
|
-
__name(isErrorStackTraceLimitWritable, "isErrorStackTraceLimitWritable");
|
|
2323
|
-
function hideStackFrames(wrappedFunction) {
|
|
2324
|
-
const hidden = nodeInternalPrefix + wrappedFunction.name;
|
|
2325
|
-
Object.defineProperty(wrappedFunction, "name", { value: hidden });
|
|
2326
|
-
return wrappedFunction;
|
|
2327
|
-
}
|
|
2328
|
-
__name(hideStackFrames, "hideStackFrames");
|
|
2329
|
-
var captureLargerStackTrace = hideStackFrames(function(error) {
|
|
2330
|
-
const stackTraceLimitIsWritable = isErrorStackTraceLimitWritable();
|
|
2331
|
-
if (stackTraceLimitIsWritable) {
|
|
2332
|
-
userStackTraceLimit = Error.stackTraceLimit;
|
|
2333
|
-
Error.stackTraceLimit = Number.POSITIVE_INFINITY;
|
|
2334
|
-
}
|
|
2335
|
-
Error.captureStackTrace(error);
|
|
2336
|
-
if (stackTraceLimitIsWritable) Error.stackTraceLimit = userStackTraceLimit;
|
|
2337
|
-
return error;
|
|
2338
|
-
});
|
|
2339
|
-
function getMessage(key, parameters, self) {
|
|
2340
|
-
const message = messages.get(key);
|
|
2341
|
-
assert(message !== void 0, "expected `message` to be found");
|
|
2342
|
-
if (typeof message === "function") {
|
|
2343
|
-
assert(
|
|
2344
|
-
message.length <= parameters.length,
|
|
2345
|
-
// Default options do not count.
|
|
2346
|
-
`Code: ${key}; The provided arguments length (${parameters.length}) does not match the required ones (${message.length}).`
|
|
2347
|
-
);
|
|
2348
|
-
return Reflect.apply(message, self, parameters);
|
|
2349
|
-
}
|
|
2350
|
-
const regex = /%[dfijoOs]/g;
|
|
2351
|
-
let expectedLength = 0;
|
|
2352
|
-
while (regex.exec(message) !== null) expectedLength++;
|
|
2353
|
-
assert(
|
|
2354
|
-
expectedLength === parameters.length,
|
|
2355
|
-
`Code: ${key}; The provided arguments length (${parameters.length}) does not match the required ones (${expectedLength}).`
|
|
2356
|
-
);
|
|
2357
|
-
if (parameters.length === 0) return message;
|
|
2358
|
-
parameters.unshift(message);
|
|
2359
|
-
return Reflect.apply(format, null, parameters);
|
|
2360
|
-
}
|
|
2361
|
-
__name(getMessage, "getMessage");
|
|
2362
|
-
function determineSpecificType(value) {
|
|
2363
|
-
if (value === null || value === void 0) {
|
|
2364
|
-
return String(value);
|
|
2365
|
-
}
|
|
2366
|
-
if (typeof value === "function" && value.name) {
|
|
2367
|
-
return `function ${value.name}`;
|
|
2368
|
-
}
|
|
2369
|
-
if (typeof value === "object") {
|
|
2370
|
-
if (value.constructor && value.constructor.name) {
|
|
2371
|
-
return `an instance of ${value.constructor.name}`;
|
|
2372
|
-
}
|
|
2373
|
-
return `${inspect(value, { depth: -1 })}`;
|
|
2374
|
-
}
|
|
2375
|
-
let inspected = inspect(value, { colors: false });
|
|
2376
|
-
if (inspected.length > 28) {
|
|
2377
|
-
inspected = `${inspected.slice(0, 25)}...`;
|
|
2378
|
-
}
|
|
2379
|
-
return `type ${typeof value} (${inspected})`;
|
|
2380
|
-
}
|
|
2381
|
-
__name(determineSpecificType, "determineSpecificType");
|
|
2382
|
-
createError(
|
|
2383
|
-
"ERR_INVALID_ARG_TYPE",
|
|
2384
|
-
(name, expected, actual) => {
|
|
2385
|
-
assert(typeof name === "string", "'name' must be a string");
|
|
2386
|
-
if (!Array.isArray(expected)) {
|
|
2387
|
-
expected = [expected];
|
|
2388
|
-
}
|
|
2389
|
-
let message = "The ";
|
|
2390
|
-
if (name.endsWith(" argument")) {
|
|
2391
|
-
message += `${name} `;
|
|
2392
|
-
} else {
|
|
2393
|
-
const type = name.includes(".") ? "property" : "argument";
|
|
2394
|
-
message += `"${name}" ${type} `;
|
|
2395
|
-
}
|
|
2396
|
-
message += "must be ";
|
|
2397
|
-
const types = [];
|
|
2398
|
-
const instances = [];
|
|
2399
|
-
const other = [];
|
|
2400
|
-
for (const value of expected) {
|
|
2401
|
-
assert(
|
|
2402
|
-
typeof value === "string",
|
|
2403
|
-
"All expected entries have to be of type string"
|
|
2404
|
-
);
|
|
2405
|
-
if (kTypes.has(value)) {
|
|
2406
|
-
types.push(value.toLowerCase());
|
|
2407
|
-
} else if (classRegExp.exec(value) === null) {
|
|
2408
|
-
assert(
|
|
2409
|
-
value !== "object",
|
|
2410
|
-
'The value "object" should be written as "Object"'
|
|
2411
|
-
);
|
|
2412
|
-
other.push(value);
|
|
2413
|
-
} else {
|
|
2414
|
-
instances.push(value);
|
|
2415
|
-
}
|
|
2416
|
-
}
|
|
2417
|
-
if (instances.length > 0) {
|
|
2418
|
-
const pos = types.indexOf("object");
|
|
2419
|
-
if (pos !== -1) {
|
|
2420
|
-
types.slice(pos, 1);
|
|
2421
|
-
instances.push("Object");
|
|
2422
|
-
}
|
|
2423
|
-
}
|
|
2424
|
-
if (types.length > 0) {
|
|
2425
|
-
message += `${types.length > 1 ? "one of type" : "of type"} ${formatList(
|
|
2426
|
-
types,
|
|
2427
|
-
"or"
|
|
2428
|
-
)}`;
|
|
2429
|
-
if (instances.length > 0 || other.length > 0) message += " or ";
|
|
2430
|
-
}
|
|
2431
|
-
if (instances.length > 0) {
|
|
2432
|
-
message += `an instance of ${formatList(instances, "or")}`;
|
|
2433
|
-
if (other.length > 0) message += " or ";
|
|
2434
|
-
}
|
|
2435
|
-
if (other.length > 0) {
|
|
2436
|
-
if (other.length > 1) {
|
|
2437
|
-
message += `one of ${formatList(other, "or")}`;
|
|
2438
|
-
} else {
|
|
2439
|
-
if (other[0]?.toLowerCase() !== other[0]) message += "an ";
|
|
2440
|
-
message += `${other[0]}`;
|
|
2441
|
-
}
|
|
2442
|
-
}
|
|
2443
|
-
message += `. Received ${determineSpecificType(actual)}`;
|
|
2444
|
-
return message;
|
|
2445
|
-
},
|
|
2446
|
-
TypeError
|
|
2447
|
-
);
|
|
2448
|
-
var ERR_INVALID_MODULE_SPECIFIER = createError(
|
|
2449
|
-
"ERR_INVALID_MODULE_SPECIFIER",
|
|
2450
|
-
/**
|
|
2451
|
-
* @param {string} request
|
|
2452
|
-
* @param {string} reason
|
|
2453
|
-
* @param {string} [base]
|
|
2454
|
-
*/
|
|
2455
|
-
(request, reason, base) => {
|
|
2456
|
-
return `Invalid module "${request}" ${reason}${base ? ` imported from ${base}` : ""}`;
|
|
2457
|
-
},
|
|
2458
|
-
TypeError
|
|
2459
|
-
);
|
|
2460
|
-
var ERR_INVALID_PACKAGE_CONFIG = createError(
|
|
2461
|
-
"ERR_INVALID_PACKAGE_CONFIG",
|
|
2462
|
-
(path3, base, message) => {
|
|
2463
|
-
return `Invalid package config ${path3}${base ? ` while importing ${base}` : ""}${message ? `. ${message}` : ""}`;
|
|
2464
|
-
},
|
|
2465
|
-
Error
|
|
2466
|
-
);
|
|
2467
|
-
var ERR_INVALID_PACKAGE_TARGET = createError(
|
|
2468
|
-
"ERR_INVALID_PACKAGE_TARGET",
|
|
2469
|
-
(packagePath, key, target, isImport = false, base) => {
|
|
2470
|
-
const relatedError = typeof target === "string" && !isImport && target.length > 0 && !target.startsWith("./");
|
|
2471
|
-
if (key === ".") {
|
|
2472
|
-
assert(isImport === false);
|
|
2473
|
-
return `Invalid "exports" main target ${JSON.stringify(target)} defined in the package config ${packagePath}package.json${base ? ` imported from ${base}` : ""}${relatedError ? '; targets must start with "./"' : ""}`;
|
|
2474
|
-
}
|
|
2475
|
-
return `Invalid "${isImport ? "imports" : "exports"}" target ${JSON.stringify(
|
|
2476
|
-
target
|
|
2477
|
-
)} defined for '${key}' in the package config ${packagePath}package.json${base ? ` imported from ${base}` : ""}${relatedError ? '; targets must start with "./"' : ""}`;
|
|
2478
|
-
},
|
|
2479
|
-
Error
|
|
2480
|
-
);
|
|
2481
|
-
var ERR_MODULE_NOT_FOUND = createError(
|
|
2482
|
-
"ERR_MODULE_NOT_FOUND",
|
|
2483
|
-
(path3, base, exactUrl = false) => {
|
|
2484
|
-
return `Cannot find ${exactUrl ? "module" : "package"} '${path3}' imported from ${base}`;
|
|
2485
|
-
},
|
|
2486
|
-
Error
|
|
2487
|
-
);
|
|
2488
|
-
createError(
|
|
2489
|
-
"ERR_NETWORK_IMPORT_DISALLOWED",
|
|
2490
|
-
"import of '%s' by %s is not supported: %s",
|
|
2491
|
-
Error
|
|
2492
|
-
);
|
|
2493
|
-
var ERR_PACKAGE_IMPORT_NOT_DEFINED = createError(
|
|
2494
|
-
"ERR_PACKAGE_IMPORT_NOT_DEFINED",
|
|
2495
|
-
(specifier, packagePath, base) => {
|
|
2496
|
-
return `Package import specifier "${specifier}" is not defined${packagePath ? ` in package ${packagePath || ""}package.json` : ""} imported from ${base}`;
|
|
2497
|
-
},
|
|
2498
|
-
TypeError
|
|
2499
|
-
);
|
|
2500
|
-
var ERR_PACKAGE_PATH_NOT_EXPORTED = createError(
|
|
2501
|
-
"ERR_PACKAGE_PATH_NOT_EXPORTED",
|
|
2502
|
-
/**
|
|
2503
|
-
* @param {string} packagePath
|
|
2504
|
-
* @param {string} subpath
|
|
2505
|
-
* @param {string} [base]
|
|
2506
|
-
*/
|
|
2507
|
-
(packagePath, subpath, base) => {
|
|
2508
|
-
if (subpath === ".")
|
|
2509
|
-
return `No "exports" main defined in ${packagePath}package.json${base ? ` imported from ${base}` : ""}`;
|
|
2510
|
-
return `Package subpath '${subpath}' is not defined by "exports" in ${packagePath}package.json${base ? ` imported from ${base}` : ""}`;
|
|
2511
|
-
},
|
|
2512
|
-
Error
|
|
2513
|
-
);
|
|
2514
|
-
var ERR_UNSUPPORTED_DIR_IMPORT = createError(
|
|
2515
|
-
"ERR_UNSUPPORTED_DIR_IMPORT",
|
|
2516
|
-
"Directory import '%s' is not supported resolving ES modules imported from %s",
|
|
2517
|
-
Error
|
|
2518
|
-
);
|
|
2519
|
-
var ERR_UNSUPPORTED_RESOLVE_REQUEST = createError(
|
|
2520
|
-
"ERR_UNSUPPORTED_RESOLVE_REQUEST",
|
|
2521
|
-
'Failed to resolve module specifier "%s" from "%s": Invalid relative URL or base scheme is not hierarchical.',
|
|
2522
|
-
TypeError
|
|
2523
|
-
);
|
|
2524
|
-
var ERR_UNKNOWN_FILE_EXTENSION = createError(
|
|
2525
|
-
"ERR_UNKNOWN_FILE_EXTENSION",
|
|
2526
|
-
(extension, path3) => {
|
|
2527
|
-
return `Unknown file extension "${extension}" for ${path3}`;
|
|
2528
|
-
},
|
|
2529
|
-
TypeError
|
|
2530
|
-
);
|
|
2531
|
-
createError(
|
|
2532
|
-
"ERR_INVALID_ARG_VALUE",
|
|
2533
|
-
(name, value, reason = "is invalid") => {
|
|
2534
|
-
let inspected = inspect(value);
|
|
2535
|
-
if (inspected.length > 128) {
|
|
2536
|
-
inspected = `${inspected.slice(0, 128)}...`;
|
|
2537
|
-
}
|
|
2538
|
-
const type = name.includes(".") ? "property" : "argument";
|
|
2539
|
-
return `The ${type} '${name}' ${reason}. Received ${inspected}`;
|
|
2540
|
-
},
|
|
2541
|
-
TypeError
|
|
2542
|
-
// Note: extra classes have been shaken out.
|
|
2543
|
-
// , RangeError
|
|
2544
|
-
);
|
|
2545
|
-
var hasOwnProperty$1 = {}.hasOwnProperty;
|
|
2546
|
-
var hasOwnProperty = {}.hasOwnProperty;
|
|
2547
|
-
var RegExpPrototypeSymbolReplace = RegExp.prototype[Symbol.replace];
|
|
2548
|
-
var own = {}.hasOwnProperty;
|
|
2549
|
-
var isWindows = (() => process.platform === "win32")();
|
|
2550
|
-
var globalCache = (() => (
|
|
2551
|
-
// eslint-disable-next-line unicorn/no-unreadable-iife
|
|
2552
|
-
globalThis["__EXSOLVE_CACHE__"] ||= /* @__PURE__ */ new Map()
|
|
2553
|
-
))();
|
|
2554
|
-
|
|
2555
|
-
// ../../core/src/shared/utils/module.ts
|
|
2556
|
-
var importMetaResolve = /* @__PURE__ */ __name((...args) => {
|
|
2557
|
-
if (typeof import.meta.resolve !== "function" && process.env.VITEST === "true") {
|
|
2558
|
-
console.warn(
|
|
2559
|
-
"importMetaResolve from within Storybook is being used in a Vitest test, but it shouldn't be. Please report this at https://github.com/storybookjs/storybook/issues/new?template=bug_report.yml"
|
|
2560
|
-
);
|
|
2561
|
-
return pathToFileURL(args[0]).href;
|
|
2562
|
-
}
|
|
2563
|
-
return import.meta.resolve(...args);
|
|
2564
|
-
}, "importMetaResolve");
|
|
2565
|
-
var resolvePackageDir = /* @__PURE__ */ __name((pkg, parent) => {
|
|
2566
|
-
return dirname(fileURLToPath2(importMetaResolve(join(pkg, "package.json"), parent)));
|
|
2567
|
-
}, "resolvePackageDir");
|
|
2568
|
-
|
|
2569
|
-
export {
|
|
2570
|
-
execa,
|
|
2571
|
-
execaNode,
|
|
2572
|
-
importMetaResolve,
|
|
2573
|
-
resolvePackageDir
|
|
2574
|
-
};
|