@hot-updater/bare 1.0.0-rc.1 → 1.0.0-rc.14

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,29 +17,29 @@ 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 crypto = require("crypto");
26
26
  let fs_promises = require("fs/promises");
27
- fs_promises = __toESM(fs_promises);
27
+ fs_promises = __toESM(fs_promises, 1);
28
28
  let path = require("path");
29
- path = __toESM(path);
29
+ path = __toESM(path, 1);
30
30
  let _hot_updater_cli_tools = require("@hot-updater/cli-tools");
31
31
  let node_url = require("node:url");
32
32
  let node_child_process = require("node:child_process");
33
33
  let node_string_decoder = require("node:string_decoder");
34
34
  let node_util = require("node:util");
35
35
  let node_process = require("node:process");
36
- node_process = __toESM(node_process);
36
+ node_process = __toESM(node_process, 1);
37
37
  let node_tty = require("node:tty");
38
- node_tty = __toESM(node_tty);
38
+ node_tty = __toESM(node_tty, 1);
39
39
  let node_path = require("node:path");
40
- node_path = __toESM(node_path);
40
+ node_path = __toESM(node_path, 1);
41
41
  let fs = require("fs");
42
- fs = __toESM(fs);
42
+ fs = __toESM(fs, 1);
43
43
  let node_timers_promises = require("node:timers/promises");
44
44
  let node_os = require("node:os");
45
45
  let node_events = require("node:events");
@@ -147,7 +147,8 @@ const parseTemplate = ({ templates, expressions, tokens, index, template }) => {
147
147
  const newTokens = concatTokens(tokens, nextTokens, leadingWhitespaces);
148
148
  if (index === expressions.length) return newTokens;
149
149
  const expression = expressions[index];
150
- return concatTokens(newTokens, Array.isArray(expression) ? expression.map((expression) => parseExpression(expression)) : [parseExpression(expression)], trailingWhitespaces);
150
+ const expressionTokens = Array.isArray(expression) ? expression.map((expression) => parseExpression(expression)) : [parseExpression(expression)];
151
+ return concatTokens(newTokens, expressionTokens, trailingWhitespaces);
151
152
  };
