@kubb/cli 4.1.4 → 4.2.0
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 +6 -7
- package/dist/generate-BALD2C5T.cjs.map +0 -1
- package/dist/generate-vHDmA5Mm.js.map +0 -1
|
@@ -150,8 +150,7 @@ const parseTemplate = ({ templates, expressions, tokens, index, template }) => {
|
|
|
150
150
|
const newTokens = concatTokens(tokens, nextTokens, leadingWhitespaces);
|
|
151
151
|
if (index === expressions.length) return newTokens;
|
|
152
152
|
const expression = expressions[index];
|
|
153
|
-
|
|
154
|
-
return concatTokens(newTokens, expressionTokens, trailingWhitespaces);
|
|
153
|
+
return concatTokens(newTokens, Array.isArray(expression) ? expression.map((expression$1) => parseExpression(expression$1)) : [parseExpression(expression)], trailingWhitespaces);
|
|
155
154
|
};
|
|
156
155
|
const splitByWhitespaces = (template, rawTemplate) => {
|
|
157
156
|
if (rawTemplate.length === 0) return {
|
|
@@ -238,8 +237,7 @@ const normalizeFdSpecificOptions = (options) => {
|
|
|
238
237
|
};
|
|
239
238
|
const normalizeFdSpecificOption = (options, optionName) => {
|
|
240
239
|
const optionBaseArray = Array.from({ length: getStdioLength(options) + 1 });
|
|
241
|
-
|
|
242
|
-
return addDefaultValue$1(optionArray, optionName);
|
|
240
|
+
return addDefaultValue$1(normalizeFdSpecificValue(options[optionName], optionBaseArray, optionName), optionName);
|
|
243
241
|
};
|
|
244
242
|
const getStdioLength = ({ stdio }) => Array.isArray(stdio) ? Math.max(stdio.length, STANDARD_STREAMS_ALIASES.length) : STANDARD_STREAMS_ALIASES.length;
|
|
245
243
|
const normalizeFdSpecificValue = (optionValue, optionArray, optionName) => isPlainObject(optionValue) ? normalizeOptionObject(optionValue, optionArray, optionName) : optionArray.fill(optionValue);
|
|
@@ -306,11 +304,9 @@ const VERBOSE_VALUES = [
|
|
|
306
304
|
//#region ../../node_modules/.pnpm/execa@9.6.0/node_modules/execa/lib/arguments/escape.js
|
|
307
305
|
const joinCommand = (filePath, rawArguments) => {
|
|
308
306
|
const fileAndArguments = [filePath, ...rawArguments];
|
|
309
|
-
const command = fileAndArguments.join(" ");
|
|
310
|
-
const escapedCommand = fileAndArguments.map((fileAndArgument) => quoteString(escapeControlCharacters(fileAndArgument))).join(" ");
|
|
311
307
|
return {
|
|
312
|
-
command,
|
|
313
|
-
escapedCommand
|
|
308
|
+
command: fileAndArguments.join(" "),
|
|
309
|
+
escapedCommand: fileAndArguments.map((fileAndArgument) => quoteString(escapeControlCharacters(fileAndArgument))).join(" ")
|
|
314
310
|
};
|
|
315
311
|
};
|
|
316
312
|
const escapeLines = (lines) => stripVTControlCharacters(lines).split("\n").map((line) => escapeControlCharacters(line)).join("\n");
|
|
@@ -752,13 +748,11 @@ const appendNewline = (printedLine) => printedLine.endsWith("\n") ? printedLine
|
|
|
752
748
|
//#endregion
|
|
753
749
|
//#region ../../node_modules/.pnpm/execa@9.6.0/node_modules/execa/lib/verbose/log.js
|
|
754
750
|
const verboseLog = ({ type, verboseMessage, fdNumber, verboseInfo, result }) => {
|
|
755
|
-
const
|
|
751
|
+
const finalLines = applyVerboseOnLines(getPrintedLines(verboseMessage, getVerboseObject({
|
|
756
752
|
type,
|
|
757
753
|
result,
|
|
758
754
|
verboseInfo
|
|
759
|
-
});
|
|
760
|
-
const printedLines = getPrintedLines(verboseMessage, verboseObject);
|
|
761
|
-
const finalLines = applyVerboseOnLines(printedLines, verboseInfo, fdNumber);
|
|
755
|
+
})), verboseInfo, fdNumber);
|
|
762
756
|
if (finalLines !== "") console.warn(finalLines.slice(0, -1));
|
|
763
757
|
};
|
|
764
758
|
const getVerboseObject = ({ type, result, verboseInfo: { escapedCommand, commandId, rawOptions: { piped = false,...options } } }) => ({
|
|
@@ -781,8 +775,7 @@ const getPrintedLine = (verboseObject) => {
|
|
|
781
775
|
};
|
|
782
776
|
};
|
|
783
777
|
const serializeVerboseMessage = (message) => {
|
|
784
|
-
|
|
785
|
-
return escapeLines(messageString).replaceAll(" ", " ".repeat(TAB_SIZE));
|
|
778
|
+
return escapeLines(typeof message === "string" ? message : inspect(message)).replaceAll(" ", " ".repeat(TAB_SIZE));
|
|
786
779
|
};
|
|
787
780
|
const TAB_SIZE = 2;
|
|
788
781
|
|
|
@@ -801,11 +794,10 @@ const logCommand = (escapedCommand, verboseInfo) => {
|
|
|
801
794
|
//#region ../../node_modules/.pnpm/execa@9.6.0/node_modules/execa/lib/verbose/info.js
|
|
802
795
|
const getVerboseInfo = (verbose, escapedCommand, rawOptions) => {
|
|
803
796
|
validateVerbose(verbose);
|
|
804
|
-
const commandId = getCommandId(verbose);
|
|
805
797
|
return {
|
|
806
798
|
verbose,
|
|
807
799
|
escapedCommand,
|
|
808
|
-
commandId,
|
|
800
|
+
commandId: getCommandId(verbose),
|
|
809
801
|
rawOptions
|
|
810
802
|
};
|
|
811
803
|
};
|
|
@@ -832,8 +824,7 @@ const getDurationMs = (startTime) => Number(hrtime.bigint() - startTime) / 1e6;
|
|
|
832
824
|
const handleCommand = (filePath, rawArguments, rawOptions) => {
|
|
833
825
|
const startTime = getStartTime();
|
|
834
826
|
const { command, escapedCommand } = joinCommand(filePath, rawArguments);
|
|
835
|
-
const
|
|
836
|
-
const verboseInfo = getVerboseInfo(verbose, escapedCommand, { ...rawOptions });
|
|
827
|
+
const verboseInfo = getVerboseInfo(normalizeFdSpecificOption(rawOptions, "verbose"), escapedCommand, { ...rawOptions });
|
|
837
828
|
logCommand(escapedCommand, verboseInfo);
|
|
838
829
|
return {
|
|
839
830
|
command,
|
|
@@ -983,8 +974,7 @@ var require_which = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/which
|
|
|
983
974
|
const ppRaw = pathEnv[i$1];
|
|
984
975
|
const pathPart = /^".*"$/.test(ppRaw) ? ppRaw.slice(1, -1) : ppRaw;
|
|
985
976
|
const pCmd = path$3.join(pathPart, cmd);
|
|
986
|
-
|
|
987
|
-
resolve(subStep(p, i$1, 0));
|
|
977
|
+
resolve(subStep(!pathPart && /^\.[\\\/]/.test(cmd) ? cmd.slice(0, 2) + pCmd : pCmd, i$1, 0));
|
|
988
978
|
});
|
|
989
979
|
const subStep = (p, i$1, ii) => new Promise((resolve, reject) => {
|
|
990
980
|
if (ii === pathExt.length) return resolve(step(i$1 + 1));
|
|
@@ -1312,9 +1302,7 @@ const npmRunPathEnv = ({ env = process$1.env,...options } = {}) => {
|
|
|
1312
1302
|
//#endregion
|
|
1313
1303
|
//#region ../../node_modules/.pnpm/execa@9.6.0/node_modules/execa/lib/return/final-error.js
|
|
1314
1304
|
const getFinalError = (originalError, message, isSync) => {
|
|
1315
|
-
|
|
1316
|
-
const options = originalError instanceof DiscardedError ? {} : { cause: originalError };
|
|
1317
|
-
return new ErrorClass(message, options);
|
|
1305
|
+
return new (isSync ? ExecaSyncError : ExecaError)(message, originalError instanceof DiscardedError ? {} : { cause: originalError });
|
|
1318
1306
|
};
|
|
1319
1307
|
var DiscardedError = class extends Error {};
|
|
1320
1308
|
const setErrorName = (ErrorClass, value) => {
|
|
@@ -2052,8 +2040,7 @@ const isConnected = (anyProcess) => {
|
|
|
2052
2040
|
//#region ../../node_modules/.pnpm/execa@9.6.0/node_modules/execa/lib/ipc/strict.js
|
|
2053
2041
|
const handleSendStrict = ({ anyProcess, channel, isSubprocess, message, strict }) => {
|
|
2054
2042
|
if (!strict) return message;
|
|
2055
|
-
const
|
|
2056
|
-
const hasListeners = hasMessageListeners(anyProcess, ipcEmitter);
|
|
2043
|
+
const hasListeners = hasMessageListeners(anyProcess, getIpcEmitter(anyProcess, channel, isSubprocess));
|
|
2057
2044
|
return {
|
|
2058
2045
|
id: count++,
|
|
2059
2046
|
type: REQUEST_TYPE,
|
|
@@ -2126,11 +2113,9 @@ const RESPONSE_TYPE = "execa:ipc:response";
|
|
|
2126
2113
|
const startSendMessage = (anyProcess, wrappedMessage, strict) => {
|
|
2127
2114
|
if (!OUTGOING_MESSAGES.has(anyProcess)) OUTGOING_MESSAGES.set(anyProcess, /* @__PURE__ */ new Set());
|
|
2128
2115
|
const outgoingMessages = OUTGOING_MESSAGES.get(anyProcess);
|
|
2129
|
-
const onMessageSent = createDeferred();
|
|
2130
|
-
const id = strict ? wrappedMessage.id : void 0;
|
|
2131
2116
|
const outgoingMessage = {
|
|
2132
|
-
onMessageSent,
|
|
2133
|
-
id
|
|
2117
|
+
onMessageSent: createDeferred(),
|
|
2118
|
+
id: strict ? wrappedMessage.id : void 0
|
|
2134
2119
|
};
|
|
2135
2120
|
outgoingMessages.add(outgoingMessage);
|
|
2136
2121
|
return {
|
|
@@ -2291,8 +2276,7 @@ const throwOnGracefulCancel = ({ subprocess, cancelSignal, gracefulCancel, force
|
|
|
2291
2276
|
})] : [];
|
|
2292
2277
|
const sendOnAbort = async ({ subprocess, cancelSignal, forceKillAfterDelay, context, controller: { signal } }) => {
|
|
2293
2278
|
await onAbortedSignal(cancelSignal, signal);
|
|
2294
|
-
|
|
2295
|
-
await sendAbort(subprocess, reason);
|
|
2279
|
+
await sendAbort(subprocess, getReason(cancelSignal));
|
|
2296
2280
|
killOnTimeout({
|
|
2297
2281
|
kill: subprocess.kill,
|
|
2298
2282
|
forceKillAfterDelay,
|
|
@@ -2466,8 +2450,7 @@ const normalizeOptions = (filePath, rawArguments, rawOptions) => {
|
|
|
2466
2450
|
rawOptions.cwd = normalizeCwd(rawOptions.cwd);
|
|
2467
2451
|
const [processedFile, processedArguments, processedOptions] = handleNodeOption(filePath, rawArguments, rawOptions);
|
|
2468
2452
|
const { command: file, args: commandArguments, options: initialOptions } = import_cross_spawn.default._parse(processedFile, processedArguments, processedOptions);
|
|
2469
|
-
const
|
|
2470
|
-
const options = addDefaultOptions(fdOptions);
|
|
2453
|
+
const options = addDefaultOptions(normalizeFdSpecificOptions(initialOptions));
|
|
2471
2454
|
validateTimeout(options);
|
|
2472
2455
|
validateEncoding(options);
|
|
2473
2456
|
validateIpcInputOption(options);
|
|
@@ -2636,7 +2619,7 @@ const u = Object.create(a, {
|
|
|
2636
2619
|
}
|
|
2637
2620
|
});
|
|
2638
2621
|
function h({ preventCancel: r = !1 } = {}) {
|
|
2639
|
-
const
|
|
2622
|
+
const t = new c(this.getReader(), r), s = Object.create(u);
|
|
2640
2623
|
return s[n] = t, s;
|
|
2641
2624
|
}
|
|
2642
2625
|
|
|
@@ -2685,18 +2668,14 @@ const getStreamContents$1 = async (stream, { init, convertChunk, getSize, trunca
|
|
|
2685
2668
|
const state = init();
|
|
2686
2669
|
state.length = 0;
|
|
2687
2670
|
try {
|
|
2688
|
-
for await (const chunk of asyncIterable) {
|
|
2689
|
-
|
|
2690
|
-
|
|
2691
|
-
|
|
2692
|
-
|
|
2693
|
-
|
|
2694
|
-
|
|
2695
|
-
|
|
2696
|
-
addChunk,
|
|
2697
|
-
maxBuffer
|
|
2698
|
-
});
|
|
2699
|
-
}
|
|
2671
|
+
for await (const chunk of asyncIterable) appendChunk({
|
|
2672
|
+
convertedChunk: convertChunk[getChunkType(chunk)](chunk, state),
|
|
2673
|
+
state,
|
|
2674
|
+
getSize,
|
|
2675
|
+
truncateChunk,
|
|
2676
|
+
addChunk,
|
|
2677
|
+
maxBuffer
|
|
2678
|
+
});
|
|
2700
2679
|
appendFinalChunk({
|
|
2701
2680
|
state,
|
|
2702
2681
|
convertChunk,
|
|
@@ -2886,10 +2865,9 @@ const stringMethods = {
|
|
|
2886
2865
|
const handleMaxBuffer = ({ error, stream, readableObjectMode, lines, encoding, fdNumber }) => {
|
|
2887
2866
|
if (!(error instanceof MaxBufferError)) throw error;
|
|
2888
2867
|
if (fdNumber === "all") return error;
|
|
2889
|
-
const unit = getMaxBufferUnit(readableObjectMode, lines, encoding);
|
|
2890
2868
|
error.maxBufferInfo = {
|
|
2891
2869
|
fdNumber,
|
|
2892
|
-
unit
|
|
2870
|
+
unit: getMaxBufferUnit(readableObjectMode, lines, encoding)
|
|
2893
2871
|
};
|
|
2894
2872
|
stream.destroy();
|
|
2895
2873
|
throw error;
|
|
@@ -2959,19 +2937,16 @@ const createMessages = ({ stdio, all, ipcOutput, originalError, signal, signalDe
|
|
|
2959
2937
|
killSignal
|
|
2960
2938
|
});
|
|
2961
2939
|
const originalMessage = getOriginalMessage(originalError, cwd);
|
|
2962
|
-
const
|
|
2963
|
-
const shortMessage = `${prefix}: ${escapedCommand}${suffix}`;
|
|
2964
|
-
const messageStdio = all === void 0 ? [stdio[2], stdio[1]] : [all];
|
|
2965
|
-
const message = [
|
|
2966
|
-
shortMessage,
|
|
2967
|
-
...messageStdio,
|
|
2968
|
-
...stdio.slice(3),
|
|
2969
|
-
ipcOutput.map((ipcMessage) => serializeIpcMessage(ipcMessage)).join("\n")
|
|
2970
|
-
].map((messagePart) => escapeLines(stripFinalNewline(serializeMessagePart(messagePart)))).filter(Boolean).join("\n\n");
|
|
2940
|
+
const shortMessage = `${prefix}: ${escapedCommand}${originalMessage === void 0 ? "" : `\n${originalMessage}`}`;
|
|
2971
2941
|
return {
|
|
2972
2942
|
originalMessage,
|
|
2973
2943
|
shortMessage,
|
|
2974
|
-
message
|
|
2944
|
+
message: [
|
|
2945
|
+
shortMessage,
|
|
2946
|
+
...all === void 0 ? [stdio[2], stdio[1]] : [all],
|
|
2947
|
+
...stdio.slice(3),
|
|
2948
|
+
ipcOutput.map((ipcMessage) => serializeIpcMessage(ipcMessage)).join("\n")
|
|
2949
|
+
].map((messagePart) => escapeLines(stripFinalNewline(serializeMessagePart(messagePart)))).filter(Boolean).join("\n\n")
|
|
2975
2950
|
};
|
|
2976
2951
|
};
|
|
2977
2952
|
const getErrorPrefix = ({ originalError, timedOut, timeout, isMaxBuffer, maxBuffer, errorCode, signal, signalDescription, exitCode, isCanceled, isGracefullyCanceled, isForcefullyTerminated, forceKillAfterDelay, killSignal }) => {
|
|
@@ -2992,8 +2967,7 @@ const getErrorPrefix = ({ originalError, timedOut, timeout, isMaxBuffer, maxBuff
|
|
|
2992
2967
|
const getForcefulSuffix = (isForcefullyTerminated, forceKillAfterDelay) => isForcefullyTerminated ? ` and was forcefully terminated after ${forceKillAfterDelay} milliseconds` : "";
|
|
2993
2968
|
const getOriginalMessage = (originalError, cwd) => {
|
|
2994
2969
|
if (originalError instanceof DiscardedError) return;
|
|
2995
|
-
const
|
|
2996
|
-
const escapedOriginalMessage = escapeLines(fixCwdError(originalMessage, cwd));
|
|
2970
|
+
const escapedOriginalMessage = escapeLines(fixCwdError(isExecaError(originalError) ? originalError.originalMessage : String(originalError?.message ?? originalError), cwd));
|
|
2997
2971
|
return escapedOriginalMessage === "" ? void 0 : escapedOriginalMessage;
|
|
2998
2972
|
};
|
|
2999
2973
|
const serializeIpcMessage = (ipcMessage) => typeof ipcMessage === "string" ? ipcMessage : inspect(ipcMessage);
|
|
@@ -3115,11 +3089,10 @@ const omitUndefinedProperties = (result) => Object.fromEntries(Object.entries(re
|
|
|
3115
3089
|
const normalizeExitPayload = (rawExitCode, rawSignal) => {
|
|
3116
3090
|
const exitCode = rawExitCode === null ? void 0 : rawExitCode;
|
|
3117
3091
|
const signal = rawSignal === null ? void 0 : rawSignal;
|
|
3118
|
-
const signalDescription = signal === void 0 ? void 0 : getSignalDescription(rawSignal);
|
|
3119
3092
|
return {
|
|
3120
3093
|
exitCode,
|
|
3121
3094
|
signal,
|
|
3122
|
-
signalDescription
|
|
3095
|
+
signalDescription: signal === void 0 ? void 0 : getSignalDescription(rawSignal)
|
|
3123
3096
|
};
|
|
3124
3097
|
};
|
|
3125
3098
|
|
|
@@ -3225,9 +3198,7 @@ function prettyMilliseconds(milliseconds, options) {
|
|
|
3225
3198
|
add(Number.parseFloat(millisecondsString), "millisecond", "ms", millisecondsString);
|
|
3226
3199
|
}
|
|
3227
3200
|
} else {
|
|
3228
|
-
const
|
|
3229
|
-
const secondsDecimalDigits = typeof options.secondsDecimalDigits === "number" ? options.secondsDecimalDigits : 1;
|
|
3230
|
-
const secondsFixed = floorDecimals(seconds, secondsDecimalDigits);
|
|
3201
|
+
const secondsFixed = floorDecimals((isBigInt ? Number(milliseconds % ONE_DAY_IN_MILLISECONDS) : milliseconds) / 1e3 % 60, typeof options.secondsDecimalDigits === "number" ? options.secondsDecimalDigits : 1);
|
|
3231
3202
|
const secondsString = options.keepDecimalsOnWholeSeconds ? secondsFixed : secondsFixed.replace(/\.0+$/, "");
|
|
3232
3203
|
add(Number.parseFloat(secondsString), "second", "s", secondsString);
|
|
3233
3204
|
}
|
|
@@ -3256,10 +3227,9 @@ const logResult = (result, verboseInfo) => {
|
|
|
3256
3227
|
logDuration(result, verboseInfo);
|
|
3257
3228
|
};
|
|
3258
3229
|
const logDuration = (result, verboseInfo) => {
|
|
3259
|
-
const verboseMessage = `(done in ${prettyMilliseconds(result.durationMs)})`;
|
|
3260
3230
|
verboseLog({
|
|
3261
3231
|
type: "duration",
|
|
3262
|
-
verboseMessage
|
|
3232
|
+
verboseMessage: `(done in ${prettyMilliseconds(result.durationMs)})`,
|
|
3263
3233
|
verboseInfo,
|
|
3264
3234
|
result
|
|
3265
3235
|
});
|
|
@@ -3393,10 +3363,9 @@ const getOutputObjectModes = (objectMode, index, newTransforms) => {
|
|
|
3393
3363
|
};
|
|
3394
3364
|
const getInputObjectModes = (objectMode, index, newTransforms) => {
|
|
3395
3365
|
const writableObjectMode = index === 0 ? objectMode === true : newTransforms[index - 1].value.readableObjectMode;
|
|
3396
|
-
const readableObjectMode = index !== newTransforms.length - 1 && (objectMode ?? writableObjectMode);
|
|
3397
3366
|
return {
|
|
3398
3367
|
writableObjectMode,
|
|
3399
|
-
readableObjectMode
|
|
3368
|
+
readableObjectMode: index !== newTransforms.length - 1 && (objectMode ?? writableObjectMode)
|
|
3400
3369
|
};
|
|
3401
3370
|
};
|
|
3402
3371
|
const getFdObjectMode = (stdioItems, direction) => {
|
|
@@ -3705,8 +3674,7 @@ const validateDuplicateStreamSync = ({ otherStdioItems, type, value, optionName,
|
|
|
3705
3674
|
const getDuplicateStreamInstance = ({ otherStdioItems, type, value, optionName, direction }) => {
|
|
3706
3675
|
const duplicateStdioItems = otherStdioItems.filter((stdioItem) => hasSameValue(stdioItem, value));
|
|
3707
3676
|
if (duplicateStdioItems.length === 0) return;
|
|
3708
|
-
|
|
3709
|
-
throwOnDuplicateStream(differentStdioItem, optionName, type);
|
|
3677
|
+
throwOnDuplicateStream(duplicateStdioItems.find((stdioItem) => stdioItem.direction !== direction), optionName, type);
|
|
3710
3678
|
return direction === "output" ? duplicateStdioItems[0].stream : void 0;
|
|
3711
3679
|
};
|
|
3712
3680
|
const hasSameValue = ({ type, value }, secondValue) => {
|
|
@@ -3715,8 +3683,7 @@ const hasSameValue = ({ type, value }, secondValue) => {
|
|
|
3715
3683
|
return value === secondValue;
|
|
3716
3684
|
};
|
|
3717
3685
|
const validateDuplicateTransform = ({ otherStdioItems, type, value, optionName }) => {
|
|
3718
|
-
|
|
3719
|
-
throwOnDuplicateStream(duplicateStdioItem, optionName, type);
|
|
3686
|
+
throwOnDuplicateStream(otherStdioItems.find(({ value: { transform } }) => transform === value.transform), optionName, type);
|
|
3720
3687
|
};
|
|
3721
3688
|
const throwOnDuplicateStream = (stdioItem, optionName, type) => {
|
|
3722
3689
|
if (stdioItem !== void 0) throw new TypeError(`The \`${stdioItem.optionName}\` and \`${optionName}\` options must not target ${TYPE_TO_MESSAGE[type]} that is the same.`);
|
|
@@ -3725,14 +3692,13 @@ const throwOnDuplicateStream = (stdioItem, optionName, type) => {
|
|
|
3725
3692
|
//#endregion
|
|
3726
3693
|
//#region ../../node_modules/.pnpm/execa@9.6.0/node_modules/execa/lib/stdio/handle.js
|
|
3727
3694
|
const handleStdio = (addProperties$2, options, verboseInfo, isSync) => {
|
|
3728
|
-
const initialFileDescriptors = normalizeStdioOption(options, verboseInfo, isSync).map((stdioOption, fdNumber) => getFileDescriptor({
|
|
3729
|
-
stdioOption,
|
|
3730
|
-
fdNumber,
|
|
3731
|
-
options,
|
|
3732
|
-
isSync
|
|
3733
|
-
}));
|
|
3734
3695
|
const fileDescriptors = getFinalFileDescriptors({
|
|
3735
|
-
initialFileDescriptors,
|
|
3696
|
+
initialFileDescriptors: normalizeStdioOption(options, verboseInfo, isSync).map((stdioOption, fdNumber) => getFileDescriptor({
|
|
3697
|
+
stdioOption,
|
|
3698
|
+
fdNumber,
|
|
3699
|
+
options,
|
|
3700
|
+
isSync
|
|
3701
|
+
})),
|
|
3736
3702
|
addProperties: addProperties$2,
|
|
3737
3703
|
options,
|
|
3738
3704
|
isSync
|
|
@@ -3749,14 +3715,13 @@ const getFileDescriptor = ({ stdioOption, fdNumber, options, isSync }) => {
|
|
|
3749
3715
|
optionName
|
|
3750
3716
|
});
|
|
3751
3717
|
const direction = getStreamDirection(initialStdioItems, fdNumber, optionName);
|
|
3752
|
-
const
|
|
3718
|
+
const normalizedStdioItems = normalizeTransforms(initialStdioItems.map((stdioItem) => handleNativeStream({
|
|
3753
3719
|
stdioItem,
|
|
3754
3720
|
isStdioArray,
|
|
3755
3721
|
fdNumber,
|
|
3756
3722
|
direction,
|
|
3757
3723
|
isSync
|
|
3758
|
-
}));
|
|
3759
|
-
const normalizedStdioItems = normalizeTransforms(stdioItems, optionName, direction, options);
|
|
3724
|
+
})), optionName, direction, options);
|
|
3760
3725
|
const objectMode = getFdObjectMode(normalizedStdioItems, direction);
|
|
3761
3726
|
validateFileObjectMode(normalizedStdioItems, objectMode);
|
|
3762
3727
|
return {
|
|
@@ -3766,8 +3731,7 @@ const getFileDescriptor = ({ stdioOption, fdNumber, options, isSync }) => {
|
|
|
3766
3731
|
};
|
|
3767
3732
|
};
|
|
3768
3733
|
const initializeStdioItems = ({ stdioOption, fdNumber, options, optionName }) => {
|
|
3769
|
-
const
|
|
3770
|
-
const stdioItems = filterDuplicates(initialStdioItems);
|
|
3734
|
+
const stdioItems = filterDuplicates([...(Array.isArray(stdioOption) ? stdioOption : [stdioOption]).map((value) => initializeStdioItem(value, optionName)), ...handleInputOptions(options, fdNumber)]);
|
|
3771
3735
|
const isStdioArray = stdioItems.length > 1;
|
|
3772
3736
|
validateStdioArray(stdioItems, isStdioArray, optionName);
|
|
3773
3737
|
validateStreams(stdioItems);
|
|
@@ -3817,18 +3781,17 @@ const getFinalFileDescriptors = ({ initialFileDescriptors, addProperties: addPro
|
|
|
3817
3781
|
}
|
|
3818
3782
|
};
|
|
3819
3783
|
const getFinalFileDescriptor = ({ fileDescriptor: { direction, objectMode, stdioItems }, fileDescriptors, addProperties: addProperties$2, options, isSync }) => {
|
|
3820
|
-
const finalStdioItems = stdioItems.map((stdioItem) => addStreamProperties({
|
|
3821
|
-
stdioItem,
|
|
3822
|
-
addProperties: addProperties$2,
|
|
3823
|
-
direction,
|
|
3824
|
-
options,
|
|
3825
|
-
fileDescriptors,
|
|
3826
|
-
isSync
|
|
3827
|
-
}));
|
|
3828
3784
|
return {
|
|
3829
3785
|
direction,
|
|
3830
3786
|
objectMode,
|
|
3831
|
-
stdioItems:
|
|
3787
|
+
stdioItems: stdioItems.map((stdioItem) => addStreamProperties({
|
|
3788
|
+
stdioItem,
|
|
3789
|
+
addProperties: addProperties$2,
|
|
3790
|
+
direction,
|
|
3791
|
+
options,
|
|
3792
|
+
fileDescriptors,
|
|
3793
|
+
isSync
|
|
3794
|
+
}))
|
|
3832
3795
|
};
|
|
3833
3796
|
};
|
|
3834
3797
|
const addStreamProperties = ({ stdioItem, addProperties: addProperties$2, direction, options, fileDescriptors, isSync }) => {
|
|
@@ -4124,10 +4087,7 @@ const generatorToStream = ({ value, value: { transform, final, writableObjectMod
|
|
|
4124
4087
|
const runGeneratorsSync = (chunks, stdioItems, encoding, isInput) => {
|
|
4125
4088
|
const generators = stdioItems.filter(({ type }) => type === "generator");
|
|
4126
4089
|
const reversedGenerators = isInput ? generators.reverse() : generators;
|
|
4127
|
-
for (const { value, optionName } of reversedGenerators)
|
|
4128
|
-
const generators$1 = addInternalGenerators(value, encoding, optionName);
|
|
4129
|
-
chunks = runTransformSync(generators$1, chunks);
|
|
4130
|
-
}
|
|
4090
|
+
for (const { value, optionName } of reversedGenerators) chunks = runTransformSync(addInternalGenerators(value, encoding, optionName), chunks);
|
|
4131
4091
|
return chunks;
|
|
4132
4092
|
};
|
|
4133
4093
|
const addInternalGenerators = ({ transform, final, binary, writableObjectMode, readableObjectMode, preserveNewlines }, encoding, optionName) => {
|
|
@@ -4164,8 +4124,7 @@ const addInputOptionSync = (fileDescriptors, fdNumber, options) => {
|
|
|
4164
4124
|
const [{ type, optionName }] = allStdioItems;
|
|
4165
4125
|
throw new TypeError(`Only the \`stdin\` option, not \`${optionName}\`, can be ${TYPE_TO_MESSAGE[type]} with synchronous methods.`);
|
|
4166
4126
|
}
|
|
4167
|
-
|
|
4168
|
-
options.input = joinToUint8Array(transformedContents);
|
|
4127
|
+
options.input = joinToUint8Array(allStdioItems.map(({ contents }) => contents).map((contents) => applySingleInputGeneratorsSync(contents, stdioItems)));
|
|
4169
4128
|
};
|
|
4170
4129
|
const applySingleInputGeneratorsSync = (contents, stdioItems) => {
|
|
4171
4130
|
const newContents = runGeneratorsSync(contents, stdioItems, "utf8", true);
|
|
@@ -4190,10 +4149,9 @@ const logLinesSync = (linesArray, fdNumber, verboseInfo) => {
|
|
|
4190
4149
|
};
|
|
4191
4150
|
const isPipingStream = (stream) => stream._readableState.pipes.length > 0;
|
|
4192
4151
|
const logLine = (line, fdNumber, verboseInfo) => {
|
|
4193
|
-
const verboseMessage = serializeVerboseMessage(line);
|
|
4194
4152
|
verboseLog({
|
|
4195
4153
|
type: "output",
|
|
4196
|
-
verboseMessage,
|
|
4154
|
+
verboseMessage: serializeVerboseMessage(line),
|
|
4197
4155
|
fdNumber,
|
|
4198
4156
|
verboseInfo
|
|
4199
4157
|
});
|
|
@@ -4220,12 +4178,10 @@ const transformOutputSync = ({ fileDescriptors, syncResult: { output }, options,
|
|
|
4220
4178
|
};
|
|
4221
4179
|
const transformOutputResultSync = ({ result, fileDescriptors, fdNumber, state, outputFiles, isMaxBuffer, verboseInfo }, { buffer, encoding, lines, stripFinalNewline: stripFinalNewline$1, maxBuffer }) => {
|
|
4222
4180
|
if (result === null) return;
|
|
4223
|
-
const
|
|
4224
|
-
const uint8ArrayResult = bufferToUint8Array(truncatedResult);
|
|
4181
|
+
const uint8ArrayResult = bufferToUint8Array(truncateMaxBufferSync(result, isMaxBuffer, maxBuffer));
|
|
4225
4182
|
const { stdioItems, objectMode } = fileDescriptors[fdNumber];
|
|
4226
|
-
const chunks = runOutputGeneratorsSync([uint8ArrayResult], stdioItems, encoding, state);
|
|
4227
4183
|
const { serializedResult, finalResult = serializedResult } = serializeChunks({
|
|
4228
|
-
chunks,
|
|
4184
|
+
chunks: runOutputGeneratorsSync([uint8ArrayResult], stdioItems, encoding, state),
|
|
4229
4185
|
objectMode,
|
|
4230
4186
|
encoding,
|
|
4231
4187
|
lines,
|
|
@@ -4336,14 +4292,12 @@ const isFailedExit = (exitCode, signal) => exitCode !== 0 || signal !== null;
|
|
|
4336
4292
|
//#region ../../node_modules/.pnpm/execa@9.6.0/node_modules/execa/lib/resolve/exit-sync.js
|
|
4337
4293
|
const getExitResultSync = ({ error, status: exitCode, signal, output }, { maxBuffer }) => {
|
|
4338
4294
|
const resultError = getResultError(error, exitCode, signal);
|
|
4339
|
-
const timedOut = resultError?.code === "ETIMEDOUT";
|
|
4340
|
-
const isMaxBuffer = isMaxBufferSync(resultError, output, maxBuffer);
|
|
4341
4295
|
return {
|
|
4342
4296
|
resultError,
|
|
4343
4297
|
exitCode,
|
|
4344
4298
|
signal,
|
|
4345
|
-
timedOut,
|
|
4346
|
-
isMaxBuffer
|
|
4299
|
+
timedOut: resultError?.code === "ETIMEDOUT",
|
|
4300
|
+
isMaxBuffer: isMaxBufferSync(resultError, output, maxBuffer)
|
|
4347
4301
|
};
|
|
4348
4302
|
};
|
|
4349
4303
|
const getResultError = (error, exitCode, signal) => {
|
|
@@ -4355,7 +4309,7 @@ const getResultError = (error, exitCode, signal) => {
|
|
|
4355
4309
|
//#region ../../node_modules/.pnpm/execa@9.6.0/node_modules/execa/lib/methods/main-sync.js
|
|
4356
4310
|
const execaCoreSync = (rawFile, rawArguments, rawOptions) => {
|
|
4357
4311
|
const { file, commandArguments, command, escapedCommand, startTime, verboseInfo, options, fileDescriptors } = handleSyncArguments(rawFile, rawArguments, rawOptions);
|
|
4358
|
-
|
|
4312
|
+
return handleResult(spawnSubprocessSync({
|
|
4359
4313
|
file,
|
|
4360
4314
|
commandArguments,
|
|
4361
4315
|
options,
|
|
@@ -4364,15 +4318,12 @@ const execaCoreSync = (rawFile, rawArguments, rawOptions) => {
|
|
|
4364
4318
|
verboseInfo,
|
|
4365
4319
|
fileDescriptors,
|
|
4366
4320
|
startTime
|
|
4367
|
-
});
|
|
4368
|
-
return handleResult(result, verboseInfo, options);
|
|
4321
|
+
}), verboseInfo, options);
|
|
4369
4322
|
};
|
|
4370
4323
|
const handleSyncArguments = (rawFile, rawArguments, rawOptions) => {
|
|
4371
4324
|
const { command, escapedCommand, startTime, verboseInfo } = handleCommand(rawFile, rawArguments, rawOptions);
|
|
4372
|
-
const
|
|
4373
|
-
const { file, commandArguments, options } = normalizeOptions(rawFile, rawArguments, syncOptions);
|
|
4325
|
+
const { file, commandArguments, options } = normalizeOptions(rawFile, rawArguments, normalizeSyncOptions(rawOptions));
|
|
4374
4326
|
validateSyncOptions(options);
|
|
4375
|
-
const fileDescriptors = handleStdioSync(options, verboseInfo);
|
|
4376
4327
|
return {
|
|
4377
4328
|
file,
|
|
4378
4329
|
commandArguments,
|
|
@@ -4381,7 +4332,7 @@ const handleSyncArguments = (rawFile, rawArguments, rawOptions) => {
|
|
|
4381
4332
|
startTime,
|
|
4382
4333
|
verboseInfo,
|
|
4383
4334
|
options,
|
|
4384
|
-
fileDescriptors
|
|
4335
|
+
fileDescriptors: handleStdioSync(options, verboseInfo)
|
|
4385
4336
|
};
|
|
4386
4337
|
};
|
|
4387
4338
|
const normalizeSyncOptions = (options) => options.node && !options.ipc ? {
|
|
@@ -4416,16 +4367,14 @@ const spawnSubprocessSync = ({ file, commandArguments, options, command, escaped
|
|
|
4416
4367
|
isMaxBuffer,
|
|
4417
4368
|
verboseInfo
|
|
4418
4369
|
});
|
|
4419
|
-
const stdio = output.map((stdioOutput, fdNumber) => stripNewline(stdioOutput, options, fdNumber));
|
|
4420
|
-
const all = stripNewline(getAllSync(output, options), options, "all");
|
|
4421
4370
|
return getSyncResult({
|
|
4422
4371
|
error,
|
|
4423
4372
|
exitCode,
|
|
4424
4373
|
signal,
|
|
4425
4374
|
timedOut,
|
|
4426
4375
|
isMaxBuffer,
|
|
4427
|
-
stdio,
|
|
4428
|
-
all,
|
|
4376
|
+
stdio: output.map((stdioOutput, fdNumber) => stripNewline(stdioOutput, options, fdNumber)),
|
|
4377
|
+
all: stripNewline(getAllSync(output, options), options, "all"),
|
|
4429
4378
|
options,
|
|
4430
4379
|
command,
|
|
4431
4380
|
escapedCommand,
|
|
@@ -4435,8 +4384,7 @@ const spawnSubprocessSync = ({ file, commandArguments, options, command, escaped
|
|
|
4435
4384
|
const runSubprocessSync = ({ file, commandArguments, options, command, escapedCommand, fileDescriptors, startTime }) => {
|
|
4436
4385
|
try {
|
|
4437
4386
|
addInputOptionsSync(fileDescriptors, options);
|
|
4438
|
-
|
|
4439
|
-
return spawnSync(...concatenateShell(file, commandArguments, normalizedOptions));
|
|
4387
|
+
return spawnSync(...concatenateShell(file, commandArguments, normalizeSpawnSyncOptions(options)));
|
|
4440
4388
|
} catch (error) {
|
|
4441
4389
|
return makeEarlyError({
|
|
4442
4390
|
error,
|
|
@@ -4654,19 +4602,17 @@ const handleEarlyError = ({ error, command, escapedCommand, fileDescriptors, opt
|
|
|
4654
4602
|
writable,
|
|
4655
4603
|
duplex
|
|
4656
4604
|
});
|
|
4657
|
-
const earlyError = makeEarlyError({
|
|
4658
|
-
error,
|
|
4659
|
-
command,
|
|
4660
|
-
escapedCommand,
|
|
4661
|
-
fileDescriptors,
|
|
4662
|
-
options,
|
|
4663
|
-
startTime,
|
|
4664
|
-
isSync: false
|
|
4665
|
-
});
|
|
4666
|
-
const promise = handleDummyPromise(earlyError, verboseInfo, options);
|
|
4667
4605
|
return {
|
|
4668
4606
|
subprocess,
|
|
4669
|
-
promise
|
|
4607
|
+
promise: handleDummyPromise(makeEarlyError({
|
|
4608
|
+
error,
|
|
4609
|
+
command,
|
|
4610
|
+
escapedCommand,
|
|
4611
|
+
fileDescriptors,
|
|
4612
|
+
options,
|
|
4613
|
+
startTime,
|
|
4614
|
+
isSync: false
|
|
4615
|
+
}), verboseInfo, options)
|
|
4670
4616
|
};
|
|
4671
4617
|
};
|
|
4672
4618
|
const createDummyStreams = (subprocess, fileDescriptors) => {
|
|
@@ -4961,10 +4907,7 @@ const pipeOutputAsync = (subprocess, fileDescriptors, controller) => {
|
|
|
4961
4907
|
controller
|
|
4962
4908
|
});
|
|
4963
4909
|
}
|
|
4964
|
-
for (const [outputStream, inputStreams] of pipeGroups.entries())
|
|
4965
|
-
const inputStream = inputStreams.length === 1 ? inputStreams[0] : mergeStreams(inputStreams);
|
|
4966
|
-
pipeStreams(inputStream, outputStream);
|
|
4967
|
-
}
|
|
4910
|
+
for (const [outputStream, inputStreams] of pipeGroups.entries()) pipeStreams(inputStreams.length === 1 ? inputStreams[0] : mergeStreams(inputStreams), outputStream);
|
|
4968
4911
|
};
|
|
4969
4912
|
const pipeTransform = (subprocess, stream, direction, fdNumber) => {
|
|
4970
4913
|
if (direction === "output") pipeStreams(subprocess.stdio[fdNumber], stream);
|
|
@@ -5226,10 +5169,9 @@ const normalizePipeArguments = ({ source, sourcePromise, boundOptions, createNes
|
|
|
5226
5169
|
const getDestinationStream = (boundOptions, createNested, pipeArguments) => {
|
|
5227
5170
|
try {
|
|
5228
5171
|
const { destination, pipeOptions: { from, to, unpipeSignal } = {} } = getDestination(boundOptions, createNested, ...pipeArguments);
|
|
5229
|
-
const destinationStream = getToStream(destination, to);
|
|
5230
5172
|
return {
|
|
5231
5173
|
destination,
|
|
5232
|
-
destinationStream,
|
|
5174
|
+
destinationStream: getToStream(destination, to),
|
|
5233
5175
|
from,
|
|
5234
5176
|
unpipeSignal
|
|
5235
5177
|
};
|
|
@@ -5464,13 +5406,12 @@ const stopReadingOnStreamEnd = async (onStreamEnd, controller, stream) => {
|
|
|
5464
5406
|
}
|
|
5465
5407
|
};
|
|
5466
5408
|
const iterateOnStream = ({ stream, controller, binary, shouldEncode, encoding, shouldSplit, preserveNewlines }) => {
|
|
5467
|
-
const onStdoutChunk = on(stream, "data", {
|
|
5468
|
-
signal: controller.signal,
|
|
5469
|
-
highWaterMark: HIGH_WATER_MARK,
|
|
5470
|
-
highWatermark: HIGH_WATER_MARK
|
|
5471
|
-
});
|
|
5472
5409
|
return iterateOnData({
|
|
5473
|
-
onStdoutChunk,
|
|
5410
|
+
onStdoutChunk: on(stream, "data", {
|
|
5411
|
+
signal: controller.signal,
|
|
5412
|
+
highWaterMark: HIGH_WATER_MARK,
|
|
5413
|
+
highWatermark: HIGH_WATER_MARK
|
|
5414
|
+
}),
|
|
5474
5415
|
controller,
|
|
5475
5416
|
binary,
|
|
5476
5417
|
shouldEncode,
|
|
@@ -5515,13 +5456,12 @@ const getStreamOutput = async ({ stream, onStreamEnd, fdNumber, encoding, buffer
|
|
|
5515
5456
|
await Promise.all([resumeStream(stream), logPromise]);
|
|
5516
5457
|
return;
|
|
5517
5458
|
}
|
|
5518
|
-
const stripFinalNewlineValue = getStripFinalNewline(stripFinalNewline$1, fdNumber);
|
|
5519
5459
|
const iterable = iterateForResult({
|
|
5520
5460
|
stream,
|
|
5521
5461
|
onStreamEnd,
|
|
5522
5462
|
lines,
|
|
5523
5463
|
encoding,
|
|
5524
|
-
stripFinalNewline:
|
|
5464
|
+
stripFinalNewline: getStripFinalNewline(stripFinalNewline$1, fdNumber),
|
|
5525
5465
|
allMixed
|
|
5526
5466
|
});
|
|
5527
5467
|
const [output] = await Promise.all([getStreamContents({
|
|
@@ -5541,15 +5481,14 @@ const logOutputAsync = async ({ stream, onStreamEnd, fdNumber, encoding, allMixe
|
|
|
5541
5481
|
verboseInfo,
|
|
5542
5482
|
fdNumber
|
|
5543
5483
|
})) return;
|
|
5544
|
-
|
|
5484
|
+
await logLines(iterateForResult({
|
|
5545
5485
|
stream,
|
|
5546
5486
|
onStreamEnd,
|
|
5547
5487
|
lines: true,
|
|
5548
5488
|
encoding,
|
|
5549
5489
|
stripFinalNewline: true,
|
|
5550
5490
|
allMixed
|
|
5551
|
-
});
|
|
5552
|
-
await logLines(linesIterable, stream, fdNumber, verboseInfo);
|
|
5491
|
+
}), stream, fdNumber, verboseInfo);
|
|
5553
5492
|
};
|
|
5554
5493
|
const resumeStream = async (stream) => {
|
|
5555
5494
|
await setImmediate();
|
|
@@ -5699,10 +5638,9 @@ const getAllMixed = ({ all, stdout, stderr }) => all && stdout && stderr && stdo
|
|
|
5699
5638
|
//#region ../../node_modules/.pnpm/execa@9.6.0/node_modules/execa/lib/verbose/ipc.js
|
|
5700
5639
|
const shouldLogIpc = (verboseInfo) => isFullVerbose(verboseInfo, "ipc");
|
|
5701
5640
|
const logIpcOutput = (message, verboseInfo) => {
|
|
5702
|
-
const verboseMessage = serializeVerboseMessage(message);
|
|
5703
5641
|
verboseLog({
|
|
5704
5642
|
type: "ipc",
|
|
5705
|
-
verboseMessage,
|
|
5643
|
+
verboseMessage: serializeVerboseMessage(message),
|
|
5706
5644
|
fdNumber: "ipc",
|
|
5707
5645
|
verboseInfo
|
|
5708
5646
|
});
|
|
@@ -5927,10 +5865,9 @@ const createReadable = ({ subprocess, concurrentStreams, encoding }, { from, bin
|
|
|
5927
5865
|
};
|
|
5928
5866
|
const getSubprocessStdout = (subprocess, from, concurrentStreams) => {
|
|
5929
5867
|
const subprocessStdout = getFromStream(subprocess, from);
|
|
5930
|
-
const waitReadableDestroy = addConcurrentStream(concurrentStreams, subprocessStdout, "readableDestroy");
|
|
5931
5868
|
return {
|
|
5932
5869
|
subprocessStdout,
|
|
5933
|
-
waitReadableDestroy
|
|
5870
|
+
waitReadableDestroy: addConcurrentStream(concurrentStreams, subprocessStdout, "readableDestroy")
|
|
5934
5871
|
};
|
|
5935
5872
|
};
|
|
5936
5873
|
const getReadableOptions = ({ readableEncoding, readableObjectMode, readableHighWaterMark }, binary) => binary ? {
|
|
@@ -6008,12 +5945,10 @@ const createWritable = ({ subprocess, concurrentStreams }, { to } = {}) => {
|
|
|
6008
5945
|
};
|
|
6009
5946
|
const getSubprocessStdin = (subprocess, to, concurrentStreams) => {
|
|
6010
5947
|
const subprocessStdin = getToStream(subprocess, to);
|
|
6011
|
-
const waitWritableFinal = addConcurrentStream(concurrentStreams, subprocessStdin, "writableFinal");
|
|
6012
|
-
const waitWritableDestroy = addConcurrentStream(concurrentStreams, subprocessStdin, "writableDestroy");
|
|
6013
5948
|
return {
|
|
6014
5949
|
subprocessStdin,
|
|
6015
|
-
waitWritableFinal,
|
|
6016
|
-
waitWritableDestroy
|
|
5950
|
+
waitWritableFinal: addConcurrentStream(concurrentStreams, subprocessStdin, "writableFinal"),
|
|
5951
|
+
waitWritableDestroy: addConcurrentStream(concurrentStreams, subprocessStdin, "writableDestroy")
|
|
6017
5952
|
};
|
|
6018
5953
|
};
|
|
6019
5954
|
const getWritableMethods = (subprocessStdin, subprocess, waitWritableFinal) => ({
|
|
@@ -6109,15 +6044,14 @@ const onDuplexDestroy = async ({ subprocessStdout, subprocessStdin, subprocess,
|
|
|
6109
6044
|
const createIterable = (subprocess, encoding, { from, binary: binaryOption = false, preserveNewlines = false } = {}) => {
|
|
6110
6045
|
const binary = binaryOption || BINARY_ENCODINGS.has(encoding);
|
|
6111
6046
|
const subprocessStdout = getFromStream(subprocess, from);
|
|
6112
|
-
|
|
6047
|
+
return iterateOnStdoutData(iterateOnSubprocessStream({
|
|
6113
6048
|
subprocessStdout,
|
|
6114
6049
|
subprocess,
|
|
6115
6050
|
binary,
|
|
6116
6051
|
shouldEncode: true,
|
|
6117
6052
|
encoding,
|
|
6118
6053
|
preserveNewlines
|
|
6119
|
-
});
|
|
6120
|
-
return iterateOnStdoutData(onStdoutData, subprocessStdout, subprocess);
|
|
6054
|
+
}), subprocessStdout, subprocess);
|
|
6121
6055
|
};
|
|
6122
6056
|
const iterateOnStdoutData = async function* (onStdoutData, subprocessStdout, subprocess) {
|
|
6123
6057
|
try {
|
|
@@ -6199,7 +6133,6 @@ const handleAsyncArguments = (rawFile, rawArguments, rawOptions) => {
|
|
|
6199
6133
|
const { command, escapedCommand, startTime, verboseInfo } = handleCommand(rawFile, rawArguments, rawOptions);
|
|
6200
6134
|
const { file, commandArguments, options: normalizedOptions } = normalizeOptions(rawFile, rawArguments, rawOptions);
|
|
6201
6135
|
const options = handleAsyncOptions(normalizedOptions);
|
|
6202
|
-
const fileDescriptors = handleStdioAsync(options, verboseInfo);
|
|
6203
6136
|
return {
|
|
6204
6137
|
file,
|
|
6205
6138
|
commandArguments,
|
|
@@ -6208,7 +6141,7 @@ const handleAsyncArguments = (rawFile, rawArguments, rawOptions) => {
|
|
|
6208
6141
|
startTime,
|
|
6209
6142
|
verboseInfo,
|
|
6210
6143
|
options,
|
|
6211
|
-
fileDescriptors
|
|
6144
|
+
fileDescriptors: handleStdioAsync(options, verboseInfo)
|
|
6212
6145
|
};
|
|
6213
6146
|
};
|
|
6214
6147
|
const handleAsyncOptions = ({ timeout, signal,...options }) => {
|
|
@@ -6281,22 +6214,19 @@ const handlePromise = async ({ subprocess, options, startTime, verboseInfo, file
|
|
|
6281
6214
|
});
|
|
6282
6215
|
controller.abort();
|
|
6283
6216
|
onInternalError.resolve();
|
|
6284
|
-
|
|
6285
|
-
const all = stripNewline(allResult, options, "all");
|
|
6286
|
-
const result = getAsyncResult({
|
|
6217
|
+
return handleResult(getAsyncResult({
|
|
6287
6218
|
errorInfo,
|
|
6288
6219
|
exitCode,
|
|
6289
6220
|
signal,
|
|
6290
|
-
stdio,
|
|
6291
|
-
all,
|
|
6221
|
+
stdio: stdioResults.map((stdioResult, fdNumber) => stripNewline(stdioResult, options, fdNumber)),
|
|
6222
|
+
all: stripNewline(allResult, options, "all"),
|
|
6292
6223
|
ipcOutput,
|
|
6293
6224
|
context,
|
|
6294
6225
|
options,
|
|
6295
6226
|
command,
|
|
6296
6227
|
escapedCommand,
|
|
6297
6228
|
startTime
|
|
6298
|
-
});
|
|
6299
|
-
return handleResult(result, verboseInfo, options);
|
|
6229
|
+
}), verboseInfo, options);
|
|
6300
6230
|
};
|
|
6301
6231
|
const getAsyncResult = ({ errorInfo, exitCode, signal, stdio, all, ipcOutput, context, options, command, escapedCommand, startTime }) => "error" in errorInfo ? makeError({
|
|
6302
6232
|
error: errorInfo.error,
|
|
@@ -6369,8 +6299,7 @@ const callBoundExeca = ({ mapArguments, deepOptions = {}, boundOptions = {}, set
|
|
|
6369
6299
|
return isSync ? execaCoreSync(file, commandArguments, options) : execaCoreAsync(file, commandArguments, options, createNested);
|
|
6370
6300
|
};
|
|
6371
6301
|
const parseArguments = ({ mapArguments, firstArgument, nextArguments, deepOptions, boundOptions }) => {
|
|
6372
|
-
const
|
|
6373
|
-
const [initialFile, initialArguments, initialOptions] = normalizeParameters(...callArguments);
|
|
6302
|
+
const [initialFile, initialArguments, initialOptions] = normalizeParameters(...isTemplateString(firstArgument) ? parseTemplates(firstArgument, nextArguments) : [firstArgument, ...nextArguments]);
|
|
6374
6303
|
const mergedOptions = mergeOptions(mergeOptions(deepOptions, boundOptions), initialOptions);
|
|
6375
6304
|
const { file = initialFile, commandArguments = initialArguments, options = mergedOptions, isSync = false } = mapArguments({
|
|
6376
6305
|
file: initialFile,
|
|
@@ -6528,9 +6457,8 @@ function getSummary({ pluginManager, filesCreated, status, hrStart, config }) {
|
|
|
6528
6457
|
//#region src/runners/generate.ts
|
|
6529
6458
|
async function generate({ input, config, progressCache, args }) {
|
|
6530
6459
|
const hrStart = process$1.hrtime();
|
|
6531
|
-
const logLevel = LogMapper[args.logLevel] || 3;
|
|
6532
6460
|
const logger = createLogger({
|
|
6533
|
-
logLevel,
|
|
6461
|
+
logLevel: LogMapper[args.logLevel] || 3,
|
|
6534
6462
|
name: config.name
|
|
6535
6463
|
});
|
|
6536
6464
|
const { root = process$1.cwd(),...userConfig } = config;
|
|
@@ -6701,4 +6629,4 @@ async function generate({ input, config, progressCache, args }) {
|
|
|
6701
6629
|
|
|
6702
6630
|
//#endregion
|
|
6703
6631
|
export { generate };
|
|
6704
|
-
//# sourceMappingURL=generate-
|
|
6632
|
+
//# sourceMappingURL=generate-Cc3YLh0Y.js.map
|