@hot-updater/firebase 0.27.1 → 0.29.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/firebase/functions/index.cjs +1913 -4955
- package/dist/iac/index.cjs +482 -611
- package/dist/iac/{index.js → index.mjs} +416 -534
- package/dist/index.cjs +60 -25
- package/dist/index.d.cts +4 -4
- package/dist/{index.d.ts → index.d.mts} +4 -4
- package/dist/{index.js → index.mjs} +47 -11
- package/package.json +20 -14
- /package/dist/firebase/{firebase.json → public/firebase.json} +0 -0
- /package/dist/firebase/{firestore.indexes.json → public/firestore.indexes.json} +0 -0
- /package/dist/firebase/{functions → public/functions}/_package.json +0 -0
- /package/dist/iac/{index.d.ts → index.d.mts} +0 -0
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,12 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
22
21
|
value: mod,
|
|
23
22
|
enumerable: true
|
|
24
23
|
}) : target, mod));
|
|
25
|
-
|
|
26
24
|
//#endregion
|
|
27
|
-
let
|
|
28
|
-
__hot_updater_cli_tools = __toESM(__hot_updater_cli_tools);
|
|
25
|
+
let _hot_updater_cli_tools = require("@hot-updater/cli-tools");
|
|
29
26
|
let node_url = require("node:url");
|
|
30
|
-
node_url = __toESM(node_url);
|
|
31
27
|
let node_child_process = require("node:child_process");
|
|
32
|
-
node_child_process = __toESM(node_child_process);
|
|
33
28
|
let node_string_decoder = require("node:string_decoder");
|
|
34
|
-
node_string_decoder = __toESM(node_string_decoder);
|
|
35
29
|
let node_util = require("node:util");
|
|
36
|
-
node_util = __toESM(node_util);
|
|
37
30
|
let node_process = require("node:process");
|
|
38
31
|
node_process = __toESM(node_process);
|
|
39
32
|
let node_tty = require("node:tty");
|
|
@@ -45,86 +38,71 @@ path = __toESM(path);
|
|
|
45
38
|
let fs = require("fs");
|
|
46
39
|
fs = __toESM(fs);
|
|
47
40
|
let node_timers_promises = require("node:timers/promises");
|
|
48
|
-
node_timers_promises = __toESM(node_timers_promises);
|
|
49
41
|
let node_os = require("node:os");
|
|
50
|
-
node_os = __toESM(node_os);
|
|
51
42
|
let node_events = require("node:events");
|
|
52
|
-
node_events = __toESM(node_events);
|
|
53
43
|
let node_v8 = require("node:v8");
|
|
54
|
-
node_v8 = __toESM(node_v8);
|
|
55
44
|
let node_fs = require("node:fs");
|
|
56
|
-
node_fs = __toESM(node_fs);
|
|
57
45
|
let node_stream_promises = require("node:stream/promises");
|
|
58
|
-
node_stream_promises = __toESM(node_stream_promises);
|
|
59
46
|
let node_stream = require("node:stream");
|
|
60
|
-
node_stream = __toESM(node_stream);
|
|
61
47
|
let node_buffer = require("node:buffer");
|
|
62
|
-
|
|
63
|
-
|
|
48
|
+
let node_fs_promises = require("node:fs/promises");
|
|
49
|
+
node_fs_promises = __toESM(node_fs_promises);
|
|
64
50
|
//#region ../../node_modules/.pnpm/es-toolkit@1.32.0/node_modules/es-toolkit/dist/_internal/compareValues.mjs
|
|
65
|
-
function compareValues(a
|
|
66
|
-
if (a
|
|
67
|
-
if (a
|
|
51
|
+
function compareValues(a, b, order) {
|
|
52
|
+
if (a < b) return order === "asc" ? -1 : 1;
|
|
53
|
+
if (a > b) return order === "asc" ? 1 : -1;
|
|
68
54
|
return 0;
|
|
69
55
|
}
|
|
70
|
-
|
|
71
56
|
//#endregion
|
|
72
57
|
//#region ../../node_modules/.pnpm/es-toolkit@1.32.0/node_modules/es-toolkit/dist/array/orderBy.mjs
|
|
73
58
|
function orderBy(arr, criteria, orders) {
|
|
74
|
-
return arr.slice().sort((a
|
|
59
|
+
return arr.slice().sort((a, b) => {
|
|
75
60
|
const ordersLength = orders.length;
|
|
76
|
-
for (let i
|
|
77
|
-
const order = ordersLength > i
|
|
78
|
-
const criterion = criteria[i
|
|
61
|
+
for (let i = 0; i < criteria.length; i++) {
|
|
62
|
+
const order = ordersLength > i ? orders[i] : orders[ordersLength - 1];
|
|
63
|
+
const criterion = criteria[i];
|
|
79
64
|
const criterionIsFunction = typeof criterion === "function";
|
|
80
|
-
const result = compareValues(criterionIsFunction ? criterion(a
|
|
65
|
+
const result = compareValues(criterionIsFunction ? criterion(a) : a[criterion], criterionIsFunction ? criterion(b) : b[criterion], order);
|
|
81
66
|
if (result !== 0) return result;
|
|
82
67
|
}
|
|
83
68
|
return 0;
|
|
84
69
|
});
|
|
85
70
|
}
|
|
86
|
-
|
|
87
71
|
//#endregion
|
|
88
72
|
//#region ../../node_modules/.pnpm/es-toolkit@1.32.0/node_modules/es-toolkit/dist/array/sortBy.mjs
|
|
89
73
|
function sortBy(arr, criteria) {
|
|
90
74
|
return orderBy(arr, criteria, ["asc"]);
|
|
91
75
|
}
|
|
92
|
-
|
|
93
76
|
//#endregion
|
|
94
77
|
//#region ../../node_modules/.pnpm/es-toolkit@1.32.0/node_modules/es-toolkit/dist/array/uniqWith.mjs
|
|
95
78
|
function uniqWith(arr, areItemsEqual) {
|
|
96
79
|
const result = [];
|
|
97
|
-
for (let i
|
|
98
|
-
const item = arr[i
|
|
80
|
+
for (let i = 0; i < arr.length; i++) {
|
|
81
|
+
const item = arr[i];
|
|
99
82
|
if (result.every((v) => !areItemsEqual(v, item))) result.push(item);
|
|
100
83
|
}
|
|
101
84
|
return result;
|
|
102
85
|
}
|
|
103
|
-
|
|
104
86
|
//#endregion
|
|
105
87
|
//#region ../../node_modules/.pnpm/es-toolkit@1.32.0/node_modules/es-toolkit/dist/function/noop.mjs
|
|
106
88
|
function noop$2() {}
|
|
107
|
-
|
|
108
89
|
//#endregion
|
|
109
90
|
//#region ../../node_modules/.pnpm/es-toolkit@1.32.0/node_modules/es-toolkit/dist/compat/_internal/getSymbols.mjs
|
|
110
91
|
function getSymbols(object) {
|
|
111
92
|
return Object.getOwnPropertySymbols(object).filter((symbol) => Object.prototype.propertyIsEnumerable.call(object, symbol));
|
|
112
93
|
}
|
|
113
|
-
|
|
114
94
|
//#endregion
|
|
115
95
|
//#region ../../node_modules/.pnpm/es-toolkit@1.32.0/node_modules/es-toolkit/dist/compat/_internal/getTag.mjs
|
|
116
96
|
function getTag(value) {
|
|
117
97
|
if (value == null) return value === void 0 ? "[object Undefined]" : "[object Null]";
|
|
118
98
|
return Object.prototype.toString.call(value);
|
|
119
99
|
}
|
|
120
|
-
|
|
121
100
|
//#endregion
|
|
122
101
|
//#region ../../node_modules/.pnpm/es-toolkit@1.32.0/node_modules/es-toolkit/dist/compat/_internal/tags.mjs
|
|
123
102
|
const regexpTag = "[object RegExp]";
|
|
124
103
|
const stringTag = "[object String]";
|
|
125
104
|
const numberTag = "[object Number]";
|
|
126
105
|
const booleanTag = "[object Boolean]";
|
|
127
|
-
const argumentsTag = "[object Arguments]";
|
|
128
106
|
const symbolTag = "[object Symbol]";
|
|
129
107
|
const dateTag = "[object Date]";
|
|
130
108
|
const mapTag = "[object Map]";
|
|
@@ -146,7 +124,6 @@ const int32ArrayTag = "[object Int32Array]";
|
|
|
146
124
|
const bigInt64ArrayTag = "[object BigInt64Array]";
|
|
147
125
|
const float32ArrayTag = "[object Float32Array]";
|
|
148
126
|
const float64ArrayTag = "[object Float64Array]";
|
|
149
|
-
|
|
150
127
|
//#endregion
|
|
151
128
|
//#region ../../node_modules/.pnpm/es-toolkit@1.32.0/node_modules/es-toolkit/dist/predicate/isPlainObject.mjs
|
|
152
129
|
function isPlainObject$1(value) {
|
|
@@ -155,13 +132,12 @@ function isPlainObject$1(value) {
|
|
|
155
132
|
if (!(proto === null || proto === Object.prototype || Object.getPrototypeOf(proto) === null)) return false;
|
|
156
133
|
return Object.prototype.toString.call(value) === "[object Object]";
|
|
157
134
|
}
|
|
158
|
-
|
|
159
135
|
//#endregion
|
|
160
136
|
//#region ../../node_modules/.pnpm/es-toolkit@1.32.0/node_modules/es-toolkit/dist/object/merge.mjs
|
|
161
137
|
function merge(target, source) {
|
|
162
138
|
const sourceKeys = Object.keys(source);
|
|
163
|
-
for (let i
|
|
164
|
-
const key = sourceKeys[i
|
|
139
|
+
for (let i = 0; i < sourceKeys.length; i++) {
|
|
140
|
+
const key = sourceKeys[i];
|
|
165
141
|
const sourceValue = source[key];
|
|
166
142
|
const targetValue = target[key];
|
|
167
143
|
if (Array.isArray(sourceValue)) if (Array.isArray(targetValue)) target[key] = merge(targetValue, sourceValue);
|
|
@@ -172,69 +148,67 @@ function merge(target, source) {
|
|
|
172
148
|
}
|
|
173
149
|
return target;
|
|
174
150
|
}
|
|
175
|
-
|
|
176
151
|
//#endregion
|
|
177
152
|
//#region ../../node_modules/.pnpm/es-toolkit@1.32.0/node_modules/es-toolkit/dist/compat/util/eq.mjs
|
|
178
153
|
function eq(value, other) {
|
|
179
154
|
return value === other || Number.isNaN(value) && Number.isNaN(other);
|
|
180
155
|
}
|
|
181
|
-
|
|
182
156
|
//#endregion
|
|
183
157
|
//#region ../../node_modules/.pnpm/es-toolkit@1.32.0/node_modules/es-toolkit/dist/predicate/isEqualWith.mjs
|
|
184
|
-
function isEqualWith(a
|
|
185
|
-
return isEqualWithImpl(a
|
|
158
|
+
function isEqualWith(a, b, areValuesEqual) {
|
|
159
|
+
return isEqualWithImpl(a, b, void 0, void 0, void 0, void 0, areValuesEqual);
|
|
186
160
|
}
|
|
187
|
-
function isEqualWithImpl(a
|
|
188
|
-
const result = areValuesEqual(a
|
|
161
|
+
function isEqualWithImpl(a, b, property, aParent, bParent, stack, areValuesEqual) {
|
|
162
|
+
const result = areValuesEqual(a, b, property, aParent, bParent, stack);
|
|
189
163
|
if (result !== void 0) return result;
|
|
190
|
-
if (typeof a
|
|
164
|
+
if (typeof a === typeof b) switch (typeof a) {
|
|
191
165
|
case "bigint":
|
|
192
166
|
case "string":
|
|
193
167
|
case "boolean":
|
|
194
168
|
case "symbol":
|
|
195
|
-
case "undefined": return a
|
|
196
|
-
case "number": return a
|
|
197
|
-
case "function": return a
|
|
198
|
-
case "object": return areObjectsEqual(a
|
|
169
|
+
case "undefined": return a === b;
|
|
170
|
+
case "number": return a === b || Object.is(a, b);
|
|
171
|
+
case "function": return a === b;
|
|
172
|
+
case "object": return areObjectsEqual(a, b, stack, areValuesEqual);
|
|
199
173
|
}
|
|
200
|
-
return areObjectsEqual(a
|
|
174
|
+
return areObjectsEqual(a, b, stack, areValuesEqual);
|
|
201
175
|
}
|
|
202
|
-
function areObjectsEqual(a
|
|
203
|
-
if (Object.is(a
|
|
204
|
-
let aTag = getTag(a
|
|
176
|
+
function areObjectsEqual(a, b, stack, areValuesEqual) {
|
|
177
|
+
if (Object.is(a, b)) return true;
|
|
178
|
+
let aTag = getTag(a);
|
|
205
179
|
let bTag = getTag(b);
|
|
206
|
-
if (aTag ===
|
|
207
|
-
if (bTag ===
|
|
180
|
+
if (aTag === "[object Arguments]") aTag = objectTag;
|
|
181
|
+
if (bTag === "[object Arguments]") bTag = objectTag;
|
|
208
182
|
if (aTag !== bTag) return false;
|
|
209
183
|
switch (aTag) {
|
|
210
|
-
case stringTag: return a
|
|
211
|
-
case numberTag: return eq(a
|
|
184
|
+
case stringTag: return a.toString() === b.toString();
|
|
185
|
+
case numberTag: return eq(a.valueOf(), b.valueOf());
|
|
212
186
|
case booleanTag:
|
|
213
187
|
case dateTag:
|
|
214
|
-
case symbolTag: return Object.is(a
|
|
215
|
-
case regexpTag: return a
|
|
216
|
-
case functionTag: return a
|
|
188
|
+
case symbolTag: return Object.is(a.valueOf(), b.valueOf());
|
|
189
|
+
case regexpTag: return a.source === b.source && a.flags === b.flags;
|
|
190
|
+
case functionTag: return a === b;
|
|
217
191
|
}
|
|
218
192
|
stack = stack ?? /* @__PURE__ */ new Map();
|
|
219
|
-
const aStack = stack.get(a
|
|
193
|
+
const aStack = stack.get(a);
|
|
220
194
|
const bStack = stack.get(b);
|
|
221
195
|
if (aStack != null && bStack != null) return aStack === b;
|
|
222
|
-
stack.set(a
|
|
223
|
-
stack.set(b, a
|
|
196
|
+
stack.set(a, b);
|
|
197
|
+
stack.set(b, a);
|
|
224
198
|
try {
|
|
225
199
|
switch (aTag) {
|
|
226
200
|
case mapTag:
|
|
227
|
-
if (a
|
|
228
|
-
for (const [key, value] of a
|
|
201
|
+
if (a.size !== b.size) return false;
|
|
202
|
+
for (const [key, value] of a.entries()) if (!b.has(key) || !isEqualWithImpl(value, b.get(key), key, a, b, stack, areValuesEqual)) return false;
|
|
229
203
|
return true;
|
|
230
204
|
case setTag: {
|
|
231
|
-
if (a
|
|
232
|
-
const aValues = Array.from(a
|
|
205
|
+
if (a.size !== b.size) return false;
|
|
206
|
+
const aValues = Array.from(a.values());
|
|
233
207
|
const bValues = Array.from(b.values());
|
|
234
|
-
for (let i
|
|
235
|
-
const aValue = aValues[i
|
|
208
|
+
for (let i = 0; i < aValues.length; i++) {
|
|
209
|
+
const aValue = aValues[i];
|
|
236
210
|
const index = bValues.findIndex((bValue) => {
|
|
237
|
-
return isEqualWithImpl(aValue, bValue, void 0, a
|
|
211
|
+
return isEqualWithImpl(aValue, bValue, void 0, a, b, stack, areValuesEqual);
|
|
238
212
|
});
|
|
239
213
|
if (index === -1) return false;
|
|
240
214
|
bValues.splice(index, 1);
|
|
@@ -253,45 +227,43 @@ function areObjectsEqual(a$1, b, stack, areValuesEqual) {
|
|
|
253
227
|
case bigInt64ArrayTag:
|
|
254
228
|
case float32ArrayTag:
|
|
255
229
|
case float64ArrayTag:
|
|
256
|
-
if (typeof Buffer !== "undefined" && Buffer.isBuffer(a
|
|
257
|
-
if (a
|
|
258
|
-
for (let i
|
|
230
|
+
if (typeof Buffer !== "undefined" && Buffer.isBuffer(a) !== Buffer.isBuffer(b)) return false;
|
|
231
|
+
if (a.length !== b.length) return false;
|
|
232
|
+
for (let i = 0; i < a.length; i++) if (!isEqualWithImpl(a[i], b[i], i, a, b, stack, areValuesEqual)) return false;
|
|
259
233
|
return true;
|
|
260
234
|
case arrayBufferTag:
|
|
261
|
-
if (a
|
|
262
|
-
return areObjectsEqual(new Uint8Array(a
|
|
235
|
+
if (a.byteLength !== b.byteLength) return false;
|
|
236
|
+
return areObjectsEqual(new Uint8Array(a), new Uint8Array(b), stack, areValuesEqual);
|
|
263
237
|
case dataViewTag:
|
|
264
|
-
if (a
|
|
265
|
-
return areObjectsEqual(new Uint8Array(a
|
|
266
|
-
case errorTag: return a
|
|
238
|
+
if (a.byteLength !== b.byteLength || a.byteOffset !== b.byteOffset) return false;
|
|
239
|
+
return areObjectsEqual(new Uint8Array(a), new Uint8Array(b), stack, areValuesEqual);
|
|
240
|
+
case errorTag: return a.name === b.name && a.message === b.message;
|
|
267
241
|
case objectTag: {
|
|
268
|
-
if (!(areObjectsEqual(a
|
|
269
|
-
const aKeys = [...Object.keys(a
|
|
242
|
+
if (!(areObjectsEqual(a.constructor, b.constructor, stack, areValuesEqual) || isPlainObject$1(a) && isPlainObject$1(b))) return false;
|
|
243
|
+
const aKeys = [...Object.keys(a), ...getSymbols(a)];
|
|
270
244
|
const bKeys = [...Object.keys(b), ...getSymbols(b)];
|
|
271
245
|
if (aKeys.length !== bKeys.length) return false;
|
|
272
|
-
for (let i
|
|
273
|
-
const propKey = aKeys[i
|
|
274
|
-
const aProp = a
|
|
246
|
+
for (let i = 0; i < aKeys.length; i++) {
|
|
247
|
+
const propKey = aKeys[i];
|
|
248
|
+
const aProp = a[propKey];
|
|
275
249
|
if (!Object.hasOwn(b, propKey)) return false;
|
|
276
250
|
const bProp = b[propKey];
|
|
277
|
-
if (!isEqualWithImpl(aProp, bProp, propKey, a
|
|
251
|
+
if (!isEqualWithImpl(aProp, bProp, propKey, a, b, stack, areValuesEqual)) return false;
|
|
278
252
|
}
|
|
279
253
|
return true;
|
|
280
254
|
}
|
|
281
255
|
default: return false;
|
|
282
256
|
}
|
|
283
257
|
} finally {
|
|
284
|
-
stack.delete(a
|
|
258
|
+
stack.delete(a);
|
|
285
259
|
stack.delete(b);
|
|
286
260
|
}
|
|
287
261
|
}
|
|
288
|
-
|
|
289
262
|
//#endregion
|
|
290
263
|
//#region ../../node_modules/.pnpm/es-toolkit@1.32.0/node_modules/es-toolkit/dist/predicate/isEqual.mjs
|
|
291
|
-
function isEqual(a
|
|
292
|
-
return isEqualWith(a
|
|
264
|
+
function isEqual(a, b) {
|
|
265
|
+
return isEqualWith(a, b, noop$2);
|
|
293
266
|
}
|
|
294
|
-
|
|
295
267
|
//#endregion
|
|
296
268
|
//#region ../../node_modules/.pnpm/is-plain-obj@4.1.0/node_modules/is-plain-obj/index.js
|
|
297
269
|
function isPlainObject(value) {
|
|
@@ -299,7 +271,6 @@ function isPlainObject(value) {
|
|
|
299
271
|
const prototype = Object.getPrototypeOf(value);
|
|
300
272
|
return (prototype === null || prototype === Object.prototype || Object.getPrototypeOf(prototype) === null) && !(Symbol.toStringTag in value) && !(Symbol.iterator in value);
|
|
301
273
|
}
|
|
302
|
-
|
|
303
274
|
//#endregion
|
|
304
275
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/arguments/file-url.js
|
|
305
276
|
const safeNormalizeFileUrl = (file, name) => {
|
|
@@ -310,7 +281,6 @@ const safeNormalizeFileUrl = (file, name) => {
|
|
|
310
281
|
const normalizeDenoExecPath = (file) => isDenoExecPath(file) ? file.toString() : file;
|
|
311
282
|
const isDenoExecPath = (file) => typeof file !== "string" && file && Object.getPrototypeOf(file) === String.prototype;
|
|
312
283
|
const normalizeFileUrl = (file) => file instanceof URL ? (0, node_url.fileURLToPath)(file) : file;
|
|
313
|
-
|
|
314
284
|
//#endregion
|
|
315
285
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/methods/parameters.js
|
|
316
286
|
const normalizeParameters = (rawFile, rawArguments = [], rawOptions = {}) => {
|
|
@@ -328,7 +298,6 @@ const normalizeParameters = (rawFile, rawArguments = [], rawOptions = {}) => {
|
|
|
328
298
|
options
|
|
329
299
|
];
|
|
330
300
|
};
|
|
331
|
-
|
|
332
301
|
//#endregion
|
|
333
302
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/utils/uint-array.js
|
|
334
303
|
const { toString: objectToString$1 } = Object.prototype;
|
|
@@ -368,7 +337,6 @@ const getJoinLength = (uint8Arrays) => {
|
|
|
368
337
|
for (const uint8Array of uint8Arrays) joinLength += uint8Array.length;
|
|
369
338
|
return joinLength;
|
|
370
339
|
};
|
|
371
|
-
|
|
372
340
|
//#endregion
|
|
373
341
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/methods/template.js
|
|
374
342
|
const isTemplateString = (templates) => Array.isArray(templates) && Array.isArray(templates.raw);
|
|
@@ -395,7 +363,7 @@ const parseTemplate = ({ templates, expressions, tokens, index, template }) => {
|
|
|
395
363
|
const newTokens = concatTokens(tokens, nextTokens, leadingWhitespaces);
|
|
396
364
|
if (index === expressions.length) return newTokens;
|
|
397
365
|
const expression = expressions[index];
|
|
398
|
-
return concatTokens(newTokens, Array.isArray(expression) ? expression.map((expression
|
|
366
|
+
return concatTokens(newTokens, Array.isArray(expression) ? expression.map((expression) => parseExpression(expression)) : [parseExpression(expression)], trailingWhitespaces);
|
|
399
367
|
};
|
|
400
368
|
const splitByWhitespaces = (template, rawTemplate) => {
|
|
401
369
|
if (rawTemplate.length === 0) return {
|
|
@@ -457,7 +425,6 @@ const getSubprocessResult = ({ stdout }) => {
|
|
|
457
425
|
if (stdout === void 0) throw new TypeError("Missing result.stdout in template expression. This is probably due to the previous subprocess' \"stdout\" option.");
|
|
458
426
|
throw new TypeError(`Unexpected "${typeof stdout}" stdout in template expression`);
|
|
459
427
|
};
|
|
460
|
-
|
|
461
428
|
//#endregion
|
|
462
429
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/utils/standard-stream.js
|
|
463
430
|
const isStandardStream = (stream) => STANDARD_STREAMS.includes(stream);
|
|
@@ -472,7 +439,6 @@ const STANDARD_STREAMS_ALIASES = [
|
|
|
472
439
|
"stderr"
|
|
473
440
|
];
|
|
474
441
|
const getStreamName = (fdNumber) => STANDARD_STREAMS_ALIASES[fdNumber] ?? `stdio[${fdNumber}]`;
|
|
475
|
-
|
|
476
442
|
//#endregion
|
|
477
443
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/arguments/specific.js
|
|
478
444
|
const normalizeFdSpecificOptions = (options) => {
|
|
@@ -527,7 +493,6 @@ const FD_SPECIFIC_OPTIONS = [
|
|
|
527
493
|
"stripFinalNewline"
|
|
528
494
|
];
|
|
529
495
|
const getFdSpecificValue = (optionArray, fdNumber) => fdNumber === "ipc" ? optionArray.at(-1) : optionArray[fdNumber];
|
|
530
|
-
|
|
531
496
|
//#endregion
|
|
532
497
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/verbose/values.js
|
|
533
498
|
const isVerbose = ({ verbose }, fdNumber) => getFdVerbose(verbose, fdNumber) !== "none";
|
|
@@ -544,7 +509,6 @@ const VERBOSE_VALUES = [
|
|
|
544
509
|
"short",
|
|
545
510
|
"full"
|
|
546
511
|
];
|
|
547
|
-
|
|
548
512
|
//#endregion
|
|
549
513
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/arguments/escape.js
|
|
550
514
|
const joinCommand = (filePath, rawArguments) => {
|
|
@@ -565,7 +529,7 @@ const escapeControlCharacter = (character) => {
|
|
|
565
529
|
};
|
|
566
530
|
const getSpecialCharRegExp = () => {
|
|
567
531
|
try {
|
|
568
|
-
return new RegExp("\\p{Separator}|\\p{Other}", "gu");
|
|
532
|
+
return /* @__PURE__ */ new RegExp("\\p{Separator}|\\p{Other}", "gu");
|
|
569
533
|
} catch {
|
|
570
534
|
return /[\s\u0000-\u001F\u007F-\u009F\u00AD]/g;
|
|
571
535
|
}
|
|
@@ -585,7 +549,6 @@ const quoteString = (escapedArgument) => {
|
|
|
585
549
|
return node_process.platform === "win32" ? `"${escapedArgument.replaceAll("\"", "\"\"")}"` : `'${escapedArgument.replaceAll("'", "'\\''")}'`;
|
|
586
550
|
};
|
|
587
551
|
const NO_ESCAPE_REGEXP = /^[\w./-]+$/;
|
|
588
|
-
|
|
589
552
|
//#endregion
|
|
590
553
|
//#region ../../node_modules/.pnpm/is-unicode-supported@2.1.0/node_modules/is-unicode-supported/index.js
|
|
591
554
|
function isUnicodeSupported() {
|
|
@@ -594,7 +557,6 @@ function isUnicodeSupported() {
|
|
|
594
557
|
if (node_process.default.platform !== "win32") return TERM !== "linux";
|
|
595
558
|
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";
|
|
596
559
|
}
|
|
597
|
-
|
|
598
560
|
//#endregion
|
|
599
561
|
//#region ../../node_modules/.pnpm/figures@6.1.0/node_modules/figures/index.js
|
|
600
562
|
const common = {
|
|
@@ -873,11 +835,8 @@ const fallbackSymbols = {
|
|
|
873
835
|
...common,
|
|
874
836
|
...specialFallbackSymbols
|
|
875
837
|
};
|
|
876
|
-
const
|
|
877
|
-
|
|
878
|
-
var figures_default = figures;
|
|
879
|
-
const replacements = Object.entries(specialMainSymbols);
|
|
880
|
-
|
|
838
|
+
const figures = isUnicodeSupported() ? mainSymbols : fallbackSymbols;
|
|
839
|
+
Object.entries(specialMainSymbols);
|
|
881
840
|
//#endregion
|
|
882
841
|
//#region ../../node_modules/.pnpm/yoctocolors@2.1.1/node_modules/yoctocolors/base.js
|
|
883
842
|
const hasColors = node_tty.default?.WriteStream?.prototype?.hasColors?.() ?? false;
|
|
@@ -900,48 +859,47 @@ const format = (open, close) => {
|
|
|
900
859
|
return result;
|
|
901
860
|
};
|
|
902
861
|
};
|
|
903
|
-
|
|
862
|
+
format(0, 0);
|
|
904
863
|
const bold = format(1, 22);
|
|
905
|
-
|
|
906
|
-
|
|
907
|
-
|
|
908
|
-
|
|
909
|
-
|
|
910
|
-
|
|
911
|
-
|
|
912
|
-
|
|
913
|
-
|
|
914
|
-
|
|
915
|
-
|
|
916
|
-
|
|
917
|
-
|
|
918
|
-
|
|
919
|
-
|
|
864
|
+
format(2, 22);
|
|
865
|
+
format(3, 23);
|
|
866
|
+
format(4, 24);
|
|
867
|
+
format(53, 55);
|
|
868
|
+
format(7, 27);
|
|
869
|
+
format(8, 28);
|
|
870
|
+
format(9, 29);
|
|
871
|
+
format(30, 39);
|
|
872
|
+
format(31, 39);
|
|
873
|
+
format(32, 39);
|
|
874
|
+
format(33, 39);
|
|
875
|
+
format(34, 39);
|
|
876
|
+
format(35, 39);
|
|
877
|
+
format(36, 39);
|
|
878
|
+
format(37, 39);
|
|
920
879
|
const gray = format(90, 39);
|
|
921
|
-
|
|
922
|
-
|
|
923
|
-
|
|
924
|
-
|
|
925
|
-
|
|
926
|
-
|
|
927
|
-
|
|
928
|
-
|
|
929
|
-
|
|
880
|
+
format(40, 49);
|
|
881
|
+
format(41, 49);
|
|
882
|
+
format(42, 49);
|
|
883
|
+
format(43, 49);
|
|
884
|
+
format(44, 49);
|
|
885
|
+
format(45, 49);
|
|
886
|
+
format(46, 49);
|
|
887
|
+
format(47, 49);
|
|
888
|
+
format(100, 49);
|
|
930
889
|
const redBright = format(91, 39);
|
|
931
|
-
|
|
890
|
+
format(92, 39);
|
|
932
891
|
const yellowBright = format(93, 39);
|
|
933
|
-
|
|
934
|
-
|
|
935
|
-
|
|
936
|
-
|
|
937
|
-
|
|
938
|
-
|
|
939
|
-
|
|
940
|
-
|
|
941
|
-
|
|
942
|
-
|
|
943
|
-
|
|
944
|
-
|
|
892
|
+
format(94, 39);
|
|
893
|
+
format(95, 39);
|
|
894
|
+
format(96, 39);
|
|
895
|
+
format(97, 39);
|
|
896
|
+
format(101, 49);
|
|
897
|
+
format(102, 49);
|
|
898
|
+
format(103, 49);
|
|
899
|
+
format(104, 49);
|
|
900
|
+
format(105, 49);
|
|
901
|
+
format(106, 49);
|
|
902
|
+
format(107, 49);
|
|
945
903
|
//#endregion
|
|
946
904
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/verbose/default.js
|
|
947
905
|
const defaultVerboseFunction = ({ type, message, timestamp, piped, commandId, result: { failed = false } = {}, options: { reject = true } }) => {
|
|
@@ -957,8 +915,8 @@ const defaultVerboseFunction = ({ type, message, timestamp, piped, commandId, re
|
|
|
957
915
|
const serializeTimestamp = (timestamp) => `${padField(timestamp.getHours(), 2)}:${padField(timestamp.getMinutes(), 2)}:${padField(timestamp.getSeconds(), 2)}.${padField(timestamp.getMilliseconds(), 3)}`;
|
|
958
916
|
const padField = (field, padding) => String(field).padStart(padding, "0");
|
|
959
917
|
const getFinalIcon = ({ failed, reject }) => {
|
|
960
|
-
if (!failed) return
|
|
961
|
-
return reject ?
|
|
918
|
+
if (!failed) return figures.tick;
|
|
919
|
+
return reject ? figures.cross : figures.warning;
|
|
962
920
|
};
|
|
963
921
|
const ICONS = {
|
|
964
922
|
command: ({ piped }) => piped ? "|" : "$",
|
|
@@ -975,7 +933,6 @@ const COLORS = {
|
|
|
975
933
|
error: ({ reject }) => reject ? redBright : yellowBright,
|
|
976
934
|
duration: () => gray
|
|
977
935
|
};
|
|
978
|
-
|
|
979
936
|
//#endregion
|
|
980
937
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/verbose/custom.js
|
|
981
938
|
const applyVerboseOnLines = (printedLines, verboseInfo, fdNumber) => {
|
|
@@ -988,7 +945,6 @@ const applyVerboseFunction = (verboseLine, verboseObject, verboseFunction) => {
|
|
|
988
945
|
if (typeof printedLine === "string") return printedLine;
|
|
989
946
|
};
|
|
990
947
|
const appendNewline = (printedLine) => printedLine.endsWith("\n") ? printedLine : `${printedLine}\n`;
|
|
991
|
-
|
|
992
948
|
//#endregion
|
|
993
949
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/verbose/log.js
|
|
994
950
|
const verboseLog = ({ type, verboseMessage, fdNumber, verboseInfo, result }) => {
|
|
@@ -999,7 +955,7 @@ const verboseLog = ({ type, verboseMessage, fdNumber, verboseInfo, result }) =>
|
|
|
999
955
|
})), verboseInfo, fdNumber);
|
|
1000
956
|
if (finalLines !== "") console.warn(finalLines.slice(0, -1));
|
|
1001
957
|
};
|
|
1002
|
-
const getVerboseObject = ({ type, result, verboseInfo: { escapedCommand, commandId, rawOptions: { piped = false
|
|
958
|
+
const getVerboseObject = ({ type, result, verboseInfo: { escapedCommand, commandId, rawOptions: { piped = false, ...options } } }) => ({
|
|
1003
959
|
type,
|
|
1004
960
|
escapedCommand,
|
|
1005
961
|
commandId: `${commandId}`,
|
|
@@ -1022,7 +978,6 @@ const serializeVerboseMessage = (message) => {
|
|
|
1022
978
|
return escapeLines(typeof message === "string" ? message : (0, node_util.inspect)(message)).replaceAll(" ", " ".repeat(TAB_SIZE));
|
|
1023
979
|
};
|
|
1024
980
|
const TAB_SIZE = 2;
|
|
1025
|
-
|
|
1026
981
|
//#endregion
|
|
1027
982
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/verbose/start.js
|
|
1028
983
|
const logCommand = (escapedCommand, verboseInfo) => {
|
|
@@ -1033,7 +988,6 @@ const logCommand = (escapedCommand, verboseInfo) => {
|
|
|
1033
988
|
verboseInfo
|
|
1034
989
|
});
|
|
1035
990
|
};
|
|
1036
|
-
|
|
1037
991
|
//#endregion
|
|
1038
992
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/verbose/info.js
|
|
1039
993
|
const getVerboseInfo = (verbose, escapedCommand, rawOptions) => {
|
|
@@ -1057,12 +1011,10 @@ const validateVerbose = (verbose) => {
|
|
|
1057
1011
|
}
|
|
1058
1012
|
}
|
|
1059
1013
|
};
|
|
1060
|
-
|
|
1061
1014
|
//#endregion
|
|
1062
1015
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/return/duration.js
|
|
1063
1016
|
const getStartTime = () => node_process.hrtime.bigint();
|
|
1064
1017
|
const getDurationMs = (startTime) => Number(node_process.hrtime.bigint() - startTime) / 1e6;
|
|
1065
|
-
|
|
1066
1018
|
//#endregion
|
|
1067
1019
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/arguments/command.js
|
|
1068
1020
|
const handleCommand = (filePath, rawArguments, rawOptions) => {
|
|
@@ -1077,51 +1029,49 @@ const handleCommand = (filePath, rawArguments, rawOptions) => {
|
|
|
1077
1029
|
verboseInfo
|
|
1078
1030
|
};
|
|
1079
1031
|
};
|
|
1080
|
-
|
|
1081
1032
|
//#endregion
|
|
1082
1033
|
//#region ../../node_modules/.pnpm/isexe@2.0.0/node_modules/isexe/windows.js
|
|
1083
|
-
var require_windows = /* @__PURE__ */
|
|
1084
|
-
module.exports = isexe
|
|
1085
|
-
isexe
|
|
1086
|
-
var fs$
|
|
1087
|
-
function checkPathExt(path
|
|
1034
|
+
var require_windows = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
1035
|
+
module.exports = isexe;
|
|
1036
|
+
isexe.sync = sync;
|
|
1037
|
+
var fs$6 = require("fs");
|
|
1038
|
+
function checkPathExt(path, options) {
|
|
1088
1039
|
var pathext = options.pathExt !== void 0 ? options.pathExt : process.env.PATHEXT;
|
|
1089
1040
|
if (!pathext) return true;
|
|
1090
1041
|
pathext = pathext.split(";");
|
|
1091
1042
|
if (pathext.indexOf("") !== -1) return true;
|
|
1092
|
-
for (var i
|
|
1093
|
-
var p
|
|
1094
|
-
if (p
|
|
1043
|
+
for (var i = 0; i < pathext.length; i++) {
|
|
1044
|
+
var p = pathext[i].toLowerCase();
|
|
1045
|
+
if (p && path.substr(-p.length).toLowerCase() === p) return true;
|
|
1095
1046
|
}
|
|
1096
1047
|
return false;
|
|
1097
1048
|
}
|
|
1098
|
-
function checkStat
|
|
1049
|
+
function checkStat(stat, path, options) {
|
|
1099
1050
|
if (!stat.isSymbolicLink() && !stat.isFile()) return false;
|
|
1100
|
-
return checkPathExt(path
|
|
1051
|
+
return checkPathExt(path, options);
|
|
1101
1052
|
}
|
|
1102
|
-
function isexe
|
|
1103
|
-
fs$
|
|
1104
|
-
cb(er, er ? false : checkStat
|
|
1053
|
+
function isexe(path, options, cb) {
|
|
1054
|
+
fs$6.stat(path, function(er, stat) {
|
|
1055
|
+
cb(er, er ? false : checkStat(stat, path, options));
|
|
1105
1056
|
});
|
|
1106
1057
|
}
|
|
1107
|
-
function sync
|
|
1108
|
-
return checkStat
|
|
1058
|
+
function sync(path, options) {
|
|
1059
|
+
return checkStat(fs$6.statSync(path), path, options);
|
|
1109
1060
|
}
|
|
1110
|
-
})
|
|
1111
|
-
|
|
1061
|
+
}));
|
|
1112
1062
|
//#endregion
|
|
1113
1063
|
//#region ../../node_modules/.pnpm/isexe@2.0.0/node_modules/isexe/mode.js
|
|
1114
|
-
var require_mode = /* @__PURE__ */
|
|
1115
|
-
module.exports = isexe
|
|
1116
|
-
isexe
|
|
1117
|
-
var fs$
|
|
1118
|
-
function isexe
|
|
1119
|
-
fs$
|
|
1064
|
+
var require_mode = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
1065
|
+
module.exports = isexe;
|
|
1066
|
+
isexe.sync = sync;
|
|
1067
|
+
var fs$5 = require("fs");
|
|
1068
|
+
function isexe(path, options, cb) {
|
|
1069
|
+
fs$5.stat(path, function(er, stat) {
|
|
1120
1070
|
cb(er, er ? false : checkStat(stat, options));
|
|
1121
1071
|
});
|
|
1122
1072
|
}
|
|
1123
|
-
function sync
|
|
1124
|
-
return checkStat(fs$
|
|
1073
|
+
function sync(path, options) {
|
|
1074
|
+
return checkStat(fs$5.statSync(path), options);
|
|
1125
1075
|
}
|
|
1126
1076
|
function checkStat(stat, options) {
|
|
1127
1077
|
return stat.isFile() && checkMode(stat, options);
|
|
@@ -1132,24 +1082,23 @@ var require_mode = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/isexe@
|
|
|
1132
1082
|
var gid = stat.gid;
|
|
1133
1083
|
var myUid = options.uid !== void 0 ? options.uid : process.getuid && process.getuid();
|
|
1134
1084
|
var myGid = options.gid !== void 0 ? options.gid : process.getgid && process.getgid();
|
|
1135
|
-
var u
|
|
1085
|
+
var u = parseInt("100", 8);
|
|
1136
1086
|
var g = parseInt("010", 8);
|
|
1137
|
-
var o
|
|
1138
|
-
var ug = u
|
|
1139
|
-
return mod & o
|
|
1087
|
+
var o = parseInt("001", 8);
|
|
1088
|
+
var ug = u | g;
|
|
1089
|
+
return mod & o || mod & g && gid === myGid || mod & u && uid === myUid || mod & ug && myUid === 0;
|
|
1140
1090
|
}
|
|
1141
|
-
})
|
|
1142
|
-
|
|
1091
|
+
}));
|
|
1143
1092
|
//#endregion
|
|
1144
1093
|
//#region ../../node_modules/.pnpm/isexe@2.0.0/node_modules/isexe/index.js
|
|
1145
|
-
var require_isexe = /* @__PURE__ */
|
|
1094
|
+
var require_isexe = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
1146
1095
|
require("fs");
|
|
1147
1096
|
var core;
|
|
1148
1097
|
if (process.platform === "win32" || global.TESTING_WINDOWS) core = require_windows();
|
|
1149
1098
|
else core = require_mode();
|
|
1150
|
-
module.exports = isexe
|
|
1151
|
-
isexe
|
|
1152
|
-
function isexe
|
|
1099
|
+
module.exports = isexe;
|
|
1100
|
+
isexe.sync = sync;
|
|
1101
|
+
function isexe(path, options, cb) {
|
|
1153
1102
|
if (typeof options === "function") {
|
|
1154
1103
|
cb = options;
|
|
1155
1104
|
options = {};
|
|
@@ -1157,13 +1106,13 @@ var require_isexe = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/isexe
|
|
|
1157
1106
|
if (!cb) {
|
|
1158
1107
|
if (typeof Promise !== "function") throw new TypeError("callback not provided");
|
|
1159
1108
|
return new Promise(function(resolve, reject) {
|
|
1160
|
-
isexe
|
|
1109
|
+
isexe(path, options || {}, function(er, is) {
|
|
1161
1110
|
if (er) reject(er);
|
|
1162
1111
|
else resolve(is);
|
|
1163
1112
|
});
|
|
1164
1113
|
});
|
|
1165
1114
|
}
|
|
1166
|
-
core(path
|
|
1115
|
+
core(path, options || {}, function(er, is) {
|
|
1167
1116
|
if (er) {
|
|
1168
1117
|
if (er.code === "EACCES" || options && options.ignoreErrors) {
|
|
1169
1118
|
er = null;
|
|
@@ -1173,21 +1122,20 @@ var require_isexe = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/isexe
|
|
|
1173
1122
|
cb(er, is);
|
|
1174
1123
|
});
|
|
1175
1124
|
}
|
|
1176
|
-
function sync(path
|
|
1125
|
+
function sync(path, options) {
|
|
1177
1126
|
try {
|
|
1178
|
-
return core.sync(path
|
|
1127
|
+
return core.sync(path, options || {});
|
|
1179
1128
|
} catch (er) {
|
|
1180
1129
|
if (options && options.ignoreErrors || er.code === "EACCES") return false;
|
|
1181
1130
|
else throw er;
|
|
1182
1131
|
}
|
|
1183
1132
|
}
|
|
1184
|
-
})
|
|
1185
|
-
|
|
1133
|
+
}));
|
|
1186
1134
|
//#endregion
|
|
1187
1135
|
//#region ../../node_modules/.pnpm/which@2.0.2/node_modules/which/which.js
|
|
1188
|
-
var require_which = /* @__PURE__ */
|
|
1136
|
+
var require_which = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
1189
1137
|
const isWindows = process.platform === "win32" || process.env.OSTYPE === "cygwin" || process.env.OSTYPE === "msys";
|
|
1190
|
-
const path$
|
|
1138
|
+
const path$10 = require("path");
|
|
1191
1139
|
const COLON = isWindows ? ";" : ":";
|
|
1192
1140
|
const isexe = require_isexe();
|
|
1193
1141
|
const getNotFoundError = (cmd) => Object.assign(/* @__PURE__ */ new Error(`not found: ${cmd}`), { code: "ENOENT" });
|
|
@@ -1205,7 +1153,7 @@ var require_which = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/which
|
|
|
1205
1153
|
pathExtExe
|
|
1206
1154
|
};
|
|
1207
1155
|
};
|
|
1208
|
-
const which
|
|
1156
|
+
const which = (cmd, opt, cb) => {
|
|
1209
1157
|
if (typeof opt === "function") {
|
|
1210
1158
|
cb = opt;
|
|
1211
1159
|
opt = {};
|
|
@@ -1213,20 +1161,20 @@ var require_which = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/which
|
|
|
1213
1161
|
if (!opt) opt = {};
|
|
1214
1162
|
const { pathEnv, pathExt, pathExtExe } = getPathInfo(cmd, opt);
|
|
1215
1163
|
const found = [];
|
|
1216
|
-
const step = (i
|
|
1217
|
-
if (i
|
|
1218
|
-
const ppRaw = pathEnv[i
|
|
1164
|
+
const step = (i) => new Promise((resolve, reject) => {
|
|
1165
|
+
if (i === pathEnv.length) return opt.all && found.length ? resolve(found) : reject(getNotFoundError(cmd));
|
|
1166
|
+
const ppRaw = pathEnv[i];
|
|
1219
1167
|
const pathPart = /^".*"$/.test(ppRaw) ? ppRaw.slice(1, -1) : ppRaw;
|
|
1220
|
-
const pCmd = path$
|
|
1221
|
-
resolve(subStep(!pathPart && /^\.[\\\/]/.test(cmd) ? cmd.slice(0, 2) + pCmd : pCmd, i
|
|
1168
|
+
const pCmd = path$10.join(pathPart, cmd);
|
|
1169
|
+
resolve(subStep(!pathPart && /^\.[\\\/]/.test(cmd) ? cmd.slice(0, 2) + pCmd : pCmd, i, 0));
|
|
1222
1170
|
});
|
|
1223
|
-
const subStep = (p
|
|
1224
|
-
if (ii === pathExt.length) return resolve(step(i
|
|
1171
|
+
const subStep = (p, i, ii) => new Promise((resolve, reject) => {
|
|
1172
|
+
if (ii === pathExt.length) return resolve(step(i + 1));
|
|
1225
1173
|
const ext = pathExt[ii];
|
|
1226
|
-
isexe(p
|
|
1227
|
-
if (!er && is) if (opt.all) found.push(p
|
|
1228
|
-
else return resolve(p
|
|
1229
|
-
return resolve(subStep(p
|
|
1174
|
+
isexe(p + ext, { pathExt: pathExtExe }, (er, is) => {
|
|
1175
|
+
if (!er && is) if (opt.all) found.push(p + ext);
|
|
1176
|
+
else return resolve(p + ext);
|
|
1177
|
+
return resolve(subStep(p, i, ii + 1));
|
|
1230
1178
|
});
|
|
1231
1179
|
});
|
|
1232
1180
|
return cb ? step(0).then((res) => cb(null, res), cb) : step(0);
|
|
@@ -1235,13 +1183,13 @@ var require_which = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/which
|
|
|
1235
1183
|
opt = opt || {};
|
|
1236
1184
|
const { pathEnv, pathExt, pathExtExe } = getPathInfo(cmd, opt);
|
|
1237
1185
|
const found = [];
|
|
1238
|
-
for (let i
|
|
1239
|
-
const ppRaw = pathEnv[i
|
|
1186
|
+
for (let i = 0; i < pathEnv.length; i++) {
|
|
1187
|
+
const ppRaw = pathEnv[i];
|
|
1240
1188
|
const pathPart = /^".*"$/.test(ppRaw) ? ppRaw.slice(1, -1) : ppRaw;
|
|
1241
|
-
const pCmd = path$
|
|
1242
|
-
const p
|
|
1189
|
+
const pCmd = path$10.join(pathPart, cmd);
|
|
1190
|
+
const p = !pathPart && /^\.[\\\/]/.test(cmd) ? cmd.slice(0, 2) + pCmd : pCmd;
|
|
1243
1191
|
for (let j = 0; j < pathExt.length; j++) {
|
|
1244
|
-
const cur = p
|
|
1192
|
+
const cur = p + pathExt[j];
|
|
1245
1193
|
try {
|
|
1246
1194
|
if (isexe.sync(cur, { pathExt: pathExtExe })) if (opt.all) found.push(cur);
|
|
1247
1195
|
else return cur;
|
|
@@ -1252,26 +1200,24 @@ var require_which = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/which
|
|
|
1252
1200
|
if (opt.nothrow) return null;
|
|
1253
1201
|
throw getNotFoundError(cmd);
|
|
1254
1202
|
};
|
|
1255
|
-
module.exports = which
|
|
1256
|
-
which
|
|
1257
|
-
})
|
|
1258
|
-
|
|
1203
|
+
module.exports = which;
|
|
1204
|
+
which.sync = whichSync;
|
|
1205
|
+
}));
|
|
1259
1206
|
//#endregion
|
|
1260
1207
|
//#region ../../node_modules/.pnpm/path-key@3.1.1/node_modules/path-key/index.js
|
|
1261
|
-
var require_path_key = /* @__PURE__ */
|
|
1262
|
-
const pathKey
|
|
1208
|
+
var require_path_key = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
1209
|
+
const pathKey = (options = {}) => {
|
|
1263
1210
|
const environment = options.env || process.env;
|
|
1264
1211
|
if ((options.platform || process.platform) !== "win32") return "PATH";
|
|
1265
1212
|
return Object.keys(environment).reverse().find((key) => key.toUpperCase() === "PATH") || "Path";
|
|
1266
1213
|
};
|
|
1267
|
-
module.exports = pathKey
|
|
1268
|
-
module.exports.default = pathKey
|
|
1269
|
-
})
|
|
1270
|
-
|
|
1214
|
+
module.exports = pathKey;
|
|
1215
|
+
module.exports.default = pathKey;
|
|
1216
|
+
}));
|
|
1271
1217
|
//#endregion
|
|
1272
1218
|
//#region ../../node_modules/.pnpm/cross-spawn@7.0.6/node_modules/cross-spawn/lib/util/resolveCommand.js
|
|
1273
|
-
var require_resolveCommand = /* @__PURE__ */
|
|
1274
|
-
const path$
|
|
1219
|
+
var require_resolveCommand = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
1220
|
+
const path$9 = require("path");
|
|
1275
1221
|
const which = require_which();
|
|
1276
1222
|
const getPathKey = require_path_key();
|
|
1277
1223
|
function resolveCommandAttempt(parsed, withoutPathExt) {
|
|
@@ -1286,23 +1232,22 @@ var require_resolveCommand = /* @__PURE__ */ __commonJS({ "../../node_modules/.p
|
|
|
1286
1232
|
try {
|
|
1287
1233
|
resolved = which.sync(parsed.command, {
|
|
1288
1234
|
path: env[getPathKey({ env })],
|
|
1289
|
-
pathExt: withoutPathExt ? path$
|
|
1235
|
+
pathExt: withoutPathExt ? path$9.delimiter : void 0
|
|
1290
1236
|
});
|
|
1291
1237
|
} catch (e) {} finally {
|
|
1292
1238
|
if (shouldSwitchCwd) process.chdir(cwd);
|
|
1293
1239
|
}
|
|
1294
|
-
if (resolved) resolved = path$
|
|
1240
|
+
if (resolved) resolved = path$9.resolve(hasCustomCwd ? parsed.options.cwd : "", resolved);
|
|
1295
1241
|
return resolved;
|
|
1296
1242
|
}
|
|
1297
|
-
function resolveCommand
|
|
1243
|
+
function resolveCommand(parsed) {
|
|
1298
1244
|
return resolveCommandAttempt(parsed) || resolveCommandAttempt(parsed, true);
|
|
1299
1245
|
}
|
|
1300
|
-
module.exports = resolveCommand
|
|
1301
|
-
})
|
|
1302
|
-
|
|
1246
|
+
module.exports = resolveCommand;
|
|
1247
|
+
}));
|
|
1303
1248
|
//#endregion
|
|
1304
1249
|
//#region ../../node_modules/.pnpm/cross-spawn@7.0.6/node_modules/cross-spawn/lib/util/escape.js
|
|
1305
|
-
var require_escape = /* @__PURE__ */
|
|
1250
|
+
var require_escape = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
1306
1251
|
const metaCharsRegExp = /([()\][%!^"`<>&|;, *?])/g;
|
|
1307
1252
|
function escapeCommand(arg) {
|
|
1308
1253
|
arg = arg.replace(metaCharsRegExp, "^$1");
|
|
@@ -1319,55 +1264,51 @@ var require_escape = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/cros
|
|
|
1319
1264
|
}
|
|
1320
1265
|
module.exports.command = escapeCommand;
|
|
1321
1266
|
module.exports.argument = escapeArgument;
|
|
1322
|
-
})
|
|
1323
|
-
|
|
1267
|
+
}));
|
|
1324
1268
|
//#endregion
|
|
1325
1269
|
//#region ../../node_modules/.pnpm/shebang-regex@3.0.0/node_modules/shebang-regex/index.js
|
|
1326
|
-
var require_shebang_regex = /* @__PURE__ */
|
|
1270
|
+
var require_shebang_regex = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
1327
1271
|
module.exports = /^#!(.*)/;
|
|
1328
|
-
})
|
|
1329
|
-
|
|
1272
|
+
}));
|
|
1330
1273
|
//#endregion
|
|
1331
1274
|
//#region ../../node_modules/.pnpm/shebang-command@2.0.0/node_modules/shebang-command/index.js
|
|
1332
|
-
var require_shebang_command = /* @__PURE__ */
|
|
1275
|
+
var require_shebang_command = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
1333
1276
|
const shebangRegex = require_shebang_regex();
|
|
1334
1277
|
module.exports = (string = "") => {
|
|
1335
1278
|
const match = string.match(shebangRegex);
|
|
1336
1279
|
if (!match) return null;
|
|
1337
|
-
const [path
|
|
1338
|
-
const binary = path
|
|
1280
|
+
const [path, argument] = match[0].replace(/#! ?/, "").split(" ");
|
|
1281
|
+
const binary = path.split("/").pop();
|
|
1339
1282
|
if (binary === "env") return argument;
|
|
1340
1283
|
return argument ? `${binary} ${argument}` : binary;
|
|
1341
1284
|
};
|
|
1342
|
-
})
|
|
1343
|
-
|
|
1285
|
+
}));
|
|
1344
1286
|
//#endregion
|
|
1345
1287
|
//#region ../../node_modules/.pnpm/cross-spawn@7.0.6/node_modules/cross-spawn/lib/util/readShebang.js
|
|
1346
|
-
var require_readShebang = /* @__PURE__ */
|
|
1347
|
-
const fs$
|
|
1288
|
+
var require_readShebang = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
1289
|
+
const fs$4 = require("fs");
|
|
1348
1290
|
const shebangCommand = require_shebang_command();
|
|
1349
|
-
function readShebang
|
|
1291
|
+
function readShebang(command) {
|
|
1350
1292
|
const size = 150;
|
|
1351
1293
|
const buffer = Buffer.alloc(size);
|
|
1352
1294
|
let fd;
|
|
1353
1295
|
try {
|
|
1354
|
-
fd = fs$
|
|
1355
|
-
fs$
|
|
1356
|
-
fs$
|
|
1296
|
+
fd = fs$4.openSync(command, "r");
|
|
1297
|
+
fs$4.readSync(fd, buffer, 0, size, 0);
|
|
1298
|
+
fs$4.closeSync(fd);
|
|
1357
1299
|
} catch (e) {}
|
|
1358
1300
|
return shebangCommand(buffer.toString());
|
|
1359
1301
|
}
|
|
1360
|
-
module.exports = readShebang
|
|
1361
|
-
})
|
|
1362
|
-
|
|
1302
|
+
module.exports = readShebang;
|
|
1303
|
+
}));
|
|
1363
1304
|
//#endregion
|
|
1364
1305
|
//#region ../../node_modules/.pnpm/cross-spawn@7.0.6/node_modules/cross-spawn/lib/parse.js
|
|
1365
|
-
var require_parse = /* @__PURE__ */
|
|
1366
|
-
const path$
|
|
1306
|
+
var require_parse = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
1307
|
+
const path$8 = require("path");
|
|
1367
1308
|
const resolveCommand = require_resolveCommand();
|
|
1368
1309
|
const escape = require_escape();
|
|
1369
1310
|
const readShebang = require_readShebang();
|
|
1370
|
-
const isWin
|
|
1311
|
+
const isWin = process.platform === "win32";
|
|
1371
1312
|
const isExecutableRegExp = /\.(?:com|exe)$/i;
|
|
1372
1313
|
const isCmdShimRegExp = /node_modules[\\/].bin[\\/][^\\/]+\.cmd$/i;
|
|
1373
1314
|
function detectShebang(parsed) {
|
|
@@ -1381,12 +1322,12 @@ var require_parse = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/cross
|
|
|
1381
1322
|
return parsed.file;
|
|
1382
1323
|
}
|
|
1383
1324
|
function parseNonShell(parsed) {
|
|
1384
|
-
if (!isWin
|
|
1325
|
+
if (!isWin) return parsed;
|
|
1385
1326
|
const commandFile = detectShebang(parsed);
|
|
1386
1327
|
const needsShell = !isExecutableRegExp.test(commandFile);
|
|
1387
1328
|
if (parsed.options.forceShell || needsShell) {
|
|
1388
1329
|
const needsDoubleEscapeMetaChars = isCmdShimRegExp.test(commandFile);
|
|
1389
|
-
parsed.command = path$
|
|
1330
|
+
parsed.command = path$8.normalize(parsed.command);
|
|
1390
1331
|
parsed.command = escape.command(parsed.command);
|
|
1391
1332
|
parsed.args = parsed.args.map((arg) => escape.argument(arg, needsDoubleEscapeMetaChars));
|
|
1392
1333
|
parsed.args = [
|
|
@@ -1400,7 +1341,7 @@ var require_parse = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/cross
|
|
|
1400
1341
|
}
|
|
1401
1342
|
return parsed;
|
|
1402
1343
|
}
|
|
1403
|
-
function parse
|
|
1344
|
+
function parse(command, args, options) {
|
|
1404
1345
|
if (args && !Array.isArray(args)) {
|
|
1405
1346
|
options = args;
|
|
1406
1347
|
args = null;
|
|
@@ -1419,12 +1360,11 @@ var require_parse = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/cross
|
|
|
1419
1360
|
};
|
|
1420
1361
|
return options.shell ? parsed : parseNonShell(parsed);
|
|
1421
1362
|
}
|
|
1422
|
-
module.exports = parse
|
|
1423
|
-
})
|
|
1424
|
-
|
|
1363
|
+
module.exports = parse;
|
|
1364
|
+
}));
|
|
1425
1365
|
//#endregion
|
|
1426
1366
|
//#region ../../node_modules/.pnpm/cross-spawn@7.0.6/node_modules/cross-spawn/lib/enoent.js
|
|
1427
|
-
var require_enoent = /* @__PURE__ */
|
|
1367
|
+
var require_enoent = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
1428
1368
|
const isWin = process.platform === "win32";
|
|
1429
1369
|
function notFoundError(original, syscall) {
|
|
1430
1370
|
return Object.assign(/* @__PURE__ */ new Error(`${syscall} ${original.command} ENOENT`), {
|
|
@@ -1435,15 +1375,15 @@ var require_enoent = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/cros
|
|
|
1435
1375
|
spawnargs: original.args
|
|
1436
1376
|
});
|
|
1437
1377
|
}
|
|
1438
|
-
function hookChildProcess(cp
|
|
1378
|
+
function hookChildProcess(cp, parsed) {
|
|
1439
1379
|
if (!isWin) return;
|
|
1440
|
-
const originalEmit = cp
|
|
1441
|
-
cp
|
|
1380
|
+
const originalEmit = cp.emit;
|
|
1381
|
+
cp.emit = function(name, arg1) {
|
|
1442
1382
|
if (name === "exit") {
|
|
1443
1383
|
const err = verifyENOENT(arg1, parsed);
|
|
1444
|
-
if (err) return originalEmit.call(cp
|
|
1384
|
+
if (err) return originalEmit.call(cp, "error", err);
|
|
1445
1385
|
}
|
|
1446
|
-
return originalEmit.apply(cp
|
|
1386
|
+
return originalEmit.apply(cp, arguments);
|
|
1447
1387
|
};
|
|
1448
1388
|
}
|
|
1449
1389
|
function verifyENOENT(status, parsed) {
|
|
@@ -1460,45 +1400,37 @@ var require_enoent = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/cros
|
|
|
1460
1400
|
verifyENOENTSync,
|
|
1461
1401
|
notFoundError
|
|
1462
1402
|
};
|
|
1463
|
-
})
|
|
1464
|
-
|
|
1403
|
+
}));
|
|
1465
1404
|
//#endregion
|
|
1466
|
-
//#region ../../node_modules/.pnpm/
|
|
1467
|
-
var
|
|
1405
|
+
//#region ../../node_modules/.pnpm/path-key@4.0.0/node_modules/path-key/index.js
|
|
1406
|
+
var import_cross_spawn = /* @__PURE__ */ __toESM((/* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
1468
1407
|
const cp = require("child_process");
|
|
1469
1408
|
const parse = require_parse();
|
|
1470
1409
|
const enoent = require_enoent();
|
|
1471
|
-
function spawn
|
|
1410
|
+
function spawn(command, args, options) {
|
|
1472
1411
|
const parsed = parse(command, args, options);
|
|
1473
1412
|
const spawned = cp.spawn(parsed.command, parsed.args, parsed.options);
|
|
1474
1413
|
enoent.hookChildProcess(spawned, parsed);
|
|
1475
1414
|
return spawned;
|
|
1476
1415
|
}
|
|
1477
|
-
function spawnSync
|
|
1416
|
+
function spawnSync(command, args, options) {
|
|
1478
1417
|
const parsed = parse(command, args, options);
|
|
1479
1418
|
const result = cp.spawnSync(parsed.command, parsed.args, parsed.options);
|
|
1480
1419
|
result.error = result.error || enoent.verifyENOENTSync(result.status, parsed);
|
|
1481
1420
|
return result;
|
|
1482
1421
|
}
|
|
1483
|
-
module.exports = spawn
|
|
1484
|
-
module.exports.spawn = spawn
|
|
1485
|
-
module.exports.sync = spawnSync
|
|
1422
|
+
module.exports = spawn;
|
|
1423
|
+
module.exports.spawn = spawn;
|
|
1424
|
+
module.exports.sync = spawnSync;
|
|
1486
1425
|
module.exports._parse = parse;
|
|
1487
1426
|
module.exports._enoent = enoent;
|
|
1488
|
-
})
|
|
1489
|
-
|
|
1490
|
-
//#endregion
|
|
1491
|
-
//#region ../../node_modules/.pnpm/path-key@4.0.0/node_modules/path-key/index.js
|
|
1492
|
-
var import_cross_spawn = /* @__PURE__ */ __toESM(require_cross_spawn(), 1);
|
|
1427
|
+
})))(), 1);
|
|
1493
1428
|
function pathKey(options = {}) {
|
|
1494
|
-
const { env = process.env, platform
|
|
1495
|
-
if (platform
|
|
1429
|
+
const { env = process.env, platform = process.platform } = options;
|
|
1430
|
+
if (platform !== "win32") return "PATH";
|
|
1496
1431
|
return Object.keys(env).reverse().find((key) => key.toUpperCase() === "PATH") || "Path";
|
|
1497
1432
|
}
|
|
1498
|
-
|
|
1499
|
-
//#endregion
|
|
1500
|
-
//#region ../../node_modules/.pnpm/unicorn-magic@0.3.0/node_modules/unicorn-magic/node.js
|
|
1501
|
-
const execFileOriginal = (0, node_util.promisify)(node_child_process.execFile);
|
|
1433
|
+
(0, node_util.promisify)(node_child_process.execFile);
|
|
1502
1434
|
function toPath(urlOrPath) {
|
|
1503
1435
|
return urlOrPath instanceof URL ? (0, node_url.fileURLToPath)(urlOrPath) : urlOrPath;
|
|
1504
1436
|
}
|
|
@@ -1513,16 +1445,14 @@ function traversePathUp(startPath) {
|
|
|
1513
1445
|
}
|
|
1514
1446
|
} };
|
|
1515
1447
|
}
|
|
1516
|
-
const TEN_MEGABYTES_IN_BYTES = 10 * 1024 * 1024;
|
|
1517
|
-
|
|
1518
1448
|
//#endregion
|
|
1519
1449
|
//#region ../../node_modules/.pnpm/npm-run-path@6.0.0/node_modules/npm-run-path/index.js
|
|
1520
|
-
const npmRunPath = ({ cwd = node_process.default.cwd(), path: pathOption = node_process.default.env[pathKey()], preferLocal = true, execPath
|
|
1450
|
+
const npmRunPath = ({ cwd = node_process.default.cwd(), path: pathOption = node_process.default.env[pathKey()], preferLocal = true, execPath = node_process.default.execPath, addExecPath = true } = {}) => {
|
|
1521
1451
|
const cwdPath = node_path.default.resolve(toPath(cwd));
|
|
1522
1452
|
const result = [];
|
|
1523
1453
|
const pathParts = pathOption.split(node_path.default.delimiter);
|
|
1524
1454
|
if (preferLocal) applyPreferLocal(result, pathParts, cwdPath);
|
|
1525
|
-
if (addExecPath) applyExecPath(result, pathParts, execPath
|
|
1455
|
+
if (addExecPath) applyExecPath(result, pathParts, execPath, cwdPath);
|
|
1526
1456
|
return pathOption === "" || pathOption === node_path.default.delimiter ? `${result.join(node_path.default.delimiter)}${pathOption}` : [...result, pathOption].join(node_path.default.delimiter);
|
|
1527
1457
|
};
|
|
1528
1458
|
const applyPreferLocal = (result, pathParts, cwdPath) => {
|
|
@@ -1531,18 +1461,17 @@ const applyPreferLocal = (result, pathParts, cwdPath) => {
|
|
|
1531
1461
|
if (!pathParts.includes(pathPart)) result.push(pathPart);
|
|
1532
1462
|
}
|
|
1533
1463
|
};
|
|
1534
|
-
const applyExecPath = (result, pathParts, execPath
|
|
1535
|
-
const pathPart = node_path.default.resolve(cwdPath, toPath(execPath
|
|
1464
|
+
const applyExecPath = (result, pathParts, execPath, cwdPath) => {
|
|
1465
|
+
const pathPart = node_path.default.resolve(cwdPath, toPath(execPath), "..");
|
|
1536
1466
|
if (!pathParts.includes(pathPart)) result.push(pathPart);
|
|
1537
1467
|
};
|
|
1538
|
-
const npmRunPathEnv = ({ env = node_process.default.env
|
|
1468
|
+
const npmRunPathEnv = ({ env = node_process.default.env, ...options } = {}) => {
|
|
1539
1469
|
env = { ...env };
|
|
1540
1470
|
const pathName = pathKey({ env });
|
|
1541
1471
|
options.path = env[pathName];
|
|
1542
1472
|
env[pathName] = npmRunPath(options);
|
|
1543
1473
|
return env;
|
|
1544
1474
|
};
|
|
1545
|
-
|
|
1546
1475
|
//#endregion
|
|
1547
1476
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/return/final-error.js
|
|
1548
1477
|
const getFinalError = (originalError, message, isSync) => {
|
|
@@ -1570,11 +1499,10 @@ var ExecaError = class extends Error {};
|
|
|
1570
1499
|
setErrorName(ExecaError, ExecaError.name);
|
|
1571
1500
|
var ExecaSyncError = class extends Error {};
|
|
1572
1501
|
setErrorName(ExecaSyncError, ExecaSyncError.name);
|
|
1573
|
-
|
|
1574
1502
|
//#endregion
|
|
1575
|
-
//#region ../../node_modules/.pnpm/human-signals@8.0.
|
|
1503
|
+
//#region ../../node_modules/.pnpm/human-signals@8.0.1/node_modules/human-signals/build/src/realtime.js
|
|
1576
1504
|
const getRealtimeSignals = () => {
|
|
1577
|
-
const length =
|
|
1505
|
+
const length = 64 - SIGRTMIN + 1;
|
|
1578
1506
|
return Array.from({ length }, getRealtimeSignal);
|
|
1579
1507
|
};
|
|
1580
1508
|
const getRealtimeSignal = (value, index) => ({
|
|
@@ -1585,10 +1513,8 @@ const getRealtimeSignal = (value, index) => ({
|
|
|
1585
1513
|
standard: "posix"
|
|
1586
1514
|
});
|
|
1587
1515
|
const SIGRTMIN = 34;
|
|
1588
|
-
const SIGRTMAX = 64;
|
|
1589
|
-
|
|
1590
1516
|
//#endregion
|
|
1591
|
-
//#region ../../node_modules/.pnpm/human-signals@8.0.
|
|
1517
|
+
//#region ../../node_modules/.pnpm/human-signals@8.0.1/node_modules/human-signals/build/src/core.js
|
|
1592
1518
|
const SIGNALS = [
|
|
1593
1519
|
{
|
|
1594
1520
|
name: "SIGHUP",
|
|
@@ -1860,9 +1786,8 @@ const SIGNALS = [
|
|
|
1860
1786
|
standard: "other"
|
|
1861
1787
|
}
|
|
1862
1788
|
];
|
|
1863
|
-
|
|
1864
1789
|
//#endregion
|
|
1865
|
-
//#region ../../node_modules/.pnpm/human-signals@8.0.
|
|
1790
|
+
//#region ../../node_modules/.pnpm/human-signals@8.0.1/node_modules/human-signals/build/src/signals.js
|
|
1866
1791
|
const getSignals = () => {
|
|
1867
1792
|
const realtimeSignals = getRealtimeSignals();
|
|
1868
1793
|
return [...SIGNALS, ...realtimeSignals].map(normalizeSignal$1);
|
|
@@ -1880,12 +1805,11 @@ const normalizeSignal$1 = ({ name, number: defaultNumber, description, action, f
|
|
|
1880
1805
|
standard
|
|
1881
1806
|
};
|
|
1882
1807
|
};
|
|
1883
|
-
|
|
1884
1808
|
//#endregion
|
|
1885
|
-
//#region ../../node_modules/.pnpm/human-signals@8.0.
|
|
1809
|
+
//#region ../../node_modules/.pnpm/human-signals@8.0.1/node_modules/human-signals/build/src/main.js
|
|
1886
1810
|
const getSignalsByName = () => {
|
|
1887
|
-
const signals
|
|
1888
|
-
return Object.fromEntries(signals
|
|
1811
|
+
const signals = getSignals();
|
|
1812
|
+
return Object.fromEntries(signals.map(getSignalByName));
|
|
1889
1813
|
};
|
|
1890
1814
|
const getSignalByName = ({ name, number, description, supported, action, forced, standard }) => [name, {
|
|
1891
1815
|
name,
|
|
@@ -1898,13 +1822,12 @@ const getSignalByName = ({ name, number, description, supported, action, forced,
|
|
|
1898
1822
|
}];
|
|
1899
1823
|
const signalsByName = getSignalsByName();
|
|
1900
1824
|
const getSignalsByNumber = () => {
|
|
1901
|
-
const signals
|
|
1902
|
-
const
|
|
1903
|
-
const signalsA = Array.from({ length }, (value, number) => getSignalByNumber(number, signals$1));
|
|
1825
|
+
const signals = getSignals();
|
|
1826
|
+
const signalsA = Array.from({ length: 65 }, (value, number) => getSignalByNumber(number, signals));
|
|
1904
1827
|
return Object.assign({}, ...signalsA);
|
|
1905
1828
|
};
|
|
1906
|
-
const getSignalByNumber = (number, signals
|
|
1907
|
-
const signal = findSignalByNumber(number, signals
|
|
1829
|
+
const getSignalByNumber = (number, signals) => {
|
|
1830
|
+
const signal = findSignalByNumber(number, signals);
|
|
1908
1831
|
if (signal === void 0) return {};
|
|
1909
1832
|
const { name, description, supported, action, forced, standard } = signal;
|
|
1910
1833
|
return { [number]: {
|
|
@@ -1917,13 +1840,12 @@ const getSignalByNumber = (number, signals$1) => {
|
|
|
1917
1840
|
standard
|
|
1918
1841
|
} };
|
|
1919
1842
|
};
|
|
1920
|
-
const findSignalByNumber = (number, signals
|
|
1921
|
-
const signal = signals
|
|
1843
|
+
const findSignalByNumber = (number, signals) => {
|
|
1844
|
+
const signal = signals.find(({ name }) => node_os.constants.signals[name] === number);
|
|
1922
1845
|
if (signal !== void 0) return signal;
|
|
1923
|
-
return signals
|
|
1846
|
+
return signals.find((signalA) => signalA.number === number);
|
|
1924
1847
|
};
|
|
1925
|
-
|
|
1926
|
-
|
|
1848
|
+
getSignalsByNumber();
|
|
1927
1849
|
//#endregion
|
|
1928
1850
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/terminate/signal.js
|
|
1929
1851
|
const normalizeKillSignal = (killSignal) => {
|
|
@@ -1953,7 +1875,6 @@ Available signal numbers: ${getAvailableSignalIntegers()}.`;
|
|
|
1953
1875
|
const getAvailableSignalNames = () => Object.keys(node_os.constants.signals).sort().map((signalName) => `'${signalName}'`).join(", ");
|
|
1954
1876
|
const getAvailableSignalIntegers = () => [...new Set(Object.values(node_os.constants.signals).sort((signalInteger, signalIntegerTwo) => signalInteger - signalIntegerTwo))].join(", ");
|
|
1955
1877
|
const getSignalDescription = (signal) => signalsByName[signal].description;
|
|
1956
|
-
|
|
1957
1878
|
//#endregion
|
|
1958
1879
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/terminate/kill.js
|
|
1959
1880
|
const normalizeForceKillAfterDelay = (forceKillAfterDelay) => {
|
|
@@ -2005,13 +1926,11 @@ const killOnTimeout = async ({ kill, forceKillAfterDelay, context, controllerSig
|
|
|
2005
1926
|
if (kill("SIGKILL")) context.isForcefullyTerminated ??= true;
|
|
2006
1927
|
} catch {}
|
|
2007
1928
|
};
|
|
2008
|
-
|
|
2009
1929
|
//#endregion
|
|
2010
1930
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/utils/abort-signal.js
|
|
2011
1931
|
const onAbortedSignal = async (mainSignal, stopSignal) => {
|
|
2012
1932
|
if (!mainSignal.aborted) await (0, node_events.once)(mainSignal, "abort", { signal: stopSignal });
|
|
2013
1933
|
};
|
|
2014
|
-
|
|
2015
1934
|
//#endregion
|
|
2016
1935
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/terminate/cancel.js
|
|
2017
1936
|
const validateCancelSignal = ({ cancelSignal }) => {
|
|
@@ -2024,18 +1943,17 @@ const terminateOnCancel = async (subprocess, cancelSignal, context, { signal })
|
|
|
2024
1943
|
subprocess.kill();
|
|
2025
1944
|
throw cancelSignal.reason;
|
|
2026
1945
|
};
|
|
2027
|
-
|
|
2028
1946
|
//#endregion
|
|
2029
1947
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/ipc/validation.js
|
|
2030
|
-
const validateIpcMethod = ({ methodName, isSubprocess, ipc, isConnected
|
|
1948
|
+
const validateIpcMethod = ({ methodName, isSubprocess, ipc, isConnected }) => {
|
|
2031
1949
|
validateIpcOption(methodName, isSubprocess, ipc);
|
|
2032
|
-
validateConnection(methodName, isSubprocess, isConnected
|
|
1950
|
+
validateConnection(methodName, isSubprocess, isConnected);
|
|
2033
1951
|
};
|
|
2034
1952
|
const validateIpcOption = (methodName, isSubprocess, ipc) => {
|
|
2035
1953
|
if (!ipc) throw new Error(`${getMethodName(methodName, isSubprocess)} can only be used if the \`ipc\` option is \`true\`.`);
|
|
2036
1954
|
};
|
|
2037
|
-
const validateConnection = (methodName, isSubprocess, isConnected
|
|
2038
|
-
if (!isConnected
|
|
1955
|
+
const validateConnection = (methodName, isSubprocess, isConnected) => {
|
|
1956
|
+
if (!isConnected) throw new Error(`${getMethodName(methodName, isSubprocess)} cannot be used: the ${getOtherProcessName(isSubprocess)} has already exited or disconnected.`);
|
|
2039
1957
|
};
|
|
2040
1958
|
const throwOnEarlyDisconnect = (isSubprocess) => {
|
|
2041
1959
|
throw new Error(`${getMethodName("getOneMessage", isSubprocess)} could not complete: the ${getOtherProcessName(isSubprocess)} exited or disconnected.`);
|
|
@@ -2079,7 +1997,6 @@ const getOtherProcessName = (isSubprocess) => isSubprocess ? "parent process" :
|
|
|
2079
1997
|
const disconnect = (anyProcess) => {
|
|
2080
1998
|
if (anyProcess.connected) anyProcess.disconnect();
|
|
2081
1999
|
};
|
|
2082
|
-
|
|
2083
2000
|
//#endregion
|
|
2084
2001
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/utils/deferred.js
|
|
2085
2002
|
const createDeferred = () => {
|
|
@@ -2092,7 +2009,6 @@ const createDeferred = () => {
|
|
|
2092
2009
|
});
|
|
2093
2010
|
return Object.assign(promise, methods);
|
|
2094
2011
|
};
|
|
2095
|
-
|
|
2096
2012
|
//#endregion
|
|
2097
2013
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/arguments/fd-options.js
|
|
2098
2014
|
const getToStream = (destination, to = "stdin") => {
|
|
@@ -2169,7 +2085,6 @@ const serializeOptionValue = (value) => {
|
|
|
2169
2085
|
if (typeof value === "string") return `'${value}'`;
|
|
2170
2086
|
return typeof value === "number" ? `${value}` : "Stream";
|
|
2171
2087
|
};
|
|
2172
|
-
|
|
2173
2088
|
//#endregion
|
|
2174
2089
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/utils/max-listeners.js
|
|
2175
2090
|
const incrementMaxListeners = (eventEmitter, maxListenersIncrement, signal) => {
|
|
@@ -2180,7 +2095,6 @@ const incrementMaxListeners = (eventEmitter, maxListenersIncrement, signal) => {
|
|
|
2180
2095
|
eventEmitter.setMaxListeners(eventEmitter.getMaxListeners() - maxListenersIncrement);
|
|
2181
2096
|
});
|
|
2182
2097
|
};
|
|
2183
|
-
|
|
2184
2098
|
//#endregion
|
|
2185
2099
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/ipc/reference.js
|
|
2186
2100
|
const addReference = (channel, reference) => {
|
|
@@ -2207,7 +2121,6 @@ const redoAddedReferences = (channel, isSubprocess) => {
|
|
|
2207
2121
|
addReferenceCount(channel);
|
|
2208
2122
|
}
|
|
2209
2123
|
};
|
|
2210
|
-
|
|
2211
2124
|
//#endregion
|
|
2212
2125
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/ipc/incoming.js
|
|
2213
2126
|
const onMessage = async ({ anyProcess, channel, isSubprocess, ipcEmitter }, wrappedMessage) => {
|
|
@@ -2241,7 +2154,6 @@ const onDisconnect = async ({ anyProcess, channel, isSubprocess, ipcEmitter, bou
|
|
|
2241
2154
|
ipcEmitter.emit("disconnect");
|
|
2242
2155
|
};
|
|
2243
2156
|
const INCOMING_MESSAGES = /* @__PURE__ */ new WeakMap();
|
|
2244
|
-
|
|
2245
2157
|
//#endregion
|
|
2246
2158
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/ipc/forward.js
|
|
2247
2159
|
const getIpcEmitter = (anyProcess, channel, isSubprocess) => {
|
|
@@ -2279,7 +2191,6 @@ const isConnected = (anyProcess) => {
|
|
|
2279
2191
|
const ipcEmitter = IPC_EMITTERS.get(anyProcess);
|
|
2280
2192
|
return ipcEmitter === void 0 ? anyProcess.channel !== null : ipcEmitter.connected;
|
|
2281
2193
|
};
|
|
2282
|
-
|
|
2283
2194
|
//#endregion
|
|
2284
2195
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/ipc/strict.js
|
|
2285
2196
|
const handleSendStrict = ({ anyProcess, channel, isSubprocess, message, strict }) => {
|
|
@@ -2351,7 +2262,6 @@ const throwOnDisconnect$1 = async (anyProcess, isSubprocess, { signal }) => {
|
|
|
2351
2262
|
};
|
|
2352
2263
|
const REQUEST_TYPE = "execa:ipc:request";
|
|
2353
2264
|
const RESPONSE_TYPE = "execa:ipc:response";
|
|
2354
|
-
|
|
2355
2265
|
//#endregion
|
|
2356
2266
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/ipc/outgoing.js
|
|
2357
2267
|
const startSendMessage = (anyProcess, wrappedMessage, strict) => {
|
|
@@ -2381,7 +2291,6 @@ const waitForOutgoingMessages = async (anyProcess, ipcEmitter, wrappedMessage) =
|
|
|
2381
2291
|
const OUTGOING_MESSAGES = /* @__PURE__ */ new WeakMap();
|
|
2382
2292
|
const hasMessageListeners = (anyProcess, ipcEmitter) => ipcEmitter.listenerCount("message") > getMinListenerCount(anyProcess);
|
|
2383
2293
|
const getMinListenerCount = (anyProcess) => SUBPROCESS_OPTIONS.has(anyProcess) && !getFdSpecificValue(SUBPROCESS_OPTIONS.get(anyProcess).options.buffer, "ipc") ? 1 : 0;
|
|
2384
|
-
|
|
2385
2294
|
//#endregion
|
|
2386
2295
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/ipc/send.js
|
|
2387
2296
|
const sendMessage$1 = ({ anyProcess, channel, isSubprocess, ipc }, message, { strict = false } = {}) => {
|
|
@@ -2451,7 +2360,6 @@ const getSendMethod = (anyProcess) => {
|
|
|
2451
2360
|
return sendMethod;
|
|
2452
2361
|
};
|
|
2453
2362
|
const PROCESS_SEND_METHODS = /* @__PURE__ */ new WeakMap();
|
|
2454
|
-
|
|
2455
2363
|
//#endregion
|
|
2456
2364
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/ipc/graceful.js
|
|
2457
2365
|
const sendAbort = (subprocess, message) => {
|
|
@@ -2502,7 +2410,6 @@ const abortOnDisconnect = () => {
|
|
|
2502
2410
|
cancelController.abort(getAbortDisconnectError());
|
|
2503
2411
|
};
|
|
2504
2412
|
const cancelController = new AbortController();
|
|
2505
|
-
|
|
2506
2413
|
//#endregion
|
|
2507
2414
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/terminate/graceful.js
|
|
2508
2415
|
const validateGracefulCancel = ({ gracefulCancel, cancelSignal, ipc, serialization }) => {
|
|
@@ -2541,7 +2448,6 @@ const getReason = ({ reason }) => {
|
|
|
2541
2448
|
});
|
|
2542
2449
|
return error;
|
|
2543
2450
|
};
|
|
2544
|
-
|
|
2545
2451
|
//#endregion
|
|
2546
2452
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/terminate/timeout.js
|
|
2547
2453
|
const validateTimeout = ({ timeout }) => {
|
|
@@ -2554,7 +2460,6 @@ const killAfterTimeout = async (subprocess, timeout, context, { signal }) => {
|
|
|
2554
2460
|
subprocess.kill();
|
|
2555
2461
|
throw new DiscardedError();
|
|
2556
2462
|
};
|
|
2557
|
-
|
|
2558
2463
|
//#endregion
|
|
2559
2464
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/methods/node.js
|
|
2560
2465
|
const mapNode = ({ options }) => {
|
|
@@ -2564,7 +2469,7 @@ const mapNode = ({ options }) => {
|
|
|
2564
2469
|
node: true
|
|
2565
2470
|
} };
|
|
2566
2471
|
};
|
|
2567
|
-
const handleNodeOption = (file, commandArguments, { node: shouldHandleNode = false, nodePath = node_process.execPath, nodeOptions = node_process.execArgv.filter((nodeOption) => !nodeOption.startsWith("--inspect")), cwd, execPath: formerNodePath
|
|
2472
|
+
const handleNodeOption = (file, commandArguments, { node: shouldHandleNode = false, nodePath = node_process.execPath, nodeOptions = node_process.execArgv.filter((nodeOption) => !nodeOption.startsWith("--inspect")), cwd, execPath: formerNodePath, ...options }) => {
|
|
2568
2473
|
if (formerNodePath !== void 0) throw new TypeError("The \"execPath\" option has been removed. Please use the \"nodePath\" option instead.");
|
|
2569
2474
|
const normalizedNodePath = safeNormalizeFileUrl(nodePath, "The \"nodePath\" option");
|
|
2570
2475
|
const resolvedNodePath = node_path.default.resolve(cwd, normalizedNodePath);
|
|
@@ -2594,7 +2499,6 @@ const handleNodeOption = (file, commandArguments, { node: shouldHandleNode = fal
|
|
|
2594
2499
|
}
|
|
2595
2500
|
];
|
|
2596
2501
|
};
|
|
2597
|
-
|
|
2598
2502
|
//#endregion
|
|
2599
2503
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/ipc/ipc-input.js
|
|
2600
2504
|
const validateIpcInputOption = ({ ipcInput, ipc, serialization }) => {
|
|
@@ -2624,7 +2528,6 @@ const sendIpcInput = async (subprocess, ipcInput) => {
|
|
|
2624
2528
|
if (ipcInput === void 0) return;
|
|
2625
2529
|
await subprocess.sendMessage(ipcInput);
|
|
2626
2530
|
};
|
|
2627
|
-
|
|
2628
2531
|
//#endregion
|
|
2629
2532
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/arguments/encoding-option.js
|
|
2630
2533
|
const validateEncoding = ({ encoding }) => {
|
|
@@ -2632,7 +2535,7 @@ const validateEncoding = ({ encoding }) => {
|
|
|
2632
2535
|
const correctEncoding = getCorrectEncoding(encoding);
|
|
2633
2536
|
if (correctEncoding !== void 0) throw new TypeError(`Invalid option \`encoding: ${serializeEncoding(encoding)}\`.
|
|
2634
2537
|
Please rename it to ${serializeEncoding(correctEncoding)}.`);
|
|
2635
|
-
const correctEncodings = [...ENCODINGS].map((correctEncoding
|
|
2538
|
+
const correctEncodings = [...ENCODINGS].map((correctEncoding) => serializeEncoding(correctEncoding)).join(", ");
|
|
2636
2539
|
throw new TypeError(`Invalid option \`encoding: ${serializeEncoding(encoding)}\`.
|
|
2637
2540
|
Please rename it to one of: ${correctEncodings}.`);
|
|
2638
2541
|
};
|
|
@@ -2661,7 +2564,6 @@ const ENCODING_ALIASES = {
|
|
|
2661
2564
|
binary: "latin1"
|
|
2662
2565
|
};
|
|
2663
2566
|
const serializeEncoding = (encoding) => typeof encoding === "string" ? `"${encoding}"` : String(encoding);
|
|
2664
|
-
|
|
2665
2567
|
//#endregion
|
|
2666
2568
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/arguments/cwd.js
|
|
2667
2569
|
const normalizeCwd = (cwd = getDefaultCwd()) => {
|
|
@@ -2687,7 +2589,6 @@ const fixCwdError = (originalMessage, cwd) => {
|
|
|
2687
2589
|
if (!cwdStat.isDirectory()) return `The "cwd" option is not a directory: ${cwd}.\n${originalMessage}`;
|
|
2688
2590
|
return originalMessage;
|
|
2689
2591
|
};
|
|
2690
|
-
|
|
2691
2592
|
//#endregion
|
|
2692
2593
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/arguments/options.js
|
|
2693
2594
|
const normalizeOptions = (filePath, rawArguments, rawOptions) => {
|
|
@@ -2712,7 +2613,7 @@ const normalizeOptions = (filePath, rawArguments, rawOptions) => {
|
|
|
2712
2613
|
options
|
|
2713
2614
|
};
|
|
2714
2615
|
};
|
|
2715
|
-
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"
|
|
2616
|
+
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 }) => ({
|
|
2716
2617
|
...options,
|
|
2717
2618
|
extendEnv,
|
|
2718
2619
|
preferLocal,
|
|
@@ -2744,7 +2645,6 @@ const getEnv = ({ env: envOption, extendEnv, preferLocal, node, localDirectory,
|
|
|
2744
2645
|
});
|
|
2745
2646
|
return env;
|
|
2746
2647
|
};
|
|
2747
|
-
|
|
2748
2648
|
//#endregion
|
|
2749
2649
|
//#region ../../node_modules/.pnpm/strip-final-newline@4.0.0/node_modules/strip-final-newline/index.js
|
|
2750
2650
|
function stripFinalNewline(input) {
|
|
@@ -2758,22 +2658,20 @@ const LF = "\n";
|
|
|
2758
2658
|
const LF_BINARY = LF.codePointAt(0);
|
|
2759
2659
|
const CR = "\r";
|
|
2760
2660
|
const CR_BINARY = CR.codePointAt(0);
|
|
2761
|
-
|
|
2762
2661
|
//#endregion
|
|
2763
2662
|
//#region ../../node_modules/.pnpm/is-stream@4.0.1/node_modules/is-stream/index.js
|
|
2764
2663
|
function isStream(stream, { checkOpen = true } = {}) {
|
|
2765
2664
|
return stream !== null && typeof stream === "object" && (stream.writable || stream.readable || !checkOpen || stream.writable === void 0 && stream.readable === void 0) && typeof stream.pipe === "function";
|
|
2766
2665
|
}
|
|
2767
|
-
function isWritableStream(stream, { checkOpen = true } = {}) {
|
|
2666
|
+
function isWritableStream$1(stream, { checkOpen = true } = {}) {
|
|
2768
2667
|
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";
|
|
2769
2668
|
}
|
|
2770
|
-
function isReadableStream(stream, { checkOpen = true } = {}) {
|
|
2669
|
+
function isReadableStream$1(stream, { checkOpen = true } = {}) {
|
|
2771
2670
|
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";
|
|
2772
2671
|
}
|
|
2773
2672
|
function isDuplexStream(stream, options) {
|
|
2774
|
-
return isWritableStream(stream, options) && isReadableStream(stream, options);
|
|
2673
|
+
return isWritableStream$1(stream, options) && isReadableStream$1(stream, options);
|
|
2775
2674
|
}
|
|
2776
|
-
|
|
2777
2675
|
//#endregion
|
|
2778
2676
|
//#region ../../node_modules/.pnpm/@sec-ant+readable-stream@0.4.1/node_modules/@sec-ant/readable-stream/dist/ponyfill/asyncIterator.js
|
|
2779
2677
|
const a = Object.getPrototypeOf(Object.getPrototypeOf(
|
|
@@ -2854,11 +2752,10 @@ function h({ preventCancel: r = !1 } = {}) {
|
|
|
2854
2752
|
const t = new c(this.getReader(), r), s = Object.create(u);
|
|
2855
2753
|
return s[n] = t, s;
|
|
2856
2754
|
}
|
|
2857
|
-
|
|
2858
2755
|
//#endregion
|
|
2859
2756
|
//#region ../../node_modules/.pnpm/get-stream@9.0.1/node_modules/get-stream/source/stream.js
|
|
2860
2757
|
const getAsyncIterable = (stream) => {
|
|
2861
|
-
if (isReadableStream(stream, { checkOpen: false }) && nodeImports.on !== void 0) return getStreamIterable(stream);
|
|
2758
|
+
if (isReadableStream$1(stream, { checkOpen: false }) && nodeImports.on !== void 0) return getStreamIterable(stream);
|
|
2862
2759
|
if (typeof stream?.[Symbol.asyncIterator] === "function") return stream;
|
|
2863
2760
|
if (toString.call(stream) === "[object ReadableStream]") return h.call(stream);
|
|
2864
2761
|
throw new TypeError("The first argument must be a Readable, a ReadableStream, or an async iterable.");
|
|
@@ -2892,7 +2789,6 @@ const handleStreamEnd = async (stream, controller, state) => {
|
|
|
2892
2789
|
}
|
|
2893
2790
|
};
|
|
2894
2791
|
const nodeImports = {};
|
|
2895
|
-
|
|
2896
2792
|
//#endregion
|
|
2897
2793
|
//#region ../../node_modules/.pnpm/get-stream@9.0.1/node_modules/get-stream/source/contents.js
|
|
2898
2794
|
const getStreamContents$1 = async (stream, { init, convertChunk, getSize, truncateChunk, addChunk, getFinalChunk, finalize }, { maxBuffer = Number.POSITIVE_INFINITY } = {}) => {
|
|
@@ -2968,7 +2864,6 @@ var MaxBufferError = class extends Error {
|
|
|
2968
2864
|
super("maxBuffer exceeded");
|
|
2969
2865
|
}
|
|
2970
2866
|
};
|
|
2971
|
-
|
|
2972
2867
|
//#endregion
|
|
2973
2868
|
//#region ../../node_modules/.pnpm/get-stream@9.0.1/node_modules/get-stream/source/utils.js
|
|
2974
2869
|
const identity = (value) => value;
|
|
@@ -2978,7 +2873,6 @@ const throwObjectStream = (chunk) => {
|
|
|
2978
2873
|
throw new Error(`Streams in object mode are not supported: ${String(chunk)}`);
|
|
2979
2874
|
};
|
|
2980
2875
|
const getLengthProperty = (convertedChunk) => convertedChunk.length;
|
|
2981
|
-
|
|
2982
2876
|
//#endregion
|
|
2983
2877
|
//#region ../../node_modules/.pnpm/get-stream@9.0.1/node_modules/get-stream/source/array.js
|
|
2984
2878
|
async function getStreamAsArray(stream, options) {
|
|
@@ -3006,7 +2900,6 @@ const arrayMethods = {
|
|
|
3006
2900
|
getFinalChunk: noop$1,
|
|
3007
2901
|
finalize: getContentsProperty
|
|
3008
2902
|
};
|
|
3009
|
-
|
|
3010
2903
|
//#endregion
|
|
3011
2904
|
//#region ../../node_modules/.pnpm/get-stream@9.0.1/node_modules/get-stream/source/array-buffer.js
|
|
3012
2905
|
async function getStreamAsArrayBuffer(stream, options) {
|
|
@@ -3058,7 +2951,6 @@ const arrayBufferMethods = {
|
|
|
3058
2951
|
getFinalChunk: noop$1,
|
|
3059
2952
|
finalize: finalizeArrayBuffer
|
|
3060
2953
|
};
|
|
3061
|
-
|
|
3062
2954
|
//#endregion
|
|
3063
2955
|
//#region ../../node_modules/.pnpm/get-stream@9.0.1/node_modules/get-stream/source/string.js
|
|
3064
2956
|
async function getStreamAsString(stream, options) {
|
|
@@ -3068,11 +2960,11 @@ const initString = () => ({
|
|
|
3068
2960
|
contents: "",
|
|
3069
2961
|
textDecoder: new TextDecoder()
|
|
3070
2962
|
});
|
|
3071
|
-
const useTextDecoder = (chunk, { textDecoder
|
|
2963
|
+
const useTextDecoder = (chunk, { textDecoder }) => textDecoder.decode(chunk, { stream: true });
|
|
3072
2964
|
const addStringChunk = (convertedChunk, { contents }) => contents + convertedChunk;
|
|
3073
2965
|
const truncateStringChunk = (convertedChunk, chunkSize) => convertedChunk.slice(0, chunkSize);
|
|
3074
|
-
const getFinalStringChunk = ({ textDecoder
|
|
3075
|
-
const finalChunk = textDecoder
|
|
2966
|
+
const getFinalStringChunk = ({ textDecoder }) => {
|
|
2967
|
+
const finalChunk = textDecoder.decode();
|
|
3076
2968
|
return finalChunk === "" ? void 0 : finalChunk;
|
|
3077
2969
|
};
|
|
3078
2970
|
const stringMethods = {
|
|
@@ -3091,7 +2983,6 @@ const stringMethods = {
|
|
|
3091
2983
|
getFinalChunk: getFinalStringChunk,
|
|
3092
2984
|
finalize: getContentsProperty
|
|
3093
2985
|
};
|
|
3094
|
-
|
|
3095
2986
|
//#endregion
|
|
3096
2987
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/io/max-buffer.js
|
|
3097
2988
|
const handleMaxBuffer = ({ error, stream, readableObjectMode, lines, encoding, fdNumber }) => {
|
|
@@ -3147,7 +3038,6 @@ const truncateMaxBufferSync = (result, isMaxBuffer, maxBuffer) => {
|
|
|
3147
3038
|
return result.length > maxBufferValue ? result.slice(0, maxBufferValue) : result;
|
|
3148
3039
|
};
|
|
3149
3040
|
const getMaxBufferSync = ([, stdoutMaxBuffer]) => stdoutMaxBuffer;
|
|
3150
|
-
|
|
3151
3041
|
//#endregion
|
|
3152
3042
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/return/message.js
|
|
3153
3043
|
const createMessages = ({ stdio, all, ipcOutput, originalError, signal, signalDescription, exitCode, escapedCommand, timedOut, isCanceled, isGracefullyCanceled, isMaxBuffer, isForcefullyTerminated, forceKillAfterDelay, killSignal, maxBuffer, timeout, cwd }) => {
|
|
@@ -3209,7 +3099,6 @@ const serializeMessageItem = (messageItem) => {
|
|
|
3209
3099
|
if (isUint8Array(messageItem)) return uint8ArrayToString(messageItem);
|
|
3210
3100
|
return "";
|
|
3211
3101
|
};
|
|
3212
|
-
|
|
3213
3102
|
//#endregion
|
|
3214
3103
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/return/result.js
|
|
3215
3104
|
const makeSuccessResult = ({ command, escapedCommand, stdio, all, ipcOutput, options: { cwd }, startTime }) => omitUndefinedProperties({
|
|
@@ -3327,7 +3216,6 @@ const normalizeExitPayload = (rawExitCode, rawSignal) => {
|
|
|
3327
3216
|
signalDescription: signal === void 0 ? void 0 : getSignalDescription(rawSignal)
|
|
3328
3217
|
};
|
|
3329
3218
|
};
|
|
3330
|
-
|
|
3331
3219
|
//#endregion
|
|
3332
3220
|
//#region ../../node_modules/.pnpm/parse-ms@4.0.0/node_modules/parse-ms/index.js
|
|
3333
3221
|
const toZeroIfInfinity = (value) => Number.isFinite(value) ? value : 0;
|
|
@@ -3362,11 +3250,10 @@ function parseMilliseconds(milliseconds) {
|
|
|
3362
3250
|
}
|
|
3363
3251
|
throw new TypeError("Expected a finite number or bigint");
|
|
3364
3252
|
}
|
|
3365
|
-
|
|
3366
3253
|
//#endregion
|
|
3367
3254
|
//#region ../../node_modules/.pnpm/pretty-ms@9.2.0/node_modules/pretty-ms/index.js
|
|
3368
3255
|
const isZero = (value) => value === 0 || value === 0n;
|
|
3369
|
-
const pluralize = (word, count
|
|
3256
|
+
const pluralize = (word, count) => count === 1 || count === 1n ? word : `${word}s`;
|
|
3370
3257
|
const SECOND_ROUNDING_EPSILON = 1e-7;
|
|
3371
3258
|
const ONE_DAY_IN_MILLISECONDS = 24n * 60n * 60n * 1000n;
|
|
3372
3259
|
function prettyMilliseconds(milliseconds, options) {
|
|
@@ -3415,16 +3302,16 @@ function prettyMilliseconds(milliseconds, options) {
|
|
|
3415
3302
|
add(Number(parsed.minutes), "minute", "m");
|
|
3416
3303
|
if (!options.hideSeconds) if (options.separateMilliseconds || options.formatSubMilliseconds || !options.colonNotation && milliseconds < 1e3) {
|
|
3417
3304
|
const seconds = Number(parsed.seconds);
|
|
3418
|
-
const milliseconds
|
|
3305
|
+
const milliseconds = Number(parsed.milliseconds);
|
|
3419
3306
|
const microseconds = Number(parsed.microseconds);
|
|
3420
3307
|
const nanoseconds = Number(parsed.nanoseconds);
|
|
3421
3308
|
add(seconds, "second", "s");
|
|
3422
3309
|
if (options.formatSubMilliseconds) {
|
|
3423
|
-
add(milliseconds
|
|
3310
|
+
add(milliseconds, "millisecond", "ms");
|
|
3424
3311
|
add(microseconds, "microsecond", "µs");
|
|
3425
3312
|
add(nanoseconds, "nanosecond", "ns");
|
|
3426
3313
|
} else {
|
|
3427
|
-
const millisecondsAndBelow = milliseconds
|
|
3314
|
+
const millisecondsAndBelow = milliseconds + microseconds / 1e3 + nanoseconds / 1e6;
|
|
3428
3315
|
const millisecondsDecimalDigits = typeof options.millisecondsDecimalDigits === "number" ? options.millisecondsDecimalDigits : 0;
|
|
3429
3316
|
const millisecondsString = millisecondsDecimalDigits ? millisecondsAndBelow.toFixed(millisecondsDecimalDigits) : millisecondsAndBelow >= 1 ? Math.round(millisecondsAndBelow) : Math.ceil(millisecondsAndBelow);
|
|
3430
3317
|
add(Number.parseFloat(millisecondsString), "millisecond", "ms", millisecondsString);
|
|
@@ -3439,7 +3326,6 @@ function prettyMilliseconds(milliseconds, options) {
|
|
|
3439
3326
|
if (typeof options.unitCount === "number") result = result.slice(0, Math.max(options.unitCount, 1));
|
|
3440
3327
|
return sign + result.join(separator);
|
|
3441
3328
|
}
|
|
3442
|
-
|
|
3443
3329
|
//#endregion
|
|
3444
3330
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/verbose/error.js
|
|
3445
3331
|
const logError = (result, verboseInfo) => {
|
|
@@ -3450,7 +3336,6 @@ const logError = (result, verboseInfo) => {
|
|
|
3450
3336
|
result
|
|
3451
3337
|
});
|
|
3452
3338
|
};
|
|
3453
|
-
|
|
3454
3339
|
//#endregion
|
|
3455
3340
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/verbose/complete.js
|
|
3456
3341
|
const logResult = (result, verboseInfo) => {
|
|
@@ -3466,7 +3351,6 @@ const logDuration = (result, verboseInfo) => {
|
|
|
3466
3351
|
result
|
|
3467
3352
|
});
|
|
3468
3353
|
};
|
|
3469
|
-
|
|
3470
3354
|
//#endregion
|
|
3471
3355
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/return/reject.js
|
|
3472
3356
|
const handleResult = (result, verboseInfo, { reject }) => {
|
|
@@ -3474,7 +3358,6 @@ const handleResult = (result, verboseInfo, { reject }) => {
|
|
|
3474
3358
|
if (result.failed && reject) throw result;
|
|
3475
3359
|
return result;
|
|
3476
3360
|
};
|
|
3477
|
-
|
|
3478
3361
|
//#endregion
|
|
3479
3362
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/stdio/type.js
|
|
3480
3363
|
const getStdioItemType = (value, optionName) => {
|
|
@@ -3541,10 +3424,10 @@ const KNOWN_STDIO_STRINGS = new Set([
|
|
|
3541
3424
|
"overlapped",
|
|
3542
3425
|
"pipe"
|
|
3543
3426
|
]);
|
|
3544
|
-
const isReadableStream
|
|
3545
|
-
const isWritableStream
|
|
3546
|
-
const isWebStream = (value) => isReadableStream
|
|
3547
|
-
const isTransformStream = (value) => isReadableStream
|
|
3427
|
+
const isReadableStream = (value) => Object.prototype.toString.call(value) === "[object ReadableStream]";
|
|
3428
|
+
const isWritableStream = (value) => Object.prototype.toString.call(value) === "[object WritableStream]";
|
|
3429
|
+
const isWebStream = (value) => isReadableStream(value) || isWritableStream(value);
|
|
3430
|
+
const isTransformStream = (value) => isReadableStream(value?.readable) && isWritableStream(value?.writable);
|
|
3548
3431
|
const isAsyncIterableObject = (value) => isObject(value) && typeof value[Symbol.asyncIterator] === "function";
|
|
3549
3432
|
const isIterableObject = (value) => isObject(value) && typeof value[Symbol.iterator] === "function";
|
|
3550
3433
|
const isObject = (value) => typeof value === "object" && value !== null;
|
|
@@ -3582,7 +3465,6 @@ const TYPE_TO_MESSAGE = {
|
|
|
3582
3465
|
string: "a string",
|
|
3583
3466
|
uint8Array: "a Uint8Array"
|
|
3584
3467
|
};
|
|
3585
|
-
|
|
3586
3468
|
//#endregion
|
|
3587
3469
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/transform/object-mode.js
|
|
3588
3470
|
const getTransformObjectModes = (objectMode, index, newTransforms, direction) => direction === "output" ? getOutputObjectModes(objectMode, index, newTransforms) : getInputObjectModes(objectMode, index, newTransforms);
|
|
@@ -3605,7 +3487,6 @@ const getFdObjectMode = (stdioItems, direction) => {
|
|
|
3605
3487
|
if (lastTransform === void 0) return false;
|
|
3606
3488
|
return direction === "input" ? lastTransform.value.writableObjectMode : lastTransform.value.readableObjectMode;
|
|
3607
3489
|
};
|
|
3608
|
-
|
|
3609
3490
|
//#endregion
|
|
3610
3491
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/transform/normalize.js
|
|
3611
3492
|
const normalizeTransforms = (stdioItems, optionName, direction, options) => [...stdioItems.filter(({ type }) => !TRANSFORM_TYPES.has(type)), ...getTransforms(stdioItems, optionName, direction, options)];
|
|
@@ -3682,7 +3563,6 @@ const normalizeGenerator = ({ stdioItem, stdioItem: { value }, index, newTransfo
|
|
|
3682
3563
|
};
|
|
3683
3564
|
};
|
|
3684
3565
|
const sortTransforms = (newTransforms, direction) => direction === "input" ? newTransforms.reverse() : newTransforms;
|
|
3685
|
-
|
|
3686
3566
|
//#endregion
|
|
3687
3567
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/stdio/direction.js
|
|
3688
3568
|
const getStreamDirection = (stdioItems, fdNumber, optionName) => {
|
|
@@ -3706,10 +3586,10 @@ const guessStreamDirection = {
|
|
|
3706
3586
|
iterable: alwaysInput,
|
|
3707
3587
|
asyncIterable: alwaysInput,
|
|
3708
3588
|
uint8Array: alwaysInput,
|
|
3709
|
-
webStream: (value) => isWritableStream
|
|
3589
|
+
webStream: (value) => isWritableStream(value) ? "output" : "input",
|
|
3710
3590
|
nodeStream(value) {
|
|
3711
|
-
if (!isReadableStream(value, { checkOpen: false })) return "output";
|
|
3712
|
-
return isWritableStream(value, { checkOpen: false }) ? void 0 : "input";
|
|
3591
|
+
if (!isReadableStream$1(value, { checkOpen: false })) return "output";
|
|
3592
|
+
return isWritableStream$1(value, { checkOpen: false }) ? void 0 : "input";
|
|
3713
3593
|
},
|
|
3714
3594
|
webTransform: anyDirection,
|
|
3715
3595
|
duplex: anyDirection,
|
|
@@ -3729,14 +3609,12 @@ const getStandardStreamDirection = (value) => {
|
|
|
3729
3609
|
].includes(value)) return "output";
|
|
3730
3610
|
};
|
|
3731
3611
|
const DEFAULT_DIRECTION = "output";
|
|
3732
|
-
|
|
3733
3612
|
//#endregion
|
|
3734
3613
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/ipc/array.js
|
|
3735
3614
|
const normalizeIpcStdioArray = (stdioArray, ipc) => ipc && !stdioArray.includes("ipc") ? [...stdioArray, "ipc"] : stdioArray;
|
|
3736
|
-
|
|
3737
3615
|
//#endregion
|
|
3738
3616
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/stdio/stdio-option.js
|
|
3739
|
-
const normalizeStdioOption = ({ stdio, ipc, buffer
|
|
3617
|
+
const normalizeStdioOption = ({ stdio, ipc, buffer, ...options }, verboseInfo, isSync) => {
|
|
3740
3618
|
const stdioArray = getStdioArray(stdio, options).map((stdioOption, fdNumber) => addDefaultValue(stdioOption, fdNumber));
|
|
3741
3619
|
return isSync ? normalizeStdioSync(stdioArray, buffer, verboseInfo) : normalizeIpcStdioArray(stdioArray, ipc);
|
|
3742
3620
|
};
|
|
@@ -3760,7 +3638,6 @@ const addDefaultValue = (stdioOption, fdNumber) => {
|
|
|
3760
3638
|
};
|
|
3761
3639
|
const normalizeStdioSync = (stdioArray, buffer, verboseInfo) => stdioArray.map((stdioOption, fdNumber) => !buffer[fdNumber] && fdNumber !== 0 && !isFullVerbose(verboseInfo, fdNumber) && isOutputPipeOnly(stdioOption) ? "ignore" : stdioOption);
|
|
3762
3640
|
const isOutputPipeOnly = (stdioOption) => stdioOption === "pipe" || Array.isArray(stdioOption) && stdioOption.every((item) => item === "pipe");
|
|
3763
|
-
|
|
3764
3641
|
//#endregion
|
|
3765
3642
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/stdio/native.js
|
|
3766
3643
|
const handleNativeStream = ({ stdioItem, stdioItem: { type }, isStdioArray, fdNumber, direction, isSync }) => {
|
|
@@ -3829,7 +3706,6 @@ const getStandardStream = (fdNumber, value, optionName) => {
|
|
|
3829
3706
|
if (standardStream === void 0) throw new TypeError(`The \`${optionName}: ${value}\` option is invalid: no such standard stream.`);
|
|
3830
3707
|
return standardStream;
|
|
3831
3708
|
};
|
|
3832
|
-
|
|
3833
3709
|
//#endregion
|
|
3834
3710
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/stdio/input-option.js
|
|
3835
3711
|
const handleInputOptions = ({ input, inputFile }, fdNumber) => fdNumber === 0 ? [...handleInputOption(input), ...handleInputFileOption(inputFile)] : [];
|
|
@@ -3839,7 +3715,7 @@ const handleInputOption = (input) => input === void 0 ? [] : [{
|
|
|
3839
3715
|
optionName: "input"
|
|
3840
3716
|
}];
|
|
3841
3717
|
const getInputType = (input) => {
|
|
3842
|
-
if (isReadableStream(input, { checkOpen: false })) return "nodeStream";
|
|
3718
|
+
if (isReadableStream$1(input, { checkOpen: false })) return "nodeStream";
|
|
3843
3719
|
if (typeof input === "string") return "string";
|
|
3844
3720
|
if (isUint8Array(input)) return "uint8Array";
|
|
3845
3721
|
throw new Error("The `input` option must be a string, a Uint8Array or a Node.js Readable stream.");
|
|
@@ -3859,7 +3735,6 @@ const getInputFileType = (inputFile) => {
|
|
|
3859
3735
|
};
|
|
3860
3736
|
throw new Error("The `inputFile` option must be a file path string or a file URL.");
|
|
3861
3737
|
};
|
|
3862
|
-
|
|
3863
3738
|
//#endregion
|
|
3864
3739
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/stdio/duplicate.js
|
|
3865
3740
|
const filterDuplicates = (stdioItems) => stdioItems.filter((stdioItemOne, indexOne) => stdioItems.every((stdioItemTwo, indexTwo) => stdioItemOne.value !== stdioItemTwo.value || indexOne >= indexTwo || stdioItemOne.type === "generator" || stdioItemOne.type === "asyncGenerator"));
|
|
@@ -3920,10 +3795,9 @@ const validateDuplicateTransform = ({ otherStdioItems, type, value, optionName }
|
|
|
3920
3795
|
const throwOnDuplicateStream = (stdioItem, optionName, type) => {
|
|
3921
3796
|
if (stdioItem !== void 0) throw new TypeError(`The \`${stdioItem.optionName}\` and \`${optionName}\` options must not target ${TYPE_TO_MESSAGE[type]} that is the same.`);
|
|
3922
3797
|
};
|
|
3923
|
-
|
|
3924
3798
|
//#endregion
|
|
3925
3799
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/stdio/handle.js
|
|
3926
|
-
const handleStdio = (addProperties
|
|
3800
|
+
const handleStdio = (addProperties, options, verboseInfo, isSync) => {
|
|
3927
3801
|
const fileDescriptors = getFinalFileDescriptors({
|
|
3928
3802
|
initialFileDescriptors: normalizeStdioOption(options, verboseInfo, isSync).map((stdioOption, fdNumber) => getFileDescriptor({
|
|
3929
3803
|
stdioOption,
|
|
@@ -3931,7 +3805,7 @@ const handleStdio = (addProperties$2, options, verboseInfo, isSync) => {
|
|
|
3931
3805
|
options,
|
|
3932
3806
|
isSync
|
|
3933
3807
|
})),
|
|
3934
|
-
addProperties
|
|
3808
|
+
addProperties,
|
|
3935
3809
|
options,
|
|
3936
3810
|
isSync
|
|
3937
3811
|
});
|
|
@@ -3980,7 +3854,7 @@ const initializeStdioItem = (value, optionName) => ({
|
|
|
3980
3854
|
const validateStdioArray = (stdioItems, isStdioArray, optionName) => {
|
|
3981
3855
|
if (stdioItems.length === 0) throw new TypeError(`The \`${optionName}\` option must not be an empty array.`);
|
|
3982
3856
|
if (!isStdioArray) return;
|
|
3983
|
-
for (const { value, optionName
|
|
3857
|
+
for (const { value, optionName } of stdioItems) if (INVALID_STDIO_ARRAY_OPTIONS.has(value)) throw new Error(`The \`${optionName}\` option must not include \`${value}\`.`);
|
|
3984
3858
|
};
|
|
3985
3859
|
const INVALID_STDIO_ARRAY_OPTIONS = new Set(["ignore", "ipc"]);
|
|
3986
3860
|
const validateStreams = (stdioItems) => {
|
|
@@ -3996,13 +3870,13 @@ const validateFileObjectMode = (stdioItems, objectMode) => {
|
|
|
3996
3870
|
const fileStdioItem = stdioItems.find(({ type }) => FILE_TYPES.has(type));
|
|
3997
3871
|
if (fileStdioItem !== void 0) throw new TypeError(`The \`${fileStdioItem.optionName}\` option cannot use both files and transforms in objectMode.`);
|
|
3998
3872
|
};
|
|
3999
|
-
const getFinalFileDescriptors = ({ initialFileDescriptors, addProperties
|
|
3873
|
+
const getFinalFileDescriptors = ({ initialFileDescriptors, addProperties, options, isSync }) => {
|
|
4000
3874
|
const fileDescriptors = [];
|
|
4001
3875
|
try {
|
|
4002
3876
|
for (const fileDescriptor of initialFileDescriptors) fileDescriptors.push(getFinalFileDescriptor({
|
|
4003
3877
|
fileDescriptor,
|
|
4004
3878
|
fileDescriptors,
|
|
4005
|
-
addProperties
|
|
3879
|
+
addProperties,
|
|
4006
3880
|
options,
|
|
4007
3881
|
isSync
|
|
4008
3882
|
}));
|
|
@@ -4012,13 +3886,13 @@ const getFinalFileDescriptors = ({ initialFileDescriptors, addProperties: addPro
|
|
|
4012
3886
|
throw error;
|
|
4013
3887
|
}
|
|
4014
3888
|
};
|
|
4015
|
-
const getFinalFileDescriptor = ({ fileDescriptor: { direction, objectMode, stdioItems }, fileDescriptors, addProperties
|
|
3889
|
+
const getFinalFileDescriptor = ({ fileDescriptor: { direction, objectMode, stdioItems }, fileDescriptors, addProperties, options, isSync }) => {
|
|
4016
3890
|
return {
|
|
4017
3891
|
direction,
|
|
4018
3892
|
objectMode,
|
|
4019
3893
|
stdioItems: stdioItems.map((stdioItem) => addStreamProperties({
|
|
4020
3894
|
stdioItem,
|
|
4021
|
-
addProperties
|
|
3895
|
+
addProperties,
|
|
4022
3896
|
direction,
|
|
4023
3897
|
options,
|
|
4024
3898
|
fileDescriptors,
|
|
@@ -4026,7 +3900,7 @@ const getFinalFileDescriptor = ({ fileDescriptor: { direction, objectMode, stdio
|
|
|
4026
3900
|
}))
|
|
4027
3901
|
};
|
|
4028
3902
|
};
|
|
4029
|
-
const addStreamProperties = ({ stdioItem, addProperties
|
|
3903
|
+
const addStreamProperties = ({ stdioItem, addProperties, direction, options, fileDescriptors, isSync }) => {
|
|
4030
3904
|
const duplicateStream = getDuplicateStream({
|
|
4031
3905
|
stdioItem,
|
|
4032
3906
|
direction,
|
|
@@ -4039,18 +3913,17 @@ const addStreamProperties = ({ stdioItem, addProperties: addProperties$2, direct
|
|
|
4039
3913
|
};
|
|
4040
3914
|
return {
|
|
4041
3915
|
...stdioItem,
|
|
4042
|
-
...addProperties
|
|
3916
|
+
...addProperties[direction][stdioItem.type](stdioItem, options)
|
|
4043
3917
|
};
|
|
4044
3918
|
};
|
|
4045
3919
|
const cleanupCustomStreams = (fileDescriptors) => {
|
|
4046
3920
|
for (const { stdioItems } of fileDescriptors) for (const { stream } of stdioItems) if (stream !== void 0 && !isStandardStream(stream)) stream.destroy();
|
|
4047
3921
|
};
|
|
4048
3922
|
const forwardStdio = (stdioItems) => {
|
|
4049
|
-
if (stdioItems.length > 1) return stdioItems.some(({ value
|
|
3923
|
+
if (stdioItems.length > 1) return stdioItems.some(({ value }) => value === "overlapped") ? "overlapped" : "pipe";
|
|
4050
3924
|
const [{ type, value }] = stdioItems;
|
|
4051
3925
|
return type === "native" ? value : "pipe";
|
|
4052
3926
|
};
|
|
4053
|
-
|
|
4054
3927
|
//#endregion
|
|
4055
3928
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/stdio/handle-sync.js
|
|
4056
3929
|
const handleStdioSync = (options, verboseInfo) => handleStdio(addPropertiesSync, options, verboseInfo, true);
|
|
@@ -4097,12 +3970,10 @@ const addPropertiesSync = {
|
|
|
4097
3970
|
uint8Array: forbiddenIfSync
|
|
4098
3971
|
}
|
|
4099
3972
|
};
|
|
4100
|
-
|
|
4101
3973
|
//#endregion
|
|
4102
3974
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/io/strip-newline.js
|
|
4103
3975
|
const stripNewline = (value, { stripFinalNewline: stripFinalNewline$1 }, fdNumber) => getStripFinalNewline(stripFinalNewline$1, fdNumber) && value !== void 0 && !Array.isArray(value) ? stripFinalNewline(value) : value;
|
|
4104
|
-
const getStripFinalNewline = (stripFinalNewline
|
|
4105
|
-
|
|
3976
|
+
const getStripFinalNewline = (stripFinalNewline, fdNumber) => fdNumber === "all" ? stripFinalNewline[1] || stripFinalNewline[2] : stripFinalNewline[fdNumber];
|
|
4106
3977
|
//#endregion
|
|
4107
3978
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/transform/split.js
|
|
4108
3979
|
const getSplitLinesGenerator = (binary, preserveNewlines, skipped, state) => binary || skipped ? void 0 : initializeSplitLines(preserveNewlines, state);
|
|
@@ -4148,8 +4019,8 @@ const linesFinal = function* ({ previousChunks }) {
|
|
|
4148
4019
|
};
|
|
4149
4020
|
const getAppendNewlineGenerator = ({ binary, preserveNewlines, readableObjectMode, state }) => binary || preserveNewlines || readableObjectMode ? void 0 : { transform: appendNewlineGenerator.bind(void 0, state) };
|
|
4150
4021
|
const appendNewlineGenerator = function* ({ isWindowsNewline = false }, chunk) {
|
|
4151
|
-
const { unixNewline, windowsNewline, LF
|
|
4152
|
-
if (chunk.at(-1) === LF
|
|
4022
|
+
const { unixNewline, windowsNewline, LF, concatBytes } = typeof chunk === "string" ? linesStringInfo : linesUint8ArrayInfo;
|
|
4023
|
+
if (chunk.at(-1) === LF) {
|
|
4153
4024
|
yield chunk;
|
|
4154
4025
|
return;
|
|
4155
4026
|
}
|
|
@@ -4174,7 +4045,6 @@ const linesUint8ArrayInfo = {
|
|
|
4174
4045
|
LF: 10,
|
|
4175
4046
|
concatBytes: concatUint8Array
|
|
4176
4047
|
};
|
|
4177
|
-
|
|
4178
4048
|
//#endregion
|
|
4179
4049
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/transform/validate.js
|
|
4180
4050
|
const getValidateTransformInput = (writableObjectMode, optionName) => writableObjectMode ? void 0 : validateStringTransformInput.bind(void 0, optionName);
|
|
@@ -4197,7 +4067,6 @@ const validateEmptyReturn = (optionName, chunk) => {
|
|
|
4197
4067
|
Instead, \`yield\` should either be called with a value, or not be called at all. For example:
|
|
4198
4068
|
if (condition) { yield value; }`);
|
|
4199
4069
|
};
|
|
4200
|
-
|
|
4201
4070
|
//#endregion
|
|
4202
4071
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/transform/encoding-transform.js
|
|
4203
4072
|
const getEncodingTransformGenerator = (binary, encoding, skipped) => {
|
|
@@ -4209,9 +4078,9 @@ const getEncodingTransformGenerator = (binary, encoding, skipped) => {
|
|
|
4209
4078
|
final: encodingStringFinal.bind(void 0, stringDecoder)
|
|
4210
4079
|
};
|
|
4211
4080
|
};
|
|
4212
|
-
const encodingUint8ArrayGenerator = function* (textEncoder
|
|
4081
|
+
const encodingUint8ArrayGenerator = function* (textEncoder, chunk) {
|
|
4213
4082
|
if (node_buffer.Buffer.isBuffer(chunk)) yield bufferToUint8Array(chunk);
|
|
4214
|
-
else if (typeof chunk === "string") yield textEncoder
|
|
4083
|
+
else if (typeof chunk === "string") yield textEncoder.encode(chunk);
|
|
4215
4084
|
else yield chunk;
|
|
4216
4085
|
};
|
|
4217
4086
|
const encodingStringGenerator = function* (stringDecoder, chunk) {
|
|
@@ -4221,7 +4090,6 @@ const encodingStringFinal = function* (stringDecoder) {
|
|
|
4221
4090
|
const lastChunk = stringDecoder.end();
|
|
4222
4091
|
if (lastChunk !== "") yield lastChunk;
|
|
4223
4092
|
};
|
|
4224
|
-
|
|
4225
4093
|
//#endregion
|
|
4226
4094
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/transform/run-async.js
|
|
4227
4095
|
const pushChunks = (0, node_util.callbackify)(async (getChunks, state, getChunksArguments, transformStream) => {
|
|
@@ -4257,7 +4125,6 @@ const destroyTransform = (0, node_util.callbackify)(async ({ currentIterable },
|
|
|
4257
4125
|
const identityGenerator$1 = function* (chunk) {
|
|
4258
4126
|
yield chunk;
|
|
4259
4127
|
};
|
|
4260
|
-
|
|
4261
4128
|
//#endregion
|
|
4262
4129
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/transform/run-sync.js
|
|
4263
4130
|
const pushChunksSync = (getChunksSync, getChunksArguments, transformStream, done) => {
|
|
@@ -4287,7 +4154,6 @@ const generatorFinalChunksSync = function* (final, index, generators) {
|
|
|
4287
4154
|
const identityGenerator = function* (chunk) {
|
|
4288
4155
|
yield chunk;
|
|
4289
4156
|
};
|
|
4290
|
-
|
|
4291
4157
|
//#endregion
|
|
4292
4158
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/transform/generator.js
|
|
4293
4159
|
const generatorToStream = ({ value, value: { transform, final, writableObjectMode, readableObjectMode }, optionName }, { encoding }) => {
|
|
@@ -4303,7 +4169,7 @@ const generatorToStream = ({ value, value: { transform, final, writableObjectMod
|
|
|
4303
4169
|
writableHighWaterMark: (0, node_stream.getDefaultHighWaterMark)(writableObjectMode),
|
|
4304
4170
|
readableObjectMode,
|
|
4305
4171
|
readableHighWaterMark: (0, node_stream.getDefaultHighWaterMark)(readableObjectMode),
|
|
4306
|
-
transform(chunk, encoding
|
|
4172
|
+
transform(chunk, encoding, done) {
|
|
4307
4173
|
transformMethod([
|
|
4308
4174
|
chunk,
|
|
4309
4175
|
generators,
|
|
@@ -4341,7 +4207,6 @@ const addInternalGenerators = ({ transform, final, binary, writableObjectMode, r
|
|
|
4341
4207
|
})
|
|
4342
4208
|
].filter(Boolean);
|
|
4343
4209
|
};
|
|
4344
|
-
|
|
4345
4210
|
//#endregion
|
|
4346
4211
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/io/input-sync.js
|
|
4347
4212
|
const addInputOptionsSync = (fileDescriptors, options) => {
|
|
@@ -4367,7 +4232,6 @@ const validateSerializable = (newContents) => {
|
|
|
4367
4232
|
const invalidItem = newContents.find((item) => typeof item !== "string" && !isUint8Array(item));
|
|
4368
4233
|
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}.`);
|
|
4369
4234
|
};
|
|
4370
|
-
|
|
4371
4235
|
//#endregion
|
|
4372
4236
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/verbose/output.js
|
|
4373
4237
|
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)));
|
|
@@ -4388,7 +4252,6 @@ const logLine = (line, fdNumber, verboseInfo) => {
|
|
|
4388
4252
|
verboseInfo
|
|
4389
4253
|
});
|
|
4390
4254
|
};
|
|
4391
|
-
|
|
4392
4255
|
//#endregion
|
|
4393
4256
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/io/output-sync.js
|
|
4394
4257
|
const transformOutputSync = ({ fileDescriptors, syncResult: { output }, options, isMaxBuffer, verboseInfo }) => {
|
|
@@ -4408,7 +4271,7 @@ const transformOutputSync = ({ fileDescriptors, syncResult: { output }, options,
|
|
|
4408
4271
|
...state
|
|
4409
4272
|
};
|
|
4410
4273
|
};
|
|
4411
|
-
const transformOutputResultSync = ({ result, fileDescriptors, fdNumber, state, outputFiles, isMaxBuffer, verboseInfo }, { buffer, encoding, lines, stripFinalNewline
|
|
4274
|
+
const transformOutputResultSync = ({ result, fileDescriptors, fdNumber, state, outputFiles, isMaxBuffer, verboseInfo }, { buffer, encoding, lines, stripFinalNewline, maxBuffer }) => {
|
|
4412
4275
|
if (result === null) return;
|
|
4413
4276
|
const uint8ArrayResult = bufferToUint8Array(truncateMaxBufferSync(result, isMaxBuffer, maxBuffer));
|
|
4414
4277
|
const { stdioItems, objectMode } = fileDescriptors[fdNumber];
|
|
@@ -4417,7 +4280,7 @@ const transformOutputResultSync = ({ result, fileDescriptors, fdNumber, state, o
|
|
|
4417
4280
|
objectMode,
|
|
4418
4281
|
encoding,
|
|
4419
4282
|
lines,
|
|
4420
|
-
stripFinalNewline
|
|
4283
|
+
stripFinalNewline,
|
|
4421
4284
|
fdNumber
|
|
4422
4285
|
});
|
|
4423
4286
|
logOutputSync({
|
|
@@ -4446,13 +4309,13 @@ const runOutputGeneratorsSync = (chunks, stdioItems, encoding, state) => {
|
|
|
4446
4309
|
return chunks;
|
|
4447
4310
|
}
|
|
4448
4311
|
};
|
|
4449
|
-
const serializeChunks = ({ chunks, objectMode, encoding, lines, stripFinalNewline
|
|
4312
|
+
const serializeChunks = ({ chunks, objectMode, encoding, lines, stripFinalNewline, fdNumber }) => {
|
|
4450
4313
|
if (objectMode) return { serializedResult: chunks };
|
|
4451
4314
|
if (encoding === "buffer") return { serializedResult: joinToUint8Array(chunks) };
|
|
4452
4315
|
const serializedResult = joinToString(chunks, encoding);
|
|
4453
4316
|
if (lines[fdNumber]) return {
|
|
4454
4317
|
serializedResult,
|
|
4455
|
-
finalResult: splitLinesSync(serializedResult, !stripFinalNewline
|
|
4318
|
+
finalResult: splitLinesSync(serializedResult, !stripFinalNewline[fdNumber], objectMode)
|
|
4456
4319
|
};
|
|
4457
4320
|
return { serializedResult };
|
|
4458
4321
|
};
|
|
@@ -4471,16 +4334,15 @@ const logOutputSync = ({ serializedResult, fdNumber, state, verboseInfo, encodin
|
|
|
4471
4334
|
}
|
|
4472
4335
|
};
|
|
4473
4336
|
const writeToFiles = (serializedResult, stdioItems, outputFiles) => {
|
|
4474
|
-
for (const { path
|
|
4475
|
-
const pathString = typeof path
|
|
4476
|
-
if (append || outputFiles.has(pathString)) (0, node_fs.appendFileSync)(path
|
|
4337
|
+
for (const { path, append } of stdioItems.filter(({ type }) => FILE_TYPES.has(type))) {
|
|
4338
|
+
const pathString = typeof path === "string" ? path : path.toString();
|
|
4339
|
+
if (append || outputFiles.has(pathString)) (0, node_fs.appendFileSync)(path, serializedResult);
|
|
4477
4340
|
else {
|
|
4478
4341
|
outputFiles.add(pathString);
|
|
4479
|
-
(0, node_fs.writeFileSync)(path
|
|
4342
|
+
(0, node_fs.writeFileSync)(path, serializedResult);
|
|
4480
4343
|
}
|
|
4481
4344
|
}
|
|
4482
4345
|
};
|
|
4483
|
-
|
|
4484
4346
|
//#endregion
|
|
4485
4347
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/resolve/all-sync.js
|
|
4486
4348
|
const getAllSync = ([, stdout, stderr], options) => {
|
|
@@ -4492,7 +4354,6 @@ const getAllSync = ([, stdout, stderr], options) => {
|
|
|
4492
4354
|
if (isUint8Array(stdout) && isUint8Array(stderr)) return concatUint8Arrays([stdout, stderr]);
|
|
4493
4355
|
return `${stdout}${stderr}`;
|
|
4494
4356
|
};
|
|
4495
|
-
|
|
4496
4357
|
//#endregion
|
|
4497
4358
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/resolve/exit-async.js
|
|
4498
4359
|
const waitForExit = async (subprocess, context) => {
|
|
@@ -4519,7 +4380,6 @@ const waitForSuccessfulExit = async (exitPromise) => {
|
|
|
4519
4380
|
};
|
|
4520
4381
|
const isSubprocessErrorExit = (exitCode, signal) => exitCode === void 0 && signal === void 0;
|
|
4521
4382
|
const isFailedExit = (exitCode, signal) => exitCode !== 0 || signal !== null;
|
|
4522
|
-
|
|
4523
4383
|
//#endregion
|
|
4524
4384
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/resolve/exit-sync.js
|
|
4525
4385
|
const getExitResultSync = ({ error, status: exitCode, signal, output }, { maxBuffer }) => {
|
|
@@ -4536,7 +4396,6 @@ const getResultError = (error, exitCode, signal) => {
|
|
|
4536
4396
|
if (error !== void 0) return error;
|
|
4537
4397
|
return isFailedExit(exitCode, signal) ? new DiscardedError() : void 0;
|
|
4538
4398
|
};
|
|
4539
|
-
|
|
4540
4399
|
//#endregion
|
|
4541
4400
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/methods/main-sync.js
|
|
4542
4401
|
const execaCoreSync = (rawFile, rawArguments, rawOptions) => {
|
|
@@ -4629,7 +4488,7 @@ const runSubprocessSync = ({ file, commandArguments, options, command, escapedCo
|
|
|
4629
4488
|
});
|
|
4630
4489
|
}
|
|
4631
4490
|
};
|
|
4632
|
-
const normalizeSpawnSyncOptions = ({ encoding, maxBuffer
|
|
4491
|
+
const normalizeSpawnSyncOptions = ({ encoding, maxBuffer, ...options }) => ({
|
|
4633
4492
|
...options,
|
|
4634
4493
|
encoding: "buffer",
|
|
4635
4494
|
maxBuffer: getMaxBufferSync(maxBuffer)
|
|
@@ -4660,7 +4519,6 @@ const getSyncResult = ({ error, exitCode, signal, timedOut, isMaxBuffer, stdio,
|
|
|
4660
4519
|
startTime,
|
|
4661
4520
|
isSync: true
|
|
4662
4521
|
});
|
|
4663
|
-
|
|
4664
4522
|
//#endregion
|
|
4665
4523
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/ipc/get-one.js
|
|
4666
4524
|
const getOneMessage$1 = ({ anyProcess, channel, isSubprocess, ipc }, { reference = true, filter } = {}) => {
|
|
@@ -4711,7 +4569,6 @@ const throwOnStrictError = async (ipcEmitter, isSubprocess, { signal }) => {
|
|
|
4711
4569
|
const [error] = await (0, node_events.once)(ipcEmitter, "strict:error", { signal });
|
|
4712
4570
|
throw getStrictResponseError(error, isSubprocess);
|
|
4713
4571
|
};
|
|
4714
|
-
|
|
4715
4572
|
//#endregion
|
|
4716
4573
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/ipc/get-each.js
|
|
4717
4574
|
const getEachMessage$1 = ({ anyProcess, channel, isSubprocess, ipc }, { reference = true } = {}) => loopOnMessages({
|
|
@@ -4782,7 +4639,6 @@ const iterateOnMessages = async function* ({ anyProcess, channel, ipcEmitter, is
|
|
|
4782
4639
|
const throwIfStrictError = ({ error }) => {
|
|
4783
4640
|
if (error) throw error;
|
|
4784
4641
|
};
|
|
4785
|
-
|
|
4786
4642
|
//#endregion
|
|
4787
4643
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/ipc/methods.js
|
|
4788
4644
|
const addIpcMethods = (subprocess, { ipc }) => {
|
|
@@ -4822,7 +4678,6 @@ const getIpcMethods = (anyProcess, isSubprocess, ipc) => ({
|
|
|
4822
4678
|
ipc
|
|
4823
4679
|
})
|
|
4824
4680
|
});
|
|
4825
|
-
|
|
4826
4681
|
//#endregion
|
|
4827
4682
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/return/early-error.js
|
|
4828
4683
|
const handleEarlyError = ({ error, command, escapedCommand, fileDescriptors, options, startTime, verboseInfo }) => {
|
|
@@ -4879,7 +4734,6 @@ const duplex = () => new node_stream.Duplex({
|
|
|
4879
4734
|
write() {}
|
|
4880
4735
|
});
|
|
4881
4736
|
const handleDummyPromise = async (error, verboseInfo, options) => handleResult(error, verboseInfo, options);
|
|
4882
|
-
|
|
4883
4737
|
//#endregion
|
|
4884
4738
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/stdio/handle-async.js
|
|
4885
4739
|
const handleStdioAsync = (options, verboseInfo) => handleStdio(addPropertiesAsync, options, verboseInfo, false);
|
|
@@ -4920,7 +4774,6 @@ const addPropertiesAsync = {
|
|
|
4920
4774
|
uint8Array: forbiddenIfAsync
|
|
4921
4775
|
}
|
|
4922
4776
|
};
|
|
4923
|
-
|
|
4924
4777
|
//#endregion
|
|
4925
4778
|
//#region ../../node_modules/.pnpm/@sindresorhus+merge-streams@4.0.0/node_modules/@sindresorhus/merge-streams/index.js
|
|
4926
4779
|
function mergeStreams(streams) {
|
|
@@ -5003,7 +4856,7 @@ const onInputStreamsUnpipe = async (passThroughStream, streams, unpipeEvent, { s
|
|
|
5003
4856
|
const validateStream = (stream) => {
|
|
5004
4857
|
if (typeof stream?.pipe !== "function") throw new TypeError(`Expected a readable stream, got: \`${typeof stream}\`.`);
|
|
5005
4858
|
};
|
|
5006
|
-
const endWhenStreamsDone = async ({ passThroughStream, stream, streams, ended, aborted
|
|
4859
|
+
const endWhenStreamsDone = async ({ passThroughStream, stream, streams, ended, aborted, onFinished, unpipeEvent }) => {
|
|
5007
4860
|
updateMaxListeners(passThroughStream, PASSTHROUGH_LISTENERS_PER_STREAM);
|
|
5008
4861
|
const controller = new AbortController();
|
|
5009
4862
|
try {
|
|
@@ -5014,14 +4867,14 @@ const endWhenStreamsDone = async ({ passThroughStream, stream, streams, ended, a
|
|
|
5014
4867
|
stream,
|
|
5015
4868
|
streams,
|
|
5016
4869
|
ended,
|
|
5017
|
-
aborted
|
|
4870
|
+
aborted,
|
|
5018
4871
|
controller
|
|
5019
4872
|
}),
|
|
5020
4873
|
onInputStreamUnpipe({
|
|
5021
4874
|
stream,
|
|
5022
4875
|
streams,
|
|
5023
4876
|
ended,
|
|
5024
|
-
aborted
|
|
4877
|
+
aborted,
|
|
5025
4878
|
unpipeEvent,
|
|
5026
4879
|
controller
|
|
5027
4880
|
})
|
|
@@ -5030,7 +4883,7 @@ const endWhenStreamsDone = async ({ passThroughStream, stream, streams, ended, a
|
|
|
5030
4883
|
controller.abort();
|
|
5031
4884
|
updateMaxListeners(passThroughStream, -PASSTHROUGH_LISTENERS_PER_STREAM);
|
|
5032
4885
|
}
|
|
5033
|
-
if (streams.size > 0 && streams.size === ended.size + aborted
|
|
4886
|
+
if (streams.size > 0 && streams.size === ended.size + aborted.size) if (ended.size === 0 && aborted.size > 0) abortStream(passThroughStream);
|
|
5034
4887
|
else endStream(passThroughStream);
|
|
5035
4888
|
};
|
|
5036
4889
|
const afterMergedStreamFinished = async (onFinished, stream, { signal }) => {
|
|
@@ -5041,7 +4894,7 @@ const afterMergedStreamFinished = async (onFinished, stream, { signal }) => {
|
|
|
5041
4894
|
if (!signal.aborted) errorOrAbortStream(stream, error);
|
|
5042
4895
|
}
|
|
5043
4896
|
};
|
|
5044
|
-
const onInputStreamEnd = async ({ passThroughStream, stream, streams, ended, aborted
|
|
4897
|
+
const onInputStreamEnd = async ({ passThroughStream, stream, streams, ended, aborted, controller: { signal } }) => {
|
|
5045
4898
|
try {
|
|
5046
4899
|
await (0, node_stream_promises.finished)(stream, {
|
|
5047
4900
|
signal,
|
|
@@ -5052,16 +4905,16 @@ const onInputStreamEnd = async ({ passThroughStream, stream, streams, ended, abo
|
|
|
5052
4905
|
if (streams.has(stream)) ended.add(stream);
|
|
5053
4906
|
} catch (error) {
|
|
5054
4907
|
if (signal.aborted || !streams.has(stream)) return;
|
|
5055
|
-
if (isAbortError(error)) aborted
|
|
4908
|
+
if (isAbortError(error)) aborted.add(stream);
|
|
5056
4909
|
else errorStream(passThroughStream, error);
|
|
5057
4910
|
}
|
|
5058
4911
|
};
|
|
5059
|
-
const onInputStreamUnpipe = async ({ stream, streams, ended, aborted
|
|
4912
|
+
const onInputStreamUnpipe = async ({ stream, streams, ended, aborted, unpipeEvent, controller: { signal } }) => {
|
|
5060
4913
|
await (0, node_events.once)(stream, unpipeEvent, { signal });
|
|
5061
4914
|
if (!stream.readable) return (0, node_events.once)(signal, "abort", { signal });
|
|
5062
4915
|
streams.delete(stream);
|
|
5063
4916
|
ended.delete(stream);
|
|
5064
|
-
aborted
|
|
4917
|
+
aborted.delete(stream);
|
|
5065
4918
|
};
|
|
5066
4919
|
const endStream = (stream) => {
|
|
5067
4920
|
if (stream.writable) stream.end();
|
|
@@ -5081,13 +4934,12 @@ const errorStream = (stream, error) => {
|
|
|
5081
4934
|
}
|
|
5082
4935
|
};
|
|
5083
4936
|
const noop = () => {};
|
|
5084
|
-
const updateMaxListeners = (passThroughStream, increment
|
|
4937
|
+
const updateMaxListeners = (passThroughStream, increment) => {
|
|
5085
4938
|
const maxListeners = passThroughStream.getMaxListeners();
|
|
5086
|
-
if (maxListeners !== 0 && maxListeners !== Number.POSITIVE_INFINITY) passThroughStream.setMaxListeners(maxListeners + increment
|
|
4939
|
+
if (maxListeners !== 0 && maxListeners !== Number.POSITIVE_INFINITY) passThroughStream.setMaxListeners(maxListeners + increment);
|
|
5087
4940
|
};
|
|
5088
4941
|
const PASSTHROUGH_LISTENERS_COUNT = 2;
|
|
5089
4942
|
const PASSTHROUGH_LISTENERS_PER_STREAM = 1;
|
|
5090
|
-
|
|
5091
4943
|
//#endregion
|
|
5092
4944
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/io/pipeline.js
|
|
5093
4945
|
const pipeStreams = (source, destination) => {
|
|
@@ -5123,7 +4975,6 @@ const onDestinationFinish = async (source, destination) => {
|
|
|
5123
4975
|
const abortSourceStream = (source) => {
|
|
5124
4976
|
if (source.readable) source.destroy();
|
|
5125
4977
|
};
|
|
5126
|
-
|
|
5127
4978
|
//#endregion
|
|
5128
4979
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/io/output-async.js
|
|
5129
4980
|
const pipeOutputAsync = (subprocess, fileDescriptors, controller) => {
|
|
@@ -5164,7 +5015,6 @@ const setStandardStreamMaxListeners = (stream, { signal }) => {
|
|
|
5164
5015
|
if (isStandardStream(stream)) incrementMaxListeners(stream, MAX_LISTENERS_INCREMENT, signal);
|
|
5165
5016
|
};
|
|
5166
5017
|
const MAX_LISTENERS_INCREMENT = 2;
|
|
5167
|
-
|
|
5168
5018
|
//#endregion
|
|
5169
5019
|
//#region ../../node_modules/.pnpm/signal-exit@4.1.0/node_modules/signal-exit/dist/mjs/signals.js
|
|
5170
5020
|
/**
|
|
@@ -5197,10 +5047,9 @@ const signals = [];
|
|
|
5197
5047
|
signals.push("SIGHUP", "SIGINT", "SIGTERM");
|
|
5198
5048
|
if (process.platform !== "win32") signals.push("SIGALRM", "SIGABRT", "SIGVTALRM", "SIGXCPU", "SIGXFSZ", "SIGUSR2", "SIGTRAP", "SIGSYS", "SIGQUIT", "SIGIOT");
|
|
5199
5049
|
if (process.platform === "linux") signals.push("SIGIO", "SIGPOLL", "SIGPWR", "SIGSTKFLT");
|
|
5200
|
-
|
|
5201
5050
|
//#endregion
|
|
5202
5051
|
//#region ../../node_modules/.pnpm/signal-exit@4.1.0/node_modules/signal-exit/dist/mjs/index.js
|
|
5203
|
-
const processOk = (process
|
|
5052
|
+
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";
|
|
5204
5053
|
const kExitEmitter = Symbol.for("signal-exit emitter");
|
|
5205
5054
|
const global$1 = globalThis;
|
|
5206
5055
|
const ObjectDefineProperty = Object.defineProperty.bind(Object);
|
|
@@ -5229,12 +5078,12 @@ var Emitter = class {
|
|
|
5229
5078
|
}
|
|
5230
5079
|
removeListener(ev, fn) {
|
|
5231
5080
|
const list = this.listeners[ev];
|
|
5232
|
-
const i
|
|
5081
|
+
const i = list.indexOf(fn);
|
|
5233
5082
|
/* c8 ignore start */
|
|
5234
|
-
if (i
|
|
5083
|
+
if (i === -1) return;
|
|
5235
5084
|
/* c8 ignore stop */
|
|
5236
|
-
if (i
|
|
5237
|
-
else list.splice(i
|
|
5085
|
+
if (i === 0 && list.length === 1) list.length = 0;
|
|
5086
|
+
else list.splice(i, 1);
|
|
5238
5087
|
}
|
|
5239
5088
|
emit(ev, code, signal) {
|
|
5240
5089
|
if (this.emitted[ev]) return false;
|
|
@@ -5276,27 +5125,27 @@ var SignalExit = class extends SignalExitBase {
|
|
|
5276
5125
|
#originalProcessReallyExit;
|
|
5277
5126
|
#sigListeners = {};
|
|
5278
5127
|
#loaded = false;
|
|
5279
|
-
constructor(process
|
|
5128
|
+
constructor(process) {
|
|
5280
5129
|
super();
|
|
5281
|
-
this.#process = process
|
|
5130
|
+
this.#process = process;
|
|
5282
5131
|
this.#sigListeners = {};
|
|
5283
5132
|
for (const sig of signals) this.#sigListeners[sig] = () => {
|
|
5284
5133
|
const listeners = this.#process.listeners(sig);
|
|
5285
|
-
let { count
|
|
5134
|
+
let { count } = this.#emitter;
|
|
5286
5135
|
/* c8 ignore start */
|
|
5287
|
-
const p
|
|
5288
|
-
if (typeof p
|
|
5136
|
+
const p = process;
|
|
5137
|
+
if (typeof p.__signal_exit_emitter__ === "object" && typeof p.__signal_exit_emitter__.count === "number") count += p.__signal_exit_emitter__.count;
|
|
5289
5138
|
/* c8 ignore stop */
|
|
5290
|
-
if (listeners.length === count
|
|
5139
|
+
if (listeners.length === count) {
|
|
5291
5140
|
this.unload();
|
|
5292
5141
|
const ret = this.#emitter.emit("exit", null, sig);
|
|
5293
5142
|
/* c8 ignore start */
|
|
5294
5143
|
const s = sig === "SIGHUP" ? this.#hupSig : sig;
|
|
5295
|
-
if (!ret) process
|
|
5144
|
+
if (!ret) process.kill(process.pid, s);
|
|
5296
5145
|
}
|
|
5297
5146
|
};
|
|
5298
|
-
this.#originalProcessReallyExit = process
|
|
5299
|
-
this.#originalProcessEmit = process
|
|
5147
|
+
this.#originalProcessReallyExit = process.reallyExit;
|
|
5148
|
+
this.#originalProcessEmit = process.emit;
|
|
5300
5149
|
}
|
|
5301
5150
|
onExit(cb, opts) {
|
|
5302
5151
|
/* c8 ignore start */
|
|
@@ -5318,8 +5167,8 @@ var SignalExit = class extends SignalExitBase {
|
|
|
5318
5167
|
const fn = this.#sigListeners[sig];
|
|
5319
5168
|
if (fn) this.#process.on(sig, fn);
|
|
5320
5169
|
} catch (_) {}
|
|
5321
|
-
this.#process.emit = (ev, ...a
|
|
5322
|
-
return this.#processEmit(ev, ...a
|
|
5170
|
+
this.#process.emit = (ev, ...a) => {
|
|
5171
|
+
return this.#processEmit(ev, ...a);
|
|
5323
5172
|
};
|
|
5324
5173
|
this.#process.reallyExit = (code) => {
|
|
5325
5174
|
return this.#processReallyExit(code);
|
|
@@ -5365,7 +5214,6 @@ var SignalExit = class extends SignalExitBase {
|
|
|
5365
5214
|
};
|
|
5366
5215
|
const process$1 = globalThis.process;
|
|
5367
5216
|
const { onExit, load, unload } = signalExitWrap(processOk(process$1) ? new SignalExit(process$1) : new SignalExitFallback());
|
|
5368
|
-
|
|
5369
5217
|
//#endregion
|
|
5370
5218
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/terminate/cleanup.js
|
|
5371
5219
|
const cleanupOnExit = (subprocess, { cleanup, detached }, { signal }) => {
|
|
@@ -5377,7 +5225,6 @@ const cleanupOnExit = (subprocess, { cleanup, detached }, { signal }) => {
|
|
|
5377
5225
|
removeExitHandler();
|
|
5378
5226
|
});
|
|
5379
5227
|
};
|
|
5380
|
-
|
|
5381
5228
|
//#endregion
|
|
5382
5229
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/pipe/pipe-arguments.js
|
|
5383
5230
|
const normalizePipeArguments = ({ source, sourcePromise, boundOptions, createNested }, ...pipeArguments) => {
|
|
@@ -5445,7 +5292,6 @@ const getSourceStream = (source, from) => {
|
|
|
5445
5292
|
return { sourceError: error };
|
|
5446
5293
|
}
|
|
5447
5294
|
};
|
|
5448
|
-
|
|
5449
5295
|
//#endregion
|
|
5450
5296
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/pipe/throw.js
|
|
5451
5297
|
const handlePipeArgumentsError = ({ sourceStream, sourceError, destinationStream, destinationError, fileDescriptors, sourceOptions, startTime }) => {
|
|
@@ -5483,7 +5329,6 @@ const createNonCommandError = ({ error, fileDescriptors, sourceOptions, startTim
|
|
|
5483
5329
|
isSync: false
|
|
5484
5330
|
});
|
|
5485
5331
|
const PIPE_COMMAND_MESSAGE = "source.pipe(destination)";
|
|
5486
|
-
|
|
5487
5332
|
//#endregion
|
|
5488
5333
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/pipe/sequence.js
|
|
5489
5334
|
const waitForBothSubprocesses = async (subprocessPromises) => {
|
|
@@ -5493,7 +5338,6 @@ const waitForBothSubprocesses = async (subprocessPromises) => {
|
|
|
5493
5338
|
if (sourceStatus === "rejected") throw sourceResult;
|
|
5494
5339
|
return destinationResult;
|
|
5495
5340
|
};
|
|
5496
|
-
|
|
5497
5341
|
//#endregion
|
|
5498
5342
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/pipe/streaming.js
|
|
5499
5343
|
const pipeSubprocessStream = (sourceStream, destinationStream, maxListenersController) => {
|
|
@@ -5527,7 +5371,6 @@ const cleanupMergedStreamsMap = async (destinationStream) => {
|
|
|
5527
5371
|
const MERGED_STREAMS = /* @__PURE__ */ new WeakMap();
|
|
5528
5372
|
const SOURCE_LISTENERS_PER_PIPE = 2;
|
|
5529
5373
|
const DESTINATION_LISTENERS_PER_PIPE = 1;
|
|
5530
|
-
|
|
5531
5374
|
//#endregion
|
|
5532
5375
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/pipe/abort.js
|
|
5533
5376
|
const unpipeOnAbort = (unpipeSignal, unpipeContext) => unpipeSignal === void 0 ? [] : [unpipeOnSignalAbort(unpipeSignal, unpipeContext)];
|
|
@@ -5541,7 +5384,6 @@ const unpipeOnSignalAbort = async (unpipeSignal, { sourceStream, mergedStream, f
|
|
|
5541
5384
|
startTime
|
|
5542
5385
|
});
|
|
5543
5386
|
};
|
|
5544
|
-
|
|
5545
5387
|
//#endregion
|
|
5546
5388
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/pipe/setup.js
|
|
5547
5389
|
const pipeToSubprocess = (sourceInfo, ...pipeArguments) => {
|
|
@@ -5552,7 +5394,7 @@ const pipeToSubprocess = (sourceInfo, ...pipeArguments) => {
|
|
|
5552
5394
|
...pipeArguments[0]
|
|
5553
5395
|
}
|
|
5554
5396
|
});
|
|
5555
|
-
const { destination
|
|
5397
|
+
const { destination, ...normalizedInfo } = normalizePipeArguments(sourceInfo, ...pipeArguments);
|
|
5556
5398
|
const promise = handlePipePromise({
|
|
5557
5399
|
...normalizedInfo,
|
|
5558
5400
|
destination
|
|
@@ -5591,7 +5433,6 @@ const handlePipePromise = async ({ sourcePromise, sourceStream, sourceOptions, s
|
|
|
5591
5433
|
}
|
|
5592
5434
|
};
|
|
5593
5435
|
const getSubprocessPromises = (sourcePromise, destination) => Promise.allSettled([sourcePromise, destination]);
|
|
5594
|
-
|
|
5595
5436
|
//#endregion
|
|
5596
5437
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/io/iterate.js
|
|
5597
5438
|
const iterateOnSubprocessStream = ({ subprocessStdout, subprocess, binary, shouldEncode, encoding, preserveNewlines }) => {
|
|
@@ -5614,7 +5455,7 @@ const stopReadingOnExit = async (subprocess, controller) => {
|
|
|
5614
5455
|
controller.abort();
|
|
5615
5456
|
}
|
|
5616
5457
|
};
|
|
5617
|
-
const iterateForResult = ({ stream, onStreamEnd, lines, encoding, stripFinalNewline
|
|
5458
|
+
const iterateForResult = ({ stream, onStreamEnd, lines, encoding, stripFinalNewline, allMixed }) => {
|
|
5618
5459
|
const controller = new AbortController();
|
|
5619
5460
|
stopReadingOnStreamEnd(onStreamEnd, controller, stream);
|
|
5620
5461
|
const objectMode = stream.readableObjectMode && !allMixed;
|
|
@@ -5625,7 +5466,7 @@ const iterateForResult = ({ stream, onStreamEnd, lines, encoding, stripFinalNewl
|
|
|
5625
5466
|
shouldEncode: !objectMode,
|
|
5626
5467
|
encoding,
|
|
5627
5468
|
shouldSplit: !objectMode && lines,
|
|
5628
|
-
preserveNewlines: !stripFinalNewline
|
|
5469
|
+
preserveNewlines: !stripFinalNewline
|
|
5629
5470
|
});
|
|
5630
5471
|
};
|
|
5631
5472
|
const stopReadingOnStreamEnd = async (onStreamEnd, controller, stream) => {
|
|
@@ -5671,10 +5512,9 @@ const iterateOnData = async function* ({ onStdoutChunk, controller, binary, shou
|
|
|
5671
5512
|
}
|
|
5672
5513
|
};
|
|
5673
5514
|
const getGenerators = ({ binary, shouldEncode, encoding, shouldSplit, preserveNewlines }) => [getEncodingTransformGenerator(binary, encoding, !shouldEncode), getSplitLinesGenerator(binary, preserveNewlines, !shouldSplit, {})].filter(Boolean);
|
|
5674
|
-
|
|
5675
5515
|
//#endregion
|
|
5676
5516
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/io/contents.js
|
|
5677
|
-
const getStreamOutput = async ({ stream, onStreamEnd, fdNumber, encoding, buffer, maxBuffer, lines, allMixed, stripFinalNewline
|
|
5517
|
+
const getStreamOutput = async ({ stream, onStreamEnd, fdNumber, encoding, buffer, maxBuffer, lines, allMixed, stripFinalNewline, verboseInfo, streamInfo }) => {
|
|
5678
5518
|
const logPromise = logOutputAsync({
|
|
5679
5519
|
stream,
|
|
5680
5520
|
onStreamEnd,
|
|
@@ -5693,7 +5533,7 @@ const getStreamOutput = async ({ stream, onStreamEnd, fdNumber, encoding, buffer
|
|
|
5693
5533
|
onStreamEnd,
|
|
5694
5534
|
lines,
|
|
5695
5535
|
encoding,
|
|
5696
|
-
stripFinalNewline: getStripFinalNewline(stripFinalNewline
|
|
5536
|
+
stripFinalNewline: getStripFinalNewline(stripFinalNewline, fdNumber),
|
|
5697
5537
|
allMixed
|
|
5698
5538
|
});
|
|
5699
5539
|
const [output] = await Promise.all([getStreamContents({
|
|
@@ -5750,7 +5590,6 @@ const getBufferedData = async (streamPromise) => {
|
|
|
5750
5590
|
}
|
|
5751
5591
|
};
|
|
5752
5592
|
const handleBufferedData = ({ bufferedData }) => isArrayBuffer(bufferedData) ? new Uint8Array(bufferedData) : bufferedData;
|
|
5753
|
-
|
|
5754
5593
|
//#endregion
|
|
5755
5594
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/resolve/wait-stream.js
|
|
5756
5595
|
const waitForStream = async (stream, fdNumber, streamInfo, { isSameDirection, stopOnExit = false } = {}) => {
|
|
@@ -5793,10 +5632,9 @@ const shouldIgnoreStreamError = (error, fdNumber, streamInfo, isSameDirection =
|
|
|
5793
5632
|
const isInputFileDescriptor = ({ fileDescriptors }, fdNumber) => fdNumber !== "all" && fileDescriptors[fdNumber].direction === "input";
|
|
5794
5633
|
const isStreamAbort = (error) => error?.code === "ERR_STREAM_PREMATURE_CLOSE";
|
|
5795
5634
|
const isStreamEpipe = (error) => error?.code === "EPIPE";
|
|
5796
|
-
|
|
5797
5635
|
//#endregion
|
|
5798
5636
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/resolve/stdio.js
|
|
5799
|
-
const waitForStdioStreams = ({ subprocess, encoding, buffer, maxBuffer, lines, stripFinalNewline
|
|
5637
|
+
const waitForStdioStreams = ({ subprocess, encoding, buffer, maxBuffer, lines, stripFinalNewline, verboseInfo, streamInfo }) => subprocess.stdio.map((stream, fdNumber) => waitForSubprocessStream({
|
|
5800
5638
|
stream,
|
|
5801
5639
|
fdNumber,
|
|
5802
5640
|
encoding,
|
|
@@ -5804,11 +5642,11 @@ const waitForStdioStreams = ({ subprocess, encoding, buffer, maxBuffer, lines, s
|
|
|
5804
5642
|
maxBuffer: maxBuffer[fdNumber],
|
|
5805
5643
|
lines: lines[fdNumber],
|
|
5806
5644
|
allMixed: false,
|
|
5807
|
-
stripFinalNewline
|
|
5645
|
+
stripFinalNewline,
|
|
5808
5646
|
verboseInfo,
|
|
5809
5647
|
streamInfo
|
|
5810
5648
|
}));
|
|
5811
|
-
const waitForSubprocessStream = async ({ stream, fdNumber, encoding, buffer, maxBuffer, lines, allMixed, stripFinalNewline
|
|
5649
|
+
const waitForSubprocessStream = async ({ stream, fdNumber, encoding, buffer, maxBuffer, lines, allMixed, stripFinalNewline, verboseInfo, streamInfo }) => {
|
|
5812
5650
|
if (!stream) return;
|
|
5813
5651
|
const onStreamEnd = waitForStream(stream, fdNumber, streamInfo);
|
|
5814
5652
|
if (isInputFileDescriptor(streamInfo, fdNumber)) {
|
|
@@ -5824,24 +5662,23 @@ const waitForSubprocessStream = async ({ stream, fdNumber, encoding, buffer, max
|
|
|
5824
5662
|
maxBuffer,
|
|
5825
5663
|
lines,
|
|
5826
5664
|
allMixed,
|
|
5827
|
-
stripFinalNewline
|
|
5665
|
+
stripFinalNewline,
|
|
5828
5666
|
verboseInfo,
|
|
5829
5667
|
streamInfo
|
|
5830
5668
|
}), onStreamEnd]);
|
|
5831
5669
|
return output;
|
|
5832
5670
|
};
|
|
5833
|
-
|
|
5834
5671
|
//#endregion
|
|
5835
5672
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/resolve/all-async.js
|
|
5836
5673
|
const makeAllStream = ({ stdout, stderr }, { all }) => all && (stdout || stderr) ? mergeStreams([stdout, stderr].filter(Boolean)) : void 0;
|
|
5837
|
-
const waitForAllStream = ({ subprocess, encoding, buffer, maxBuffer, lines, stripFinalNewline
|
|
5674
|
+
const waitForAllStream = ({ subprocess, encoding, buffer, maxBuffer, lines, stripFinalNewline, verboseInfo, streamInfo }) => waitForSubprocessStream({
|
|
5838
5675
|
...getAllStream(subprocess, buffer),
|
|
5839
5676
|
fdNumber: "all",
|
|
5840
5677
|
encoding,
|
|
5841
5678
|
maxBuffer: maxBuffer[1] + maxBuffer[2],
|
|
5842
5679
|
lines: lines[1] || lines[2],
|
|
5843
5680
|
allMixed: getAllMixed(subprocess),
|
|
5844
|
-
stripFinalNewline
|
|
5681
|
+
stripFinalNewline,
|
|
5845
5682
|
verboseInfo,
|
|
5846
5683
|
streamInfo
|
|
5847
5684
|
});
|
|
@@ -5865,7 +5702,6 @@ const getAllStream = ({ stdout, stderr, all }, [, bufferStdout, bufferStderr]) =
|
|
|
5865
5702
|
};
|
|
5866
5703
|
};
|
|
5867
5704
|
const getAllMixed = ({ all, stdout, stderr }) => all && stdout && stderr && stdout.readableObjectMode !== stderr.readableObjectMode;
|
|
5868
|
-
|
|
5869
5705
|
//#endregion
|
|
5870
5706
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/verbose/ipc.js
|
|
5871
5707
|
const shouldLogIpc = (verboseInfo) => isFullVerbose(verboseInfo, "ipc");
|
|
@@ -5877,12 +5713,11 @@ const logIpcOutput = (message, verboseInfo) => {
|
|
|
5877
5713
|
verboseInfo
|
|
5878
5714
|
});
|
|
5879
5715
|
};
|
|
5880
|
-
|
|
5881
5716
|
//#endregion
|
|
5882
5717
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/ipc/buffer-messages.js
|
|
5883
5718
|
const waitForIpcOutput = async ({ subprocess, buffer: bufferArray, maxBuffer: maxBufferArray, ipc, ipcOutput, verboseInfo }) => {
|
|
5884
5719
|
if (!ipc) return ipcOutput;
|
|
5885
|
-
const isVerbose
|
|
5720
|
+
const isVerbose = shouldLogIpc(verboseInfo);
|
|
5886
5721
|
const buffer = getFdSpecificValue(bufferArray, "ipc");
|
|
5887
5722
|
const maxBuffer = getFdSpecificValue(maxBufferArray, "ipc");
|
|
5888
5723
|
for await (const message of loopOnMessages({
|
|
@@ -5897,7 +5732,7 @@ const waitForIpcOutput = async ({ subprocess, buffer: bufferArray, maxBuffer: ma
|
|
|
5897
5732
|
checkIpcMaxBuffer(subprocess, ipcOutput, maxBuffer);
|
|
5898
5733
|
ipcOutput.push(message);
|
|
5899
5734
|
}
|
|
5900
|
-
if (isVerbose
|
|
5735
|
+
if (isVerbose) logIpcOutput(message, verboseInfo);
|
|
5901
5736
|
}
|
|
5902
5737
|
return ipcOutput;
|
|
5903
5738
|
};
|
|
@@ -5905,10 +5740,9 @@ const getBufferedIpcOutput = async (ipcOutputPromise, ipcOutput) => {
|
|
|
5905
5740
|
await Promise.allSettled([ipcOutputPromise]);
|
|
5906
5741
|
return ipcOutput;
|
|
5907
5742
|
};
|
|
5908
|
-
|
|
5909
5743
|
//#endregion
|
|
5910
5744
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/resolve/wait-subprocess.js
|
|
5911
|
-
const waitForSubprocessResult = async ({ subprocess, options: { encoding, buffer, maxBuffer, lines, timeoutDuration: timeout, cancelSignal, gracefulCancel, forceKillAfterDelay, stripFinalNewline
|
|
5745
|
+
const waitForSubprocessResult = async ({ subprocess, options: { encoding, buffer, maxBuffer, lines, timeoutDuration: timeout, cancelSignal, gracefulCancel, forceKillAfterDelay, stripFinalNewline, ipc, ipcInput }, context, verboseInfo, fileDescriptors, originalStreams, onInternalError, controller }) => {
|
|
5912
5746
|
const exitPromise = waitForExit(subprocess, context);
|
|
5913
5747
|
const streamInfo = {
|
|
5914
5748
|
originalStreams,
|
|
@@ -5923,7 +5757,7 @@ const waitForSubprocessResult = async ({ subprocess, options: { encoding, buffer
|
|
|
5923
5757
|
buffer,
|
|
5924
5758
|
maxBuffer,
|
|
5925
5759
|
lines,
|
|
5926
|
-
stripFinalNewline
|
|
5760
|
+
stripFinalNewline,
|
|
5927
5761
|
verboseInfo,
|
|
5928
5762
|
streamInfo
|
|
5929
5763
|
});
|
|
@@ -5933,7 +5767,7 @@ const waitForSubprocessResult = async ({ subprocess, options: { encoding, buffer
|
|
|
5933
5767
|
buffer,
|
|
5934
5768
|
maxBuffer,
|
|
5935
5769
|
lines,
|
|
5936
|
-
stripFinalNewline
|
|
5770
|
+
stripFinalNewline,
|
|
5937
5771
|
verboseInfo,
|
|
5938
5772
|
streamInfo
|
|
5939
5773
|
});
|
|
@@ -6001,7 +5835,6 @@ const throwOnSubprocessError = async (subprocess, { signal }) => {
|
|
|
6001
5835
|
const [error] = await (0, node_events.once)(subprocess, "error", { signal });
|
|
6002
5836
|
throw error;
|
|
6003
5837
|
};
|
|
6004
|
-
|
|
6005
5838
|
//#endregion
|
|
6006
5839
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/convert/concurrent.js
|
|
6007
5840
|
const initializeConcurrentStreams = () => ({
|
|
@@ -6025,7 +5858,6 @@ const waitForConcurrentStreams = async ({ resolve, promises }, subprocess) => {
|
|
|
6025
5858
|
const [isSubprocessExit] = await Promise.race([Promise.allSettled([true, subprocess]), Promise.all([false, ...promises])]);
|
|
6026
5859
|
return !isSubprocessExit;
|
|
6027
5860
|
};
|
|
6028
|
-
|
|
6029
5861
|
//#endregion
|
|
6030
5862
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/convert/shared.js
|
|
6031
5863
|
const safeWaitForSubprocessStdin = async (subprocessStdin) => {
|
|
@@ -6062,7 +5894,6 @@ const destroyOtherStream = (stream, isOpen, error) => {
|
|
|
6062
5894
|
if (error && !isStreamAbort(error)) stream.destroy(error);
|
|
6063
5895
|
else if (isOpen) stream.destroy();
|
|
6064
5896
|
};
|
|
6065
|
-
|
|
6066
5897
|
//#endregion
|
|
6067
5898
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/convert/readable.js
|
|
6068
5899
|
const createReadable = ({ subprocess, concurrentStreams, encoding }, { from, binary: binaryOption = true, preserveNewlines = true } = {}) => {
|
|
@@ -6076,7 +5907,7 @@ const createReadable = ({ subprocess, concurrentStreams, encoding }, { from, bin
|
|
|
6076
5907
|
encoding,
|
|
6077
5908
|
preserveNewlines
|
|
6078
5909
|
});
|
|
6079
|
-
const readable
|
|
5910
|
+
const readable = new node_stream.Readable({
|
|
6080
5911
|
read,
|
|
6081
5912
|
destroy: (0, node_util.callbackify)(onReadableDestroy.bind(void 0, {
|
|
6082
5913
|
subprocessStdout,
|
|
@@ -6090,10 +5921,10 @@ const createReadable = ({ subprocess, concurrentStreams, encoding }, { from, bin
|
|
|
6090
5921
|
onStdoutFinished({
|
|
6091
5922
|
subprocessStdout,
|
|
6092
5923
|
onStdoutDataDone,
|
|
6093
|
-
readable
|
|
5924
|
+
readable,
|
|
6094
5925
|
subprocess
|
|
6095
5926
|
});
|
|
6096
|
-
return readable
|
|
5927
|
+
return readable;
|
|
6097
5928
|
};
|
|
6098
5929
|
const getSubprocessStdout = (subprocess, from, concurrentStreams) => {
|
|
6099
5930
|
const subprocessStdout = getFromStream(subprocess, from);
|
|
@@ -6128,23 +5959,23 @@ const getReadableMethods = ({ subprocessStdout, subprocess, binary, encoding, pr
|
|
|
6128
5959
|
onStdoutDataDone
|
|
6129
5960
|
};
|
|
6130
5961
|
};
|
|
6131
|
-
const onRead = async (readable
|
|
5962
|
+
const onRead = async (readable, onStdoutData, onStdoutDataDone) => {
|
|
6132
5963
|
try {
|
|
6133
5964
|
const { value, done } = await onStdoutData.next();
|
|
6134
5965
|
if (done) onStdoutDataDone.resolve();
|
|
6135
|
-
else readable
|
|
5966
|
+
else readable.push(value);
|
|
6136
5967
|
} catch {}
|
|
6137
5968
|
};
|
|
6138
|
-
const onStdoutFinished = async ({ subprocessStdout, onStdoutDataDone, readable
|
|
5969
|
+
const onStdoutFinished = async ({ subprocessStdout, onStdoutDataDone, readable, subprocess, subprocessStdin }) => {
|
|
6139
5970
|
try {
|
|
6140
5971
|
await waitForSubprocessStdout(subprocessStdout);
|
|
6141
5972
|
await subprocess;
|
|
6142
5973
|
await safeWaitForSubprocessStdin(subprocessStdin);
|
|
6143
5974
|
await onStdoutDataDone;
|
|
6144
|
-
if (readable
|
|
5975
|
+
if (readable.readable) readable.push(null);
|
|
6145
5976
|
} catch (error) {
|
|
6146
5977
|
await safeWaitForSubprocessStdin(subprocessStdin);
|
|
6147
|
-
destroyOtherReadable(readable
|
|
5978
|
+
destroyOtherReadable(readable, error);
|
|
6148
5979
|
}
|
|
6149
5980
|
};
|
|
6150
5981
|
const onReadableDestroy = async ({ subprocessStdout, subprocess, waitReadableDestroy }, error) => {
|
|
@@ -6156,12 +5987,11 @@ const onReadableDestroy = async ({ subprocessStdout, subprocess, waitReadableDes
|
|
|
6156
5987
|
const destroyOtherReadable = (stream, error) => {
|
|
6157
5988
|
destroyOtherStream(stream, stream.readable, error);
|
|
6158
5989
|
};
|
|
6159
|
-
|
|
6160
5990
|
//#endregion
|
|
6161
5991
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/convert/writable.js
|
|
6162
5992
|
const createWritable = ({ subprocess, concurrentStreams }, { to } = {}) => {
|
|
6163
5993
|
const { subprocessStdin, waitWritableFinal, waitWritableDestroy } = getSubprocessStdin(subprocess, to, concurrentStreams);
|
|
6164
|
-
const writable
|
|
5994
|
+
const writable = new node_stream.Writable({
|
|
6165
5995
|
...getWritableMethods(subprocessStdin, subprocess, waitWritableFinal),
|
|
6166
5996
|
destroy: (0, node_util.callbackify)(onWritableDestroy.bind(void 0, {
|
|
6167
5997
|
subprocessStdin,
|
|
@@ -6172,8 +6002,8 @@ const createWritable = ({ subprocess, concurrentStreams }, { to } = {}) => {
|
|
|
6172
6002
|
highWaterMark: subprocessStdin.writableHighWaterMark,
|
|
6173
6003
|
objectMode: subprocessStdin.writableObjectMode
|
|
6174
6004
|
});
|
|
6175
|
-
onStdinFinished(subprocessStdin, writable
|
|
6176
|
-
return writable
|
|
6005
|
+
onStdinFinished(subprocessStdin, writable);
|
|
6006
|
+
return writable;
|
|
6177
6007
|
};
|
|
6178
6008
|
const getSubprocessStdin = (subprocess, to, concurrentStreams) => {
|
|
6179
6009
|
const subprocessStdin = getToStream(subprocess, to);
|
|
@@ -6197,13 +6027,13 @@ const onWritableFinal = async (subprocessStdin, subprocess, waitWritableFinal) =
|
|
|
6197
6027
|
await subprocess;
|
|
6198
6028
|
}
|
|
6199
6029
|
};
|
|
6200
|
-
const onStdinFinished = async (subprocessStdin, writable
|
|
6030
|
+
const onStdinFinished = async (subprocessStdin, writable, subprocessStdout) => {
|
|
6201
6031
|
try {
|
|
6202
6032
|
await waitForSubprocessStdin(subprocessStdin);
|
|
6203
|
-
if (writable
|
|
6033
|
+
if (writable.writable) writable.end();
|
|
6204
6034
|
} catch (error) {
|
|
6205
6035
|
await safeWaitForSubprocessStdout(subprocessStdout);
|
|
6206
|
-
destroyOtherWritable(writable
|
|
6036
|
+
destroyOtherWritable(writable, error);
|
|
6207
6037
|
}
|
|
6208
6038
|
};
|
|
6209
6039
|
const onWritableDestroy = async ({ subprocessStdin, subprocess, waitWritableFinal, waitWritableDestroy }, error) => {
|
|
@@ -6216,7 +6046,6 @@ const onWritableDestroy = async ({ subprocessStdin, subprocess, waitWritableFina
|
|
|
6216
6046
|
const destroyOtherWritable = (stream, error) => {
|
|
6217
6047
|
destroyOtherStream(stream, stream.writable, error);
|
|
6218
6048
|
};
|
|
6219
|
-
|
|
6220
6049
|
//#endregion
|
|
6221
6050
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/convert/duplex.js
|
|
6222
6051
|
const createDuplex = ({ subprocess, concurrentStreams, encoding }, { from, to, binary: binaryOption = true, preserveNewlines = true } = {}) => {
|
|
@@ -6231,7 +6060,7 @@ const createDuplex = ({ subprocess, concurrentStreams, encoding }, { from, to, b
|
|
|
6231
6060
|
encoding,
|
|
6232
6061
|
preserveNewlines
|
|
6233
6062
|
});
|
|
6234
|
-
const duplex
|
|
6063
|
+
const duplex = new node_stream.Duplex({
|
|
6235
6064
|
read,
|
|
6236
6065
|
...getWritableMethods(subprocessStdin, subprocess, waitWritableFinal),
|
|
6237
6066
|
destroy: (0, node_util.callbackify)(onDuplexDestroy.bind(void 0, {
|
|
@@ -6251,12 +6080,12 @@ const createDuplex = ({ subprocess, concurrentStreams, encoding }, { from, to, b
|
|
|
6251
6080
|
onStdoutFinished({
|
|
6252
6081
|
subprocessStdout,
|
|
6253
6082
|
onStdoutDataDone,
|
|
6254
|
-
readable: duplex
|
|
6083
|
+
readable: duplex,
|
|
6255
6084
|
subprocess,
|
|
6256
6085
|
subprocessStdin
|
|
6257
6086
|
});
|
|
6258
|
-
onStdinFinished(subprocessStdin, duplex
|
|
6259
|
-
return duplex
|
|
6087
|
+
onStdinFinished(subprocessStdin, duplex, subprocessStdout);
|
|
6088
|
+
return duplex;
|
|
6260
6089
|
};
|
|
6261
6090
|
const onDuplexDestroy = async ({ subprocessStdout, subprocessStdin, subprocess, waitReadableDestroy, waitWritableFinal, waitWritableDestroy }, error) => {
|
|
6262
6091
|
await Promise.all([onReadableDestroy({
|
|
@@ -6270,7 +6099,6 @@ const onDuplexDestroy = async ({ subprocessStdout, subprocessStdin, subprocess,
|
|
|
6270
6099
|
waitWritableDestroy
|
|
6271
6100
|
}, error)]);
|
|
6272
6101
|
};
|
|
6273
|
-
|
|
6274
6102
|
//#endregion
|
|
6275
6103
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/convert/iterable.js
|
|
6276
6104
|
const createIterable = (subprocess, encoding, { from, binary: binaryOption = false, preserveNewlines = false } = {}) => {
|
|
@@ -6293,7 +6121,6 @@ const iterateOnStdoutData = async function* (onStdoutData, subprocessStdout, sub
|
|
|
6293
6121
|
await subprocess;
|
|
6294
6122
|
}
|
|
6295
6123
|
};
|
|
6296
|
-
|
|
6297
6124
|
//#endregion
|
|
6298
6125
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/convert/add.js
|
|
6299
6126
|
const addConvertedStreams = (subprocess, { encoding }) => {
|
|
@@ -6315,7 +6142,6 @@ const addConvertedStreams = (subprocess, { encoding }) => {
|
|
|
6315
6142
|
subprocess.iterable = createIterable.bind(void 0, subprocess, encoding);
|
|
6316
6143
|
subprocess[Symbol.asyncIterator] = createIterable.bind(void 0, subprocess, encoding, {});
|
|
6317
6144
|
};
|
|
6318
|
-
|
|
6319
6145
|
//#endregion
|
|
6320
6146
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/methods/promise.js
|
|
6321
6147
|
const mergePromise = (subprocess, promise) => {
|
|
@@ -6333,7 +6159,6 @@ const descriptors = [
|
|
|
6333
6159
|
"catch",
|
|
6334
6160
|
"finally"
|
|
6335
6161
|
].map((property) => [property, Reflect.getOwnPropertyDescriptor(nativePromisePrototype, property)]);
|
|
6336
|
-
|
|
6337
6162
|
//#endregion
|
|
6338
6163
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/methods/main-async.js
|
|
6339
6164
|
const execaCoreAsync = (rawFile, rawArguments, rawOptions, createNested) => {
|
|
@@ -6376,7 +6201,7 @@ const handleAsyncArguments = (rawFile, rawArguments, rawOptions) => {
|
|
|
6376
6201
|
fileDescriptors: handleStdioAsync(options, verboseInfo)
|
|
6377
6202
|
};
|
|
6378
6203
|
};
|
|
6379
|
-
const handleAsyncOptions = ({ timeout, signal
|
|
6204
|
+
const handleAsyncOptions = ({ timeout, signal, ...options }) => {
|
|
6380
6205
|
if (signal !== void 0) throw new TypeError("The \"signal\" option has been renamed to \"cancelSignal\" instead.");
|
|
6381
6206
|
return {
|
|
6382
6207
|
...options,
|
|
@@ -6486,7 +6311,6 @@ const getAsyncResult = ({ errorInfo, exitCode, signal, stdio, all, ipcOutput, co
|
|
|
6486
6311
|
options,
|
|
6487
6312
|
startTime
|
|
6488
6313
|
});
|
|
6489
|
-
|
|
6490
6314
|
//#endregion
|
|
6491
6315
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/methods/bind.js
|
|
6492
6316
|
const mergeOptions = (boundOptions, options) => {
|
|
@@ -6504,11 +6328,10 @@ const mergeOption = (optionName, boundOptionValue, optionValue) => {
|
|
|
6504
6328
|
return optionValue;
|
|
6505
6329
|
};
|
|
6506
6330
|
const DEEP_OPTIONS = new Set(["env", ...FD_SPECIFIC_OPTIONS]);
|
|
6507
|
-
|
|
6508
6331
|
//#endregion
|
|
6509
6332
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/methods/create.js
|
|
6510
6333
|
const createExeca = (mapArguments, boundOptions, deepOptions, setBoundExeca) => {
|
|
6511
|
-
const createNested = (mapArguments
|
|
6334
|
+
const createNested = (mapArguments, boundOptions, setBoundExeca) => createExeca(mapArguments, boundOptions, deepOptions, setBoundExeca);
|
|
6512
6335
|
const boundExeca = (...execaArguments) => callBoundExeca({
|
|
6513
6336
|
mapArguments,
|
|
6514
6337
|
deepOptions,
|
|
@@ -6545,7 +6368,6 @@ const parseArguments = ({ mapArguments, firstArgument, nextArguments, deepOption
|
|
|
6545
6368
|
isSync
|
|
6546
6369
|
};
|
|
6547
6370
|
};
|
|
6548
|
-
|
|
6549
6371
|
//#endregion
|
|
6550
6372
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/methods/command.js
|
|
6551
6373
|
const mapCommandAsync = ({ file, commandArguments }) => parseCommand(file, commandArguments);
|
|
@@ -6574,7 +6396,6 @@ const parseCommandString = (command) => {
|
|
|
6574
6396
|
return tokens;
|
|
6575
6397
|
};
|
|
6576
6398
|
const SPACES_REGEXP = / +/g;
|
|
6577
|
-
|
|
6578
6399
|
//#endregion
|
|
6579
6400
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/methods/script.js
|
|
6580
6401
|
const setScriptSync = (boundExeca, createNested, boundOptions) => {
|
|
@@ -6592,17 +6413,49 @@ const getScriptOptions = (options) => ({ options: {
|
|
|
6592
6413
|
} });
|
|
6593
6414
|
const getScriptStdinOption = ({ input, inputFile, stdio }) => input === void 0 && inputFile === void 0 && stdio === void 0 ? { stdin: "inherit" } : {};
|
|
6594
6415
|
const deepScriptOptions = { preferLocal: true };
|
|
6595
|
-
|
|
6596
6416
|
//#endregion
|
|
6597
6417
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/index.js
|
|
6598
6418
|
const execa = createExeca(() => ({}));
|
|
6599
|
-
|
|
6600
|
-
|
|
6601
|
-
|
|
6602
|
-
|
|
6603
|
-
|
|
6419
|
+
createExeca(() => ({ isSync: true }));
|
|
6420
|
+
createExeca(mapCommandAsync);
|
|
6421
|
+
createExeca(mapCommandSync);
|
|
6422
|
+
createExeca(mapNode);
|
|
6423
|
+
createExeca(mapScriptAsync, {}, deepScriptOptions, setScriptSync);
|
|
6604
6424
|
const { sendMessage, getOneMessage, getEachMessage, getCancelSignal } = getIpcExport();
|
|
6605
|
-
|
|
6425
|
+
//#endregion
|
|
6426
|
+
//#region iac/prepareTemplate.ts
|
|
6427
|
+
const ensureExists = async (targetPath, description) => {
|
|
6428
|
+
try {
|
|
6429
|
+
await node_fs_promises.default.access(targetPath);
|
|
6430
|
+
} catch {
|
|
6431
|
+
throw new Error(`Missing Firebase ${description} at ${targetPath}`);
|
|
6432
|
+
}
|
|
6433
|
+
};
|
|
6434
|
+
const normalizeFunctionsPackage = async (functionsDir) => {
|
|
6435
|
+
const templatePackagePath = node_path.default.join(functionsDir, "_package.json");
|
|
6436
|
+
const packageJsonPath = node_path.default.join(functionsDir, "package.json");
|
|
6437
|
+
try {
|
|
6438
|
+
await node_fs_promises.default.rename(templatePackagePath, packageJsonPath);
|
|
6439
|
+
} catch (error) {
|
|
6440
|
+
if (error.code !== "ENOENT") throw error;
|
|
6441
|
+
await ensureExists(packageJsonPath, "functions package.json");
|
|
6442
|
+
}
|
|
6443
|
+
};
|
|
6444
|
+
const prepareFirebaseTemplate = async (firebaseRootDir) => {
|
|
6445
|
+
const publicDir = node_path.default.join(firebaseRootDir, "public");
|
|
6446
|
+
const builtFunctionsDir = node_path.default.join(firebaseRootDir, "functions");
|
|
6447
|
+
await ensureExists(publicDir, "public template directory");
|
|
6448
|
+
await ensureExists(builtFunctionsDir, "functions build directory");
|
|
6449
|
+
const { tmpDir, removeTmpDir } = await (0, _hot_updater_cli_tools.copyDirToTmp)(publicDir);
|
|
6450
|
+
const functionsDir = node_path.default.join(tmpDir, "functions");
|
|
6451
|
+
await node_fs_promises.default.cp(builtFunctionsDir, functionsDir, { recursive: true });
|
|
6452
|
+
await normalizeFunctionsPackage(functionsDir);
|
|
6453
|
+
return {
|
|
6454
|
+
tmpDir,
|
|
6455
|
+
removeTmpDir,
|
|
6456
|
+
functionsDir
|
|
6457
|
+
};
|
|
6458
|
+
};
|
|
6606
6459
|
//#endregion
|
|
6607
6460
|
//#region iac/select.ts
|
|
6608
6461
|
const getConfigTemplate = (build) => {
|
|
@@ -6633,13 +6486,13 @@ const getConfigTemplate = (build) => {
|
|
|
6633
6486
|
// Set the GOOGLE_APPLICATION_CREDENTIALS environment variable to your credentials file path
|
|
6634
6487
|
// Example: GOOGLE_APPLICATION_CREDENTIALS=./firebase-adminsdk-credentials.json
|
|
6635
6488
|
const credential = admin.credential.applicationDefault();`.trim();
|
|
6636
|
-
return new
|
|
6489
|
+
return new _hot_updater_cli_tools.ConfigBuilder().setBuildType(build).setStorage(storageConfig).setDatabase(databaseConfig).addImport({
|
|
6637
6490
|
pkg: "firebase-admin",
|
|
6638
6491
|
defaultOrNamespace: "admin"
|
|
6639
6492
|
}).setIntermediateCode(intermediate).getResult();
|
|
6640
6493
|
};
|
|
6641
6494
|
const setEnv = async ({ projectId, storageBucket, build }) => {
|
|
6642
|
-
await (0,
|
|
6495
|
+
await (0, _hot_updater_cli_tools.makeEnv)({
|
|
6643
6496
|
GOOGLE_APPLICATION_CREDENTIALS: {
|
|
6644
6497
|
comment: "Project Settings > Service Accounts > New Private Key > Download JSON",
|
|
6645
6498
|
value: "your-credentials.json"
|
|
@@ -6647,17 +6500,17 @@ const setEnv = async ({ projectId, storageBucket, build }) => {
|
|
|
6647
6500
|
HOT_UPDATER_FIREBASE_PROJECT_ID: projectId,
|
|
6648
6501
|
HOT_UPDATER_FIREBASE_STORAGE_BUCKET: storageBucket
|
|
6649
6502
|
});
|
|
6650
|
-
|
|
6503
|
+
_hot_updater_cli_tools.p.log.success("Firebase credentials have been successfully configured.");
|
|
6651
6504
|
try {
|
|
6652
6505
|
await fs.default.promises.writeFile("hot-updater.config.ts", getConfigTemplate(build));
|
|
6653
|
-
|
|
6506
|
+
_hot_updater_cli_tools.p.log.success("Configuration file 'hot-updater.config.ts' has been created.");
|
|
6654
6507
|
} catch (error) {
|
|
6655
6508
|
console.error("Error writing configuration file:", error.message);
|
|
6656
6509
|
}
|
|
6657
6510
|
};
|
|
6658
6511
|
const handleError = (err) => {
|
|
6659
|
-
if (err instanceof ExecaError)
|
|
6660
|
-
else if (err instanceof Error)
|
|
6512
|
+
if (err instanceof ExecaError) _hot_updater_cli_tools.p.log.error(err.stderr || err.stdout || err.message);
|
|
6513
|
+
else if (err instanceof Error) _hot_updater_cli_tools.p.log.error(`Error occurred: ${err.message}`);
|
|
6661
6514
|
process.exit(1);
|
|
6662
6515
|
};
|
|
6663
6516
|
const listProjects = async () => {
|
|
@@ -6696,24 +6549,24 @@ const initFirebaseUser = async (cwd) => {
|
|
|
6696
6549
|
}
|
|
6697
6550
|
const projects = await listProjects();
|
|
6698
6551
|
const createKey = `create/${Math.random().toString(36).substring(2, 15)}`;
|
|
6699
|
-
const projectId = await
|
|
6552
|
+
const projectId = await _hot_updater_cli_tools.p.select({
|
|
6700
6553
|
message: "Select a Firebase project",
|
|
6701
|
-
options: [...projects.map((project
|
|
6702
|
-
label: project
|
|
6703
|
-
value: project
|
|
6554
|
+
options: [...projects.map((project) => ({
|
|
6555
|
+
label: project.displayName,
|
|
6556
|
+
value: project.projectId
|
|
6704
6557
|
})), {
|
|
6705
6558
|
value: createKey,
|
|
6706
6559
|
label: "Create new Firebase project"
|
|
6707
6560
|
}]
|
|
6708
6561
|
});
|
|
6709
|
-
if (
|
|
6710
|
-
|
|
6562
|
+
if (_hot_updater_cli_tools.p.isCancel(projectId)) {
|
|
6563
|
+
_hot_updater_cli_tools.p.log.error("Project ID is required");
|
|
6711
6564
|
process.exit(1);
|
|
6712
6565
|
}
|
|
6713
6566
|
if (projectId === createKey) {
|
|
6714
|
-
const newProjectId = await
|
|
6715
|
-
if (
|
|
6716
|
-
|
|
6567
|
+
const newProjectId = await _hot_updater_cli_tools.p.text({ message: "Enter the Firebase project ID:" });
|
|
6568
|
+
if (_hot_updater_cli_tools.p.isCancel(newProjectId)) {
|
|
6569
|
+
_hot_updater_cli_tools.p.log.error("Project ID is required");
|
|
6717
6570
|
process.exit(1);
|
|
6718
6571
|
}
|
|
6719
6572
|
try {
|
|
@@ -6725,16 +6578,16 @@ const initFirebaseUser = async (cwd) => {
|
|
|
6725
6578
|
stdio: "inherit",
|
|
6726
6579
|
shell: true
|
|
6727
6580
|
});
|
|
6728
|
-
|
|
6729
|
-
|
|
6730
|
-
|
|
6731
|
-
|
|
6581
|
+
_hot_updater_cli_tools.p.log.success("Firebase project created successfully");
|
|
6582
|
+
_hot_updater_cli_tools.p.log.step("Please Go to the following links to enable Firestore and Storage and Billing");
|
|
6583
|
+
_hot_updater_cli_tools.p.log.step((0, _hot_updater_cli_tools.link)(`https://console.firebase.google.com/project/${newProjectId}/firestore`));
|
|
6584
|
+
_hot_updater_cli_tools.p.log.step((0, _hot_updater_cli_tools.link)(`https://console.firebase.google.com/project/${newProjectId}/storage`));
|
|
6732
6585
|
} catch (err) {
|
|
6733
6586
|
handleError(err);
|
|
6734
6587
|
}
|
|
6735
6588
|
process.exit(0);
|
|
6736
6589
|
}
|
|
6737
|
-
await
|
|
6590
|
+
await _hot_updater_cli_tools.p.tasks([{
|
|
6738
6591
|
title: `Select Firebase project (${projectId})...`,
|
|
6739
6592
|
task: async () => {
|
|
6740
6593
|
try {
|
|
@@ -6748,8 +6601,8 @@ const initFirebaseUser = async (cwd) => {
|
|
|
6748
6601
|
shell: true
|
|
6749
6602
|
});
|
|
6750
6603
|
} catch (error) {
|
|
6751
|
-
if (error instanceof ExecaError)
|
|
6752
|
-
else if (error instanceof Error)
|
|
6604
|
+
if (error instanceof ExecaError) _hot_updater_cli_tools.p.log.error(error.stderr || error.stdout || error.message);
|
|
6605
|
+
else if (error instanceof Error) _hot_updater_cli_tools.p.log.error(error.message);
|
|
6753
6606
|
process.exit(1);
|
|
6754
6607
|
}
|
|
6755
6608
|
}
|
|
@@ -6766,17 +6619,17 @@ const initFirebaseUser = async (cwd) => {
|
|
|
6766
6619
|
input: "N\n"
|
|
6767
6620
|
});
|
|
6768
6621
|
if (JSON.parse(databases.stdout).length === 0) {
|
|
6769
|
-
|
|
6770
|
-
|
|
6771
|
-
|
|
6772
|
-
|
|
6622
|
+
_hot_updater_cli_tools.p.log.warning("Firestore Database not found");
|
|
6623
|
+
_hot_updater_cli_tools.p.log.step("Please enable Firestore in the Firebase Console:");
|
|
6624
|
+
_hot_updater_cli_tools.p.log.step((0, _hot_updater_cli_tools.link)(`https://console.firebase.google.com/project/${projectId}/firestore`));
|
|
6625
|
+
_hot_updater_cli_tools.p.log.step("After enabling Firestore, please run 'npx hot-updater init' again.");
|
|
6773
6626
|
process.exit(1);
|
|
6774
6627
|
}
|
|
6775
6628
|
} catch (err) {
|
|
6776
6629
|
handleError(err);
|
|
6777
6630
|
}
|
|
6778
6631
|
let storageBucket = null;
|
|
6779
|
-
await
|
|
6632
|
+
await _hot_updater_cli_tools.p.tasks([{
|
|
6780
6633
|
title: "Getting storage bucket...",
|
|
6781
6634
|
task: async () => {
|
|
6782
6635
|
const buckets = await execa("gcloud", [
|
|
@@ -6788,16 +6641,16 @@ const initFirebaseUser = async (cwd) => {
|
|
|
6788
6641
|
], { shell: true });
|
|
6789
6642
|
storageBucket = JSON.parse(buckets.stdout).find((bucket) => bucket.name === `${projectId}.firebasestorage.app` || bucket.name === `${projectId}.appspot.com`)?.name;
|
|
6790
6643
|
if (!storageBucket) {
|
|
6791
|
-
|
|
6792
|
-
|
|
6793
|
-
|
|
6644
|
+
_hot_updater_cli_tools.p.log.error("Storage Bucket not found");
|
|
6645
|
+
_hot_updater_cli_tools.p.log.step("Please Go to the following links to enable Firestore and Storage and Billing");
|
|
6646
|
+
_hot_updater_cli_tools.p.log.step((0, _hot_updater_cli_tools.link)(`https://console.firebase.google.com/project/${projectId}/firestore`));
|
|
6794
6647
|
process.exit(1);
|
|
6795
6648
|
}
|
|
6796
6649
|
return `Storage Bucket: ${storageBucket}`;
|
|
6797
6650
|
}
|
|
6798
6651
|
}]);
|
|
6799
6652
|
if (!storageBucket) {
|
|
6800
|
-
|
|
6653
|
+
_hot_updater_cli_tools.p.log.error("Storage Bucket not found");
|
|
6801
6654
|
process.exit(1);
|
|
6802
6655
|
}
|
|
6803
6656
|
const project = await execa("gcloud", [
|
|
@@ -6809,7 +6662,7 @@ const initFirebaseUser = async (cwd) => {
|
|
|
6809
6662
|
const projectJson = JSON.parse(project.stdout);
|
|
6810
6663
|
const projectNumber = Number(projectJson.projectNumber);
|
|
6811
6664
|
if (Number.isNaN(projectNumber)) {
|
|
6812
|
-
|
|
6665
|
+
_hot_updater_cli_tools.p.log.error("Project Number not found");
|
|
6813
6666
|
process.exit(1);
|
|
6814
6667
|
}
|
|
6815
6668
|
return {
|
|
@@ -6818,7 +6671,6 @@ const initFirebaseUser = async (cwd) => {
|
|
|
6818
6671
|
projectId
|
|
6819
6672
|
};
|
|
6820
6673
|
};
|
|
6821
|
-
|
|
6822
6674
|
//#endregion
|
|
6823
6675
|
//#region iac/index.ts
|
|
6824
6676
|
const SOURCE_TEMPLATE = `// add this to your App.tsx
|
|
@@ -6915,6 +6767,26 @@ const REGIONS = [
|
|
|
6915
6767
|
label: "Australia Southeast (Sydney)"
|
|
6916
6768
|
}
|
|
6917
6769
|
];
|
|
6770
|
+
const getFirebaseRuntimePackageInfo = () => {
|
|
6771
|
+
const firebasePackageRoot = path.default.dirname(require.resolve("@hot-updater/firebase/package.json"));
|
|
6772
|
+
return {
|
|
6773
|
+
currentPackageVersion: (0, _hot_updater_cli_tools.resolvePackageVersion)("@hot-updater/firebase"),
|
|
6774
|
+
serverPackageVersion: (0, _hot_updater_cli_tools.resolveHotUpdaterServerVersion)("@hot-updater/firebase"),
|
|
6775
|
+
honoVersion: (0, _hot_updater_cli_tools.resolvePackageVersion)("hono", { searchFrom: firebasePackageRoot })
|
|
6776
|
+
};
|
|
6777
|
+
};
|
|
6778
|
+
const syncFunctionsPackageJson = async (functionsDir) => {
|
|
6779
|
+
const runtimePackageInfo = getFirebaseRuntimePackageInfo();
|
|
6780
|
+
const packageJsonPath = path.default.join(functionsDir, "package.json");
|
|
6781
|
+
const packageJson = JSON.parse(await fs.default.promises.readFile(packageJsonPath, "utf-8"));
|
|
6782
|
+
packageJson.dependencies = {
|
|
6783
|
+
...packageJson.dependencies ?? {},
|
|
6784
|
+
"@hot-updater/server": runtimePackageInfo.serverPackageVersion,
|
|
6785
|
+
hono: runtimePackageInfo.honoVersion
|
|
6786
|
+
};
|
|
6787
|
+
await fs.default.promises.writeFile(packageJsonPath, `${JSON.stringify(packageJson, null, 2)}\n`);
|
|
6788
|
+
return runtimePackageInfo;
|
|
6789
|
+
};
|
|
6918
6790
|
function normalizeIndex(index) {
|
|
6919
6791
|
return {
|
|
6920
6792
|
collectionGroup: index.collectionGroup,
|
|
@@ -6924,7 +6796,7 @@ function normalizeIndex(index) {
|
|
|
6924
6796
|
}
|
|
6925
6797
|
const mergeIndexes = (originalIndexes, newIndexes) => {
|
|
6926
6798
|
return {
|
|
6927
|
-
indexes: uniqWith(originalIndexes.indexes.concat(newIndexes.indexes), (a
|
|
6799
|
+
indexes: uniqWith(originalIndexes.indexes.concat(newIndexes.indexes), (a, b) => isEqual(normalizeIndex(a), normalizeIndex(b))),
|
|
6928
6800
|
fieldOverrides: merge(originalIndexes.fieldOverrides, newIndexes.fieldOverrides)
|
|
6929
6801
|
};
|
|
6930
6802
|
};
|
|
@@ -6958,8 +6830,8 @@ const deployFirestore = async (cwd) => {
|
|
|
6958
6830
|
shell: true
|
|
6959
6831
|
});
|
|
6960
6832
|
} catch (e) {
|
|
6961
|
-
if (e instanceof ExecaError)
|
|
6962
|
-
else if (e instanceof Error)
|
|
6833
|
+
if (e instanceof ExecaError) _hot_updater_cli_tools.p.log.error(e.stderr || e.stdout || e.message);
|
|
6834
|
+
else if (e instanceof Error) _hot_updater_cli_tools.p.log.error(e.message);
|
|
6963
6835
|
process.exit(1);
|
|
6964
6836
|
}
|
|
6965
6837
|
};
|
|
@@ -6976,8 +6848,8 @@ const deployFunctions = async (cwd) => {
|
|
|
6976
6848
|
shell: true
|
|
6977
6849
|
});
|
|
6978
6850
|
} catch (e) {
|
|
6979
|
-
if (e instanceof ExecaError)
|
|
6980
|
-
else if (e instanceof Error)
|
|
6851
|
+
if (e instanceof ExecaError) _hot_updater_cli_tools.p.log.error(e.stderr || e.stdout || e.message);
|
|
6852
|
+
else if (e instanceof Error) _hot_updater_cli_tools.p.log.error(e.message);
|
|
6981
6853
|
process.exit(1);
|
|
6982
6854
|
}
|
|
6983
6855
|
};
|
|
@@ -6995,10 +6867,10 @@ const printTemplate = async (projectId, region) => {
|
|
|
6995
6867
|
], { shell: true });
|
|
6996
6868
|
const parsedData = JSON.parse(stdout);
|
|
6997
6869
|
const functionUrl = `${parsedData?.serviceConfig?.uri ?? parsedData.url}/api/check-update`;
|
|
6998
|
-
|
|
6870
|
+
_hot_updater_cli_tools.p.note((0, _hot_updater_cli_tools.transformTemplate)(SOURCE_TEMPLATE, { source: functionUrl }));
|
|
6999
6871
|
} catch (error) {
|
|
7000
|
-
if (error instanceof ExecaError)
|
|
7001
|
-
else if (error instanceof Error)
|
|
6872
|
+
if (error instanceof ExecaError) _hot_updater_cli_tools.p.log.error(error.stderr || error.stdout || error.message);
|
|
6873
|
+
else if (error instanceof Error) _hot_updater_cli_tools.p.log.error(error.message);
|
|
7002
6874
|
process.exit(1);
|
|
7003
6875
|
}
|
|
7004
6876
|
};
|
|
@@ -7012,15 +6884,14 @@ const checkIfGcloudCliInstalled = async () => {
|
|
|
7012
6884
|
};
|
|
7013
6885
|
const runInit = async ({ build }) => {
|
|
7014
6886
|
if (!await checkIfGcloudCliInstalled()) {
|
|
7015
|
-
|
|
7016
|
-
|
|
7017
|
-
|
|
6887
|
+
_hot_updater_cli_tools.p.log.error("gcloud CLI is not installed");
|
|
6888
|
+
_hot_updater_cli_tools.p.log.step("Please go to the following link to install the gcloud CLI");
|
|
6889
|
+
_hot_updater_cli_tools.p.log.step((0, _hot_updater_cli_tools.link)("https://cloud.google.com/sdk/docs/install"));
|
|
7018
6890
|
process.exit(1);
|
|
7019
6891
|
}
|
|
7020
|
-
const { tmpDir, removeTmpDir } = await (
|
|
7021
|
-
const functionsDir = path.default.join(tmpDir, "functions");
|
|
6892
|
+
const { tmpDir, removeTmpDir, functionsDir } = await prepareFirebaseTemplate(path.default.dirname(path.default.dirname(require.resolve("@hot-updater/firebase/functions"))));
|
|
7022
6893
|
const functionsIndexPath = path.default.join(functionsDir, "index.cjs");
|
|
7023
|
-
|
|
6894
|
+
const runtimePackageInfo = await syncFunctionsPackageJson(functionsDir);
|
|
7024
6895
|
const initializeVariable = await initFirebaseUser(tmpDir);
|
|
7025
6896
|
let currentRegion;
|
|
7026
6897
|
await setEnv({
|
|
@@ -7028,7 +6899,8 @@ const runInit = async ({ build }) => {
|
|
|
7028
6899
|
storageBucket: initializeVariable.storageBucket,
|
|
7029
6900
|
build
|
|
7030
6901
|
});
|
|
7031
|
-
|
|
6902
|
+
if (runtimePackageInfo.serverPackageVersion !== runtimePackageInfo.currentPackageVersion) _hot_updater_cli_tools.p.note(`Using ${_hot_updater_cli_tools.HOT_UPDATER_SERVER_PACKAGE_VERSION_ENV}=${runtimePackageInfo.serverPackageVersion} for Firebase functions deploy.`);
|
|
6903
|
+
await _hot_updater_cli_tools.p.tasks([{
|
|
7032
6904
|
title: "Installing dependencies...",
|
|
7033
6905
|
task: async () => {
|
|
7034
6906
|
try {
|
|
@@ -7038,8 +6910,8 @@ const runInit = async ({ build }) => {
|
|
|
7038
6910
|
});
|
|
7039
6911
|
return "Installed dependencies";
|
|
7040
6912
|
} catch (error) {
|
|
7041
|
-
if (error instanceof ExecaError)
|
|
7042
|
-
else if (error instanceof Error)
|
|
6913
|
+
if (error instanceof ExecaError) _hot_updater_cli_tools.p.log.error(error.stderr || error.stdout || error.message);
|
|
6914
|
+
else if (error instanceof Error) _hot_updater_cli_tools.p.log.error(error.message);
|
|
7043
6915
|
process.exit(1);
|
|
7044
6916
|
}
|
|
7045
6917
|
}
|
|
@@ -7063,30 +6935,30 @@ const runInit = async ({ build }) => {
|
|
|
7063
6935
|
}
|
|
7064
6936
|
} catch {}
|
|
7065
6937
|
if (!isFunctionsExist) {
|
|
7066
|
-
const selectedRegion = await
|
|
6938
|
+
const selectedRegion = await _hot_updater_cli_tools.p.select({
|
|
7067
6939
|
message: "Select Region",
|
|
7068
6940
|
options: REGIONS,
|
|
7069
6941
|
initialValue: REGIONS[0].value
|
|
7070
6942
|
});
|
|
7071
|
-
if (
|
|
7072
|
-
|
|
6943
|
+
if (_hot_updater_cli_tools.p.isCancel(selectedRegion)) {
|
|
6944
|
+
_hot_updater_cli_tools.p.cancel("Operation cancelled.");
|
|
7073
6945
|
process.exit(1);
|
|
7074
6946
|
}
|
|
7075
6947
|
currentRegion = selectedRegion;
|
|
7076
6948
|
}
|
|
7077
6949
|
if (!currentRegion) {
|
|
7078
|
-
|
|
6950
|
+
_hot_updater_cli_tools.p.log.error("Region is not set");
|
|
7079
6951
|
await removeTmpDir();
|
|
7080
6952
|
process.exit(1);
|
|
7081
6953
|
}
|
|
7082
|
-
const code = (0,
|
|
6954
|
+
const code = (0, _hot_updater_cli_tools.transformEnv)(functionsIndexPath, { REGION: currentRegion });
|
|
7083
6955
|
await fs.default.promises.writeFile(functionsIndexPath, code);
|
|
7084
6956
|
return `Using ${isFunctionsExist ? "existing" : "new"} functions in region: ${currentRegion}`;
|
|
7085
6957
|
}
|
|
7086
6958
|
}]);
|
|
7087
6959
|
await deployFirestore(tmpDir);
|
|
7088
6960
|
await deployFunctions(tmpDir);
|
|
7089
|
-
await
|
|
6961
|
+
await _hot_updater_cli_tools.p.tasks([{
|
|
7090
6962
|
title: "Check IAM policy",
|
|
7091
6963
|
async task(message) {
|
|
7092
6964
|
const functionsList = await execa("npx", [
|
|
@@ -7099,7 +6971,7 @@ const runInit = async ({ build }) => {
|
|
|
7099
6971
|
});
|
|
7100
6972
|
const account = (JSON.parse(functionsList.stdout).result || []).find((fn) => fn.id === "hot-updater")?.serviceAccount;
|
|
7101
6973
|
if (!account) {
|
|
7102
|
-
|
|
6974
|
+
_hot_updater_cli_tools.p.log.error("hot-updater function not found");
|
|
7103
6975
|
await removeTmpDir();
|
|
7104
6976
|
process.exit(1);
|
|
7105
6977
|
}
|
|
@@ -7121,10 +6993,10 @@ const runInit = async ({ build }) => {
|
|
|
7121
6993
|
stdio: "inherit",
|
|
7122
6994
|
shell: true
|
|
7123
6995
|
});
|
|
7124
|
-
|
|
6996
|
+
_hot_updater_cli_tools.p.log.success("IAM Service Account Token Creator role has been added to the service account");
|
|
7125
6997
|
} catch {
|
|
7126
|
-
|
|
7127
|
-
|
|
6998
|
+
_hot_updater_cli_tools.p.log.error("Please go to the following link to add the IAM Service Account Token Creator role to the service account");
|
|
6999
|
+
_hot_updater_cli_tools.p.log.step((0, _hot_updater_cli_tools.link)(`https://console.cloud.google.com/iam-admin/iam/project/${initializeVariable.projectId}/serviceaccounts/${account}/edit?inv=1`));
|
|
7128
7000
|
await removeTmpDir();
|
|
7129
7001
|
process.exit(1);
|
|
7130
7002
|
}
|
|
@@ -7132,16 +7004,15 @@ const runInit = async ({ build }) => {
|
|
|
7132
7004
|
}
|
|
7133
7005
|
}]);
|
|
7134
7006
|
if (!currentRegion) {
|
|
7135
|
-
|
|
7007
|
+
_hot_updater_cli_tools.p.log.error("Region is not set");
|
|
7136
7008
|
await removeTmpDir();
|
|
7137
7009
|
process.exit(1);
|
|
7138
7010
|
}
|
|
7139
7011
|
await printTemplate(initializeVariable.projectId, currentRegion);
|
|
7140
7012
|
await removeTmpDir();
|
|
7141
|
-
|
|
7142
|
-
|
|
7143
|
-
|
|
7013
|
+
_hot_updater_cli_tools.p.log.message(`Next step: ${(0, _hot_updater_cli_tools.link)("https://hot-updater.dev/docs/managed/firebase#step-3-generated-configurations")}`);
|
|
7014
|
+
_hot_updater_cli_tools.p.log.message("Next step: Change GOOGLE_APPLICATION_CREDENTIALS=your-credentials.json in .env file");
|
|
7015
|
+
_hot_updater_cli_tools.p.log.success("Done! 🎉");
|
|
7144
7016
|
};
|
|
7145
|
-
|
|
7146
7017
|
//#endregion
|
|
7147
|
-
exports.runInit = runInit;
|
|
7018
|
+
exports.runInit = runInit;
|