@hot-updater/supabase 0.28.0 → 0.29.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/edge.cjs +4 -0
- package/dist/edge.d.cts +2 -0
- package/dist/edge.d.mts +2 -0
- package/dist/edge.mjs +2 -0
- package/dist/iac/index.cjs +457 -499
- package/dist/iac/index.d.cts +4 -1
- package/dist/iac/{index.d.ts → index.d.mts} +4 -1
- package/dist/iac/{index.js → index.mjs} +420 -451
- package/dist/index.cjs +15 -109
- package/dist/index.d.cts +5 -4
- package/dist/index.d.mts +23 -0
- package/dist/index.mjs +50 -0
- package/dist/supabaseEdgeFunctionStorage-B-gM2rZx.cjs +192 -0
- package/dist/supabaseEdgeFunctionStorage-ByPGforO.d.mts +19 -0
- package/dist/supabaseEdgeFunctionStorage-CSPi2UB8.d.cts +19 -0
- package/dist/supabaseEdgeFunctionStorage-CVEY5QJO.mjs +174 -0
- package/package.json +22 -10
- package/supabase/edge-functions/index.ts +29 -317
- package/supabase/edge-functions/runtime.docker.integration.spec.ts +779 -0
- package/supabase/migrations/20260401000000_hot-updater_0.29.0.sql +503 -0
- package/dist/index.d.ts +0 -22
- package/dist/index.js +0 -145
package/dist/iac/index.cjs
CHANGED
|
@@ -1,16 +1,15 @@
|
|
|
1
|
-
|
|
1
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
+
//#region \0rolldown/runtime.js
|
|
2
3
|
var __create = Object.create;
|
|
3
4
|
var __defProp = Object.defineProperty;
|
|
4
5
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
6
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
7
|
var __getProtoOf = Object.getPrototypeOf;
|
|
7
8
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
-
var
|
|
9
|
-
return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
|
|
10
|
-
};
|
|
9
|
+
var __commonJSMin = (cb, mod) => () => (mod || cb((mod = { exports: {} }).exports, mod), mod.exports);
|
|
11
10
|
var __copyProps = (to, from, except, desc) => {
|
|
12
|
-
if (from && typeof from === "object" || typeof from === "function") for (var keys = __getOwnPropNames(from), i
|
|
13
|
-
key = keys[i
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") for (var keys = __getOwnPropNames(from), i = 0, n = keys.length, key; i < n; i++) {
|
|
12
|
+
key = keys[i];
|
|
14
13
|
if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
|
|
15
14
|
get: ((k) => from[k]).bind(null, key),
|
|
16
15
|
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
@@ -22,18 +21,13 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
22
21
|
value: mod,
|
|
23
22
|
enumerable: true
|
|
24
23
|
}) : target, mod));
|
|
25
|
-
|
|
26
24
|
//#endregion
|
|
27
|
-
let
|
|
28
|
-
|
|
25
|
+
let node_module = require("node:module");
|
|
26
|
+
let _hot_updater_cli_tools = require("@hot-updater/cli-tools");
|
|
29
27
|
let node_url = require("node:url");
|
|
30
|
-
node_url = __toESM(node_url);
|
|
31
28
|
let node_child_process = require("node:child_process");
|
|
32
|
-
node_child_process = __toESM(node_child_process);
|
|
33
29
|
let node_string_decoder = require("node:string_decoder");
|
|
34
|
-
node_string_decoder = __toESM(node_string_decoder);
|
|
35
30
|
let node_util = require("node:util");
|
|
36
|
-
node_util = __toESM(node_util);
|
|
37
31
|
let node_process = require("node:process");
|
|
38
32
|
node_process = __toESM(node_process);
|
|
39
33
|
let node_tty = require("node:tty");
|
|
@@ -43,26 +37,16 @@ node_path = __toESM(node_path);
|
|
|
43
37
|
let path = require("path");
|
|
44
38
|
path = __toESM(path);
|
|
45
39
|
let node_timers_promises = require("node:timers/promises");
|
|
46
|
-
node_timers_promises = __toESM(node_timers_promises);
|
|
47
40
|
let node_os = require("node:os");
|
|
48
|
-
node_os = __toESM(node_os);
|
|
49
41
|
let node_events = require("node:events");
|
|
50
|
-
node_events = __toESM(node_events);
|
|
51
42
|
let node_v8 = require("node:v8");
|
|
52
|
-
node_v8 = __toESM(node_v8);
|
|
53
43
|
let node_fs = require("node:fs");
|
|
54
|
-
node_fs = __toESM(node_fs);
|
|
55
44
|
let node_stream_promises = require("node:stream/promises");
|
|
56
|
-
node_stream_promises = __toESM(node_stream_promises);
|
|
57
45
|
let node_stream = require("node:stream");
|
|
58
|
-
node_stream = __toESM(node_stream);
|
|
59
46
|
let node_buffer = require("node:buffer");
|
|
60
|
-
node_buffer = __toESM(node_buffer);
|
|
61
47
|
let fs_promises = require("fs/promises");
|
|
62
48
|
fs_promises = __toESM(fs_promises);
|
|
63
|
-
let
|
|
64
|
-
__supabase_supabase_js = __toESM(__supabase_supabase_js);
|
|
65
|
-
|
|
49
|
+
let _supabase_supabase_js = require("@supabase/supabase-js");
|
|
66
50
|
//#region ../../node_modules/.pnpm/es-toolkit@1.32.0/node_modules/es-toolkit/dist/error/AbortError.mjs
|
|
67
51
|
var AbortError = class extends Error {
|
|
68
52
|
constructor(message = "The operation was aborted") {
|
|
@@ -70,7 +54,6 @@ var AbortError = class extends Error {
|
|
|
70
54
|
this.name = "AbortError";
|
|
71
55
|
}
|
|
72
56
|
};
|
|
73
|
-
|
|
74
57
|
//#endregion
|
|
75
58
|
//#region ../../node_modules/.pnpm/es-toolkit@1.32.0/node_modules/es-toolkit/dist/promise/delay.mjs
|
|
76
59
|
function delay(ms, { signal } = {}) {
|
|
@@ -90,7 +73,6 @@ function delay(ms, { signal } = {}) {
|
|
|
90
73
|
signal?.addEventListener("abort", abortHandler, { once: true });
|
|
91
74
|
});
|
|
92
75
|
}
|
|
93
|
-
|
|
94
76
|
//#endregion
|
|
95
77
|
//#region ../../node_modules/.pnpm/is-plain-obj@4.1.0/node_modules/is-plain-obj/index.js
|
|
96
78
|
function isPlainObject(value) {
|
|
@@ -98,7 +80,6 @@ function isPlainObject(value) {
|
|
|
98
80
|
const prototype = Object.getPrototypeOf(value);
|
|
99
81
|
return (prototype === null || prototype === Object.prototype || Object.getPrototypeOf(prototype) === null) && !(Symbol.toStringTag in value) && !(Symbol.iterator in value);
|
|
100
82
|
}
|
|
101
|
-
|
|
102
83
|
//#endregion
|
|
103
84
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/arguments/file-url.js
|
|
104
85
|
const safeNormalizeFileUrl = (file, name) => {
|
|
@@ -109,7 +90,6 @@ const safeNormalizeFileUrl = (file, name) => {
|
|
|
109
90
|
const normalizeDenoExecPath = (file) => isDenoExecPath(file) ? file.toString() : file;
|
|
110
91
|
const isDenoExecPath = (file) => typeof file !== "string" && file && Object.getPrototypeOf(file) === String.prototype;
|
|
111
92
|
const normalizeFileUrl = (file) => file instanceof URL ? (0, node_url.fileURLToPath)(file) : file;
|
|
112
|
-
|
|
113
93
|
//#endregion
|
|
114
94
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/methods/parameters.js
|
|
115
95
|
const normalizeParameters = (rawFile, rawArguments = [], rawOptions = {}) => {
|
|
@@ -127,7 +107,6 @@ const normalizeParameters = (rawFile, rawArguments = [], rawOptions = {}) => {
|
|
|
127
107
|
options
|
|
128
108
|
];
|
|
129
109
|
};
|
|
130
|
-
|
|
131
110
|
//#endregion
|
|
132
111
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/utils/uint-array.js
|
|
133
112
|
const { toString: objectToString$1 } = Object.prototype;
|
|
@@ -167,7 +146,6 @@ const getJoinLength = (uint8Arrays) => {
|
|
|
167
146
|
for (const uint8Array of uint8Arrays) joinLength += uint8Array.length;
|
|
168
147
|
return joinLength;
|
|
169
148
|
};
|
|
170
|
-
|
|
171
149
|
//#endregion
|
|
172
150
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/methods/template.js
|
|
173
151
|
const isTemplateString = (templates) => Array.isArray(templates) && Array.isArray(templates.raw);
|
|
@@ -194,7 +172,7 @@ const parseTemplate = ({ templates, expressions, tokens, index, template }) => {
|
|
|
194
172
|
const newTokens = concatTokens(tokens, nextTokens, leadingWhitespaces);
|
|
195
173
|
if (index === expressions.length) return newTokens;
|
|
196
174
|
const expression = expressions[index];
|
|
197
|
-
return concatTokens(newTokens, Array.isArray(expression) ? expression.map((expression
|
|
175
|
+
return concatTokens(newTokens, Array.isArray(expression) ? expression.map((expression) => parseExpression(expression)) : [parseExpression(expression)], trailingWhitespaces);
|
|
198
176
|
};
|
|
199
177
|
const splitByWhitespaces = (template, rawTemplate) => {
|
|
200
178
|
if (rawTemplate.length === 0) return {
|
|
@@ -256,7 +234,6 @@ const getSubprocessResult = ({ stdout }) => {
|
|
|
256
234
|
if (stdout === void 0) throw new TypeError("Missing result.stdout in template expression. This is probably due to the previous subprocess' \"stdout\" option.");
|
|
257
235
|
throw new TypeError(`Unexpected "${typeof stdout}" stdout in template expression`);
|
|
258
236
|
};
|
|
259
|
-
|
|
260
237
|
//#endregion
|
|
261
238
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/utils/standard-stream.js
|
|
262
239
|
const isStandardStream = (stream) => STANDARD_STREAMS.includes(stream);
|
|
@@ -271,7 +248,6 @@ const STANDARD_STREAMS_ALIASES = [
|
|
|
271
248
|
"stderr"
|
|
272
249
|
];
|
|
273
250
|
const getStreamName = (fdNumber) => STANDARD_STREAMS_ALIASES[fdNumber] ?? `stdio[${fdNumber}]`;
|
|
274
|
-
|
|
275
251
|
//#endregion
|
|
276
252
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/arguments/specific.js
|
|
277
253
|
const normalizeFdSpecificOptions = (options) => {
|
|
@@ -326,7 +302,6 @@ const FD_SPECIFIC_OPTIONS = [
|
|
|
326
302
|
"stripFinalNewline"
|
|
327
303
|
];
|
|
328
304
|
const getFdSpecificValue = (optionArray, fdNumber) => fdNumber === "ipc" ? optionArray.at(-1) : optionArray[fdNumber];
|
|
329
|
-
|
|
330
305
|
//#endregion
|
|
331
306
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/verbose/values.js
|
|
332
307
|
const isVerbose = ({ verbose }, fdNumber) => getFdVerbose(verbose, fdNumber) !== "none";
|
|
@@ -343,7 +318,6 @@ const VERBOSE_VALUES = [
|
|
|
343
318
|
"short",
|
|
344
319
|
"full"
|
|
345
320
|
];
|
|
346
|
-
|
|
347
321
|
//#endregion
|
|
348
322
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/arguments/escape.js
|
|
349
323
|
const joinCommand = (filePath, rawArguments) => {
|
|
@@ -364,7 +338,7 @@ const escapeControlCharacter = (character) => {
|
|
|
364
338
|
};
|
|
365
339
|
const getSpecialCharRegExp = () => {
|
|
366
340
|
try {
|
|
367
|
-
return new RegExp("\\p{Separator}|\\p{Other}", "gu");
|
|
341
|
+
return /* @__PURE__ */ new RegExp("\\p{Separator}|\\p{Other}", "gu");
|
|
368
342
|
} catch {
|
|
369
343
|
return /[\s\u0000-\u001F\u007F-\u009F\u00AD]/g;
|
|
370
344
|
}
|
|
@@ -384,7 +358,6 @@ const quoteString = (escapedArgument) => {
|
|
|
384
358
|
return node_process.platform === "win32" ? `"${escapedArgument.replaceAll("\"", "\"\"")}"` : `'${escapedArgument.replaceAll("'", "'\\''")}'`;
|
|
385
359
|
};
|
|
386
360
|
const NO_ESCAPE_REGEXP = /^[\w./-]+$/;
|
|
387
|
-
|
|
388
361
|
//#endregion
|
|
389
362
|
//#region ../../node_modules/.pnpm/is-unicode-supported@2.1.0/node_modules/is-unicode-supported/index.js
|
|
390
363
|
function isUnicodeSupported() {
|
|
@@ -393,7 +366,6 @@ function isUnicodeSupported() {
|
|
|
393
366
|
if (node_process.default.platform !== "win32") return TERM !== "linux";
|
|
394
367
|
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";
|
|
395
368
|
}
|
|
396
|
-
|
|
397
369
|
//#endregion
|
|
398
370
|
//#region ../../node_modules/.pnpm/figures@6.1.0/node_modules/figures/index.js
|
|
399
371
|
const common = {
|
|
@@ -672,11 +644,8 @@ const fallbackSymbols = {
|
|
|
672
644
|
...common,
|
|
673
645
|
...specialFallbackSymbols
|
|
674
646
|
};
|
|
675
|
-
const
|
|
676
|
-
|
|
677
|
-
var figures_default = figures;
|
|
678
|
-
const replacements = Object.entries(specialMainSymbols);
|
|
679
|
-
|
|
647
|
+
const figures = isUnicodeSupported() ? mainSymbols : fallbackSymbols;
|
|
648
|
+
Object.entries(specialMainSymbols);
|
|
680
649
|
//#endregion
|
|
681
650
|
//#region ../../node_modules/.pnpm/yoctocolors@2.1.1/node_modules/yoctocolors/base.js
|
|
682
651
|
const hasColors = node_tty.default?.WriteStream?.prototype?.hasColors?.() ?? false;
|
|
@@ -699,48 +668,47 @@ const format = (open, close) => {
|
|
|
699
668
|
return result;
|
|
700
669
|
};
|
|
701
670
|
};
|
|
702
|
-
|
|
671
|
+
format(0, 0);
|
|
703
672
|
const bold = format(1, 22);
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
673
|
+
format(2, 22);
|
|
674
|
+
format(3, 23);
|
|
675
|
+
format(4, 24);
|
|
676
|
+
format(53, 55);
|
|
677
|
+
format(7, 27);
|
|
678
|
+
format(8, 28);
|
|
679
|
+
format(9, 29);
|
|
680
|
+
format(30, 39);
|
|
681
|
+
format(31, 39);
|
|
682
|
+
format(32, 39);
|
|
683
|
+
format(33, 39);
|
|
684
|
+
format(34, 39);
|
|
685
|
+
format(35, 39);
|
|
686
|
+
format(36, 39);
|
|
687
|
+
format(37, 39);
|
|
719
688
|
const gray = format(90, 39);
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
|
|
689
|
+
format(40, 49);
|
|
690
|
+
format(41, 49);
|
|
691
|
+
format(42, 49);
|
|
692
|
+
format(43, 49);
|
|
693
|
+
format(44, 49);
|
|
694
|
+
format(45, 49);
|
|
695
|
+
format(46, 49);
|
|
696
|
+
format(47, 49);
|
|
697
|
+
format(100, 49);
|
|
729
698
|
const redBright = format(91, 39);
|
|
730
|
-
|
|
699
|
+
format(92, 39);
|
|
731
700
|
const yellowBright = format(93, 39);
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
|
|
701
|
+
format(94, 39);
|
|
702
|
+
format(95, 39);
|
|
703
|
+
format(96, 39);
|
|
704
|
+
format(97, 39);
|
|
705
|
+
format(101, 49);
|
|
706
|
+
format(102, 49);
|
|
707
|
+
format(103, 49);
|
|
708
|
+
format(104, 49);
|
|
709
|
+
format(105, 49);
|
|
710
|
+
format(106, 49);
|
|
711
|
+
format(107, 49);
|
|
744
712
|
//#endregion
|
|
745
713
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/verbose/default.js
|
|
746
714
|
const defaultVerboseFunction = ({ type, message, timestamp, piped, commandId, result: { failed = false } = {}, options: { reject = true } }) => {
|
|
@@ -756,8 +724,8 @@ const defaultVerboseFunction = ({ type, message, timestamp, piped, commandId, re
|
|
|
756
724
|
const serializeTimestamp = (timestamp) => `${padField(timestamp.getHours(), 2)}:${padField(timestamp.getMinutes(), 2)}:${padField(timestamp.getSeconds(), 2)}.${padField(timestamp.getMilliseconds(), 3)}`;
|
|
757
725
|
const padField = (field, padding) => String(field).padStart(padding, "0");
|
|
758
726
|
const getFinalIcon = ({ failed, reject }) => {
|
|
759
|
-
if (!failed) return
|
|
760
|
-
return reject ?
|
|
727
|
+
if (!failed) return figures.tick;
|
|
728
|
+
return reject ? figures.cross : figures.warning;
|
|
761
729
|
};
|
|
762
730
|
const ICONS = {
|
|
763
731
|
command: ({ piped }) => piped ? "|" : "$",
|
|
@@ -774,7 +742,6 @@ const COLORS = {
|
|
|
774
742
|
error: ({ reject }) => reject ? redBright : yellowBright,
|
|
775
743
|
duration: () => gray
|
|
776
744
|
};
|
|
777
|
-
|
|
778
745
|
//#endregion
|
|
779
746
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/verbose/custom.js
|
|
780
747
|
const applyVerboseOnLines = (printedLines, verboseInfo, fdNumber) => {
|
|
@@ -787,7 +754,6 @@ const applyVerboseFunction = (verboseLine, verboseObject, verboseFunction) => {
|
|
|
787
754
|
if (typeof printedLine === "string") return printedLine;
|
|
788
755
|
};
|
|
789
756
|
const appendNewline = (printedLine) => printedLine.endsWith("\n") ? printedLine : `${printedLine}\n`;
|
|
790
|
-
|
|
791
757
|
//#endregion
|
|
792
758
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/verbose/log.js
|
|
793
759
|
const verboseLog = ({ type, verboseMessage, fdNumber, verboseInfo, result }) => {
|
|
@@ -798,7 +764,7 @@ const verboseLog = ({ type, verboseMessage, fdNumber, verboseInfo, result }) =>
|
|
|
798
764
|
})), verboseInfo, fdNumber);
|
|
799
765
|
if (finalLines !== "") console.warn(finalLines.slice(0, -1));
|
|
800
766
|
};
|
|
801
|
-
const getVerboseObject = ({ type, result, verboseInfo: { escapedCommand, commandId, rawOptions: { piped = false
|
|
767
|
+
const getVerboseObject = ({ type, result, verboseInfo: { escapedCommand, commandId, rawOptions: { piped = false, ...options } } }) => ({
|
|
802
768
|
type,
|
|
803
769
|
escapedCommand,
|
|
804
770
|
commandId: `${commandId}`,
|
|
@@ -821,7 +787,6 @@ const serializeVerboseMessage = (message) => {
|
|
|
821
787
|
return escapeLines(typeof message === "string" ? message : (0, node_util.inspect)(message)).replaceAll(" ", " ".repeat(TAB_SIZE));
|
|
822
788
|
};
|
|
823
789
|
const TAB_SIZE = 2;
|
|
824
|
-
|
|
825
790
|
//#endregion
|
|
826
791
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/verbose/start.js
|
|
827
792
|
const logCommand = (escapedCommand, verboseInfo) => {
|
|
@@ -832,7 +797,6 @@ const logCommand = (escapedCommand, verboseInfo) => {
|
|
|
832
797
|
verboseInfo
|
|
833
798
|
});
|
|
834
799
|
};
|
|
835
|
-
|
|
836
800
|
//#endregion
|
|
837
801
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/verbose/info.js
|
|
838
802
|
const getVerboseInfo = (verbose, escapedCommand, rawOptions) => {
|
|
@@ -856,12 +820,10 @@ const validateVerbose = (verbose) => {
|
|
|
856
820
|
}
|
|
857
821
|
}
|
|
858
822
|
};
|
|
859
|
-
|
|
860
823
|
//#endregion
|
|
861
824
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/return/duration.js
|
|
862
825
|
const getStartTime = () => node_process.hrtime.bigint();
|
|
863
826
|
const getDurationMs = (startTime) => Number(node_process.hrtime.bigint() - startTime) / 1e6;
|
|
864
|
-
|
|
865
827
|
//#endregion
|
|
866
828
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/arguments/command.js
|
|
867
829
|
const handleCommand = (filePath, rawArguments, rawOptions) => {
|
|
@@ -876,51 +838,49 @@ const handleCommand = (filePath, rawArguments, rawOptions) => {
|
|
|
876
838
|
verboseInfo
|
|
877
839
|
};
|
|
878
840
|
};
|
|
879
|
-
|
|
880
841
|
//#endregion
|
|
881
842
|
//#region ../../node_modules/.pnpm/isexe@2.0.0/node_modules/isexe/windows.js
|
|
882
|
-
var require_windows = /* @__PURE__ */
|
|
883
|
-
module.exports = isexe
|
|
884
|
-
isexe
|
|
843
|
+
var require_windows = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
844
|
+
module.exports = isexe;
|
|
845
|
+
isexe.sync = sync;
|
|
885
846
|
var fs$3 = require("fs");
|
|
886
|
-
function checkPathExt(path
|
|
847
|
+
function checkPathExt(path, options) {
|
|
887
848
|
var pathext = options.pathExt !== void 0 ? options.pathExt : process.env.PATHEXT;
|
|
888
849
|
if (!pathext) return true;
|
|
889
850
|
pathext = pathext.split(";");
|
|
890
851
|
if (pathext.indexOf("") !== -1) return true;
|
|
891
|
-
for (var i
|
|
892
|
-
var p
|
|
893
|
-
if (p
|
|
852
|
+
for (var i = 0; i < pathext.length; i++) {
|
|
853
|
+
var p = pathext[i].toLowerCase();
|
|
854
|
+
if (p && path.substr(-p.length).toLowerCase() === p) return true;
|
|
894
855
|
}
|
|
895
856
|
return false;
|
|
896
857
|
}
|
|
897
|
-
function checkStat
|
|
858
|
+
function checkStat(stat, path, options) {
|
|
898
859
|
if (!stat.isSymbolicLink() && !stat.isFile()) return false;
|
|
899
|
-
return checkPathExt(path
|
|
860
|
+
return checkPathExt(path, options);
|
|
900
861
|
}
|
|
901
|
-
function isexe
|
|
902
|
-
fs$3.stat(path
|
|
903
|
-
cb(er, er ? false : checkStat
|
|
862
|
+
function isexe(path, options, cb) {
|
|
863
|
+
fs$3.stat(path, function(er, stat) {
|
|
864
|
+
cb(er, er ? false : checkStat(stat, path, options));
|
|
904
865
|
});
|
|
905
866
|
}
|
|
906
|
-
function sync
|
|
907
|
-
return checkStat
|
|
867
|
+
function sync(path, options) {
|
|
868
|
+
return checkStat(fs$3.statSync(path), path, options);
|
|
908
869
|
}
|
|
909
|
-
})
|
|
910
|
-
|
|
870
|
+
}));
|
|
911
871
|
//#endregion
|
|
912
872
|
//#region ../../node_modules/.pnpm/isexe@2.0.0/node_modules/isexe/mode.js
|
|
913
|
-
var require_mode = /* @__PURE__ */
|
|
914
|
-
module.exports = isexe
|
|
915
|
-
isexe
|
|
873
|
+
var require_mode = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
874
|
+
module.exports = isexe;
|
|
875
|
+
isexe.sync = sync;
|
|
916
876
|
var fs$2 = require("fs");
|
|
917
|
-
function isexe
|
|
918
|
-
fs$2.stat(path
|
|
877
|
+
function isexe(path, options, cb) {
|
|
878
|
+
fs$2.stat(path, function(er, stat) {
|
|
919
879
|
cb(er, er ? false : checkStat(stat, options));
|
|
920
880
|
});
|
|
921
881
|
}
|
|
922
|
-
function sync
|
|
923
|
-
return checkStat(fs$2.statSync(path
|
|
882
|
+
function sync(path, options) {
|
|
883
|
+
return checkStat(fs$2.statSync(path), options);
|
|
924
884
|
}
|
|
925
885
|
function checkStat(stat, options) {
|
|
926
886
|
return stat.isFile() && checkMode(stat, options);
|
|
@@ -931,24 +891,23 @@ var require_mode = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/isexe@
|
|
|
931
891
|
var gid = stat.gid;
|
|
932
892
|
var myUid = options.uid !== void 0 ? options.uid : process.getuid && process.getuid();
|
|
933
893
|
var myGid = options.gid !== void 0 ? options.gid : process.getgid && process.getgid();
|
|
934
|
-
var u
|
|
894
|
+
var u = parseInt("100", 8);
|
|
935
895
|
var g = parseInt("010", 8);
|
|
936
|
-
var o
|
|
937
|
-
var ug = u
|
|
938
|
-
return mod & o
|
|
896
|
+
var o = parseInt("001", 8);
|
|
897
|
+
var ug = u | g;
|
|
898
|
+
return mod & o || mod & g && gid === myGid || mod & u && uid === myUid || mod & ug && myUid === 0;
|
|
939
899
|
}
|
|
940
|
-
})
|
|
941
|
-
|
|
900
|
+
}));
|
|
942
901
|
//#endregion
|
|
943
902
|
//#region ../../node_modules/.pnpm/isexe@2.0.0/node_modules/isexe/index.js
|
|
944
|
-
var require_isexe = /* @__PURE__ */
|
|
903
|
+
var require_isexe = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
945
904
|
require("fs");
|
|
946
905
|
var core;
|
|
947
906
|
if (process.platform === "win32" || global.TESTING_WINDOWS) core = require_windows();
|
|
948
907
|
else core = require_mode();
|
|
949
|
-
module.exports = isexe
|
|
950
|
-
isexe
|
|
951
|
-
function isexe
|
|
908
|
+
module.exports = isexe;
|
|
909
|
+
isexe.sync = sync;
|
|
910
|
+
function isexe(path, options, cb) {
|
|
952
911
|
if (typeof options === "function") {
|
|
953
912
|
cb = options;
|
|
954
913
|
options = {};
|
|
@@ -956,13 +915,13 @@ var require_isexe = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/isexe
|
|
|
956
915
|
if (!cb) {
|
|
957
916
|
if (typeof Promise !== "function") throw new TypeError("callback not provided");
|
|
958
917
|
return new Promise(function(resolve, reject) {
|
|
959
|
-
isexe
|
|
918
|
+
isexe(path, options || {}, function(er, is) {
|
|
960
919
|
if (er) reject(er);
|
|
961
920
|
else resolve(is);
|
|
962
921
|
});
|
|
963
922
|
});
|
|
964
923
|
}
|
|
965
|
-
core(path
|
|
924
|
+
core(path, options || {}, function(er, is) {
|
|
966
925
|
if (er) {
|
|
967
926
|
if (er.code === "EACCES" || options && options.ignoreErrors) {
|
|
968
927
|
er = null;
|
|
@@ -972,19 +931,18 @@ var require_isexe = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/isexe
|
|
|
972
931
|
cb(er, is);
|
|
973
932
|
});
|
|
974
933
|
}
|
|
975
|
-
function sync(path
|
|
934
|
+
function sync(path, options) {
|
|
976
935
|
try {
|
|
977
|
-
return core.sync(path
|
|
936
|
+
return core.sync(path, options || {});
|
|
978
937
|
} catch (er) {
|
|
979
938
|
if (options && options.ignoreErrors || er.code === "EACCES") return false;
|
|
980
939
|
else throw er;
|
|
981
940
|
}
|
|
982
941
|
}
|
|
983
|
-
})
|
|
984
|
-
|
|
942
|
+
}));
|
|
985
943
|
//#endregion
|
|
986
944
|
//#region ../../node_modules/.pnpm/which@2.0.2/node_modules/which/which.js
|
|
987
|
-
var require_which = /* @__PURE__ */
|
|
945
|
+
var require_which = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
988
946
|
const isWindows = process.platform === "win32" || process.env.OSTYPE === "cygwin" || process.env.OSTYPE === "msys";
|
|
989
947
|
const path$9 = require("path");
|
|
990
948
|
const COLON = isWindows ? ";" : ":";
|
|
@@ -1004,7 +962,7 @@ var require_which = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/which
|
|
|
1004
962
|
pathExtExe
|
|
1005
963
|
};
|
|
1006
964
|
};
|
|
1007
|
-
const which
|
|
965
|
+
const which = (cmd, opt, cb) => {
|
|
1008
966
|
if (typeof opt === "function") {
|
|
1009
967
|
cb = opt;
|
|
1010
968
|
opt = {};
|
|
@@ -1012,20 +970,20 @@ var require_which = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/which
|
|
|
1012
970
|
if (!opt) opt = {};
|
|
1013
971
|
const { pathEnv, pathExt, pathExtExe } = getPathInfo(cmd, opt);
|
|
1014
972
|
const found = [];
|
|
1015
|
-
const step = (i
|
|
1016
|
-
if (i
|
|
1017
|
-
const ppRaw = pathEnv[i
|
|
973
|
+
const step = (i) => new Promise((resolve, reject) => {
|
|
974
|
+
if (i === pathEnv.length) return opt.all && found.length ? resolve(found) : reject(getNotFoundError(cmd));
|
|
975
|
+
const ppRaw = pathEnv[i];
|
|
1018
976
|
const pathPart = /^".*"$/.test(ppRaw) ? ppRaw.slice(1, -1) : ppRaw;
|
|
1019
977
|
const pCmd = path$9.join(pathPart, cmd);
|
|
1020
|
-
resolve(subStep(!pathPart && /^\.[\\\/]/.test(cmd) ? cmd.slice(0, 2) + pCmd : pCmd, i
|
|
978
|
+
resolve(subStep(!pathPart && /^\.[\\\/]/.test(cmd) ? cmd.slice(0, 2) + pCmd : pCmd, i, 0));
|
|
1021
979
|
});
|
|
1022
|
-
const subStep = (p
|
|
1023
|
-
if (ii === pathExt.length) return resolve(step(i
|
|
980
|
+
const subStep = (p, i, ii) => new Promise((resolve, reject) => {
|
|
981
|
+
if (ii === pathExt.length) return resolve(step(i + 1));
|
|
1024
982
|
const ext = pathExt[ii];
|
|
1025
|
-
isexe(p
|
|
1026
|
-
if (!er && is) if (opt.all) found.push(p
|
|
1027
|
-
else return resolve(p
|
|
1028
|
-
return resolve(subStep(p
|
|
983
|
+
isexe(p + ext, { pathExt: pathExtExe }, (er, is) => {
|
|
984
|
+
if (!er && is) if (opt.all) found.push(p + ext);
|
|
985
|
+
else return resolve(p + ext);
|
|
986
|
+
return resolve(subStep(p, i, ii + 1));
|
|
1029
987
|
});
|
|
1030
988
|
});
|
|
1031
989
|
return cb ? step(0).then((res) => cb(null, res), cb) : step(0);
|
|
@@ -1034,13 +992,13 @@ var require_which = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/which
|
|
|
1034
992
|
opt = opt || {};
|
|
1035
993
|
const { pathEnv, pathExt, pathExtExe } = getPathInfo(cmd, opt);
|
|
1036
994
|
const found = [];
|
|
1037
|
-
for (let i
|
|
1038
|
-
const ppRaw = pathEnv[i
|
|
995
|
+
for (let i = 0; i < pathEnv.length; i++) {
|
|
996
|
+
const ppRaw = pathEnv[i];
|
|
1039
997
|
const pathPart = /^".*"$/.test(ppRaw) ? ppRaw.slice(1, -1) : ppRaw;
|
|
1040
998
|
const pCmd = path$9.join(pathPart, cmd);
|
|
1041
|
-
const p
|
|
999
|
+
const p = !pathPart && /^\.[\\\/]/.test(cmd) ? cmd.slice(0, 2) + pCmd : pCmd;
|
|
1042
1000
|
for (let j = 0; j < pathExt.length; j++) {
|
|
1043
|
-
const cur = p
|
|
1001
|
+
const cur = p + pathExt[j];
|
|
1044
1002
|
try {
|
|
1045
1003
|
if (isexe.sync(cur, { pathExt: pathExtExe })) if (opt.all) found.push(cur);
|
|
1046
1004
|
else return cur;
|
|
@@ -1051,25 +1009,23 @@ var require_which = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/which
|
|
|
1051
1009
|
if (opt.nothrow) return null;
|
|
1052
1010
|
throw getNotFoundError(cmd);
|
|
1053
1011
|
};
|
|
1054
|
-
module.exports = which
|
|
1055
|
-
which
|
|
1056
|
-
})
|
|
1057
|
-
|
|
1012
|
+
module.exports = which;
|
|
1013
|
+
which.sync = whichSync;
|
|
1014
|
+
}));
|
|
1058
1015
|
//#endregion
|
|
1059
1016
|
//#region ../../node_modules/.pnpm/path-key@3.1.1/node_modules/path-key/index.js
|
|
1060
|
-
var require_path_key = /* @__PURE__ */
|
|
1061
|
-
const pathKey
|
|
1017
|
+
var require_path_key = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
1018
|
+
const pathKey = (options = {}) => {
|
|
1062
1019
|
const environment = options.env || process.env;
|
|
1063
1020
|
if ((options.platform || process.platform) !== "win32") return "PATH";
|
|
1064
1021
|
return Object.keys(environment).reverse().find((key) => key.toUpperCase() === "PATH") || "Path";
|
|
1065
1022
|
};
|
|
1066
|
-
module.exports = pathKey
|
|
1067
|
-
module.exports.default = pathKey
|
|
1068
|
-
})
|
|
1069
|
-
|
|
1023
|
+
module.exports = pathKey;
|
|
1024
|
+
module.exports.default = pathKey;
|
|
1025
|
+
}));
|
|
1070
1026
|
//#endregion
|
|
1071
1027
|
//#region ../../node_modules/.pnpm/cross-spawn@7.0.6/node_modules/cross-spawn/lib/util/resolveCommand.js
|
|
1072
|
-
var require_resolveCommand = /* @__PURE__ */
|
|
1028
|
+
var require_resolveCommand = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
1073
1029
|
const path$8 = require("path");
|
|
1074
1030
|
const which = require_which();
|
|
1075
1031
|
const getPathKey = require_path_key();
|
|
@@ -1093,15 +1049,14 @@ var require_resolveCommand = /* @__PURE__ */ __commonJS({ "../../node_modules/.p
|
|
|
1093
1049
|
if (resolved) resolved = path$8.resolve(hasCustomCwd ? parsed.options.cwd : "", resolved);
|
|
1094
1050
|
return resolved;
|
|
1095
1051
|
}
|
|
1096
|
-
function resolveCommand
|
|
1052
|
+
function resolveCommand(parsed) {
|
|
1097
1053
|
return resolveCommandAttempt(parsed) || resolveCommandAttempt(parsed, true);
|
|
1098
1054
|
}
|
|
1099
|
-
module.exports = resolveCommand
|
|
1100
|
-
})
|
|
1101
|
-
|
|
1055
|
+
module.exports = resolveCommand;
|
|
1056
|
+
}));
|
|
1102
1057
|
//#endregion
|
|
1103
1058
|
//#region ../../node_modules/.pnpm/cross-spawn@7.0.6/node_modules/cross-spawn/lib/util/escape.js
|
|
1104
|
-
var require_escape = /* @__PURE__ */
|
|
1059
|
+
var require_escape = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
1105
1060
|
const metaCharsRegExp = /([()\][%!^"`<>&|;, *?])/g;
|
|
1106
1061
|
function escapeCommand(arg) {
|
|
1107
1062
|
arg = arg.replace(metaCharsRegExp, "^$1");
|
|
@@ -1118,34 +1073,31 @@ var require_escape = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/cros
|
|
|
1118
1073
|
}
|
|
1119
1074
|
module.exports.command = escapeCommand;
|
|
1120
1075
|
module.exports.argument = escapeArgument;
|
|
1121
|
-
})
|
|
1122
|
-
|
|
1076
|
+
}));
|
|
1123
1077
|
//#endregion
|
|
1124
1078
|
//#region ../../node_modules/.pnpm/shebang-regex@3.0.0/node_modules/shebang-regex/index.js
|
|
1125
|
-
var require_shebang_regex = /* @__PURE__ */
|
|
1079
|
+
var require_shebang_regex = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
1126
1080
|
module.exports = /^#!(.*)/;
|
|
1127
|
-
})
|
|
1128
|
-
|
|
1081
|
+
}));
|
|
1129
1082
|
//#endregion
|
|
1130
1083
|
//#region ../../node_modules/.pnpm/shebang-command@2.0.0/node_modules/shebang-command/index.js
|
|
1131
|
-
var require_shebang_command = /* @__PURE__ */
|
|
1084
|
+
var require_shebang_command = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
1132
1085
|
const shebangRegex = require_shebang_regex();
|
|
1133
1086
|
module.exports = (string = "") => {
|
|
1134
1087
|
const match = string.match(shebangRegex);
|
|
1135
1088
|
if (!match) return null;
|
|
1136
|
-
const [path
|
|
1137
|
-
const binary = path
|
|
1089
|
+
const [path, argument] = match[0].replace(/#! ?/, "").split(" ");
|
|
1090
|
+
const binary = path.split("/").pop();
|
|
1138
1091
|
if (binary === "env") return argument;
|
|
1139
1092
|
return argument ? `${binary} ${argument}` : binary;
|
|
1140
1093
|
};
|
|
1141
|
-
})
|
|
1142
|
-
|
|
1094
|
+
}));
|
|
1143
1095
|
//#endregion
|
|
1144
1096
|
//#region ../../node_modules/.pnpm/cross-spawn@7.0.6/node_modules/cross-spawn/lib/util/readShebang.js
|
|
1145
|
-
var require_readShebang = /* @__PURE__ */
|
|
1097
|
+
var require_readShebang = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
1146
1098
|
const fs$1 = require("fs");
|
|
1147
1099
|
const shebangCommand = require_shebang_command();
|
|
1148
|
-
function readShebang
|
|
1100
|
+
function readShebang(command) {
|
|
1149
1101
|
const size = 150;
|
|
1150
1102
|
const buffer = Buffer.alloc(size);
|
|
1151
1103
|
let fd;
|
|
@@ -1156,17 +1108,16 @@ var require_readShebang = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm
|
|
|
1156
1108
|
} catch (e) {}
|
|
1157
1109
|
return shebangCommand(buffer.toString());
|
|
1158
1110
|
}
|
|
1159
|
-
module.exports = readShebang
|
|
1160
|
-
})
|
|
1161
|
-
|
|
1111
|
+
module.exports = readShebang;
|
|
1112
|
+
}));
|
|
1162
1113
|
//#endregion
|
|
1163
1114
|
//#region ../../node_modules/.pnpm/cross-spawn@7.0.6/node_modules/cross-spawn/lib/parse.js
|
|
1164
|
-
var require_parse = /* @__PURE__ */
|
|
1115
|
+
var require_parse = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
1165
1116
|
const path$7 = require("path");
|
|
1166
1117
|
const resolveCommand = require_resolveCommand();
|
|
1167
1118
|
const escape = require_escape();
|
|
1168
1119
|
const readShebang = require_readShebang();
|
|
1169
|
-
const isWin
|
|
1120
|
+
const isWin = process.platform === "win32";
|
|
1170
1121
|
const isExecutableRegExp = /\.(?:com|exe)$/i;
|
|
1171
1122
|
const isCmdShimRegExp = /node_modules[\\/].bin[\\/][^\\/]+\.cmd$/i;
|
|
1172
1123
|
function detectShebang(parsed) {
|
|
@@ -1180,7 +1131,7 @@ var require_parse = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/cross
|
|
|
1180
1131
|
return parsed.file;
|
|
1181
1132
|
}
|
|
1182
1133
|
function parseNonShell(parsed) {
|
|
1183
|
-
if (!isWin
|
|
1134
|
+
if (!isWin) return parsed;
|
|
1184
1135
|
const commandFile = detectShebang(parsed);
|
|
1185
1136
|
const needsShell = !isExecutableRegExp.test(commandFile);
|
|
1186
1137
|
if (parsed.options.forceShell || needsShell) {
|
|
@@ -1199,7 +1150,7 @@ var require_parse = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/cross
|
|
|
1199
1150
|
}
|
|
1200
1151
|
return parsed;
|
|
1201
1152
|
}
|
|
1202
|
-
function parse
|
|
1153
|
+
function parse(command, args, options) {
|
|
1203
1154
|
if (args && !Array.isArray(args)) {
|
|
1204
1155
|
options = args;
|
|
1205
1156
|
args = null;
|
|
@@ -1218,12 +1169,11 @@ var require_parse = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/cross
|
|
|
1218
1169
|
};
|
|
1219
1170
|
return options.shell ? parsed : parseNonShell(parsed);
|
|
1220
1171
|
}
|
|
1221
|
-
module.exports = parse
|
|
1222
|
-
})
|
|
1223
|
-
|
|
1172
|
+
module.exports = parse;
|
|
1173
|
+
}));
|
|
1224
1174
|
//#endregion
|
|
1225
1175
|
//#region ../../node_modules/.pnpm/cross-spawn@7.0.6/node_modules/cross-spawn/lib/enoent.js
|
|
1226
|
-
var require_enoent = /* @__PURE__ */
|
|
1176
|
+
var require_enoent = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
1227
1177
|
const isWin = process.platform === "win32";
|
|
1228
1178
|
function notFoundError(original, syscall) {
|
|
1229
1179
|
return Object.assign(/* @__PURE__ */ new Error(`${syscall} ${original.command} ENOENT`), {
|
|
@@ -1234,15 +1184,15 @@ var require_enoent = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/cros
|
|
|
1234
1184
|
spawnargs: original.args
|
|
1235
1185
|
});
|
|
1236
1186
|
}
|
|
1237
|
-
function hookChildProcess(cp
|
|
1187
|
+
function hookChildProcess(cp, parsed) {
|
|
1238
1188
|
if (!isWin) return;
|
|
1239
|
-
const originalEmit = cp
|
|
1240
|
-
cp
|
|
1189
|
+
const originalEmit = cp.emit;
|
|
1190
|
+
cp.emit = function(name, arg1) {
|
|
1241
1191
|
if (name === "exit") {
|
|
1242
1192
|
const err = verifyENOENT(arg1, parsed);
|
|
1243
|
-
if (err) return originalEmit.call(cp
|
|
1193
|
+
if (err) return originalEmit.call(cp, "error", err);
|
|
1244
1194
|
}
|
|
1245
|
-
return originalEmit.apply(cp
|
|
1195
|
+
return originalEmit.apply(cp, arguments);
|
|
1246
1196
|
};
|
|
1247
1197
|
}
|
|
1248
1198
|
function verifyENOENT(status, parsed) {
|
|
@@ -1259,45 +1209,37 @@ var require_enoent = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/cros
|
|
|
1259
1209
|
verifyENOENTSync,
|
|
1260
1210
|
notFoundError
|
|
1261
1211
|
};
|
|
1262
|
-
})
|
|
1263
|
-
|
|
1212
|
+
}));
|
|
1264
1213
|
//#endregion
|
|
1265
|
-
//#region ../../node_modules/.pnpm/
|
|
1266
|
-
var
|
|
1214
|
+
//#region ../../node_modules/.pnpm/path-key@4.0.0/node_modules/path-key/index.js
|
|
1215
|
+
var import_cross_spawn = /* @__PURE__ */ __toESM((/* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
1267
1216
|
const cp = require("child_process");
|
|
1268
1217
|
const parse = require_parse();
|
|
1269
1218
|
const enoent = require_enoent();
|
|
1270
|
-
function spawn
|
|
1219
|
+
function spawn(command, args, options) {
|
|
1271
1220
|
const parsed = parse(command, args, options);
|
|
1272
1221
|
const spawned = cp.spawn(parsed.command, parsed.args, parsed.options);
|
|
1273
1222
|
enoent.hookChildProcess(spawned, parsed);
|
|
1274
1223
|
return spawned;
|
|
1275
1224
|
}
|
|
1276
|
-
function spawnSync
|
|
1225
|
+
function spawnSync(command, args, options) {
|
|
1277
1226
|
const parsed = parse(command, args, options);
|
|
1278
1227
|
const result = cp.spawnSync(parsed.command, parsed.args, parsed.options);
|
|
1279
1228
|
result.error = result.error || enoent.verifyENOENTSync(result.status, parsed);
|
|
1280
1229
|
return result;
|
|
1281
1230
|
}
|
|
1282
|
-
module.exports = spawn
|
|
1283
|
-
module.exports.spawn = spawn
|
|
1284
|
-
module.exports.sync = spawnSync
|
|
1231
|
+
module.exports = spawn;
|
|
1232
|
+
module.exports.spawn = spawn;
|
|
1233
|
+
module.exports.sync = spawnSync;
|
|
1285
1234
|
module.exports._parse = parse;
|
|
1286
1235
|
module.exports._enoent = enoent;
|
|
1287
|
-
})
|
|
1288
|
-
|
|
1289
|
-
//#endregion
|
|
1290
|
-
//#region ../../node_modules/.pnpm/path-key@4.0.0/node_modules/path-key/index.js
|
|
1291
|
-
var import_cross_spawn = /* @__PURE__ */ __toESM(require_cross_spawn(), 1);
|
|
1236
|
+
})))(), 1);
|
|
1292
1237
|
function pathKey(options = {}) {
|
|
1293
|
-
const { env = process.env, platform
|
|
1294
|
-
if (platform
|
|
1238
|
+
const { env = process.env, platform = process.platform } = options;
|
|
1239
|
+
if (platform !== "win32") return "PATH";
|
|
1295
1240
|
return Object.keys(env).reverse().find((key) => key.toUpperCase() === "PATH") || "Path";
|
|
1296
1241
|
}
|
|
1297
|
-
|
|
1298
|
-
//#endregion
|
|
1299
|
-
//#region ../../node_modules/.pnpm/unicorn-magic@0.3.0/node_modules/unicorn-magic/node.js
|
|
1300
|
-
const execFileOriginal = (0, node_util.promisify)(node_child_process.execFile);
|
|
1242
|
+
(0, node_util.promisify)(node_child_process.execFile);
|
|
1301
1243
|
function toPath(urlOrPath) {
|
|
1302
1244
|
return urlOrPath instanceof URL ? (0, node_url.fileURLToPath)(urlOrPath) : urlOrPath;
|
|
1303
1245
|
}
|
|
@@ -1312,16 +1254,14 @@ function traversePathUp(startPath) {
|
|
|
1312
1254
|
}
|
|
1313
1255
|
} };
|
|
1314
1256
|
}
|
|
1315
|
-
const TEN_MEGABYTES_IN_BYTES = 10 * 1024 * 1024;
|
|
1316
|
-
|
|
1317
1257
|
//#endregion
|
|
1318
1258
|
//#region ../../node_modules/.pnpm/npm-run-path@6.0.0/node_modules/npm-run-path/index.js
|
|
1319
|
-
const npmRunPath = ({ cwd = node_process.default.cwd(), path: pathOption = node_process.default.env[pathKey()], preferLocal = true, execPath
|
|
1259
|
+
const npmRunPath = ({ cwd = node_process.default.cwd(), path: pathOption = node_process.default.env[pathKey()], preferLocal = true, execPath = node_process.default.execPath, addExecPath = true } = {}) => {
|
|
1320
1260
|
const cwdPath = node_path.default.resolve(toPath(cwd));
|
|
1321
1261
|
const result = [];
|
|
1322
1262
|
const pathParts = pathOption.split(node_path.default.delimiter);
|
|
1323
1263
|
if (preferLocal) applyPreferLocal(result, pathParts, cwdPath);
|
|
1324
|
-
if (addExecPath) applyExecPath(result, pathParts, execPath
|
|
1264
|
+
if (addExecPath) applyExecPath(result, pathParts, execPath, cwdPath);
|
|
1325
1265
|
return pathOption === "" || pathOption === node_path.default.delimiter ? `${result.join(node_path.default.delimiter)}${pathOption}` : [...result, pathOption].join(node_path.default.delimiter);
|
|
1326
1266
|
};
|
|
1327
1267
|
const applyPreferLocal = (result, pathParts, cwdPath) => {
|
|
@@ -1330,18 +1270,17 @@ const applyPreferLocal = (result, pathParts, cwdPath) => {
|
|
|
1330
1270
|
if (!pathParts.includes(pathPart)) result.push(pathPart);
|
|
1331
1271
|
}
|
|
1332
1272
|
};
|
|
1333
|
-
const applyExecPath = (result, pathParts, execPath
|
|
1334
|
-
const pathPart = node_path.default.resolve(cwdPath, toPath(execPath
|
|
1273
|
+
const applyExecPath = (result, pathParts, execPath, cwdPath) => {
|
|
1274
|
+
const pathPart = node_path.default.resolve(cwdPath, toPath(execPath), "..");
|
|
1335
1275
|
if (!pathParts.includes(pathPart)) result.push(pathPart);
|
|
1336
1276
|
};
|
|
1337
|
-
const npmRunPathEnv = ({ env = node_process.default.env
|
|
1277
|
+
const npmRunPathEnv = ({ env = node_process.default.env, ...options } = {}) => {
|
|
1338
1278
|
env = { ...env };
|
|
1339
1279
|
const pathName = pathKey({ env });
|
|
1340
1280
|
options.path = env[pathName];
|
|
1341
1281
|
env[pathName] = npmRunPath(options);
|
|
1342
1282
|
return env;
|
|
1343
1283
|
};
|
|
1344
|
-
|
|
1345
1284
|
//#endregion
|
|
1346
1285
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/return/final-error.js
|
|
1347
1286
|
const getFinalError = (originalError, message, isSync) => {
|
|
@@ -1369,11 +1308,10 @@ var ExecaError = class extends Error {};
|
|
|
1369
1308
|
setErrorName(ExecaError, ExecaError.name);
|
|
1370
1309
|
var ExecaSyncError = class extends Error {};
|
|
1371
1310
|
setErrorName(ExecaSyncError, ExecaSyncError.name);
|
|
1372
|
-
|
|
1373
1311
|
//#endregion
|
|
1374
|
-
//#region ../../node_modules/.pnpm/human-signals@8.0.
|
|
1312
|
+
//#region ../../node_modules/.pnpm/human-signals@8.0.1/node_modules/human-signals/build/src/realtime.js
|
|
1375
1313
|
const getRealtimeSignals = () => {
|
|
1376
|
-
const length =
|
|
1314
|
+
const length = 64 - SIGRTMIN + 1;
|
|
1377
1315
|
return Array.from({ length }, getRealtimeSignal);
|
|
1378
1316
|
};
|
|
1379
1317
|
const getRealtimeSignal = (value, index) => ({
|
|
@@ -1384,10 +1322,8 @@ const getRealtimeSignal = (value, index) => ({
|
|
|
1384
1322
|
standard: "posix"
|
|
1385
1323
|
});
|
|
1386
1324
|
const SIGRTMIN = 34;
|
|
1387
|
-
const SIGRTMAX = 64;
|
|
1388
|
-
|
|
1389
1325
|
//#endregion
|
|
1390
|
-
//#region ../../node_modules/.pnpm/human-signals@8.0.
|
|
1326
|
+
//#region ../../node_modules/.pnpm/human-signals@8.0.1/node_modules/human-signals/build/src/core.js
|
|
1391
1327
|
const SIGNALS = [
|
|
1392
1328
|
{
|
|
1393
1329
|
name: "SIGHUP",
|
|
@@ -1659,9 +1595,8 @@ const SIGNALS = [
|
|
|
1659
1595
|
standard: "other"
|
|
1660
1596
|
}
|
|
1661
1597
|
];
|
|
1662
|
-
|
|
1663
1598
|
//#endregion
|
|
1664
|
-
//#region ../../node_modules/.pnpm/human-signals@8.0.
|
|
1599
|
+
//#region ../../node_modules/.pnpm/human-signals@8.0.1/node_modules/human-signals/build/src/signals.js
|
|
1665
1600
|
const getSignals = () => {
|
|
1666
1601
|
const realtimeSignals = getRealtimeSignals();
|
|
1667
1602
|
return [...SIGNALS, ...realtimeSignals].map(normalizeSignal$1);
|
|
@@ -1679,12 +1614,11 @@ const normalizeSignal$1 = ({ name, number: defaultNumber, description, action, f
|
|
|
1679
1614
|
standard
|
|
1680
1615
|
};
|
|
1681
1616
|
};
|
|
1682
|
-
|
|
1683
1617
|
//#endregion
|
|
1684
|
-
//#region ../../node_modules/.pnpm/human-signals@8.0.
|
|
1618
|
+
//#region ../../node_modules/.pnpm/human-signals@8.0.1/node_modules/human-signals/build/src/main.js
|
|
1685
1619
|
const getSignalsByName = () => {
|
|
1686
|
-
const signals
|
|
1687
|
-
return Object.fromEntries(signals
|
|
1620
|
+
const signals = getSignals();
|
|
1621
|
+
return Object.fromEntries(signals.map(getSignalByName));
|
|
1688
1622
|
};
|
|
1689
1623
|
const getSignalByName = ({ name, number, description, supported, action, forced, standard }) => [name, {
|
|
1690
1624
|
name,
|
|
@@ -1697,13 +1631,12 @@ const getSignalByName = ({ name, number, description, supported, action, forced,
|
|
|
1697
1631
|
}];
|
|
1698
1632
|
const signalsByName = getSignalsByName();
|
|
1699
1633
|
const getSignalsByNumber = () => {
|
|
1700
|
-
const signals
|
|
1701
|
-
const
|
|
1702
|
-
const signalsA = Array.from({ length }, (value, number) => getSignalByNumber(number, signals$1));
|
|
1634
|
+
const signals = getSignals();
|
|
1635
|
+
const signalsA = Array.from({ length: 65 }, (value, number) => getSignalByNumber(number, signals));
|
|
1703
1636
|
return Object.assign({}, ...signalsA);
|
|
1704
1637
|
};
|
|
1705
|
-
const getSignalByNumber = (number, signals
|
|
1706
|
-
const signal = findSignalByNumber(number, signals
|
|
1638
|
+
const getSignalByNumber = (number, signals) => {
|
|
1639
|
+
const signal = findSignalByNumber(number, signals);
|
|
1707
1640
|
if (signal === void 0) return {};
|
|
1708
1641
|
const { name, description, supported, action, forced, standard } = signal;
|
|
1709
1642
|
return { [number]: {
|
|
@@ -1716,13 +1649,12 @@ const getSignalByNumber = (number, signals$1) => {
|
|
|
1716
1649
|
standard
|
|
1717
1650
|
} };
|
|
1718
1651
|
};
|
|
1719
|
-
const findSignalByNumber = (number, signals
|
|
1720
|
-
const signal = signals
|
|
1652
|
+
const findSignalByNumber = (number, signals) => {
|
|
1653
|
+
const signal = signals.find(({ name }) => node_os.constants.signals[name] === number);
|
|
1721
1654
|
if (signal !== void 0) return signal;
|
|
1722
|
-
return signals
|
|
1655
|
+
return signals.find((signalA) => signalA.number === number);
|
|
1723
1656
|
};
|
|
1724
|
-
|
|
1725
|
-
|
|
1657
|
+
getSignalsByNumber();
|
|
1726
1658
|
//#endregion
|
|
1727
1659
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/terminate/signal.js
|
|
1728
1660
|
const normalizeKillSignal = (killSignal) => {
|
|
@@ -1752,7 +1684,6 @@ Available signal numbers: ${getAvailableSignalIntegers()}.`;
|
|
|
1752
1684
|
const getAvailableSignalNames = () => Object.keys(node_os.constants.signals).sort().map((signalName) => `'${signalName}'`).join(", ");
|
|
1753
1685
|
const getAvailableSignalIntegers = () => [...new Set(Object.values(node_os.constants.signals).sort((signalInteger, signalIntegerTwo) => signalInteger - signalIntegerTwo))].join(", ");
|
|
1754
1686
|
const getSignalDescription = (signal) => signalsByName[signal].description;
|
|
1755
|
-
|
|
1756
1687
|
//#endregion
|
|
1757
1688
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/terminate/kill.js
|
|
1758
1689
|
const normalizeForceKillAfterDelay = (forceKillAfterDelay) => {
|
|
@@ -1804,13 +1735,11 @@ const killOnTimeout = async ({ kill, forceKillAfterDelay, context, controllerSig
|
|
|
1804
1735
|
if (kill("SIGKILL")) context.isForcefullyTerminated ??= true;
|
|
1805
1736
|
} catch {}
|
|
1806
1737
|
};
|
|
1807
|
-
|
|
1808
1738
|
//#endregion
|
|
1809
1739
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/utils/abort-signal.js
|
|
1810
1740
|
const onAbortedSignal = async (mainSignal, stopSignal) => {
|
|
1811
1741
|
if (!mainSignal.aborted) await (0, node_events.once)(mainSignal, "abort", { signal: stopSignal });
|
|
1812
1742
|
};
|
|
1813
|
-
|
|
1814
1743
|
//#endregion
|
|
1815
1744
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/terminate/cancel.js
|
|
1816
1745
|
const validateCancelSignal = ({ cancelSignal }) => {
|
|
@@ -1823,18 +1752,17 @@ const terminateOnCancel = async (subprocess, cancelSignal, context, { signal })
|
|
|
1823
1752
|
subprocess.kill();
|
|
1824
1753
|
throw cancelSignal.reason;
|
|
1825
1754
|
};
|
|
1826
|
-
|
|
1827
1755
|
//#endregion
|
|
1828
1756
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/ipc/validation.js
|
|
1829
|
-
const validateIpcMethod = ({ methodName, isSubprocess, ipc, isConnected
|
|
1757
|
+
const validateIpcMethod = ({ methodName, isSubprocess, ipc, isConnected }) => {
|
|
1830
1758
|
validateIpcOption(methodName, isSubprocess, ipc);
|
|
1831
|
-
validateConnection(methodName, isSubprocess, isConnected
|
|
1759
|
+
validateConnection(methodName, isSubprocess, isConnected);
|
|
1832
1760
|
};
|
|
1833
1761
|
const validateIpcOption = (methodName, isSubprocess, ipc) => {
|
|
1834
1762
|
if (!ipc) throw new Error(`${getMethodName(methodName, isSubprocess)} can only be used if the \`ipc\` option is \`true\`.`);
|
|
1835
1763
|
};
|
|
1836
|
-
const validateConnection = (methodName, isSubprocess, isConnected
|
|
1837
|
-
if (!isConnected
|
|
1764
|
+
const validateConnection = (methodName, isSubprocess, isConnected) => {
|
|
1765
|
+
if (!isConnected) throw new Error(`${getMethodName(methodName, isSubprocess)} cannot be used: the ${getOtherProcessName(isSubprocess)} has already exited or disconnected.`);
|
|
1838
1766
|
};
|
|
1839
1767
|
const throwOnEarlyDisconnect = (isSubprocess) => {
|
|
1840
1768
|
throw new Error(`${getMethodName("getOneMessage", isSubprocess)} could not complete: the ${getOtherProcessName(isSubprocess)} exited or disconnected.`);
|
|
@@ -1878,7 +1806,6 @@ const getOtherProcessName = (isSubprocess) => isSubprocess ? "parent process" :
|
|
|
1878
1806
|
const disconnect = (anyProcess) => {
|
|
1879
1807
|
if (anyProcess.connected) anyProcess.disconnect();
|
|
1880
1808
|
};
|
|
1881
|
-
|
|
1882
1809
|
//#endregion
|
|
1883
1810
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/utils/deferred.js
|
|
1884
1811
|
const createDeferred = () => {
|
|
@@ -1891,7 +1818,6 @@ const createDeferred = () => {
|
|
|
1891
1818
|
});
|
|
1892
1819
|
return Object.assign(promise, methods);
|
|
1893
1820
|
};
|
|
1894
|
-
|
|
1895
1821
|
//#endregion
|
|
1896
1822
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/arguments/fd-options.js
|
|
1897
1823
|
const getToStream = (destination, to = "stdin") => {
|
|
@@ -1968,7 +1894,6 @@ const serializeOptionValue = (value) => {
|
|
|
1968
1894
|
if (typeof value === "string") return `'${value}'`;
|
|
1969
1895
|
return typeof value === "number" ? `${value}` : "Stream";
|
|
1970
1896
|
};
|
|
1971
|
-
|
|
1972
1897
|
//#endregion
|
|
1973
1898
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/utils/max-listeners.js
|
|
1974
1899
|
const incrementMaxListeners = (eventEmitter, maxListenersIncrement, signal) => {
|
|
@@ -1979,7 +1904,6 @@ const incrementMaxListeners = (eventEmitter, maxListenersIncrement, signal) => {
|
|
|
1979
1904
|
eventEmitter.setMaxListeners(eventEmitter.getMaxListeners() - maxListenersIncrement);
|
|
1980
1905
|
});
|
|
1981
1906
|
};
|
|
1982
|
-
|
|
1983
1907
|
//#endregion
|
|
1984
1908
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/ipc/reference.js
|
|
1985
1909
|
const addReference = (channel, reference) => {
|
|
@@ -2006,7 +1930,6 @@ const redoAddedReferences = (channel, isSubprocess) => {
|
|
|
2006
1930
|
addReferenceCount(channel);
|
|
2007
1931
|
}
|
|
2008
1932
|
};
|
|
2009
|
-
|
|
2010
1933
|
//#endregion
|
|
2011
1934
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/ipc/incoming.js
|
|
2012
1935
|
const onMessage = async ({ anyProcess, channel, isSubprocess, ipcEmitter }, wrappedMessage) => {
|
|
@@ -2040,7 +1963,6 @@ const onDisconnect = async ({ anyProcess, channel, isSubprocess, ipcEmitter, bou
|
|
|
2040
1963
|
ipcEmitter.emit("disconnect");
|
|
2041
1964
|
};
|
|
2042
1965
|
const INCOMING_MESSAGES = /* @__PURE__ */ new WeakMap();
|
|
2043
|
-
|
|
2044
1966
|
//#endregion
|
|
2045
1967
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/ipc/forward.js
|
|
2046
1968
|
const getIpcEmitter = (anyProcess, channel, isSubprocess) => {
|
|
@@ -2078,7 +2000,6 @@ const isConnected = (anyProcess) => {
|
|
|
2078
2000
|
const ipcEmitter = IPC_EMITTERS.get(anyProcess);
|
|
2079
2001
|
return ipcEmitter === void 0 ? anyProcess.channel !== null : ipcEmitter.connected;
|
|
2080
2002
|
};
|
|
2081
|
-
|
|
2082
2003
|
//#endregion
|
|
2083
2004
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/ipc/strict.js
|
|
2084
2005
|
const handleSendStrict = ({ anyProcess, channel, isSubprocess, message, strict }) => {
|
|
@@ -2150,7 +2071,6 @@ const throwOnDisconnect$1 = async (anyProcess, isSubprocess, { signal }) => {
|
|
|
2150
2071
|
};
|
|
2151
2072
|
const REQUEST_TYPE = "execa:ipc:request";
|
|
2152
2073
|
const RESPONSE_TYPE = "execa:ipc:response";
|
|
2153
|
-
|
|
2154
2074
|
//#endregion
|
|
2155
2075
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/ipc/outgoing.js
|
|
2156
2076
|
const startSendMessage = (anyProcess, wrappedMessage, strict) => {
|
|
@@ -2180,7 +2100,6 @@ const waitForOutgoingMessages = async (anyProcess, ipcEmitter, wrappedMessage) =
|
|
|
2180
2100
|
const OUTGOING_MESSAGES = /* @__PURE__ */ new WeakMap();
|
|
2181
2101
|
const hasMessageListeners = (anyProcess, ipcEmitter) => ipcEmitter.listenerCount("message") > getMinListenerCount(anyProcess);
|
|
2182
2102
|
const getMinListenerCount = (anyProcess) => SUBPROCESS_OPTIONS.has(anyProcess) && !getFdSpecificValue(SUBPROCESS_OPTIONS.get(anyProcess).options.buffer, "ipc") ? 1 : 0;
|
|
2183
|
-
|
|
2184
2103
|
//#endregion
|
|
2185
2104
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/ipc/send.js
|
|
2186
2105
|
const sendMessage$1 = ({ anyProcess, channel, isSubprocess, ipc }, message, { strict = false } = {}) => {
|
|
@@ -2250,7 +2169,6 @@ const getSendMethod = (anyProcess) => {
|
|
|
2250
2169
|
return sendMethod;
|
|
2251
2170
|
};
|
|
2252
2171
|
const PROCESS_SEND_METHODS = /* @__PURE__ */ new WeakMap();
|
|
2253
|
-
|
|
2254
2172
|
//#endregion
|
|
2255
2173
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/ipc/graceful.js
|
|
2256
2174
|
const sendAbort = (subprocess, message) => {
|
|
@@ -2301,7 +2219,6 @@ const abortOnDisconnect = () => {
|
|
|
2301
2219
|
cancelController.abort(getAbortDisconnectError());
|
|
2302
2220
|
};
|
|
2303
2221
|
const cancelController = new AbortController();
|
|
2304
|
-
|
|
2305
2222
|
//#endregion
|
|
2306
2223
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/terminate/graceful.js
|
|
2307
2224
|
const validateGracefulCancel = ({ gracefulCancel, cancelSignal, ipc, serialization }) => {
|
|
@@ -2340,7 +2257,6 @@ const getReason = ({ reason }) => {
|
|
|
2340
2257
|
});
|
|
2341
2258
|
return error;
|
|
2342
2259
|
};
|
|
2343
|
-
|
|
2344
2260
|
//#endregion
|
|
2345
2261
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/terminate/timeout.js
|
|
2346
2262
|
const validateTimeout = ({ timeout }) => {
|
|
@@ -2353,7 +2269,6 @@ const killAfterTimeout = async (subprocess, timeout, context, { signal }) => {
|
|
|
2353
2269
|
subprocess.kill();
|
|
2354
2270
|
throw new DiscardedError();
|
|
2355
2271
|
};
|
|
2356
|
-
|
|
2357
2272
|
//#endregion
|
|
2358
2273
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/methods/node.js
|
|
2359
2274
|
const mapNode = ({ options }) => {
|
|
@@ -2363,7 +2278,7 @@ const mapNode = ({ options }) => {
|
|
|
2363
2278
|
node: true
|
|
2364
2279
|
} };
|
|
2365
2280
|
};
|
|
2366
|
-
const handleNodeOption = (file, commandArguments, { node: shouldHandleNode = false, nodePath = node_process.execPath, nodeOptions = node_process.execArgv.filter((nodeOption) => !nodeOption.startsWith("--inspect")), cwd, execPath: formerNodePath
|
|
2281
|
+
const handleNodeOption = (file, commandArguments, { node: shouldHandleNode = false, nodePath = node_process.execPath, nodeOptions = node_process.execArgv.filter((nodeOption) => !nodeOption.startsWith("--inspect")), cwd, execPath: formerNodePath, ...options }) => {
|
|
2367
2282
|
if (formerNodePath !== void 0) throw new TypeError("The \"execPath\" option has been removed. Please use the \"nodePath\" option instead.");
|
|
2368
2283
|
const normalizedNodePath = safeNormalizeFileUrl(nodePath, "The \"nodePath\" option");
|
|
2369
2284
|
const resolvedNodePath = node_path.default.resolve(cwd, normalizedNodePath);
|
|
@@ -2393,7 +2308,6 @@ const handleNodeOption = (file, commandArguments, { node: shouldHandleNode = fal
|
|
|
2393
2308
|
}
|
|
2394
2309
|
];
|
|
2395
2310
|
};
|
|
2396
|
-
|
|
2397
2311
|
//#endregion
|
|
2398
2312
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/ipc/ipc-input.js
|
|
2399
2313
|
const validateIpcInputOption = ({ ipcInput, ipc, serialization }) => {
|
|
@@ -2423,7 +2337,6 @@ const sendIpcInput = async (subprocess, ipcInput) => {
|
|
|
2423
2337
|
if (ipcInput === void 0) return;
|
|
2424
2338
|
await subprocess.sendMessage(ipcInput);
|
|
2425
2339
|
};
|
|
2426
|
-
|
|
2427
2340
|
//#endregion
|
|
2428
2341
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/arguments/encoding-option.js
|
|
2429
2342
|
const validateEncoding = ({ encoding }) => {
|
|
@@ -2431,7 +2344,7 @@ const validateEncoding = ({ encoding }) => {
|
|
|
2431
2344
|
const correctEncoding = getCorrectEncoding(encoding);
|
|
2432
2345
|
if (correctEncoding !== void 0) throw new TypeError(`Invalid option \`encoding: ${serializeEncoding(encoding)}\`.
|
|
2433
2346
|
Please rename it to ${serializeEncoding(correctEncoding)}.`);
|
|
2434
|
-
const correctEncodings = [...ENCODINGS].map((correctEncoding
|
|
2347
|
+
const correctEncodings = [...ENCODINGS].map((correctEncoding) => serializeEncoding(correctEncoding)).join(", ");
|
|
2435
2348
|
throw new TypeError(`Invalid option \`encoding: ${serializeEncoding(encoding)}\`.
|
|
2436
2349
|
Please rename it to one of: ${correctEncodings}.`);
|
|
2437
2350
|
};
|
|
@@ -2460,7 +2373,6 @@ const ENCODING_ALIASES = {
|
|
|
2460
2373
|
binary: "latin1"
|
|
2461
2374
|
};
|
|
2462
2375
|
const serializeEncoding = (encoding) => typeof encoding === "string" ? `"${encoding}"` : String(encoding);
|
|
2463
|
-
|
|
2464
2376
|
//#endregion
|
|
2465
2377
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/arguments/cwd.js
|
|
2466
2378
|
const normalizeCwd = (cwd = getDefaultCwd()) => {
|
|
@@ -2486,7 +2398,6 @@ const fixCwdError = (originalMessage, cwd) => {
|
|
|
2486
2398
|
if (!cwdStat.isDirectory()) return `The "cwd" option is not a directory: ${cwd}.\n${originalMessage}`;
|
|
2487
2399
|
return originalMessage;
|
|
2488
2400
|
};
|
|
2489
|
-
|
|
2490
2401
|
//#endregion
|
|
2491
2402
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/arguments/options.js
|
|
2492
2403
|
const normalizeOptions = (filePath, rawArguments, rawOptions) => {
|
|
@@ -2511,7 +2422,7 @@ const normalizeOptions = (filePath, rawArguments, rawOptions) => {
|
|
|
2511
2422
|
options
|
|
2512
2423
|
};
|
|
2513
2424
|
};
|
|
2514
|
-
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"
|
|
2425
|
+
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 }) => ({
|
|
2515
2426
|
...options,
|
|
2516
2427
|
extendEnv,
|
|
2517
2428
|
preferLocal,
|
|
@@ -2543,7 +2454,6 @@ const getEnv = ({ env: envOption, extendEnv, preferLocal, node, localDirectory,
|
|
|
2543
2454
|
});
|
|
2544
2455
|
return env;
|
|
2545
2456
|
};
|
|
2546
|
-
|
|
2547
2457
|
//#endregion
|
|
2548
2458
|
//#region ../../node_modules/.pnpm/strip-final-newline@4.0.0/node_modules/strip-final-newline/index.js
|
|
2549
2459
|
function stripFinalNewline(input) {
|
|
@@ -2557,22 +2467,20 @@ const LF = "\n";
|
|
|
2557
2467
|
const LF_BINARY = LF.codePointAt(0);
|
|
2558
2468
|
const CR = "\r";
|
|
2559
2469
|
const CR_BINARY = CR.codePointAt(0);
|
|
2560
|
-
|
|
2561
2470
|
//#endregion
|
|
2562
2471
|
//#region ../../node_modules/.pnpm/is-stream@4.0.1/node_modules/is-stream/index.js
|
|
2563
2472
|
function isStream(stream, { checkOpen = true } = {}) {
|
|
2564
2473
|
return stream !== null && typeof stream === "object" && (stream.writable || stream.readable || !checkOpen || stream.writable === void 0 && stream.readable === void 0) && typeof stream.pipe === "function";
|
|
2565
2474
|
}
|
|
2566
|
-
function isWritableStream(stream, { checkOpen = true } = {}) {
|
|
2475
|
+
function isWritableStream$1(stream, { checkOpen = true } = {}) {
|
|
2567
2476
|
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";
|
|
2568
2477
|
}
|
|
2569
|
-
function isReadableStream(stream, { checkOpen = true } = {}) {
|
|
2478
|
+
function isReadableStream$1(stream, { checkOpen = true } = {}) {
|
|
2570
2479
|
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";
|
|
2571
2480
|
}
|
|
2572
2481
|
function isDuplexStream(stream, options) {
|
|
2573
|
-
return isWritableStream(stream, options) && isReadableStream(stream, options);
|
|
2482
|
+
return isWritableStream$1(stream, options) && isReadableStream$1(stream, options);
|
|
2574
2483
|
}
|
|
2575
|
-
|
|
2576
2484
|
//#endregion
|
|
2577
2485
|
//#region ../../node_modules/.pnpm/@sec-ant+readable-stream@0.4.1/node_modules/@sec-ant/readable-stream/dist/ponyfill/asyncIterator.js
|
|
2578
2486
|
const a = Object.getPrototypeOf(Object.getPrototypeOf(
|
|
@@ -2653,11 +2561,10 @@ function h({ preventCancel: r = !1 } = {}) {
|
|
|
2653
2561
|
const t = new c(this.getReader(), r), s = Object.create(u);
|
|
2654
2562
|
return s[n] = t, s;
|
|
2655
2563
|
}
|
|
2656
|
-
|
|
2657
2564
|
//#endregion
|
|
2658
2565
|
//#region ../../node_modules/.pnpm/get-stream@9.0.1/node_modules/get-stream/source/stream.js
|
|
2659
2566
|
const getAsyncIterable = (stream) => {
|
|
2660
|
-
if (isReadableStream(stream, { checkOpen: false }) && nodeImports.on !== void 0) return getStreamIterable(stream);
|
|
2567
|
+
if (isReadableStream$1(stream, { checkOpen: false }) && nodeImports.on !== void 0) return getStreamIterable(stream);
|
|
2661
2568
|
if (typeof stream?.[Symbol.asyncIterator] === "function") return stream;
|
|
2662
2569
|
if (toString.call(stream) === "[object ReadableStream]") return h.call(stream);
|
|
2663
2570
|
throw new TypeError("The first argument must be a Readable, a ReadableStream, or an async iterable.");
|
|
@@ -2691,7 +2598,6 @@ const handleStreamEnd = async (stream, controller, state) => {
|
|
|
2691
2598
|
}
|
|
2692
2599
|
};
|
|
2693
2600
|
const nodeImports = {};
|
|
2694
|
-
|
|
2695
2601
|
//#endregion
|
|
2696
2602
|
//#region ../../node_modules/.pnpm/get-stream@9.0.1/node_modules/get-stream/source/contents.js
|
|
2697
2603
|
const getStreamContents$1 = async (stream, { init, convertChunk, getSize, truncateChunk, addChunk, getFinalChunk, finalize }, { maxBuffer = Number.POSITIVE_INFINITY } = {}) => {
|
|
@@ -2767,7 +2673,6 @@ var MaxBufferError = class extends Error {
|
|
|
2767
2673
|
super("maxBuffer exceeded");
|
|
2768
2674
|
}
|
|
2769
2675
|
};
|
|
2770
|
-
|
|
2771
2676
|
//#endregion
|
|
2772
2677
|
//#region ../../node_modules/.pnpm/get-stream@9.0.1/node_modules/get-stream/source/utils.js
|
|
2773
2678
|
const identity = (value) => value;
|
|
@@ -2777,7 +2682,6 @@ const throwObjectStream = (chunk) => {
|
|
|
2777
2682
|
throw new Error(`Streams in object mode are not supported: ${String(chunk)}`);
|
|
2778
2683
|
};
|
|
2779
2684
|
const getLengthProperty = (convertedChunk) => convertedChunk.length;
|
|
2780
|
-
|
|
2781
2685
|
//#endregion
|
|
2782
2686
|
//#region ../../node_modules/.pnpm/get-stream@9.0.1/node_modules/get-stream/source/array.js
|
|
2783
2687
|
async function getStreamAsArray(stream, options) {
|
|
@@ -2805,7 +2709,6 @@ const arrayMethods = {
|
|
|
2805
2709
|
getFinalChunk: noop$1,
|
|
2806
2710
|
finalize: getContentsProperty
|
|
2807
2711
|
};
|
|
2808
|
-
|
|
2809
2712
|
//#endregion
|
|
2810
2713
|
//#region ../../node_modules/.pnpm/get-stream@9.0.1/node_modules/get-stream/source/array-buffer.js
|
|
2811
2714
|
async function getStreamAsArrayBuffer(stream, options) {
|
|
@@ -2857,7 +2760,6 @@ const arrayBufferMethods = {
|
|
|
2857
2760
|
getFinalChunk: noop$1,
|
|
2858
2761
|
finalize: finalizeArrayBuffer
|
|
2859
2762
|
};
|
|
2860
|
-
|
|
2861
2763
|
//#endregion
|
|
2862
2764
|
//#region ../../node_modules/.pnpm/get-stream@9.0.1/node_modules/get-stream/source/string.js
|
|
2863
2765
|
async function getStreamAsString(stream, options) {
|
|
@@ -2867,11 +2769,11 @@ const initString = () => ({
|
|
|
2867
2769
|
contents: "",
|
|
2868
2770
|
textDecoder: new TextDecoder()
|
|
2869
2771
|
});
|
|
2870
|
-
const useTextDecoder = (chunk, { textDecoder
|
|
2772
|
+
const useTextDecoder = (chunk, { textDecoder }) => textDecoder.decode(chunk, { stream: true });
|
|
2871
2773
|
const addStringChunk = (convertedChunk, { contents }) => contents + convertedChunk;
|
|
2872
2774
|
const truncateStringChunk = (convertedChunk, chunkSize) => convertedChunk.slice(0, chunkSize);
|
|
2873
|
-
const getFinalStringChunk = ({ textDecoder
|
|
2874
|
-
const finalChunk = textDecoder
|
|
2775
|
+
const getFinalStringChunk = ({ textDecoder }) => {
|
|
2776
|
+
const finalChunk = textDecoder.decode();
|
|
2875
2777
|
return finalChunk === "" ? void 0 : finalChunk;
|
|
2876
2778
|
};
|
|
2877
2779
|
const stringMethods = {
|
|
@@ -2890,7 +2792,6 @@ const stringMethods = {
|
|
|
2890
2792
|
getFinalChunk: getFinalStringChunk,
|
|
2891
2793
|
finalize: getContentsProperty
|
|
2892
2794
|
};
|
|
2893
|
-
|
|
2894
2795
|
//#endregion
|
|
2895
2796
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/io/max-buffer.js
|
|
2896
2797
|
const handleMaxBuffer = ({ error, stream, readableObjectMode, lines, encoding, fdNumber }) => {
|
|
@@ -2946,7 +2847,6 @@ const truncateMaxBufferSync = (result, isMaxBuffer, maxBuffer) => {
|
|
|
2946
2847
|
return result.length > maxBufferValue ? result.slice(0, maxBufferValue) : result;
|
|
2947
2848
|
};
|
|
2948
2849
|
const getMaxBufferSync = ([, stdoutMaxBuffer]) => stdoutMaxBuffer;
|
|
2949
|
-
|
|
2950
2850
|
//#endregion
|
|
2951
2851
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/return/message.js
|
|
2952
2852
|
const createMessages = ({ stdio, all, ipcOutput, originalError, signal, signalDescription, exitCode, escapedCommand, timedOut, isCanceled, isGracefullyCanceled, isMaxBuffer, isForcefullyTerminated, forceKillAfterDelay, killSignal, maxBuffer, timeout, cwd }) => {
|
|
@@ -3008,7 +2908,6 @@ const serializeMessageItem = (messageItem) => {
|
|
|
3008
2908
|
if (isUint8Array(messageItem)) return uint8ArrayToString(messageItem);
|
|
3009
2909
|
return "";
|
|
3010
2910
|
};
|
|
3011
|
-
|
|
3012
2911
|
//#endregion
|
|
3013
2912
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/return/result.js
|
|
3014
2913
|
const makeSuccessResult = ({ command, escapedCommand, stdio, all, ipcOutput, options: { cwd }, startTime }) => omitUndefinedProperties({
|
|
@@ -3126,7 +3025,6 @@ const normalizeExitPayload = (rawExitCode, rawSignal) => {
|
|
|
3126
3025
|
signalDescription: signal === void 0 ? void 0 : getSignalDescription(rawSignal)
|
|
3127
3026
|
};
|
|
3128
3027
|
};
|
|
3129
|
-
|
|
3130
3028
|
//#endregion
|
|
3131
3029
|
//#region ../../node_modules/.pnpm/parse-ms@4.0.0/node_modules/parse-ms/index.js
|
|
3132
3030
|
const toZeroIfInfinity = (value) => Number.isFinite(value) ? value : 0;
|
|
@@ -3161,11 +3059,10 @@ function parseMilliseconds(milliseconds) {
|
|
|
3161
3059
|
}
|
|
3162
3060
|
throw new TypeError("Expected a finite number or bigint");
|
|
3163
3061
|
}
|
|
3164
|
-
|
|
3165
3062
|
//#endregion
|
|
3166
3063
|
//#region ../../node_modules/.pnpm/pretty-ms@9.2.0/node_modules/pretty-ms/index.js
|
|
3167
3064
|
const isZero = (value) => value === 0 || value === 0n;
|
|
3168
|
-
const pluralize = (word, count
|
|
3065
|
+
const pluralize = (word, count) => count === 1 || count === 1n ? word : `${word}s`;
|
|
3169
3066
|
const SECOND_ROUNDING_EPSILON = 1e-7;
|
|
3170
3067
|
const ONE_DAY_IN_MILLISECONDS = 24n * 60n * 60n * 1000n;
|
|
3171
3068
|
function prettyMilliseconds(milliseconds, options) {
|
|
@@ -3214,16 +3111,16 @@ function prettyMilliseconds(milliseconds, options) {
|
|
|
3214
3111
|
add(Number(parsed.minutes), "minute", "m");
|
|
3215
3112
|
if (!options.hideSeconds) if (options.separateMilliseconds || options.formatSubMilliseconds || !options.colonNotation && milliseconds < 1e3) {
|
|
3216
3113
|
const seconds = Number(parsed.seconds);
|
|
3217
|
-
const milliseconds
|
|
3114
|
+
const milliseconds = Number(parsed.milliseconds);
|
|
3218
3115
|
const microseconds = Number(parsed.microseconds);
|
|
3219
3116
|
const nanoseconds = Number(parsed.nanoseconds);
|
|
3220
3117
|
add(seconds, "second", "s");
|
|
3221
3118
|
if (options.formatSubMilliseconds) {
|
|
3222
|
-
add(milliseconds
|
|
3119
|
+
add(milliseconds, "millisecond", "ms");
|
|
3223
3120
|
add(microseconds, "microsecond", "µs");
|
|
3224
3121
|
add(nanoseconds, "nanosecond", "ns");
|
|
3225
3122
|
} else {
|
|
3226
|
-
const millisecondsAndBelow = milliseconds
|
|
3123
|
+
const millisecondsAndBelow = milliseconds + microseconds / 1e3 + nanoseconds / 1e6;
|
|
3227
3124
|
const millisecondsDecimalDigits = typeof options.millisecondsDecimalDigits === "number" ? options.millisecondsDecimalDigits : 0;
|
|
3228
3125
|
const millisecondsString = millisecondsDecimalDigits ? millisecondsAndBelow.toFixed(millisecondsDecimalDigits) : millisecondsAndBelow >= 1 ? Math.round(millisecondsAndBelow) : Math.ceil(millisecondsAndBelow);
|
|
3229
3126
|
add(Number.parseFloat(millisecondsString), "millisecond", "ms", millisecondsString);
|
|
@@ -3238,7 +3135,6 @@ function prettyMilliseconds(milliseconds, options) {
|
|
|
3238
3135
|
if (typeof options.unitCount === "number") result = result.slice(0, Math.max(options.unitCount, 1));
|
|
3239
3136
|
return sign + result.join(separator);
|
|
3240
3137
|
}
|
|
3241
|
-
|
|
3242
3138
|
//#endregion
|
|
3243
3139
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/verbose/error.js
|
|
3244
3140
|
const logError = (result, verboseInfo) => {
|
|
@@ -3249,7 +3145,6 @@ const logError = (result, verboseInfo) => {
|
|
|
3249
3145
|
result
|
|
3250
3146
|
});
|
|
3251
3147
|
};
|
|
3252
|
-
|
|
3253
3148
|
//#endregion
|
|
3254
3149
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/verbose/complete.js
|
|
3255
3150
|
const logResult = (result, verboseInfo) => {
|
|
@@ -3265,7 +3160,6 @@ const logDuration = (result, verboseInfo) => {
|
|
|
3265
3160
|
result
|
|
3266
3161
|
});
|
|
3267
3162
|
};
|
|
3268
|
-
|
|
3269
3163
|
//#endregion
|
|
3270
3164
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/return/reject.js
|
|
3271
3165
|
const handleResult = (result, verboseInfo, { reject }) => {
|
|
@@ -3273,7 +3167,6 @@ const handleResult = (result, verboseInfo, { reject }) => {
|
|
|
3273
3167
|
if (result.failed && reject) throw result;
|
|
3274
3168
|
return result;
|
|
3275
3169
|
};
|
|
3276
|
-
|
|
3277
3170
|
//#endregion
|
|
3278
3171
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/stdio/type.js
|
|
3279
3172
|
const getStdioItemType = (value, optionName) => {
|
|
@@ -3340,10 +3233,10 @@ const KNOWN_STDIO_STRINGS = new Set([
|
|
|
3340
3233
|
"overlapped",
|
|
3341
3234
|
"pipe"
|
|
3342
3235
|
]);
|
|
3343
|
-
const isReadableStream
|
|
3344
|
-
const isWritableStream
|
|
3345
|
-
const isWebStream = (value) => isReadableStream
|
|
3346
|
-
const isTransformStream = (value) => isReadableStream
|
|
3236
|
+
const isReadableStream = (value) => Object.prototype.toString.call(value) === "[object ReadableStream]";
|
|
3237
|
+
const isWritableStream = (value) => Object.prototype.toString.call(value) === "[object WritableStream]";
|
|
3238
|
+
const isWebStream = (value) => isReadableStream(value) || isWritableStream(value);
|
|
3239
|
+
const isTransformStream = (value) => isReadableStream(value?.readable) && isWritableStream(value?.writable);
|
|
3347
3240
|
const isAsyncIterableObject = (value) => isObject(value) && typeof value[Symbol.asyncIterator] === "function";
|
|
3348
3241
|
const isIterableObject = (value) => isObject(value) && typeof value[Symbol.iterator] === "function";
|
|
3349
3242
|
const isObject = (value) => typeof value === "object" && value !== null;
|
|
@@ -3381,7 +3274,6 @@ const TYPE_TO_MESSAGE = {
|
|
|
3381
3274
|
string: "a string",
|
|
3382
3275
|
uint8Array: "a Uint8Array"
|
|
3383
3276
|
};
|
|
3384
|
-
|
|
3385
3277
|
//#endregion
|
|
3386
3278
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/transform/object-mode.js
|
|
3387
3279
|
const getTransformObjectModes = (objectMode, index, newTransforms, direction) => direction === "output" ? getOutputObjectModes(objectMode, index, newTransforms) : getInputObjectModes(objectMode, index, newTransforms);
|
|
@@ -3404,7 +3296,6 @@ const getFdObjectMode = (stdioItems, direction) => {
|
|
|
3404
3296
|
if (lastTransform === void 0) return false;
|
|
3405
3297
|
return direction === "input" ? lastTransform.value.writableObjectMode : lastTransform.value.readableObjectMode;
|
|
3406
3298
|
};
|
|
3407
|
-
|
|
3408
3299
|
//#endregion
|
|
3409
3300
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/transform/normalize.js
|
|
3410
3301
|
const normalizeTransforms = (stdioItems, optionName, direction, options) => [...stdioItems.filter(({ type }) => !TRANSFORM_TYPES.has(type)), ...getTransforms(stdioItems, optionName, direction, options)];
|
|
@@ -3481,7 +3372,6 @@ const normalizeGenerator = ({ stdioItem, stdioItem: { value }, index, newTransfo
|
|
|
3481
3372
|
};
|
|
3482
3373
|
};
|
|
3483
3374
|
const sortTransforms = (newTransforms, direction) => direction === "input" ? newTransforms.reverse() : newTransforms;
|
|
3484
|
-
|
|
3485
3375
|
//#endregion
|
|
3486
3376
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/stdio/direction.js
|
|
3487
3377
|
const getStreamDirection = (stdioItems, fdNumber, optionName) => {
|
|
@@ -3505,10 +3395,10 @@ const guessStreamDirection = {
|
|
|
3505
3395
|
iterable: alwaysInput,
|
|
3506
3396
|
asyncIterable: alwaysInput,
|
|
3507
3397
|
uint8Array: alwaysInput,
|
|
3508
|
-
webStream: (value) => isWritableStream
|
|
3398
|
+
webStream: (value) => isWritableStream(value) ? "output" : "input",
|
|
3509
3399
|
nodeStream(value) {
|
|
3510
|
-
if (!isReadableStream(value, { checkOpen: false })) return "output";
|
|
3511
|
-
return isWritableStream(value, { checkOpen: false }) ? void 0 : "input";
|
|
3400
|
+
if (!isReadableStream$1(value, { checkOpen: false })) return "output";
|
|
3401
|
+
return isWritableStream$1(value, { checkOpen: false }) ? void 0 : "input";
|
|
3512
3402
|
},
|
|
3513
3403
|
webTransform: anyDirection,
|
|
3514
3404
|
duplex: anyDirection,
|
|
@@ -3528,14 +3418,12 @@ const getStandardStreamDirection = (value) => {
|
|
|
3528
3418
|
].includes(value)) return "output";
|
|
3529
3419
|
};
|
|
3530
3420
|
const DEFAULT_DIRECTION = "output";
|
|
3531
|
-
|
|
3532
3421
|
//#endregion
|
|
3533
3422
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/ipc/array.js
|
|
3534
3423
|
const normalizeIpcStdioArray = (stdioArray, ipc) => ipc && !stdioArray.includes("ipc") ? [...stdioArray, "ipc"] : stdioArray;
|
|
3535
|
-
|
|
3536
3424
|
//#endregion
|
|
3537
3425
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/stdio/stdio-option.js
|
|
3538
|
-
const normalizeStdioOption = ({ stdio, ipc, buffer
|
|
3426
|
+
const normalizeStdioOption = ({ stdio, ipc, buffer, ...options }, verboseInfo, isSync) => {
|
|
3539
3427
|
const stdioArray = getStdioArray(stdio, options).map((stdioOption, fdNumber) => addDefaultValue(stdioOption, fdNumber));
|
|
3540
3428
|
return isSync ? normalizeStdioSync(stdioArray, buffer, verboseInfo) : normalizeIpcStdioArray(stdioArray, ipc);
|
|
3541
3429
|
};
|
|
@@ -3559,7 +3447,6 @@ const addDefaultValue = (stdioOption, fdNumber) => {
|
|
|
3559
3447
|
};
|
|
3560
3448
|
const normalizeStdioSync = (stdioArray, buffer, verboseInfo) => stdioArray.map((stdioOption, fdNumber) => !buffer[fdNumber] && fdNumber !== 0 && !isFullVerbose(verboseInfo, fdNumber) && isOutputPipeOnly(stdioOption) ? "ignore" : stdioOption);
|
|
3561
3449
|
const isOutputPipeOnly = (stdioOption) => stdioOption === "pipe" || Array.isArray(stdioOption) && stdioOption.every((item) => item === "pipe");
|
|
3562
|
-
|
|
3563
3450
|
//#endregion
|
|
3564
3451
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/stdio/native.js
|
|
3565
3452
|
const handleNativeStream = ({ stdioItem, stdioItem: { type }, isStdioArray, fdNumber, direction, isSync }) => {
|
|
@@ -3628,7 +3515,6 @@ const getStandardStream = (fdNumber, value, optionName) => {
|
|
|
3628
3515
|
if (standardStream === void 0) throw new TypeError(`The \`${optionName}: ${value}\` option is invalid: no such standard stream.`);
|
|
3629
3516
|
return standardStream;
|
|
3630
3517
|
};
|
|
3631
|
-
|
|
3632
3518
|
//#endregion
|
|
3633
3519
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/stdio/input-option.js
|
|
3634
3520
|
const handleInputOptions = ({ input, inputFile }, fdNumber) => fdNumber === 0 ? [...handleInputOption(input), ...handleInputFileOption(inputFile)] : [];
|
|
@@ -3638,7 +3524,7 @@ const handleInputOption = (input) => input === void 0 ? [] : [{
|
|
|
3638
3524
|
optionName: "input"
|
|
3639
3525
|
}];
|
|
3640
3526
|
const getInputType = (input) => {
|
|
3641
|
-
if (isReadableStream(input, { checkOpen: false })) return "nodeStream";
|
|
3527
|
+
if (isReadableStream$1(input, { checkOpen: false })) return "nodeStream";
|
|
3642
3528
|
if (typeof input === "string") return "string";
|
|
3643
3529
|
if (isUint8Array(input)) return "uint8Array";
|
|
3644
3530
|
throw new Error("The `input` option must be a string, a Uint8Array or a Node.js Readable stream.");
|
|
@@ -3658,7 +3544,6 @@ const getInputFileType = (inputFile) => {
|
|
|
3658
3544
|
};
|
|
3659
3545
|
throw new Error("The `inputFile` option must be a file path string or a file URL.");
|
|
3660
3546
|
};
|
|
3661
|
-
|
|
3662
3547
|
//#endregion
|
|
3663
3548
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/stdio/duplicate.js
|
|
3664
3549
|
const filterDuplicates = (stdioItems) => stdioItems.filter((stdioItemOne, indexOne) => stdioItems.every((stdioItemTwo, indexTwo) => stdioItemOne.value !== stdioItemTwo.value || indexOne >= indexTwo || stdioItemOne.type === "generator" || stdioItemOne.type === "asyncGenerator"));
|
|
@@ -3719,10 +3604,9 @@ const validateDuplicateTransform = ({ otherStdioItems, type, value, optionName }
|
|
|
3719
3604
|
const throwOnDuplicateStream = (stdioItem, optionName, type) => {
|
|
3720
3605
|
if (stdioItem !== void 0) throw new TypeError(`The \`${stdioItem.optionName}\` and \`${optionName}\` options must not target ${TYPE_TO_MESSAGE[type]} that is the same.`);
|
|
3721
3606
|
};
|
|
3722
|
-
|
|
3723
3607
|
//#endregion
|
|
3724
3608
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/stdio/handle.js
|
|
3725
|
-
const handleStdio = (addProperties
|
|
3609
|
+
const handleStdio = (addProperties, options, verboseInfo, isSync) => {
|
|
3726
3610
|
const fileDescriptors = getFinalFileDescriptors({
|
|
3727
3611
|
initialFileDescriptors: normalizeStdioOption(options, verboseInfo, isSync).map((stdioOption, fdNumber) => getFileDescriptor({
|
|
3728
3612
|
stdioOption,
|
|
@@ -3730,7 +3614,7 @@ const handleStdio = (addProperties$2, options, verboseInfo, isSync) => {
|
|
|
3730
3614
|
options,
|
|
3731
3615
|
isSync
|
|
3732
3616
|
})),
|
|
3733
|
-
addProperties
|
|
3617
|
+
addProperties,
|
|
3734
3618
|
options,
|
|
3735
3619
|
isSync
|
|
3736
3620
|
});
|
|
@@ -3779,7 +3663,7 @@ const initializeStdioItem = (value, optionName) => ({
|
|
|
3779
3663
|
const validateStdioArray = (stdioItems, isStdioArray, optionName) => {
|
|
3780
3664
|
if (stdioItems.length === 0) throw new TypeError(`The \`${optionName}\` option must not be an empty array.`);
|
|
3781
3665
|
if (!isStdioArray) return;
|
|
3782
|
-
for (const { value, optionName
|
|
3666
|
+
for (const { value, optionName } of stdioItems) if (INVALID_STDIO_ARRAY_OPTIONS.has(value)) throw new Error(`The \`${optionName}\` option must not include \`${value}\`.`);
|
|
3783
3667
|
};
|
|
3784
3668
|
const INVALID_STDIO_ARRAY_OPTIONS = new Set(["ignore", "ipc"]);
|
|
3785
3669
|
const validateStreams = (stdioItems) => {
|
|
@@ -3795,13 +3679,13 @@ const validateFileObjectMode = (stdioItems, objectMode) => {
|
|
|
3795
3679
|
const fileStdioItem = stdioItems.find(({ type }) => FILE_TYPES.has(type));
|
|
3796
3680
|
if (fileStdioItem !== void 0) throw new TypeError(`The \`${fileStdioItem.optionName}\` option cannot use both files and transforms in objectMode.`);
|
|
3797
3681
|
};
|
|
3798
|
-
const getFinalFileDescriptors = ({ initialFileDescriptors, addProperties
|
|
3682
|
+
const getFinalFileDescriptors = ({ initialFileDescriptors, addProperties, options, isSync }) => {
|
|
3799
3683
|
const fileDescriptors = [];
|
|
3800
3684
|
try {
|
|
3801
3685
|
for (const fileDescriptor of initialFileDescriptors) fileDescriptors.push(getFinalFileDescriptor({
|
|
3802
3686
|
fileDescriptor,
|
|
3803
3687
|
fileDescriptors,
|
|
3804
|
-
addProperties
|
|
3688
|
+
addProperties,
|
|
3805
3689
|
options,
|
|
3806
3690
|
isSync
|
|
3807
3691
|
}));
|
|
@@ -3811,13 +3695,13 @@ const getFinalFileDescriptors = ({ initialFileDescriptors, addProperties: addPro
|
|
|
3811
3695
|
throw error;
|
|
3812
3696
|
}
|
|
3813
3697
|
};
|
|
3814
|
-
const getFinalFileDescriptor = ({ fileDescriptor: { direction, objectMode, stdioItems }, fileDescriptors, addProperties
|
|
3698
|
+
const getFinalFileDescriptor = ({ fileDescriptor: { direction, objectMode, stdioItems }, fileDescriptors, addProperties, options, isSync }) => {
|
|
3815
3699
|
return {
|
|
3816
3700
|
direction,
|
|
3817
3701
|
objectMode,
|
|
3818
3702
|
stdioItems: stdioItems.map((stdioItem) => addStreamProperties({
|
|
3819
3703
|
stdioItem,
|
|
3820
|
-
addProperties
|
|
3704
|
+
addProperties,
|
|
3821
3705
|
direction,
|
|
3822
3706
|
options,
|
|
3823
3707
|
fileDescriptors,
|
|
@@ -3825,7 +3709,7 @@ const getFinalFileDescriptor = ({ fileDescriptor: { direction, objectMode, stdio
|
|
|
3825
3709
|
}))
|
|
3826
3710
|
};
|
|
3827
3711
|
};
|
|
3828
|
-
const addStreamProperties = ({ stdioItem, addProperties
|
|
3712
|
+
const addStreamProperties = ({ stdioItem, addProperties, direction, options, fileDescriptors, isSync }) => {
|
|
3829
3713
|
const duplicateStream = getDuplicateStream({
|
|
3830
3714
|
stdioItem,
|
|
3831
3715
|
direction,
|
|
@@ -3838,18 +3722,17 @@ const addStreamProperties = ({ stdioItem, addProperties: addProperties$2, direct
|
|
|
3838
3722
|
};
|
|
3839
3723
|
return {
|
|
3840
3724
|
...stdioItem,
|
|
3841
|
-
...addProperties
|
|
3725
|
+
...addProperties[direction][stdioItem.type](stdioItem, options)
|
|
3842
3726
|
};
|
|
3843
3727
|
};
|
|
3844
3728
|
const cleanupCustomStreams = (fileDescriptors) => {
|
|
3845
3729
|
for (const { stdioItems } of fileDescriptors) for (const { stream } of stdioItems) if (stream !== void 0 && !isStandardStream(stream)) stream.destroy();
|
|
3846
3730
|
};
|
|
3847
3731
|
const forwardStdio = (stdioItems) => {
|
|
3848
|
-
if (stdioItems.length > 1) return stdioItems.some(({ value
|
|
3732
|
+
if (stdioItems.length > 1) return stdioItems.some(({ value }) => value === "overlapped") ? "overlapped" : "pipe";
|
|
3849
3733
|
const [{ type, value }] = stdioItems;
|
|
3850
3734
|
return type === "native" ? value : "pipe";
|
|
3851
3735
|
};
|
|
3852
|
-
|
|
3853
3736
|
//#endregion
|
|
3854
3737
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/stdio/handle-sync.js
|
|
3855
3738
|
const handleStdioSync = (options, verboseInfo) => handleStdio(addPropertiesSync, options, verboseInfo, true);
|
|
@@ -3896,12 +3779,10 @@ const addPropertiesSync = {
|
|
|
3896
3779
|
uint8Array: forbiddenIfSync
|
|
3897
3780
|
}
|
|
3898
3781
|
};
|
|
3899
|
-
|
|
3900
3782
|
//#endregion
|
|
3901
3783
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/io/strip-newline.js
|
|
3902
3784
|
const stripNewline = (value, { stripFinalNewline: stripFinalNewline$1 }, fdNumber) => getStripFinalNewline(stripFinalNewline$1, fdNumber) && value !== void 0 && !Array.isArray(value) ? stripFinalNewline(value) : value;
|
|
3903
|
-
const getStripFinalNewline = (stripFinalNewline
|
|
3904
|
-
|
|
3785
|
+
const getStripFinalNewline = (stripFinalNewline, fdNumber) => fdNumber === "all" ? stripFinalNewline[1] || stripFinalNewline[2] : stripFinalNewline[fdNumber];
|
|
3905
3786
|
//#endregion
|
|
3906
3787
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/transform/split.js
|
|
3907
3788
|
const getSplitLinesGenerator = (binary, preserveNewlines, skipped, state) => binary || skipped ? void 0 : initializeSplitLines(preserveNewlines, state);
|
|
@@ -3947,8 +3828,8 @@ const linesFinal = function* ({ previousChunks }) {
|
|
|
3947
3828
|
};
|
|
3948
3829
|
const getAppendNewlineGenerator = ({ binary, preserveNewlines, readableObjectMode, state }) => binary || preserveNewlines || readableObjectMode ? void 0 : { transform: appendNewlineGenerator.bind(void 0, state) };
|
|
3949
3830
|
const appendNewlineGenerator = function* ({ isWindowsNewline = false }, chunk) {
|
|
3950
|
-
const { unixNewline, windowsNewline, LF
|
|
3951
|
-
if (chunk.at(-1) === LF
|
|
3831
|
+
const { unixNewline, windowsNewline, LF, concatBytes } = typeof chunk === "string" ? linesStringInfo : linesUint8ArrayInfo;
|
|
3832
|
+
if (chunk.at(-1) === LF) {
|
|
3952
3833
|
yield chunk;
|
|
3953
3834
|
return;
|
|
3954
3835
|
}
|
|
@@ -3973,7 +3854,6 @@ const linesUint8ArrayInfo = {
|
|
|
3973
3854
|
LF: 10,
|
|
3974
3855
|
concatBytes: concatUint8Array
|
|
3975
3856
|
};
|
|
3976
|
-
|
|
3977
3857
|
//#endregion
|
|
3978
3858
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/transform/validate.js
|
|
3979
3859
|
const getValidateTransformInput = (writableObjectMode, optionName) => writableObjectMode ? void 0 : validateStringTransformInput.bind(void 0, optionName);
|
|
@@ -3996,7 +3876,6 @@ const validateEmptyReturn = (optionName, chunk) => {
|
|
|
3996
3876
|
Instead, \`yield\` should either be called with a value, or not be called at all. For example:
|
|
3997
3877
|
if (condition) { yield value; }`);
|
|
3998
3878
|
};
|
|
3999
|
-
|
|
4000
3879
|
//#endregion
|
|
4001
3880
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/transform/encoding-transform.js
|
|
4002
3881
|
const getEncodingTransformGenerator = (binary, encoding, skipped) => {
|
|
@@ -4008,9 +3887,9 @@ const getEncodingTransformGenerator = (binary, encoding, skipped) => {
|
|
|
4008
3887
|
final: encodingStringFinal.bind(void 0, stringDecoder)
|
|
4009
3888
|
};
|
|
4010
3889
|
};
|
|
4011
|
-
const encodingUint8ArrayGenerator = function* (textEncoder
|
|
3890
|
+
const encodingUint8ArrayGenerator = function* (textEncoder, chunk) {
|
|
4012
3891
|
if (node_buffer.Buffer.isBuffer(chunk)) yield bufferToUint8Array(chunk);
|
|
4013
|
-
else if (typeof chunk === "string") yield textEncoder
|
|
3892
|
+
else if (typeof chunk === "string") yield textEncoder.encode(chunk);
|
|
4014
3893
|
else yield chunk;
|
|
4015
3894
|
};
|
|
4016
3895
|
const encodingStringGenerator = function* (stringDecoder, chunk) {
|
|
@@ -4020,7 +3899,6 @@ const encodingStringFinal = function* (stringDecoder) {
|
|
|
4020
3899
|
const lastChunk = stringDecoder.end();
|
|
4021
3900
|
if (lastChunk !== "") yield lastChunk;
|
|
4022
3901
|
};
|
|
4023
|
-
|
|
4024
3902
|
//#endregion
|
|
4025
3903
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/transform/run-async.js
|
|
4026
3904
|
const pushChunks = (0, node_util.callbackify)(async (getChunks, state, getChunksArguments, transformStream) => {
|
|
@@ -4056,7 +3934,6 @@ const destroyTransform = (0, node_util.callbackify)(async ({ currentIterable },
|
|
|
4056
3934
|
const identityGenerator$1 = function* (chunk) {
|
|
4057
3935
|
yield chunk;
|
|
4058
3936
|
};
|
|
4059
|
-
|
|
4060
3937
|
//#endregion
|
|
4061
3938
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/transform/run-sync.js
|
|
4062
3939
|
const pushChunksSync = (getChunksSync, getChunksArguments, transformStream, done) => {
|
|
@@ -4086,7 +3963,6 @@ const generatorFinalChunksSync = function* (final, index, generators) {
|
|
|
4086
3963
|
const identityGenerator = function* (chunk) {
|
|
4087
3964
|
yield chunk;
|
|
4088
3965
|
};
|
|
4089
|
-
|
|
4090
3966
|
//#endregion
|
|
4091
3967
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/transform/generator.js
|
|
4092
3968
|
const generatorToStream = ({ value, value: { transform, final, writableObjectMode, readableObjectMode }, optionName }, { encoding }) => {
|
|
@@ -4102,7 +3978,7 @@ const generatorToStream = ({ value, value: { transform, final, writableObjectMod
|
|
|
4102
3978
|
writableHighWaterMark: (0, node_stream.getDefaultHighWaterMark)(writableObjectMode),
|
|
4103
3979
|
readableObjectMode,
|
|
4104
3980
|
readableHighWaterMark: (0, node_stream.getDefaultHighWaterMark)(readableObjectMode),
|
|
4105
|
-
transform(chunk, encoding
|
|
3981
|
+
transform(chunk, encoding, done) {
|
|
4106
3982
|
transformMethod([
|
|
4107
3983
|
chunk,
|
|
4108
3984
|
generators,
|
|
@@ -4140,7 +4016,6 @@ const addInternalGenerators = ({ transform, final, binary, writableObjectMode, r
|
|
|
4140
4016
|
})
|
|
4141
4017
|
].filter(Boolean);
|
|
4142
4018
|
};
|
|
4143
|
-
|
|
4144
4019
|
//#endregion
|
|
4145
4020
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/io/input-sync.js
|
|
4146
4021
|
const addInputOptionsSync = (fileDescriptors, options) => {
|
|
@@ -4166,7 +4041,6 @@ const validateSerializable = (newContents) => {
|
|
|
4166
4041
|
const invalidItem = newContents.find((item) => typeof item !== "string" && !isUint8Array(item));
|
|
4167
4042
|
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}.`);
|
|
4168
4043
|
};
|
|
4169
|
-
|
|
4170
4044
|
//#endregion
|
|
4171
4045
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/verbose/output.js
|
|
4172
4046
|
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)));
|
|
@@ -4187,7 +4061,6 @@ const logLine = (line, fdNumber, verboseInfo) => {
|
|
|
4187
4061
|
verboseInfo
|
|
4188
4062
|
});
|
|
4189
4063
|
};
|
|
4190
|
-
|
|
4191
4064
|
//#endregion
|
|
4192
4065
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/io/output-sync.js
|
|
4193
4066
|
const transformOutputSync = ({ fileDescriptors, syncResult: { output }, options, isMaxBuffer, verboseInfo }) => {
|
|
@@ -4207,7 +4080,7 @@ const transformOutputSync = ({ fileDescriptors, syncResult: { output }, options,
|
|
|
4207
4080
|
...state
|
|
4208
4081
|
};
|
|
4209
4082
|
};
|
|
4210
|
-
const transformOutputResultSync = ({ result, fileDescriptors, fdNumber, state, outputFiles, isMaxBuffer, verboseInfo }, { buffer, encoding, lines, stripFinalNewline
|
|
4083
|
+
const transformOutputResultSync = ({ result, fileDescriptors, fdNumber, state, outputFiles, isMaxBuffer, verboseInfo }, { buffer, encoding, lines, stripFinalNewline, maxBuffer }) => {
|
|
4211
4084
|
if (result === null) return;
|
|
4212
4085
|
const uint8ArrayResult = bufferToUint8Array(truncateMaxBufferSync(result, isMaxBuffer, maxBuffer));
|
|
4213
4086
|
const { stdioItems, objectMode } = fileDescriptors[fdNumber];
|
|
@@ -4216,7 +4089,7 @@ const transformOutputResultSync = ({ result, fileDescriptors, fdNumber, state, o
|
|
|
4216
4089
|
objectMode,
|
|
4217
4090
|
encoding,
|
|
4218
4091
|
lines,
|
|
4219
|
-
stripFinalNewline
|
|
4092
|
+
stripFinalNewline,
|
|
4220
4093
|
fdNumber
|
|
4221
4094
|
});
|
|
4222
4095
|
logOutputSync({
|
|
@@ -4245,13 +4118,13 @@ const runOutputGeneratorsSync = (chunks, stdioItems, encoding, state) => {
|
|
|
4245
4118
|
return chunks;
|
|
4246
4119
|
}
|
|
4247
4120
|
};
|
|
4248
|
-
const serializeChunks = ({ chunks, objectMode, encoding, lines, stripFinalNewline
|
|
4121
|
+
const serializeChunks = ({ chunks, objectMode, encoding, lines, stripFinalNewline, fdNumber }) => {
|
|
4249
4122
|
if (objectMode) return { serializedResult: chunks };
|
|
4250
4123
|
if (encoding === "buffer") return { serializedResult: joinToUint8Array(chunks) };
|
|
4251
4124
|
const serializedResult = joinToString(chunks, encoding);
|
|
4252
4125
|
if (lines[fdNumber]) return {
|
|
4253
4126
|
serializedResult,
|
|
4254
|
-
finalResult: splitLinesSync(serializedResult, !stripFinalNewline
|
|
4127
|
+
finalResult: splitLinesSync(serializedResult, !stripFinalNewline[fdNumber], objectMode)
|
|
4255
4128
|
};
|
|
4256
4129
|
return { serializedResult };
|
|
4257
4130
|
};
|
|
@@ -4270,16 +4143,15 @@ const logOutputSync = ({ serializedResult, fdNumber, state, verboseInfo, encodin
|
|
|
4270
4143
|
}
|
|
4271
4144
|
};
|
|
4272
4145
|
const writeToFiles = (serializedResult, stdioItems, outputFiles) => {
|
|
4273
|
-
for (const { path
|
|
4274
|
-
const pathString = typeof path
|
|
4275
|
-
if (append || outputFiles.has(pathString)) (0, node_fs.appendFileSync)(path
|
|
4146
|
+
for (const { path, append } of stdioItems.filter(({ type }) => FILE_TYPES.has(type))) {
|
|
4147
|
+
const pathString = typeof path === "string" ? path : path.toString();
|
|
4148
|
+
if (append || outputFiles.has(pathString)) (0, node_fs.appendFileSync)(path, serializedResult);
|
|
4276
4149
|
else {
|
|
4277
4150
|
outputFiles.add(pathString);
|
|
4278
|
-
(0, node_fs.writeFileSync)(path
|
|
4151
|
+
(0, node_fs.writeFileSync)(path, serializedResult);
|
|
4279
4152
|
}
|
|
4280
4153
|
}
|
|
4281
4154
|
};
|
|
4282
|
-
|
|
4283
4155
|
//#endregion
|
|
4284
4156
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/resolve/all-sync.js
|
|
4285
4157
|
const getAllSync = ([, stdout, stderr], options) => {
|
|
@@ -4291,7 +4163,6 @@ const getAllSync = ([, stdout, stderr], options) => {
|
|
|
4291
4163
|
if (isUint8Array(stdout) && isUint8Array(stderr)) return concatUint8Arrays([stdout, stderr]);
|
|
4292
4164
|
return `${stdout}${stderr}`;
|
|
4293
4165
|
};
|
|
4294
|
-
|
|
4295
4166
|
//#endregion
|
|
4296
4167
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/resolve/exit-async.js
|
|
4297
4168
|
const waitForExit = async (subprocess, context) => {
|
|
@@ -4318,7 +4189,6 @@ const waitForSuccessfulExit = async (exitPromise) => {
|
|
|
4318
4189
|
};
|
|
4319
4190
|
const isSubprocessErrorExit = (exitCode, signal) => exitCode === void 0 && signal === void 0;
|
|
4320
4191
|
const isFailedExit = (exitCode, signal) => exitCode !== 0 || signal !== null;
|
|
4321
|
-
|
|
4322
4192
|
//#endregion
|
|
4323
4193
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/resolve/exit-sync.js
|
|
4324
4194
|
const getExitResultSync = ({ error, status: exitCode, signal, output }, { maxBuffer }) => {
|
|
@@ -4335,7 +4205,6 @@ const getResultError = (error, exitCode, signal) => {
|
|
|
4335
4205
|
if (error !== void 0) return error;
|
|
4336
4206
|
return isFailedExit(exitCode, signal) ? new DiscardedError() : void 0;
|
|
4337
4207
|
};
|
|
4338
|
-
|
|
4339
4208
|
//#endregion
|
|
4340
4209
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/methods/main-sync.js
|
|
4341
4210
|
const execaCoreSync = (rawFile, rawArguments, rawOptions) => {
|
|
@@ -4428,7 +4297,7 @@ const runSubprocessSync = ({ file, commandArguments, options, command, escapedCo
|
|
|
4428
4297
|
});
|
|
4429
4298
|
}
|
|
4430
4299
|
};
|
|
4431
|
-
const normalizeSpawnSyncOptions = ({ encoding, maxBuffer
|
|
4300
|
+
const normalizeSpawnSyncOptions = ({ encoding, maxBuffer, ...options }) => ({
|
|
4432
4301
|
...options,
|
|
4433
4302
|
encoding: "buffer",
|
|
4434
4303
|
maxBuffer: getMaxBufferSync(maxBuffer)
|
|
@@ -4459,7 +4328,6 @@ const getSyncResult = ({ error, exitCode, signal, timedOut, isMaxBuffer, stdio,
|
|
|
4459
4328
|
startTime,
|
|
4460
4329
|
isSync: true
|
|
4461
4330
|
});
|
|
4462
|
-
|
|
4463
4331
|
//#endregion
|
|
4464
4332
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/ipc/get-one.js
|
|
4465
4333
|
const getOneMessage$1 = ({ anyProcess, channel, isSubprocess, ipc }, { reference = true, filter } = {}) => {
|
|
@@ -4510,7 +4378,6 @@ const throwOnStrictError = async (ipcEmitter, isSubprocess, { signal }) => {
|
|
|
4510
4378
|
const [error] = await (0, node_events.once)(ipcEmitter, "strict:error", { signal });
|
|
4511
4379
|
throw getStrictResponseError(error, isSubprocess);
|
|
4512
4380
|
};
|
|
4513
|
-
|
|
4514
4381
|
//#endregion
|
|
4515
4382
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/ipc/get-each.js
|
|
4516
4383
|
const getEachMessage$1 = ({ anyProcess, channel, isSubprocess, ipc }, { reference = true } = {}) => loopOnMessages({
|
|
@@ -4581,7 +4448,6 @@ const iterateOnMessages = async function* ({ anyProcess, channel, ipcEmitter, is
|
|
|
4581
4448
|
const throwIfStrictError = ({ error }) => {
|
|
4582
4449
|
if (error) throw error;
|
|
4583
4450
|
};
|
|
4584
|
-
|
|
4585
4451
|
//#endregion
|
|
4586
4452
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/ipc/methods.js
|
|
4587
4453
|
const addIpcMethods = (subprocess, { ipc }) => {
|
|
@@ -4621,7 +4487,6 @@ const getIpcMethods = (anyProcess, isSubprocess, ipc) => ({
|
|
|
4621
4487
|
ipc
|
|
4622
4488
|
})
|
|
4623
4489
|
});
|
|
4624
|
-
|
|
4625
4490
|
//#endregion
|
|
4626
4491
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/return/early-error.js
|
|
4627
4492
|
const handleEarlyError = ({ error, command, escapedCommand, fileDescriptors, options, startTime, verboseInfo }) => {
|
|
@@ -4678,7 +4543,6 @@ const duplex = () => new node_stream.Duplex({
|
|
|
4678
4543
|
write() {}
|
|
4679
4544
|
});
|
|
4680
4545
|
const handleDummyPromise = async (error, verboseInfo, options) => handleResult(error, verboseInfo, options);
|
|
4681
|
-
|
|
4682
4546
|
//#endregion
|
|
4683
4547
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/stdio/handle-async.js
|
|
4684
4548
|
const handleStdioAsync = (options, verboseInfo) => handleStdio(addPropertiesAsync, options, verboseInfo, false);
|
|
@@ -4719,7 +4583,6 @@ const addPropertiesAsync = {
|
|
|
4719
4583
|
uint8Array: forbiddenIfAsync
|
|
4720
4584
|
}
|
|
4721
4585
|
};
|
|
4722
|
-
|
|
4723
4586
|
//#endregion
|
|
4724
4587
|
//#region ../../node_modules/.pnpm/@sindresorhus+merge-streams@4.0.0/node_modules/@sindresorhus/merge-streams/index.js
|
|
4725
4588
|
function mergeStreams(streams) {
|
|
@@ -4802,7 +4665,7 @@ const onInputStreamsUnpipe = async (passThroughStream, streams, unpipeEvent, { s
|
|
|
4802
4665
|
const validateStream = (stream) => {
|
|
4803
4666
|
if (typeof stream?.pipe !== "function") throw new TypeError(`Expected a readable stream, got: \`${typeof stream}\`.`);
|
|
4804
4667
|
};
|
|
4805
|
-
const endWhenStreamsDone = async ({ passThroughStream, stream, streams, ended, aborted
|
|
4668
|
+
const endWhenStreamsDone = async ({ passThroughStream, stream, streams, ended, aborted, onFinished, unpipeEvent }) => {
|
|
4806
4669
|
updateMaxListeners(passThroughStream, PASSTHROUGH_LISTENERS_PER_STREAM);
|
|
4807
4670
|
const controller = new AbortController();
|
|
4808
4671
|
try {
|
|
@@ -4813,14 +4676,14 @@ const endWhenStreamsDone = async ({ passThroughStream, stream, streams, ended, a
|
|
|
4813
4676
|
stream,
|
|
4814
4677
|
streams,
|
|
4815
4678
|
ended,
|
|
4816
|
-
aborted
|
|
4679
|
+
aborted,
|
|
4817
4680
|
controller
|
|
4818
4681
|
}),
|
|
4819
4682
|
onInputStreamUnpipe({
|
|
4820
4683
|
stream,
|
|
4821
4684
|
streams,
|
|
4822
4685
|
ended,
|
|
4823
|
-
aborted
|
|
4686
|
+
aborted,
|
|
4824
4687
|
unpipeEvent,
|
|
4825
4688
|
controller
|
|
4826
4689
|
})
|
|
@@ -4829,7 +4692,7 @@ const endWhenStreamsDone = async ({ passThroughStream, stream, streams, ended, a
|
|
|
4829
4692
|
controller.abort();
|
|
4830
4693
|
updateMaxListeners(passThroughStream, -PASSTHROUGH_LISTENERS_PER_STREAM);
|
|
4831
4694
|
}
|
|
4832
|
-
if (streams.size > 0 && streams.size === ended.size + aborted
|
|
4695
|
+
if (streams.size > 0 && streams.size === ended.size + aborted.size) if (ended.size === 0 && aborted.size > 0) abortStream(passThroughStream);
|
|
4833
4696
|
else endStream(passThroughStream);
|
|
4834
4697
|
};
|
|
4835
4698
|
const afterMergedStreamFinished = async (onFinished, stream, { signal }) => {
|
|
@@ -4840,7 +4703,7 @@ const afterMergedStreamFinished = async (onFinished, stream, { signal }) => {
|
|
|
4840
4703
|
if (!signal.aborted) errorOrAbortStream(stream, error);
|
|
4841
4704
|
}
|
|
4842
4705
|
};
|
|
4843
|
-
const onInputStreamEnd = async ({ passThroughStream, stream, streams, ended, aborted
|
|
4706
|
+
const onInputStreamEnd = async ({ passThroughStream, stream, streams, ended, aborted, controller: { signal } }) => {
|
|
4844
4707
|
try {
|
|
4845
4708
|
await (0, node_stream_promises.finished)(stream, {
|
|
4846
4709
|
signal,
|
|
@@ -4851,16 +4714,16 @@ const onInputStreamEnd = async ({ passThroughStream, stream, streams, ended, abo
|
|
|
4851
4714
|
if (streams.has(stream)) ended.add(stream);
|
|
4852
4715
|
} catch (error) {
|
|
4853
4716
|
if (signal.aborted || !streams.has(stream)) return;
|
|
4854
|
-
if (isAbortError(error)) aborted
|
|
4717
|
+
if (isAbortError(error)) aborted.add(stream);
|
|
4855
4718
|
else errorStream(passThroughStream, error);
|
|
4856
4719
|
}
|
|
4857
4720
|
};
|
|
4858
|
-
const onInputStreamUnpipe = async ({ stream, streams, ended, aborted
|
|
4721
|
+
const onInputStreamUnpipe = async ({ stream, streams, ended, aborted, unpipeEvent, controller: { signal } }) => {
|
|
4859
4722
|
await (0, node_events.once)(stream, unpipeEvent, { signal });
|
|
4860
4723
|
if (!stream.readable) return (0, node_events.once)(signal, "abort", { signal });
|
|
4861
4724
|
streams.delete(stream);
|
|
4862
4725
|
ended.delete(stream);
|
|
4863
|
-
aborted
|
|
4726
|
+
aborted.delete(stream);
|
|
4864
4727
|
};
|
|
4865
4728
|
const endStream = (stream) => {
|
|
4866
4729
|
if (stream.writable) stream.end();
|
|
@@ -4880,13 +4743,12 @@ const errorStream = (stream, error) => {
|
|
|
4880
4743
|
}
|
|
4881
4744
|
};
|
|
4882
4745
|
const noop = () => {};
|
|
4883
|
-
const updateMaxListeners = (passThroughStream, increment
|
|
4746
|
+
const updateMaxListeners = (passThroughStream, increment) => {
|
|
4884
4747
|
const maxListeners = passThroughStream.getMaxListeners();
|
|
4885
|
-
if (maxListeners !== 0 && maxListeners !== Number.POSITIVE_INFINITY) passThroughStream.setMaxListeners(maxListeners + increment
|
|
4748
|
+
if (maxListeners !== 0 && maxListeners !== Number.POSITIVE_INFINITY) passThroughStream.setMaxListeners(maxListeners + increment);
|
|
4886
4749
|
};
|
|
4887
4750
|
const PASSTHROUGH_LISTENERS_COUNT = 2;
|
|
4888
4751
|
const PASSTHROUGH_LISTENERS_PER_STREAM = 1;
|
|
4889
|
-
|
|
4890
4752
|
//#endregion
|
|
4891
4753
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/io/pipeline.js
|
|
4892
4754
|
const pipeStreams = (source, destination) => {
|
|
@@ -4922,7 +4784,6 @@ const onDestinationFinish = async (source, destination) => {
|
|
|
4922
4784
|
const abortSourceStream = (source) => {
|
|
4923
4785
|
if (source.readable) source.destroy();
|
|
4924
4786
|
};
|
|
4925
|
-
|
|
4926
4787
|
//#endregion
|
|
4927
4788
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/io/output-async.js
|
|
4928
4789
|
const pipeOutputAsync = (subprocess, fileDescriptors, controller) => {
|
|
@@ -4963,7 +4824,6 @@ const setStandardStreamMaxListeners = (stream, { signal }) => {
|
|
|
4963
4824
|
if (isStandardStream(stream)) incrementMaxListeners(stream, MAX_LISTENERS_INCREMENT, signal);
|
|
4964
4825
|
};
|
|
4965
4826
|
const MAX_LISTENERS_INCREMENT = 2;
|
|
4966
|
-
|
|
4967
4827
|
//#endregion
|
|
4968
4828
|
//#region ../../node_modules/.pnpm/signal-exit@4.1.0/node_modules/signal-exit/dist/mjs/signals.js
|
|
4969
4829
|
/**
|
|
@@ -4996,10 +4856,9 @@ const signals = [];
|
|
|
4996
4856
|
signals.push("SIGHUP", "SIGINT", "SIGTERM");
|
|
4997
4857
|
if (process.platform !== "win32") signals.push("SIGALRM", "SIGABRT", "SIGVTALRM", "SIGXCPU", "SIGXFSZ", "SIGUSR2", "SIGTRAP", "SIGSYS", "SIGQUIT", "SIGIOT");
|
|
4998
4858
|
if (process.platform === "linux") signals.push("SIGIO", "SIGPOLL", "SIGPWR", "SIGSTKFLT");
|
|
4999
|
-
|
|
5000
4859
|
//#endregion
|
|
5001
4860
|
//#region ../../node_modules/.pnpm/signal-exit@4.1.0/node_modules/signal-exit/dist/mjs/index.js
|
|
5002
|
-
const processOk = (process
|
|
4861
|
+
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";
|
|
5003
4862
|
const kExitEmitter = Symbol.for("signal-exit emitter");
|
|
5004
4863
|
const global$1 = globalThis;
|
|
5005
4864
|
const ObjectDefineProperty = Object.defineProperty.bind(Object);
|
|
@@ -5028,12 +4887,12 @@ var Emitter = class {
|
|
|
5028
4887
|
}
|
|
5029
4888
|
removeListener(ev, fn) {
|
|
5030
4889
|
const list = this.listeners[ev];
|
|
5031
|
-
const i
|
|
4890
|
+
const i = list.indexOf(fn);
|
|
5032
4891
|
/* c8 ignore start */
|
|
5033
|
-
if (i
|
|
4892
|
+
if (i === -1) return;
|
|
5034
4893
|
/* c8 ignore stop */
|
|
5035
|
-
if (i
|
|
5036
|
-
else list.splice(i
|
|
4894
|
+
if (i === 0 && list.length === 1) list.length = 0;
|
|
4895
|
+
else list.splice(i, 1);
|
|
5037
4896
|
}
|
|
5038
4897
|
emit(ev, code, signal) {
|
|
5039
4898
|
if (this.emitted[ev]) return false;
|
|
@@ -5075,27 +4934,27 @@ var SignalExit = class extends SignalExitBase {
|
|
|
5075
4934
|
#originalProcessReallyExit;
|
|
5076
4935
|
#sigListeners = {};
|
|
5077
4936
|
#loaded = false;
|
|
5078
|
-
constructor(process
|
|
4937
|
+
constructor(process) {
|
|
5079
4938
|
super();
|
|
5080
|
-
this.#process = process
|
|
4939
|
+
this.#process = process;
|
|
5081
4940
|
this.#sigListeners = {};
|
|
5082
4941
|
for (const sig of signals) this.#sigListeners[sig] = () => {
|
|
5083
4942
|
const listeners = this.#process.listeners(sig);
|
|
5084
|
-
let { count
|
|
4943
|
+
let { count } = this.#emitter;
|
|
5085
4944
|
/* c8 ignore start */
|
|
5086
|
-
const p
|
|
5087
|
-
if (typeof p
|
|
4945
|
+
const p = process;
|
|
4946
|
+
if (typeof p.__signal_exit_emitter__ === "object" && typeof p.__signal_exit_emitter__.count === "number") count += p.__signal_exit_emitter__.count;
|
|
5088
4947
|
/* c8 ignore stop */
|
|
5089
|
-
if (listeners.length === count
|
|
4948
|
+
if (listeners.length === count) {
|
|
5090
4949
|
this.unload();
|
|
5091
4950
|
const ret = this.#emitter.emit("exit", null, sig);
|
|
5092
4951
|
/* c8 ignore start */
|
|
5093
4952
|
const s = sig === "SIGHUP" ? this.#hupSig : sig;
|
|
5094
|
-
if (!ret) process
|
|
4953
|
+
if (!ret) process.kill(process.pid, s);
|
|
5095
4954
|
}
|
|
5096
4955
|
};
|
|
5097
|
-
this.#originalProcessReallyExit = process
|
|
5098
|
-
this.#originalProcessEmit = process
|
|
4956
|
+
this.#originalProcessReallyExit = process.reallyExit;
|
|
4957
|
+
this.#originalProcessEmit = process.emit;
|
|
5099
4958
|
}
|
|
5100
4959
|
onExit(cb, opts) {
|
|
5101
4960
|
/* c8 ignore start */
|
|
@@ -5117,8 +4976,8 @@ var SignalExit = class extends SignalExitBase {
|
|
|
5117
4976
|
const fn = this.#sigListeners[sig];
|
|
5118
4977
|
if (fn) this.#process.on(sig, fn);
|
|
5119
4978
|
} catch (_) {}
|
|
5120
|
-
this.#process.emit = (ev, ...a
|
|
5121
|
-
return this.#processEmit(ev, ...a
|
|
4979
|
+
this.#process.emit = (ev, ...a) => {
|
|
4980
|
+
return this.#processEmit(ev, ...a);
|
|
5122
4981
|
};
|
|
5123
4982
|
this.#process.reallyExit = (code) => {
|
|
5124
4983
|
return this.#processReallyExit(code);
|
|
@@ -5164,7 +5023,6 @@ var SignalExit = class extends SignalExitBase {
|
|
|
5164
5023
|
};
|
|
5165
5024
|
const process$1 = globalThis.process;
|
|
5166
5025
|
const { onExit, load, unload } = signalExitWrap(processOk(process$1) ? new SignalExit(process$1) : new SignalExitFallback());
|
|
5167
|
-
|
|
5168
5026
|
//#endregion
|
|
5169
5027
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/terminate/cleanup.js
|
|
5170
5028
|
const cleanupOnExit = (subprocess, { cleanup, detached }, { signal }) => {
|
|
@@ -5176,7 +5034,6 @@ const cleanupOnExit = (subprocess, { cleanup, detached }, { signal }) => {
|
|
|
5176
5034
|
removeExitHandler();
|
|
5177
5035
|
});
|
|
5178
5036
|
};
|
|
5179
|
-
|
|
5180
5037
|
//#endregion
|
|
5181
5038
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/pipe/pipe-arguments.js
|
|
5182
5039
|
const normalizePipeArguments = ({ source, sourcePromise, boundOptions, createNested }, ...pipeArguments) => {
|
|
@@ -5244,7 +5101,6 @@ const getSourceStream = (source, from) => {
|
|
|
5244
5101
|
return { sourceError: error };
|
|
5245
5102
|
}
|
|
5246
5103
|
};
|
|
5247
|
-
|
|
5248
5104
|
//#endregion
|
|
5249
5105
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/pipe/throw.js
|
|
5250
5106
|
const handlePipeArgumentsError = ({ sourceStream, sourceError, destinationStream, destinationError, fileDescriptors, sourceOptions, startTime }) => {
|
|
@@ -5282,7 +5138,6 @@ const createNonCommandError = ({ error, fileDescriptors, sourceOptions, startTim
|
|
|
5282
5138
|
isSync: false
|
|
5283
5139
|
});
|
|
5284
5140
|
const PIPE_COMMAND_MESSAGE = "source.pipe(destination)";
|
|
5285
|
-
|
|
5286
5141
|
//#endregion
|
|
5287
5142
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/pipe/sequence.js
|
|
5288
5143
|
const waitForBothSubprocesses = async (subprocessPromises) => {
|
|
@@ -5292,7 +5147,6 @@ const waitForBothSubprocesses = async (subprocessPromises) => {
|
|
|
5292
5147
|
if (sourceStatus === "rejected") throw sourceResult;
|
|
5293
5148
|
return destinationResult;
|
|
5294
5149
|
};
|
|
5295
|
-
|
|
5296
5150
|
//#endregion
|
|
5297
5151
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/pipe/streaming.js
|
|
5298
5152
|
const pipeSubprocessStream = (sourceStream, destinationStream, maxListenersController) => {
|
|
@@ -5326,7 +5180,6 @@ const cleanupMergedStreamsMap = async (destinationStream) => {
|
|
|
5326
5180
|
const MERGED_STREAMS = /* @__PURE__ */ new WeakMap();
|
|
5327
5181
|
const SOURCE_LISTENERS_PER_PIPE = 2;
|
|
5328
5182
|
const DESTINATION_LISTENERS_PER_PIPE = 1;
|
|
5329
|
-
|
|
5330
5183
|
//#endregion
|
|
5331
5184
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/pipe/abort.js
|
|
5332
5185
|
const unpipeOnAbort = (unpipeSignal, unpipeContext) => unpipeSignal === void 0 ? [] : [unpipeOnSignalAbort(unpipeSignal, unpipeContext)];
|
|
@@ -5340,7 +5193,6 @@ const unpipeOnSignalAbort = async (unpipeSignal, { sourceStream, mergedStream, f
|
|
|
5340
5193
|
startTime
|
|
5341
5194
|
});
|
|
5342
5195
|
};
|
|
5343
|
-
|
|
5344
5196
|
//#endregion
|
|
5345
5197
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/pipe/setup.js
|
|
5346
5198
|
const pipeToSubprocess = (sourceInfo, ...pipeArguments) => {
|
|
@@ -5351,7 +5203,7 @@ const pipeToSubprocess = (sourceInfo, ...pipeArguments) => {
|
|
|
5351
5203
|
...pipeArguments[0]
|
|
5352
5204
|
}
|
|
5353
5205
|
});
|
|
5354
|
-
const { destination
|
|
5206
|
+
const { destination, ...normalizedInfo } = normalizePipeArguments(sourceInfo, ...pipeArguments);
|
|
5355
5207
|
const promise = handlePipePromise({
|
|
5356
5208
|
...normalizedInfo,
|
|
5357
5209
|
destination
|
|
@@ -5390,7 +5242,6 @@ const handlePipePromise = async ({ sourcePromise, sourceStream, sourceOptions, s
|
|
|
5390
5242
|
}
|
|
5391
5243
|
};
|
|
5392
5244
|
const getSubprocessPromises = (sourcePromise, destination) => Promise.allSettled([sourcePromise, destination]);
|
|
5393
|
-
|
|
5394
5245
|
//#endregion
|
|
5395
5246
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/io/iterate.js
|
|
5396
5247
|
const iterateOnSubprocessStream = ({ subprocessStdout, subprocess, binary, shouldEncode, encoding, preserveNewlines }) => {
|
|
@@ -5413,7 +5264,7 @@ const stopReadingOnExit = async (subprocess, controller) => {
|
|
|
5413
5264
|
controller.abort();
|
|
5414
5265
|
}
|
|
5415
5266
|
};
|
|
5416
|
-
const iterateForResult = ({ stream, onStreamEnd, lines, encoding, stripFinalNewline
|
|
5267
|
+
const iterateForResult = ({ stream, onStreamEnd, lines, encoding, stripFinalNewline, allMixed }) => {
|
|
5417
5268
|
const controller = new AbortController();
|
|
5418
5269
|
stopReadingOnStreamEnd(onStreamEnd, controller, stream);
|
|
5419
5270
|
const objectMode = stream.readableObjectMode && !allMixed;
|
|
@@ -5424,7 +5275,7 @@ const iterateForResult = ({ stream, onStreamEnd, lines, encoding, stripFinalNewl
|
|
|
5424
5275
|
shouldEncode: !objectMode,
|
|
5425
5276
|
encoding,
|
|
5426
5277
|
shouldSplit: !objectMode && lines,
|
|
5427
|
-
preserveNewlines: !stripFinalNewline
|
|
5278
|
+
preserveNewlines: !stripFinalNewline
|
|
5428
5279
|
});
|
|
5429
5280
|
};
|
|
5430
5281
|
const stopReadingOnStreamEnd = async (onStreamEnd, controller, stream) => {
|
|
@@ -5470,10 +5321,9 @@ const iterateOnData = async function* ({ onStdoutChunk, controller, binary, shou
|
|
|
5470
5321
|
}
|
|
5471
5322
|
};
|
|
5472
5323
|
const getGenerators = ({ binary, shouldEncode, encoding, shouldSplit, preserveNewlines }) => [getEncodingTransformGenerator(binary, encoding, !shouldEncode), getSplitLinesGenerator(binary, preserveNewlines, !shouldSplit, {})].filter(Boolean);
|
|
5473
|
-
|
|
5474
5324
|
//#endregion
|
|
5475
5325
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/io/contents.js
|
|
5476
|
-
const getStreamOutput = async ({ stream, onStreamEnd, fdNumber, encoding, buffer, maxBuffer, lines, allMixed, stripFinalNewline
|
|
5326
|
+
const getStreamOutput = async ({ stream, onStreamEnd, fdNumber, encoding, buffer, maxBuffer, lines, allMixed, stripFinalNewline, verboseInfo, streamInfo }) => {
|
|
5477
5327
|
const logPromise = logOutputAsync({
|
|
5478
5328
|
stream,
|
|
5479
5329
|
onStreamEnd,
|
|
@@ -5492,7 +5342,7 @@ const getStreamOutput = async ({ stream, onStreamEnd, fdNumber, encoding, buffer
|
|
|
5492
5342
|
onStreamEnd,
|
|
5493
5343
|
lines,
|
|
5494
5344
|
encoding,
|
|
5495
|
-
stripFinalNewline: getStripFinalNewline(stripFinalNewline
|
|
5345
|
+
stripFinalNewline: getStripFinalNewline(stripFinalNewline, fdNumber),
|
|
5496
5346
|
allMixed
|
|
5497
5347
|
});
|
|
5498
5348
|
const [output] = await Promise.all([getStreamContents({
|
|
@@ -5549,7 +5399,6 @@ const getBufferedData = async (streamPromise) => {
|
|
|
5549
5399
|
}
|
|
5550
5400
|
};
|
|
5551
5401
|
const handleBufferedData = ({ bufferedData }) => isArrayBuffer(bufferedData) ? new Uint8Array(bufferedData) : bufferedData;
|
|
5552
|
-
|
|
5553
5402
|
//#endregion
|
|
5554
5403
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/resolve/wait-stream.js
|
|
5555
5404
|
const waitForStream = async (stream, fdNumber, streamInfo, { isSameDirection, stopOnExit = false } = {}) => {
|
|
@@ -5592,10 +5441,9 @@ const shouldIgnoreStreamError = (error, fdNumber, streamInfo, isSameDirection =
|
|
|
5592
5441
|
const isInputFileDescriptor = ({ fileDescriptors }, fdNumber) => fdNumber !== "all" && fileDescriptors[fdNumber].direction === "input";
|
|
5593
5442
|
const isStreamAbort = (error) => error?.code === "ERR_STREAM_PREMATURE_CLOSE";
|
|
5594
5443
|
const isStreamEpipe = (error) => error?.code === "EPIPE";
|
|
5595
|
-
|
|
5596
5444
|
//#endregion
|
|
5597
5445
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/resolve/stdio.js
|
|
5598
|
-
const waitForStdioStreams = ({ subprocess, encoding, buffer, maxBuffer, lines, stripFinalNewline
|
|
5446
|
+
const waitForStdioStreams = ({ subprocess, encoding, buffer, maxBuffer, lines, stripFinalNewline, verboseInfo, streamInfo }) => subprocess.stdio.map((stream, fdNumber) => waitForSubprocessStream({
|
|
5599
5447
|
stream,
|
|
5600
5448
|
fdNumber,
|
|
5601
5449
|
encoding,
|
|
@@ -5603,11 +5451,11 @@ const waitForStdioStreams = ({ subprocess, encoding, buffer, maxBuffer, lines, s
|
|
|
5603
5451
|
maxBuffer: maxBuffer[fdNumber],
|
|
5604
5452
|
lines: lines[fdNumber],
|
|
5605
5453
|
allMixed: false,
|
|
5606
|
-
stripFinalNewline
|
|
5454
|
+
stripFinalNewline,
|
|
5607
5455
|
verboseInfo,
|
|
5608
5456
|
streamInfo
|
|
5609
5457
|
}));
|
|
5610
|
-
const waitForSubprocessStream = async ({ stream, fdNumber, encoding, buffer, maxBuffer, lines, allMixed, stripFinalNewline
|
|
5458
|
+
const waitForSubprocessStream = async ({ stream, fdNumber, encoding, buffer, maxBuffer, lines, allMixed, stripFinalNewline, verboseInfo, streamInfo }) => {
|
|
5611
5459
|
if (!stream) return;
|
|
5612
5460
|
const onStreamEnd = waitForStream(stream, fdNumber, streamInfo);
|
|
5613
5461
|
if (isInputFileDescriptor(streamInfo, fdNumber)) {
|
|
@@ -5623,24 +5471,23 @@ const waitForSubprocessStream = async ({ stream, fdNumber, encoding, buffer, max
|
|
|
5623
5471
|
maxBuffer,
|
|
5624
5472
|
lines,
|
|
5625
5473
|
allMixed,
|
|
5626
|
-
stripFinalNewline
|
|
5474
|
+
stripFinalNewline,
|
|
5627
5475
|
verboseInfo,
|
|
5628
5476
|
streamInfo
|
|
5629
5477
|
}), onStreamEnd]);
|
|
5630
5478
|
return output;
|
|
5631
5479
|
};
|
|
5632
|
-
|
|
5633
5480
|
//#endregion
|
|
5634
5481
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/resolve/all-async.js
|
|
5635
5482
|
const makeAllStream = ({ stdout, stderr }, { all }) => all && (stdout || stderr) ? mergeStreams([stdout, stderr].filter(Boolean)) : void 0;
|
|
5636
|
-
const waitForAllStream = ({ subprocess, encoding, buffer, maxBuffer, lines, stripFinalNewline
|
|
5483
|
+
const waitForAllStream = ({ subprocess, encoding, buffer, maxBuffer, lines, stripFinalNewline, verboseInfo, streamInfo }) => waitForSubprocessStream({
|
|
5637
5484
|
...getAllStream(subprocess, buffer),
|
|
5638
5485
|
fdNumber: "all",
|
|
5639
5486
|
encoding,
|
|
5640
5487
|
maxBuffer: maxBuffer[1] + maxBuffer[2],
|
|
5641
5488
|
lines: lines[1] || lines[2],
|
|
5642
5489
|
allMixed: getAllMixed(subprocess),
|
|
5643
|
-
stripFinalNewline
|
|
5490
|
+
stripFinalNewline,
|
|
5644
5491
|
verboseInfo,
|
|
5645
5492
|
streamInfo
|
|
5646
5493
|
});
|
|
@@ -5664,7 +5511,6 @@ const getAllStream = ({ stdout, stderr, all }, [, bufferStdout, bufferStderr]) =
|
|
|
5664
5511
|
};
|
|
5665
5512
|
};
|
|
5666
5513
|
const getAllMixed = ({ all, stdout, stderr }) => all && stdout && stderr && stdout.readableObjectMode !== stderr.readableObjectMode;
|
|
5667
|
-
|
|
5668
5514
|
//#endregion
|
|
5669
5515
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/verbose/ipc.js
|
|
5670
5516
|
const shouldLogIpc = (verboseInfo) => isFullVerbose(verboseInfo, "ipc");
|
|
@@ -5676,12 +5522,11 @@ const logIpcOutput = (message, verboseInfo) => {
|
|
|
5676
5522
|
verboseInfo
|
|
5677
5523
|
});
|
|
5678
5524
|
};
|
|
5679
|
-
|
|
5680
5525
|
//#endregion
|
|
5681
5526
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/ipc/buffer-messages.js
|
|
5682
5527
|
const waitForIpcOutput = async ({ subprocess, buffer: bufferArray, maxBuffer: maxBufferArray, ipc, ipcOutput, verboseInfo }) => {
|
|
5683
5528
|
if (!ipc) return ipcOutput;
|
|
5684
|
-
const isVerbose
|
|
5529
|
+
const isVerbose = shouldLogIpc(verboseInfo);
|
|
5685
5530
|
const buffer = getFdSpecificValue(bufferArray, "ipc");
|
|
5686
5531
|
const maxBuffer = getFdSpecificValue(maxBufferArray, "ipc");
|
|
5687
5532
|
for await (const message of loopOnMessages({
|
|
@@ -5696,7 +5541,7 @@ const waitForIpcOutput = async ({ subprocess, buffer: bufferArray, maxBuffer: ma
|
|
|
5696
5541
|
checkIpcMaxBuffer(subprocess, ipcOutput, maxBuffer);
|
|
5697
5542
|
ipcOutput.push(message);
|
|
5698
5543
|
}
|
|
5699
|
-
if (isVerbose
|
|
5544
|
+
if (isVerbose) logIpcOutput(message, verboseInfo);
|
|
5700
5545
|
}
|
|
5701
5546
|
return ipcOutput;
|
|
5702
5547
|
};
|
|
@@ -5704,10 +5549,9 @@ const getBufferedIpcOutput = async (ipcOutputPromise, ipcOutput) => {
|
|
|
5704
5549
|
await Promise.allSettled([ipcOutputPromise]);
|
|
5705
5550
|
return ipcOutput;
|
|
5706
5551
|
};
|
|
5707
|
-
|
|
5708
5552
|
//#endregion
|
|
5709
5553
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/resolve/wait-subprocess.js
|
|
5710
|
-
const waitForSubprocessResult = async ({ subprocess, options: { encoding, buffer, maxBuffer, lines, timeoutDuration: timeout, cancelSignal, gracefulCancel, forceKillAfterDelay, stripFinalNewline
|
|
5554
|
+
const waitForSubprocessResult = async ({ subprocess, options: { encoding, buffer, maxBuffer, lines, timeoutDuration: timeout, cancelSignal, gracefulCancel, forceKillAfterDelay, stripFinalNewline, ipc, ipcInput }, context, verboseInfo, fileDescriptors, originalStreams, onInternalError, controller }) => {
|
|
5711
5555
|
const exitPromise = waitForExit(subprocess, context);
|
|
5712
5556
|
const streamInfo = {
|
|
5713
5557
|
originalStreams,
|
|
@@ -5722,7 +5566,7 @@ const waitForSubprocessResult = async ({ subprocess, options: { encoding, buffer
|
|
|
5722
5566
|
buffer,
|
|
5723
5567
|
maxBuffer,
|
|
5724
5568
|
lines,
|
|
5725
|
-
stripFinalNewline
|
|
5569
|
+
stripFinalNewline,
|
|
5726
5570
|
verboseInfo,
|
|
5727
5571
|
streamInfo
|
|
5728
5572
|
});
|
|
@@ -5732,7 +5576,7 @@ const waitForSubprocessResult = async ({ subprocess, options: { encoding, buffer
|
|
|
5732
5576
|
buffer,
|
|
5733
5577
|
maxBuffer,
|
|
5734
5578
|
lines,
|
|
5735
|
-
stripFinalNewline
|
|
5579
|
+
stripFinalNewline,
|
|
5736
5580
|
verboseInfo,
|
|
5737
5581
|
streamInfo
|
|
5738
5582
|
});
|
|
@@ -5800,7 +5644,6 @@ const throwOnSubprocessError = async (subprocess, { signal }) => {
|
|
|
5800
5644
|
const [error] = await (0, node_events.once)(subprocess, "error", { signal });
|
|
5801
5645
|
throw error;
|
|
5802
5646
|
};
|
|
5803
|
-
|
|
5804
5647
|
//#endregion
|
|
5805
5648
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/convert/concurrent.js
|
|
5806
5649
|
const initializeConcurrentStreams = () => ({
|
|
@@ -5824,7 +5667,6 @@ const waitForConcurrentStreams = async ({ resolve, promises }, subprocess) => {
|
|
|
5824
5667
|
const [isSubprocessExit] = await Promise.race([Promise.allSettled([true, subprocess]), Promise.all([false, ...promises])]);
|
|
5825
5668
|
return !isSubprocessExit;
|
|
5826
5669
|
};
|
|
5827
|
-
|
|
5828
5670
|
//#endregion
|
|
5829
5671
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/convert/shared.js
|
|
5830
5672
|
const safeWaitForSubprocessStdin = async (subprocessStdin) => {
|
|
@@ -5861,7 +5703,6 @@ const destroyOtherStream = (stream, isOpen, error) => {
|
|
|
5861
5703
|
if (error && !isStreamAbort(error)) stream.destroy(error);
|
|
5862
5704
|
else if (isOpen) stream.destroy();
|
|
5863
5705
|
};
|
|
5864
|
-
|
|
5865
5706
|
//#endregion
|
|
5866
5707
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/convert/readable.js
|
|
5867
5708
|
const createReadable = ({ subprocess, concurrentStreams, encoding }, { from, binary: binaryOption = true, preserveNewlines = true } = {}) => {
|
|
@@ -5875,7 +5716,7 @@ const createReadable = ({ subprocess, concurrentStreams, encoding }, { from, bin
|
|
|
5875
5716
|
encoding,
|
|
5876
5717
|
preserveNewlines
|
|
5877
5718
|
});
|
|
5878
|
-
const readable
|
|
5719
|
+
const readable = new node_stream.Readable({
|
|
5879
5720
|
read,
|
|
5880
5721
|
destroy: (0, node_util.callbackify)(onReadableDestroy.bind(void 0, {
|
|
5881
5722
|
subprocessStdout,
|
|
@@ -5889,10 +5730,10 @@ const createReadable = ({ subprocess, concurrentStreams, encoding }, { from, bin
|
|
|
5889
5730
|
onStdoutFinished({
|
|
5890
5731
|
subprocessStdout,
|
|
5891
5732
|
onStdoutDataDone,
|
|
5892
|
-
readable
|
|
5733
|
+
readable,
|
|
5893
5734
|
subprocess
|
|
5894
5735
|
});
|
|
5895
|
-
return readable
|
|
5736
|
+
return readable;
|
|
5896
5737
|
};
|
|
5897
5738
|
const getSubprocessStdout = (subprocess, from, concurrentStreams) => {
|
|
5898
5739
|
const subprocessStdout = getFromStream(subprocess, from);
|
|
@@ -5927,23 +5768,23 @@ const getReadableMethods = ({ subprocessStdout, subprocess, binary, encoding, pr
|
|
|
5927
5768
|
onStdoutDataDone
|
|
5928
5769
|
};
|
|
5929
5770
|
};
|
|
5930
|
-
const onRead = async (readable
|
|
5771
|
+
const onRead = async (readable, onStdoutData, onStdoutDataDone) => {
|
|
5931
5772
|
try {
|
|
5932
5773
|
const { value, done } = await onStdoutData.next();
|
|
5933
5774
|
if (done) onStdoutDataDone.resolve();
|
|
5934
|
-
else readable
|
|
5775
|
+
else readable.push(value);
|
|
5935
5776
|
} catch {}
|
|
5936
5777
|
};
|
|
5937
|
-
const onStdoutFinished = async ({ subprocessStdout, onStdoutDataDone, readable
|
|
5778
|
+
const onStdoutFinished = async ({ subprocessStdout, onStdoutDataDone, readable, subprocess, subprocessStdin }) => {
|
|
5938
5779
|
try {
|
|
5939
5780
|
await waitForSubprocessStdout(subprocessStdout);
|
|
5940
5781
|
await subprocess;
|
|
5941
5782
|
await safeWaitForSubprocessStdin(subprocessStdin);
|
|
5942
5783
|
await onStdoutDataDone;
|
|
5943
|
-
if (readable
|
|
5784
|
+
if (readable.readable) readable.push(null);
|
|
5944
5785
|
} catch (error) {
|
|
5945
5786
|
await safeWaitForSubprocessStdin(subprocessStdin);
|
|
5946
|
-
destroyOtherReadable(readable
|
|
5787
|
+
destroyOtherReadable(readable, error);
|
|
5947
5788
|
}
|
|
5948
5789
|
};
|
|
5949
5790
|
const onReadableDestroy = async ({ subprocessStdout, subprocess, waitReadableDestroy }, error) => {
|
|
@@ -5955,12 +5796,11 @@ const onReadableDestroy = async ({ subprocessStdout, subprocess, waitReadableDes
|
|
|
5955
5796
|
const destroyOtherReadable = (stream, error) => {
|
|
5956
5797
|
destroyOtherStream(stream, stream.readable, error);
|
|
5957
5798
|
};
|
|
5958
|
-
|
|
5959
5799
|
//#endregion
|
|
5960
5800
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/convert/writable.js
|
|
5961
5801
|
const createWritable = ({ subprocess, concurrentStreams }, { to } = {}) => {
|
|
5962
5802
|
const { subprocessStdin, waitWritableFinal, waitWritableDestroy } = getSubprocessStdin(subprocess, to, concurrentStreams);
|
|
5963
|
-
const writable
|
|
5803
|
+
const writable = new node_stream.Writable({
|
|
5964
5804
|
...getWritableMethods(subprocessStdin, subprocess, waitWritableFinal),
|
|
5965
5805
|
destroy: (0, node_util.callbackify)(onWritableDestroy.bind(void 0, {
|
|
5966
5806
|
subprocessStdin,
|
|
@@ -5971,8 +5811,8 @@ const createWritable = ({ subprocess, concurrentStreams }, { to } = {}) => {
|
|
|
5971
5811
|
highWaterMark: subprocessStdin.writableHighWaterMark,
|
|
5972
5812
|
objectMode: subprocessStdin.writableObjectMode
|
|
5973
5813
|
});
|
|
5974
|
-
onStdinFinished(subprocessStdin, writable
|
|
5975
|
-
return writable
|
|
5814
|
+
onStdinFinished(subprocessStdin, writable);
|
|
5815
|
+
return writable;
|
|
5976
5816
|
};
|
|
5977
5817
|
const getSubprocessStdin = (subprocess, to, concurrentStreams) => {
|
|
5978
5818
|
const subprocessStdin = getToStream(subprocess, to);
|
|
@@ -5996,13 +5836,13 @@ const onWritableFinal = async (subprocessStdin, subprocess, waitWritableFinal) =
|
|
|
5996
5836
|
await subprocess;
|
|
5997
5837
|
}
|
|
5998
5838
|
};
|
|
5999
|
-
const onStdinFinished = async (subprocessStdin, writable
|
|
5839
|
+
const onStdinFinished = async (subprocessStdin, writable, subprocessStdout) => {
|
|
6000
5840
|
try {
|
|
6001
5841
|
await waitForSubprocessStdin(subprocessStdin);
|
|
6002
|
-
if (writable
|
|
5842
|
+
if (writable.writable) writable.end();
|
|
6003
5843
|
} catch (error) {
|
|
6004
5844
|
await safeWaitForSubprocessStdout(subprocessStdout);
|
|
6005
|
-
destroyOtherWritable(writable
|
|
5845
|
+
destroyOtherWritable(writable, error);
|
|
6006
5846
|
}
|
|
6007
5847
|
};
|
|
6008
5848
|
const onWritableDestroy = async ({ subprocessStdin, subprocess, waitWritableFinal, waitWritableDestroy }, error) => {
|
|
@@ -6015,7 +5855,6 @@ const onWritableDestroy = async ({ subprocessStdin, subprocess, waitWritableFina
|
|
|
6015
5855
|
const destroyOtherWritable = (stream, error) => {
|
|
6016
5856
|
destroyOtherStream(stream, stream.writable, error);
|
|
6017
5857
|
};
|
|
6018
|
-
|
|
6019
5858
|
//#endregion
|
|
6020
5859
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/convert/duplex.js
|
|
6021
5860
|
const createDuplex = ({ subprocess, concurrentStreams, encoding }, { from, to, binary: binaryOption = true, preserveNewlines = true } = {}) => {
|
|
@@ -6030,7 +5869,7 @@ const createDuplex = ({ subprocess, concurrentStreams, encoding }, { from, to, b
|
|
|
6030
5869
|
encoding,
|
|
6031
5870
|
preserveNewlines
|
|
6032
5871
|
});
|
|
6033
|
-
const duplex
|
|
5872
|
+
const duplex = new node_stream.Duplex({
|
|
6034
5873
|
read,
|
|
6035
5874
|
...getWritableMethods(subprocessStdin, subprocess, waitWritableFinal),
|
|
6036
5875
|
destroy: (0, node_util.callbackify)(onDuplexDestroy.bind(void 0, {
|
|
@@ -6050,12 +5889,12 @@ const createDuplex = ({ subprocess, concurrentStreams, encoding }, { from, to, b
|
|
|
6050
5889
|
onStdoutFinished({
|
|
6051
5890
|
subprocessStdout,
|
|
6052
5891
|
onStdoutDataDone,
|
|
6053
|
-
readable: duplex
|
|
5892
|
+
readable: duplex,
|
|
6054
5893
|
subprocess,
|
|
6055
5894
|
subprocessStdin
|
|
6056
5895
|
});
|
|
6057
|
-
onStdinFinished(subprocessStdin, duplex
|
|
6058
|
-
return duplex
|
|
5896
|
+
onStdinFinished(subprocessStdin, duplex, subprocessStdout);
|
|
5897
|
+
return duplex;
|
|
6059
5898
|
};
|
|
6060
5899
|
const onDuplexDestroy = async ({ subprocessStdout, subprocessStdin, subprocess, waitReadableDestroy, waitWritableFinal, waitWritableDestroy }, error) => {
|
|
6061
5900
|
await Promise.all([onReadableDestroy({
|
|
@@ -6069,7 +5908,6 @@ const onDuplexDestroy = async ({ subprocessStdout, subprocessStdin, subprocess,
|
|
|
6069
5908
|
waitWritableDestroy
|
|
6070
5909
|
}, error)]);
|
|
6071
5910
|
};
|
|
6072
|
-
|
|
6073
5911
|
//#endregion
|
|
6074
5912
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/convert/iterable.js
|
|
6075
5913
|
const createIterable = (subprocess, encoding, { from, binary: binaryOption = false, preserveNewlines = false } = {}) => {
|
|
@@ -6092,7 +5930,6 @@ const iterateOnStdoutData = async function* (onStdoutData, subprocessStdout, sub
|
|
|
6092
5930
|
await subprocess;
|
|
6093
5931
|
}
|
|
6094
5932
|
};
|
|
6095
|
-
|
|
6096
5933
|
//#endregion
|
|
6097
5934
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/convert/add.js
|
|
6098
5935
|
const addConvertedStreams = (subprocess, { encoding }) => {
|
|
@@ -6114,7 +5951,6 @@ const addConvertedStreams = (subprocess, { encoding }) => {
|
|
|
6114
5951
|
subprocess.iterable = createIterable.bind(void 0, subprocess, encoding);
|
|
6115
5952
|
subprocess[Symbol.asyncIterator] = createIterable.bind(void 0, subprocess, encoding, {});
|
|
6116
5953
|
};
|
|
6117
|
-
|
|
6118
5954
|
//#endregion
|
|
6119
5955
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/methods/promise.js
|
|
6120
5956
|
const mergePromise = (subprocess, promise) => {
|
|
@@ -6132,7 +5968,6 @@ const descriptors = [
|
|
|
6132
5968
|
"catch",
|
|
6133
5969
|
"finally"
|
|
6134
5970
|
].map((property) => [property, Reflect.getOwnPropertyDescriptor(nativePromisePrototype, property)]);
|
|
6135
|
-
|
|
6136
5971
|
//#endregion
|
|
6137
5972
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/methods/main-async.js
|
|
6138
5973
|
const execaCoreAsync = (rawFile, rawArguments, rawOptions, createNested) => {
|
|
@@ -6175,7 +6010,7 @@ const handleAsyncArguments = (rawFile, rawArguments, rawOptions) => {
|
|
|
6175
6010
|
fileDescriptors: handleStdioAsync(options, verboseInfo)
|
|
6176
6011
|
};
|
|
6177
6012
|
};
|
|
6178
|
-
const handleAsyncOptions = ({ timeout, signal
|
|
6013
|
+
const handleAsyncOptions = ({ timeout, signal, ...options }) => {
|
|
6179
6014
|
if (signal !== void 0) throw new TypeError("The \"signal\" option has been renamed to \"cancelSignal\" instead.");
|
|
6180
6015
|
return {
|
|
6181
6016
|
...options,
|
|
@@ -6285,7 +6120,6 @@ const getAsyncResult = ({ errorInfo, exitCode, signal, stdio, all, ipcOutput, co
|
|
|
6285
6120
|
options,
|
|
6286
6121
|
startTime
|
|
6287
6122
|
});
|
|
6288
|
-
|
|
6289
6123
|
//#endregion
|
|
6290
6124
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/methods/bind.js
|
|
6291
6125
|
const mergeOptions = (boundOptions, options) => {
|
|
@@ -6303,11 +6137,10 @@ const mergeOption = (optionName, boundOptionValue, optionValue) => {
|
|
|
6303
6137
|
return optionValue;
|
|
6304
6138
|
};
|
|
6305
6139
|
const DEEP_OPTIONS = new Set(["env", ...FD_SPECIFIC_OPTIONS]);
|
|
6306
|
-
|
|
6307
6140
|
//#endregion
|
|
6308
6141
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/methods/create.js
|
|
6309
6142
|
const createExeca = (mapArguments, boundOptions, deepOptions, setBoundExeca) => {
|
|
6310
|
-
const createNested = (mapArguments
|
|
6143
|
+
const createNested = (mapArguments, boundOptions, setBoundExeca) => createExeca(mapArguments, boundOptions, deepOptions, setBoundExeca);
|
|
6311
6144
|
const boundExeca = (...execaArguments) => callBoundExeca({
|
|
6312
6145
|
mapArguments,
|
|
6313
6146
|
deepOptions,
|
|
@@ -6344,7 +6177,6 @@ const parseArguments = ({ mapArguments, firstArgument, nextArguments, deepOption
|
|
|
6344
6177
|
isSync
|
|
6345
6178
|
};
|
|
6346
6179
|
};
|
|
6347
|
-
|
|
6348
6180
|
//#endregion
|
|
6349
6181
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/methods/command.js
|
|
6350
6182
|
const mapCommandAsync = ({ file, commandArguments }) => parseCommand(file, commandArguments);
|
|
@@ -6373,7 +6205,6 @@ const parseCommandString = (command) => {
|
|
|
6373
6205
|
return tokens;
|
|
6374
6206
|
};
|
|
6375
6207
|
const SPACES_REGEXP = / +/g;
|
|
6376
|
-
|
|
6377
6208
|
//#endregion
|
|
6378
6209
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/methods/script.js
|
|
6379
6210
|
const setScriptSync = (boundExeca, createNested, boundOptions) => {
|
|
@@ -6391,21 +6222,19 @@ const getScriptOptions = (options) => ({ options: {
|
|
|
6391
6222
|
} });
|
|
6392
6223
|
const getScriptStdinOption = ({ input, inputFile, stdio }) => input === void 0 && inputFile === void 0 && stdio === void 0 ? { stdin: "inherit" } : {};
|
|
6393
6224
|
const deepScriptOptions = { preferLocal: true };
|
|
6394
|
-
|
|
6395
6225
|
//#endregion
|
|
6396
6226
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/index.js
|
|
6397
6227
|
const execa = createExeca(() => ({}));
|
|
6398
|
-
|
|
6399
|
-
|
|
6400
|
-
|
|
6401
|
-
|
|
6402
|
-
|
|
6228
|
+
createExeca(() => ({ isSync: true }));
|
|
6229
|
+
createExeca(mapCommandAsync);
|
|
6230
|
+
createExeca(mapCommandSync);
|
|
6231
|
+
createExeca(mapNode);
|
|
6232
|
+
createExeca(mapScriptAsync, {}, deepScriptOptions, setScriptSync);
|
|
6403
6233
|
const { sendMessage, getOneMessage, getEachMessage, getCancelSignal } = getIpcExport();
|
|
6404
|
-
|
|
6405
6234
|
//#endregion
|
|
6406
6235
|
//#region iac/supabaseApi.ts
|
|
6407
6236
|
const supabaseApi = (supabaseUrl, supabaseAnonKey) => {
|
|
6408
|
-
const supabase = (0,
|
|
6237
|
+
const supabase = (0, _supabase_supabase_js.createClient)(supabaseUrl, supabaseAnonKey);
|
|
6409
6238
|
return {
|
|
6410
6239
|
listBuckets: async () => {
|
|
6411
6240
|
const { data, error } = await supabase.storage.listBuckets();
|
|
@@ -6424,11 +6253,14 @@ const supabaseApi = (supabaseUrl, supabaseAnonKey) => {
|
|
|
6424
6253
|
}
|
|
6425
6254
|
};
|
|
6426
6255
|
};
|
|
6427
|
-
|
|
6428
6256
|
//#endregion
|
|
6429
6257
|
//#region iac/index.ts
|
|
6258
|
+
const require$1 = (0, node_module.createRequire)(require("url").pathToFileURL(__filename).href);
|
|
6259
|
+
const EDGE_VENDOR_DIR = "_hot-updater";
|
|
6260
|
+
const WORKSPACE_PACKAGE_PREFIX = "@hot-updater/";
|
|
6261
|
+
const IMPORT_SPECIFIER_PATTERN = /from\s+["']([^"']+)["']|import\s*\(\s*["']([^"']+)["']\s*\)/g;
|
|
6430
6262
|
const getConfigTemplate = (build) => {
|
|
6431
|
-
return new
|
|
6263
|
+
return new _hot_updater_cli_tools.ConfigBuilder().setBuildType(build).setStorage({
|
|
6432
6264
|
imports: [{
|
|
6433
6265
|
pkg: "@hot-updater/supabase",
|
|
6434
6266
|
named: ["supabaseStorage"]
|
|
@@ -6467,8 +6299,132 @@ project_id = "%%projectId%%"
|
|
|
6467
6299
|
[db.seed]
|
|
6468
6300
|
enabled = false
|
|
6469
6301
|
`;
|
|
6302
|
+
const resolvePackageExportPath = async (packageName, exportName) => {
|
|
6303
|
+
const packageJsonPath = require$1.resolve(`${packageName}/package.json`);
|
|
6304
|
+
const exportTarget = JSON.parse(await fs_promises.default.readFile(packageJsonPath, "utf-8")).exports?.[exportName];
|
|
6305
|
+
const relativePath = typeof exportTarget === "string" ? exportTarget : exportTarget?.import ?? exportTarget?.default ?? exportTarget?.require;
|
|
6306
|
+
if (!relativePath) throw new Error(`Could not resolve ${exportName} export for package ${packageName}`);
|
|
6307
|
+
return path.default.resolve(path.default.dirname(packageJsonPath), relativePath);
|
|
6308
|
+
};
|
|
6309
|
+
const toImportMapPath = (fromDir, toPath) => {
|
|
6310
|
+
const relativePath = path.default.relative(fromDir, toPath).split(path.default.sep).join("/");
|
|
6311
|
+
return relativePath.startsWith(".") ? relativePath : `./${relativePath}`;
|
|
6312
|
+
};
|
|
6313
|
+
const pathExists = async (targetPath) => {
|
|
6314
|
+
try {
|
|
6315
|
+
await fs_promises.default.access(targetPath);
|
|
6316
|
+
return true;
|
|
6317
|
+
} catch {
|
|
6318
|
+
return false;
|
|
6319
|
+
}
|
|
6320
|
+
};
|
|
6321
|
+
const resolveLocalModulePath = async (fromFile, specifier) => {
|
|
6322
|
+
const basePath = path.default.resolve(path.default.dirname(fromFile), specifier);
|
|
6323
|
+
const candidates = [
|
|
6324
|
+
basePath,
|
|
6325
|
+
`${basePath}.mjs`,
|
|
6326
|
+
`${basePath}.js`,
|
|
6327
|
+
path.default.join(basePath, "index.mjs"),
|
|
6328
|
+
path.default.join(basePath, "index.js")
|
|
6329
|
+
];
|
|
6330
|
+
for (const candidate of candidates) if (await pathExists(candidate)) return candidate;
|
|
6331
|
+
return null;
|
|
6332
|
+
};
|
|
6333
|
+
const collectBareImportSpecifiers = async (entryPath) => {
|
|
6334
|
+
const filesToVisit = [entryPath];
|
|
6335
|
+
const visitedFiles = /* @__PURE__ */ new Set();
|
|
6336
|
+
const specifiers = /* @__PURE__ */ new Set();
|
|
6337
|
+
while (filesToVisit.length > 0) {
|
|
6338
|
+
const currentFile = filesToVisit.pop();
|
|
6339
|
+
if (!currentFile || visitedFiles.has(currentFile)) continue;
|
|
6340
|
+
visitedFiles.add(currentFile);
|
|
6341
|
+
const source = await fs_promises.default.readFile(currentFile, "utf8");
|
|
6342
|
+
for (const match of source.matchAll(IMPORT_SPECIFIER_PATTERN)) {
|
|
6343
|
+
const specifier = match[1] ?? match[2];
|
|
6344
|
+
if (!specifier) continue;
|
|
6345
|
+
if (specifier.startsWith("./") || specifier.startsWith("../")) {
|
|
6346
|
+
const resolvedPath = await resolveLocalModulePath(currentFile, specifier);
|
|
6347
|
+
if (resolvedPath) filesToVisit.push(resolvedPath);
|
|
6348
|
+
continue;
|
|
6349
|
+
}
|
|
6350
|
+
if (specifier.startsWith("node:") || specifier.startsWith("npm:") || specifier.startsWith("jsr:") || specifier.startsWith("http://") || specifier.startsWith("https://")) continue;
|
|
6351
|
+
specifiers.add(specifier);
|
|
6352
|
+
}
|
|
6353
|
+
}
|
|
6354
|
+
return specifiers;
|
|
6355
|
+
};
|
|
6356
|
+
const toVendorDirName = (packageName) => packageName.replace(/^@/, "").replaceAll("/", "-");
|
|
6357
|
+
const prepareVendoredPackageImport = async ({ targetDir, packageName, exportName }) => {
|
|
6358
|
+
const packageJsonPath = require$1.resolve(`${packageName}/package.json`);
|
|
6359
|
+
const packageRoot = path.default.dirname(packageJsonPath);
|
|
6360
|
+
const exportPath = await resolvePackageExportPath(packageName, exportName);
|
|
6361
|
+
const [sourceRootDir, ...restPath] = path.default.relative(packageRoot, exportPath).split(path.default.sep);
|
|
6362
|
+
if (!sourceRootDir || restPath.length === 0) throw new Error(`Could not determine vendored import layout for ${packageName}${exportName}`);
|
|
6363
|
+
const vendorDirName = toVendorDirName(packageName);
|
|
6364
|
+
const sourceRootPath = path.default.join(packageRoot, sourceRootDir);
|
|
6365
|
+
const vendoredRootPath = path.default.join(targetDir, EDGE_VENDOR_DIR, vendorDirName, sourceRootDir);
|
|
6366
|
+
await fs_promises.default.rm(path.default.join(targetDir, EDGE_VENDOR_DIR, vendorDirName), {
|
|
6367
|
+
recursive: true,
|
|
6368
|
+
force: true
|
|
6369
|
+
});
|
|
6370
|
+
await fs_promises.default.mkdir(path.default.dirname(vendoredRootPath), { recursive: true });
|
|
6371
|
+
await fs_promises.default.cp(sourceRootPath, vendoredRootPath, {
|
|
6372
|
+
recursive: true,
|
|
6373
|
+
force: true
|
|
6374
|
+
});
|
|
6375
|
+
return {
|
|
6376
|
+
importMapPath: toImportMapPath(targetDir, path.default.join(vendoredRootPath, ...restPath)),
|
|
6377
|
+
packageRoot,
|
|
6378
|
+
sourceEntryPath: exportPath
|
|
6379
|
+
};
|
|
6380
|
+
};
|
|
6381
|
+
const resolveBareSpecifierImportTarget = async (specifier, searchFrom) => {
|
|
6382
|
+
return `npm:${specifier}@${(0, _hot_updater_cli_tools.resolvePackageVersion)(specifier, { searchFrom })}`;
|
|
6383
|
+
};
|
|
6384
|
+
const buildEdgeFunctionImports = async (targetDir) => {
|
|
6385
|
+
const imports = {};
|
|
6386
|
+
const visitedWorkspacePackages = /* @__PURE__ */ new Set();
|
|
6387
|
+
const addWorkspacePackage = async ({ importSpecifier, packageName, exportName }) => {
|
|
6388
|
+
const visitKey = `${packageName}:${exportName}`;
|
|
6389
|
+
if (visitedWorkspacePackages.has(visitKey)) return;
|
|
6390
|
+
visitedWorkspacePackages.add(visitKey);
|
|
6391
|
+
const vendoredPackage = await prepareVendoredPackageImport({
|
|
6392
|
+
targetDir,
|
|
6393
|
+
packageName,
|
|
6394
|
+
exportName
|
|
6395
|
+
});
|
|
6396
|
+
imports[importSpecifier] = vendoredPackage.importMapPath;
|
|
6397
|
+
const nestedSpecifiers = await collectBareImportSpecifiers(vendoredPackage.sourceEntryPath);
|
|
6398
|
+
for (const nestedSpecifier of nestedSpecifiers) {
|
|
6399
|
+
if (imports[nestedSpecifier]) continue;
|
|
6400
|
+
if (nestedSpecifier.startsWith(WORKSPACE_PACKAGE_PREFIX)) {
|
|
6401
|
+
await addWorkspacePackage({
|
|
6402
|
+
importSpecifier: nestedSpecifier,
|
|
6403
|
+
packageName: nestedSpecifier,
|
|
6404
|
+
exportName: "."
|
|
6405
|
+
});
|
|
6406
|
+
continue;
|
|
6407
|
+
}
|
|
6408
|
+
imports[nestedSpecifier] = await resolveBareSpecifierImportTarget(nestedSpecifier, vendoredPackage.packageRoot);
|
|
6409
|
+
}
|
|
6410
|
+
};
|
|
6411
|
+
await addWorkspacePackage({
|
|
6412
|
+
importSpecifier: "@hot-updater/server/runtime",
|
|
6413
|
+
packageName: "@hot-updater/server",
|
|
6414
|
+
exportName: "./runtime"
|
|
6415
|
+
});
|
|
6416
|
+
await addWorkspacePackage({
|
|
6417
|
+
importSpecifier: "@hot-updater/supabase",
|
|
6418
|
+
packageName: "@hot-updater/supabase",
|
|
6419
|
+
exportName: "./edge"
|
|
6420
|
+
});
|
|
6421
|
+
return imports;
|
|
6422
|
+
};
|
|
6423
|
+
const resolveEdgeFunctionDenoConfig = async (targetDir) => {
|
|
6424
|
+
return { imports: await buildEdgeFunctionImports(targetDir) };
|
|
6425
|
+
};
|
|
6470
6426
|
const selectProject = async () => {
|
|
6471
|
-
const spinner =
|
|
6427
|
+
const spinner = _hot_updater_cli_tools.p.spinner();
|
|
6472
6428
|
spinner.start("Fetching Supabase projects...");
|
|
6473
6429
|
let projectsProcess = [];
|
|
6474
6430
|
try {
|
|
@@ -6488,7 +6444,7 @@ const selectProject = async () => {
|
|
|
6488
6444
|
}
|
|
6489
6445
|
spinner.stop();
|
|
6490
6446
|
const createProjectOption = `create/${Math.random().toString(36).substring(2, 15)}`;
|
|
6491
|
-
const selectedProjectId = await
|
|
6447
|
+
const selectedProjectId = await _hot_updater_cli_tools.p.select({
|
|
6492
6448
|
message: "Select a Supabase project",
|
|
6493
6449
|
options: [...projectsProcess.map((project) => ({
|
|
6494
6450
|
label: `${project.name} (${project.region})`,
|
|
@@ -6498,7 +6454,7 @@ const selectProject = async () => {
|
|
|
6498
6454
|
value: createProjectOption
|
|
6499
6455
|
}]
|
|
6500
6456
|
});
|
|
6501
|
-
if (
|
|
6457
|
+
if (_hot_updater_cli_tools.p.isCancel(selectedProjectId)) process.exit(0);
|
|
6502
6458
|
if (selectedProjectId === createProjectOption) {
|
|
6503
6459
|
try {
|
|
6504
6460
|
await execa("npx", [
|
|
@@ -6524,7 +6480,7 @@ const selectProject = async () => {
|
|
|
6524
6480
|
const selectBucket = async (api) => {
|
|
6525
6481
|
let buckets = [];
|
|
6526
6482
|
let retryCount = 0;
|
|
6527
|
-
await
|
|
6483
|
+
await _hot_updater_cli_tools.p.tasks([{
|
|
6528
6484
|
title: "Fetching bucket list...",
|
|
6529
6485
|
task: async (message) => {
|
|
6530
6486
|
while (retryCount < 300) try {
|
|
@@ -6535,12 +6491,12 @@ const selectBucket = async (api) => {
|
|
|
6535
6491
|
retryCount++;
|
|
6536
6492
|
await delay(1e3);
|
|
6537
6493
|
}
|
|
6538
|
-
|
|
6494
|
+
_hot_updater_cli_tools.p.log.error("Failed to fetch bucket list");
|
|
6539
6495
|
process.exit(1);
|
|
6540
6496
|
}
|
|
6541
6497
|
}]);
|
|
6542
6498
|
const createBucketOption = `create/${Math.random().toString(36).substring(2, 15)}`;
|
|
6543
|
-
const selectedBucketId = await
|
|
6499
|
+
const selectedBucketId = await _hot_updater_cli_tools.p.select({
|
|
6544
6500
|
message: "Select a storage bucket",
|
|
6545
6501
|
options: [...buckets.map((bucket) => ({
|
|
6546
6502
|
label: bucket.name,
|
|
@@ -6553,13 +6509,13 @@ const selectBucket = async (api) => {
|
|
|
6553
6509
|
value: createBucketOption
|
|
6554
6510
|
}]
|
|
6555
6511
|
});
|
|
6556
|
-
if (
|
|
6512
|
+
if (_hot_updater_cli_tools.p.isCancel(selectedBucketId)) process.exit(0);
|
|
6557
6513
|
if (selectedBucketId === createBucketOption) {
|
|
6558
|
-
const bucketName = await
|
|
6559
|
-
if (
|
|
6514
|
+
const bucketName = await _hot_updater_cli_tools.p.text({ message: "Enter a name for the new bucket" });
|
|
6515
|
+
if (_hot_updater_cli_tools.p.isCancel(bucketName)) process.exit(0);
|
|
6560
6516
|
try {
|
|
6561
6517
|
await api.createBucket(bucketName, { public: false });
|
|
6562
|
-
|
|
6518
|
+
_hot_updater_cli_tools.p.log.success(`Bucket "${bucketName}" created successfully.`);
|
|
6563
6519
|
const newBucket = (await api.listBuckets()).find((bucket) => bucket.name === bucketName);
|
|
6564
6520
|
if (!newBucket) throw new Error("Failed to create and select new bucket");
|
|
6565
6521
|
return {
|
|
@@ -6567,16 +6523,16 @@ const selectBucket = async (api) => {
|
|
|
6567
6523
|
name: newBucket.name
|
|
6568
6524
|
};
|
|
6569
6525
|
} catch (err) {
|
|
6570
|
-
|
|
6526
|
+
_hot_updater_cli_tools.p.log.error(`Failed to create new bucket: ${err}`);
|
|
6571
6527
|
process.exit(1);
|
|
6572
6528
|
}
|
|
6573
6529
|
}
|
|
6574
6530
|
return JSON.parse(selectedBucketId);
|
|
6575
6531
|
};
|
|
6576
6532
|
const linkSupabase = async (workdir, { projectId, dbPassword }) => {
|
|
6577
|
-
const spinner =
|
|
6533
|
+
const spinner = _hot_updater_cli_tools.p.spinner();
|
|
6578
6534
|
try {
|
|
6579
|
-
await fs_promises.default.writeFile(path.default.join(workdir, "supabase", "config.toml"), (0,
|
|
6535
|
+
await fs_promises.default.writeFile(path.default.join(workdir, "supabase", "config.toml"), (0, _hot_updater_cli_tools.transformTemplate)(SUPABASE_CONFIG_TEMPLATE, { projectId }));
|
|
6580
6536
|
spinner.start("Linking Supabase...");
|
|
6581
6537
|
await execa("npx", [
|
|
6582
6538
|
"supabase",
|
|
@@ -6598,7 +6554,7 @@ const linkSupabase = async (workdir, { projectId, dbPassword }) => {
|
|
|
6598
6554
|
spinner.stop("Supabase linked ✔");
|
|
6599
6555
|
} catch (err) {
|
|
6600
6556
|
spinner.stop();
|
|
6601
|
-
if (err instanceof ExecaError && err.stderr)
|
|
6557
|
+
if (err instanceof ExecaError && err.stderr) _hot_updater_cli_tools.p.log.error(err.stderr);
|
|
6602
6558
|
else console.error(err);
|
|
6603
6559
|
process.exit(1);
|
|
6604
6560
|
}
|
|
@@ -6616,28 +6572,30 @@ const pushDB = async (workdir, { dbPassword }) => {
|
|
|
6616
6572
|
stdio: "inherit",
|
|
6617
6573
|
shell: true
|
|
6618
6574
|
});
|
|
6619
|
-
|
|
6575
|
+
_hot_updater_cli_tools.p.log.success("DB pushed ✔");
|
|
6620
6576
|
return dbPush.stdout;
|
|
6621
6577
|
} catch (err) {
|
|
6622
|
-
if (err instanceof ExecaError && err.stderr)
|
|
6578
|
+
if (err instanceof ExecaError && err.stderr) _hot_updater_cli_tools.p.log.error(err.stderr);
|
|
6623
6579
|
else console.error(err);
|
|
6624
6580
|
process.exit(1);
|
|
6625
6581
|
}
|
|
6626
6582
|
};
|
|
6627
6583
|
const deployEdgeFunction = async (workdir, projectId) => {
|
|
6628
|
-
const functionName = await
|
|
6584
|
+
const functionName = await _hot_updater_cli_tools.p.text({
|
|
6629
6585
|
message: "Enter a name for the edge function",
|
|
6630
6586
|
initialValue: "update-server",
|
|
6631
6587
|
placeholder: "update-server"
|
|
6632
6588
|
});
|
|
6633
|
-
if (
|
|
6589
|
+
if (_hot_updater_cli_tools.p.isCancel(functionName)) process.exit(0);
|
|
6634
6590
|
const edgeFunctionsLibPath = path.default.join(workdir, "supabase", "edge-functions");
|
|
6635
|
-
const edgeFunctionsCode = (0,
|
|
6591
|
+
const edgeFunctionsCode = (0, _hot_updater_cli_tools.transformEnv)(path.default.join(edgeFunctionsLibPath, "index.ts"), { FUNCTION_NAME: functionName });
|
|
6636
6592
|
const targetDir = path.default.join(workdir, "supabase", "functions", functionName);
|
|
6637
6593
|
await fs_promises.default.mkdir(targetDir, { recursive: true });
|
|
6594
|
+
const denoConfig = await resolveEdgeFunctionDenoConfig(targetDir);
|
|
6638
6595
|
const targetPath = path.default.join(targetDir, "index.ts");
|
|
6639
6596
|
await fs_promises.default.writeFile(targetPath, edgeFunctionsCode);
|
|
6640
|
-
await
|
|
6597
|
+
await fs_promises.default.writeFile(path.default.join(targetDir, "deno.json"), `${JSON.stringify(denoConfig, null, 2)}\n`);
|
|
6598
|
+
await _hot_updater_cli_tools.p.tasks([{
|
|
6641
6599
|
title: "Supabase edge function deploy. This may take a few minutes.",
|
|
6642
6600
|
task: async () => {
|
|
6643
6601
|
try {
|
|
@@ -6653,7 +6611,7 @@ const deployEdgeFunction = async (workdir, projectId) => {
|
|
|
6653
6611
|
workdir
|
|
6654
6612
|
], { cwd: workdir })).stdout;
|
|
6655
6613
|
} catch (err) {
|
|
6656
|
-
if (err instanceof ExecaError && err.stderr)
|
|
6614
|
+
if (err instanceof ExecaError && err.stderr) _hot_updater_cli_tools.p.log.error(err.stderr);
|
|
6657
6615
|
else console.error(err);
|
|
6658
6616
|
process.exit(1);
|
|
6659
6617
|
}
|
|
@@ -6662,7 +6620,7 @@ const deployEdgeFunction = async (workdir, projectId) => {
|
|
|
6662
6620
|
};
|
|
6663
6621
|
const runInit = async ({ build }) => {
|
|
6664
6622
|
const project = await selectProject();
|
|
6665
|
-
const spinner =
|
|
6623
|
+
const spinner = _hot_updater_cli_tools.p.spinner();
|
|
6666
6624
|
spinner.start(`Getting API keys for ${project.name}...`);
|
|
6667
6625
|
let apiKeys = [];
|
|
6668
6626
|
try {
|
|
@@ -6686,16 +6644,16 @@ const runInit = async ({ build }) => {
|
|
|
6686
6644
|
const serviceRoleKey = apiKeys.find((key) => key.name === "service_role");
|
|
6687
6645
|
if (!serviceRoleKey) throw new Error("Service role key not found, is your project paused?");
|
|
6688
6646
|
const bucket = await selectBucket(supabaseApi(`https://${project.id}.supabase.co`, serviceRoleKey.api_key));
|
|
6689
|
-
const { tmpDir, removeTmpDir } = await (0,
|
|
6647
|
+
const { tmpDir, removeTmpDir } = await (0, _hot_updater_cli_tools.copyDirToTmp)(path.default.dirname(path.default.resolve(require$1.resolve("@hot-updater/supabase/scaffold"))), "supabase");
|
|
6690
6648
|
const migrationPath = await path.default.join(tmpDir, "supabase", "migrations");
|
|
6691
6649
|
const migrationFiles = await fs_promises.default.readdir(migrationPath);
|
|
6692
6650
|
for (const file of migrationFiles) if (file.endsWith(".sql")) {
|
|
6693
6651
|
const filePath = path.default.join(migrationPath, file);
|
|
6694
6652
|
const content = await fs_promises.default.readFile(filePath, "utf-8");
|
|
6695
|
-
await fs_promises.default.writeFile(filePath, (0,
|
|
6653
|
+
await fs_promises.default.writeFile(filePath, (0, _hot_updater_cli_tools.transformTemplate)(content, { BUCKET_NAME: bucket.name }));
|
|
6696
6654
|
}
|
|
6697
|
-
const dbPassword = await
|
|
6698
|
-
if (
|
|
6655
|
+
const dbPassword = await _hot_updater_cli_tools.p.password({ message: "Enter your Supabase database password (press Enter to skip if none)" });
|
|
6656
|
+
if (_hot_updater_cli_tools.p.isCancel(dbPassword)) process.exit(0);
|
|
6699
6657
|
await linkSupabase(tmpDir, {
|
|
6700
6658
|
projectId: project.id,
|
|
6701
6659
|
dbPassword
|
|
@@ -6704,19 +6662,19 @@ const runInit = async ({ build }) => {
|
|
|
6704
6662
|
await deployEdgeFunction(tmpDir, project.id);
|
|
6705
6663
|
await removeTmpDir();
|
|
6706
6664
|
await fs_promises.default.writeFile("hot-updater.config.ts", getConfigTemplate(build));
|
|
6707
|
-
await (0,
|
|
6665
|
+
await (0, _hot_updater_cli_tools.makeEnv)({
|
|
6708
6666
|
HOT_UPDATER_SUPABASE_ANON_KEY: serviceRoleKey.api_key,
|
|
6709
6667
|
HOT_UPDATER_SUPABASE_BUCKET_NAME: bucket.name,
|
|
6710
6668
|
HOT_UPDATER_SUPABASE_URL: `https://${project.id}.supabase.co`
|
|
6711
6669
|
});
|
|
6712
|
-
|
|
6713
|
-
|
|
6714
|
-
|
|
6715
|
-
|
|
6716
|
-
|
|
6670
|
+
_hot_updater_cli_tools.p.log.success("Generated '.env.hotupdater' file with Supabase settings.");
|
|
6671
|
+
_hot_updater_cli_tools.p.log.success("Generated 'hot-updater.config.ts' file with Supabase settings.");
|
|
6672
|
+
_hot_updater_cli_tools.p.note((0, _hot_updater_cli_tools.transformTemplate)(SOURCE_TEMPLATE, { source: `https://${project.id}.supabase.co/functions/v1/update-server` }));
|
|
6673
|
+
_hot_updater_cli_tools.p.log.message(`Next step: ${(0, _hot_updater_cli_tools.link)("https://hot-updater.dev/docs/managed/supabase#step-4-add-hotupdater-to-your-project")}`);
|
|
6674
|
+
_hot_updater_cli_tools.p.log.success("Done! 🎉");
|
|
6717
6675
|
};
|
|
6718
|
-
|
|
6719
6676
|
//#endregion
|
|
6677
|
+
exports.resolveEdgeFunctionDenoConfig = resolveEdgeFunctionDenoConfig;
|
|
6720
6678
|
exports.runInit = runInit;
|
|
6721
6679
|
exports.selectBucket = selectBucket;
|
|
6722
|
-
exports.selectProject = selectProject;
|
|
6680
|
+
exports.selectProject = selectProject;
|