@hot-updater/rock 1.0.0-rc.1 → 1.0.0-rc.2

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/index.cjs CHANGED
@@ -6,7 +6,7 @@ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
6
6
  var __getOwnPropNames = Object.getOwnPropertyNames;
7
7
  var __getProtoOf = Object.getPrototypeOf;
8
8
  var __hasOwnProp = Object.prototype.hasOwnProperty;
9
- var __commonJSMin = (cb, mod) => () => (mod || cb((mod = { exports: {} }).exports, mod), mod.exports);
9
+ var __commonJSMin = (cb, mod) => () => (mod || (cb((mod = { exports: {} }).exports, mod), cb = null), mod.exports);
10
10
  var __copyProps = (to, from, except, desc) => {
11
11
  if (from && typeof from === "object" || typeof from === "function") for (var keys = __getOwnPropNames(from), i = 0, n = keys.length, key; i < n; i++) {
12
12
  key = keys[i];
@@ -17,26 +17,26 @@ var __copyProps = (to, from, except, desc) => {
17
17
  }
18
18
  return to;
19
19
  };
20
- var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
20
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule || !__hasOwnProp.call(mod, "default") ? __defProp(target, "default", {
21
21
  value: mod,
22
22
  enumerable: true
23
23
  }) : target, mod));
24
24
  //#endregion
25
25
  let fs_promises = require("fs/promises");
26
- fs_promises = __toESM(fs_promises);
26
+ fs_promises = __toESM(fs_promises, 1);
27
27
  let path = require("path");
28
- path = __toESM(path);
28
+ path = __toESM(path, 1);
29
29
  let _hot_updater_cli_tools = require("@hot-updater/cli-tools");
30
30
  let node_url = require("node:url");
31
31
  let node_child_process = require("node:child_process");
32
32
  let node_string_decoder = require("node:string_decoder");
33
33
  let node_util = require("node:util");
34
34
  let node_process = require("node:process");
35
- node_process = __toESM(node_process);
35
+ node_process = __toESM(node_process, 1);
36
36
  let node_tty = require("node:tty");
37
- node_tty = __toESM(node_tty);
37
+ node_tty = __toESM(node_tty, 1);
38
38
  let node_path = require("node:path");
39
- node_path = __toESM(node_path);
39
+ node_path = __toESM(node_path, 1);
40
40
  let node_timers_promises = require("node:timers/promises");
41
41
  let node_os = require("node:os");
42
42
  let node_events = require("node:events");
@@ -144,7 +144,8 @@ const parseTemplate = ({ templates, expressions, tokens, index, template }) => {
144
144
  const newTokens = concatTokens(tokens, nextTokens, leadingWhitespaces);
145
145
  if (index === expressions.length) return newTokens;
146
146
  const expression = expressions[index];
147
- return concatTokens(newTokens, Array.isArray(expression) ? expression.map((expression) => parseExpression(expression)) : [parseExpression(expression)], trailingWhitespaces);
147
+ const expressionTokens = Array.isArray(expression) ? expression.map((expression) => parseExpression(expression)) : [parseExpression(expression)];
148
+ return concatTokens(newTokens, expressionTokens, trailingWhitespaces);
148
149
  };
