@hot-updater/bare 0.27.1 → 0.29.0
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 +295 -486
- package/dist/{index.js → index.mjs} +290 -469
- package/package.json +34 -7
- /package/dist/{index.d.ts → index.d.mts} +0 -0
|
@@ -18,20 +18,18 @@ import { finished } from "node:stream/promises";
|
|
|
18
18
|
import { Duplex, PassThrough, Readable, Transform, Writable, getDefaultHighWaterMark } from "node:stream";
|
|
19
19
|
import { Buffer as Buffer$1 } from "node:buffer";
|
|
20
20
|
import fs$1 from "fs/promises";
|
|
21
|
-
|
|
22
|
-
//#region
|
|
21
|
+
import { uuidv7 } from "uuidv7";
|
|
22
|
+
//#region \0rolldown/runtime.js
|
|
23
23
|
var __create = Object.create;
|
|
24
24
|
var __defProp = Object.defineProperty;
|
|
25
25
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
26
26
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
27
27
|
var __getProtoOf = Object.getPrototypeOf;
|
|
28
28
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
29
|
-
var
|
|
30
|
-
return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
|
|
31
|
-
};
|
|
29
|
+
var __commonJSMin = (cb, mod) => () => (mod || cb((mod = { exports: {} }).exports, mod), mod.exports);
|
|
32
30
|
var __copyProps = (to, from, except, desc) => {
|
|
33
|
-
if (from && typeof from === "object" || typeof from === "function") for (var keys = __getOwnPropNames(from), i
|
|
34
|
-
key = keys[i
|
|
31
|
+
if (from && typeof from === "object" || typeof from === "function") for (var keys = __getOwnPropNames(from), i = 0, n = keys.length, key; i < n; i++) {
|
|
32
|
+
key = keys[i];
|
|
35
33
|
if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
|
|
36
34
|
get: ((k) => from[k]).bind(null, key),
|
|
37
35
|
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
@@ -44,7 +42,6 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
44
42
|
enumerable: true
|
|
45
43
|
}) : target, mod));
|
|
46
44
|
var __require = /* @__PURE__ */ createRequire(import.meta.url);
|
|
47
|
-
|
|
48
45
|
//#endregion
|
|
49
46
|
//#region ../../node_modules/.pnpm/is-plain-obj@4.1.0/node_modules/is-plain-obj/index.js
|
|
50
47
|
function isPlainObject(value) {
|
|
@@ -52,7 +49,6 @@ function isPlainObject(value) {
|
|
|
52
49
|
const prototype = Object.getPrototypeOf(value);
|
|
53
50
|
return (prototype === null || prototype === Object.prototype || Object.getPrototypeOf(prototype) === null) && !(Symbol.toStringTag in value) && !(Symbol.iterator in value);
|
|
54
51
|
}
|
|
55
|
-
|
|
56
52
|
//#endregion
|
|
57
53
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/arguments/file-url.js
|
|
58
54
|
const safeNormalizeFileUrl = (file, name) => {
|
|
@@ -63,7 +59,6 @@ const safeNormalizeFileUrl = (file, name) => {
|
|
|
63
59
|
const normalizeDenoExecPath = (file) => isDenoExecPath(file) ? file.toString() : file;
|
|
64
60
|
const isDenoExecPath = (file) => typeof file !== "string" && file && Object.getPrototypeOf(file) === String.prototype;
|
|
65
61
|
const normalizeFileUrl = (file) => file instanceof URL ? fileURLToPath(file) : file;
|
|
66
|
-
|
|
67
62
|
//#endregion
|
|
68
63
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/methods/parameters.js
|
|
69
64
|
const normalizeParameters = (rawFile, rawArguments = [], rawOptions = {}) => {
|
|
@@ -81,7 +76,6 @@ const normalizeParameters = (rawFile, rawArguments = [], rawOptions = {}) => {
|
|
|
81
76
|
options
|
|
82
77
|
];
|
|
83
78
|
};
|
|
84
|
-
|
|
85
79
|
//#endregion
|
|
86
80
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/utils/uint-array.js
|
|
87
81
|
const { toString: objectToString$1 } = Object.prototype;
|
|
@@ -121,7 +115,6 @@ const getJoinLength = (uint8Arrays) => {
|
|
|
121
115
|
for (const uint8Array of uint8Arrays) joinLength += uint8Array.length;
|
|
122
116
|
return joinLength;
|
|
123
117
|
};
|
|
124
|
-
|
|
125
118
|
//#endregion
|
|
126
119
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/methods/template.js
|
|
127
120
|
const isTemplateString = (templates) => Array.isArray(templates) && Array.isArray(templates.raw);
|
|
@@ -148,7 +141,7 @@ const parseTemplate = ({ templates, expressions, tokens, index, template }) => {
|
|
|
148
141
|
const newTokens = concatTokens(tokens, nextTokens, leadingWhitespaces);
|
|
149
142
|
if (index === expressions.length) return newTokens;
|
|
150
143
|
const expression = expressions[index];
|
|
151
|
-
return concatTokens(newTokens, Array.isArray(expression) ? expression.map((expression
|
|
144
|
+
return concatTokens(newTokens, Array.isArray(expression) ? expression.map((expression) => parseExpression(expression)) : [parseExpression(expression)], trailingWhitespaces);
|
|
152
145
|
};
|
|
153
146
|
const splitByWhitespaces = (template, rawTemplate) => {
|
|
154
147
|
if (rawTemplate.length === 0) return {
|
|
@@ -210,7 +203,6 @@ const getSubprocessResult = ({ stdout }) => {
|
|
|
210
203
|
if (stdout === void 0) throw new TypeError("Missing result.stdout in template expression. This is probably due to the previous subprocess' \"stdout\" option.");
|
|
211
204
|
throw new TypeError(`Unexpected "${typeof stdout}" stdout in template expression`);
|
|
212
205
|
};
|
|
213
|
-
|
|
214
206
|
//#endregion
|
|
215
207
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/utils/standard-stream.js
|
|
216
208
|
const isStandardStream = (stream) => STANDARD_STREAMS.includes(stream);
|
|
@@ -225,7 +217,6 @@ const STANDARD_STREAMS_ALIASES = [
|
|
|
225
217
|
"stderr"
|
|
226
218
|
];
|
|
227
219
|
const getStreamName = (fdNumber) => STANDARD_STREAMS_ALIASES[fdNumber] ?? `stdio[${fdNumber}]`;
|
|
228
|
-
|
|
229
220
|
//#endregion
|
|
230
221
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/arguments/specific.js
|
|
231
222
|
const normalizeFdSpecificOptions = (options) => {
|
|
@@ -280,7 +271,6 @@ const FD_SPECIFIC_OPTIONS = [
|
|
|
280
271
|
"stripFinalNewline"
|
|
281
272
|
];
|
|
282
273
|
const getFdSpecificValue = (optionArray, fdNumber) => fdNumber === "ipc" ? optionArray.at(-1) : optionArray[fdNumber];
|
|
283
|
-
|
|
284
274
|
//#endregion
|
|
285
275
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/verbose/values.js
|
|
286
276
|
const isVerbose = ({ verbose }, fdNumber) => getFdVerbose(verbose, fdNumber) !== "none";
|
|
@@ -297,7 +287,6 @@ const VERBOSE_VALUES = [
|
|
|
297
287
|
"short",
|
|
298
288
|
"full"
|
|
299
289
|
];
|
|
300
|
-
|
|
301
290
|
//#endregion
|
|
302
291
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/arguments/escape.js
|
|
303
292
|
const joinCommand = (filePath, rawArguments) => {
|
|
@@ -318,7 +307,7 @@ const escapeControlCharacter = (character) => {
|
|
|
318
307
|
};
|
|
319
308
|
const getSpecialCharRegExp = () => {
|
|
320
309
|
try {
|
|
321
|
-
return new RegExp("\\p{Separator}|\\p{Other}", "gu");
|
|
310
|
+
return /* @__PURE__ */ new RegExp("\\p{Separator}|\\p{Other}", "gu");
|
|
322
311
|
} catch {
|
|
323
312
|
return /[\s\u0000-\u001F\u007F-\u009F\u00AD]/g;
|
|
324
313
|
}
|
|
@@ -338,7 +327,6 @@ const quoteString = (escapedArgument) => {
|
|
|
338
327
|
return platform === "win32" ? `"${escapedArgument.replaceAll("\"", "\"\"")}"` : `'${escapedArgument.replaceAll("'", "'\\''")}'`;
|
|
339
328
|
};
|
|
340
329
|
const NO_ESCAPE_REGEXP = /^[\w./-]+$/;
|
|
341
|
-
|
|
342
330
|
//#endregion
|
|
343
331
|
//#region ../../node_modules/.pnpm/is-unicode-supported@2.1.0/node_modules/is-unicode-supported/index.js
|
|
344
332
|
function isUnicodeSupported() {
|
|
@@ -347,7 +335,6 @@ function isUnicodeSupported() {
|
|
|
347
335
|
if (process$1.platform !== "win32") return TERM !== "linux";
|
|
348
336
|
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";
|
|
349
337
|
}
|
|
350
|
-
|
|
351
338
|
//#endregion
|
|
352
339
|
//#region ../../node_modules/.pnpm/figures@6.1.0/node_modules/figures/index.js
|
|
353
340
|
const common = {
|
|
@@ -626,11 +613,8 @@ const fallbackSymbols = {
|
|
|
626
613
|
...common,
|
|
627
614
|
...specialFallbackSymbols
|
|
628
615
|
};
|
|
629
|
-
const
|
|
630
|
-
|
|
631
|
-
var figures_default = figures;
|
|
632
|
-
const replacements = Object.entries(specialMainSymbols);
|
|
633
|
-
|
|
616
|
+
const figures = isUnicodeSupported() ? mainSymbols : fallbackSymbols;
|
|
617
|
+
Object.entries(specialMainSymbols);
|
|
634
618
|
//#endregion
|
|
635
619
|
//#region ../../node_modules/.pnpm/yoctocolors@2.1.1/node_modules/yoctocolors/base.js
|
|
636
620
|
const hasColors = tty?.WriteStream?.prototype?.hasColors?.() ?? false;
|
|
@@ -653,48 +637,47 @@ const format = (open, close) => {
|
|
|
653
637
|
return result;
|
|
654
638
|
};
|
|
655
639
|
};
|
|
656
|
-
|
|
640
|
+
format(0, 0);
|
|
657
641
|
const bold = format(1, 22);
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
642
|
+
format(2, 22);
|
|
643
|
+
format(3, 23);
|
|
644
|
+
format(4, 24);
|
|
645
|
+
format(53, 55);
|
|
646
|
+
format(7, 27);
|
|
647
|
+
format(8, 28);
|
|
648
|
+
format(9, 29);
|
|
649
|
+
format(30, 39);
|
|
650
|
+
format(31, 39);
|
|
651
|
+
format(32, 39);
|
|
652
|
+
format(33, 39);
|
|
653
|
+
format(34, 39);
|
|
654
|
+
format(35, 39);
|
|
655
|
+
format(36, 39);
|
|
656
|
+
format(37, 39);
|
|
673
657
|
const gray = format(90, 39);
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
658
|
+
format(40, 49);
|
|
659
|
+
format(41, 49);
|
|
660
|
+
format(42, 49);
|
|
661
|
+
format(43, 49);
|
|
662
|
+
format(44, 49);
|
|
663
|
+
format(45, 49);
|
|
664
|
+
format(46, 49);
|
|
665
|
+
format(47, 49);
|
|
666
|
+
format(100, 49);
|
|
683
667
|
const redBright = format(91, 39);
|
|
684
|
-
|
|
668
|
+
format(92, 39);
|
|
685
669
|
const yellowBright = format(93, 39);
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
670
|
+
format(94, 39);
|
|
671
|
+
format(95, 39);
|
|
672
|
+
format(96, 39);
|
|
673
|
+
format(97, 39);
|
|
674
|
+
format(101, 49);
|
|
675
|
+
format(102, 49);
|
|
676
|
+
format(103, 49);
|
|
677
|
+
format(104, 49);
|
|
678
|
+
format(105, 49);
|
|
679
|
+
format(106, 49);
|
|
680
|
+
format(107, 49);
|
|
698
681
|
//#endregion
|
|
699
682
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/verbose/default.js
|
|
700
683
|
const defaultVerboseFunction = ({ type, message, timestamp, piped, commandId, result: { failed = false } = {}, options: { reject = true } }) => {
|
|
@@ -710,8 +693,8 @@ const defaultVerboseFunction = ({ type, message, timestamp, piped, commandId, re
|
|
|
710
693
|
const serializeTimestamp = (timestamp) => `${padField(timestamp.getHours(), 2)}:${padField(timestamp.getMinutes(), 2)}:${padField(timestamp.getSeconds(), 2)}.${padField(timestamp.getMilliseconds(), 3)}`;
|
|
711
694
|
const padField = (field, padding) => String(field).padStart(padding, "0");
|
|
712
695
|
const getFinalIcon = ({ failed, reject }) => {
|
|
713
|
-
if (!failed) return
|
|
714
|
-
return reject ?
|
|
696
|
+
if (!failed) return figures.tick;
|
|
697
|
+
return reject ? figures.cross : figures.warning;
|
|
715
698
|
};
|
|
716
699
|
const ICONS = {
|
|
717
700
|
command: ({ piped }) => piped ? "|" : "$",
|
|
@@ -728,7 +711,6 @@ const COLORS = {
|
|
|
728
711
|
error: ({ reject }) => reject ? redBright : yellowBright,
|
|
729
712
|
duration: () => gray
|
|
730
713
|
};
|
|
731
|
-
|
|
732
714
|
//#endregion
|
|
733
715
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/verbose/custom.js
|
|
734
716
|
const applyVerboseOnLines = (printedLines, verboseInfo, fdNumber) => {
|
|
@@ -741,7 +723,6 @@ const applyVerboseFunction = (verboseLine, verboseObject, verboseFunction) => {
|
|
|
741
723
|
if (typeof printedLine === "string") return printedLine;
|
|
742
724
|
};
|
|
743
725
|
const appendNewline = (printedLine) => printedLine.endsWith("\n") ? printedLine : `${printedLine}\n`;
|
|
744
|
-
|
|
745
726
|
//#endregion
|
|
746
727
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/verbose/log.js
|
|
747
728
|
const verboseLog = ({ type, verboseMessage, fdNumber, verboseInfo, result }) => {
|
|
@@ -752,7 +733,7 @@ const verboseLog = ({ type, verboseMessage, fdNumber, verboseInfo, result }) =>
|
|
|
752
733
|
})), verboseInfo, fdNumber);
|
|
753
734
|
if (finalLines !== "") console.warn(finalLines.slice(0, -1));
|
|
754
735
|
};
|
|
755
|
-
const getVerboseObject = ({ type, result, verboseInfo: { escapedCommand, commandId, rawOptions: { piped = false
|
|
736
|
+
const getVerboseObject = ({ type, result, verboseInfo: { escapedCommand, commandId, rawOptions: { piped = false, ...options } } }) => ({
|
|
756
737
|
type,
|
|
757
738
|
escapedCommand,
|
|
758
739
|
commandId: `${commandId}`,
|
|
@@ -775,7 +756,6 @@ const serializeVerboseMessage = (message) => {
|
|
|
775
756
|
return escapeLines(typeof message === "string" ? message : inspect(message)).replaceAll(" ", " ".repeat(TAB_SIZE));
|
|
776
757
|
};
|
|
777
758
|
const TAB_SIZE = 2;
|
|
778
|
-
|
|
779
759
|
//#endregion
|
|
780
760
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/verbose/start.js
|
|
781
761
|
const logCommand = (escapedCommand, verboseInfo) => {
|
|
@@ -786,7 +766,6 @@ const logCommand = (escapedCommand, verboseInfo) => {
|
|
|
786
766
|
verboseInfo
|
|
787
767
|
});
|
|
788
768
|
};
|
|
789
|
-
|
|
790
769
|
//#endregion
|
|
791
770
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/verbose/info.js
|
|
792
771
|
const getVerboseInfo = (verbose, escapedCommand, rawOptions) => {
|
|
@@ -810,12 +789,10 @@ const validateVerbose = (verbose) => {
|
|
|
810
789
|
}
|
|
811
790
|
}
|
|
812
791
|
};
|
|
813
|
-
|
|
814
792
|
//#endregion
|
|
815
793
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/return/duration.js
|
|
816
794
|
const getStartTime = () => hrtime.bigint();
|
|
817
795
|
const getDurationMs = (startTime) => Number(hrtime.bigint() - startTime) / 1e6;
|
|
818
|
-
|
|
819
796
|
//#endregion
|
|
820
797
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/arguments/command.js
|
|
821
798
|
const handleCommand = (filePath, rawArguments, rawOptions) => {
|
|
@@ -830,51 +807,49 @@ const handleCommand = (filePath, rawArguments, rawOptions) => {
|
|
|
830
807
|
verboseInfo
|
|
831
808
|
};
|
|
832
809
|
};
|
|
833
|
-
|
|
834
810
|
//#endregion
|
|
835
811
|
//#region ../../node_modules/.pnpm/isexe@2.0.0/node_modules/isexe/windows.js
|
|
836
|
-
var require_windows = /* @__PURE__ */
|
|
837
|
-
module.exports = isexe
|
|
838
|
-
isexe
|
|
812
|
+
var require_windows = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
813
|
+
module.exports = isexe;
|
|
814
|
+
isexe.sync = sync;
|
|
839
815
|
var fs$4 = __require("fs");
|
|
840
|
-
function checkPathExt(path
|
|
816
|
+
function checkPathExt(path, options) {
|
|
841
817
|
var pathext = options.pathExt !== void 0 ? options.pathExt : process.env.PATHEXT;
|
|
842
818
|
if (!pathext) return true;
|
|
843
819
|
pathext = pathext.split(";");
|
|
844
820
|
if (pathext.indexOf("") !== -1) return true;
|
|
845
|
-
for (var i
|
|
846
|
-
var p = pathext[i
|
|
847
|
-
if (p && path
|
|
821
|
+
for (var i = 0; i < pathext.length; i++) {
|
|
822
|
+
var p = pathext[i].toLowerCase();
|
|
823
|
+
if (p && path.substr(-p.length).toLowerCase() === p) return true;
|
|
848
824
|
}
|
|
849
825
|
return false;
|
|
850
826
|
}
|
|
851
|
-
function checkStat
|
|
827
|
+
function checkStat(stat, path, options) {
|
|
852
828
|
if (!stat.isSymbolicLink() && !stat.isFile()) return false;
|
|
853
|
-
return checkPathExt(path
|
|
829
|
+
return checkPathExt(path, options);
|
|
854
830
|
}
|
|
855
|
-
function isexe
|
|
856
|
-
fs$4.stat(path
|
|
857
|
-
cb(er, er ? false : checkStat
|
|
831
|
+
function isexe(path, options, cb) {
|
|
832
|
+
fs$4.stat(path, function(er, stat) {
|
|
833
|
+
cb(er, er ? false : checkStat(stat, path, options));
|
|
858
834
|
});
|
|
859
835
|
}
|
|
860
|
-
function sync
|
|
861
|
-
return checkStat
|
|
836
|
+
function sync(path, options) {
|
|
837
|
+
return checkStat(fs$4.statSync(path), path, options);
|
|
862
838
|
}
|
|
863
|
-
})
|
|
864
|
-
|
|
839
|
+
}));
|
|
865
840
|
//#endregion
|
|
866
841
|
//#region ../../node_modules/.pnpm/isexe@2.0.0/node_modules/isexe/mode.js
|
|
867
|
-
var require_mode = /* @__PURE__ */
|
|
868
|
-
module.exports = isexe
|
|
869
|
-
isexe
|
|
842
|
+
var require_mode = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
843
|
+
module.exports = isexe;
|
|
844
|
+
isexe.sync = sync;
|
|
870
845
|
var fs$3 = __require("fs");
|
|
871
|
-
function isexe
|
|
872
|
-
fs$3.stat(path
|
|
846
|
+
function isexe(path, options, cb) {
|
|
847
|
+
fs$3.stat(path, function(er, stat) {
|
|
873
848
|
cb(er, er ? false : checkStat(stat, options));
|
|
874
849
|
});
|
|
875
850
|
}
|
|
876
|
-
function sync
|
|
877
|
-
return checkStat(fs$3.statSync(path
|
|
851
|
+
function sync(path, options) {
|
|
852
|
+
return checkStat(fs$3.statSync(path), options);
|
|
878
853
|
}
|
|
879
854
|
function checkStat(stat, options) {
|
|
880
855
|
return stat.isFile() && checkMode(stat, options);
|
|
@@ -885,24 +860,23 @@ var require_mode = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/isexe@
|
|
|
885
860
|
var gid = stat.gid;
|
|
886
861
|
var myUid = options.uid !== void 0 ? options.uid : process.getuid && process.getuid();
|
|
887
862
|
var myGid = options.gid !== void 0 ? options.gid : process.getgid && process.getgid();
|
|
888
|
-
var u
|
|
863
|
+
var u = parseInt("100", 8);
|
|
889
864
|
var g = parseInt("010", 8);
|
|
890
|
-
var o
|
|
891
|
-
var ug = u
|
|
892
|
-
return mod & o
|
|
865
|
+
var o = parseInt("001", 8);
|
|
866
|
+
var ug = u | g;
|
|
867
|
+
return mod & o || mod & g && gid === myGid || mod & u && uid === myUid || mod & ug && myUid === 0;
|
|
893
868
|
}
|
|
894
|
-
})
|
|
895
|
-
|
|
869
|
+
}));
|
|
896
870
|
//#endregion
|
|
897
871
|
//#region ../../node_modules/.pnpm/isexe@2.0.0/node_modules/isexe/index.js
|
|
898
|
-
var require_isexe = /* @__PURE__ */
|
|
872
|
+
var require_isexe = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
899
873
|
__require("fs");
|
|
900
874
|
var core;
|
|
901
875
|
if (process.platform === "win32" || global.TESTING_WINDOWS) core = require_windows();
|
|
902
876
|
else core = require_mode();
|
|
903
|
-
module.exports = isexe
|
|
904
|
-
isexe
|
|
905
|
-
function isexe
|
|
877
|
+
module.exports = isexe;
|
|
878
|
+
isexe.sync = sync;
|
|
879
|
+
function isexe(path, options, cb) {
|
|
906
880
|
if (typeof options === "function") {
|
|
907
881
|
cb = options;
|
|
908
882
|
options = {};
|
|
@@ -910,13 +884,13 @@ var require_isexe = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/isexe
|
|
|
910
884
|
if (!cb) {
|
|
911
885
|
if (typeof Promise !== "function") throw new TypeError("callback not provided");
|
|
912
886
|
return new Promise(function(resolve, reject) {
|
|
913
|
-
isexe
|
|
887
|
+
isexe(path, options || {}, function(er, is) {
|
|
914
888
|
if (er) reject(er);
|
|
915
889
|
else resolve(is);
|
|
916
890
|
});
|
|
917
891
|
});
|
|
918
892
|
}
|
|
919
|
-
core(path
|
|
893
|
+
core(path, options || {}, function(er, is) {
|
|
920
894
|
if (er) {
|
|
921
895
|
if (er.code === "EACCES" || options && options.ignoreErrors) {
|
|
922
896
|
er = null;
|
|
@@ -926,19 +900,18 @@ var require_isexe = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/isexe
|
|
|
926
900
|
cb(er, is);
|
|
927
901
|
});
|
|
928
902
|
}
|
|
929
|
-
function sync(path
|
|
903
|
+
function sync(path, options) {
|
|
930
904
|
try {
|
|
931
|
-
return core.sync(path
|
|
905
|
+
return core.sync(path, options || {});
|
|
932
906
|
} catch (er) {
|
|
933
907
|
if (options && options.ignoreErrors || er.code === "EACCES") return false;
|
|
934
908
|
else throw er;
|
|
935
909
|
}
|
|
936
910
|
}
|
|
937
|
-
})
|
|
938
|
-
|
|
911
|
+
}));
|
|
939
912
|
//#endregion
|
|
940
913
|
//#region ../../node_modules/.pnpm/which@2.0.2/node_modules/which/which.js
|
|
941
|
-
var require_which = /* @__PURE__ */
|
|
914
|
+
var require_which = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
942
915
|
const isWindows = process.platform === "win32" || process.env.OSTYPE === "cygwin" || process.env.OSTYPE === "msys";
|
|
943
916
|
const path$4 = __require("path");
|
|
944
917
|
const COLON = isWindows ? ";" : ":";
|
|
@@ -958,7 +931,7 @@ var require_which = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/which
|
|
|
958
931
|
pathExtExe
|
|
959
932
|
};
|
|
960
933
|
};
|
|
961
|
-
const which
|
|
934
|
+
const which = (cmd, opt, cb) => {
|
|
962
935
|
if (typeof opt === "function") {
|
|
963
936
|
cb = opt;
|
|
964
937
|
opt = {};
|
|
@@ -966,20 +939,20 @@ var require_which = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/which
|
|
|
966
939
|
if (!opt) opt = {};
|
|
967
940
|
const { pathEnv, pathExt, pathExtExe } = getPathInfo(cmd, opt);
|
|
968
941
|
const found = [];
|
|
969
|
-
const step = (i
|
|
970
|
-
if (i
|
|
971
|
-
const ppRaw = pathEnv[i
|
|
942
|
+
const step = (i) => new Promise((resolve, reject) => {
|
|
943
|
+
if (i === pathEnv.length) return opt.all && found.length ? resolve(found) : reject(getNotFoundError(cmd));
|
|
944
|
+
const ppRaw = pathEnv[i];
|
|
972
945
|
const pathPart = /^".*"$/.test(ppRaw) ? ppRaw.slice(1, -1) : ppRaw;
|
|
973
946
|
const pCmd = path$4.join(pathPart, cmd);
|
|
974
|
-
resolve(subStep(!pathPart && /^\.[\\\/]/.test(cmd) ? cmd.slice(0, 2) + pCmd : pCmd, i
|
|
947
|
+
resolve(subStep(!pathPart && /^\.[\\\/]/.test(cmd) ? cmd.slice(0, 2) + pCmd : pCmd, i, 0));
|
|
975
948
|
});
|
|
976
|
-
const subStep = (p, i
|
|
977
|
-
if (ii === pathExt.length) return resolve(step(i
|
|
949
|
+
const subStep = (p, i, ii) => new Promise((resolve, reject) => {
|
|
950
|
+
if (ii === pathExt.length) return resolve(step(i + 1));
|
|
978
951
|
const ext = pathExt[ii];
|
|
979
952
|
isexe(p + ext, { pathExt: pathExtExe }, (er, is) => {
|
|
980
953
|
if (!er && is) if (opt.all) found.push(p + ext);
|
|
981
954
|
else return resolve(p + ext);
|
|
982
|
-
return resolve(subStep(p, i
|
|
955
|
+
return resolve(subStep(p, i, ii + 1));
|
|
983
956
|
});
|
|
984
957
|
});
|
|
985
958
|
return cb ? step(0).then((res) => cb(null, res), cb) : step(0);
|
|
@@ -988,8 +961,8 @@ var require_which = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/which
|
|
|
988
961
|
opt = opt || {};
|
|
989
962
|
const { pathEnv, pathExt, pathExtExe } = getPathInfo(cmd, opt);
|
|
990
963
|
const found = [];
|
|
991
|
-
for (let i
|
|
992
|
-
const ppRaw = pathEnv[i
|
|
964
|
+
for (let i = 0; i < pathEnv.length; i++) {
|
|
965
|
+
const ppRaw = pathEnv[i];
|
|
993
966
|
const pathPart = /^".*"$/.test(ppRaw) ? ppRaw.slice(1, -1) : ppRaw;
|
|
994
967
|
const pCmd = path$4.join(pathPart, cmd);
|
|
995
968
|
const p = !pathPart && /^\.[\\\/]/.test(cmd) ? cmd.slice(0, 2) + pCmd : pCmd;
|
|
@@ -1005,25 +978,23 @@ var require_which = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/which
|
|
|
1005
978
|
if (opt.nothrow) return null;
|
|
1006
979
|
throw getNotFoundError(cmd);
|
|
1007
980
|
};
|
|
1008
|
-
module.exports = which
|
|
1009
|
-
which
|
|
1010
|
-
})
|
|
1011
|
-
|
|
981
|
+
module.exports = which;
|
|
982
|
+
which.sync = whichSync;
|
|
983
|
+
}));
|
|
1012
984
|
//#endregion
|
|
1013
985
|
//#region ../../node_modules/.pnpm/path-key@3.1.1/node_modules/path-key/index.js
|
|
1014
|
-
var require_path_key = /* @__PURE__ */
|
|
1015
|
-
const pathKey
|
|
986
|
+
var require_path_key = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
987
|
+
const pathKey = (options = {}) => {
|
|
1016
988
|
const environment = options.env || process.env;
|
|
1017
989
|
if ((options.platform || process.platform) !== "win32") return "PATH";
|
|
1018
990
|
return Object.keys(environment).reverse().find((key) => key.toUpperCase() === "PATH") || "Path";
|
|
1019
991
|
};
|
|
1020
|
-
module.exports = pathKey
|
|
1021
|
-
module.exports.default = pathKey
|
|
1022
|
-
})
|
|
1023
|
-
|
|
992
|
+
module.exports = pathKey;
|
|
993
|
+
module.exports.default = pathKey;
|
|
994
|
+
}));
|
|
1024
995
|
//#endregion
|
|
1025
996
|
//#region ../../node_modules/.pnpm/cross-spawn@7.0.6/node_modules/cross-spawn/lib/util/resolveCommand.js
|
|
1026
|
-
var require_resolveCommand = /* @__PURE__ */
|
|
997
|
+
var require_resolveCommand = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
1027
998
|
const path$3 = __require("path");
|
|
1028
999
|
const which = require_which();
|
|
1029
1000
|
const getPathKey = require_path_key();
|
|
@@ -1047,15 +1018,14 @@ var require_resolveCommand = /* @__PURE__ */ __commonJS({ "../../node_modules/.p
|
|
|
1047
1018
|
if (resolved) resolved = path$3.resolve(hasCustomCwd ? parsed.options.cwd : "", resolved);
|
|
1048
1019
|
return resolved;
|
|
1049
1020
|
}
|
|
1050
|
-
function resolveCommand
|
|
1021
|
+
function resolveCommand(parsed) {
|
|
1051
1022
|
return resolveCommandAttempt(parsed) || resolveCommandAttempt(parsed, true);
|
|
1052
1023
|
}
|
|
1053
|
-
module.exports = resolveCommand
|
|
1054
|
-
})
|
|
1055
|
-
|
|
1024
|
+
module.exports = resolveCommand;
|
|
1025
|
+
}));
|
|
1056
1026
|
//#endregion
|
|
1057
1027
|
//#region ../../node_modules/.pnpm/cross-spawn@7.0.6/node_modules/cross-spawn/lib/util/escape.js
|
|
1058
|
-
var require_escape = /* @__PURE__ */
|
|
1028
|
+
var require_escape = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
1059
1029
|
const metaCharsRegExp = /([()\][%!^"`<>&|;, *?])/g;
|
|
1060
1030
|
function escapeCommand(arg) {
|
|
1061
1031
|
arg = arg.replace(metaCharsRegExp, "^$1");
|
|
@@ -1072,34 +1042,31 @@ var require_escape = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/cros
|
|
|
1072
1042
|
}
|
|
1073
1043
|
module.exports.command = escapeCommand;
|
|
1074
1044
|
module.exports.argument = escapeArgument;
|
|
1075
|
-
})
|
|
1076
|
-
|
|
1045
|
+
}));
|
|
1077
1046
|
//#endregion
|
|
1078
1047
|
//#region ../../node_modules/.pnpm/shebang-regex@3.0.0/node_modules/shebang-regex/index.js
|
|
1079
|
-
var require_shebang_regex = /* @__PURE__ */
|
|
1048
|
+
var require_shebang_regex = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
1080
1049
|
module.exports = /^#!(.*)/;
|
|
1081
|
-
})
|
|
1082
|
-
|
|
1050
|
+
}));
|
|
1083
1051
|
//#endregion
|
|
1084
1052
|
//#region ../../node_modules/.pnpm/shebang-command@2.0.0/node_modules/shebang-command/index.js
|
|
1085
|
-
var require_shebang_command = /* @__PURE__ */
|
|
1053
|
+
var require_shebang_command = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
1086
1054
|
const shebangRegex = require_shebang_regex();
|
|
1087
1055
|
module.exports = (string = "") => {
|
|
1088
1056
|
const match = string.match(shebangRegex);
|
|
1089
1057
|
if (!match) return null;
|
|
1090
|
-
const [path
|
|
1091
|
-
const binary = path
|
|
1058
|
+
const [path, argument] = match[0].replace(/#! ?/, "").split(" ");
|
|
1059
|
+
const binary = path.split("/").pop();
|
|
1092
1060
|
if (binary === "env") return argument;
|
|
1093
1061
|
return argument ? `${binary} ${argument}` : binary;
|
|
1094
1062
|
};
|
|
1095
|
-
})
|
|
1096
|
-
|
|
1063
|
+
}));
|
|
1097
1064
|
//#endregion
|
|
1098
1065
|
//#region ../../node_modules/.pnpm/cross-spawn@7.0.6/node_modules/cross-spawn/lib/util/readShebang.js
|
|
1099
|
-
var require_readShebang = /* @__PURE__ */
|
|
1066
|
+
var require_readShebang = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
1100
1067
|
const fs$2 = __require("fs");
|
|
1101
1068
|
const shebangCommand = require_shebang_command();
|
|
1102
|
-
function readShebang
|
|
1069
|
+
function readShebang(command) {
|
|
1103
1070
|
const size = 150;
|
|
1104
1071
|
const buffer = Buffer.alloc(size);
|
|
1105
1072
|
let fd;
|
|
@@ -1110,17 +1077,16 @@ var require_readShebang = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm
|
|
|
1110
1077
|
} catch (e) {}
|
|
1111
1078
|
return shebangCommand(buffer.toString());
|
|
1112
1079
|
}
|
|
1113
|
-
module.exports = readShebang
|
|
1114
|
-
})
|
|
1115
|
-
|
|
1080
|
+
module.exports = readShebang;
|
|
1081
|
+
}));
|
|
1116
1082
|
//#endregion
|
|
1117
1083
|
//#region ../../node_modules/.pnpm/cross-spawn@7.0.6/node_modules/cross-spawn/lib/parse.js
|
|
1118
|
-
var require_parse = /* @__PURE__ */
|
|
1084
|
+
var require_parse = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
1119
1085
|
const path$2 = __require("path");
|
|
1120
1086
|
const resolveCommand = require_resolveCommand();
|
|
1121
1087
|
const escape = require_escape();
|
|
1122
1088
|
const readShebang = require_readShebang();
|
|
1123
|
-
const isWin
|
|
1089
|
+
const isWin = process.platform === "win32";
|
|
1124
1090
|
const isExecutableRegExp = /\.(?:com|exe)$/i;
|
|
1125
1091
|
const isCmdShimRegExp = /node_modules[\\/].bin[\\/][^\\/]+\.cmd$/i;
|
|
1126
1092
|
function detectShebang(parsed) {
|
|
@@ -1134,7 +1100,7 @@ var require_parse = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/cross
|
|
|
1134
1100
|
return parsed.file;
|
|
1135
1101
|
}
|
|
1136
1102
|
function parseNonShell(parsed) {
|
|
1137
|
-
if (!isWin
|
|
1103
|
+
if (!isWin) return parsed;
|
|
1138
1104
|
const commandFile = detectShebang(parsed);
|
|
1139
1105
|
const needsShell = !isExecutableRegExp.test(commandFile);
|
|
1140
1106
|
if (parsed.options.forceShell || needsShell) {
|
|
@@ -1153,7 +1119,7 @@ var require_parse = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/cross
|
|
|
1153
1119
|
}
|
|
1154
1120
|
return parsed;
|
|
1155
1121
|
}
|
|
1156
|
-
function parse
|
|
1122
|
+
function parse(command, args, options) {
|
|
1157
1123
|
if (args && !Array.isArray(args)) {
|
|
1158
1124
|
options = args;
|
|
1159
1125
|
args = null;
|
|
@@ -1172,12 +1138,11 @@ var require_parse = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/cross
|
|
|
1172
1138
|
};
|
|
1173
1139
|
return options.shell ? parsed : parseNonShell(parsed);
|
|
1174
1140
|
}
|
|
1175
|
-
module.exports = parse
|
|
1176
|
-
})
|
|
1177
|
-
|
|
1141
|
+
module.exports = parse;
|
|
1142
|
+
}));
|
|
1178
1143
|
//#endregion
|
|
1179
1144
|
//#region ../../node_modules/.pnpm/cross-spawn@7.0.6/node_modules/cross-spawn/lib/enoent.js
|
|
1180
|
-
var require_enoent = /* @__PURE__ */
|
|
1145
|
+
var require_enoent = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
1181
1146
|
const isWin = process.platform === "win32";
|
|
1182
1147
|
function notFoundError(original, syscall) {
|
|
1183
1148
|
return Object.assign(/* @__PURE__ */ new Error(`${syscall} ${original.command} ENOENT`), {
|
|
@@ -1188,15 +1153,15 @@ var require_enoent = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/cros
|
|
|
1188
1153
|
spawnargs: original.args
|
|
1189
1154
|
});
|
|
1190
1155
|
}
|
|
1191
|
-
function hookChildProcess(cp
|
|
1156
|
+
function hookChildProcess(cp, parsed) {
|
|
1192
1157
|
if (!isWin) return;
|
|
1193
|
-
const originalEmit = cp
|
|
1194
|
-
cp
|
|
1158
|
+
const originalEmit = cp.emit;
|
|
1159
|
+
cp.emit = function(name, arg1) {
|
|
1195
1160
|
if (name === "exit") {
|
|
1196
1161
|
const err = verifyENOENT(arg1, parsed);
|
|
1197
|
-
if (err) return originalEmit.call(cp
|
|
1162
|
+
if (err) return originalEmit.call(cp, "error", err);
|
|
1198
1163
|
}
|
|
1199
|
-
return originalEmit.apply(cp
|
|
1164
|
+
return originalEmit.apply(cp, arguments);
|
|
1200
1165
|
};
|
|
1201
1166
|
}
|
|
1202
1167
|
function verifyENOENT(status, parsed) {
|
|
@@ -1213,45 +1178,37 @@ var require_enoent = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/cros
|
|
|
1213
1178
|
verifyENOENTSync,
|
|
1214
1179
|
notFoundError
|
|
1215
1180
|
};
|
|
1216
|
-
})
|
|
1217
|
-
|
|
1181
|
+
}));
|
|
1218
1182
|
//#endregion
|
|
1219
|
-
//#region ../../node_modules/.pnpm/
|
|
1220
|
-
var
|
|
1183
|
+
//#region ../../node_modules/.pnpm/path-key@4.0.0/node_modules/path-key/index.js
|
|
1184
|
+
var import_cross_spawn = /* @__PURE__ */ __toESM((/* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
1221
1185
|
const cp = __require("child_process");
|
|
1222
1186
|
const parse = require_parse();
|
|
1223
1187
|
const enoent = require_enoent();
|
|
1224
|
-
function spawn
|
|
1188
|
+
function spawn(command, args, options) {
|
|
1225
1189
|
const parsed = parse(command, args, options);
|
|
1226
1190
|
const spawned = cp.spawn(parsed.command, parsed.args, parsed.options);
|
|
1227
1191
|
enoent.hookChildProcess(spawned, parsed);
|
|
1228
1192
|
return spawned;
|
|
1229
1193
|
}
|
|
1230
|
-
function spawnSync
|
|
1194
|
+
function spawnSync(command, args, options) {
|
|
1231
1195
|
const parsed = parse(command, args, options);
|
|
1232
1196
|
const result = cp.spawnSync(parsed.command, parsed.args, parsed.options);
|
|
1233
1197
|
result.error = result.error || enoent.verifyENOENTSync(result.status, parsed);
|
|
1234
1198
|
return result;
|
|
1235
1199
|
}
|
|
1236
|
-
module.exports = spawn
|
|
1237
|
-
module.exports.spawn = spawn
|
|
1238
|
-
module.exports.sync = spawnSync
|
|
1200
|
+
module.exports = spawn;
|
|
1201
|
+
module.exports.spawn = spawn;
|
|
1202
|
+
module.exports.sync = spawnSync;
|
|
1239
1203
|
module.exports._parse = parse;
|
|
1240
1204
|
module.exports._enoent = enoent;
|
|
1241
|
-
})
|
|
1242
|
-
|
|
1243
|
-
//#endregion
|
|
1244
|
-
//#region ../../node_modules/.pnpm/path-key@4.0.0/node_modules/path-key/index.js
|
|
1245
|
-
var import_cross_spawn = /* @__PURE__ */ __toESM(require_cross_spawn(), 1);
|
|
1205
|
+
})))(), 1);
|
|
1246
1206
|
function pathKey(options = {}) {
|
|
1247
|
-
const { env = process.env, platform
|
|
1248
|
-
if (platform
|
|
1207
|
+
const { env = process.env, platform = process.platform } = options;
|
|
1208
|
+
if (platform !== "win32") return "PATH";
|
|
1249
1209
|
return Object.keys(env).reverse().find((key) => key.toUpperCase() === "PATH") || "Path";
|
|
1250
1210
|
}
|
|
1251
|
-
|
|
1252
|
-
//#endregion
|
|
1253
|
-
//#region ../../node_modules/.pnpm/unicorn-magic@0.3.0/node_modules/unicorn-magic/node.js
|
|
1254
|
-
const execFileOriginal = promisify(execFile);
|
|
1211
|
+
promisify(execFile);
|
|
1255
1212
|
function toPath(urlOrPath) {
|
|
1256
1213
|
return urlOrPath instanceof URL ? fileURLToPath(urlOrPath) : urlOrPath;
|
|
1257
1214
|
}
|
|
@@ -1266,16 +1223,14 @@ function traversePathUp(startPath) {
|
|
|
1266
1223
|
}
|
|
1267
1224
|
} };
|
|
1268
1225
|
}
|
|
1269
|
-
const TEN_MEGABYTES_IN_BYTES = 10 * 1024 * 1024;
|
|
1270
|
-
|
|
1271
1226
|
//#endregion
|
|
1272
1227
|
//#region ../../node_modules/.pnpm/npm-run-path@6.0.0/node_modules/npm-run-path/index.js
|
|
1273
|
-
const npmRunPath = ({ cwd = process$1.cwd(), path: pathOption = process$1.env[pathKey()], preferLocal = true, execPath
|
|
1228
|
+
const npmRunPath = ({ cwd = process$1.cwd(), path: pathOption = process$1.env[pathKey()], preferLocal = true, execPath = process$1.execPath, addExecPath = true } = {}) => {
|
|
1274
1229
|
const cwdPath = path.resolve(toPath(cwd));
|
|
1275
1230
|
const result = [];
|
|
1276
1231
|
const pathParts = pathOption.split(path.delimiter);
|
|
1277
1232
|
if (preferLocal) applyPreferLocal(result, pathParts, cwdPath);
|
|
1278
|
-
if (addExecPath) applyExecPath(result, pathParts, execPath
|
|
1233
|
+
if (addExecPath) applyExecPath(result, pathParts, execPath, cwdPath);
|
|
1279
1234
|
return pathOption === "" || pathOption === path.delimiter ? `${result.join(path.delimiter)}${pathOption}` : [...result, pathOption].join(path.delimiter);
|
|
1280
1235
|
};
|
|
1281
1236
|
const applyPreferLocal = (result, pathParts, cwdPath) => {
|
|
@@ -1284,18 +1239,17 @@ const applyPreferLocal = (result, pathParts, cwdPath) => {
|
|
|
1284
1239
|
if (!pathParts.includes(pathPart)) result.push(pathPart);
|
|
1285
1240
|
}
|
|
1286
1241
|
};
|
|
1287
|
-
const applyExecPath = (result, pathParts, execPath
|
|
1288
|
-
const pathPart = path.resolve(cwdPath, toPath(execPath
|
|
1242
|
+
const applyExecPath = (result, pathParts, execPath, cwdPath) => {
|
|
1243
|
+
const pathPart = path.resolve(cwdPath, toPath(execPath), "..");
|
|
1289
1244
|
if (!pathParts.includes(pathPart)) result.push(pathPart);
|
|
1290
1245
|
};
|
|
1291
|
-
const npmRunPathEnv = ({ env = process$1.env
|
|
1246
|
+
const npmRunPathEnv = ({ env = process$1.env, ...options } = {}) => {
|
|
1292
1247
|
env = { ...env };
|
|
1293
1248
|
const pathName = pathKey({ env });
|
|
1294
1249
|
options.path = env[pathName];
|
|
1295
1250
|
env[pathName] = npmRunPath(options);
|
|
1296
1251
|
return env;
|
|
1297
1252
|
};
|
|
1298
|
-
|
|
1299
1253
|
//#endregion
|
|
1300
1254
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/return/final-error.js
|
|
1301
1255
|
const getFinalError = (originalError, message, isSync) => {
|
|
@@ -1323,11 +1277,10 @@ var ExecaError = class extends Error {};
|
|
|
1323
1277
|
setErrorName(ExecaError, ExecaError.name);
|
|
1324
1278
|
var ExecaSyncError = class extends Error {};
|
|
1325
1279
|
setErrorName(ExecaSyncError, ExecaSyncError.name);
|
|
1326
|
-
|
|
1327
1280
|
//#endregion
|
|
1328
|
-
//#region ../../node_modules/.pnpm/human-signals@8.0.
|
|
1281
|
+
//#region ../../node_modules/.pnpm/human-signals@8.0.1/node_modules/human-signals/build/src/realtime.js
|
|
1329
1282
|
const getRealtimeSignals = () => {
|
|
1330
|
-
const length =
|
|
1283
|
+
const length = 64 - SIGRTMIN + 1;
|
|
1331
1284
|
return Array.from({ length }, getRealtimeSignal);
|
|
1332
1285
|
};
|
|
1333
1286
|
const getRealtimeSignal = (value, index) => ({
|
|
@@ -1338,10 +1291,8 @@ const getRealtimeSignal = (value, index) => ({
|
|
|
1338
1291
|
standard: "posix"
|
|
1339
1292
|
});
|
|
1340
1293
|
const SIGRTMIN = 34;
|
|
1341
|
-
const SIGRTMAX = 64;
|
|
1342
|
-
|
|
1343
1294
|
//#endregion
|
|
1344
|
-
//#region ../../node_modules/.pnpm/human-signals@8.0.
|
|
1295
|
+
//#region ../../node_modules/.pnpm/human-signals@8.0.1/node_modules/human-signals/build/src/core.js
|
|
1345
1296
|
const SIGNALS = [
|
|
1346
1297
|
{
|
|
1347
1298
|
name: "SIGHUP",
|
|
@@ -1613,9 +1564,8 @@ const SIGNALS = [
|
|
|
1613
1564
|
standard: "other"
|
|
1614
1565
|
}
|
|
1615
1566
|
];
|
|
1616
|
-
|
|
1617
1567
|
//#endregion
|
|
1618
|
-
//#region ../../node_modules/.pnpm/human-signals@8.0.
|
|
1568
|
+
//#region ../../node_modules/.pnpm/human-signals@8.0.1/node_modules/human-signals/build/src/signals.js
|
|
1619
1569
|
const getSignals = () => {
|
|
1620
1570
|
const realtimeSignals = getRealtimeSignals();
|
|
1621
1571
|
return [...SIGNALS, ...realtimeSignals].map(normalizeSignal$1);
|
|
@@ -1633,12 +1583,11 @@ const normalizeSignal$1 = ({ name, number: defaultNumber, description, action, f
|
|
|
1633
1583
|
standard
|
|
1634
1584
|
};
|
|
1635
1585
|
};
|
|
1636
|
-
|
|
1637
1586
|
//#endregion
|
|
1638
|
-
//#region ../../node_modules/.pnpm/human-signals@8.0.
|
|
1587
|
+
//#region ../../node_modules/.pnpm/human-signals@8.0.1/node_modules/human-signals/build/src/main.js
|
|
1639
1588
|
const getSignalsByName = () => {
|
|
1640
|
-
const signals
|
|
1641
|
-
return Object.fromEntries(signals
|
|
1589
|
+
const signals = getSignals();
|
|
1590
|
+
return Object.fromEntries(signals.map(getSignalByName));
|
|
1642
1591
|
};
|
|
1643
1592
|
const getSignalByName = ({ name, number, description, supported, action, forced, standard }) => [name, {
|
|
1644
1593
|
name,
|
|
@@ -1651,13 +1600,12 @@ const getSignalByName = ({ name, number, description, supported, action, forced,
|
|
|
1651
1600
|
}];
|
|
1652
1601
|
const signalsByName = getSignalsByName();
|
|
1653
1602
|
const getSignalsByNumber = () => {
|
|
1654
|
-
const signals
|
|
1655
|
-
const
|
|
1656
|
-
const signalsA = Array.from({ length }, (value, number) => getSignalByNumber(number, signals$1));
|
|
1603
|
+
const signals = getSignals();
|
|
1604
|
+
const signalsA = Array.from({ length: 65 }, (value, number) => getSignalByNumber(number, signals));
|
|
1657
1605
|
return Object.assign({}, ...signalsA);
|
|
1658
1606
|
};
|
|
1659
|
-
const getSignalByNumber = (number, signals
|
|
1660
|
-
const signal = findSignalByNumber(number, signals
|
|
1607
|
+
const getSignalByNumber = (number, signals) => {
|
|
1608
|
+
const signal = findSignalByNumber(number, signals);
|
|
1661
1609
|
if (signal === void 0) return {};
|
|
1662
1610
|
const { name, description, supported, action, forced, standard } = signal;
|
|
1663
1611
|
return { [number]: {
|
|
@@ -1670,13 +1618,12 @@ const getSignalByNumber = (number, signals$1) => {
|
|
|
1670
1618
|
standard
|
|
1671
1619
|
} };
|
|
1672
1620
|
};
|
|
1673
|
-
const findSignalByNumber = (number, signals
|
|
1674
|
-
const signal = signals
|
|
1621
|
+
const findSignalByNumber = (number, signals) => {
|
|
1622
|
+
const signal = signals.find(({ name }) => constants.signals[name] === number);
|
|
1675
1623
|
if (signal !== void 0) return signal;
|
|
1676
|
-
return signals
|
|
1624
|
+
return signals.find((signalA) => signalA.number === number);
|
|
1677
1625
|
};
|
|
1678
|
-
|
|
1679
|
-
|
|
1626
|
+
getSignalsByNumber();
|
|
1680
1627
|
//#endregion
|
|
1681
1628
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/terminate/signal.js
|
|
1682
1629
|
const normalizeKillSignal = (killSignal) => {
|
|
@@ -1706,7 +1653,6 @@ Available signal numbers: ${getAvailableSignalIntegers()}.`;
|
|
|
1706
1653
|
const getAvailableSignalNames = () => Object.keys(constants.signals).sort().map((signalName) => `'${signalName}'`).join(", ");
|
|
1707
1654
|
const getAvailableSignalIntegers = () => [...new Set(Object.values(constants.signals).sort((signalInteger, signalIntegerTwo) => signalInteger - signalIntegerTwo))].join(", ");
|
|
1708
1655
|
const getSignalDescription = (signal) => signalsByName[signal].description;
|
|
1709
|
-
|
|
1710
1656
|
//#endregion
|
|
1711
1657
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/terminate/kill.js
|
|
1712
1658
|
const normalizeForceKillAfterDelay = (forceKillAfterDelay) => {
|
|
@@ -1758,13 +1704,11 @@ const killOnTimeout = async ({ kill, forceKillAfterDelay, context, controllerSig
|
|
|
1758
1704
|
if (kill("SIGKILL")) context.isForcefullyTerminated ??= true;
|
|
1759
1705
|
} catch {}
|
|
1760
1706
|
};
|
|
1761
|
-
|
|
1762
1707
|
//#endregion
|
|
1763
1708
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/utils/abort-signal.js
|
|
1764
1709
|
const onAbortedSignal = async (mainSignal, stopSignal) => {
|
|
1765
1710
|
if (!mainSignal.aborted) await once(mainSignal, "abort", { signal: stopSignal });
|
|
1766
1711
|
};
|
|
1767
|
-
|
|
1768
1712
|
//#endregion
|
|
1769
1713
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/terminate/cancel.js
|
|
1770
1714
|
const validateCancelSignal = ({ cancelSignal }) => {
|
|
@@ -1777,18 +1721,17 @@ const terminateOnCancel = async (subprocess, cancelSignal, context, { signal })
|
|
|
1777
1721
|
subprocess.kill();
|
|
1778
1722
|
throw cancelSignal.reason;
|
|
1779
1723
|
};
|
|
1780
|
-
|
|
1781
1724
|
//#endregion
|
|
1782
1725
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/ipc/validation.js
|
|
1783
|
-
const validateIpcMethod = ({ methodName, isSubprocess, ipc, isConnected
|
|
1726
|
+
const validateIpcMethod = ({ methodName, isSubprocess, ipc, isConnected }) => {
|
|
1784
1727
|
validateIpcOption(methodName, isSubprocess, ipc);
|
|
1785
|
-
validateConnection(methodName, isSubprocess, isConnected
|
|
1728
|
+
validateConnection(methodName, isSubprocess, isConnected);
|
|
1786
1729
|
};
|
|
1787
1730
|
const validateIpcOption = (methodName, isSubprocess, ipc) => {
|
|
1788
1731
|
if (!ipc) throw new Error(`${getMethodName(methodName, isSubprocess)} can only be used if the \`ipc\` option is \`true\`.`);
|
|
1789
1732
|
};
|
|
1790
|
-
const validateConnection = (methodName, isSubprocess, isConnected
|
|
1791
|
-
if (!isConnected
|
|
1733
|
+
const validateConnection = (methodName, isSubprocess, isConnected) => {
|
|
1734
|
+
if (!isConnected) throw new Error(`${getMethodName(methodName, isSubprocess)} cannot be used: the ${getOtherProcessName(isSubprocess)} has already exited or disconnected.`);
|
|
1792
1735
|
};
|
|
1793
1736
|
const throwOnEarlyDisconnect = (isSubprocess) => {
|
|
1794
1737
|
throw new Error(`${getMethodName("getOneMessage", isSubprocess)} could not complete: the ${getOtherProcessName(isSubprocess)} exited or disconnected.`);
|
|
@@ -1832,7 +1775,6 @@ const getOtherProcessName = (isSubprocess) => isSubprocess ? "parent process" :
|
|
|
1832
1775
|
const disconnect = (anyProcess) => {
|
|
1833
1776
|
if (anyProcess.connected) anyProcess.disconnect();
|
|
1834
1777
|
};
|
|
1835
|
-
|
|
1836
1778
|
//#endregion
|
|
1837
1779
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/utils/deferred.js
|
|
1838
1780
|
const createDeferred = () => {
|
|
@@ -1845,7 +1787,6 @@ const createDeferred = () => {
|
|
|
1845
1787
|
});
|
|
1846
1788
|
return Object.assign(promise, methods);
|
|
1847
1789
|
};
|
|
1848
|
-
|
|
1849
1790
|
//#endregion
|
|
1850
1791
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/arguments/fd-options.js
|
|
1851
1792
|
const getToStream = (destination, to = "stdin") => {
|
|
@@ -1922,7 +1863,6 @@ const serializeOptionValue = (value) => {
|
|
|
1922
1863
|
if (typeof value === "string") return `'${value}'`;
|
|
1923
1864
|
return typeof value === "number" ? `${value}` : "Stream";
|
|
1924
1865
|
};
|
|
1925
|
-
|
|
1926
1866
|
//#endregion
|
|
1927
1867
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/utils/max-listeners.js
|
|
1928
1868
|
const incrementMaxListeners = (eventEmitter, maxListenersIncrement, signal) => {
|
|
@@ -1933,7 +1873,6 @@ const incrementMaxListeners = (eventEmitter, maxListenersIncrement, signal) => {
|
|
|
1933
1873
|
eventEmitter.setMaxListeners(eventEmitter.getMaxListeners() - maxListenersIncrement);
|
|
1934
1874
|
});
|
|
1935
1875
|
};
|
|
1936
|
-
|
|
1937
1876
|
//#endregion
|
|
1938
1877
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/ipc/reference.js
|
|
1939
1878
|
const addReference = (channel, reference) => {
|
|
@@ -1960,7 +1899,6 @@ const redoAddedReferences = (channel, isSubprocess) => {
|
|
|
1960
1899
|
addReferenceCount(channel);
|
|
1961
1900
|
}
|
|
1962
1901
|
};
|
|
1963
|
-
|
|
1964
1902
|
//#endregion
|
|
1965
1903
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/ipc/incoming.js
|
|
1966
1904
|
const onMessage = async ({ anyProcess, channel, isSubprocess, ipcEmitter }, wrappedMessage) => {
|
|
@@ -1994,7 +1932,6 @@ const onDisconnect = async ({ anyProcess, channel, isSubprocess, ipcEmitter, bou
|
|
|
1994
1932
|
ipcEmitter.emit("disconnect");
|
|
1995
1933
|
};
|
|
1996
1934
|
const INCOMING_MESSAGES = /* @__PURE__ */ new WeakMap();
|
|
1997
|
-
|
|
1998
1935
|
//#endregion
|
|
1999
1936
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/ipc/forward.js
|
|
2000
1937
|
const getIpcEmitter = (anyProcess, channel, isSubprocess) => {
|
|
@@ -2032,7 +1969,6 @@ const isConnected = (anyProcess) => {
|
|
|
2032
1969
|
const ipcEmitter = IPC_EMITTERS.get(anyProcess);
|
|
2033
1970
|
return ipcEmitter === void 0 ? anyProcess.channel !== null : ipcEmitter.connected;
|
|
2034
1971
|
};
|
|
2035
|
-
|
|
2036
1972
|
//#endregion
|
|
2037
1973
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/ipc/strict.js
|
|
2038
1974
|
const handleSendStrict = ({ anyProcess, channel, isSubprocess, message, strict }) => {
|
|
@@ -2104,7 +2040,6 @@ const throwOnDisconnect$1 = async (anyProcess, isSubprocess, { signal }) => {
|
|
|
2104
2040
|
};
|
|
2105
2041
|
const REQUEST_TYPE = "execa:ipc:request";
|
|
2106
2042
|
const RESPONSE_TYPE = "execa:ipc:response";
|
|
2107
|
-
|
|
2108
2043
|
//#endregion
|
|
2109
2044
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/ipc/outgoing.js
|
|
2110
2045
|
const startSendMessage = (anyProcess, wrappedMessage, strict) => {
|
|
@@ -2134,7 +2069,6 @@ const waitForOutgoingMessages = async (anyProcess, ipcEmitter, wrappedMessage) =
|
|
|
2134
2069
|
const OUTGOING_MESSAGES = /* @__PURE__ */ new WeakMap();
|
|
2135
2070
|
const hasMessageListeners = (anyProcess, ipcEmitter) => ipcEmitter.listenerCount("message") > getMinListenerCount(anyProcess);
|
|
2136
2071
|
const getMinListenerCount = (anyProcess) => SUBPROCESS_OPTIONS.has(anyProcess) && !getFdSpecificValue(SUBPROCESS_OPTIONS.get(anyProcess).options.buffer, "ipc") ? 1 : 0;
|
|
2137
|
-
|
|
2138
2072
|
//#endregion
|
|
2139
2073
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/ipc/send.js
|
|
2140
2074
|
const sendMessage$1 = ({ anyProcess, channel, isSubprocess, ipc }, message, { strict = false } = {}) => {
|
|
@@ -2204,7 +2138,6 @@ const getSendMethod = (anyProcess) => {
|
|
|
2204
2138
|
return sendMethod;
|
|
2205
2139
|
};
|
|
2206
2140
|
const PROCESS_SEND_METHODS = /* @__PURE__ */ new WeakMap();
|
|
2207
|
-
|
|
2208
2141
|
//#endregion
|
|
2209
2142
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/ipc/graceful.js
|
|
2210
2143
|
const sendAbort = (subprocess, message) => {
|
|
@@ -2255,7 +2188,6 @@ const abortOnDisconnect = () => {
|
|
|
2255
2188
|
cancelController.abort(getAbortDisconnectError());
|
|
2256
2189
|
};
|
|
2257
2190
|
const cancelController = new AbortController();
|
|
2258
|
-
|
|
2259
2191
|
//#endregion
|
|
2260
2192
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/terminate/graceful.js
|
|
2261
2193
|
const validateGracefulCancel = ({ gracefulCancel, cancelSignal, ipc, serialization }) => {
|
|
@@ -2294,7 +2226,6 @@ const getReason = ({ reason }) => {
|
|
|
2294
2226
|
});
|
|
2295
2227
|
return error;
|
|
2296
2228
|
};
|
|
2297
|
-
|
|
2298
2229
|
//#endregion
|
|
2299
2230
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/terminate/timeout.js
|
|
2300
2231
|
const validateTimeout = ({ timeout }) => {
|
|
@@ -2307,7 +2238,6 @@ const killAfterTimeout = async (subprocess, timeout, context, { signal }) => {
|
|
|
2307
2238
|
subprocess.kill();
|
|
2308
2239
|
throw new DiscardedError();
|
|
2309
2240
|
};
|
|
2310
|
-
|
|
2311
2241
|
//#endregion
|
|
2312
2242
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/methods/node.js
|
|
2313
2243
|
const mapNode = ({ options }) => {
|
|
@@ -2317,7 +2247,7 @@ const mapNode = ({ options }) => {
|
|
|
2317
2247
|
node: true
|
|
2318
2248
|
} };
|
|
2319
2249
|
};
|
|
2320
|
-
const handleNodeOption = (file, commandArguments, { node: shouldHandleNode = false, nodePath = execPath, nodeOptions = execArgv.filter((nodeOption) => !nodeOption.startsWith("--inspect")), cwd, execPath: formerNodePath
|
|
2250
|
+
const handleNodeOption = (file, commandArguments, { node: shouldHandleNode = false, nodePath = execPath, nodeOptions = execArgv.filter((nodeOption) => !nodeOption.startsWith("--inspect")), cwd, execPath: formerNodePath, ...options }) => {
|
|
2321
2251
|
if (formerNodePath !== void 0) throw new TypeError("The \"execPath\" option has been removed. Please use the \"nodePath\" option instead.");
|
|
2322
2252
|
const normalizedNodePath = safeNormalizeFileUrl(nodePath, "The \"nodePath\" option");
|
|
2323
2253
|
const resolvedNodePath = path.resolve(cwd, normalizedNodePath);
|
|
@@ -2347,7 +2277,6 @@ const handleNodeOption = (file, commandArguments, { node: shouldHandleNode = fal
|
|
|
2347
2277
|
}
|
|
2348
2278
|
];
|
|
2349
2279
|
};
|
|
2350
|
-
|
|
2351
2280
|
//#endregion
|
|
2352
2281
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/ipc/ipc-input.js
|
|
2353
2282
|
const validateIpcInputOption = ({ ipcInput, ipc, serialization }) => {
|
|
@@ -2377,7 +2306,6 @@ const sendIpcInput = async (subprocess, ipcInput) => {
|
|
|
2377
2306
|
if (ipcInput === void 0) return;
|
|
2378
2307
|
await subprocess.sendMessage(ipcInput);
|
|
2379
2308
|
};
|
|
2380
|
-
|
|
2381
2309
|
//#endregion
|
|
2382
2310
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/arguments/encoding-option.js
|
|
2383
2311
|
const validateEncoding = ({ encoding }) => {
|
|
@@ -2385,7 +2313,7 @@ const validateEncoding = ({ encoding }) => {
|
|
|
2385
2313
|
const correctEncoding = getCorrectEncoding(encoding);
|
|
2386
2314
|
if (correctEncoding !== void 0) throw new TypeError(`Invalid option \`encoding: ${serializeEncoding(encoding)}\`.
|
|
2387
2315
|
Please rename it to ${serializeEncoding(correctEncoding)}.`);
|
|
2388
|
-
const correctEncodings = [...ENCODINGS].map((correctEncoding
|
|
2316
|
+
const correctEncodings = [...ENCODINGS].map((correctEncoding) => serializeEncoding(correctEncoding)).join(", ");
|
|
2389
2317
|
throw new TypeError(`Invalid option \`encoding: ${serializeEncoding(encoding)}\`.
|
|
2390
2318
|
Please rename it to one of: ${correctEncodings}.`);
|
|
2391
2319
|
};
|
|
@@ -2414,7 +2342,6 @@ const ENCODING_ALIASES = {
|
|
|
2414
2342
|
binary: "latin1"
|
|
2415
2343
|
};
|
|
2416
2344
|
const serializeEncoding = (encoding) => typeof encoding === "string" ? `"${encoding}"` : String(encoding);
|
|
2417
|
-
|
|
2418
2345
|
//#endregion
|
|
2419
2346
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/arguments/cwd.js
|
|
2420
2347
|
const normalizeCwd = (cwd = getDefaultCwd()) => {
|
|
@@ -2440,7 +2367,6 @@ const fixCwdError = (originalMessage, cwd) => {
|
|
|
2440
2367
|
if (!cwdStat.isDirectory()) return `The "cwd" option is not a directory: ${cwd}.\n${originalMessage}`;
|
|
2441
2368
|
return originalMessage;
|
|
2442
2369
|
};
|
|
2443
|
-
|
|
2444
2370
|
//#endregion
|
|
2445
2371
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/arguments/options.js
|
|
2446
2372
|
const normalizeOptions = (filePath, rawArguments, rawOptions) => {
|
|
@@ -2465,7 +2391,7 @@ const normalizeOptions = (filePath, rawArguments, rawOptions) => {
|
|
|
2465
2391
|
options
|
|
2466
2392
|
};
|
|
2467
2393
|
};
|
|
2468
|
-
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"
|
|
2394
|
+
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 }) => ({
|
|
2469
2395
|
...options,
|
|
2470
2396
|
extendEnv,
|
|
2471
2397
|
preferLocal,
|
|
@@ -2497,7 +2423,6 @@ const getEnv = ({ env: envOption, extendEnv, preferLocal, node, localDirectory,
|
|
|
2497
2423
|
});
|
|
2498
2424
|
return env;
|
|
2499
2425
|
};
|
|
2500
|
-
|
|
2501
2426
|
//#endregion
|
|
2502
2427
|
//#region ../../node_modules/.pnpm/strip-final-newline@4.0.0/node_modules/strip-final-newline/index.js
|
|
2503
2428
|
function stripFinalNewline(input) {
|
|
@@ -2511,22 +2436,20 @@ const LF = "\n";
|
|
|
2511
2436
|
const LF_BINARY = LF.codePointAt(0);
|
|
2512
2437
|
const CR = "\r";
|
|
2513
2438
|
const CR_BINARY = CR.codePointAt(0);
|
|
2514
|
-
|
|
2515
2439
|
//#endregion
|
|
2516
2440
|
//#region ../../node_modules/.pnpm/is-stream@4.0.1/node_modules/is-stream/index.js
|
|
2517
2441
|
function isStream(stream, { checkOpen = true } = {}) {
|
|
2518
2442
|
return stream !== null && typeof stream === "object" && (stream.writable || stream.readable || !checkOpen || stream.writable === void 0 && stream.readable === void 0) && typeof stream.pipe === "function";
|
|
2519
2443
|
}
|
|
2520
|
-
function isWritableStream(stream, { checkOpen = true } = {}) {
|
|
2444
|
+
function isWritableStream$1(stream, { checkOpen = true } = {}) {
|
|
2521
2445
|
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";
|
|
2522
2446
|
}
|
|
2523
|
-
function isReadableStream(stream, { checkOpen = true } = {}) {
|
|
2447
|
+
function isReadableStream$1(stream, { checkOpen = true } = {}) {
|
|
2524
2448
|
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";
|
|
2525
2449
|
}
|
|
2526
2450
|
function isDuplexStream(stream, options) {
|
|
2527
|
-
return isWritableStream(stream, options) && isReadableStream(stream, options);
|
|
2451
|
+
return isWritableStream$1(stream, options) && isReadableStream$1(stream, options);
|
|
2528
2452
|
}
|
|
2529
|
-
|
|
2530
2453
|
//#endregion
|
|
2531
2454
|
//#region ../../node_modules/.pnpm/@sec-ant+readable-stream@0.4.1/node_modules/@sec-ant/readable-stream/dist/ponyfill/asyncIterator.js
|
|
2532
2455
|
const a = Object.getPrototypeOf(Object.getPrototypeOf(
|
|
@@ -2607,11 +2530,10 @@ function h({ preventCancel: r = !1 } = {}) {
|
|
|
2607
2530
|
const t = new c(this.getReader(), r), s = Object.create(u);
|
|
2608
2531
|
return s[n] = t, s;
|
|
2609
2532
|
}
|
|
2610
|
-
|
|
2611
2533
|
//#endregion
|
|
2612
2534
|
//#region ../../node_modules/.pnpm/get-stream@9.0.1/node_modules/get-stream/source/stream.js
|
|
2613
2535
|
const getAsyncIterable = (stream) => {
|
|
2614
|
-
if (isReadableStream(stream, { checkOpen: false }) && nodeImports.on !== void 0) return getStreamIterable(stream);
|
|
2536
|
+
if (isReadableStream$1(stream, { checkOpen: false }) && nodeImports.on !== void 0) return getStreamIterable(stream);
|
|
2615
2537
|
if (typeof stream?.[Symbol.asyncIterator] === "function") return stream;
|
|
2616
2538
|
if (toString.call(stream) === "[object ReadableStream]") return h.call(stream);
|
|
2617
2539
|
throw new TypeError("The first argument must be a Readable, a ReadableStream, or an async iterable.");
|
|
@@ -2645,7 +2567,6 @@ const handleStreamEnd = async (stream, controller, state) => {
|
|
|
2645
2567
|
}
|
|
2646
2568
|
};
|
|
2647
2569
|
const nodeImports = {};
|
|
2648
|
-
|
|
2649
2570
|
//#endregion
|
|
2650
2571
|
//#region ../../node_modules/.pnpm/get-stream@9.0.1/node_modules/get-stream/source/contents.js
|
|
2651
2572
|
const getStreamContents$1 = async (stream, { init, convertChunk, getSize, truncateChunk, addChunk, getFinalChunk, finalize }, { maxBuffer = Number.POSITIVE_INFINITY } = {}) => {
|
|
@@ -2721,7 +2642,6 @@ var MaxBufferError = class extends Error {
|
|
|
2721
2642
|
super("maxBuffer exceeded");
|
|
2722
2643
|
}
|
|
2723
2644
|
};
|
|
2724
|
-
|
|
2725
2645
|
//#endregion
|
|
2726
2646
|
//#region ../../node_modules/.pnpm/get-stream@9.0.1/node_modules/get-stream/source/utils.js
|
|
2727
2647
|
const identity = (value) => value;
|
|
@@ -2731,7 +2651,6 @@ const throwObjectStream = (chunk) => {
|
|
|
2731
2651
|
throw new Error(`Streams in object mode are not supported: ${String(chunk)}`);
|
|
2732
2652
|
};
|
|
2733
2653
|
const getLengthProperty = (convertedChunk) => convertedChunk.length;
|
|
2734
|
-
|
|
2735
2654
|
//#endregion
|
|
2736
2655
|
//#region ../../node_modules/.pnpm/get-stream@9.0.1/node_modules/get-stream/source/array.js
|
|
2737
2656
|
async function getStreamAsArray(stream, options) {
|
|
@@ -2759,7 +2678,6 @@ const arrayMethods = {
|
|
|
2759
2678
|
getFinalChunk: noop$1,
|
|
2760
2679
|
finalize: getContentsProperty
|
|
2761
2680
|
};
|
|
2762
|
-
|
|
2763
2681
|
//#endregion
|
|
2764
2682
|
//#region ../../node_modules/.pnpm/get-stream@9.0.1/node_modules/get-stream/source/array-buffer.js
|
|
2765
2683
|
async function getStreamAsArrayBuffer(stream, options) {
|
|
@@ -2811,7 +2729,6 @@ const arrayBufferMethods = {
|
|
|
2811
2729
|
getFinalChunk: noop$1,
|
|
2812
2730
|
finalize: finalizeArrayBuffer
|
|
2813
2731
|
};
|
|
2814
|
-
|
|
2815
2732
|
//#endregion
|
|
2816
2733
|
//#region ../../node_modules/.pnpm/get-stream@9.0.1/node_modules/get-stream/source/string.js
|
|
2817
2734
|
async function getStreamAsString(stream, options) {
|
|
@@ -2821,11 +2738,11 @@ const initString = () => ({
|
|
|
2821
2738
|
contents: "",
|
|
2822
2739
|
textDecoder: new TextDecoder()
|
|
2823
2740
|
});
|
|
2824
|
-
const useTextDecoder = (chunk, { textDecoder
|
|
2741
|
+
const useTextDecoder = (chunk, { textDecoder }) => textDecoder.decode(chunk, { stream: true });
|
|
2825
2742
|
const addStringChunk = (convertedChunk, { contents }) => contents + convertedChunk;
|
|
2826
2743
|
const truncateStringChunk = (convertedChunk, chunkSize) => convertedChunk.slice(0, chunkSize);
|
|
2827
|
-
const getFinalStringChunk = ({ textDecoder
|
|
2828
|
-
const finalChunk = textDecoder
|
|
2744
|
+
const getFinalStringChunk = ({ textDecoder }) => {
|
|
2745
|
+
const finalChunk = textDecoder.decode();
|
|
2829
2746
|
return finalChunk === "" ? void 0 : finalChunk;
|
|
2830
2747
|
};
|
|
2831
2748
|
const stringMethods = {
|
|
@@ -2844,7 +2761,6 @@ const stringMethods = {
|
|
|
2844
2761
|
getFinalChunk: getFinalStringChunk,
|
|
2845
2762
|
finalize: getContentsProperty
|
|
2846
2763
|
};
|
|
2847
|
-
|
|
2848
2764
|
//#endregion
|
|
2849
2765
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/io/max-buffer.js
|
|
2850
2766
|
const handleMaxBuffer = ({ error, stream, readableObjectMode, lines, encoding, fdNumber }) => {
|
|
@@ -2900,7 +2816,6 @@ const truncateMaxBufferSync = (result, isMaxBuffer, maxBuffer) => {
|
|
|
2900
2816
|
return result.length > maxBufferValue ? result.slice(0, maxBufferValue) : result;
|
|
2901
2817
|
};
|
|
2902
2818
|
const getMaxBufferSync = ([, stdoutMaxBuffer]) => stdoutMaxBuffer;
|
|
2903
|
-
|
|
2904
2819
|
//#endregion
|
|
2905
2820
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/return/message.js
|
|
2906
2821
|
const createMessages = ({ stdio, all, ipcOutput, originalError, signal, signalDescription, exitCode, escapedCommand, timedOut, isCanceled, isGracefullyCanceled, isMaxBuffer, isForcefullyTerminated, forceKillAfterDelay, killSignal, maxBuffer, timeout, cwd }) => {
|
|
@@ -2962,7 +2877,6 @@ const serializeMessageItem = (messageItem) => {
|
|
|
2962
2877
|
if (isUint8Array(messageItem)) return uint8ArrayToString(messageItem);
|
|
2963
2878
|
return "";
|
|
2964
2879
|
};
|
|
2965
|
-
|
|
2966
2880
|
//#endregion
|
|
2967
2881
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/return/result.js
|
|
2968
2882
|
const makeSuccessResult = ({ command, escapedCommand, stdio, all, ipcOutput, options: { cwd }, startTime }) => omitUndefinedProperties({
|
|
@@ -3080,7 +2994,6 @@ const normalizeExitPayload = (rawExitCode, rawSignal) => {
|
|
|
3080
2994
|
signalDescription: signal === void 0 ? void 0 : getSignalDescription(rawSignal)
|
|
3081
2995
|
};
|
|
3082
2996
|
};
|
|
3083
|
-
|
|
3084
2997
|
//#endregion
|
|
3085
2998
|
//#region ../../node_modules/.pnpm/parse-ms@4.0.0/node_modules/parse-ms/index.js
|
|
3086
2999
|
const toZeroIfInfinity = (value) => Number.isFinite(value) ? value : 0;
|
|
@@ -3115,11 +3028,10 @@ function parseMilliseconds(milliseconds) {
|
|
|
3115
3028
|
}
|
|
3116
3029
|
throw new TypeError("Expected a finite number or bigint");
|
|
3117
3030
|
}
|
|
3118
|
-
|
|
3119
3031
|
//#endregion
|
|
3120
3032
|
//#region ../../node_modules/.pnpm/pretty-ms@9.2.0/node_modules/pretty-ms/index.js
|
|
3121
3033
|
const isZero = (value) => value === 0 || value === 0n;
|
|
3122
|
-
const pluralize = (word, count
|
|
3034
|
+
const pluralize = (word, count) => count === 1 || count === 1n ? word : `${word}s`;
|
|
3123
3035
|
const SECOND_ROUNDING_EPSILON = 1e-7;
|
|
3124
3036
|
const ONE_DAY_IN_MILLISECONDS = 24n * 60n * 60n * 1000n;
|
|
3125
3037
|
function prettyMilliseconds(milliseconds, options) {
|
|
@@ -3168,16 +3080,16 @@ function prettyMilliseconds(milliseconds, options) {
|
|
|
3168
3080
|
add(Number(parsed.minutes), "minute", "m");
|
|
3169
3081
|
if (!options.hideSeconds) if (options.separateMilliseconds || options.formatSubMilliseconds || !options.colonNotation && milliseconds < 1e3) {
|
|
3170
3082
|
const seconds = Number(parsed.seconds);
|
|
3171
|
-
const milliseconds
|
|
3083
|
+
const milliseconds = Number(parsed.milliseconds);
|
|
3172
3084
|
const microseconds = Number(parsed.microseconds);
|
|
3173
3085
|
const nanoseconds = Number(parsed.nanoseconds);
|
|
3174
3086
|
add(seconds, "second", "s");
|
|
3175
3087
|
if (options.formatSubMilliseconds) {
|
|
3176
|
-
add(milliseconds
|
|
3088
|
+
add(milliseconds, "millisecond", "ms");
|
|
3177
3089
|
add(microseconds, "microsecond", "µs");
|
|
3178
3090
|
add(nanoseconds, "nanosecond", "ns");
|
|
3179
3091
|
} else {
|
|
3180
|
-
const millisecondsAndBelow = milliseconds
|
|
3092
|
+
const millisecondsAndBelow = milliseconds + microseconds / 1e3 + nanoseconds / 1e6;
|
|
3181
3093
|
const millisecondsDecimalDigits = typeof options.millisecondsDecimalDigits === "number" ? options.millisecondsDecimalDigits : 0;
|
|
3182
3094
|
const millisecondsString = millisecondsDecimalDigits ? millisecondsAndBelow.toFixed(millisecondsDecimalDigits) : millisecondsAndBelow >= 1 ? Math.round(millisecondsAndBelow) : Math.ceil(millisecondsAndBelow);
|
|
3183
3095
|
add(Number.parseFloat(millisecondsString), "millisecond", "ms", millisecondsString);
|
|
@@ -3192,7 +3104,6 @@ function prettyMilliseconds(milliseconds, options) {
|
|
|
3192
3104
|
if (typeof options.unitCount === "number") result = result.slice(0, Math.max(options.unitCount, 1));
|
|
3193
3105
|
return sign + result.join(separator);
|
|
3194
3106
|
}
|
|
3195
|
-
|
|
3196
3107
|
//#endregion
|
|
3197
3108
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/verbose/error.js
|
|
3198
3109
|
const logError = (result, verboseInfo) => {
|
|
@@ -3203,7 +3114,6 @@ const logError = (result, verboseInfo) => {
|
|
|
3203
3114
|
result
|
|
3204
3115
|
});
|
|
3205
3116
|
};
|
|
3206
|
-
|
|
3207
3117
|
//#endregion
|
|
3208
3118
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/verbose/complete.js
|
|
3209
3119
|
const logResult = (result, verboseInfo) => {
|
|
@@ -3219,7 +3129,6 @@ const logDuration = (result, verboseInfo) => {
|
|
|
3219
3129
|
result
|
|
3220
3130
|
});
|
|
3221
3131
|
};
|
|
3222
|
-
|
|
3223
3132
|
//#endregion
|
|
3224
3133
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/return/reject.js
|
|
3225
3134
|
const handleResult = (result, verboseInfo, { reject }) => {
|
|
@@ -3227,7 +3136,6 @@ const handleResult = (result, verboseInfo, { reject }) => {
|
|
|
3227
3136
|
if (result.failed && reject) throw result;
|
|
3228
3137
|
return result;
|
|
3229
3138
|
};
|
|
3230
|
-
|
|
3231
3139
|
//#endregion
|
|
3232
3140
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/stdio/type.js
|
|
3233
3141
|
const getStdioItemType = (value, optionName) => {
|
|
@@ -3294,10 +3202,10 @@ const KNOWN_STDIO_STRINGS = new Set([
|
|
|
3294
3202
|
"overlapped",
|
|
3295
3203
|
"pipe"
|
|
3296
3204
|
]);
|
|
3297
|
-
const isReadableStream
|
|
3298
|
-
const isWritableStream
|
|
3299
|
-
const isWebStream = (value) => isReadableStream
|
|
3300
|
-
const isTransformStream = (value) => isReadableStream
|
|
3205
|
+
const isReadableStream = (value) => Object.prototype.toString.call(value) === "[object ReadableStream]";
|
|
3206
|
+
const isWritableStream = (value) => Object.prototype.toString.call(value) === "[object WritableStream]";
|
|
3207
|
+
const isWebStream = (value) => isReadableStream(value) || isWritableStream(value);
|
|
3208
|
+
const isTransformStream = (value) => isReadableStream(value?.readable) && isWritableStream(value?.writable);
|
|
3301
3209
|
const isAsyncIterableObject = (value) => isObject(value) && typeof value[Symbol.asyncIterator] === "function";
|
|
3302
3210
|
const isIterableObject = (value) => isObject(value) && typeof value[Symbol.iterator] === "function";
|
|
3303
3211
|
const isObject = (value) => typeof value === "object" && value !== null;
|
|
@@ -3335,7 +3243,6 @@ const TYPE_TO_MESSAGE = {
|
|
|
3335
3243
|
string: "a string",
|
|
3336
3244
|
uint8Array: "a Uint8Array"
|
|
3337
3245
|
};
|
|
3338
|
-
|
|
3339
3246
|
//#endregion
|
|
3340
3247
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/transform/object-mode.js
|
|
3341
3248
|
const getTransformObjectModes = (objectMode, index, newTransforms, direction) => direction === "output" ? getOutputObjectModes(objectMode, index, newTransforms) : getInputObjectModes(objectMode, index, newTransforms);
|
|
@@ -3358,7 +3265,6 @@ const getFdObjectMode = (stdioItems, direction) => {
|
|
|
3358
3265
|
if (lastTransform === void 0) return false;
|
|
3359
3266
|
return direction === "input" ? lastTransform.value.writableObjectMode : lastTransform.value.readableObjectMode;
|
|
3360
3267
|
};
|
|
3361
|
-
|
|
3362
3268
|
//#endregion
|
|
3363
3269
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/transform/normalize.js
|
|
3364
3270
|
const normalizeTransforms = (stdioItems, optionName, direction, options) => [...stdioItems.filter(({ type }) => !TRANSFORM_TYPES.has(type)), ...getTransforms(stdioItems, optionName, direction, options)];
|
|
@@ -3435,7 +3341,6 @@ const normalizeGenerator = ({ stdioItem, stdioItem: { value }, index, newTransfo
|
|
|
3435
3341
|
};
|
|
3436
3342
|
};
|
|
3437
3343
|
const sortTransforms = (newTransforms, direction) => direction === "input" ? newTransforms.reverse() : newTransforms;
|
|
3438
|
-
|
|
3439
3344
|
//#endregion
|
|
3440
3345
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/stdio/direction.js
|
|
3441
3346
|
const getStreamDirection = (stdioItems, fdNumber, optionName) => {
|
|
@@ -3459,10 +3364,10 @@ const guessStreamDirection = {
|
|
|
3459
3364
|
iterable: alwaysInput,
|
|
3460
3365
|
asyncIterable: alwaysInput,
|
|
3461
3366
|
uint8Array: alwaysInput,
|
|
3462
|
-
webStream: (value) => isWritableStream
|
|
3367
|
+
webStream: (value) => isWritableStream(value) ? "output" : "input",
|
|
3463
3368
|
nodeStream(value) {
|
|
3464
|
-
if (!isReadableStream(value, { checkOpen: false })) return "output";
|
|
3465
|
-
return isWritableStream(value, { checkOpen: false }) ? void 0 : "input";
|
|
3369
|
+
if (!isReadableStream$1(value, { checkOpen: false })) return "output";
|
|
3370
|
+
return isWritableStream$1(value, { checkOpen: false }) ? void 0 : "input";
|
|
3466
3371
|
},
|
|
3467
3372
|
webTransform: anyDirection,
|
|
3468
3373
|
duplex: anyDirection,
|
|
@@ -3482,14 +3387,12 @@ const getStandardStreamDirection = (value) => {
|
|
|
3482
3387
|
].includes(value)) return "output";
|
|
3483
3388
|
};
|
|
3484
3389
|
const DEFAULT_DIRECTION = "output";
|
|
3485
|
-
|
|
3486
3390
|
//#endregion
|
|
3487
3391
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/ipc/array.js
|
|
3488
3392
|
const normalizeIpcStdioArray = (stdioArray, ipc) => ipc && !stdioArray.includes("ipc") ? [...stdioArray, "ipc"] : stdioArray;
|
|
3489
|
-
|
|
3490
3393
|
//#endregion
|
|
3491
3394
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/stdio/stdio-option.js
|
|
3492
|
-
const normalizeStdioOption = ({ stdio, ipc, buffer
|
|
3395
|
+
const normalizeStdioOption = ({ stdio, ipc, buffer, ...options }, verboseInfo, isSync) => {
|
|
3493
3396
|
const stdioArray = getStdioArray(stdio, options).map((stdioOption, fdNumber) => addDefaultValue(stdioOption, fdNumber));
|
|
3494
3397
|
return isSync ? normalizeStdioSync(stdioArray, buffer, verboseInfo) : normalizeIpcStdioArray(stdioArray, ipc);
|
|
3495
3398
|
};
|
|
@@ -3513,7 +3416,6 @@ const addDefaultValue = (stdioOption, fdNumber) => {
|
|
|
3513
3416
|
};
|
|
3514
3417
|
const normalizeStdioSync = (stdioArray, buffer, verboseInfo) => stdioArray.map((stdioOption, fdNumber) => !buffer[fdNumber] && fdNumber !== 0 && !isFullVerbose(verboseInfo, fdNumber) && isOutputPipeOnly(stdioOption) ? "ignore" : stdioOption);
|
|
3515
3418
|
const isOutputPipeOnly = (stdioOption) => stdioOption === "pipe" || Array.isArray(stdioOption) && stdioOption.every((item) => item === "pipe");
|
|
3516
|
-
|
|
3517
3419
|
//#endregion
|
|
3518
3420
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/stdio/native.js
|
|
3519
3421
|
const handleNativeStream = ({ stdioItem, stdioItem: { type }, isStdioArray, fdNumber, direction, isSync }) => {
|
|
@@ -3582,7 +3484,6 @@ const getStandardStream = (fdNumber, value, optionName) => {
|
|
|
3582
3484
|
if (standardStream === void 0) throw new TypeError(`The \`${optionName}: ${value}\` option is invalid: no such standard stream.`);
|
|
3583
3485
|
return standardStream;
|
|
3584
3486
|
};
|
|
3585
|
-
|
|
3586
3487
|
//#endregion
|
|
3587
3488
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/stdio/input-option.js
|
|
3588
3489
|
const handleInputOptions = ({ input, inputFile }, fdNumber) => fdNumber === 0 ? [...handleInputOption(input), ...handleInputFileOption(inputFile)] : [];
|
|
@@ -3592,7 +3493,7 @@ const handleInputOption = (input) => input === void 0 ? [] : [{
|
|
|
3592
3493
|
optionName: "input"
|
|
3593
3494
|
}];
|
|
3594
3495
|
const getInputType = (input) => {
|
|
3595
|
-
if (isReadableStream(input, { checkOpen: false })) return "nodeStream";
|
|
3496
|
+
if (isReadableStream$1(input, { checkOpen: false })) return "nodeStream";
|
|
3596
3497
|
if (typeof input === "string") return "string";
|
|
3597
3498
|
if (isUint8Array(input)) return "uint8Array";
|
|
3598
3499
|
throw new Error("The `input` option must be a string, a Uint8Array or a Node.js Readable stream.");
|
|
@@ -3612,7 +3513,6 @@ const getInputFileType = (inputFile) => {
|
|
|
3612
3513
|
};
|
|
3613
3514
|
throw new Error("The `inputFile` option must be a file path string or a file URL.");
|
|
3614
3515
|
};
|
|
3615
|
-
|
|
3616
3516
|
//#endregion
|
|
3617
3517
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/stdio/duplicate.js
|
|
3618
3518
|
const filterDuplicates = (stdioItems) => stdioItems.filter((stdioItemOne, indexOne) => stdioItems.every((stdioItemTwo, indexTwo) => stdioItemOne.value !== stdioItemTwo.value || indexOne >= indexTwo || stdioItemOne.type === "generator" || stdioItemOne.type === "asyncGenerator"));
|
|
@@ -3673,10 +3573,9 @@ const validateDuplicateTransform = ({ otherStdioItems, type, value, optionName }
|
|
|
3673
3573
|
const throwOnDuplicateStream = (stdioItem, optionName, type) => {
|
|
3674
3574
|
if (stdioItem !== void 0) throw new TypeError(`The \`${stdioItem.optionName}\` and \`${optionName}\` options must not target ${TYPE_TO_MESSAGE[type]} that is the same.`);
|
|
3675
3575
|
};
|
|
3676
|
-
|
|
3677
3576
|
//#endregion
|
|
3678
3577
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/stdio/handle.js
|
|
3679
|
-
const handleStdio = (addProperties
|
|
3578
|
+
const handleStdio = (addProperties, options, verboseInfo, isSync) => {
|
|
3680
3579
|
const fileDescriptors = getFinalFileDescriptors({
|
|
3681
3580
|
initialFileDescriptors: normalizeStdioOption(options, verboseInfo, isSync).map((stdioOption, fdNumber) => getFileDescriptor({
|
|
3682
3581
|
stdioOption,
|
|
@@ -3684,7 +3583,7 @@ const handleStdio = (addProperties$2, options, verboseInfo, isSync) => {
|
|
|
3684
3583
|
options,
|
|
3685
3584
|
isSync
|
|
3686
3585
|
})),
|
|
3687
|
-
addProperties
|
|
3586
|
+
addProperties,
|
|
3688
3587
|
options,
|
|
3689
3588
|
isSync
|
|
3690
3589
|
});
|
|
@@ -3733,7 +3632,7 @@ const initializeStdioItem = (value, optionName) => ({
|
|
|
3733
3632
|
const validateStdioArray = (stdioItems, isStdioArray, optionName) => {
|
|
3734
3633
|
if (stdioItems.length === 0) throw new TypeError(`The \`${optionName}\` option must not be an empty array.`);
|
|
3735
3634
|
if (!isStdioArray) return;
|
|
3736
|
-
for (const { value, optionName
|
|
3635
|
+
for (const { value, optionName } of stdioItems) if (INVALID_STDIO_ARRAY_OPTIONS.has(value)) throw new Error(`The \`${optionName}\` option must not include \`${value}\`.`);
|
|
3737
3636
|
};
|
|
3738
3637
|
const INVALID_STDIO_ARRAY_OPTIONS = new Set(["ignore", "ipc"]);
|
|
3739
3638
|
const validateStreams = (stdioItems) => {
|
|
@@ -3749,13 +3648,13 @@ const validateFileObjectMode = (stdioItems, objectMode) => {
|
|
|
3749
3648
|
const fileStdioItem = stdioItems.find(({ type }) => FILE_TYPES.has(type));
|
|
3750
3649
|
if (fileStdioItem !== void 0) throw new TypeError(`The \`${fileStdioItem.optionName}\` option cannot use both files and transforms in objectMode.`);
|
|
3751
3650
|
};
|
|
3752
|
-
const getFinalFileDescriptors = ({ initialFileDescriptors, addProperties
|
|
3651
|
+
const getFinalFileDescriptors = ({ initialFileDescriptors, addProperties, options, isSync }) => {
|
|
3753
3652
|
const fileDescriptors = [];
|
|
3754
3653
|
try {
|
|
3755
3654
|
for (const fileDescriptor of initialFileDescriptors) fileDescriptors.push(getFinalFileDescriptor({
|
|
3756
3655
|
fileDescriptor,
|
|
3757
3656
|
fileDescriptors,
|
|
3758
|
-
addProperties
|
|
3657
|
+
addProperties,
|
|
3759
3658
|
options,
|
|
3760
3659
|
isSync
|
|
3761
3660
|
}));
|
|
@@ -3765,13 +3664,13 @@ const getFinalFileDescriptors = ({ initialFileDescriptors, addProperties: addPro
|
|
|
3765
3664
|
throw error;
|
|
3766
3665
|
}
|
|
3767
3666
|
};
|
|
3768
|
-
const getFinalFileDescriptor = ({ fileDescriptor: { direction, objectMode, stdioItems }, fileDescriptors, addProperties
|
|
3667
|
+
const getFinalFileDescriptor = ({ fileDescriptor: { direction, objectMode, stdioItems }, fileDescriptors, addProperties, options, isSync }) => {
|
|
3769
3668
|
return {
|
|
3770
3669
|
direction,
|
|
3771
3670
|
objectMode,
|
|
3772
3671
|
stdioItems: stdioItems.map((stdioItem) => addStreamProperties({
|
|
3773
3672
|
stdioItem,
|
|
3774
|
-
addProperties
|
|
3673
|
+
addProperties,
|
|
3775
3674
|
direction,
|
|
3776
3675
|
options,
|
|
3777
3676
|
fileDescriptors,
|
|
@@ -3779,7 +3678,7 @@ const getFinalFileDescriptor = ({ fileDescriptor: { direction, objectMode, stdio
|
|
|
3779
3678
|
}))
|
|
3780
3679
|
};
|
|
3781
3680
|
};
|
|
3782
|
-
const addStreamProperties = ({ stdioItem, addProperties
|
|
3681
|
+
const addStreamProperties = ({ stdioItem, addProperties, direction, options, fileDescriptors, isSync }) => {
|
|
3783
3682
|
const duplicateStream = getDuplicateStream({
|
|
3784
3683
|
stdioItem,
|
|
3785
3684
|
direction,
|
|
@@ -3792,18 +3691,17 @@ const addStreamProperties = ({ stdioItem, addProperties: addProperties$2, direct
|
|
|
3792
3691
|
};
|
|
3793
3692
|
return {
|
|
3794
3693
|
...stdioItem,
|
|
3795
|
-
...addProperties
|
|
3694
|
+
...addProperties[direction][stdioItem.type](stdioItem, options)
|
|
3796
3695
|
};
|
|
3797
3696
|
};
|
|
3798
3697
|
const cleanupCustomStreams = (fileDescriptors) => {
|
|
3799
3698
|
for (const { stdioItems } of fileDescriptors) for (const { stream } of stdioItems) if (stream !== void 0 && !isStandardStream(stream)) stream.destroy();
|
|
3800
3699
|
};
|
|
3801
3700
|
const forwardStdio = (stdioItems) => {
|
|
3802
|
-
if (stdioItems.length > 1) return stdioItems.some(({ value
|
|
3701
|
+
if (stdioItems.length > 1) return stdioItems.some(({ value }) => value === "overlapped") ? "overlapped" : "pipe";
|
|
3803
3702
|
const [{ type, value }] = stdioItems;
|
|
3804
3703
|
return type === "native" ? value : "pipe";
|
|
3805
3704
|
};
|
|
3806
|
-
|
|
3807
3705
|
//#endregion
|
|
3808
3706
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/stdio/handle-sync.js
|
|
3809
3707
|
const handleStdioSync = (options, verboseInfo) => handleStdio(addPropertiesSync, options, verboseInfo, true);
|
|
@@ -3850,12 +3748,10 @@ const addPropertiesSync = {
|
|
|
3850
3748
|
uint8Array: forbiddenIfSync
|
|
3851
3749
|
}
|
|
3852
3750
|
};
|
|
3853
|
-
|
|
3854
3751
|
//#endregion
|
|
3855
3752
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/io/strip-newline.js
|
|
3856
3753
|
const stripNewline = (value, { stripFinalNewline: stripFinalNewline$1 }, fdNumber) => getStripFinalNewline(stripFinalNewline$1, fdNumber) && value !== void 0 && !Array.isArray(value) ? stripFinalNewline(value) : value;
|
|
3857
|
-
const getStripFinalNewline = (stripFinalNewline
|
|
3858
|
-
|
|
3754
|
+
const getStripFinalNewline = (stripFinalNewline, fdNumber) => fdNumber === "all" ? stripFinalNewline[1] || stripFinalNewline[2] : stripFinalNewline[fdNumber];
|
|
3859
3755
|
//#endregion
|
|
3860
3756
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/transform/split.js
|
|
3861
3757
|
const getSplitLinesGenerator = (binary, preserveNewlines, skipped, state) => binary || skipped ? void 0 : initializeSplitLines(preserveNewlines, state);
|
|
@@ -3901,8 +3797,8 @@ const linesFinal = function* ({ previousChunks }) {
|
|
|
3901
3797
|
};
|
|
3902
3798
|
const getAppendNewlineGenerator = ({ binary, preserveNewlines, readableObjectMode, state }) => binary || preserveNewlines || readableObjectMode ? void 0 : { transform: appendNewlineGenerator.bind(void 0, state) };
|
|
3903
3799
|
const appendNewlineGenerator = function* ({ isWindowsNewline = false }, chunk) {
|
|
3904
|
-
const { unixNewline, windowsNewline, LF
|
|
3905
|
-
if (chunk.at(-1) === LF
|
|
3800
|
+
const { unixNewline, windowsNewline, LF, concatBytes } = typeof chunk === "string" ? linesStringInfo : linesUint8ArrayInfo;
|
|
3801
|
+
if (chunk.at(-1) === LF) {
|
|
3906
3802
|
yield chunk;
|
|
3907
3803
|
return;
|
|
3908
3804
|
}
|
|
@@ -3927,7 +3823,6 @@ const linesUint8ArrayInfo = {
|
|
|
3927
3823
|
LF: 10,
|
|
3928
3824
|
concatBytes: concatUint8Array
|
|
3929
3825
|
};
|
|
3930
|
-
|
|
3931
3826
|
//#endregion
|
|
3932
3827
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/transform/validate.js
|
|
3933
3828
|
const getValidateTransformInput = (writableObjectMode, optionName) => writableObjectMode ? void 0 : validateStringTransformInput.bind(void 0, optionName);
|
|
@@ -3950,7 +3845,6 @@ const validateEmptyReturn = (optionName, chunk) => {
|
|
|
3950
3845
|
Instead, \`yield\` should either be called with a value, or not be called at all. For example:
|
|
3951
3846
|
if (condition) { yield value; }`);
|
|
3952
3847
|
};
|
|
3953
|
-
|
|
3954
3848
|
//#endregion
|
|
3955
3849
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/transform/encoding-transform.js
|
|
3956
3850
|
const getEncodingTransformGenerator = (binary, encoding, skipped) => {
|
|
@@ -3962,9 +3856,9 @@ const getEncodingTransformGenerator = (binary, encoding, skipped) => {
|
|
|
3962
3856
|
final: encodingStringFinal.bind(void 0, stringDecoder)
|
|
3963
3857
|
};
|
|
3964
3858
|
};
|
|
3965
|
-
const encodingUint8ArrayGenerator = function* (textEncoder
|
|
3859
|
+
const encodingUint8ArrayGenerator = function* (textEncoder, chunk) {
|
|
3966
3860
|
if (Buffer$1.isBuffer(chunk)) yield bufferToUint8Array(chunk);
|
|
3967
|
-
else if (typeof chunk === "string") yield textEncoder
|
|
3861
|
+
else if (typeof chunk === "string") yield textEncoder.encode(chunk);
|
|
3968
3862
|
else yield chunk;
|
|
3969
3863
|
};
|
|
3970
3864
|
const encodingStringGenerator = function* (stringDecoder, chunk) {
|
|
@@ -3974,7 +3868,6 @@ const encodingStringFinal = function* (stringDecoder) {
|
|
|
3974
3868
|
const lastChunk = stringDecoder.end();
|
|
3975
3869
|
if (lastChunk !== "") yield lastChunk;
|
|
3976
3870
|
};
|
|
3977
|
-
|
|
3978
3871
|
//#endregion
|
|
3979
3872
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/transform/run-async.js
|
|
3980
3873
|
const pushChunks = callbackify(async (getChunks, state, getChunksArguments, transformStream) => {
|
|
@@ -4010,7 +3903,6 @@ const destroyTransform = callbackify(async ({ currentIterable }, error) => {
|
|
|
4010
3903
|
const identityGenerator$1 = function* (chunk) {
|
|
4011
3904
|
yield chunk;
|
|
4012
3905
|
};
|
|
4013
|
-
|
|
4014
3906
|
//#endregion
|
|
4015
3907
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/transform/run-sync.js
|
|
4016
3908
|
const pushChunksSync = (getChunksSync, getChunksArguments, transformStream, done) => {
|
|
@@ -4040,7 +3932,6 @@ const generatorFinalChunksSync = function* (final, index, generators) {
|
|
|
4040
3932
|
const identityGenerator = function* (chunk) {
|
|
4041
3933
|
yield chunk;
|
|
4042
3934
|
};
|
|
4043
|
-
|
|
4044
3935
|
//#endregion
|
|
4045
3936
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/transform/generator.js
|
|
4046
3937
|
const generatorToStream = ({ value, value: { transform, final, writableObjectMode, readableObjectMode }, optionName }, { encoding }) => {
|
|
@@ -4056,7 +3947,7 @@ const generatorToStream = ({ value, value: { transform, final, writableObjectMod
|
|
|
4056
3947
|
writableHighWaterMark: getDefaultHighWaterMark(writableObjectMode),
|
|
4057
3948
|
readableObjectMode,
|
|
4058
3949
|
readableHighWaterMark: getDefaultHighWaterMark(readableObjectMode),
|
|
4059
|
-
transform(chunk, encoding
|
|
3950
|
+
transform(chunk, encoding, done) {
|
|
4060
3951
|
transformMethod([
|
|
4061
3952
|
chunk,
|
|
4062
3953
|
generators,
|
|
@@ -4094,7 +3985,6 @@ const addInternalGenerators = ({ transform, final, binary, writableObjectMode, r
|
|
|
4094
3985
|
})
|
|
4095
3986
|
].filter(Boolean);
|
|
4096
3987
|
};
|
|
4097
|
-
|
|
4098
3988
|
//#endregion
|
|
4099
3989
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/io/input-sync.js
|
|
4100
3990
|
const addInputOptionsSync = (fileDescriptors, options) => {
|
|
@@ -4120,7 +4010,6 @@ const validateSerializable = (newContents) => {
|
|
|
4120
4010
|
const invalidItem = newContents.find((item) => typeof item !== "string" && !isUint8Array(item));
|
|
4121
4011
|
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}.`);
|
|
4122
4012
|
};
|
|
4123
|
-
|
|
4124
4013
|
//#endregion
|
|
4125
4014
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/verbose/output.js
|
|
4126
4015
|
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)));
|
|
@@ -4141,7 +4030,6 @@ const logLine = (line, fdNumber, verboseInfo) => {
|
|
|
4141
4030
|
verboseInfo
|
|
4142
4031
|
});
|
|
4143
4032
|
};
|
|
4144
|
-
|
|
4145
4033
|
//#endregion
|
|
4146
4034
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/io/output-sync.js
|
|
4147
4035
|
const transformOutputSync = ({ fileDescriptors, syncResult: { output }, options, isMaxBuffer, verboseInfo }) => {
|
|
@@ -4161,7 +4049,7 @@ const transformOutputSync = ({ fileDescriptors, syncResult: { output }, options,
|
|
|
4161
4049
|
...state
|
|
4162
4050
|
};
|
|
4163
4051
|
};
|
|
4164
|
-
const transformOutputResultSync = ({ result, fileDescriptors, fdNumber, state, outputFiles, isMaxBuffer, verboseInfo }, { buffer, encoding, lines, stripFinalNewline
|
|
4052
|
+
const transformOutputResultSync = ({ result, fileDescriptors, fdNumber, state, outputFiles, isMaxBuffer, verboseInfo }, { buffer, encoding, lines, stripFinalNewline, maxBuffer }) => {
|
|
4165
4053
|
if (result === null) return;
|
|
4166
4054
|
const uint8ArrayResult = bufferToUint8Array(truncateMaxBufferSync(result, isMaxBuffer, maxBuffer));
|
|
4167
4055
|
const { stdioItems, objectMode } = fileDescriptors[fdNumber];
|
|
@@ -4170,7 +4058,7 @@ const transformOutputResultSync = ({ result, fileDescriptors, fdNumber, state, o
|
|
|
4170
4058
|
objectMode,
|
|
4171
4059
|
encoding,
|
|
4172
4060
|
lines,
|
|
4173
|
-
stripFinalNewline
|
|
4061
|
+
stripFinalNewline,
|
|
4174
4062
|
fdNumber
|
|
4175
4063
|
});
|
|
4176
4064
|
logOutputSync({
|
|
@@ -4199,13 +4087,13 @@ const runOutputGeneratorsSync = (chunks, stdioItems, encoding, state) => {
|
|
|
4199
4087
|
return chunks;
|
|
4200
4088
|
}
|
|
4201
4089
|
};
|
|
4202
|
-
const serializeChunks = ({ chunks, objectMode, encoding, lines, stripFinalNewline
|
|
4090
|
+
const serializeChunks = ({ chunks, objectMode, encoding, lines, stripFinalNewline, fdNumber }) => {
|
|
4203
4091
|
if (objectMode) return { serializedResult: chunks };
|
|
4204
4092
|
if (encoding === "buffer") return { serializedResult: joinToUint8Array(chunks) };
|
|
4205
4093
|
const serializedResult = joinToString(chunks, encoding);
|
|
4206
4094
|
if (lines[fdNumber]) return {
|
|
4207
4095
|
serializedResult,
|
|
4208
|
-
finalResult: splitLinesSync(serializedResult, !stripFinalNewline
|
|
4096
|
+
finalResult: splitLinesSync(serializedResult, !stripFinalNewline[fdNumber], objectMode)
|
|
4209
4097
|
};
|
|
4210
4098
|
return { serializedResult };
|
|
4211
4099
|
};
|
|
@@ -4224,16 +4112,15 @@ const logOutputSync = ({ serializedResult, fdNumber, state, verboseInfo, encodin
|
|
|
4224
4112
|
}
|
|
4225
4113
|
};
|
|
4226
4114
|
const writeToFiles = (serializedResult, stdioItems, outputFiles) => {
|
|
4227
|
-
for (const { path
|
|
4228
|
-
const pathString = typeof path
|
|
4229
|
-
if (append || outputFiles.has(pathString)) appendFileSync(path
|
|
4115
|
+
for (const { path, append } of stdioItems.filter(({ type }) => FILE_TYPES.has(type))) {
|
|
4116
|
+
const pathString = typeof path === "string" ? path : path.toString();
|
|
4117
|
+
if (append || outputFiles.has(pathString)) appendFileSync(path, serializedResult);
|
|
4230
4118
|
else {
|
|
4231
4119
|
outputFiles.add(pathString);
|
|
4232
|
-
writeFileSync(path
|
|
4120
|
+
writeFileSync(path, serializedResult);
|
|
4233
4121
|
}
|
|
4234
4122
|
}
|
|
4235
4123
|
};
|
|
4236
|
-
|
|
4237
4124
|
//#endregion
|
|
4238
4125
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/resolve/all-sync.js
|
|
4239
4126
|
const getAllSync = ([, stdout, stderr], options) => {
|
|
@@ -4245,7 +4132,6 @@ const getAllSync = ([, stdout, stderr], options) => {
|
|
|
4245
4132
|
if (isUint8Array(stdout) && isUint8Array(stderr)) return concatUint8Arrays([stdout, stderr]);
|
|
4246
4133
|
return `${stdout}${stderr}`;
|
|
4247
4134
|
};
|
|
4248
|
-
|
|
4249
4135
|
//#endregion
|
|
4250
4136
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/resolve/exit-async.js
|
|
4251
4137
|
const waitForExit = async (subprocess, context) => {
|
|
@@ -4272,7 +4158,6 @@ const waitForSuccessfulExit = async (exitPromise) => {
|
|
|
4272
4158
|
};
|
|
4273
4159
|
const isSubprocessErrorExit = (exitCode, signal) => exitCode === void 0 && signal === void 0;
|
|
4274
4160
|
const isFailedExit = (exitCode, signal) => exitCode !== 0 || signal !== null;
|
|
4275
|
-
|
|
4276
4161
|
//#endregion
|
|
4277
4162
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/resolve/exit-sync.js
|
|
4278
4163
|
const getExitResultSync = ({ error, status: exitCode, signal, output }, { maxBuffer }) => {
|
|
@@ -4289,7 +4174,6 @@ const getResultError = (error, exitCode, signal) => {
|
|
|
4289
4174
|
if (error !== void 0) return error;
|
|
4290
4175
|
return isFailedExit(exitCode, signal) ? new DiscardedError() : void 0;
|
|
4291
4176
|
};
|
|
4292
|
-
|
|
4293
4177
|
//#endregion
|
|
4294
4178
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/methods/main-sync.js
|
|
4295
4179
|
const execaCoreSync = (rawFile, rawArguments, rawOptions) => {
|
|
@@ -4382,7 +4266,7 @@ const runSubprocessSync = ({ file, commandArguments, options, command, escapedCo
|
|
|
4382
4266
|
});
|
|
4383
4267
|
}
|
|
4384
4268
|
};
|
|
4385
|
-
const normalizeSpawnSyncOptions = ({ encoding, maxBuffer
|
|
4269
|
+
const normalizeSpawnSyncOptions = ({ encoding, maxBuffer, ...options }) => ({
|
|
4386
4270
|
...options,
|
|
4387
4271
|
encoding: "buffer",
|
|
4388
4272
|
maxBuffer: getMaxBufferSync(maxBuffer)
|
|
@@ -4413,7 +4297,6 @@ const getSyncResult = ({ error, exitCode, signal, timedOut, isMaxBuffer, stdio,
|
|
|
4413
4297
|
startTime,
|
|
4414
4298
|
isSync: true
|
|
4415
4299
|
});
|
|
4416
|
-
|
|
4417
4300
|
//#endregion
|
|
4418
4301
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/ipc/get-one.js
|
|
4419
4302
|
const getOneMessage$1 = ({ anyProcess, channel, isSubprocess, ipc }, { reference = true, filter } = {}) => {
|
|
@@ -4464,7 +4347,6 @@ const throwOnStrictError = async (ipcEmitter, isSubprocess, { signal }) => {
|
|
|
4464
4347
|
const [error] = await once(ipcEmitter, "strict:error", { signal });
|
|
4465
4348
|
throw getStrictResponseError(error, isSubprocess);
|
|
4466
4349
|
};
|
|
4467
|
-
|
|
4468
4350
|
//#endregion
|
|
4469
4351
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/ipc/get-each.js
|
|
4470
4352
|
const getEachMessage$1 = ({ anyProcess, channel, isSubprocess, ipc }, { reference = true } = {}) => loopOnMessages({
|
|
@@ -4535,7 +4417,6 @@ const iterateOnMessages = async function* ({ anyProcess, channel, ipcEmitter, is
|
|
|
4535
4417
|
const throwIfStrictError = ({ error }) => {
|
|
4536
4418
|
if (error) throw error;
|
|
4537
4419
|
};
|
|
4538
|
-
|
|
4539
4420
|
//#endregion
|
|
4540
4421
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/ipc/methods.js
|
|
4541
4422
|
const addIpcMethods = (subprocess, { ipc }) => {
|
|
@@ -4575,7 +4456,6 @@ const getIpcMethods = (anyProcess, isSubprocess, ipc) => ({
|
|
|
4575
4456
|
ipc
|
|
4576
4457
|
})
|
|
4577
4458
|
});
|
|
4578
|
-
|
|
4579
4459
|
//#endregion
|
|
4580
4460
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/return/early-error.js
|
|
4581
4461
|
const handleEarlyError = ({ error, command, escapedCommand, fileDescriptors, options, startTime, verboseInfo }) => {
|
|
@@ -4632,7 +4512,6 @@ const duplex = () => new Duplex({
|
|
|
4632
4512
|
write() {}
|
|
4633
4513
|
});
|
|
4634
4514
|
const handleDummyPromise = async (error, verboseInfo, options) => handleResult(error, verboseInfo, options);
|
|
4635
|
-
|
|
4636
4515
|
//#endregion
|
|
4637
4516
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/stdio/handle-async.js
|
|
4638
4517
|
const handleStdioAsync = (options, verboseInfo) => handleStdio(addPropertiesAsync, options, verboseInfo, false);
|
|
@@ -4673,7 +4552,6 @@ const addPropertiesAsync = {
|
|
|
4673
4552
|
uint8Array: forbiddenIfAsync
|
|
4674
4553
|
}
|
|
4675
4554
|
};
|
|
4676
|
-
|
|
4677
4555
|
//#endregion
|
|
4678
4556
|
//#region ../../node_modules/.pnpm/@sindresorhus+merge-streams@4.0.0/node_modules/@sindresorhus/merge-streams/index.js
|
|
4679
4557
|
function mergeStreams(streams) {
|
|
@@ -4756,7 +4634,7 @@ const onInputStreamsUnpipe = async (passThroughStream, streams, unpipeEvent, { s
|
|
|
4756
4634
|
const validateStream = (stream) => {
|
|
4757
4635
|
if (typeof stream?.pipe !== "function") throw new TypeError(`Expected a readable stream, got: \`${typeof stream}\`.`);
|
|
4758
4636
|
};
|
|
4759
|
-
const endWhenStreamsDone = async ({ passThroughStream, stream, streams, ended, aborted
|
|
4637
|
+
const endWhenStreamsDone = async ({ passThroughStream, stream, streams, ended, aborted, onFinished, unpipeEvent }) => {
|
|
4760
4638
|
updateMaxListeners(passThroughStream, PASSTHROUGH_LISTENERS_PER_STREAM);
|
|
4761
4639
|
const controller = new AbortController();
|
|
4762
4640
|
try {
|
|
@@ -4767,14 +4645,14 @@ const endWhenStreamsDone = async ({ passThroughStream, stream, streams, ended, a
|
|
|
4767
4645
|
stream,
|
|
4768
4646
|
streams,
|
|
4769
4647
|
ended,
|
|
4770
|
-
aborted
|
|
4648
|
+
aborted,
|
|
4771
4649
|
controller
|
|
4772
4650
|
}),
|
|
4773
4651
|
onInputStreamUnpipe({
|
|
4774
4652
|
stream,
|
|
4775
4653
|
streams,
|
|
4776
4654
|
ended,
|
|
4777
|
-
aborted
|
|
4655
|
+
aborted,
|
|
4778
4656
|
unpipeEvent,
|
|
4779
4657
|
controller
|
|
4780
4658
|
})
|
|
@@ -4783,7 +4661,7 @@ const endWhenStreamsDone = async ({ passThroughStream, stream, streams, ended, a
|
|
|
4783
4661
|
controller.abort();
|
|
4784
4662
|
updateMaxListeners(passThroughStream, -PASSTHROUGH_LISTENERS_PER_STREAM);
|
|
4785
4663
|
}
|
|
4786
|
-
if (streams.size > 0 && streams.size === ended.size + aborted
|
|
4664
|
+
if (streams.size > 0 && streams.size === ended.size + aborted.size) if (ended.size === 0 && aborted.size > 0) abortStream(passThroughStream);
|
|
4787
4665
|
else endStream(passThroughStream);
|
|
4788
4666
|
};
|
|
4789
4667
|
const afterMergedStreamFinished = async (onFinished, stream, { signal }) => {
|
|
@@ -4794,7 +4672,7 @@ const afterMergedStreamFinished = async (onFinished, stream, { signal }) => {
|
|
|
4794
4672
|
if (!signal.aborted) errorOrAbortStream(stream, error);
|
|
4795
4673
|
}
|
|
4796
4674
|
};
|
|
4797
|
-
const onInputStreamEnd = async ({ passThroughStream, stream, streams, ended, aborted
|
|
4675
|
+
const onInputStreamEnd = async ({ passThroughStream, stream, streams, ended, aborted, controller: { signal } }) => {
|
|
4798
4676
|
try {
|
|
4799
4677
|
await finished(stream, {
|
|
4800
4678
|
signal,
|
|
@@ -4805,16 +4683,16 @@ const onInputStreamEnd = async ({ passThroughStream, stream, streams, ended, abo
|
|
|
4805
4683
|
if (streams.has(stream)) ended.add(stream);
|
|
4806
4684
|
} catch (error) {
|
|
4807
4685
|
if (signal.aborted || !streams.has(stream)) return;
|
|
4808
|
-
if (isAbortError(error)) aborted
|
|
4686
|
+
if (isAbortError(error)) aborted.add(stream);
|
|
4809
4687
|
else errorStream(passThroughStream, error);
|
|
4810
4688
|
}
|
|
4811
4689
|
};
|
|
4812
|
-
const onInputStreamUnpipe = async ({ stream, streams, ended, aborted
|
|
4690
|
+
const onInputStreamUnpipe = async ({ stream, streams, ended, aborted, unpipeEvent, controller: { signal } }) => {
|
|
4813
4691
|
await once(stream, unpipeEvent, { signal });
|
|
4814
4692
|
if (!stream.readable) return once(signal, "abort", { signal });
|
|
4815
4693
|
streams.delete(stream);
|
|
4816
4694
|
ended.delete(stream);
|
|
4817
|
-
aborted
|
|
4695
|
+
aborted.delete(stream);
|
|
4818
4696
|
};
|
|
4819
4697
|
const endStream = (stream) => {
|
|
4820
4698
|
if (stream.writable) stream.end();
|
|
@@ -4834,13 +4712,12 @@ const errorStream = (stream, error) => {
|
|
|
4834
4712
|
}
|
|
4835
4713
|
};
|
|
4836
4714
|
const noop = () => {};
|
|
4837
|
-
const updateMaxListeners = (passThroughStream, increment
|
|
4715
|
+
const updateMaxListeners = (passThroughStream, increment) => {
|
|
4838
4716
|
const maxListeners = passThroughStream.getMaxListeners();
|
|
4839
|
-
if (maxListeners !== 0 && maxListeners !== Number.POSITIVE_INFINITY) passThroughStream.setMaxListeners(maxListeners + increment
|
|
4717
|
+
if (maxListeners !== 0 && maxListeners !== Number.POSITIVE_INFINITY) passThroughStream.setMaxListeners(maxListeners + increment);
|
|
4840
4718
|
};
|
|
4841
4719
|
const PASSTHROUGH_LISTENERS_COUNT = 2;
|
|
4842
4720
|
const PASSTHROUGH_LISTENERS_PER_STREAM = 1;
|
|
4843
|
-
|
|
4844
4721
|
//#endregion
|
|
4845
4722
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/io/pipeline.js
|
|
4846
4723
|
const pipeStreams = (source, destination) => {
|
|
@@ -4876,7 +4753,6 @@ const onDestinationFinish = async (source, destination) => {
|
|
|
4876
4753
|
const abortSourceStream = (source) => {
|
|
4877
4754
|
if (source.readable) source.destroy();
|
|
4878
4755
|
};
|
|
4879
|
-
|
|
4880
4756
|
//#endregion
|
|
4881
4757
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/io/output-async.js
|
|
4882
4758
|
const pipeOutputAsync = (subprocess, fileDescriptors, controller) => {
|
|
@@ -4917,7 +4793,6 @@ const setStandardStreamMaxListeners = (stream, { signal }) => {
|
|
|
4917
4793
|
if (isStandardStream(stream)) incrementMaxListeners(stream, MAX_LISTENERS_INCREMENT, signal);
|
|
4918
4794
|
};
|
|
4919
4795
|
const MAX_LISTENERS_INCREMENT = 2;
|
|
4920
|
-
|
|
4921
4796
|
//#endregion
|
|
4922
4797
|
//#region ../../node_modules/.pnpm/signal-exit@4.1.0/node_modules/signal-exit/dist/mjs/signals.js
|
|
4923
4798
|
/**
|
|
@@ -4950,10 +4825,9 @@ const signals = [];
|
|
|
4950
4825
|
signals.push("SIGHUP", "SIGINT", "SIGTERM");
|
|
4951
4826
|
if (process.platform !== "win32") signals.push("SIGALRM", "SIGABRT", "SIGVTALRM", "SIGXCPU", "SIGXFSZ", "SIGUSR2", "SIGTRAP", "SIGSYS", "SIGQUIT", "SIGIOT");
|
|
4952
4827
|
if (process.platform === "linux") signals.push("SIGIO", "SIGPOLL", "SIGPWR", "SIGSTKFLT");
|
|
4953
|
-
|
|
4954
4828
|
//#endregion
|
|
4955
4829
|
//#region ../../node_modules/.pnpm/signal-exit@4.1.0/node_modules/signal-exit/dist/mjs/index.js
|
|
4956
|
-
const processOk = (process
|
|
4830
|
+
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";
|
|
4957
4831
|
const kExitEmitter = Symbol.for("signal-exit emitter");
|
|
4958
4832
|
const global$1 = globalThis;
|
|
4959
4833
|
const ObjectDefineProperty = Object.defineProperty.bind(Object);
|
|
@@ -4982,12 +4856,12 @@ var Emitter = class {
|
|
|
4982
4856
|
}
|
|
4983
4857
|
removeListener(ev, fn) {
|
|
4984
4858
|
const list = this.listeners[ev];
|
|
4985
|
-
const i
|
|
4859
|
+
const i = list.indexOf(fn);
|
|
4986
4860
|
/* c8 ignore start */
|
|
4987
|
-
if (i
|
|
4861
|
+
if (i === -1) return;
|
|
4988
4862
|
/* c8 ignore stop */
|
|
4989
|
-
if (i
|
|
4990
|
-
else list.splice(i
|
|
4863
|
+
if (i === 0 && list.length === 1) list.length = 0;
|
|
4864
|
+
else list.splice(i, 1);
|
|
4991
4865
|
}
|
|
4992
4866
|
emit(ev, code, signal) {
|
|
4993
4867
|
if (this.emitted[ev]) return false;
|
|
@@ -5029,27 +4903,27 @@ var SignalExit = class extends SignalExitBase {
|
|
|
5029
4903
|
#originalProcessReallyExit;
|
|
5030
4904
|
#sigListeners = {};
|
|
5031
4905
|
#loaded = false;
|
|
5032
|
-
constructor(process
|
|
4906
|
+
constructor(process) {
|
|
5033
4907
|
super();
|
|
5034
|
-
this.#process = process
|
|
4908
|
+
this.#process = process;
|
|
5035
4909
|
this.#sigListeners = {};
|
|
5036
4910
|
for (const sig of signals) this.#sigListeners[sig] = () => {
|
|
5037
4911
|
const listeners = this.#process.listeners(sig);
|
|
5038
|
-
let { count
|
|
4912
|
+
let { count } = this.#emitter;
|
|
5039
4913
|
/* c8 ignore start */
|
|
5040
|
-
const p = process
|
|
5041
|
-
if (typeof p.__signal_exit_emitter__ === "object" && typeof p.__signal_exit_emitter__.count === "number") count
|
|
4914
|
+
const p = process;
|
|
4915
|
+
if (typeof p.__signal_exit_emitter__ === "object" && typeof p.__signal_exit_emitter__.count === "number") count += p.__signal_exit_emitter__.count;
|
|
5042
4916
|
/* c8 ignore stop */
|
|
5043
|
-
if (listeners.length === count
|
|
4917
|
+
if (listeners.length === count) {
|
|
5044
4918
|
this.unload();
|
|
5045
4919
|
const ret = this.#emitter.emit("exit", null, sig);
|
|
5046
4920
|
/* c8 ignore start */
|
|
5047
4921
|
const s = sig === "SIGHUP" ? this.#hupSig : sig;
|
|
5048
|
-
if (!ret) process
|
|
4922
|
+
if (!ret) process.kill(process.pid, s);
|
|
5049
4923
|
}
|
|
5050
4924
|
};
|
|
5051
|
-
this.#originalProcessReallyExit = process
|
|
5052
|
-
this.#originalProcessEmit = process
|
|
4925
|
+
this.#originalProcessReallyExit = process.reallyExit;
|
|
4926
|
+
this.#originalProcessEmit = process.emit;
|
|
5053
4927
|
}
|
|
5054
4928
|
onExit(cb, opts) {
|
|
5055
4929
|
/* c8 ignore start */
|
|
@@ -5071,8 +4945,8 @@ var SignalExit = class extends SignalExitBase {
|
|
|
5071
4945
|
const fn = this.#sigListeners[sig];
|
|
5072
4946
|
if (fn) this.#process.on(sig, fn);
|
|
5073
4947
|
} catch (_) {}
|
|
5074
|
-
this.#process.emit = (ev, ...a
|
|
5075
|
-
return this.#processEmit(ev, ...a
|
|
4948
|
+
this.#process.emit = (ev, ...a) => {
|
|
4949
|
+
return this.#processEmit(ev, ...a);
|
|
5076
4950
|
};
|
|
5077
4951
|
this.#process.reallyExit = (code) => {
|
|
5078
4952
|
return this.#processReallyExit(code);
|
|
@@ -5118,7 +4992,6 @@ var SignalExit = class extends SignalExitBase {
|
|
|
5118
4992
|
};
|
|
5119
4993
|
const process$2 = globalThis.process;
|
|
5120
4994
|
const { onExit, load, unload } = signalExitWrap(processOk(process$2) ? new SignalExit(process$2) : new SignalExitFallback());
|
|
5121
|
-
|
|
5122
4995
|
//#endregion
|
|
5123
4996
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/terminate/cleanup.js
|
|
5124
4997
|
const cleanupOnExit = (subprocess, { cleanup, detached }, { signal }) => {
|
|
@@ -5130,7 +5003,6 @@ const cleanupOnExit = (subprocess, { cleanup, detached }, { signal }) => {
|
|
|
5130
5003
|
removeExitHandler();
|
|
5131
5004
|
});
|
|
5132
5005
|
};
|
|
5133
|
-
|
|
5134
5006
|
//#endregion
|
|
5135
5007
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/pipe/pipe-arguments.js
|
|
5136
5008
|
const normalizePipeArguments = ({ source, sourcePromise, boundOptions, createNested }, ...pipeArguments) => {
|
|
@@ -5198,7 +5070,6 @@ const getSourceStream = (source, from) => {
|
|
|
5198
5070
|
return { sourceError: error };
|
|
5199
5071
|
}
|
|
5200
5072
|
};
|
|
5201
|
-
|
|
5202
5073
|
//#endregion
|
|
5203
5074
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/pipe/throw.js
|
|
5204
5075
|
const handlePipeArgumentsError = ({ sourceStream, sourceError, destinationStream, destinationError, fileDescriptors, sourceOptions, startTime }) => {
|
|
@@ -5236,7 +5107,6 @@ const createNonCommandError = ({ error, fileDescriptors, sourceOptions, startTim
|
|
|
5236
5107
|
isSync: false
|
|
5237
5108
|
});
|
|
5238
5109
|
const PIPE_COMMAND_MESSAGE = "source.pipe(destination)";
|
|
5239
|
-
|
|
5240
5110
|
//#endregion
|
|
5241
5111
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/pipe/sequence.js
|
|
5242
5112
|
const waitForBothSubprocesses = async (subprocessPromises) => {
|
|
@@ -5246,7 +5116,6 @@ const waitForBothSubprocesses = async (subprocessPromises) => {
|
|
|
5246
5116
|
if (sourceStatus === "rejected") throw sourceResult;
|
|
5247
5117
|
return destinationResult;
|
|
5248
5118
|
};
|
|
5249
|
-
|
|
5250
5119
|
//#endregion
|
|
5251
5120
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/pipe/streaming.js
|
|
5252
5121
|
const pipeSubprocessStream = (sourceStream, destinationStream, maxListenersController) => {
|
|
@@ -5280,7 +5149,6 @@ const cleanupMergedStreamsMap = async (destinationStream) => {
|
|
|
5280
5149
|
const MERGED_STREAMS = /* @__PURE__ */ new WeakMap();
|
|
5281
5150
|
const SOURCE_LISTENERS_PER_PIPE = 2;
|
|
5282
5151
|
const DESTINATION_LISTENERS_PER_PIPE = 1;
|
|
5283
|
-
|
|
5284
5152
|
//#endregion
|
|
5285
5153
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/pipe/abort.js
|
|
5286
5154
|
const unpipeOnAbort = (unpipeSignal, unpipeContext) => unpipeSignal === void 0 ? [] : [unpipeOnSignalAbort(unpipeSignal, unpipeContext)];
|
|
@@ -5294,7 +5162,6 @@ const unpipeOnSignalAbort = async (unpipeSignal, { sourceStream, mergedStream, f
|
|
|
5294
5162
|
startTime
|
|
5295
5163
|
});
|
|
5296
5164
|
};
|
|
5297
|
-
|
|
5298
5165
|
//#endregion
|
|
5299
5166
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/pipe/setup.js
|
|
5300
5167
|
const pipeToSubprocess = (sourceInfo, ...pipeArguments) => {
|
|
@@ -5305,7 +5172,7 @@ const pipeToSubprocess = (sourceInfo, ...pipeArguments) => {
|
|
|
5305
5172
|
...pipeArguments[0]
|
|
5306
5173
|
}
|
|
5307
5174
|
});
|
|
5308
|
-
const { destination
|
|
5175
|
+
const { destination, ...normalizedInfo } = normalizePipeArguments(sourceInfo, ...pipeArguments);
|
|
5309
5176
|
const promise = handlePipePromise({
|
|
5310
5177
|
...normalizedInfo,
|
|
5311
5178
|
destination
|
|
@@ -5344,7 +5211,6 @@ const handlePipePromise = async ({ sourcePromise, sourceStream, sourceOptions, s
|
|
|
5344
5211
|
}
|
|
5345
5212
|
};
|
|
5346
5213
|
const getSubprocessPromises = (sourcePromise, destination) => Promise.allSettled([sourcePromise, destination]);
|
|
5347
|
-
|
|
5348
5214
|
//#endregion
|
|
5349
5215
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/io/iterate.js
|
|
5350
5216
|
const iterateOnSubprocessStream = ({ subprocessStdout, subprocess, binary, shouldEncode, encoding, preserveNewlines }) => {
|
|
@@ -5367,7 +5233,7 @@ const stopReadingOnExit = async (subprocess, controller) => {
|
|
|
5367
5233
|
controller.abort();
|
|
5368
5234
|
}
|
|
5369
5235
|
};
|
|
5370
|
-
const iterateForResult = ({ stream, onStreamEnd, lines, encoding, stripFinalNewline
|
|
5236
|
+
const iterateForResult = ({ stream, onStreamEnd, lines, encoding, stripFinalNewline, allMixed }) => {
|
|
5371
5237
|
const controller = new AbortController();
|
|
5372
5238
|
stopReadingOnStreamEnd(onStreamEnd, controller, stream);
|
|
5373
5239
|
const objectMode = stream.readableObjectMode && !allMixed;
|
|
@@ -5378,7 +5244,7 @@ const iterateForResult = ({ stream, onStreamEnd, lines, encoding, stripFinalNewl
|
|
|
5378
5244
|
shouldEncode: !objectMode,
|
|
5379
5245
|
encoding,
|
|
5380
5246
|
shouldSplit: !objectMode && lines,
|
|
5381
|
-
preserveNewlines: !stripFinalNewline
|
|
5247
|
+
preserveNewlines: !stripFinalNewline
|
|
5382
5248
|
});
|
|
5383
5249
|
};
|
|
5384
5250
|
const stopReadingOnStreamEnd = async (onStreamEnd, controller, stream) => {
|
|
@@ -5424,10 +5290,9 @@ const iterateOnData = async function* ({ onStdoutChunk, controller, binary, shou
|
|
|
5424
5290
|
}
|
|
5425
5291
|
};
|
|
5426
5292
|
const getGenerators = ({ binary, shouldEncode, encoding, shouldSplit, preserveNewlines }) => [getEncodingTransformGenerator(binary, encoding, !shouldEncode), getSplitLinesGenerator(binary, preserveNewlines, !shouldSplit, {})].filter(Boolean);
|
|
5427
|
-
|
|
5428
5293
|
//#endregion
|
|
5429
5294
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/io/contents.js
|
|
5430
|
-
const getStreamOutput = async ({ stream, onStreamEnd, fdNumber, encoding, buffer, maxBuffer, lines, allMixed, stripFinalNewline
|
|
5295
|
+
const getStreamOutput = async ({ stream, onStreamEnd, fdNumber, encoding, buffer, maxBuffer, lines, allMixed, stripFinalNewline, verboseInfo, streamInfo }) => {
|
|
5431
5296
|
const logPromise = logOutputAsync({
|
|
5432
5297
|
stream,
|
|
5433
5298
|
onStreamEnd,
|
|
@@ -5446,7 +5311,7 @@ const getStreamOutput = async ({ stream, onStreamEnd, fdNumber, encoding, buffer
|
|
|
5446
5311
|
onStreamEnd,
|
|
5447
5312
|
lines,
|
|
5448
5313
|
encoding,
|
|
5449
|
-
stripFinalNewline: getStripFinalNewline(stripFinalNewline
|
|
5314
|
+
stripFinalNewline: getStripFinalNewline(stripFinalNewline, fdNumber),
|
|
5450
5315
|
allMixed
|
|
5451
5316
|
});
|
|
5452
5317
|
const [output] = await Promise.all([getStreamContents({
|
|
@@ -5503,7 +5368,6 @@ const getBufferedData = async (streamPromise) => {
|
|
|
5503
5368
|
}
|
|
5504
5369
|
};
|
|
5505
5370
|
const handleBufferedData = ({ bufferedData }) => isArrayBuffer(bufferedData) ? new Uint8Array(bufferedData) : bufferedData;
|
|
5506
|
-
|
|
5507
5371
|
//#endregion
|
|
5508
5372
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/resolve/wait-stream.js
|
|
5509
5373
|
const waitForStream = async (stream, fdNumber, streamInfo, { isSameDirection, stopOnExit = false } = {}) => {
|
|
@@ -5546,10 +5410,9 @@ const shouldIgnoreStreamError = (error, fdNumber, streamInfo, isSameDirection =
|
|
|
5546
5410
|
const isInputFileDescriptor = ({ fileDescriptors }, fdNumber) => fdNumber !== "all" && fileDescriptors[fdNumber].direction === "input";
|
|
5547
5411
|
const isStreamAbort = (error) => error?.code === "ERR_STREAM_PREMATURE_CLOSE";
|
|
5548
5412
|
const isStreamEpipe = (error) => error?.code === "EPIPE";
|
|
5549
|
-
|
|
5550
5413
|
//#endregion
|
|
5551
5414
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/resolve/stdio.js
|
|
5552
|
-
const waitForStdioStreams = ({ subprocess, encoding, buffer, maxBuffer, lines, stripFinalNewline
|
|
5415
|
+
const waitForStdioStreams = ({ subprocess, encoding, buffer, maxBuffer, lines, stripFinalNewline, verboseInfo, streamInfo }) => subprocess.stdio.map((stream, fdNumber) => waitForSubprocessStream({
|
|
5553
5416
|
stream,
|
|
5554
5417
|
fdNumber,
|
|
5555
5418
|
encoding,
|
|
@@ -5557,11 +5420,11 @@ const waitForStdioStreams = ({ subprocess, encoding, buffer, maxBuffer, lines, s
|
|
|
5557
5420
|
maxBuffer: maxBuffer[fdNumber],
|
|
5558
5421
|
lines: lines[fdNumber],
|
|
5559
5422
|
allMixed: false,
|
|
5560
|
-
stripFinalNewline
|
|
5423
|
+
stripFinalNewline,
|
|
5561
5424
|
verboseInfo,
|
|
5562
5425
|
streamInfo
|
|
5563
5426
|
}));
|
|
5564
|
-
const waitForSubprocessStream = async ({ stream, fdNumber, encoding, buffer, maxBuffer, lines, allMixed, stripFinalNewline
|
|
5427
|
+
const waitForSubprocessStream = async ({ stream, fdNumber, encoding, buffer, maxBuffer, lines, allMixed, stripFinalNewline, verboseInfo, streamInfo }) => {
|
|
5565
5428
|
if (!stream) return;
|
|
5566
5429
|
const onStreamEnd = waitForStream(stream, fdNumber, streamInfo);
|
|
5567
5430
|
if (isInputFileDescriptor(streamInfo, fdNumber)) {
|
|
@@ -5577,24 +5440,23 @@ const waitForSubprocessStream = async ({ stream, fdNumber, encoding, buffer, max
|
|
|
5577
5440
|
maxBuffer,
|
|
5578
5441
|
lines,
|
|
5579
5442
|
allMixed,
|
|
5580
|
-
stripFinalNewline
|
|
5443
|
+
stripFinalNewline,
|
|
5581
5444
|
verboseInfo,
|
|
5582
5445
|
streamInfo
|
|
5583
5446
|
}), onStreamEnd]);
|
|
5584
5447
|
return output;
|
|
5585
5448
|
};
|
|
5586
|
-
|
|
5587
5449
|
//#endregion
|
|
5588
5450
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/resolve/all-async.js
|
|
5589
5451
|
const makeAllStream = ({ stdout, stderr }, { all }) => all && (stdout || stderr) ? mergeStreams([stdout, stderr].filter(Boolean)) : void 0;
|
|
5590
|
-
const waitForAllStream = ({ subprocess, encoding, buffer, maxBuffer, lines, stripFinalNewline
|
|
5452
|
+
const waitForAllStream = ({ subprocess, encoding, buffer, maxBuffer, lines, stripFinalNewline, verboseInfo, streamInfo }) => waitForSubprocessStream({
|
|
5591
5453
|
...getAllStream(subprocess, buffer),
|
|
5592
5454
|
fdNumber: "all",
|
|
5593
5455
|
encoding,
|
|
5594
5456
|
maxBuffer: maxBuffer[1] + maxBuffer[2],
|
|
5595
5457
|
lines: lines[1] || lines[2],
|
|
5596
5458
|
allMixed: getAllMixed(subprocess),
|
|
5597
|
-
stripFinalNewline
|
|
5459
|
+
stripFinalNewline,
|
|
5598
5460
|
verboseInfo,
|
|
5599
5461
|
streamInfo
|
|
5600
5462
|
});
|
|
@@ -5618,7 +5480,6 @@ const getAllStream = ({ stdout, stderr, all }, [, bufferStdout, bufferStderr]) =
|
|
|
5618
5480
|
};
|
|
5619
5481
|
};
|
|
5620
5482
|
const getAllMixed = ({ all, stdout, stderr }) => all && stdout && stderr && stdout.readableObjectMode !== stderr.readableObjectMode;
|
|
5621
|
-
|
|
5622
5483
|
//#endregion
|
|
5623
5484
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/verbose/ipc.js
|
|
5624
5485
|
const shouldLogIpc = (verboseInfo) => isFullVerbose(verboseInfo, "ipc");
|
|
@@ -5630,12 +5491,11 @@ const logIpcOutput = (message, verboseInfo) => {
|
|
|
5630
5491
|
verboseInfo
|
|
5631
5492
|
});
|
|
5632
5493
|
};
|
|
5633
|
-
|
|
5634
5494
|
//#endregion
|
|
5635
5495
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/ipc/buffer-messages.js
|
|
5636
5496
|
const waitForIpcOutput = async ({ subprocess, buffer: bufferArray, maxBuffer: maxBufferArray, ipc, ipcOutput, verboseInfo }) => {
|
|
5637
5497
|
if (!ipc) return ipcOutput;
|
|
5638
|
-
const isVerbose
|
|
5498
|
+
const isVerbose = shouldLogIpc(verboseInfo);
|
|
5639
5499
|
const buffer = getFdSpecificValue(bufferArray, "ipc");
|
|
5640
5500
|
const maxBuffer = getFdSpecificValue(maxBufferArray, "ipc");
|
|
5641
5501
|
for await (const message of loopOnMessages({
|
|
@@ -5650,7 +5510,7 @@ const waitForIpcOutput = async ({ subprocess, buffer: bufferArray, maxBuffer: ma
|
|
|
5650
5510
|
checkIpcMaxBuffer(subprocess, ipcOutput, maxBuffer);
|
|
5651
5511
|
ipcOutput.push(message);
|
|
5652
5512
|
}
|
|
5653
|
-
if (isVerbose
|
|
5513
|
+
if (isVerbose) logIpcOutput(message, verboseInfo);
|
|
5654
5514
|
}
|
|
5655
5515
|
return ipcOutput;
|
|
5656
5516
|
};
|
|
@@ -5658,10 +5518,9 @@ const getBufferedIpcOutput = async (ipcOutputPromise, ipcOutput) => {
|
|
|
5658
5518
|
await Promise.allSettled([ipcOutputPromise]);
|
|
5659
5519
|
return ipcOutput;
|
|
5660
5520
|
};
|
|
5661
|
-
|
|
5662
5521
|
//#endregion
|
|
5663
5522
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/resolve/wait-subprocess.js
|
|
5664
|
-
const waitForSubprocessResult = async ({ subprocess, options: { encoding, buffer, maxBuffer, lines, timeoutDuration: timeout, cancelSignal, gracefulCancel, forceKillAfterDelay, stripFinalNewline
|
|
5523
|
+
const waitForSubprocessResult = async ({ subprocess, options: { encoding, buffer, maxBuffer, lines, timeoutDuration: timeout, cancelSignal, gracefulCancel, forceKillAfterDelay, stripFinalNewline, ipc, ipcInput }, context, verboseInfo, fileDescriptors, originalStreams, onInternalError, controller }) => {
|
|
5665
5524
|
const exitPromise = waitForExit(subprocess, context);
|
|
5666
5525
|
const streamInfo = {
|
|
5667
5526
|
originalStreams,
|
|
@@ -5676,7 +5535,7 @@ const waitForSubprocessResult = async ({ subprocess, options: { encoding, buffer
|
|
|
5676
5535
|
buffer,
|
|
5677
5536
|
maxBuffer,
|
|
5678
5537
|
lines,
|
|
5679
|
-
stripFinalNewline
|
|
5538
|
+
stripFinalNewline,
|
|
5680
5539
|
verboseInfo,
|
|
5681
5540
|
streamInfo
|
|
5682
5541
|
});
|
|
@@ -5686,7 +5545,7 @@ const waitForSubprocessResult = async ({ subprocess, options: { encoding, buffer
|
|
|
5686
5545
|
buffer,
|
|
5687
5546
|
maxBuffer,
|
|
5688
5547
|
lines,
|
|
5689
|
-
stripFinalNewline
|
|
5548
|
+
stripFinalNewline,
|
|
5690
5549
|
verboseInfo,
|
|
5691
5550
|
streamInfo
|
|
5692
5551
|
});
|
|
@@ -5754,7 +5613,6 @@ const throwOnSubprocessError = async (subprocess, { signal }) => {
|
|
|
5754
5613
|
const [error] = await once(subprocess, "error", { signal });
|
|
5755
5614
|
throw error;
|
|
5756
5615
|
};
|
|
5757
|
-
|
|
5758
5616
|
//#endregion
|
|
5759
5617
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/convert/concurrent.js
|
|
5760
5618
|
const initializeConcurrentStreams = () => ({
|
|
@@ -5778,7 +5636,6 @@ const waitForConcurrentStreams = async ({ resolve, promises }, subprocess) => {
|
|
|
5778
5636
|
const [isSubprocessExit] = await Promise.race([Promise.allSettled([true, subprocess]), Promise.all([false, ...promises])]);
|
|
5779
5637
|
return !isSubprocessExit;
|
|
5780
5638
|
};
|
|
5781
|
-
|
|
5782
5639
|
//#endregion
|
|
5783
5640
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/convert/shared.js
|
|
5784
5641
|
const safeWaitForSubprocessStdin = async (subprocessStdin) => {
|
|
@@ -5815,7 +5672,6 @@ const destroyOtherStream = (stream, isOpen, error) => {
|
|
|
5815
5672
|
if (error && !isStreamAbort(error)) stream.destroy(error);
|
|
5816
5673
|
else if (isOpen) stream.destroy();
|
|
5817
5674
|
};
|
|
5818
|
-
|
|
5819
5675
|
//#endregion
|
|
5820
5676
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/convert/readable.js
|
|
5821
5677
|
const createReadable = ({ subprocess, concurrentStreams, encoding }, { from, binary: binaryOption = true, preserveNewlines = true } = {}) => {
|
|
@@ -5829,7 +5685,7 @@ const createReadable = ({ subprocess, concurrentStreams, encoding }, { from, bin
|
|
|
5829
5685
|
encoding,
|
|
5830
5686
|
preserveNewlines
|
|
5831
5687
|
});
|
|
5832
|
-
const readable
|
|
5688
|
+
const readable = new Readable({
|
|
5833
5689
|
read,
|
|
5834
5690
|
destroy: callbackify(onReadableDestroy.bind(void 0, {
|
|
5835
5691
|
subprocessStdout,
|
|
@@ -5843,10 +5699,10 @@ const createReadable = ({ subprocess, concurrentStreams, encoding }, { from, bin
|
|
|
5843
5699
|
onStdoutFinished({
|
|
5844
5700
|
subprocessStdout,
|
|
5845
5701
|
onStdoutDataDone,
|
|
5846
|
-
readable
|
|
5702
|
+
readable,
|
|
5847
5703
|
subprocess
|
|
5848
5704
|
});
|
|
5849
|
-
return readable
|
|
5705
|
+
return readable;
|
|
5850
5706
|
};
|
|
5851
5707
|
const getSubprocessStdout = (subprocess, from, concurrentStreams) => {
|
|
5852
5708
|
const subprocessStdout = getFromStream(subprocess, from);
|
|
@@ -5881,23 +5737,23 @@ const getReadableMethods = ({ subprocessStdout, subprocess, binary, encoding, pr
|
|
|
5881
5737
|
onStdoutDataDone
|
|
5882
5738
|
};
|
|
5883
5739
|
};
|
|
5884
|
-
const onRead = async (readable
|
|
5740
|
+
const onRead = async (readable, onStdoutData, onStdoutDataDone) => {
|
|
5885
5741
|
try {
|
|
5886
5742
|
const { value, done } = await onStdoutData.next();
|
|
5887
5743
|
if (done) onStdoutDataDone.resolve();
|
|
5888
|
-
else readable
|
|
5744
|
+
else readable.push(value);
|
|
5889
5745
|
} catch {}
|
|
5890
5746
|
};
|
|
5891
|
-
const onStdoutFinished = async ({ subprocessStdout, onStdoutDataDone, readable
|
|
5747
|
+
const onStdoutFinished = async ({ subprocessStdout, onStdoutDataDone, readable, subprocess, subprocessStdin }) => {
|
|
5892
5748
|
try {
|
|
5893
5749
|
await waitForSubprocessStdout(subprocessStdout);
|
|
5894
5750
|
await subprocess;
|
|
5895
5751
|
await safeWaitForSubprocessStdin(subprocessStdin);
|
|
5896
5752
|
await onStdoutDataDone;
|
|
5897
|
-
if (readable
|
|
5753
|
+
if (readable.readable) readable.push(null);
|
|
5898
5754
|
} catch (error) {
|
|
5899
5755
|
await safeWaitForSubprocessStdin(subprocessStdin);
|
|
5900
|
-
destroyOtherReadable(readable
|
|
5756
|
+
destroyOtherReadable(readable, error);
|
|
5901
5757
|
}
|
|
5902
5758
|
};
|
|
5903
5759
|
const onReadableDestroy = async ({ subprocessStdout, subprocess, waitReadableDestroy }, error) => {
|
|
@@ -5909,12 +5765,11 @@ const onReadableDestroy = async ({ subprocessStdout, subprocess, waitReadableDes
|
|
|
5909
5765
|
const destroyOtherReadable = (stream, error) => {
|
|
5910
5766
|
destroyOtherStream(stream, stream.readable, error);
|
|
5911
5767
|
};
|
|
5912
|
-
|
|
5913
5768
|
//#endregion
|
|
5914
5769
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/convert/writable.js
|
|
5915
5770
|
const createWritable = ({ subprocess, concurrentStreams }, { to } = {}) => {
|
|
5916
5771
|
const { subprocessStdin, waitWritableFinal, waitWritableDestroy } = getSubprocessStdin(subprocess, to, concurrentStreams);
|
|
5917
|
-
const writable
|
|
5772
|
+
const writable = new Writable({
|
|
5918
5773
|
...getWritableMethods(subprocessStdin, subprocess, waitWritableFinal),
|
|
5919
5774
|
destroy: callbackify(onWritableDestroy.bind(void 0, {
|
|
5920
5775
|
subprocessStdin,
|
|
@@ -5925,8 +5780,8 @@ const createWritable = ({ subprocess, concurrentStreams }, { to } = {}) => {
|
|
|
5925
5780
|
highWaterMark: subprocessStdin.writableHighWaterMark,
|
|
5926
5781
|
objectMode: subprocessStdin.writableObjectMode
|
|
5927
5782
|
});
|
|
5928
|
-
onStdinFinished(subprocessStdin, writable
|
|
5929
|
-
return writable
|
|
5783
|
+
onStdinFinished(subprocessStdin, writable);
|
|
5784
|
+
return writable;
|
|
5930
5785
|
};
|
|
5931
5786
|
const getSubprocessStdin = (subprocess, to, concurrentStreams) => {
|
|
5932
5787
|
const subprocessStdin = getToStream(subprocess, to);
|
|
@@ -5950,13 +5805,13 @@ const onWritableFinal = async (subprocessStdin, subprocess, waitWritableFinal) =
|
|
|
5950
5805
|
await subprocess;
|
|
5951
5806
|
}
|
|
5952
5807
|
};
|
|
5953
|
-
const onStdinFinished = async (subprocessStdin, writable
|
|
5808
|
+
const onStdinFinished = async (subprocessStdin, writable, subprocessStdout) => {
|
|
5954
5809
|
try {
|
|
5955
5810
|
await waitForSubprocessStdin(subprocessStdin);
|
|
5956
|
-
if (writable
|
|
5811
|
+
if (writable.writable) writable.end();
|
|
5957
5812
|
} catch (error) {
|
|
5958
5813
|
await safeWaitForSubprocessStdout(subprocessStdout);
|
|
5959
|
-
destroyOtherWritable(writable
|
|
5814
|
+
destroyOtherWritable(writable, error);
|
|
5960
5815
|
}
|
|
5961
5816
|
};
|
|
5962
5817
|
const onWritableDestroy = async ({ subprocessStdin, subprocess, waitWritableFinal, waitWritableDestroy }, error) => {
|
|
@@ -5969,7 +5824,6 @@ const onWritableDestroy = async ({ subprocessStdin, subprocess, waitWritableFina
|
|
|
5969
5824
|
const destroyOtherWritable = (stream, error) => {
|
|
5970
5825
|
destroyOtherStream(stream, stream.writable, error);
|
|
5971
5826
|
};
|
|
5972
|
-
|
|
5973
5827
|
//#endregion
|
|
5974
5828
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/convert/duplex.js
|
|
5975
5829
|
const createDuplex = ({ subprocess, concurrentStreams, encoding }, { from, to, binary: binaryOption = true, preserveNewlines = true } = {}) => {
|
|
@@ -5984,7 +5838,7 @@ const createDuplex = ({ subprocess, concurrentStreams, encoding }, { from, to, b
|
|
|
5984
5838
|
encoding,
|
|
5985
5839
|
preserveNewlines
|
|
5986
5840
|
});
|
|
5987
|
-
const duplex
|
|
5841
|
+
const duplex = new Duplex({
|
|
5988
5842
|
read,
|
|
5989
5843
|
...getWritableMethods(subprocessStdin, subprocess, waitWritableFinal),
|
|
5990
5844
|
destroy: callbackify(onDuplexDestroy.bind(void 0, {
|
|
@@ -6004,12 +5858,12 @@ const createDuplex = ({ subprocess, concurrentStreams, encoding }, { from, to, b
|
|
|
6004
5858
|
onStdoutFinished({
|
|
6005
5859
|
subprocessStdout,
|
|
6006
5860
|
onStdoutDataDone,
|
|
6007
|
-
readable: duplex
|
|
5861
|
+
readable: duplex,
|
|
6008
5862
|
subprocess,
|
|
6009
5863
|
subprocessStdin
|
|
6010
5864
|
});
|
|
6011
|
-
onStdinFinished(subprocessStdin, duplex
|
|
6012
|
-
return duplex
|
|
5865
|
+
onStdinFinished(subprocessStdin, duplex, subprocessStdout);
|
|
5866
|
+
return duplex;
|
|
6013
5867
|
};
|
|
6014
5868
|
const onDuplexDestroy = async ({ subprocessStdout, subprocessStdin, subprocess, waitReadableDestroy, waitWritableFinal, waitWritableDestroy }, error) => {
|
|
6015
5869
|
await Promise.all([onReadableDestroy({
|
|
@@ -6023,7 +5877,6 @@ const onDuplexDestroy = async ({ subprocessStdout, subprocessStdin, subprocess,
|
|
|
6023
5877
|
waitWritableDestroy
|
|
6024
5878
|
}, error)]);
|
|
6025
5879
|
};
|
|
6026
|
-
|
|
6027
5880
|
//#endregion
|
|
6028
5881
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/convert/iterable.js
|
|
6029
5882
|
const createIterable = (subprocess, encoding, { from, binary: binaryOption = false, preserveNewlines = false } = {}) => {
|
|
@@ -6046,7 +5899,6 @@ const iterateOnStdoutData = async function* (onStdoutData, subprocessStdout, sub
|
|
|
6046
5899
|
await subprocess;
|
|
6047
5900
|
}
|
|
6048
5901
|
};
|
|
6049
|
-
|
|
6050
5902
|
//#endregion
|
|
6051
5903
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/convert/add.js
|
|
6052
5904
|
const addConvertedStreams = (subprocess, { encoding }) => {
|
|
@@ -6068,7 +5920,6 @@ const addConvertedStreams = (subprocess, { encoding }) => {
|
|
|
6068
5920
|
subprocess.iterable = createIterable.bind(void 0, subprocess, encoding);
|
|
6069
5921
|
subprocess[Symbol.asyncIterator] = createIterable.bind(void 0, subprocess, encoding, {});
|
|
6070
5922
|
};
|
|
6071
|
-
|
|
6072
5923
|
//#endregion
|
|
6073
5924
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/methods/promise.js
|
|
6074
5925
|
const mergePromise = (subprocess, promise) => {
|
|
@@ -6086,7 +5937,6 @@ const descriptors = [
|
|
|
6086
5937
|
"catch",
|
|
6087
5938
|
"finally"
|
|
6088
5939
|
].map((property) => [property, Reflect.getOwnPropertyDescriptor(nativePromisePrototype, property)]);
|
|
6089
|
-
|
|
6090
5940
|
//#endregion
|
|
6091
5941
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/methods/main-async.js
|
|
6092
5942
|
const execaCoreAsync = (rawFile, rawArguments, rawOptions, createNested) => {
|
|
@@ -6129,7 +5979,7 @@ const handleAsyncArguments = (rawFile, rawArguments, rawOptions) => {
|
|
|
6129
5979
|
fileDescriptors: handleStdioAsync(options, verboseInfo)
|
|
6130
5980
|
};
|
|
6131
5981
|
};
|
|
6132
|
-
const handleAsyncOptions = ({ timeout, signal
|
|
5982
|
+
const handleAsyncOptions = ({ timeout, signal, ...options }) => {
|
|
6133
5983
|
if (signal !== void 0) throw new TypeError("The \"signal\" option has been renamed to \"cancelSignal\" instead.");
|
|
6134
5984
|
return {
|
|
6135
5985
|
...options,
|
|
@@ -6239,7 +6089,6 @@ const getAsyncResult = ({ errorInfo, exitCode, signal, stdio, all, ipcOutput, co
|
|
|
6239
6089
|
options,
|
|
6240
6090
|
startTime
|
|
6241
6091
|
});
|
|
6242
|
-
|
|
6243
6092
|
//#endregion
|
|
6244
6093
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/methods/bind.js
|
|
6245
6094
|
const mergeOptions = (boundOptions, options) => {
|
|
@@ -6257,11 +6106,10 @@ const mergeOption = (optionName, boundOptionValue, optionValue) => {
|
|
|
6257
6106
|
return optionValue;
|
|
6258
6107
|
};
|
|
6259
6108
|
const DEEP_OPTIONS = new Set(["env", ...FD_SPECIFIC_OPTIONS]);
|
|
6260
|
-
|
|
6261
6109
|
//#endregion
|
|
6262
6110
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/methods/create.js
|
|
6263
6111
|
const createExeca = (mapArguments, boundOptions, deepOptions, setBoundExeca) => {
|
|
6264
|
-
const createNested = (mapArguments
|
|
6112
|
+
const createNested = (mapArguments, boundOptions, setBoundExeca) => createExeca(mapArguments, boundOptions, deepOptions, setBoundExeca);
|
|
6265
6113
|
const boundExeca = (...execaArguments) => callBoundExeca({
|
|
6266
6114
|
mapArguments,
|
|
6267
6115
|
deepOptions,
|
|
@@ -6298,7 +6146,6 @@ const parseArguments = ({ mapArguments, firstArgument, nextArguments, deepOption
|
|
|
6298
6146
|
isSync
|
|
6299
6147
|
};
|
|
6300
6148
|
};
|
|
6301
|
-
|
|
6302
6149
|
//#endregion
|
|
6303
6150
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/methods/command.js
|
|
6304
6151
|
const mapCommandAsync = ({ file, commandArguments }) => parseCommand(file, commandArguments);
|
|
@@ -6327,7 +6174,6 @@ const parseCommandString = (command) => {
|
|
|
6327
6174
|
return tokens;
|
|
6328
6175
|
};
|
|
6329
6176
|
const SPACES_REGEXP = / +/g;
|
|
6330
|
-
|
|
6331
6177
|
//#endregion
|
|
6332
6178
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/methods/script.js
|
|
6333
6179
|
const setScriptSync = (boundExeca, createNested, boundOptions) => {
|
|
@@ -6345,17 +6191,15 @@ const getScriptOptions = (options) => ({ options: {
|
|
|
6345
6191
|
} });
|
|
6346
6192
|
const getScriptStdinOption = ({ input, inputFile, stdio }) => input === void 0 && inputFile === void 0 && stdio === void 0 ? { stdin: "inherit" } : {};
|
|
6347
6193
|
const deepScriptOptions = { preferLocal: true };
|
|
6348
|
-
|
|
6349
6194
|
//#endregion
|
|
6350
6195
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/index.js
|
|
6351
6196
|
const execa = createExeca(() => ({}));
|
|
6352
|
-
|
|
6353
|
-
|
|
6354
|
-
|
|
6355
|
-
|
|
6356
|
-
|
|
6197
|
+
createExeca(() => ({ isSync: true }));
|
|
6198
|
+
createExeca(mapCommandAsync);
|
|
6199
|
+
createExeca(mapCommandSync);
|
|
6200
|
+
createExeca(mapNode);
|
|
6201
|
+
createExeca(mapScriptAsync, {}, deepScriptOptions, setScriptSync);
|
|
6357
6202
|
const { sendMessage, getOneMessage, getEachMessage, getCancelSignal } = getIpcExport();
|
|
6358
|
-
|
|
6359
6203
|
//#endregion
|
|
6360
6204
|
//#region src/hermes.ts
|
|
6361
6205
|
/**
|
|
@@ -6466,14 +6310,14 @@ async function compileHermes({ cwd, sourcemap, inputJsFile }) {
|
|
|
6466
6310
|
}
|
|
6467
6311
|
return { hermesVersion: version.stdout };
|
|
6468
6312
|
}
|
|
6469
|
-
|
|
6470
6313
|
//#endregion
|
|
6471
6314
|
//#region src/bare.ts
|
|
6472
|
-
const runBundle = async ({ entryFile, cwd, platform
|
|
6315
|
+
const runBundle = async ({ entryFile, cwd, platform, buildPath, sourcemap, enableHermes }) => {
|
|
6473
6316
|
const reactNativePath = __require.resolve("react-native/package.json", { paths: [cwd] });
|
|
6474
6317
|
const cliPath = path$1.join(path$1.dirname(reactNativePath), "cli.js");
|
|
6475
|
-
const filename = `index.${platform
|
|
6318
|
+
const filename = `index.${platform}`;
|
|
6476
6319
|
const bundleOutput = path$1.join(buildPath, `${filename}.bundle`);
|
|
6320
|
+
const bundleId = uuidv7();
|
|
6477
6321
|
const args = [
|
|
6478
6322
|
"bundle",
|
|
6479
6323
|
"--assets-dest",
|
|
@@ -6485,7 +6329,7 @@ const runBundle = async ({ entryFile, cwd, platform: platform$1, buildPath, sour
|
|
|
6485
6329
|
"--entry-file",
|
|
6486
6330
|
entryFile,
|
|
6487
6331
|
"--platform",
|
|
6488
|
-
platform
|
|
6332
|
+
platform,
|
|
6489
6333
|
"--minify",
|
|
6490
6334
|
String(!enableHermes),
|
|
6491
6335
|
...sourcemap ? ["--sourcemap-output", `${bundleOutput}.map`] : [],
|
|
@@ -6495,33 +6339,11 @@ const runBundle = async ({ entryFile, cwd, platform: platform$1, buildPath, sour
|
|
|
6495
6339
|
try {
|
|
6496
6340
|
await execa(cliPath, args, {
|
|
6497
6341
|
cwd,
|
|
6498
|
-
env: {
|
|
6499
|
-
...process.env,
|
|
6500
|
-
BUILD_OUT_DIR: buildPath
|
|
6501
|
-
},
|
|
6502
6342
|
reject: true
|
|
6503
6343
|
});
|
|
6504
6344
|
} catch (error) {
|
|
6505
6345
|
if (error instanceof ExecaError) throw error.stderr;
|
|
6506
6346
|
}
|
|
6507
|
-
const bundleId = await fs$1.readFile(path$1.join(buildPath, "BUNDLE_ID"), "utf-8").catch(() => null);
|
|
6508
|
-
if (!bundleId) throw new Error(`If you are using Babel, please check if 'hot-updater/babel-plugin' is configured in babel.config.js
|
|
6509
|
-
Example:
|
|
6510
|
-
module.exports = {
|
|
6511
|
-
plugins: [
|
|
6512
|
-
["hot-updater/babel-plugin"]
|
|
6513
|
-
]
|
|
6514
|
-
}
|
|
6515
|
-
|
|
6516
|
-
|
|
6517
|
-
If you are using Repack, please check if '@hot-updater/repack' plugin is configured in rspack.config.mjs
|
|
6518
|
-
Example:
|
|
6519
|
-
import { HotUpdaterPlugin } from "@hot-updater/repack";
|
|
6520
|
-
|
|
6521
|
-
{
|
|
6522
|
-
plugins: [new Repack.RepackPlugin(), new HotUpdaterPlugin()],
|
|
6523
|
-
}
|
|
6524
|
-
`);
|
|
6525
6347
|
if (enableHermes) {
|
|
6526
6348
|
const { hermesVersion } = await compileHermes({
|
|
6527
6349
|
cwd,
|
|
@@ -6541,7 +6363,7 @@ import { HotUpdaterPlugin } from "@hot-updater/repack";
|
|
|
6541
6363
|
const bare = (config) => ({ cwd }) => {
|
|
6542
6364
|
const { outDir = "dist", sourcemap = false, entryFile = "index.js", enableHermes } = config;
|
|
6543
6365
|
return {
|
|
6544
|
-
build: async ({ platform
|
|
6366
|
+
build: async ({ platform }) => {
|
|
6545
6367
|
const buildPath = path$1.join(cwd, outDir);
|
|
6546
6368
|
await fs$1.rm(buildPath, {
|
|
6547
6369
|
recursive: true,
|
|
@@ -6551,7 +6373,7 @@ const bare = (config) => ({ cwd }) => {
|
|
|
6551
6373
|
const { bundleId, stdout } = await runBundle({
|
|
6552
6374
|
entryFile,
|
|
6553
6375
|
cwd,
|
|
6554
|
-
platform
|
|
6376
|
+
platform,
|
|
6555
6377
|
buildPath,
|
|
6556
6378
|
sourcemap,
|
|
6557
6379
|
enableHermes
|
|
@@ -6565,6 +6387,5 @@ const bare = (config) => ({ cwd }) => {
|
|
|
6565
6387
|
name: "bare"
|
|
6566
6388
|
};
|
|
6567
6389
|
};
|
|
6568
|
-
|
|
6569
6390
|
//#endregion
|
|
6570
|
-
export { bare, compileHermes, getHermesCommand };
|
|
6391
|
+
export { bare, compileHermes, getHermesCommand };
|