@hot-updater/aws 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/iac/index.cjs +426 -690
- package/dist/iac/{index.js → index.mjs} +304 -548
- package/dist/index.cjs +179 -59
- package/dist/index.d.cts +37 -4
- package/dist/index.d.mts +62 -0
- package/dist/{index.js → index.mjs} +155 -33
- package/dist/lambda/index.cjs +5819 -6848
- package/dist/lambda/index.d.cts +4 -1
- package/package.json +15 -13
- package/dist/index.d.ts +0 -29
- package/dist/lambda/dist-cjs-Mm7FDWb8.cjs +0 -128
- package/dist/lambda/event-streams-0D7SB645.cjs +0 -204
- /package/dist/iac/{index.d.ts → index.d.mts} +0 -0
|
@@ -27,20 +27,17 @@ import fs$1 from "fs/promises";
|
|
|
27
27
|
import { CopyObjectCommand, DeleteObjectCommand, GetObjectCommand, ListObjectsV2Command, S3 } from "@aws-sdk/client-s3";
|
|
28
28
|
import { Upload } from "@aws-sdk/lib-storage";
|
|
29
29
|
import { ParameterNotFound, SSM } from "@aws-sdk/client-ssm";
|
|
30
|
-
|
|
31
|
-
//#region rolldown:runtime
|
|
30
|
+
//#region \0rolldown/runtime.js
|
|
32
31
|
var __create = Object.create;
|
|
33
32
|
var __defProp = Object.defineProperty;
|
|
34
33
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
35
34
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
36
35
|
var __getProtoOf = Object.getPrototypeOf;
|
|
37
36
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
38
|
-
var
|
|
39
|
-
return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
|
|
40
|
-
};
|
|
37
|
+
var __commonJSMin = (cb, mod) => () => (mod || cb((mod = { exports: {} }).exports, mod), mod.exports);
|
|
41
38
|
var __copyProps = (to, from, except, desc) => {
|
|
42
|
-
if (from && typeof from === "object" || typeof from === "function") for (var keys = __getOwnPropNames(from), i
|
|
43
|
-
key = keys[i
|
|
39
|
+
if (from && typeof from === "object" || typeof from === "function") for (var keys = __getOwnPropNames(from), i = 0, n = keys.length, key; i < n; i++) {
|
|
40
|
+
key = keys[i];
|
|
44
41
|
if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
|
|
45
42
|
get: ((k) => from[k]).bind(null, key),
|
|
46
43
|
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
@@ -53,7 +50,6 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
53
50
|
enumerable: true
|
|
54
51
|
}) : target, mod));
|
|
55
52
|
var __require = /* @__PURE__ */ createRequire(import.meta.url);
|
|
56
|
-
|
|
57
53
|
//#endregion
|
|
58
54
|
//#region ../../node_modules/.pnpm/is-plain-obj@4.1.0/node_modules/is-plain-obj/index.js
|
|
59
55
|
function isPlainObject$1(value) {
|
|
@@ -61,7 +57,6 @@ function isPlainObject$1(value) {
|
|
|
61
57
|
const prototype = Object.getPrototypeOf(value);
|
|
62
58
|
return (prototype === null || prototype === Object.prototype || Object.getPrototypeOf(prototype) === null) && !(Symbol.toStringTag in value) && !(Symbol.iterator in value);
|
|
63
59
|
}
|
|
64
|
-
|
|
65
60
|
//#endregion
|
|
66
61
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/arguments/file-url.js
|
|
67
62
|
const safeNormalizeFileUrl = (file, name) => {
|
|
@@ -72,7 +67,6 @@ const safeNormalizeFileUrl = (file, name) => {
|
|
|
72
67
|
const normalizeDenoExecPath = (file) => isDenoExecPath(file) ? file.toString() : file;
|
|
73
68
|
const isDenoExecPath = (file) => typeof file !== "string" && file && Object.getPrototypeOf(file) === String.prototype;
|
|
74
69
|
const normalizeFileUrl = (file) => file instanceof URL ? fileURLToPath(file) : file;
|
|
75
|
-
|
|
76
70
|
//#endregion
|
|
77
71
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/methods/parameters.js
|
|
78
72
|
const normalizeParameters = (rawFile, rawArguments = [], rawOptions = {}) => {
|
|
@@ -90,7 +84,6 @@ const normalizeParameters = (rawFile, rawArguments = [], rawOptions = {}) => {
|
|
|
90
84
|
options
|
|
91
85
|
];
|
|
92
86
|
};
|
|
93
|
-
|
|
94
87
|
//#endregion
|
|
95
88
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/utils/uint-array.js
|
|
96
89
|
const { toString: objectToString$1 } = Object.prototype;
|
|
@@ -130,7 +123,6 @@ const getJoinLength = (uint8Arrays) => {
|
|
|
130
123
|
for (const uint8Array of uint8Arrays) joinLength += uint8Array.length;
|
|
131
124
|
return joinLength;
|
|
132
125
|
};
|
|
133
|
-
|
|
134
126
|
//#endregion
|
|
135
127
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/methods/template.js
|
|
136
128
|
const isTemplateString = (templates) => Array.isArray(templates) && Array.isArray(templates.raw);
|
|
@@ -157,7 +149,7 @@ const parseTemplate = ({ templates, expressions, tokens, index, template }) => {
|
|
|
157
149
|
const newTokens = concatTokens(tokens, nextTokens, leadingWhitespaces);
|
|
158
150
|
if (index === expressions.length) return newTokens;
|
|
159
151
|
const expression = expressions[index];
|
|
160
|
-
return concatTokens(newTokens, Array.isArray(expression) ? expression.map((expression
|
|
152
|
+
return concatTokens(newTokens, Array.isArray(expression) ? expression.map((expression) => parseExpression(expression)) : [parseExpression(expression)], trailingWhitespaces);
|
|
161
153
|
};
|
|
162
154
|
const splitByWhitespaces = (template, rawTemplate) => {
|
|
163
155
|
if (rawTemplate.length === 0) return {
|
|
@@ -219,7 +211,6 @@ const getSubprocessResult = ({ stdout }) => {
|
|
|
219
211
|
if (stdout === void 0) throw new TypeError("Missing result.stdout in template expression. This is probably due to the previous subprocess' \"stdout\" option.");
|
|
220
212
|
throw new TypeError(`Unexpected "${typeof stdout}" stdout in template expression`);
|
|
221
213
|
};
|
|
222
|
-
|
|
223
214
|
//#endregion
|
|
224
215
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/utils/standard-stream.js
|
|
225
216
|
const isStandardStream = (stream) => STANDARD_STREAMS.includes(stream);
|
|
@@ -234,7 +225,6 @@ const STANDARD_STREAMS_ALIASES = [
|
|
|
234
225
|
"stderr"
|
|
235
226
|
];
|
|
236
227
|
const getStreamName = (fdNumber) => STANDARD_STREAMS_ALIASES[fdNumber] ?? `stdio[${fdNumber}]`;
|
|
237
|
-
|
|
238
228
|
//#endregion
|
|
239
229
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/arguments/specific.js
|
|
240
230
|
const normalizeFdSpecificOptions = (options) => {
|
|
@@ -289,7 +279,6 @@ const FD_SPECIFIC_OPTIONS = [
|
|
|
289
279
|
"stripFinalNewline"
|
|
290
280
|
];
|
|
291
281
|
const getFdSpecificValue = (optionArray, fdNumber) => fdNumber === "ipc" ? optionArray.at(-1) : optionArray[fdNumber];
|
|
292
|
-
|
|
293
282
|
//#endregion
|
|
294
283
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/verbose/values.js
|
|
295
284
|
const isVerbose = ({ verbose }, fdNumber) => getFdVerbose(verbose, fdNumber) !== "none";
|
|
@@ -306,7 +295,6 @@ const VERBOSE_VALUES = [
|
|
|
306
295
|
"short",
|
|
307
296
|
"full"
|
|
308
297
|
];
|
|
309
|
-
|
|
310
298
|
//#endregion
|
|
311
299
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/arguments/escape.js
|
|
312
300
|
const joinCommand = (filePath, rawArguments) => {
|
|
@@ -327,7 +315,7 @@ const escapeControlCharacter = (character) => {
|
|
|
327
315
|
};
|
|
328
316
|
const getSpecialCharRegExp = () => {
|
|
329
317
|
try {
|
|
330
|
-
return new RegExp("\\p{Separator}|\\p{Other}", "gu");
|
|
318
|
+
return /* @__PURE__ */ new RegExp("\\p{Separator}|\\p{Other}", "gu");
|
|
331
319
|
} catch {
|
|
332
320
|
return /[\s\u0000-\u001F\u007F-\u009F\u00AD]/g;
|
|
333
321
|
}
|
|
@@ -347,7 +335,6 @@ const quoteString = (escapedArgument) => {
|
|
|
347
335
|
return platform === "win32" ? `"${escapedArgument.replaceAll("\"", "\"\"")}"` : `'${escapedArgument.replaceAll("'", "'\\''")}'`;
|
|
348
336
|
};
|
|
349
337
|
const NO_ESCAPE_REGEXP = /^[\w./-]+$/;
|
|
350
|
-
|
|
351
338
|
//#endregion
|
|
352
339
|
//#region ../../node_modules/.pnpm/is-unicode-supported@2.1.0/node_modules/is-unicode-supported/index.js
|
|
353
340
|
function isUnicodeSupported() {
|
|
@@ -356,7 +343,6 @@ function isUnicodeSupported() {
|
|
|
356
343
|
if (process$1.platform !== "win32") return TERM !== "linux";
|
|
357
344
|
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";
|
|
358
345
|
}
|
|
359
|
-
|
|
360
346
|
//#endregion
|
|
361
347
|
//#region ../../node_modules/.pnpm/figures@6.1.0/node_modules/figures/index.js
|
|
362
348
|
const common = {
|
|
@@ -635,11 +621,8 @@ const fallbackSymbols = {
|
|
|
635
621
|
...common,
|
|
636
622
|
...specialFallbackSymbols
|
|
637
623
|
};
|
|
638
|
-
const
|
|
639
|
-
|
|
640
|
-
var figures_default = figures;
|
|
641
|
-
const replacements = Object.entries(specialMainSymbols);
|
|
642
|
-
|
|
624
|
+
const figures = isUnicodeSupported() ? mainSymbols : fallbackSymbols;
|
|
625
|
+
Object.entries(specialMainSymbols);
|
|
643
626
|
//#endregion
|
|
644
627
|
//#region ../../node_modules/.pnpm/yoctocolors@2.1.1/node_modules/yoctocolors/base.js
|
|
645
628
|
const hasColors = tty?.WriteStream?.prototype?.hasColors?.() ?? false;
|
|
@@ -662,48 +645,47 @@ const format = (open, close) => {
|
|
|
662
645
|
return result;
|
|
663
646
|
};
|
|
664
647
|
};
|
|
665
|
-
|
|
648
|
+
format(0, 0);
|
|
666
649
|
const bold = format(1, 22);
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
650
|
+
format(2, 22);
|
|
651
|
+
format(3, 23);
|
|
652
|
+
format(4, 24);
|
|
653
|
+
format(53, 55);
|
|
654
|
+
format(7, 27);
|
|
655
|
+
format(8, 28);
|
|
656
|
+
format(9, 29);
|
|
657
|
+
format(30, 39);
|
|
658
|
+
format(31, 39);
|
|
659
|
+
format(32, 39);
|
|
660
|
+
format(33, 39);
|
|
661
|
+
format(34, 39);
|
|
662
|
+
format(35, 39);
|
|
663
|
+
format(36, 39);
|
|
664
|
+
format(37, 39);
|
|
682
665
|
const gray = format(90, 39);
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
666
|
+
format(40, 49);
|
|
667
|
+
format(41, 49);
|
|
668
|
+
format(42, 49);
|
|
669
|
+
format(43, 49);
|
|
670
|
+
format(44, 49);
|
|
671
|
+
format(45, 49);
|
|
672
|
+
format(46, 49);
|
|
673
|
+
format(47, 49);
|
|
674
|
+
format(100, 49);
|
|
692
675
|
const redBright = format(91, 39);
|
|
693
|
-
|
|
676
|
+
format(92, 39);
|
|
694
677
|
const yellowBright = format(93, 39);
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
678
|
+
format(94, 39);
|
|
679
|
+
format(95, 39);
|
|
680
|
+
format(96, 39);
|
|
681
|
+
format(97, 39);
|
|
682
|
+
format(101, 49);
|
|
683
|
+
format(102, 49);
|
|
684
|
+
format(103, 49);
|
|
685
|
+
format(104, 49);
|
|
686
|
+
format(105, 49);
|
|
687
|
+
format(106, 49);
|
|
688
|
+
format(107, 49);
|
|
707
689
|
//#endregion
|
|
708
690
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/verbose/default.js
|
|
709
691
|
const defaultVerboseFunction = ({ type, message, timestamp, piped, commandId, result: { failed = false } = {}, options: { reject = true } }) => {
|
|
@@ -719,8 +701,8 @@ const defaultVerboseFunction = ({ type, message, timestamp, piped, commandId, re
|
|
|
719
701
|
const serializeTimestamp = (timestamp) => `${padField(timestamp.getHours(), 2)}:${padField(timestamp.getMinutes(), 2)}:${padField(timestamp.getSeconds(), 2)}.${padField(timestamp.getMilliseconds(), 3)}`;
|
|
720
702
|
const padField = (field, padding) => String(field).padStart(padding, "0");
|
|
721
703
|
const getFinalIcon = ({ failed, reject }) => {
|
|
722
|
-
if (!failed) return
|
|
723
|
-
return reject ?
|
|
704
|
+
if (!failed) return figures.tick;
|
|
705
|
+
return reject ? figures.cross : figures.warning;
|
|
724
706
|
};
|
|
725
707
|
const ICONS = {
|
|
726
708
|
command: ({ piped }) => piped ? "|" : "$",
|
|
@@ -737,7 +719,6 @@ const COLORS = {
|
|
|
737
719
|
error: ({ reject }) => reject ? redBright : yellowBright,
|
|
738
720
|
duration: () => gray
|
|
739
721
|
};
|
|
740
|
-
|
|
741
722
|
//#endregion
|
|
742
723
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/verbose/custom.js
|
|
743
724
|
const applyVerboseOnLines = (printedLines, verboseInfo, fdNumber) => {
|
|
@@ -750,7 +731,6 @@ const applyVerboseFunction = (verboseLine, verboseObject, verboseFunction) => {
|
|
|
750
731
|
if (typeof printedLine === "string") return printedLine;
|
|
751
732
|
};
|
|
752
733
|
const appendNewline = (printedLine) => printedLine.endsWith("\n") ? printedLine : `${printedLine}\n`;
|
|
753
|
-
|
|
754
734
|
//#endregion
|
|
755
735
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/verbose/log.js
|
|
756
736
|
const verboseLog = ({ type, verboseMessage, fdNumber, verboseInfo, result }) => {
|
|
@@ -761,7 +741,7 @@ const verboseLog = ({ type, verboseMessage, fdNumber, verboseInfo, result }) =>
|
|
|
761
741
|
})), verboseInfo, fdNumber);
|
|
762
742
|
if (finalLines !== "") console.warn(finalLines.slice(0, -1));
|
|
763
743
|
};
|
|
764
|
-
const getVerboseObject = ({ type, result, verboseInfo: { escapedCommand, commandId, rawOptions: { piped = false
|
|
744
|
+
const getVerboseObject = ({ type, result, verboseInfo: { escapedCommand, commandId, rawOptions: { piped = false, ...options } } }) => ({
|
|
765
745
|
type,
|
|
766
746
|
escapedCommand,
|
|
767
747
|
commandId: `${commandId}`,
|
|
@@ -784,7 +764,6 @@ const serializeVerboseMessage = (message) => {
|
|
|
784
764
|
return escapeLines(typeof message === "string" ? message : inspect(message)).replaceAll(" ", " ".repeat(TAB_SIZE));
|
|
785
765
|
};
|
|
786
766
|
const TAB_SIZE = 2;
|
|
787
|
-
|
|
788
767
|
//#endregion
|
|
789
768
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/verbose/start.js
|
|
790
769
|
const logCommand = (escapedCommand, verboseInfo) => {
|
|
@@ -795,7 +774,6 @@ const logCommand = (escapedCommand, verboseInfo) => {
|
|
|
795
774
|
verboseInfo
|
|
796
775
|
});
|
|
797
776
|
};
|
|
798
|
-
|
|
799
777
|
//#endregion
|
|
800
778
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/verbose/info.js
|
|
801
779
|
const getVerboseInfo = (verbose, escapedCommand, rawOptions) => {
|
|
@@ -819,12 +797,10 @@ const validateVerbose = (verbose) => {
|
|
|
819
797
|
}
|
|
820
798
|
}
|
|
821
799
|
};
|
|
822
|
-
|
|
823
800
|
//#endregion
|
|
824
801
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/return/duration.js
|
|
825
802
|
const getStartTime = () => hrtime.bigint();
|
|
826
803
|
const getDurationMs = (startTime) => Number(hrtime.bigint() - startTime) / 1e6;
|
|
827
|
-
|
|
828
804
|
//#endregion
|
|
829
805
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/arguments/command.js
|
|
830
806
|
const handleCommand = (filePath, rawArguments, rawOptions) => {
|
|
@@ -839,51 +815,49 @@ const handleCommand = (filePath, rawArguments, rawOptions) => {
|
|
|
839
815
|
verboseInfo
|
|
840
816
|
};
|
|
841
817
|
};
|
|
842
|
-
|
|
843
818
|
//#endregion
|
|
844
819
|
//#region ../../node_modules/.pnpm/isexe@2.0.0/node_modules/isexe/windows.js
|
|
845
|
-
var require_windows = /* @__PURE__ */
|
|
846
|
-
module.exports = isexe
|
|
847
|
-
isexe
|
|
820
|
+
var require_windows = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
821
|
+
module.exports = isexe;
|
|
822
|
+
isexe.sync = sync;
|
|
848
823
|
var fs$4 = __require("fs");
|
|
849
|
-
function checkPathExt(path
|
|
824
|
+
function checkPathExt(path, options) {
|
|
850
825
|
var pathext = options.pathExt !== void 0 ? options.pathExt : process.env.PATHEXT;
|
|
851
826
|
if (!pathext) return true;
|
|
852
827
|
pathext = pathext.split(";");
|
|
853
828
|
if (pathext.indexOf("") !== -1) return true;
|
|
854
|
-
for (var i
|
|
855
|
-
var p
|
|
856
|
-
if (p
|
|
829
|
+
for (var i = 0; i < pathext.length; i++) {
|
|
830
|
+
var p = pathext[i].toLowerCase();
|
|
831
|
+
if (p && path.substr(-p.length).toLowerCase() === p) return true;
|
|
857
832
|
}
|
|
858
833
|
return false;
|
|
859
834
|
}
|
|
860
|
-
function checkStat
|
|
835
|
+
function checkStat(stat, path, options) {
|
|
861
836
|
if (!stat.isSymbolicLink() && !stat.isFile()) return false;
|
|
862
|
-
return checkPathExt(path
|
|
837
|
+
return checkPathExt(path, options);
|
|
863
838
|
}
|
|
864
|
-
function isexe
|
|
865
|
-
fs$4.stat(path
|
|
866
|
-
cb(er, er ? false : checkStat
|
|
839
|
+
function isexe(path, options, cb) {
|
|
840
|
+
fs$4.stat(path, function(er, stat) {
|
|
841
|
+
cb(er, er ? false : checkStat(stat, path, options));
|
|
867
842
|
});
|
|
868
843
|
}
|
|
869
|
-
function sync
|
|
870
|
-
return checkStat
|
|
844
|
+
function sync(path, options) {
|
|
845
|
+
return checkStat(fs$4.statSync(path), path, options);
|
|
871
846
|
}
|
|
872
|
-
})
|
|
873
|
-
|
|
847
|
+
}));
|
|
874
848
|
//#endregion
|
|
875
849
|
//#region ../../node_modules/.pnpm/isexe@2.0.0/node_modules/isexe/mode.js
|
|
876
|
-
var require_mode = /* @__PURE__ */
|
|
877
|
-
module.exports = isexe
|
|
878
|
-
isexe
|
|
850
|
+
var require_mode = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
851
|
+
module.exports = isexe;
|
|
852
|
+
isexe.sync = sync;
|
|
879
853
|
var fs$3 = __require("fs");
|
|
880
|
-
function isexe
|
|
881
|
-
fs$3.stat(path
|
|
854
|
+
function isexe(path, options, cb) {
|
|
855
|
+
fs$3.stat(path, function(er, stat) {
|
|
882
856
|
cb(er, er ? false : checkStat(stat, options));
|
|
883
857
|
});
|
|
884
858
|
}
|
|
885
|
-
function sync
|
|
886
|
-
return checkStat(fs$3.statSync(path
|
|
859
|
+
function sync(path, options) {
|
|
860
|
+
return checkStat(fs$3.statSync(path), options);
|
|
887
861
|
}
|
|
888
862
|
function checkStat(stat, options) {
|
|
889
863
|
return stat.isFile() && checkMode(stat, options);
|
|
@@ -894,24 +868,23 @@ var require_mode = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/isexe@
|
|
|
894
868
|
var gid = stat.gid;
|
|
895
869
|
var myUid = options.uid !== void 0 ? options.uid : process.getuid && process.getuid();
|
|
896
870
|
var myGid = options.gid !== void 0 ? options.gid : process.getgid && process.getgid();
|
|
897
|
-
var u
|
|
871
|
+
var u = parseInt("100", 8);
|
|
898
872
|
var g = parseInt("010", 8);
|
|
899
|
-
var o
|
|
900
|
-
var ug = u
|
|
901
|
-
return mod & o
|
|
873
|
+
var o = parseInt("001", 8);
|
|
874
|
+
var ug = u | g;
|
|
875
|
+
return mod & o || mod & g && gid === myGid || mod & u && uid === myUid || mod & ug && myUid === 0;
|
|
902
876
|
}
|
|
903
|
-
})
|
|
904
|
-
|
|
877
|
+
}));
|
|
905
878
|
//#endregion
|
|
906
879
|
//#region ../../node_modules/.pnpm/isexe@2.0.0/node_modules/isexe/index.js
|
|
907
|
-
var require_isexe = /* @__PURE__ */
|
|
880
|
+
var require_isexe = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
908
881
|
__require("fs");
|
|
909
882
|
var core;
|
|
910
883
|
if (process.platform === "win32" || global.TESTING_WINDOWS) core = require_windows();
|
|
911
884
|
else core = require_mode();
|
|
912
|
-
module.exports = isexe
|
|
913
|
-
isexe
|
|
914
|
-
function isexe
|
|
885
|
+
module.exports = isexe;
|
|
886
|
+
isexe.sync = sync;
|
|
887
|
+
function isexe(path, options, cb) {
|
|
915
888
|
if (typeof options === "function") {
|
|
916
889
|
cb = options;
|
|
917
890
|
options = {};
|
|
@@ -919,13 +892,13 @@ var require_isexe = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/isexe
|
|
|
919
892
|
if (!cb) {
|
|
920
893
|
if (typeof Promise !== "function") throw new TypeError("callback not provided");
|
|
921
894
|
return new Promise(function(resolve, reject) {
|
|
922
|
-
isexe
|
|
895
|
+
isexe(path, options || {}, function(er, is) {
|
|
923
896
|
if (er) reject(er);
|
|
924
897
|
else resolve(is);
|
|
925
898
|
});
|
|
926
899
|
});
|
|
927
900
|
}
|
|
928
|
-
core(path
|
|
901
|
+
core(path, options || {}, function(er, is) {
|
|
929
902
|
if (er) {
|
|
930
903
|
if (er.code === "EACCES" || options && options.ignoreErrors) {
|
|
931
904
|
er = null;
|
|
@@ -935,19 +908,18 @@ var require_isexe = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/isexe
|
|
|
935
908
|
cb(er, is);
|
|
936
909
|
});
|
|
937
910
|
}
|
|
938
|
-
function sync(path
|
|
911
|
+
function sync(path, options) {
|
|
939
912
|
try {
|
|
940
|
-
return core.sync(path
|
|
913
|
+
return core.sync(path, options || {});
|
|
941
914
|
} catch (er) {
|
|
942
915
|
if (options && options.ignoreErrors || er.code === "EACCES") return false;
|
|
943
916
|
else throw er;
|
|
944
917
|
}
|
|
945
918
|
}
|
|
946
|
-
})
|
|
947
|
-
|
|
919
|
+
}));
|
|
948
920
|
//#endregion
|
|
949
921
|
//#region ../../node_modules/.pnpm/which@2.0.2/node_modules/which/which.js
|
|
950
|
-
var require_which = /* @__PURE__ */
|
|
922
|
+
var require_which = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
951
923
|
const isWindows = process.platform === "win32" || process.env.OSTYPE === "cygwin" || process.env.OSTYPE === "msys";
|
|
952
924
|
const path$4 = __require("path");
|
|
953
925
|
const COLON = isWindows ? ";" : ":";
|
|
@@ -967,7 +939,7 @@ var require_which = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/which
|
|
|
967
939
|
pathExtExe
|
|
968
940
|
};
|
|
969
941
|
};
|
|
970
|
-
const which
|
|
942
|
+
const which = (cmd, opt, cb) => {
|
|
971
943
|
if (typeof opt === "function") {
|
|
972
944
|
cb = opt;
|
|
973
945
|
opt = {};
|
|
@@ -975,20 +947,20 @@ var require_which = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/which
|
|
|
975
947
|
if (!opt) opt = {};
|
|
976
948
|
const { pathEnv, pathExt, pathExtExe } = getPathInfo(cmd, opt);
|
|
977
949
|
const found = [];
|
|
978
|
-
const step = (i
|
|
979
|
-
if (i
|
|
980
|
-
const ppRaw = pathEnv[i
|
|
950
|
+
const step = (i) => new Promise((resolve, reject) => {
|
|
951
|
+
if (i === pathEnv.length) return opt.all && found.length ? resolve(found) : reject(getNotFoundError(cmd));
|
|
952
|
+
const ppRaw = pathEnv[i];
|
|
981
953
|
const pathPart = /^".*"$/.test(ppRaw) ? ppRaw.slice(1, -1) : ppRaw;
|
|
982
954
|
const pCmd = path$4.join(pathPart, cmd);
|
|
983
|
-
resolve(subStep(!pathPart && /^\.[\\\/]/.test(cmd) ? cmd.slice(0, 2) + pCmd : pCmd, i
|
|
955
|
+
resolve(subStep(!pathPart && /^\.[\\\/]/.test(cmd) ? cmd.slice(0, 2) + pCmd : pCmd, i, 0));
|
|
984
956
|
});
|
|
985
|
-
const subStep = (p
|
|
986
|
-
if (ii === pathExt.length) return resolve(step(i
|
|
957
|
+
const subStep = (p, i, ii) => new Promise((resolve, reject) => {
|
|
958
|
+
if (ii === pathExt.length) return resolve(step(i + 1));
|
|
987
959
|
const ext = pathExt[ii];
|
|
988
|
-
isexe(p
|
|
989
|
-
if (!er && is) if (opt.all) found.push(p
|
|
990
|
-
else return resolve(p
|
|
991
|
-
return resolve(subStep(p
|
|
960
|
+
isexe(p + ext, { pathExt: pathExtExe }, (er, is) => {
|
|
961
|
+
if (!er && is) if (opt.all) found.push(p + ext);
|
|
962
|
+
else return resolve(p + ext);
|
|
963
|
+
return resolve(subStep(p, i, ii + 1));
|
|
992
964
|
});
|
|
993
965
|
});
|
|
994
966
|
return cb ? step(0).then((res) => cb(null, res), cb) : step(0);
|
|
@@ -997,13 +969,13 @@ var require_which = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/which
|
|
|
997
969
|
opt = opt || {};
|
|
998
970
|
const { pathEnv, pathExt, pathExtExe } = getPathInfo(cmd, opt);
|
|
999
971
|
const found = [];
|
|
1000
|
-
for (let i
|
|
1001
|
-
const ppRaw = pathEnv[i
|
|
972
|
+
for (let i = 0; i < pathEnv.length; i++) {
|
|
973
|
+
const ppRaw = pathEnv[i];
|
|
1002
974
|
const pathPart = /^".*"$/.test(ppRaw) ? ppRaw.slice(1, -1) : ppRaw;
|
|
1003
975
|
const pCmd = path$4.join(pathPart, cmd);
|
|
1004
|
-
const p
|
|
976
|
+
const p = !pathPart && /^\.[\\\/]/.test(cmd) ? cmd.slice(0, 2) + pCmd : pCmd;
|
|
1005
977
|
for (let j = 0; j < pathExt.length; j++) {
|
|
1006
|
-
const cur = p
|
|
978
|
+
const cur = p + pathExt[j];
|
|
1007
979
|
try {
|
|
1008
980
|
if (isexe.sync(cur, { pathExt: pathExtExe })) if (opt.all) found.push(cur);
|
|
1009
981
|
else return cur;
|
|
@@ -1014,25 +986,23 @@ var require_which = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/which
|
|
|
1014
986
|
if (opt.nothrow) return null;
|
|
1015
987
|
throw getNotFoundError(cmd);
|
|
1016
988
|
};
|
|
1017
|
-
module.exports = which
|
|
1018
|
-
which
|
|
1019
|
-
})
|
|
1020
|
-
|
|
989
|
+
module.exports = which;
|
|
990
|
+
which.sync = whichSync;
|
|
991
|
+
}));
|
|
1021
992
|
//#endregion
|
|
1022
993
|
//#region ../../node_modules/.pnpm/path-key@3.1.1/node_modules/path-key/index.js
|
|
1023
|
-
var require_path_key = /* @__PURE__ */
|
|
1024
|
-
const pathKey
|
|
994
|
+
var require_path_key = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
995
|
+
const pathKey = (options = {}) => {
|
|
1025
996
|
const environment = options.env || process.env;
|
|
1026
997
|
if ((options.platform || process.platform) !== "win32") return "PATH";
|
|
1027
998
|
return Object.keys(environment).reverse().find((key) => key.toUpperCase() === "PATH") || "Path";
|
|
1028
999
|
};
|
|
1029
|
-
module.exports = pathKey
|
|
1030
|
-
module.exports.default = pathKey
|
|
1031
|
-
})
|
|
1032
|
-
|
|
1000
|
+
module.exports = pathKey;
|
|
1001
|
+
module.exports.default = pathKey;
|
|
1002
|
+
}));
|
|
1033
1003
|
//#endregion
|
|
1034
1004
|
//#region ../../node_modules/.pnpm/cross-spawn@7.0.6/node_modules/cross-spawn/lib/util/resolveCommand.js
|
|
1035
|
-
var require_resolveCommand = /* @__PURE__ */
|
|
1005
|
+
var require_resolveCommand = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
1036
1006
|
const path$3 = __require("path");
|
|
1037
1007
|
const which = require_which();
|
|
1038
1008
|
const getPathKey = require_path_key();
|
|
@@ -1056,15 +1026,14 @@ var require_resolveCommand = /* @__PURE__ */ __commonJS({ "../../node_modules/.p
|
|
|
1056
1026
|
if (resolved) resolved = path$3.resolve(hasCustomCwd ? parsed.options.cwd : "", resolved);
|
|
1057
1027
|
return resolved;
|
|
1058
1028
|
}
|
|
1059
|
-
function resolveCommand
|
|
1029
|
+
function resolveCommand(parsed) {
|
|
1060
1030
|
return resolveCommandAttempt(parsed) || resolveCommandAttempt(parsed, true);
|
|
1061
1031
|
}
|
|
1062
|
-
module.exports = resolveCommand
|
|
1063
|
-
})
|
|
1064
|
-
|
|
1032
|
+
module.exports = resolveCommand;
|
|
1033
|
+
}));
|
|
1065
1034
|
//#endregion
|
|
1066
1035
|
//#region ../../node_modules/.pnpm/cross-spawn@7.0.6/node_modules/cross-spawn/lib/util/escape.js
|
|
1067
|
-
var require_escape = /* @__PURE__ */
|
|
1036
|
+
var require_escape = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
1068
1037
|
const metaCharsRegExp = /([()\][%!^"`<>&|;, *?])/g;
|
|
1069
1038
|
function escapeCommand(arg) {
|
|
1070
1039
|
arg = arg.replace(metaCharsRegExp, "^$1");
|
|
@@ -1081,34 +1050,31 @@ var require_escape = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/cros
|
|
|
1081
1050
|
}
|
|
1082
1051
|
module.exports.command = escapeCommand;
|
|
1083
1052
|
module.exports.argument = escapeArgument;
|
|
1084
|
-
})
|
|
1085
|
-
|
|
1053
|
+
}));
|
|
1086
1054
|
//#endregion
|
|
1087
1055
|
//#region ../../node_modules/.pnpm/shebang-regex@3.0.0/node_modules/shebang-regex/index.js
|
|
1088
|
-
var require_shebang_regex = /* @__PURE__ */
|
|
1056
|
+
var require_shebang_regex = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
1089
1057
|
module.exports = /^#!(.*)/;
|
|
1090
|
-
})
|
|
1091
|
-
|
|
1058
|
+
}));
|
|
1092
1059
|
//#endregion
|
|
1093
1060
|
//#region ../../node_modules/.pnpm/shebang-command@2.0.0/node_modules/shebang-command/index.js
|
|
1094
|
-
var require_shebang_command = /* @__PURE__ */
|
|
1061
|
+
var require_shebang_command = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
1095
1062
|
const shebangRegex = require_shebang_regex();
|
|
1096
1063
|
module.exports = (string = "") => {
|
|
1097
1064
|
const match = string.match(shebangRegex);
|
|
1098
1065
|
if (!match) return null;
|
|
1099
|
-
const [path
|
|
1100
|
-
const binary = path
|
|
1066
|
+
const [path, argument] = match[0].replace(/#! ?/, "").split(" ");
|
|
1067
|
+
const binary = path.split("/").pop();
|
|
1101
1068
|
if (binary === "env") return argument;
|
|
1102
1069
|
return argument ? `${binary} ${argument}` : binary;
|
|
1103
1070
|
};
|
|
1104
|
-
})
|
|
1105
|
-
|
|
1071
|
+
}));
|
|
1106
1072
|
//#endregion
|
|
1107
1073
|
//#region ../../node_modules/.pnpm/cross-spawn@7.0.6/node_modules/cross-spawn/lib/util/readShebang.js
|
|
1108
|
-
var require_readShebang = /* @__PURE__ */
|
|
1074
|
+
var require_readShebang = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
1109
1075
|
const fs$2 = __require("fs");
|
|
1110
1076
|
const shebangCommand = require_shebang_command();
|
|
1111
|
-
function readShebang
|
|
1077
|
+
function readShebang(command) {
|
|
1112
1078
|
const size = 150;
|
|
1113
1079
|
const buffer = Buffer.alloc(size);
|
|
1114
1080
|
let fd;
|
|
@@ -1119,17 +1085,16 @@ var require_readShebang = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm
|
|
|
1119
1085
|
} catch (e) {}
|
|
1120
1086
|
return shebangCommand(buffer.toString());
|
|
1121
1087
|
}
|
|
1122
|
-
module.exports = readShebang
|
|
1123
|
-
})
|
|
1124
|
-
|
|
1088
|
+
module.exports = readShebang;
|
|
1089
|
+
}));
|
|
1125
1090
|
//#endregion
|
|
1126
1091
|
//#region ../../node_modules/.pnpm/cross-spawn@7.0.6/node_modules/cross-spawn/lib/parse.js
|
|
1127
|
-
var require_parse = /* @__PURE__ */
|
|
1092
|
+
var require_parse = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
1128
1093
|
const path$2 = __require("path");
|
|
1129
1094
|
const resolveCommand = require_resolveCommand();
|
|
1130
1095
|
const escape = require_escape();
|
|
1131
1096
|
const readShebang = require_readShebang();
|
|
1132
|
-
const isWin
|
|
1097
|
+
const isWin = process.platform === "win32";
|
|
1133
1098
|
const isExecutableRegExp = /\.(?:com|exe)$/i;
|
|
1134
1099
|
const isCmdShimRegExp = /node_modules[\\/].bin[\\/][^\\/]+\.cmd$/i;
|
|
1135
1100
|
function detectShebang(parsed) {
|
|
@@ -1143,7 +1108,7 @@ var require_parse = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/cross
|
|
|
1143
1108
|
return parsed.file;
|
|
1144
1109
|
}
|
|
1145
1110
|
function parseNonShell(parsed) {
|
|
1146
|
-
if (!isWin
|
|
1111
|
+
if (!isWin) return parsed;
|
|
1147
1112
|
const commandFile = detectShebang(parsed);
|
|
1148
1113
|
const needsShell = !isExecutableRegExp.test(commandFile);
|
|
1149
1114
|
if (parsed.options.forceShell || needsShell) {
|
|
@@ -1162,7 +1127,7 @@ var require_parse = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/cross
|
|
|
1162
1127
|
}
|
|
1163
1128
|
return parsed;
|
|
1164
1129
|
}
|
|
1165
|
-
function parse
|
|
1130
|
+
function parse(command, args, options) {
|
|
1166
1131
|
if (args && !Array.isArray(args)) {
|
|
1167
1132
|
options = args;
|
|
1168
1133
|
args = null;
|
|
@@ -1181,12 +1146,11 @@ var require_parse = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/cross
|
|
|
1181
1146
|
};
|
|
1182
1147
|
return options.shell ? parsed : parseNonShell(parsed);
|
|
1183
1148
|
}
|
|
1184
|
-
module.exports = parse
|
|
1185
|
-
})
|
|
1186
|
-
|
|
1149
|
+
module.exports = parse;
|
|
1150
|
+
}));
|
|
1187
1151
|
//#endregion
|
|
1188
1152
|
//#region ../../node_modules/.pnpm/cross-spawn@7.0.6/node_modules/cross-spawn/lib/enoent.js
|
|
1189
|
-
var require_enoent = /* @__PURE__ */
|
|
1153
|
+
var require_enoent = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
1190
1154
|
const isWin = process.platform === "win32";
|
|
1191
1155
|
function notFoundError(original, syscall) {
|
|
1192
1156
|
return Object.assign(/* @__PURE__ */ new Error(`${syscall} ${original.command} ENOENT`), {
|
|
@@ -1197,15 +1161,15 @@ var require_enoent = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/cros
|
|
|
1197
1161
|
spawnargs: original.args
|
|
1198
1162
|
});
|
|
1199
1163
|
}
|
|
1200
|
-
function hookChildProcess(cp
|
|
1164
|
+
function hookChildProcess(cp, parsed) {
|
|
1201
1165
|
if (!isWin) return;
|
|
1202
|
-
const originalEmit = cp
|
|
1203
|
-
cp
|
|
1166
|
+
const originalEmit = cp.emit;
|
|
1167
|
+
cp.emit = function(name, arg1) {
|
|
1204
1168
|
if (name === "exit") {
|
|
1205
1169
|
const err = verifyENOENT(arg1, parsed);
|
|
1206
|
-
if (err) return originalEmit.call(cp
|
|
1170
|
+
if (err) return originalEmit.call(cp, "error", err);
|
|
1207
1171
|
}
|
|
1208
|
-
return originalEmit.apply(cp
|
|
1172
|
+
return originalEmit.apply(cp, arguments);
|
|
1209
1173
|
};
|
|
1210
1174
|
}
|
|
1211
1175
|
function verifyENOENT(status, parsed) {
|
|
@@ -1222,45 +1186,37 @@ var require_enoent = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/cros
|
|
|
1222
1186
|
verifyENOENTSync,
|
|
1223
1187
|
notFoundError
|
|
1224
1188
|
};
|
|
1225
|
-
})
|
|
1226
|
-
|
|
1189
|
+
}));
|
|
1227
1190
|
//#endregion
|
|
1228
|
-
//#region ../../node_modules/.pnpm/
|
|
1229
|
-
var
|
|
1191
|
+
//#region ../../node_modules/.pnpm/path-key@4.0.0/node_modules/path-key/index.js
|
|
1192
|
+
var import_cross_spawn = /* @__PURE__ */ __toESM((/* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
1230
1193
|
const cp = __require("child_process");
|
|
1231
1194
|
const parse = require_parse();
|
|
1232
1195
|
const enoent = require_enoent();
|
|
1233
|
-
function spawn
|
|
1196
|
+
function spawn(command, args, options) {
|
|
1234
1197
|
const parsed = parse(command, args, options);
|
|
1235
1198
|
const spawned = cp.spawn(parsed.command, parsed.args, parsed.options);
|
|
1236
1199
|
enoent.hookChildProcess(spawned, parsed);
|
|
1237
1200
|
return spawned;
|
|
1238
1201
|
}
|
|
1239
|
-
function spawnSync
|
|
1202
|
+
function spawnSync(command, args, options) {
|
|
1240
1203
|
const parsed = parse(command, args, options);
|
|
1241
1204
|
const result = cp.spawnSync(parsed.command, parsed.args, parsed.options);
|
|
1242
1205
|
result.error = result.error || enoent.verifyENOENTSync(result.status, parsed);
|
|
1243
1206
|
return result;
|
|
1244
1207
|
}
|
|
1245
|
-
module.exports = spawn
|
|
1246
|
-
module.exports.spawn = spawn
|
|
1247
|
-
module.exports.sync = spawnSync
|
|
1208
|
+
module.exports = spawn;
|
|
1209
|
+
module.exports.spawn = spawn;
|
|
1210
|
+
module.exports.sync = spawnSync;
|
|
1248
1211
|
module.exports._parse = parse;
|
|
1249
1212
|
module.exports._enoent = enoent;
|
|
1250
|
-
})
|
|
1251
|
-
|
|
1252
|
-
//#endregion
|
|
1253
|
-
//#region ../../node_modules/.pnpm/path-key@4.0.0/node_modules/path-key/index.js
|
|
1254
|
-
var import_cross_spawn = /* @__PURE__ */ __toESM(require_cross_spawn(), 1);
|
|
1213
|
+
})))(), 1);
|
|
1255
1214
|
function pathKey(options = {}) {
|
|
1256
|
-
const { env = process.env, platform
|
|
1257
|
-
if (platform
|
|
1215
|
+
const { env = process.env, platform = process.platform } = options;
|
|
1216
|
+
if (platform !== "win32") return "PATH";
|
|
1258
1217
|
return Object.keys(env).reverse().find((key) => key.toUpperCase() === "PATH") || "Path";
|
|
1259
1218
|
}
|
|
1260
|
-
|
|
1261
|
-
//#endregion
|
|
1262
|
-
//#region ../../node_modules/.pnpm/unicorn-magic@0.3.0/node_modules/unicorn-magic/node.js
|
|
1263
|
-
const execFileOriginal = promisify(execFile);
|
|
1219
|
+
promisify(execFile);
|
|
1264
1220
|
function toPath(urlOrPath) {
|
|
1265
1221
|
return urlOrPath instanceof URL ? fileURLToPath(urlOrPath) : urlOrPath;
|
|
1266
1222
|
}
|
|
@@ -1275,16 +1231,14 @@ function traversePathUp(startPath) {
|
|
|
1275
1231
|
}
|
|
1276
1232
|
} };
|
|
1277
1233
|
}
|
|
1278
|
-
const TEN_MEGABYTES_IN_BYTES = 10 * 1024 * 1024;
|
|
1279
|
-
|
|
1280
1234
|
//#endregion
|
|
1281
1235
|
//#region ../../node_modules/.pnpm/npm-run-path@6.0.0/node_modules/npm-run-path/index.js
|
|
1282
|
-
const npmRunPath = ({ cwd = process$1.cwd(), path: pathOption = process$1.env[pathKey()], preferLocal = true, execPath
|
|
1236
|
+
const npmRunPath = ({ cwd = process$1.cwd(), path: pathOption = process$1.env[pathKey()], preferLocal = true, execPath = process$1.execPath, addExecPath = true } = {}) => {
|
|
1283
1237
|
const cwdPath = path.resolve(toPath(cwd));
|
|
1284
1238
|
const result = [];
|
|
1285
1239
|
const pathParts = pathOption.split(path.delimiter);
|
|
1286
1240
|
if (preferLocal) applyPreferLocal(result, pathParts, cwdPath);
|
|
1287
|
-
if (addExecPath) applyExecPath(result, pathParts, execPath
|
|
1241
|
+
if (addExecPath) applyExecPath(result, pathParts, execPath, cwdPath);
|
|
1288
1242
|
return pathOption === "" || pathOption === path.delimiter ? `${result.join(path.delimiter)}${pathOption}` : [...result, pathOption].join(path.delimiter);
|
|
1289
1243
|
};
|
|
1290
1244
|
const applyPreferLocal = (result, pathParts, cwdPath) => {
|
|
@@ -1293,18 +1247,17 @@ const applyPreferLocal = (result, pathParts, cwdPath) => {
|
|
|
1293
1247
|
if (!pathParts.includes(pathPart)) result.push(pathPart);
|
|
1294
1248
|
}
|
|
1295
1249
|
};
|
|
1296
|
-
const applyExecPath = (result, pathParts, execPath
|
|
1297
|
-
const pathPart = path.resolve(cwdPath, toPath(execPath
|
|
1250
|
+
const applyExecPath = (result, pathParts, execPath, cwdPath) => {
|
|
1251
|
+
const pathPart = path.resolve(cwdPath, toPath(execPath), "..");
|
|
1298
1252
|
if (!pathParts.includes(pathPart)) result.push(pathPart);
|
|
1299
1253
|
};
|
|
1300
|
-
const npmRunPathEnv = ({ env = process$1.env
|
|
1254
|
+
const npmRunPathEnv = ({ env = process$1.env, ...options } = {}) => {
|
|
1301
1255
|
env = { ...env };
|
|
1302
1256
|
const pathName = pathKey({ env });
|
|
1303
1257
|
options.path = env[pathName];
|
|
1304
1258
|
env[pathName] = npmRunPath(options);
|
|
1305
1259
|
return env;
|
|
1306
1260
|
};
|
|
1307
|
-
|
|
1308
1261
|
//#endregion
|
|
1309
1262
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/return/final-error.js
|
|
1310
1263
|
const getFinalError = (originalError, message, isSync) => {
|
|
@@ -1332,11 +1285,10 @@ var ExecaError = class extends Error {};
|
|
|
1332
1285
|
setErrorName(ExecaError, ExecaError.name);
|
|
1333
1286
|
var ExecaSyncError = class extends Error {};
|
|
1334
1287
|
setErrorName(ExecaSyncError, ExecaSyncError.name);
|
|
1335
|
-
|
|
1336
1288
|
//#endregion
|
|
1337
|
-
//#region ../../node_modules/.pnpm/human-signals@8.0.
|
|
1289
|
+
//#region ../../node_modules/.pnpm/human-signals@8.0.1/node_modules/human-signals/build/src/realtime.js
|
|
1338
1290
|
const getRealtimeSignals = () => {
|
|
1339
|
-
const length =
|
|
1291
|
+
const length = 64 - SIGRTMIN + 1;
|
|
1340
1292
|
return Array.from({ length }, getRealtimeSignal);
|
|
1341
1293
|
};
|
|
1342
1294
|
const getRealtimeSignal = (value, index) => ({
|
|
@@ -1347,10 +1299,8 @@ const getRealtimeSignal = (value, index) => ({
|
|
|
1347
1299
|
standard: "posix"
|
|
1348
1300
|
});
|
|
1349
1301
|
const SIGRTMIN = 34;
|
|
1350
|
-
const SIGRTMAX = 64;
|
|
1351
|
-
|
|
1352
1302
|
//#endregion
|
|
1353
|
-
//#region ../../node_modules/.pnpm/human-signals@8.0.
|
|
1303
|
+
//#region ../../node_modules/.pnpm/human-signals@8.0.1/node_modules/human-signals/build/src/core.js
|
|
1354
1304
|
const SIGNALS = [
|
|
1355
1305
|
{
|
|
1356
1306
|
name: "SIGHUP",
|
|
@@ -1622,9 +1572,8 @@ const SIGNALS = [
|
|
|
1622
1572
|
standard: "other"
|
|
1623
1573
|
}
|
|
1624
1574
|
];
|
|
1625
|
-
|
|
1626
1575
|
//#endregion
|
|
1627
|
-
//#region ../../node_modules/.pnpm/human-signals@8.0.
|
|
1576
|
+
//#region ../../node_modules/.pnpm/human-signals@8.0.1/node_modules/human-signals/build/src/signals.js
|
|
1628
1577
|
const getSignals = () => {
|
|
1629
1578
|
const realtimeSignals = getRealtimeSignals();
|
|
1630
1579
|
return [...SIGNALS, ...realtimeSignals].map(normalizeSignal$1);
|
|
@@ -1642,12 +1591,11 @@ const normalizeSignal$1 = ({ name, number: defaultNumber, description, action, f
|
|
|
1642
1591
|
standard
|
|
1643
1592
|
};
|
|
1644
1593
|
};
|
|
1645
|
-
|
|
1646
1594
|
//#endregion
|
|
1647
|
-
//#region ../../node_modules/.pnpm/human-signals@8.0.
|
|
1595
|
+
//#region ../../node_modules/.pnpm/human-signals@8.0.1/node_modules/human-signals/build/src/main.js
|
|
1648
1596
|
const getSignalsByName = () => {
|
|
1649
|
-
const signals
|
|
1650
|
-
return Object.fromEntries(signals
|
|
1597
|
+
const signals = getSignals();
|
|
1598
|
+
return Object.fromEntries(signals.map(getSignalByName));
|
|
1651
1599
|
};
|
|
1652
1600
|
const getSignalByName = ({ name, number, description, supported, action, forced, standard }) => [name, {
|
|
1653
1601
|
name,
|
|
@@ -1660,13 +1608,12 @@ const getSignalByName = ({ name, number, description, supported, action, forced,
|
|
|
1660
1608
|
}];
|
|
1661
1609
|
const signalsByName = getSignalsByName();
|
|
1662
1610
|
const getSignalsByNumber = () => {
|
|
1663
|
-
const signals
|
|
1664
|
-
const
|
|
1665
|
-
const signalsA = Array.from({ length }, (value, number) => getSignalByNumber(number, signals$1));
|
|
1611
|
+
const signals = getSignals();
|
|
1612
|
+
const signalsA = Array.from({ length: 65 }, (value, number) => getSignalByNumber(number, signals));
|
|
1666
1613
|
return Object.assign({}, ...signalsA);
|
|
1667
1614
|
};
|
|
1668
|
-
const getSignalByNumber = (number, signals
|
|
1669
|
-
const signal = findSignalByNumber(number, signals
|
|
1615
|
+
const getSignalByNumber = (number, signals) => {
|
|
1616
|
+
const signal = findSignalByNumber(number, signals);
|
|
1670
1617
|
if (signal === void 0) return {};
|
|
1671
1618
|
const { name, description, supported, action, forced, standard } = signal;
|
|
1672
1619
|
return { [number]: {
|
|
@@ -1679,13 +1626,12 @@ const getSignalByNumber = (number, signals$1) => {
|
|
|
1679
1626
|
standard
|
|
1680
1627
|
} };
|
|
1681
1628
|
};
|
|
1682
|
-
const findSignalByNumber = (number, signals
|
|
1683
|
-
const signal = signals
|
|
1629
|
+
const findSignalByNumber = (number, signals) => {
|
|
1630
|
+
const signal = signals.find(({ name }) => constants.signals[name] === number);
|
|
1684
1631
|
if (signal !== void 0) return signal;
|
|
1685
|
-
return signals
|
|
1632
|
+
return signals.find((signalA) => signalA.number === number);
|
|
1686
1633
|
};
|
|
1687
|
-
|
|
1688
|
-
|
|
1634
|
+
getSignalsByNumber();
|
|
1689
1635
|
//#endregion
|
|
1690
1636
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/terminate/signal.js
|
|
1691
1637
|
const normalizeKillSignal = (killSignal) => {
|
|
@@ -1715,7 +1661,6 @@ Available signal numbers: ${getAvailableSignalIntegers()}.`;
|
|
|
1715
1661
|
const getAvailableSignalNames = () => Object.keys(constants.signals).sort().map((signalName) => `'${signalName}'`).join(", ");
|
|
1716
1662
|
const getAvailableSignalIntegers = () => [...new Set(Object.values(constants.signals).sort((signalInteger, signalIntegerTwo) => signalInteger - signalIntegerTwo))].join(", ");
|
|
1717
1663
|
const getSignalDescription = (signal) => signalsByName[signal].description;
|
|
1718
|
-
|
|
1719
1664
|
//#endregion
|
|
1720
1665
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/terminate/kill.js
|
|
1721
1666
|
const normalizeForceKillAfterDelay = (forceKillAfterDelay) => {
|
|
@@ -1767,13 +1712,11 @@ const killOnTimeout = async ({ kill, forceKillAfterDelay, context, controllerSig
|
|
|
1767
1712
|
if (kill("SIGKILL")) context.isForcefullyTerminated ??= true;
|
|
1768
1713
|
} catch {}
|
|
1769
1714
|
};
|
|
1770
|
-
|
|
1771
1715
|
//#endregion
|
|
1772
1716
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/utils/abort-signal.js
|
|
1773
1717
|
const onAbortedSignal = async (mainSignal, stopSignal) => {
|
|
1774
1718
|
if (!mainSignal.aborted) await once(mainSignal, "abort", { signal: stopSignal });
|
|
1775
1719
|
};
|
|
1776
|
-
|
|
1777
1720
|
//#endregion
|
|
1778
1721
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/terminate/cancel.js
|
|
1779
1722
|
const validateCancelSignal = ({ cancelSignal }) => {
|
|
@@ -1786,18 +1729,17 @@ const terminateOnCancel = async (subprocess, cancelSignal, context, { signal })
|
|
|
1786
1729
|
subprocess.kill();
|
|
1787
1730
|
throw cancelSignal.reason;
|
|
1788
1731
|
};
|
|
1789
|
-
|
|
1790
1732
|
//#endregion
|
|
1791
1733
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/ipc/validation.js
|
|
1792
|
-
const validateIpcMethod = ({ methodName, isSubprocess, ipc, isConnected
|
|
1734
|
+
const validateIpcMethod = ({ methodName, isSubprocess, ipc, isConnected }) => {
|
|
1793
1735
|
validateIpcOption(methodName, isSubprocess, ipc);
|
|
1794
|
-
validateConnection(methodName, isSubprocess, isConnected
|
|
1736
|
+
validateConnection(methodName, isSubprocess, isConnected);
|
|
1795
1737
|
};
|
|
1796
1738
|
const validateIpcOption = (methodName, isSubprocess, ipc) => {
|
|
1797
1739
|
if (!ipc) throw new Error(`${getMethodName(methodName, isSubprocess)} can only be used if the \`ipc\` option is \`true\`.`);
|
|
1798
1740
|
};
|
|
1799
|
-
const validateConnection = (methodName, isSubprocess, isConnected
|
|
1800
|
-
if (!isConnected
|
|
1741
|
+
const validateConnection = (methodName, isSubprocess, isConnected) => {
|
|
1742
|
+
if (!isConnected) throw new Error(`${getMethodName(methodName, isSubprocess)} cannot be used: the ${getOtherProcessName(isSubprocess)} has already exited or disconnected.`);
|
|
1801
1743
|
};
|
|
1802
1744
|
const throwOnEarlyDisconnect = (isSubprocess) => {
|
|
1803
1745
|
throw new Error(`${getMethodName("getOneMessage", isSubprocess)} could not complete: the ${getOtherProcessName(isSubprocess)} exited or disconnected.`);
|
|
@@ -1841,7 +1783,6 @@ const getOtherProcessName = (isSubprocess) => isSubprocess ? "parent process" :
|
|
|
1841
1783
|
const disconnect = (anyProcess) => {
|
|
1842
1784
|
if (anyProcess.connected) anyProcess.disconnect();
|
|
1843
1785
|
};
|
|
1844
|
-
|
|
1845
1786
|
//#endregion
|
|
1846
1787
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/utils/deferred.js
|
|
1847
1788
|
const createDeferred = () => {
|
|
@@ -1854,7 +1795,6 @@ const createDeferred = () => {
|
|
|
1854
1795
|
});
|
|
1855
1796
|
return Object.assign(promise, methods);
|
|
1856
1797
|
};
|
|
1857
|
-
|
|
1858
1798
|
//#endregion
|
|
1859
1799
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/arguments/fd-options.js
|
|
1860
1800
|
const getToStream = (destination, to = "stdin") => {
|
|
@@ -1931,7 +1871,6 @@ const serializeOptionValue = (value) => {
|
|
|
1931
1871
|
if (typeof value === "string") return `'${value}'`;
|
|
1932
1872
|
return typeof value === "number" ? `${value}` : "Stream";
|
|
1933
1873
|
};
|
|
1934
|
-
|
|
1935
1874
|
//#endregion
|
|
1936
1875
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/utils/max-listeners.js
|
|
1937
1876
|
const incrementMaxListeners = (eventEmitter, maxListenersIncrement, signal) => {
|
|
@@ -1942,7 +1881,6 @@ const incrementMaxListeners = (eventEmitter, maxListenersIncrement, signal) => {
|
|
|
1942
1881
|
eventEmitter.setMaxListeners(eventEmitter.getMaxListeners() - maxListenersIncrement);
|
|
1943
1882
|
});
|
|
1944
1883
|
};
|
|
1945
|
-
|
|
1946
1884
|
//#endregion
|
|
1947
1885
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/ipc/reference.js
|
|
1948
1886
|
const addReference = (channel, reference) => {
|
|
@@ -1969,7 +1907,6 @@ const redoAddedReferences = (channel, isSubprocess) => {
|
|
|
1969
1907
|
addReferenceCount(channel);
|
|
1970
1908
|
}
|
|
1971
1909
|
};
|
|
1972
|
-
|
|
1973
1910
|
//#endregion
|
|
1974
1911
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/ipc/incoming.js
|
|
1975
1912
|
const onMessage = async ({ anyProcess, channel, isSubprocess, ipcEmitter }, wrappedMessage) => {
|
|
@@ -2003,7 +1940,6 @@ const onDisconnect = async ({ anyProcess, channel, isSubprocess, ipcEmitter, bou
|
|
|
2003
1940
|
ipcEmitter.emit("disconnect");
|
|
2004
1941
|
};
|
|
2005
1942
|
const INCOMING_MESSAGES = /* @__PURE__ */ new WeakMap();
|
|
2006
|
-
|
|
2007
1943
|
//#endregion
|
|
2008
1944
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/ipc/forward.js
|
|
2009
1945
|
const getIpcEmitter = (anyProcess, channel, isSubprocess) => {
|
|
@@ -2041,7 +1977,6 @@ const isConnected = (anyProcess) => {
|
|
|
2041
1977
|
const ipcEmitter = IPC_EMITTERS.get(anyProcess);
|
|
2042
1978
|
return ipcEmitter === void 0 ? anyProcess.channel !== null : ipcEmitter.connected;
|
|
2043
1979
|
};
|
|
2044
|
-
|
|
2045
1980
|
//#endregion
|
|
2046
1981
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/ipc/strict.js
|
|
2047
1982
|
const handleSendStrict = ({ anyProcess, channel, isSubprocess, message, strict }) => {
|
|
@@ -2113,7 +2048,6 @@ const throwOnDisconnect$1 = async (anyProcess, isSubprocess, { signal }) => {
|
|
|
2113
2048
|
};
|
|
2114
2049
|
const REQUEST_TYPE = "execa:ipc:request";
|
|
2115
2050
|
const RESPONSE_TYPE = "execa:ipc:response";
|
|
2116
|
-
|
|
2117
2051
|
//#endregion
|
|
2118
2052
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/ipc/outgoing.js
|
|
2119
2053
|
const startSendMessage = (anyProcess, wrappedMessage, strict) => {
|
|
@@ -2143,7 +2077,6 @@ const waitForOutgoingMessages = async (anyProcess, ipcEmitter, wrappedMessage) =
|
|
|
2143
2077
|
const OUTGOING_MESSAGES = /* @__PURE__ */ new WeakMap();
|
|
2144
2078
|
const hasMessageListeners = (anyProcess, ipcEmitter) => ipcEmitter.listenerCount("message") > getMinListenerCount(anyProcess);
|
|
2145
2079
|
const getMinListenerCount = (anyProcess) => SUBPROCESS_OPTIONS.has(anyProcess) && !getFdSpecificValue(SUBPROCESS_OPTIONS.get(anyProcess).options.buffer, "ipc") ? 1 : 0;
|
|
2146
|
-
|
|
2147
2080
|
//#endregion
|
|
2148
2081
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/ipc/send.js
|
|
2149
2082
|
const sendMessage$1 = ({ anyProcess, channel, isSubprocess, ipc }, message, { strict = false } = {}) => {
|
|
@@ -2213,7 +2146,6 @@ const getSendMethod = (anyProcess) => {
|
|
|
2213
2146
|
return sendMethod;
|
|
2214
2147
|
};
|
|
2215
2148
|
const PROCESS_SEND_METHODS = /* @__PURE__ */ new WeakMap();
|
|
2216
|
-
|
|
2217
2149
|
//#endregion
|
|
2218
2150
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/ipc/graceful.js
|
|
2219
2151
|
const sendAbort = (subprocess, message) => {
|
|
@@ -2264,7 +2196,6 @@ const abortOnDisconnect = () => {
|
|
|
2264
2196
|
cancelController.abort(getAbortDisconnectError());
|
|
2265
2197
|
};
|
|
2266
2198
|
const cancelController = new AbortController();
|
|
2267
|
-
|
|
2268
2199
|
//#endregion
|
|
2269
2200
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/terminate/graceful.js
|
|
2270
2201
|
const validateGracefulCancel = ({ gracefulCancel, cancelSignal, ipc, serialization }) => {
|
|
@@ -2303,7 +2234,6 @@ const getReason = ({ reason }) => {
|
|
|
2303
2234
|
});
|
|
2304
2235
|
return error;
|
|
2305
2236
|
};
|
|
2306
|
-
|
|
2307
2237
|
//#endregion
|
|
2308
2238
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/terminate/timeout.js
|
|
2309
2239
|
const validateTimeout = ({ timeout }) => {
|
|
@@ -2316,7 +2246,6 @@ const killAfterTimeout = async (subprocess, timeout, context, { signal }) => {
|
|
|
2316
2246
|
subprocess.kill();
|
|
2317
2247
|
throw new DiscardedError();
|
|
2318
2248
|
};
|
|
2319
|
-
|
|
2320
2249
|
//#endregion
|
|
2321
2250
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/methods/node.js
|
|
2322
2251
|
const mapNode = ({ options }) => {
|
|
@@ -2326,7 +2255,7 @@ const mapNode = ({ options }) => {
|
|
|
2326
2255
|
node: true
|
|
2327
2256
|
} };
|
|
2328
2257
|
};
|
|
2329
|
-
const handleNodeOption = (file, commandArguments, { node: shouldHandleNode = false, nodePath = execPath, nodeOptions = execArgv.filter((nodeOption) => !nodeOption.startsWith("--inspect")), cwd, execPath: formerNodePath
|
|
2258
|
+
const handleNodeOption = (file, commandArguments, { node: shouldHandleNode = false, nodePath = execPath, nodeOptions = execArgv.filter((nodeOption) => !nodeOption.startsWith("--inspect")), cwd, execPath: formerNodePath, ...options }) => {
|
|
2330
2259
|
if (formerNodePath !== void 0) throw new TypeError("The \"execPath\" option has been removed. Please use the \"nodePath\" option instead.");
|
|
2331
2260
|
const normalizedNodePath = safeNormalizeFileUrl(nodePath, "The \"nodePath\" option");
|
|
2332
2261
|
const resolvedNodePath = path.resolve(cwd, normalizedNodePath);
|
|
@@ -2356,7 +2285,6 @@ const handleNodeOption = (file, commandArguments, { node: shouldHandleNode = fal
|
|
|
2356
2285
|
}
|
|
2357
2286
|
];
|
|
2358
2287
|
};
|
|
2359
|
-
|
|
2360
2288
|
//#endregion
|
|
2361
2289
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/ipc/ipc-input.js
|
|
2362
2290
|
const validateIpcInputOption = ({ ipcInput, ipc, serialization }) => {
|
|
@@ -2386,7 +2314,6 @@ const sendIpcInput = async (subprocess, ipcInput) => {
|
|
|
2386
2314
|
if (ipcInput === void 0) return;
|
|
2387
2315
|
await subprocess.sendMessage(ipcInput);
|
|
2388
2316
|
};
|
|
2389
|
-
|
|
2390
2317
|
//#endregion
|
|
2391
2318
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/arguments/encoding-option.js
|
|
2392
2319
|
const validateEncoding = ({ encoding }) => {
|
|
@@ -2394,7 +2321,7 @@ const validateEncoding = ({ encoding }) => {
|
|
|
2394
2321
|
const correctEncoding = getCorrectEncoding(encoding);
|
|
2395
2322
|
if (correctEncoding !== void 0) throw new TypeError(`Invalid option \`encoding: ${serializeEncoding(encoding)}\`.
|
|
2396
2323
|
Please rename it to ${serializeEncoding(correctEncoding)}.`);
|
|
2397
|
-
const correctEncodings = [...ENCODINGS].map((correctEncoding
|
|
2324
|
+
const correctEncodings = [...ENCODINGS].map((correctEncoding) => serializeEncoding(correctEncoding)).join(", ");
|
|
2398
2325
|
throw new TypeError(`Invalid option \`encoding: ${serializeEncoding(encoding)}\`.
|
|
2399
2326
|
Please rename it to one of: ${correctEncodings}.`);
|
|
2400
2327
|
};
|
|
@@ -2423,7 +2350,6 @@ const ENCODING_ALIASES = {
|
|
|
2423
2350
|
binary: "latin1"
|
|
2424
2351
|
};
|
|
2425
2352
|
const serializeEncoding = (encoding) => typeof encoding === "string" ? `"${encoding}"` : String(encoding);
|
|
2426
|
-
|
|
2427
2353
|
//#endregion
|
|
2428
2354
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/arguments/cwd.js
|
|
2429
2355
|
const normalizeCwd = (cwd = getDefaultCwd()) => {
|
|
@@ -2449,7 +2375,6 @@ const fixCwdError = (originalMessage, cwd) => {
|
|
|
2449
2375
|
if (!cwdStat.isDirectory()) return `The "cwd" option is not a directory: ${cwd}.\n${originalMessage}`;
|
|
2450
2376
|
return originalMessage;
|
|
2451
2377
|
};
|
|
2452
|
-
|
|
2453
2378
|
//#endregion
|
|
2454
2379
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/arguments/options.js
|
|
2455
2380
|
const normalizeOptions = (filePath, rawArguments, rawOptions) => {
|
|
@@ -2474,7 +2399,7 @@ const normalizeOptions = (filePath, rawArguments, rawOptions) => {
|
|
|
2474
2399
|
options
|
|
2475
2400
|
};
|
|
2476
2401
|
};
|
|
2477
|
-
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"
|
|
2402
|
+
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 }) => ({
|
|
2478
2403
|
...options,
|
|
2479
2404
|
extendEnv,
|
|
2480
2405
|
preferLocal,
|
|
@@ -2506,7 +2431,6 @@ const getEnv = ({ env: envOption, extendEnv, preferLocal, node, localDirectory,
|
|
|
2506
2431
|
});
|
|
2507
2432
|
return env;
|
|
2508
2433
|
};
|
|
2509
|
-
|
|
2510
2434
|
//#endregion
|
|
2511
2435
|
//#region ../../node_modules/.pnpm/strip-final-newline@4.0.0/node_modules/strip-final-newline/index.js
|
|
2512
2436
|
function stripFinalNewline(input) {
|
|
@@ -2520,22 +2444,20 @@ const LF = "\n";
|
|
|
2520
2444
|
const LF_BINARY = LF.codePointAt(0);
|
|
2521
2445
|
const CR = "\r";
|
|
2522
2446
|
const CR_BINARY = CR.codePointAt(0);
|
|
2523
|
-
|
|
2524
2447
|
//#endregion
|
|
2525
2448
|
//#region ../../node_modules/.pnpm/is-stream@4.0.1/node_modules/is-stream/index.js
|
|
2526
2449
|
function isStream(stream, { checkOpen = true } = {}) {
|
|
2527
2450
|
return stream !== null && typeof stream === "object" && (stream.writable || stream.readable || !checkOpen || stream.writable === void 0 && stream.readable === void 0) && typeof stream.pipe === "function";
|
|
2528
2451
|
}
|
|
2529
|
-
function isWritableStream(stream, { checkOpen = true } = {}) {
|
|
2452
|
+
function isWritableStream$1(stream, { checkOpen = true } = {}) {
|
|
2530
2453
|
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";
|
|
2531
2454
|
}
|
|
2532
|
-
function isReadableStream(stream, { checkOpen = true } = {}) {
|
|
2455
|
+
function isReadableStream$1(stream, { checkOpen = true } = {}) {
|
|
2533
2456
|
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";
|
|
2534
2457
|
}
|
|
2535
2458
|
function isDuplexStream(stream, options) {
|
|
2536
|
-
return isWritableStream(stream, options) && isReadableStream(stream, options);
|
|
2459
|
+
return isWritableStream$1(stream, options) && isReadableStream$1(stream, options);
|
|
2537
2460
|
}
|
|
2538
|
-
|
|
2539
2461
|
//#endregion
|
|
2540
2462
|
//#region ../../node_modules/.pnpm/@sec-ant+readable-stream@0.4.1/node_modules/@sec-ant/readable-stream/dist/ponyfill/asyncIterator.js
|
|
2541
2463
|
const a = Object.getPrototypeOf(Object.getPrototypeOf(
|
|
@@ -2616,11 +2538,10 @@ function h({ preventCancel: r = !1 } = {}) {
|
|
|
2616
2538
|
const t = new c(this.getReader(), r), s = Object.create(u);
|
|
2617
2539
|
return s[n] = t, s;
|
|
2618
2540
|
}
|
|
2619
|
-
|
|
2620
2541
|
//#endregion
|
|
2621
2542
|
//#region ../../node_modules/.pnpm/get-stream@9.0.1/node_modules/get-stream/source/stream.js
|
|
2622
2543
|
const getAsyncIterable = (stream) => {
|
|
2623
|
-
if (isReadableStream(stream, { checkOpen: false }) && nodeImports.on !== void 0) return getStreamIterable(stream);
|
|
2544
|
+
if (isReadableStream$1(stream, { checkOpen: false }) && nodeImports.on !== void 0) return getStreamIterable(stream);
|
|
2624
2545
|
if (typeof stream?.[Symbol.asyncIterator] === "function") return stream;
|
|
2625
2546
|
if (toString.call(stream) === "[object ReadableStream]") return h.call(stream);
|
|
2626
2547
|
throw new TypeError("The first argument must be a Readable, a ReadableStream, or an async iterable.");
|
|
@@ -2654,7 +2575,6 @@ const handleStreamEnd = async (stream, controller, state) => {
|
|
|
2654
2575
|
}
|
|
2655
2576
|
};
|
|
2656
2577
|
const nodeImports = {};
|
|
2657
|
-
|
|
2658
2578
|
//#endregion
|
|
2659
2579
|
//#region ../../node_modules/.pnpm/get-stream@9.0.1/node_modules/get-stream/source/contents.js
|
|
2660
2580
|
const getStreamContents$1 = async (stream, { init, convertChunk, getSize, truncateChunk, addChunk, getFinalChunk, finalize }, { maxBuffer = Number.POSITIVE_INFINITY } = {}) => {
|
|
@@ -2730,7 +2650,6 @@ var MaxBufferError = class extends Error {
|
|
|
2730
2650
|
super("maxBuffer exceeded");
|
|
2731
2651
|
}
|
|
2732
2652
|
};
|
|
2733
|
-
|
|
2734
2653
|
//#endregion
|
|
2735
2654
|
//#region ../../node_modules/.pnpm/get-stream@9.0.1/node_modules/get-stream/source/utils.js
|
|
2736
2655
|
const identity = (value) => value;
|
|
@@ -2740,7 +2659,6 @@ const throwObjectStream = (chunk) => {
|
|
|
2740
2659
|
throw new Error(`Streams in object mode are not supported: ${String(chunk)}`);
|
|
2741
2660
|
};
|
|
2742
2661
|
const getLengthProperty = (convertedChunk) => convertedChunk.length;
|
|
2743
|
-
|
|
2744
2662
|
//#endregion
|
|
2745
2663
|
//#region ../../node_modules/.pnpm/get-stream@9.0.1/node_modules/get-stream/source/array.js
|
|
2746
2664
|
async function getStreamAsArray(stream, options) {
|
|
@@ -2768,7 +2686,6 @@ const arrayMethods = {
|
|
|
2768
2686
|
getFinalChunk: noop$1,
|
|
2769
2687
|
finalize: getContentsProperty
|
|
2770
2688
|
};
|
|
2771
|
-
|
|
2772
2689
|
//#endregion
|
|
2773
2690
|
//#region ../../node_modules/.pnpm/get-stream@9.0.1/node_modules/get-stream/source/array-buffer.js
|
|
2774
2691
|
async function getStreamAsArrayBuffer(stream, options) {
|
|
@@ -2820,7 +2737,6 @@ const arrayBufferMethods = {
|
|
|
2820
2737
|
getFinalChunk: noop$1,
|
|
2821
2738
|
finalize: finalizeArrayBuffer
|
|
2822
2739
|
};
|
|
2823
|
-
|
|
2824
2740
|
//#endregion
|
|
2825
2741
|
//#region ../../node_modules/.pnpm/get-stream@9.0.1/node_modules/get-stream/source/string.js
|
|
2826
2742
|
async function getStreamAsString(stream, options) {
|
|
@@ -2830,11 +2746,11 @@ const initString = () => ({
|
|
|
2830
2746
|
contents: "",
|
|
2831
2747
|
textDecoder: new TextDecoder()
|
|
2832
2748
|
});
|
|
2833
|
-
const useTextDecoder = (chunk, { textDecoder
|
|
2749
|
+
const useTextDecoder = (chunk, { textDecoder }) => textDecoder.decode(chunk, { stream: true });
|
|
2834
2750
|
const addStringChunk = (convertedChunk, { contents }) => contents + convertedChunk;
|
|
2835
2751
|
const truncateStringChunk = (convertedChunk, chunkSize) => convertedChunk.slice(0, chunkSize);
|
|
2836
|
-
const getFinalStringChunk = ({ textDecoder
|
|
2837
|
-
const finalChunk = textDecoder
|
|
2752
|
+
const getFinalStringChunk = ({ textDecoder }) => {
|
|
2753
|
+
const finalChunk = textDecoder.decode();
|
|
2838
2754
|
return finalChunk === "" ? void 0 : finalChunk;
|
|
2839
2755
|
};
|
|
2840
2756
|
const stringMethods = {
|
|
@@ -2853,7 +2769,6 @@ const stringMethods = {
|
|
|
2853
2769
|
getFinalChunk: getFinalStringChunk,
|
|
2854
2770
|
finalize: getContentsProperty
|
|
2855
2771
|
};
|
|
2856
|
-
|
|
2857
2772
|
//#endregion
|
|
2858
2773
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/io/max-buffer.js
|
|
2859
2774
|
const handleMaxBuffer = ({ error, stream, readableObjectMode, lines, encoding, fdNumber }) => {
|
|
@@ -2909,7 +2824,6 @@ const truncateMaxBufferSync = (result, isMaxBuffer, maxBuffer) => {
|
|
|
2909
2824
|
return result.length > maxBufferValue ? result.slice(0, maxBufferValue) : result;
|
|
2910
2825
|
};
|
|
2911
2826
|
const getMaxBufferSync = ([, stdoutMaxBuffer]) => stdoutMaxBuffer;
|
|
2912
|
-
|
|
2913
2827
|
//#endregion
|
|
2914
2828
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/return/message.js
|
|
2915
2829
|
const createMessages = ({ stdio, all, ipcOutput, originalError, signal, signalDescription, exitCode, escapedCommand, timedOut, isCanceled, isGracefullyCanceled, isMaxBuffer, isForcefullyTerminated, forceKillAfterDelay, killSignal, maxBuffer, timeout, cwd }) => {
|
|
@@ -2971,7 +2885,6 @@ const serializeMessageItem = (messageItem) => {
|
|
|
2971
2885
|
if (isUint8Array(messageItem)) return uint8ArrayToString(messageItem);
|
|
2972
2886
|
return "";
|
|
2973
2887
|
};
|
|
2974
|
-
|
|
2975
2888
|
//#endregion
|
|
2976
2889
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/return/result.js
|
|
2977
2890
|
const makeSuccessResult = ({ command, escapedCommand, stdio, all, ipcOutput, options: { cwd }, startTime }) => omitUndefinedProperties({
|
|
@@ -3089,7 +3002,6 @@ const normalizeExitPayload = (rawExitCode, rawSignal) => {
|
|
|
3089
3002
|
signalDescription: signal === void 0 ? void 0 : getSignalDescription(rawSignal)
|
|
3090
3003
|
};
|
|
3091
3004
|
};
|
|
3092
|
-
|
|
3093
3005
|
//#endregion
|
|
3094
3006
|
//#region ../../node_modules/.pnpm/parse-ms@4.0.0/node_modules/parse-ms/index.js
|
|
3095
3007
|
const toZeroIfInfinity = (value) => Number.isFinite(value) ? value : 0;
|
|
@@ -3124,11 +3036,10 @@ function parseMilliseconds(milliseconds) {
|
|
|
3124
3036
|
}
|
|
3125
3037
|
throw new TypeError("Expected a finite number or bigint");
|
|
3126
3038
|
}
|
|
3127
|
-
|
|
3128
3039
|
//#endregion
|
|
3129
3040
|
//#region ../../node_modules/.pnpm/pretty-ms@9.2.0/node_modules/pretty-ms/index.js
|
|
3130
3041
|
const isZero = (value) => value === 0 || value === 0n;
|
|
3131
|
-
const pluralize = (word, count
|
|
3042
|
+
const pluralize = (word, count) => count === 1 || count === 1n ? word : `${word}s`;
|
|
3132
3043
|
const SECOND_ROUNDING_EPSILON = 1e-7;
|
|
3133
3044
|
const ONE_DAY_IN_MILLISECONDS = 24n * 60n * 60n * 1000n;
|
|
3134
3045
|
function prettyMilliseconds(milliseconds, options) {
|
|
@@ -3177,16 +3088,16 @@ function prettyMilliseconds(milliseconds, options) {
|
|
|
3177
3088
|
add(Number(parsed.minutes), "minute", "m");
|
|
3178
3089
|
if (!options.hideSeconds) if (options.separateMilliseconds || options.formatSubMilliseconds || !options.colonNotation && milliseconds < 1e3) {
|
|
3179
3090
|
const seconds = Number(parsed.seconds);
|
|
3180
|
-
const milliseconds
|
|
3091
|
+
const milliseconds = Number(parsed.milliseconds);
|
|
3181
3092
|
const microseconds = Number(parsed.microseconds);
|
|
3182
3093
|
const nanoseconds = Number(parsed.nanoseconds);
|
|
3183
3094
|
add(seconds, "second", "s");
|
|
3184
3095
|
if (options.formatSubMilliseconds) {
|
|
3185
|
-
add(milliseconds
|
|
3096
|
+
add(milliseconds, "millisecond", "ms");
|
|
3186
3097
|
add(microseconds, "microsecond", "µs");
|
|
3187
3098
|
add(nanoseconds, "nanosecond", "ns");
|
|
3188
3099
|
} else {
|
|
3189
|
-
const millisecondsAndBelow = milliseconds
|
|
3100
|
+
const millisecondsAndBelow = milliseconds + microseconds / 1e3 + nanoseconds / 1e6;
|
|
3190
3101
|
const millisecondsDecimalDigits = typeof options.millisecondsDecimalDigits === "number" ? options.millisecondsDecimalDigits : 0;
|
|
3191
3102
|
const millisecondsString = millisecondsDecimalDigits ? millisecondsAndBelow.toFixed(millisecondsDecimalDigits) : millisecondsAndBelow >= 1 ? Math.round(millisecondsAndBelow) : Math.ceil(millisecondsAndBelow);
|
|
3192
3103
|
add(Number.parseFloat(millisecondsString), "millisecond", "ms", millisecondsString);
|
|
@@ -3201,7 +3112,6 @@ function prettyMilliseconds(milliseconds, options) {
|
|
|
3201
3112
|
if (typeof options.unitCount === "number") result = result.slice(0, Math.max(options.unitCount, 1));
|
|
3202
3113
|
return sign + result.join(separator);
|
|
3203
3114
|
}
|
|
3204
|
-
|
|
3205
3115
|
//#endregion
|
|
3206
3116
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/verbose/error.js
|
|
3207
3117
|
const logError = (result, verboseInfo) => {
|
|
@@ -3212,7 +3122,6 @@ const logError = (result, verboseInfo) => {
|
|
|
3212
3122
|
result
|
|
3213
3123
|
});
|
|
3214
3124
|
};
|
|
3215
|
-
|
|
3216
3125
|
//#endregion
|
|
3217
3126
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/verbose/complete.js
|
|
3218
3127
|
const logResult = (result, verboseInfo) => {
|
|
@@ -3228,7 +3137,6 @@ const logDuration = (result, verboseInfo) => {
|
|
|
3228
3137
|
result
|
|
3229
3138
|
});
|
|
3230
3139
|
};
|
|
3231
|
-
|
|
3232
3140
|
//#endregion
|
|
3233
3141
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/return/reject.js
|
|
3234
3142
|
const handleResult = (result, verboseInfo, { reject }) => {
|
|
@@ -3236,7 +3144,6 @@ const handleResult = (result, verboseInfo, { reject }) => {
|
|
|
3236
3144
|
if (result.failed && reject) throw result;
|
|
3237
3145
|
return result;
|
|
3238
3146
|
};
|
|
3239
|
-
|
|
3240
3147
|
//#endregion
|
|
3241
3148
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/stdio/type.js
|
|
3242
3149
|
const getStdioItemType = (value, optionName) => {
|
|
@@ -3303,10 +3210,10 @@ const KNOWN_STDIO_STRINGS = new Set([
|
|
|
3303
3210
|
"overlapped",
|
|
3304
3211
|
"pipe"
|
|
3305
3212
|
]);
|
|
3306
|
-
const isReadableStream
|
|
3307
|
-
const isWritableStream
|
|
3308
|
-
const isWebStream = (value) => isReadableStream
|
|
3309
|
-
const isTransformStream = (value) => isReadableStream
|
|
3213
|
+
const isReadableStream = (value) => Object.prototype.toString.call(value) === "[object ReadableStream]";
|
|
3214
|
+
const isWritableStream = (value) => Object.prototype.toString.call(value) === "[object WritableStream]";
|
|
3215
|
+
const isWebStream = (value) => isReadableStream(value) || isWritableStream(value);
|
|
3216
|
+
const isTransformStream = (value) => isReadableStream(value?.readable) && isWritableStream(value?.writable);
|
|
3310
3217
|
const isAsyncIterableObject = (value) => isObject(value) && typeof value[Symbol.asyncIterator] === "function";
|
|
3311
3218
|
const isIterableObject = (value) => isObject(value) && typeof value[Symbol.iterator] === "function";
|
|
3312
3219
|
const isObject = (value) => typeof value === "object" && value !== null;
|
|
@@ -3344,7 +3251,6 @@ const TYPE_TO_MESSAGE = {
|
|
|
3344
3251
|
string: "a string",
|
|
3345
3252
|
uint8Array: "a Uint8Array"
|
|
3346
3253
|
};
|
|
3347
|
-
|
|
3348
3254
|
//#endregion
|
|
3349
3255
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/transform/object-mode.js
|
|
3350
3256
|
const getTransformObjectModes = (objectMode, index, newTransforms, direction) => direction === "output" ? getOutputObjectModes(objectMode, index, newTransforms) : getInputObjectModes(objectMode, index, newTransforms);
|
|
@@ -3367,7 +3273,6 @@ const getFdObjectMode = (stdioItems, direction) => {
|
|
|
3367
3273
|
if (lastTransform === void 0) return false;
|
|
3368
3274
|
return direction === "input" ? lastTransform.value.writableObjectMode : lastTransform.value.readableObjectMode;
|
|
3369
3275
|
};
|
|
3370
|
-
|
|
3371
3276
|
//#endregion
|
|
3372
3277
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/transform/normalize.js
|
|
3373
3278
|
const normalizeTransforms = (stdioItems, optionName, direction, options) => [...stdioItems.filter(({ type }) => !TRANSFORM_TYPES.has(type)), ...getTransforms(stdioItems, optionName, direction, options)];
|
|
@@ -3444,7 +3349,6 @@ const normalizeGenerator = ({ stdioItem, stdioItem: { value }, index, newTransfo
|
|
|
3444
3349
|
};
|
|
3445
3350
|
};
|
|
3446
3351
|
const sortTransforms = (newTransforms, direction) => direction === "input" ? newTransforms.reverse() : newTransforms;
|
|
3447
|
-
|
|
3448
3352
|
//#endregion
|
|
3449
3353
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/stdio/direction.js
|
|
3450
3354
|
const getStreamDirection = (stdioItems, fdNumber, optionName) => {
|
|
@@ -3468,10 +3372,10 @@ const guessStreamDirection = {
|
|
|
3468
3372
|
iterable: alwaysInput,
|
|
3469
3373
|
asyncIterable: alwaysInput,
|
|
3470
3374
|
uint8Array: alwaysInput,
|
|
3471
|
-
webStream: (value) => isWritableStream
|
|
3375
|
+
webStream: (value) => isWritableStream(value) ? "output" : "input",
|
|
3472
3376
|
nodeStream(value) {
|
|
3473
|
-
if (!isReadableStream(value, { checkOpen: false })) return "output";
|
|
3474
|
-
return isWritableStream(value, { checkOpen: false }) ? void 0 : "input";
|
|
3377
|
+
if (!isReadableStream$1(value, { checkOpen: false })) return "output";
|
|
3378
|
+
return isWritableStream$1(value, { checkOpen: false }) ? void 0 : "input";
|
|
3475
3379
|
},
|
|
3476
3380
|
webTransform: anyDirection,
|
|
3477
3381
|
duplex: anyDirection,
|
|
@@ -3491,14 +3395,12 @@ const getStandardStreamDirection = (value) => {
|
|
|
3491
3395
|
].includes(value)) return "output";
|
|
3492
3396
|
};
|
|
3493
3397
|
const DEFAULT_DIRECTION = "output";
|
|
3494
|
-
|
|
3495
3398
|
//#endregion
|
|
3496
3399
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/ipc/array.js
|
|
3497
3400
|
const normalizeIpcStdioArray = (stdioArray, ipc) => ipc && !stdioArray.includes("ipc") ? [...stdioArray, "ipc"] : stdioArray;
|
|
3498
|
-
|
|
3499
3401
|
//#endregion
|
|
3500
3402
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/stdio/stdio-option.js
|
|
3501
|
-
const normalizeStdioOption = ({ stdio, ipc, buffer
|
|
3403
|
+
const normalizeStdioOption = ({ stdio, ipc, buffer, ...options }, verboseInfo, isSync) => {
|
|
3502
3404
|
const stdioArray = getStdioArray(stdio, options).map((stdioOption, fdNumber) => addDefaultValue(stdioOption, fdNumber));
|
|
3503
3405
|
return isSync ? normalizeStdioSync(stdioArray, buffer, verboseInfo) : normalizeIpcStdioArray(stdioArray, ipc);
|
|
3504
3406
|
};
|
|
@@ -3522,7 +3424,6 @@ const addDefaultValue = (stdioOption, fdNumber) => {
|
|
|
3522
3424
|
};
|
|
3523
3425
|
const normalizeStdioSync = (stdioArray, buffer, verboseInfo) => stdioArray.map((stdioOption, fdNumber) => !buffer[fdNumber] && fdNumber !== 0 && !isFullVerbose(verboseInfo, fdNumber) && isOutputPipeOnly(stdioOption) ? "ignore" : stdioOption);
|
|
3524
3426
|
const isOutputPipeOnly = (stdioOption) => stdioOption === "pipe" || Array.isArray(stdioOption) && stdioOption.every((item) => item === "pipe");
|
|
3525
|
-
|
|
3526
3427
|
//#endregion
|
|
3527
3428
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/stdio/native.js
|
|
3528
3429
|
const handleNativeStream = ({ stdioItem, stdioItem: { type }, isStdioArray, fdNumber, direction, isSync }) => {
|
|
@@ -3591,7 +3492,6 @@ const getStandardStream = (fdNumber, value, optionName) => {
|
|
|
3591
3492
|
if (standardStream === void 0) throw new TypeError(`The \`${optionName}: ${value}\` option is invalid: no such standard stream.`);
|
|
3592
3493
|
return standardStream;
|
|
3593
3494
|
};
|
|
3594
|
-
|
|
3595
3495
|
//#endregion
|
|
3596
3496
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/stdio/input-option.js
|
|
3597
3497
|
const handleInputOptions = ({ input, inputFile }, fdNumber) => fdNumber === 0 ? [...handleInputOption(input), ...handleInputFileOption(inputFile)] : [];
|
|
@@ -3601,7 +3501,7 @@ const handleInputOption = (input) => input === void 0 ? [] : [{
|
|
|
3601
3501
|
optionName: "input"
|
|
3602
3502
|
}];
|
|
3603
3503
|
const getInputType = (input) => {
|
|
3604
|
-
if (isReadableStream(input, { checkOpen: false })) return "nodeStream";
|
|
3504
|
+
if (isReadableStream$1(input, { checkOpen: false })) return "nodeStream";
|
|
3605
3505
|
if (typeof input === "string") return "string";
|
|
3606
3506
|
if (isUint8Array(input)) return "uint8Array";
|
|
3607
3507
|
throw new Error("The `input` option must be a string, a Uint8Array or a Node.js Readable stream.");
|
|
@@ -3621,7 +3521,6 @@ const getInputFileType = (inputFile) => {
|
|
|
3621
3521
|
};
|
|
3622
3522
|
throw new Error("The `inputFile` option must be a file path string or a file URL.");
|
|
3623
3523
|
};
|
|
3624
|
-
|
|
3625
3524
|
//#endregion
|
|
3626
3525
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/stdio/duplicate.js
|
|
3627
3526
|
const filterDuplicates = (stdioItems) => stdioItems.filter((stdioItemOne, indexOne) => stdioItems.every((stdioItemTwo, indexTwo) => stdioItemOne.value !== stdioItemTwo.value || indexOne >= indexTwo || stdioItemOne.type === "generator" || stdioItemOne.type === "asyncGenerator"));
|
|
@@ -3682,10 +3581,9 @@ const validateDuplicateTransform = ({ otherStdioItems, type, value, optionName }
|
|
|
3682
3581
|
const throwOnDuplicateStream = (stdioItem, optionName, type) => {
|
|
3683
3582
|
if (stdioItem !== void 0) throw new TypeError(`The \`${stdioItem.optionName}\` and \`${optionName}\` options must not target ${TYPE_TO_MESSAGE[type]} that is the same.`);
|
|
3684
3583
|
};
|
|
3685
|
-
|
|
3686
3584
|
//#endregion
|
|
3687
3585
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/stdio/handle.js
|
|
3688
|
-
const handleStdio = (addProperties
|
|
3586
|
+
const handleStdio = (addProperties, options, verboseInfo, isSync) => {
|
|
3689
3587
|
const fileDescriptors = getFinalFileDescriptors({
|
|
3690
3588
|
initialFileDescriptors: normalizeStdioOption(options, verboseInfo, isSync).map((stdioOption, fdNumber) => getFileDescriptor({
|
|
3691
3589
|
stdioOption,
|
|
@@ -3693,7 +3591,7 @@ const handleStdio = (addProperties$2, options, verboseInfo, isSync) => {
|
|
|
3693
3591
|
options,
|
|
3694
3592
|
isSync
|
|
3695
3593
|
})),
|
|
3696
|
-
addProperties
|
|
3594
|
+
addProperties,
|
|
3697
3595
|
options,
|
|
3698
3596
|
isSync
|
|
3699
3597
|
});
|
|
@@ -3742,7 +3640,7 @@ const initializeStdioItem = (value, optionName) => ({
|
|
|
3742
3640
|
const validateStdioArray = (stdioItems, isStdioArray, optionName) => {
|
|
3743
3641
|
if (stdioItems.length === 0) throw new TypeError(`The \`${optionName}\` option must not be an empty array.`);
|
|
3744
3642
|
if (!isStdioArray) return;
|
|
3745
|
-
for (const { value, optionName
|
|
3643
|
+
for (const { value, optionName } of stdioItems) if (INVALID_STDIO_ARRAY_OPTIONS.has(value)) throw new Error(`The \`${optionName}\` option must not include \`${value}\`.`);
|
|
3746
3644
|
};
|
|
3747
3645
|
const INVALID_STDIO_ARRAY_OPTIONS = new Set(["ignore", "ipc"]);
|
|
3748
3646
|
const validateStreams = (stdioItems) => {
|
|
@@ -3758,13 +3656,13 @@ const validateFileObjectMode = (stdioItems, objectMode) => {
|
|
|
3758
3656
|
const fileStdioItem = stdioItems.find(({ type }) => FILE_TYPES.has(type));
|
|
3759
3657
|
if (fileStdioItem !== void 0) throw new TypeError(`The \`${fileStdioItem.optionName}\` option cannot use both files and transforms in objectMode.`);
|
|
3760
3658
|
};
|
|
3761
|
-
const getFinalFileDescriptors = ({ initialFileDescriptors, addProperties
|
|
3659
|
+
const getFinalFileDescriptors = ({ initialFileDescriptors, addProperties, options, isSync }) => {
|
|
3762
3660
|
const fileDescriptors = [];
|
|
3763
3661
|
try {
|
|
3764
3662
|
for (const fileDescriptor of initialFileDescriptors) fileDescriptors.push(getFinalFileDescriptor({
|
|
3765
3663
|
fileDescriptor,
|
|
3766
3664
|
fileDescriptors,
|
|
3767
|
-
addProperties
|
|
3665
|
+
addProperties,
|
|
3768
3666
|
options,
|
|
3769
3667
|
isSync
|
|
3770
3668
|
}));
|
|
@@ -3774,13 +3672,13 @@ const getFinalFileDescriptors = ({ initialFileDescriptors, addProperties: addPro
|
|
|
3774
3672
|
throw error;
|
|
3775
3673
|
}
|
|
3776
3674
|
};
|
|
3777
|
-
const getFinalFileDescriptor = ({ fileDescriptor: { direction, objectMode, stdioItems }, fileDescriptors, addProperties
|
|
3675
|
+
const getFinalFileDescriptor = ({ fileDescriptor: { direction, objectMode, stdioItems }, fileDescriptors, addProperties, options, isSync }) => {
|
|
3778
3676
|
return {
|
|
3779
3677
|
direction,
|
|
3780
3678
|
objectMode,
|
|
3781
3679
|
stdioItems: stdioItems.map((stdioItem) => addStreamProperties({
|
|
3782
3680
|
stdioItem,
|
|
3783
|
-
addProperties
|
|
3681
|
+
addProperties,
|
|
3784
3682
|
direction,
|
|
3785
3683
|
options,
|
|
3786
3684
|
fileDescriptors,
|
|
@@ -3788,7 +3686,7 @@ const getFinalFileDescriptor = ({ fileDescriptor: { direction, objectMode, stdio
|
|
|
3788
3686
|
}))
|
|
3789
3687
|
};
|
|
3790
3688
|
};
|
|
3791
|
-
const addStreamProperties = ({ stdioItem, addProperties
|
|
3689
|
+
const addStreamProperties = ({ stdioItem, addProperties, direction, options, fileDescriptors, isSync }) => {
|
|
3792
3690
|
const duplicateStream = getDuplicateStream({
|
|
3793
3691
|
stdioItem,
|
|
3794
3692
|
direction,
|
|
@@ -3801,18 +3699,17 @@ const addStreamProperties = ({ stdioItem, addProperties: addProperties$2, direct
|
|
|
3801
3699
|
};
|
|
3802
3700
|
return {
|
|
3803
3701
|
...stdioItem,
|
|
3804
|
-
...addProperties
|
|
3702
|
+
...addProperties[direction][stdioItem.type](stdioItem, options)
|
|
3805
3703
|
};
|
|
3806
3704
|
};
|
|
3807
3705
|
const cleanupCustomStreams = (fileDescriptors) => {
|
|
3808
3706
|
for (const { stdioItems } of fileDescriptors) for (const { stream } of stdioItems) if (stream !== void 0 && !isStandardStream(stream)) stream.destroy();
|
|
3809
3707
|
};
|
|
3810
3708
|
const forwardStdio = (stdioItems) => {
|
|
3811
|
-
if (stdioItems.length > 1) return stdioItems.some(({ value
|
|
3709
|
+
if (stdioItems.length > 1) return stdioItems.some(({ value }) => value === "overlapped") ? "overlapped" : "pipe";
|
|
3812
3710
|
const [{ type, value }] = stdioItems;
|
|
3813
3711
|
return type === "native" ? value : "pipe";
|
|
3814
3712
|
};
|
|
3815
|
-
|
|
3816
3713
|
//#endregion
|
|
3817
3714
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/stdio/handle-sync.js
|
|
3818
3715
|
const handleStdioSync = (options, verboseInfo) => handleStdio(addPropertiesSync, options, verboseInfo, true);
|
|
@@ -3859,12 +3756,10 @@ const addPropertiesSync = {
|
|
|
3859
3756
|
uint8Array: forbiddenIfSync
|
|
3860
3757
|
}
|
|
3861
3758
|
};
|
|
3862
|
-
|
|
3863
3759
|
//#endregion
|
|
3864
3760
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/io/strip-newline.js
|
|
3865
3761
|
const stripNewline = (value, { stripFinalNewline: stripFinalNewline$1 }, fdNumber) => getStripFinalNewline(stripFinalNewline$1, fdNumber) && value !== void 0 && !Array.isArray(value) ? stripFinalNewline(value) : value;
|
|
3866
|
-
const getStripFinalNewline = (stripFinalNewline
|
|
3867
|
-
|
|
3762
|
+
const getStripFinalNewline = (stripFinalNewline, fdNumber) => fdNumber === "all" ? stripFinalNewline[1] || stripFinalNewline[2] : stripFinalNewline[fdNumber];
|
|
3868
3763
|
//#endregion
|
|
3869
3764
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/transform/split.js
|
|
3870
3765
|
const getSplitLinesGenerator = (binary, preserveNewlines, skipped, state) => binary || skipped ? void 0 : initializeSplitLines(preserveNewlines, state);
|
|
@@ -3910,8 +3805,8 @@ const linesFinal = function* ({ previousChunks }) {
|
|
|
3910
3805
|
};
|
|
3911
3806
|
const getAppendNewlineGenerator = ({ binary, preserveNewlines, readableObjectMode, state }) => binary || preserveNewlines || readableObjectMode ? void 0 : { transform: appendNewlineGenerator.bind(void 0, state) };
|
|
3912
3807
|
const appendNewlineGenerator = function* ({ isWindowsNewline = false }, chunk) {
|
|
3913
|
-
const { unixNewline, windowsNewline, LF
|
|
3914
|
-
if (chunk.at(-1) === LF
|
|
3808
|
+
const { unixNewline, windowsNewline, LF, concatBytes } = typeof chunk === "string" ? linesStringInfo : linesUint8ArrayInfo;
|
|
3809
|
+
if (chunk.at(-1) === LF) {
|
|
3915
3810
|
yield chunk;
|
|
3916
3811
|
return;
|
|
3917
3812
|
}
|
|
@@ -3936,7 +3831,6 @@ const linesUint8ArrayInfo = {
|
|
|
3936
3831
|
LF: 10,
|
|
3937
3832
|
concatBytes: concatUint8Array
|
|
3938
3833
|
};
|
|
3939
|
-
|
|
3940
3834
|
//#endregion
|
|
3941
3835
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/transform/validate.js
|
|
3942
3836
|
const getValidateTransformInput = (writableObjectMode, optionName) => writableObjectMode ? void 0 : validateStringTransformInput.bind(void 0, optionName);
|
|
@@ -3959,7 +3853,6 @@ const validateEmptyReturn = (optionName, chunk) => {
|
|
|
3959
3853
|
Instead, \`yield\` should either be called with a value, or not be called at all. For example:
|
|
3960
3854
|
if (condition) { yield value; }`);
|
|
3961
3855
|
};
|
|
3962
|
-
|
|
3963
3856
|
//#endregion
|
|
3964
3857
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/transform/encoding-transform.js
|
|
3965
3858
|
const getEncodingTransformGenerator = (binary, encoding, skipped) => {
|
|
@@ -3971,9 +3864,9 @@ const getEncodingTransformGenerator = (binary, encoding, skipped) => {
|
|
|
3971
3864
|
final: encodingStringFinal.bind(void 0, stringDecoder)
|
|
3972
3865
|
};
|
|
3973
3866
|
};
|
|
3974
|
-
const encodingUint8ArrayGenerator = function* (textEncoder
|
|
3867
|
+
const encodingUint8ArrayGenerator = function* (textEncoder, chunk) {
|
|
3975
3868
|
if (Buffer$1.isBuffer(chunk)) yield bufferToUint8Array(chunk);
|
|
3976
|
-
else if (typeof chunk === "string") yield textEncoder
|
|
3869
|
+
else if (typeof chunk === "string") yield textEncoder.encode(chunk);
|
|
3977
3870
|
else yield chunk;
|
|
3978
3871
|
};
|
|
3979
3872
|
const encodingStringGenerator = function* (stringDecoder, chunk) {
|
|
@@ -3983,7 +3876,6 @@ const encodingStringFinal = function* (stringDecoder) {
|
|
|
3983
3876
|
const lastChunk = stringDecoder.end();
|
|
3984
3877
|
if (lastChunk !== "") yield lastChunk;
|
|
3985
3878
|
};
|
|
3986
|
-
|
|
3987
3879
|
//#endregion
|
|
3988
3880
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/transform/run-async.js
|
|
3989
3881
|
const pushChunks = callbackify(async (getChunks, state, getChunksArguments, transformStream) => {
|
|
@@ -4019,7 +3911,6 @@ const destroyTransform = callbackify(async ({ currentIterable }, error) => {
|
|
|
4019
3911
|
const identityGenerator$1 = function* (chunk) {
|
|
4020
3912
|
yield chunk;
|
|
4021
3913
|
};
|
|
4022
|
-
|
|
4023
3914
|
//#endregion
|
|
4024
3915
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/transform/run-sync.js
|
|
4025
3916
|
const pushChunksSync = (getChunksSync, getChunksArguments, transformStream, done) => {
|
|
@@ -4049,7 +3940,6 @@ const generatorFinalChunksSync = function* (final, index, generators) {
|
|
|
4049
3940
|
const identityGenerator = function* (chunk) {
|
|
4050
3941
|
yield chunk;
|
|
4051
3942
|
};
|
|
4052
|
-
|
|
4053
3943
|
//#endregion
|
|
4054
3944
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/transform/generator.js
|
|
4055
3945
|
const generatorToStream = ({ value, value: { transform, final, writableObjectMode, readableObjectMode }, optionName }, { encoding }) => {
|
|
@@ -4065,7 +3955,7 @@ const generatorToStream = ({ value, value: { transform, final, writableObjectMod
|
|
|
4065
3955
|
writableHighWaterMark: getDefaultHighWaterMark(writableObjectMode),
|
|
4066
3956
|
readableObjectMode,
|
|
4067
3957
|
readableHighWaterMark: getDefaultHighWaterMark(readableObjectMode),
|
|
4068
|
-
transform(chunk, encoding
|
|
3958
|
+
transform(chunk, encoding, done) {
|
|
4069
3959
|
transformMethod([
|
|
4070
3960
|
chunk,
|
|
4071
3961
|
generators,
|
|
@@ -4103,7 +3993,6 @@ const addInternalGenerators = ({ transform, final, binary, writableObjectMode, r
|
|
|
4103
3993
|
})
|
|
4104
3994
|
].filter(Boolean);
|
|
4105
3995
|
};
|
|
4106
|
-
|
|
4107
3996
|
//#endregion
|
|
4108
3997
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/io/input-sync.js
|
|
4109
3998
|
const addInputOptionsSync = (fileDescriptors, options) => {
|
|
@@ -4129,7 +4018,6 @@ const validateSerializable = (newContents) => {
|
|
|
4129
4018
|
const invalidItem = newContents.find((item) => typeof item !== "string" && !isUint8Array(item));
|
|
4130
4019
|
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}.`);
|
|
4131
4020
|
};
|
|
4132
|
-
|
|
4133
4021
|
//#endregion
|
|
4134
4022
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/verbose/output.js
|
|
4135
4023
|
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)));
|
|
@@ -4150,7 +4038,6 @@ const logLine = (line, fdNumber, verboseInfo) => {
|
|
|
4150
4038
|
verboseInfo
|
|
4151
4039
|
});
|
|
4152
4040
|
};
|
|
4153
|
-
|
|
4154
4041
|
//#endregion
|
|
4155
4042
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/io/output-sync.js
|
|
4156
4043
|
const transformOutputSync = ({ fileDescriptors, syncResult: { output }, options, isMaxBuffer, verboseInfo }) => {
|
|
@@ -4170,7 +4057,7 @@ const transformOutputSync = ({ fileDescriptors, syncResult: { output }, options,
|
|
|
4170
4057
|
...state
|
|
4171
4058
|
};
|
|
4172
4059
|
};
|
|
4173
|
-
const transformOutputResultSync = ({ result, fileDescriptors, fdNumber, state, outputFiles, isMaxBuffer, verboseInfo }, { buffer, encoding, lines, stripFinalNewline
|
|
4060
|
+
const transformOutputResultSync = ({ result, fileDescriptors, fdNumber, state, outputFiles, isMaxBuffer, verboseInfo }, { buffer, encoding, lines, stripFinalNewline, maxBuffer }) => {
|
|
4174
4061
|
if (result === null) return;
|
|
4175
4062
|
const uint8ArrayResult = bufferToUint8Array(truncateMaxBufferSync(result, isMaxBuffer, maxBuffer));
|
|
4176
4063
|
const { stdioItems, objectMode } = fileDescriptors[fdNumber];
|
|
@@ -4179,7 +4066,7 @@ const transformOutputResultSync = ({ result, fileDescriptors, fdNumber, state, o
|
|
|
4179
4066
|
objectMode,
|
|
4180
4067
|
encoding,
|
|
4181
4068
|
lines,
|
|
4182
|
-
stripFinalNewline
|
|
4069
|
+
stripFinalNewline,
|
|
4183
4070
|
fdNumber
|
|
4184
4071
|
});
|
|
4185
4072
|
logOutputSync({
|
|
@@ -4208,13 +4095,13 @@ const runOutputGeneratorsSync = (chunks, stdioItems, encoding, state) => {
|
|
|
4208
4095
|
return chunks;
|
|
4209
4096
|
}
|
|
4210
4097
|
};
|
|
4211
|
-
const serializeChunks = ({ chunks, objectMode, encoding, lines, stripFinalNewline
|
|
4098
|
+
const serializeChunks = ({ chunks, objectMode, encoding, lines, stripFinalNewline, fdNumber }) => {
|
|
4212
4099
|
if (objectMode) return { serializedResult: chunks };
|
|
4213
4100
|
if (encoding === "buffer") return { serializedResult: joinToUint8Array(chunks) };
|
|
4214
4101
|
const serializedResult = joinToString(chunks, encoding);
|
|
4215
4102
|
if (lines[fdNumber]) return {
|
|
4216
4103
|
serializedResult,
|
|
4217
|
-
finalResult: splitLinesSync(serializedResult, !stripFinalNewline
|
|
4104
|
+
finalResult: splitLinesSync(serializedResult, !stripFinalNewline[fdNumber], objectMode)
|
|
4218
4105
|
};
|
|
4219
4106
|
return { serializedResult };
|
|
4220
4107
|
};
|
|
@@ -4233,16 +4120,15 @@ const logOutputSync = ({ serializedResult, fdNumber, state, verboseInfo, encodin
|
|
|
4233
4120
|
}
|
|
4234
4121
|
};
|
|
4235
4122
|
const writeToFiles = (serializedResult, stdioItems, outputFiles) => {
|
|
4236
|
-
for (const { path
|
|
4237
|
-
const pathString = typeof path
|
|
4238
|
-
if (append || outputFiles.has(pathString)) appendFileSync(path
|
|
4123
|
+
for (const { path, append } of stdioItems.filter(({ type }) => FILE_TYPES.has(type))) {
|
|
4124
|
+
const pathString = typeof path === "string" ? path : path.toString();
|
|
4125
|
+
if (append || outputFiles.has(pathString)) appendFileSync(path, serializedResult);
|
|
4239
4126
|
else {
|
|
4240
4127
|
outputFiles.add(pathString);
|
|
4241
|
-
writeFileSync(path
|
|
4128
|
+
writeFileSync(path, serializedResult);
|
|
4242
4129
|
}
|
|
4243
4130
|
}
|
|
4244
4131
|
};
|
|
4245
|
-
|
|
4246
4132
|
//#endregion
|
|
4247
4133
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/resolve/all-sync.js
|
|
4248
4134
|
const getAllSync = ([, stdout, stderr], options) => {
|
|
@@ -4254,7 +4140,6 @@ const getAllSync = ([, stdout, stderr], options) => {
|
|
|
4254
4140
|
if (isUint8Array(stdout) && isUint8Array(stderr)) return concatUint8Arrays([stdout, stderr]);
|
|
4255
4141
|
return `${stdout}${stderr}`;
|
|
4256
4142
|
};
|
|
4257
|
-
|
|
4258
4143
|
//#endregion
|
|
4259
4144
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/resolve/exit-async.js
|
|
4260
4145
|
const waitForExit = async (subprocess, context) => {
|
|
@@ -4281,7 +4166,6 @@ const waitForSuccessfulExit = async (exitPromise) => {
|
|
|
4281
4166
|
};
|
|
4282
4167
|
const isSubprocessErrorExit = (exitCode, signal) => exitCode === void 0 && signal === void 0;
|
|
4283
4168
|
const isFailedExit = (exitCode, signal) => exitCode !== 0 || signal !== null;
|
|
4284
|
-
|
|
4285
4169
|
//#endregion
|
|
4286
4170
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/resolve/exit-sync.js
|
|
4287
4171
|
const getExitResultSync = ({ error, status: exitCode, signal, output }, { maxBuffer }) => {
|
|
@@ -4298,7 +4182,6 @@ const getResultError = (error, exitCode, signal) => {
|
|
|
4298
4182
|
if (error !== void 0) return error;
|
|
4299
4183
|
return isFailedExit(exitCode, signal) ? new DiscardedError() : void 0;
|
|
4300
4184
|
};
|
|
4301
|
-
|
|
4302
4185
|
//#endregion
|
|
4303
4186
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/methods/main-sync.js
|
|
4304
4187
|
const execaCoreSync = (rawFile, rawArguments, rawOptions) => {
|
|
@@ -4391,7 +4274,7 @@ const runSubprocessSync = ({ file, commandArguments, options, command, escapedCo
|
|
|
4391
4274
|
});
|
|
4392
4275
|
}
|
|
4393
4276
|
};
|
|
4394
|
-
const normalizeSpawnSyncOptions = ({ encoding, maxBuffer
|
|
4277
|
+
const normalizeSpawnSyncOptions = ({ encoding, maxBuffer, ...options }) => ({
|
|
4395
4278
|
...options,
|
|
4396
4279
|
encoding: "buffer",
|
|
4397
4280
|
maxBuffer: getMaxBufferSync(maxBuffer)
|
|
@@ -4422,7 +4305,6 @@ const getSyncResult = ({ error, exitCode, signal, timedOut, isMaxBuffer, stdio,
|
|
|
4422
4305
|
startTime,
|
|
4423
4306
|
isSync: true
|
|
4424
4307
|
});
|
|
4425
|
-
|
|
4426
4308
|
//#endregion
|
|
4427
4309
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/ipc/get-one.js
|
|
4428
4310
|
const getOneMessage$1 = ({ anyProcess, channel, isSubprocess, ipc }, { reference = true, filter } = {}) => {
|
|
@@ -4473,7 +4355,6 @@ const throwOnStrictError = async (ipcEmitter, isSubprocess, { signal }) => {
|
|
|
4473
4355
|
const [error] = await once(ipcEmitter, "strict:error", { signal });
|
|
4474
4356
|
throw getStrictResponseError(error, isSubprocess);
|
|
4475
4357
|
};
|
|
4476
|
-
|
|
4477
4358
|
//#endregion
|
|
4478
4359
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/ipc/get-each.js
|
|
4479
4360
|
const getEachMessage$1 = ({ anyProcess, channel, isSubprocess, ipc }, { reference = true } = {}) => loopOnMessages({
|
|
@@ -4544,7 +4425,6 @@ const iterateOnMessages = async function* ({ anyProcess, channel, ipcEmitter, is
|
|
|
4544
4425
|
const throwIfStrictError = ({ error }) => {
|
|
4545
4426
|
if (error) throw error;
|
|
4546
4427
|
};
|
|
4547
|
-
|
|
4548
4428
|
//#endregion
|
|
4549
4429
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/ipc/methods.js
|
|
4550
4430
|
const addIpcMethods = (subprocess, { ipc }) => {
|
|
@@ -4584,7 +4464,6 @@ const getIpcMethods = (anyProcess, isSubprocess, ipc) => ({
|
|
|
4584
4464
|
ipc
|
|
4585
4465
|
})
|
|
4586
4466
|
});
|
|
4587
|
-
|
|
4588
4467
|
//#endregion
|
|
4589
4468
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/return/early-error.js
|
|
4590
4469
|
const handleEarlyError = ({ error, command, escapedCommand, fileDescriptors, options, startTime, verboseInfo }) => {
|
|
@@ -4641,7 +4520,6 @@ const duplex = () => new Duplex({
|
|
|
4641
4520
|
write() {}
|
|
4642
4521
|
});
|
|
4643
4522
|
const handleDummyPromise = async (error, verboseInfo, options) => handleResult(error, verboseInfo, options);
|
|
4644
|
-
|
|
4645
4523
|
//#endregion
|
|
4646
4524
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/stdio/handle-async.js
|
|
4647
4525
|
const handleStdioAsync = (options, verboseInfo) => handleStdio(addPropertiesAsync, options, verboseInfo, false);
|
|
@@ -4682,7 +4560,6 @@ const addPropertiesAsync = {
|
|
|
4682
4560
|
uint8Array: forbiddenIfAsync
|
|
4683
4561
|
}
|
|
4684
4562
|
};
|
|
4685
|
-
|
|
4686
4563
|
//#endregion
|
|
4687
4564
|
//#region ../../node_modules/.pnpm/@sindresorhus+merge-streams@4.0.0/node_modules/@sindresorhus/merge-streams/index.js
|
|
4688
4565
|
function mergeStreams(streams) {
|
|
@@ -4765,7 +4642,7 @@ const onInputStreamsUnpipe = async (passThroughStream, streams, unpipeEvent, { s
|
|
|
4765
4642
|
const validateStream = (stream) => {
|
|
4766
4643
|
if (typeof stream?.pipe !== "function") throw new TypeError(`Expected a readable stream, got: \`${typeof stream}\`.`);
|
|
4767
4644
|
};
|
|
4768
|
-
const endWhenStreamsDone = async ({ passThroughStream, stream, streams, ended, aborted
|
|
4645
|
+
const endWhenStreamsDone = async ({ passThroughStream, stream, streams, ended, aborted, onFinished, unpipeEvent }) => {
|
|
4769
4646
|
updateMaxListeners(passThroughStream, PASSTHROUGH_LISTENERS_PER_STREAM);
|
|
4770
4647
|
const controller = new AbortController();
|
|
4771
4648
|
try {
|
|
@@ -4776,14 +4653,14 @@ const endWhenStreamsDone = async ({ passThroughStream, stream, streams, ended, a
|
|
|
4776
4653
|
stream,
|
|
4777
4654
|
streams,
|
|
4778
4655
|
ended,
|
|
4779
|
-
aborted
|
|
4656
|
+
aborted,
|
|
4780
4657
|
controller
|
|
4781
4658
|
}),
|
|
4782
4659
|
onInputStreamUnpipe({
|
|
4783
4660
|
stream,
|
|
4784
4661
|
streams,
|
|
4785
4662
|
ended,
|
|
4786
|
-
aborted
|
|
4663
|
+
aborted,
|
|
4787
4664
|
unpipeEvent,
|
|
4788
4665
|
controller
|
|
4789
4666
|
})
|
|
@@ -4792,7 +4669,7 @@ const endWhenStreamsDone = async ({ passThroughStream, stream, streams, ended, a
|
|
|
4792
4669
|
controller.abort();
|
|
4793
4670
|
updateMaxListeners(passThroughStream, -PASSTHROUGH_LISTENERS_PER_STREAM);
|
|
4794
4671
|
}
|
|
4795
|
-
if (streams.size > 0 && streams.size === ended.size + aborted
|
|
4672
|
+
if (streams.size > 0 && streams.size === ended.size + aborted.size) if (ended.size === 0 && aborted.size > 0) abortStream(passThroughStream);
|
|
4796
4673
|
else endStream(passThroughStream);
|
|
4797
4674
|
};
|
|
4798
4675
|
const afterMergedStreamFinished = async (onFinished, stream, { signal }) => {
|
|
@@ -4803,7 +4680,7 @@ const afterMergedStreamFinished = async (onFinished, stream, { signal }) => {
|
|
|
4803
4680
|
if (!signal.aborted) errorOrAbortStream(stream, error);
|
|
4804
4681
|
}
|
|
4805
4682
|
};
|
|
4806
|
-
const onInputStreamEnd = async ({ passThroughStream, stream, streams, ended, aborted
|
|
4683
|
+
const onInputStreamEnd = async ({ passThroughStream, stream, streams, ended, aborted, controller: { signal } }) => {
|
|
4807
4684
|
try {
|
|
4808
4685
|
await finished(stream, {
|
|
4809
4686
|
signal,
|
|
@@ -4814,16 +4691,16 @@ const onInputStreamEnd = async ({ passThroughStream, stream, streams, ended, abo
|
|
|
4814
4691
|
if (streams.has(stream)) ended.add(stream);
|
|
4815
4692
|
} catch (error) {
|
|
4816
4693
|
if (signal.aborted || !streams.has(stream)) return;
|
|
4817
|
-
if (isAbortError(error)) aborted
|
|
4694
|
+
if (isAbortError(error)) aborted.add(stream);
|
|
4818
4695
|
else errorStream(passThroughStream, error);
|
|
4819
4696
|
}
|
|
4820
4697
|
};
|
|
4821
|
-
const onInputStreamUnpipe = async ({ stream, streams, ended, aborted
|
|
4698
|
+
const onInputStreamUnpipe = async ({ stream, streams, ended, aborted, unpipeEvent, controller: { signal } }) => {
|
|
4822
4699
|
await once(stream, unpipeEvent, { signal });
|
|
4823
4700
|
if (!stream.readable) return once(signal, "abort", { signal });
|
|
4824
4701
|
streams.delete(stream);
|
|
4825
4702
|
ended.delete(stream);
|
|
4826
|
-
aborted
|
|
4703
|
+
aborted.delete(stream);
|
|
4827
4704
|
};
|
|
4828
4705
|
const endStream = (stream) => {
|
|
4829
4706
|
if (stream.writable) stream.end();
|
|
@@ -4843,13 +4720,12 @@ const errorStream = (stream, error) => {
|
|
|
4843
4720
|
}
|
|
4844
4721
|
};
|
|
4845
4722
|
const noop = () => {};
|
|
4846
|
-
const updateMaxListeners = (passThroughStream, increment
|
|
4723
|
+
const updateMaxListeners = (passThroughStream, increment) => {
|
|
4847
4724
|
const maxListeners = passThroughStream.getMaxListeners();
|
|
4848
|
-
if (maxListeners !== 0 && maxListeners !== Number.POSITIVE_INFINITY) passThroughStream.setMaxListeners(maxListeners + increment
|
|
4725
|
+
if (maxListeners !== 0 && maxListeners !== Number.POSITIVE_INFINITY) passThroughStream.setMaxListeners(maxListeners + increment);
|
|
4849
4726
|
};
|
|
4850
4727
|
const PASSTHROUGH_LISTENERS_COUNT = 2;
|
|
4851
4728
|
const PASSTHROUGH_LISTENERS_PER_STREAM = 1;
|
|
4852
|
-
|
|
4853
4729
|
//#endregion
|
|
4854
4730
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/io/pipeline.js
|
|
4855
4731
|
const pipeStreams = (source, destination) => {
|
|
@@ -4885,7 +4761,6 @@ const onDestinationFinish = async (source, destination) => {
|
|
|
4885
4761
|
const abortSourceStream = (source) => {
|
|
4886
4762
|
if (source.readable) source.destroy();
|
|
4887
4763
|
};
|
|
4888
|
-
|
|
4889
4764
|
//#endregion
|
|
4890
4765
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/io/output-async.js
|
|
4891
4766
|
const pipeOutputAsync = (subprocess, fileDescriptors, controller) => {
|
|
@@ -4926,7 +4801,6 @@ const setStandardStreamMaxListeners = (stream, { signal }) => {
|
|
|
4926
4801
|
if (isStandardStream(stream)) incrementMaxListeners(stream, MAX_LISTENERS_INCREMENT, signal);
|
|
4927
4802
|
};
|
|
4928
4803
|
const MAX_LISTENERS_INCREMENT = 2;
|
|
4929
|
-
|
|
4930
4804
|
//#endregion
|
|
4931
4805
|
//#region ../../node_modules/.pnpm/signal-exit@4.1.0/node_modules/signal-exit/dist/mjs/signals.js
|
|
4932
4806
|
/**
|
|
@@ -4959,10 +4833,9 @@ const signals = [];
|
|
|
4959
4833
|
signals.push("SIGHUP", "SIGINT", "SIGTERM");
|
|
4960
4834
|
if (process.platform !== "win32") signals.push("SIGALRM", "SIGABRT", "SIGVTALRM", "SIGXCPU", "SIGXFSZ", "SIGUSR2", "SIGTRAP", "SIGSYS", "SIGQUIT", "SIGIOT");
|
|
4961
4835
|
if (process.platform === "linux") signals.push("SIGIO", "SIGPOLL", "SIGPWR", "SIGSTKFLT");
|
|
4962
|
-
|
|
4963
4836
|
//#endregion
|
|
4964
4837
|
//#region ../../node_modules/.pnpm/signal-exit@4.1.0/node_modules/signal-exit/dist/mjs/index.js
|
|
4965
|
-
const processOk = (process
|
|
4838
|
+
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";
|
|
4966
4839
|
const kExitEmitter = Symbol.for("signal-exit emitter");
|
|
4967
4840
|
const global$1 = globalThis;
|
|
4968
4841
|
const ObjectDefineProperty = Object.defineProperty.bind(Object);
|
|
@@ -4991,12 +4864,12 @@ var Emitter = class {
|
|
|
4991
4864
|
}
|
|
4992
4865
|
removeListener(ev, fn) {
|
|
4993
4866
|
const list = this.listeners[ev];
|
|
4994
|
-
const i
|
|
4867
|
+
const i = list.indexOf(fn);
|
|
4995
4868
|
/* c8 ignore start */
|
|
4996
|
-
if (i
|
|
4869
|
+
if (i === -1) return;
|
|
4997
4870
|
/* c8 ignore stop */
|
|
4998
|
-
if (i
|
|
4999
|
-
else list.splice(i
|
|
4871
|
+
if (i === 0 && list.length === 1) list.length = 0;
|
|
4872
|
+
else list.splice(i, 1);
|
|
5000
4873
|
}
|
|
5001
4874
|
emit(ev, code, signal) {
|
|
5002
4875
|
if (this.emitted[ev]) return false;
|
|
@@ -5038,27 +4911,27 @@ var SignalExit = class extends SignalExitBase {
|
|
|
5038
4911
|
#originalProcessReallyExit;
|
|
5039
4912
|
#sigListeners = {};
|
|
5040
4913
|
#loaded = false;
|
|
5041
|
-
constructor(process
|
|
4914
|
+
constructor(process) {
|
|
5042
4915
|
super();
|
|
5043
|
-
this.#process = process
|
|
4916
|
+
this.#process = process;
|
|
5044
4917
|
this.#sigListeners = {};
|
|
5045
4918
|
for (const sig of signals) this.#sigListeners[sig] = () => {
|
|
5046
4919
|
const listeners = this.#process.listeners(sig);
|
|
5047
|
-
let { count
|
|
4920
|
+
let { count } = this.#emitter;
|
|
5048
4921
|
/* c8 ignore start */
|
|
5049
|
-
const p
|
|
5050
|
-
if (typeof p
|
|
4922
|
+
const p = process;
|
|
4923
|
+
if (typeof p.__signal_exit_emitter__ === "object" && typeof p.__signal_exit_emitter__.count === "number") count += p.__signal_exit_emitter__.count;
|
|
5051
4924
|
/* c8 ignore stop */
|
|
5052
|
-
if (listeners.length === count
|
|
4925
|
+
if (listeners.length === count) {
|
|
5053
4926
|
this.unload();
|
|
5054
4927
|
const ret = this.#emitter.emit("exit", null, sig);
|
|
5055
4928
|
/* c8 ignore start */
|
|
5056
4929
|
const s = sig === "SIGHUP" ? this.#hupSig : sig;
|
|
5057
|
-
if (!ret) process
|
|
4930
|
+
if (!ret) process.kill(process.pid, s);
|
|
5058
4931
|
}
|
|
5059
4932
|
};
|
|
5060
|
-
this.#originalProcessReallyExit = process
|
|
5061
|
-
this.#originalProcessEmit = process
|
|
4933
|
+
this.#originalProcessReallyExit = process.reallyExit;
|
|
4934
|
+
this.#originalProcessEmit = process.emit;
|
|
5062
4935
|
}
|
|
5063
4936
|
onExit(cb, opts) {
|
|
5064
4937
|
/* c8 ignore start */
|
|
@@ -5080,8 +4953,8 @@ var SignalExit = class extends SignalExitBase {
|
|
|
5080
4953
|
const fn = this.#sigListeners[sig];
|
|
5081
4954
|
if (fn) this.#process.on(sig, fn);
|
|
5082
4955
|
} catch (_) {}
|
|
5083
|
-
this.#process.emit = (ev, ...a
|
|
5084
|
-
return this.#processEmit(ev, ...a
|
|
4956
|
+
this.#process.emit = (ev, ...a) => {
|
|
4957
|
+
return this.#processEmit(ev, ...a);
|
|
5085
4958
|
};
|
|
5086
4959
|
this.#process.reallyExit = (code) => {
|
|
5087
4960
|
return this.#processReallyExit(code);
|
|
@@ -5127,7 +5000,6 @@ var SignalExit = class extends SignalExitBase {
|
|
|
5127
5000
|
};
|
|
5128
5001
|
const process$2 = globalThis.process;
|
|
5129
5002
|
const { onExit, load, unload } = signalExitWrap(processOk(process$2) ? new SignalExit(process$2) : new SignalExitFallback());
|
|
5130
|
-
|
|
5131
5003
|
//#endregion
|
|
5132
5004
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/terminate/cleanup.js
|
|
5133
5005
|
const cleanupOnExit = (subprocess, { cleanup, detached }, { signal }) => {
|
|
@@ -5139,7 +5011,6 @@ const cleanupOnExit = (subprocess, { cleanup, detached }, { signal }) => {
|
|
|
5139
5011
|
removeExitHandler();
|
|
5140
5012
|
});
|
|
5141
5013
|
};
|
|
5142
|
-
|
|
5143
5014
|
//#endregion
|
|
5144
5015
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/pipe/pipe-arguments.js
|
|
5145
5016
|
const normalizePipeArguments = ({ source, sourcePromise, boundOptions, createNested }, ...pipeArguments) => {
|
|
@@ -5207,7 +5078,6 @@ const getSourceStream = (source, from) => {
|
|
|
5207
5078
|
return { sourceError: error };
|
|
5208
5079
|
}
|
|
5209
5080
|
};
|
|
5210
|
-
|
|
5211
5081
|
//#endregion
|
|
5212
5082
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/pipe/throw.js
|
|
5213
5083
|
const handlePipeArgumentsError = ({ sourceStream, sourceError, destinationStream, destinationError, fileDescriptors, sourceOptions, startTime }) => {
|
|
@@ -5245,7 +5115,6 @@ const createNonCommandError = ({ error, fileDescriptors, sourceOptions, startTim
|
|
|
5245
5115
|
isSync: false
|
|
5246
5116
|
});
|
|
5247
5117
|
const PIPE_COMMAND_MESSAGE = "source.pipe(destination)";
|
|
5248
|
-
|
|
5249
5118
|
//#endregion
|
|
5250
5119
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/pipe/sequence.js
|
|
5251
5120
|
const waitForBothSubprocesses = async (subprocessPromises) => {
|
|
@@ -5255,7 +5124,6 @@ const waitForBothSubprocesses = async (subprocessPromises) => {
|
|
|
5255
5124
|
if (sourceStatus === "rejected") throw sourceResult;
|
|
5256
5125
|
return destinationResult;
|
|
5257
5126
|
};
|
|
5258
|
-
|
|
5259
5127
|
//#endregion
|
|
5260
5128
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/pipe/streaming.js
|
|
5261
5129
|
const pipeSubprocessStream = (sourceStream, destinationStream, maxListenersController) => {
|
|
@@ -5289,7 +5157,6 @@ const cleanupMergedStreamsMap = async (destinationStream) => {
|
|
|
5289
5157
|
const MERGED_STREAMS = /* @__PURE__ */ new WeakMap();
|
|
5290
5158
|
const SOURCE_LISTENERS_PER_PIPE = 2;
|
|
5291
5159
|
const DESTINATION_LISTENERS_PER_PIPE = 1;
|
|
5292
|
-
|
|
5293
5160
|
//#endregion
|
|
5294
5161
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/pipe/abort.js
|
|
5295
5162
|
const unpipeOnAbort = (unpipeSignal, unpipeContext) => unpipeSignal === void 0 ? [] : [unpipeOnSignalAbort(unpipeSignal, unpipeContext)];
|
|
@@ -5303,7 +5170,6 @@ const unpipeOnSignalAbort = async (unpipeSignal, { sourceStream, mergedStream, f
|
|
|
5303
5170
|
startTime
|
|
5304
5171
|
});
|
|
5305
5172
|
};
|
|
5306
|
-
|
|
5307
5173
|
//#endregion
|
|
5308
5174
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/pipe/setup.js
|
|
5309
5175
|
const pipeToSubprocess = (sourceInfo, ...pipeArguments) => {
|
|
@@ -5314,7 +5180,7 @@ const pipeToSubprocess = (sourceInfo, ...pipeArguments) => {
|
|
|
5314
5180
|
...pipeArguments[0]
|
|
5315
5181
|
}
|
|
5316
5182
|
});
|
|
5317
|
-
const { destination
|
|
5183
|
+
const { destination, ...normalizedInfo } = normalizePipeArguments(sourceInfo, ...pipeArguments);
|
|
5318
5184
|
const promise = handlePipePromise({
|
|
5319
5185
|
...normalizedInfo,
|
|
5320
5186
|
destination
|
|
@@ -5353,7 +5219,6 @@ const handlePipePromise = async ({ sourcePromise, sourceStream, sourceOptions, s
|
|
|
5353
5219
|
}
|
|
5354
5220
|
};
|
|
5355
5221
|
const getSubprocessPromises = (sourcePromise, destination) => Promise.allSettled([sourcePromise, destination]);
|
|
5356
|
-
|
|
5357
5222
|
//#endregion
|
|
5358
5223
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/io/iterate.js
|
|
5359
5224
|
const iterateOnSubprocessStream = ({ subprocessStdout, subprocess, binary, shouldEncode, encoding, preserveNewlines }) => {
|
|
@@ -5376,7 +5241,7 @@ const stopReadingOnExit = async (subprocess, controller) => {
|
|
|
5376
5241
|
controller.abort();
|
|
5377
5242
|
}
|
|
5378
5243
|
};
|
|
5379
|
-
const iterateForResult = ({ stream, onStreamEnd, lines, encoding, stripFinalNewline
|
|
5244
|
+
const iterateForResult = ({ stream, onStreamEnd, lines, encoding, stripFinalNewline, allMixed }) => {
|
|
5380
5245
|
const controller = new AbortController();
|
|
5381
5246
|
stopReadingOnStreamEnd(onStreamEnd, controller, stream);
|
|
5382
5247
|
const objectMode = stream.readableObjectMode && !allMixed;
|
|
@@ -5387,7 +5252,7 @@ const iterateForResult = ({ stream, onStreamEnd, lines, encoding, stripFinalNewl
|
|
|
5387
5252
|
shouldEncode: !objectMode,
|
|
5388
5253
|
encoding,
|
|
5389
5254
|
shouldSplit: !objectMode && lines,
|
|
5390
|
-
preserveNewlines: !stripFinalNewline
|
|
5255
|
+
preserveNewlines: !stripFinalNewline
|
|
5391
5256
|
});
|
|
5392
5257
|
};
|
|
5393
5258
|
const stopReadingOnStreamEnd = async (onStreamEnd, controller, stream) => {
|
|
@@ -5433,10 +5298,9 @@ const iterateOnData = async function* ({ onStdoutChunk, controller, binary, shou
|
|
|
5433
5298
|
}
|
|
5434
5299
|
};
|
|
5435
5300
|
const getGenerators = ({ binary, shouldEncode, encoding, shouldSplit, preserveNewlines }) => [getEncodingTransformGenerator(binary, encoding, !shouldEncode), getSplitLinesGenerator(binary, preserveNewlines, !shouldSplit, {})].filter(Boolean);
|
|
5436
|
-
|
|
5437
5301
|
//#endregion
|
|
5438
5302
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/io/contents.js
|
|
5439
|
-
const getStreamOutput = async ({ stream, onStreamEnd, fdNumber, encoding, buffer, maxBuffer, lines, allMixed, stripFinalNewline
|
|
5303
|
+
const getStreamOutput = async ({ stream, onStreamEnd, fdNumber, encoding, buffer, maxBuffer, lines, allMixed, stripFinalNewline, verboseInfo, streamInfo }) => {
|
|
5440
5304
|
const logPromise = logOutputAsync({
|
|
5441
5305
|
stream,
|
|
5442
5306
|
onStreamEnd,
|
|
@@ -5455,7 +5319,7 @@ const getStreamOutput = async ({ stream, onStreamEnd, fdNumber, encoding, buffer
|
|
|
5455
5319
|
onStreamEnd,
|
|
5456
5320
|
lines,
|
|
5457
5321
|
encoding,
|
|
5458
|
-
stripFinalNewline: getStripFinalNewline(stripFinalNewline
|
|
5322
|
+
stripFinalNewline: getStripFinalNewline(stripFinalNewline, fdNumber),
|
|
5459
5323
|
allMixed
|
|
5460
5324
|
});
|
|
5461
5325
|
const [output] = await Promise.all([getStreamContents({
|
|
@@ -5512,7 +5376,6 @@ const getBufferedData = async (streamPromise) => {
|
|
|
5512
5376
|
}
|
|
5513
5377
|
};
|
|
5514
5378
|
const handleBufferedData = ({ bufferedData }) => isArrayBuffer(bufferedData) ? new Uint8Array(bufferedData) : bufferedData;
|
|
5515
|
-
|
|
5516
5379
|
//#endregion
|
|
5517
5380
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/resolve/wait-stream.js
|
|
5518
5381
|
const waitForStream = async (stream, fdNumber, streamInfo, { isSameDirection, stopOnExit = false } = {}) => {
|
|
@@ -5555,10 +5418,9 @@ const shouldIgnoreStreamError = (error, fdNumber, streamInfo, isSameDirection =
|
|
|
5555
5418
|
const isInputFileDescriptor = ({ fileDescriptors }, fdNumber) => fdNumber !== "all" && fileDescriptors[fdNumber].direction === "input";
|
|
5556
5419
|
const isStreamAbort = (error) => error?.code === "ERR_STREAM_PREMATURE_CLOSE";
|
|
5557
5420
|
const isStreamEpipe = (error) => error?.code === "EPIPE";
|
|
5558
|
-
|
|
5559
5421
|
//#endregion
|
|
5560
5422
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/resolve/stdio.js
|
|
5561
|
-
const waitForStdioStreams = ({ subprocess, encoding, buffer, maxBuffer, lines, stripFinalNewline
|
|
5423
|
+
const waitForStdioStreams = ({ subprocess, encoding, buffer, maxBuffer, lines, stripFinalNewline, verboseInfo, streamInfo }) => subprocess.stdio.map((stream, fdNumber) => waitForSubprocessStream({
|
|
5562
5424
|
stream,
|
|
5563
5425
|
fdNumber,
|
|
5564
5426
|
encoding,
|
|
@@ -5566,11 +5428,11 @@ const waitForStdioStreams = ({ subprocess, encoding, buffer, maxBuffer, lines, s
|
|
|
5566
5428
|
maxBuffer: maxBuffer[fdNumber],
|
|
5567
5429
|
lines: lines[fdNumber],
|
|
5568
5430
|
allMixed: false,
|
|
5569
|
-
stripFinalNewline
|
|
5431
|
+
stripFinalNewline,
|
|
5570
5432
|
verboseInfo,
|
|
5571
5433
|
streamInfo
|
|
5572
5434
|
}));
|
|
5573
|
-
const waitForSubprocessStream = async ({ stream, fdNumber, encoding, buffer, maxBuffer, lines, allMixed, stripFinalNewline
|
|
5435
|
+
const waitForSubprocessStream = async ({ stream, fdNumber, encoding, buffer, maxBuffer, lines, allMixed, stripFinalNewline, verboseInfo, streamInfo }) => {
|
|
5574
5436
|
if (!stream) return;
|
|
5575
5437
|
const onStreamEnd = waitForStream(stream, fdNumber, streamInfo);
|
|
5576
5438
|
if (isInputFileDescriptor(streamInfo, fdNumber)) {
|
|
@@ -5586,24 +5448,23 @@ const waitForSubprocessStream = async ({ stream, fdNumber, encoding, buffer, max
|
|
|
5586
5448
|
maxBuffer,
|
|
5587
5449
|
lines,
|
|
5588
5450
|
allMixed,
|
|
5589
|
-
stripFinalNewline
|
|
5451
|
+
stripFinalNewline,
|
|
5590
5452
|
verboseInfo,
|
|
5591
5453
|
streamInfo
|
|
5592
5454
|
}), onStreamEnd]);
|
|
5593
5455
|
return output;
|
|
5594
5456
|
};
|
|
5595
|
-
|
|
5596
5457
|
//#endregion
|
|
5597
5458
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/resolve/all-async.js
|
|
5598
5459
|
const makeAllStream = ({ stdout, stderr }, { all }) => all && (stdout || stderr) ? mergeStreams([stdout, stderr].filter(Boolean)) : void 0;
|
|
5599
|
-
const waitForAllStream = ({ subprocess, encoding, buffer, maxBuffer, lines, stripFinalNewline
|
|
5460
|
+
const waitForAllStream = ({ subprocess, encoding, buffer, maxBuffer, lines, stripFinalNewline, verboseInfo, streamInfo }) => waitForSubprocessStream({
|
|
5600
5461
|
...getAllStream(subprocess, buffer),
|
|
5601
5462
|
fdNumber: "all",
|
|
5602
5463
|
encoding,
|
|
5603
5464
|
maxBuffer: maxBuffer[1] + maxBuffer[2],
|
|
5604
5465
|
lines: lines[1] || lines[2],
|
|
5605
5466
|
allMixed: getAllMixed(subprocess),
|
|
5606
|
-
stripFinalNewline
|
|
5467
|
+
stripFinalNewline,
|
|
5607
5468
|
verboseInfo,
|
|
5608
5469
|
streamInfo
|
|
5609
5470
|
});
|
|
@@ -5627,7 +5488,6 @@ const getAllStream = ({ stdout, stderr, all }, [, bufferStdout, bufferStderr]) =
|
|
|
5627
5488
|
};
|
|
5628
5489
|
};
|
|
5629
5490
|
const getAllMixed = ({ all, stdout, stderr }) => all && stdout && stderr && stdout.readableObjectMode !== stderr.readableObjectMode;
|
|
5630
|
-
|
|
5631
5491
|
//#endregion
|
|
5632
5492
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/verbose/ipc.js
|
|
5633
5493
|
const shouldLogIpc = (verboseInfo) => isFullVerbose(verboseInfo, "ipc");
|
|
@@ -5639,12 +5499,11 @@ const logIpcOutput = (message, verboseInfo) => {
|
|
|
5639
5499
|
verboseInfo
|
|
5640
5500
|
});
|
|
5641
5501
|
};
|
|
5642
|
-
|
|
5643
5502
|
//#endregion
|
|
5644
5503
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/ipc/buffer-messages.js
|
|
5645
5504
|
const waitForIpcOutput = async ({ subprocess, buffer: bufferArray, maxBuffer: maxBufferArray, ipc, ipcOutput, verboseInfo }) => {
|
|
5646
5505
|
if (!ipc) return ipcOutput;
|
|
5647
|
-
const isVerbose
|
|
5506
|
+
const isVerbose = shouldLogIpc(verboseInfo);
|
|
5648
5507
|
const buffer = getFdSpecificValue(bufferArray, "ipc");
|
|
5649
5508
|
const maxBuffer = getFdSpecificValue(maxBufferArray, "ipc");
|
|
5650
5509
|
for await (const message of loopOnMessages({
|
|
@@ -5659,7 +5518,7 @@ const waitForIpcOutput = async ({ subprocess, buffer: bufferArray, maxBuffer: ma
|
|
|
5659
5518
|
checkIpcMaxBuffer(subprocess, ipcOutput, maxBuffer);
|
|
5660
5519
|
ipcOutput.push(message);
|
|
5661
5520
|
}
|
|
5662
|
-
if (isVerbose
|
|
5521
|
+
if (isVerbose) logIpcOutput(message, verboseInfo);
|
|
5663
5522
|
}
|
|
5664
5523
|
return ipcOutput;
|
|
5665
5524
|
};
|
|
@@ -5667,10 +5526,9 @@ const getBufferedIpcOutput = async (ipcOutputPromise, ipcOutput) => {
|
|
|
5667
5526
|
await Promise.allSettled([ipcOutputPromise]);
|
|
5668
5527
|
return ipcOutput;
|
|
5669
5528
|
};
|
|
5670
|
-
|
|
5671
5529
|
//#endregion
|
|
5672
5530
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/resolve/wait-subprocess.js
|
|
5673
|
-
const waitForSubprocessResult = async ({ subprocess, options: { encoding, buffer, maxBuffer, lines, timeoutDuration: timeout, cancelSignal, gracefulCancel, forceKillAfterDelay, stripFinalNewline
|
|
5531
|
+
const waitForSubprocessResult = async ({ subprocess, options: { encoding, buffer, maxBuffer, lines, timeoutDuration: timeout, cancelSignal, gracefulCancel, forceKillAfterDelay, stripFinalNewline, ipc, ipcInput }, context, verboseInfo, fileDescriptors, originalStreams, onInternalError, controller }) => {
|
|
5674
5532
|
const exitPromise = waitForExit(subprocess, context);
|
|
5675
5533
|
const streamInfo = {
|
|
5676
5534
|
originalStreams,
|
|
@@ -5685,7 +5543,7 @@ const waitForSubprocessResult = async ({ subprocess, options: { encoding, buffer
|
|
|
5685
5543
|
buffer,
|
|
5686
5544
|
maxBuffer,
|
|
5687
5545
|
lines,
|
|
5688
|
-
stripFinalNewline
|
|
5546
|
+
stripFinalNewline,
|
|
5689
5547
|
verboseInfo,
|
|
5690
5548
|
streamInfo
|
|
5691
5549
|
});
|
|
@@ -5695,7 +5553,7 @@ const waitForSubprocessResult = async ({ subprocess, options: { encoding, buffer
|
|
|
5695
5553
|
buffer,
|
|
5696
5554
|
maxBuffer,
|
|
5697
5555
|
lines,
|
|
5698
|
-
stripFinalNewline
|
|
5556
|
+
stripFinalNewline,
|
|
5699
5557
|
verboseInfo,
|
|
5700
5558
|
streamInfo
|
|
5701
5559
|
});
|
|
@@ -5763,7 +5621,6 @@ const throwOnSubprocessError = async (subprocess, { signal }) => {
|
|
|
5763
5621
|
const [error] = await once(subprocess, "error", { signal });
|
|
5764
5622
|
throw error;
|
|
5765
5623
|
};
|
|
5766
|
-
|
|
5767
5624
|
//#endregion
|
|
5768
5625
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/convert/concurrent.js
|
|
5769
5626
|
const initializeConcurrentStreams = () => ({
|
|
@@ -5787,7 +5644,6 @@ const waitForConcurrentStreams = async ({ resolve, promises }, subprocess) => {
|
|
|
5787
5644
|
const [isSubprocessExit] = await Promise.race([Promise.allSettled([true, subprocess]), Promise.all([false, ...promises])]);
|
|
5788
5645
|
return !isSubprocessExit;
|
|
5789
5646
|
};
|
|
5790
|
-
|
|
5791
5647
|
//#endregion
|
|
5792
5648
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/convert/shared.js
|
|
5793
5649
|
const safeWaitForSubprocessStdin = async (subprocessStdin) => {
|
|
@@ -5824,7 +5680,6 @@ const destroyOtherStream = (stream, isOpen, error) => {
|
|
|
5824
5680
|
if (error && !isStreamAbort(error)) stream.destroy(error);
|
|
5825
5681
|
else if (isOpen) stream.destroy();
|
|
5826
5682
|
};
|
|
5827
|
-
|
|
5828
5683
|
//#endregion
|
|
5829
5684
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/convert/readable.js
|
|
5830
5685
|
const createReadable = ({ subprocess, concurrentStreams, encoding }, { from, binary: binaryOption = true, preserveNewlines = true } = {}) => {
|
|
@@ -5838,7 +5693,7 @@ const createReadable = ({ subprocess, concurrentStreams, encoding }, { from, bin
|
|
|
5838
5693
|
encoding,
|
|
5839
5694
|
preserveNewlines
|
|
5840
5695
|
});
|
|
5841
|
-
const readable
|
|
5696
|
+
const readable = new Readable({
|
|
5842
5697
|
read,
|
|
5843
5698
|
destroy: callbackify(onReadableDestroy.bind(void 0, {
|
|
5844
5699
|
subprocessStdout,
|
|
@@ -5852,10 +5707,10 @@ const createReadable = ({ subprocess, concurrentStreams, encoding }, { from, bin
|
|
|
5852
5707
|
onStdoutFinished({
|
|
5853
5708
|
subprocessStdout,
|
|
5854
5709
|
onStdoutDataDone,
|
|
5855
|
-
readable
|
|
5710
|
+
readable,
|
|
5856
5711
|
subprocess
|
|
5857
5712
|
});
|
|
5858
|
-
return readable
|
|
5713
|
+
return readable;
|
|
5859
5714
|
};
|
|
5860
5715
|
const getSubprocessStdout = (subprocess, from, concurrentStreams) => {
|
|
5861
5716
|
const subprocessStdout = getFromStream(subprocess, from);
|
|
@@ -5890,23 +5745,23 @@ const getReadableMethods = ({ subprocessStdout, subprocess, binary, encoding, pr
|
|
|
5890
5745
|
onStdoutDataDone
|
|
5891
5746
|
};
|
|
5892
5747
|
};
|
|
5893
|
-
const onRead = async (readable
|
|
5748
|
+
const onRead = async (readable, onStdoutData, onStdoutDataDone) => {
|
|
5894
5749
|
try {
|
|
5895
5750
|
const { value, done } = await onStdoutData.next();
|
|
5896
5751
|
if (done) onStdoutDataDone.resolve();
|
|
5897
|
-
else readable
|
|
5752
|
+
else readable.push(value);
|
|
5898
5753
|
} catch {}
|
|
5899
5754
|
};
|
|
5900
|
-
const onStdoutFinished = async ({ subprocessStdout, onStdoutDataDone, readable
|
|
5755
|
+
const onStdoutFinished = async ({ subprocessStdout, onStdoutDataDone, readable, subprocess, subprocessStdin }) => {
|
|
5901
5756
|
try {
|
|
5902
5757
|
await waitForSubprocessStdout(subprocessStdout);
|
|
5903
5758
|
await subprocess;
|
|
5904
5759
|
await safeWaitForSubprocessStdin(subprocessStdin);
|
|
5905
5760
|
await onStdoutDataDone;
|
|
5906
|
-
if (readable
|
|
5761
|
+
if (readable.readable) readable.push(null);
|
|
5907
5762
|
} catch (error) {
|
|
5908
5763
|
await safeWaitForSubprocessStdin(subprocessStdin);
|
|
5909
|
-
destroyOtherReadable(readable
|
|
5764
|
+
destroyOtherReadable(readable, error);
|
|
5910
5765
|
}
|
|
5911
5766
|
};
|
|
5912
5767
|
const onReadableDestroy = async ({ subprocessStdout, subprocess, waitReadableDestroy }, error) => {
|
|
@@ -5918,12 +5773,11 @@ const onReadableDestroy = async ({ subprocessStdout, subprocess, waitReadableDes
|
|
|
5918
5773
|
const destroyOtherReadable = (stream, error) => {
|
|
5919
5774
|
destroyOtherStream(stream, stream.readable, error);
|
|
5920
5775
|
};
|
|
5921
|
-
|
|
5922
5776
|
//#endregion
|
|
5923
5777
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/convert/writable.js
|
|
5924
5778
|
const createWritable = ({ subprocess, concurrentStreams }, { to } = {}) => {
|
|
5925
5779
|
const { subprocessStdin, waitWritableFinal, waitWritableDestroy } = getSubprocessStdin(subprocess, to, concurrentStreams);
|
|
5926
|
-
const writable
|
|
5780
|
+
const writable = new Writable({
|
|
5927
5781
|
...getWritableMethods(subprocessStdin, subprocess, waitWritableFinal),
|
|
5928
5782
|
destroy: callbackify(onWritableDestroy.bind(void 0, {
|
|
5929
5783
|
subprocessStdin,
|
|
@@ -5934,8 +5788,8 @@ const createWritable = ({ subprocess, concurrentStreams }, { to } = {}) => {
|
|
|
5934
5788
|
highWaterMark: subprocessStdin.writableHighWaterMark,
|
|
5935
5789
|
objectMode: subprocessStdin.writableObjectMode
|
|
5936
5790
|
});
|
|
5937
|
-
onStdinFinished(subprocessStdin, writable
|
|
5938
|
-
return writable
|
|
5791
|
+
onStdinFinished(subprocessStdin, writable);
|
|
5792
|
+
return writable;
|
|
5939
5793
|
};
|
|
5940
5794
|
const getSubprocessStdin = (subprocess, to, concurrentStreams) => {
|
|
5941
5795
|
const subprocessStdin = getToStream(subprocess, to);
|
|
@@ -5959,13 +5813,13 @@ const onWritableFinal = async (subprocessStdin, subprocess, waitWritableFinal) =
|
|
|
5959
5813
|
await subprocess;
|
|
5960
5814
|
}
|
|
5961
5815
|
};
|
|
5962
|
-
const onStdinFinished = async (subprocessStdin, writable
|
|
5816
|
+
const onStdinFinished = async (subprocessStdin, writable, subprocessStdout) => {
|
|
5963
5817
|
try {
|
|
5964
5818
|
await waitForSubprocessStdin(subprocessStdin);
|
|
5965
|
-
if (writable
|
|
5819
|
+
if (writable.writable) writable.end();
|
|
5966
5820
|
} catch (error) {
|
|
5967
5821
|
await safeWaitForSubprocessStdout(subprocessStdout);
|
|
5968
|
-
destroyOtherWritable(writable
|
|
5822
|
+
destroyOtherWritable(writable, error);
|
|
5969
5823
|
}
|
|
5970
5824
|
};
|
|
5971
5825
|
const onWritableDestroy = async ({ subprocessStdin, subprocess, waitWritableFinal, waitWritableDestroy }, error) => {
|
|
@@ -5978,7 +5832,6 @@ const onWritableDestroy = async ({ subprocessStdin, subprocess, waitWritableFina
|
|
|
5978
5832
|
const destroyOtherWritable = (stream, error) => {
|
|
5979
5833
|
destroyOtherStream(stream, stream.writable, error);
|
|
5980
5834
|
};
|
|
5981
|
-
|
|
5982
5835
|
//#endregion
|
|
5983
5836
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/convert/duplex.js
|
|
5984
5837
|
const createDuplex = ({ subprocess, concurrentStreams, encoding }, { from, to, binary: binaryOption = true, preserveNewlines = true } = {}) => {
|
|
@@ -5993,7 +5846,7 @@ const createDuplex = ({ subprocess, concurrentStreams, encoding }, { from, to, b
|
|
|
5993
5846
|
encoding,
|
|
5994
5847
|
preserveNewlines
|
|
5995
5848
|
});
|
|
5996
|
-
const duplex
|
|
5849
|
+
const duplex = new Duplex({
|
|
5997
5850
|
read,
|
|
5998
5851
|
...getWritableMethods(subprocessStdin, subprocess, waitWritableFinal),
|
|
5999
5852
|
destroy: callbackify(onDuplexDestroy.bind(void 0, {
|
|
@@ -6013,12 +5866,12 @@ const createDuplex = ({ subprocess, concurrentStreams, encoding }, { from, to, b
|
|
|
6013
5866
|
onStdoutFinished({
|
|
6014
5867
|
subprocessStdout,
|
|
6015
5868
|
onStdoutDataDone,
|
|
6016
|
-
readable: duplex
|
|
5869
|
+
readable: duplex,
|
|
6017
5870
|
subprocess,
|
|
6018
5871
|
subprocessStdin
|
|
6019
5872
|
});
|
|
6020
|
-
onStdinFinished(subprocessStdin, duplex
|
|
6021
|
-
return duplex
|
|
5873
|
+
onStdinFinished(subprocessStdin, duplex, subprocessStdout);
|
|
5874
|
+
return duplex;
|
|
6022
5875
|
};
|
|
6023
5876
|
const onDuplexDestroy = async ({ subprocessStdout, subprocessStdin, subprocess, waitReadableDestroy, waitWritableFinal, waitWritableDestroy }, error) => {
|
|
6024
5877
|
await Promise.all([onReadableDestroy({
|
|
@@ -6032,7 +5885,6 @@ const onDuplexDestroy = async ({ subprocessStdout, subprocessStdin, subprocess,
|
|
|
6032
5885
|
waitWritableDestroy
|
|
6033
5886
|
}, error)]);
|
|
6034
5887
|
};
|
|
6035
|
-
|
|
6036
5888
|
//#endregion
|
|
6037
5889
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/convert/iterable.js
|
|
6038
5890
|
const createIterable = (subprocess, encoding, { from, binary: binaryOption = false, preserveNewlines = false } = {}) => {
|
|
@@ -6055,7 +5907,6 @@ const iterateOnStdoutData = async function* (onStdoutData, subprocessStdout, sub
|
|
|
6055
5907
|
await subprocess;
|
|
6056
5908
|
}
|
|
6057
5909
|
};
|
|
6058
|
-
|
|
6059
5910
|
//#endregion
|
|
6060
5911
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/convert/add.js
|
|
6061
5912
|
const addConvertedStreams = (subprocess, { encoding }) => {
|
|
@@ -6077,7 +5928,6 @@ const addConvertedStreams = (subprocess, { encoding }) => {
|
|
|
6077
5928
|
subprocess.iterable = createIterable.bind(void 0, subprocess, encoding);
|
|
6078
5929
|
subprocess[Symbol.asyncIterator] = createIterable.bind(void 0, subprocess, encoding, {});
|
|
6079
5930
|
};
|
|
6080
|
-
|
|
6081
5931
|
//#endregion
|
|
6082
5932
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/methods/promise.js
|
|
6083
5933
|
const mergePromise = (subprocess, promise) => {
|
|
@@ -6095,7 +5945,6 @@ const descriptors = [
|
|
|
6095
5945
|
"catch",
|
|
6096
5946
|
"finally"
|
|
6097
5947
|
].map((property) => [property, Reflect.getOwnPropertyDescriptor(nativePromisePrototype, property)]);
|
|
6098
|
-
|
|
6099
5948
|
//#endregion
|
|
6100
5949
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/methods/main-async.js
|
|
6101
5950
|
const execaCoreAsync = (rawFile, rawArguments, rawOptions, createNested) => {
|
|
@@ -6138,7 +5987,7 @@ const handleAsyncArguments = (rawFile, rawArguments, rawOptions) => {
|
|
|
6138
5987
|
fileDescriptors: handleStdioAsync(options, verboseInfo)
|
|
6139
5988
|
};
|
|
6140
5989
|
};
|
|
6141
|
-
const handleAsyncOptions = ({ timeout, signal
|
|
5990
|
+
const handleAsyncOptions = ({ timeout, signal, ...options }) => {
|
|
6142
5991
|
if (signal !== void 0) throw new TypeError("The \"signal\" option has been renamed to \"cancelSignal\" instead.");
|
|
6143
5992
|
return {
|
|
6144
5993
|
...options,
|
|
@@ -6248,7 +6097,6 @@ const getAsyncResult = ({ errorInfo, exitCode, signal, stdio, all, ipcOutput, co
|
|
|
6248
6097
|
options,
|
|
6249
6098
|
startTime
|
|
6250
6099
|
});
|
|
6251
|
-
|
|
6252
6100
|
//#endregion
|
|
6253
6101
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/methods/bind.js
|
|
6254
6102
|
const mergeOptions = (boundOptions, options) => {
|
|
@@ -6266,11 +6114,10 @@ const mergeOption = (optionName, boundOptionValue, optionValue) => {
|
|
|
6266
6114
|
return optionValue;
|
|
6267
6115
|
};
|
|
6268
6116
|
const DEEP_OPTIONS = new Set(["env", ...FD_SPECIFIC_OPTIONS]);
|
|
6269
|
-
|
|
6270
6117
|
//#endregion
|
|
6271
6118
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/methods/create.js
|
|
6272
6119
|
const createExeca = (mapArguments, boundOptions, deepOptions, setBoundExeca) => {
|
|
6273
|
-
const createNested = (mapArguments
|
|
6120
|
+
const createNested = (mapArguments, boundOptions, setBoundExeca) => createExeca(mapArguments, boundOptions, deepOptions, setBoundExeca);
|
|
6274
6121
|
const boundExeca = (...execaArguments) => callBoundExeca({
|
|
6275
6122
|
mapArguments,
|
|
6276
6123
|
deepOptions,
|
|
@@ -6307,7 +6154,6 @@ const parseArguments = ({ mapArguments, firstArgument, nextArguments, deepOption
|
|
|
6307
6154
|
isSync
|
|
6308
6155
|
};
|
|
6309
6156
|
};
|
|
6310
|
-
|
|
6311
6157
|
//#endregion
|
|
6312
6158
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/methods/command.js
|
|
6313
6159
|
const mapCommandAsync = ({ file, commandArguments }) => parseCommand(file, commandArguments);
|
|
@@ -6336,7 +6182,6 @@ const parseCommandString = (command) => {
|
|
|
6336
6182
|
return tokens;
|
|
6337
6183
|
};
|
|
6338
6184
|
const SPACES_REGEXP = / +/g;
|
|
6339
|
-
|
|
6340
6185
|
//#endregion
|
|
6341
6186
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/methods/script.js
|
|
6342
6187
|
const setScriptSync = (boundExeca, createNested, boundOptions) => {
|
|
@@ -6354,17 +6199,15 @@ const getScriptOptions = (options) => ({ options: {
|
|
|
6354
6199
|
} });
|
|
6355
6200
|
const getScriptStdinOption = ({ input, inputFile, stdio }) => input === void 0 && inputFile === void 0 && stdio === void 0 ? { stdin: "inherit" } : {};
|
|
6356
6201
|
const deepScriptOptions = { preferLocal: true };
|
|
6357
|
-
|
|
6358
6202
|
//#endregion
|
|
6359
6203
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/index.js
|
|
6360
6204
|
const execa = createExeca(() => ({}));
|
|
6361
|
-
|
|
6362
|
-
|
|
6363
|
-
|
|
6364
|
-
|
|
6365
|
-
|
|
6205
|
+
createExeca(() => ({ isSync: true }));
|
|
6206
|
+
createExeca(mapCommandAsync);
|
|
6207
|
+
createExeca(mapCommandSync);
|
|
6208
|
+
createExeca(mapNode);
|
|
6209
|
+
createExeca(mapScriptAsync, {}, deepScriptOptions, setScriptSync);
|
|
6366
6210
|
const { sendMessage, getOneMessage, getEachMessage, getCancelSignal } = getIpcExport();
|
|
6367
|
-
|
|
6368
6211
|
//#endregion
|
|
6369
6212
|
//#region ../../node_modules/.pnpm/es-toolkit@1.32.0/node_modules/es-toolkit/dist/error/AbortError.mjs
|
|
6370
6213
|
var AbortError = class extends Error {
|
|
@@ -6373,7 +6216,6 @@ var AbortError = class extends Error {
|
|
|
6373
6216
|
this.name = "AbortError";
|
|
6374
6217
|
}
|
|
6375
6218
|
};
|
|
6376
|
-
|
|
6377
6219
|
//#endregion
|
|
6378
6220
|
//#region ../../node_modules/.pnpm/es-toolkit@1.32.0/node_modules/es-toolkit/dist/promise/delay.mjs
|
|
6379
6221
|
function delay(ms, { signal } = {}) {
|
|
@@ -6393,7 +6235,6 @@ function delay(ms, { signal } = {}) {
|
|
|
6393
6235
|
signal?.addEventListener("abort", abortHandler, { once: true });
|
|
6394
6236
|
});
|
|
6395
6237
|
}
|
|
6396
|
-
|
|
6397
6238
|
//#endregion
|
|
6398
6239
|
//#region ../../node_modules/.pnpm/es-toolkit@1.32.0/node_modules/es-toolkit/dist/predicate/isPlainObject.mjs
|
|
6399
6240
|
function isPlainObject(value) {
|
|
@@ -6402,13 +6243,12 @@ function isPlainObject(value) {
|
|
|
6402
6243
|
if (!(proto === null || proto === Object.prototype || Object.getPrototypeOf(proto) === null)) return false;
|
|
6403
6244
|
return Object.prototype.toString.call(value) === "[object Object]";
|
|
6404
6245
|
}
|
|
6405
|
-
|
|
6406
6246
|
//#endregion
|
|
6407
6247
|
//#region ../../node_modules/.pnpm/es-toolkit@1.32.0/node_modules/es-toolkit/dist/object/merge.mjs
|
|
6408
6248
|
function merge(target, source) {
|
|
6409
6249
|
const sourceKeys = Object.keys(source);
|
|
6410
|
-
for (let i
|
|
6411
|
-
const key = sourceKeys[i
|
|
6250
|
+
for (let i = 0; i < sourceKeys.length; i++) {
|
|
6251
|
+
const key = sourceKeys[i];
|
|
6412
6252
|
const sourceValue = source[key];
|
|
6413
6253
|
const targetValue = target[key];
|
|
6414
6254
|
if (Array.isArray(sourceValue)) if (Array.isArray(targetValue)) target[key] = merge(targetValue, sourceValue);
|
|
@@ -6419,48 +6259,18 @@ function merge(target, source) {
|
|
|
6419
6259
|
}
|
|
6420
6260
|
return target;
|
|
6421
6261
|
}
|
|
6422
|
-
|
|
6423
6262
|
//#endregion
|
|
6424
6263
|
//#region ../../node_modules/.pnpm/es-toolkit@1.32.0/node_modules/es-toolkit/dist/object/omit.mjs
|
|
6425
6264
|
function omit(obj, keys) {
|
|
6426
6265
|
const result = { ...obj };
|
|
6427
|
-
for (let i
|
|
6428
|
-
const key = keys[i
|
|
6266
|
+
for (let i = 0; i < keys.length; i++) {
|
|
6267
|
+
const key = keys[i];
|
|
6429
6268
|
delete result[key];
|
|
6430
6269
|
}
|
|
6431
6270
|
return result;
|
|
6432
6271
|
}
|
|
6433
|
-
|
|
6434
6272
|
//#endregion
|
|
6435
6273
|
//#region iac/cloudfrontDistributionConfig.ts
|
|
6436
|
-
const HOT_UPDATER_LEGACY_CHECK_UPDATE_HEADERS = [
|
|
6437
|
-
"x-bundle-id",
|
|
6438
|
-
"x-app-version",
|
|
6439
|
-
"x-app-platform",
|
|
6440
|
-
"x-min-bundle-id",
|
|
6441
|
-
"x-channel",
|
|
6442
|
-
"x-fingerprint-hash"
|
|
6443
|
-
];
|
|
6444
|
-
const HOT_UPDATER_LEGACY_CHECK_UPDATE_CACHE_POLICY_CONFIG = {
|
|
6445
|
-
Name: "HotUpdaterLegacyCheckUpdateNoCache",
|
|
6446
|
-
Comment: "Forward legacy check-update headers to origin-request Lambda with effectively no cache",
|
|
6447
|
-
DefaultTTL: 0,
|
|
6448
|
-
MaxTTL: 1,
|
|
6449
|
-
MinTTL: 0,
|
|
6450
|
-
ParametersInCacheKeyAndForwardedToOrigin: {
|
|
6451
|
-
EnableAcceptEncodingBrotli: false,
|
|
6452
|
-
EnableAcceptEncodingGzip: false,
|
|
6453
|
-
HeadersConfig: {
|
|
6454
|
-
HeaderBehavior: "whitelist",
|
|
6455
|
-
Headers: {
|
|
6456
|
-
Quantity: HOT_UPDATER_LEGACY_CHECK_UPDATE_HEADERS.length,
|
|
6457
|
-
Items: [...HOT_UPDATER_LEGACY_CHECK_UPDATE_HEADERS]
|
|
6458
|
-
}
|
|
6459
|
-
},
|
|
6460
|
-
CookiesConfig: { CookieBehavior: "none" },
|
|
6461
|
-
QueryStringsConfig: { QueryStringBehavior: "none" }
|
|
6462
|
-
}
|
|
6463
|
-
};
|
|
6464
6274
|
const HOT_UPDATER_SHARED_CACHE_POLICY_CONFIG = {
|
|
6465
6275
|
Name: "HotUpdaterOriginCacheControl",
|
|
6466
6276
|
Comment: "Honor origin Cache-Control without forwarding viewer Host/cookies/query strings",
|
|
@@ -6493,15 +6303,9 @@ const HOT_UPDATER_BEHAVIOR_BASE = {
|
|
|
6493
6303
|
FieldLevelEncryptionId: "",
|
|
6494
6304
|
AllowedMethods: READ_ONLY_METHODS
|
|
6495
6305
|
};
|
|
6496
|
-
const
|
|
6497
|
-
pathPattern: "/api/check-update",
|
|
6498
|
-
cachePolicy: "legacy"
|
|
6499
|
-
}, {
|
|
6500
|
-
pathPattern: "/api/check-update/*",
|
|
6501
|
-
cachePolicy: "shared"
|
|
6502
|
-
}];
|
|
6306
|
+
const HOT_UPDATER_CACHE_BEHAVIOR_PATH = "/api/check-update/*";
|
|
6503
6307
|
const omitLegacyCacheFields = (value) => {
|
|
6504
|
-
const { ForwardedValues: _forwardedValues, MinTTL: _minTTL, DefaultTTL: _defaultTTL, MaxTTL: _maxTTL, OriginRequestPolicyId: _originRequestPolicyId
|
|
6308
|
+
const { ForwardedValues: _forwardedValues, MinTTL: _minTTL, DefaultTTL: _defaultTTL, MaxTTL: _maxTTL, OriginRequestPolicyId: _originRequestPolicyId, ...rest } = value;
|
|
6505
6309
|
return rest;
|
|
6506
6310
|
};
|
|
6507
6311
|
const sanitizeDefaultBehavior = (behavior) => ({
|
|
@@ -6550,17 +6354,10 @@ const buildDefaultCacheBehavior = (options) => ({
|
|
|
6550
6354
|
CachePolicyId: options.sharedCachePolicyId,
|
|
6551
6355
|
LambdaFunctionAssociations: EMPTY_LAMBDA_FUNCTION_ASSOCIATIONS
|
|
6552
6356
|
});
|
|
6553
|
-
const
|
|
6554
|
-
if (cachePolicy === "legacy") return legacyCachePolicyId;
|
|
6555
|
-
if (cachePolicy === "shared") return sharedCachePolicyId;
|
|
6556
|
-
};
|
|
6557
|
-
const buildCacheBehavior = (template, options) => ({
|
|
6357
|
+
const buildCacheBehavior = (options) => ({
|
|
6558
6358
|
...buildSharedBehavior(options.bucketName),
|
|
6559
|
-
PathPattern:
|
|
6560
|
-
CachePolicyId:
|
|
6561
|
-
legacyCachePolicyId: options.legacyCachePolicyId,
|
|
6562
|
-
sharedCachePolicyId: options.sharedCachePolicyId
|
|
6563
|
-
}),
|
|
6359
|
+
PathPattern: HOT_UPDATER_CACHE_BEHAVIOR_PATH,
|
|
6360
|
+
CachePolicyId: options.sharedCachePolicyId,
|
|
6564
6361
|
LambdaFunctionAssociations: buildOriginRequestLambdaAssociations(options.functionArn)
|
|
6565
6362
|
});
|
|
6566
6363
|
const mergeOriginWithExisting = (existingOrigin, overrideOrigin) => ({
|
|
@@ -6589,13 +6386,12 @@ const buildDistributionConfigOverrides = (options) => ({
|
|
|
6589
6386
|
sharedCachePolicyId: options.sharedCachePolicyId
|
|
6590
6387
|
}),
|
|
6591
6388
|
CacheBehaviors: {
|
|
6592
|
-
Quantity:
|
|
6593
|
-
Items:
|
|
6389
|
+
Quantity: 1,
|
|
6390
|
+
Items: [buildCacheBehavior({
|
|
6594
6391
|
bucketName: options.bucketName,
|
|
6595
6392
|
functionArn: options.functionArn,
|
|
6596
|
-
legacyCachePolicyId: options.legacyCachePolicyId,
|
|
6597
6393
|
sharedCachePolicyId: options.sharedCachePolicyId
|
|
6598
|
-
})
|
|
6394
|
+
})]
|
|
6599
6395
|
}
|
|
6600
6396
|
});
|
|
6601
6397
|
const applyDistributionConfigOverrides = (distributionConfig, overrides) => {
|
|
@@ -6633,7 +6429,6 @@ const buildDistributionConfig = (options) => sanitizeDistributionConfig({
|
|
|
6633
6429
|
Items: []
|
|
6634
6430
|
}
|
|
6635
6431
|
});
|
|
6636
|
-
|
|
6637
6432
|
//#endregion
|
|
6638
6433
|
//#region iac/cloudfrontPagination.ts
|
|
6639
6434
|
const findInPaginatedCloudFrontList = async ({ listPage, matches }) => {
|
|
@@ -6645,7 +6440,6 @@ const findInPaginatedCloudFrontList = async ({ listPage, matches }) => {
|
|
|
6645
6440
|
marker = nextMarker;
|
|
6646
6441
|
} while (marker);
|
|
6647
6442
|
};
|
|
6648
|
-
|
|
6649
6443
|
//#endregion
|
|
6650
6444
|
//#region iac/cloudfront.ts
|
|
6651
6445
|
var CloudFrontManager = class {
|
|
@@ -6674,25 +6468,6 @@ var CloudFrontManager = class {
|
|
|
6674
6468
|
if (!cachePolicyId) throw new Error("Failed to create shared cache policy");
|
|
6675
6469
|
return cachePolicyId;
|
|
6676
6470
|
}
|
|
6677
|
-
async getOrCreateLegacyCheckUpdateCachePolicy(cloudfrontClient) {
|
|
6678
|
-
const existingPolicyId = (await findInPaginatedCloudFrontList({
|
|
6679
|
-
listPage: async (marker) => {
|
|
6680
|
-
const listPoliciesResponse = await cloudfrontClient.listCachePolicies({
|
|
6681
|
-
Type: "custom",
|
|
6682
|
-
...marker ? { Marker: marker } : {}
|
|
6683
|
-
});
|
|
6684
|
-
return {
|
|
6685
|
-
items: listPoliciesResponse.CachePolicyList?.Items ?? [],
|
|
6686
|
-
nextMarker: listPoliciesResponse.CachePolicyList?.NextMarker
|
|
6687
|
-
};
|
|
6688
|
-
},
|
|
6689
|
-
matches: (policy) => policy.CachePolicy?.CachePolicyConfig?.Name === HOT_UPDATER_LEGACY_CHECK_UPDATE_CACHE_POLICY_CONFIG.Name
|
|
6690
|
-
}))?.CachePolicy?.Id;
|
|
6691
|
-
if (existingPolicyId) return existingPolicyId;
|
|
6692
|
-
const cachePolicyId = (await cloudfrontClient.createCachePolicy({ CachePolicyConfig: HOT_UPDATER_LEGACY_CHECK_UPDATE_CACHE_POLICY_CONFIG })).CachePolicy?.Id;
|
|
6693
|
-
if (!cachePolicyId) throw new Error("Failed to create legacy check-update cache policy");
|
|
6694
|
-
return cachePolicyId;
|
|
6695
|
-
}
|
|
6696
6471
|
async getOrCreateKeyGroup(publicKey) {
|
|
6697
6472
|
const publicKeyHash = crypto.createHash("sha256").update(publicKey).digest("hex").slice(0, 16);
|
|
6698
6473
|
const cloudfrontClient = new CloudFront({
|
|
@@ -6755,13 +6530,7 @@ var CloudFrontManager = class {
|
|
|
6755
6530
|
}
|
|
6756
6531
|
if (!oacId) throw new Error("Failed to get Origin Access Control ID");
|
|
6757
6532
|
const bucketDomain = `${options.bucketName}.s3.${this.region}.amazonaws.com`;
|
|
6758
|
-
let legacyCachePolicyId;
|
|
6759
6533
|
let sharedCachePolicyId;
|
|
6760
|
-
try {
|
|
6761
|
-
legacyCachePolicyId = await this.getOrCreateLegacyCheckUpdateCachePolicy(cloudfrontClient);
|
|
6762
|
-
} catch (error) {
|
|
6763
|
-
throw new Error(`Failed to get or create legacy check-update cache policy: ${error instanceof Error ? error.message : String(error)}`);
|
|
6764
|
-
}
|
|
6765
6534
|
try {
|
|
6766
6535
|
sharedCachePolicyId = await this.getOrCreateSharedCachePolicy(cloudfrontClient);
|
|
6767
6536
|
} catch (error) {
|
|
@@ -6796,7 +6565,6 @@ var CloudFrontManager = class {
|
|
|
6796
6565
|
functionArn: options.functionArn,
|
|
6797
6566
|
keyGroupId: options.keyGroupId,
|
|
6798
6567
|
oacId,
|
|
6799
|
-
legacyCachePolicyId,
|
|
6800
6568
|
sharedCachePolicyId
|
|
6801
6569
|
});
|
|
6802
6570
|
if (selectedDistribution) {
|
|
@@ -6837,7 +6605,6 @@ var CloudFrontManager = class {
|
|
|
6837
6605
|
functionArn: options.functionArn,
|
|
6838
6606
|
keyGroupId: options.keyGroupId,
|
|
6839
6607
|
oacId,
|
|
6840
|
-
legacyCachePolicyId,
|
|
6841
6608
|
sharedCachePolicyId
|
|
6842
6609
|
});
|
|
6843
6610
|
try {
|
|
@@ -6871,7 +6638,6 @@ var CloudFrontManager = class {
|
|
|
6871
6638
|
}
|
|
6872
6639
|
}
|
|
6873
6640
|
};
|
|
6874
|
-
|
|
6875
6641
|
//#endregion
|
|
6876
6642
|
//#region iac/iam.ts
|
|
6877
6643
|
var IAMManager = class {
|
|
@@ -6960,7 +6726,6 @@ var IAMManager = class {
|
|
|
6960
6726
|
throw new Error("Failed to create or get IAM role");
|
|
6961
6727
|
}
|
|
6962
6728
|
};
|
|
6963
|
-
|
|
6964
6729
|
//#endregion
|
|
6965
6730
|
//#region iac/lambdaEdge.ts
|
|
6966
6731
|
var LambdaEdgeDeployer = class {
|
|
@@ -7052,8 +6817,8 @@ var LambdaEdgeDeployer = class {
|
|
|
7052
6817
|
MemorySize: 256,
|
|
7053
6818
|
Timeout: 10
|
|
7054
6819
|
});
|
|
7055
|
-
} catch (error
|
|
7056
|
-
p.log.error(`Failed to update Lambda configuration: ${error
|
|
6820
|
+
} catch (error) {
|
|
6821
|
+
p.log.error(`Failed to update Lambda configuration: ${error instanceof Error ? error.message : String(error)}`);
|
|
7057
6822
|
}
|
|
7058
6823
|
functionArn.arn = updateResp.FunctionArn || null;
|
|
7059
6824
|
functionArn.version = updateResp.Version || "1";
|
|
@@ -7090,7 +6855,6 @@ var LambdaEdgeDeployer = class {
|
|
|
7090
6855
|
};
|
|
7091
6856
|
}
|
|
7092
6857
|
};
|
|
7093
|
-
|
|
7094
6858
|
//#endregion
|
|
7095
6859
|
//#region iac/migrations/migrator.ts
|
|
7096
6860
|
/**
|
|
@@ -7325,7 +7089,6 @@ var S3Migrator = class {
|
|
|
7325
7089
|
if (!dryRun) console.log(colors.blue("All migrations applied."));
|
|
7326
7090
|
}
|
|
7327
7091
|
};
|
|
7328
|
-
|
|
7329
7092
|
//#endregion
|
|
7330
7093
|
//#region iac/migrations/Migration0001HotUpdater0_13_0.ts
|
|
7331
7094
|
/**
|
|
@@ -7351,7 +7114,6 @@ var Migration0001HotUpdater0_13_0 = class extends S3Migration {
|
|
|
7351
7114
|
}
|
|
7352
7115
|
}
|
|
7353
7116
|
};
|
|
7354
|
-
|
|
7355
7117
|
//#endregion
|
|
7356
7118
|
//#region iac/migrations/Migration0001HotUpdater0_18_0.ts
|
|
7357
7119
|
/**
|
|
@@ -7374,7 +7136,6 @@ var Migration0001HotUpdater0_18_0 = class extends S3Migration {
|
|
|
7374
7136
|
}
|
|
7375
7137
|
}
|
|
7376
7138
|
};
|
|
7377
|
-
|
|
7378
7139
|
//#endregion
|
|
7379
7140
|
//#region iac/regionLocationMap.ts
|
|
7380
7141
|
const regionLocationMap = {
|
|
@@ -7412,7 +7173,6 @@ const regionLocationMap = {
|
|
|
7412
7173
|
"us-west-2": "Oregon, USA",
|
|
7413
7174
|
"eu-central-2": "Zurich, Switzerland"
|
|
7414
7175
|
};
|
|
7415
|
-
|
|
7416
7176
|
//#endregion
|
|
7417
7177
|
//#region iac/s3.ts
|
|
7418
7178
|
var S3Manager = class {
|
|
@@ -7490,7 +7250,6 @@ var S3Manager = class {
|
|
|
7490
7250
|
p.log.success("S3 bucket policy updated to allow access from CloudFront distribution");
|
|
7491
7251
|
}
|
|
7492
7252
|
};
|
|
7493
|
-
|
|
7494
7253
|
//#endregion
|
|
7495
7254
|
//#region iac/ssm.ts
|
|
7496
7255
|
var SSMKeyPairManager = class {
|
|
@@ -7530,9 +7289,9 @@ var SSMKeyPairManager = class {
|
|
|
7530
7289
|
async getOrCreateKeyPair(parameterName) {
|
|
7531
7290
|
const existing = await this.getParameter(parameterName);
|
|
7532
7291
|
if (existing) {
|
|
7533
|
-
const keyPair
|
|
7292
|
+
const keyPair = JSON.parse(existing);
|
|
7534
7293
|
p.log.info("Using existing CloudFront key pair from SSM Parameter Store");
|
|
7535
|
-
return keyPair
|
|
7294
|
+
return keyPair;
|
|
7536
7295
|
}
|
|
7537
7296
|
const { publicKey, privateKey } = crypto.generateKeyPairSync("rsa", {
|
|
7538
7297
|
modulusLength: 2048,
|
|
@@ -7555,7 +7314,6 @@ var SSMKeyPairManager = class {
|
|
|
7555
7314
|
return keyPair;
|
|
7556
7315
|
}
|
|
7557
7316
|
};
|
|
7558
|
-
|
|
7559
7317
|
//#endregion
|
|
7560
7318
|
//#region iac/templates.ts
|
|
7561
7319
|
const getConfigTemplate = (build, { profile }) => {
|
|
@@ -7611,7 +7369,6 @@ export default HotUpdater.wrap({
|
|
|
7611
7369
|
updateStrategy: "appVersion", // or "fingerprint"
|
|
7612
7370
|
updateMode: "auto",
|
|
7613
7371
|
})(App);`;
|
|
7614
|
-
|
|
7615
7372
|
//#endregion
|
|
7616
7373
|
//#region iac/index.ts
|
|
7617
7374
|
const checkIfAwsCliInstalled = async () => {
|
|
@@ -7793,6 +7550,5 @@ const runInit = async ({ build }) => {
|
|
|
7793
7550
|
p.log.message(`Next step: ${link("https://hot-updater.dev/docs/managed/aws#step-4-changeenv-file-optional")}`);
|
|
7794
7551
|
p.log.success("Done! 🎉");
|
|
7795
7552
|
};
|
|
7796
|
-
|
|
7797
7553
|
//#endregion
|
|
7798
|
-
export { runInit };
|
|
7554
|
+
export { runInit };
|