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