@kubb/cli 4.1.2 → 4.1.3
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/{generate-DKlT22M0.cjs → generate-BvnEYuGd.cjs} +3 -4
- package/dist/{generate-DKlT22M0.cjs.map → generate-BvnEYuGd.cjs.map} +1 -1
- package/dist/{generate-vHDmA5Mm.js → generate-Cc3YLh0Y.js} +104 -176
- package/dist/generate-Cc3YLh0Y.js.map +1 -0
- package/dist/{generate-BqNABk2X.js → generate-MZHwytlj.js} +3 -4
- package/dist/{generate-BqNABk2X.js.map → generate-MZHwytlj.js.map} +1 -1
- package/dist/{generate-BALD2C5T.cjs → generate-z0xL-KdK.cjs} +104 -176
- package/dist/generate-z0xL-KdK.cjs.map +1 -0
- package/dist/index.cjs +3 -4
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +3 -4
- package/dist/index.js.map +1 -1
- package/package.json +8 -8
- package/dist/generate-BALD2C5T.cjs.map +0 -1
- package/dist/generate-vHDmA5Mm.js.map +0 -1
|
@@ -142,8 +142,7 @@ const parseTemplate = ({ templates, expressions, tokens, index, template }) => {
|
|
|
142
142
|
const newTokens = concatTokens(tokens, nextTokens, leadingWhitespaces);
|
|
143
143
|
if (index === expressions.length) return newTokens;
|
|
144
144
|
const expression = expressions[index];
|
|
145
|
-
|
|
146
|
-
return concatTokens(newTokens, expressionTokens, trailingWhitespaces);
|
|
145
|
+
return concatTokens(newTokens, Array.isArray(expression) ? expression.map((expression$1) => parseExpression(expression$1)) : [parseExpression(expression)], trailingWhitespaces);
|
|
147
146
|
};
|
|
148
147
|
const splitByWhitespaces = (template, rawTemplate) => {
|
|
149
148
|
if (rawTemplate.length === 0) return {
|
|
@@ -230,8 +229,7 @@ const normalizeFdSpecificOptions = (options) => {
|
|
|
230
229
|
};
|
|
231
230
|
const normalizeFdSpecificOption = (options, optionName) => {
|
|
232
231
|
const optionBaseArray = Array.from({ length: getStdioLength(options) + 1 });
|
|
233
|
-
|
|
234
|
-
return addDefaultValue$1(optionArray, optionName);
|
|
232
|
+
return addDefaultValue$1(normalizeFdSpecificValue(options[optionName], optionBaseArray, optionName), optionName);
|
|
235
233
|
};
|
|
236
234
|
const getStdioLength = ({ stdio }) => Array.isArray(stdio) ? Math.max(stdio.length, STANDARD_STREAMS_ALIASES.length) : STANDARD_STREAMS_ALIASES.length;
|
|
237
235
|
const normalizeFdSpecificValue = (optionValue, optionArray, optionName) => isPlainObject(optionValue) ? normalizeOptionObject(optionValue, optionArray, optionName) : optionArray.fill(optionValue);
|
|
@@ -298,11 +296,9 @@ const VERBOSE_VALUES = [
|
|
|
298
296
|
//#region ../../node_modules/.pnpm/execa@9.6.0/node_modules/execa/lib/arguments/escape.js
|
|
299
297
|
const joinCommand = (filePath, rawArguments) => {
|
|
300
298
|
const fileAndArguments = [filePath, ...rawArguments];
|
|
301
|
-
const command = fileAndArguments.join(" ");
|
|
302
|
-
const escapedCommand = fileAndArguments.map((fileAndArgument) => quoteString(escapeControlCharacters(fileAndArgument))).join(" ");
|
|
303
299
|
return {
|
|
304
|
-
command,
|
|
305
|
-
escapedCommand
|
|
300
|
+
command: fileAndArguments.join(" "),
|
|
301
|
+
escapedCommand: fileAndArguments.map((fileAndArgument) => quoteString(escapeControlCharacters(fileAndArgument))).join(" ")
|
|
306
302
|
};
|
|
307
303
|
};
|
|
308
304
|
const escapeLines = (lines) => (0, node_util.stripVTControlCharacters)(lines).split("\n").map((line) => escapeControlCharacters(line)).join("\n");
|
|
@@ -744,13 +740,11 @@ const appendNewline = (printedLine) => printedLine.endsWith("\n") ? printedLine
|
|
|
744
740
|
//#endregion
|
|
745
741
|
//#region ../../node_modules/.pnpm/execa@9.6.0/node_modules/execa/lib/verbose/log.js
|
|
746
742
|
const verboseLog = ({ type, verboseMessage, fdNumber, verboseInfo, result }) => {
|
|
747
|
-
const
|
|
743
|
+
const finalLines = applyVerboseOnLines(getPrintedLines(verboseMessage, getVerboseObject({
|
|
748
744
|
type,
|
|
749
745
|
result,
|
|
750
746
|
verboseInfo
|
|
751
|
-
});
|
|
752
|
-
const printedLines = getPrintedLines(verboseMessage, verboseObject);
|
|
753
|
-
const finalLines = applyVerboseOnLines(printedLines, verboseInfo, fdNumber);
|
|
747
|
+
})), verboseInfo, fdNumber);
|
|
754
748
|
if (finalLines !== "") console.warn(finalLines.slice(0, -1));
|
|
755
749
|
};
|
|
756
750
|
const getVerboseObject = ({ type, result, verboseInfo: { escapedCommand, commandId, rawOptions: { piped = false,...options } } }) => ({
|
|
@@ -773,8 +767,7 @@ const getPrintedLine = (verboseObject) => {
|
|
|
773
767
|
};
|
|
774
768
|
};
|
|
775
769
|
const serializeVerboseMessage = (message) => {
|
|
776
|
-
|
|
777
|
-
return escapeLines(messageString).replaceAll(" ", " ".repeat(TAB_SIZE));
|
|
770
|
+
return escapeLines(typeof message === "string" ? message : (0, node_util.inspect)(message)).replaceAll(" ", " ".repeat(TAB_SIZE));
|
|
778
771
|
};
|
|
779
772
|
const TAB_SIZE = 2;
|
|
780
773
|
|
|
@@ -793,11 +786,10 @@ const logCommand = (escapedCommand, verboseInfo) => {
|
|
|
793
786
|
//#region ../../node_modules/.pnpm/execa@9.6.0/node_modules/execa/lib/verbose/info.js
|
|
794
787
|
const getVerboseInfo = (verbose, escapedCommand, rawOptions) => {
|
|
795
788
|
validateVerbose(verbose);
|
|
796
|
-
const commandId = getCommandId(verbose);
|
|
797
789
|
return {
|
|
798
790
|
verbose,
|
|
799
791
|
escapedCommand,
|
|
800
|
-
commandId,
|
|
792
|
+
commandId: getCommandId(verbose),
|
|
801
793
|
rawOptions
|
|
802
794
|
};
|
|
803
795
|
};
|
|
@@ -824,8 +816,7 @@ const getDurationMs = (startTime) => Number(node_process.hrtime.bigint() - start
|
|
|
824
816
|
const handleCommand = (filePath, rawArguments, rawOptions) => {
|
|
825
817
|
const startTime = getStartTime();
|
|
826
818
|
const { command, escapedCommand } = joinCommand(filePath, rawArguments);
|
|
827
|
-
const
|
|
828
|
-
const verboseInfo = getVerboseInfo(verbose, escapedCommand, { ...rawOptions });
|
|
819
|
+
const verboseInfo = getVerboseInfo(normalizeFdSpecificOption(rawOptions, "verbose"), escapedCommand, { ...rawOptions });
|
|
829
820
|
logCommand(escapedCommand, verboseInfo);
|
|
830
821
|
return {
|
|
831
822
|
command,
|
|
@@ -975,8 +966,7 @@ var require_which = /* @__PURE__ */ require_chunk.__commonJS({ "../../node_modul
|
|
|
975
966
|
const ppRaw = pathEnv[i$1];
|
|
976
967
|
const pathPart = /^".*"$/.test(ppRaw) ? ppRaw.slice(1, -1) : ppRaw;
|
|
977
968
|
const pCmd = path$9.join(pathPart, cmd);
|
|
978
|
-
|
|
979
|
-
resolve(subStep(p, i$1, 0));
|
|
969
|
+
resolve(subStep(!pathPart && /^\.[\\\/]/.test(cmd) ? cmd.slice(0, 2) + pCmd : pCmd, i$1, 0));
|
|
980
970
|
});
|
|
981
971
|
const subStep = (p, i$1, ii) => new Promise((resolve, reject) => {
|
|
982
972
|
if (ii === pathExt.length) return resolve(step(i$1 + 1));
|
|
@@ -1304,9 +1294,7 @@ const npmRunPathEnv = ({ env = node_process.default.env,...options } = {}) => {
|
|
|
1304
1294
|
//#endregion
|
|
1305
1295
|
//#region ../../node_modules/.pnpm/execa@9.6.0/node_modules/execa/lib/return/final-error.js
|
|
1306
1296
|
const getFinalError = (originalError, message, isSync) => {
|
|
1307
|
-
|
|
1308
|
-
const options = originalError instanceof DiscardedError ? {} : { cause: originalError };
|
|
1309
|
-
return new ErrorClass(message, options);
|
|
1297
|
+
return new (isSync ? ExecaSyncError : ExecaError)(message, originalError instanceof DiscardedError ? {} : { cause: originalError });
|
|
1310
1298
|
};
|
|
1311
1299
|
var DiscardedError = class extends Error {};
|
|
1312
1300
|
const setErrorName = (ErrorClass, value) => {
|
|
@@ -2044,8 +2032,7 @@ const isConnected = (anyProcess) => {
|
|
|
2044
2032
|
//#region ../../node_modules/.pnpm/execa@9.6.0/node_modules/execa/lib/ipc/strict.js
|
|
2045
2033
|
const handleSendStrict = ({ anyProcess, channel, isSubprocess, message, strict }) => {
|
|
2046
2034
|
if (!strict) return message;
|
|
2047
|
-
const
|
|
2048
|
-
const hasListeners = hasMessageListeners(anyProcess, ipcEmitter);
|
|
2035
|
+
const hasListeners = hasMessageListeners(anyProcess, getIpcEmitter(anyProcess, channel, isSubprocess));
|
|
2049
2036
|
return {
|
|
2050
2037
|
id: count++,
|
|
2051
2038
|
type: REQUEST_TYPE,
|
|
@@ -2118,11 +2105,9 @@ const RESPONSE_TYPE = "execa:ipc:response";
|
|
|
2118
2105
|
const startSendMessage = (anyProcess, wrappedMessage, strict) => {
|
|
2119
2106
|
if (!OUTGOING_MESSAGES.has(anyProcess)) OUTGOING_MESSAGES.set(anyProcess, /* @__PURE__ */ new Set());
|
|
2120
2107
|
const outgoingMessages = OUTGOING_MESSAGES.get(anyProcess);
|
|
2121
|
-
const onMessageSent = createDeferred();
|
|
2122
|
-
const id = strict ? wrappedMessage.id : void 0;
|
|
2123
2108
|
const outgoingMessage = {
|
|
2124
|
-
onMessageSent,
|
|
2125
|
-
id
|
|
2109
|
+
onMessageSent: createDeferred(),
|
|
2110
|
+
id: strict ? wrappedMessage.id : void 0
|
|
2126
2111
|
};
|
|
2127
2112
|
outgoingMessages.add(outgoingMessage);
|
|
2128
2113
|
return {
|
|
@@ -2283,8 +2268,7 @@ const throwOnGracefulCancel = ({ subprocess, cancelSignal, gracefulCancel, force
|
|
|
2283
2268
|
})] : [];
|
|
2284
2269
|
const sendOnAbort = async ({ subprocess, cancelSignal, forceKillAfterDelay, context, controller: { signal } }) => {
|
|
2285
2270
|
await onAbortedSignal(cancelSignal, signal);
|
|
2286
|
-
|
|
2287
|
-
await sendAbort(subprocess, reason);
|
|
2271
|
+
await sendAbort(subprocess, getReason(cancelSignal));
|
|
2288
2272
|
killOnTimeout({
|
|
2289
2273
|
kill: subprocess.kill,
|
|
2290
2274
|
forceKillAfterDelay,
|
|
@@ -2458,8 +2442,7 @@ const normalizeOptions = (filePath, rawArguments, rawOptions) => {
|
|
|
2458
2442
|
rawOptions.cwd = normalizeCwd(rawOptions.cwd);
|
|
2459
2443
|
const [processedFile, processedArguments, processedOptions] = handleNodeOption(filePath, rawArguments, rawOptions);
|
|
2460
2444
|
const { command: file, args: commandArguments, options: initialOptions } = import_cross_spawn.default._parse(processedFile, processedArguments, processedOptions);
|
|
2461
|
-
const
|
|
2462
|
-
const options = addDefaultOptions(fdOptions);
|
|
2445
|
+
const options = addDefaultOptions(normalizeFdSpecificOptions(initialOptions));
|
|
2463
2446
|
validateTimeout(options);
|
|
2464
2447
|
validateEncoding(options);
|
|
2465
2448
|
validateIpcInputOption(options);
|
|
@@ -2628,7 +2611,7 @@ const u = Object.create(a, {
|
|
|
2628
2611
|
}
|
|
2629
2612
|
});
|
|
2630
2613
|
function h({ preventCancel: r = !1 } = {}) {
|
|
2631
|
-
const
|
|
2614
|
+
const t = new c(this.getReader(), r), s = Object.create(u);
|
|
2632
2615
|
return s[n] = t, s;
|
|
2633
2616
|
}
|
|
2634
2617
|
|
|
@@ -2677,18 +2660,14 @@ const getStreamContents$1 = async (stream, { init, convertChunk, getSize, trunca
|
|
|
2677
2660
|
const state = init();
|
|
2678
2661
|
state.length = 0;
|
|
2679
2662
|
try {
|
|
2680
|
-
for await (const chunk of asyncIterable) {
|
|
2681
|
-
|
|
2682
|
-
|
|
2683
|
-
|
|
2684
|
-
|
|
2685
|
-
|
|
2686
|
-
|
|
2687
|
-
|
|
2688
|
-
addChunk,
|
|
2689
|
-
maxBuffer
|
|
2690
|
-
});
|
|
2691
|
-
}
|
|
2663
|
+
for await (const chunk of asyncIterable) appendChunk({
|
|
2664
|
+
convertedChunk: convertChunk[getChunkType(chunk)](chunk, state),
|
|
2665
|
+
state,
|
|
2666
|
+
getSize,
|
|
2667
|
+
truncateChunk,
|
|
2668
|
+
addChunk,
|
|
2669
|
+
maxBuffer
|
|
2670
|
+
});
|
|
2692
2671
|
appendFinalChunk({
|
|
2693
2672
|
state,
|
|
2694
2673
|
convertChunk,
|
|
@@ -2878,10 +2857,9 @@ const stringMethods = {
|
|
|
2878
2857
|
const handleMaxBuffer = ({ error, stream, readableObjectMode, lines, encoding, fdNumber }) => {
|
|
2879
2858
|
if (!(error instanceof MaxBufferError)) throw error;
|
|
2880
2859
|
if (fdNumber === "all") return error;
|
|
2881
|
-
const unit = getMaxBufferUnit(readableObjectMode, lines, encoding);
|
|
2882
2860
|
error.maxBufferInfo = {
|
|
2883
2861
|
fdNumber,
|
|
2884
|
-
unit
|
|
2862
|
+
unit: getMaxBufferUnit(readableObjectMode, lines, encoding)
|
|
2885
2863
|
};
|
|
2886
2864
|
stream.destroy();
|
|
2887
2865
|
throw error;
|
|
@@ -2951,19 +2929,16 @@ const createMessages = ({ stdio, all, ipcOutput, originalError, signal, signalDe
|
|
|
2951
2929
|
killSignal
|
|
2952
2930
|
});
|
|
2953
2931
|
const originalMessage = getOriginalMessage(originalError, cwd);
|
|
2954
|
-
const
|
|
2955
|
-
const shortMessage = `${prefix}: ${escapedCommand}${suffix}`;
|
|
2956
|
-
const messageStdio = all === void 0 ? [stdio[2], stdio[1]] : [all];
|
|
2957
|
-
const message = [
|
|
2958
|
-
shortMessage,
|
|
2959
|
-
...messageStdio,
|
|
2960
|
-
...stdio.slice(3),
|
|
2961
|
-
ipcOutput.map((ipcMessage) => serializeIpcMessage(ipcMessage)).join("\n")
|
|
2962
|
-
].map((messagePart) => escapeLines(stripFinalNewline(serializeMessagePart(messagePart)))).filter(Boolean).join("\n\n");
|
|
2932
|
+
const shortMessage = `${prefix}: ${escapedCommand}${originalMessage === void 0 ? "" : `\n${originalMessage}`}`;
|
|
2963
2933
|
return {
|
|
2964
2934
|
originalMessage,
|
|
2965
2935
|
shortMessage,
|
|
2966
|
-
message
|
|
2936
|
+
message: [
|
|
2937
|
+
shortMessage,
|
|
2938
|
+
...all === void 0 ? [stdio[2], stdio[1]] : [all],
|
|
2939
|
+
...stdio.slice(3),
|
|
2940
|
+
ipcOutput.map((ipcMessage) => serializeIpcMessage(ipcMessage)).join("\n")
|
|
2941
|
+
].map((messagePart) => escapeLines(stripFinalNewline(serializeMessagePart(messagePart)))).filter(Boolean).join("\n\n")
|
|
2967
2942
|
};
|
|
2968
2943
|
};
|
|
2969
2944
|
const getErrorPrefix = ({ originalError, timedOut, timeout, isMaxBuffer, maxBuffer, errorCode, signal, signalDescription, exitCode, isCanceled, isGracefullyCanceled, isForcefullyTerminated, forceKillAfterDelay, killSignal }) => {
|
|
@@ -2984,8 +2959,7 @@ const getErrorPrefix = ({ originalError, timedOut, timeout, isMaxBuffer, maxBuff
|
|
|
2984
2959
|
const getForcefulSuffix = (isForcefullyTerminated, forceKillAfterDelay) => isForcefullyTerminated ? ` and was forcefully terminated after ${forceKillAfterDelay} milliseconds` : "";
|
|
2985
2960
|
const getOriginalMessage = (originalError, cwd) => {
|
|
2986
2961
|
if (originalError instanceof DiscardedError) return;
|
|
2987
|
-
const
|
|
2988
|
-
const escapedOriginalMessage = escapeLines(fixCwdError(originalMessage, cwd));
|
|
2962
|
+
const escapedOriginalMessage = escapeLines(fixCwdError(isExecaError(originalError) ? originalError.originalMessage : String(originalError?.message ?? originalError), cwd));
|
|
2989
2963
|
return escapedOriginalMessage === "" ? void 0 : escapedOriginalMessage;
|
|
2990
2964
|
};
|
|
2991
2965
|
const serializeIpcMessage = (ipcMessage) => typeof ipcMessage === "string" ? ipcMessage : (0, node_util.inspect)(ipcMessage);
|
|
@@ -3107,11 +3081,10 @@ const omitUndefinedProperties = (result) => Object.fromEntries(Object.entries(re
|
|
|
3107
3081
|
const normalizeExitPayload = (rawExitCode, rawSignal) => {
|
|
3108
3082
|
const exitCode = rawExitCode === null ? void 0 : rawExitCode;
|
|
3109
3083
|
const signal = rawSignal === null ? void 0 : rawSignal;
|
|
3110
|
-
const signalDescription = signal === void 0 ? void 0 : getSignalDescription(rawSignal);
|
|
3111
3084
|
return {
|
|
3112
3085
|
exitCode,
|
|
3113
3086
|
signal,
|
|
3114
|
-
signalDescription
|
|
3087
|
+
signalDescription: signal === void 0 ? void 0 : getSignalDescription(rawSignal)
|
|
3115
3088
|
};
|
|
3116
3089
|
};
|
|
3117
3090
|
|
|
@@ -3217,9 +3190,7 @@ function prettyMilliseconds(milliseconds, options) {
|
|
|
3217
3190
|
add(Number.parseFloat(millisecondsString), "millisecond", "ms", millisecondsString);
|
|
3218
3191
|
}
|
|
3219
3192
|
} else {
|
|
3220
|
-
const
|
|
3221
|
-
const secondsDecimalDigits = typeof options.secondsDecimalDigits === "number" ? options.secondsDecimalDigits : 1;
|
|
3222
|
-
const secondsFixed = floorDecimals(seconds, secondsDecimalDigits);
|
|
3193
|
+
const secondsFixed = floorDecimals((isBigInt ? Number(milliseconds % ONE_DAY_IN_MILLISECONDS) : milliseconds) / 1e3 % 60, typeof options.secondsDecimalDigits === "number" ? options.secondsDecimalDigits : 1);
|
|
3223
3194
|
const secondsString = options.keepDecimalsOnWholeSeconds ? secondsFixed : secondsFixed.replace(/\.0+$/, "");
|
|
3224
3195
|
add(Number.parseFloat(secondsString), "second", "s", secondsString);
|
|
3225
3196
|
}
|
|
@@ -3248,10 +3219,9 @@ const logResult = (result, verboseInfo) => {
|
|
|
3248
3219
|
logDuration(result, verboseInfo);
|
|
3249
3220
|
};
|
|
3250
3221
|
const logDuration = (result, verboseInfo) => {
|
|
3251
|
-
const verboseMessage = `(done in ${prettyMilliseconds(result.durationMs)})`;
|
|
3252
3222
|
verboseLog({
|
|
3253
3223
|
type: "duration",
|
|
3254
|
-
verboseMessage
|
|
3224
|
+
verboseMessage: `(done in ${prettyMilliseconds(result.durationMs)})`,
|
|
3255
3225
|
verboseInfo,
|
|
3256
3226
|
result
|
|
3257
3227
|
});
|
|
@@ -3385,10 +3355,9 @@ const getOutputObjectModes = (objectMode, index, newTransforms) => {
|
|
|
3385
3355
|
};
|
|
3386
3356
|
const getInputObjectModes = (objectMode, index, newTransforms) => {
|
|
3387
3357
|
const writableObjectMode = index === 0 ? objectMode === true : newTransforms[index - 1].value.readableObjectMode;
|
|
3388
|
-
const readableObjectMode = index !== newTransforms.length - 1 && (objectMode ?? writableObjectMode);
|
|
3389
3358
|
return {
|
|
3390
3359
|
writableObjectMode,
|
|
3391
|
-
readableObjectMode
|
|
3360
|
+
readableObjectMode: index !== newTransforms.length - 1 && (objectMode ?? writableObjectMode)
|
|
3392
3361
|
};
|
|
3393
3362
|
};
|
|
3394
3363
|
const getFdObjectMode = (stdioItems, direction) => {
|
|
@@ -3697,8 +3666,7 @@ const validateDuplicateStreamSync = ({ otherStdioItems, type, value, optionName,
|
|
|
3697
3666
|
const getDuplicateStreamInstance = ({ otherStdioItems, type, value, optionName, direction }) => {
|
|
3698
3667
|
const duplicateStdioItems = otherStdioItems.filter((stdioItem) => hasSameValue(stdioItem, value));
|
|
3699
3668
|
if (duplicateStdioItems.length === 0) return;
|
|
3700
|
-
|
|
3701
|
-
throwOnDuplicateStream(differentStdioItem, optionName, type);
|
|
3669
|
+
throwOnDuplicateStream(duplicateStdioItems.find((stdioItem) => stdioItem.direction !== direction), optionName, type);
|
|
3702
3670
|
return direction === "output" ? duplicateStdioItems[0].stream : void 0;
|
|
3703
3671
|
};
|
|
3704
3672
|
const hasSameValue = ({ type, value }, secondValue) => {
|
|
@@ -3707,8 +3675,7 @@ const hasSameValue = ({ type, value }, secondValue) => {
|
|
|
3707
3675
|
return value === secondValue;
|
|
3708
3676
|
};
|
|
3709
3677
|
const validateDuplicateTransform = ({ otherStdioItems, type, value, optionName }) => {
|
|
3710
|
-
|
|
3711
|
-
throwOnDuplicateStream(duplicateStdioItem, optionName, type);
|
|
3678
|
+
throwOnDuplicateStream(otherStdioItems.find(({ value: { transform } }) => transform === value.transform), optionName, type);
|
|
3712
3679
|
};
|
|
3713
3680
|
const throwOnDuplicateStream = (stdioItem, optionName, type) => {
|
|
3714
3681
|
if (stdioItem !== void 0) throw new TypeError(`The \`${stdioItem.optionName}\` and \`${optionName}\` options must not target ${TYPE_TO_MESSAGE[type]} that is the same.`);
|
|
@@ -3717,14 +3684,13 @@ const throwOnDuplicateStream = (stdioItem, optionName, type) => {
|
|
|
3717
3684
|
//#endregion
|
|
3718
3685
|
//#region ../../node_modules/.pnpm/execa@9.6.0/node_modules/execa/lib/stdio/handle.js
|
|
3719
3686
|
const handleStdio = (addProperties$2, options, verboseInfo, isSync) => {
|
|
3720
|
-
const initialFileDescriptors = normalizeStdioOption(options, verboseInfo, isSync).map((stdioOption, fdNumber) => getFileDescriptor({
|
|
3721
|
-
stdioOption,
|
|
3722
|
-
fdNumber,
|
|
3723
|
-
options,
|
|
3724
|
-
isSync
|
|
3725
|
-
}));
|
|
3726
3687
|
const fileDescriptors = getFinalFileDescriptors({
|
|
3727
|
-
initialFileDescriptors,
|
|
3688
|
+
initialFileDescriptors: normalizeStdioOption(options, verboseInfo, isSync).map((stdioOption, fdNumber) => getFileDescriptor({
|
|
3689
|
+
stdioOption,
|
|
3690
|
+
fdNumber,
|
|
3691
|
+
options,
|
|
3692
|
+
isSync
|
|
3693
|
+
})),
|
|
3728
3694
|
addProperties: addProperties$2,
|
|
3729
3695
|
options,
|
|
3730
3696
|
isSync
|
|
@@ -3741,14 +3707,13 @@ const getFileDescriptor = ({ stdioOption, fdNumber, options, isSync }) => {
|
|
|
3741
3707
|
optionName
|
|
3742
3708
|
});
|
|
3743
3709
|
const direction = getStreamDirection(initialStdioItems, fdNumber, optionName);
|
|
3744
|
-
const
|
|
3710
|
+
const normalizedStdioItems = normalizeTransforms(initialStdioItems.map((stdioItem) => handleNativeStream({
|
|
3745
3711
|
stdioItem,
|
|
3746
3712
|
isStdioArray,
|
|
3747
3713
|
fdNumber,
|
|
3748
3714
|
direction,
|
|
3749
3715
|
isSync
|
|
3750
|
-
}));
|
|
3751
|
-
const normalizedStdioItems = normalizeTransforms(stdioItems, optionName, direction, options);
|
|
3716
|
+
})), optionName, direction, options);
|
|
3752
3717
|
const objectMode = getFdObjectMode(normalizedStdioItems, direction);
|
|
3753
3718
|
validateFileObjectMode(normalizedStdioItems, objectMode);
|
|
3754
3719
|
return {
|
|
@@ -3758,8 +3723,7 @@ const getFileDescriptor = ({ stdioOption, fdNumber, options, isSync }) => {
|
|
|
3758
3723
|
};
|
|
3759
3724
|
};
|
|
3760
3725
|
const initializeStdioItems = ({ stdioOption, fdNumber, options, optionName }) => {
|
|
3761
|
-
const
|
|
3762
|
-
const stdioItems = filterDuplicates(initialStdioItems);
|
|
3726
|
+
const stdioItems = filterDuplicates([...(Array.isArray(stdioOption) ? stdioOption : [stdioOption]).map((value) => initializeStdioItem(value, optionName)), ...handleInputOptions(options, fdNumber)]);
|
|
3763
3727
|
const isStdioArray = stdioItems.length > 1;
|
|
3764
3728
|
validateStdioArray(stdioItems, isStdioArray, optionName);
|
|
3765
3729
|
validateStreams(stdioItems);
|
|
@@ -3809,18 +3773,17 @@ const getFinalFileDescriptors = ({ initialFileDescriptors, addProperties: addPro
|
|
|
3809
3773
|
}
|
|
3810
3774
|
};
|
|
3811
3775
|
const getFinalFileDescriptor = ({ fileDescriptor: { direction, objectMode, stdioItems }, fileDescriptors, addProperties: addProperties$2, options, isSync }) => {
|
|
3812
|
-
const finalStdioItems = stdioItems.map((stdioItem) => addStreamProperties({
|
|
3813
|
-
stdioItem,
|
|
3814
|
-
addProperties: addProperties$2,
|
|
3815
|
-
direction,
|
|
3816
|
-
options,
|
|
3817
|
-
fileDescriptors,
|
|
3818
|
-
isSync
|
|
3819
|
-
}));
|
|
3820
3776
|
return {
|
|
3821
3777
|
direction,
|
|
3822
3778
|
objectMode,
|
|
3823
|
-
stdioItems:
|
|
3779
|
+
stdioItems: stdioItems.map((stdioItem) => addStreamProperties({
|
|
3780
|
+
stdioItem,
|
|
3781
|
+
addProperties: addProperties$2,
|
|
3782
|
+
direction,
|
|
3783
|
+
options,
|
|
3784
|
+
fileDescriptors,
|
|
3785
|
+
isSync
|
|
3786
|
+
}))
|
|
3824
3787
|
};
|
|
3825
3788
|
};
|
|
3826
3789
|
const addStreamProperties = ({ stdioItem, addProperties: addProperties$2, direction, options, fileDescriptors, isSync }) => {
|
|
@@ -4116,10 +4079,7 @@ const generatorToStream = ({ value, value: { transform, final, writableObjectMod
|
|
|
4116
4079
|
const runGeneratorsSync = (chunks, stdioItems, encoding, isInput) => {
|
|
4117
4080
|
const generators = stdioItems.filter(({ type }) => type === "generator");
|
|
4118
4081
|
const reversedGenerators = isInput ? generators.reverse() : generators;
|
|
4119
|
-
for (const { value, optionName } of reversedGenerators)
|
|
4120
|
-
const generators$1 = addInternalGenerators(value, encoding, optionName);
|
|
4121
|
-
chunks = runTransformSync(generators$1, chunks);
|
|
4122
|
-
}
|
|
4082
|
+
for (const { value, optionName } of reversedGenerators) chunks = runTransformSync(addInternalGenerators(value, encoding, optionName), chunks);
|
|
4123
4083
|
return chunks;
|
|
4124
4084
|
};
|
|
4125
4085
|
const addInternalGenerators = ({ transform, final, binary, writableObjectMode, readableObjectMode, preserveNewlines }, encoding, optionName) => {
|
|
@@ -4156,8 +4116,7 @@ const addInputOptionSync = (fileDescriptors, fdNumber, options) => {
|
|
|
4156
4116
|
const [{ type, optionName }] = allStdioItems;
|
|
4157
4117
|
throw new TypeError(`Only the \`stdin\` option, not \`${optionName}\`, can be ${TYPE_TO_MESSAGE[type]} with synchronous methods.`);
|
|
4158
4118
|
}
|
|
4159
|
-
|
|
4160
|
-
options.input = joinToUint8Array(transformedContents);
|
|
4119
|
+
options.input = joinToUint8Array(allStdioItems.map(({ contents }) => contents).map((contents) => applySingleInputGeneratorsSync(contents, stdioItems)));
|
|
4161
4120
|
};
|
|
4162
4121
|
const applySingleInputGeneratorsSync = (contents, stdioItems) => {
|
|
4163
4122
|
const newContents = runGeneratorsSync(contents, stdioItems, "utf8", true);
|
|
@@ -4182,10 +4141,9 @@ const logLinesSync = (linesArray, fdNumber, verboseInfo) => {
|
|
|
4182
4141
|
};
|
|
4183
4142
|
const isPipingStream = (stream) => stream._readableState.pipes.length > 0;
|
|
4184
4143
|
const logLine = (line, fdNumber, verboseInfo) => {
|
|
4185
|
-
const verboseMessage = serializeVerboseMessage(line);
|
|
4186
4144
|
verboseLog({
|
|
4187
4145
|
type: "output",
|
|
4188
|
-
verboseMessage,
|
|
4146
|
+
verboseMessage: serializeVerboseMessage(line),
|
|
4189
4147
|
fdNumber,
|
|
4190
4148
|
verboseInfo
|
|
4191
4149
|
});
|
|
@@ -4212,12 +4170,10 @@ const transformOutputSync = ({ fileDescriptors, syncResult: { output }, options,
|
|
|
4212
4170
|
};
|
|
4213
4171
|
const transformOutputResultSync = ({ result, fileDescriptors, fdNumber, state, outputFiles, isMaxBuffer, verboseInfo }, { buffer, encoding, lines, stripFinalNewline: stripFinalNewline$1, maxBuffer }) => {
|
|
4214
4172
|
if (result === null) return;
|
|
4215
|
-
const
|
|
4216
|
-
const uint8ArrayResult = bufferToUint8Array(truncatedResult);
|
|
4173
|
+
const uint8ArrayResult = bufferToUint8Array(truncateMaxBufferSync(result, isMaxBuffer, maxBuffer));
|
|
4217
4174
|
const { stdioItems, objectMode } = fileDescriptors[fdNumber];
|
|
4218
|
-
const chunks = runOutputGeneratorsSync([uint8ArrayResult], stdioItems, encoding, state);
|
|
4219
4175
|
const { serializedResult, finalResult = serializedResult } = serializeChunks({
|
|
4220
|
-
chunks,
|
|
4176
|
+
chunks: runOutputGeneratorsSync([uint8ArrayResult], stdioItems, encoding, state),
|
|
4221
4177
|
objectMode,
|
|
4222
4178
|
encoding,
|
|
4223
4179
|
lines,
|
|
@@ -4328,14 +4284,12 @@ const isFailedExit = (exitCode, signal) => exitCode !== 0 || signal !== null;
|
|
|
4328
4284
|
//#region ../../node_modules/.pnpm/execa@9.6.0/node_modules/execa/lib/resolve/exit-sync.js
|
|
4329
4285
|
const getExitResultSync = ({ error, status: exitCode, signal, output }, { maxBuffer }) => {
|
|
4330
4286
|
const resultError = getResultError(error, exitCode, signal);
|
|
4331
|
-
const timedOut = resultError?.code === "ETIMEDOUT";
|
|
4332
|
-
const isMaxBuffer = isMaxBufferSync(resultError, output, maxBuffer);
|
|
4333
4287
|
return {
|
|
4334
4288
|
resultError,
|
|
4335
4289
|
exitCode,
|
|
4336
4290
|
signal,
|
|
4337
|
-
timedOut,
|
|
4338
|
-
isMaxBuffer
|
|
4291
|
+
timedOut: resultError?.code === "ETIMEDOUT",
|
|
4292
|
+
isMaxBuffer: isMaxBufferSync(resultError, output, maxBuffer)
|
|
4339
4293
|
};
|
|
4340
4294
|
};
|
|
4341
4295
|
const getResultError = (error, exitCode, signal) => {
|
|
@@ -4347,7 +4301,7 @@ const getResultError = (error, exitCode, signal) => {
|
|
|
4347
4301
|
//#region ../../node_modules/.pnpm/execa@9.6.0/node_modules/execa/lib/methods/main-sync.js
|
|
4348
4302
|
const execaCoreSync = (rawFile, rawArguments, rawOptions) => {
|
|
4349
4303
|
const { file, commandArguments, command, escapedCommand, startTime, verboseInfo, options, fileDescriptors } = handleSyncArguments(rawFile, rawArguments, rawOptions);
|
|
4350
|
-
|
|
4304
|
+
return handleResult(spawnSubprocessSync({
|
|
4351
4305
|
file,
|
|
4352
4306
|
commandArguments,
|
|
4353
4307
|
options,
|
|
@@ -4356,15 +4310,12 @@ const execaCoreSync = (rawFile, rawArguments, rawOptions) => {
|
|
|
4356
4310
|
verboseInfo,
|
|
4357
4311
|
fileDescriptors,
|
|
4358
4312
|
startTime
|
|
4359
|
-
});
|
|
4360
|
-
return handleResult(result, verboseInfo, options);
|
|
4313
|
+
}), verboseInfo, options);
|
|
4361
4314
|
};
|
|
4362
4315
|
const handleSyncArguments = (rawFile, rawArguments, rawOptions) => {
|
|
4363
4316
|
const { command, escapedCommand, startTime, verboseInfo } = handleCommand(rawFile, rawArguments, rawOptions);
|
|
4364
|
-
const
|
|
4365
|
-
const { file, commandArguments, options } = normalizeOptions(rawFile, rawArguments, syncOptions);
|
|
4317
|
+
const { file, commandArguments, options } = normalizeOptions(rawFile, rawArguments, normalizeSyncOptions(rawOptions));
|
|
4366
4318
|
validateSyncOptions(options);
|
|
4367
|
-
const fileDescriptors = handleStdioSync(options, verboseInfo);
|
|
4368
4319
|
return {
|
|
4369
4320
|
file,
|
|
4370
4321
|
commandArguments,
|
|
@@ -4373,7 +4324,7 @@ const handleSyncArguments = (rawFile, rawArguments, rawOptions) => {
|
|
|
4373
4324
|
startTime,
|
|
4374
4325
|
verboseInfo,
|
|
4375
4326
|
options,
|
|
4376
|
-
fileDescriptors
|
|
4327
|
+
fileDescriptors: handleStdioSync(options, verboseInfo)
|
|
4377
4328
|
};
|
|
4378
4329
|
};
|
|
4379
4330
|
const normalizeSyncOptions = (options) => options.node && !options.ipc ? {
|
|
@@ -4408,16 +4359,14 @@ const spawnSubprocessSync = ({ file, commandArguments, options, command, escaped
|
|
|
4408
4359
|
isMaxBuffer,
|
|
4409
4360
|
verboseInfo
|
|
4410
4361
|
});
|
|
4411
|
-
const stdio = output.map((stdioOutput, fdNumber) => stripNewline(stdioOutput, options, fdNumber));
|
|
4412
|
-
const all = stripNewline(getAllSync(output, options), options, "all");
|
|
4413
4362
|
return getSyncResult({
|
|
4414
4363
|
error,
|
|
4415
4364
|
exitCode,
|
|
4416
4365
|
signal,
|
|
4417
4366
|
timedOut,
|
|
4418
4367
|
isMaxBuffer,
|
|
4419
|
-
stdio,
|
|
4420
|
-
all,
|
|
4368
|
+
stdio: output.map((stdioOutput, fdNumber) => stripNewline(stdioOutput, options, fdNumber)),
|
|
4369
|
+
all: stripNewline(getAllSync(output, options), options, "all"),
|
|
4421
4370
|
options,
|
|
4422
4371
|
command,
|
|
4423
4372
|
escapedCommand,
|
|
@@ -4427,8 +4376,7 @@ const spawnSubprocessSync = ({ file, commandArguments, options, command, escaped
|
|
|
4427
4376
|
const runSubprocessSync = ({ file, commandArguments, options, command, escapedCommand, fileDescriptors, startTime }) => {
|
|
4428
4377
|
try {
|
|
4429
4378
|
addInputOptionsSync(fileDescriptors, options);
|
|
4430
|
-
|
|
4431
|
-
return (0, node_child_process.spawnSync)(...concatenateShell(file, commandArguments, normalizedOptions));
|
|
4379
|
+
return (0, node_child_process.spawnSync)(...concatenateShell(file, commandArguments, normalizeSpawnSyncOptions(options)));
|
|
4432
4380
|
} catch (error) {
|
|
4433
4381
|
return makeEarlyError({
|
|
4434
4382
|
error,
|
|
@@ -4646,19 +4594,17 @@ const handleEarlyError = ({ error, command, escapedCommand, fileDescriptors, opt
|
|
|
4646
4594
|
writable,
|
|
4647
4595
|
duplex
|
|
4648
4596
|
});
|
|
4649
|
-
const earlyError = makeEarlyError({
|
|
4650
|
-
error,
|
|
4651
|
-
command,
|
|
4652
|
-
escapedCommand,
|
|
4653
|
-
fileDescriptors,
|
|
4654
|
-
options,
|
|
4655
|
-
startTime,
|
|
4656
|
-
isSync: false
|
|
4657
|
-
});
|
|
4658
|
-
const promise = handleDummyPromise(earlyError, verboseInfo, options);
|
|
4659
4597
|
return {
|
|
4660
4598
|
subprocess,
|
|
4661
|
-
promise
|
|
4599
|
+
promise: handleDummyPromise(makeEarlyError({
|
|
4600
|
+
error,
|
|
4601
|
+
command,
|
|
4602
|
+
escapedCommand,
|
|
4603
|
+
fileDescriptors,
|
|
4604
|
+
options,
|
|
4605
|
+
startTime,
|
|
4606
|
+
isSync: false
|
|
4607
|
+
}), verboseInfo, options)
|
|
4662
4608
|
};
|
|
4663
4609
|
};
|
|
4664
4610
|
const createDummyStreams = (subprocess, fileDescriptors) => {
|
|
@@ -4953,10 +4899,7 @@ const pipeOutputAsync = (subprocess, fileDescriptors, controller) => {
|
|
|
4953
4899
|
controller
|
|
4954
4900
|
});
|
|
4955
4901
|
}
|
|
4956
|
-
for (const [outputStream, inputStreams] of pipeGroups.entries())
|
|
4957
|
-
const inputStream = inputStreams.length === 1 ? inputStreams[0] : mergeStreams(inputStreams);
|
|
4958
|
-
pipeStreams(inputStream, outputStream);
|
|
4959
|
-
}
|
|
4902
|
+
for (const [outputStream, inputStreams] of pipeGroups.entries()) pipeStreams(inputStreams.length === 1 ? inputStreams[0] : mergeStreams(inputStreams), outputStream);
|
|
4960
4903
|
};
|
|
4961
4904
|
const pipeTransform = (subprocess, stream, direction, fdNumber) => {
|
|
4962
4905
|
if (direction === "output") pipeStreams(subprocess.stdio[fdNumber], stream);
|
|
@@ -5218,10 +5161,9 @@ const normalizePipeArguments = ({ source, sourcePromise, boundOptions, createNes
|
|
|
5218
5161
|
const getDestinationStream = (boundOptions, createNested, pipeArguments) => {
|
|
5219
5162
|
try {
|
|
5220
5163
|
const { destination, pipeOptions: { from, to, unpipeSignal } = {} } = getDestination(boundOptions, createNested, ...pipeArguments);
|
|
5221
|
-
const destinationStream = getToStream(destination, to);
|
|
5222
5164
|
return {
|
|
5223
5165
|
destination,
|
|
5224
|
-
destinationStream,
|
|
5166
|
+
destinationStream: getToStream(destination, to),
|
|
5225
5167
|
from,
|
|
5226
5168
|
unpipeSignal
|
|
5227
5169
|
};
|
|
@@ -5456,13 +5398,12 @@ const stopReadingOnStreamEnd = async (onStreamEnd, controller, stream) => {
|
|
|
5456
5398
|
}
|
|
5457
5399
|
};
|
|
5458
5400
|
const iterateOnStream = ({ stream, controller, binary, shouldEncode, encoding, shouldSplit, preserveNewlines }) => {
|
|
5459
|
-
const onStdoutChunk = (0, node_events.on)(stream, "data", {
|
|
5460
|
-
signal: controller.signal,
|
|
5461
|
-
highWaterMark: HIGH_WATER_MARK,
|
|
5462
|
-
highWatermark: HIGH_WATER_MARK
|
|
5463
|
-
});
|
|
5464
5401
|
return iterateOnData({
|
|
5465
|
-
onStdoutChunk,
|
|
5402
|
+
onStdoutChunk: (0, node_events.on)(stream, "data", {
|
|
5403
|
+
signal: controller.signal,
|
|
5404
|
+
highWaterMark: HIGH_WATER_MARK,
|
|
5405
|
+
highWatermark: HIGH_WATER_MARK
|
|
5406
|
+
}),
|
|
5466
5407
|
controller,
|
|
5467
5408
|
binary,
|
|
5468
5409
|
shouldEncode,
|
|
@@ -5507,13 +5448,12 @@ const getStreamOutput = async ({ stream, onStreamEnd, fdNumber, encoding, buffer
|
|
|
5507
5448
|
await Promise.all([resumeStream(stream), logPromise]);
|
|
5508
5449
|
return;
|
|
5509
5450
|
}
|
|
5510
|
-
const stripFinalNewlineValue = getStripFinalNewline(stripFinalNewline$1, fdNumber);
|
|
5511
5451
|
const iterable = iterateForResult({
|
|
5512
5452
|
stream,
|
|
5513
5453
|
onStreamEnd,
|
|
5514
5454
|
lines,
|
|
5515
5455
|
encoding,
|
|
5516
|
-
stripFinalNewline:
|
|
5456
|
+
stripFinalNewline: getStripFinalNewline(stripFinalNewline$1, fdNumber),
|
|
5517
5457
|
allMixed
|
|
5518
5458
|
});
|
|
5519
5459
|
const [output] = await Promise.all([getStreamContents({
|
|
@@ -5533,15 +5473,14 @@ const logOutputAsync = async ({ stream, onStreamEnd, fdNumber, encoding, allMixe
|
|
|
5533
5473
|
verboseInfo,
|
|
5534
5474
|
fdNumber
|
|
5535
5475
|
})) return;
|
|
5536
|
-
|
|
5476
|
+
await logLines(iterateForResult({
|
|
5537
5477
|
stream,
|
|
5538
5478
|
onStreamEnd,
|
|
5539
5479
|
lines: true,
|
|
5540
5480
|
encoding,
|
|
5541
5481
|
stripFinalNewline: true,
|
|
5542
5482
|
allMixed
|
|
5543
|
-
});
|
|
5544
|
-
await logLines(linesIterable, stream, fdNumber, verboseInfo);
|
|
5483
|
+
}), stream, fdNumber, verboseInfo);
|
|
5545
5484
|
};
|
|
5546
5485
|
const resumeStream = async (stream) => {
|
|
5547
5486
|
await (0, node_timers_promises.setImmediate)();
|
|
@@ -5691,10 +5630,9 @@ const getAllMixed = ({ all, stdout, stderr }) => all && stdout && stderr && stdo
|
|
|
5691
5630
|
//#region ../../node_modules/.pnpm/execa@9.6.0/node_modules/execa/lib/verbose/ipc.js
|
|
5692
5631
|
const shouldLogIpc = (verboseInfo) => isFullVerbose(verboseInfo, "ipc");
|
|
5693
5632
|
const logIpcOutput = (message, verboseInfo) => {
|
|
5694
|
-
const verboseMessage = serializeVerboseMessage(message);
|
|
5695
5633
|
verboseLog({
|
|
5696
5634
|
type: "ipc",
|
|
5697
|
-
verboseMessage,
|
|
5635
|
+
verboseMessage: serializeVerboseMessage(message),
|
|
5698
5636
|
fdNumber: "ipc",
|
|
5699
5637
|
verboseInfo
|
|
5700
5638
|
});
|
|
@@ -5919,10 +5857,9 @@ const createReadable = ({ subprocess, concurrentStreams, encoding }, { from, bin
|
|
|
5919
5857
|
};
|
|
5920
5858
|
const getSubprocessStdout = (subprocess, from, concurrentStreams) => {
|
|
5921
5859
|
const subprocessStdout = getFromStream(subprocess, from);
|
|
5922
|
-
const waitReadableDestroy = addConcurrentStream(concurrentStreams, subprocessStdout, "readableDestroy");
|
|
5923
5860
|
return {
|
|
5924
5861
|
subprocessStdout,
|
|
5925
|
-
waitReadableDestroy
|
|
5862
|
+
waitReadableDestroy: addConcurrentStream(concurrentStreams, subprocessStdout, "readableDestroy")
|
|
5926
5863
|
};
|
|
5927
5864
|
};
|
|
5928
5865
|
const getReadableOptions = ({ readableEncoding, readableObjectMode, readableHighWaterMark }, binary) => binary ? {
|
|
@@ -6000,12 +5937,10 @@ const createWritable = ({ subprocess, concurrentStreams }, { to } = {}) => {
|
|
|
6000
5937
|
};
|
|
6001
5938
|
const getSubprocessStdin = (subprocess, to, concurrentStreams) => {
|
|
6002
5939
|
const subprocessStdin = getToStream(subprocess, to);
|
|
6003
|
-
const waitWritableFinal = addConcurrentStream(concurrentStreams, subprocessStdin, "writableFinal");
|
|
6004
|
-
const waitWritableDestroy = addConcurrentStream(concurrentStreams, subprocessStdin, "writableDestroy");
|
|
6005
5940
|
return {
|
|
6006
5941
|
subprocessStdin,
|
|
6007
|
-
waitWritableFinal,
|
|
6008
|
-
waitWritableDestroy
|
|
5942
|
+
waitWritableFinal: addConcurrentStream(concurrentStreams, subprocessStdin, "writableFinal"),
|
|
5943
|
+
waitWritableDestroy: addConcurrentStream(concurrentStreams, subprocessStdin, "writableDestroy")
|
|
6009
5944
|
};
|
|
6010
5945
|
};
|
|
6011
5946
|
const getWritableMethods = (subprocessStdin, subprocess, waitWritableFinal) => ({
|
|
@@ -6101,15 +6036,14 @@ const onDuplexDestroy = async ({ subprocessStdout, subprocessStdin, subprocess,
|
|
|
6101
6036
|
const createIterable = (subprocess, encoding, { from, binary: binaryOption = false, preserveNewlines = false } = {}) => {
|
|
6102
6037
|
const binary = binaryOption || BINARY_ENCODINGS.has(encoding);
|
|
6103
6038
|
const subprocessStdout = getFromStream(subprocess, from);
|
|
6104
|
-
|
|
6039
|
+
return iterateOnStdoutData(iterateOnSubprocessStream({
|
|
6105
6040
|
subprocessStdout,
|
|
6106
6041
|
subprocess,
|
|
6107
6042
|
binary,
|
|
6108
6043
|
shouldEncode: true,
|
|
6109
6044
|
encoding,
|
|
6110
6045
|
preserveNewlines
|
|
6111
|
-
});
|
|
6112
|
-
return iterateOnStdoutData(onStdoutData, subprocessStdout, subprocess);
|
|
6046
|
+
}), subprocessStdout, subprocess);
|
|
6113
6047
|
};
|
|
6114
6048
|
const iterateOnStdoutData = async function* (onStdoutData, subprocessStdout, subprocess) {
|
|
6115
6049
|
try {
|
|
@@ -6191,7 +6125,6 @@ const handleAsyncArguments = (rawFile, rawArguments, rawOptions) => {
|
|
|
6191
6125
|
const { command, escapedCommand, startTime, verboseInfo } = handleCommand(rawFile, rawArguments, rawOptions);
|
|
6192
6126
|
const { file, commandArguments, options: normalizedOptions } = normalizeOptions(rawFile, rawArguments, rawOptions);
|
|
6193
6127
|
const options = handleAsyncOptions(normalizedOptions);
|
|
6194
|
-
const fileDescriptors = handleStdioAsync(options, verboseInfo);
|
|
6195
6128
|
return {
|
|
6196
6129
|
file,
|
|
6197
6130
|
commandArguments,
|
|
@@ -6200,7 +6133,7 @@ const handleAsyncArguments = (rawFile, rawArguments, rawOptions) => {
|
|
|
6200
6133
|
startTime,
|
|
6201
6134
|
verboseInfo,
|
|
6202
6135
|
options,
|
|
6203
|
-
fileDescriptors
|
|
6136
|
+
fileDescriptors: handleStdioAsync(options, verboseInfo)
|
|
6204
6137
|
};
|
|
6205
6138
|
};
|
|
6206
6139
|
const handleAsyncOptions = ({ timeout, signal,...options }) => {
|
|
@@ -6273,22 +6206,19 @@ const handlePromise = async ({ subprocess, options, startTime, verboseInfo, file
|
|
|
6273
6206
|
});
|
|
6274
6207
|
controller.abort();
|
|
6275
6208
|
onInternalError.resolve();
|
|
6276
|
-
|
|
6277
|
-
const all = stripNewline(allResult, options, "all");
|
|
6278
|
-
const result = getAsyncResult({
|
|
6209
|
+
return handleResult(getAsyncResult({
|
|
6279
6210
|
errorInfo,
|
|
6280
6211
|
exitCode,
|
|
6281
6212
|
signal,
|
|
6282
|
-
stdio,
|
|
6283
|
-
all,
|
|
6213
|
+
stdio: stdioResults.map((stdioResult, fdNumber) => stripNewline(stdioResult, options, fdNumber)),
|
|
6214
|
+
all: stripNewline(allResult, options, "all"),
|
|
6284
6215
|
ipcOutput,
|
|
6285
6216
|
context,
|
|
6286
6217
|
options,
|
|
6287
6218
|
command,
|
|
6288
6219
|
escapedCommand,
|
|
6289
6220
|
startTime
|
|
6290
|
-
});
|
|
6291
|
-
return handleResult(result, verboseInfo, options);
|
|
6221
|
+
}), verboseInfo, options);
|
|
6292
6222
|
};
|
|
6293
6223
|
const getAsyncResult = ({ errorInfo, exitCode, signal, stdio, all, ipcOutput, context, options, command, escapedCommand, startTime }) => "error" in errorInfo ? makeError({
|
|
6294
6224
|
error: errorInfo.error,
|
|
@@ -6361,8 +6291,7 @@ const callBoundExeca = ({ mapArguments, deepOptions = {}, boundOptions = {}, set
|
|
|
6361
6291
|
return isSync ? execaCoreSync(file, commandArguments, options) : execaCoreAsync(file, commandArguments, options, createNested);
|
|
6362
6292
|
};
|
|
6363
6293
|
const parseArguments = ({ mapArguments, firstArgument, nextArguments, deepOptions, boundOptions }) => {
|
|
6364
|
-
const
|
|
6365
|
-
const [initialFile, initialArguments, initialOptions] = normalizeParameters(...callArguments);
|
|
6294
|
+
const [initialFile, initialArguments, initialOptions] = normalizeParameters(...isTemplateString(firstArgument) ? parseTemplates(firstArgument, nextArguments) : [firstArgument, ...nextArguments]);
|
|
6366
6295
|
const mergedOptions = mergeOptions(mergeOptions(deepOptions, boundOptions), initialOptions);
|
|
6367
6296
|
const { file = initialFile, commandArguments = initialArguments, options = mergedOptions, isSync = false } = mapArguments({
|
|
6368
6297
|
file: initialFile,
|
|
@@ -6520,9 +6449,8 @@ function getSummary({ pluginManager, filesCreated, status, hrStart, config }) {
|
|
|
6520
6449
|
//#region src/runners/generate.ts
|
|
6521
6450
|
async function generate({ input, config, progressCache, args }) {
|
|
6522
6451
|
const hrStart = node_process.default.hrtime();
|
|
6523
|
-
const logLevel = __kubb_core_logger.LogMapper[args.logLevel] || 3;
|
|
6524
6452
|
const logger = (0, __kubb_core_logger.createLogger)({
|
|
6525
|
-
logLevel,
|
|
6453
|
+
logLevel: __kubb_core_logger.LogMapper[args.logLevel] || 3,
|
|
6526
6454
|
name: config.name
|
|
6527
6455
|
});
|
|
6528
6456
|
const { root = node_process.default.cwd(),...userConfig } = config;
|
|
@@ -6693,4 +6621,4 @@ async function generate({ input, config, progressCache, args }) {
|
|
|
6693
6621
|
|
|
6694
6622
|
//#endregion
|
|
6695
6623
|
exports.generate = generate;
|
|
6696
|
-
//# sourceMappingURL=generate-
|
|
6624
|
+
//# sourceMappingURL=generate-z0xL-KdK.cjs.map
|