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