152
153
  const splitByWhitespaces = (template, rawTemplate) => {
153
154
  if (rawTemplate.length === 0) return {
@@ -180,7 +181,7 @@ const splitByWhitespaces = (template, rawTemplate) => {
180
181
  trailingWhitespaces
181
182
  };
182
183
  };
183
- const DELIMITERS = new Set([
184
+ const DELIMITERS = /* @__PURE__ */ new Set([
184
185
  " ",
185
186
  " ",
186
187
  "\r",
@@ -232,7 +233,8 @@ const normalizeFdSpecificOptions = (options) => {
232
233
  };
233
234
  const normalizeFdSpecificOption = (options, optionName) => {
234
235
  const optionBaseArray = Array.from({ length: getStdioLength(options) + 1 });
235
- return addDefaultValue$1(normalizeFdSpecificValue(options[optionName], optionBaseArray, optionName), optionName);
236
+ const optionArray = normalizeFdSpecificValue(options[optionName], optionBaseArray, optionName);
237
+ return addDefaultValue$1(optionArray, optionName);
236
238
  };
237
239
  const getStdioLength = ({ stdio }) => Array.isArray(stdio) ? Math.max(stdio.length, STANDARD_STREAMS_ALIASES.length) : STANDARD_STREAMS_ALIASES.length;
238
240
  const normalizeFdSpecificValue = (optionValue, optionArray, optionName) => isPlainObject(optionValue) ? normalizeOptionObject(optionValue, optionArray, optionName) : optionArray.fill(optionValue);
@@ -265,7 +267,7 @@ const addDefaultValue$1 = (optionArray, optionName) => optionArray.map((optionVa
265
267
  const DEFAULT_OPTIONS = {
266
268
  lines: false,
267
269
  buffer: true,
268
- maxBuffer: 1e3 * 1e3 * 100,
270
+ maxBuffer: 1e8,
269
271
  verbose: (0, node_util.debuglog)("execa").enabled ? "full" : "none",
270
272
  stripFinalNewline: true
271
273
  };
@@ -313,7 +315,7 @@ const escapeControlCharacter = (character) => {
313
315
  };
314
316
  const getSpecialCharRegExp = () => {
315
317
  try {
316
- return /* @__PURE__ */ new RegExp("\\p{Separator}|\\p{Other}", "gu");
318
+ return new RegExp("\\p{Separator}|\\p{Other}", "gu");
317
319
  } catch {
318
320
  return /[\s\u0000-\u001F\u007F-\u009F\u00AD]/g;
319
321
  }
@@ -733,11 +735,13 @@ const appendNewline = (printedLine) => printedLine.endsWith("\n") ? printedLine
733
735
  //#endregion
734
736
  //#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/verbose/log.js
735
737
  const verboseLog = ({ type, verboseMessage, fdNumber, verboseInfo, result }) => {
736
- const finalLines = applyVerboseOnLines(getPrintedLines(verboseMessage, getVerboseObject({
738
+ const verboseObject = getVerboseObject({
737
739
  type,
738
740
  result,
739
741
  verboseInfo
740
- })), verboseInfo, fdNumber);
742
+ });
743
+ const printedLines = getPrintedLines(verboseMessage, verboseObject);
744
+ const finalLines = applyVerboseOnLines(printedLines, verboseInfo, fdNumber);
741
745
  if (finalLines !== "") console.warn(finalLines.slice(0, -1));
742
746
  };
743
747
  const getVerboseObject = ({ type, result, verboseInfo: { escapedCommand, commandId, rawOptions: { piped = false, ...options } } }) => ({
@@ -760,7 +764,8 @@ const getPrintedLine = (verboseObject) => {
760
764
  };
761
765
  };
762
766
  const serializeVerboseMessage = (message) => {
763
- return escapeLines(typeof message === "string" ? message : (0, node_util.inspect)(message)).replaceAll(" ", " ".repeat(TAB_SIZE));
767
+ const messageString = typeof message === "string" ? message : (0, node_util.inspect)(message);
768
+ return escapeLines(messageString).replaceAll(" ", " ".repeat(TAB_SIZE));
764
769
  };
765
770
  const TAB_SIZE = 2;
766
771
  //#endregion
@@ -805,7 +810,8 @@ const getDurationMs = (startTime) => Number(node_process.hrtime.bigint() - start
805
810
  const handleCommand = (filePath, rawArguments, rawOptions) => {
806
811
  const startTime = getStartTime();
807
812
  const { command, escapedCommand } = joinCommand(filePath, rawArguments);
808
- const verboseInfo = getVerboseInfo(normalizeFdSpecificOption(rawOptions, "verbose"), escapedCommand, { ...rawOptions });
813
+ const verbose = normalizeFdSpecificOption(rawOptions, "verbose");
814
+ const verboseInfo = getVerboseInfo(verbose, escapedCommand, { ...rawOptions });
809
815
  logCommand(escapedCommand, verboseInfo);
810
816
  return {
811
817
  command,
@@ -926,7 +932,8 @@ var require_which = /* @__PURE__ */ __commonJSMin(((exports, module) => {
926
932
  const getNotFoundError = (cmd) => Object.assign(/* @__PURE__ */ new Error(`not found: ${cmd}`), { code: "ENOENT" });
927
933
  const getPathInfo = (cmd, opt) => {
928
934
  const colon = opt.colon || COLON;
929
- const pathEnv = cmd.match(/\//) || isWindows && cmd.match(/\\/) ? [""] : [...isWindows ? [process.cwd()] : [], ...(opt.path || process.env.PATH || "").split(colon)];
935
+ const pathEnv = cmd.match(/\//) || isWindows && cmd.match(/\\/) ? [""] : [...isWindows ? [process.cwd()] : [], ...(opt.path || process.env.PATH ||
936
+ /* istanbul ignore next: very unusual */ "").split(colon)];
930
937
  const pathExtExe = isWindows ? opt.pathExt || process.env.PATHEXT || ".EXE;.CMD;.BAT;.COM" : "";
931
938
  const pathExt = isWindows ? pathExtExe.split(colon) : [""];
932
939
  if (isWindows) {
@@ -951,14 +958,17 @@ var require_which = /* @__PURE__ */ __commonJSMin(((exports, module) => {
951
958
  const ppRaw = pathEnv[i];
952
959
  const pathPart = /^".*"$/.test(ppRaw) ? ppRaw.slice(1, -1) : ppRaw;
953
960
  const pCmd = path$10.join(pathPart, cmd);
954
- resolve(subStep(!pathPart && /^\.[\\\/]/.test(cmd) ? cmd.slice(0, 2) + pCmd : pCmd, i, 0));
961
+ const p = !pathPart && /^\.[\\\/]/.test(cmd) ? cmd.slice(0, 2) + pCmd : pCmd;
962
+ resolve(subStep(p, i, 0));
955
963
  });
956
964
  const subStep = (p, i, ii) => new Promise((resolve, reject) => {
957
965
  if (ii === pathExt.length) return resolve(step(i + 1));
958
966
  const ext = pathExt[ii];
959
967
  isexe(p + ext, { pathExt: pathExtExe }, (er, is) => {
960
- if (!er && is) if (opt.all) found.push(p + ext);
961
- else return resolve(p + ext);
968
+ if (!er && is) {
969
+ if (opt.all) found.push(p + ext);
970
+ else return resolve(p + ext);
971
+ }
962
972
  return resolve(subStep(p, i, ii + 1));
963
973
  });
964
974
  });
@@ -976,8 +986,10 @@ var require_which = /* @__PURE__ */ __commonJSMin(((exports, module) => {
976
986
  for (let j = 0; j < pathExt.length; j++) {
977
987
  const cur = p + pathExt[j];
978
988
  try {
979
- if (isexe.sync(cur, { pathExt: pathExtExe })) if (opt.all) found.push(cur);
980
- else return cur;
989
+ if (isexe.sync(cur, { pathExt: pathExtExe })) {
990
+ if (opt.all) found.push(cur);
991
+ else return cur;
992
+ }
981
993
  } catch (ex) {}
982
994
  }
983
995
  }
@@ -1668,7 +1680,7 @@ const normalizeForceKillAfterDelay = (forceKillAfterDelay) => {
1668
1680
  if (!Number.isFinite(forceKillAfterDelay) || forceKillAfterDelay < 0) throw new TypeError(`Expected the \`forceKillAfterDelay\` option to be a non-negative integer, got \`${forceKillAfterDelay}\` (${typeof forceKillAfterDelay})`);
1669
1681
  return forceKillAfterDelay;
1670
1682
  };
1671
- const DEFAULT_FORCE_KILL_TIMEOUT = 1e3 * 5;
1683
+ const DEFAULT_FORCE_KILL_TIMEOUT = 5e3;
1672
1684
  const subprocessKill = ({ kill, options: { forceKillAfterDelay, killSignal }, onInternalError, context, controller }, signalOrError, errorArgument) => {
1673
1685
  const { signal, error } = parseKillArguments(signalOrError, errorArgument, killSignal);
1674
1686
  emitKillError(error, onInternalError);
@@ -1770,7 +1782,7 @@ const handleSerializationError = ({ error, methodName, isSubprocess, message })
1770
1782
  if (isSerializationError(error)) throw new Error(`${getMethodName(methodName, isSubprocess)}'s argument type is invalid: the message cannot be serialized: ${String(message)}.`, { cause: error });
1771
1783
  };
1772
1784
  const isSerializationError = ({ code, message }) => SERIALIZATION_ERROR_CODES.has(code) || SERIALIZATION_ERROR_MESSAGES.some((serializationErrorMessage) => message.includes(serializationErrorMessage));
1773
- const SERIALIZATION_ERROR_CODES = new Set(["ERR_MISSING_ARGS", "ERR_INVALID_ARG_TYPE"]);
1785
+ const SERIALIZATION_ERROR_CODES = /* @__PURE__ */ new Set(["ERR_MISSING_ARGS", "ERR_INVALID_ARG_TYPE"]);
1774
1786
  const SERIALIZATION_ERROR_MESSAGES = [
1775
1787
  "could not be cloned",
1776
1788
  "circular structure",
@@ -1980,7 +1992,8 @@ const isConnected = (anyProcess) => {
1980
1992
  //#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/ipc/strict.js
1981
1993
  const handleSendStrict = ({ anyProcess, channel, isSubprocess, message, strict }) => {
1982
1994
  if (!strict) return message;
1983
- const hasListeners = hasMessageListeners(anyProcess, getIpcEmitter(anyProcess, channel, isSubprocess));
1995
+ const ipcEmitter = getIpcEmitter(anyProcess, channel, isSubprocess);
1996
+ const hasListeners = hasMessageListeners(anyProcess, ipcEmitter);
1984
1997
  return {
1985
1998
  id: count++,
1986
1999
  type: REQUEST_TYPE,
@@ -2212,7 +2225,8 @@ const throwOnGracefulCancel = ({ subprocess, cancelSignal, gracefulCancel, force
2212
2225
  })] : [];
2213
2226
  const sendOnAbort = async ({ subprocess, cancelSignal, forceKillAfterDelay, context, controller: { signal } }) => {
2214
2227
  await onAbortedSignal(cancelSignal, signal);
2215
- await sendAbort(subprocess, getReason(cancelSignal));
2228
+ const reason = getReason(cancelSignal);
2229
+ await sendAbort(subprocess, reason);
2216
2230
  killOnTimeout({
2217
2231
  kill: subprocess.kill,
2218
2232
  forceKillAfterDelay,
@@ -2324,8 +2338,8 @@ Please rename it to ${serializeEncoding(correctEncoding)}.`);
2324
2338
  throw new TypeError(`Invalid option \`encoding: ${serializeEncoding(encoding)}\`.
2325
2339
  Please rename it to one of: ${correctEncodings}.`);
2326
2340
  };
2327
- const TEXT_ENCODINGS = new Set(["utf8", "utf16le"]);
2328
- const BINARY_ENCODINGS = new Set([
2341
+ const TEXT_ENCODINGS = /* @__PURE__ */ new Set(["utf8", "utf16le"]);
2342
+ const BINARY_ENCODINGS = /* @__PURE__ */ new Set([
2329
2343
  "buffer",
2330
2344
  "hex",
2331
2345
  "base64",
@@ -2333,7 +2347,7 @@ const BINARY_ENCODINGS = new Set([
2333
2347
  "latin1",
2334
2348
  "ascii"
2335
2349
  ]);
2336
- const ENCODINGS = new Set([...TEXT_ENCODINGS, ...BINARY_ENCODINGS]);
2350
+ const ENCODINGS = /* @__PURE__ */ new Set([...TEXT_ENCODINGS, ...BINARY_ENCODINGS]);
2337
2351
  const getCorrectEncoding = (encoding) => {
2338
2352
  if (encoding === null) return "buffer";
2339
2353
  if (typeof encoding !== "string") return;
@@ -2380,7 +2394,8 @@ const normalizeOptions = (filePath, rawArguments, rawOptions) => {
2380
2394
  rawOptions.cwd = normalizeCwd(rawOptions.cwd);
2381
2395
  const [processedFile, processedArguments, processedOptions] = handleNodeOption(filePath, rawArguments, rawOptions);
2382
2396
  const { command: file, args: commandArguments, options: initialOptions } = import_cross_spawn.default._parse(processedFile, processedArguments, processedOptions);
2383
- const options = addDefaultOptions(normalizeFdSpecificOptions(initialOptions));
2397
+ const fdOptions = normalizeFdSpecificOptions(initialOptions);
2398
+ const options = addDefaultOptions(fdOptions);
2384
2399
  validateTimeout(options);
2385
2400
  validateEncoding(options);
2386
2401
  validateIpcInputOption(options);
@@ -2581,14 +2596,17 @@ const getStreamContents$1 = async (stream, { init, convertChunk, getSize, trunca
2581
2596
  const state = init();
2582
2597
  state.length = 0;
2583
2598
  try {
2584
- for await (const chunk of asyncIterable) appendChunk({
2585
- convertedChunk: convertChunk[getChunkType(chunk)](chunk, state),
2586
- state,
2587
- getSize,
2588
- truncateChunk,
2589
- addChunk,
2590
- maxBuffer
2591
- });
2599
+ for await (const chunk of asyncIterable) {
2600
+ const convertedChunk = convertChunk[getChunkType(chunk)](chunk, state);
2601
+ appendChunk({
2602
+ convertedChunk,
2603
+ state,
2604
+ getSize,
2605
+ truncateChunk,
2606
+ addChunk,
2607
+ maxBuffer
2608
+ });
2609
+ }
2592
2610
  appendFinalChunk({
2593
2611
  state,
2594
2612
  convertChunk,
@@ -2874,7 +2892,8 @@ const getErrorPrefix = ({ originalError, timedOut, timeout, isMaxBuffer, maxBuff
2874
2892
  const getForcefulSuffix = (isForcefullyTerminated, forceKillAfterDelay) => isForcefullyTerminated ? ` and was forcefully terminated after ${forceKillAfterDelay} milliseconds` : "";
2875
2893
  const getOriginalMessage = (originalError, cwd) => {
2876
2894
  if (originalError instanceof DiscardedError) return;
2877
- const escapedOriginalMessage = escapeLines(fixCwdError(isExecaError(originalError) ? originalError.originalMessage : String(originalError?.message ?? originalError), cwd));
2895
+ const originalMessage = isExecaError(originalError) ? originalError.originalMessage : String(originalError?.message ?? originalError);
2896
+ const escapedOriginalMessage = escapeLines(fixCwdError(originalMessage, cwd));
2878
2897
  return escapedOriginalMessage === "" ? void 0 : escapedOriginalMessage;
2879
2898
  };
2880
2899
  const serializeIpcMessage = (ipcMessage) => typeof ipcMessage === "string" ? ipcMessage : (0, node_util.inspect)(ipcMessage);
@@ -3085,26 +3104,28 @@ function prettyMilliseconds(milliseconds, options) {
3085
3104
  add(Number(parsed.hours), "hour", "h");
3086
3105
  }
3087
3106
  add(Number(parsed.minutes), "minute", "m");
3088
- if (!options.hideSeconds) if (options.separateMilliseconds || options.formatSubMilliseconds || !options.colonNotation && milliseconds < 1e3 && !options.subSecondsAsDecimals) {
3089
- const seconds = Number(parsed.seconds);
3090
- const milliseconds = Number(parsed.milliseconds);
3091
- const microseconds = Number(parsed.microseconds);
3092
- const nanoseconds = Number(parsed.nanoseconds);
3093
- add(seconds, "second", "s");
3094
- if (options.formatSubMilliseconds) {
3095
- add(milliseconds, "millisecond", "ms");
3096
- add(microseconds, "microsecond", "µs");
3097
- add(nanoseconds, "nanosecond", "ns");
3107
+ if (!options.hideSeconds) {
3108
+ if (options.separateMilliseconds || options.formatSubMilliseconds || !options.colonNotation && milliseconds < 1e3 && !options.subSecondsAsDecimals) {
3109
+ const seconds = Number(parsed.seconds);
3110
+ const milliseconds = Number(parsed.milliseconds);
3111
+ const microseconds = Number(parsed.microseconds);
3112
+ const nanoseconds = Number(parsed.nanoseconds);
3113
+ add(seconds, "second", "s");
3114
+ if (options.formatSubMilliseconds) {
3115
+ add(milliseconds, "millisecond", "ms");
3116
+ add(microseconds, "microsecond", "µs");
3117
+ add(nanoseconds, "nanosecond", "ns");
3118
+ } else {
3119
+ const millisecondsAndBelow = milliseconds + microseconds / 1e3 + nanoseconds / 1e6;
3120
+ const millisecondsDecimalDigits = typeof options.millisecondsDecimalDigits === "number" ? options.millisecondsDecimalDigits : 0;
3121
+ const millisecondsString = millisecondsDecimalDigits ? millisecondsAndBelow.toFixed(millisecondsDecimalDigits) : millisecondsAndBelow >= 1 ? Math.round(millisecondsAndBelow) : Math.ceil(millisecondsAndBelow);
3122
+ add(Number.parseFloat(millisecondsString), "millisecond", "ms", millisecondsString);
3123
+ }
3098
3124
  } else {
3099
- const millisecondsAndBelow = milliseconds + microseconds / 1e3 + nanoseconds / 1e6;
3100
- const millisecondsDecimalDigits = typeof options.millisecondsDecimalDigits === "number" ? options.millisecondsDecimalDigits : 0;
3101
- const millisecondsString = millisecondsDecimalDigits ? millisecondsAndBelow.toFixed(millisecondsDecimalDigits) : millisecondsAndBelow >= 1 ? Math.round(millisecondsAndBelow) : Math.ceil(millisecondsAndBelow);
3102
- add(Number.parseFloat(millisecondsString), "millisecond", "ms", millisecondsString);
3125
+ const secondsFixed = floorDecimals((isBigInt ? Number(milliseconds % ONE_DAY_IN_MILLISECONDS) : milliseconds) / 1e3 % 60, typeof options.secondsDecimalDigits === "number" ? options.secondsDecimalDigits : 1);
3126
+ const secondsString = options.keepDecimalsOnWholeSeconds ? secondsFixed : secondsFixed.replace(/\.0+$/, "");
3127
+ add(Number.parseFloat(secondsString), "second", "s", secondsString);
3103
3128
  }
3104
- } else {
3105
- const secondsFixed = floorDecimals((isBigInt ? Number(milliseconds % ONE_DAY_IN_MILLISECONDS) : milliseconds) / 1e3 % 60, typeof options.secondsDecimalDigits === "number" ? options.secondsDecimalDigits : 1);
3106
- const secondsString = options.keepDecimalsOnWholeSeconds ? secondsFixed : secondsFixed.replace(/\.0+$/, "");
3107
- add(Number.parseFloat(secondsString), "second", "s", secondsString);
3108
3129
  }
3109
3130
  if (result.length === 0) return sign + "0" + (options.verbose ? " milliseconds" : "ms");
3110
3131
  const separator = options.colonNotation ? ":" : " ";
@@ -3129,9 +3150,10 @@ const logResult = (result, verboseInfo) => {
3129
3150
  logDuration(result, verboseInfo);
3130
3151
  };
3131
3152
  const logDuration = (result, verboseInfo) => {
3153
+ const verboseMessage = `(done in ${prettyMilliseconds(result.durationMs)})`;
3132
3154
  verboseLog({
3133
3155
  type: "duration",
3134
- verboseMessage: `(done in ${prettyMilliseconds(result.durationMs)})`,
3156
+ verboseMessage,
3135
3157
  verboseInfo,
3136
3158
  result
3137
3159
  });
@@ -3199,10 +3221,10 @@ const isTransformOptions = (value) => isPlainObject(value) && (value.transform !
3199
3221
  const isUrl = (value) => Object.prototype.toString.call(value) === "[object URL]";
3200
3222
  const isRegularUrl = (value) => isUrl(value) && value.protocol !== "file:";
3201
3223
  const isFilePathObject = (value) => isPlainObject(value) && Object.keys(value).length > 0 && Object.keys(value).every((key) => FILE_PATH_KEYS.has(key)) && isFilePathString(value.file);
3202
- const FILE_PATH_KEYS = new Set(["file", "append"]);
3224
+ const FILE_PATH_KEYS = /* @__PURE__ */ new Set(["file", "append"]);
3203
3225
  const isFilePathString = (file) => typeof file === "string";
3204
3226
  const isUnknownStdioString = (type, value) => type === "native" && typeof value === "string" && !KNOWN_STDIO_STRINGS.has(value);
3205
- const KNOWN_STDIO_STRINGS = new Set([
3227
+ const KNOWN_STDIO_STRINGS = /* @__PURE__ */ new Set([
3206
3228
  "ipc",
3207
3229
  "ignore",
3208
3230
  "inherit",
@@ -3216,24 +3238,24 @@ const isTransformStream = (value) => isReadableStream(value?.readable) && isWrit
3216
3238
  const isAsyncIterableObject = (value) => isObject(value) && typeof value[Symbol.asyncIterator] === "function";
3217
3239
  const isIterableObject = (value) => isObject(value) && typeof value[Symbol.iterator] === "function";
3218
3240
  const isObject = (value) => typeof value === "object" && value !== null;
3219
- const TRANSFORM_TYPES = new Set([
3241
+ const TRANSFORM_TYPES = /* @__PURE__ */ new Set([
3220
3242
  "generator",
3221
3243
  "asyncGenerator",
3222
3244
  "duplex",
3223
3245
  "webTransform"
3224
3246
  ]);
3225
- const FILE_TYPES = new Set([
3247
+ const FILE_TYPES = /* @__PURE__ */ new Set([
3226
3248
  "fileUrl",
3227
3249
  "filePath",
3228
3250
  "fileNumber"
3229
3251
  ]);
3230
- const SPECIAL_DUPLICATE_TYPES_SYNC = new Set(["fileUrl", "filePath"]);
3231
- const SPECIAL_DUPLICATE_TYPES = new Set([
3252
+ const SPECIAL_DUPLICATE_TYPES_SYNC = /* @__PURE__ */ new Set(["fileUrl", "filePath"]);
3253
+ const SPECIAL_DUPLICATE_TYPES = /* @__PURE__ */ new Set([
3232
3254
  ...SPECIAL_DUPLICATE_TYPES_SYNC,
3233
3255
  "webStream",
3234
3256
  "nodeStream"
3235
3257
  ]);
3236
- const FORBID_DUPLICATE_TYPES = new Set(["webTransform", "duplex"]);
3258
+ const FORBID_DUPLICATE_TYPES = /* @__PURE__ */ new Set(["webTransform", "duplex"]);
3237
3259
  const TYPE_TO_MESSAGE = {
3238
3260
  generator: "a generator",
3239
3261
  asyncGenerator: "an async generator",
@@ -3566,7 +3588,8 @@ const validateDuplicateStreamSync = ({ otherStdioItems, type, value, optionName,
3566
3588
  const getDuplicateStreamInstance = ({ otherStdioItems, type, value, optionName, direction }) => {
3567
3589
  const duplicateStdioItems = otherStdioItems.filter((stdioItem) => hasSameValue(stdioItem, value));
3568
3590
  if (duplicateStdioItems.length === 0) return;
3569
- throwOnDuplicateStream(duplicateStdioItems.find((stdioItem) => stdioItem.direction !== direction), optionName, type);
3591
+ const differentStdioItem = duplicateStdioItems.find((stdioItem) => stdioItem.direction !== direction);
3592
+ throwOnDuplicateStream(differentStdioItem, optionName, type);
3570
3593
  return direction === "output" ? duplicateStdioItems[0].stream : void 0;
3571
3594
  };
3572
3595
  const hasSameValue = ({ type, value }, secondValue) => {
@@ -3575,7 +3598,8 @@ const hasSameValue = ({ type, value }, secondValue) => {
3575
3598
  return value === secondValue;
3576
3599
  };
3577
3600
  const validateDuplicateTransform = ({ otherStdioItems, type, value, optionName }) => {
3578
- throwOnDuplicateStream(otherStdioItems.find(({ value: { transform } }) => transform === value.transform), optionName, type);
3601
+ const duplicateStdioItem = otherStdioItems.find(({ value: { transform } }) => transform === value.transform);
3602
+ throwOnDuplicateStream(duplicateStdioItem, optionName, type);
3579
3603
  };
3580
3604
  const throwOnDuplicateStream = (stdioItem, optionName, type) => {
3581
3605
  if (stdioItem !== void 0) throw new TypeError(`The \`${stdioItem.optionName}\` and \`${optionName}\` options must not target ${TYPE_TO_MESSAGE[type]} that is the same.`);
@@ -3583,13 +3607,14 @@ const throwOnDuplicateStream = (stdioItem, optionName, type) => {
3583
3607
  //#endregion
3584
3608
  //#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/stdio/handle.js
3585
3609
  const handleStdio = (addProperties, options, verboseInfo, isSync) => {
3610
+ const initialFileDescriptors = normalizeStdioOption(options, verboseInfo, isSync).map((stdioOption, fdNumber) => getFileDescriptor({
3611
+ stdioOption,
3612
+ fdNumber,
3613
+ options,
3614
+ isSync
3615
+ }));
3586
3616
  const fileDescriptors = getFinalFileDescriptors({
3587
- initialFileDescriptors: normalizeStdioOption(options, verboseInfo, isSync).map((stdioOption, fdNumber) => getFileDescriptor({
3588
- stdioOption,
3589
- fdNumber,
3590
- options,
3591
- isSync
3592
- })),
3617
+ initialFileDescriptors,
3593
3618
  addProperties,
3594
3619
  options,
3595
3620
  isSync
@@ -3606,13 +3631,14 @@ const getFileDescriptor = ({ stdioOption, fdNumber, options, isSync }) => {
3606
3631
  optionName
3607
3632
  });
3608
3633
  const direction = getStreamDirection(initialStdioItems, fdNumber, optionName);
3609
- const normalizedStdioItems = normalizeTransforms(initialStdioItems.map((stdioItem) => handleNativeStream({
3634
+ const stdioItems = initialStdioItems.map((stdioItem) => handleNativeStream({
3610
3635
  stdioItem,
3611
3636
  isStdioArray,
3612
3637
  fdNumber,
3613
3638
  direction,
3614
3639
  isSync
3615
- })), optionName, direction, options);
3640
+ }));
3641
+ const normalizedStdioItems = normalizeTransforms(stdioItems, optionName, direction, options);
3616
3642
  const objectMode = getFdObjectMode(normalizedStdioItems, direction);
3617
3643
  validateFileObjectMode(normalizedStdioItems, objectMode);
3618
3644
  return {
@@ -3622,7 +3648,8 @@ const getFileDescriptor = ({ stdioOption, fdNumber, options, isSync }) => {
3622
3648
  };
3623
3649
  };
3624
3650
  const initializeStdioItems = ({ stdioOption, fdNumber, options, optionName }) => {
3625
- const stdioItems = filterDuplicates([...(Array.isArray(stdioOption) ? stdioOption : [stdioOption]).map((value) => initializeStdioItem(value, optionName)), ...handleInputOptions(options, fdNumber)]);
3651
+ const initialStdioItems = [...(Array.isArray(stdioOption) ? stdioOption : [stdioOption]).map((value) => initializeStdioItem(value, optionName)), ...handleInputOptions(options, fdNumber)];
3652
+ const stdioItems = filterDuplicates(initialStdioItems);
3626
3653
  const isStdioArray = stdioItems.length > 1;
3627
3654
  validateStdioArray(stdioItems, isStdioArray, optionName);
3628
3655
  validateStreams(stdioItems);
@@ -3641,7 +3668,7 @@ const validateStdioArray = (stdioItems, isStdioArray, optionName) => {
3641
3668
  if (!isStdioArray) return;
3642
3669
  for (const { value, optionName } of stdioItems) if (INVALID_STDIO_ARRAY_OPTIONS.has(value)) throw new Error(`The \`${optionName}\` option must not include \`${value}\`.`);
3643
3670
  };
3644
- const INVALID_STDIO_ARRAY_OPTIONS = new Set(["ignore", "ipc"]);
3671
+ const INVALID_STDIO_ARRAY_OPTIONS = /* @__PURE__ */ new Set(["ignore", "ipc"]);
3645
3672
  const validateStreams = (stdioItems) => {
3646
3673
  for (const stdioItem of stdioItems) validateFileStdio(stdioItem);
3647
3674
  };
@@ -3970,7 +3997,10 @@ const generatorToStream = ({ value, value: { transform, final, writableObjectMod
3970
3997
  const runGeneratorsSync = (chunks, stdioItems, encoding, isInput) => {
3971
3998
  const generators = stdioItems.filter(({ type }) => type === "generator");
3972
3999
  const reversedGenerators = isInput ? generators.reverse() : generators;
3973
- for (const { value, optionName } of reversedGenerators) chunks = runTransformSync(addInternalGenerators(value, encoding, optionName), chunks);
4000
+ for (const { value, optionName } of reversedGenerators) {
4001
+ const generators = addInternalGenerators(value, encoding, optionName);
4002
+ chunks = runTransformSync(generators, chunks);
4003
+ }
3974
4004
  return chunks;
3975
4005
  };
3976
4006
  const addInternalGenerators = ({ transform, final, binary, writableObjectMode, readableObjectMode, preserveNewlines }, encoding, optionName) => {
@@ -4006,7 +4036,8 @@ const addInputOptionSync = (fileDescriptors, fdNumber, options) => {
4006
4036
  const [{ type, optionName }] = allStdioItems;
4007
4037
  throw new TypeError(`Only the \`stdin\` option, not \`${optionName}\`, can be ${TYPE_TO_MESSAGE[type]} with synchronous methods.`);
4008
4038
  }
4009
- options.input = joinToUint8Array(allStdioItems.map(({ contents }) => contents).map((contents) => applySingleInputGeneratorsSync(contents, stdioItems)));
4039
+ const transformedContents = allStdioItems.map(({ contents }) => contents).map((contents) => applySingleInputGeneratorsSync(contents, stdioItems));
4040
+ options.input = joinToUint8Array(transformedContents);
4010
4041
  };
4011
4042
  const applySingleInputGeneratorsSync = (contents, stdioItems) => {
4012
4043
  const newContents = runGeneratorsSync(contents, stdioItems, "utf8", true);
@@ -4021,7 +4052,7 @@ const validateSerializable = (newContents) => {
4021
4052
  //#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/verbose/output.js
4022
4053
  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)));
4023
4054
  const fdUsesVerbose = (fdNumber) => fdNumber === 1 || fdNumber === 2;
4024
- const PIPED_STDIO_VALUES = new Set(["pipe", "overlapped"]);
4055
+ const PIPED_STDIO_VALUES = /* @__PURE__ */ new Set(["pipe", "overlapped"]);
4025
4056
  const logLines = async (linesIterable, stream, fdNumber, verboseInfo) => {
4026
4057
  for await (const line of linesIterable) if (!isPipingStream(stream)) logLine(line, fdNumber, verboseInfo);
4027
4058
  };
@@ -4030,9 +4061,10 @@ const logLinesSync = (linesArray, fdNumber, verboseInfo) => {
4030
4061
  };
4031
4062
  const isPipingStream = (stream) => stream._readableState.pipes.length > 0;
4032
4063
  const logLine = (line, fdNumber, verboseInfo) => {
4064
+ const verboseMessage = serializeVerboseMessage(line);
4033
4065
  verboseLog({
4034
4066
  type: "output",
4035
- verboseMessage: serializeVerboseMessage(line),
4067
+ verboseMessage,
4036
4068
  fdNumber,
4037
4069
  verboseInfo
4038
4070
  });
@@ -4058,10 +4090,12 @@ const transformOutputSync = ({ fileDescriptors, syncResult: { output }, options,
4058
4090
  };
4059
4091
  const transformOutputResultSync = ({ result, fileDescriptors, fdNumber, state, outputFiles, isMaxBuffer, verboseInfo }, { buffer, encoding, lines, stripFinalNewline, maxBuffer }) => {
4060
4092
  if (result === null) return;
4061
- const uint8ArrayResult = bufferToUint8Array(truncateMaxBufferSync(result, isMaxBuffer, maxBuffer));
4093
+ const truncatedResult = truncateMaxBufferSync(result, isMaxBuffer, maxBuffer);
4094
+ const uint8ArrayResult = bufferToUint8Array(truncatedResult);
4062
4095
  const { stdioItems, objectMode } = fileDescriptors[fdNumber];
4096
+ const chunks = runOutputGeneratorsSync([uint8ArrayResult], stdioItems, encoding, state);
4063
4097
  const { serializedResult, finalResult = serializedResult } = serializeChunks({
4064
- chunks: runOutputGeneratorsSync([uint8ArrayResult], stdioItems, encoding, state),
4098
+ chunks,
4065
4099
  objectMode,
4066
4100
  encoding,
4067
4101
  lines,
@@ -4185,7 +4219,7 @@ const getResultError = (error, exitCode, signal) => {
4185
4219
  //#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/methods/main-sync.js
4186
4220
  const execaCoreSync = (rawFile, rawArguments, rawOptions) => {
4187
4221
  const { file, commandArguments, command, escapedCommand, startTime, verboseInfo, options, fileDescriptors } = handleSyncArguments(rawFile, rawArguments, rawOptions);
4188
- return handleResult(spawnSubprocessSync({
4222
+ const result = spawnSubprocessSync({
4189
4223
  file,
4190
4224
  commandArguments,
4191
4225
  options,
@@ -4194,11 +4228,13 @@ const execaCoreSync = (rawFile, rawArguments, rawOptions) => {
4194
4228
  verboseInfo,
4195
4229
  fileDescriptors,
4196
4230
  startTime
4197
- }), verboseInfo, options);
4231
+ });
4232
+ return handleResult(result, verboseInfo, options);
4198
4233
  };
4199
4234
  const handleSyncArguments = (rawFile, rawArguments, rawOptions) => {
4200
4235
  const { command, escapedCommand, startTime, verboseInfo } = handleCommand(rawFile, rawArguments, rawOptions);
4201
- const { file, commandArguments, options } = normalizeOptions(rawFile, rawArguments, normalizeSyncOptions(rawOptions));
4236
+ const syncOptions = normalizeSyncOptions(rawOptions);
4237
+ const { file, commandArguments, options } = normalizeOptions(rawFile, rawArguments, syncOptions);
4202
4238
  validateSyncOptions(options);
4203
4239
  return {
4204
4240
  file,
@@ -4243,14 +4279,16 @@ const spawnSubprocessSync = ({ file, commandArguments, options, command, escaped
4243
4279
  isMaxBuffer,
4244
4280
  verboseInfo
4245
4281
  });
4282
+ const stdio = output.map((stdioOutput, fdNumber) => stripNewline(stdioOutput, options, fdNumber));
4283
+ const all = stripNewline(getAllSync(output, options), options, "all");
4246
4284
  return getSyncResult({
4247
4285
  error,
4248
4286
  exitCode,
4249
4287
  signal,
4250
4288
  timedOut,
4251
4289
  isMaxBuffer,
4252
- stdio: output.map((stdioOutput, fdNumber) => stripNewline(stdioOutput, options, fdNumber)),
4253
- all: stripNewline(getAllSync(output, options), options, "all"),
4290
+ stdio,
4291
+ all,
4254
4292
  options,
4255
4293
  command,
4256
4294
  escapedCommand,
@@ -4260,7 +4298,8 @@ const spawnSubprocessSync = ({ file, commandArguments, options, command, escaped
4260
4298
  const runSubprocessSync = ({ file, commandArguments, options, command, escapedCommand, fileDescriptors, startTime }) => {
4261
4299
  try {
4262
4300
  addInputOptionsSync(fileDescriptors, options);
4263
- return (0, node_child_process.spawnSync)(file, commandArguments, normalizeSpawnSyncOptions(options));
4301
+ const normalizedOptions = normalizeSpawnSyncOptions(options);
4302
+ return (0, node_child_process.spawnSync)(file, commandArguments, normalizedOptions);
4264
4303
  } catch (error) {
4265
4304
  return makeEarlyError({
4266
4305
  error,
@@ -4474,17 +4513,18 @@ const handleEarlyError = ({ error, command, escapedCommand, fileDescriptors, opt
4474
4513
  writable,
4475
4514
  duplex
4476
4515
  });
4516
+ const earlyError = makeEarlyError({
4517
+ error,
4518
+ command,
4519
+ escapedCommand,
4520
+ fileDescriptors,
4521
+ options,
4522
+ startTime,
4523
+ isSync: false
4524
+ });
4477
4525
  return {
4478
4526
  subprocess,
4479
- promise: handleDummyPromise(makeEarlyError({
4480
- error,
4481
- command,
4482
- escapedCommand,
4483
- fileDescriptors,
4484
- options,
4485
- startTime,
4486
- isSync: false
4487
- }), verboseInfo, options)
4527
+ promise: handleDummyPromise(earlyError, verboseInfo, options)
4488
4528
  };
4489
4529
  };
4490
4530
  const createDummyStreams = (subprocess, fileDescriptors) => {
@@ -4668,8 +4708,10 @@ const endWhenStreamsDone = async ({ passThroughStream, stream, streams, ended, a
4668
4708
  controller.abort();
4669
4709
  updateMaxListeners(passThroughStream, -PASSTHROUGH_LISTENERS_PER_STREAM);
4670
4710
  }
4671
- if (streams.size > 0 && streams.size === ended.size + aborted.size) if (ended.size === 0 && aborted.size > 0) abortStream(passThroughStream);
4672
- else endStream(passThroughStream);
4711
+ if (streams.size > 0 && streams.size === ended.size + aborted.size) {
4712
+ if (ended.size === 0 && aborted.size > 0) abortStream(passThroughStream);
4713
+ else endStream(passThroughStream);
4714
+ }
4673
4715
  };
4674
4716
  const afterMergedStreamFinished = async (onFinished, stream, { signal }) => {
4675
4717
  try {
@@ -4775,7 +4817,10 @@ const pipeOutputAsync = (subprocess, fileDescriptors, controller) => {
4775
4817
  controller
4776
4818
  });
4777
4819
  }
4778
- for (const [outputStream, inputStreams] of pipeGroups.entries()) pipeStreams(inputStreams.length === 1 ? inputStreams[0] : mergeStreams(inputStreams), outputStream);
4820
+ for (const [outputStream, inputStreams] of pipeGroups.entries()) {
4821
+ const inputStream = inputStreams.length === 1 ? inputStreams[0] : mergeStreams(inputStreams);
4822
+ pipeStreams(inputStream, outputStream);
4823
+ }
4779
4824
  };
4780
4825
  const pipeTransform = (subprocess, stream, direction, fdNumber) => {
4781
4826
  if (direction === "output") pipeStreams(subprocess.stdio[fdNumber], stream);
@@ -5264,12 +5309,13 @@ const stopReadingOnStreamEnd = async (onStreamEnd, controller, stream) => {
5264
5309
  }
5265
5310
  };
5266
5311
  const iterateOnStream = ({ stream, controller, binary, shouldEncode, encoding, shouldSplit, preserveNewlines }) => {
5312
+ const onStdoutChunk = (0, node_events.on)(stream, "data", {
5313
+ signal: controller.signal,
5314
+ highWaterMark: HIGH_WATER_MARK,
5315
+ highWatermark: HIGH_WATER_MARK
5316
+ });
5267
5317
  return iterateOnData({
5268
- onStdoutChunk: (0, node_events.on)(stream, "data", {
5269
- signal: controller.signal,
5270
- highWaterMark: HIGH_WATER_MARK,
5271
- highWatermark: HIGH_WATER_MARK
5272
- }),
5318
+ onStdoutChunk,
5273
5319
  controller,
5274
5320
  binary,
5275
5321
  shouldEncode,
@@ -5313,12 +5359,13 @@ const getStreamOutput = async ({ stream, onStreamEnd, fdNumber, encoding, buffer
5313
5359
  await Promise.all([resumeStream(stream), logPromise]);
5314
5360
  return;
5315
5361
  }
5362
+ const stripFinalNewlineValue = getStripFinalNewline(stripFinalNewline, fdNumber);
5316
5363
  const iterable = iterateForResult({
5317
5364
  stream,
5318
5365
  onStreamEnd,
5319
5366
  lines,
5320
5367
  encoding,
5321
- stripFinalNewline: getStripFinalNewline(stripFinalNewline, fdNumber),
5368
+ stripFinalNewline: stripFinalNewlineValue,
5322
5369
  allMixed
5323
5370
  });
5324
5371
  const [output] = await Promise.all([getStreamContents({
@@ -5338,14 +5385,15 @@ const logOutputAsync = async ({ stream, onStreamEnd, fdNumber, encoding, allMixe
5338
5385
  verboseInfo,
5339
5386
  fdNumber
5340
5387
  })) return;
5341
- await logLines(iterateForResult({
5388
+ const linesIterable = iterateForResult({
5342
5389
  stream,
5343
5390
  onStreamEnd,
5344
5391
  lines: true,
5345
5392
  encoding,
5346
5393
  stripFinalNewline: true,
5347
5394
  allMixed
5348
- }), stream, fdNumber, verboseInfo);
5395
+ });
5396
+ await logLines(linesIterable, stream, fdNumber, verboseInfo);
5349
5397
  };
5350
5398
  const resumeStream = async (stream) => {
5351
5399
  await (0, node_timers_promises.setImmediate)();
@@ -5491,9 +5539,10 @@ const getAllMixed = ({ all, stdout, stderr }) => all && stdout && stderr && stdo
5491
5539
  //#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/verbose/ipc.js
5492
5540
  const shouldLogIpc = (verboseInfo) => isFullVerbose(verboseInfo, "ipc");
5493
5541
  const logIpcOutput = (message, verboseInfo) => {
5542
+ const verboseMessage = serializeVerboseMessage(message);
5494
5543
  verboseLog({
5495
5544
  type: "ipc",
5496
- verboseMessage: serializeVerboseMessage(message),
5545
+ verboseMessage,
5497
5546
  fdNumber: "ipc",
5498
5547
  verboseInfo
5499
5548
  });
@@ -5889,14 +5938,15 @@ const onDuplexDestroy = async ({ subprocessStdout, subprocessStdin, subprocess,
5889
5938
  const createIterable = (subprocess, encoding, { from, binary: binaryOption = false, preserveNewlines = false } = {}) => {
5890
5939
  const binary = binaryOption || BINARY_ENCODINGS.has(encoding);
5891
5940
  const subprocessStdout = getFromStream(subprocess, from);
5892
- return iterateOnStdoutData(iterateOnSubprocessStream({
5941
+ const onStdoutData = iterateOnSubprocessStream({
5893
5942
  subprocessStdout,
5894
5943
  subprocess,
5895
5944
  binary,
5896
5945
  shouldEncode: true,
5897
5946
  encoding,
5898
5947
  preserveNewlines
5899
- }), subprocessStdout, subprocess);
5948
+ });
5949
+ return iterateOnStdoutData(onStdoutData, subprocessStdout, subprocess);
5900
5950
  };
5901
5951
  const iterateOnStdoutData = async function* (onStdoutData, subprocessStdout, subprocess) {
5902
5952
  try {
@@ -6056,19 +6106,22 @@ const handlePromise = async ({ subprocess, options, startTime, verboseInfo, file
6056
6106
  });
6057
6107
  controller.abort();
6058
6108
  onInternalError.resolve();
6059
- return handleResult(getAsyncResult({
6109
+ const stdio = stdioResults.map((stdioResult, fdNumber) => stripNewline(stdioResult, options, fdNumber));
6110
+ const all = stripNewline(allResult, options, "all");
6111
+ const result = getAsyncResult({
6060
6112
  errorInfo,
6061
6113
  exitCode,
6062
6114
  signal,
6063
- stdio: stdioResults.map((stdioResult, fdNumber) => stripNewline(stdioResult, options, fdNumber)),
6064
- all: stripNewline(allResult, options, "all"),
6115
+ stdio,
6116
+ all,
6065
6117
  ipcOutput,
6066
6118
  context,
6067
6119
  options,
6068
6120
  command,
6069
6121
  escapedCommand,
6070
6122
  startTime
6071
- }), verboseInfo, options);
6123
+ });
6124
+ return handleResult(result, verboseInfo, options);
6072
6125
  };
6073
6126
  const getAsyncResult = ({ errorInfo, exitCode, signal, stdio, all, ipcOutput, context, options, command, escapedCommand, startTime }) => "error" in errorInfo ? makeError({
6074
6127
  error: errorInfo.error,
@@ -6112,7 +6165,7 @@ const mergeOption = (optionName, boundOptionValue, optionValue) => {
6112
6165
  };
6113
6166
  return optionValue;
6114
6167
  };
6115
- const DEEP_OPTIONS = new Set(["env", ...FD_SPECIFIC_OPTIONS]);
6168
+ const DEEP_OPTIONS = /* @__PURE__ */ new Set(["env", ...FD_SPECIFIC_OPTIONS]);
6116
6169
  //#endregion
6117
6170
  //#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/methods/create.js
6118
6171
  const createExeca = (mapArguments, boundOptions, deepOptions, setBoundExeca) => {
@@ -6139,7 +6192,8 @@ const callBoundExeca = ({ mapArguments, deepOptions = {}, boundOptions = {}, set
6139
6192
  return isSync ? execaCoreSync(file, commandArguments, options) : execaCoreAsync(file, commandArguments, options, createNested);
6140
6193
  };
6141
6194
  const parseArguments = ({ mapArguments, firstArgument, nextArguments, deepOptions, boundOptions }) => {
6142
- const [initialFile, initialArguments, initialOptions] = normalizeParameters(...isTemplateString(firstArgument) ? parseTemplates(firstArgument, nextArguments) : [firstArgument, ...nextArguments]);
6195
+ const callArguments = isTemplateString(firstArgument) ? parseTemplates(firstArgument, nextArguments) : [firstArgument, ...nextArguments];
6196
+ const [initialFile, initialArguments, initialOptions] = normalizeParameters(...callArguments);
6143
6197
  const mergedOptions = mergeOptions(mergeOptions(deepOptions, boundOptions), initialOptions);
6144
6198
  const { file = initialFile, commandArguments = initialArguments, options = mergedOptions, isSync = false } = mapArguments({
6145
6199
  file: initialFile,