@hot-updater/expo 0.28.0 → 0.29.1
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/babel-plugin.cjs +53 -0
- package/dist/babel-plugin.d.cts +33 -0
- package/dist/babel-plugin.d.mts +34 -0
- package/dist/babel-plugin.mjs +53 -0
- package/dist/index.cjs +318 -500
- package/dist/index.d.cts +5 -0
- package/dist/{index.d.ts → index.d.mts} +5 -0
- package/dist/{index.js → index.mjs} +310 -479
- package/package.json +40 -8
package/dist/index.cjs
CHANGED
|
@@ -1,16 +1,15 @@
|
|
|
1
|
-
|
|
1
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
+
//#region \0rolldown/runtime.js
|
|
2
3
|
var __create = Object.create;
|
|
3
4
|
var __defProp = Object.defineProperty;
|
|
4
5
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
6
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
7
|
var __getProtoOf = Object.getPrototypeOf;
|
|
7
8
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
-
var
|
|
9
|
-
return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
|
|
10
|
-
};
|
|
9
|
+
var __commonJSMin = (cb, mod) => () => (mod || cb((mod = { exports: {} }).exports, mod), mod.exports);
|
|
11
10
|
var __copyProps = (to, from, except, desc) => {
|
|
12
|
-
if (from && typeof from === "object" || typeof from === "function") for (var keys = __getOwnPropNames(from), i
|
|
13
|
-
key = keys[i
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") for (var keys = __getOwnPropNames(from), i = 0, n = keys.length, key; i < n; i++) {
|
|
12
|
+
key = keys[i];
|
|
14
13
|
if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
|
|
15
14
|
get: ((k) => from[k]).bind(null, key),
|
|
16
15
|
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
@@ -22,20 +21,13 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
22
21
|
value: mod,
|
|
23
22
|
enumerable: true
|
|
24
23
|
}) : target, mod));
|
|
25
|
-
|
|
26
24
|
//#endregion
|
|
27
|
-
let
|
|
28
|
-
|
|
29
|
-
let __hot_updater_cli_tools = require("@hot-updater/cli-tools");
|
|
30
|
-
__hot_updater_cli_tools = __toESM(__hot_updater_cli_tools);
|
|
25
|
+
let _hot_updater_bare = require("@hot-updater/bare");
|
|
26
|
+
let _hot_updater_cli_tools = require("@hot-updater/cli-tools");
|
|
31
27
|
let node_url = require("node:url");
|
|
32
|
-
node_url = __toESM(node_url);
|
|
33
28
|
let node_child_process = require("node:child_process");
|
|
34
|
-
node_child_process = __toESM(node_child_process);
|
|
35
29
|
let node_string_decoder = require("node:string_decoder");
|
|
36
|
-
node_string_decoder = __toESM(node_string_decoder);
|
|
37
30
|
let node_util = require("node:util");
|
|
38
|
-
node_util = __toESM(node_util);
|
|
39
31
|
let node_process = require("node:process");
|
|
40
32
|
node_process = __toESM(node_process);
|
|
41
33
|
let node_tty = require("node:tty");
|
|
@@ -47,29 +39,20 @@ path = __toESM(path);
|
|
|
47
39
|
let fs = require("fs");
|
|
48
40
|
fs = __toESM(fs);
|
|
49
41
|
let node_timers_promises = require("node:timers/promises");
|
|
50
|
-
node_timers_promises = __toESM(node_timers_promises);
|
|
51
42
|
let node_os = require("node:os");
|
|
52
|
-
node_os = __toESM(node_os);
|
|
53
43
|
let node_events = require("node:events");
|
|
54
|
-
node_events = __toESM(node_events);
|
|
55
44
|
let node_v8 = require("node:v8");
|
|
56
|
-
node_v8 = __toESM(node_v8);
|
|
57
45
|
let node_fs = require("node:fs");
|
|
58
|
-
node_fs = __toESM(node_fs);
|
|
59
46
|
let node_stream_promises = require("node:stream/promises");
|
|
60
|
-
node_stream_promises = __toESM(node_stream_promises);
|
|
61
47
|
let node_stream = require("node:stream");
|
|
62
|
-
node_stream = __toESM(node_stream);
|
|
63
48
|
let node_buffer = require("node:buffer");
|
|
64
|
-
|
|
65
|
-
|
|
49
|
+
let uuidv7 = require("uuidv7");
|
|
66
50
|
//#region ../../node_modules/.pnpm/is-plain-obj@4.1.0/node_modules/is-plain-obj/index.js
|
|
67
51
|
function isPlainObject(value) {
|
|
68
52
|
if (typeof value !== "object" || value === null) return false;
|
|
69
53
|
const prototype = Object.getPrototypeOf(value);
|
|
70
54
|
return (prototype === null || prototype === Object.prototype || Object.getPrototypeOf(prototype) === null) && !(Symbol.toStringTag in value) && !(Symbol.iterator in value);
|
|
71
55
|
}
|
|
72
|
-
|
|
73
56
|
//#endregion
|
|
74
57
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/arguments/file-url.js
|
|
75
58
|
const safeNormalizeFileUrl = (file, name) => {
|
|
@@ -80,7 +63,6 @@ const safeNormalizeFileUrl = (file, name) => {
|
|
|
80
63
|
const normalizeDenoExecPath = (file) => isDenoExecPath(file) ? file.toString() : file;
|
|
81
64
|
const isDenoExecPath = (file) => typeof file !== "string" && file && Object.getPrototypeOf(file) === String.prototype;
|
|
82
65
|
const normalizeFileUrl = (file) => file instanceof URL ? (0, node_url.fileURLToPath)(file) : file;
|
|
83
|
-
|
|
84
66
|
//#endregion
|
|
85
67
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/methods/parameters.js
|
|
86
68
|
const normalizeParameters = (rawFile, rawArguments = [], rawOptions = {}) => {
|
|
@@ -98,7 +80,6 @@ const normalizeParameters = (rawFile, rawArguments = [], rawOptions = {}) => {
|
|
|
98
80
|
options
|
|
99
81
|
];
|
|
100
82
|
};
|
|
101
|
-
|
|
102
83
|
//#endregion
|
|
103
84
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/utils/uint-array.js
|
|
104
85
|
const { toString: objectToString$1 } = Object.prototype;
|
|
@@ -138,7 +119,6 @@ const getJoinLength = (uint8Arrays) => {
|
|
|
138
119
|
for (const uint8Array of uint8Arrays) joinLength += uint8Array.length;
|
|
139
120
|
return joinLength;
|
|
140
121
|
};
|
|
141
|
-
|
|
142
122
|
//#endregion
|
|
143
123
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/methods/template.js
|
|
144
124
|
const isTemplateString = (templates) => Array.isArray(templates) && Array.isArray(templates.raw);
|
|
@@ -165,7 +145,7 @@ const parseTemplate = ({ templates, expressions, tokens, index, template }) => {
|
|
|
165
145
|
const newTokens = concatTokens(tokens, nextTokens, leadingWhitespaces);
|
|
166
146
|
if (index === expressions.length) return newTokens;
|
|
167
147
|
const expression = expressions[index];
|
|
168
|
-
return concatTokens(newTokens, Array.isArray(expression) ? expression.map((expression
|
|
148
|
+
return concatTokens(newTokens, Array.isArray(expression) ? expression.map((expression) => parseExpression(expression)) : [parseExpression(expression)], trailingWhitespaces);
|
|
169
149
|
};
|
|
170
150
|
const splitByWhitespaces = (template, rawTemplate) => {
|
|
171
151
|
if (rawTemplate.length === 0) return {
|
|
@@ -227,7 +207,6 @@ const getSubprocessResult = ({ stdout }) => {
|
|
|
227
207
|
if (stdout === void 0) throw new TypeError("Missing result.stdout in template expression. This is probably due to the previous subprocess' \"stdout\" option.");
|
|
228
208
|
throw new TypeError(`Unexpected "${typeof stdout}" stdout in template expression`);
|
|
229
209
|
};
|
|
230
|
-
|
|
231
210
|
//#endregion
|
|
232
211
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/utils/standard-stream.js
|
|
233
212
|
const isStandardStream = (stream) => STANDARD_STREAMS.includes(stream);
|
|
@@ -242,7 +221,6 @@ const STANDARD_STREAMS_ALIASES = [
|
|
|
242
221
|
"stderr"
|
|
243
222
|
];
|
|
244
223
|
const getStreamName = (fdNumber) => STANDARD_STREAMS_ALIASES[fdNumber] ?? `stdio[${fdNumber}]`;
|
|
245
|
-
|
|
246
224
|
//#endregion
|
|
247
225
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/arguments/specific.js
|
|
248
226
|
const normalizeFdSpecificOptions = (options) => {
|
|
@@ -297,7 +275,6 @@ const FD_SPECIFIC_OPTIONS = [
|
|
|
297
275
|
"stripFinalNewline"
|
|
298
276
|
];
|
|
299
277
|
const getFdSpecificValue = (optionArray, fdNumber) => fdNumber === "ipc" ? optionArray.at(-1) : optionArray[fdNumber];
|
|
300
|
-
|
|
301
278
|
//#endregion
|
|
302
279
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/verbose/values.js
|
|
303
280
|
const isVerbose = ({ verbose }, fdNumber) => getFdVerbose(verbose, fdNumber) !== "none";
|
|
@@ -314,7 +291,6 @@ const VERBOSE_VALUES = [
|
|
|
314
291
|
"short",
|
|
315
292
|
"full"
|
|
316
293
|
];
|
|
317
|
-
|
|
318
294
|
//#endregion
|
|
319
295
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/arguments/escape.js
|
|
320
296
|
const joinCommand = (filePath, rawArguments) => {
|
|
@@ -335,7 +311,7 @@ const escapeControlCharacter = (character) => {
|
|
|
335
311
|
};
|
|
336
312
|
const getSpecialCharRegExp = () => {
|
|
337
313
|
try {
|
|
338
|
-
return new RegExp("\\p{Separator}|\\p{Other}", "gu");
|
|
314
|
+
return /* @__PURE__ */ new RegExp("\\p{Separator}|\\p{Other}", "gu");
|
|
339
315
|
} catch {
|
|
340
316
|
return /[\s\u0000-\u001F\u007F-\u009F\u00AD]/g;
|
|
341
317
|
}
|
|
@@ -355,7 +331,6 @@ const quoteString = (escapedArgument) => {
|
|
|
355
331
|
return node_process.platform === "win32" ? `"${escapedArgument.replaceAll("\"", "\"\"")}"` : `'${escapedArgument.replaceAll("'", "'\\''")}'`;
|
|
356
332
|
};
|
|
357
333
|
const NO_ESCAPE_REGEXP = /^[\w./-]+$/;
|
|
358
|
-
|
|
359
334
|
//#endregion
|
|
360
335
|
//#region ../../node_modules/.pnpm/is-unicode-supported@2.1.0/node_modules/is-unicode-supported/index.js
|
|
361
336
|
function isUnicodeSupported() {
|
|
@@ -364,7 +339,6 @@ function isUnicodeSupported() {
|
|
|
364
339
|
if (node_process.default.platform !== "win32") return TERM !== "linux";
|
|
365
340
|
return Boolean(env.WT_SESSION) || Boolean(env.TERMINUS_SUBLIME) || env.ConEmuTask === "{cmd::Cmder}" || TERM_PROGRAM === "Terminus-Sublime" || TERM_PROGRAM === "vscode" || TERM === "xterm-256color" || TERM === "alacritty" || TERM === "rxvt-unicode" || TERM === "rxvt-unicode-256color" || env.TERMINAL_EMULATOR === "JetBrains-JediTerm";
|
|
366
341
|
}
|
|
367
|
-
|
|
368
342
|
//#endregion
|
|
369
343
|
//#region ../../node_modules/.pnpm/figures@6.1.0/node_modules/figures/index.js
|
|
370
344
|
const common = {
|
|
@@ -643,11 +617,8 @@ const fallbackSymbols = {
|
|
|
643
617
|
...common,
|
|
644
618
|
...specialFallbackSymbols
|
|
645
619
|
};
|
|
646
|
-
const
|
|
647
|
-
|
|
648
|
-
var figures_default = figures;
|
|
649
|
-
const replacements = Object.entries(specialMainSymbols);
|
|
650
|
-
|
|
620
|
+
const figures = isUnicodeSupported() ? mainSymbols : fallbackSymbols;
|
|
621
|
+
Object.entries(specialMainSymbols);
|
|
651
622
|
//#endregion
|
|
652
623
|
//#region ../../node_modules/.pnpm/yoctocolors@2.1.1/node_modules/yoctocolors/base.js
|
|
653
624
|
const hasColors = node_tty.default?.WriteStream?.prototype?.hasColors?.() ?? false;
|
|
@@ -670,48 +641,47 @@ const format = (open, close) => {
|
|
|
670
641
|
return result;
|
|
671
642
|
};
|
|
672
643
|
};
|
|
673
|
-
|
|
644
|
+
format(0, 0);
|
|
674
645
|
const bold = format(1, 22);
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
646
|
+
format(2, 22);
|
|
647
|
+
format(3, 23);
|
|
648
|
+
format(4, 24);
|
|
649
|
+
format(53, 55);
|
|
650
|
+
format(7, 27);
|
|
651
|
+
format(8, 28);
|
|
652
|
+
format(9, 29);
|
|
653
|
+
format(30, 39);
|
|
654
|
+
format(31, 39);
|
|
655
|
+
format(32, 39);
|
|
656
|
+
format(33, 39);
|
|
657
|
+
format(34, 39);
|
|
658
|
+
format(35, 39);
|
|
659
|
+
format(36, 39);
|
|
660
|
+
format(37, 39);
|
|
690
661
|
const gray = format(90, 39);
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
662
|
+
format(40, 49);
|
|
663
|
+
format(41, 49);
|
|
664
|
+
format(42, 49);
|
|
665
|
+
format(43, 49);
|
|
666
|
+
format(44, 49);
|
|
667
|
+
format(45, 49);
|
|
668
|
+
format(46, 49);
|
|
669
|
+
format(47, 49);
|
|
670
|
+
format(100, 49);
|
|
700
671
|
const redBright = format(91, 39);
|
|
701
|
-
|
|
672
|
+
format(92, 39);
|
|
702
673
|
const yellowBright = format(93, 39);
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
674
|
+
format(94, 39);
|
|
675
|
+
format(95, 39);
|
|
676
|
+
format(96, 39);
|
|
677
|
+
format(97, 39);
|
|
678
|
+
format(101, 49);
|
|
679
|
+
format(102, 49);
|
|
680
|
+
format(103, 49);
|
|
681
|
+
format(104, 49);
|
|
682
|
+
format(105, 49);
|
|
683
|
+
format(106, 49);
|
|
684
|
+
format(107, 49);
|
|
715
685
|
//#endregion
|
|
716
686
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/verbose/default.js
|
|
717
687
|
const defaultVerboseFunction = ({ type, message, timestamp, piped, commandId, result: { failed = false } = {}, options: { reject = true } }) => {
|
|
@@ -727,8 +697,8 @@ const defaultVerboseFunction = ({ type, message, timestamp, piped, commandId, re
|
|
|
727
697
|
const serializeTimestamp = (timestamp) => `${padField(timestamp.getHours(), 2)}:${padField(timestamp.getMinutes(), 2)}:${padField(timestamp.getSeconds(), 2)}.${padField(timestamp.getMilliseconds(), 3)}`;
|
|
728
698
|
const padField = (field, padding) => String(field).padStart(padding, "0");
|
|
729
699
|
const getFinalIcon = ({ failed, reject }) => {
|
|
730
|
-
if (!failed) return
|
|
731
|
-
return reject ?
|
|
700
|
+
if (!failed) return figures.tick;
|
|
701
|
+
return reject ? figures.cross : figures.warning;
|
|
732
702
|
};
|
|
733
703
|
const ICONS = {
|
|
734
704
|
command: ({ piped }) => piped ? "|" : "$",
|
|
@@ -745,7 +715,6 @@ const COLORS = {
|
|
|
745
715
|
error: ({ reject }) => reject ? redBright : yellowBright,
|
|
746
716
|
duration: () => gray
|
|
747
717
|
};
|
|
748
|
-
|
|
749
718
|
//#endregion
|
|
750
719
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/verbose/custom.js
|
|
751
720
|
const applyVerboseOnLines = (printedLines, verboseInfo, fdNumber) => {
|
|
@@ -758,7 +727,6 @@ const applyVerboseFunction = (verboseLine, verboseObject, verboseFunction) => {
|
|
|
758
727
|
if (typeof printedLine === "string") return printedLine;
|
|
759
728
|
};
|
|
760
729
|
const appendNewline = (printedLine) => printedLine.endsWith("\n") ? printedLine : `${printedLine}\n`;
|
|
761
|
-
|
|
762
730
|
//#endregion
|
|
763
731
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/verbose/log.js
|
|
764
732
|
const verboseLog = ({ type, verboseMessage, fdNumber, verboseInfo, result }) => {
|
|
@@ -769,7 +737,7 @@ const verboseLog = ({ type, verboseMessage, fdNumber, verboseInfo, result }) =>
|
|
|
769
737
|
})), verboseInfo, fdNumber);
|
|
770
738
|
if (finalLines !== "") console.warn(finalLines.slice(0, -1));
|
|
771
739
|
};
|
|
772
|
-
const getVerboseObject = ({ type, result, verboseInfo: { escapedCommand, commandId, rawOptions: { piped = false
|
|
740
|
+
const getVerboseObject = ({ type, result, verboseInfo: { escapedCommand, commandId, rawOptions: { piped = false, ...options } } }) => ({
|
|
773
741
|
type,
|
|
774
742
|
escapedCommand,
|
|
775
743
|
commandId: `${commandId}`,
|
|
@@ -792,7 +760,6 @@ const serializeVerboseMessage = (message) => {
|
|
|
792
760
|
return escapeLines(typeof message === "string" ? message : (0, node_util.inspect)(message)).replaceAll(" ", " ".repeat(TAB_SIZE));
|
|
793
761
|
};
|
|
794
762
|
const TAB_SIZE = 2;
|
|
795
|
-
|
|
796
763
|
//#endregion
|
|
797
764
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/verbose/start.js
|
|
798
765
|
const logCommand = (escapedCommand, verboseInfo) => {
|
|
@@ -803,7 +770,6 @@ const logCommand = (escapedCommand, verboseInfo) => {
|
|
|
803
770
|
verboseInfo
|
|
804
771
|
});
|
|
805
772
|
};
|
|
806
|
-
|
|
807
773
|
//#endregion
|
|
808
774
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/verbose/info.js
|
|
809
775
|
const getVerboseInfo = (verbose, escapedCommand, rawOptions) => {
|
|
@@ -827,12 +793,10 @@ const validateVerbose = (verbose) => {
|
|
|
827
793
|
}
|
|
828
794
|
}
|
|
829
795
|
};
|
|
830
|
-
|
|
831
796
|
//#endregion
|
|
832
797
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/return/duration.js
|
|
833
798
|
const getStartTime = () => node_process.hrtime.bigint();
|
|
834
799
|
const getDurationMs = (startTime) => Number(node_process.hrtime.bigint() - startTime) / 1e6;
|
|
835
|
-
|
|
836
800
|
//#endregion
|
|
837
801
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/arguments/command.js
|
|
838
802
|
const handleCommand = (filePath, rawArguments, rawOptions) => {
|
|
@@ -847,51 +811,49 @@ const handleCommand = (filePath, rawArguments, rawOptions) => {
|
|
|
847
811
|
verboseInfo
|
|
848
812
|
};
|
|
849
813
|
};
|
|
850
|
-
|
|
851
814
|
//#endregion
|
|
852
815
|
//#region ../../node_modules/.pnpm/isexe@2.0.0/node_modules/isexe/windows.js
|
|
853
|
-
var require_windows = /* @__PURE__ */
|
|
854
|
-
module.exports = isexe
|
|
855
|
-
isexe
|
|
816
|
+
var require_windows = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
817
|
+
module.exports = isexe;
|
|
818
|
+
isexe.sync = sync;
|
|
856
819
|
var fs$4 = require("fs");
|
|
857
|
-
function checkPathExt(path
|
|
820
|
+
function checkPathExt(path, options) {
|
|
858
821
|
var pathext = options.pathExt !== void 0 ? options.pathExt : process.env.PATHEXT;
|
|
859
822
|
if (!pathext) return true;
|
|
860
823
|
pathext = pathext.split(";");
|
|
861
824
|
if (pathext.indexOf("") !== -1) return true;
|
|
862
|
-
for (var i
|
|
863
|
-
var p
|
|
864
|
-
if (p
|
|
825
|
+
for (var i = 0; i < pathext.length; i++) {
|
|
826
|
+
var p = pathext[i].toLowerCase();
|
|
827
|
+
if (p && path.substr(-p.length).toLowerCase() === p) return true;
|
|
865
828
|
}
|
|
866
829
|
return false;
|
|
867
830
|
}
|
|
868
|
-
function checkStat
|
|
831
|
+
function checkStat(stat, path, options) {
|
|
869
832
|
if (!stat.isSymbolicLink() && !stat.isFile()) return false;
|
|
870
|
-
return checkPathExt(path
|
|
833
|
+
return checkPathExt(path, options);
|
|
871
834
|
}
|
|
872
|
-
function isexe
|
|
873
|
-
fs$4.stat(path
|
|
874
|
-
cb(er, er ? false : checkStat
|
|
835
|
+
function isexe(path, options, cb) {
|
|
836
|
+
fs$4.stat(path, function(er, stat) {
|
|
837
|
+
cb(er, er ? false : checkStat(stat, path, options));
|
|
875
838
|
});
|
|
876
839
|
}
|
|
877
|
-
function sync
|
|
878
|
-
return checkStat
|
|
840
|
+
function sync(path, options) {
|
|
841
|
+
return checkStat(fs$4.statSync(path), path, options);
|
|
879
842
|
}
|
|
880
|
-
})
|
|
881
|
-
|
|
843
|
+
}));
|
|
882
844
|
//#endregion
|
|
883
845
|
//#region ../../node_modules/.pnpm/isexe@2.0.0/node_modules/isexe/mode.js
|
|
884
|
-
var require_mode = /* @__PURE__ */
|
|
885
|
-
module.exports = isexe
|
|
886
|
-
isexe
|
|
846
|
+
var require_mode = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
847
|
+
module.exports = isexe;
|
|
848
|
+
isexe.sync = sync;
|
|
887
849
|
var fs$3 = require("fs");
|
|
888
|
-
function isexe
|
|
889
|
-
fs$3.stat(path
|
|
850
|
+
function isexe(path, options, cb) {
|
|
851
|
+
fs$3.stat(path, function(er, stat) {
|
|
890
852
|
cb(er, er ? false : checkStat(stat, options));
|
|
891
853
|
});
|
|
892
854
|
}
|
|
893
|
-
function sync
|
|
894
|
-
return checkStat(fs$3.statSync(path
|
|
855
|
+
function sync(path, options) {
|
|
856
|
+
return checkStat(fs$3.statSync(path), options);
|
|
895
857
|
}
|
|
896
858
|
function checkStat(stat, options) {
|
|
897
859
|
return stat.isFile() && checkMode(stat, options);
|
|
@@ -902,24 +864,23 @@ var require_mode = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/isexe@
|
|
|
902
864
|
var gid = stat.gid;
|
|
903
865
|
var myUid = options.uid !== void 0 ? options.uid : process.getuid && process.getuid();
|
|
904
866
|
var myGid = options.gid !== void 0 ? options.gid : process.getgid && process.getgid();
|
|
905
|
-
var u
|
|
867
|
+
var u = parseInt("100", 8);
|
|
906
868
|
var g = parseInt("010", 8);
|
|
907
|
-
var o
|
|
908
|
-
var ug = u
|
|
909
|
-
return mod & o
|
|
869
|
+
var o = parseInt("001", 8);
|
|
870
|
+
var ug = u | g;
|
|
871
|
+
return mod & o || mod & g && gid === myGid || mod & u && uid === myUid || mod & ug && myUid === 0;
|
|
910
872
|
}
|
|
911
|
-
})
|
|
912
|
-
|
|
873
|
+
}));
|
|
913
874
|
//#endregion
|
|
914
875
|
//#region ../../node_modules/.pnpm/isexe@2.0.0/node_modules/isexe/index.js
|
|
915
|
-
var require_isexe = /* @__PURE__ */
|
|
876
|
+
var require_isexe = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
916
877
|
require("fs");
|
|
917
878
|
var core;
|
|
918
879
|
if (process.platform === "win32" || global.TESTING_WINDOWS) core = require_windows();
|
|
919
880
|
else core = require_mode();
|
|
920
|
-
module.exports = isexe
|
|
921
|
-
isexe
|
|
922
|
-
function isexe
|
|
881
|
+
module.exports = isexe;
|
|
882
|
+
isexe.sync = sync;
|
|
883
|
+
function isexe(path, options, cb) {
|
|
923
884
|
if (typeof options === "function") {
|
|
924
885
|
cb = options;
|
|
925
886
|
options = {};
|
|
@@ -927,13 +888,13 @@ var require_isexe = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/isexe
|
|
|
927
888
|
if (!cb) {
|
|
928
889
|
if (typeof Promise !== "function") throw new TypeError("callback not provided");
|
|
929
890
|
return new Promise(function(resolve, reject) {
|
|
930
|
-
isexe
|
|
891
|
+
isexe(path, options || {}, function(er, is) {
|
|
931
892
|
if (er) reject(er);
|
|
932
893
|
else resolve(is);
|
|
933
894
|
});
|
|
934
895
|
});
|
|
935
896
|
}
|
|
936
|
-
core(path
|
|
897
|
+
core(path, options || {}, function(er, is) {
|
|
937
898
|
if (er) {
|
|
938
899
|
if (er.code === "EACCES" || options && options.ignoreErrors) {
|
|
939
900
|
er = null;
|
|
@@ -943,19 +904,18 @@ var require_isexe = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/isexe
|
|
|
943
904
|
cb(er, is);
|
|
944
905
|
});
|
|
945
906
|
}
|
|
946
|
-
function sync(path
|
|
907
|
+
function sync(path, options) {
|
|
947
908
|
try {
|
|
948
|
-
return core.sync(path
|
|
909
|
+
return core.sync(path, options || {});
|
|
949
910
|
} catch (er) {
|
|
950
911
|
if (options && options.ignoreErrors || er.code === "EACCES") return false;
|
|
951
912
|
else throw er;
|
|
952
913
|
}
|
|
953
914
|
}
|
|
954
|
-
})
|
|
955
|
-
|
|
915
|
+
}));
|
|
956
916
|
//#endregion
|
|
957
917
|
//#region ../../node_modules/.pnpm/which@2.0.2/node_modules/which/which.js
|
|
958
|
-
var require_which = /* @__PURE__ */
|
|
918
|
+
var require_which = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
959
919
|
const isWindows = process.platform === "win32" || process.env.OSTYPE === "cygwin" || process.env.OSTYPE === "msys";
|
|
960
920
|
const path$9 = require("path");
|
|
961
921
|
const COLON = isWindows ? ";" : ":";
|
|
@@ -975,7 +935,7 @@ var require_which = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/which
|
|
|
975
935
|
pathExtExe
|
|
976
936
|
};
|
|
977
937
|
};
|
|
978
|
-
const which
|
|
938
|
+
const which = (cmd, opt, cb) => {
|
|
979
939
|
if (typeof opt === "function") {
|
|
980
940
|
cb = opt;
|
|
981
941
|
opt = {};
|
|
@@ -983,20 +943,20 @@ var require_which = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/which
|
|
|
983
943
|
if (!opt) opt = {};
|
|
984
944
|
const { pathEnv, pathExt, pathExtExe } = getPathInfo(cmd, opt);
|
|
985
945
|
const found = [];
|
|
986
|
-
const step = (i
|
|
987
|
-
if (i
|
|
988
|
-
const ppRaw = pathEnv[i
|
|
946
|
+
const step = (i) => new Promise((resolve, reject) => {
|
|
947
|
+
if (i === pathEnv.length) return opt.all && found.length ? resolve(found) : reject(getNotFoundError(cmd));
|
|
948
|
+
const ppRaw = pathEnv[i];
|
|
989
949
|
const pathPart = /^".*"$/.test(ppRaw) ? ppRaw.slice(1, -1) : ppRaw;
|
|
990
950
|
const pCmd = path$9.join(pathPart, cmd);
|
|
991
|
-
resolve(subStep(!pathPart && /^\.[\\\/]/.test(cmd) ? cmd.slice(0, 2) + pCmd : pCmd, i
|
|
951
|
+
resolve(subStep(!pathPart && /^\.[\\\/]/.test(cmd) ? cmd.slice(0, 2) + pCmd : pCmd, i, 0));
|
|
992
952
|
});
|
|
993
|
-
const subStep = (p
|
|
994
|
-
if (ii === pathExt.length) return resolve(step(i
|
|
953
|
+
const subStep = (p, i, ii) => new Promise((resolve, reject) => {
|
|
954
|
+
if (ii === pathExt.length) return resolve(step(i + 1));
|
|
995
955
|
const ext = pathExt[ii];
|
|
996
|
-
isexe(p
|
|
997
|
-
if (!er && is) if (opt.all) found.push(p
|
|
998
|
-
else return resolve(p
|
|
999
|
-
return resolve(subStep(p
|
|
956
|
+
isexe(p + ext, { pathExt: pathExtExe }, (er, is) => {
|
|
957
|
+
if (!er && is) if (opt.all) found.push(p + ext);
|
|
958
|
+
else return resolve(p + ext);
|
|
959
|
+
return resolve(subStep(p, i, ii + 1));
|
|
1000
960
|
});
|
|
1001
961
|
});
|
|
1002
962
|
return cb ? step(0).then((res) => cb(null, res), cb) : step(0);
|
|
@@ -1005,13 +965,13 @@ var require_which = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/which
|
|
|
1005
965
|
opt = opt || {};
|
|
1006
966
|
const { pathEnv, pathExt, pathExtExe } = getPathInfo(cmd, opt);
|
|
1007
967
|
const found = [];
|
|
1008
|
-
for (let i
|
|
1009
|
-
const ppRaw = pathEnv[i
|
|
968
|
+
for (let i = 0; i < pathEnv.length; i++) {
|
|
969
|
+
const ppRaw = pathEnv[i];
|
|
1010
970
|
const pathPart = /^".*"$/.test(ppRaw) ? ppRaw.slice(1, -1) : ppRaw;
|
|
1011
971
|
const pCmd = path$9.join(pathPart, cmd);
|
|
1012
|
-
const p
|
|
972
|
+
const p = !pathPart && /^\.[\\\/]/.test(cmd) ? cmd.slice(0, 2) + pCmd : pCmd;
|
|
1013
973
|
for (let j = 0; j < pathExt.length; j++) {
|
|
1014
|
-
const cur = p
|
|
974
|
+
const cur = p + pathExt[j];
|
|
1015
975
|
try {
|
|
1016
976
|
if (isexe.sync(cur, { pathExt: pathExtExe })) if (opt.all) found.push(cur);
|
|
1017
977
|
else return cur;
|
|
@@ -1022,25 +982,23 @@ var require_which = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/which
|
|
|
1022
982
|
if (opt.nothrow) return null;
|
|
1023
983
|
throw getNotFoundError(cmd);
|
|
1024
984
|
};
|
|
1025
|
-
module.exports = which
|
|
1026
|
-
which
|
|
1027
|
-
})
|
|
1028
|
-
|
|
985
|
+
module.exports = which;
|
|
986
|
+
which.sync = whichSync;
|
|
987
|
+
}));
|
|
1029
988
|
//#endregion
|
|
1030
989
|
//#region ../../node_modules/.pnpm/path-key@3.1.1/node_modules/path-key/index.js
|
|
1031
|
-
var require_path_key = /* @__PURE__ */
|
|
1032
|
-
const pathKey
|
|
990
|
+
var require_path_key = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
991
|
+
const pathKey = (options = {}) => {
|
|
1033
992
|
const environment = options.env || process.env;
|
|
1034
993
|
if ((options.platform || process.platform) !== "win32") return "PATH";
|
|
1035
994
|
return Object.keys(environment).reverse().find((key) => key.toUpperCase() === "PATH") || "Path";
|
|
1036
995
|
};
|
|
1037
|
-
module.exports = pathKey
|
|
1038
|
-
module.exports.default = pathKey
|
|
1039
|
-
})
|
|
1040
|
-
|
|
996
|
+
module.exports = pathKey;
|
|
997
|
+
module.exports.default = pathKey;
|
|
998
|
+
}));
|
|
1041
999
|
//#endregion
|
|
1042
1000
|
//#region ../../node_modules/.pnpm/cross-spawn@7.0.6/node_modules/cross-spawn/lib/util/resolveCommand.js
|
|
1043
|
-
var require_resolveCommand = /* @__PURE__ */
|
|
1001
|
+
var require_resolveCommand = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
1044
1002
|
const path$8 = require("path");
|
|
1045
1003
|
const which = require_which();
|
|
1046
1004
|
const getPathKey = require_path_key();
|
|
@@ -1064,15 +1022,14 @@ var require_resolveCommand = /* @__PURE__ */ __commonJS({ "../../node_modules/.p
|
|
|
1064
1022
|
if (resolved) resolved = path$8.resolve(hasCustomCwd ? parsed.options.cwd : "", resolved);
|
|
1065
1023
|
return resolved;
|
|
1066
1024
|
}
|
|
1067
|
-
function resolveCommand
|
|
1025
|
+
function resolveCommand(parsed) {
|
|
1068
1026
|
return resolveCommandAttempt(parsed) || resolveCommandAttempt(parsed, true);
|
|
1069
1027
|
}
|
|
1070
|
-
module.exports = resolveCommand
|
|
1071
|
-
})
|
|
1072
|
-
|
|
1028
|
+
module.exports = resolveCommand;
|
|
1029
|
+
}));
|
|
1073
1030
|
//#endregion
|
|
1074
1031
|
//#region ../../node_modules/.pnpm/cross-spawn@7.0.6/node_modules/cross-spawn/lib/util/escape.js
|
|
1075
|
-
var require_escape = /* @__PURE__ */
|
|
1032
|
+
var require_escape = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
1076
1033
|
const metaCharsRegExp = /([()\][%!^"`<>&|;, *?])/g;
|
|
1077
1034
|
function escapeCommand(arg) {
|
|
1078
1035
|
arg = arg.replace(metaCharsRegExp, "^$1");
|
|
@@ -1089,34 +1046,31 @@ var require_escape = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/cros
|
|
|
1089
1046
|
}
|
|
1090
1047
|
module.exports.command = escapeCommand;
|
|
1091
1048
|
module.exports.argument = escapeArgument;
|
|
1092
|
-
})
|
|
1093
|
-
|
|
1049
|
+
}));
|
|
1094
1050
|
//#endregion
|
|
1095
1051
|
//#region ../../node_modules/.pnpm/shebang-regex@3.0.0/node_modules/shebang-regex/index.js
|
|
1096
|
-
var require_shebang_regex = /* @__PURE__ */
|
|
1052
|
+
var require_shebang_regex = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
1097
1053
|
module.exports = /^#!(.*)/;
|
|
1098
|
-
})
|
|
1099
|
-
|
|
1054
|
+
}));
|
|
1100
1055
|
//#endregion
|
|
1101
1056
|
//#region ../../node_modules/.pnpm/shebang-command@2.0.0/node_modules/shebang-command/index.js
|
|
1102
|
-
var require_shebang_command = /* @__PURE__ */
|
|
1057
|
+
var require_shebang_command = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
1103
1058
|
const shebangRegex = require_shebang_regex();
|
|
1104
1059
|
module.exports = (string = "") => {
|
|
1105
1060
|
const match = string.match(shebangRegex);
|
|
1106
1061
|
if (!match) return null;
|
|
1107
|
-
const [path
|
|
1108
|
-
const binary = path
|
|
1062
|
+
const [path, argument] = match[0].replace(/#! ?/, "").split(" ");
|
|
1063
|
+
const binary = path.split("/").pop();
|
|
1109
1064
|
if (binary === "env") return argument;
|
|
1110
1065
|
return argument ? `${binary} ${argument}` : binary;
|
|
1111
1066
|
};
|
|
1112
|
-
})
|
|
1113
|
-
|
|
1067
|
+
}));
|
|
1114
1068
|
//#endregion
|
|
1115
1069
|
//#region ../../node_modules/.pnpm/cross-spawn@7.0.6/node_modules/cross-spawn/lib/util/readShebang.js
|
|
1116
|
-
var require_readShebang = /* @__PURE__ */
|
|
1070
|
+
var require_readShebang = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
1117
1071
|
const fs$2 = require("fs");
|
|
1118
1072
|
const shebangCommand = require_shebang_command();
|
|
1119
|
-
function readShebang
|
|
1073
|
+
function readShebang(command) {
|
|
1120
1074
|
const size = 150;
|
|
1121
1075
|
const buffer = Buffer.alloc(size);
|
|
1122
1076
|
let fd;
|
|
@@ -1127,17 +1081,16 @@ var require_readShebang = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm
|
|
|
1127
1081
|
} catch (e) {}
|
|
1128
1082
|
return shebangCommand(buffer.toString());
|
|
1129
1083
|
}
|
|
1130
|
-
module.exports = readShebang
|
|
1131
|
-
})
|
|
1132
|
-
|
|
1084
|
+
module.exports = readShebang;
|
|
1085
|
+
}));
|
|
1133
1086
|
//#endregion
|
|
1134
1087
|
//#region ../../node_modules/.pnpm/cross-spawn@7.0.6/node_modules/cross-spawn/lib/parse.js
|
|
1135
|
-
var require_parse = /* @__PURE__ */
|
|
1088
|
+
var require_parse = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
1136
1089
|
const path$7 = require("path");
|
|
1137
1090
|
const resolveCommand = require_resolveCommand();
|
|
1138
1091
|
const escape = require_escape();
|
|
1139
1092
|
const readShebang = require_readShebang();
|
|
1140
|
-
const isWin
|
|
1093
|
+
const isWin = process.platform === "win32";
|
|
1141
1094
|
const isExecutableRegExp = /\.(?:com|exe)$/i;
|
|
1142
1095
|
const isCmdShimRegExp = /node_modules[\\/].bin[\\/][^\\/]+\.cmd$/i;
|
|
1143
1096
|
function detectShebang(parsed) {
|
|
@@ -1151,7 +1104,7 @@ var require_parse = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/cross
|
|
|
1151
1104
|
return parsed.file;
|
|
1152
1105
|
}
|
|
1153
1106
|
function parseNonShell(parsed) {
|
|
1154
|
-
if (!isWin
|
|
1107
|
+
if (!isWin) return parsed;
|
|
1155
1108
|
const commandFile = detectShebang(parsed);
|
|
1156
1109
|
const needsShell = !isExecutableRegExp.test(commandFile);
|
|
1157
1110
|
if (parsed.options.forceShell || needsShell) {
|
|
@@ -1170,7 +1123,7 @@ var require_parse = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/cross
|
|
|
1170
1123
|
}
|
|
1171
1124
|
return parsed;
|
|
1172
1125
|
}
|
|
1173
|
-
function parse
|
|
1126
|
+
function parse(command, args, options) {
|
|
1174
1127
|
if (args && !Array.isArray(args)) {
|
|
1175
1128
|
options = args;
|
|
1176
1129
|
args = null;
|
|
@@ -1189,12 +1142,11 @@ var require_parse = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/cross
|
|
|
1189
1142
|
};
|
|
1190
1143
|
return options.shell ? parsed : parseNonShell(parsed);
|
|
1191
1144
|
}
|
|
1192
|
-
module.exports = parse
|
|
1193
|
-
})
|
|
1194
|
-
|
|
1145
|
+
module.exports = parse;
|
|
1146
|
+
}));
|
|
1195
1147
|
//#endregion
|
|
1196
1148
|
//#region ../../node_modules/.pnpm/cross-spawn@7.0.6/node_modules/cross-spawn/lib/enoent.js
|
|
1197
|
-
var require_enoent = /* @__PURE__ */
|
|
1149
|
+
var require_enoent = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
1198
1150
|
const isWin = process.platform === "win32";
|
|
1199
1151
|
function notFoundError(original, syscall) {
|
|
1200
1152
|
return Object.assign(/* @__PURE__ */ new Error(`${syscall} ${original.command} ENOENT`), {
|
|
@@ -1205,15 +1157,15 @@ var require_enoent = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/cros
|
|
|
1205
1157
|
spawnargs: original.args
|
|
1206
1158
|
});
|
|
1207
1159
|
}
|
|
1208
|
-
function hookChildProcess(cp
|
|
1160
|
+
function hookChildProcess(cp, parsed) {
|
|
1209
1161
|
if (!isWin) return;
|
|
1210
|
-
const originalEmit = cp
|
|
1211
|
-
cp
|
|
1162
|
+
const originalEmit = cp.emit;
|
|
1163
|
+
cp.emit = function(name, arg1) {
|
|
1212
1164
|
if (name === "exit") {
|
|
1213
1165
|
const err = verifyENOENT(arg1, parsed);
|
|
1214
|
-
if (err) return originalEmit.call(cp
|
|
1166
|
+
if (err) return originalEmit.call(cp, "error", err);
|
|
1215
1167
|
}
|
|
1216
|
-
return originalEmit.apply(cp
|
|
1168
|
+
return originalEmit.apply(cp, arguments);
|
|
1217
1169
|
};
|
|
1218
1170
|
}
|
|
1219
1171
|
function verifyENOENT(status, parsed) {
|
|
@@ -1230,45 +1182,37 @@ var require_enoent = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/cros
|
|
|
1230
1182
|
verifyENOENTSync,
|
|
1231
1183
|
notFoundError
|
|
1232
1184
|
};
|
|
1233
|
-
})
|
|
1234
|
-
|
|
1185
|
+
}));
|
|
1235
1186
|
//#endregion
|
|
1236
|
-
//#region ../../node_modules/.pnpm/
|
|
1237
|
-
var
|
|
1187
|
+
//#region ../../node_modules/.pnpm/path-key@4.0.0/node_modules/path-key/index.js
|
|
1188
|
+
var import_cross_spawn = /* @__PURE__ */ __toESM((/* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
1238
1189
|
const cp = require("child_process");
|
|
1239
1190
|
const parse = require_parse();
|
|
1240
1191
|
const enoent = require_enoent();
|
|
1241
|
-
function spawn
|
|
1192
|
+
function spawn(command, args, options) {
|
|
1242
1193
|
const parsed = parse(command, args, options);
|
|
1243
1194
|
const spawned = cp.spawn(parsed.command, parsed.args, parsed.options);
|
|
1244
1195
|
enoent.hookChildProcess(spawned, parsed);
|
|
1245
1196
|
return spawned;
|
|
1246
1197
|
}
|
|
1247
|
-
function spawnSync
|
|
1198
|
+
function spawnSync(command, args, options) {
|
|
1248
1199
|
const parsed = parse(command, args, options);
|
|
1249
1200
|
const result = cp.spawnSync(parsed.command, parsed.args, parsed.options);
|
|
1250
1201
|
result.error = result.error || enoent.verifyENOENTSync(result.status, parsed);
|
|
1251
1202
|
return result;
|
|
1252
1203
|
}
|
|
1253
|
-
module.exports = spawn
|
|
1254
|
-
module.exports.spawn = spawn
|
|
1255
|
-
module.exports.sync = spawnSync
|
|
1204
|
+
module.exports = spawn;
|
|
1205
|
+
module.exports.spawn = spawn;
|
|
1206
|
+
module.exports.sync = spawnSync;
|
|
1256
1207
|
module.exports._parse = parse;
|
|
1257
1208
|
module.exports._enoent = enoent;
|
|
1258
|
-
})
|
|
1259
|
-
|
|
1260
|
-
//#endregion
|
|
1261
|
-
//#region ../../node_modules/.pnpm/path-key@4.0.0/node_modules/path-key/index.js
|
|
1262
|
-
var import_cross_spawn = /* @__PURE__ */ __toESM(require_cross_spawn(), 1);
|
|
1209
|
+
})))(), 1);
|
|
1263
1210
|
function pathKey(options = {}) {
|
|
1264
|
-
const { env = process.env, platform
|
|
1265
|
-
if (platform
|
|
1211
|
+
const { env = process.env, platform = process.platform } = options;
|
|
1212
|
+
if (platform !== "win32") return "PATH";
|
|
1266
1213
|
return Object.keys(env).reverse().find((key) => key.toUpperCase() === "PATH") || "Path";
|
|
1267
1214
|
}
|
|
1268
|
-
|
|
1269
|
-
//#endregion
|
|
1270
|
-
//#region ../../node_modules/.pnpm/unicorn-magic@0.3.0/node_modules/unicorn-magic/node.js
|
|
1271
|
-
const execFileOriginal = (0, node_util.promisify)(node_child_process.execFile);
|
|
1215
|
+
(0, node_util.promisify)(node_child_process.execFile);
|
|
1272
1216
|
function toPath(urlOrPath) {
|
|
1273
1217
|
return urlOrPath instanceof URL ? (0, node_url.fileURLToPath)(urlOrPath) : urlOrPath;
|
|
1274
1218
|
}
|
|
@@ -1283,16 +1227,14 @@ function traversePathUp(startPath) {
|
|
|
1283
1227
|
}
|
|
1284
1228
|
} };
|
|
1285
1229
|
}
|
|
1286
|
-
const TEN_MEGABYTES_IN_BYTES = 10 * 1024 * 1024;
|
|
1287
|
-
|
|
1288
1230
|
//#endregion
|
|
1289
1231
|
//#region ../../node_modules/.pnpm/npm-run-path@6.0.0/node_modules/npm-run-path/index.js
|
|
1290
|
-
const npmRunPath = ({ cwd = node_process.default.cwd(), path: pathOption = node_process.default.env[pathKey()], preferLocal = true, execPath
|
|
1232
|
+
const npmRunPath = ({ cwd = node_process.default.cwd(), path: pathOption = node_process.default.env[pathKey()], preferLocal = true, execPath = node_process.default.execPath, addExecPath = true } = {}) => {
|
|
1291
1233
|
const cwdPath = node_path.default.resolve(toPath(cwd));
|
|
1292
1234
|
const result = [];
|
|
1293
1235
|
const pathParts = pathOption.split(node_path.default.delimiter);
|
|
1294
1236
|
if (preferLocal) applyPreferLocal(result, pathParts, cwdPath);
|
|
1295
|
-
if (addExecPath) applyExecPath(result, pathParts, execPath
|
|
1237
|
+
if (addExecPath) applyExecPath(result, pathParts, execPath, cwdPath);
|
|
1296
1238
|
return pathOption === "" || pathOption === node_path.default.delimiter ? `${result.join(node_path.default.delimiter)}${pathOption}` : [...result, pathOption].join(node_path.default.delimiter);
|
|
1297
1239
|
};
|
|
1298
1240
|
const applyPreferLocal = (result, pathParts, cwdPath) => {
|
|
@@ -1301,18 +1243,17 @@ const applyPreferLocal = (result, pathParts, cwdPath) => {
|
|
|
1301
1243
|
if (!pathParts.includes(pathPart)) result.push(pathPart);
|
|
1302
1244
|
}
|
|
1303
1245
|
};
|
|
1304
|
-
const applyExecPath = (result, pathParts, execPath
|
|
1305
|
-
const pathPart = node_path.default.resolve(cwdPath, toPath(execPath
|
|
1246
|
+
const applyExecPath = (result, pathParts, execPath, cwdPath) => {
|
|
1247
|
+
const pathPart = node_path.default.resolve(cwdPath, toPath(execPath), "..");
|
|
1306
1248
|
if (!pathParts.includes(pathPart)) result.push(pathPart);
|
|
1307
1249
|
};
|
|
1308
|
-
const npmRunPathEnv = ({ env = node_process.default.env
|
|
1250
|
+
const npmRunPathEnv = ({ env = node_process.default.env, ...options } = {}) => {
|
|
1309
1251
|
env = { ...env };
|
|
1310
1252
|
const pathName = pathKey({ env });
|
|
1311
1253
|
options.path = env[pathName];
|
|
1312
1254
|
env[pathName] = npmRunPath(options);
|
|
1313
1255
|
return env;
|
|
1314
1256
|
};
|
|
1315
|
-
|
|
1316
1257
|
//#endregion
|
|
1317
1258
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/return/final-error.js
|
|
1318
1259
|
const getFinalError = (originalError, message, isSync) => {
|
|
@@ -1340,11 +1281,10 @@ var ExecaError = class extends Error {};
|
|
|
1340
1281
|
setErrorName(ExecaError, ExecaError.name);
|
|
1341
1282
|
var ExecaSyncError = class extends Error {};
|
|
1342
1283
|
setErrorName(ExecaSyncError, ExecaSyncError.name);
|
|
1343
|
-
|
|
1344
1284
|
//#endregion
|
|
1345
|
-
//#region ../../node_modules/.pnpm/human-signals@8.0.
|
|
1285
|
+
//#region ../../node_modules/.pnpm/human-signals@8.0.1/node_modules/human-signals/build/src/realtime.js
|
|
1346
1286
|
const getRealtimeSignals = () => {
|
|
1347
|
-
const length =
|
|
1287
|
+
const length = 64 - SIGRTMIN + 1;
|
|
1348
1288
|
return Array.from({ length }, getRealtimeSignal);
|
|
1349
1289
|
};
|
|
1350
1290
|
const getRealtimeSignal = (value, index) => ({
|
|
@@ -1355,10 +1295,8 @@ const getRealtimeSignal = (value, index) => ({
|
|
|
1355
1295
|
standard: "posix"
|
|
1356
1296
|
});
|
|
1357
1297
|
const SIGRTMIN = 34;
|
|
1358
|
-
const SIGRTMAX = 64;
|
|
1359
|
-
|
|
1360
1298
|
//#endregion
|
|
1361
|
-
//#region ../../node_modules/.pnpm/human-signals@8.0.
|
|
1299
|
+
//#region ../../node_modules/.pnpm/human-signals@8.0.1/node_modules/human-signals/build/src/core.js
|
|
1362
1300
|
const SIGNALS = [
|
|
1363
1301
|
{
|
|
1364
1302
|
name: "SIGHUP",
|
|
@@ -1630,9 +1568,8 @@ const SIGNALS = [
|
|
|
1630
1568
|
standard: "other"
|
|
1631
1569
|
}
|
|
1632
1570
|
];
|
|
1633
|
-
|
|
1634
1571
|
//#endregion
|
|
1635
|
-
//#region ../../node_modules/.pnpm/human-signals@8.0.
|
|
1572
|
+
//#region ../../node_modules/.pnpm/human-signals@8.0.1/node_modules/human-signals/build/src/signals.js
|
|
1636
1573
|
const getSignals = () => {
|
|
1637
1574
|
const realtimeSignals = getRealtimeSignals();
|
|
1638
1575
|
return [...SIGNALS, ...realtimeSignals].map(normalizeSignal$1);
|
|
@@ -1650,12 +1587,11 @@ const normalizeSignal$1 = ({ name, number: defaultNumber, description, action, f
|
|
|
1650
1587
|
standard
|
|
1651
1588
|
};
|
|
1652
1589
|
};
|
|
1653
|
-
|
|
1654
1590
|
//#endregion
|
|
1655
|
-
//#region ../../node_modules/.pnpm/human-signals@8.0.
|
|
1591
|
+
//#region ../../node_modules/.pnpm/human-signals@8.0.1/node_modules/human-signals/build/src/main.js
|
|
1656
1592
|
const getSignalsByName = () => {
|
|
1657
|
-
const signals
|
|
1658
|
-
return Object.fromEntries(signals
|
|
1593
|
+
const signals = getSignals();
|
|
1594
|
+
return Object.fromEntries(signals.map(getSignalByName));
|
|
1659
1595
|
};
|
|
1660
1596
|
const getSignalByName = ({ name, number, description, supported, action, forced, standard }) => [name, {
|
|
1661
1597
|
name,
|
|
@@ -1668,13 +1604,12 @@ const getSignalByName = ({ name, number, description, supported, action, forced,
|
|
|
1668
1604
|
}];
|
|
1669
1605
|
const signalsByName = getSignalsByName();
|
|
1670
1606
|
const getSignalsByNumber = () => {
|
|
1671
|
-
const signals
|
|
1672
|
-
const
|
|
1673
|
-
const signalsA = Array.from({ length }, (value, number) => getSignalByNumber(number, signals$1));
|
|
1607
|
+
const signals = getSignals();
|
|
1608
|
+
const signalsA = Array.from({ length: 65 }, (value, number) => getSignalByNumber(number, signals));
|
|
1674
1609
|
return Object.assign({}, ...signalsA);
|
|
1675
1610
|
};
|
|
1676
|
-
const getSignalByNumber = (number, signals
|
|
1677
|
-
const signal = findSignalByNumber(number, signals
|
|
1611
|
+
const getSignalByNumber = (number, signals) => {
|
|
1612
|
+
const signal = findSignalByNumber(number, signals);
|
|
1678
1613
|
if (signal === void 0) return {};
|
|
1679
1614
|
const { name, description, supported, action, forced, standard } = signal;
|
|
1680
1615
|
return { [number]: {
|
|
@@ -1687,13 +1622,12 @@ const getSignalByNumber = (number, signals$1) => {
|
|
|
1687
1622
|
standard
|
|
1688
1623
|
} };
|
|
1689
1624
|
};
|
|
1690
|
-
const findSignalByNumber = (number, signals
|
|
1691
|
-
const signal = signals
|
|
1625
|
+
const findSignalByNumber = (number, signals) => {
|
|
1626
|
+
const signal = signals.find(({ name }) => node_os.constants.signals[name] === number);
|
|
1692
1627
|
if (signal !== void 0) return signal;
|
|
1693
|
-
return signals
|
|
1628
|
+
return signals.find((signalA) => signalA.number === number);
|
|
1694
1629
|
};
|
|
1695
|
-
|
|
1696
|
-
|
|
1630
|
+
getSignalsByNumber();
|
|
1697
1631
|
//#endregion
|
|
1698
1632
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/terminate/signal.js
|
|
1699
1633
|
const normalizeKillSignal = (killSignal) => {
|
|
@@ -1723,7 +1657,6 @@ Available signal numbers: ${getAvailableSignalIntegers()}.`;
|
|
|
1723
1657
|
const getAvailableSignalNames = () => Object.keys(node_os.constants.signals).sort().map((signalName) => `'${signalName}'`).join(", ");
|
|
1724
1658
|
const getAvailableSignalIntegers = () => [...new Set(Object.values(node_os.constants.signals).sort((signalInteger, signalIntegerTwo) => signalInteger - signalIntegerTwo))].join(", ");
|
|
1725
1659
|
const getSignalDescription = (signal) => signalsByName[signal].description;
|
|
1726
|
-
|
|
1727
1660
|
//#endregion
|
|
1728
1661
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/terminate/kill.js
|
|
1729
1662
|
const normalizeForceKillAfterDelay = (forceKillAfterDelay) => {
|
|
@@ -1775,13 +1708,11 @@ const killOnTimeout = async ({ kill, forceKillAfterDelay, context, controllerSig
|
|
|
1775
1708
|
if (kill("SIGKILL")) context.isForcefullyTerminated ??= true;
|
|
1776
1709
|
} catch {}
|
|
1777
1710
|
};
|
|
1778
|
-
|
|
1779
1711
|
//#endregion
|
|
1780
1712
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/utils/abort-signal.js
|
|
1781
1713
|
const onAbortedSignal = async (mainSignal, stopSignal) => {
|
|
1782
1714
|
if (!mainSignal.aborted) await (0, node_events.once)(mainSignal, "abort", { signal: stopSignal });
|
|
1783
1715
|
};
|
|
1784
|
-
|
|
1785
1716
|
//#endregion
|
|
1786
1717
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/terminate/cancel.js
|
|
1787
1718
|
const validateCancelSignal = ({ cancelSignal }) => {
|
|
@@ -1794,18 +1725,17 @@ const terminateOnCancel = async (subprocess, cancelSignal, context, { signal })
|
|
|
1794
1725
|
subprocess.kill();
|
|
1795
1726
|
throw cancelSignal.reason;
|
|
1796
1727
|
};
|
|
1797
|
-
|
|
1798
1728
|
//#endregion
|
|
1799
1729
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/ipc/validation.js
|
|
1800
|
-
const validateIpcMethod = ({ methodName, isSubprocess, ipc, isConnected
|
|
1730
|
+
const validateIpcMethod = ({ methodName, isSubprocess, ipc, isConnected }) => {
|
|
1801
1731
|
validateIpcOption(methodName, isSubprocess, ipc);
|
|
1802
|
-
validateConnection(methodName, isSubprocess, isConnected
|
|
1732
|
+
validateConnection(methodName, isSubprocess, isConnected);
|
|
1803
1733
|
};
|
|
1804
1734
|
const validateIpcOption = (methodName, isSubprocess, ipc) => {
|
|
1805
1735
|
if (!ipc) throw new Error(`${getMethodName(methodName, isSubprocess)} can only be used if the \`ipc\` option is \`true\`.`);
|
|
1806
1736
|
};
|
|
1807
|
-
const validateConnection = (methodName, isSubprocess, isConnected
|
|
1808
|
-
if (!isConnected
|
|
1737
|
+
const validateConnection = (methodName, isSubprocess, isConnected) => {
|
|
1738
|
+
if (!isConnected) throw new Error(`${getMethodName(methodName, isSubprocess)} cannot be used: the ${getOtherProcessName(isSubprocess)} has already exited or disconnected.`);
|
|
1809
1739
|
};
|
|
1810
1740
|
const throwOnEarlyDisconnect = (isSubprocess) => {
|
|
1811
1741
|
throw new Error(`${getMethodName("getOneMessage", isSubprocess)} could not complete: the ${getOtherProcessName(isSubprocess)} exited or disconnected.`);
|
|
@@ -1849,7 +1779,6 @@ const getOtherProcessName = (isSubprocess) => isSubprocess ? "parent process" :
|
|
|
1849
1779
|
const disconnect = (anyProcess) => {
|
|
1850
1780
|
if (anyProcess.connected) anyProcess.disconnect();
|
|
1851
1781
|
};
|
|
1852
|
-
|
|
1853
1782
|
//#endregion
|
|
1854
1783
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/utils/deferred.js
|
|
1855
1784
|
const createDeferred = () => {
|
|
@@ -1862,7 +1791,6 @@ const createDeferred = () => {
|
|
|
1862
1791
|
});
|
|
1863
1792
|
return Object.assign(promise, methods);
|
|
1864
1793
|
};
|
|
1865
|
-
|
|
1866
1794
|
//#endregion
|
|
1867
1795
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/arguments/fd-options.js
|
|
1868
1796
|
const getToStream = (destination, to = "stdin") => {
|
|
@@ -1939,7 +1867,6 @@ const serializeOptionValue = (value) => {
|
|
|
1939
1867
|
if (typeof value === "string") return `'${value}'`;
|
|
1940
1868
|
return typeof value === "number" ? `${value}` : "Stream";
|
|
1941
1869
|
};
|
|
1942
|
-
|
|
1943
1870
|
//#endregion
|
|
1944
1871
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/utils/max-listeners.js
|
|
1945
1872
|
const incrementMaxListeners = (eventEmitter, maxListenersIncrement, signal) => {
|
|
@@ -1950,7 +1877,6 @@ const incrementMaxListeners = (eventEmitter, maxListenersIncrement, signal) => {
|
|
|
1950
1877
|
eventEmitter.setMaxListeners(eventEmitter.getMaxListeners() - maxListenersIncrement);
|
|
1951
1878
|
});
|
|
1952
1879
|
};
|
|
1953
|
-
|
|
1954
1880
|
//#endregion
|
|
1955
1881
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/ipc/reference.js
|
|
1956
1882
|
const addReference = (channel, reference) => {
|
|
@@ -1977,7 +1903,6 @@ const redoAddedReferences = (channel, isSubprocess) => {
|
|
|
1977
1903
|
addReferenceCount(channel);
|
|
1978
1904
|
}
|
|
1979
1905
|
};
|
|
1980
|
-
|
|
1981
1906
|
//#endregion
|
|
1982
1907
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/ipc/incoming.js
|
|
1983
1908
|
const onMessage = async ({ anyProcess, channel, isSubprocess, ipcEmitter }, wrappedMessage) => {
|
|
@@ -2011,7 +1936,6 @@ const onDisconnect = async ({ anyProcess, channel, isSubprocess, ipcEmitter, bou
|
|
|
2011
1936
|
ipcEmitter.emit("disconnect");
|
|
2012
1937
|
};
|
|
2013
1938
|
const INCOMING_MESSAGES = /* @__PURE__ */ new WeakMap();
|
|
2014
|
-
|
|
2015
1939
|
//#endregion
|
|
2016
1940
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/ipc/forward.js
|
|
2017
1941
|
const getIpcEmitter = (anyProcess, channel, isSubprocess) => {
|
|
@@ -2049,7 +1973,6 @@ const isConnected = (anyProcess) => {
|
|
|
2049
1973
|
const ipcEmitter = IPC_EMITTERS.get(anyProcess);
|
|
2050
1974
|
return ipcEmitter === void 0 ? anyProcess.channel !== null : ipcEmitter.connected;
|
|
2051
1975
|
};
|
|
2052
|
-
|
|
2053
1976
|
//#endregion
|
|
2054
1977
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/ipc/strict.js
|
|
2055
1978
|
const handleSendStrict = ({ anyProcess, channel, isSubprocess, message, strict }) => {
|
|
@@ -2121,7 +2044,6 @@ const throwOnDisconnect$1 = async (anyProcess, isSubprocess, { signal }) => {
|
|
|
2121
2044
|
};
|
|
2122
2045
|
const REQUEST_TYPE = "execa:ipc:request";
|
|
2123
2046
|
const RESPONSE_TYPE = "execa:ipc:response";
|
|
2124
|
-
|
|
2125
2047
|
//#endregion
|
|
2126
2048
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/ipc/outgoing.js
|
|
2127
2049
|
const startSendMessage = (anyProcess, wrappedMessage, strict) => {
|
|
@@ -2151,7 +2073,6 @@ const waitForOutgoingMessages = async (anyProcess, ipcEmitter, wrappedMessage) =
|
|
|
2151
2073
|
const OUTGOING_MESSAGES = /* @__PURE__ */ new WeakMap();
|
|
2152
2074
|
const hasMessageListeners = (anyProcess, ipcEmitter) => ipcEmitter.listenerCount("message") > getMinListenerCount(anyProcess);
|
|
2153
2075
|
const getMinListenerCount = (anyProcess) => SUBPROCESS_OPTIONS.has(anyProcess) && !getFdSpecificValue(SUBPROCESS_OPTIONS.get(anyProcess).options.buffer, "ipc") ? 1 : 0;
|
|
2154
|
-
|
|
2155
2076
|
//#endregion
|
|
2156
2077
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/ipc/send.js
|
|
2157
2078
|
const sendMessage$1 = ({ anyProcess, channel, isSubprocess, ipc }, message, { strict = false } = {}) => {
|
|
@@ -2221,7 +2142,6 @@ const getSendMethod = (anyProcess) => {
|
|
|
2221
2142
|
return sendMethod;
|
|
2222
2143
|
};
|
|
2223
2144
|
const PROCESS_SEND_METHODS = /* @__PURE__ */ new WeakMap();
|
|
2224
|
-
|
|
2225
2145
|
//#endregion
|
|
2226
2146
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/ipc/graceful.js
|
|
2227
2147
|
const sendAbort = (subprocess, message) => {
|
|
@@ -2272,7 +2192,6 @@ const abortOnDisconnect = () => {
|
|
|
2272
2192
|
cancelController.abort(getAbortDisconnectError());
|
|
2273
2193
|
};
|
|
2274
2194
|
const cancelController = new AbortController();
|
|
2275
|
-
|
|
2276
2195
|
//#endregion
|
|
2277
2196
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/terminate/graceful.js
|
|
2278
2197
|
const validateGracefulCancel = ({ gracefulCancel, cancelSignal, ipc, serialization }) => {
|
|
@@ -2311,7 +2230,6 @@ const getReason = ({ reason }) => {
|
|
|
2311
2230
|
});
|
|
2312
2231
|
return error;
|
|
2313
2232
|
};
|
|
2314
|
-
|
|
2315
2233
|
//#endregion
|
|
2316
2234
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/terminate/timeout.js
|
|
2317
2235
|
const validateTimeout = ({ timeout }) => {
|
|
@@ -2324,7 +2242,6 @@ const killAfterTimeout = async (subprocess, timeout, context, { signal }) => {
|
|
|
2324
2242
|
subprocess.kill();
|
|
2325
2243
|
throw new DiscardedError();
|
|
2326
2244
|
};
|
|
2327
|
-
|
|
2328
2245
|
//#endregion
|
|
2329
2246
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/methods/node.js
|
|
2330
2247
|
const mapNode = ({ options }) => {
|
|
@@ -2334,7 +2251,7 @@ const mapNode = ({ options }) => {
|
|
|
2334
2251
|
node: true
|
|
2335
2252
|
} };
|
|
2336
2253
|
};
|
|
2337
|
-
const handleNodeOption = (file, commandArguments, { node: shouldHandleNode = false, nodePath = node_process.execPath, nodeOptions = node_process.execArgv.filter((nodeOption) => !nodeOption.startsWith("--inspect")), cwd, execPath: formerNodePath
|
|
2254
|
+
const handleNodeOption = (file, commandArguments, { node: shouldHandleNode = false, nodePath = node_process.execPath, nodeOptions = node_process.execArgv.filter((nodeOption) => !nodeOption.startsWith("--inspect")), cwd, execPath: formerNodePath, ...options }) => {
|
|
2338
2255
|
if (formerNodePath !== void 0) throw new TypeError("The \"execPath\" option has been removed. Please use the \"nodePath\" option instead.");
|
|
2339
2256
|
const normalizedNodePath = safeNormalizeFileUrl(nodePath, "The \"nodePath\" option");
|
|
2340
2257
|
const resolvedNodePath = node_path.default.resolve(cwd, normalizedNodePath);
|
|
@@ -2364,7 +2281,6 @@ const handleNodeOption = (file, commandArguments, { node: shouldHandleNode = fal
|
|
|
2364
2281
|
}
|
|
2365
2282
|
];
|
|
2366
2283
|
};
|
|
2367
|
-
|
|
2368
2284
|
//#endregion
|
|
2369
2285
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/ipc/ipc-input.js
|
|
2370
2286
|
const validateIpcInputOption = ({ ipcInput, ipc, serialization }) => {
|
|
@@ -2394,7 +2310,6 @@ const sendIpcInput = async (subprocess, ipcInput) => {
|
|
|
2394
2310
|
if (ipcInput === void 0) return;
|
|
2395
2311
|
await subprocess.sendMessage(ipcInput);
|
|
2396
2312
|
};
|
|
2397
|
-
|
|
2398
2313
|
//#endregion
|
|
2399
2314
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/arguments/encoding-option.js
|
|
2400
2315
|
const validateEncoding = ({ encoding }) => {
|
|
@@ -2402,7 +2317,7 @@ const validateEncoding = ({ encoding }) => {
|
|
|
2402
2317
|
const correctEncoding = getCorrectEncoding(encoding);
|
|
2403
2318
|
if (correctEncoding !== void 0) throw new TypeError(`Invalid option \`encoding: ${serializeEncoding(encoding)}\`.
|
|
2404
2319
|
Please rename it to ${serializeEncoding(correctEncoding)}.`);
|
|
2405
|
-
const correctEncodings = [...ENCODINGS].map((correctEncoding
|
|
2320
|
+
const correctEncodings = [...ENCODINGS].map((correctEncoding) => serializeEncoding(correctEncoding)).join(", ");
|
|
2406
2321
|
throw new TypeError(`Invalid option \`encoding: ${serializeEncoding(encoding)}\`.
|
|
2407
2322
|
Please rename it to one of: ${correctEncodings}.`);
|
|
2408
2323
|
};
|
|
@@ -2431,7 +2346,6 @@ const ENCODING_ALIASES = {
|
|
|
2431
2346
|
binary: "latin1"
|
|
2432
2347
|
};
|
|
2433
2348
|
const serializeEncoding = (encoding) => typeof encoding === "string" ? `"${encoding}"` : String(encoding);
|
|
2434
|
-
|
|
2435
2349
|
//#endregion
|
|
2436
2350
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/arguments/cwd.js
|
|
2437
2351
|
const normalizeCwd = (cwd = getDefaultCwd()) => {
|
|
@@ -2457,7 +2371,6 @@ const fixCwdError = (originalMessage, cwd) => {
|
|
|
2457
2371
|
if (!cwdStat.isDirectory()) return `The "cwd" option is not a directory: ${cwd}.\n${originalMessage}`;
|
|
2458
2372
|
return originalMessage;
|
|
2459
2373
|
};
|
|
2460
|
-
|
|
2461
2374
|
//#endregion
|
|
2462
2375
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/arguments/options.js
|
|
2463
2376
|
const normalizeOptions = (filePath, rawArguments, rawOptions) => {
|
|
@@ -2482,7 +2395,7 @@ const normalizeOptions = (filePath, rawArguments, rawOptions) => {
|
|
|
2482
2395
|
options
|
|
2483
2396
|
};
|
|
2484
2397
|
};
|
|
2485
|
-
const addDefaultOptions = ({ extendEnv = true, preferLocal = false, cwd, localDir: localDirectory = cwd, encoding = "utf8", reject = true, cleanup = true, all = false, windowsHide = true, killSignal = "SIGTERM", forceKillAfterDelay = true, gracefulCancel = false, ipcInput, ipc = ipcInput !== void 0 || gracefulCancel, serialization = "advanced"
|
|
2398
|
+
const addDefaultOptions = ({ extendEnv = true, preferLocal = false, cwd, localDir: localDirectory = cwd, encoding = "utf8", reject = true, cleanup = true, all = false, windowsHide = true, killSignal = "SIGTERM", forceKillAfterDelay = true, gracefulCancel = false, ipcInput, ipc = ipcInput !== void 0 || gracefulCancel, serialization = "advanced", ...options }) => ({
|
|
2486
2399
|
...options,
|
|
2487
2400
|
extendEnv,
|
|
2488
2401
|
preferLocal,
|
|
@@ -2514,7 +2427,6 @@ const getEnv = ({ env: envOption, extendEnv, preferLocal, node, localDirectory,
|
|
|
2514
2427
|
});
|
|
2515
2428
|
return env;
|
|
2516
2429
|
};
|
|
2517
|
-
|
|
2518
2430
|
//#endregion
|
|
2519
2431
|
//#region ../../node_modules/.pnpm/strip-final-newline@4.0.0/node_modules/strip-final-newline/index.js
|
|
2520
2432
|
function stripFinalNewline(input) {
|
|
@@ -2528,22 +2440,20 @@ const LF = "\n";
|
|
|
2528
2440
|
const LF_BINARY = LF.codePointAt(0);
|
|
2529
2441
|
const CR = "\r";
|
|
2530
2442
|
const CR_BINARY = CR.codePointAt(0);
|
|
2531
|
-
|
|
2532
2443
|
//#endregion
|
|
2533
2444
|
//#region ../../node_modules/.pnpm/is-stream@4.0.1/node_modules/is-stream/index.js
|
|
2534
2445
|
function isStream(stream, { checkOpen = true } = {}) {
|
|
2535
2446
|
return stream !== null && typeof stream === "object" && (stream.writable || stream.readable || !checkOpen || stream.writable === void 0 && stream.readable === void 0) && typeof stream.pipe === "function";
|
|
2536
2447
|
}
|
|
2537
|
-
function isWritableStream(stream, { checkOpen = true } = {}) {
|
|
2448
|
+
function isWritableStream$1(stream, { checkOpen = true } = {}) {
|
|
2538
2449
|
return isStream(stream, { checkOpen }) && (stream.writable || !checkOpen) && typeof stream.write === "function" && typeof stream.end === "function" && typeof stream.writable === "boolean" && typeof stream.writableObjectMode === "boolean" && typeof stream.destroy === "function" && typeof stream.destroyed === "boolean";
|
|
2539
2450
|
}
|
|
2540
|
-
function isReadableStream(stream, { checkOpen = true } = {}) {
|
|
2451
|
+
function isReadableStream$1(stream, { checkOpen = true } = {}) {
|
|
2541
2452
|
return isStream(stream, { checkOpen }) && (stream.readable || !checkOpen) && typeof stream.read === "function" && typeof stream.readable === "boolean" && typeof stream.readableObjectMode === "boolean" && typeof stream.destroy === "function" && typeof stream.destroyed === "boolean";
|
|
2542
2453
|
}
|
|
2543
2454
|
function isDuplexStream(stream, options) {
|
|
2544
|
-
return isWritableStream(stream, options) && isReadableStream(stream, options);
|
|
2455
|
+
return isWritableStream$1(stream, options) && isReadableStream$1(stream, options);
|
|
2545
2456
|
}
|
|
2546
|
-
|
|
2547
2457
|
//#endregion
|
|
2548
2458
|
//#region ../../node_modules/.pnpm/@sec-ant+readable-stream@0.4.1/node_modules/@sec-ant/readable-stream/dist/ponyfill/asyncIterator.js
|
|
2549
2459
|
const a = Object.getPrototypeOf(Object.getPrototypeOf(
|
|
@@ -2624,11 +2534,10 @@ function h({ preventCancel: r = !1 } = {}) {
|
|
|
2624
2534
|
const t = new c(this.getReader(), r), s = Object.create(u);
|
|
2625
2535
|
return s[n] = t, s;
|
|
2626
2536
|
}
|
|
2627
|
-
|
|
2628
2537
|
//#endregion
|
|
2629
2538
|
//#region ../../node_modules/.pnpm/get-stream@9.0.1/node_modules/get-stream/source/stream.js
|
|
2630
2539
|
const getAsyncIterable = (stream) => {
|
|
2631
|
-
if (isReadableStream(stream, { checkOpen: false }) && nodeImports.on !== void 0) return getStreamIterable(stream);
|
|
2540
|
+
if (isReadableStream$1(stream, { checkOpen: false }) && nodeImports.on !== void 0) return getStreamIterable(stream);
|
|
2632
2541
|
if (typeof stream?.[Symbol.asyncIterator] === "function") return stream;
|
|
2633
2542
|
if (toString.call(stream) === "[object ReadableStream]") return h.call(stream);
|
|
2634
2543
|
throw new TypeError("The first argument must be a Readable, a ReadableStream, or an async iterable.");
|
|
@@ -2662,7 +2571,6 @@ const handleStreamEnd = async (stream, controller, state) => {
|
|
|
2662
2571
|
}
|
|
2663
2572
|
};
|
|
2664
2573
|
const nodeImports = {};
|
|
2665
|
-
|
|
2666
2574
|
//#endregion
|
|
2667
2575
|
//#region ../../node_modules/.pnpm/get-stream@9.0.1/node_modules/get-stream/source/contents.js
|
|
2668
2576
|
const getStreamContents$1 = async (stream, { init, convertChunk, getSize, truncateChunk, addChunk, getFinalChunk, finalize }, { maxBuffer = Number.POSITIVE_INFINITY } = {}) => {
|
|
@@ -2738,7 +2646,6 @@ var MaxBufferError = class extends Error {
|
|
|
2738
2646
|
super("maxBuffer exceeded");
|
|
2739
2647
|
}
|
|
2740
2648
|
};
|
|
2741
|
-
|
|
2742
2649
|
//#endregion
|
|
2743
2650
|
//#region ../../node_modules/.pnpm/get-stream@9.0.1/node_modules/get-stream/source/utils.js
|
|
2744
2651
|
const identity = (value) => value;
|
|
@@ -2748,7 +2655,6 @@ const throwObjectStream = (chunk) => {
|
|
|
2748
2655
|
throw new Error(`Streams in object mode are not supported: ${String(chunk)}`);
|
|
2749
2656
|
};
|
|
2750
2657
|
const getLengthProperty = (convertedChunk) => convertedChunk.length;
|
|
2751
|
-
|
|
2752
2658
|
//#endregion
|
|
2753
2659
|
//#region ../../node_modules/.pnpm/get-stream@9.0.1/node_modules/get-stream/source/array.js
|
|
2754
2660
|
async function getStreamAsArray(stream, options) {
|
|
@@ -2776,7 +2682,6 @@ const arrayMethods = {
|
|
|
2776
2682
|
getFinalChunk: noop$1,
|
|
2777
2683
|
finalize: getContentsProperty
|
|
2778
2684
|
};
|
|
2779
|
-
|
|
2780
2685
|
//#endregion
|
|
2781
2686
|
//#region ../../node_modules/.pnpm/get-stream@9.0.1/node_modules/get-stream/source/array-buffer.js
|
|
2782
2687
|
async function getStreamAsArrayBuffer(stream, options) {
|
|
@@ -2828,7 +2733,6 @@ const arrayBufferMethods = {
|
|
|
2828
2733
|
getFinalChunk: noop$1,
|
|
2829
2734
|
finalize: finalizeArrayBuffer
|
|
2830
2735
|
};
|
|
2831
|
-
|
|
2832
2736
|
//#endregion
|
|
2833
2737
|
//#region ../../node_modules/.pnpm/get-stream@9.0.1/node_modules/get-stream/source/string.js
|
|
2834
2738
|
async function getStreamAsString(stream, options) {
|
|
@@ -2838,11 +2742,11 @@ const initString = () => ({
|
|
|
2838
2742
|
contents: "",
|
|
2839
2743
|
textDecoder: new TextDecoder()
|
|
2840
2744
|
});
|
|
2841
|
-
const useTextDecoder = (chunk, { textDecoder
|
|
2745
|
+
const useTextDecoder = (chunk, { textDecoder }) => textDecoder.decode(chunk, { stream: true });
|
|
2842
2746
|
const addStringChunk = (convertedChunk, { contents }) => contents + convertedChunk;
|
|
2843
2747
|
const truncateStringChunk = (convertedChunk, chunkSize) => convertedChunk.slice(0, chunkSize);
|
|
2844
|
-
const getFinalStringChunk = ({ textDecoder
|
|
2845
|
-
const finalChunk = textDecoder
|
|
2748
|
+
const getFinalStringChunk = ({ textDecoder }) => {
|
|
2749
|
+
const finalChunk = textDecoder.decode();
|
|
2846
2750
|
return finalChunk === "" ? void 0 : finalChunk;
|
|
2847
2751
|
};
|
|
2848
2752
|
const stringMethods = {
|
|
@@ -2861,7 +2765,6 @@ const stringMethods = {
|
|
|
2861
2765
|
getFinalChunk: getFinalStringChunk,
|
|
2862
2766
|
finalize: getContentsProperty
|
|
2863
2767
|
};
|
|
2864
|
-
|
|
2865
2768
|
//#endregion
|
|
2866
2769
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/io/max-buffer.js
|
|
2867
2770
|
const handleMaxBuffer = ({ error, stream, readableObjectMode, lines, encoding, fdNumber }) => {
|
|
@@ -2917,7 +2820,6 @@ const truncateMaxBufferSync = (result, isMaxBuffer, maxBuffer) => {
|
|
|
2917
2820
|
return result.length > maxBufferValue ? result.slice(0, maxBufferValue) : result;
|
|
2918
2821
|
};
|
|
2919
2822
|
const getMaxBufferSync = ([, stdoutMaxBuffer]) => stdoutMaxBuffer;
|
|
2920
|
-
|
|
2921
2823
|
//#endregion
|
|
2922
2824
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/return/message.js
|
|
2923
2825
|
const createMessages = ({ stdio, all, ipcOutput, originalError, signal, signalDescription, exitCode, escapedCommand, timedOut, isCanceled, isGracefullyCanceled, isMaxBuffer, isForcefullyTerminated, forceKillAfterDelay, killSignal, maxBuffer, timeout, cwd }) => {
|
|
@@ -2979,7 +2881,6 @@ const serializeMessageItem = (messageItem) => {
|
|
|
2979
2881
|
if (isUint8Array(messageItem)) return uint8ArrayToString(messageItem);
|
|
2980
2882
|
return "";
|
|
2981
2883
|
};
|
|
2982
|
-
|
|
2983
2884
|
//#endregion
|
|
2984
2885
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/return/result.js
|
|
2985
2886
|
const makeSuccessResult = ({ command, escapedCommand, stdio, all, ipcOutput, options: { cwd }, startTime }) => omitUndefinedProperties({
|
|
@@ -3097,7 +2998,6 @@ const normalizeExitPayload = (rawExitCode, rawSignal) => {
|
|
|
3097
2998
|
signalDescription: signal === void 0 ? void 0 : getSignalDescription(rawSignal)
|
|
3098
2999
|
};
|
|
3099
3000
|
};
|
|
3100
|
-
|
|
3101
3001
|
//#endregion
|
|
3102
3002
|
//#region ../../node_modules/.pnpm/parse-ms@4.0.0/node_modules/parse-ms/index.js
|
|
3103
3003
|
const toZeroIfInfinity = (value) => Number.isFinite(value) ? value : 0;
|
|
@@ -3132,11 +3032,10 @@ function parseMilliseconds(milliseconds) {
|
|
|
3132
3032
|
}
|
|
3133
3033
|
throw new TypeError("Expected a finite number or bigint");
|
|
3134
3034
|
}
|
|
3135
|
-
|
|
3136
3035
|
//#endregion
|
|
3137
3036
|
//#region ../../node_modules/.pnpm/pretty-ms@9.2.0/node_modules/pretty-ms/index.js
|
|
3138
3037
|
const isZero = (value) => value === 0 || value === 0n;
|
|
3139
|
-
const pluralize = (word, count
|
|
3038
|
+
const pluralize = (word, count) => count === 1 || count === 1n ? word : `${word}s`;
|
|
3140
3039
|
const SECOND_ROUNDING_EPSILON = 1e-7;
|
|
3141
3040
|
const ONE_DAY_IN_MILLISECONDS = 24n * 60n * 60n * 1000n;
|
|
3142
3041
|
function prettyMilliseconds(milliseconds, options) {
|
|
@@ -3185,16 +3084,16 @@ function prettyMilliseconds(milliseconds, options) {
|
|
|
3185
3084
|
add(Number(parsed.minutes), "minute", "m");
|
|
3186
3085
|
if (!options.hideSeconds) if (options.separateMilliseconds || options.formatSubMilliseconds || !options.colonNotation && milliseconds < 1e3) {
|
|
3187
3086
|
const seconds = Number(parsed.seconds);
|
|
3188
|
-
const milliseconds
|
|
3087
|
+
const milliseconds = Number(parsed.milliseconds);
|
|
3189
3088
|
const microseconds = Number(parsed.microseconds);
|
|
3190
3089
|
const nanoseconds = Number(parsed.nanoseconds);
|
|
3191
3090
|
add(seconds, "second", "s");
|
|
3192
3091
|
if (options.formatSubMilliseconds) {
|
|
3193
|
-
add(milliseconds
|
|
3092
|
+
add(milliseconds, "millisecond", "ms");
|
|
3194
3093
|
add(microseconds, "microsecond", "µs");
|
|
3195
3094
|
add(nanoseconds, "nanosecond", "ns");
|
|
3196
3095
|
} else {
|
|
3197
|
-
const millisecondsAndBelow = milliseconds
|
|
3096
|
+
const millisecondsAndBelow = milliseconds + microseconds / 1e3 + nanoseconds / 1e6;
|
|
3198
3097
|
const millisecondsDecimalDigits = typeof options.millisecondsDecimalDigits === "number" ? options.millisecondsDecimalDigits : 0;
|
|
3199
3098
|
const millisecondsString = millisecondsDecimalDigits ? millisecondsAndBelow.toFixed(millisecondsDecimalDigits) : millisecondsAndBelow >= 1 ? Math.round(millisecondsAndBelow) : Math.ceil(millisecondsAndBelow);
|
|
3200
3099
|
add(Number.parseFloat(millisecondsString), "millisecond", "ms", millisecondsString);
|
|
@@ -3209,7 +3108,6 @@ function prettyMilliseconds(milliseconds, options) {
|
|
|
3209
3108
|
if (typeof options.unitCount === "number") result = result.slice(0, Math.max(options.unitCount, 1));
|
|
3210
3109
|
return sign + result.join(separator);
|
|
3211
3110
|
}
|
|
3212
|
-
|
|
3213
3111
|
//#endregion
|
|
3214
3112
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/verbose/error.js
|
|
3215
3113
|
const logError = (result, verboseInfo) => {
|
|
@@ -3220,7 +3118,6 @@ const logError = (result, verboseInfo) => {
|
|
|
3220
3118
|
result
|
|
3221
3119
|
});
|
|
3222
3120
|
};
|
|
3223
|
-
|
|
3224
3121
|
//#endregion
|
|
3225
3122
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/verbose/complete.js
|
|
3226
3123
|
const logResult = (result, verboseInfo) => {
|
|
@@ -3236,7 +3133,6 @@ const logDuration = (result, verboseInfo) => {
|
|
|
3236
3133
|
result
|
|
3237
3134
|
});
|
|
3238
3135
|
};
|
|
3239
|
-
|
|
3240
3136
|
//#endregion
|
|
3241
3137
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/return/reject.js
|
|
3242
3138
|
const handleResult = (result, verboseInfo, { reject }) => {
|
|
@@ -3244,7 +3140,6 @@ const handleResult = (result, verboseInfo, { reject }) => {
|
|
|
3244
3140
|
if (result.failed && reject) throw result;
|
|
3245
3141
|
return result;
|
|
3246
3142
|
};
|
|
3247
|
-
|
|
3248
3143
|
//#endregion
|
|
3249
3144
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/stdio/type.js
|
|
3250
3145
|
const getStdioItemType = (value, optionName) => {
|
|
@@ -3311,10 +3206,10 @@ const KNOWN_STDIO_STRINGS = new Set([
|
|
|
3311
3206
|
"overlapped",
|
|
3312
3207
|
"pipe"
|
|
3313
3208
|
]);
|
|
3314
|
-
const isReadableStream
|
|
3315
|
-
const isWritableStream
|
|
3316
|
-
const isWebStream = (value) => isReadableStream
|
|
3317
|
-
const isTransformStream = (value) => isReadableStream
|
|
3209
|
+
const isReadableStream = (value) => Object.prototype.toString.call(value) === "[object ReadableStream]";
|
|
3210
|
+
const isWritableStream = (value) => Object.prototype.toString.call(value) === "[object WritableStream]";
|
|
3211
|
+
const isWebStream = (value) => isReadableStream(value) || isWritableStream(value);
|
|
3212
|
+
const isTransformStream = (value) => isReadableStream(value?.readable) && isWritableStream(value?.writable);
|
|
3318
3213
|
const isAsyncIterableObject = (value) => isObject(value) && typeof value[Symbol.asyncIterator] === "function";
|
|
3319
3214
|
const isIterableObject = (value) => isObject(value) && typeof value[Symbol.iterator] === "function";
|
|
3320
3215
|
const isObject = (value) => typeof value === "object" && value !== null;
|
|
@@ -3352,7 +3247,6 @@ const TYPE_TO_MESSAGE = {
|
|
|
3352
3247
|
string: "a string",
|
|
3353
3248
|
uint8Array: "a Uint8Array"
|
|
3354
3249
|
};
|
|
3355
|
-
|
|
3356
3250
|
//#endregion
|
|
3357
3251
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/transform/object-mode.js
|
|
3358
3252
|
const getTransformObjectModes = (objectMode, index, newTransforms, direction) => direction === "output" ? getOutputObjectModes(objectMode, index, newTransforms) : getInputObjectModes(objectMode, index, newTransforms);
|
|
@@ -3375,7 +3269,6 @@ const getFdObjectMode = (stdioItems, direction) => {
|
|
|
3375
3269
|
if (lastTransform === void 0) return false;
|
|
3376
3270
|
return direction === "input" ? lastTransform.value.writableObjectMode : lastTransform.value.readableObjectMode;
|
|
3377
3271
|
};
|
|
3378
|
-
|
|
3379
3272
|
//#endregion
|
|
3380
3273
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/transform/normalize.js
|
|
3381
3274
|
const normalizeTransforms = (stdioItems, optionName, direction, options) => [...stdioItems.filter(({ type }) => !TRANSFORM_TYPES.has(type)), ...getTransforms(stdioItems, optionName, direction, options)];
|
|
@@ -3452,7 +3345,6 @@ const normalizeGenerator = ({ stdioItem, stdioItem: { value }, index, newTransfo
|
|
|
3452
3345
|
};
|
|
3453
3346
|
};
|
|
3454
3347
|
const sortTransforms = (newTransforms, direction) => direction === "input" ? newTransforms.reverse() : newTransforms;
|
|
3455
|
-
|
|
3456
3348
|
//#endregion
|
|
3457
3349
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/stdio/direction.js
|
|
3458
3350
|
const getStreamDirection = (stdioItems, fdNumber, optionName) => {
|
|
@@ -3476,10 +3368,10 @@ const guessStreamDirection = {
|
|
|
3476
3368
|
iterable: alwaysInput,
|
|
3477
3369
|
asyncIterable: alwaysInput,
|
|
3478
3370
|
uint8Array: alwaysInput,
|
|
3479
|
-
webStream: (value) => isWritableStream
|
|
3371
|
+
webStream: (value) => isWritableStream(value) ? "output" : "input",
|
|
3480
3372
|
nodeStream(value) {
|
|
3481
|
-
if (!isReadableStream(value, { checkOpen: false })) return "output";
|
|
3482
|
-
return isWritableStream(value, { checkOpen: false }) ? void 0 : "input";
|
|
3373
|
+
if (!isReadableStream$1(value, { checkOpen: false })) return "output";
|
|
3374
|
+
return isWritableStream$1(value, { checkOpen: false }) ? void 0 : "input";
|
|
3483
3375
|
},
|
|
3484
3376
|
webTransform: anyDirection,
|
|
3485
3377
|
duplex: anyDirection,
|
|
@@ -3499,14 +3391,12 @@ const getStandardStreamDirection = (value) => {
|
|
|
3499
3391
|
].includes(value)) return "output";
|
|
3500
3392
|
};
|
|
3501
3393
|
const DEFAULT_DIRECTION = "output";
|
|
3502
|
-
|
|
3503
3394
|
//#endregion
|
|
3504
3395
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/ipc/array.js
|
|
3505
3396
|
const normalizeIpcStdioArray = (stdioArray, ipc) => ipc && !stdioArray.includes("ipc") ? [...stdioArray, "ipc"] : stdioArray;
|
|
3506
|
-
|
|
3507
3397
|
//#endregion
|
|
3508
3398
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/stdio/stdio-option.js
|
|
3509
|
-
const normalizeStdioOption = ({ stdio, ipc, buffer
|
|
3399
|
+
const normalizeStdioOption = ({ stdio, ipc, buffer, ...options }, verboseInfo, isSync) => {
|
|
3510
3400
|
const stdioArray = getStdioArray(stdio, options).map((stdioOption, fdNumber) => addDefaultValue(stdioOption, fdNumber));
|
|
3511
3401
|
return isSync ? normalizeStdioSync(stdioArray, buffer, verboseInfo) : normalizeIpcStdioArray(stdioArray, ipc);
|
|
3512
3402
|
};
|
|
@@ -3530,7 +3420,6 @@ const addDefaultValue = (stdioOption, fdNumber) => {
|
|
|
3530
3420
|
};
|
|
3531
3421
|
const normalizeStdioSync = (stdioArray, buffer, verboseInfo) => stdioArray.map((stdioOption, fdNumber) => !buffer[fdNumber] && fdNumber !== 0 && !isFullVerbose(verboseInfo, fdNumber) && isOutputPipeOnly(stdioOption) ? "ignore" : stdioOption);
|
|
3532
3422
|
const isOutputPipeOnly = (stdioOption) => stdioOption === "pipe" || Array.isArray(stdioOption) && stdioOption.every((item) => item === "pipe");
|
|
3533
|
-
|
|
3534
3423
|
//#endregion
|
|
3535
3424
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/stdio/native.js
|
|
3536
3425
|
const handleNativeStream = ({ stdioItem, stdioItem: { type }, isStdioArray, fdNumber, direction, isSync }) => {
|
|
@@ -3599,7 +3488,6 @@ const getStandardStream = (fdNumber, value, optionName) => {
|
|
|
3599
3488
|
if (standardStream === void 0) throw new TypeError(`The \`${optionName}: ${value}\` option is invalid: no such standard stream.`);
|
|
3600
3489
|
return standardStream;
|
|
3601
3490
|
};
|
|
3602
|
-
|
|
3603
3491
|
//#endregion
|
|
3604
3492
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/stdio/input-option.js
|
|
3605
3493
|
const handleInputOptions = ({ input, inputFile }, fdNumber) => fdNumber === 0 ? [...handleInputOption(input), ...handleInputFileOption(inputFile)] : [];
|
|
@@ -3609,7 +3497,7 @@ const handleInputOption = (input) => input === void 0 ? [] : [{
|
|
|
3609
3497
|
optionName: "input"
|
|
3610
3498
|
}];
|
|
3611
3499
|
const getInputType = (input) => {
|
|
3612
|
-
if (isReadableStream(input, { checkOpen: false })) return "nodeStream";
|
|
3500
|
+
if (isReadableStream$1(input, { checkOpen: false })) return "nodeStream";
|
|
3613
3501
|
if (typeof input === "string") return "string";
|
|
3614
3502
|
if (isUint8Array(input)) return "uint8Array";
|
|
3615
3503
|
throw new Error("The `input` option must be a string, a Uint8Array or a Node.js Readable stream.");
|
|
@@ -3629,7 +3517,6 @@ const getInputFileType = (inputFile) => {
|
|
|
3629
3517
|
};
|
|
3630
3518
|
throw new Error("The `inputFile` option must be a file path string or a file URL.");
|
|
3631
3519
|
};
|
|
3632
|
-
|
|
3633
3520
|
//#endregion
|
|
3634
3521
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/stdio/duplicate.js
|
|
3635
3522
|
const filterDuplicates = (stdioItems) => stdioItems.filter((stdioItemOne, indexOne) => stdioItems.every((stdioItemTwo, indexTwo) => stdioItemOne.value !== stdioItemTwo.value || indexOne >= indexTwo || stdioItemOne.type === "generator" || stdioItemOne.type === "asyncGenerator"));
|
|
@@ -3690,10 +3577,9 @@ const validateDuplicateTransform = ({ otherStdioItems, type, value, optionName }
|
|
|
3690
3577
|
const throwOnDuplicateStream = (stdioItem, optionName, type) => {
|
|
3691
3578
|
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
3579
|
};
|
|
3693
|
-
|
|
3694
3580
|
//#endregion
|
|
3695
3581
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/stdio/handle.js
|
|
3696
|
-
const handleStdio = (addProperties
|
|
3582
|
+
const handleStdio = (addProperties, options, verboseInfo, isSync) => {
|
|
3697
3583
|
const fileDescriptors = getFinalFileDescriptors({
|
|
3698
3584
|
initialFileDescriptors: normalizeStdioOption(options, verboseInfo, isSync).map((stdioOption, fdNumber) => getFileDescriptor({
|
|
3699
3585
|
stdioOption,
|
|
@@ -3701,7 +3587,7 @@ const handleStdio = (addProperties$2, options, verboseInfo, isSync) => {
|
|
|
3701
3587
|
options,
|
|
3702
3588
|
isSync
|
|
3703
3589
|
})),
|
|
3704
|
-
addProperties
|
|
3590
|
+
addProperties,
|
|
3705
3591
|
options,
|
|
3706
3592
|
isSync
|
|
3707
3593
|
});
|
|
@@ -3750,7 +3636,7 @@ const initializeStdioItem = (value, optionName) => ({
|
|
|
3750
3636
|
const validateStdioArray = (stdioItems, isStdioArray, optionName) => {
|
|
3751
3637
|
if (stdioItems.length === 0) throw new TypeError(`The \`${optionName}\` option must not be an empty array.`);
|
|
3752
3638
|
if (!isStdioArray) return;
|
|
3753
|
-
for (const { value, optionName
|
|
3639
|
+
for (const { value, optionName } of stdioItems) if (INVALID_STDIO_ARRAY_OPTIONS.has(value)) throw new Error(`The \`${optionName}\` option must not include \`${value}\`.`);
|
|
3754
3640
|
};
|
|
3755
3641
|
const INVALID_STDIO_ARRAY_OPTIONS = new Set(["ignore", "ipc"]);
|
|
3756
3642
|
const validateStreams = (stdioItems) => {
|
|
@@ -3766,13 +3652,13 @@ const validateFileObjectMode = (stdioItems, objectMode) => {
|
|
|
3766
3652
|
const fileStdioItem = stdioItems.find(({ type }) => FILE_TYPES.has(type));
|
|
3767
3653
|
if (fileStdioItem !== void 0) throw new TypeError(`The \`${fileStdioItem.optionName}\` option cannot use both files and transforms in objectMode.`);
|
|
3768
3654
|
};
|
|
3769
|
-
const getFinalFileDescriptors = ({ initialFileDescriptors, addProperties
|
|
3655
|
+
const getFinalFileDescriptors = ({ initialFileDescriptors, addProperties, options, isSync }) => {
|
|
3770
3656
|
const fileDescriptors = [];
|
|
3771
3657
|
try {
|
|
3772
3658
|
for (const fileDescriptor of initialFileDescriptors) fileDescriptors.push(getFinalFileDescriptor({
|
|
3773
3659
|
fileDescriptor,
|
|
3774
3660
|
fileDescriptors,
|
|
3775
|
-
addProperties
|
|
3661
|
+
addProperties,
|
|
3776
3662
|
options,
|
|
3777
3663
|
isSync
|
|
3778
3664
|
}));
|
|
@@ -3782,13 +3668,13 @@ const getFinalFileDescriptors = ({ initialFileDescriptors, addProperties: addPro
|
|
|
3782
3668
|
throw error;
|
|
3783
3669
|
}
|
|
3784
3670
|
};
|
|
3785
|
-
const getFinalFileDescriptor = ({ fileDescriptor: { direction, objectMode, stdioItems }, fileDescriptors, addProperties
|
|
3671
|
+
const getFinalFileDescriptor = ({ fileDescriptor: { direction, objectMode, stdioItems }, fileDescriptors, addProperties, options, isSync }) => {
|
|
3786
3672
|
return {
|
|
3787
3673
|
direction,
|
|
3788
3674
|
objectMode,
|
|
3789
3675
|
stdioItems: stdioItems.map((stdioItem) => addStreamProperties({
|
|
3790
3676
|
stdioItem,
|
|
3791
|
-
addProperties
|
|
3677
|
+
addProperties,
|
|
3792
3678
|
direction,
|
|
3793
3679
|
options,
|
|
3794
3680
|
fileDescriptors,
|
|
@@ -3796,7 +3682,7 @@ const getFinalFileDescriptor = ({ fileDescriptor: { direction, objectMode, stdio
|
|
|
3796
3682
|
}))
|
|
3797
3683
|
};
|
|
3798
3684
|
};
|
|
3799
|
-
const addStreamProperties = ({ stdioItem, addProperties
|
|
3685
|
+
const addStreamProperties = ({ stdioItem, addProperties, direction, options, fileDescriptors, isSync }) => {
|
|
3800
3686
|
const duplicateStream = getDuplicateStream({
|
|
3801
3687
|
stdioItem,
|
|
3802
3688
|
direction,
|
|
@@ -3809,18 +3695,17 @@ const addStreamProperties = ({ stdioItem, addProperties: addProperties$2, direct
|
|
|
3809
3695
|
};
|
|
3810
3696
|
return {
|
|
3811
3697
|
...stdioItem,
|
|
3812
|
-
...addProperties
|
|
3698
|
+
...addProperties[direction][stdioItem.type](stdioItem, options)
|
|
3813
3699
|
};
|
|
3814
3700
|
};
|
|
3815
3701
|
const cleanupCustomStreams = (fileDescriptors) => {
|
|
3816
3702
|
for (const { stdioItems } of fileDescriptors) for (const { stream } of stdioItems) if (stream !== void 0 && !isStandardStream(stream)) stream.destroy();
|
|
3817
3703
|
};
|
|
3818
3704
|
const forwardStdio = (stdioItems) => {
|
|
3819
|
-
if (stdioItems.length > 1) return stdioItems.some(({ value
|
|
3705
|
+
if (stdioItems.length > 1) return stdioItems.some(({ value }) => value === "overlapped") ? "overlapped" : "pipe";
|
|
3820
3706
|
const [{ type, value }] = stdioItems;
|
|
3821
3707
|
return type === "native" ? value : "pipe";
|
|
3822
3708
|
};
|
|
3823
|
-
|
|
3824
3709
|
//#endregion
|
|
3825
3710
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/stdio/handle-sync.js
|
|
3826
3711
|
const handleStdioSync = (options, verboseInfo) => handleStdio(addPropertiesSync, options, verboseInfo, true);
|
|
@@ -3867,12 +3752,10 @@ const addPropertiesSync = {
|
|
|
3867
3752
|
uint8Array: forbiddenIfSync
|
|
3868
3753
|
}
|
|
3869
3754
|
};
|
|
3870
|
-
|
|
3871
3755
|
//#endregion
|
|
3872
3756
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/io/strip-newline.js
|
|
3873
3757
|
const stripNewline = (value, { stripFinalNewline: stripFinalNewline$1 }, fdNumber) => getStripFinalNewline(stripFinalNewline$1, fdNumber) && value !== void 0 && !Array.isArray(value) ? stripFinalNewline(value) : value;
|
|
3874
|
-
const getStripFinalNewline = (stripFinalNewline
|
|
3875
|
-
|
|
3758
|
+
const getStripFinalNewline = (stripFinalNewline, fdNumber) => fdNumber === "all" ? stripFinalNewline[1] || stripFinalNewline[2] : stripFinalNewline[fdNumber];
|
|
3876
3759
|
//#endregion
|
|
3877
3760
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/transform/split.js
|
|
3878
3761
|
const getSplitLinesGenerator = (binary, preserveNewlines, skipped, state) => binary || skipped ? void 0 : initializeSplitLines(preserveNewlines, state);
|
|
@@ -3918,8 +3801,8 @@ const linesFinal = function* ({ previousChunks }) {
|
|
|
3918
3801
|
};
|
|
3919
3802
|
const getAppendNewlineGenerator = ({ binary, preserveNewlines, readableObjectMode, state }) => binary || preserveNewlines || readableObjectMode ? void 0 : { transform: appendNewlineGenerator.bind(void 0, state) };
|
|
3920
3803
|
const appendNewlineGenerator = function* ({ isWindowsNewline = false }, chunk) {
|
|
3921
|
-
const { unixNewline, windowsNewline, LF
|
|
3922
|
-
if (chunk.at(-1) === LF
|
|
3804
|
+
const { unixNewline, windowsNewline, LF, concatBytes } = typeof chunk === "string" ? linesStringInfo : linesUint8ArrayInfo;
|
|
3805
|
+
if (chunk.at(-1) === LF) {
|
|
3923
3806
|
yield chunk;
|
|
3924
3807
|
return;
|
|
3925
3808
|
}
|
|
@@ -3944,7 +3827,6 @@ const linesUint8ArrayInfo = {
|
|
|
3944
3827
|
LF: 10,
|
|
3945
3828
|
concatBytes: concatUint8Array
|
|
3946
3829
|
};
|
|
3947
|
-
|
|
3948
3830
|
//#endregion
|
|
3949
3831
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/transform/validate.js
|
|
3950
3832
|
const getValidateTransformInput = (writableObjectMode, optionName) => writableObjectMode ? void 0 : validateStringTransformInput.bind(void 0, optionName);
|
|
@@ -3967,7 +3849,6 @@ const validateEmptyReturn = (optionName, chunk) => {
|
|
|
3967
3849
|
Instead, \`yield\` should either be called with a value, or not be called at all. For example:
|
|
3968
3850
|
if (condition) { yield value; }`);
|
|
3969
3851
|
};
|
|
3970
|
-
|
|
3971
3852
|
//#endregion
|
|
3972
3853
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/transform/encoding-transform.js
|
|
3973
3854
|
const getEncodingTransformGenerator = (binary, encoding, skipped) => {
|
|
@@ -3979,9 +3860,9 @@ const getEncodingTransformGenerator = (binary, encoding, skipped) => {
|
|
|
3979
3860
|
final: encodingStringFinal.bind(void 0, stringDecoder)
|
|
3980
3861
|
};
|
|
3981
3862
|
};
|
|
3982
|
-
const encodingUint8ArrayGenerator = function* (textEncoder
|
|
3863
|
+
const encodingUint8ArrayGenerator = function* (textEncoder, chunk) {
|
|
3983
3864
|
if (node_buffer.Buffer.isBuffer(chunk)) yield bufferToUint8Array(chunk);
|
|
3984
|
-
else if (typeof chunk === "string") yield textEncoder
|
|
3865
|
+
else if (typeof chunk === "string") yield textEncoder.encode(chunk);
|
|
3985
3866
|
else yield chunk;
|
|
3986
3867
|
};
|
|
3987
3868
|
const encodingStringGenerator = function* (stringDecoder, chunk) {
|
|
@@ -3991,7 +3872,6 @@ const encodingStringFinal = function* (stringDecoder) {
|
|
|
3991
3872
|
const lastChunk = stringDecoder.end();
|
|
3992
3873
|
if (lastChunk !== "") yield lastChunk;
|
|
3993
3874
|
};
|
|
3994
|
-
|
|
3995
3875
|
//#endregion
|
|
3996
3876
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/transform/run-async.js
|
|
3997
3877
|
const pushChunks = (0, node_util.callbackify)(async (getChunks, state, getChunksArguments, transformStream) => {
|
|
@@ -4027,7 +3907,6 @@ const destroyTransform = (0, node_util.callbackify)(async ({ currentIterable },
|
|
|
4027
3907
|
const identityGenerator$1 = function* (chunk) {
|
|
4028
3908
|
yield chunk;
|
|
4029
3909
|
};
|
|
4030
|
-
|
|
4031
3910
|
//#endregion
|
|
4032
3911
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/transform/run-sync.js
|
|
4033
3912
|
const pushChunksSync = (getChunksSync, getChunksArguments, transformStream, done) => {
|
|
@@ -4057,7 +3936,6 @@ const generatorFinalChunksSync = function* (final, index, generators) {
|
|
|
4057
3936
|
const identityGenerator = function* (chunk) {
|
|
4058
3937
|
yield chunk;
|
|
4059
3938
|
};
|
|
4060
|
-
|
|
4061
3939
|
//#endregion
|
|
4062
3940
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/transform/generator.js
|
|
4063
3941
|
const generatorToStream = ({ value, value: { transform, final, writableObjectMode, readableObjectMode }, optionName }, { encoding }) => {
|
|
@@ -4073,7 +3951,7 @@ const generatorToStream = ({ value, value: { transform, final, writableObjectMod
|
|
|
4073
3951
|
writableHighWaterMark: (0, node_stream.getDefaultHighWaterMark)(writableObjectMode),
|
|
4074
3952
|
readableObjectMode,
|
|
4075
3953
|
readableHighWaterMark: (0, node_stream.getDefaultHighWaterMark)(readableObjectMode),
|
|
4076
|
-
transform(chunk, encoding
|
|
3954
|
+
transform(chunk, encoding, done) {
|
|
4077
3955
|
transformMethod([
|
|
4078
3956
|
chunk,
|
|
4079
3957
|
generators,
|
|
@@ -4111,7 +3989,6 @@ const addInternalGenerators = ({ transform, final, binary, writableObjectMode, r
|
|
|
4111
3989
|
})
|
|
4112
3990
|
].filter(Boolean);
|
|
4113
3991
|
};
|
|
4114
|
-
|
|
4115
3992
|
//#endregion
|
|
4116
3993
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/io/input-sync.js
|
|
4117
3994
|
const addInputOptionsSync = (fileDescriptors, options) => {
|
|
@@ -4137,7 +4014,6 @@ const validateSerializable = (newContents) => {
|
|
|
4137
4014
|
const invalidItem = newContents.find((item) => typeof item !== "string" && !isUint8Array(item));
|
|
4138
4015
|
if (invalidItem !== void 0) throw new TypeError(`The \`stdin\` option is invalid: when passing objects as input, a transform must be used to serialize them to strings or Uint8Arrays: ${invalidItem}.`);
|
|
4139
4016
|
};
|
|
4140
|
-
|
|
4141
4017
|
//#endregion
|
|
4142
4018
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/verbose/output.js
|
|
4143
4019
|
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)));
|
|
@@ -4158,7 +4034,6 @@ const logLine = (line, fdNumber, verboseInfo) => {
|
|
|
4158
4034
|
verboseInfo
|
|
4159
4035
|
});
|
|
4160
4036
|
};
|
|
4161
|
-
|
|
4162
4037
|
//#endregion
|
|
4163
4038
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/io/output-sync.js
|
|
4164
4039
|
const transformOutputSync = ({ fileDescriptors, syncResult: { output }, options, isMaxBuffer, verboseInfo }) => {
|
|
@@ -4178,7 +4053,7 @@ const transformOutputSync = ({ fileDescriptors, syncResult: { output }, options,
|
|
|
4178
4053
|
...state
|
|
4179
4054
|
};
|
|
4180
4055
|
};
|
|
4181
|
-
const transformOutputResultSync = ({ result, fileDescriptors, fdNumber, state, outputFiles, isMaxBuffer, verboseInfo }, { buffer, encoding, lines, stripFinalNewline
|
|
4056
|
+
const transformOutputResultSync = ({ result, fileDescriptors, fdNumber, state, outputFiles, isMaxBuffer, verboseInfo }, { buffer, encoding, lines, stripFinalNewline, maxBuffer }) => {
|
|
4182
4057
|
if (result === null) return;
|
|
4183
4058
|
const uint8ArrayResult = bufferToUint8Array(truncateMaxBufferSync(result, isMaxBuffer, maxBuffer));
|
|
4184
4059
|
const { stdioItems, objectMode } = fileDescriptors[fdNumber];
|
|
@@ -4187,7 +4062,7 @@ const transformOutputResultSync = ({ result, fileDescriptors, fdNumber, state, o
|
|
|
4187
4062
|
objectMode,
|
|
4188
4063
|
encoding,
|
|
4189
4064
|
lines,
|
|
4190
|
-
stripFinalNewline
|
|
4065
|
+
stripFinalNewline,
|
|
4191
4066
|
fdNumber
|
|
4192
4067
|
});
|
|
4193
4068
|
logOutputSync({
|
|
@@ -4216,13 +4091,13 @@ const runOutputGeneratorsSync = (chunks, stdioItems, encoding, state) => {
|
|
|
4216
4091
|
return chunks;
|
|
4217
4092
|
}
|
|
4218
4093
|
};
|
|
4219
|
-
const serializeChunks = ({ chunks, objectMode, encoding, lines, stripFinalNewline
|
|
4094
|
+
const serializeChunks = ({ chunks, objectMode, encoding, lines, stripFinalNewline, fdNumber }) => {
|
|
4220
4095
|
if (objectMode) return { serializedResult: chunks };
|
|
4221
4096
|
if (encoding === "buffer") return { serializedResult: joinToUint8Array(chunks) };
|
|
4222
4097
|
const serializedResult = joinToString(chunks, encoding);
|
|
4223
4098
|
if (lines[fdNumber]) return {
|
|
4224
4099
|
serializedResult,
|
|
4225
|
-
finalResult: splitLinesSync(serializedResult, !stripFinalNewline
|
|
4100
|
+
finalResult: splitLinesSync(serializedResult, !stripFinalNewline[fdNumber], objectMode)
|
|
4226
4101
|
};
|
|
4227
4102
|
return { serializedResult };
|
|
4228
4103
|
};
|
|
@@ -4241,16 +4116,15 @@ const logOutputSync = ({ serializedResult, fdNumber, state, verboseInfo, encodin
|
|
|
4241
4116
|
}
|
|
4242
4117
|
};
|
|
4243
4118
|
const writeToFiles = (serializedResult, stdioItems, outputFiles) => {
|
|
4244
|
-
for (const { path
|
|
4245
|
-
const pathString = typeof path
|
|
4246
|
-
if (append || outputFiles.has(pathString)) (0, node_fs.appendFileSync)(path
|
|
4119
|
+
for (const { path, append } of stdioItems.filter(({ type }) => FILE_TYPES.has(type))) {
|
|
4120
|
+
const pathString = typeof path === "string" ? path : path.toString();
|
|
4121
|
+
if (append || outputFiles.has(pathString)) (0, node_fs.appendFileSync)(path, serializedResult);
|
|
4247
4122
|
else {
|
|
4248
4123
|
outputFiles.add(pathString);
|
|
4249
|
-
(0, node_fs.writeFileSync)(path
|
|
4124
|
+
(0, node_fs.writeFileSync)(path, serializedResult);
|
|
4250
4125
|
}
|
|
4251
4126
|
}
|
|
4252
4127
|
};
|
|
4253
|
-
|
|
4254
4128
|
//#endregion
|
|
4255
4129
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/resolve/all-sync.js
|
|
4256
4130
|
const getAllSync = ([, stdout, stderr], options) => {
|
|
@@ -4262,7 +4136,6 @@ const getAllSync = ([, stdout, stderr], options) => {
|
|
|
4262
4136
|
if (isUint8Array(stdout) && isUint8Array(stderr)) return concatUint8Arrays([stdout, stderr]);
|
|
4263
4137
|
return `${stdout}${stderr}`;
|
|
4264
4138
|
};
|
|
4265
|
-
|
|
4266
4139
|
//#endregion
|
|
4267
4140
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/resolve/exit-async.js
|
|
4268
4141
|
const waitForExit = async (subprocess, context) => {
|
|
@@ -4289,7 +4162,6 @@ const waitForSuccessfulExit = async (exitPromise) => {
|
|
|
4289
4162
|
};
|
|
4290
4163
|
const isSubprocessErrorExit = (exitCode, signal) => exitCode === void 0 && signal === void 0;
|
|
4291
4164
|
const isFailedExit = (exitCode, signal) => exitCode !== 0 || signal !== null;
|
|
4292
|
-
|
|
4293
4165
|
//#endregion
|
|
4294
4166
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/resolve/exit-sync.js
|
|
4295
4167
|
const getExitResultSync = ({ error, status: exitCode, signal, output }, { maxBuffer }) => {
|
|
@@ -4306,7 +4178,6 @@ const getResultError = (error, exitCode, signal) => {
|
|
|
4306
4178
|
if (error !== void 0) return error;
|
|
4307
4179
|
return isFailedExit(exitCode, signal) ? new DiscardedError() : void 0;
|
|
4308
4180
|
};
|
|
4309
|
-
|
|
4310
4181
|
//#endregion
|
|
4311
4182
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/methods/main-sync.js
|
|
4312
4183
|
const execaCoreSync = (rawFile, rawArguments, rawOptions) => {
|
|
@@ -4399,7 +4270,7 @@ const runSubprocessSync = ({ file, commandArguments, options, command, escapedCo
|
|
|
4399
4270
|
});
|
|
4400
4271
|
}
|
|
4401
4272
|
};
|
|
4402
|
-
const normalizeSpawnSyncOptions = ({ encoding, maxBuffer
|
|
4273
|
+
const normalizeSpawnSyncOptions = ({ encoding, maxBuffer, ...options }) => ({
|
|
4403
4274
|
...options,
|
|
4404
4275
|
encoding: "buffer",
|
|
4405
4276
|
maxBuffer: getMaxBufferSync(maxBuffer)
|
|
@@ -4430,7 +4301,6 @@ const getSyncResult = ({ error, exitCode, signal, timedOut, isMaxBuffer, stdio,
|
|
|
4430
4301
|
startTime,
|
|
4431
4302
|
isSync: true
|
|
4432
4303
|
});
|
|
4433
|
-
|
|
4434
4304
|
//#endregion
|
|
4435
4305
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/ipc/get-one.js
|
|
4436
4306
|
const getOneMessage$1 = ({ anyProcess, channel, isSubprocess, ipc }, { reference = true, filter } = {}) => {
|
|
@@ -4481,7 +4351,6 @@ const throwOnStrictError = async (ipcEmitter, isSubprocess, { signal }) => {
|
|
|
4481
4351
|
const [error] = await (0, node_events.once)(ipcEmitter, "strict:error", { signal });
|
|
4482
4352
|
throw getStrictResponseError(error, isSubprocess);
|
|
4483
4353
|
};
|
|
4484
|
-
|
|
4485
4354
|
//#endregion
|
|
4486
4355
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/ipc/get-each.js
|
|
4487
4356
|
const getEachMessage$1 = ({ anyProcess, channel, isSubprocess, ipc }, { reference = true } = {}) => loopOnMessages({
|
|
@@ -4552,7 +4421,6 @@ const iterateOnMessages = async function* ({ anyProcess, channel, ipcEmitter, is
|
|
|
4552
4421
|
const throwIfStrictError = ({ error }) => {
|
|
4553
4422
|
if (error) throw error;
|
|
4554
4423
|
};
|
|
4555
|
-
|
|
4556
4424
|
//#endregion
|
|
4557
4425
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/ipc/methods.js
|
|
4558
4426
|
const addIpcMethods = (subprocess, { ipc }) => {
|
|
@@ -4592,7 +4460,6 @@ const getIpcMethods = (anyProcess, isSubprocess, ipc) => ({
|
|
|
4592
4460
|
ipc
|
|
4593
4461
|
})
|
|
4594
4462
|
});
|
|
4595
|
-
|
|
4596
4463
|
//#endregion
|
|
4597
4464
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/return/early-error.js
|
|
4598
4465
|
const handleEarlyError = ({ error, command, escapedCommand, fileDescriptors, options, startTime, verboseInfo }) => {
|
|
@@ -4649,7 +4516,6 @@ const duplex = () => new node_stream.Duplex({
|
|
|
4649
4516
|
write() {}
|
|
4650
4517
|
});
|
|
4651
4518
|
const handleDummyPromise = async (error, verboseInfo, options) => handleResult(error, verboseInfo, options);
|
|
4652
|
-
|
|
4653
4519
|
//#endregion
|
|
4654
4520
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/stdio/handle-async.js
|
|
4655
4521
|
const handleStdioAsync = (options, verboseInfo) => handleStdio(addPropertiesAsync, options, verboseInfo, false);
|
|
@@ -4690,7 +4556,6 @@ const addPropertiesAsync = {
|
|
|
4690
4556
|
uint8Array: forbiddenIfAsync
|
|
4691
4557
|
}
|
|
4692
4558
|
};
|
|
4693
|
-
|
|
4694
4559
|
//#endregion
|
|
4695
4560
|
//#region ../../node_modules/.pnpm/@sindresorhus+merge-streams@4.0.0/node_modules/@sindresorhus/merge-streams/index.js
|
|
4696
4561
|
function mergeStreams(streams) {
|
|
@@ -4773,7 +4638,7 @@ const onInputStreamsUnpipe = async (passThroughStream, streams, unpipeEvent, { s
|
|
|
4773
4638
|
const validateStream = (stream) => {
|
|
4774
4639
|
if (typeof stream?.pipe !== "function") throw new TypeError(`Expected a readable stream, got: \`${typeof stream}\`.`);
|
|
4775
4640
|
};
|
|
4776
|
-
const endWhenStreamsDone = async ({ passThroughStream, stream, streams, ended, aborted
|
|
4641
|
+
const endWhenStreamsDone = async ({ passThroughStream, stream, streams, ended, aborted, onFinished, unpipeEvent }) => {
|
|
4777
4642
|
updateMaxListeners(passThroughStream, PASSTHROUGH_LISTENERS_PER_STREAM);
|
|
4778
4643
|
const controller = new AbortController();
|
|
4779
4644
|
try {
|
|
@@ -4784,14 +4649,14 @@ const endWhenStreamsDone = async ({ passThroughStream, stream, streams, ended, a
|
|
|
4784
4649
|
stream,
|
|
4785
4650
|
streams,
|
|
4786
4651
|
ended,
|
|
4787
|
-
aborted
|
|
4652
|
+
aborted,
|
|
4788
4653
|
controller
|
|
4789
4654
|
}),
|
|
4790
4655
|
onInputStreamUnpipe({
|
|
4791
4656
|
stream,
|
|
4792
4657
|
streams,
|
|
4793
4658
|
ended,
|
|
4794
|
-
aborted
|
|
4659
|
+
aborted,
|
|
4795
4660
|
unpipeEvent,
|
|
4796
4661
|
controller
|
|
4797
4662
|
})
|
|
@@ -4800,7 +4665,7 @@ const endWhenStreamsDone = async ({ passThroughStream, stream, streams, ended, a
|
|
|
4800
4665
|
controller.abort();
|
|
4801
4666
|
updateMaxListeners(passThroughStream, -PASSTHROUGH_LISTENERS_PER_STREAM);
|
|
4802
4667
|
}
|
|
4803
|
-
if (streams.size > 0 && streams.size === ended.size + aborted
|
|
4668
|
+
if (streams.size > 0 && streams.size === ended.size + aborted.size) if (ended.size === 0 && aborted.size > 0) abortStream(passThroughStream);
|
|
4804
4669
|
else endStream(passThroughStream);
|
|
4805
4670
|
};
|
|
4806
4671
|
const afterMergedStreamFinished = async (onFinished, stream, { signal }) => {
|
|
@@ -4811,7 +4676,7 @@ const afterMergedStreamFinished = async (onFinished, stream, { signal }) => {
|
|
|
4811
4676
|
if (!signal.aborted) errorOrAbortStream(stream, error);
|
|
4812
4677
|
}
|
|
4813
4678
|
};
|
|
4814
|
-
const onInputStreamEnd = async ({ passThroughStream, stream, streams, ended, aborted
|
|
4679
|
+
const onInputStreamEnd = async ({ passThroughStream, stream, streams, ended, aborted, controller: { signal } }) => {
|
|
4815
4680
|
try {
|
|
4816
4681
|
await (0, node_stream_promises.finished)(stream, {
|
|
4817
4682
|
signal,
|
|
@@ -4822,16 +4687,16 @@ const onInputStreamEnd = async ({ passThroughStream, stream, streams, ended, abo
|
|
|
4822
4687
|
if (streams.has(stream)) ended.add(stream);
|
|
4823
4688
|
} catch (error) {
|
|
4824
4689
|
if (signal.aborted || !streams.has(stream)) return;
|
|
4825
|
-
if (isAbortError(error)) aborted
|
|
4690
|
+
if (isAbortError(error)) aborted.add(stream);
|
|
4826
4691
|
else errorStream(passThroughStream, error);
|
|
4827
4692
|
}
|
|
4828
4693
|
};
|
|
4829
|
-
const onInputStreamUnpipe = async ({ stream, streams, ended, aborted
|
|
4694
|
+
const onInputStreamUnpipe = async ({ stream, streams, ended, aborted, unpipeEvent, controller: { signal } }) => {
|
|
4830
4695
|
await (0, node_events.once)(stream, unpipeEvent, { signal });
|
|
4831
4696
|
if (!stream.readable) return (0, node_events.once)(signal, "abort", { signal });
|
|
4832
4697
|
streams.delete(stream);
|
|
4833
4698
|
ended.delete(stream);
|
|
4834
|
-
aborted
|
|
4699
|
+
aborted.delete(stream);
|
|
4835
4700
|
};
|
|
4836
4701
|
const endStream = (stream) => {
|
|
4837
4702
|
if (stream.writable) stream.end();
|
|
@@ -4851,13 +4716,12 @@ const errorStream = (stream, error) => {
|
|
|
4851
4716
|
}
|
|
4852
4717
|
};
|
|
4853
4718
|
const noop = () => {};
|
|
4854
|
-
const updateMaxListeners = (passThroughStream, increment
|
|
4719
|
+
const updateMaxListeners = (passThroughStream, increment) => {
|
|
4855
4720
|
const maxListeners = passThroughStream.getMaxListeners();
|
|
4856
|
-
if (maxListeners !== 0 && maxListeners !== Number.POSITIVE_INFINITY) passThroughStream.setMaxListeners(maxListeners + increment
|
|
4721
|
+
if (maxListeners !== 0 && maxListeners !== Number.POSITIVE_INFINITY) passThroughStream.setMaxListeners(maxListeners + increment);
|
|
4857
4722
|
};
|
|
4858
4723
|
const PASSTHROUGH_LISTENERS_COUNT = 2;
|
|
4859
4724
|
const PASSTHROUGH_LISTENERS_PER_STREAM = 1;
|
|
4860
|
-
|
|
4861
4725
|
//#endregion
|
|
4862
4726
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/io/pipeline.js
|
|
4863
4727
|
const pipeStreams = (source, destination) => {
|
|
@@ -4893,7 +4757,6 @@ const onDestinationFinish = async (source, destination) => {
|
|
|
4893
4757
|
const abortSourceStream = (source) => {
|
|
4894
4758
|
if (source.readable) source.destroy();
|
|
4895
4759
|
};
|
|
4896
|
-
|
|
4897
4760
|
//#endregion
|
|
4898
4761
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/io/output-async.js
|
|
4899
4762
|
const pipeOutputAsync = (subprocess, fileDescriptors, controller) => {
|
|
@@ -4934,7 +4797,6 @@ const setStandardStreamMaxListeners = (stream, { signal }) => {
|
|
|
4934
4797
|
if (isStandardStream(stream)) incrementMaxListeners(stream, MAX_LISTENERS_INCREMENT, signal);
|
|
4935
4798
|
};
|
|
4936
4799
|
const MAX_LISTENERS_INCREMENT = 2;
|
|
4937
|
-
|
|
4938
4800
|
//#endregion
|
|
4939
4801
|
//#region ../../node_modules/.pnpm/signal-exit@4.1.0/node_modules/signal-exit/dist/mjs/signals.js
|
|
4940
4802
|
/**
|
|
@@ -4967,10 +4829,9 @@ const signals = [];
|
|
|
4967
4829
|
signals.push("SIGHUP", "SIGINT", "SIGTERM");
|
|
4968
4830
|
if (process.platform !== "win32") signals.push("SIGALRM", "SIGABRT", "SIGVTALRM", "SIGXCPU", "SIGXFSZ", "SIGUSR2", "SIGTRAP", "SIGSYS", "SIGQUIT", "SIGIOT");
|
|
4969
4831
|
if (process.platform === "linux") signals.push("SIGIO", "SIGPOLL", "SIGPWR", "SIGSTKFLT");
|
|
4970
|
-
|
|
4971
4832
|
//#endregion
|
|
4972
4833
|
//#region ../../node_modules/.pnpm/signal-exit@4.1.0/node_modules/signal-exit/dist/mjs/index.js
|
|
4973
|
-
const processOk = (process
|
|
4834
|
+
const processOk = (process) => !!process && typeof process === "object" && typeof process.removeListener === "function" && typeof process.emit === "function" && typeof process.reallyExit === "function" && typeof process.listeners === "function" && typeof process.kill === "function" && typeof process.pid === "number" && typeof process.on === "function";
|
|
4974
4835
|
const kExitEmitter = Symbol.for("signal-exit emitter");
|
|
4975
4836
|
const global$1 = globalThis;
|
|
4976
4837
|
const ObjectDefineProperty = Object.defineProperty.bind(Object);
|
|
@@ -4999,12 +4860,12 @@ var Emitter = class {
|
|
|
4999
4860
|
}
|
|
5000
4861
|
removeListener(ev, fn) {
|
|
5001
4862
|
const list = this.listeners[ev];
|
|
5002
|
-
const i
|
|
4863
|
+
const i = list.indexOf(fn);
|
|
5003
4864
|
/* c8 ignore start */
|
|
5004
|
-
if (i
|
|
4865
|
+
if (i === -1) return;
|
|
5005
4866
|
/* c8 ignore stop */
|
|
5006
|
-
if (i
|
|
5007
|
-
else list.splice(i
|
|
4867
|
+
if (i === 0 && list.length === 1) list.length = 0;
|
|
4868
|
+
else list.splice(i, 1);
|
|
5008
4869
|
}
|
|
5009
4870
|
emit(ev, code, signal) {
|
|
5010
4871
|
if (this.emitted[ev]) return false;
|
|
@@ -5046,27 +4907,27 @@ var SignalExit = class extends SignalExitBase {
|
|
|
5046
4907
|
#originalProcessReallyExit;
|
|
5047
4908
|
#sigListeners = {};
|
|
5048
4909
|
#loaded = false;
|
|
5049
|
-
constructor(process
|
|
4910
|
+
constructor(process) {
|
|
5050
4911
|
super();
|
|
5051
|
-
this.#process = process
|
|
4912
|
+
this.#process = process;
|
|
5052
4913
|
this.#sigListeners = {};
|
|
5053
4914
|
for (const sig of signals) this.#sigListeners[sig] = () => {
|
|
5054
4915
|
const listeners = this.#process.listeners(sig);
|
|
5055
|
-
let { count
|
|
4916
|
+
let { count } = this.#emitter;
|
|
5056
4917
|
/* c8 ignore start */
|
|
5057
|
-
const p
|
|
5058
|
-
if (typeof p
|
|
4918
|
+
const p = process;
|
|
4919
|
+
if (typeof p.__signal_exit_emitter__ === "object" && typeof p.__signal_exit_emitter__.count === "number") count += p.__signal_exit_emitter__.count;
|
|
5059
4920
|
/* c8 ignore stop */
|
|
5060
|
-
if (listeners.length === count
|
|
4921
|
+
if (listeners.length === count) {
|
|
5061
4922
|
this.unload();
|
|
5062
4923
|
const ret = this.#emitter.emit("exit", null, sig);
|
|
5063
4924
|
/* c8 ignore start */
|
|
5064
4925
|
const s = sig === "SIGHUP" ? this.#hupSig : sig;
|
|
5065
|
-
if (!ret) process
|
|
4926
|
+
if (!ret) process.kill(process.pid, s);
|
|
5066
4927
|
}
|
|
5067
4928
|
};
|
|
5068
|
-
this.#originalProcessReallyExit = process
|
|
5069
|
-
this.#originalProcessEmit = process
|
|
4929
|
+
this.#originalProcessReallyExit = process.reallyExit;
|
|
4930
|
+
this.#originalProcessEmit = process.emit;
|
|
5070
4931
|
}
|
|
5071
4932
|
onExit(cb, opts) {
|
|
5072
4933
|
/* c8 ignore start */
|
|
@@ -5088,8 +4949,8 @@ var SignalExit = class extends SignalExitBase {
|
|
|
5088
4949
|
const fn = this.#sigListeners[sig];
|
|
5089
4950
|
if (fn) this.#process.on(sig, fn);
|
|
5090
4951
|
} catch (_) {}
|
|
5091
|
-
this.#process.emit = (ev, ...a
|
|
5092
|
-
return this.#processEmit(ev, ...a
|
|
4952
|
+
this.#process.emit = (ev, ...a) => {
|
|
4953
|
+
return this.#processEmit(ev, ...a);
|
|
5093
4954
|
};
|
|
5094
4955
|
this.#process.reallyExit = (code) => {
|
|
5095
4956
|
return this.#processReallyExit(code);
|
|
@@ -5135,7 +4996,6 @@ var SignalExit = class extends SignalExitBase {
|
|
|
5135
4996
|
};
|
|
5136
4997
|
const process$1 = globalThis.process;
|
|
5137
4998
|
const { onExit, load, unload } = signalExitWrap(processOk(process$1) ? new SignalExit(process$1) : new SignalExitFallback());
|
|
5138
|
-
|
|
5139
4999
|
//#endregion
|
|
5140
5000
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/terminate/cleanup.js
|
|
5141
5001
|
const cleanupOnExit = (subprocess, { cleanup, detached }, { signal }) => {
|
|
@@ -5147,7 +5007,6 @@ const cleanupOnExit = (subprocess, { cleanup, detached }, { signal }) => {
|
|
|
5147
5007
|
removeExitHandler();
|
|
5148
5008
|
});
|
|
5149
5009
|
};
|
|
5150
|
-
|
|
5151
5010
|
//#endregion
|
|
5152
5011
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/pipe/pipe-arguments.js
|
|
5153
5012
|
const normalizePipeArguments = ({ source, sourcePromise, boundOptions, createNested }, ...pipeArguments) => {
|
|
@@ -5215,7 +5074,6 @@ const getSourceStream = (source, from) => {
|
|
|
5215
5074
|
return { sourceError: error };
|
|
5216
5075
|
}
|
|
5217
5076
|
};
|
|
5218
|
-
|
|
5219
5077
|
//#endregion
|
|
5220
5078
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/pipe/throw.js
|
|
5221
5079
|
const handlePipeArgumentsError = ({ sourceStream, sourceError, destinationStream, destinationError, fileDescriptors, sourceOptions, startTime }) => {
|
|
@@ -5253,7 +5111,6 @@ const createNonCommandError = ({ error, fileDescriptors, sourceOptions, startTim
|
|
|
5253
5111
|
isSync: false
|
|
5254
5112
|
});
|
|
5255
5113
|
const PIPE_COMMAND_MESSAGE = "source.pipe(destination)";
|
|
5256
|
-
|
|
5257
5114
|
//#endregion
|
|
5258
5115
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/pipe/sequence.js
|
|
5259
5116
|
const waitForBothSubprocesses = async (subprocessPromises) => {
|
|
@@ -5263,7 +5120,6 @@ const waitForBothSubprocesses = async (subprocessPromises) => {
|
|
|
5263
5120
|
if (sourceStatus === "rejected") throw sourceResult;
|
|
5264
5121
|
return destinationResult;
|
|
5265
5122
|
};
|
|
5266
|
-
|
|
5267
5123
|
//#endregion
|
|
5268
5124
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/pipe/streaming.js
|
|
5269
5125
|
const pipeSubprocessStream = (sourceStream, destinationStream, maxListenersController) => {
|
|
@@ -5297,7 +5153,6 @@ const cleanupMergedStreamsMap = async (destinationStream) => {
|
|
|
5297
5153
|
const MERGED_STREAMS = /* @__PURE__ */ new WeakMap();
|
|
5298
5154
|
const SOURCE_LISTENERS_PER_PIPE = 2;
|
|
5299
5155
|
const DESTINATION_LISTENERS_PER_PIPE = 1;
|
|
5300
|
-
|
|
5301
5156
|
//#endregion
|
|
5302
5157
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/pipe/abort.js
|
|
5303
5158
|
const unpipeOnAbort = (unpipeSignal, unpipeContext) => unpipeSignal === void 0 ? [] : [unpipeOnSignalAbort(unpipeSignal, unpipeContext)];
|
|
@@ -5311,7 +5166,6 @@ const unpipeOnSignalAbort = async (unpipeSignal, { sourceStream, mergedStream, f
|
|
|
5311
5166
|
startTime
|
|
5312
5167
|
});
|
|
5313
5168
|
};
|
|
5314
|
-
|
|
5315
5169
|
//#endregion
|
|
5316
5170
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/pipe/setup.js
|
|
5317
5171
|
const pipeToSubprocess = (sourceInfo, ...pipeArguments) => {
|
|
@@ -5322,7 +5176,7 @@ const pipeToSubprocess = (sourceInfo, ...pipeArguments) => {
|
|
|
5322
5176
|
...pipeArguments[0]
|
|
5323
5177
|
}
|
|
5324
5178
|
});
|
|
5325
|
-
const { destination
|
|
5179
|
+
const { destination, ...normalizedInfo } = normalizePipeArguments(sourceInfo, ...pipeArguments);
|
|
5326
5180
|
const promise = handlePipePromise({
|
|
5327
5181
|
...normalizedInfo,
|
|
5328
5182
|
destination
|
|
@@ -5361,7 +5215,6 @@ const handlePipePromise = async ({ sourcePromise, sourceStream, sourceOptions, s
|
|
|
5361
5215
|
}
|
|
5362
5216
|
};
|
|
5363
5217
|
const getSubprocessPromises = (sourcePromise, destination) => Promise.allSettled([sourcePromise, destination]);
|
|
5364
|
-
|
|
5365
5218
|
//#endregion
|
|
5366
5219
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/io/iterate.js
|
|
5367
5220
|
const iterateOnSubprocessStream = ({ subprocessStdout, subprocess, binary, shouldEncode, encoding, preserveNewlines }) => {
|
|
@@ -5384,7 +5237,7 @@ const stopReadingOnExit = async (subprocess, controller) => {
|
|
|
5384
5237
|
controller.abort();
|
|
5385
5238
|
}
|
|
5386
5239
|
};
|
|
5387
|
-
const iterateForResult = ({ stream, onStreamEnd, lines, encoding, stripFinalNewline
|
|
5240
|
+
const iterateForResult = ({ stream, onStreamEnd, lines, encoding, stripFinalNewline, allMixed }) => {
|
|
5388
5241
|
const controller = new AbortController();
|
|
5389
5242
|
stopReadingOnStreamEnd(onStreamEnd, controller, stream);
|
|
5390
5243
|
const objectMode = stream.readableObjectMode && !allMixed;
|
|
@@ -5395,7 +5248,7 @@ const iterateForResult = ({ stream, onStreamEnd, lines, encoding, stripFinalNewl
|
|
|
5395
5248
|
shouldEncode: !objectMode,
|
|
5396
5249
|
encoding,
|
|
5397
5250
|
shouldSplit: !objectMode && lines,
|
|
5398
|
-
preserveNewlines: !stripFinalNewline
|
|
5251
|
+
preserveNewlines: !stripFinalNewline
|
|
5399
5252
|
});
|
|
5400
5253
|
};
|
|
5401
5254
|
const stopReadingOnStreamEnd = async (onStreamEnd, controller, stream) => {
|
|
@@ -5441,10 +5294,9 @@ const iterateOnData = async function* ({ onStdoutChunk, controller, binary, shou
|
|
|
5441
5294
|
}
|
|
5442
5295
|
};
|
|
5443
5296
|
const getGenerators = ({ binary, shouldEncode, encoding, shouldSplit, preserveNewlines }) => [getEncodingTransformGenerator(binary, encoding, !shouldEncode), getSplitLinesGenerator(binary, preserveNewlines, !shouldSplit, {})].filter(Boolean);
|
|
5444
|
-
|
|
5445
5297
|
//#endregion
|
|
5446
5298
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/io/contents.js
|
|
5447
|
-
const getStreamOutput = async ({ stream, onStreamEnd, fdNumber, encoding, buffer, maxBuffer, lines, allMixed, stripFinalNewline
|
|
5299
|
+
const getStreamOutput = async ({ stream, onStreamEnd, fdNumber, encoding, buffer, maxBuffer, lines, allMixed, stripFinalNewline, verboseInfo, streamInfo }) => {
|
|
5448
5300
|
const logPromise = logOutputAsync({
|
|
5449
5301
|
stream,
|
|
5450
5302
|
onStreamEnd,
|
|
@@ -5463,7 +5315,7 @@ const getStreamOutput = async ({ stream, onStreamEnd, fdNumber, encoding, buffer
|
|
|
5463
5315
|
onStreamEnd,
|
|
5464
5316
|
lines,
|
|
5465
5317
|
encoding,
|
|
5466
|
-
stripFinalNewline: getStripFinalNewline(stripFinalNewline
|
|
5318
|
+
stripFinalNewline: getStripFinalNewline(stripFinalNewline, fdNumber),
|
|
5467
5319
|
allMixed
|
|
5468
5320
|
});
|
|
5469
5321
|
const [output] = await Promise.all([getStreamContents({
|
|
@@ -5520,7 +5372,6 @@ const getBufferedData = async (streamPromise) => {
|
|
|
5520
5372
|
}
|
|
5521
5373
|
};
|
|
5522
5374
|
const handleBufferedData = ({ bufferedData }) => isArrayBuffer(bufferedData) ? new Uint8Array(bufferedData) : bufferedData;
|
|
5523
|
-
|
|
5524
5375
|
//#endregion
|
|
5525
5376
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/resolve/wait-stream.js
|
|
5526
5377
|
const waitForStream = async (stream, fdNumber, streamInfo, { isSameDirection, stopOnExit = false } = {}) => {
|
|
@@ -5563,10 +5414,9 @@ const shouldIgnoreStreamError = (error, fdNumber, streamInfo, isSameDirection =
|
|
|
5563
5414
|
const isInputFileDescriptor = ({ fileDescriptors }, fdNumber) => fdNumber !== "all" && fileDescriptors[fdNumber].direction === "input";
|
|
5564
5415
|
const isStreamAbort = (error) => error?.code === "ERR_STREAM_PREMATURE_CLOSE";
|
|
5565
5416
|
const isStreamEpipe = (error) => error?.code === "EPIPE";
|
|
5566
|
-
|
|
5567
5417
|
//#endregion
|
|
5568
5418
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/resolve/stdio.js
|
|
5569
|
-
const waitForStdioStreams = ({ subprocess, encoding, buffer, maxBuffer, lines, stripFinalNewline
|
|
5419
|
+
const waitForStdioStreams = ({ subprocess, encoding, buffer, maxBuffer, lines, stripFinalNewline, verboseInfo, streamInfo }) => subprocess.stdio.map((stream, fdNumber) => waitForSubprocessStream({
|
|
5570
5420
|
stream,
|
|
5571
5421
|
fdNumber,
|
|
5572
5422
|
encoding,
|
|
@@ -5574,11 +5424,11 @@ const waitForStdioStreams = ({ subprocess, encoding, buffer, maxBuffer, lines, s
|
|
|
5574
5424
|
maxBuffer: maxBuffer[fdNumber],
|
|
5575
5425
|
lines: lines[fdNumber],
|
|
5576
5426
|
allMixed: false,
|
|
5577
|
-
stripFinalNewline
|
|
5427
|
+
stripFinalNewline,
|
|
5578
5428
|
verboseInfo,
|
|
5579
5429
|
streamInfo
|
|
5580
5430
|
}));
|
|
5581
|
-
const waitForSubprocessStream = async ({ stream, fdNumber, encoding, buffer, maxBuffer, lines, allMixed, stripFinalNewline
|
|
5431
|
+
const waitForSubprocessStream = async ({ stream, fdNumber, encoding, buffer, maxBuffer, lines, allMixed, stripFinalNewline, verboseInfo, streamInfo }) => {
|
|
5582
5432
|
if (!stream) return;
|
|
5583
5433
|
const onStreamEnd = waitForStream(stream, fdNumber, streamInfo);
|
|
5584
5434
|
if (isInputFileDescriptor(streamInfo, fdNumber)) {
|
|
@@ -5594,24 +5444,23 @@ const waitForSubprocessStream = async ({ stream, fdNumber, encoding, buffer, max
|
|
|
5594
5444
|
maxBuffer,
|
|
5595
5445
|
lines,
|
|
5596
5446
|
allMixed,
|
|
5597
|
-
stripFinalNewline
|
|
5447
|
+
stripFinalNewline,
|
|
5598
5448
|
verboseInfo,
|
|
5599
5449
|
streamInfo
|
|
5600
5450
|
}), onStreamEnd]);
|
|
5601
5451
|
return output;
|
|
5602
5452
|
};
|
|
5603
|
-
|
|
5604
5453
|
//#endregion
|
|
5605
5454
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/resolve/all-async.js
|
|
5606
5455
|
const makeAllStream = ({ stdout, stderr }, { all }) => all && (stdout || stderr) ? mergeStreams([stdout, stderr].filter(Boolean)) : void 0;
|
|
5607
|
-
const waitForAllStream = ({ subprocess, encoding, buffer, maxBuffer, lines, stripFinalNewline
|
|
5456
|
+
const waitForAllStream = ({ subprocess, encoding, buffer, maxBuffer, lines, stripFinalNewline, verboseInfo, streamInfo }) => waitForSubprocessStream({
|
|
5608
5457
|
...getAllStream(subprocess, buffer),
|
|
5609
5458
|
fdNumber: "all",
|
|
5610
5459
|
encoding,
|
|
5611
5460
|
maxBuffer: maxBuffer[1] + maxBuffer[2],
|
|
5612
5461
|
lines: lines[1] || lines[2],
|
|
5613
5462
|
allMixed: getAllMixed(subprocess),
|
|
5614
|
-
stripFinalNewline
|
|
5463
|
+
stripFinalNewline,
|
|
5615
5464
|
verboseInfo,
|
|
5616
5465
|
streamInfo
|
|
5617
5466
|
});
|
|
@@ -5635,7 +5484,6 @@ const getAllStream = ({ stdout, stderr, all }, [, bufferStdout, bufferStderr]) =
|
|
|
5635
5484
|
};
|
|
5636
5485
|
};
|
|
5637
5486
|
const getAllMixed = ({ all, stdout, stderr }) => all && stdout && stderr && stdout.readableObjectMode !== stderr.readableObjectMode;
|
|
5638
|
-
|
|
5639
5487
|
//#endregion
|
|
5640
5488
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/verbose/ipc.js
|
|
5641
5489
|
const shouldLogIpc = (verboseInfo) => isFullVerbose(verboseInfo, "ipc");
|
|
@@ -5647,12 +5495,11 @@ const logIpcOutput = (message, verboseInfo) => {
|
|
|
5647
5495
|
verboseInfo
|
|
5648
5496
|
});
|
|
5649
5497
|
};
|
|
5650
|
-
|
|
5651
5498
|
//#endregion
|
|
5652
5499
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/ipc/buffer-messages.js
|
|
5653
5500
|
const waitForIpcOutput = async ({ subprocess, buffer: bufferArray, maxBuffer: maxBufferArray, ipc, ipcOutput, verboseInfo }) => {
|
|
5654
5501
|
if (!ipc) return ipcOutput;
|
|
5655
|
-
const isVerbose
|
|
5502
|
+
const isVerbose = shouldLogIpc(verboseInfo);
|
|
5656
5503
|
const buffer = getFdSpecificValue(bufferArray, "ipc");
|
|
5657
5504
|
const maxBuffer = getFdSpecificValue(maxBufferArray, "ipc");
|
|
5658
5505
|
for await (const message of loopOnMessages({
|
|
@@ -5667,7 +5514,7 @@ const waitForIpcOutput = async ({ subprocess, buffer: bufferArray, maxBuffer: ma
|
|
|
5667
5514
|
checkIpcMaxBuffer(subprocess, ipcOutput, maxBuffer);
|
|
5668
5515
|
ipcOutput.push(message);
|
|
5669
5516
|
}
|
|
5670
|
-
if (isVerbose
|
|
5517
|
+
if (isVerbose) logIpcOutput(message, verboseInfo);
|
|
5671
5518
|
}
|
|
5672
5519
|
return ipcOutput;
|
|
5673
5520
|
};
|
|
@@ -5675,10 +5522,9 @@ const getBufferedIpcOutput = async (ipcOutputPromise, ipcOutput) => {
|
|
|
5675
5522
|
await Promise.allSettled([ipcOutputPromise]);
|
|
5676
5523
|
return ipcOutput;
|
|
5677
5524
|
};
|
|
5678
|
-
|
|
5679
5525
|
//#endregion
|
|
5680
5526
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/resolve/wait-subprocess.js
|
|
5681
|
-
const waitForSubprocessResult = async ({ subprocess, options: { encoding, buffer, maxBuffer, lines, timeoutDuration: timeout, cancelSignal, gracefulCancel, forceKillAfterDelay, stripFinalNewline
|
|
5527
|
+
const waitForSubprocessResult = async ({ subprocess, options: { encoding, buffer, maxBuffer, lines, timeoutDuration: timeout, cancelSignal, gracefulCancel, forceKillAfterDelay, stripFinalNewline, ipc, ipcInput }, context, verboseInfo, fileDescriptors, originalStreams, onInternalError, controller }) => {
|
|
5682
5528
|
const exitPromise = waitForExit(subprocess, context);
|
|
5683
5529
|
const streamInfo = {
|
|
5684
5530
|
originalStreams,
|
|
@@ -5693,7 +5539,7 @@ const waitForSubprocessResult = async ({ subprocess, options: { encoding, buffer
|
|
|
5693
5539
|
buffer,
|
|
5694
5540
|
maxBuffer,
|
|
5695
5541
|
lines,
|
|
5696
|
-
stripFinalNewline
|
|
5542
|
+
stripFinalNewline,
|
|
5697
5543
|
verboseInfo,
|
|
5698
5544
|
streamInfo
|
|
5699
5545
|
});
|
|
@@ -5703,7 +5549,7 @@ const waitForSubprocessResult = async ({ subprocess, options: { encoding, buffer
|
|
|
5703
5549
|
buffer,
|
|
5704
5550
|
maxBuffer,
|
|
5705
5551
|
lines,
|
|
5706
|
-
stripFinalNewline
|
|
5552
|
+
stripFinalNewline,
|
|
5707
5553
|
verboseInfo,
|
|
5708
5554
|
streamInfo
|
|
5709
5555
|
});
|
|
@@ -5771,7 +5617,6 @@ const throwOnSubprocessError = async (subprocess, { signal }) => {
|
|
|
5771
5617
|
const [error] = await (0, node_events.once)(subprocess, "error", { signal });
|
|
5772
5618
|
throw error;
|
|
5773
5619
|
};
|
|
5774
|
-
|
|
5775
5620
|
//#endregion
|
|
5776
5621
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/convert/concurrent.js
|
|
5777
5622
|
const initializeConcurrentStreams = () => ({
|
|
@@ -5795,7 +5640,6 @@ const waitForConcurrentStreams = async ({ resolve, promises }, subprocess) => {
|
|
|
5795
5640
|
const [isSubprocessExit] = await Promise.race([Promise.allSettled([true, subprocess]), Promise.all([false, ...promises])]);
|
|
5796
5641
|
return !isSubprocessExit;
|
|
5797
5642
|
};
|
|
5798
|
-
|
|
5799
5643
|
//#endregion
|
|
5800
5644
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/convert/shared.js
|
|
5801
5645
|
const safeWaitForSubprocessStdin = async (subprocessStdin) => {
|
|
@@ -5832,7 +5676,6 @@ const destroyOtherStream = (stream, isOpen, error) => {
|
|
|
5832
5676
|
if (error && !isStreamAbort(error)) stream.destroy(error);
|
|
5833
5677
|
else if (isOpen) stream.destroy();
|
|
5834
5678
|
};
|
|
5835
|
-
|
|
5836
5679
|
//#endregion
|
|
5837
5680
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/convert/readable.js
|
|
5838
5681
|
const createReadable = ({ subprocess, concurrentStreams, encoding }, { from, binary: binaryOption = true, preserveNewlines = true } = {}) => {
|
|
@@ -5846,7 +5689,7 @@ const createReadable = ({ subprocess, concurrentStreams, encoding }, { from, bin
|
|
|
5846
5689
|
encoding,
|
|
5847
5690
|
preserveNewlines
|
|
5848
5691
|
});
|
|
5849
|
-
const readable
|
|
5692
|
+
const readable = new node_stream.Readable({
|
|
5850
5693
|
read,
|
|
5851
5694
|
destroy: (0, node_util.callbackify)(onReadableDestroy.bind(void 0, {
|
|
5852
5695
|
subprocessStdout,
|
|
@@ -5860,10 +5703,10 @@ const createReadable = ({ subprocess, concurrentStreams, encoding }, { from, bin
|
|
|
5860
5703
|
onStdoutFinished({
|
|
5861
5704
|
subprocessStdout,
|
|
5862
5705
|
onStdoutDataDone,
|
|
5863
|
-
readable
|
|
5706
|
+
readable,
|
|
5864
5707
|
subprocess
|
|
5865
5708
|
});
|
|
5866
|
-
return readable
|
|
5709
|
+
return readable;
|
|
5867
5710
|
};
|
|
5868
5711
|
const getSubprocessStdout = (subprocess, from, concurrentStreams) => {
|
|
5869
5712
|
const subprocessStdout = getFromStream(subprocess, from);
|
|
@@ -5898,23 +5741,23 @@ const getReadableMethods = ({ subprocessStdout, subprocess, binary, encoding, pr
|
|
|
5898
5741
|
onStdoutDataDone
|
|
5899
5742
|
};
|
|
5900
5743
|
};
|
|
5901
|
-
const onRead = async (readable
|
|
5744
|
+
const onRead = async (readable, onStdoutData, onStdoutDataDone) => {
|
|
5902
5745
|
try {
|
|
5903
5746
|
const { value, done } = await onStdoutData.next();
|
|
5904
5747
|
if (done) onStdoutDataDone.resolve();
|
|
5905
|
-
else readable
|
|
5748
|
+
else readable.push(value);
|
|
5906
5749
|
} catch {}
|
|
5907
5750
|
};
|
|
5908
|
-
const onStdoutFinished = async ({ subprocessStdout, onStdoutDataDone, readable
|
|
5751
|
+
const onStdoutFinished = async ({ subprocessStdout, onStdoutDataDone, readable, subprocess, subprocessStdin }) => {
|
|
5909
5752
|
try {
|
|
5910
5753
|
await waitForSubprocessStdout(subprocessStdout);
|
|
5911
5754
|
await subprocess;
|
|
5912
5755
|
await safeWaitForSubprocessStdin(subprocessStdin);
|
|
5913
5756
|
await onStdoutDataDone;
|
|
5914
|
-
if (readable
|
|
5757
|
+
if (readable.readable) readable.push(null);
|
|
5915
5758
|
} catch (error) {
|
|
5916
5759
|
await safeWaitForSubprocessStdin(subprocessStdin);
|
|
5917
|
-
destroyOtherReadable(readable
|
|
5760
|
+
destroyOtherReadable(readable, error);
|
|
5918
5761
|
}
|
|
5919
5762
|
};
|
|
5920
5763
|
const onReadableDestroy = async ({ subprocessStdout, subprocess, waitReadableDestroy }, error) => {
|
|
@@ -5926,12 +5769,11 @@ const onReadableDestroy = async ({ subprocessStdout, subprocess, waitReadableDes
|
|
|
5926
5769
|
const destroyOtherReadable = (stream, error) => {
|
|
5927
5770
|
destroyOtherStream(stream, stream.readable, error);
|
|
5928
5771
|
};
|
|
5929
|
-
|
|
5930
5772
|
//#endregion
|
|
5931
5773
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/convert/writable.js
|
|
5932
5774
|
const createWritable = ({ subprocess, concurrentStreams }, { to } = {}) => {
|
|
5933
5775
|
const { subprocessStdin, waitWritableFinal, waitWritableDestroy } = getSubprocessStdin(subprocess, to, concurrentStreams);
|
|
5934
|
-
const writable
|
|
5776
|
+
const writable = new node_stream.Writable({
|
|
5935
5777
|
...getWritableMethods(subprocessStdin, subprocess, waitWritableFinal),
|
|
5936
5778
|
destroy: (0, node_util.callbackify)(onWritableDestroy.bind(void 0, {
|
|
5937
5779
|
subprocessStdin,
|
|
@@ -5942,8 +5784,8 @@ const createWritable = ({ subprocess, concurrentStreams }, { to } = {}) => {
|
|
|
5942
5784
|
highWaterMark: subprocessStdin.writableHighWaterMark,
|
|
5943
5785
|
objectMode: subprocessStdin.writableObjectMode
|
|
5944
5786
|
});
|
|
5945
|
-
onStdinFinished(subprocessStdin, writable
|
|
5946
|
-
return writable
|
|
5787
|
+
onStdinFinished(subprocessStdin, writable);
|
|
5788
|
+
return writable;
|
|
5947
5789
|
};
|
|
5948
5790
|
const getSubprocessStdin = (subprocess, to, concurrentStreams) => {
|
|
5949
5791
|
const subprocessStdin = getToStream(subprocess, to);
|
|
@@ -5967,13 +5809,13 @@ const onWritableFinal = async (subprocessStdin, subprocess, waitWritableFinal) =
|
|
|
5967
5809
|
await subprocess;
|
|
5968
5810
|
}
|
|
5969
5811
|
};
|
|
5970
|
-
const onStdinFinished = async (subprocessStdin, writable
|
|
5812
|
+
const onStdinFinished = async (subprocessStdin, writable, subprocessStdout) => {
|
|
5971
5813
|
try {
|
|
5972
5814
|
await waitForSubprocessStdin(subprocessStdin);
|
|
5973
|
-
if (writable
|
|
5815
|
+
if (writable.writable) writable.end();
|
|
5974
5816
|
} catch (error) {
|
|
5975
5817
|
await safeWaitForSubprocessStdout(subprocessStdout);
|
|
5976
|
-
destroyOtherWritable(writable
|
|
5818
|
+
destroyOtherWritable(writable, error);
|
|
5977
5819
|
}
|
|
5978
5820
|
};
|
|
5979
5821
|
const onWritableDestroy = async ({ subprocessStdin, subprocess, waitWritableFinal, waitWritableDestroy }, error) => {
|
|
@@ -5986,7 +5828,6 @@ const onWritableDestroy = async ({ subprocessStdin, subprocess, waitWritableFina
|
|
|
5986
5828
|
const destroyOtherWritable = (stream, error) => {
|
|
5987
5829
|
destroyOtherStream(stream, stream.writable, error);
|
|
5988
5830
|
};
|
|
5989
|
-
|
|
5990
5831
|
//#endregion
|
|
5991
5832
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/convert/duplex.js
|
|
5992
5833
|
const createDuplex = ({ subprocess, concurrentStreams, encoding }, { from, to, binary: binaryOption = true, preserveNewlines = true } = {}) => {
|
|
@@ -6001,7 +5842,7 @@ const createDuplex = ({ subprocess, concurrentStreams, encoding }, { from, to, b
|
|
|
6001
5842
|
encoding,
|
|
6002
5843
|
preserveNewlines
|
|
6003
5844
|
});
|
|
6004
|
-
const duplex
|
|
5845
|
+
const duplex = new node_stream.Duplex({
|
|
6005
5846
|
read,
|
|
6006
5847
|
...getWritableMethods(subprocessStdin, subprocess, waitWritableFinal),
|
|
6007
5848
|
destroy: (0, node_util.callbackify)(onDuplexDestroy.bind(void 0, {
|
|
@@ -6021,12 +5862,12 @@ const createDuplex = ({ subprocess, concurrentStreams, encoding }, { from, to, b
|
|
|
6021
5862
|
onStdoutFinished({
|
|
6022
5863
|
subprocessStdout,
|
|
6023
5864
|
onStdoutDataDone,
|
|
6024
|
-
readable: duplex
|
|
5865
|
+
readable: duplex,
|
|
6025
5866
|
subprocess,
|
|
6026
5867
|
subprocessStdin
|
|
6027
5868
|
});
|
|
6028
|
-
onStdinFinished(subprocessStdin, duplex
|
|
6029
|
-
return duplex
|
|
5869
|
+
onStdinFinished(subprocessStdin, duplex, subprocessStdout);
|
|
5870
|
+
return duplex;
|
|
6030
5871
|
};
|
|
6031
5872
|
const onDuplexDestroy = async ({ subprocessStdout, subprocessStdin, subprocess, waitReadableDestroy, waitWritableFinal, waitWritableDestroy }, error) => {
|
|
6032
5873
|
await Promise.all([onReadableDestroy({
|
|
@@ -6040,7 +5881,6 @@ const onDuplexDestroy = async ({ subprocessStdout, subprocessStdin, subprocess,
|
|
|
6040
5881
|
waitWritableDestroy
|
|
6041
5882
|
}, error)]);
|
|
6042
5883
|
};
|
|
6043
|
-
|
|
6044
5884
|
//#endregion
|
|
6045
5885
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/convert/iterable.js
|
|
6046
5886
|
const createIterable = (subprocess, encoding, { from, binary: binaryOption = false, preserveNewlines = false } = {}) => {
|
|
@@ -6063,7 +5903,6 @@ const iterateOnStdoutData = async function* (onStdoutData, subprocessStdout, sub
|
|
|
6063
5903
|
await subprocess;
|
|
6064
5904
|
}
|
|
6065
5905
|
};
|
|
6066
|
-
|
|
6067
5906
|
//#endregion
|
|
6068
5907
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/convert/add.js
|
|
6069
5908
|
const addConvertedStreams = (subprocess, { encoding }) => {
|
|
@@ -6085,7 +5924,6 @@ const addConvertedStreams = (subprocess, { encoding }) => {
|
|
|
6085
5924
|
subprocess.iterable = createIterable.bind(void 0, subprocess, encoding);
|
|
6086
5925
|
subprocess[Symbol.asyncIterator] = createIterable.bind(void 0, subprocess, encoding, {});
|
|
6087
5926
|
};
|
|
6088
|
-
|
|
6089
5927
|
//#endregion
|
|
6090
5928
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/methods/promise.js
|
|
6091
5929
|
const mergePromise = (subprocess, promise) => {
|
|
@@ -6103,7 +5941,6 @@ const descriptors = [
|
|
|
6103
5941
|
"catch",
|
|
6104
5942
|
"finally"
|
|
6105
5943
|
].map((property) => [property, Reflect.getOwnPropertyDescriptor(nativePromisePrototype, property)]);
|
|
6106
|
-
|
|
6107
5944
|
//#endregion
|
|
6108
5945
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/methods/main-async.js
|
|
6109
5946
|
const execaCoreAsync = (rawFile, rawArguments, rawOptions, createNested) => {
|
|
@@ -6146,7 +5983,7 @@ const handleAsyncArguments = (rawFile, rawArguments, rawOptions) => {
|
|
|
6146
5983
|
fileDescriptors: handleStdioAsync(options, verboseInfo)
|
|
6147
5984
|
};
|
|
6148
5985
|
};
|
|
6149
|
-
const handleAsyncOptions = ({ timeout, signal
|
|
5986
|
+
const handleAsyncOptions = ({ timeout, signal, ...options }) => {
|
|
6150
5987
|
if (signal !== void 0) throw new TypeError("The \"signal\" option has been renamed to \"cancelSignal\" instead.");
|
|
6151
5988
|
return {
|
|
6152
5989
|
...options,
|
|
@@ -6256,7 +6093,6 @@ const getAsyncResult = ({ errorInfo, exitCode, signal, stdio, all, ipcOutput, co
|
|
|
6256
6093
|
options,
|
|
6257
6094
|
startTime
|
|
6258
6095
|
});
|
|
6259
|
-
|
|
6260
6096
|
//#endregion
|
|
6261
6097
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/methods/bind.js
|
|
6262
6098
|
const mergeOptions = (boundOptions, options) => {
|
|
@@ -6274,11 +6110,10 @@ const mergeOption = (optionName, boundOptionValue, optionValue) => {
|
|
|
6274
6110
|
return optionValue;
|
|
6275
6111
|
};
|
|
6276
6112
|
const DEEP_OPTIONS = new Set(["env", ...FD_SPECIFIC_OPTIONS]);
|
|
6277
|
-
|
|
6278
6113
|
//#endregion
|
|
6279
6114
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/methods/create.js
|
|
6280
6115
|
const createExeca = (mapArguments, boundOptions, deepOptions, setBoundExeca) => {
|
|
6281
|
-
const createNested = (mapArguments
|
|
6116
|
+
const createNested = (mapArguments, boundOptions, setBoundExeca) => createExeca(mapArguments, boundOptions, deepOptions, setBoundExeca);
|
|
6282
6117
|
const boundExeca = (...execaArguments) => callBoundExeca({
|
|
6283
6118
|
mapArguments,
|
|
6284
6119
|
deepOptions,
|
|
@@ -6315,7 +6150,6 @@ const parseArguments = ({ mapArguments, firstArgument, nextArguments, deepOption
|
|
|
6315
6150
|
isSync
|
|
6316
6151
|
};
|
|
6317
6152
|
};
|
|
6318
|
-
|
|
6319
6153
|
//#endregion
|
|
6320
6154
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/methods/command.js
|
|
6321
6155
|
const mapCommandAsync = ({ file, commandArguments }) => parseCommand(file, commandArguments);
|
|
@@ -6344,7 +6178,6 @@ const parseCommandString = (command) => {
|
|
|
6344
6178
|
return tokens;
|
|
6345
6179
|
};
|
|
6346
6180
|
const SPACES_REGEXP = / +/g;
|
|
6347
|
-
|
|
6348
6181
|
//#endregion
|
|
6349
6182
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/methods/script.js
|
|
6350
6183
|
const setScriptSync = (boundExeca, createNested, boundOptions) => {
|
|
@@ -6362,17 +6195,15 @@ const getScriptOptions = (options) => ({ options: {
|
|
|
6362
6195
|
} });
|
|
6363
6196
|
const getScriptStdinOption = ({ input, inputFile, stdio }) => input === void 0 && inputFile === void 0 && stdio === void 0 ? { stdin: "inherit" } : {};
|
|
6364
6197
|
const deepScriptOptions = { preferLocal: true };
|
|
6365
|
-
|
|
6366
6198
|
//#endregion
|
|
6367
6199
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/index.js
|
|
6368
6200
|
const execa = createExeca(() => ({}));
|
|
6369
|
-
|
|
6370
|
-
|
|
6371
|
-
|
|
6372
|
-
|
|
6373
|
-
|
|
6201
|
+
createExeca(() => ({ isSync: true }));
|
|
6202
|
+
createExeca(mapCommandAsync);
|
|
6203
|
+
createExeca(mapCommandSync);
|
|
6204
|
+
createExeca(mapNode);
|
|
6205
|
+
createExeca(mapScriptAsync, {}, deepScriptOptions, setScriptSync);
|
|
6374
6206
|
const { sendMessage, getOneMessage, getEachMessage, getCancelSignal } = getIpcExport();
|
|
6375
|
-
|
|
6376
6207
|
//#endregion
|
|
6377
6208
|
//#region src/resolveMain.ts
|
|
6378
6209
|
/**
|
|
@@ -6407,56 +6238,56 @@ function resolveMain(cwd) {
|
|
|
6407
6238
|
throw new Error(`Cannot resolve "main" entry "${mainField}" (tried module specifier and file path "${mainFilePath}"): ${err.message}`);
|
|
6408
6239
|
}
|
|
6409
6240
|
}
|
|
6410
|
-
|
|
6411
6241
|
//#endregion
|
|
6412
6242
|
//#region src/util/prebuild.ts
|
|
6413
6243
|
/**
|
|
6414
6244
|
* Run expo `prebuild` command
|
|
6415
6245
|
*/
|
|
6416
|
-
const runExpoPrebuild = async ({ platform
|
|
6417
|
-
const spinner =
|
|
6246
|
+
const runExpoPrebuild = async ({ platform }) => {
|
|
6247
|
+
const spinner = _hot_updater_cli_tools.p.spinner();
|
|
6418
6248
|
try {
|
|
6419
6249
|
spinner.start("Run expo prebuild");
|
|
6420
6250
|
const args = [
|
|
6421
6251
|
"expo",
|
|
6422
6252
|
"prebuild",
|
|
6423
6253
|
"--platform",
|
|
6424
|
-
platform
|
|
6254
|
+
platform,
|
|
6425
6255
|
"--no-install"
|
|
6426
6256
|
];
|
|
6427
6257
|
spinner.stop("Expo prebuild done");
|
|
6428
6258
|
await execa("npx", args);
|
|
6429
6259
|
} catch (e) {
|
|
6430
6260
|
spinner.stop("Expo prebuild failed");
|
|
6431
|
-
if (e instanceof ExecaError)
|
|
6432
|
-
else if (e instanceof Error)
|
|
6261
|
+
if (e instanceof ExecaError) _hot_updater_cli_tools.p.log.error(e.stderr || e.stdout || e.message);
|
|
6262
|
+
else if (e instanceof Error) _hot_updater_cli_tools.p.log.error(e.message);
|
|
6433
6263
|
process.exit(1);
|
|
6434
6264
|
}
|
|
6435
6265
|
};
|
|
6436
|
-
|
|
6437
6266
|
//#endregion
|
|
6438
6267
|
//#region src/expo.ts
|
|
6439
|
-
const isHermesEnabled = (cwd, platform
|
|
6268
|
+
const isHermesEnabled = (cwd, platform) => {
|
|
6440
6269
|
try {
|
|
6441
6270
|
const appJsonPath = path.default.join(cwd, "app.json");
|
|
6442
|
-
const { expo
|
|
6443
|
-
const platformJsEngine = expo
|
|
6444
|
-
const commonJsEngine = expo
|
|
6271
|
+
const { expo } = JSON.parse(fs.default.readFileSync(appJsonPath, "utf-8"));
|
|
6272
|
+
const platformJsEngine = expo?.[platform]?.jsEngine;
|
|
6273
|
+
const commonJsEngine = expo?.jsEngine;
|
|
6445
6274
|
if (platformJsEngine !== void 0) return platformJsEngine === "hermes";
|
|
6446
6275
|
if (commonJsEngine !== void 0) return commonJsEngine === "hermes";
|
|
6447
6276
|
} catch {}
|
|
6448
6277
|
return true;
|
|
6449
6278
|
};
|
|
6450
|
-
const runBundle = async ({ cwd, platform
|
|
6451
|
-
const filename = `index.${platform
|
|
6279
|
+
const runBundle = async ({ cwd, platform, buildPath, sourcemap, resetCache }) => {
|
|
6280
|
+
const filename = `index.${platform}`;
|
|
6452
6281
|
const bundleOutput = path.default.join(buildPath, `${filename}.bundle`);
|
|
6282
|
+
const entryFile = resolveMain(cwd);
|
|
6283
|
+
const bundleId = (0, uuidv7.uuidv7)();
|
|
6453
6284
|
const args = [
|
|
6454
6285
|
"expo",
|
|
6455
6286
|
"export:embed",
|
|
6456
6287
|
"--platform",
|
|
6457
|
-
platform
|
|
6288
|
+
platform,
|
|
6458
6289
|
"--entry-file",
|
|
6459
|
-
|
|
6290
|
+
entryFile,
|
|
6460
6291
|
"--bundle-output",
|
|
6461
6292
|
bundleOutput,
|
|
6462
6293
|
"--dev",
|
|
@@ -6464,33 +6295,20 @@ const runBundle = async ({ cwd, platform: platform$1, buildPath, sourcemap }) =>
|
|
|
6464
6295
|
"--assets-dest",
|
|
6465
6296
|
buildPath,
|
|
6466
6297
|
...sourcemap ? ["--sourcemap-output", `${bundleOutput}.map`] : [],
|
|
6467
|
-
"--reset-cache"
|
|
6298
|
+
...resetCache ? ["--reset-cache"] : []
|
|
6468
6299
|
];
|
|
6469
|
-
|
|
6300
|
+
_hot_updater_cli_tools.log.normal("\n");
|
|
6470
6301
|
let stdout = null;
|
|
6471
6302
|
try {
|
|
6472
6303
|
stdout = (await execa("npx", args, {
|
|
6473
6304
|
cwd,
|
|
6474
|
-
env: {
|
|
6475
|
-
...process.env,
|
|
6476
|
-
BUILD_OUT_DIR: buildPath
|
|
6477
|
-
},
|
|
6478
6305
|
reject: true
|
|
6479
6306
|
})).stdout;
|
|
6480
6307
|
} catch (error) {
|
|
6481
6308
|
if (error instanceof ExecaError) throw error.stderr;
|
|
6482
6309
|
}
|
|
6483
|
-
|
|
6484
|
-
|
|
6485
|
-
Example:
|
|
6486
|
-
module.exports = {
|
|
6487
|
-
plugins: [
|
|
6488
|
-
["hot-updater/babel-plugin"]
|
|
6489
|
-
]
|
|
6490
|
-
}
|
|
6491
|
-
`);
|
|
6492
|
-
if (isHermesEnabled(cwd, platform$1)) {
|
|
6493
|
-
const { hermesVersion } = await (0, __hot_updater_bare.compileHermes)({
|
|
6310
|
+
if (isHermesEnabled(cwd, platform)) {
|
|
6311
|
+
const { hermesVersion } = await (0, _hot_updater_bare.compileHermes)({
|
|
6494
6312
|
cwd,
|
|
6495
6313
|
inputJsFile: bundleOutput,
|
|
6496
6314
|
sourcemap
|
|
@@ -6509,12 +6327,12 @@ const expo = (config = {
|
|
|
6509
6327
|
outDir: "dist",
|
|
6510
6328
|
sourcemap: false
|
|
6511
6329
|
}) => ({ cwd }) => {
|
|
6512
|
-
const { outDir = "dist", sourcemap = false } = config;
|
|
6330
|
+
const { outDir = "dist", sourcemap = false, resetCache = true } = config;
|
|
6513
6331
|
return {
|
|
6514
|
-
nativeBuild: { prebuild: async ({ platform
|
|
6515
|
-
await runExpoPrebuild({ platform
|
|
6332
|
+
nativeBuild: { prebuild: async ({ platform }) => {
|
|
6333
|
+
await runExpoPrebuild({ platform });
|
|
6516
6334
|
} },
|
|
6517
|
-
build: async ({ platform
|
|
6335
|
+
build: async ({ platform }) => {
|
|
6518
6336
|
const buildPath = path.default.join(cwd, outDir);
|
|
6519
6337
|
await fs.default.promises.rm(buildPath, {
|
|
6520
6338
|
recursive: true,
|
|
@@ -6523,9 +6341,10 @@ const expo = (config = {
|
|
|
6523
6341
|
await fs.default.promises.mkdir(buildPath, { recursive: true });
|
|
6524
6342
|
const { bundleId, stdout } = await runBundle({
|
|
6525
6343
|
cwd,
|
|
6526
|
-
platform
|
|
6344
|
+
platform,
|
|
6527
6345
|
buildPath,
|
|
6528
|
-
sourcemap
|
|
6346
|
+
sourcemap,
|
|
6347
|
+
resetCache
|
|
6529
6348
|
});
|
|
6530
6349
|
return {
|
|
6531
6350
|
buildPath,
|
|
@@ -6536,6 +6355,5 @@ const expo = (config = {
|
|
|
6536
6355
|
name: "expo"
|
|
6537
6356
|
};
|
|
6538
6357
|
};
|
|
6539
|
-
|
|
6540
6358
|
//#endregion
|
|
6541
|
-
exports.expo = expo;
|
|
6359
|
+
exports.expo = expo;
|