149
150
  const splitByWhitespaces = (template, rawTemplate) => {
150
151
  if (rawTemplate.length === 0) return {
@@ -177,7 +178,7 @@ const splitByWhitespaces = (template, rawTemplate) => {
177
178
  trailingWhitespaces
178
179
  };
179
180
  };
180
- const DELIMITERS = new Set([
181
+ const DELIMITERS = /* @__PURE__ */ new Set([
181
182
  " ",
182
183
  " ",
183
184
  "\r",
@@ -229,7 +230,8 @@ const normalizeFdSpecificOptions = (options) => {
229
230
  };
230
231
  const normalizeFdSpecificOption = (options, optionName) => {
231
232
  const optionBaseArray = Array.from({ length: getStdioLength(options) + 1 });
232
- return addDefaultValue$1(normalizeFdSpecificValue(options[optionName], optionBaseArray, optionName), optionName);
233
+ const optionArray = normalizeFdSpecificValue(options[optionName], optionBaseArray, optionName);
234
+ return addDefaultValue$1(optionArray, optionName);
233
235
  };
234
236
  const getStdioLength = ({ stdio }) => Array.isArray(stdio) ? Math.max(stdio.length, STANDARD_STREAMS_ALIASES.length) : STANDARD_STREAMS_ALIASES.length;
235
237
  const normalizeFdSpecificValue = (optionValue, optionArray, optionName) => isPlainObject(optionValue) ? normalizeOptionObject(optionValue, optionArray, optionName) : optionArray.fill(optionValue);
@@ -262,7 +264,7 @@ const addDefaultValue$1 = (optionArray, optionName) => optionArray.map((optionVa
262
264
  const DEFAULT_OPTIONS = {
263
265
  lines: false,
264
266
  buffer: true,
265
- maxBuffer: 1e3 * 1e3 * 100,
267
+ maxBuffer: 1e8,
266
268
  verbose: (0, node_util.debuglog)("execa").enabled ? "full" : "none",
267
269
  stripFinalNewline: true
268
270
  };
@@ -310,7 +312,7 @@ const escapeControlCharacter = (character) => {
310
312
  };
311
313
  const getSpecialCharRegExp = () => {
312
314
  try {
313
- return /* @__PURE__ */ new RegExp("\\p{Separator}|\\p{Other}", "gu");
315
+ return new RegExp("\\p{Separator}|\\p{Other}", "gu");
314
316
  } catch {
315
317
  return /[\s\u0000-\u001F\u007F-\u009F\u00AD]/g;
316
318
  }
@@ -730,11 +732,13 @@ const appendNewline = (printedLine) => printedLine.endsWith("\n") ? printedLine
730
732
  //#endregion
731
733
  //#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/verbose/log.js
732
734
  const verboseLog = ({ type, verboseMessage, fdNumber, verboseInfo, result }) => {
733
- const finalLines = applyVerboseOnLines(getPrintedLines(verboseMessage, getVerboseObject({
735
+ const verboseObject = getVerboseObject({
734
736
  type,
735
737
  result,
736
738
  verboseInfo
737
- })), verboseInfo, fdNumber);
739
+ });
740
+ const printedLines = getPrintedLines(verboseMessage, verboseObject);
741
+ const finalLines = applyVerboseOnLines(printedLines, verboseInfo, fdNumber);
738
742
  if (finalLines !== "") console.warn(finalLines.slice(0, -1));
739
743
  };
740
744
  const getVerboseObject = ({ type, result, verboseInfo: { escapedCommand, commandId, rawOptions: { piped = false, ...options } } }) => ({
@@ -757,7 +761,8 @@ const getPrintedLine = (verboseObject) => {
757
761
  };
758
762
  };
759
763
  const serializeVerboseMessage = (message) => {
760
- return escapeLines(typeof message === "string" ? message : (0, node_util.inspect)(message)).replaceAll(" ", " ".repeat(TAB_SIZE));
764
+ const messageString = typeof message === "string" ? message : (0, node_util.inspect)(message);
765
+ return escapeLines(messageString).replaceAll(" ", " ".repeat(TAB_SIZE));
761
766
  };
762
767
  const TAB_SIZE = 2;
763
768
  //#endregion
@@ -802,7 +807,8 @@ const getDurationMs = (startTime) => Number(node_process.hrtime.bigint() - start
802
807
  const handleCommand = (filePath, rawArguments, rawOptions) => {
803
808
  const startTime = getStartTime();
804
809
  const { command, escapedCommand } = joinCommand(filePath, rawArguments);
805
- const verboseInfo = getVerboseInfo(normalizeFdSpecificOption(rawOptions, "verbose"), escapedCommand, { ...rawOptions });
810
+ const verbose = normalizeFdSpecificOption(rawOptions, "verbose");
811
+ const verboseInfo = getVerboseInfo(verbose, escapedCommand, { ...rawOptions });
806
812
  logCommand(escapedCommand, verboseInfo);
807
813
  return {
808
814
  command,
@@ -923,7 +929,8 @@ var require_which = /* @__PURE__ */ __commonJSMin(((exports, module) => {
923
929
  const getNotFoundError = (cmd) => Object.assign(/* @__PURE__ */ new Error(`not found: ${cmd}`), { code: "ENOENT" });
924
930
  const getPathInfo = (cmd, opt) => {
925
931
  const colon = opt.colon || COLON;
926
- const pathEnv = cmd.match(/\//) || isWindows && cmd.match(/\\/) ? [""] : [...isWindows ? [process.cwd()] : [], ...(opt.path || process.env.PATH || "").split(colon)];
932
+ const pathEnv = cmd.match(/\//) || isWindows && cmd.match(/\\/) ? [""] : [...isWindows ? [process.cwd()] : [], ...(opt.path || process.env.PATH ||
933
+ /* istanbul ignore next: very unusual */ "").split(colon)];
927
934
  const pathExtExe = isWindows ? opt.pathExt || process.env.PATHEXT || ".EXE;.CMD;.BAT;.COM" : "";
928
935
  const pathExt = isWindows ? pathExtExe.split(colon) : [""];
929
936
  if (isWindows) {
@@ -948,14 +955,17 @@ var require_which = /* @__PURE__ */ __commonJSMin(((exports, module) => {
948
955
  const ppRaw = pathEnv[i];
949
956
  const pathPart = /^".*"$/.test(ppRaw) ? ppRaw.slice(1, -1) : ppRaw;
950
957
  const pCmd = path$9.join(pathPart, cmd);
951
- resolve(subStep(!pathPart && /^\.[\\\/]/.test(cmd) ? cmd.slice(0, 2) + pCmd : pCmd, i, 0));
958
+ const p = !pathPart && /^\.[\\\/]/.test(cmd) ? cmd.slice(0, 2) + pCmd : pCmd;
959
+ resolve(subStep(p, i, 0));
952
960
  });
953
961
  const subStep = (p, i, ii) => new Promise((resolve, reject) => {
954
962
  if (ii === pathExt.length) return resolve(step(i + 1));
955
963
  const ext = pathExt[ii];
956
964
  isexe(p + ext, { pathExt: pathExtExe }, (er, is) => {
957
- if (!er && is) if (opt.all) found.push(p + ext);
958
- else return resolve(p + ext);
965
+ if (!er && is) {
966
+ if (opt.all) found.push(p + ext);
967
+ else return resolve(p + ext);
968
+ }
959
969
  return resolve(subStep(p, i, ii + 1));
960
970
  });
961
971
  });
@@ -973,8 +983,10 @@ var require_which = /* @__PURE__ */ __commonJSMin(((exports, module) => {
973
983
  for (let j = 0; j < pathExt.length; j++) {
974
984
  const cur = p + pathExt[j];
975
985
  try {
976
- if (isexe.sync(cur, { pathExt: pathExtExe })) if (opt.all) found.push(cur);
977
- else return cur;
986
+ if (isexe.sync(cur, { pathExt: pathExtExe })) {
987
+ if (opt.all) found.push(cur);
988
+ else return cur;
989
+ }
978
990
  } catch (ex) {}
979
991
  }
980
992
  }
@@ -1665,7 +1677,7 @@ const normalizeForceKillAfterDelay = (forceKillAfterDelay) => {
1665
1677
  if (!Number.isFinite(forceKillAfterDelay) || forceKillAfterDelay < 0) throw new TypeError(`Expected the \`forceKillAfterDelay\` option to be a non-negative integer, got \`${forceKillAfterDelay}\` (${typeof forceKillAfterDelay})`);
1666
1678
  return forceKillAfterDelay;
1667
1679
  };
1668
- const DEFAULT_FORCE_KILL_TIMEOUT = 1e3 * 5;
1680
+ const DEFAULT_FORCE_KILL_TIMEOUT = 5e3;
1669
1681
  const subprocessKill = ({ kill, options: { forceKillAfterDelay, killSignal }, onInternalError, context, controller }, signalOrError, errorArgument) => {
1670
1682
  const { signal, error } = parseKillArguments(signalOrError, errorArgument, killSignal);
1671
1683
  emitKillError(error, onInternalError);
@@ -1767,7 +1779,7 @@ const handleSerializationError = ({ error, methodName, isSubprocess, message })
1767
1779
  if (isSerializationError(error)) throw new Error(`${getMethodName(methodName, isSubprocess)}'s argument type is invalid: the message cannot be serialized: ${String(message)}.`, { cause: error });
1768
1780
  };
1769
1781
  const isSerializationError = ({ code, message }) => SERIALIZATION_ERROR_CODES.has(code) || SERIALIZATION_ERROR_MESSAGES.some((serializationErrorMessage) => message.includes(serializationErrorMessage));
1770
- const SERIALIZATION_ERROR_CODES = new Set(["ERR_MISSING_ARGS", "ERR_INVALID_ARG_TYPE"]);
1782
+ const SERIALIZATION_ERROR_CODES = /* @__PURE__ */ new Set(["ERR_MISSING_ARGS", "ERR_INVALID_ARG_TYPE"]);
1771
1783
  const SERIALIZATION_ERROR_MESSAGES = [
1772
1784
  "could not be cloned",
1773
1785
  "circular structure",
@@ -1977,7 +1989,8 @@ const isConnected = (anyProcess) => {
1977
1989
  //#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/ipc/strict.js
1978
1990
  const handleSendStrict = ({ anyProcess, channel, isSubprocess, message, strict }) => {
1979
1991
  if (!strict) return message;
1980
- const hasListeners = hasMessageListeners(anyProcess, getIpcEmitter(anyProcess, channel, isSubprocess));
1992
+ const ipcEmitter = getIpcEmitter(anyProcess, channel, isSubprocess);
1993
+ const hasListeners = hasMessageListeners(anyProcess, ipcEmitter);
1981
1994
  return {
1982
1995
  id: count++,
1983
1996
  type: REQUEST_TYPE,
@@ -2209,7 +2222,8 @@ const throwOnGracefulCancel = ({ subprocess, cancelSignal, gracefulCancel, force
2209
2222
  })] : [];
2210
2223
  const sendOnAbort = async ({ subprocess, cancelSignal, forceKillAfterDelay, context, controller: { signal } }) => {
2211
2224
  await onAbortedSignal(cancelSignal, signal);
2212
- await sendAbort(subprocess, getReason(cancelSignal));
2225
+ const reason = getReason(cancelSignal);
2226
+ await sendAbort(subprocess, reason);
2213
2227
  killOnTimeout({
2214
2228
  kill: subprocess.kill,
2215
2229
  forceKillAfterDelay,
@@ -2321,8 +2335,8 @@ Please rename it to ${serializeEncoding(correctEncoding)}.`);
2321
2335
  throw new TypeError(`Invalid option \`encoding: ${serializeEncoding(encoding)}\`.
2322
2336
  Please rename it to one of: ${correctEncodings}.`);
2323
2337
  };
2324
- const TEXT_ENCODINGS = new Set(["utf8", "utf16le"]);
2325
- const BINARY_ENCODINGS = new Set([
2338
+ const TEXT_ENCODINGS = /* @__PURE__ */ new Set(["utf8", "utf16le"]);
2339
+ const BINARY_ENCODINGS = /* @__PURE__ */ new Set([
2326
2340
  "buffer",
2327
2341
  "hex",
2328
2342
  "base64",
@@ -2330,7 +2344,7 @@ const BINARY_ENCODINGS = new Set([
2330
2344
  "latin1",
2331
2345
  "ascii"
2332
2346
  ]);
2333
- const ENCODINGS = new Set([...TEXT_ENCODINGS, ...BINARY_ENCODINGS]);
2347
+ const ENCODINGS = /* @__PURE__ */ new Set([...TEXT_ENCODINGS, ...BINARY_ENCODINGS]);
2334
2348
  const getCorrectEncoding = (encoding) => {
2335
2349
  if (encoding === null) return "buffer";
2336
2350
  if (typeof encoding !== "string") return;
@@ -2377,7 +2391,8 @@ const normalizeOptions = (filePath, rawArguments, rawOptions) => {
2377
2391
  rawOptions.cwd = normalizeCwd(rawOptions.cwd);
2378
2392
  const [processedFile, processedArguments, processedOptions] = handleNodeOption(filePath, rawArguments, rawOptions);
2379
2393
  const { command: file, args: commandArguments, options: initialOptions } = import_cross_spawn.default._parse(processedFile, processedArguments, processedOptions);
2380
- const options = addDefaultOptions(normalizeFdSpecificOptions(initialOptions));
2394
+ const fdOptions = normalizeFdSpecificOptions(initialOptions);
2395
+ const options = addDefaultOptions(fdOptions);
2381
2396
  validateTimeout(options);
2382
2397
  validateEncoding(options);
2383
2398
  validateIpcInputOption(options);
@@ -2578,14 +2593,17 @@ const getStreamContents$1 = async (stream, { init, convertChunk, getSize, trunca
2578
2593
  const state = init();
2579
2594
  state.length = 0;
2580
2595
  try {
2581
- for await (const chunk of asyncIterable) appendChunk({
2582
- convertedChunk: convertChunk[getChunkType(chunk)](chunk, state),
2583
- state,
2584
- getSize,
2585
- truncateChunk,
2586
- addChunk,
2587
- maxBuffer
2588
- });
2596
+ for await (const chunk of asyncIterable) {
2597
+ const convertedChunk = convertChunk[getChunkType(chunk)](chunk, state);
2598
+ appendChunk({
2599
+ convertedChunk,
2600
+ state,
2601
+ getSize,
2602
+ truncateChunk,
2603
+ addChunk,
2604
+ maxBuffer
2605
+ });
2606
+ }
2589
2607
  appendFinalChunk({
2590
2608
  state,
2591
2609
  convertChunk,
@@ -2871,7 +2889,8 @@ const getErrorPrefix = ({ originalError, timedOut, timeout, isMaxBuffer, maxBuff
2871
2889
  const getForcefulSuffix = (isForcefullyTerminated, forceKillAfterDelay) => isForcefullyTerminated ? ` and was forcefully terminated after ${forceKillAfterDelay} milliseconds` : "";
2872
2890
  const getOriginalMessage = (originalError, cwd) => {
2873
2891
  if (originalError instanceof DiscardedError) return;
2874
- const escapedOriginalMessage = escapeLines(fixCwdError(isExecaError(originalError) ? originalError.originalMessage : String(originalError?.message ?? originalError), cwd));
2892
+ const originalMessage = isExecaError(originalError) ? originalError.originalMessage : String(originalError?.message ?? originalError);
2893
+ const escapedOriginalMessage = escapeLines(fixCwdError(originalMessage, cwd));
2875
2894
  return escapedOriginalMessage === "" ? void 0 : escapedOriginalMessage;
2876
2895
  };
2877
2896
  const serializeIpcMessage = (ipcMessage) => typeof ipcMessage === "string" ? ipcMessage : (0, node_util.inspect)(ipcMessage);
@@ -3082,26 +3101,28 @@ function prettyMilliseconds(milliseconds, options) {
3082
3101
  add(Number(parsed.hours), "hour", "h");
3083
3102
  }
3084
3103
  add(Number(parsed.minutes), "minute", "m");
3085
- if (!options.hideSeconds) if (options.separateMilliseconds || options.formatSubMilliseconds || !options.colonNotation && milliseconds < 1e3 && !options.subSecondsAsDecimals) {
3086
- const seconds = Number(parsed.seconds);
3087
- const milliseconds = Number(parsed.milliseconds);
3088
- const microseconds = Number(parsed.microseconds);
3089
- const nanoseconds = Number(parsed.nanoseconds);
3090
- add(seconds, "second", "s");
3091
- if (options.formatSubMilliseconds) {
3092
- add(milliseconds, "millisecond", "ms");
3093
- add(microseconds, "microsecond", "µs");
3094
- add(nanoseconds, "nanosecond", "ns");
3104
+ if (!options.hideSeconds) {
3105
+ if (options.separateMilliseconds || options.formatSubMilliseconds || !options.colonNotation && milliseconds < 1e3 && !options.subSecondsAsDecimals) {
3106
+ const seconds = Number(parsed.seconds);
3107
+ const milliseconds = Number(parsed.milliseconds);
3108
+ const microseconds = Number(parsed.microseconds);
3109
+ const nanoseconds = Number(parsed.nanoseconds);
3110
+ add(seconds, "second", "s");
3111
+ if (options.formatSubMilliseconds) {
3112
+ add(milliseconds, "millisecond", "ms");
3113
+ add(microseconds, "microsecond", "µs");
3114
+ add(nanoseconds, "nanosecond", "ns");
3115
+ } else {
3116
+ const millisecondsAndBelow = milliseconds + microseconds / 1e3 + nanoseconds / 1e6;
3117
+ const millisecondsDecimalDigits = typeof options.millisecondsDecimalDigits === "number" ? options.millisecondsDecimalDigits : 0;
3118
+ const millisecondsString = millisecondsDecimalDigits ? millisecondsAndBelow.toFixed(millisecondsDecimalDigits) : millisecondsAndBelow >= 1 ? Math.round(millisecondsAndBelow) : Math.ceil(millisecondsAndBelow);
3119
+ add(Number.parseFloat(millisecondsString), "millisecond", "ms", millisecondsString);
3120
+ }
3095
3121
  } else {
3096
- const millisecondsAndBelow = milliseconds + microseconds / 1e3 + nanoseconds / 1e6;
3097
- const millisecondsDecimalDigits = typeof options.millisecondsDecimalDigits === "number" ? options.millisecondsDecimalDigits : 0;
3098
- const millisecondsString = millisecondsDecimalDigits ? millisecondsAndBelow.toFixed(millisecondsDecimalDigits) : millisecondsAndBelow >= 1 ? Math.round(millisecondsAndBelow) : Math.ceil(millisecondsAndBelow);
3099
- add(Number.parseFloat(millisecondsString), "millisecond", "ms", millisecondsString);
3122
+ const secondsFixed = floorDecimals((isBigInt ? Number(milliseconds % ONE_DAY_IN_MILLISECONDS) : milliseconds) / 1e3 % 60, typeof options.secondsDecimalDigits === "number" ? options.secondsDecimalDigits : 1);
3123
+ const secondsString = options.keepDecimalsOnWholeSeconds ? secondsFixed : secondsFixed.replace(/\.0+$/, "");
3124
+ add(Number.parseFloat(secondsString), "second", "s", secondsString);
3100
3125
  }
3101
- } else {
3102
- const secondsFixed = floorDecimals((isBigInt ? Number(milliseconds % ONE_DAY_IN_MILLISECONDS) : milliseconds) / 1e3 % 60, typeof options.secondsDecimalDigits === "number" ? options.secondsDecimalDigits : 1);
3103
- const secondsString = options.keepDecimalsOnWholeSeconds ? secondsFixed : secondsFixed.replace(/\.0+$/, "");
3104
- add(Number.parseFloat(secondsString), "second", "s", secondsString);
3105
3126
  }
3106
3127
  if (result.length === 0) return sign + "0" + (options.verbose ? " milliseconds" : "ms");
3107
3128
  const separator = options.colonNotation ? ":" : " ";
@@ -3126,9 +3147,10 @@ const logResult = (result, verboseInfo) => {
3126
3147
  logDuration(result, verboseInfo);
3127
3148
  };
3128
3149
  const logDuration = (result, verboseInfo) => {
3150
+ const verboseMessage = `(done in ${prettyMilliseconds(result.durationMs)})`;
3129
3151
  verboseLog({
3130
3152
  type: "duration",
3131
- verboseMessage: `(done in ${prettyMilliseconds(result.durationMs)})`,
3153
+ verboseMessage,
3132
3154
  verboseInfo,
3133
3155
  result
3134
3156
  });
@@ -3196,10 +3218,10 @@ const isTransformOptions = (value) => isPlainObject(value) && (value.transform !
3196
3218
  const isUrl = (value) => Object.prototype.toString.call(value) === "[object URL]";
3197
3219
  const isRegularUrl = (value) => isUrl(value) && value.protocol !== "file:";
3198
3220
  const isFilePathObject = (value) => isPlainObject(value) && Object.keys(value).length > 0 && Object.keys(value).every((key) => FILE_PATH_KEYS.has(key)) && isFilePathString(value.file);
3199
- const FILE_PATH_KEYS = new Set(["file", "append"]);
3221
+ const FILE_PATH_KEYS = /* @__PURE__ */ new Set(["file", "append"]);
3200
3222
  const isFilePathString = (file) => typeof file === "string";
3201
3223
  const isUnknownStdioString = (type, value) => type === "native" && typeof value === "string" && !KNOWN_STDIO_STRINGS.has(value);
3202
- const KNOWN_STDIO_STRINGS = new Set([
3224
+ const KNOWN_STDIO_STRINGS = /* @__PURE__ */ new Set([
3203
3225
  "ipc",
3204
3226
  "ignore",
3205
3227
  "inherit",
@@ -3213,24 +3235,24 @@ const isTransformStream = (value) => isReadableStream(value?.readable) && isWrit
3213
3235
  const isAsyncIterableObject = (value) => isObject(value) && typeof value[Symbol.asyncIterator] === "function";
3214
3236
  const isIterableObject = (value) => isObject(value) && typeof value[Symbol.iterator] === "function";
3215
3237
  const isObject = (value) => typeof value === "object" && value !== null;
3216
- const TRANSFORM_TYPES = new Set([
3238
+ const TRANSFORM_TYPES = /* @__PURE__ */ new Set([
3217
3239
  "generator",
3218
3240
  "asyncGenerator",
3219
3241
  "duplex",
3220
3242
  "webTransform"
3221
3243
  ]);
3222
- const FILE_TYPES = new Set([
3244
+ const FILE_TYPES = /* @__PURE__ */ new Set([
3223
3245
  "fileUrl",
3224
3246
  "filePath",
3225
3247
  "fileNumber"
3226
3248
  ]);
3227
- const SPECIAL_DUPLICATE_TYPES_SYNC = new Set(["fileUrl", "filePath"]);
3228
- const SPECIAL_DUPLICATE_TYPES = new Set([
3249
+ const SPECIAL_DUPLICATE_TYPES_SYNC = /* @__PURE__ */ new Set(["fileUrl", "filePath"]);
3250
+ const SPECIAL_DUPLICATE_TYPES = /* @__PURE__ */ new Set([
3229
3251
  ...SPECIAL_DUPLICATE_TYPES_SYNC,
3230
3252
  "webStream",
3231
3253
  "nodeStream"
3232
3254
  ]);
3233
- const FORBID_DUPLICATE_TYPES = new Set(["webTransform", "duplex"]);
3255
+ const FORBID_DUPLICATE_TYPES = /* @__PURE__ */ new Set(["webTransform", "duplex"]);
3234
3256
  const TYPE_TO_MESSAGE = {
3235
3257
  generator: "a generator",
3236
3258
  asyncGenerator: "an async generator",
@@ -3563,7 +3585,8 @@ const validateDuplicateStreamSync = ({ otherStdioItems, type, value, optionName,
3563
3585
  const getDuplicateStreamInstance = ({ otherStdioItems, type, value, optionName, direction }) => {
3564
3586
  const duplicateStdioItems = otherStdioItems.filter((stdioItem) => hasSameValue(stdioItem, value));
3565
3587
  if (duplicateStdioItems.length === 0) return;
3566
- throwOnDuplicateStream(duplicateStdioItems.find((stdioItem) => stdioItem.direction !== direction), optionName, type);
3588
+ const differentStdioItem = duplicateStdioItems.find((stdioItem) => stdioItem.direction !== direction);
3589
+ throwOnDuplicateStream(differentStdioItem, optionName, type);
3567
3590
  return direction === "output" ? duplicateStdioItems[0].stream : void 0;
3568
3591
  };
3569
3592
  const hasSameValue = ({ type, value }, secondValue) => {
@@ -3572,7 +3595,8 @@ const hasSameValue = ({ type, value }, secondValue) => {
3572
3595
  return value === secondValue;
3573
3596
  };
3574
3597
  const validateDuplicateTransform = ({ otherStdioItems, type, value, optionName }) => {
3575
- throwOnDuplicateStream(otherStdioItems.find(({ value: { transform } }) => transform === value.transform), optionName, type);
3598
+ const duplicateStdioItem = otherStdioItems.find(({ value: { transform } }) => transform === value.transform);
3599
+ throwOnDuplicateStream(duplicateStdioItem, optionName, type);
3576
3600
  };
3577
3601
  const throwOnDuplicateStream = (stdioItem, optionName, type) => {
3578
3602
  if (stdioItem !== void 0) throw new TypeError(`The \`${stdioItem.optionName}\` and \`${optionName}\` options must not target ${TYPE_TO_MESSAGE[type]} that is the same.`);
@@ -3580,13 +3604,14 @@ const throwOnDuplicateStream = (stdioItem, optionName, type) => {
3580
3604
  //#endregion
3581
3605
  //#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/stdio/handle.js
3582
3606
  const handleStdio = (addProperties, options, verboseInfo, isSync) => {
3607
+ const initialFileDescriptors = normalizeStdioOption(options, verboseInfo, isSync).map((stdioOption, fdNumber) => getFileDescriptor({
3608
+ stdioOption,
3609
+ fdNumber,
3610
+ options,
3611
+ isSync
3612
+ }));
3583
3613
  const fileDescriptors = getFinalFileDescriptors({
3584
- initialFileDescriptors: normalizeStdioOption(options, verboseInfo, isSync).map((stdioOption, fdNumber) => getFileDescriptor({
3585
- stdioOption,
3586
- fdNumber,
3587
- options,
3588
- isSync
3589
- })),
3614
+ initialFileDescriptors,
3590
3615
  addProperties,
3591
3616
  options,
3592
3617
  isSync
@@ -3603,13 +3628,14 @@ const getFileDescriptor = ({ stdioOption, fdNumber, options, isSync }) => {
3603
3628
  optionName
3604
3629
  });
3605
3630
  const direction = getStreamDirection(initialStdioItems, fdNumber, optionName);
3606
- const normalizedStdioItems = normalizeTransforms(initialStdioItems.map((stdioItem) => handleNativeStream({
3631
+ const stdioItems = initialStdioItems.map((stdioItem) => handleNativeStream({
3607
3632
  stdioItem,
3608
3633
  isStdioArray,
3609
3634
  fdNumber,
3610
3635
  direction,
3611
3636
  isSync
3612
- })), optionName, direction, options);
3637
+ }));
3638
+ const normalizedStdioItems = normalizeTransforms(stdioItems, optionName, direction, options);
3613
3639
  const objectMode = getFdObjectMode(normalizedStdioItems, direction);
3614
3640
  validateFileObjectMode(normalizedStdioItems, objectMode);
3615
3641
  return {
@@ -3619,7 +3645,8 @@ const getFileDescriptor = ({ stdioOption, fdNumber, options, isSync }) => {
3619
3645
  };
3620
3646
  };
3621
3647
  const initializeStdioItems = ({ stdioOption, fdNumber, options, optionName }) => {
3622
- const stdioItems = filterDuplicates([...(Array.isArray(stdioOption) ? stdioOption : [stdioOption]).map((value) => initializeStdioItem(value, optionName)), ...handleInputOptions(options, fdNumber)]);
3648
+ const initialStdioItems = [...(Array.isArray(stdioOption) ? stdioOption : [stdioOption]).map((value) => initializeStdioItem(value, optionName)), ...handleInputOptions(options, fdNumber)];
3649
+ const stdioItems = filterDuplicates(initialStdioItems);
3623
3650
  const isStdioArray = stdioItems.length > 1;
3624
3651
  validateStdioArray(stdioItems, isStdioArray, optionName);
3625
3652
  validateStreams(stdioItems);
@@ -3638,7 +3665,7 @@ const validateStdioArray = (stdioItems, isStdioArray, optionName) => {
3638
3665
  if (!isStdioArray) return;
3639
3666
  for (const { value, optionName } of stdioItems) if (INVALID_STDIO_ARRAY_OPTIONS.has(value)) throw new Error(`The \`${optionName}\` option must not include \`${value}\`.`);
3640
3667
  };
3641
- const INVALID_STDIO_ARRAY_OPTIONS = new Set(["ignore", "ipc"]);
3668
+ const INVALID_STDIO_ARRAY_OPTIONS = /* @__PURE__ */ new Set(["ignore", "ipc"]);
3642
3669
  const validateStreams = (stdioItems) => {
3643
3670
  for (const stdioItem of stdioItems) validateFileStdio(stdioItem);
3644
3671
  };
@@ -3967,7 +3994,10 @@ const generatorToStream = ({ value, value: { transform, final, writableObjectMod
3967
3994
  const runGeneratorsSync = (chunks, stdioItems, encoding, isInput) => {
3968
3995
  const generators = stdioItems.filter(({ type }) => type === "generator");
3969
3996
  const reversedGenerators = isInput ? generators.reverse() : generators;
3970
- for (const { value, optionName } of reversedGenerators) chunks = runTransformSync(addInternalGenerators(value, encoding, optionName), chunks);
3997
+ for (const { value, optionName } of reversedGenerators) {
3998
+ const generators = addInternalGenerators(value, encoding, optionName);
3999
+ chunks = runTransformSync(generators, chunks);
4000
+ }
3971
4001
  return chunks;
3972
4002
  };
3973
4003
  const addInternalGenerators = ({ transform, final, binary, writableObjectMode, readableObjectMode, preserveNewlines }, encoding, optionName) => {
@@ -4003,7 +4033,8 @@ const addInputOptionSync = (fileDescriptors, fdNumber, options) => {
4003
4033
  const [{ type, optionName }] = allStdioItems;
4004
4034
  throw new TypeError(`Only the \`stdin\` option, not \`${optionName}\`, can be ${TYPE_TO_MESSAGE[type]} with synchronous methods.`);
4005
4035
  }
4006
- options.input = joinToUint8Array(allStdioItems.map(({ contents }) => contents).map((contents) => applySingleInputGeneratorsSync(contents, stdioItems)));
4036
+ const transformedContents = allStdioItems.map(({ contents }) => contents).map((contents) => applySingleInputGeneratorsSync(contents, stdioItems));
4037
+ options.input = joinToUint8Array(transformedContents);
4007
4038
  };
4008
4039
  const applySingleInputGeneratorsSync = (contents, stdioItems) => {
4009
4040
  const newContents = runGeneratorsSync(contents, stdioItems, "utf8", true);
@@ -4018,7 +4049,7 @@ const validateSerializable = (newContents) => {
4018
4049
  //#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/verbose/output.js
4019
4050
  const shouldLogOutput = ({ stdioItems, encoding, verboseInfo, fdNumber }) => fdNumber !== "all" && isFullVerbose(verboseInfo, fdNumber) && !BINARY_ENCODINGS.has(encoding) && fdUsesVerbose(fdNumber) && (stdioItems.some(({ type, value }) => type === "native" && PIPED_STDIO_VALUES.has(value)) || stdioItems.every(({ type }) => TRANSFORM_TYPES.has(type)));
4020
4051
  const fdUsesVerbose = (fdNumber) => fdNumber === 1 || fdNumber === 2;
4021
- const PIPED_STDIO_VALUES = new Set(["pipe", "overlapped"]);
4052
+ const PIPED_STDIO_VALUES = /* @__PURE__ */ new Set(["pipe", "overlapped"]);
4022
4053
  const logLines = async (linesIterable, stream, fdNumber, verboseInfo) => {
4023
4054
  for await (const line of linesIterable) if (!isPipingStream(stream)) logLine(line, fdNumber, verboseInfo);
4024
4055
  };
@@ -4027,9 +4058,10 @@ const logLinesSync = (linesArray, fdNumber, verboseInfo) => {
4027
4058
  };
4028
4059
  const isPipingStream = (stream) => stream._readableState.pipes.length > 0;
4029
4060
  const logLine = (line, fdNumber, verboseInfo) => {
4061
+ const verboseMessage = serializeVerboseMessage(line);
4030
4062
  verboseLog({
4031
4063
  type: "output",
4032
- verboseMessage: serializeVerboseMessage(line),
4064
+ verboseMessage,
4033
4065
  fdNumber,
4034
4066
  verboseInfo
4035
4067
  });
@@ -4055,10 +4087,12 @@ const transformOutputSync = ({ fileDescriptors, syncResult: { output }, options,
4055
4087
  };
4056
4088
  const transformOutputResultSync = ({ result, fileDescriptors, fdNumber, state, outputFiles, isMaxBuffer, verboseInfo }, { buffer, encoding, lines, stripFinalNewline, maxBuffer }) => {
4057
4089
  if (result === null) return;
4058
- const uint8ArrayResult = bufferToUint8Array(truncateMaxBufferSync(result, isMaxBuffer, maxBuffer));
4090
+ const truncatedResult = truncateMaxBufferSync(result, isMaxBuffer, maxBuffer);
4091
+ const uint8ArrayResult = bufferToUint8Array(truncatedResult);
4059
4092
  const { stdioItems, objectMode } = fileDescriptors[fdNumber];
4093
+ const chunks = runOutputGeneratorsSync([uint8ArrayResult], stdioItems, encoding, state);
4060
4094
  const { serializedResult, finalResult = serializedResult } = serializeChunks({
4061
- chunks: runOutputGeneratorsSync([uint8ArrayResult], stdioItems, encoding, state),
4095
+ chunks,
4062
4096
  objectMode,
4063
4097
  encoding,
4064
4098
  lines,
@@ -4182,7 +4216,7 @@ const getResultError = (error, exitCode, signal) => {
4182
4216
  //#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/methods/main-sync.js
4183
4217
  const execaCoreSync = (rawFile, rawArguments, rawOptions) => {
4184
4218
  const { file, commandArguments, command, escapedCommand, startTime, verboseInfo, options, fileDescriptors } = handleSyncArguments(rawFile, rawArguments, rawOptions);
4185
- return handleResult(spawnSubprocessSync({
4219
+ const result = spawnSubprocessSync({
4186
4220
  file,
4187
4221
  commandArguments,
4188
4222
  options,
@@ -4191,11 +4225,13 @@ const execaCoreSync = (rawFile, rawArguments, rawOptions) => {
4191
4225
  verboseInfo,
4192
4226
  fileDescriptors,
4193
4227
  startTime
4194
- }), verboseInfo, options);
4228
+ });
4229
+ return handleResult(result, verboseInfo, options);
4195
4230
  };
4196
4231
  const handleSyncArguments = (rawFile, rawArguments, rawOptions) => {
4197
4232
  const { command, escapedCommand, startTime, verboseInfo } = handleCommand(rawFile, rawArguments, rawOptions);
4198
- const { file, commandArguments, options } = normalizeOptions(rawFile, rawArguments, normalizeSyncOptions(rawOptions));
4233
+ const syncOptions = normalizeSyncOptions(rawOptions);
4234
+ const { file, commandArguments, options } = normalizeOptions(rawFile, rawArguments, syncOptions);
4199
4235
  validateSyncOptions(options);
4200
4236
  return {
4201
4237
  file,
@@ -4240,14 +4276,16 @@ const spawnSubprocessSync = ({ file, commandArguments, options, command, escaped
4240
4276
  isMaxBuffer,
4241
4277
  verboseInfo
4242
4278
  });
4279
+ const stdio = output.map((stdioOutput, fdNumber) => stripNewline(stdioOutput, options, fdNumber));
4280
+ const all = stripNewline(getAllSync(output, options), options, "all");
4243
4281
  return getSyncResult({
4244
4282
  error,
4245
4283
  exitCode,
4246
4284
  signal,
4247
4285
  timedOut,
4248
4286
  isMaxBuffer,
4249
- stdio: output.map((stdioOutput, fdNumber) => stripNewline(stdioOutput, options, fdNumber)),
4250
- all: stripNewline(getAllSync(output, options), options, "all"),
4287
+ stdio,
4288
+ all,
4251
4289
  options,
4252
4290
  command,
4253
4291
  escapedCommand,
@@ -4257,7 +4295,8 @@ const spawnSubprocessSync = ({ file, commandArguments, options, command, escaped
4257
4295
  const runSubprocessSync = ({ file, commandArguments, options, command, escapedCommand, fileDescriptors, startTime }) => {
4258
4296
  try {
4259
4297
  addInputOptionsSync(fileDescriptors, options);
4260
- return (0, node_child_process.spawnSync)(file, commandArguments, normalizeSpawnSyncOptions(options));
4298
+ const normalizedOptions = normalizeSpawnSyncOptions(options);
4299
+ return (0, node_child_process.spawnSync)(file, commandArguments, normalizedOptions);
4261
4300
  } catch (error) {
4262
4301
  return makeEarlyError({
4263
4302
  error,
@@ -4471,17 +4510,18 @@ const handleEarlyError = ({ error, command, escapedCommand, fileDescriptors, opt
4471
4510
  writable,
4472
4511
  duplex
4473
4512
  });
4513
+ const earlyError = makeEarlyError({
4514
+ error,
4515
+ command,
4516
+ escapedCommand,
4517
+ fileDescriptors,
4518
+ options,
4519
+ startTime,
4520
+ isSync: false
4521
+ });
4474
4522
  return {
4475
4523
  subprocess,
4476
- promise: handleDummyPromise(makeEarlyError({
4477
- error,
4478
- command,
4479
- escapedCommand,
4480
- fileDescriptors,
4481
- options,
4482
- startTime,
4483
- isSync: false
4484
- }), verboseInfo, options)
4524
+ promise: handleDummyPromise(earlyError, verboseInfo, options)
4485
4525
  };
4486
4526
  };
4487
4527
  const createDummyStreams = (subprocess, fileDescriptors) => {
@@ -4665,8 +4705,10 @@ const endWhenStreamsDone = async ({ passThroughStream, stream, streams, ended, a
4665
4705
  controller.abort();
4666
4706
  updateMaxListeners(passThroughStream, -PASSTHROUGH_LISTENERS_PER_STREAM);
4667
4707
  }
4668
- if (streams.size > 0 && streams.size === ended.size + aborted.size) if (ended.size === 0 && aborted.size > 0) abortStream(passThroughStream);
4669
- else endStream(passThroughStream);
4708
+ if (streams.size > 0 && streams.size === ended.size + aborted.size) {
4709
+ if (ended.size === 0 && aborted.size > 0) abortStream(passThroughStream);
4710
+ else endStream(passThroughStream);
4711
+ }
4670
4712
  };
4671
4713
  const afterMergedStreamFinished = async (onFinished, stream, { signal }) => {
4672
4714
  try {
@@ -4772,7 +4814,10 @@ const pipeOutputAsync = (subprocess, fileDescriptors, controller) => {
4772
4814
  controller
4773
4815
  });
4774
4816
  }
4775
- for (const [outputStream, inputStreams] of pipeGroups.entries()) pipeStreams(inputStreams.length === 1 ? inputStreams[0] : mergeStreams(inputStreams), outputStream);
4817
+ for (const [outputStream, inputStreams] of pipeGroups.entries()) {
4818
+ const inputStream = inputStreams.length === 1 ? inputStreams[0] : mergeStreams(inputStreams);
4819
+ pipeStreams(inputStream, outputStream);
4820
+ }
4776
4821
  };
4777
4822
  const pipeTransform = (subprocess, stream, direction, fdNumber) => {
4778
4823
  if (direction === "output") pipeStreams(subprocess.stdio[fdNumber], stream);
@@ -5261,12 +5306,13 @@ const stopReadingOnStreamEnd = async (onStreamEnd, controller, stream) => {
5261
5306
  }
5262
5307
  };
5263
5308
  const iterateOnStream = ({ stream, controller, binary, shouldEncode, encoding, shouldSplit, preserveNewlines }) => {
5309
+ const onStdoutChunk = (0, node_events.on)(stream, "data", {
5310
+ signal: controller.signal,
5311
+ highWaterMark: HIGH_WATER_MARK,
5312
+ highWatermark: HIGH_WATER_MARK
5313
+ });
5264
5314
  return iterateOnData({
5265
- onStdoutChunk: (0, node_events.on)(stream, "data", {
5266
- signal: controller.signal,
5267
- highWaterMark: HIGH_WATER_MARK,
5268
- highWatermark: HIGH_WATER_MARK
5269
- }),
5315
+ onStdoutChunk,
5270
5316
  controller,
5271
5317
  binary,
5272
5318
  shouldEncode,
@@ -5310,12 +5356,13 @@ const getStreamOutput = async ({ stream, onStreamEnd, fdNumber, encoding, buffer
5310
5356
  await Promise.all([resumeStream(stream), logPromise]);
5311
5357
  return;
5312
5358
  }
5359
+ const stripFinalNewlineValue = getStripFinalNewline(stripFinalNewline, fdNumber);
5313
5360
  const iterable = iterateForResult({
5314
5361
  stream,
5315
5362
  onStreamEnd,
5316
5363
  lines,
5317
5364
  encoding,
5318
- stripFinalNewline: getStripFinalNewline(stripFinalNewline, fdNumber),
5365
+ stripFinalNewline: stripFinalNewlineValue,
5319
5366
  allMixed
5320
5367
  });
5321
5368
  const [output] = await Promise.all([getStreamContents({
@@ -5335,14 +5382,15 @@ const logOutputAsync = async ({ stream, onStreamEnd, fdNumber, encoding, allMixe
5335
5382
  verboseInfo,
5336
5383
  fdNumber
5337
5384
  })) return;
5338
- await logLines(iterateForResult({
5385
+ const linesIterable = iterateForResult({
5339
5386
  stream,
5340
5387
  onStreamEnd,
5341
5388
  lines: true,
5342
5389
  encoding,
5343
5390
  stripFinalNewline: true,
5344
5391
  allMixed
5345
- }), stream, fdNumber, verboseInfo);
5392
+ });
5393
+ await logLines(linesIterable, stream, fdNumber, verboseInfo);
5346
5394
  };
5347
5395
  const resumeStream = async (stream) => {
5348
5396
  await (0, node_timers_promises.setImmediate)();
@@ -5488,9 +5536,10 @@ const getAllMixed = ({ all, stdout, stderr }) => all && stdout && stderr && stdo
5488
5536
  //#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/verbose/ipc.js
5489
5537
  const shouldLogIpc = (verboseInfo) => isFullVerbose(verboseInfo, "ipc");
5490
5538
  const logIpcOutput = (message, verboseInfo) => {
5539
+ const verboseMessage = serializeVerboseMessage(message);
5491
5540
  verboseLog({
5492
5541
  type: "ipc",
5493
- verboseMessage: serializeVerboseMessage(message),
5542
+ verboseMessage,
5494
5543
  fdNumber: "ipc",
5495
5544
  verboseInfo
5496
5545
  });
@@ -5886,14 +5935,15 @@ const onDuplexDestroy = async ({ subprocessStdout, subprocessStdin, subprocess,
5886
5935
  const createIterable = (subprocess, encoding, { from, binary: binaryOption = false, preserveNewlines = false } = {}) => {
5887
5936
  const binary = binaryOption || BINARY_ENCODINGS.has(encoding);
5888
5937
  const subprocessStdout = getFromStream(subprocess, from);
5889
- return iterateOnStdoutData(iterateOnSubprocessStream({
5938
+ const onStdoutData = iterateOnSubprocessStream({
5890
5939
  subprocessStdout,
5891
5940
  subprocess,
5892
5941
  binary,
5893
5942
  shouldEncode: true,
5894
5943
  encoding,
5895
5944
  preserveNewlines
5896
- }), subprocessStdout, subprocess);
5945
+ });
5946
+ return iterateOnStdoutData(onStdoutData, subprocessStdout, subprocess);
5897
5947
  };
5898
5948
  const iterateOnStdoutData = async function* (onStdoutData, subprocessStdout, subprocess) {
5899
5949
  try {
@@ -6053,19 +6103,22 @@ const handlePromise = async ({ subprocess, options, startTime, verboseInfo, file
6053
6103
  });
6054
6104
  controller.abort();
6055
6105
  onInternalError.resolve();
6056
- return handleResult(getAsyncResult({
6106
+ const stdio = stdioResults.map((stdioResult, fdNumber) => stripNewline(stdioResult, options, fdNumber));
6107
+ const all = stripNewline(allResult, options, "all");
6108
+ const result = getAsyncResult({
6057
6109
  errorInfo,
6058
6110
  exitCode,
6059
6111
  signal,
6060
- stdio: stdioResults.map((stdioResult, fdNumber) => stripNewline(stdioResult, options, fdNumber)),
6061
- all: stripNewline(allResult, options, "all"),
6112
+ stdio,
6113
+ all,
6062
6114
  ipcOutput,
6063
6115
  context,
6064
6116
  options,
6065
6117
  command,
6066
6118
  escapedCommand,
6067
6119
  startTime
6068
- }), verboseInfo, options);
6120
+ });
6121
+ return handleResult(result, verboseInfo, options);
6069
6122
  };
6070
6123
  const getAsyncResult = ({ errorInfo, exitCode, signal, stdio, all, ipcOutput, context, options, command, escapedCommand, startTime }) => "error" in errorInfo ? makeError({
6071
6124
  error: errorInfo.error,
@@ -6109,7 +6162,7 @@ const mergeOption = (optionName, boundOptionValue, optionValue) => {
6109
6162
  };
6110
6163
  return optionValue;
6111
6164
  };
6112
- const DEEP_OPTIONS = new Set(["env", ...FD_SPECIFIC_OPTIONS]);
6165
+ const DEEP_OPTIONS = /* @__PURE__ */ new Set(["env", ...FD_SPECIFIC_OPTIONS]);
6113
6166
  //#endregion
6114
6167
  //#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/methods/create.js
6115
6168
  const createExeca = (mapArguments, boundOptions, deepOptions, setBoundExeca) => {
@@ -6136,7 +6189,8 @@ const callBoundExeca = ({ mapArguments, deepOptions = {}, boundOptions = {}, set
6136
6189
  return isSync ? execaCoreSync(file, commandArguments, options) : execaCoreAsync(file, commandArguments, options, createNested);
6137
6190
  };
6138
6191
  const parseArguments = ({ mapArguments, firstArgument, nextArguments, deepOptions, boundOptions }) => {
6139
- const [initialFile, initialArguments, initialOptions] = normalizeParameters(...isTemplateString(firstArgument) ? parseTemplates(firstArgument, nextArguments) : [firstArgument, ...nextArguments]);
6192
+ const callArguments = isTemplateString(firstArgument) ? parseTemplates(firstArgument, nextArguments) : [firstArgument, ...nextArguments];
6193
+ const [initialFile, initialArguments, initialOptions] = normalizeParameters(...callArguments);
6140
6194
  const mergedOptions = mergeOptions(mergeOptions(deepOptions, boundOptions), initialOptions);
6141
6195
  const { file = initialFile, commandArguments = initialArguments, options = mergedOptions, isSync = false } = mapArguments({
6142
6196
  file: initialFile,