@hot-updater/firebase 0.28.0 → 0.29.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/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
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { createRequire } from "node:module";
|
|
2
|
-
import { ConfigBuilder, copyDirToTmp, link, makeEnv, p, transformEnv, transformTemplate } from "@hot-updater/cli-tools";
|
|
2
|
+
import { ConfigBuilder, HOT_UPDATER_SERVER_PACKAGE_VERSION_ENV, copyDirToTmp, link, makeEnv, p, resolveHotUpdaterServerVersion, resolvePackageVersion, transformEnv, transformTemplate } from "@hot-updater/cli-tools";
|
|
3
3
|
import { fileURLToPath } from "node:url";
|
|
4
4
|
import { ChildProcess, execFile, spawn, spawnSync } from "node:child_process";
|
|
5
5
|
import { StringDecoder } from "node:string_decoder";
|
|
@@ -17,20 +17,18 @@ import { appendFileSync, createReadStream, createWriteStream, readFileSync, stat
|
|
|
17
17
|
import { finished } from "node:stream/promises";
|
|
18
18
|
import { Duplex, PassThrough, Readable, Transform, Writable, getDefaultHighWaterMark } from "node:stream";
|
|
19
19
|
import { Buffer as Buffer$1 } from "node:buffer";
|
|
20
|
-
|
|
21
|
-
//#region
|
|
20
|
+
import fs$1 from "node:fs/promises";
|
|
21
|
+
//#region \0rolldown/runtime.js
|
|
22
22
|
var __create = Object.create;
|
|
23
23
|
var __defProp = Object.defineProperty;
|
|
24
24
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
25
25
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
26
26
|
var __getProtoOf = Object.getPrototypeOf;
|
|
27
27
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
28
|
-
var
|
|
29
|
-
return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
|
|
30
|
-
};
|
|
28
|
+
var __commonJSMin = (cb, mod) => () => (mod || cb((mod = { exports: {} }).exports, mod), mod.exports);
|
|
31
29
|
var __copyProps = (to, from, except, desc) => {
|
|
32
|
-
if (from && typeof from === "object" || typeof from === "function") for (var keys = __getOwnPropNames(from), i
|
|
33
|
-
key = keys[i
|
|
30
|
+
if (from && typeof from === "object" || typeof from === "function") for (var keys = __getOwnPropNames(from), i = 0, n = keys.length, key; i < n; i++) {
|
|
31
|
+
key = keys[i];
|
|
34
32
|
if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
|
|
35
33
|
get: ((k) => from[k]).bind(null, key),
|
|
36
34
|
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
@@ -43,72 +41,63 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
43
41
|
enumerable: true
|
|
44
42
|
}) : target, mod));
|
|
45
43
|
var __require = /* @__PURE__ */ createRequire(import.meta.url);
|
|
46
|
-
|
|
47
44
|
//#endregion
|
|
48
45
|
//#region ../../node_modules/.pnpm/es-toolkit@1.32.0/node_modules/es-toolkit/dist/_internal/compareValues.mjs
|
|
49
|
-
function compareValues(a
|
|
50
|
-
if (a
|
|
51
|
-
if (a
|
|
46
|
+
function compareValues(a, b, order) {
|
|
47
|
+
if (a < b) return order === "asc" ? -1 : 1;
|
|
48
|
+
if (a > b) return order === "asc" ? 1 : -1;
|
|
52
49
|
return 0;
|
|
53
50
|
}
|
|
54
|
-
|
|
55
51
|
//#endregion
|
|
56
52
|
//#region ../../node_modules/.pnpm/es-toolkit@1.32.0/node_modules/es-toolkit/dist/array/orderBy.mjs
|
|
57
53
|
function orderBy(arr, criteria, orders) {
|
|
58
|
-
return arr.slice().sort((a
|
|
54
|
+
return arr.slice().sort((a, b) => {
|
|
59
55
|
const ordersLength = orders.length;
|
|
60
|
-
for (let i
|
|
61
|
-
const order = ordersLength > i
|
|
62
|
-
const criterion = criteria[i
|
|
56
|
+
for (let i = 0; i < criteria.length; i++) {
|
|
57
|
+
const order = ordersLength > i ? orders[i] : orders[ordersLength - 1];
|
|
58
|
+
const criterion = criteria[i];
|
|
63
59
|
const criterionIsFunction = typeof criterion === "function";
|
|
64
|
-
const result = compareValues(criterionIsFunction ? criterion(a
|
|
60
|
+
const result = compareValues(criterionIsFunction ? criterion(a) : a[criterion], criterionIsFunction ? criterion(b) : b[criterion], order);
|
|
65
61
|
if (result !== 0) return result;
|
|
66
62
|
}
|
|
67
63
|
return 0;
|
|
68
64
|
});
|
|
69
65
|
}
|
|
70
|
-
|
|
71
66
|
//#endregion
|
|
72
67
|
//#region ../../node_modules/.pnpm/es-toolkit@1.32.0/node_modules/es-toolkit/dist/array/sortBy.mjs
|
|
73
68
|
function sortBy(arr, criteria) {
|
|
74
69
|
return orderBy(arr, criteria, ["asc"]);
|
|
75
70
|
}
|
|
76
|
-
|
|
77
71
|
//#endregion
|
|
78
72
|
//#region ../../node_modules/.pnpm/es-toolkit@1.32.0/node_modules/es-toolkit/dist/array/uniqWith.mjs
|
|
79
73
|
function uniqWith(arr, areItemsEqual) {
|
|
80
74
|
const result = [];
|
|
81
|
-
for (let i
|
|
82
|
-
const item = arr[i
|
|
75
|
+
for (let i = 0; i < arr.length; i++) {
|
|
76
|
+
const item = arr[i];
|
|
83
77
|
if (result.every((v) => !areItemsEqual(v, item))) result.push(item);
|
|
84
78
|
}
|
|
85
79
|
return result;
|
|
86
80
|
}
|
|
87
|
-
|
|
88
81
|
//#endregion
|
|
89
82
|
//#region ../../node_modules/.pnpm/es-toolkit@1.32.0/node_modules/es-toolkit/dist/function/noop.mjs
|
|
90
83
|
function noop$2() {}
|
|
91
|
-
|
|
92
84
|
//#endregion
|
|
93
85
|
//#region ../../node_modules/.pnpm/es-toolkit@1.32.0/node_modules/es-toolkit/dist/compat/_internal/getSymbols.mjs
|
|
94
86
|
function getSymbols(object) {
|
|
95
87
|
return Object.getOwnPropertySymbols(object).filter((symbol) => Object.prototype.propertyIsEnumerable.call(object, symbol));
|
|
96
88
|
}
|
|
97
|
-
|
|
98
89
|
//#endregion
|
|
99
90
|
//#region ../../node_modules/.pnpm/es-toolkit@1.32.0/node_modules/es-toolkit/dist/compat/_internal/getTag.mjs
|
|
100
91
|
function getTag(value) {
|
|
101
92
|
if (value == null) return value === void 0 ? "[object Undefined]" : "[object Null]";
|
|
102
93
|
return Object.prototype.toString.call(value);
|
|
103
94
|
}
|
|
104
|
-
|
|
105
95
|
//#endregion
|
|
106
96
|
//#region ../../node_modules/.pnpm/es-toolkit@1.32.0/node_modules/es-toolkit/dist/compat/_internal/tags.mjs
|
|
107
97
|
const regexpTag = "[object RegExp]";
|
|
108
98
|
const stringTag = "[object String]";
|
|
109
99
|
const numberTag = "[object Number]";
|
|
110
100
|
const booleanTag = "[object Boolean]";
|
|
111
|
-
const argumentsTag = "[object Arguments]";
|
|
112
101
|
const symbolTag = "[object Symbol]";
|
|
113
102
|
const dateTag = "[object Date]";
|
|
114
103
|
const mapTag = "[object Map]";
|
|
@@ -130,7 +119,6 @@ const int32ArrayTag = "[object Int32Array]";
|
|
|
130
119
|
const bigInt64ArrayTag = "[object BigInt64Array]";
|
|
131
120
|
const float32ArrayTag = "[object Float32Array]";
|
|
132
121
|
const float64ArrayTag = "[object Float64Array]";
|
|
133
|
-
|
|
134
122
|
//#endregion
|
|
135
123
|
//#region ../../node_modules/.pnpm/es-toolkit@1.32.0/node_modules/es-toolkit/dist/predicate/isPlainObject.mjs
|
|
136
124
|
function isPlainObject$1(value) {
|
|
@@ -139,13 +127,12 @@ function isPlainObject$1(value) {
|
|
|
139
127
|
if (!(proto === null || proto === Object.prototype || Object.getPrototypeOf(proto) === null)) return false;
|
|
140
128
|
return Object.prototype.toString.call(value) === "[object Object]";
|
|
141
129
|
}
|
|
142
|
-
|
|
143
130
|
//#endregion
|
|
144
131
|
//#region ../../node_modules/.pnpm/es-toolkit@1.32.0/node_modules/es-toolkit/dist/object/merge.mjs
|
|
145
132
|
function merge(target, source) {
|
|
146
133
|
const sourceKeys = Object.keys(source);
|
|
147
|
-
for (let i
|
|
148
|
-
const key = sourceKeys[i
|
|
134
|
+
for (let i = 0; i < sourceKeys.length; i++) {
|
|
135
|
+
const key = sourceKeys[i];
|
|
149
136
|
const sourceValue = source[key];
|
|
150
137
|
const targetValue = target[key];
|
|
151
138
|
if (Array.isArray(sourceValue)) if (Array.isArray(targetValue)) target[key] = merge(targetValue, sourceValue);
|
|
@@ -156,69 +143,67 @@ function merge(target, source) {
|
|
|
156
143
|
}
|
|
157
144
|
return target;
|
|
158
145
|
}
|
|
159
|
-
|
|
160
146
|
//#endregion
|
|
161
147
|
//#region ../../node_modules/.pnpm/es-toolkit@1.32.0/node_modules/es-toolkit/dist/compat/util/eq.mjs
|
|
162
148
|
function eq(value, other) {
|
|
163
149
|
return value === other || Number.isNaN(value) && Number.isNaN(other);
|
|
164
150
|
}
|
|
165
|
-
|
|
166
151
|
//#endregion
|
|
167
152
|
//#region ../../node_modules/.pnpm/es-toolkit@1.32.0/node_modules/es-toolkit/dist/predicate/isEqualWith.mjs
|
|
168
|
-
function isEqualWith(a
|
|
169
|
-
return isEqualWithImpl(a
|
|
153
|
+
function isEqualWith(a, b, areValuesEqual) {
|
|
154
|
+
return isEqualWithImpl(a, b, void 0, void 0, void 0, void 0, areValuesEqual);
|
|
170
155
|
}
|
|
171
|
-
function isEqualWithImpl(a
|
|
172
|
-
const result = areValuesEqual(a
|
|
156
|
+
function isEqualWithImpl(a, b, property, aParent, bParent, stack, areValuesEqual) {
|
|
157
|
+
const result = areValuesEqual(a, b, property, aParent, bParent, stack);
|
|
173
158
|
if (result !== void 0) return result;
|
|
174
|
-
if (typeof a
|
|
159
|
+
if (typeof a === typeof b) switch (typeof a) {
|
|
175
160
|
case "bigint":
|
|
176
161
|
case "string":
|
|
177
162
|
case "boolean":
|
|
178
163
|
case "symbol":
|
|
179
|
-
case "undefined": return a
|
|
180
|
-
case "number": return a
|
|
181
|
-
case "function": return a
|
|
182
|
-
case "object": return areObjectsEqual(a
|
|
164
|
+
case "undefined": return a === b;
|
|
165
|
+
case "number": return a === b || Object.is(a, b);
|
|
166
|
+
case "function": return a === b;
|
|
167
|
+
case "object": return areObjectsEqual(a, b, stack, areValuesEqual);
|
|
183
168
|
}
|
|
184
|
-
return areObjectsEqual(a
|
|
169
|
+
return areObjectsEqual(a, b, stack, areValuesEqual);
|
|
185
170
|
}
|
|
186
|
-
function areObjectsEqual(a
|
|
187
|
-
if (Object.is(a
|
|
188
|
-
let aTag = getTag(a
|
|
171
|
+
function areObjectsEqual(a, b, stack, areValuesEqual) {
|
|
172
|
+
if (Object.is(a, b)) return true;
|
|
173
|
+
let aTag = getTag(a);
|
|
189
174
|
let bTag = getTag(b);
|
|
190
|
-
if (aTag ===
|
|
191
|
-
if (bTag ===
|
|
175
|
+
if (aTag === "[object Arguments]") aTag = objectTag;
|
|
176
|
+
if (bTag === "[object Arguments]") bTag = objectTag;
|
|
192
177
|
if (aTag !== bTag) return false;
|
|
193
178
|
switch (aTag) {
|
|
194
|
-
case stringTag: return a
|
|
195
|
-
case numberTag: return eq(a
|
|
179
|
+
case stringTag: return a.toString() === b.toString();
|
|
180
|
+
case numberTag: return eq(a.valueOf(), b.valueOf());
|
|
196
181
|
case booleanTag:
|
|
197
182
|
case dateTag:
|
|
198
|
-
case symbolTag: return Object.is(a
|
|
199
|
-
case regexpTag: return a
|
|
200
|
-
case functionTag: return a
|
|
183
|
+
case symbolTag: return Object.is(a.valueOf(), b.valueOf());
|
|
184
|
+
case regexpTag: return a.source === b.source && a.flags === b.flags;
|
|
185
|
+
case functionTag: return a === b;
|
|
201
186
|
}
|
|
202
187
|
stack = stack ?? /* @__PURE__ */ new Map();
|
|
203
|
-
const aStack = stack.get(a
|
|
188
|
+
const aStack = stack.get(a);
|
|
204
189
|
const bStack = stack.get(b);
|
|
205
190
|
if (aStack != null && bStack != null) return aStack === b;
|
|
206
|
-
stack.set(a
|
|
207
|
-
stack.set(b, a
|
|
191
|
+
stack.set(a, b);
|
|
192
|
+
stack.set(b, a);
|
|
208
193
|
try {
|
|
209
194
|
switch (aTag) {
|
|
210
195
|
case mapTag:
|
|
211
|
-
if (a
|
|
212
|
-
for (const [key, value] of a
|
|
196
|
+
if (a.size !== b.size) return false;
|
|
197
|
+
for (const [key, value] of a.entries()) if (!b.has(key) || !isEqualWithImpl(value, b.get(key), key, a, b, stack, areValuesEqual)) return false;
|
|
213
198
|
return true;
|
|
214
199
|
case setTag: {
|
|
215
|
-
if (a
|
|
216
|
-
const aValues = Array.from(a
|
|
200
|
+
if (a.size !== b.size) return false;
|
|
201
|
+
const aValues = Array.from(a.values());
|
|
217
202
|
const bValues = Array.from(b.values());
|
|
218
|
-
for (let i
|
|
219
|
-
const aValue = aValues[i
|
|
203
|
+
for (let i = 0; i < aValues.length; i++) {
|
|
204
|
+
const aValue = aValues[i];
|
|
220
205
|
const index = bValues.findIndex((bValue) => {
|
|
221
|
-
return isEqualWithImpl(aValue, bValue, void 0, a
|
|
206
|
+
return isEqualWithImpl(aValue, bValue, void 0, a, b, stack, areValuesEqual);
|
|
222
207
|
});
|
|
223
208
|
if (index === -1) return false;
|
|
224
209
|
bValues.splice(index, 1);
|
|
@@ -237,45 +222,43 @@ function areObjectsEqual(a$1, b, stack, areValuesEqual) {
|
|
|
237
222
|
case bigInt64ArrayTag:
|
|
238
223
|
case float32ArrayTag:
|
|
239
224
|
case float64ArrayTag:
|
|
240
|
-
if (typeof Buffer !== "undefined" && Buffer.isBuffer(a
|
|
241
|
-
if (a
|
|
242
|
-
for (let i
|
|
225
|
+
if (typeof Buffer !== "undefined" && Buffer.isBuffer(a) !== Buffer.isBuffer(b)) return false;
|
|
226
|
+
if (a.length !== b.length) return false;
|
|
227
|
+
for (let i = 0; i < a.length; i++) if (!isEqualWithImpl(a[i], b[i], i, a, b, stack, areValuesEqual)) return false;
|
|
243
228
|
return true;
|
|
244
229
|
case arrayBufferTag:
|
|
245
|
-
if (a
|
|
246
|
-
return areObjectsEqual(new Uint8Array(a
|
|
230
|
+
if (a.byteLength !== b.byteLength) return false;
|
|
231
|
+
return areObjectsEqual(new Uint8Array(a), new Uint8Array(b), stack, areValuesEqual);
|
|
247
232
|
case dataViewTag:
|
|
248
|
-
if (a
|
|
249
|
-
return areObjectsEqual(new Uint8Array(a
|
|
250
|
-
case errorTag: return a
|
|
233
|
+
if (a.byteLength !== b.byteLength || a.byteOffset !== b.byteOffset) return false;
|
|
234
|
+
return areObjectsEqual(new Uint8Array(a), new Uint8Array(b), stack, areValuesEqual);
|
|
235
|
+
case errorTag: return a.name === b.name && a.message === b.message;
|
|
251
236
|
case objectTag: {
|
|
252
|
-
if (!(areObjectsEqual(a
|
|
253
|
-
const aKeys = [...Object.keys(a
|
|
237
|
+
if (!(areObjectsEqual(a.constructor, b.constructor, stack, areValuesEqual) || isPlainObject$1(a) && isPlainObject$1(b))) return false;
|
|
238
|
+
const aKeys = [...Object.keys(a), ...getSymbols(a)];
|
|
254
239
|
const bKeys = [...Object.keys(b), ...getSymbols(b)];
|
|
255
240
|
if (aKeys.length !== bKeys.length) return false;
|
|
256
|
-
for (let i
|
|
257
|
-
const propKey = aKeys[i
|
|
258
|
-
const aProp = a
|
|
241
|
+
for (let i = 0; i < aKeys.length; i++) {
|
|
242
|
+
const propKey = aKeys[i];
|
|
243
|
+
const aProp = a[propKey];
|
|
259
244
|
if (!Object.hasOwn(b, propKey)) return false;
|
|
260
245
|
const bProp = b[propKey];
|
|
261
|
-
if (!isEqualWithImpl(aProp, bProp, propKey, a
|
|
246
|
+
if (!isEqualWithImpl(aProp, bProp, propKey, a, b, stack, areValuesEqual)) return false;
|
|
262
247
|
}
|
|
263
248
|
return true;
|
|
264
249
|
}
|
|
265
250
|
default: return false;
|
|
266
251
|
}
|
|
267
252
|
} finally {
|
|
268
|
-
stack.delete(a
|
|
253
|
+
stack.delete(a);
|
|
269
254
|
stack.delete(b);
|
|
270
255
|
}
|
|
271
256
|
}
|
|
272
|
-
|
|
273
257
|
//#endregion
|
|
274
258
|
//#region ../../node_modules/.pnpm/es-toolkit@1.32.0/node_modules/es-toolkit/dist/predicate/isEqual.mjs
|
|
275
|
-
function isEqual(a
|
|
276
|
-
return isEqualWith(a
|
|
259
|
+
function isEqual(a, b) {
|
|
260
|
+
return isEqualWith(a, b, noop$2);
|
|
277
261
|
}
|
|
278
|
-
|
|
279
262
|
//#endregion
|
|
280
263
|
//#region ../../node_modules/.pnpm/is-plain-obj@4.1.0/node_modules/is-plain-obj/index.js
|
|
281
264
|
function isPlainObject(value) {
|
|
@@ -283,7 +266,6 @@ function isPlainObject(value) {
|
|
|
283
266
|
const prototype = Object.getPrototypeOf(value);
|
|
284
267
|
return (prototype === null || prototype === Object.prototype || Object.getPrototypeOf(prototype) === null) && !(Symbol.toStringTag in value) && !(Symbol.iterator in value);
|
|
285
268
|
}
|
|
286
|
-
|
|
287
269
|
//#endregion
|
|
288
270
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/arguments/file-url.js
|
|
289
271
|
const safeNormalizeFileUrl = (file, name) => {
|
|
@@ -294,7 +276,6 @@ const safeNormalizeFileUrl = (file, name) => {
|
|
|
294
276
|
const normalizeDenoExecPath = (file) => isDenoExecPath(file) ? file.toString() : file;
|
|
295
277
|
const isDenoExecPath = (file) => typeof file !== "string" && file && Object.getPrototypeOf(file) === String.prototype;
|
|
296
278
|
const normalizeFileUrl = (file) => file instanceof URL ? fileURLToPath(file) : file;
|
|
297
|
-
|
|
298
279
|
//#endregion
|
|
299
280
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/methods/parameters.js
|
|
300
281
|
const normalizeParameters = (rawFile, rawArguments = [], rawOptions = {}) => {
|
|
@@ -312,7 +293,6 @@ const normalizeParameters = (rawFile, rawArguments = [], rawOptions = {}) => {
|
|
|
312
293
|
options
|
|
313
294
|
];
|
|
314
295
|
};
|
|
315
|
-
|
|
316
296
|
//#endregion
|
|
317
297
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/utils/uint-array.js
|
|
318
298
|
const { toString: objectToString$1 } = Object.prototype;
|
|
@@ -352,7 +332,6 @@ const getJoinLength = (uint8Arrays) => {
|
|
|
352
332
|
for (const uint8Array of uint8Arrays) joinLength += uint8Array.length;
|
|
353
333
|
return joinLength;
|
|
354
334
|
};
|
|
355
|
-
|
|
356
335
|
//#endregion
|
|
357
336
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/methods/template.js
|
|
358
337
|
const isTemplateString = (templates) => Array.isArray(templates) && Array.isArray(templates.raw);
|
|
@@ -379,7 +358,7 @@ const parseTemplate = ({ templates, expressions, tokens, index, template }) => {
|
|
|
379
358
|
const newTokens = concatTokens(tokens, nextTokens, leadingWhitespaces);
|
|
380
359
|
if (index === expressions.length) return newTokens;
|
|
381
360
|
const expression = expressions[index];
|
|
382
|
-
return concatTokens(newTokens, Array.isArray(expression) ? expression.map((expression
|
|
361
|
+
return concatTokens(newTokens, Array.isArray(expression) ? expression.map((expression) => parseExpression(expression)) : [parseExpression(expression)], trailingWhitespaces);
|
|
383
362
|
};
|
|
384
363
|
const splitByWhitespaces = (template, rawTemplate) => {
|
|
385
364
|
if (rawTemplate.length === 0) return {
|
|
@@ -441,7 +420,6 @@ const getSubprocessResult = ({ stdout }) => {
|
|
|
441
420
|
if (stdout === void 0) throw new TypeError("Missing result.stdout in template expression. This is probably due to the previous subprocess' \"stdout\" option.");
|
|
442
421
|
throw new TypeError(`Unexpected "${typeof stdout}" stdout in template expression`);
|
|
443
422
|
};
|
|
444
|
-
|
|
445
423
|
//#endregion
|
|
446
424
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/utils/standard-stream.js
|
|
447
425
|
const isStandardStream = (stream) => STANDARD_STREAMS.includes(stream);
|
|
@@ -456,7 +434,6 @@ const STANDARD_STREAMS_ALIASES = [
|
|
|
456
434
|
"stderr"
|
|
457
435
|
];
|
|
458
436
|
const getStreamName = (fdNumber) => STANDARD_STREAMS_ALIASES[fdNumber] ?? `stdio[${fdNumber}]`;
|
|
459
|
-
|
|
460
437
|
//#endregion
|
|
461
438
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/arguments/specific.js
|
|
462
439
|
const normalizeFdSpecificOptions = (options) => {
|
|
@@ -511,7 +488,6 @@ const FD_SPECIFIC_OPTIONS = [
|
|
|
511
488
|
"stripFinalNewline"
|
|
512
489
|
];
|
|
513
490
|
const getFdSpecificValue = (optionArray, fdNumber) => fdNumber === "ipc" ? optionArray.at(-1) : optionArray[fdNumber];
|
|
514
|
-
|
|
515
491
|
//#endregion
|
|
516
492
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/verbose/values.js
|
|
517
493
|
const isVerbose = ({ verbose }, fdNumber) => getFdVerbose(verbose, fdNumber) !== "none";
|
|
@@ -528,7 +504,6 @@ const VERBOSE_VALUES = [
|
|
|
528
504
|
"short",
|
|
529
505
|
"full"
|
|
530
506
|
];
|
|
531
|
-
|
|
532
507
|
//#endregion
|
|
533
508
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/arguments/escape.js
|
|
534
509
|
const joinCommand = (filePath, rawArguments) => {
|
|
@@ -549,7 +524,7 @@ const escapeControlCharacter = (character) => {
|
|
|
549
524
|
};
|
|
550
525
|
const getSpecialCharRegExp = () => {
|
|
551
526
|
try {
|
|
552
|
-
return new RegExp("\\p{Separator}|\\p{Other}", "gu");
|
|
527
|
+
return /* @__PURE__ */ new RegExp("\\p{Separator}|\\p{Other}", "gu");
|
|
553
528
|
} catch {
|
|
554
529
|
return /[\s\u0000-\u001F\u007F-\u009F\u00AD]/g;
|
|
555
530
|
}
|
|
@@ -569,7 +544,6 @@ const quoteString = (escapedArgument) => {
|
|
|
569
544
|
return platform === "win32" ? `"${escapedArgument.replaceAll("\"", "\"\"")}"` : `'${escapedArgument.replaceAll("'", "'\\''")}'`;
|
|
570
545
|
};
|
|
571
546
|
const NO_ESCAPE_REGEXP = /^[\w./-]+$/;
|
|
572
|
-
|
|
573
547
|
//#endregion
|
|
574
548
|
//#region ../../node_modules/.pnpm/is-unicode-supported@2.1.0/node_modules/is-unicode-supported/index.js
|
|
575
549
|
function isUnicodeSupported() {
|
|
@@ -578,7 +552,6 @@ function isUnicodeSupported() {
|
|
|
578
552
|
if (process$1.platform !== "win32") return TERM !== "linux";
|
|
579
553
|
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";
|
|
580
554
|
}
|
|
581
|
-
|
|
582
555
|
//#endregion
|
|
583
556
|
//#region ../../node_modules/.pnpm/figures@6.1.0/node_modules/figures/index.js
|
|
584
557
|
const common = {
|
|
@@ -857,11 +830,8 @@ const fallbackSymbols = {
|
|
|
857
830
|
...common,
|
|
858
831
|
...specialFallbackSymbols
|
|
859
832
|
};
|
|
860
|
-
const
|
|
861
|
-
|
|
862
|
-
var figures_default = figures;
|
|
863
|
-
const replacements = Object.entries(specialMainSymbols);
|
|
864
|
-
|
|
833
|
+
const figures = isUnicodeSupported() ? mainSymbols : fallbackSymbols;
|
|
834
|
+
Object.entries(specialMainSymbols);
|
|
865
835
|
//#endregion
|
|
866
836
|
//#region ../../node_modules/.pnpm/yoctocolors@2.1.1/node_modules/yoctocolors/base.js
|
|
867
837
|
const hasColors = tty?.WriteStream?.prototype?.hasColors?.() ?? false;
|
|
@@ -884,48 +854,47 @@ const format = (open, close) => {
|
|
|
884
854
|
return result;
|
|
885
855
|
};
|
|
886
856
|
};
|
|
887
|
-
|
|
857
|
+
format(0, 0);
|
|
888
858
|
const bold = format(1, 22);
|
|
889
|
-
|
|
890
|
-
|
|
891
|
-
|
|
892
|
-
|
|
893
|
-
|
|
894
|
-
|
|
895
|
-
|
|
896
|
-
|
|
897
|
-
|
|
898
|
-
|
|
899
|
-
|
|
900
|
-
|
|
901
|
-
|
|
902
|
-
|
|
903
|
-
|
|
859
|
+
format(2, 22);
|
|
860
|
+
format(3, 23);
|
|
861
|
+
format(4, 24);
|
|
862
|
+
format(53, 55);
|
|
863
|
+
format(7, 27);
|
|
864
|
+
format(8, 28);
|
|
865
|
+
format(9, 29);
|
|
866
|
+
format(30, 39);
|
|
867
|
+
format(31, 39);
|
|
868
|
+
format(32, 39);
|
|
869
|
+
format(33, 39);
|
|
870
|
+
format(34, 39);
|
|
871
|
+
format(35, 39);
|
|
872
|
+
format(36, 39);
|
|
873
|
+
format(37, 39);
|
|
904
874
|
const gray = format(90, 39);
|
|
905
|
-
|
|
906
|
-
|
|
907
|
-
|
|
908
|
-
|
|
909
|
-
|
|
910
|
-
|
|
911
|
-
|
|
912
|
-
|
|
913
|
-
|
|
875
|
+
format(40, 49);
|
|
876
|
+
format(41, 49);
|
|
877
|
+
format(42, 49);
|
|
878
|
+
format(43, 49);
|
|
879
|
+
format(44, 49);
|
|
880
|
+
format(45, 49);
|
|
881
|
+
format(46, 49);
|
|
882
|
+
format(47, 49);
|
|
883
|
+
format(100, 49);
|
|
914
884
|
const redBright = format(91, 39);
|
|
915
|
-
|
|
885
|
+
format(92, 39);
|
|
916
886
|
const yellowBright = format(93, 39);
|
|
917
|
-
|
|
918
|
-
|
|
919
|
-
|
|
920
|
-
|
|
921
|
-
|
|
922
|
-
|
|
923
|
-
|
|
924
|
-
|
|
925
|
-
|
|
926
|
-
|
|
927
|
-
|
|
928
|
-
|
|
887
|
+
format(94, 39);
|
|
888
|
+
format(95, 39);
|
|
889
|
+
format(96, 39);
|
|
890
|
+
format(97, 39);
|
|
891
|
+
format(101, 49);
|
|
892
|
+
format(102, 49);
|
|
893
|
+
format(103, 49);
|
|
894
|
+
format(104, 49);
|
|
895
|
+
format(105, 49);
|
|
896
|
+
format(106, 49);
|
|
897
|
+
format(107, 49);
|
|
929
898
|
//#endregion
|
|
930
899
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/verbose/default.js
|
|
931
900
|
const defaultVerboseFunction = ({ type, message, timestamp, piped, commandId, result: { failed = false } = {}, options: { reject = true } }) => {
|
|
@@ -941,8 +910,8 @@ const defaultVerboseFunction = ({ type, message, timestamp, piped, commandId, re
|
|
|
941
910
|
const serializeTimestamp = (timestamp) => `${padField(timestamp.getHours(), 2)}:${padField(timestamp.getMinutes(), 2)}:${padField(timestamp.getSeconds(), 2)}.${padField(timestamp.getMilliseconds(), 3)}`;
|
|
942
911
|
const padField = (field, padding) => String(field).padStart(padding, "0");
|
|
943
912
|
const getFinalIcon = ({ failed, reject }) => {
|
|
944
|
-
if (!failed) return
|
|
945
|
-
return reject ?
|
|
913
|
+
if (!failed) return figures.tick;
|
|
914
|
+
return reject ? figures.cross : figures.warning;
|
|
946
915
|
};
|
|
947
916
|
const ICONS = {
|
|
948
917
|
command: ({ piped }) => piped ? "|" : "$",
|
|
@@ -959,7 +928,6 @@ const COLORS = {
|
|
|
959
928
|
error: ({ reject }) => reject ? redBright : yellowBright,
|
|
960
929
|
duration: () => gray
|
|
961
930
|
};
|
|
962
|
-
|
|
963
931
|
//#endregion
|
|
964
932
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/verbose/custom.js
|
|
965
933
|
const applyVerboseOnLines = (printedLines, verboseInfo, fdNumber) => {
|
|
@@ -972,7 +940,6 @@ const applyVerboseFunction = (verboseLine, verboseObject, verboseFunction) => {
|
|
|
972
940
|
if (typeof printedLine === "string") return printedLine;
|
|
973
941
|
};
|
|
974
942
|
const appendNewline = (printedLine) => printedLine.endsWith("\n") ? printedLine : `${printedLine}\n`;
|
|
975
|
-
|
|
976
943
|
//#endregion
|
|
977
944
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/verbose/log.js
|
|
978
945
|
const verboseLog = ({ type, verboseMessage, fdNumber, verboseInfo, result }) => {
|
|
@@ -983,7 +950,7 @@ const verboseLog = ({ type, verboseMessage, fdNumber, verboseInfo, result }) =>
|
|
|
983
950
|
})), verboseInfo, fdNumber);
|
|
984
951
|
if (finalLines !== "") console.warn(finalLines.slice(0, -1));
|
|
985
952
|
};
|
|
986
|
-
const getVerboseObject = ({ type, result, verboseInfo: { escapedCommand, commandId, rawOptions: { piped = false
|
|
953
|
+
const getVerboseObject = ({ type, result, verboseInfo: { escapedCommand, commandId, rawOptions: { piped = false, ...options } } }) => ({
|
|
987
954
|
type,
|
|
988
955
|
escapedCommand,
|
|
989
956
|
commandId: `${commandId}`,
|
|
@@ -1006,7 +973,6 @@ const serializeVerboseMessage = (message) => {
|
|
|
1006
973
|
return escapeLines(typeof message === "string" ? message : inspect(message)).replaceAll(" ", " ".repeat(TAB_SIZE));
|
|
1007
974
|
};
|
|
1008
975
|
const TAB_SIZE = 2;
|
|
1009
|
-
|
|
1010
976
|
//#endregion
|
|
1011
977
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/verbose/start.js
|
|
1012
978
|
const logCommand = (escapedCommand, verboseInfo) => {
|
|
@@ -1017,7 +983,6 @@ const logCommand = (escapedCommand, verboseInfo) => {
|
|
|
1017
983
|
verboseInfo
|
|
1018
984
|
});
|
|
1019
985
|
};
|
|
1020
|
-
|
|
1021
986
|
//#endregion
|
|
1022
987
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/verbose/info.js
|
|
1023
988
|
const getVerboseInfo = (verbose, escapedCommand, rawOptions) => {
|
|
@@ -1041,12 +1006,10 @@ const validateVerbose = (verbose) => {
|
|
|
1041
1006
|
}
|
|
1042
1007
|
}
|
|
1043
1008
|
};
|
|
1044
|
-
|
|
1045
1009
|
//#endregion
|
|
1046
1010
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/return/duration.js
|
|
1047
1011
|
const getStartTime = () => hrtime.bigint();
|
|
1048
1012
|
const getDurationMs = (startTime) => Number(hrtime.bigint() - startTime) / 1e6;
|
|
1049
|
-
|
|
1050
1013
|
//#endregion
|
|
1051
1014
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/arguments/command.js
|
|
1052
1015
|
const handleCommand = (filePath, rawArguments, rawOptions) => {
|
|
@@ -1061,51 +1024,49 @@ const handleCommand = (filePath, rawArguments, rawOptions) => {
|
|
|
1061
1024
|
verboseInfo
|
|
1062
1025
|
};
|
|
1063
1026
|
};
|
|
1064
|
-
|
|
1065
1027
|
//#endregion
|
|
1066
1028
|
//#region ../../node_modules/.pnpm/isexe@2.0.0/node_modules/isexe/windows.js
|
|
1067
|
-
var require_windows = /* @__PURE__ */
|
|
1068
|
-
module.exports = isexe
|
|
1069
|
-
isexe
|
|
1070
|
-
var fs$
|
|
1071
|
-
function checkPathExt(path
|
|
1029
|
+
var require_windows = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
1030
|
+
module.exports = isexe;
|
|
1031
|
+
isexe.sync = sync;
|
|
1032
|
+
var fs$4 = __require("fs");
|
|
1033
|
+
function checkPathExt(path, options) {
|
|
1072
1034
|
var pathext = options.pathExt !== void 0 ? options.pathExt : process.env.PATHEXT;
|
|
1073
1035
|
if (!pathext) return true;
|
|
1074
1036
|
pathext = pathext.split(";");
|
|
1075
1037
|
if (pathext.indexOf("") !== -1) return true;
|
|
1076
|
-
for (var i
|
|
1077
|
-
var p
|
|
1078
|
-
if (p
|
|
1038
|
+
for (var i = 0; i < pathext.length; i++) {
|
|
1039
|
+
var p = pathext[i].toLowerCase();
|
|
1040
|
+
if (p && path.substr(-p.length).toLowerCase() === p) return true;
|
|
1079
1041
|
}
|
|
1080
1042
|
return false;
|
|
1081
1043
|
}
|
|
1082
|
-
function checkStat
|
|
1044
|
+
function checkStat(stat, path, options) {
|
|
1083
1045
|
if (!stat.isSymbolicLink() && !stat.isFile()) return false;
|
|
1084
|
-
return checkPathExt(path
|
|
1046
|
+
return checkPathExt(path, options);
|
|
1085
1047
|
}
|
|
1086
|
-
function isexe
|
|
1087
|
-
fs$
|
|
1088
|
-
cb(er, er ? false : checkStat
|
|
1048
|
+
function isexe(path, options, cb) {
|
|
1049
|
+
fs$4.stat(path, function(er, stat) {
|
|
1050
|
+
cb(er, er ? false : checkStat(stat, path, options));
|
|
1089
1051
|
});
|
|
1090
1052
|
}
|
|
1091
|
-
function sync
|
|
1092
|
-
return checkStat
|
|
1053
|
+
function sync(path, options) {
|
|
1054
|
+
return checkStat(fs$4.statSync(path), path, options);
|
|
1093
1055
|
}
|
|
1094
|
-
})
|
|
1095
|
-
|
|
1056
|
+
}));
|
|
1096
1057
|
//#endregion
|
|
1097
1058
|
//#region ../../node_modules/.pnpm/isexe@2.0.0/node_modules/isexe/mode.js
|
|
1098
|
-
var require_mode = /* @__PURE__ */
|
|
1099
|
-
module.exports = isexe
|
|
1100
|
-
isexe
|
|
1101
|
-
var fs$
|
|
1102
|
-
function isexe
|
|
1103
|
-
fs$
|
|
1059
|
+
var require_mode = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
1060
|
+
module.exports = isexe;
|
|
1061
|
+
isexe.sync = sync;
|
|
1062
|
+
var fs$3 = __require("fs");
|
|
1063
|
+
function isexe(path, options, cb) {
|
|
1064
|
+
fs$3.stat(path, function(er, stat) {
|
|
1104
1065
|
cb(er, er ? false : checkStat(stat, options));
|
|
1105
1066
|
});
|
|
1106
1067
|
}
|
|
1107
|
-
function sync
|
|
1108
|
-
return checkStat(fs$
|
|
1068
|
+
function sync(path, options) {
|
|
1069
|
+
return checkStat(fs$3.statSync(path), options);
|
|
1109
1070
|
}
|
|
1110
1071
|
function checkStat(stat, options) {
|
|
1111
1072
|
return stat.isFile() && checkMode(stat, options);
|
|
@@ -1116,24 +1077,23 @@ var require_mode = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/isexe@
|
|
|
1116
1077
|
var gid = stat.gid;
|
|
1117
1078
|
var myUid = options.uid !== void 0 ? options.uid : process.getuid && process.getuid();
|
|
1118
1079
|
var myGid = options.gid !== void 0 ? options.gid : process.getgid && process.getgid();
|
|
1119
|
-
var u
|
|
1080
|
+
var u = parseInt("100", 8);
|
|
1120
1081
|
var g = parseInt("010", 8);
|
|
1121
|
-
var o
|
|
1122
|
-
var ug = u
|
|
1123
|
-
return mod & o
|
|
1082
|
+
var o = parseInt("001", 8);
|
|
1083
|
+
var ug = u | g;
|
|
1084
|
+
return mod & o || mod & g && gid === myGid || mod & u && uid === myUid || mod & ug && myUid === 0;
|
|
1124
1085
|
}
|
|
1125
|
-
})
|
|
1126
|
-
|
|
1086
|
+
}));
|
|
1127
1087
|
//#endregion
|
|
1128
1088
|
//#region ../../node_modules/.pnpm/isexe@2.0.0/node_modules/isexe/index.js
|
|
1129
|
-
var require_isexe = /* @__PURE__ */
|
|
1089
|
+
var require_isexe = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
1130
1090
|
__require("fs");
|
|
1131
1091
|
var core;
|
|
1132
1092
|
if (process.platform === "win32" || global.TESTING_WINDOWS) core = require_windows();
|
|
1133
1093
|
else core = require_mode();
|
|
1134
|
-
module.exports = isexe
|
|
1135
|
-
isexe
|
|
1136
|
-
function isexe
|
|
1094
|
+
module.exports = isexe;
|
|
1095
|
+
isexe.sync = sync;
|
|
1096
|
+
function isexe(path, options, cb) {
|
|
1137
1097
|
if (typeof options === "function") {
|
|
1138
1098
|
cb = options;
|
|
1139
1099
|
options = {};
|
|
@@ -1141,13 +1101,13 @@ var require_isexe = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/isexe
|
|
|
1141
1101
|
if (!cb) {
|
|
1142
1102
|
if (typeof Promise !== "function") throw new TypeError("callback not provided");
|
|
1143
1103
|
return new Promise(function(resolve, reject) {
|
|
1144
|
-
isexe
|
|
1104
|
+
isexe(path, options || {}, function(er, is) {
|
|
1145
1105
|
if (er) reject(er);
|
|
1146
1106
|
else resolve(is);
|
|
1147
1107
|
});
|
|
1148
1108
|
});
|
|
1149
1109
|
}
|
|
1150
|
-
core(path
|
|
1110
|
+
core(path, options || {}, function(er, is) {
|
|
1151
1111
|
if (er) {
|
|
1152
1112
|
if (er.code === "EACCES" || options && options.ignoreErrors) {
|
|
1153
1113
|
er = null;
|
|
@@ -1157,19 +1117,18 @@ var require_isexe = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/isexe
|
|
|
1157
1117
|
cb(er, is);
|
|
1158
1118
|
});
|
|
1159
1119
|
}
|
|
1160
|
-
function sync(path
|
|
1120
|
+
function sync(path, options) {
|
|
1161
1121
|
try {
|
|
1162
|
-
return core.sync(path
|
|
1122
|
+
return core.sync(path, options || {});
|
|
1163
1123
|
} catch (er) {
|
|
1164
1124
|
if (options && options.ignoreErrors || er.code === "EACCES") return false;
|
|
1165
1125
|
else throw er;
|
|
1166
1126
|
}
|
|
1167
1127
|
}
|
|
1168
|
-
})
|
|
1169
|
-
|
|
1128
|
+
}));
|
|
1170
1129
|
//#endregion
|
|
1171
1130
|
//#region ../../node_modules/.pnpm/which@2.0.2/node_modules/which/which.js
|
|
1172
|
-
var require_which = /* @__PURE__ */
|
|
1131
|
+
var require_which = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
1173
1132
|
const isWindows = process.platform === "win32" || process.env.OSTYPE === "cygwin" || process.env.OSTYPE === "msys";
|
|
1174
1133
|
const path$4 = __require("path");
|
|
1175
1134
|
const COLON = isWindows ? ";" : ":";
|
|
@@ -1189,7 +1148,7 @@ var require_which = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/which
|
|
|
1189
1148
|
pathExtExe
|
|
1190
1149
|
};
|
|
1191
1150
|
};
|
|
1192
|
-
const which
|
|
1151
|
+
const which = (cmd, opt, cb) => {
|
|
1193
1152
|
if (typeof opt === "function") {
|
|
1194
1153
|
cb = opt;
|
|
1195
1154
|
opt = {};
|
|
@@ -1197,20 +1156,20 @@ var require_which = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/which
|
|
|
1197
1156
|
if (!opt) opt = {};
|
|
1198
1157
|
const { pathEnv, pathExt, pathExtExe } = getPathInfo(cmd, opt);
|
|
1199
1158
|
const found = [];
|
|
1200
|
-
const step = (i
|
|
1201
|
-
if (i
|
|
1202
|
-
const ppRaw = pathEnv[i
|
|
1159
|
+
const step = (i) => new Promise((resolve, reject) => {
|
|
1160
|
+
if (i === pathEnv.length) return opt.all && found.length ? resolve(found) : reject(getNotFoundError(cmd));
|
|
1161
|
+
const ppRaw = pathEnv[i];
|
|
1203
1162
|
const pathPart = /^".*"$/.test(ppRaw) ? ppRaw.slice(1, -1) : ppRaw;
|
|
1204
1163
|
const pCmd = path$4.join(pathPart, cmd);
|
|
1205
|
-
resolve(subStep(!pathPart && /^\.[\\\/]/.test(cmd) ? cmd.slice(0, 2) + pCmd : pCmd, i
|
|
1164
|
+
resolve(subStep(!pathPart && /^\.[\\\/]/.test(cmd) ? cmd.slice(0, 2) + pCmd : pCmd, i, 0));
|
|
1206
1165
|
});
|
|
1207
|
-
const subStep = (p
|
|
1208
|
-
if (ii === pathExt.length) return resolve(step(i
|
|
1166
|
+
const subStep = (p, i, ii) => new Promise((resolve, reject) => {
|
|
1167
|
+
if (ii === pathExt.length) return resolve(step(i + 1));
|
|
1209
1168
|
const ext = pathExt[ii];
|
|
1210
|
-
isexe(p
|
|
1211
|
-
if (!er && is) if (opt.all) found.push(p
|
|
1212
|
-
else return resolve(p
|
|
1213
|
-
return resolve(subStep(p
|
|
1169
|
+
isexe(p + ext, { pathExt: pathExtExe }, (er, is) => {
|
|
1170
|
+
if (!er && is) if (opt.all) found.push(p + ext);
|
|
1171
|
+
else return resolve(p + ext);
|
|
1172
|
+
return resolve(subStep(p, i, ii + 1));
|
|
1214
1173
|
});
|
|
1215
1174
|
});
|
|
1216
1175
|
return cb ? step(0).then((res) => cb(null, res), cb) : step(0);
|
|
@@ -1219,13 +1178,13 @@ var require_which = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/which
|
|
|
1219
1178
|
opt = opt || {};
|
|
1220
1179
|
const { pathEnv, pathExt, pathExtExe } = getPathInfo(cmd, opt);
|
|
1221
1180
|
const found = [];
|
|
1222
|
-
for (let i
|
|
1223
|
-
const ppRaw = pathEnv[i
|
|
1181
|
+
for (let i = 0; i < pathEnv.length; i++) {
|
|
1182
|
+
const ppRaw = pathEnv[i];
|
|
1224
1183
|
const pathPart = /^".*"$/.test(ppRaw) ? ppRaw.slice(1, -1) : ppRaw;
|
|
1225
1184
|
const pCmd = path$4.join(pathPart, cmd);
|
|
1226
|
-
const p
|
|
1185
|
+
const p = !pathPart && /^\.[\\\/]/.test(cmd) ? cmd.slice(0, 2) + pCmd : pCmd;
|
|
1227
1186
|
for (let j = 0; j < pathExt.length; j++) {
|
|
1228
|
-
const cur = p
|
|
1187
|
+
const cur = p + pathExt[j];
|
|
1229
1188
|
try {
|
|
1230
1189
|
if (isexe.sync(cur, { pathExt: pathExtExe })) if (opt.all) found.push(cur);
|
|
1231
1190
|
else return cur;
|
|
@@ -1236,25 +1195,23 @@ var require_which = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/which
|
|
|
1236
1195
|
if (opt.nothrow) return null;
|
|
1237
1196
|
throw getNotFoundError(cmd);
|
|
1238
1197
|
};
|
|
1239
|
-
module.exports = which
|
|
1240
|
-
which
|
|
1241
|
-
})
|
|
1242
|
-
|
|
1198
|
+
module.exports = which;
|
|
1199
|
+
which.sync = whichSync;
|
|
1200
|
+
}));
|
|
1243
1201
|
//#endregion
|
|
1244
1202
|
//#region ../../node_modules/.pnpm/path-key@3.1.1/node_modules/path-key/index.js
|
|
1245
|
-
var require_path_key = /* @__PURE__ */
|
|
1246
|
-
const pathKey
|
|
1203
|
+
var require_path_key = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
1204
|
+
const pathKey = (options = {}) => {
|
|
1247
1205
|
const environment = options.env || process.env;
|
|
1248
1206
|
if ((options.platform || process.platform) !== "win32") return "PATH";
|
|
1249
1207
|
return Object.keys(environment).reverse().find((key) => key.toUpperCase() === "PATH") || "Path";
|
|
1250
1208
|
};
|
|
1251
|
-
module.exports = pathKey
|
|
1252
|
-
module.exports.default = pathKey
|
|
1253
|
-
})
|
|
1254
|
-
|
|
1209
|
+
module.exports = pathKey;
|
|
1210
|
+
module.exports.default = pathKey;
|
|
1211
|
+
}));
|
|
1255
1212
|
//#endregion
|
|
1256
1213
|
//#region ../../node_modules/.pnpm/cross-spawn@7.0.6/node_modules/cross-spawn/lib/util/resolveCommand.js
|
|
1257
|
-
var require_resolveCommand = /* @__PURE__ */
|
|
1214
|
+
var require_resolveCommand = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
1258
1215
|
const path$3 = __require("path");
|
|
1259
1216
|
const which = require_which();
|
|
1260
1217
|
const getPathKey = require_path_key();
|
|
@@ -1278,15 +1235,14 @@ var require_resolveCommand = /* @__PURE__ */ __commonJS({ "../../node_modules/.p
|
|
|
1278
1235
|
if (resolved) resolved = path$3.resolve(hasCustomCwd ? parsed.options.cwd : "", resolved);
|
|
1279
1236
|
return resolved;
|
|
1280
1237
|
}
|
|
1281
|
-
function resolveCommand
|
|
1238
|
+
function resolveCommand(parsed) {
|
|
1282
1239
|
return resolveCommandAttempt(parsed) || resolveCommandAttempt(parsed, true);
|
|
1283
1240
|
}
|
|
1284
|
-
module.exports = resolveCommand
|
|
1285
|
-
})
|
|
1286
|
-
|
|
1241
|
+
module.exports = resolveCommand;
|
|
1242
|
+
}));
|
|
1287
1243
|
//#endregion
|
|
1288
1244
|
//#region ../../node_modules/.pnpm/cross-spawn@7.0.6/node_modules/cross-spawn/lib/util/escape.js
|
|
1289
|
-
var require_escape = /* @__PURE__ */
|
|
1245
|
+
var require_escape = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
1290
1246
|
const metaCharsRegExp = /([()\][%!^"`<>&|;, *?])/g;
|
|
1291
1247
|
function escapeCommand(arg) {
|
|
1292
1248
|
arg = arg.replace(metaCharsRegExp, "^$1");
|
|
@@ -1303,55 +1259,51 @@ var require_escape = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/cros
|
|
|
1303
1259
|
}
|
|
1304
1260
|
module.exports.command = escapeCommand;
|
|
1305
1261
|
module.exports.argument = escapeArgument;
|
|
1306
|
-
})
|
|
1307
|
-
|
|
1262
|
+
}));
|
|
1308
1263
|
//#endregion
|
|
1309
1264
|
//#region ../../node_modules/.pnpm/shebang-regex@3.0.0/node_modules/shebang-regex/index.js
|
|
1310
|
-
var require_shebang_regex = /* @__PURE__ */
|
|
1265
|
+
var require_shebang_regex = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
1311
1266
|
module.exports = /^#!(.*)/;
|
|
1312
|
-
})
|
|
1313
|
-
|
|
1267
|
+
}));
|
|
1314
1268
|
//#endregion
|
|
1315
1269
|
//#region ../../node_modules/.pnpm/shebang-command@2.0.0/node_modules/shebang-command/index.js
|
|
1316
|
-
var require_shebang_command = /* @__PURE__ */
|
|
1270
|
+
var require_shebang_command = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
1317
1271
|
const shebangRegex = require_shebang_regex();
|
|
1318
1272
|
module.exports = (string = "") => {
|
|
1319
1273
|
const match = string.match(shebangRegex);
|
|
1320
1274
|
if (!match) return null;
|
|
1321
|
-
const [path
|
|
1322
|
-
const binary = path
|
|
1275
|
+
const [path, argument] = match[0].replace(/#! ?/, "").split(" ");
|
|
1276
|
+
const binary = path.split("/").pop();
|
|
1323
1277
|
if (binary === "env") return argument;
|
|
1324
1278
|
return argument ? `${binary} ${argument}` : binary;
|
|
1325
1279
|
};
|
|
1326
|
-
})
|
|
1327
|
-
|
|
1280
|
+
}));
|
|
1328
1281
|
//#endregion
|
|
1329
1282
|
//#region ../../node_modules/.pnpm/cross-spawn@7.0.6/node_modules/cross-spawn/lib/util/readShebang.js
|
|
1330
|
-
var require_readShebang = /* @__PURE__ */
|
|
1331
|
-
const fs$
|
|
1283
|
+
var require_readShebang = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
1284
|
+
const fs$2 = __require("fs");
|
|
1332
1285
|
const shebangCommand = require_shebang_command();
|
|
1333
|
-
function readShebang
|
|
1286
|
+
function readShebang(command) {
|
|
1334
1287
|
const size = 150;
|
|
1335
1288
|
const buffer = Buffer.alloc(size);
|
|
1336
1289
|
let fd;
|
|
1337
1290
|
try {
|
|
1338
|
-
fd = fs$
|
|
1339
|
-
fs$
|
|
1340
|
-
fs$
|
|
1291
|
+
fd = fs$2.openSync(command, "r");
|
|
1292
|
+
fs$2.readSync(fd, buffer, 0, size, 0);
|
|
1293
|
+
fs$2.closeSync(fd);
|
|
1341
1294
|
} catch (e) {}
|
|
1342
1295
|
return shebangCommand(buffer.toString());
|
|
1343
1296
|
}
|
|
1344
|
-
module.exports = readShebang
|
|
1345
|
-
})
|
|
1346
|
-
|
|
1297
|
+
module.exports = readShebang;
|
|
1298
|
+
}));
|
|
1347
1299
|
//#endregion
|
|
1348
1300
|
//#region ../../node_modules/.pnpm/cross-spawn@7.0.6/node_modules/cross-spawn/lib/parse.js
|
|
1349
|
-
var require_parse = /* @__PURE__ */
|
|
1301
|
+
var require_parse = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
1350
1302
|
const path$2 = __require("path");
|
|
1351
1303
|
const resolveCommand = require_resolveCommand();
|
|
1352
1304
|
const escape = require_escape();
|
|
1353
1305
|
const readShebang = require_readShebang();
|
|
1354
|
-
const isWin
|
|
1306
|
+
const isWin = process.platform === "win32";
|
|
1355
1307
|
const isExecutableRegExp = /\.(?:com|exe)$/i;
|
|
1356
1308
|
const isCmdShimRegExp = /node_modules[\\/].bin[\\/][^\\/]+\.cmd$/i;
|
|
1357
1309
|
function detectShebang(parsed) {
|
|
@@ -1365,7 +1317,7 @@ var require_parse = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/cross
|
|
|
1365
1317
|
return parsed.file;
|
|
1366
1318
|
}
|
|
1367
1319
|
function parseNonShell(parsed) {
|
|
1368
|
-
if (!isWin
|
|
1320
|
+
if (!isWin) return parsed;
|
|
1369
1321
|
const commandFile = detectShebang(parsed);
|
|
1370
1322
|
const needsShell = !isExecutableRegExp.test(commandFile);
|
|
1371
1323
|
if (parsed.options.forceShell || needsShell) {
|
|
@@ -1384,7 +1336,7 @@ var require_parse = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/cross
|
|
|
1384
1336
|
}
|
|
1385
1337
|
return parsed;
|
|
1386
1338
|
}
|
|
1387
|
-
function parse
|
|
1339
|
+
function parse(command, args, options) {
|
|
1388
1340
|
if (args && !Array.isArray(args)) {
|
|
1389
1341
|
options = args;
|
|
1390
1342
|
args = null;
|
|
@@ -1403,12 +1355,11 @@ var require_parse = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/cross
|
|
|
1403
1355
|
};
|
|
1404
1356
|
return options.shell ? parsed : parseNonShell(parsed);
|
|
1405
1357
|
}
|
|
1406
|
-
module.exports = parse
|
|
1407
|
-
})
|
|
1408
|
-
|
|
1358
|
+
module.exports = parse;
|
|
1359
|
+
}));
|
|
1409
1360
|
//#endregion
|
|
1410
1361
|
//#region ../../node_modules/.pnpm/cross-spawn@7.0.6/node_modules/cross-spawn/lib/enoent.js
|
|
1411
|
-
var require_enoent = /* @__PURE__ */
|
|
1362
|
+
var require_enoent = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
1412
1363
|
const isWin = process.platform === "win32";
|
|
1413
1364
|
function notFoundError(original, syscall) {
|
|
1414
1365
|
return Object.assign(/* @__PURE__ */ new Error(`${syscall} ${original.command} ENOENT`), {
|
|
@@ -1419,15 +1370,15 @@ var require_enoent = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/cros
|
|
|
1419
1370
|
spawnargs: original.args
|
|
1420
1371
|
});
|
|
1421
1372
|
}
|
|
1422
|
-
function hookChildProcess(cp
|
|
1373
|
+
function hookChildProcess(cp, parsed) {
|
|
1423
1374
|
if (!isWin) return;
|
|
1424
|
-
const originalEmit = cp
|
|
1425
|
-
cp
|
|
1375
|
+
const originalEmit = cp.emit;
|
|
1376
|
+
cp.emit = function(name, arg1) {
|
|
1426
1377
|
if (name === "exit") {
|
|
1427
1378
|
const err = verifyENOENT(arg1, parsed);
|
|
1428
|
-
if (err) return originalEmit.call(cp
|
|
1379
|
+
if (err) return originalEmit.call(cp, "error", err);
|
|
1429
1380
|
}
|
|
1430
|
-
return originalEmit.apply(cp
|
|
1381
|
+
return originalEmit.apply(cp, arguments);
|
|
1431
1382
|
};
|
|
1432
1383
|
}
|
|
1433
1384
|
function verifyENOENT(status, parsed) {
|
|
@@ -1444,45 +1395,37 @@ var require_enoent = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/cros
|
|
|
1444
1395
|
verifyENOENTSync,
|
|
1445
1396
|
notFoundError
|
|
1446
1397
|
};
|
|
1447
|
-
})
|
|
1448
|
-
|
|
1398
|
+
}));
|
|
1449
1399
|
//#endregion
|
|
1450
|
-
//#region ../../node_modules/.pnpm/
|
|
1451
|
-
var
|
|
1400
|
+
//#region ../../node_modules/.pnpm/path-key@4.0.0/node_modules/path-key/index.js
|
|
1401
|
+
var import_cross_spawn = /* @__PURE__ */ __toESM((/* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
1452
1402
|
const cp = __require("child_process");
|
|
1453
1403
|
const parse = require_parse();
|
|
1454
1404
|
const enoent = require_enoent();
|
|
1455
|
-
function spawn
|
|
1405
|
+
function spawn(command, args, options) {
|
|
1456
1406
|
const parsed = parse(command, args, options);
|
|
1457
1407
|
const spawned = cp.spawn(parsed.command, parsed.args, parsed.options);
|
|
1458
1408
|
enoent.hookChildProcess(spawned, parsed);
|
|
1459
1409
|
return spawned;
|
|
1460
1410
|
}
|
|
1461
|
-
function spawnSync
|
|
1411
|
+
function spawnSync(command, args, options) {
|
|
1462
1412
|
const parsed = parse(command, args, options);
|
|
1463
1413
|
const result = cp.spawnSync(parsed.command, parsed.args, parsed.options);
|
|
1464
1414
|
result.error = result.error || enoent.verifyENOENTSync(result.status, parsed);
|
|
1465
1415
|
return result;
|
|
1466
1416
|
}
|
|
1467
|
-
module.exports = spawn
|
|
1468
|
-
module.exports.spawn = spawn
|
|
1469
|
-
module.exports.sync = spawnSync
|
|
1417
|
+
module.exports = spawn;
|
|
1418
|
+
module.exports.spawn = spawn;
|
|
1419
|
+
module.exports.sync = spawnSync;
|
|
1470
1420
|
module.exports._parse = parse;
|
|
1471
1421
|
module.exports._enoent = enoent;
|
|
1472
|
-
})
|
|
1473
|
-
|
|
1474
|
-
//#endregion
|
|
1475
|
-
//#region ../../node_modules/.pnpm/path-key@4.0.0/node_modules/path-key/index.js
|
|
1476
|
-
var import_cross_spawn = /* @__PURE__ */ __toESM(require_cross_spawn(), 1);
|
|
1422
|
+
})))(), 1);
|
|
1477
1423
|
function pathKey(options = {}) {
|
|
1478
|
-
const { env = process.env, platform
|
|
1479
|
-
if (platform
|
|
1424
|
+
const { env = process.env, platform = process.platform } = options;
|
|
1425
|
+
if (platform !== "win32") return "PATH";
|
|
1480
1426
|
return Object.keys(env).reverse().find((key) => key.toUpperCase() === "PATH") || "Path";
|
|
1481
1427
|
}
|
|
1482
|
-
|
|
1483
|
-
//#endregion
|
|
1484
|
-
//#region ../../node_modules/.pnpm/unicorn-magic@0.3.0/node_modules/unicorn-magic/node.js
|
|
1485
|
-
const execFileOriginal = promisify(execFile);
|
|
1428
|
+
promisify(execFile);
|
|
1486
1429
|
function toPath(urlOrPath) {
|
|
1487
1430
|
return urlOrPath instanceof URL ? fileURLToPath(urlOrPath) : urlOrPath;
|
|
1488
1431
|
}
|
|
@@ -1497,16 +1440,14 @@ function traversePathUp(startPath) {
|
|
|
1497
1440
|
}
|
|
1498
1441
|
} };
|
|
1499
1442
|
}
|
|
1500
|
-
const TEN_MEGABYTES_IN_BYTES = 10 * 1024 * 1024;
|
|
1501
|
-
|
|
1502
1443
|
//#endregion
|
|
1503
1444
|
//#region ../../node_modules/.pnpm/npm-run-path@6.0.0/node_modules/npm-run-path/index.js
|
|
1504
|
-
const npmRunPath = ({ cwd = process$1.cwd(), path: pathOption = process$1.env[pathKey()], preferLocal = true, execPath
|
|
1445
|
+
const npmRunPath = ({ cwd = process$1.cwd(), path: pathOption = process$1.env[pathKey()], preferLocal = true, execPath = process$1.execPath, addExecPath = true } = {}) => {
|
|
1505
1446
|
const cwdPath = path.resolve(toPath(cwd));
|
|
1506
1447
|
const result = [];
|
|
1507
1448
|
const pathParts = pathOption.split(path.delimiter);
|
|
1508
1449
|
if (preferLocal) applyPreferLocal(result, pathParts, cwdPath);
|
|
1509
|
-
if (addExecPath) applyExecPath(result, pathParts, execPath
|
|
1450
|
+
if (addExecPath) applyExecPath(result, pathParts, execPath, cwdPath);
|
|
1510
1451
|
return pathOption === "" || pathOption === path.delimiter ? `${result.join(path.delimiter)}${pathOption}` : [...result, pathOption].join(path.delimiter);
|
|
1511
1452
|
};
|
|
1512
1453
|
const applyPreferLocal = (result, pathParts, cwdPath) => {
|
|
@@ -1515,18 +1456,17 @@ const applyPreferLocal = (result, pathParts, cwdPath) => {
|
|
|
1515
1456
|
if (!pathParts.includes(pathPart)) result.push(pathPart);
|
|
1516
1457
|
}
|
|
1517
1458
|
};
|
|
1518
|
-
const applyExecPath = (result, pathParts, execPath
|
|
1519
|
-
const pathPart = path.resolve(cwdPath, toPath(execPath
|
|
1459
|
+
const applyExecPath = (result, pathParts, execPath, cwdPath) => {
|
|
1460
|
+
const pathPart = path.resolve(cwdPath, toPath(execPath), "..");
|
|
1520
1461
|
if (!pathParts.includes(pathPart)) result.push(pathPart);
|
|
1521
1462
|
};
|
|
1522
|
-
const npmRunPathEnv = ({ env = process$1.env
|
|
1463
|
+
const npmRunPathEnv = ({ env = process$1.env, ...options } = {}) => {
|
|
1523
1464
|
env = { ...env };
|
|
1524
1465
|
const pathName = pathKey({ env });
|
|
1525
1466
|
options.path = env[pathName];
|
|
1526
1467
|
env[pathName] = npmRunPath(options);
|
|
1527
1468
|
return env;
|
|
1528
1469
|
};
|
|
1529
|
-
|
|
1530
1470
|
//#endregion
|
|
1531
1471
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/return/final-error.js
|
|
1532
1472
|
const getFinalError = (originalError, message, isSync) => {
|
|
@@ -1554,11 +1494,10 @@ var ExecaError = class extends Error {};
|
|
|
1554
1494
|
setErrorName(ExecaError, ExecaError.name);
|
|
1555
1495
|
var ExecaSyncError = class extends Error {};
|
|
1556
1496
|
setErrorName(ExecaSyncError, ExecaSyncError.name);
|
|
1557
|
-
|
|
1558
1497
|
//#endregion
|
|
1559
|
-
//#region ../../node_modules/.pnpm/human-signals@8.0.
|
|
1498
|
+
//#region ../../node_modules/.pnpm/human-signals@8.0.1/node_modules/human-signals/build/src/realtime.js
|
|
1560
1499
|
const getRealtimeSignals = () => {
|
|
1561
|
-
const length =
|
|
1500
|
+
const length = 64 - SIGRTMIN + 1;
|
|
1562
1501
|
return Array.from({ length }, getRealtimeSignal);
|
|
1563
1502
|
};
|
|
1564
1503
|
const getRealtimeSignal = (value, index) => ({
|
|
@@ -1569,10 +1508,8 @@ const getRealtimeSignal = (value, index) => ({
|
|
|
1569
1508
|
standard: "posix"
|
|
1570
1509
|
});
|
|
1571
1510
|
const SIGRTMIN = 34;
|
|
1572
|
-
const SIGRTMAX = 64;
|
|
1573
|
-
|
|
1574
1511
|
//#endregion
|
|
1575
|
-
//#region ../../node_modules/.pnpm/human-signals@8.0.
|
|
1512
|
+
//#region ../../node_modules/.pnpm/human-signals@8.0.1/node_modules/human-signals/build/src/core.js
|
|
1576
1513
|
const SIGNALS = [
|
|
1577
1514
|
{
|
|
1578
1515
|
name: "SIGHUP",
|
|
@@ -1844,9 +1781,8 @@ const SIGNALS = [
|
|
|
1844
1781
|
standard: "other"
|
|
1845
1782
|
}
|
|
1846
1783
|
];
|
|
1847
|
-
|
|
1848
1784
|
//#endregion
|
|
1849
|
-
//#region ../../node_modules/.pnpm/human-signals@8.0.
|
|
1785
|
+
//#region ../../node_modules/.pnpm/human-signals@8.0.1/node_modules/human-signals/build/src/signals.js
|
|
1850
1786
|
const getSignals = () => {
|
|
1851
1787
|
const realtimeSignals = getRealtimeSignals();
|
|
1852
1788
|
return [...SIGNALS, ...realtimeSignals].map(normalizeSignal$1);
|
|
@@ -1864,12 +1800,11 @@ const normalizeSignal$1 = ({ name, number: defaultNumber, description, action, f
|
|
|
1864
1800
|
standard
|
|
1865
1801
|
};
|
|
1866
1802
|
};
|
|
1867
|
-
|
|
1868
1803
|
//#endregion
|
|
1869
|
-
//#region ../../node_modules/.pnpm/human-signals@8.0.
|
|
1804
|
+
//#region ../../node_modules/.pnpm/human-signals@8.0.1/node_modules/human-signals/build/src/main.js
|
|
1870
1805
|
const getSignalsByName = () => {
|
|
1871
|
-
const signals
|
|
1872
|
-
return Object.fromEntries(signals
|
|
1806
|
+
const signals = getSignals();
|
|
1807
|
+
return Object.fromEntries(signals.map(getSignalByName));
|
|
1873
1808
|
};
|
|
1874
1809
|
const getSignalByName = ({ name, number, description, supported, action, forced, standard }) => [name, {
|
|
1875
1810
|
name,
|
|
@@ -1882,13 +1817,12 @@ const getSignalByName = ({ name, number, description, supported, action, forced,
|
|
|
1882
1817
|
}];
|
|
1883
1818
|
const signalsByName = getSignalsByName();
|
|
1884
1819
|
const getSignalsByNumber = () => {
|
|
1885
|
-
const signals
|
|
1886
|
-
const
|
|
1887
|
-
const signalsA = Array.from({ length }, (value, number) => getSignalByNumber(number, signals$1));
|
|
1820
|
+
const signals = getSignals();
|
|
1821
|
+
const signalsA = Array.from({ length: 65 }, (value, number) => getSignalByNumber(number, signals));
|
|
1888
1822
|
return Object.assign({}, ...signalsA);
|
|
1889
1823
|
};
|
|
1890
|
-
const getSignalByNumber = (number, signals
|
|
1891
|
-
const signal = findSignalByNumber(number, signals
|
|
1824
|
+
const getSignalByNumber = (number, signals) => {
|
|
1825
|
+
const signal = findSignalByNumber(number, signals);
|
|
1892
1826
|
if (signal === void 0) return {};
|
|
1893
1827
|
const { name, description, supported, action, forced, standard } = signal;
|
|
1894
1828
|
return { [number]: {
|
|
@@ -1901,13 +1835,12 @@ const getSignalByNumber = (number, signals$1) => {
|
|
|
1901
1835
|
standard
|
|
1902
1836
|
} };
|
|
1903
1837
|
};
|
|
1904
|
-
const findSignalByNumber = (number, signals
|
|
1905
|
-
const signal = signals
|
|
1838
|
+
const findSignalByNumber = (number, signals) => {
|
|
1839
|
+
const signal = signals.find(({ name }) => constants.signals[name] === number);
|
|
1906
1840
|
if (signal !== void 0) return signal;
|
|
1907
|
-
return signals
|
|
1841
|
+
return signals.find((signalA) => signalA.number === number);
|
|
1908
1842
|
};
|
|
1909
|
-
|
|
1910
|
-
|
|
1843
|
+
getSignalsByNumber();
|
|
1911
1844
|
//#endregion
|
|
1912
1845
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/terminate/signal.js
|
|
1913
1846
|
const normalizeKillSignal = (killSignal) => {
|
|
@@ -1937,7 +1870,6 @@ Available signal numbers: ${getAvailableSignalIntegers()}.`;
|
|
|
1937
1870
|
const getAvailableSignalNames = () => Object.keys(constants.signals).sort().map((signalName) => `'${signalName}'`).join(", ");
|
|
1938
1871
|
const getAvailableSignalIntegers = () => [...new Set(Object.values(constants.signals).sort((signalInteger, signalIntegerTwo) => signalInteger - signalIntegerTwo))].join(", ");
|
|
1939
1872
|
const getSignalDescription = (signal) => signalsByName[signal].description;
|
|
1940
|
-
|
|
1941
1873
|
//#endregion
|
|
1942
1874
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/terminate/kill.js
|
|
1943
1875
|
const normalizeForceKillAfterDelay = (forceKillAfterDelay) => {
|
|
@@ -1989,13 +1921,11 @@ const killOnTimeout = async ({ kill, forceKillAfterDelay, context, controllerSig
|
|
|
1989
1921
|
if (kill("SIGKILL")) context.isForcefullyTerminated ??= true;
|
|
1990
1922
|
} catch {}
|
|
1991
1923
|
};
|
|
1992
|
-
|
|
1993
1924
|
//#endregion
|
|
1994
1925
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/utils/abort-signal.js
|
|
1995
1926
|
const onAbortedSignal = async (mainSignal, stopSignal) => {
|
|
1996
1927
|
if (!mainSignal.aborted) await once(mainSignal, "abort", { signal: stopSignal });
|
|
1997
1928
|
};
|
|
1998
|
-
|
|
1999
1929
|
//#endregion
|
|
2000
1930
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/terminate/cancel.js
|
|
2001
1931
|
const validateCancelSignal = ({ cancelSignal }) => {
|
|
@@ -2008,18 +1938,17 @@ const terminateOnCancel = async (subprocess, cancelSignal, context, { signal })
|
|
|
2008
1938
|
subprocess.kill();
|
|
2009
1939
|
throw cancelSignal.reason;
|
|
2010
1940
|
};
|
|
2011
|
-
|
|
2012
1941
|
//#endregion
|
|
2013
1942
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/ipc/validation.js
|
|
2014
|
-
const validateIpcMethod = ({ methodName, isSubprocess, ipc, isConnected
|
|
1943
|
+
const validateIpcMethod = ({ methodName, isSubprocess, ipc, isConnected }) => {
|
|
2015
1944
|
validateIpcOption(methodName, isSubprocess, ipc);
|
|
2016
|
-
validateConnection(methodName, isSubprocess, isConnected
|
|
1945
|
+
validateConnection(methodName, isSubprocess, isConnected);
|
|
2017
1946
|
};
|
|
2018
1947
|
const validateIpcOption = (methodName, isSubprocess, ipc) => {
|
|
2019
1948
|
if (!ipc) throw new Error(`${getMethodName(methodName, isSubprocess)} can only be used if the \`ipc\` option is \`true\`.`);
|
|
2020
1949
|
};
|
|
2021
|
-
const validateConnection = (methodName, isSubprocess, isConnected
|
|
2022
|
-
if (!isConnected
|
|
1950
|
+
const validateConnection = (methodName, isSubprocess, isConnected) => {
|
|
1951
|
+
if (!isConnected) throw new Error(`${getMethodName(methodName, isSubprocess)} cannot be used: the ${getOtherProcessName(isSubprocess)} has already exited or disconnected.`);
|
|
2023
1952
|
};
|
|
2024
1953
|
const throwOnEarlyDisconnect = (isSubprocess) => {
|
|
2025
1954
|
throw new Error(`${getMethodName("getOneMessage", isSubprocess)} could not complete: the ${getOtherProcessName(isSubprocess)} exited or disconnected.`);
|
|
@@ -2063,7 +1992,6 @@ const getOtherProcessName = (isSubprocess) => isSubprocess ? "parent process" :
|
|
|
2063
1992
|
const disconnect = (anyProcess) => {
|
|
2064
1993
|
if (anyProcess.connected) anyProcess.disconnect();
|
|
2065
1994
|
};
|
|
2066
|
-
|
|
2067
1995
|
//#endregion
|
|
2068
1996
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/utils/deferred.js
|
|
2069
1997
|
const createDeferred = () => {
|
|
@@ -2076,7 +2004,6 @@ const createDeferred = () => {
|
|
|
2076
2004
|
});
|
|
2077
2005
|
return Object.assign(promise, methods);
|
|
2078
2006
|
};
|
|
2079
|
-
|
|
2080
2007
|
//#endregion
|
|
2081
2008
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/arguments/fd-options.js
|
|
2082
2009
|
const getToStream = (destination, to = "stdin") => {
|
|
@@ -2153,7 +2080,6 @@ const serializeOptionValue = (value) => {
|
|
|
2153
2080
|
if (typeof value === "string") return `'${value}'`;
|
|
2154
2081
|
return typeof value === "number" ? `${value}` : "Stream";
|
|
2155
2082
|
};
|
|
2156
|
-
|
|
2157
2083
|
//#endregion
|
|
2158
2084
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/utils/max-listeners.js
|
|
2159
2085
|
const incrementMaxListeners = (eventEmitter, maxListenersIncrement, signal) => {
|
|
@@ -2164,7 +2090,6 @@ const incrementMaxListeners = (eventEmitter, maxListenersIncrement, signal) => {
|
|
|
2164
2090
|
eventEmitter.setMaxListeners(eventEmitter.getMaxListeners() - maxListenersIncrement);
|
|
2165
2091
|
});
|
|
2166
2092
|
};
|
|
2167
|
-
|
|
2168
2093
|
//#endregion
|
|
2169
2094
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/ipc/reference.js
|
|
2170
2095
|
const addReference = (channel, reference) => {
|
|
@@ -2191,7 +2116,6 @@ const redoAddedReferences = (channel, isSubprocess) => {
|
|
|
2191
2116
|
addReferenceCount(channel);
|
|
2192
2117
|
}
|
|
2193
2118
|
};
|
|
2194
|
-
|
|
2195
2119
|
//#endregion
|
|
2196
2120
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/ipc/incoming.js
|
|
2197
2121
|
const onMessage = async ({ anyProcess, channel, isSubprocess, ipcEmitter }, wrappedMessage) => {
|
|
@@ -2225,7 +2149,6 @@ const onDisconnect = async ({ anyProcess, channel, isSubprocess, ipcEmitter, bou
|
|
|
2225
2149
|
ipcEmitter.emit("disconnect");
|
|
2226
2150
|
};
|
|
2227
2151
|
const INCOMING_MESSAGES = /* @__PURE__ */ new WeakMap();
|
|
2228
|
-
|
|
2229
2152
|
//#endregion
|
|
2230
2153
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/ipc/forward.js
|
|
2231
2154
|
const getIpcEmitter = (anyProcess, channel, isSubprocess) => {
|
|
@@ -2263,7 +2186,6 @@ const isConnected = (anyProcess) => {
|
|
|
2263
2186
|
const ipcEmitter = IPC_EMITTERS.get(anyProcess);
|
|
2264
2187
|
return ipcEmitter === void 0 ? anyProcess.channel !== null : ipcEmitter.connected;
|
|
2265
2188
|
};
|
|
2266
|
-
|
|
2267
2189
|
//#endregion
|
|
2268
2190
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/ipc/strict.js
|
|
2269
2191
|
const handleSendStrict = ({ anyProcess, channel, isSubprocess, message, strict }) => {
|
|
@@ -2335,7 +2257,6 @@ const throwOnDisconnect$1 = async (anyProcess, isSubprocess, { signal }) => {
|
|
|
2335
2257
|
};
|
|
2336
2258
|
const REQUEST_TYPE = "execa:ipc:request";
|
|
2337
2259
|
const RESPONSE_TYPE = "execa:ipc:response";
|
|
2338
|
-
|
|
2339
2260
|
//#endregion
|
|
2340
2261
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/ipc/outgoing.js
|
|
2341
2262
|
const startSendMessage = (anyProcess, wrappedMessage, strict) => {
|
|
@@ -2365,7 +2286,6 @@ const waitForOutgoingMessages = async (anyProcess, ipcEmitter, wrappedMessage) =
|
|
|
2365
2286
|
const OUTGOING_MESSAGES = /* @__PURE__ */ new WeakMap();
|
|
2366
2287
|
const hasMessageListeners = (anyProcess, ipcEmitter) => ipcEmitter.listenerCount("message") > getMinListenerCount(anyProcess);
|
|
2367
2288
|
const getMinListenerCount = (anyProcess) => SUBPROCESS_OPTIONS.has(anyProcess) && !getFdSpecificValue(SUBPROCESS_OPTIONS.get(anyProcess).options.buffer, "ipc") ? 1 : 0;
|
|
2368
|
-
|
|
2369
2289
|
//#endregion
|
|
2370
2290
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/ipc/send.js
|
|
2371
2291
|
const sendMessage$1 = ({ anyProcess, channel, isSubprocess, ipc }, message, { strict = false } = {}) => {
|
|
@@ -2435,7 +2355,6 @@ const getSendMethod = (anyProcess) => {
|
|
|
2435
2355
|
return sendMethod;
|
|
2436
2356
|
};
|
|
2437
2357
|
const PROCESS_SEND_METHODS = /* @__PURE__ */ new WeakMap();
|
|
2438
|
-
|
|
2439
2358
|
//#endregion
|
|
2440
2359
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/ipc/graceful.js
|
|
2441
2360
|
const sendAbort = (subprocess, message) => {
|
|
@@ -2486,7 +2405,6 @@ const abortOnDisconnect = () => {
|
|
|
2486
2405
|
cancelController.abort(getAbortDisconnectError());
|
|
2487
2406
|
};
|
|
2488
2407
|
const cancelController = new AbortController();
|
|
2489
|
-
|
|
2490
2408
|
//#endregion
|
|
2491
2409
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/terminate/graceful.js
|
|
2492
2410
|
const validateGracefulCancel = ({ gracefulCancel, cancelSignal, ipc, serialization }) => {
|
|
@@ -2525,7 +2443,6 @@ const getReason = ({ reason }) => {
|
|
|
2525
2443
|
});
|
|
2526
2444
|
return error;
|
|
2527
2445
|
};
|
|
2528
|
-
|
|
2529
2446
|
//#endregion
|
|
2530
2447
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/terminate/timeout.js
|
|
2531
2448
|
const validateTimeout = ({ timeout }) => {
|
|
@@ -2538,7 +2455,6 @@ const killAfterTimeout = async (subprocess, timeout, context, { signal }) => {
|
|
|
2538
2455
|
subprocess.kill();
|
|
2539
2456
|
throw new DiscardedError();
|
|
2540
2457
|
};
|
|
2541
|
-
|
|
2542
2458
|
//#endregion
|
|
2543
2459
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/methods/node.js
|
|
2544
2460
|
const mapNode = ({ options }) => {
|
|
@@ -2548,7 +2464,7 @@ const mapNode = ({ options }) => {
|
|
|
2548
2464
|
node: true
|
|
2549
2465
|
} };
|
|
2550
2466
|
};
|
|
2551
|
-
const handleNodeOption = (file, commandArguments, { node: shouldHandleNode = false, nodePath = execPath, nodeOptions = execArgv.filter((nodeOption) => !nodeOption.startsWith("--inspect")), cwd, execPath: formerNodePath
|
|
2467
|
+
const handleNodeOption = (file, commandArguments, { node: shouldHandleNode = false, nodePath = execPath, nodeOptions = execArgv.filter((nodeOption) => !nodeOption.startsWith("--inspect")), cwd, execPath: formerNodePath, ...options }) => {
|
|
2552
2468
|
if (formerNodePath !== void 0) throw new TypeError("The \"execPath\" option has been removed. Please use the \"nodePath\" option instead.");
|
|
2553
2469
|
const normalizedNodePath = safeNormalizeFileUrl(nodePath, "The \"nodePath\" option");
|
|
2554
2470
|
const resolvedNodePath = path.resolve(cwd, normalizedNodePath);
|
|
@@ -2578,7 +2494,6 @@ const handleNodeOption = (file, commandArguments, { node: shouldHandleNode = fal
|
|
|
2578
2494
|
}
|
|
2579
2495
|
];
|
|
2580
2496
|
};
|
|
2581
|
-
|
|
2582
2497
|
//#endregion
|
|
2583
2498
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/ipc/ipc-input.js
|
|
2584
2499
|
const validateIpcInputOption = ({ ipcInput, ipc, serialization }) => {
|
|
@@ -2608,7 +2523,6 @@ const sendIpcInput = async (subprocess, ipcInput) => {
|
|
|
2608
2523
|
if (ipcInput === void 0) return;
|
|
2609
2524
|
await subprocess.sendMessage(ipcInput);
|
|
2610
2525
|
};
|
|
2611
|
-
|
|
2612
2526
|
//#endregion
|
|
2613
2527
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/arguments/encoding-option.js
|
|
2614
2528
|
const validateEncoding = ({ encoding }) => {
|
|
@@ -2616,7 +2530,7 @@ const validateEncoding = ({ encoding }) => {
|
|
|
2616
2530
|
const correctEncoding = getCorrectEncoding(encoding);
|
|
2617
2531
|
if (correctEncoding !== void 0) throw new TypeError(`Invalid option \`encoding: ${serializeEncoding(encoding)}\`.
|
|
2618
2532
|
Please rename it to ${serializeEncoding(correctEncoding)}.`);
|
|
2619
|
-
const correctEncodings = [...ENCODINGS].map((correctEncoding
|
|
2533
|
+
const correctEncodings = [...ENCODINGS].map((correctEncoding) => serializeEncoding(correctEncoding)).join(", ");
|
|
2620
2534
|
throw new TypeError(`Invalid option \`encoding: ${serializeEncoding(encoding)}\`.
|
|
2621
2535
|
Please rename it to one of: ${correctEncodings}.`);
|
|
2622
2536
|
};
|
|
@@ -2645,7 +2559,6 @@ const ENCODING_ALIASES = {
|
|
|
2645
2559
|
binary: "latin1"
|
|
2646
2560
|
};
|
|
2647
2561
|
const serializeEncoding = (encoding) => typeof encoding === "string" ? `"${encoding}"` : String(encoding);
|
|
2648
|
-
|
|
2649
2562
|
//#endregion
|
|
2650
2563
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/arguments/cwd.js
|
|
2651
2564
|
const normalizeCwd = (cwd = getDefaultCwd()) => {
|
|
@@ -2671,7 +2584,6 @@ const fixCwdError = (originalMessage, cwd) => {
|
|
|
2671
2584
|
if (!cwdStat.isDirectory()) return `The "cwd" option is not a directory: ${cwd}.\n${originalMessage}`;
|
|
2672
2585
|
return originalMessage;
|
|
2673
2586
|
};
|
|
2674
|
-
|
|
2675
2587
|
//#endregion
|
|
2676
2588
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/arguments/options.js
|
|
2677
2589
|
const normalizeOptions = (filePath, rawArguments, rawOptions) => {
|
|
@@ -2696,7 +2608,7 @@ const normalizeOptions = (filePath, rawArguments, rawOptions) => {
|
|
|
2696
2608
|
options
|
|
2697
2609
|
};
|
|
2698
2610
|
};
|
|
2699
|
-
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"
|
|
2611
|
+
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 }) => ({
|
|
2700
2612
|
...options,
|
|
2701
2613
|
extendEnv,
|
|
2702
2614
|
preferLocal,
|
|
@@ -2728,7 +2640,6 @@ const getEnv = ({ env: envOption, extendEnv, preferLocal, node, localDirectory,
|
|
|
2728
2640
|
});
|
|
2729
2641
|
return env;
|
|
2730
2642
|
};
|
|
2731
|
-
|
|
2732
2643
|
//#endregion
|
|
2733
2644
|
//#region ../../node_modules/.pnpm/strip-final-newline@4.0.0/node_modules/strip-final-newline/index.js
|
|
2734
2645
|
function stripFinalNewline(input) {
|
|
@@ -2742,22 +2653,20 @@ const LF = "\n";
|
|
|
2742
2653
|
const LF_BINARY = LF.codePointAt(0);
|
|
2743
2654
|
const CR = "\r";
|
|
2744
2655
|
const CR_BINARY = CR.codePointAt(0);
|
|
2745
|
-
|
|
2746
2656
|
//#endregion
|
|
2747
2657
|
//#region ../../node_modules/.pnpm/is-stream@4.0.1/node_modules/is-stream/index.js
|
|
2748
2658
|
function isStream(stream, { checkOpen = true } = {}) {
|
|
2749
2659
|
return stream !== null && typeof stream === "object" && (stream.writable || stream.readable || !checkOpen || stream.writable === void 0 && stream.readable === void 0) && typeof stream.pipe === "function";
|
|
2750
2660
|
}
|
|
2751
|
-
function isWritableStream(stream, { checkOpen = true } = {}) {
|
|
2661
|
+
function isWritableStream$1(stream, { checkOpen = true } = {}) {
|
|
2752
2662
|
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";
|
|
2753
2663
|
}
|
|
2754
|
-
function isReadableStream(stream, { checkOpen = true } = {}) {
|
|
2664
|
+
function isReadableStream$1(stream, { checkOpen = true } = {}) {
|
|
2755
2665
|
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";
|
|
2756
2666
|
}
|
|
2757
2667
|
function isDuplexStream(stream, options) {
|
|
2758
|
-
return isWritableStream(stream, options) && isReadableStream(stream, options);
|
|
2668
|
+
return isWritableStream$1(stream, options) && isReadableStream$1(stream, options);
|
|
2759
2669
|
}
|
|
2760
|
-
|
|
2761
2670
|
//#endregion
|
|
2762
2671
|
//#region ../../node_modules/.pnpm/@sec-ant+readable-stream@0.4.1/node_modules/@sec-ant/readable-stream/dist/ponyfill/asyncIterator.js
|
|
2763
2672
|
const a = Object.getPrototypeOf(Object.getPrototypeOf(
|
|
@@ -2838,11 +2747,10 @@ function h({ preventCancel: r = !1 } = {}) {
|
|
|
2838
2747
|
const t = new c(this.getReader(), r), s = Object.create(u);
|
|
2839
2748
|
return s[n] = t, s;
|
|
2840
2749
|
}
|
|
2841
|
-
|
|
2842
2750
|
//#endregion
|
|
2843
2751
|
//#region ../../node_modules/.pnpm/get-stream@9.0.1/node_modules/get-stream/source/stream.js
|
|
2844
2752
|
const getAsyncIterable = (stream) => {
|
|
2845
|
-
if (isReadableStream(stream, { checkOpen: false }) && nodeImports.on !== void 0) return getStreamIterable(stream);
|
|
2753
|
+
if (isReadableStream$1(stream, { checkOpen: false }) && nodeImports.on !== void 0) return getStreamIterable(stream);
|
|
2846
2754
|
if (typeof stream?.[Symbol.asyncIterator] === "function") return stream;
|
|
2847
2755
|
if (toString.call(stream) === "[object ReadableStream]") return h.call(stream);
|
|
2848
2756
|
throw new TypeError("The first argument must be a Readable, a ReadableStream, or an async iterable.");
|
|
@@ -2876,7 +2784,6 @@ const handleStreamEnd = async (stream, controller, state) => {
|
|
|
2876
2784
|
}
|
|
2877
2785
|
};
|
|
2878
2786
|
const nodeImports = {};
|
|
2879
|
-
|
|
2880
2787
|
//#endregion
|
|
2881
2788
|
//#region ../../node_modules/.pnpm/get-stream@9.0.1/node_modules/get-stream/source/contents.js
|
|
2882
2789
|
const getStreamContents$1 = async (stream, { init, convertChunk, getSize, truncateChunk, addChunk, getFinalChunk, finalize }, { maxBuffer = Number.POSITIVE_INFINITY } = {}) => {
|
|
@@ -2952,7 +2859,6 @@ var MaxBufferError = class extends Error {
|
|
|
2952
2859
|
super("maxBuffer exceeded");
|
|
2953
2860
|
}
|
|
2954
2861
|
};
|
|
2955
|
-
|
|
2956
2862
|
//#endregion
|
|
2957
2863
|
//#region ../../node_modules/.pnpm/get-stream@9.0.1/node_modules/get-stream/source/utils.js
|
|
2958
2864
|
const identity = (value) => value;
|
|
@@ -2962,7 +2868,6 @@ const throwObjectStream = (chunk) => {
|
|
|
2962
2868
|
throw new Error(`Streams in object mode are not supported: ${String(chunk)}`);
|
|
2963
2869
|
};
|
|
2964
2870
|
const getLengthProperty = (convertedChunk) => convertedChunk.length;
|
|
2965
|
-
|
|
2966
2871
|
//#endregion
|
|
2967
2872
|
//#region ../../node_modules/.pnpm/get-stream@9.0.1/node_modules/get-stream/source/array.js
|
|
2968
2873
|
async function getStreamAsArray(stream, options) {
|
|
@@ -2990,7 +2895,6 @@ const arrayMethods = {
|
|
|
2990
2895
|
getFinalChunk: noop$1,
|
|
2991
2896
|
finalize: getContentsProperty
|
|
2992
2897
|
};
|
|
2993
|
-
|
|
2994
2898
|
//#endregion
|
|
2995
2899
|
//#region ../../node_modules/.pnpm/get-stream@9.0.1/node_modules/get-stream/source/array-buffer.js
|
|
2996
2900
|
async function getStreamAsArrayBuffer(stream, options) {
|
|
@@ -3042,7 +2946,6 @@ const arrayBufferMethods = {
|
|
|
3042
2946
|
getFinalChunk: noop$1,
|
|
3043
2947
|
finalize: finalizeArrayBuffer
|
|
3044
2948
|
};
|
|
3045
|
-
|
|
3046
2949
|
//#endregion
|
|
3047
2950
|
//#region ../../node_modules/.pnpm/get-stream@9.0.1/node_modules/get-stream/source/string.js
|
|
3048
2951
|
async function getStreamAsString(stream, options) {
|
|
@@ -3052,11 +2955,11 @@ const initString = () => ({
|
|
|
3052
2955
|
contents: "",
|
|
3053
2956
|
textDecoder: new TextDecoder()
|
|
3054
2957
|
});
|
|
3055
|
-
const useTextDecoder = (chunk, { textDecoder
|
|
2958
|
+
const useTextDecoder = (chunk, { textDecoder }) => textDecoder.decode(chunk, { stream: true });
|
|
3056
2959
|
const addStringChunk = (convertedChunk, { contents }) => contents + convertedChunk;
|
|
3057
2960
|
const truncateStringChunk = (convertedChunk, chunkSize) => convertedChunk.slice(0, chunkSize);
|
|
3058
|
-
const getFinalStringChunk = ({ textDecoder
|
|
3059
|
-
const finalChunk = textDecoder
|
|
2961
|
+
const getFinalStringChunk = ({ textDecoder }) => {
|
|
2962
|
+
const finalChunk = textDecoder.decode();
|
|
3060
2963
|
return finalChunk === "" ? void 0 : finalChunk;
|
|
3061
2964
|
};
|
|
3062
2965
|
const stringMethods = {
|
|
@@ -3075,7 +2978,6 @@ const stringMethods = {
|
|
|
3075
2978
|
getFinalChunk: getFinalStringChunk,
|
|
3076
2979
|
finalize: getContentsProperty
|
|
3077
2980
|
};
|
|
3078
|
-
|
|
3079
2981
|
//#endregion
|
|
3080
2982
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/io/max-buffer.js
|
|
3081
2983
|
const handleMaxBuffer = ({ error, stream, readableObjectMode, lines, encoding, fdNumber }) => {
|
|
@@ -3131,7 +3033,6 @@ const truncateMaxBufferSync = (result, isMaxBuffer, maxBuffer) => {
|
|
|
3131
3033
|
return result.length > maxBufferValue ? result.slice(0, maxBufferValue) : result;
|
|
3132
3034
|
};
|
|
3133
3035
|
const getMaxBufferSync = ([, stdoutMaxBuffer]) => stdoutMaxBuffer;
|
|
3134
|
-
|
|
3135
3036
|
//#endregion
|
|
3136
3037
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/return/message.js
|
|
3137
3038
|
const createMessages = ({ stdio, all, ipcOutput, originalError, signal, signalDescription, exitCode, escapedCommand, timedOut, isCanceled, isGracefullyCanceled, isMaxBuffer, isForcefullyTerminated, forceKillAfterDelay, killSignal, maxBuffer, timeout, cwd }) => {
|
|
@@ -3193,7 +3094,6 @@ const serializeMessageItem = (messageItem) => {
|
|
|
3193
3094
|
if (isUint8Array(messageItem)) return uint8ArrayToString(messageItem);
|
|
3194
3095
|
return "";
|
|
3195
3096
|
};
|
|
3196
|
-
|
|
3197
3097
|
//#endregion
|
|
3198
3098
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/return/result.js
|
|
3199
3099
|
const makeSuccessResult = ({ command, escapedCommand, stdio, all, ipcOutput, options: { cwd }, startTime }) => omitUndefinedProperties({
|
|
@@ -3311,7 +3211,6 @@ const normalizeExitPayload = (rawExitCode, rawSignal) => {
|
|
|
3311
3211
|
signalDescription: signal === void 0 ? void 0 : getSignalDescription(rawSignal)
|
|
3312
3212
|
};
|
|
3313
3213
|
};
|
|
3314
|
-
|
|
3315
3214
|
//#endregion
|
|
3316
3215
|
//#region ../../node_modules/.pnpm/parse-ms@4.0.0/node_modules/parse-ms/index.js
|
|
3317
3216
|
const toZeroIfInfinity = (value) => Number.isFinite(value) ? value : 0;
|
|
@@ -3346,11 +3245,10 @@ function parseMilliseconds(milliseconds) {
|
|
|
3346
3245
|
}
|
|
3347
3246
|
throw new TypeError("Expected a finite number or bigint");
|
|
3348
3247
|
}
|
|
3349
|
-
|
|
3350
3248
|
//#endregion
|
|
3351
3249
|
//#region ../../node_modules/.pnpm/pretty-ms@9.2.0/node_modules/pretty-ms/index.js
|
|
3352
3250
|
const isZero = (value) => value === 0 || value === 0n;
|
|
3353
|
-
const pluralize = (word, count
|
|
3251
|
+
const pluralize = (word, count) => count === 1 || count === 1n ? word : `${word}s`;
|
|
3354
3252
|
const SECOND_ROUNDING_EPSILON = 1e-7;
|
|
3355
3253
|
const ONE_DAY_IN_MILLISECONDS = 24n * 60n * 60n * 1000n;
|
|
3356
3254
|
function prettyMilliseconds(milliseconds, options) {
|
|
@@ -3399,16 +3297,16 @@ function prettyMilliseconds(milliseconds, options) {
|
|
|
3399
3297
|
add(Number(parsed.minutes), "minute", "m");
|
|
3400
3298
|
if (!options.hideSeconds) if (options.separateMilliseconds || options.formatSubMilliseconds || !options.colonNotation && milliseconds < 1e3) {
|
|
3401
3299
|
const seconds = Number(parsed.seconds);
|
|
3402
|
-
const milliseconds
|
|
3300
|
+
const milliseconds = Number(parsed.milliseconds);
|
|
3403
3301
|
const microseconds = Number(parsed.microseconds);
|
|
3404
3302
|
const nanoseconds = Number(parsed.nanoseconds);
|
|
3405
3303
|
add(seconds, "second", "s");
|
|
3406
3304
|
if (options.formatSubMilliseconds) {
|
|
3407
|
-
add(milliseconds
|
|
3305
|
+
add(milliseconds, "millisecond", "ms");
|
|
3408
3306
|
add(microseconds, "microsecond", "µs");
|
|
3409
3307
|
add(nanoseconds, "nanosecond", "ns");
|
|
3410
3308
|
} else {
|
|
3411
|
-
const millisecondsAndBelow = milliseconds
|
|
3309
|
+
const millisecondsAndBelow = milliseconds + microseconds / 1e3 + nanoseconds / 1e6;
|
|
3412
3310
|
const millisecondsDecimalDigits = typeof options.millisecondsDecimalDigits === "number" ? options.millisecondsDecimalDigits : 0;
|
|
3413
3311
|
const millisecondsString = millisecondsDecimalDigits ? millisecondsAndBelow.toFixed(millisecondsDecimalDigits) : millisecondsAndBelow >= 1 ? Math.round(millisecondsAndBelow) : Math.ceil(millisecondsAndBelow);
|
|
3414
3312
|
add(Number.parseFloat(millisecondsString), "millisecond", "ms", millisecondsString);
|
|
@@ -3423,7 +3321,6 @@ function prettyMilliseconds(milliseconds, options) {
|
|
|
3423
3321
|
if (typeof options.unitCount === "number") result = result.slice(0, Math.max(options.unitCount, 1));
|
|
3424
3322
|
return sign + result.join(separator);
|
|
3425
3323
|
}
|
|
3426
|
-
|
|
3427
3324
|
//#endregion
|
|
3428
3325
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/verbose/error.js
|
|
3429
3326
|
const logError = (result, verboseInfo) => {
|
|
@@ -3434,7 +3331,6 @@ const logError = (result, verboseInfo) => {
|
|
|
3434
3331
|
result
|
|
3435
3332
|
});
|
|
3436
3333
|
};
|
|
3437
|
-
|
|
3438
3334
|
//#endregion
|
|
3439
3335
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/verbose/complete.js
|
|
3440
3336
|
const logResult = (result, verboseInfo) => {
|
|
@@ -3450,7 +3346,6 @@ const logDuration = (result, verboseInfo) => {
|
|
|
3450
3346
|
result
|
|
3451
3347
|
});
|
|
3452
3348
|
};
|
|
3453
|
-
|
|
3454
3349
|
//#endregion
|
|
3455
3350
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/return/reject.js
|
|
3456
3351
|
const handleResult = (result, verboseInfo, { reject }) => {
|
|
@@ -3458,7 +3353,6 @@ const handleResult = (result, verboseInfo, { reject }) => {
|
|
|
3458
3353
|
if (result.failed && reject) throw result;
|
|
3459
3354
|
return result;
|
|
3460
3355
|
};
|
|
3461
|
-
|
|
3462
3356
|
//#endregion
|
|
3463
3357
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/stdio/type.js
|
|
3464
3358
|
const getStdioItemType = (value, optionName) => {
|
|
@@ -3525,10 +3419,10 @@ const KNOWN_STDIO_STRINGS = new Set([
|
|
|
3525
3419
|
"overlapped",
|
|
3526
3420
|
"pipe"
|
|
3527
3421
|
]);
|
|
3528
|
-
const isReadableStream
|
|
3529
|
-
const isWritableStream
|
|
3530
|
-
const isWebStream = (value) => isReadableStream
|
|
3531
|
-
const isTransformStream = (value) => isReadableStream
|
|
3422
|
+
const isReadableStream = (value) => Object.prototype.toString.call(value) === "[object ReadableStream]";
|
|
3423
|
+
const isWritableStream = (value) => Object.prototype.toString.call(value) === "[object WritableStream]";
|
|
3424
|
+
const isWebStream = (value) => isReadableStream(value) || isWritableStream(value);
|
|
3425
|
+
const isTransformStream = (value) => isReadableStream(value?.readable) && isWritableStream(value?.writable);
|
|
3532
3426
|
const isAsyncIterableObject = (value) => isObject(value) && typeof value[Symbol.asyncIterator] === "function";
|
|
3533
3427
|
const isIterableObject = (value) => isObject(value) && typeof value[Symbol.iterator] === "function";
|
|
3534
3428
|
const isObject = (value) => typeof value === "object" && value !== null;
|
|
@@ -3566,7 +3460,6 @@ const TYPE_TO_MESSAGE = {
|
|
|
3566
3460
|
string: "a string",
|
|
3567
3461
|
uint8Array: "a Uint8Array"
|
|
3568
3462
|
};
|
|
3569
|
-
|
|
3570
3463
|
//#endregion
|
|
3571
3464
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/transform/object-mode.js
|
|
3572
3465
|
const getTransformObjectModes = (objectMode, index, newTransforms, direction) => direction === "output" ? getOutputObjectModes(objectMode, index, newTransforms) : getInputObjectModes(objectMode, index, newTransforms);
|
|
@@ -3589,7 +3482,6 @@ const getFdObjectMode = (stdioItems, direction) => {
|
|
|
3589
3482
|
if (lastTransform === void 0) return false;
|
|
3590
3483
|
return direction === "input" ? lastTransform.value.writableObjectMode : lastTransform.value.readableObjectMode;
|
|
3591
3484
|
};
|
|
3592
|
-
|
|
3593
3485
|
//#endregion
|
|
3594
3486
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/transform/normalize.js
|
|
3595
3487
|
const normalizeTransforms = (stdioItems, optionName, direction, options) => [...stdioItems.filter(({ type }) => !TRANSFORM_TYPES.has(type)), ...getTransforms(stdioItems, optionName, direction, options)];
|
|
@@ -3666,7 +3558,6 @@ const normalizeGenerator = ({ stdioItem, stdioItem: { value }, index, newTransfo
|
|
|
3666
3558
|
};
|
|
3667
3559
|
};
|
|
3668
3560
|
const sortTransforms = (newTransforms, direction) => direction === "input" ? newTransforms.reverse() : newTransforms;
|
|
3669
|
-
|
|
3670
3561
|
//#endregion
|
|
3671
3562
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/stdio/direction.js
|
|
3672
3563
|
const getStreamDirection = (stdioItems, fdNumber, optionName) => {
|
|
@@ -3690,10 +3581,10 @@ const guessStreamDirection = {
|
|
|
3690
3581
|
iterable: alwaysInput,
|
|
3691
3582
|
asyncIterable: alwaysInput,
|
|
3692
3583
|
uint8Array: alwaysInput,
|
|
3693
|
-
webStream: (value) => isWritableStream
|
|
3584
|
+
webStream: (value) => isWritableStream(value) ? "output" : "input",
|
|
3694
3585
|
nodeStream(value) {
|
|
3695
|
-
if (!isReadableStream(value, { checkOpen: false })) return "output";
|
|
3696
|
-
return isWritableStream(value, { checkOpen: false }) ? void 0 : "input";
|
|
3586
|
+
if (!isReadableStream$1(value, { checkOpen: false })) return "output";
|
|
3587
|
+
return isWritableStream$1(value, { checkOpen: false }) ? void 0 : "input";
|
|
3697
3588
|
},
|
|
3698
3589
|
webTransform: anyDirection,
|
|
3699
3590
|
duplex: anyDirection,
|
|
@@ -3713,14 +3604,12 @@ const getStandardStreamDirection = (value) => {
|
|
|
3713
3604
|
].includes(value)) return "output";
|
|
3714
3605
|
};
|
|
3715
3606
|
const DEFAULT_DIRECTION = "output";
|
|
3716
|
-
|
|
3717
3607
|
//#endregion
|
|
3718
3608
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/ipc/array.js
|
|
3719
3609
|
const normalizeIpcStdioArray = (stdioArray, ipc) => ipc && !stdioArray.includes("ipc") ? [...stdioArray, "ipc"] : stdioArray;
|
|
3720
|
-
|
|
3721
3610
|
//#endregion
|
|
3722
3611
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/stdio/stdio-option.js
|
|
3723
|
-
const normalizeStdioOption = ({ stdio, ipc, buffer
|
|
3612
|
+
const normalizeStdioOption = ({ stdio, ipc, buffer, ...options }, verboseInfo, isSync) => {
|
|
3724
3613
|
const stdioArray = getStdioArray(stdio, options).map((stdioOption, fdNumber) => addDefaultValue(stdioOption, fdNumber));
|
|
3725
3614
|
return isSync ? normalizeStdioSync(stdioArray, buffer, verboseInfo) : normalizeIpcStdioArray(stdioArray, ipc);
|
|
3726
3615
|
};
|
|
@@ -3744,7 +3633,6 @@ const addDefaultValue = (stdioOption, fdNumber) => {
|
|
|
3744
3633
|
};
|
|
3745
3634
|
const normalizeStdioSync = (stdioArray, buffer, verboseInfo) => stdioArray.map((stdioOption, fdNumber) => !buffer[fdNumber] && fdNumber !== 0 && !isFullVerbose(verboseInfo, fdNumber) && isOutputPipeOnly(stdioOption) ? "ignore" : stdioOption);
|
|
3746
3635
|
const isOutputPipeOnly = (stdioOption) => stdioOption === "pipe" || Array.isArray(stdioOption) && stdioOption.every((item) => item === "pipe");
|
|
3747
|
-
|
|
3748
3636
|
//#endregion
|
|
3749
3637
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/stdio/native.js
|
|
3750
3638
|
const handleNativeStream = ({ stdioItem, stdioItem: { type }, isStdioArray, fdNumber, direction, isSync }) => {
|
|
@@ -3813,7 +3701,6 @@ const getStandardStream = (fdNumber, value, optionName) => {
|
|
|
3813
3701
|
if (standardStream === void 0) throw new TypeError(`The \`${optionName}: ${value}\` option is invalid: no such standard stream.`);
|
|
3814
3702
|
return standardStream;
|
|
3815
3703
|
};
|
|
3816
|
-
|
|
3817
3704
|
//#endregion
|
|
3818
3705
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/stdio/input-option.js
|
|
3819
3706
|
const handleInputOptions = ({ input, inputFile }, fdNumber) => fdNumber === 0 ? [...handleInputOption(input), ...handleInputFileOption(inputFile)] : [];
|
|
@@ -3823,7 +3710,7 @@ const handleInputOption = (input) => input === void 0 ? [] : [{
|
|
|
3823
3710
|
optionName: "input"
|
|
3824
3711
|
}];
|
|
3825
3712
|
const getInputType = (input) => {
|
|
3826
|
-
if (isReadableStream(input, { checkOpen: false })) return "nodeStream";
|
|
3713
|
+
if (isReadableStream$1(input, { checkOpen: false })) return "nodeStream";
|
|
3827
3714
|
if (typeof input === "string") return "string";
|
|
3828
3715
|
if (isUint8Array(input)) return "uint8Array";
|
|
3829
3716
|
throw new Error("The `input` option must be a string, a Uint8Array or a Node.js Readable stream.");
|
|
@@ -3843,7 +3730,6 @@ const getInputFileType = (inputFile) => {
|
|
|
3843
3730
|
};
|
|
3844
3731
|
throw new Error("The `inputFile` option must be a file path string or a file URL.");
|
|
3845
3732
|
};
|
|
3846
|
-
|
|
3847
3733
|
//#endregion
|
|
3848
3734
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/stdio/duplicate.js
|
|
3849
3735
|
const filterDuplicates = (stdioItems) => stdioItems.filter((stdioItemOne, indexOne) => stdioItems.every((stdioItemTwo, indexTwo) => stdioItemOne.value !== stdioItemTwo.value || indexOne >= indexTwo || stdioItemOne.type === "generator" || stdioItemOne.type === "asyncGenerator"));
|
|
@@ -3904,10 +3790,9 @@ const validateDuplicateTransform = ({ otherStdioItems, type, value, optionName }
|
|
|
3904
3790
|
const throwOnDuplicateStream = (stdioItem, optionName, type) => {
|
|
3905
3791
|
if (stdioItem !== void 0) throw new TypeError(`The \`${stdioItem.optionName}\` and \`${optionName}\` options must not target ${TYPE_TO_MESSAGE[type]} that is the same.`);
|
|
3906
3792
|
};
|
|
3907
|
-
|
|
3908
3793
|
//#endregion
|
|
3909
3794
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/stdio/handle.js
|
|
3910
|
-
const handleStdio = (addProperties
|
|
3795
|
+
const handleStdio = (addProperties, options, verboseInfo, isSync) => {
|
|
3911
3796
|
const fileDescriptors = getFinalFileDescriptors({
|
|
3912
3797
|
initialFileDescriptors: normalizeStdioOption(options, verboseInfo, isSync).map((stdioOption, fdNumber) => getFileDescriptor({
|
|
3913
3798
|
stdioOption,
|
|
@@ -3915,7 +3800,7 @@ const handleStdio = (addProperties$2, options, verboseInfo, isSync) => {
|
|
|
3915
3800
|
options,
|
|
3916
3801
|
isSync
|
|
3917
3802
|
})),
|
|
3918
|
-
addProperties
|
|
3803
|
+
addProperties,
|
|
3919
3804
|
options,
|
|
3920
3805
|
isSync
|
|
3921
3806
|
});
|
|
@@ -3964,7 +3849,7 @@ const initializeStdioItem = (value, optionName) => ({
|
|
|
3964
3849
|
const validateStdioArray = (stdioItems, isStdioArray, optionName) => {
|
|
3965
3850
|
if (stdioItems.length === 0) throw new TypeError(`The \`${optionName}\` option must not be an empty array.`);
|
|
3966
3851
|
if (!isStdioArray) return;
|
|
3967
|
-
for (const { value, optionName
|
|
3852
|
+
for (const { value, optionName } of stdioItems) if (INVALID_STDIO_ARRAY_OPTIONS.has(value)) throw new Error(`The \`${optionName}\` option must not include \`${value}\`.`);
|
|
3968
3853
|
};
|
|
3969
3854
|
const INVALID_STDIO_ARRAY_OPTIONS = new Set(["ignore", "ipc"]);
|
|
3970
3855
|
const validateStreams = (stdioItems) => {
|
|
@@ -3980,13 +3865,13 @@ const validateFileObjectMode = (stdioItems, objectMode) => {
|
|
|
3980
3865
|
const fileStdioItem = stdioItems.find(({ type }) => FILE_TYPES.has(type));
|
|
3981
3866
|
if (fileStdioItem !== void 0) throw new TypeError(`The \`${fileStdioItem.optionName}\` option cannot use both files and transforms in objectMode.`);
|
|
3982
3867
|
};
|
|
3983
|
-
const getFinalFileDescriptors = ({ initialFileDescriptors, addProperties
|
|
3868
|
+
const getFinalFileDescriptors = ({ initialFileDescriptors, addProperties, options, isSync }) => {
|
|
3984
3869
|
const fileDescriptors = [];
|
|
3985
3870
|
try {
|
|
3986
3871
|
for (const fileDescriptor of initialFileDescriptors) fileDescriptors.push(getFinalFileDescriptor({
|
|
3987
3872
|
fileDescriptor,
|
|
3988
3873
|
fileDescriptors,
|
|
3989
|
-
addProperties
|
|
3874
|
+
addProperties,
|
|
3990
3875
|
options,
|
|
3991
3876
|
isSync
|
|
3992
3877
|
}));
|
|
@@ -3996,13 +3881,13 @@ const getFinalFileDescriptors = ({ initialFileDescriptors, addProperties: addPro
|
|
|
3996
3881
|
throw error;
|
|
3997
3882
|
}
|
|
3998
3883
|
};
|
|
3999
|
-
const getFinalFileDescriptor = ({ fileDescriptor: { direction, objectMode, stdioItems }, fileDescriptors, addProperties
|
|
3884
|
+
const getFinalFileDescriptor = ({ fileDescriptor: { direction, objectMode, stdioItems }, fileDescriptors, addProperties, options, isSync }) => {
|
|
4000
3885
|
return {
|
|
4001
3886
|
direction,
|
|
4002
3887
|
objectMode,
|
|
4003
3888
|
stdioItems: stdioItems.map((stdioItem) => addStreamProperties({
|
|
4004
3889
|
stdioItem,
|
|
4005
|
-
addProperties
|
|
3890
|
+
addProperties,
|
|
4006
3891
|
direction,
|
|
4007
3892
|
options,
|
|
4008
3893
|
fileDescriptors,
|
|
@@ -4010,7 +3895,7 @@ const getFinalFileDescriptor = ({ fileDescriptor: { direction, objectMode, stdio
|
|
|
4010
3895
|
}))
|
|
4011
3896
|
};
|
|
4012
3897
|
};
|
|
4013
|
-
const addStreamProperties = ({ stdioItem, addProperties
|
|
3898
|
+
const addStreamProperties = ({ stdioItem, addProperties, direction, options, fileDescriptors, isSync }) => {
|
|
4014
3899
|
const duplicateStream = getDuplicateStream({
|
|
4015
3900
|
stdioItem,
|
|
4016
3901
|
direction,
|
|
@@ -4023,18 +3908,17 @@ const addStreamProperties = ({ stdioItem, addProperties: addProperties$2, direct
|
|
|
4023
3908
|
};
|
|
4024
3909
|
return {
|
|
4025
3910
|
...stdioItem,
|
|
4026
|
-
...addProperties
|
|
3911
|
+
...addProperties[direction][stdioItem.type](stdioItem, options)
|
|
4027
3912
|
};
|
|
4028
3913
|
};
|
|
4029
3914
|
const cleanupCustomStreams = (fileDescriptors) => {
|
|
4030
3915
|
for (const { stdioItems } of fileDescriptors) for (const { stream } of stdioItems) if (stream !== void 0 && !isStandardStream(stream)) stream.destroy();
|
|
4031
3916
|
};
|
|
4032
3917
|
const forwardStdio = (stdioItems) => {
|
|
4033
|
-
if (stdioItems.length > 1) return stdioItems.some(({ value
|
|
3918
|
+
if (stdioItems.length > 1) return stdioItems.some(({ value }) => value === "overlapped") ? "overlapped" : "pipe";
|
|
4034
3919
|
const [{ type, value }] = stdioItems;
|
|
4035
3920
|
return type === "native" ? value : "pipe";
|
|
4036
3921
|
};
|
|
4037
|
-
|
|
4038
3922
|
//#endregion
|
|
4039
3923
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/stdio/handle-sync.js
|
|
4040
3924
|
const handleStdioSync = (options, verboseInfo) => handleStdio(addPropertiesSync, options, verboseInfo, true);
|
|
@@ -4081,12 +3965,10 @@ const addPropertiesSync = {
|
|
|
4081
3965
|
uint8Array: forbiddenIfSync
|
|
4082
3966
|
}
|
|
4083
3967
|
};
|
|
4084
|
-
|
|
4085
3968
|
//#endregion
|
|
4086
3969
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/io/strip-newline.js
|
|
4087
3970
|
const stripNewline = (value, { stripFinalNewline: stripFinalNewline$1 }, fdNumber) => getStripFinalNewline(stripFinalNewline$1, fdNumber) && value !== void 0 && !Array.isArray(value) ? stripFinalNewline(value) : value;
|
|
4088
|
-
const getStripFinalNewline = (stripFinalNewline
|
|
4089
|
-
|
|
3971
|
+
const getStripFinalNewline = (stripFinalNewline, fdNumber) => fdNumber === "all" ? stripFinalNewline[1] || stripFinalNewline[2] : stripFinalNewline[fdNumber];
|
|
4090
3972
|
//#endregion
|
|
4091
3973
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/transform/split.js
|
|
4092
3974
|
const getSplitLinesGenerator = (binary, preserveNewlines, skipped, state) => binary || skipped ? void 0 : initializeSplitLines(preserveNewlines, state);
|
|
@@ -4132,8 +4014,8 @@ const linesFinal = function* ({ previousChunks }) {
|
|
|
4132
4014
|
};
|
|
4133
4015
|
const getAppendNewlineGenerator = ({ binary, preserveNewlines, readableObjectMode, state }) => binary || preserveNewlines || readableObjectMode ? void 0 : { transform: appendNewlineGenerator.bind(void 0, state) };
|
|
4134
4016
|
const appendNewlineGenerator = function* ({ isWindowsNewline = false }, chunk) {
|
|
4135
|
-
const { unixNewline, windowsNewline, LF
|
|
4136
|
-
if (chunk.at(-1) === LF
|
|
4017
|
+
const { unixNewline, windowsNewline, LF, concatBytes } = typeof chunk === "string" ? linesStringInfo : linesUint8ArrayInfo;
|
|
4018
|
+
if (chunk.at(-1) === LF) {
|
|
4137
4019
|
yield chunk;
|
|
4138
4020
|
return;
|
|
4139
4021
|
}
|
|
@@ -4158,7 +4040,6 @@ const linesUint8ArrayInfo = {
|
|
|
4158
4040
|
LF: 10,
|
|
4159
4041
|
concatBytes: concatUint8Array
|
|
4160
4042
|
};
|
|
4161
|
-
|
|
4162
4043
|
//#endregion
|
|
4163
4044
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/transform/validate.js
|
|
4164
4045
|
const getValidateTransformInput = (writableObjectMode, optionName) => writableObjectMode ? void 0 : validateStringTransformInput.bind(void 0, optionName);
|
|
@@ -4181,7 +4062,6 @@ const validateEmptyReturn = (optionName, chunk) => {
|
|
|
4181
4062
|
Instead, \`yield\` should either be called with a value, or not be called at all. For example:
|
|
4182
4063
|
if (condition) { yield value; }`);
|
|
4183
4064
|
};
|
|
4184
|
-
|
|
4185
4065
|
//#endregion
|
|
4186
4066
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/transform/encoding-transform.js
|
|
4187
4067
|
const getEncodingTransformGenerator = (binary, encoding, skipped) => {
|
|
@@ -4193,9 +4073,9 @@ const getEncodingTransformGenerator = (binary, encoding, skipped) => {
|
|
|
4193
4073
|
final: encodingStringFinal.bind(void 0, stringDecoder)
|
|
4194
4074
|
};
|
|
4195
4075
|
};
|
|
4196
|
-
const encodingUint8ArrayGenerator = function* (textEncoder
|
|
4076
|
+
const encodingUint8ArrayGenerator = function* (textEncoder, chunk) {
|
|
4197
4077
|
if (Buffer$1.isBuffer(chunk)) yield bufferToUint8Array(chunk);
|
|
4198
|
-
else if (typeof chunk === "string") yield textEncoder
|
|
4078
|
+
else if (typeof chunk === "string") yield textEncoder.encode(chunk);
|
|
4199
4079
|
else yield chunk;
|
|
4200
4080
|
};
|
|
4201
4081
|
const encodingStringGenerator = function* (stringDecoder, chunk) {
|
|
@@ -4205,7 +4085,6 @@ const encodingStringFinal = function* (stringDecoder) {
|
|
|
4205
4085
|
const lastChunk = stringDecoder.end();
|
|
4206
4086
|
if (lastChunk !== "") yield lastChunk;
|
|
4207
4087
|
};
|
|
4208
|
-
|
|
4209
4088
|
//#endregion
|
|
4210
4089
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/transform/run-async.js
|
|
4211
4090
|
const pushChunks = callbackify(async (getChunks, state, getChunksArguments, transformStream) => {
|
|
@@ -4241,7 +4120,6 @@ const destroyTransform = callbackify(async ({ currentIterable }, error) => {
|
|
|
4241
4120
|
const identityGenerator$1 = function* (chunk) {
|
|
4242
4121
|
yield chunk;
|
|
4243
4122
|
};
|
|
4244
|
-
|
|
4245
4123
|
//#endregion
|
|
4246
4124
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/transform/run-sync.js
|
|
4247
4125
|
const pushChunksSync = (getChunksSync, getChunksArguments, transformStream, done) => {
|
|
@@ -4271,7 +4149,6 @@ const generatorFinalChunksSync = function* (final, index, generators) {
|
|
|
4271
4149
|
const identityGenerator = function* (chunk) {
|
|
4272
4150
|
yield chunk;
|
|
4273
4151
|
};
|
|
4274
|
-
|
|
4275
4152
|
//#endregion
|
|
4276
4153
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/transform/generator.js
|
|
4277
4154
|
const generatorToStream = ({ value, value: { transform, final, writableObjectMode, readableObjectMode }, optionName }, { encoding }) => {
|
|
@@ -4287,7 +4164,7 @@ const generatorToStream = ({ value, value: { transform, final, writableObjectMod
|
|
|
4287
4164
|
writableHighWaterMark: getDefaultHighWaterMark(writableObjectMode),
|
|
4288
4165
|
readableObjectMode,
|
|
4289
4166
|
readableHighWaterMark: getDefaultHighWaterMark(readableObjectMode),
|
|
4290
|
-
transform(chunk, encoding
|
|
4167
|
+
transform(chunk, encoding, done) {
|
|
4291
4168
|
transformMethod([
|
|
4292
4169
|
chunk,
|
|
4293
4170
|
generators,
|
|
@@ -4325,7 +4202,6 @@ const addInternalGenerators = ({ transform, final, binary, writableObjectMode, r
|
|
|
4325
4202
|
})
|
|
4326
4203
|
].filter(Boolean);
|
|
4327
4204
|
};
|
|
4328
|
-
|
|
4329
4205
|
//#endregion
|
|
4330
4206
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/io/input-sync.js
|
|
4331
4207
|
const addInputOptionsSync = (fileDescriptors, options) => {
|
|
@@ -4351,7 +4227,6 @@ const validateSerializable = (newContents) => {
|
|
|
4351
4227
|
const invalidItem = newContents.find((item) => typeof item !== "string" && !isUint8Array(item));
|
|
4352
4228
|
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}.`);
|
|
4353
4229
|
};
|
|
4354
|
-
|
|
4355
4230
|
//#endregion
|
|
4356
4231
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/verbose/output.js
|
|
4357
4232
|
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)));
|
|
@@ -4372,7 +4247,6 @@ const logLine = (line, fdNumber, verboseInfo) => {
|
|
|
4372
4247
|
verboseInfo
|
|
4373
4248
|
});
|
|
4374
4249
|
};
|
|
4375
|
-
|
|
4376
4250
|
//#endregion
|
|
4377
4251
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/io/output-sync.js
|
|
4378
4252
|
const transformOutputSync = ({ fileDescriptors, syncResult: { output }, options, isMaxBuffer, verboseInfo }) => {
|
|
@@ -4392,7 +4266,7 @@ const transformOutputSync = ({ fileDescriptors, syncResult: { output }, options,
|
|
|
4392
4266
|
...state
|
|
4393
4267
|
};
|
|
4394
4268
|
};
|
|
4395
|
-
const transformOutputResultSync = ({ result, fileDescriptors, fdNumber, state, outputFiles, isMaxBuffer, verboseInfo }, { buffer, encoding, lines, stripFinalNewline
|
|
4269
|
+
const transformOutputResultSync = ({ result, fileDescriptors, fdNumber, state, outputFiles, isMaxBuffer, verboseInfo }, { buffer, encoding, lines, stripFinalNewline, maxBuffer }) => {
|
|
4396
4270
|
if (result === null) return;
|
|
4397
4271
|
const uint8ArrayResult = bufferToUint8Array(truncateMaxBufferSync(result, isMaxBuffer, maxBuffer));
|
|
4398
4272
|
const { stdioItems, objectMode } = fileDescriptors[fdNumber];
|
|
@@ -4401,7 +4275,7 @@ const transformOutputResultSync = ({ result, fileDescriptors, fdNumber, state, o
|
|
|
4401
4275
|
objectMode,
|
|
4402
4276
|
encoding,
|
|
4403
4277
|
lines,
|
|
4404
|
-
stripFinalNewline
|
|
4278
|
+
stripFinalNewline,
|
|
4405
4279
|
fdNumber
|
|
4406
4280
|
});
|
|
4407
4281
|
logOutputSync({
|
|
@@ -4430,13 +4304,13 @@ const runOutputGeneratorsSync = (chunks, stdioItems, encoding, state) => {
|
|
|
4430
4304
|
return chunks;
|
|
4431
4305
|
}
|
|
4432
4306
|
};
|
|
4433
|
-
const serializeChunks = ({ chunks, objectMode, encoding, lines, stripFinalNewline
|
|
4307
|
+
const serializeChunks = ({ chunks, objectMode, encoding, lines, stripFinalNewline, fdNumber }) => {
|
|
4434
4308
|
if (objectMode) return { serializedResult: chunks };
|
|
4435
4309
|
if (encoding === "buffer") return { serializedResult: joinToUint8Array(chunks) };
|
|
4436
4310
|
const serializedResult = joinToString(chunks, encoding);
|
|
4437
4311
|
if (lines[fdNumber]) return {
|
|
4438
4312
|
serializedResult,
|
|
4439
|
-
finalResult: splitLinesSync(serializedResult, !stripFinalNewline
|
|
4313
|
+
finalResult: splitLinesSync(serializedResult, !stripFinalNewline[fdNumber], objectMode)
|
|
4440
4314
|
};
|
|
4441
4315
|
return { serializedResult };
|
|
4442
4316
|
};
|
|
@@ -4455,16 +4329,15 @@ const logOutputSync = ({ serializedResult, fdNumber, state, verboseInfo, encodin
|
|
|
4455
4329
|
}
|
|
4456
4330
|
};
|
|
4457
4331
|
const writeToFiles = (serializedResult, stdioItems, outputFiles) => {
|
|
4458
|
-
for (const { path
|
|
4459
|
-
const pathString = typeof path
|
|
4460
|
-
if (append || outputFiles.has(pathString)) appendFileSync(path
|
|
4332
|
+
for (const { path, append } of stdioItems.filter(({ type }) => FILE_TYPES.has(type))) {
|
|
4333
|
+
const pathString = typeof path === "string" ? path : path.toString();
|
|
4334
|
+
if (append || outputFiles.has(pathString)) appendFileSync(path, serializedResult);
|
|
4461
4335
|
else {
|
|
4462
4336
|
outputFiles.add(pathString);
|
|
4463
|
-
writeFileSync(path
|
|
4337
|
+
writeFileSync(path, serializedResult);
|
|
4464
4338
|
}
|
|
4465
4339
|
}
|
|
4466
4340
|
};
|
|
4467
|
-
|
|
4468
4341
|
//#endregion
|
|
4469
4342
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/resolve/all-sync.js
|
|
4470
4343
|
const getAllSync = ([, stdout, stderr], options) => {
|
|
@@ -4476,7 +4349,6 @@ const getAllSync = ([, stdout, stderr], options) => {
|
|
|
4476
4349
|
if (isUint8Array(stdout) && isUint8Array(stderr)) return concatUint8Arrays([stdout, stderr]);
|
|
4477
4350
|
return `${stdout}${stderr}`;
|
|
4478
4351
|
};
|
|
4479
|
-
|
|
4480
4352
|
//#endregion
|
|
4481
4353
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/resolve/exit-async.js
|
|
4482
4354
|
const waitForExit = async (subprocess, context) => {
|
|
@@ -4503,7 +4375,6 @@ const waitForSuccessfulExit = async (exitPromise) => {
|
|
|
4503
4375
|
};
|
|
4504
4376
|
const isSubprocessErrorExit = (exitCode, signal) => exitCode === void 0 && signal === void 0;
|
|
4505
4377
|
const isFailedExit = (exitCode, signal) => exitCode !== 0 || signal !== null;
|
|
4506
|
-
|
|
4507
4378
|
//#endregion
|
|
4508
4379
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/resolve/exit-sync.js
|
|
4509
4380
|
const getExitResultSync = ({ error, status: exitCode, signal, output }, { maxBuffer }) => {
|
|
@@ -4520,7 +4391,6 @@ const getResultError = (error, exitCode, signal) => {
|
|
|
4520
4391
|
if (error !== void 0) return error;
|
|
4521
4392
|
return isFailedExit(exitCode, signal) ? new DiscardedError() : void 0;
|
|
4522
4393
|
};
|
|
4523
|
-
|
|
4524
4394
|
//#endregion
|
|
4525
4395
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/methods/main-sync.js
|
|
4526
4396
|
const execaCoreSync = (rawFile, rawArguments, rawOptions) => {
|
|
@@ -4613,7 +4483,7 @@ const runSubprocessSync = ({ file, commandArguments, options, command, escapedCo
|
|
|
4613
4483
|
});
|
|
4614
4484
|
}
|
|
4615
4485
|
};
|
|
4616
|
-
const normalizeSpawnSyncOptions = ({ encoding, maxBuffer
|
|
4486
|
+
const normalizeSpawnSyncOptions = ({ encoding, maxBuffer, ...options }) => ({
|
|
4617
4487
|
...options,
|
|
4618
4488
|
encoding: "buffer",
|
|
4619
4489
|
maxBuffer: getMaxBufferSync(maxBuffer)
|
|
@@ -4644,7 +4514,6 @@ const getSyncResult = ({ error, exitCode, signal, timedOut, isMaxBuffer, stdio,
|
|
|
4644
4514
|
startTime,
|
|
4645
4515
|
isSync: true
|
|
4646
4516
|
});
|
|
4647
|
-
|
|
4648
4517
|
//#endregion
|
|
4649
4518
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/ipc/get-one.js
|
|
4650
4519
|
const getOneMessage$1 = ({ anyProcess, channel, isSubprocess, ipc }, { reference = true, filter } = {}) => {
|
|
@@ -4695,7 +4564,6 @@ const throwOnStrictError = async (ipcEmitter, isSubprocess, { signal }) => {
|
|
|
4695
4564
|
const [error] = await once(ipcEmitter, "strict:error", { signal });
|
|
4696
4565
|
throw getStrictResponseError(error, isSubprocess);
|
|
4697
4566
|
};
|
|
4698
|
-
|
|
4699
4567
|
//#endregion
|
|
4700
4568
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/ipc/get-each.js
|
|
4701
4569
|
const getEachMessage$1 = ({ anyProcess, channel, isSubprocess, ipc }, { reference = true } = {}) => loopOnMessages({
|
|
@@ -4766,7 +4634,6 @@ const iterateOnMessages = async function* ({ anyProcess, channel, ipcEmitter, is
|
|
|
4766
4634
|
const throwIfStrictError = ({ error }) => {
|
|
4767
4635
|
if (error) throw error;
|
|
4768
4636
|
};
|
|
4769
|
-
|
|
4770
4637
|
//#endregion
|
|
4771
4638
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/ipc/methods.js
|
|
4772
4639
|
const addIpcMethods = (subprocess, { ipc }) => {
|
|
@@ -4806,7 +4673,6 @@ const getIpcMethods = (anyProcess, isSubprocess, ipc) => ({
|
|
|
4806
4673
|
ipc
|
|
4807
4674
|
})
|
|
4808
4675
|
});
|
|
4809
|
-
|
|
4810
4676
|
//#endregion
|
|
4811
4677
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/return/early-error.js
|
|
4812
4678
|
const handleEarlyError = ({ error, command, escapedCommand, fileDescriptors, options, startTime, verboseInfo }) => {
|
|
@@ -4863,7 +4729,6 @@ const duplex = () => new Duplex({
|
|
|
4863
4729
|
write() {}
|
|
4864
4730
|
});
|
|
4865
4731
|
const handleDummyPromise = async (error, verboseInfo, options) => handleResult(error, verboseInfo, options);
|
|
4866
|
-
|
|
4867
4732
|
//#endregion
|
|
4868
4733
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/stdio/handle-async.js
|
|
4869
4734
|
const handleStdioAsync = (options, verboseInfo) => handleStdio(addPropertiesAsync, options, verboseInfo, false);
|
|
@@ -4904,7 +4769,6 @@ const addPropertiesAsync = {
|
|
|
4904
4769
|
uint8Array: forbiddenIfAsync
|
|
4905
4770
|
}
|
|
4906
4771
|
};
|
|
4907
|
-
|
|
4908
4772
|
//#endregion
|
|
4909
4773
|
//#region ../../node_modules/.pnpm/@sindresorhus+merge-streams@4.0.0/node_modules/@sindresorhus/merge-streams/index.js
|
|
4910
4774
|
function mergeStreams(streams) {
|
|
@@ -4987,7 +4851,7 @@ const onInputStreamsUnpipe = async (passThroughStream, streams, unpipeEvent, { s
|
|
|
4987
4851
|
const validateStream = (stream) => {
|
|
4988
4852
|
if (typeof stream?.pipe !== "function") throw new TypeError(`Expected a readable stream, got: \`${typeof stream}\`.`);
|
|
4989
4853
|
};
|
|
4990
|
-
const endWhenStreamsDone = async ({ passThroughStream, stream, streams, ended, aborted
|
|
4854
|
+
const endWhenStreamsDone = async ({ passThroughStream, stream, streams, ended, aborted, onFinished, unpipeEvent }) => {
|
|
4991
4855
|
updateMaxListeners(passThroughStream, PASSTHROUGH_LISTENERS_PER_STREAM);
|
|
4992
4856
|
const controller = new AbortController();
|
|
4993
4857
|
try {
|
|
@@ -4998,14 +4862,14 @@ const endWhenStreamsDone = async ({ passThroughStream, stream, streams, ended, a
|
|
|
4998
4862
|
stream,
|
|
4999
4863
|
streams,
|
|
5000
4864
|
ended,
|
|
5001
|
-
aborted
|
|
4865
|
+
aborted,
|
|
5002
4866
|
controller
|
|
5003
4867
|
}),
|
|
5004
4868
|
onInputStreamUnpipe({
|
|
5005
4869
|
stream,
|
|
5006
4870
|
streams,
|
|
5007
4871
|
ended,
|
|
5008
|
-
aborted
|
|
4872
|
+
aborted,
|
|
5009
4873
|
unpipeEvent,
|
|
5010
4874
|
controller
|
|
5011
4875
|
})
|
|
@@ -5014,7 +4878,7 @@ const endWhenStreamsDone = async ({ passThroughStream, stream, streams, ended, a
|
|
|
5014
4878
|
controller.abort();
|
|
5015
4879
|
updateMaxListeners(passThroughStream, -PASSTHROUGH_LISTENERS_PER_STREAM);
|
|
5016
4880
|
}
|
|
5017
|
-
if (streams.size > 0 && streams.size === ended.size + aborted
|
|
4881
|
+
if (streams.size > 0 && streams.size === ended.size + aborted.size) if (ended.size === 0 && aborted.size > 0) abortStream(passThroughStream);
|
|
5018
4882
|
else endStream(passThroughStream);
|
|
5019
4883
|
};
|
|
5020
4884
|
const afterMergedStreamFinished = async (onFinished, stream, { signal }) => {
|
|
@@ -5025,7 +4889,7 @@ const afterMergedStreamFinished = async (onFinished, stream, { signal }) => {
|
|
|
5025
4889
|
if (!signal.aborted) errorOrAbortStream(stream, error);
|
|
5026
4890
|
}
|
|
5027
4891
|
};
|
|
5028
|
-
const onInputStreamEnd = async ({ passThroughStream, stream, streams, ended, aborted
|
|
4892
|
+
const onInputStreamEnd = async ({ passThroughStream, stream, streams, ended, aborted, controller: { signal } }) => {
|
|
5029
4893
|
try {
|
|
5030
4894
|
await finished(stream, {
|
|
5031
4895
|
signal,
|
|
@@ -5036,16 +4900,16 @@ const onInputStreamEnd = async ({ passThroughStream, stream, streams, ended, abo
|
|
|
5036
4900
|
if (streams.has(stream)) ended.add(stream);
|
|
5037
4901
|
} catch (error) {
|
|
5038
4902
|
if (signal.aborted || !streams.has(stream)) return;
|
|
5039
|
-
if (isAbortError(error)) aborted
|
|
4903
|
+
if (isAbortError(error)) aborted.add(stream);
|
|
5040
4904
|
else errorStream(passThroughStream, error);
|
|
5041
4905
|
}
|
|
5042
4906
|
};
|
|
5043
|
-
const onInputStreamUnpipe = async ({ stream, streams, ended, aborted
|
|
4907
|
+
const onInputStreamUnpipe = async ({ stream, streams, ended, aborted, unpipeEvent, controller: { signal } }) => {
|
|
5044
4908
|
await once(stream, unpipeEvent, { signal });
|
|
5045
4909
|
if (!stream.readable) return once(signal, "abort", { signal });
|
|
5046
4910
|
streams.delete(stream);
|
|
5047
4911
|
ended.delete(stream);
|
|
5048
|
-
aborted
|
|
4912
|
+
aborted.delete(stream);
|
|
5049
4913
|
};
|
|
5050
4914
|
const endStream = (stream) => {
|
|
5051
4915
|
if (stream.writable) stream.end();
|
|
@@ -5065,13 +4929,12 @@ const errorStream = (stream, error) => {
|
|
|
5065
4929
|
}
|
|
5066
4930
|
};
|
|
5067
4931
|
const noop = () => {};
|
|
5068
|
-
const updateMaxListeners = (passThroughStream, increment
|
|
4932
|
+
const updateMaxListeners = (passThroughStream, increment) => {
|
|
5069
4933
|
const maxListeners = passThroughStream.getMaxListeners();
|
|
5070
|
-
if (maxListeners !== 0 && maxListeners !== Number.POSITIVE_INFINITY) passThroughStream.setMaxListeners(maxListeners + increment
|
|
4934
|
+
if (maxListeners !== 0 && maxListeners !== Number.POSITIVE_INFINITY) passThroughStream.setMaxListeners(maxListeners + increment);
|
|
5071
4935
|
};
|
|
5072
4936
|
const PASSTHROUGH_LISTENERS_COUNT = 2;
|
|
5073
4937
|
const PASSTHROUGH_LISTENERS_PER_STREAM = 1;
|
|
5074
|
-
|
|
5075
4938
|
//#endregion
|
|
5076
4939
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/io/pipeline.js
|
|
5077
4940
|
const pipeStreams = (source, destination) => {
|
|
@@ -5107,7 +4970,6 @@ const onDestinationFinish = async (source, destination) => {
|
|
|
5107
4970
|
const abortSourceStream = (source) => {
|
|
5108
4971
|
if (source.readable) source.destroy();
|
|
5109
4972
|
};
|
|
5110
|
-
|
|
5111
4973
|
//#endregion
|
|
5112
4974
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/io/output-async.js
|
|
5113
4975
|
const pipeOutputAsync = (subprocess, fileDescriptors, controller) => {
|
|
@@ -5148,7 +5010,6 @@ const setStandardStreamMaxListeners = (stream, { signal }) => {
|
|
|
5148
5010
|
if (isStandardStream(stream)) incrementMaxListeners(stream, MAX_LISTENERS_INCREMENT, signal);
|
|
5149
5011
|
};
|
|
5150
5012
|
const MAX_LISTENERS_INCREMENT = 2;
|
|
5151
|
-
|
|
5152
5013
|
//#endregion
|
|
5153
5014
|
//#region ../../node_modules/.pnpm/signal-exit@4.1.0/node_modules/signal-exit/dist/mjs/signals.js
|
|
5154
5015
|
/**
|
|
@@ -5181,10 +5042,9 @@ const signals = [];
|
|
|
5181
5042
|
signals.push("SIGHUP", "SIGINT", "SIGTERM");
|
|
5182
5043
|
if (process.platform !== "win32") signals.push("SIGALRM", "SIGABRT", "SIGVTALRM", "SIGXCPU", "SIGXFSZ", "SIGUSR2", "SIGTRAP", "SIGSYS", "SIGQUIT", "SIGIOT");
|
|
5183
5044
|
if (process.platform === "linux") signals.push("SIGIO", "SIGPOLL", "SIGPWR", "SIGSTKFLT");
|
|
5184
|
-
|
|
5185
5045
|
//#endregion
|
|
5186
5046
|
//#region ../../node_modules/.pnpm/signal-exit@4.1.0/node_modules/signal-exit/dist/mjs/index.js
|
|
5187
|
-
const processOk = (process
|
|
5047
|
+
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";
|
|
5188
5048
|
const kExitEmitter = Symbol.for("signal-exit emitter");
|
|
5189
5049
|
const global$1 = globalThis;
|
|
5190
5050
|
const ObjectDefineProperty = Object.defineProperty.bind(Object);
|
|
@@ -5213,12 +5073,12 @@ var Emitter = class {
|
|
|
5213
5073
|
}
|
|
5214
5074
|
removeListener(ev, fn) {
|
|
5215
5075
|
const list = this.listeners[ev];
|
|
5216
|
-
const i
|
|
5076
|
+
const i = list.indexOf(fn);
|
|
5217
5077
|
/* c8 ignore start */
|
|
5218
|
-
if (i
|
|
5078
|
+
if (i === -1) return;
|
|
5219
5079
|
/* c8 ignore stop */
|
|
5220
|
-
if (i
|
|
5221
|
-
else list.splice(i
|
|
5080
|
+
if (i === 0 && list.length === 1) list.length = 0;
|
|
5081
|
+
else list.splice(i, 1);
|
|
5222
5082
|
}
|
|
5223
5083
|
emit(ev, code, signal) {
|
|
5224
5084
|
if (this.emitted[ev]) return false;
|
|
@@ -5260,27 +5120,27 @@ var SignalExit = class extends SignalExitBase {
|
|
|
5260
5120
|
#originalProcessReallyExit;
|
|
5261
5121
|
#sigListeners = {};
|
|
5262
5122
|
#loaded = false;
|
|
5263
|
-
constructor(process
|
|
5123
|
+
constructor(process) {
|
|
5264
5124
|
super();
|
|
5265
|
-
this.#process = process
|
|
5125
|
+
this.#process = process;
|
|
5266
5126
|
this.#sigListeners = {};
|
|
5267
5127
|
for (const sig of signals) this.#sigListeners[sig] = () => {
|
|
5268
5128
|
const listeners = this.#process.listeners(sig);
|
|
5269
|
-
let { count
|
|
5129
|
+
let { count } = this.#emitter;
|
|
5270
5130
|
/* c8 ignore start */
|
|
5271
|
-
const p
|
|
5272
|
-
if (typeof p
|
|
5131
|
+
const p = process;
|
|
5132
|
+
if (typeof p.__signal_exit_emitter__ === "object" && typeof p.__signal_exit_emitter__.count === "number") count += p.__signal_exit_emitter__.count;
|
|
5273
5133
|
/* c8 ignore stop */
|
|
5274
|
-
if (listeners.length === count
|
|
5134
|
+
if (listeners.length === count) {
|
|
5275
5135
|
this.unload();
|
|
5276
5136
|
const ret = this.#emitter.emit("exit", null, sig);
|
|
5277
5137
|
/* c8 ignore start */
|
|
5278
5138
|
const s = sig === "SIGHUP" ? this.#hupSig : sig;
|
|
5279
|
-
if (!ret) process
|
|
5139
|
+
if (!ret) process.kill(process.pid, s);
|
|
5280
5140
|
}
|
|
5281
5141
|
};
|
|
5282
|
-
this.#originalProcessReallyExit = process
|
|
5283
|
-
this.#originalProcessEmit = process
|
|
5142
|
+
this.#originalProcessReallyExit = process.reallyExit;
|
|
5143
|
+
this.#originalProcessEmit = process.emit;
|
|
5284
5144
|
}
|
|
5285
5145
|
onExit(cb, opts) {
|
|
5286
5146
|
/* c8 ignore start */
|
|
@@ -5302,8 +5162,8 @@ var SignalExit = class extends SignalExitBase {
|
|
|
5302
5162
|
const fn = this.#sigListeners[sig];
|
|
5303
5163
|
if (fn) this.#process.on(sig, fn);
|
|
5304
5164
|
} catch (_) {}
|
|
5305
|
-
this.#process.emit = (ev, ...a
|
|
5306
|
-
return this.#processEmit(ev, ...a
|
|
5165
|
+
this.#process.emit = (ev, ...a) => {
|
|
5166
|
+
return this.#processEmit(ev, ...a);
|
|
5307
5167
|
};
|
|
5308
5168
|
this.#process.reallyExit = (code) => {
|
|
5309
5169
|
return this.#processReallyExit(code);
|
|
@@ -5349,7 +5209,6 @@ var SignalExit = class extends SignalExitBase {
|
|
|
5349
5209
|
};
|
|
5350
5210
|
const process$2 = globalThis.process;
|
|
5351
5211
|
const { onExit, load, unload } = signalExitWrap(processOk(process$2) ? new SignalExit(process$2) : new SignalExitFallback());
|
|
5352
|
-
|
|
5353
5212
|
//#endregion
|
|
5354
5213
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/terminate/cleanup.js
|
|
5355
5214
|
const cleanupOnExit = (subprocess, { cleanup, detached }, { signal }) => {
|
|
@@ -5361,7 +5220,6 @@ const cleanupOnExit = (subprocess, { cleanup, detached }, { signal }) => {
|
|
|
5361
5220
|
removeExitHandler();
|
|
5362
5221
|
});
|
|
5363
5222
|
};
|
|
5364
|
-
|
|
5365
5223
|
//#endregion
|
|
5366
5224
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/pipe/pipe-arguments.js
|
|
5367
5225
|
const normalizePipeArguments = ({ source, sourcePromise, boundOptions, createNested }, ...pipeArguments) => {
|
|
@@ -5429,7 +5287,6 @@ const getSourceStream = (source, from) => {
|
|
|
5429
5287
|
return { sourceError: error };
|
|
5430
5288
|
}
|
|
5431
5289
|
};
|
|
5432
|
-
|
|
5433
5290
|
//#endregion
|
|
5434
5291
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/pipe/throw.js
|
|
5435
5292
|
const handlePipeArgumentsError = ({ sourceStream, sourceError, destinationStream, destinationError, fileDescriptors, sourceOptions, startTime }) => {
|
|
@@ -5467,7 +5324,6 @@ const createNonCommandError = ({ error, fileDescriptors, sourceOptions, startTim
|
|
|
5467
5324
|
isSync: false
|
|
5468
5325
|
});
|
|
5469
5326
|
const PIPE_COMMAND_MESSAGE = "source.pipe(destination)";
|
|
5470
|
-
|
|
5471
5327
|
//#endregion
|
|
5472
5328
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/pipe/sequence.js
|
|
5473
5329
|
const waitForBothSubprocesses = async (subprocessPromises) => {
|
|
@@ -5477,7 +5333,6 @@ const waitForBothSubprocesses = async (subprocessPromises) => {
|
|
|
5477
5333
|
if (sourceStatus === "rejected") throw sourceResult;
|
|
5478
5334
|
return destinationResult;
|
|
5479
5335
|
};
|
|
5480
|
-
|
|
5481
5336
|
//#endregion
|
|
5482
5337
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/pipe/streaming.js
|
|
5483
5338
|
const pipeSubprocessStream = (sourceStream, destinationStream, maxListenersController) => {
|
|
@@ -5511,7 +5366,6 @@ const cleanupMergedStreamsMap = async (destinationStream) => {
|
|
|
5511
5366
|
const MERGED_STREAMS = /* @__PURE__ */ new WeakMap();
|
|
5512
5367
|
const SOURCE_LISTENERS_PER_PIPE = 2;
|
|
5513
5368
|
const DESTINATION_LISTENERS_PER_PIPE = 1;
|
|
5514
|
-
|
|
5515
5369
|
//#endregion
|
|
5516
5370
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/pipe/abort.js
|
|
5517
5371
|
const unpipeOnAbort = (unpipeSignal, unpipeContext) => unpipeSignal === void 0 ? [] : [unpipeOnSignalAbort(unpipeSignal, unpipeContext)];
|
|
@@ -5525,7 +5379,6 @@ const unpipeOnSignalAbort = async (unpipeSignal, { sourceStream, mergedStream, f
|
|
|
5525
5379
|
startTime
|
|
5526
5380
|
});
|
|
5527
5381
|
};
|
|
5528
|
-
|
|
5529
5382
|
//#endregion
|
|
5530
5383
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/pipe/setup.js
|
|
5531
5384
|
const pipeToSubprocess = (sourceInfo, ...pipeArguments) => {
|
|
@@ -5536,7 +5389,7 @@ const pipeToSubprocess = (sourceInfo, ...pipeArguments) => {
|
|
|
5536
5389
|
...pipeArguments[0]
|
|
5537
5390
|
}
|
|
5538
5391
|
});
|
|
5539
|
-
const { destination
|
|
5392
|
+
const { destination, ...normalizedInfo } = normalizePipeArguments(sourceInfo, ...pipeArguments);
|
|
5540
5393
|
const promise = handlePipePromise({
|
|
5541
5394
|
...normalizedInfo,
|
|
5542
5395
|
destination
|
|
@@ -5575,7 +5428,6 @@ const handlePipePromise = async ({ sourcePromise, sourceStream, sourceOptions, s
|
|
|
5575
5428
|
}
|
|
5576
5429
|
};
|
|
5577
5430
|
const getSubprocessPromises = (sourcePromise, destination) => Promise.allSettled([sourcePromise, destination]);
|
|
5578
|
-
|
|
5579
5431
|
//#endregion
|
|
5580
5432
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/io/iterate.js
|
|
5581
5433
|
const iterateOnSubprocessStream = ({ subprocessStdout, subprocess, binary, shouldEncode, encoding, preserveNewlines }) => {
|
|
@@ -5598,7 +5450,7 @@ const stopReadingOnExit = async (subprocess, controller) => {
|
|
|
5598
5450
|
controller.abort();
|
|
5599
5451
|
}
|
|
5600
5452
|
};
|
|
5601
|
-
const iterateForResult = ({ stream, onStreamEnd, lines, encoding, stripFinalNewline
|
|
5453
|
+
const iterateForResult = ({ stream, onStreamEnd, lines, encoding, stripFinalNewline, allMixed }) => {
|
|
5602
5454
|
const controller = new AbortController();
|
|
5603
5455
|
stopReadingOnStreamEnd(onStreamEnd, controller, stream);
|
|
5604
5456
|
const objectMode = stream.readableObjectMode && !allMixed;
|
|
@@ -5609,7 +5461,7 @@ const iterateForResult = ({ stream, onStreamEnd, lines, encoding, stripFinalNewl
|
|
|
5609
5461
|
shouldEncode: !objectMode,
|
|
5610
5462
|
encoding,
|
|
5611
5463
|
shouldSplit: !objectMode && lines,
|
|
5612
|
-
preserveNewlines: !stripFinalNewline
|
|
5464
|
+
preserveNewlines: !stripFinalNewline
|
|
5613
5465
|
});
|
|
5614
5466
|
};
|
|
5615
5467
|
const stopReadingOnStreamEnd = async (onStreamEnd, controller, stream) => {
|
|
@@ -5655,10 +5507,9 @@ const iterateOnData = async function* ({ onStdoutChunk, controller, binary, shou
|
|
|
5655
5507
|
}
|
|
5656
5508
|
};
|
|
5657
5509
|
const getGenerators = ({ binary, shouldEncode, encoding, shouldSplit, preserveNewlines }) => [getEncodingTransformGenerator(binary, encoding, !shouldEncode), getSplitLinesGenerator(binary, preserveNewlines, !shouldSplit, {})].filter(Boolean);
|
|
5658
|
-
|
|
5659
5510
|
//#endregion
|
|
5660
5511
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/io/contents.js
|
|
5661
|
-
const getStreamOutput = async ({ stream, onStreamEnd, fdNumber, encoding, buffer, maxBuffer, lines, allMixed, stripFinalNewline
|
|
5512
|
+
const getStreamOutput = async ({ stream, onStreamEnd, fdNumber, encoding, buffer, maxBuffer, lines, allMixed, stripFinalNewline, verboseInfo, streamInfo }) => {
|
|
5662
5513
|
const logPromise = logOutputAsync({
|
|
5663
5514
|
stream,
|
|
5664
5515
|
onStreamEnd,
|
|
@@ -5677,7 +5528,7 @@ const getStreamOutput = async ({ stream, onStreamEnd, fdNumber, encoding, buffer
|
|
|
5677
5528
|
onStreamEnd,
|
|
5678
5529
|
lines,
|
|
5679
5530
|
encoding,
|
|
5680
|
-
stripFinalNewline: getStripFinalNewline(stripFinalNewline
|
|
5531
|
+
stripFinalNewline: getStripFinalNewline(stripFinalNewline, fdNumber),
|
|
5681
5532
|
allMixed
|
|
5682
5533
|
});
|
|
5683
5534
|
const [output] = await Promise.all([getStreamContents({
|
|
@@ -5734,7 +5585,6 @@ const getBufferedData = async (streamPromise) => {
|
|
|
5734
5585
|
}
|
|
5735
5586
|
};
|
|
5736
5587
|
const handleBufferedData = ({ bufferedData }) => isArrayBuffer(bufferedData) ? new Uint8Array(bufferedData) : bufferedData;
|
|
5737
|
-
|
|
5738
5588
|
//#endregion
|
|
5739
5589
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/resolve/wait-stream.js
|
|
5740
5590
|
const waitForStream = async (stream, fdNumber, streamInfo, { isSameDirection, stopOnExit = false } = {}) => {
|
|
@@ -5777,10 +5627,9 @@ const shouldIgnoreStreamError = (error, fdNumber, streamInfo, isSameDirection =
|
|
|
5777
5627
|
const isInputFileDescriptor = ({ fileDescriptors }, fdNumber) => fdNumber !== "all" && fileDescriptors[fdNumber].direction === "input";
|
|
5778
5628
|
const isStreamAbort = (error) => error?.code === "ERR_STREAM_PREMATURE_CLOSE";
|
|
5779
5629
|
const isStreamEpipe = (error) => error?.code === "EPIPE";
|
|
5780
|
-
|
|
5781
5630
|
//#endregion
|
|
5782
5631
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/resolve/stdio.js
|
|
5783
|
-
const waitForStdioStreams = ({ subprocess, encoding, buffer, maxBuffer, lines, stripFinalNewline
|
|
5632
|
+
const waitForStdioStreams = ({ subprocess, encoding, buffer, maxBuffer, lines, stripFinalNewline, verboseInfo, streamInfo }) => subprocess.stdio.map((stream, fdNumber) => waitForSubprocessStream({
|
|
5784
5633
|
stream,
|
|
5785
5634
|
fdNumber,
|
|
5786
5635
|
encoding,
|
|
@@ -5788,11 +5637,11 @@ const waitForStdioStreams = ({ subprocess, encoding, buffer, maxBuffer, lines, s
|
|
|
5788
5637
|
maxBuffer: maxBuffer[fdNumber],
|
|
5789
5638
|
lines: lines[fdNumber],
|
|
5790
5639
|
allMixed: false,
|
|
5791
|
-
stripFinalNewline
|
|
5640
|
+
stripFinalNewline,
|
|
5792
5641
|
verboseInfo,
|
|
5793
5642
|
streamInfo
|
|
5794
5643
|
}));
|
|
5795
|
-
const waitForSubprocessStream = async ({ stream, fdNumber, encoding, buffer, maxBuffer, lines, allMixed, stripFinalNewline
|
|
5644
|
+
const waitForSubprocessStream = async ({ stream, fdNumber, encoding, buffer, maxBuffer, lines, allMixed, stripFinalNewline, verboseInfo, streamInfo }) => {
|
|
5796
5645
|
if (!stream) return;
|
|
5797
5646
|
const onStreamEnd = waitForStream(stream, fdNumber, streamInfo);
|
|
5798
5647
|
if (isInputFileDescriptor(streamInfo, fdNumber)) {
|
|
@@ -5808,24 +5657,23 @@ const waitForSubprocessStream = async ({ stream, fdNumber, encoding, buffer, max
|
|
|
5808
5657
|
maxBuffer,
|
|
5809
5658
|
lines,
|
|
5810
5659
|
allMixed,
|
|
5811
|
-
stripFinalNewline
|
|
5660
|
+
stripFinalNewline,
|
|
5812
5661
|
verboseInfo,
|
|
5813
5662
|
streamInfo
|
|
5814
5663
|
}), onStreamEnd]);
|
|
5815
5664
|
return output;
|
|
5816
5665
|
};
|
|
5817
|
-
|
|
5818
5666
|
//#endregion
|
|
5819
5667
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/resolve/all-async.js
|
|
5820
5668
|
const makeAllStream = ({ stdout, stderr }, { all }) => all && (stdout || stderr) ? mergeStreams([stdout, stderr].filter(Boolean)) : void 0;
|
|
5821
|
-
const waitForAllStream = ({ subprocess, encoding, buffer, maxBuffer, lines, stripFinalNewline
|
|
5669
|
+
const waitForAllStream = ({ subprocess, encoding, buffer, maxBuffer, lines, stripFinalNewline, verboseInfo, streamInfo }) => waitForSubprocessStream({
|
|
5822
5670
|
...getAllStream(subprocess, buffer),
|
|
5823
5671
|
fdNumber: "all",
|
|
5824
5672
|
encoding,
|
|
5825
5673
|
maxBuffer: maxBuffer[1] + maxBuffer[2],
|
|
5826
5674
|
lines: lines[1] || lines[2],
|
|
5827
5675
|
allMixed: getAllMixed(subprocess),
|
|
5828
|
-
stripFinalNewline
|
|
5676
|
+
stripFinalNewline,
|
|
5829
5677
|
verboseInfo,
|
|
5830
5678
|
streamInfo
|
|
5831
5679
|
});
|
|
@@ -5849,7 +5697,6 @@ const getAllStream = ({ stdout, stderr, all }, [, bufferStdout, bufferStderr]) =
|
|
|
5849
5697
|
};
|
|
5850
5698
|
};
|
|
5851
5699
|
const getAllMixed = ({ all, stdout, stderr }) => all && stdout && stderr && stdout.readableObjectMode !== stderr.readableObjectMode;
|
|
5852
|
-
|
|
5853
5700
|
//#endregion
|
|
5854
5701
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/verbose/ipc.js
|
|
5855
5702
|
const shouldLogIpc = (verboseInfo) => isFullVerbose(verboseInfo, "ipc");
|
|
@@ -5861,12 +5708,11 @@ const logIpcOutput = (message, verboseInfo) => {
|
|
|
5861
5708
|
verboseInfo
|
|
5862
5709
|
});
|
|
5863
5710
|
};
|
|
5864
|
-
|
|
5865
5711
|
//#endregion
|
|
5866
5712
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/ipc/buffer-messages.js
|
|
5867
5713
|
const waitForIpcOutput = async ({ subprocess, buffer: bufferArray, maxBuffer: maxBufferArray, ipc, ipcOutput, verboseInfo }) => {
|
|
5868
5714
|
if (!ipc) return ipcOutput;
|
|
5869
|
-
const isVerbose
|
|
5715
|
+
const isVerbose = shouldLogIpc(verboseInfo);
|
|
5870
5716
|
const buffer = getFdSpecificValue(bufferArray, "ipc");
|
|
5871
5717
|
const maxBuffer = getFdSpecificValue(maxBufferArray, "ipc");
|
|
5872
5718
|
for await (const message of loopOnMessages({
|
|
@@ -5881,7 +5727,7 @@ const waitForIpcOutput = async ({ subprocess, buffer: bufferArray, maxBuffer: ma
|
|
|
5881
5727
|
checkIpcMaxBuffer(subprocess, ipcOutput, maxBuffer);
|
|
5882
5728
|
ipcOutput.push(message);
|
|
5883
5729
|
}
|
|
5884
|
-
if (isVerbose
|
|
5730
|
+
if (isVerbose) logIpcOutput(message, verboseInfo);
|
|
5885
5731
|
}
|
|
5886
5732
|
return ipcOutput;
|
|
5887
5733
|
};
|
|
@@ -5889,10 +5735,9 @@ const getBufferedIpcOutput = async (ipcOutputPromise, ipcOutput) => {
|
|
|
5889
5735
|
await Promise.allSettled([ipcOutputPromise]);
|
|
5890
5736
|
return ipcOutput;
|
|
5891
5737
|
};
|
|
5892
|
-
|
|
5893
5738
|
//#endregion
|
|
5894
5739
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/resolve/wait-subprocess.js
|
|
5895
|
-
const waitForSubprocessResult = async ({ subprocess, options: { encoding, buffer, maxBuffer, lines, timeoutDuration: timeout, cancelSignal, gracefulCancel, forceKillAfterDelay, stripFinalNewline
|
|
5740
|
+
const waitForSubprocessResult = async ({ subprocess, options: { encoding, buffer, maxBuffer, lines, timeoutDuration: timeout, cancelSignal, gracefulCancel, forceKillAfterDelay, stripFinalNewline, ipc, ipcInput }, context, verboseInfo, fileDescriptors, originalStreams, onInternalError, controller }) => {
|
|
5896
5741
|
const exitPromise = waitForExit(subprocess, context);
|
|
5897
5742
|
const streamInfo = {
|
|
5898
5743
|
originalStreams,
|
|
@@ -5907,7 +5752,7 @@ const waitForSubprocessResult = async ({ subprocess, options: { encoding, buffer
|
|
|
5907
5752
|
buffer,
|
|
5908
5753
|
maxBuffer,
|
|
5909
5754
|
lines,
|
|
5910
|
-
stripFinalNewline
|
|
5755
|
+
stripFinalNewline,
|
|
5911
5756
|
verboseInfo,
|
|
5912
5757
|
streamInfo
|
|
5913
5758
|
});
|
|
@@ -5917,7 +5762,7 @@ const waitForSubprocessResult = async ({ subprocess, options: { encoding, buffer
|
|
|
5917
5762
|
buffer,
|
|
5918
5763
|
maxBuffer,
|
|
5919
5764
|
lines,
|
|
5920
|
-
stripFinalNewline
|
|
5765
|
+
stripFinalNewline,
|
|
5921
5766
|
verboseInfo,
|
|
5922
5767
|
streamInfo
|
|
5923
5768
|
});
|
|
@@ -5985,7 +5830,6 @@ const throwOnSubprocessError = async (subprocess, { signal }) => {
|
|
|
5985
5830
|
const [error] = await once(subprocess, "error", { signal });
|
|
5986
5831
|
throw error;
|
|
5987
5832
|
};
|
|
5988
|
-
|
|
5989
5833
|
//#endregion
|
|
5990
5834
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/convert/concurrent.js
|
|
5991
5835
|
const initializeConcurrentStreams = () => ({
|
|
@@ -6009,7 +5853,6 @@ const waitForConcurrentStreams = async ({ resolve, promises }, subprocess) => {
|
|
|
6009
5853
|
const [isSubprocessExit] = await Promise.race([Promise.allSettled([true, subprocess]), Promise.all([false, ...promises])]);
|
|
6010
5854
|
return !isSubprocessExit;
|
|
6011
5855
|
};
|
|
6012
|
-
|
|
6013
5856
|
//#endregion
|
|
6014
5857
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/convert/shared.js
|
|
6015
5858
|
const safeWaitForSubprocessStdin = async (subprocessStdin) => {
|
|
@@ -6046,7 +5889,6 @@ const destroyOtherStream = (stream, isOpen, error) => {
|
|
|
6046
5889
|
if (error && !isStreamAbort(error)) stream.destroy(error);
|
|
6047
5890
|
else if (isOpen) stream.destroy();
|
|
6048
5891
|
};
|
|
6049
|
-
|
|
6050
5892
|
//#endregion
|
|
6051
5893
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/convert/readable.js
|
|
6052
5894
|
const createReadable = ({ subprocess, concurrentStreams, encoding }, { from, binary: binaryOption = true, preserveNewlines = true } = {}) => {
|
|
@@ -6060,7 +5902,7 @@ const createReadable = ({ subprocess, concurrentStreams, encoding }, { from, bin
|
|
|
6060
5902
|
encoding,
|
|
6061
5903
|
preserveNewlines
|
|
6062
5904
|
});
|
|
6063
|
-
const readable
|
|
5905
|
+
const readable = new Readable({
|
|
6064
5906
|
read,
|
|
6065
5907
|
destroy: callbackify(onReadableDestroy.bind(void 0, {
|
|
6066
5908
|
subprocessStdout,
|
|
@@ -6074,10 +5916,10 @@ const createReadable = ({ subprocess, concurrentStreams, encoding }, { from, bin
|
|
|
6074
5916
|
onStdoutFinished({
|
|
6075
5917
|
subprocessStdout,
|
|
6076
5918
|
onStdoutDataDone,
|
|
6077
|
-
readable
|
|
5919
|
+
readable,
|
|
6078
5920
|
subprocess
|
|
6079
5921
|
});
|
|
6080
|
-
return readable
|
|
5922
|
+
return readable;
|
|
6081
5923
|
};
|
|
6082
5924
|
const getSubprocessStdout = (subprocess, from, concurrentStreams) => {
|
|
6083
5925
|
const subprocessStdout = getFromStream(subprocess, from);
|
|
@@ -6112,23 +5954,23 @@ const getReadableMethods = ({ subprocessStdout, subprocess, binary, encoding, pr
|
|
|
6112
5954
|
onStdoutDataDone
|
|
6113
5955
|
};
|
|
6114
5956
|
};
|
|
6115
|
-
const onRead = async (readable
|
|
5957
|
+
const onRead = async (readable, onStdoutData, onStdoutDataDone) => {
|
|
6116
5958
|
try {
|
|
6117
5959
|
const { value, done } = await onStdoutData.next();
|
|
6118
5960
|
if (done) onStdoutDataDone.resolve();
|
|
6119
|
-
else readable
|
|
5961
|
+
else readable.push(value);
|
|
6120
5962
|
} catch {}
|
|
6121
5963
|
};
|
|
6122
|
-
const onStdoutFinished = async ({ subprocessStdout, onStdoutDataDone, readable
|
|
5964
|
+
const onStdoutFinished = async ({ subprocessStdout, onStdoutDataDone, readable, subprocess, subprocessStdin }) => {
|
|
6123
5965
|
try {
|
|
6124
5966
|
await waitForSubprocessStdout(subprocessStdout);
|
|
6125
5967
|
await subprocess;
|
|
6126
5968
|
await safeWaitForSubprocessStdin(subprocessStdin);
|
|
6127
5969
|
await onStdoutDataDone;
|
|
6128
|
-
if (readable
|
|
5970
|
+
if (readable.readable) readable.push(null);
|
|
6129
5971
|
} catch (error) {
|
|
6130
5972
|
await safeWaitForSubprocessStdin(subprocessStdin);
|
|
6131
|
-
destroyOtherReadable(readable
|
|
5973
|
+
destroyOtherReadable(readable, error);
|
|
6132
5974
|
}
|
|
6133
5975
|
};
|
|
6134
5976
|
const onReadableDestroy = async ({ subprocessStdout, subprocess, waitReadableDestroy }, error) => {
|
|
@@ -6140,12 +5982,11 @@ const onReadableDestroy = async ({ subprocessStdout, subprocess, waitReadableDes
|
|
|
6140
5982
|
const destroyOtherReadable = (stream, error) => {
|
|
6141
5983
|
destroyOtherStream(stream, stream.readable, error);
|
|
6142
5984
|
};
|
|
6143
|
-
|
|
6144
5985
|
//#endregion
|
|
6145
5986
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/convert/writable.js
|
|
6146
5987
|
const createWritable = ({ subprocess, concurrentStreams }, { to } = {}) => {
|
|
6147
5988
|
const { subprocessStdin, waitWritableFinal, waitWritableDestroy } = getSubprocessStdin(subprocess, to, concurrentStreams);
|
|
6148
|
-
const writable
|
|
5989
|
+
const writable = new Writable({
|
|
6149
5990
|
...getWritableMethods(subprocessStdin, subprocess, waitWritableFinal),
|
|
6150
5991
|
destroy: callbackify(onWritableDestroy.bind(void 0, {
|
|
6151
5992
|
subprocessStdin,
|
|
@@ -6156,8 +5997,8 @@ const createWritable = ({ subprocess, concurrentStreams }, { to } = {}) => {
|
|
|
6156
5997
|
highWaterMark: subprocessStdin.writableHighWaterMark,
|
|
6157
5998
|
objectMode: subprocessStdin.writableObjectMode
|
|
6158
5999
|
});
|
|
6159
|
-
onStdinFinished(subprocessStdin, writable
|
|
6160
|
-
return writable
|
|
6000
|
+
onStdinFinished(subprocessStdin, writable);
|
|
6001
|
+
return writable;
|
|
6161
6002
|
};
|
|
6162
6003
|
const getSubprocessStdin = (subprocess, to, concurrentStreams) => {
|
|
6163
6004
|
const subprocessStdin = getToStream(subprocess, to);
|
|
@@ -6181,13 +6022,13 @@ const onWritableFinal = async (subprocessStdin, subprocess, waitWritableFinal) =
|
|
|
6181
6022
|
await subprocess;
|
|
6182
6023
|
}
|
|
6183
6024
|
};
|
|
6184
|
-
const onStdinFinished = async (subprocessStdin, writable
|
|
6025
|
+
const onStdinFinished = async (subprocessStdin, writable, subprocessStdout) => {
|
|
6185
6026
|
try {
|
|
6186
6027
|
await waitForSubprocessStdin(subprocessStdin);
|
|
6187
|
-
if (writable
|
|
6028
|
+
if (writable.writable) writable.end();
|
|
6188
6029
|
} catch (error) {
|
|
6189
6030
|
await safeWaitForSubprocessStdout(subprocessStdout);
|
|
6190
|
-
destroyOtherWritable(writable
|
|
6031
|
+
destroyOtherWritable(writable, error);
|
|
6191
6032
|
}
|
|
6192
6033
|
};
|
|
6193
6034
|
const onWritableDestroy = async ({ subprocessStdin, subprocess, waitWritableFinal, waitWritableDestroy }, error) => {
|
|
@@ -6200,7 +6041,6 @@ const onWritableDestroy = async ({ subprocessStdin, subprocess, waitWritableFina
|
|
|
6200
6041
|
const destroyOtherWritable = (stream, error) => {
|
|
6201
6042
|
destroyOtherStream(stream, stream.writable, error);
|
|
6202
6043
|
};
|
|
6203
|
-
|
|
6204
6044
|
//#endregion
|
|
6205
6045
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/convert/duplex.js
|
|
6206
6046
|
const createDuplex = ({ subprocess, concurrentStreams, encoding }, { from, to, binary: binaryOption = true, preserveNewlines = true } = {}) => {
|
|
@@ -6215,7 +6055,7 @@ const createDuplex = ({ subprocess, concurrentStreams, encoding }, { from, to, b
|
|
|
6215
6055
|
encoding,
|
|
6216
6056
|
preserveNewlines
|
|
6217
6057
|
});
|
|
6218
|
-
const duplex
|
|
6058
|
+
const duplex = new Duplex({
|
|
6219
6059
|
read,
|
|
6220
6060
|
...getWritableMethods(subprocessStdin, subprocess, waitWritableFinal),
|
|
6221
6061
|
destroy: callbackify(onDuplexDestroy.bind(void 0, {
|
|
@@ -6235,12 +6075,12 @@ const createDuplex = ({ subprocess, concurrentStreams, encoding }, { from, to, b
|
|
|
6235
6075
|
onStdoutFinished({
|
|
6236
6076
|
subprocessStdout,
|
|
6237
6077
|
onStdoutDataDone,
|
|
6238
|
-
readable: duplex
|
|
6078
|
+
readable: duplex,
|
|
6239
6079
|
subprocess,
|
|
6240
6080
|
subprocessStdin
|
|
6241
6081
|
});
|
|
6242
|
-
onStdinFinished(subprocessStdin, duplex
|
|
6243
|
-
return duplex
|
|
6082
|
+
onStdinFinished(subprocessStdin, duplex, subprocessStdout);
|
|
6083
|
+
return duplex;
|
|
6244
6084
|
};
|
|
6245
6085
|
const onDuplexDestroy = async ({ subprocessStdout, subprocessStdin, subprocess, waitReadableDestroy, waitWritableFinal, waitWritableDestroy }, error) => {
|
|
6246
6086
|
await Promise.all([onReadableDestroy({
|
|
@@ -6254,7 +6094,6 @@ const onDuplexDestroy = async ({ subprocessStdout, subprocessStdin, subprocess,
|
|
|
6254
6094
|
waitWritableDestroy
|
|
6255
6095
|
}, error)]);
|
|
6256
6096
|
};
|
|
6257
|
-
|
|
6258
6097
|
//#endregion
|
|
6259
6098
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/convert/iterable.js
|
|
6260
6099
|
const createIterable = (subprocess, encoding, { from, binary: binaryOption = false, preserveNewlines = false } = {}) => {
|
|
@@ -6277,7 +6116,6 @@ const iterateOnStdoutData = async function* (onStdoutData, subprocessStdout, sub
|
|
|
6277
6116
|
await subprocess;
|
|
6278
6117
|
}
|
|
6279
6118
|
};
|
|
6280
|
-
|
|
6281
6119
|
//#endregion
|
|
6282
6120
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/convert/add.js
|
|
6283
6121
|
const addConvertedStreams = (subprocess, { encoding }) => {
|
|
@@ -6299,7 +6137,6 @@ const addConvertedStreams = (subprocess, { encoding }) => {
|
|
|
6299
6137
|
subprocess.iterable = createIterable.bind(void 0, subprocess, encoding);
|
|
6300
6138
|
subprocess[Symbol.asyncIterator] = createIterable.bind(void 0, subprocess, encoding, {});
|
|
6301
6139
|
};
|
|
6302
|
-
|
|
6303
6140
|
//#endregion
|
|
6304
6141
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/methods/promise.js
|
|
6305
6142
|
const mergePromise = (subprocess, promise) => {
|
|
@@ -6317,7 +6154,6 @@ const descriptors = [
|
|
|
6317
6154
|
"catch",
|
|
6318
6155
|
"finally"
|
|
6319
6156
|
].map((property) => [property, Reflect.getOwnPropertyDescriptor(nativePromisePrototype, property)]);
|
|
6320
|
-
|
|
6321
6157
|
//#endregion
|
|
6322
6158
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/methods/main-async.js
|
|
6323
6159
|
const execaCoreAsync = (rawFile, rawArguments, rawOptions, createNested) => {
|
|
@@ -6360,7 +6196,7 @@ const handleAsyncArguments = (rawFile, rawArguments, rawOptions) => {
|
|
|
6360
6196
|
fileDescriptors: handleStdioAsync(options, verboseInfo)
|
|
6361
6197
|
};
|
|
6362
6198
|
};
|
|
6363
|
-
const handleAsyncOptions = ({ timeout, signal
|
|
6199
|
+
const handleAsyncOptions = ({ timeout, signal, ...options }) => {
|
|
6364
6200
|
if (signal !== void 0) throw new TypeError("The \"signal\" option has been renamed to \"cancelSignal\" instead.");
|
|
6365
6201
|
return {
|
|
6366
6202
|
...options,
|
|
@@ -6470,7 +6306,6 @@ const getAsyncResult = ({ errorInfo, exitCode, signal, stdio, all, ipcOutput, co
|
|
|
6470
6306
|
options,
|
|
6471
6307
|
startTime
|
|
6472
6308
|
});
|
|
6473
|
-
|
|
6474
6309
|
//#endregion
|
|
6475
6310
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/methods/bind.js
|
|
6476
6311
|
const mergeOptions = (boundOptions, options) => {
|
|
@@ -6488,11 +6323,10 @@ const mergeOption = (optionName, boundOptionValue, optionValue) => {
|
|
|
6488
6323
|
return optionValue;
|
|
6489
6324
|
};
|
|
6490
6325
|
const DEEP_OPTIONS = new Set(["env", ...FD_SPECIFIC_OPTIONS]);
|
|
6491
|
-
|
|
6492
6326
|
//#endregion
|
|
6493
6327
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/methods/create.js
|
|
6494
6328
|
const createExeca = (mapArguments, boundOptions, deepOptions, setBoundExeca) => {
|
|
6495
|
-
const createNested = (mapArguments
|
|
6329
|
+
const createNested = (mapArguments, boundOptions, setBoundExeca) => createExeca(mapArguments, boundOptions, deepOptions, setBoundExeca);
|
|
6496
6330
|
const boundExeca = (...execaArguments) => callBoundExeca({
|
|
6497
6331
|
mapArguments,
|
|
6498
6332
|
deepOptions,
|
|
@@ -6529,7 +6363,6 @@ const parseArguments = ({ mapArguments, firstArgument, nextArguments, deepOption
|
|
|
6529
6363
|
isSync
|
|
6530
6364
|
};
|
|
6531
6365
|
};
|
|
6532
|
-
|
|
6533
6366
|
//#endregion
|
|
6534
6367
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/methods/command.js
|
|
6535
6368
|
const mapCommandAsync = ({ file, commandArguments }) => parseCommand(file, commandArguments);
|
|
@@ -6558,7 +6391,6 @@ const parseCommandString = (command) => {
|
|
|
6558
6391
|
return tokens;
|
|
6559
6392
|
};
|
|
6560
6393
|
const SPACES_REGEXP = / +/g;
|
|
6561
|
-
|
|
6562
6394
|
//#endregion
|
|
6563
6395
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/methods/script.js
|
|
6564
6396
|
const setScriptSync = (boundExeca, createNested, boundOptions) => {
|
|
@@ -6576,17 +6408,49 @@ const getScriptOptions = (options) => ({ options: {
|
|
|
6576
6408
|
} });
|
|
6577
6409
|
const getScriptStdinOption = ({ input, inputFile, stdio }) => input === void 0 && inputFile === void 0 && stdio === void 0 ? { stdin: "inherit" } : {};
|
|
6578
6410
|
const deepScriptOptions = { preferLocal: true };
|
|
6579
|
-
|
|
6580
6411
|
//#endregion
|
|
6581
6412
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/index.js
|
|
6582
6413
|
const execa = createExeca(() => ({}));
|
|
6583
|
-
|
|
6584
|
-
|
|
6585
|
-
|
|
6586
|
-
|
|
6587
|
-
|
|
6414
|
+
createExeca(() => ({ isSync: true }));
|
|
6415
|
+
createExeca(mapCommandAsync);
|
|
6416
|
+
createExeca(mapCommandSync);
|
|
6417
|
+
createExeca(mapNode);
|
|
6418
|
+
createExeca(mapScriptAsync, {}, deepScriptOptions, setScriptSync);
|
|
6588
6419
|
const { sendMessage, getOneMessage, getEachMessage, getCancelSignal } = getIpcExport();
|
|
6589
|
-
|
|
6420
|
+
//#endregion
|
|
6421
|
+
//#region iac/prepareTemplate.ts
|
|
6422
|
+
const ensureExists = async (targetPath, description) => {
|
|
6423
|
+
try {
|
|
6424
|
+
await fs$1.access(targetPath);
|
|
6425
|
+
} catch {
|
|
6426
|
+
throw new Error(`Missing Firebase ${description} at ${targetPath}`);
|
|
6427
|
+
}
|
|
6428
|
+
};
|
|
6429
|
+
const normalizeFunctionsPackage = async (functionsDir) => {
|
|
6430
|
+
const templatePackagePath = path.join(functionsDir, "_package.json");
|
|
6431
|
+
const packageJsonPath = path.join(functionsDir, "package.json");
|
|
6432
|
+
try {
|
|
6433
|
+
await fs$1.rename(templatePackagePath, packageJsonPath);
|
|
6434
|
+
} catch (error) {
|
|
6435
|
+
if (error.code !== "ENOENT") throw error;
|
|
6436
|
+
await ensureExists(packageJsonPath, "functions package.json");
|
|
6437
|
+
}
|
|
6438
|
+
};
|
|
6439
|
+
const prepareFirebaseTemplate = async (firebaseRootDir) => {
|
|
6440
|
+
const publicDir = path.join(firebaseRootDir, "public");
|
|
6441
|
+
const builtFunctionsDir = path.join(firebaseRootDir, "functions");
|
|
6442
|
+
await ensureExists(publicDir, "public template directory");
|
|
6443
|
+
await ensureExists(builtFunctionsDir, "functions build directory");
|
|
6444
|
+
const { tmpDir, removeTmpDir } = await copyDirToTmp(publicDir);
|
|
6445
|
+
const functionsDir = path.join(tmpDir, "functions");
|
|
6446
|
+
await fs$1.cp(builtFunctionsDir, functionsDir, { recursive: true });
|
|
6447
|
+
await normalizeFunctionsPackage(functionsDir);
|
|
6448
|
+
return {
|
|
6449
|
+
tmpDir,
|
|
6450
|
+
removeTmpDir,
|
|
6451
|
+
functionsDir
|
|
6452
|
+
};
|
|
6453
|
+
};
|
|
6590
6454
|
//#endregion
|
|
6591
6455
|
//#region iac/select.ts
|
|
6592
6456
|
const getConfigTemplate = (build) => {
|
|
@@ -6682,9 +6546,9 @@ const initFirebaseUser = async (cwd) => {
|
|
|
6682
6546
|
const createKey = `create/${Math.random().toString(36).substring(2, 15)}`;
|
|
6683
6547
|
const projectId = await p.select({
|
|
6684
6548
|
message: "Select a Firebase project",
|
|
6685
|
-
options: [...projects.map((project
|
|
6686
|
-
label: project
|
|
6687
|
-
value: project
|
|
6549
|
+
options: [...projects.map((project) => ({
|
|
6550
|
+
label: project.displayName,
|
|
6551
|
+
value: project.projectId
|
|
6688
6552
|
})), {
|
|
6689
6553
|
value: createKey,
|
|
6690
6554
|
label: "Create new Firebase project"
|
|
@@ -6802,7 +6666,6 @@ const initFirebaseUser = async (cwd) => {
|
|
|
6802
6666
|
projectId
|
|
6803
6667
|
};
|
|
6804
6668
|
};
|
|
6805
|
-
|
|
6806
6669
|
//#endregion
|
|
6807
6670
|
//#region iac/index.ts
|
|
6808
6671
|
const SOURCE_TEMPLATE = `// add this to your App.tsx
|
|
@@ -6899,6 +6762,26 @@ const REGIONS = [
|
|
|
6899
6762
|
label: "Australia Southeast (Sydney)"
|
|
6900
6763
|
}
|
|
6901
6764
|
];
|
|
6765
|
+
const getFirebaseRuntimePackageInfo = () => {
|
|
6766
|
+
const firebasePackageRoot = path$1.dirname(__require.resolve("@hot-updater/firebase/package.json"));
|
|
6767
|
+
return {
|
|
6768
|
+
currentPackageVersion: resolvePackageVersion("@hot-updater/firebase"),
|
|
6769
|
+
serverPackageVersion: resolveHotUpdaterServerVersion("@hot-updater/firebase"),
|
|
6770
|
+
honoVersion: resolvePackageVersion("hono", { searchFrom: firebasePackageRoot })
|
|
6771
|
+
};
|
|
6772
|
+
};
|
|
6773
|
+
const syncFunctionsPackageJson = async (functionsDir) => {
|
|
6774
|
+
const runtimePackageInfo = getFirebaseRuntimePackageInfo();
|
|
6775
|
+
const packageJsonPath = path$1.join(functionsDir, "package.json");
|
|
6776
|
+
const packageJson = JSON.parse(await fs.promises.readFile(packageJsonPath, "utf-8"));
|
|
6777
|
+
packageJson.dependencies = {
|
|
6778
|
+
...packageJson.dependencies ?? {},
|
|
6779
|
+
"@hot-updater/server": runtimePackageInfo.serverPackageVersion,
|
|
6780
|
+
hono: runtimePackageInfo.honoVersion
|
|
6781
|
+
};
|
|
6782
|
+
await fs.promises.writeFile(packageJsonPath, `${JSON.stringify(packageJson, null, 2)}\n`);
|
|
6783
|
+
return runtimePackageInfo;
|
|
6784
|
+
};
|
|
6902
6785
|
function normalizeIndex(index) {
|
|
6903
6786
|
return {
|
|
6904
6787
|
collectionGroup: index.collectionGroup,
|
|
@@ -6908,7 +6791,7 @@ function normalizeIndex(index) {
|
|
|
6908
6791
|
}
|
|
6909
6792
|
const mergeIndexes = (originalIndexes, newIndexes) => {
|
|
6910
6793
|
return {
|
|
6911
|
-
indexes: uniqWith(originalIndexes.indexes.concat(newIndexes.indexes), (a
|
|
6794
|
+
indexes: uniqWith(originalIndexes.indexes.concat(newIndexes.indexes), (a, b) => isEqual(normalizeIndex(a), normalizeIndex(b))),
|
|
6912
6795
|
fieldOverrides: merge(originalIndexes.fieldOverrides, newIndexes.fieldOverrides)
|
|
6913
6796
|
};
|
|
6914
6797
|
};
|
|
@@ -7001,10 +6884,9 @@ const runInit = async ({ build }) => {
|
|
|
7001
6884
|
p.log.step(link("https://cloud.google.com/sdk/docs/install"));
|
|
7002
6885
|
process.exit(1);
|
|
7003
6886
|
}
|
|
7004
|
-
const { tmpDir, removeTmpDir } = await
|
|
7005
|
-
const functionsDir = path$1.join(tmpDir, "functions");
|
|
6887
|
+
const { tmpDir, removeTmpDir, functionsDir } = await prepareFirebaseTemplate(path$1.dirname(path$1.dirname(__require.resolve("@hot-updater/firebase/functions"))));
|
|
7006
6888
|
const functionsIndexPath = path$1.join(functionsDir, "index.cjs");
|
|
7007
|
-
|
|
6889
|
+
const runtimePackageInfo = await syncFunctionsPackageJson(functionsDir);
|
|
7008
6890
|
const initializeVariable = await initFirebaseUser(tmpDir);
|
|
7009
6891
|
let currentRegion;
|
|
7010
6892
|
await setEnv({
|
|
@@ -7012,6 +6894,7 @@ const runInit = async ({ build }) => {
|
|
|
7012
6894
|
storageBucket: initializeVariable.storageBucket,
|
|
7013
6895
|
build
|
|
7014
6896
|
});
|
|
6897
|
+
if (runtimePackageInfo.serverPackageVersion !== runtimePackageInfo.currentPackageVersion) p.note(`Using ${HOT_UPDATER_SERVER_PACKAGE_VERSION_ENV}=${runtimePackageInfo.serverPackageVersion} for Firebase functions deploy.`);
|
|
7015
6898
|
await p.tasks([{
|
|
7016
6899
|
title: "Installing dependencies...",
|
|
7017
6900
|
task: async () => {
|
|
@@ -7126,6 +7009,5 @@ const runInit = async ({ build }) => {
|
|
|
7126
7009
|
p.log.message("Next step: Change GOOGLE_APPLICATION_CREDENTIALS=your-credentials.json in .env file");
|
|
7127
7010
|
p.log.success("Done! 🎉");
|
|
7128
7011
|
};
|
|
7129
|
-
|
|
7130
7012
|
//#endregion
|
|
7131
|
-
export { runInit };
|
|
7013
|
+
export { runInit };
|