@kubb/cli 3.5.6 → 3.5.7
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/chunk-LA3QWVJI.js +4 -4
- package/dist/chunk-LA3QWVJI.js.map +1 -1
- package/dist/{chunk-QIIAJMH6.cjs → chunk-ZKB5EBBP.cjs} +185 -185
- package/dist/chunk-ZKB5EBBP.cjs.map +1 -0
- package/dist/{generate-I27JEXNY.cjs → generate-2BXLGOO5.cjs} +18 -18
- package/dist/generate-2BXLGOO5.cjs.map +1 -0
- package/dist/{generate-ROINWVXB.js → generate-Q72KJ3UY.js} +4 -5
- package/dist/generate-Q72KJ3UY.js.map +1 -0
- package/dist/index.cjs +6 -6
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +3 -3
- package/dist/index.js.map +1 -1
- package/package.json +8 -8
- package/src/commands/generate.ts +0 -1
- package/dist/chunk-QIIAJMH6.cjs.map +0 -1
- package/dist/generate-I27JEXNY.cjs.map +0 -1
- package/dist/generate-ROINWVXB.js.map +0 -1
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
var tty = require('tty');
|
|
4
|
+
var logger = require('@kubb/core/logger');
|
|
5
|
+
var core = require('@kubb/core');
|
|
4
6
|
var url = require('url');
|
|
5
7
|
var child_process = require('child_process');
|
|
6
8
|
var string_decoder = require('string_decoder');
|
|
@@ -15,8 +17,6 @@ var fs = require('fs');
|
|
|
15
17
|
var promises = require('stream/promises');
|
|
16
18
|
var stream = require('stream');
|
|
17
19
|
var buffer = require('buffer');
|
|
18
|
-
var logger = require('@kubb/core/logger');
|
|
19
|
-
var core = require('@kubb/core');
|
|
20
20
|
var stringArgv = require('string-argv');
|
|
21
21
|
var cliProgress = require('cli-progress');
|
|
22
22
|
|
|
@@ -79,10 +79,10 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
79
79
|
mod
|
|
80
80
|
));
|
|
81
81
|
|
|
82
|
-
// ../../node_modules/.pnpm/tsup@8.3.
|
|
82
|
+
// ../../node_modules/.pnpm/tsup@8.3.6_@microsoft+api-extractor@7.49.2_@types+node@20.17.17__jiti@2.4.2_postcss@8.4.49_typescript@5.7.3_yaml@2.6.1/node_modules/tsup/assets/cjs_shims.js
|
|
83
83
|
var getImportMetaUrl; exports.importMetaUrl = void 0;
|
|
84
84
|
var init_cjs_shims = __esm({
|
|
85
|
-
"../../node_modules/.pnpm/tsup@8.3.
|
|
85
|
+
"../../node_modules/.pnpm/tsup@8.3.6_@microsoft+api-extractor@7.49.2_@types+node@20.17.17__jiti@2.4.2_postcss@8.4.49_typescript@5.7.3_yaml@2.6.1/node_modules/tsup/assets/cjs_shims.js"() {
|
|
86
86
|
getImportMetaUrl = () => typeof document === "undefined" ? new URL(`file:${__filename}`).href : document.currentScript && document.currentScript.src || new URL("main.js", document.baseURI).href;
|
|
87
87
|
exports.importMetaUrl = /* @__PURE__ */ getImportMetaUrl();
|
|
88
88
|
}
|
|
@@ -96,7 +96,7 @@ var require_windows = __commonJS({
|
|
|
96
96
|
isexe.sync = sync;
|
|
97
97
|
var fs = __require("fs");
|
|
98
98
|
function checkPathExt(path7, options) {
|
|
99
|
-
var pathext = options.pathExt !==
|
|
99
|
+
var pathext = options.pathExt !== undefined ? options.pathExt : process.env.PATHEXT;
|
|
100
100
|
if (!pathext) {
|
|
101
101
|
return true;
|
|
102
102
|
}
|
|
@@ -151,8 +151,8 @@ var require_mode = __commonJS({
|
|
|
151
151
|
var mod = stat.mode;
|
|
152
152
|
var uid = stat.uid;
|
|
153
153
|
var gid = stat.gid;
|
|
154
|
-
var myUid = options.uid !==
|
|
155
|
-
var myGid = options.gid !==
|
|
154
|
+
var myUid = options.uid !== undefined ? options.uid : process.getuid && process.getuid();
|
|
155
|
+
var myGid = options.gid !== undefined ? options.gid : process.getgid && process.getgid();
|
|
156
156
|
var u2 = parseInt("100", 8);
|
|
157
157
|
var g = parseInt("010", 8);
|
|
158
158
|
var o2 = parseInt("001", 8);
|
|
@@ -344,7 +344,7 @@ var require_resolveCommand = __commonJS({
|
|
|
344
344
|
const env = parsed.options.env || process.env;
|
|
345
345
|
const cwd = process.cwd();
|
|
346
346
|
const hasCustomCwd = parsed.options.cwd != null;
|
|
347
|
-
const shouldSwitchCwd = hasCustomCwd && process.chdir !==
|
|
347
|
+
const shouldSwitchCwd = hasCustomCwd && process.chdir !== undefined && !process.chdir.disabled;
|
|
348
348
|
if (shouldSwitchCwd) {
|
|
349
349
|
try {
|
|
350
350
|
process.chdir(parsed.options.cwd);
|
|
@@ -500,7 +500,7 @@ var require_parse = __commonJS({
|
|
|
500
500
|
command,
|
|
501
501
|
args,
|
|
502
502
|
options,
|
|
503
|
-
file:
|
|
503
|
+
file: undefined,
|
|
504
504
|
original: {
|
|
505
505
|
command,
|
|
506
506
|
args
|
|
@@ -655,7 +655,7 @@ var require_eventemitter3 = __commonJS({
|
|
|
655
655
|
if (!this._events[evt]) return false;
|
|
656
656
|
var listeners = this._events[evt], len = arguments.length, args, i2;
|
|
657
657
|
if (listeners.fn) {
|
|
658
|
-
if (listeners.once) this.removeListener(event, listeners.fn,
|
|
658
|
+
if (listeners.once) this.removeListener(event, listeners.fn, undefined, true);
|
|
659
659
|
switch (len) {
|
|
660
660
|
case 1:
|
|
661
661
|
return listeners.fn.call(listeners.context), true;
|
|
@@ -677,7 +677,7 @@ var require_eventemitter3 = __commonJS({
|
|
|
677
677
|
} else {
|
|
678
678
|
var length = listeners.length, j;
|
|
679
679
|
for (i2 = 0; i2 < length; i2++) {
|
|
680
|
-
if (listeners[i2].once) this.removeListener(event, listeners[i2].fn,
|
|
680
|
+
if (listeners[i2].once) this.removeListener(event, listeners[i2].fn, undefined, true);
|
|
681
681
|
switch (len) {
|
|
682
682
|
case 1:
|
|
683
683
|
listeners[i2].fn.call(listeners[i2].context);
|
|
@@ -806,8 +806,8 @@ function a(n2) {
|
|
|
806
806
|
a.open = "";
|
|
807
807
|
a.close = "";
|
|
808
808
|
function C(n2 = false) {
|
|
809
|
-
let e = typeof process != "undefined" ? process :
|
|
810
|
-
return !("NO_COLOR" in i2 || g.includes("--no-color")) && ("FORCE_COLOR" in i2 || g.includes("--color") || (e == null ?
|
|
809
|
+
let e = typeof process != "undefined" ? process : undefined, i2 = (e == null ? undefined : e.env) || {}, g = (e == null ? undefined : e.argv) || [];
|
|
810
|
+
return !("NO_COLOR" in i2 || g.includes("--no-color")) && ("FORCE_COLOR" in i2 || g.includes("--color") || (e == null ? undefined : e.platform) === "win32" || n2 && i2.TERM !== "dumb" || "CI" in i2) || typeof window != "undefined" && !!window.chrome;
|
|
811
811
|
}
|
|
812
812
|
function p(n2 = false) {
|
|
813
813
|
let e = C(n2), i2 = (r2, t, c3, o2) => {
|
|
@@ -835,6 +835,12 @@ function p(n2 = false) {
|
|
|
835
835
|
}
|
|
836
836
|
var p2 = p(tty.isatty(1));
|
|
837
837
|
|
|
838
|
+
// src/generate.ts
|
|
839
|
+
init_cjs_shims();
|
|
840
|
+
|
|
841
|
+
// src/utils/executeHooks.ts
|
|
842
|
+
init_cjs_shims();
|
|
843
|
+
|
|
838
844
|
// ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/index.js
|
|
839
845
|
init_cjs_shims();
|
|
840
846
|
|
|
@@ -879,7 +885,7 @@ var normalizeParameters = (rawFile, rawArguments = [], rawOptions = {}) => {
|
|
|
879
885
|
}
|
|
880
886
|
const normalizedArguments = commandArguments.map(String);
|
|
881
887
|
const nullByteArgument = normalizedArguments.find((normalizedArgument) => normalizedArgument.includes("\0"));
|
|
882
|
-
if (nullByteArgument !==
|
|
888
|
+
if (nullByteArgument !== undefined) {
|
|
883
889
|
throw new TypeError(`Arguments cannot contain null bytes ("\\0"): ${nullByteArgument}`);
|
|
884
890
|
}
|
|
885
891
|
if (!isPlainObject(options)) {
|
|
@@ -958,7 +964,7 @@ var parseTemplates = (templates, expressions) => {
|
|
|
958
964
|
return [file, commandArguments, {}];
|
|
959
965
|
};
|
|
960
966
|
var parseTemplate = ({ templates, expressions, tokens, index, template }) => {
|
|
961
|
-
if (template ===
|
|
967
|
+
if (template === undefined) {
|
|
962
968
|
throw new TypeError(`Invalid backslash sequence: ${templates.raw[index]}`);
|
|
963
969
|
}
|
|
964
970
|
const { nextTokens, leadingWhitespaces, trailingWhitespaces } = splitByWhitespaces(template, templates.raw[index]);
|
|
@@ -1032,7 +1038,7 @@ var getSubprocessResult = ({ stdout: stdout2 }) => {
|
|
|
1032
1038
|
if (isUint8Array(stdout2)) {
|
|
1033
1039
|
return uint8ArrayToString(stdout2);
|
|
1034
1040
|
}
|
|
1035
|
-
if (stdout2 ===
|
|
1041
|
+
if (stdout2 === undefined) {
|
|
1036
1042
|
throw new TypeError(`Missing result.stdout in template expression. This is probably due to the previous subprocess' "stdout" option.`);
|
|
1037
1043
|
}
|
|
1038
1044
|
throw new TypeError(`Unexpected "${typeof stdout2}" stdout in template expression`);
|
|
@@ -1095,7 +1101,7 @@ var parseFdName = (fdName, optionName, optionArray) => {
|
|
|
1095
1101
|
return [optionArray.length - 1];
|
|
1096
1102
|
}
|
|
1097
1103
|
const fdNumber = parseFd(fdName);
|
|
1098
|
-
if (fdNumber ===
|
|
1104
|
+
if (fdNumber === undefined || fdNumber === 0) {
|
|
1099
1105
|
throw new TypeError(`"${optionName}.${fdName}" is invalid.
|
|
1100
1106
|
It must be "${optionName}.stdout", "${optionName}.stderr", "${optionName}.all", "${optionName}.ipc", or "${optionName}.fd3", "${optionName}.fd4" (and so on).`);
|
|
1101
1107
|
}
|
|
@@ -1118,7 +1124,7 @@ var parseFd = (fdName) => {
|
|
|
1118
1124
|
}
|
|
1119
1125
|
};
|
|
1120
1126
|
var FD_REGEXP = /^fd(\d+)$/;
|
|
1121
|
-
var addDefaultValue = (optionArray, optionName) => optionArray.map((optionValue) => optionValue ===
|
|
1127
|
+
var addDefaultValue = (optionArray, optionName) => optionArray.map((optionValue) => optionValue === undefined ? DEFAULT_OPTIONS[optionName] : optionValue);
|
|
1122
1128
|
var verboseDefault = util.debuglog("execa").enabled ? "full" : "none";
|
|
1123
1129
|
var DEFAULT_OPTIONS = {
|
|
1124
1130
|
lines: false,
|
|
@@ -1135,9 +1141,9 @@ var isVerbose = ({ verbose }, fdNumber) => getFdVerbose(verbose, fdNumber) !== "
|
|
|
1135
1141
|
var isFullVerbose = ({ verbose }, fdNumber) => !["none", "short"].includes(getFdVerbose(verbose, fdNumber));
|
|
1136
1142
|
var getVerboseFunction = ({ verbose }, fdNumber) => {
|
|
1137
1143
|
const fdVerbose = getFdVerbose(verbose, fdNumber);
|
|
1138
|
-
return isVerboseFunction(fdVerbose) ? fdVerbose :
|
|
1144
|
+
return isVerboseFunction(fdVerbose) ? fdVerbose : undefined;
|
|
1139
1145
|
};
|
|
1140
|
-
var getFdVerbose = (verbose, fdNumber) => fdNumber ===
|
|
1146
|
+
var getFdVerbose = (verbose, fdNumber) => fdNumber === undefined ? getFdGenericVerbose(verbose) : getFdSpecificValue(verbose, fdNumber);
|
|
1141
1147
|
var getFdGenericVerbose = (verbose) => verbose.find((fdVerbose) => isVerboseFunction(fdVerbose)) ?? VERBOSE_VALUES.findLast((fdVerbose) => verbose.includes(fdVerbose));
|
|
1142
1148
|
var isVerboseFunction = (fdVerbose) => typeof fdVerbose === "function";
|
|
1143
1149
|
var VERBOSE_VALUES = ["none", "short", "full"];
|
|
@@ -1157,7 +1163,7 @@ var escapeLines = (lines) => util.stripVTControlCharacters(lines).split("\n").ma
|
|
|
1157
1163
|
var escapeControlCharacters = (line) => line.replaceAll(SPECIAL_CHAR_REGEXP, (character) => escapeControlCharacter(character));
|
|
1158
1164
|
var escapeControlCharacter = (character) => {
|
|
1159
1165
|
const commonEscape = COMMON_ESCAPES[character];
|
|
1160
|
-
if (commonEscape !==
|
|
1166
|
+
if (commonEscape !== undefined) {
|
|
1161
1167
|
return commonEscape;
|
|
1162
1168
|
}
|
|
1163
1169
|
const codepoint = character.codePointAt(0);
|
|
@@ -1555,10 +1561,10 @@ var COLORS = {
|
|
|
1555
1561
|
init_cjs_shims();
|
|
1556
1562
|
var applyVerboseOnLines = (printedLines, verboseInfo, fdNumber) => {
|
|
1557
1563
|
const verboseFunction = getVerboseFunction(verboseInfo, fdNumber);
|
|
1558
|
-
return printedLines.map(({ verboseLine, verboseObject }) => applyVerboseFunction(verboseLine, verboseObject, verboseFunction)).filter((printedLine) => printedLine !==
|
|
1564
|
+
return printedLines.map(({ verboseLine, verboseObject }) => applyVerboseFunction(verboseLine, verboseObject, verboseFunction)).filter((printedLine) => printedLine !== undefined).map((printedLine) => appendNewline(printedLine)).join("");
|
|
1559
1565
|
};
|
|
1560
1566
|
var applyVerboseFunction = (verboseLine, verboseObject, verboseFunction) => {
|
|
1561
|
-
if (verboseFunction ===
|
|
1567
|
+
if (verboseFunction === undefined) {
|
|
1562
1568
|
return verboseLine;
|
|
1563
1569
|
}
|
|
1564
1570
|
const printedLine = verboseFunction(verboseLine, verboseObject);
|
|
@@ -1627,7 +1633,7 @@ var getVerboseInfo = (verbose, escapedCommand, rawOptions) => {
|
|
|
1627
1633
|
rawOptions
|
|
1628
1634
|
};
|
|
1629
1635
|
};
|
|
1630
|
-
var getCommandId = (verbose) => isVerbose({ verbose }) ? COMMAND_ID++ :
|
|
1636
|
+
var getCommandId = (verbose) => isVerbose({ verbose }) ? COMMAND_ID++ : undefined;
|
|
1631
1637
|
var COMMAND_ID = 0n;
|
|
1632
1638
|
var validateVerbose = (verbose) => {
|
|
1633
1639
|
for (const fdVerbose of verbose) {
|
|
@@ -2097,7 +2103,7 @@ var normalizeSignal = ({
|
|
|
2097
2103
|
const {
|
|
2098
2104
|
signals: { [name]: constantSignal }
|
|
2099
2105
|
} = os.constants;
|
|
2100
|
-
const supported = constantSignal !==
|
|
2106
|
+
const supported = constantSignal !== undefined;
|
|
2101
2107
|
const number = supported ? constantSignal : defaultNumber;
|
|
2102
2108
|
return { name, number, description, supported, action, forced, standard };
|
|
2103
2109
|
};
|
|
@@ -2128,7 +2134,7 @@ var getSignalsByNumber = () => {
|
|
|
2128
2134
|
};
|
|
2129
2135
|
var getSignalByNumber = (number, signals2) => {
|
|
2130
2136
|
const signal = findSignalByNumber(number, signals2);
|
|
2131
|
-
if (signal ===
|
|
2137
|
+
if (signal === undefined) {
|
|
2132
2138
|
return {};
|
|
2133
2139
|
}
|
|
2134
2140
|
const { name, description, supported, action, forced, standard } = signal;
|
|
@@ -2146,7 +2152,7 @@ var getSignalByNumber = (number, signals2) => {
|
|
|
2146
2152
|
};
|
|
2147
2153
|
var findSignalByNumber = (number, signals2) => {
|
|
2148
2154
|
const signal = signals2.find(({ name }) => os.constants.signals[name] === number);
|
|
2149
|
-
if (signal !==
|
|
2155
|
+
if (signal !== undefined) {
|
|
2150
2156
|
return signal;
|
|
2151
2157
|
}
|
|
2152
2158
|
return signals2.find((signalA) => signalA.number === number);
|
|
@@ -2227,17 +2233,17 @@ var subprocessKill = ({ kill, options: { forceKillAfterDelay, killSignal }, onIn
|
|
|
2227
2233
|
return killResult;
|
|
2228
2234
|
};
|
|
2229
2235
|
var parseKillArguments = (signalOrError, errorArgument, killSignal) => {
|
|
2230
|
-
const [signal = killSignal, error] = isErrorInstance(signalOrError) ? [
|
|
2236
|
+
const [signal = killSignal, error] = isErrorInstance(signalOrError) ? [undefined, signalOrError] : [signalOrError, errorArgument];
|
|
2231
2237
|
if (typeof signal !== "string" && !Number.isInteger(signal)) {
|
|
2232
2238
|
throw new TypeError(`The first argument must be an error instance or a signal name string/integer: ${String(signal)}`);
|
|
2233
2239
|
}
|
|
2234
|
-
if (error !==
|
|
2240
|
+
if (error !== undefined && !isErrorInstance(error)) {
|
|
2235
2241
|
throw new TypeError(`The second argument is optional. If specified, it must be an error instance: ${error}`);
|
|
2236
2242
|
}
|
|
2237
2243
|
return { signal: normalizeSignalArgument(signal), error };
|
|
2238
2244
|
};
|
|
2239
2245
|
var emitKillError = (error, onInternalError) => {
|
|
2240
|
-
if (error !==
|
|
2246
|
+
if (error !== undefined) {
|
|
2241
2247
|
onInternalError.reject(error);
|
|
2242
2248
|
}
|
|
2243
2249
|
};
|
|
@@ -2277,11 +2283,11 @@ var onAbortedSignal = async (mainSignal, stopSignal) => {
|
|
|
2277
2283
|
|
|
2278
2284
|
// ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/terminate/cancel.js
|
|
2279
2285
|
var validateCancelSignal = ({ cancelSignal }) => {
|
|
2280
|
-
if (cancelSignal !==
|
|
2286
|
+
if (cancelSignal !== undefined && Object.prototype.toString.call(cancelSignal) !== "[object AbortSignal]") {
|
|
2281
2287
|
throw new Error(`The \`cancelSignal\` option must be an AbortSignal: ${String(cancelSignal)}`);
|
|
2282
2288
|
}
|
|
2283
2289
|
};
|
|
2284
|
-
var throwOnCancel = ({ subprocess, cancelSignal, gracefulCancel, context, controller }) => cancelSignal ===
|
|
2290
|
+
var throwOnCancel = ({ subprocess, cancelSignal, gracefulCancel, context, controller }) => cancelSignal === undefined || gracefulCancel ? [] : [terminateOnCancel(subprocess, cancelSignal, context, controller)];
|
|
2285
2291
|
var terminateOnCancel = async (subprocess, cancelSignal, context, { signal }) => {
|
|
2286
2292
|
await onAbortedSignal(cancelSignal, signal);
|
|
2287
2293
|
context.terminationReason ??= "cancel";
|
|
@@ -2401,7 +2407,7 @@ var getFromStream = (source, from = "stdout") => {
|
|
|
2401
2407
|
const { options, fileDescriptors } = SUBPROCESS_OPTIONS.get(source);
|
|
2402
2408
|
const fdNumber = getFdNumber(fileDescriptors, from, isWritable);
|
|
2403
2409
|
const sourceStream = fdNumber === "all" ? source.all : source.stdio[fdNumber];
|
|
2404
|
-
if (sourceStream === null || sourceStream ===
|
|
2410
|
+
if (sourceStream === null || sourceStream === undefined) {
|
|
2405
2411
|
throw new TypeError(getInvalidStdioOptionMessage(fdNumber, from, options, isWritable));
|
|
2406
2412
|
}
|
|
2407
2413
|
return sourceStream;
|
|
@@ -2414,7 +2420,7 @@ var getFdNumber = (fileDescriptors, fdName, isWritable) => {
|
|
|
2414
2420
|
};
|
|
2415
2421
|
var parseFdNumber = (fdName, isWritable) => {
|
|
2416
2422
|
const fdNumber = parseFd(fdName);
|
|
2417
|
-
if (fdNumber !==
|
|
2423
|
+
if (fdNumber !== undefined) {
|
|
2418
2424
|
return fdNumber;
|
|
2419
2425
|
}
|
|
2420
2426
|
const { validOptions, defaultValue } = isWritable ? { validOptions: '"stdin"', defaultValue: "stdin" } : { validOptions: '"stdout", "stderr", "all"', defaultValue: "stdout" };
|
|
@@ -2424,7 +2430,7 @@ It is optional and defaults to "${defaultValue}".`);
|
|
|
2424
2430
|
};
|
|
2425
2431
|
var validateFdNumber = (fdNumber, fdName, isWritable, fileDescriptors) => {
|
|
2426
2432
|
const fileDescriptor = fileDescriptors[getUsedDescriptor(fdNumber)];
|
|
2427
|
-
if (fileDescriptor ===
|
|
2433
|
+
if (fileDescriptor === undefined) {
|
|
2428
2434
|
throw new TypeError(`"${getOptionName(isWritable)}" must not be ${fdName}. That file descriptor does not exist.
|
|
2429
2435
|
Please set the "stdio" option to ensure that file descriptor exists.`);
|
|
2430
2436
|
}
|
|
@@ -2445,13 +2451,13 @@ Please set this option with "pipe" instead.`;
|
|
|
2445
2451
|
};
|
|
2446
2452
|
var getInvalidStdioOption = (fdNumber, { stdin, stdout: stdout2, stderr, stdio }) => {
|
|
2447
2453
|
const usedDescriptor = getUsedDescriptor(fdNumber);
|
|
2448
|
-
if (usedDescriptor === 0 && stdin !==
|
|
2454
|
+
if (usedDescriptor === 0 && stdin !== undefined) {
|
|
2449
2455
|
return { optionName: "stdin", optionValue: stdin };
|
|
2450
2456
|
}
|
|
2451
|
-
if (usedDescriptor === 1 && stdout2 !==
|
|
2457
|
+
if (usedDescriptor === 1 && stdout2 !== undefined) {
|
|
2452
2458
|
return { optionName: "stdout", optionValue: stdout2 };
|
|
2453
2459
|
}
|
|
2454
|
-
if (usedDescriptor === 2 && stderr !==
|
|
2460
|
+
if (usedDescriptor === 2 && stderr !== undefined) {
|
|
2455
2461
|
return { optionName: "stderr", optionValue: stderr };
|
|
2456
2462
|
}
|
|
2457
2463
|
return { optionName: `stdio[${usedDescriptor}]`, optionValue: stdio[usedDescriptor] };
|
|
@@ -2577,14 +2583,14 @@ var getIpcEmitter = (anyProcess, channel, isSubprocess) => {
|
|
|
2577
2583
|
};
|
|
2578
2584
|
var IPC_EMITTERS = /* @__PURE__ */ new WeakMap();
|
|
2579
2585
|
var forwardEvents = ({ ipcEmitter, anyProcess, channel, isSubprocess }) => {
|
|
2580
|
-
const boundOnMessage = onMessage.bind(
|
|
2586
|
+
const boundOnMessage = onMessage.bind(undefined, {
|
|
2581
2587
|
anyProcess,
|
|
2582
2588
|
channel,
|
|
2583
2589
|
isSubprocess,
|
|
2584
2590
|
ipcEmitter
|
|
2585
2591
|
});
|
|
2586
2592
|
anyProcess.on("message", boundOnMessage);
|
|
2587
|
-
anyProcess.once("disconnect", onDisconnect.bind(
|
|
2593
|
+
anyProcess.once("disconnect", onDisconnect.bind(undefined, {
|
|
2588
2594
|
anyProcess,
|
|
2589
2595
|
channel,
|
|
2590
2596
|
isSubprocess,
|
|
@@ -2595,7 +2601,7 @@ var forwardEvents = ({ ipcEmitter, anyProcess, channel, isSubprocess }) => {
|
|
|
2595
2601
|
};
|
|
2596
2602
|
var isConnected = (anyProcess) => {
|
|
2597
2603
|
const ipcEmitter = IPC_EMITTERS.get(anyProcess);
|
|
2598
|
-
return ipcEmitter ===
|
|
2604
|
+
return ipcEmitter === undefined ? anyProcess.channel !== null : ipcEmitter.connected;
|
|
2599
2605
|
};
|
|
2600
2606
|
|
|
2601
2607
|
// ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/ipc/strict.js
|
|
@@ -2618,7 +2624,7 @@ var validateStrictDeadlock = (outgoingMessages, wrappedMessage) => {
|
|
|
2618
2624
|
return;
|
|
2619
2625
|
}
|
|
2620
2626
|
for (const { id } of outgoingMessages) {
|
|
2621
|
-
if (id !==
|
|
2627
|
+
if (id !== undefined) {
|
|
2622
2628
|
STRICT_RESPONSES[id].resolve({ isDeadlock: true, hasListeners: false });
|
|
2623
2629
|
}
|
|
2624
2630
|
}
|
|
@@ -2688,7 +2694,7 @@ var startSendMessage = (anyProcess, wrappedMessage, strict) => {
|
|
|
2688
2694
|
}
|
|
2689
2695
|
const outgoingMessages = OUTGOING_MESSAGES.get(anyProcess);
|
|
2690
2696
|
const onMessageSent = createDeferred();
|
|
2691
|
-
const id = strict ? wrappedMessage.id :
|
|
2697
|
+
const id = strict ? wrappedMessage.id : undefined;
|
|
2692
2698
|
const outgoingMessage = { onMessageSent, id };
|
|
2693
2699
|
outgoingMessages.add(outgoingMessage);
|
|
2694
2700
|
return { outgoingMessages, outgoingMessage };
|
|
@@ -2834,7 +2840,7 @@ var validateGracefulCancel = ({ gracefulCancel, cancelSignal, ipc, serialization
|
|
|
2834
2840
|
if (!gracefulCancel) {
|
|
2835
2841
|
return;
|
|
2836
2842
|
}
|
|
2837
|
-
if (cancelSignal ===
|
|
2843
|
+
if (cancelSignal === undefined) {
|
|
2838
2844
|
throw new Error("The `cancelSignal` option must be defined when setting the `gracefulCancel` option.");
|
|
2839
2845
|
}
|
|
2840
2846
|
if (!ipc) {
|
|
@@ -2888,13 +2894,13 @@ var getReason = ({ reason }) => {
|
|
|
2888
2894
|
// ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/terminate/timeout.js
|
|
2889
2895
|
init_cjs_shims();
|
|
2890
2896
|
var validateTimeout = ({ timeout }) => {
|
|
2891
|
-
if (timeout !==
|
|
2897
|
+
if (timeout !== undefined && (!Number.isFinite(timeout) || timeout < 0)) {
|
|
2892
2898
|
throw new TypeError(`Expected the \`timeout\` option to be a non-negative integer, got \`${timeout}\` (${typeof timeout})`);
|
|
2893
2899
|
}
|
|
2894
2900
|
};
|
|
2895
|
-
var throwOnTimeout = (subprocess, timeout, context, controller) => timeout === 0 || timeout ===
|
|
2901
|
+
var throwOnTimeout = (subprocess, timeout, context, controller) => timeout === 0 || timeout === undefined ? [] : [killAfterTimeout(subprocess, timeout, context, controller)];
|
|
2896
2902
|
var killAfterTimeout = async (subprocess, timeout, context, { signal }) => {
|
|
2897
|
-
await promises$1.setTimeout(timeout,
|
|
2903
|
+
await promises$1.setTimeout(timeout, undefined, { signal });
|
|
2898
2904
|
context.terminationReason ??= "timeout";
|
|
2899
2905
|
subprocess.kill();
|
|
2900
2906
|
throw new DiscardedError();
|
|
@@ -2916,7 +2922,7 @@ var handleNodeOption = (file, commandArguments, {
|
|
|
2916
2922
|
execPath: formerNodePath,
|
|
2917
2923
|
...options
|
|
2918
2924
|
}) => {
|
|
2919
|
-
if (formerNodePath !==
|
|
2925
|
+
if (formerNodePath !== undefined) {
|
|
2920
2926
|
throw new TypeError('The "execPath" option has been removed. Please use the "nodePath" option instead.');
|
|
2921
2927
|
}
|
|
2922
2928
|
const normalizedNodePath = safeNormalizeFileUrl(nodePath, 'The "nodePath" option');
|
|
@@ -2943,7 +2949,7 @@ var handleNodeOption = (file, commandArguments, {
|
|
|
2943
2949
|
// ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/ipc/ipc-input.js
|
|
2944
2950
|
init_cjs_shims();
|
|
2945
2951
|
var validateIpcInputOption = ({ ipcInput, ipc, serialization }) => {
|
|
2946
|
-
if (ipcInput ===
|
|
2952
|
+
if (ipcInput === undefined) {
|
|
2947
2953
|
return;
|
|
2948
2954
|
}
|
|
2949
2955
|
if (!ipc) {
|
|
@@ -2970,7 +2976,7 @@ var validateIpcInput = {
|
|
|
2970
2976
|
json: validateJsonInput
|
|
2971
2977
|
};
|
|
2972
2978
|
var sendIpcInput = async (subprocess, ipcInput) => {
|
|
2973
|
-
if (ipcInput ===
|
|
2979
|
+
if (ipcInput === undefined) {
|
|
2974
2980
|
return;
|
|
2975
2981
|
}
|
|
2976
2982
|
await subprocess.sendMessage(ipcInput);
|
|
@@ -2983,7 +2989,7 @@ var validateEncoding = ({ encoding }) => {
|
|
|
2983
2989
|
return;
|
|
2984
2990
|
}
|
|
2985
2991
|
const correctEncoding = getCorrectEncoding(encoding);
|
|
2986
|
-
if (correctEncoding !==
|
|
2992
|
+
if (correctEncoding !== undefined) {
|
|
2987
2993
|
throw new TypeError(`Invalid option \`encoding: ${serializeEncoding(encoding)}\`.
|
|
2988
2994
|
Please rename it to ${serializeEncoding(correctEncoding)}.`);
|
|
2989
2995
|
}
|
|
@@ -3089,7 +3095,7 @@ var addDefaultOptions = ({
|
|
|
3089
3095
|
forceKillAfterDelay = true,
|
|
3090
3096
|
gracefulCancel = false,
|
|
3091
3097
|
ipcInput,
|
|
3092
|
-
ipc = ipcInput !==
|
|
3098
|
+
ipc = ipcInput !== undefined || gracefulCancel,
|
|
3093
3099
|
serialization = "advanced",
|
|
3094
3100
|
...options
|
|
3095
3101
|
}) => ({
|
|
@@ -3160,7 +3166,7 @@ init_cjs_shims();
|
|
|
3160
3166
|
// ../../node_modules/.pnpm/is-stream@4.0.1/node_modules/is-stream/index.js
|
|
3161
3167
|
init_cjs_shims();
|
|
3162
3168
|
function isStream(stream, { checkOpen = true } = {}) {
|
|
3163
|
-
return stream !== null && typeof stream === "object" && (stream.writable || stream.readable || !checkOpen || stream.writable ===
|
|
3169
|
+
return stream !== null && typeof stream === "object" && (stream.writable || stream.readable || !checkOpen || stream.writable === undefined && stream.readable === undefined) && typeof stream.pipe === "function";
|
|
3164
3170
|
}
|
|
3165
3171
|
function isWritableStream(stream, { checkOpen = true } = {}) {
|
|
3166
3172
|
return isStream(stream, { checkOpen }) && (stream.writable || !checkOpen) && typeof stream.write === "function" && typeof stream.end === "function" && typeof stream.writable === "boolean" && typeof stream.writableObjectMode === "boolean" && typeof stream.destroy === "function" && typeof stream.destroyed === "boolean";
|
|
@@ -3188,7 +3194,7 @@ var c = class {
|
|
|
3188
3194
|
#t;
|
|
3189
3195
|
#n;
|
|
3190
3196
|
#r = false;
|
|
3191
|
-
#e =
|
|
3197
|
+
#e = undefined;
|
|
3192
3198
|
constructor(e, t) {
|
|
3193
3199
|
this.#t = e, this.#n = t;
|
|
3194
3200
|
}
|
|
@@ -3204,15 +3210,15 @@ var c = class {
|
|
|
3204
3210
|
if (this.#r)
|
|
3205
3211
|
return {
|
|
3206
3212
|
done: true,
|
|
3207
|
-
value:
|
|
3213
|
+
value: undefined
|
|
3208
3214
|
};
|
|
3209
3215
|
let e;
|
|
3210
3216
|
try {
|
|
3211
3217
|
e = await this.#t.read();
|
|
3212
3218
|
} catch (t) {
|
|
3213
|
-
throw this.#e =
|
|
3219
|
+
throw this.#e = undefined, this.#r = true, this.#t.releaseLock(), t;
|
|
3214
3220
|
}
|
|
3215
|
-
return e.done && (this.#e =
|
|
3221
|
+
return e.done && (this.#e = undefined, this.#r = true, this.#t.releaseLock()), e;
|
|
3216
3222
|
}
|
|
3217
3223
|
async #i(e) {
|
|
3218
3224
|
if (this.#r)
|
|
@@ -3269,7 +3275,7 @@ init_cjs_shims();
|
|
|
3269
3275
|
|
|
3270
3276
|
// ../../node_modules/.pnpm/get-stream@9.0.1/node_modules/get-stream/source/stream.js
|
|
3271
3277
|
var getAsyncIterable = (stream) => {
|
|
3272
|
-
if (isReadableStream(stream, { checkOpen: false }) && nodeImports.on !==
|
|
3278
|
+
if (isReadableStream(stream, { checkOpen: false }) && nodeImports.on !== undefined) {
|
|
3273
3279
|
return getStreamIterable(stream);
|
|
3274
3280
|
}
|
|
3275
3281
|
if (typeof stream?.[Symbol.asyncIterator] === "function") {
|
|
@@ -3290,7 +3296,7 @@ var getStreamIterable = async function* (stream) {
|
|
|
3290
3296
|
yield chunk;
|
|
3291
3297
|
}
|
|
3292
3298
|
} catch (error) {
|
|
3293
|
-
if (state.error !==
|
|
3299
|
+
if (state.error !== undefined) {
|
|
3294
3300
|
throw state.error;
|
|
3295
3301
|
} else if (!controller.signal.aborted) {
|
|
3296
3302
|
throw error;
|
|
@@ -3358,7 +3364,7 @@ var getStreamContents = async (stream, { init, convertChunk, getSize, truncateCh
|
|
|
3358
3364
|
};
|
|
3359
3365
|
var appendFinalChunk = ({ state, getSize, truncateChunk, addChunk, getFinalChunk, maxBuffer }) => {
|
|
3360
3366
|
const convertedChunk = getFinalChunk(state);
|
|
3361
|
-
if (convertedChunk !==
|
|
3367
|
+
if (convertedChunk !== undefined) {
|
|
3362
3368
|
appendChunk({
|
|
3363
3369
|
convertedChunk,
|
|
3364
3370
|
state,
|
|
@@ -3377,7 +3383,7 @@ var appendChunk = ({ convertedChunk, state, getSize, truncateChunk, addChunk, ma
|
|
|
3377
3383
|
return;
|
|
3378
3384
|
}
|
|
3379
3385
|
const truncatedChunk = truncateChunk(convertedChunk, maxBuffer - state.length);
|
|
3380
|
-
if (truncatedChunk !==
|
|
3386
|
+
if (truncatedChunk !== undefined) {
|
|
3381
3387
|
addNewChunk(truncatedChunk, state, addChunk, maxBuffer);
|
|
3382
3388
|
}
|
|
3383
3389
|
throw new MaxBufferError();
|
|
@@ -3420,7 +3426,7 @@ var MaxBufferError = class extends Error {
|
|
|
3420
3426
|
// ../../node_modules/.pnpm/get-stream@9.0.1/node_modules/get-stream/source/utils.js
|
|
3421
3427
|
init_cjs_shims();
|
|
3422
3428
|
var identity2 = (value) => value;
|
|
3423
|
-
var noop = () =>
|
|
3429
|
+
var noop = () => undefined;
|
|
3424
3430
|
var getContentsProperty = ({ contents }) => contents;
|
|
3425
3431
|
var throwObjectStream = (chunk) => {
|
|
3426
3432
|
throw new Error(`Streams in object mode are not supported: ${String(chunk)}`);
|
|
@@ -3519,7 +3525,7 @@ var addStringChunk = (convertedChunk, { contents }) => contents + convertedChunk
|
|
|
3519
3525
|
var truncateStringChunk = (convertedChunk, chunkSize) => convertedChunk.slice(0, chunkSize);
|
|
3520
3526
|
var getFinalStringChunk = ({ textDecoder: textDecoder2 }) => {
|
|
3521
3527
|
const finalChunk = textDecoder2.decode();
|
|
3522
|
-
return finalChunk === "" ?
|
|
3528
|
+
return finalChunk === "" ? undefined : finalChunk;
|
|
3523
3529
|
};
|
|
3524
3530
|
var stringMethods = {
|
|
3525
3531
|
init: initString,
|
|
@@ -3579,7 +3585,7 @@ var getMaxBufferMessage = (error, maxBuffer) => {
|
|
|
3579
3585
|
return `Command's ${streamName} was larger than ${threshold} ${unit}`;
|
|
3580
3586
|
};
|
|
3581
3587
|
var getMaxBufferInfo = (error, maxBuffer) => {
|
|
3582
|
-
if (error?.maxBufferInfo ===
|
|
3588
|
+
if (error?.maxBufferInfo === undefined) {
|
|
3583
3589
|
return { streamName: "output", threshold: maxBuffer[1], unit: "bytes" };
|
|
3584
3590
|
}
|
|
3585
3591
|
const { maxBufferInfo: { fdNumber, unit } } = error;
|
|
@@ -3639,10 +3645,10 @@ var createMessages = ({
|
|
|
3639
3645
|
killSignal
|
|
3640
3646
|
});
|
|
3641
3647
|
const originalMessage = getOriginalMessage(originalError, cwd);
|
|
3642
|
-
const suffix = originalMessage ===
|
|
3648
|
+
const suffix = originalMessage === undefined ? "" : `
|
|
3643
3649
|
${originalMessage}`;
|
|
3644
3650
|
const shortMessage = `${prefix}: ${escapedCommand}${suffix}`;
|
|
3645
|
-
const messageStdio = all ===
|
|
3651
|
+
const messageStdio = all === undefined ? [stdio[2], stdio[1]] : [all];
|
|
3646
3652
|
const message = [
|
|
3647
3653
|
shortMessage,
|
|
3648
3654
|
...messageStdio,
|
|
@@ -3672,7 +3678,7 @@ var getErrorPrefix = ({
|
|
|
3672
3678
|
return `Command timed out after ${timeout} milliseconds${forcefulSuffix}`;
|
|
3673
3679
|
}
|
|
3674
3680
|
if (isGracefullyCanceled) {
|
|
3675
|
-
if (signal ===
|
|
3681
|
+
if (signal === undefined) {
|
|
3676
3682
|
return `Command was gracefully canceled with exit code ${exitCode}`;
|
|
3677
3683
|
}
|
|
3678
3684
|
return isForcefullyTerminated ? `Command was gracefully canceled${forcefulSuffix}` : `Command was gracefully canceled with ${signal} (${signalDescription})`;
|
|
@@ -3683,16 +3689,16 @@ var getErrorPrefix = ({
|
|
|
3683
3689
|
if (isMaxBuffer) {
|
|
3684
3690
|
return `${getMaxBufferMessage(originalError, maxBuffer)}${forcefulSuffix}`;
|
|
3685
3691
|
}
|
|
3686
|
-
if (errorCode !==
|
|
3692
|
+
if (errorCode !== undefined) {
|
|
3687
3693
|
return `Command failed with ${errorCode}${forcefulSuffix}`;
|
|
3688
3694
|
}
|
|
3689
3695
|
if (isForcefullyTerminated) {
|
|
3690
3696
|
return `Command was killed with ${killSignal} (${getSignalDescription(killSignal)})${forcefulSuffix}`;
|
|
3691
3697
|
}
|
|
3692
|
-
if (signal !==
|
|
3698
|
+
if (signal !== undefined) {
|
|
3693
3699
|
return `Command was killed with ${signal} (${signalDescription})`;
|
|
3694
3700
|
}
|
|
3695
|
-
if (exitCode !==
|
|
3701
|
+
if (exitCode !== undefined) {
|
|
3696
3702
|
return `Command failed with exit code ${exitCode}`;
|
|
3697
3703
|
}
|
|
3698
3704
|
return "Command failed";
|
|
@@ -3704,7 +3710,7 @@ var getOriginalMessage = (originalError, cwd) => {
|
|
|
3704
3710
|
}
|
|
3705
3711
|
const originalMessage = isExecaError(originalError) ? originalError.originalMessage : String(originalError?.message ?? originalError);
|
|
3706
3712
|
const escapedOriginalMessage = escapeLines(fixCwdError(originalMessage, cwd));
|
|
3707
|
-
return escapedOriginalMessage === "" ?
|
|
3713
|
+
return escapedOriginalMessage === "" ? undefined : escapedOriginalMessage;
|
|
3708
3714
|
};
|
|
3709
3715
|
var serializeIpcMessage = (ipcMessage) => typeof ipcMessage === "string" ? ipcMessage : util.inspect(ipcMessage);
|
|
3710
3716
|
var serializeMessagePart = (messagePart) => Array.isArray(messagePart) ? messagePart.map((messageItem) => stripFinalNewline(serializeMessageItem(messageItem))).filter(Boolean).join("\n") : serializeMessageItem(messagePart);
|
|
@@ -3869,7 +3875,7 @@ var getErrorProperties = ({
|
|
|
3869
3875
|
timedOut,
|
|
3870
3876
|
isCanceled,
|
|
3871
3877
|
isGracefullyCanceled,
|
|
3872
|
-
isTerminated: signal !==
|
|
3878
|
+
isTerminated: signal !== undefined,
|
|
3873
3879
|
isMaxBuffer,
|
|
3874
3880
|
isForcefullyTerminated,
|
|
3875
3881
|
exitCode,
|
|
@@ -3883,11 +3889,11 @@ var getErrorProperties = ({
|
|
|
3883
3889
|
ipcOutput,
|
|
3884
3890
|
pipedFrom: []
|
|
3885
3891
|
});
|
|
3886
|
-
var omitUndefinedProperties = (result) => Object.fromEntries(Object.entries(result).filter(([, value]) => value !==
|
|
3892
|
+
var omitUndefinedProperties = (result) => Object.fromEntries(Object.entries(result).filter(([, value]) => value !== undefined));
|
|
3887
3893
|
var normalizeExitPayload = (rawExitCode, rawSignal) => {
|
|
3888
|
-
const exitCode = rawExitCode === null ?
|
|
3889
|
-
const signal = rawSignal === null ?
|
|
3890
|
-
const signalDescription = signal ===
|
|
3894
|
+
const exitCode = rawExitCode === null ? undefined : rawExitCode;
|
|
3895
|
+
const signal = rawSignal === null ? undefined : rawSignal;
|
|
3896
|
+
const signalDescription = signal === undefined ? undefined : getSignalDescription(rawSignal);
|
|
3891
3897
|
return { exitCode, signal, signalDescription };
|
|
3892
3898
|
};
|
|
3893
3899
|
|
|
@@ -4149,12 +4155,12 @@ var validateNonGeneratorType = ({ final, binary, objectMode }, optionName, typeN
|
|
|
4149
4155
|
checkBooleanOption(objectMode, `${optionName}.objectMode`);
|
|
4150
4156
|
};
|
|
4151
4157
|
var checkUndefinedOption = (value, optionName, typeName) => {
|
|
4152
|
-
if (value !==
|
|
4158
|
+
if (value !== undefined) {
|
|
4153
4159
|
throw new TypeError(`The \`${optionName}\` option can only be defined when using a generator, not a ${typeName}.`);
|
|
4154
4160
|
}
|
|
4155
4161
|
};
|
|
4156
4162
|
var getGeneratorObjectType = ({ transform, final, binary, objectMode }, optionName) => {
|
|
4157
|
-
if (transform !==
|
|
4163
|
+
if (transform !== undefined && !isGenerator(transform)) {
|
|
4158
4164
|
throw new TypeError(`The \`${optionName}.transform\` option must be a generator, a Duplex stream or a web TransformStream.`);
|
|
4159
4165
|
}
|
|
4160
4166
|
if (isDuplexStream(final, { checkOpen: false })) {
|
|
@@ -4163,7 +4169,7 @@ var getGeneratorObjectType = ({ transform, final, binary, objectMode }, optionNa
|
|
|
4163
4169
|
if (isTransformStream(final)) {
|
|
4164
4170
|
throw new TypeError(`The \`${optionName}.final\` option must not be a web TransformStream.`);
|
|
4165
4171
|
}
|
|
4166
|
-
if (final !==
|
|
4172
|
+
if (final !== undefined && !isGenerator(final)) {
|
|
4167
4173
|
throw new TypeError(`The \`${optionName}.final\` option must be a generator.`);
|
|
4168
4174
|
}
|
|
4169
4175
|
checkBooleanOption(binary, `${optionName}.binary`);
|
|
@@ -4171,14 +4177,14 @@ var getGeneratorObjectType = ({ transform, final, binary, objectMode }, optionNa
|
|
|
4171
4177
|
return isAsyncGenerator(transform) || isAsyncGenerator(final) ? "asyncGenerator" : "generator";
|
|
4172
4178
|
};
|
|
4173
4179
|
var checkBooleanOption = (value, optionName) => {
|
|
4174
|
-
if (value !==
|
|
4180
|
+
if (value !== undefined && typeof value !== "boolean") {
|
|
4175
4181
|
throw new TypeError(`The \`${optionName}\` option must use a boolean.`);
|
|
4176
4182
|
}
|
|
4177
4183
|
};
|
|
4178
4184
|
var isGenerator = (value) => isAsyncGenerator(value) || isSyncGenerator(value);
|
|
4179
4185
|
var isAsyncGenerator = (value) => Object.prototype.toString.call(value) === "[object AsyncGeneratorFunction]";
|
|
4180
4186
|
var isSyncGenerator = (value) => Object.prototype.toString.call(value) === "[object GeneratorFunction]";
|
|
4181
|
-
var isTransformOptions = (value) => isPlainObject(value) && (value.transform !==
|
|
4187
|
+
var isTransformOptions = (value) => isPlainObject(value) && (value.transform !== undefined || value.final !== undefined);
|
|
4182
4188
|
var isUrl = (value) => Object.prototype.toString.call(value) === "[object URL]";
|
|
4183
4189
|
var isRegularUrl = (value) => isUrl(value) && value.protocol !== "file:";
|
|
4184
4190
|
var isFilePathObject = (value) => isPlainObject(value) && Object.keys(value).length > 0 && Object.keys(value).every((key) => FILE_PATH_KEYS.has(key)) && isFilePathString(value.file);
|
|
@@ -4230,7 +4236,7 @@ var getInputObjectModes = (objectMode, index, newTransforms) => {
|
|
|
4230
4236
|
};
|
|
4231
4237
|
var getFdObjectMode = (stdioItems, direction) => {
|
|
4232
4238
|
const lastTransform = stdioItems.findLast(({ type }) => TRANSFORM_TYPES.has(type));
|
|
4233
|
-
if (lastTransform ===
|
|
4239
|
+
if (lastTransform === undefined) {
|
|
4234
4240
|
return false;
|
|
4235
4241
|
}
|
|
4236
4242
|
return direction === "input" ? lastTransform.value.writableObjectMode : lastTransform.value.readableObjectMode;
|
|
@@ -4341,7 +4347,7 @@ var getStreamDirection = (stdioItems, fdNumber, optionName) => {
|
|
|
4341
4347
|
};
|
|
4342
4348
|
var getStdioItemDirection = ({ type, value }, fdNumber) => KNOWN_DIRECTIONS[fdNumber] ?? guessStreamDirection[type](value);
|
|
4343
4349
|
var KNOWN_DIRECTIONS = ["input", "output", "output"];
|
|
4344
|
-
var anyDirection = () =>
|
|
4350
|
+
var anyDirection = () => undefined;
|
|
4345
4351
|
var alwaysInput = () => "input";
|
|
4346
4352
|
var guessStreamDirection = {
|
|
4347
4353
|
generator: anyDirection,
|
|
@@ -4356,13 +4362,13 @@ var guessStreamDirection = {
|
|
|
4356
4362
|
if (!isReadableStream(value, { checkOpen: false })) {
|
|
4357
4363
|
return "output";
|
|
4358
4364
|
}
|
|
4359
|
-
return isWritableStream(value, { checkOpen: false }) ?
|
|
4365
|
+
return isWritableStream(value, { checkOpen: false }) ? undefined : "input";
|
|
4360
4366
|
},
|
|
4361
4367
|
webTransform: anyDirection,
|
|
4362
4368
|
duplex: anyDirection,
|
|
4363
4369
|
native(value) {
|
|
4364
4370
|
const standardStreamDirection = getStandardStreamDirection(value);
|
|
4365
|
-
if (standardStreamDirection !==
|
|
4371
|
+
if (standardStreamDirection !== undefined) {
|
|
4366
4372
|
return standardStreamDirection;
|
|
4367
4373
|
}
|
|
4368
4374
|
if (isStream(value, { checkOpen: false })) {
|
|
@@ -4393,7 +4399,7 @@ var normalizeStdioOption = ({ stdio, ipc, buffer, ...options }, verboseInfo, isS
|
|
|
4393
4399
|
return isSync ? normalizeStdioSync(stdioArray, buffer, verboseInfo) : normalizeIpcStdioArray(stdioArray, ipc);
|
|
4394
4400
|
};
|
|
4395
4401
|
var getStdioArray = (stdio, options) => {
|
|
4396
|
-
if (stdio ===
|
|
4402
|
+
if (stdio === undefined) {
|
|
4397
4403
|
return STANDARD_STREAMS_ALIASES.map((alias) => options[alias]);
|
|
4398
4404
|
}
|
|
4399
4405
|
if (hasAlias(options)) {
|
|
@@ -4408,12 +4414,12 @@ var getStdioArray = (stdio, options) => {
|
|
|
4408
4414
|
const length = Math.max(stdio.length, STANDARD_STREAMS_ALIASES.length);
|
|
4409
4415
|
return Array.from({ length }, (_, fdNumber) => stdio[fdNumber]);
|
|
4410
4416
|
};
|
|
4411
|
-
var hasAlias = (options) => STANDARD_STREAMS_ALIASES.some((alias) => options[alias] !==
|
|
4417
|
+
var hasAlias = (options) => STANDARD_STREAMS_ALIASES.some((alias) => options[alias] !== undefined);
|
|
4412
4418
|
var addDefaultValue2 = (stdioOption, fdNumber) => {
|
|
4413
4419
|
if (Array.isArray(stdioOption)) {
|
|
4414
4420
|
return stdioOption.map((item) => addDefaultValue2(item, fdNumber));
|
|
4415
4421
|
}
|
|
4416
|
-
if (stdioOption === null || stdioOption ===
|
|
4422
|
+
if (stdioOption === null || stdioOption === undefined) {
|
|
4417
4423
|
return fdNumber >= STANDARD_STREAMS_ALIASES.length ? "ignore" : "pipe";
|
|
4418
4424
|
}
|
|
4419
4425
|
return stdioOption;
|
|
@@ -4436,7 +4442,7 @@ var handleNativeStreamSync = ({ stdioItem, stdioItem: { value, optionName }, fdN
|
|
|
4436
4442
|
fdNumber,
|
|
4437
4443
|
direction
|
|
4438
4444
|
});
|
|
4439
|
-
if (targetFd !==
|
|
4445
|
+
if (targetFd !== undefined) {
|
|
4440
4446
|
return targetFd;
|
|
4441
4447
|
}
|
|
4442
4448
|
if (isStream(value, { checkOpen: false })) {
|
|
@@ -4446,7 +4452,7 @@ var handleNativeStreamSync = ({ stdioItem, stdioItem: { value, optionName }, fdN
|
|
|
4446
4452
|
};
|
|
4447
4453
|
var getTargetFd = ({ value, optionName, fdNumber, direction }) => {
|
|
4448
4454
|
const targetFdNumber = getTargetFdNumber(value, fdNumber);
|
|
4449
|
-
if (targetFdNumber ===
|
|
4455
|
+
if (targetFdNumber === undefined) {
|
|
4450
4456
|
return;
|
|
4451
4457
|
}
|
|
4452
4458
|
if (direction === "output") {
|
|
@@ -4483,7 +4489,7 @@ var handleNativeStreamAsync = ({ stdioItem, stdioItem: { value, optionName }, fd
|
|
|
4483
4489
|
};
|
|
4484
4490
|
var getStandardStream = (fdNumber, value, optionName) => {
|
|
4485
4491
|
const standardStream = STANDARD_STREAMS[fdNumber];
|
|
4486
|
-
if (standardStream ===
|
|
4492
|
+
if (standardStream === undefined) {
|
|
4487
4493
|
throw new TypeError(`The \`${optionName}: ${value}\` option is invalid: no such standard stream.`);
|
|
4488
4494
|
}
|
|
4489
4495
|
return standardStream;
|
|
@@ -4495,7 +4501,7 @@ var handleInputOptions = ({ input, inputFile }, fdNumber) => fdNumber === 0 ? [
|
|
|
4495
4501
|
...handleInputOption(input),
|
|
4496
4502
|
...handleInputFileOption(inputFile)
|
|
4497
4503
|
] : [];
|
|
4498
|
-
var handleInputOption = (input) => input ===
|
|
4504
|
+
var handleInputOption = (input) => input === undefined ? [] : [{
|
|
4499
4505
|
type: getInputType(input),
|
|
4500
4506
|
value: input,
|
|
4501
4507
|
optionName: "input"
|
|
@@ -4512,7 +4518,7 @@ var getInputType = (input) => {
|
|
|
4512
4518
|
}
|
|
4513
4519
|
throw new Error("The `input` option must be a string, a Uint8Array or a Node.js Readable stream.");
|
|
4514
4520
|
};
|
|
4515
|
-
var handleInputFileOption = (inputFile) => inputFile ===
|
|
4521
|
+
var handleInputFileOption = (inputFile) => inputFile === undefined ? [] : [{
|
|
4516
4522
|
...getInputFileType(inputFile),
|
|
4517
4523
|
optionName: "inputFile"
|
|
4518
4524
|
}];
|
|
@@ -4581,7 +4587,7 @@ var getDuplicateStreamInstance = ({ otherStdioItems, type, value, optionName, di
|
|
|
4581
4587
|
}
|
|
4582
4588
|
const differentStdioItem = duplicateStdioItems.find((stdioItem) => stdioItem.direction !== direction);
|
|
4583
4589
|
throwOnDuplicateStream(differentStdioItem, optionName, type);
|
|
4584
|
-
return direction === "output" ? duplicateStdioItems[0].stream :
|
|
4590
|
+
return direction === "output" ? duplicateStdioItems[0].stream : undefined;
|
|
4585
4591
|
};
|
|
4586
4592
|
var hasSameValue = ({ type, value }, secondValue) => {
|
|
4587
4593
|
if (type === "filePath") {
|
|
@@ -4597,7 +4603,7 @@ var validateDuplicateTransform = ({ otherStdioItems, type, value, optionName })
|
|
|
4597
4603
|
throwOnDuplicateStream(duplicateStdioItem, optionName, type);
|
|
4598
4604
|
};
|
|
4599
4605
|
var throwOnDuplicateStream = (stdioItem, optionName, type) => {
|
|
4600
|
-
if (stdioItem !==
|
|
4606
|
+
if (stdioItem !== undefined) {
|
|
4601
4607
|
throw new TypeError(`The \`${stdioItem.optionName}\` and \`${optionName}\` options must not target ${TYPE_TO_MESSAGE[type]} that is the same.`);
|
|
4602
4608
|
}
|
|
4603
4609
|
};
|
|
@@ -4691,7 +4697,7 @@ var validateFileObjectMode = (stdioItems, objectMode) => {
|
|
|
4691
4697
|
return;
|
|
4692
4698
|
}
|
|
4693
4699
|
const fileStdioItem = stdioItems.find(({ type }) => FILE_TYPES.has(type));
|
|
4694
|
-
if (fileStdioItem !==
|
|
4700
|
+
if (fileStdioItem !== undefined) {
|
|
4695
4701
|
throw new TypeError(`The \`${fileStdioItem.optionName}\` option cannot use both files and transforms in objectMode.`);
|
|
4696
4702
|
}
|
|
4697
4703
|
};
|
|
@@ -4737,7 +4743,7 @@ var addStreamProperties = ({ stdioItem, addProperties: addProperties3, direction
|
|
|
4737
4743
|
fileDescriptors,
|
|
4738
4744
|
isSync
|
|
4739
4745
|
});
|
|
4740
|
-
if (duplicateStream !==
|
|
4746
|
+
if (duplicateStream !== undefined) {
|
|
4741
4747
|
return { ...stdioItem, stream: duplicateStream };
|
|
4742
4748
|
}
|
|
4743
4749
|
return {
|
|
@@ -4748,7 +4754,7 @@ var addStreamProperties = ({ stdioItem, addProperties: addProperties3, direction
|
|
|
4748
4754
|
var cleanupCustomStreams = (fileDescriptors) => {
|
|
4749
4755
|
for (const { stdioItems } of fileDescriptors) {
|
|
4750
4756
|
for (const { stream } of stdioItems) {
|
|
4751
|
-
if (stream !==
|
|
4757
|
+
if (stream !== undefined && !isStandardStream(stream)) {
|
|
4752
4758
|
stream.destroy();
|
|
4753
4759
|
}
|
|
4754
4760
|
}
|
|
@@ -4810,7 +4816,7 @@ var addPropertiesSync = {
|
|
|
4810
4816
|
|
|
4811
4817
|
// ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/io/strip-newline.js
|
|
4812
4818
|
init_cjs_shims();
|
|
4813
|
-
var stripNewline = (value, { stripFinalNewline: stripFinalNewline2 }, fdNumber) => getStripFinalNewline(stripFinalNewline2, fdNumber) && value !==
|
|
4819
|
+
var stripNewline = (value, { stripFinalNewline: stripFinalNewline2 }, fdNumber) => getStripFinalNewline(stripFinalNewline2, fdNumber) && value !== undefined && !Array.isArray(value) ? stripFinalNewline(value) : value;
|
|
4814
4820
|
var getStripFinalNewline = (stripFinalNewline2, fdNumber) => fdNumber === "all" ? stripFinalNewline2[1] || stripFinalNewline2[2] : stripFinalNewline2[fdNumber];
|
|
4815
4821
|
|
|
4816
4822
|
// ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/io/input-sync.js
|
|
@@ -4821,7 +4827,7 @@ init_cjs_shims();
|
|
|
4821
4827
|
|
|
4822
4828
|
// ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/transform/split.js
|
|
4823
4829
|
init_cjs_shims();
|
|
4824
|
-
var getSplitLinesGenerator = (binary, preserveNewlines, skipped, state) => binary || skipped ?
|
|
4830
|
+
var getSplitLinesGenerator = (binary, preserveNewlines, skipped, state) => binary || skipped ? undefined : initializeSplitLines(preserveNewlines, state);
|
|
4825
4831
|
var splitLinesSync = (chunk, preserveNewlines, objectMode) => objectMode ? chunk.flatMap((item) => splitLinesItemSync(item, preserveNewlines)) : splitLinesItemSync(chunk, preserveNewlines);
|
|
4826
4832
|
var splitLinesItemSync = (chunk, preserveNewlines) => {
|
|
4827
4833
|
const { transform, final } = initializeSplitLines(preserveNewlines, {});
|
|
@@ -4830,8 +4836,8 @@ var splitLinesItemSync = (chunk, preserveNewlines) => {
|
|
|
4830
4836
|
var initializeSplitLines = (preserveNewlines, state) => {
|
|
4831
4837
|
state.previousChunks = "";
|
|
4832
4838
|
return {
|
|
4833
|
-
transform: splitGenerator.bind(
|
|
4834
|
-
final: linesFinal.bind(
|
|
4839
|
+
transform: splitGenerator.bind(undefined, state, preserveNewlines),
|
|
4840
|
+
final: linesFinal.bind(undefined, state)
|
|
4835
4841
|
};
|
|
4836
4842
|
};
|
|
4837
4843
|
var splitGenerator = function* (state, preserveNewlines, chunk) {
|
|
@@ -4870,7 +4876,7 @@ var linesFinal = function* ({ previousChunks }) {
|
|
|
4870
4876
|
yield previousChunks;
|
|
4871
4877
|
}
|
|
4872
4878
|
};
|
|
4873
|
-
var getAppendNewlineGenerator = ({ binary, preserveNewlines, readableObjectMode, state }) => binary || preserveNewlines || readableObjectMode ?
|
|
4879
|
+
var getAppendNewlineGenerator = ({ binary, preserveNewlines, readableObjectMode, state }) => binary || preserveNewlines || readableObjectMode ? undefined : { transform: appendNewlineGenerator.bind(undefined, state) };
|
|
4874
4880
|
var appendNewlineGenerator = function* ({ isWindowsNewline = false }, chunk) {
|
|
4875
4881
|
const { unixNewline, windowsNewline, LF: LF2, concatBytes } = typeof chunk === "string" ? linesStringInfo : linesUint8ArrayInfo;
|
|
4876
4882
|
if (chunk.at(-1) === LF2) {
|
|
@@ -4902,14 +4908,14 @@ var linesUint8ArrayInfo = {
|
|
|
4902
4908
|
|
|
4903
4909
|
// ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/transform/validate.js
|
|
4904
4910
|
init_cjs_shims();
|
|
4905
|
-
var getValidateTransformInput = (writableObjectMode, optionName) => writableObjectMode ?
|
|
4911
|
+
var getValidateTransformInput = (writableObjectMode, optionName) => writableObjectMode ? undefined : validateStringTransformInput.bind(undefined, optionName);
|
|
4906
4912
|
var validateStringTransformInput = function* (optionName, chunk) {
|
|
4907
4913
|
if (typeof chunk !== "string" && !isUint8Array(chunk) && !buffer.Buffer.isBuffer(chunk)) {
|
|
4908
4914
|
throw new TypeError(`The \`${optionName}\` option's transform must use "objectMode: true" to receive as input: ${typeof chunk}.`);
|
|
4909
4915
|
}
|
|
4910
4916
|
yield chunk;
|
|
4911
4917
|
};
|
|
4912
|
-
var getValidateTransformReturn = (readableObjectMode, optionName) => readableObjectMode ? validateObjectTransformReturn.bind(
|
|
4918
|
+
var getValidateTransformReturn = (readableObjectMode, optionName) => readableObjectMode ? validateObjectTransformReturn.bind(undefined, optionName) : validateStringTransformReturn.bind(undefined, optionName);
|
|
4913
4919
|
var validateObjectTransformReturn = function* (optionName, chunk) {
|
|
4914
4920
|
validateEmptyReturn(optionName, chunk);
|
|
4915
4921
|
yield chunk;
|
|
@@ -4922,7 +4928,7 @@ var validateStringTransformReturn = function* (optionName, chunk) {
|
|
|
4922
4928
|
yield chunk;
|
|
4923
4929
|
};
|
|
4924
4930
|
var validateEmptyReturn = (optionName, chunk) => {
|
|
4925
|
-
if (chunk === null || chunk ===
|
|
4931
|
+
if (chunk === null || chunk === undefined) {
|
|
4926
4932
|
throw new TypeError(`The \`${optionName}\` option's function must not call \`yield ${chunk}\`.
|
|
4927
4933
|
Instead, \`yield\` should either be called with a value, or not be called at all. For example:
|
|
4928
4934
|
if (condition) { yield value; }`);
|
|
@@ -4936,12 +4942,12 @@ var getEncodingTransformGenerator = (binary, encoding, skipped) => {
|
|
|
4936
4942
|
return;
|
|
4937
4943
|
}
|
|
4938
4944
|
if (binary) {
|
|
4939
|
-
return { transform: encodingUint8ArrayGenerator.bind(
|
|
4945
|
+
return { transform: encodingUint8ArrayGenerator.bind(undefined, new TextEncoder()) };
|
|
4940
4946
|
}
|
|
4941
4947
|
const stringDecoder = new string_decoder.StringDecoder(encoding);
|
|
4942
4948
|
return {
|
|
4943
|
-
transform: encodingStringGenerator.bind(
|
|
4944
|
-
final: encodingStringFinal.bind(
|
|
4949
|
+
transform: encodingStringGenerator.bind(undefined, stringDecoder),
|
|
4950
|
+
final: encodingStringFinal.bind(undefined, stringDecoder)
|
|
4945
4951
|
};
|
|
4946
4952
|
};
|
|
4947
4953
|
var encodingUint8ArrayGenerator = function* (textEncoder3, chunk) {
|
|
@@ -4991,7 +4997,7 @@ var finalChunks = async function* (generators) {
|
|
|
4991
4997
|
}
|
|
4992
4998
|
};
|
|
4993
4999
|
var generatorFinalChunks = async function* (final, index, generators) {
|
|
4994
|
-
if (final ===
|
|
5000
|
+
if (final === undefined) {
|
|
4995
5001
|
return;
|
|
4996
5002
|
}
|
|
4997
5003
|
for await (const finalChunk of final()) {
|
|
@@ -4999,7 +5005,7 @@ var generatorFinalChunks = async function* (final, index, generators) {
|
|
|
4999
5005
|
}
|
|
5000
5006
|
};
|
|
5001
5007
|
var destroyTransform = util.callbackify(async ({ currentIterable }, error) => {
|
|
5002
|
-
if (currentIterable !==
|
|
5008
|
+
if (currentIterable !== undefined) {
|
|
5003
5009
|
await (error ? currentIterable.throw(error) : currentIterable.return());
|
|
5004
5010
|
return;
|
|
5005
5011
|
}
|
|
@@ -5043,7 +5049,7 @@ var finalChunksSync = function* (generators) {
|
|
|
5043
5049
|
}
|
|
5044
5050
|
};
|
|
5045
5051
|
var generatorFinalChunksSync = function* (final, index, generators) {
|
|
5046
|
-
if (final ===
|
|
5052
|
+
if (final === undefined) {
|
|
5047
5053
|
return;
|
|
5048
5054
|
}
|
|
5049
5055
|
for (const finalChunk of final()) {
|
|
@@ -5064,9 +5070,9 @@ var generatorToStream = ({
|
|
|
5064
5070
|
const generators = addInternalGenerators(value, encoding, optionName);
|
|
5065
5071
|
const transformAsync = isAsyncGenerator(transform);
|
|
5066
5072
|
const finalAsync = isAsyncGenerator(final);
|
|
5067
|
-
const transformMethod = transformAsync ? pushChunks.bind(
|
|
5068
|
-
const finalMethod = transformAsync || finalAsync ? pushChunks.bind(
|
|
5069
|
-
const destroyMethod = transformAsync || finalAsync ? destroyTransform.bind(
|
|
5073
|
+
const transformMethod = transformAsync ? pushChunks.bind(undefined, transformChunk, state) : pushChunksSync.bind(undefined, transformChunkSync);
|
|
5074
|
+
const finalMethod = transformAsync || finalAsync ? pushChunks.bind(undefined, finalChunks, state) : pushChunksSync.bind(undefined, finalChunksSync);
|
|
5075
|
+
const destroyMethod = transformAsync || finalAsync ? destroyTransform.bind(undefined, state) : undefined;
|
|
5070
5076
|
const stream$1 = new stream.Transform({
|
|
5071
5077
|
writableObjectMode,
|
|
5072
5078
|
writableHighWaterMark: stream.getDefaultHighWaterMark(writableObjectMode),
|
|
@@ -5117,7 +5123,7 @@ var addInputOptionsSync = (fileDescriptors, options) => {
|
|
|
5117
5123
|
var getInputFdNumbers = (fileDescriptors) => new Set(Object.entries(fileDescriptors).filter(([, { direction }]) => direction === "input").map(([fdNumber]) => Number(fdNumber)));
|
|
5118
5124
|
var addInputOptionSync = (fileDescriptors, fdNumber, options) => {
|
|
5119
5125
|
const { stdioItems } = fileDescriptors[fdNumber];
|
|
5120
|
-
const allStdioItems = stdioItems.filter(({ contents }) => contents !==
|
|
5126
|
+
const allStdioItems = stdioItems.filter(({ contents }) => contents !== undefined);
|
|
5121
5127
|
if (allStdioItems.length === 0) {
|
|
5122
5128
|
return;
|
|
5123
5129
|
}
|
|
@@ -5136,7 +5142,7 @@ var applySingleInputGeneratorsSync = (contents, stdioItems) => {
|
|
|
5136
5142
|
};
|
|
5137
5143
|
var validateSerializable = (newContents) => {
|
|
5138
5144
|
const invalidItem = newContents.find((item) => typeof item !== "string" && !isUint8Array(item));
|
|
5139
|
-
if (invalidItem !==
|
|
5145
|
+
if (invalidItem !== undefined) {
|
|
5140
5146
|
throw new TypeError(`The \`stdin\` option is invalid: when passing objects as input, a transform must be used to serialize them to strings or Uint8Arrays: ${invalidItem}.`);
|
|
5141
5147
|
}
|
|
5142
5148
|
};
|
|
@@ -5215,7 +5221,7 @@ var transformOutputResultSync = ({ result, fileDescriptors, fdNumber, state, out
|
|
|
5215
5221
|
stdioItems,
|
|
5216
5222
|
objectMode
|
|
5217
5223
|
});
|
|
5218
|
-
const returnedResult = buffer[fdNumber] ? finalResult :
|
|
5224
|
+
const returnedResult = buffer[fdNumber] ? finalResult : undefined;
|
|
5219
5225
|
try {
|
|
5220
5226
|
if (state.error === void 0) {
|
|
5221
5227
|
writeToFiles(serializedResult, stdioItems, outputFiles);
|
|
@@ -5281,10 +5287,10 @@ var getAllSync = ([, stdout2, stderr], options) => {
|
|
|
5281
5287
|
if (!options.all) {
|
|
5282
5288
|
return;
|
|
5283
5289
|
}
|
|
5284
|
-
if (stdout2 ===
|
|
5290
|
+
if (stdout2 === undefined) {
|
|
5285
5291
|
return stderr;
|
|
5286
5292
|
}
|
|
5287
|
-
if (stderr ===
|
|
5293
|
+
if (stderr === undefined) {
|
|
5288
5294
|
return stdout2;
|
|
5289
5295
|
}
|
|
5290
5296
|
if (Array.isArray(stdout2)) {
|
|
@@ -5333,7 +5339,7 @@ var waitForSuccessfulExit = async (exitPromise) => {
|
|
|
5333
5339
|
}
|
|
5334
5340
|
return [exitCode, signal];
|
|
5335
5341
|
};
|
|
5336
|
-
var isSubprocessErrorExit = (exitCode, signal) => exitCode ===
|
|
5342
|
+
var isSubprocessErrorExit = (exitCode, signal) => exitCode === undefined && signal === undefined;
|
|
5337
5343
|
var isFailedExit = (exitCode, signal) => exitCode !== 0 || signal !== null;
|
|
5338
5344
|
|
|
5339
5345
|
// ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/resolve/exit-sync.js
|
|
@@ -5350,10 +5356,10 @@ var getExitResultSync = ({ error, status: exitCode, signal, output }, { maxBuffe
|
|
|
5350
5356
|
};
|
|
5351
5357
|
};
|
|
5352
5358
|
var getResultError = (error, exitCode, signal) => {
|
|
5353
|
-
if (error !==
|
|
5359
|
+
if (error !== undefined) {
|
|
5354
5360
|
return error;
|
|
5355
5361
|
}
|
|
5356
|
-
return isFailedExit(exitCode, signal) ? new DiscardedError() :
|
|
5362
|
+
return isFailedExit(exitCode, signal) ? new DiscardedError() : undefined;
|
|
5357
5363
|
};
|
|
5358
5364
|
|
|
5359
5365
|
// ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/methods/main-sync.js
|
|
@@ -5461,7 +5467,7 @@ var runSubprocessSync = ({ file, commandArguments, options, command, escapedComm
|
|
|
5461
5467
|
}
|
|
5462
5468
|
};
|
|
5463
5469
|
var normalizeSpawnSyncOptions = ({ encoding, maxBuffer, ...options }) => ({ ...options, encoding: "buffer", maxBuffer: getMaxBufferSync(maxBuffer) });
|
|
5464
|
-
var getSyncResult = ({ error, exitCode, signal, timedOut, isMaxBuffer, stdio, all, options, command, escapedCommand, startTime }) => error ===
|
|
5470
|
+
var getSyncResult = ({ error, exitCode, signal, timedOut, isMaxBuffer, stdio, all, options, command, escapedCommand, startTime }) => error === undefined ? makeSuccessResult({
|
|
5465
5471
|
command,
|
|
5466
5472
|
escapedCommand,
|
|
5467
5473
|
stdio,
|
|
@@ -5530,7 +5536,7 @@ var getOneMessageAsync = async ({ anyProcess, channel, isSubprocess, filter, ref
|
|
|
5530
5536
|
}
|
|
5531
5537
|
};
|
|
5532
5538
|
var getMessage = async (ipcEmitter, filter, { signal }) => {
|
|
5533
|
-
if (filter ===
|
|
5539
|
+
if (filter === undefined) {
|
|
5534
5540
|
const [message] = await events.once(ipcEmitter, "message", { signal });
|
|
5535
5541
|
return message;
|
|
5536
5542
|
}
|
|
@@ -5635,10 +5641,10 @@ var addIpcMethods = (subprocess, { ipc }) => {
|
|
|
5635
5641
|
var getIpcExport = () => {
|
|
5636
5642
|
const anyProcess = process4__namespace.default;
|
|
5637
5643
|
const isSubprocess = true;
|
|
5638
|
-
const ipc = process4__namespace.default.channel !==
|
|
5644
|
+
const ipc = process4__namespace.default.channel !== undefined;
|
|
5639
5645
|
return {
|
|
5640
5646
|
...getIpcMethods(anyProcess, isSubprocess, ipc),
|
|
5641
|
-
getCancelSignal: getCancelSignal.bind(
|
|
5647
|
+
getCancelSignal: getCancelSignal.bind(undefined, {
|
|
5642
5648
|
anyProcess,
|
|
5643
5649
|
channel: anyProcess.channel,
|
|
5644
5650
|
isSubprocess,
|
|
@@ -5647,19 +5653,19 @@ var getIpcExport = () => {
|
|
|
5647
5653
|
};
|
|
5648
5654
|
};
|
|
5649
5655
|
var getIpcMethods = (anyProcess, isSubprocess, ipc) => ({
|
|
5650
|
-
sendMessage: sendMessage.bind(
|
|
5656
|
+
sendMessage: sendMessage.bind(undefined, {
|
|
5651
5657
|
anyProcess,
|
|
5652
5658
|
channel: anyProcess.channel,
|
|
5653
5659
|
isSubprocess,
|
|
5654
5660
|
ipc
|
|
5655
5661
|
}),
|
|
5656
|
-
getOneMessage: getOneMessage.bind(
|
|
5662
|
+
getOneMessage: getOneMessage.bind(undefined, {
|
|
5657
5663
|
anyProcess,
|
|
5658
5664
|
channel: anyProcess.channel,
|
|
5659
5665
|
isSubprocess,
|
|
5660
5666
|
ipc
|
|
5661
5667
|
}),
|
|
5662
|
-
getEachMessage: getEachMessage.bind(
|
|
5668
|
+
getEachMessage: getEachMessage.bind(undefined, {
|
|
5663
5669
|
anyProcess,
|
|
5664
5670
|
channel: anyProcess.channel,
|
|
5665
5671
|
isSubprocess,
|
|
@@ -5821,7 +5827,7 @@ var MergedStream = class extends stream.PassThrough {
|
|
|
5821
5827
|
return false;
|
|
5822
5828
|
}
|
|
5823
5829
|
const streamPromise = this.#streamPromises.get(stream);
|
|
5824
|
-
if (streamPromise ===
|
|
5830
|
+
if (streamPromise === undefined) {
|
|
5825
5831
|
return false;
|
|
5826
5832
|
}
|
|
5827
5833
|
this.#streamPromises.delete(stream);
|
|
@@ -5840,7 +5846,7 @@ var onMergedStreamFinished = async (passThroughStream, streams, unpipeEvent) =>
|
|
|
5840
5846
|
]);
|
|
5841
5847
|
} finally {
|
|
5842
5848
|
controller.abort();
|
|
5843
|
-
updateMaxListeners(passThroughStream, -
|
|
5849
|
+
updateMaxListeners(passThroughStream, -2);
|
|
5844
5850
|
}
|
|
5845
5851
|
};
|
|
5846
5852
|
var onMergedStreamEnd = async (passThroughStream, { signal }) => {
|
|
@@ -5888,7 +5894,7 @@ var endWhenStreamsDone = async ({ passThroughStream, stream, streams, ended, abo
|
|
|
5888
5894
|
]);
|
|
5889
5895
|
} finally {
|
|
5890
5896
|
controller.abort();
|
|
5891
|
-
updateMaxListeners(passThroughStream, -
|
|
5897
|
+
updateMaxListeners(passThroughStream, -1);
|
|
5892
5898
|
}
|
|
5893
5899
|
if (streams.size > 0 && streams.size === ended.size + aborted2.size) {
|
|
5894
5900
|
if (ended.size === 0 && aborted2.size > 0) {
|
|
@@ -6044,14 +6050,14 @@ var pipeTransform = (subprocess, stream, direction, fdNumber) => {
|
|
|
6044
6050
|
pipeStreams(stream, subprocess.stdio[fdNumber]);
|
|
6045
6051
|
}
|
|
6046
6052
|
const streamProperty = SUBPROCESS_STREAM_PROPERTIES[fdNumber];
|
|
6047
|
-
if (streamProperty !==
|
|
6053
|
+
if (streamProperty !== undefined) {
|
|
6048
6054
|
subprocess[streamProperty] = stream;
|
|
6049
6055
|
}
|
|
6050
6056
|
subprocess.stdio[fdNumber] = stream;
|
|
6051
6057
|
};
|
|
6052
6058
|
var SUBPROCESS_STREAM_PROPERTIES = ["stdin", "stdout", "stderr"];
|
|
6053
6059
|
var pipeStdioItem = ({ subprocess, stream, direction, fdNumber, pipeGroups, controller }) => {
|
|
6054
|
-
if (stream ===
|
|
6060
|
+
if (stream === undefined) {
|
|
6055
6061
|
return;
|
|
6056
6062
|
}
|
|
6057
6063
|
setStandardStreamMaxListeners(stream, controller);
|
|
@@ -6431,7 +6437,7 @@ var handlePipeArgumentsError = ({
|
|
|
6431
6437
|
destinationStream,
|
|
6432
6438
|
destinationError
|
|
6433
6439
|
});
|
|
6434
|
-
if (error !==
|
|
6440
|
+
if (error !== undefined) {
|
|
6435
6441
|
throw createNonCommandError({
|
|
6436
6442
|
error,
|
|
6437
6443
|
fileDescriptors,
|
|
@@ -6441,14 +6447,14 @@ var handlePipeArgumentsError = ({
|
|
|
6441
6447
|
}
|
|
6442
6448
|
};
|
|
6443
6449
|
var getPipeArgumentsError = ({ sourceStream, sourceError, destinationStream, destinationError }) => {
|
|
6444
|
-
if (sourceError !==
|
|
6450
|
+
if (sourceError !== undefined && destinationError !== undefined) {
|
|
6445
6451
|
return destinationError;
|
|
6446
6452
|
}
|
|
6447
|
-
if (destinationError !==
|
|
6453
|
+
if (destinationError !== undefined) {
|
|
6448
6454
|
abortSourceStream(sourceStream);
|
|
6449
6455
|
return destinationError;
|
|
6450
6456
|
}
|
|
6451
|
-
if (sourceError !==
|
|
6457
|
+
if (sourceError !== undefined) {
|
|
6452
6458
|
endDestinationStream(destinationStream);
|
|
6453
6459
|
return sourceError;
|
|
6454
6460
|
}
|
|
@@ -6516,7 +6522,7 @@ var DESTINATION_LISTENERS_PER_PIPE = 1;
|
|
|
6516
6522
|
|
|
6517
6523
|
// ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/pipe/abort.js
|
|
6518
6524
|
init_cjs_shims();
|
|
6519
|
-
var unpipeOnAbort = (unpipeSignal, unpipeContext) => unpipeSignal ===
|
|
6525
|
+
var unpipeOnAbort = (unpipeSignal, unpipeContext) => unpipeSignal === undefined ? [] : [unpipeOnSignalAbort(unpipeSignal, unpipeContext)];
|
|
6520
6526
|
var unpipeOnSignalAbort = async (unpipeSignal, { sourceStream, mergedStream, fileDescriptors, sourceOptions, startTime }) => {
|
|
6521
6527
|
await util.aborted(unpipeSignal, sourceStream);
|
|
6522
6528
|
await mergedStream.remove(sourceStream);
|
|
@@ -6532,14 +6538,14 @@ var unpipeOnSignalAbort = async (unpipeSignal, { sourceStream, mergedStream, fil
|
|
|
6532
6538
|
// ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/pipe/setup.js
|
|
6533
6539
|
var pipeToSubprocess = (sourceInfo, ...pipeArguments) => {
|
|
6534
6540
|
if (isPlainObject(pipeArguments[0])) {
|
|
6535
|
-
return pipeToSubprocess.bind(
|
|
6541
|
+
return pipeToSubprocess.bind(undefined, {
|
|
6536
6542
|
...sourceInfo,
|
|
6537
6543
|
boundOptions: { ...sourceInfo.boundOptions, ...pipeArguments[0] }
|
|
6538
6544
|
});
|
|
6539
6545
|
}
|
|
6540
6546
|
const { destination, ...normalizedInfo } = normalizePipeArguments(sourceInfo, ...pipeArguments);
|
|
6541
6547
|
const promise = handlePipePromise({ ...normalizedInfo, destination });
|
|
6542
|
-
promise.pipe = pipeToSubprocess.bind(
|
|
6548
|
+
promise.pipe = pipeToSubprocess.bind(undefined, {
|
|
6543
6549
|
...sourceInfo,
|
|
6544
6550
|
source: destination,
|
|
6545
6551
|
sourcePromise: promise,
|
|
@@ -6875,7 +6881,7 @@ var waitForSubprocessStream = async ({ stream, fdNumber, encoding, buffer, maxBu
|
|
|
6875
6881
|
};
|
|
6876
6882
|
|
|
6877
6883
|
// ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/resolve/all-async.js
|
|
6878
|
-
var makeAllStream = ({ stdout: stdout2, stderr }, { all }) => all && (stdout2 || stderr) ? mergeStreams([stdout2, stderr].filter(Boolean)) :
|
|
6884
|
+
var makeAllStream = ({ stdout: stdout2, stderr }, { all }) => all && (stdout2 || stderr) ? mergeStreams([stdout2, stderr].filter(Boolean)) : undefined;
|
|
6879
6885
|
var waitForAllStream = ({ subprocess, encoding, buffer, maxBuffer, lines, stripFinalNewline: stripFinalNewline2, verboseInfo, streamInfo }) => waitForSubprocessStream({
|
|
6880
6886
|
...getAllStream(subprocess, buffer),
|
|
6881
6887
|
fdNumber: "all",
|
|
@@ -7065,7 +7071,7 @@ var waitForSubprocessResult = async ({
|
|
|
7065
7071
|
]);
|
|
7066
7072
|
}
|
|
7067
7073
|
};
|
|
7068
|
-
var waitForOriginalStreams = (originalStreams, subprocess, streamInfo) => originalStreams.map((stream, fdNumber) => stream === subprocess.stdio[fdNumber] ?
|
|
7074
|
+
var waitForOriginalStreams = (originalStreams, subprocess, streamInfo) => originalStreams.map((stream, fdNumber) => stream === subprocess.stdio[fdNumber] ? undefined : waitForStream(stream, fdNumber, streamInfo));
|
|
7069
7075
|
var waitForCustomStreamsEnd = (fileDescriptors, streamInfo) => fileDescriptors.flatMap(({ stdioItems }, fdNumber) => stdioItems.filter(({ value, stream = value }) => isStream(stream, { checkOpen: false }) && !isStandardStream(stream)).map(({ type, value, stream = value }) => waitForStream(stream, fdNumber, streamInfo, {
|
|
7070
7076
|
isSameDirection: TRANSFORM_TYPES.has(type),
|
|
7071
7077
|
stopOnExit: type === "native"
|
|
@@ -7111,7 +7117,7 @@ init_cjs_shims();
|
|
|
7111
7117
|
// ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/convert/shared.js
|
|
7112
7118
|
init_cjs_shims();
|
|
7113
7119
|
var safeWaitForSubprocessStdin = async (subprocessStdin) => {
|
|
7114
|
-
if (subprocessStdin ===
|
|
7120
|
+
if (subprocessStdin === undefined) {
|
|
7115
7121
|
return;
|
|
7116
7122
|
}
|
|
7117
7123
|
try {
|
|
@@ -7120,7 +7126,7 @@ var safeWaitForSubprocessStdin = async (subprocessStdin) => {
|
|
|
7120
7126
|
}
|
|
7121
7127
|
};
|
|
7122
7128
|
var safeWaitForSubprocessStdout = async (subprocessStdout) => {
|
|
7123
|
-
if (subprocessStdout ===
|
|
7129
|
+
if (subprocessStdout === undefined) {
|
|
7124
7130
|
return;
|
|
7125
7131
|
}
|
|
7126
7132
|
try {
|
|
@@ -7162,7 +7168,7 @@ var createReadable = ({ subprocess, concurrentStreams, encoding }, { from, binar
|
|
|
7162
7168
|
});
|
|
7163
7169
|
const readable2 = new stream.Readable({
|
|
7164
7170
|
read,
|
|
7165
|
-
destroy: util.callbackify(onReadableDestroy.bind(
|
|
7171
|
+
destroy: util.callbackify(onReadableDestroy.bind(undefined, { subprocessStdout, subprocess, waitReadableDestroy })),
|
|
7166
7172
|
highWaterMark: readableHighWaterMark,
|
|
7167
7173
|
objectMode: readableObjectMode,
|
|
7168
7174
|
encoding: readableEncoding
|
|
@@ -7239,7 +7245,7 @@ var createWritable = ({ subprocess, concurrentStreams }, { to } = {}) => {
|
|
|
7239
7245
|
const { subprocessStdin, waitWritableFinal, waitWritableDestroy } = getSubprocessStdin(subprocess, to, concurrentStreams);
|
|
7240
7246
|
const writable2 = new stream.Writable({
|
|
7241
7247
|
...getWritableMethods(subprocessStdin, subprocess, waitWritableFinal),
|
|
7242
|
-
destroy: util.callbackify(onWritableDestroy.bind(
|
|
7248
|
+
destroy: util.callbackify(onWritableDestroy.bind(undefined, {
|
|
7243
7249
|
subprocessStdin,
|
|
7244
7250
|
subprocess,
|
|
7245
7251
|
waitWritableFinal,
|
|
@@ -7258,8 +7264,8 @@ var getSubprocessStdin = (subprocess, to, concurrentStreams) => {
|
|
|
7258
7264
|
return { subprocessStdin, waitWritableFinal, waitWritableDestroy };
|
|
7259
7265
|
};
|
|
7260
7266
|
var getWritableMethods = (subprocessStdin, subprocess, waitWritableFinal) => ({
|
|
7261
|
-
write: onWrite.bind(
|
|
7262
|
-
final: util.callbackify(onWritableFinal.bind(
|
|
7267
|
+
write: onWrite.bind(undefined, subprocessStdin),
|
|
7268
|
+
final: util.callbackify(onWritableFinal.bind(undefined, subprocessStdin, subprocess, waitWritableFinal))
|
|
7263
7269
|
});
|
|
7264
7270
|
var onWrite = (subprocessStdin, chunk, encoding, done) => {
|
|
7265
7271
|
if (subprocessStdin.write(chunk, encoding)) {
|
|
@@ -7315,7 +7321,7 @@ var createDuplex = ({ subprocess, concurrentStreams, encoding }, { from, to, bin
|
|
|
7315
7321
|
const duplex2 = new stream.Duplex({
|
|
7316
7322
|
read,
|
|
7317
7323
|
...getWritableMethods(subprocessStdin, subprocess, waitWritableFinal),
|
|
7318
|
-
destroy: util.callbackify(onDuplexDestroy.bind(
|
|
7324
|
+
destroy: util.callbackify(onDuplexDestroy.bind(undefined, {
|
|
7319
7325
|
subprocessStdout,
|
|
7320
7326
|
subprocessStdin,
|
|
7321
7327
|
subprocess,
|
|
@@ -7384,11 +7390,11 @@ var iterateOnStdoutData = async function* (onStdoutData, subprocessStdout, subpr
|
|
|
7384
7390
|
// ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/convert/add.js
|
|
7385
7391
|
var addConvertedStreams = (subprocess, { encoding }) => {
|
|
7386
7392
|
const concurrentStreams = initializeConcurrentStreams();
|
|
7387
|
-
subprocess.readable = createReadable.bind(
|
|
7388
|
-
subprocess.writable = createWritable.bind(
|
|
7389
|
-
subprocess.duplex = createDuplex.bind(
|
|
7390
|
-
subprocess.iterable = createIterable.bind(
|
|
7391
|
-
subprocess[Symbol.asyncIterator] = createIterable.bind(
|
|
7393
|
+
subprocess.readable = createReadable.bind(undefined, { subprocess, concurrentStreams, encoding });
|
|
7394
|
+
subprocess.writable = createWritable.bind(undefined, { subprocess, concurrentStreams });
|
|
7395
|
+
subprocess.duplex = createDuplex.bind(undefined, { subprocess, concurrentStreams, encoding });
|
|
7396
|
+
subprocess.iterable = createIterable.bind(undefined, subprocess, encoding);
|
|
7397
|
+
subprocess[Symbol.asyncIterator] = createIterable.bind(undefined, subprocess, encoding, {});
|
|
7392
7398
|
};
|
|
7393
7399
|
|
|
7394
7400
|
// ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/methods/promise.js
|
|
@@ -7419,7 +7425,7 @@ var execaCoreAsync = (rawFile, rawArguments, rawOptions, createNested) => {
|
|
|
7419
7425
|
escapedCommand,
|
|
7420
7426
|
fileDescriptors
|
|
7421
7427
|
});
|
|
7422
|
-
subprocess.pipe = pipeToSubprocess.bind(
|
|
7428
|
+
subprocess.pipe = pipeToSubprocess.bind(undefined, {
|
|
7423
7429
|
source: subprocess,
|
|
7424
7430
|
sourcePromise: promise,
|
|
7425
7431
|
boundOptions: {},
|
|
@@ -7446,7 +7452,7 @@ var handleAsyncArguments = (rawFile, rawArguments, rawOptions) => {
|
|
|
7446
7452
|
};
|
|
7447
7453
|
};
|
|
7448
7454
|
var handleAsyncOptions = ({ timeout, signal, ...options }) => {
|
|
7449
|
-
if (signal !==
|
|
7455
|
+
if (signal !== undefined) {
|
|
7450
7456
|
throw new TypeError('The "signal" option has been renamed to "cancelSignal" instead.');
|
|
7451
7457
|
}
|
|
7452
7458
|
return { ...options, timeoutDuration: timeout };
|
|
@@ -7473,7 +7479,7 @@ var spawnSubprocessAsync = ({ file, commandArguments, options, startTime, verbos
|
|
|
7473
7479
|
cleanupOnExit(subprocess, options, controller);
|
|
7474
7480
|
const context = {};
|
|
7475
7481
|
const onInternalError = createDeferred();
|
|
7476
|
-
subprocess.kill = subprocessKill.bind(
|
|
7482
|
+
subprocess.kill = subprocessKill.bind(undefined, {
|
|
7477
7483
|
kill: subprocess.kill.bind(subprocess),
|
|
7478
7484
|
options,
|
|
7479
7485
|
onInternalError,
|
|
@@ -7590,7 +7596,7 @@ var createExeca = (mapArguments, boundOptions, deepOptions, setBoundExeca) => {
|
|
|
7590
7596
|
setBoundExeca,
|
|
7591
7597
|
createNested
|
|
7592
7598
|
}, ...execaArguments);
|
|
7593
|
-
if (setBoundExeca !==
|
|
7599
|
+
if (setBoundExeca !== undefined) {
|
|
7594
7600
|
setBoundExeca(boundExeca, createNested, boundOptions);
|
|
7595
7601
|
}
|
|
7596
7602
|
return boundExeca;
|
|
@@ -7667,7 +7673,7 @@ var setScriptSync = (boundExeca, createNested, boundOptions) => {
|
|
|
7667
7673
|
var mapScriptAsync = ({ options }) => getScriptOptions(options);
|
|
7668
7674
|
var mapScriptSync = ({ options }) => ({ ...getScriptOptions(options), isSync: true });
|
|
7669
7675
|
var getScriptOptions = (options) => ({ options: { ...getScriptStdinOption(options), ...options } });
|
|
7670
|
-
var getScriptStdinOption = ({ input, inputFile, stdio }) => input ===
|
|
7676
|
+
var getScriptStdinOption = ({ input, inputFile, stdio }) => input === undefined && inputFile === undefined && stdio === undefined ? { stdin: "inherit" } : {};
|
|
7671
7677
|
var deepScriptOptions = { preferLocal: true };
|
|
7672
7678
|
|
|
7673
7679
|
// ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/index.js
|
|
@@ -7679,12 +7685,6 @@ createExeca(mapNode);
|
|
|
7679
7685
|
createExeca(mapScriptAsync, {}, deepScriptOptions, setScriptSync);
|
|
7680
7686
|
getIpcExport();
|
|
7681
7687
|
|
|
7682
|
-
// src/generate.ts
|
|
7683
|
-
init_cjs_shims();
|
|
7684
|
-
|
|
7685
|
-
// src/utils/executeHooks.ts
|
|
7686
|
-
init_cjs_shims();
|
|
7687
|
-
|
|
7688
7688
|
// src/utils/Writables.ts
|
|
7689
7689
|
init_cjs_shims();
|
|
7690
7690
|
var ConsolaWritable = class extends stream.Writable {
|
|
@@ -7723,9 +7723,9 @@ var AbortError = class extends Error {
|
|
|
7723
7723
|
this.message = message;
|
|
7724
7724
|
}
|
|
7725
7725
|
};
|
|
7726
|
-
var getDOMException = (errorMessage) => globalThis.DOMException ===
|
|
7726
|
+
var getDOMException = (errorMessage) => globalThis.DOMException === undefined ? new AbortError(errorMessage) : new DOMException(errorMessage);
|
|
7727
7727
|
var getAbortedReason = (signal) => {
|
|
7728
|
-
const reason = signal.reason ===
|
|
7728
|
+
const reason = signal.reason === undefined ? getDOMException("This operation was aborted.") : signal.reason;
|
|
7729
7729
|
return reason instanceof Error ? reason : getDOMException(reason);
|
|
7730
7730
|
};
|
|
7731
7731
|
function pTimeout(promise, options) {
|
|
@@ -7758,7 +7758,7 @@ function pTimeout(promise, options) {
|
|
|
7758
7758
|
return;
|
|
7759
7759
|
}
|
|
7760
7760
|
const timeoutError = new TimeoutError();
|
|
7761
|
-
timer = customTimers.setTimeout.call(
|
|
7761
|
+
timer = customTimers.setTimeout.call(undefined, () => {
|
|
7762
7762
|
if (fallback) {
|
|
7763
7763
|
try {
|
|
7764
7764
|
resolve(fallback());
|
|
@@ -7791,8 +7791,8 @@ function pTimeout(promise, options) {
|
|
|
7791
7791
|
cancelablePromise.clear();
|
|
7792
7792
|
});
|
|
7793
7793
|
cancelablePromise.clear = () => {
|
|
7794
|
-
customTimers.clearTimeout.call(
|
|
7795
|
-
timer =
|
|
7794
|
+
customTimers.clearTimeout.call(undefined, timer);
|
|
7795
|
+
timer = undefined;
|
|
7796
7796
|
};
|
|
7797
7797
|
return cancelablePromise;
|
|
7798
7798
|
}
|
|
@@ -7898,7 +7898,7 @@ var PQueue = class extends import_index.default {
|
|
|
7898
7898
|
if (!(typeof options.intervalCap === "number" && options.intervalCap >= 1)) {
|
|
7899
7899
|
throw new TypeError(`Expected \`intervalCap\` to be a number from 1 and up, got \`${options.intervalCap?.toString() ?? ""}\` (${typeof options.intervalCap})`);
|
|
7900
7900
|
}
|
|
7901
|
-
if (options.interval ===
|
|
7901
|
+
if (options.interval === undefined || !(Number.isFinite(options.interval) && options.interval >= 0)) {
|
|
7902
7902
|
throw new TypeError(`Expected \`interval\` to be a finite number >= 0, got \`${options.interval?.toString() ?? ""}\` (${typeof options.interval})`);
|
|
7903
7903
|
}
|
|
7904
7904
|
this.#carryoverConcurrencyCount = options.carryoverConcurrencyCount;
|
|
@@ -7926,16 +7926,16 @@ var PQueue = class extends import_index.default {
|
|
|
7926
7926
|
#onResumeInterval() {
|
|
7927
7927
|
this.#onInterval();
|
|
7928
7928
|
this.#initializeIntervalIfNeeded();
|
|
7929
|
-
this.#timeoutId =
|
|
7929
|
+
this.#timeoutId = undefined;
|
|
7930
7930
|
}
|
|
7931
7931
|
get #isIntervalPaused() {
|
|
7932
7932
|
const now = Date.now();
|
|
7933
|
-
if (this.#intervalId ===
|
|
7933
|
+
if (this.#intervalId === undefined) {
|
|
7934
7934
|
const delay = this.#intervalEnd - now;
|
|
7935
7935
|
if (delay < 0) {
|
|
7936
7936
|
this.#intervalCount = this.#carryoverConcurrencyCount ? this.#pending : 0;
|
|
7937
7937
|
} else {
|
|
7938
|
-
if (this.#timeoutId ===
|
|
7938
|
+
if (this.#timeoutId === undefined) {
|
|
7939
7939
|
this.#timeoutId = setTimeout(() => {
|
|
7940
7940
|
this.#onResumeInterval();
|
|
7941
7941
|
}, delay);
|
|
@@ -7950,7 +7950,7 @@ var PQueue = class extends import_index.default {
|
|
|
7950
7950
|
if (this.#intervalId) {
|
|
7951
7951
|
clearInterval(this.#intervalId);
|
|
7952
7952
|
}
|
|
7953
|
-
this.#intervalId =
|
|
7953
|
+
this.#intervalId = undefined;
|
|
7954
7954
|
this.emit("empty");
|
|
7955
7955
|
if (this.#pending === 0) {
|
|
7956
7956
|
this.emit("idle");
|
|
@@ -7975,7 +7975,7 @@ var PQueue = class extends import_index.default {
|
|
|
7975
7975
|
return false;
|
|
7976
7976
|
}
|
|
7977
7977
|
#initializeIntervalIfNeeded() {
|
|
7978
|
-
if (this.#isIntervalIgnored || this.#intervalId !==
|
|
7978
|
+
if (this.#isIntervalIgnored || this.#intervalId !== undefined) {
|
|
7979
7979
|
return;
|
|
7980
7980
|
}
|
|
7981
7981
|
this.#intervalId = setInterval(() => {
|
|
@@ -7986,7 +7986,7 @@ var PQueue = class extends import_index.default {
|
|
|
7986
7986
|
#onInterval() {
|
|
7987
7987
|
if (this.#intervalCount === 0 && this.#pending === 0 && this.#intervalId) {
|
|
7988
7988
|
clearInterval(this.#intervalId);
|
|
7989
|
-
this.#intervalId =
|
|
7989
|
+
this.#intervalId = undefined;
|
|
7990
7990
|
}
|
|
7991
7991
|
this.#intervalCount = this.#carryoverConcurrencyCount ? this.#pending : 0;
|
|
7992
7992
|
this.#processQueue();
|
|
@@ -8207,7 +8207,7 @@ async function executeHooks({ hooks, logger: logger$1 }) {
|
|
|
8207
8207
|
logger$1?.emit("start", `Executing hook ${logger$1.logLevel !== logger.LogMapper.silent ? p2.dim(command) : ""}`);
|
|
8208
8208
|
await execa(cmd, _args, {
|
|
8209
8209
|
detached: true,
|
|
8210
|
-
stdout: logger$1?.logLevel === logger.LogMapper.silent ?
|
|
8210
|
+
stdout: logger$1?.logLevel === logger.LogMapper.silent ? undefined : ["pipe", consolaWritable],
|
|
8211
8211
|
stripFinalNewline: true
|
|
8212
8212
|
});
|
|
8213
8213
|
logger$1?.emit("success", `Executed hook ${logger$1.logLevel !== logger.LogMapper.silent ? p2.dim(command) : ""}`);
|
|
@@ -8251,7 +8251,7 @@ function getSummary({ pluginManager, filesCreated, status, hrStart, config }) {
|
|
|
8251
8251
|
const pluginsCount = config.plugins?.length || 0;
|
|
8252
8252
|
const meta = {
|
|
8253
8253
|
plugins: status === "success" ? `${p2.green(`${buildStartPlugins.length} successful`)}, ${pluginsCount} total` : `${p2.red(`${failedPlugins?.length ?? 1} failed`)}, ${pluginsCount} total`,
|
|
8254
|
-
pluginsFailed: status === "failed" ? failedPlugins?.map((name) => logger.randomCliColour(name))?.join(", ") :
|
|
8254
|
+
pluginsFailed: status === "failed" ? failedPlugins?.map((name) => logger.randomCliColour(name))?.join(", ") : undefined,
|
|
8255
8255
|
filesCreated,
|
|
8256
8256
|
time: `${p2.yellow(`${elapsedSeconds}s`)}`,
|
|
8257
8257
|
output: path2__default.default.isAbsolute(config.root) ? path2__default.default.resolve(config.root, config.output.path) : config.root
|
|
@@ -8266,7 +8266,7 @@ function getSummary({ pluginManager, filesCreated, status, hrStart, config }) {
|
|
|
8266
8266
|
if (item.at(1)) {
|
|
8267
8267
|
return item.at(0);
|
|
8268
8268
|
}
|
|
8269
|
-
return
|
|
8269
|
+
return undefined;
|
|
8270
8270
|
}).filter(Boolean).join("\n")
|
|
8271
8271
|
);
|
|
8272
8272
|
return [...logs];
|
|
@@ -8278,7 +8278,7 @@ async function generate({ input, config, args }) {
|
|
|
8278
8278
|
name: config.name
|
|
8279
8279
|
});
|
|
8280
8280
|
const { root = process.cwd(), ...userConfig } = config;
|
|
8281
|
-
const inputPath = input ?? ("path" in userConfig.input ? userConfig.input.path :
|
|
8281
|
+
const inputPath = input ?? ("path" in userConfig.input ? userConfig.input.path : undefined);
|
|
8282
8282
|
if (logger$1.logLevel !== logger.LogMapper.debug) {
|
|
8283
8283
|
const progressCache = /* @__PURE__ */ new Map();
|
|
8284
8284
|
logger$1.on("progress_start", ({ id, size, message = "" }) => {
|
|
@@ -8381,5 +8381,5 @@ ${logFiles.join("\n")}`);
|
|
|
8381
8381
|
exports.generate = generate;
|
|
8382
8382
|
exports.init_cjs_shims = init_cjs_shims;
|
|
8383
8383
|
exports.p = p2;
|
|
8384
|
-
//# sourceMappingURL=chunk-
|
|
8385
|
-
//# sourceMappingURL=chunk-
|
|
8384
|
+
//# sourceMappingURL=chunk-ZKB5EBBP.cjs.map
|
|
8385
|
+
//# sourceMappingURL=chunk-ZKB5EBBP.cjs.map
|