@kubb/cli 3.0.0-alpha.10 → 3.0.0-alpha.11
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/chunk-EKC3Q472.js +23 -39
- package/dist/chunk-EKC3Q472.js.map +1 -1
- package/dist/{chunk-JSNVO6QV.cjs → chunk-IO6NJ3A2.cjs} +314 -429
- package/dist/chunk-IO6NJ3A2.cjs.map +1 -0
- package/dist/{generate-72VOKAFH.js → generate-USO6RHZL.js} +18 -32
- package/dist/generate-USO6RHZL.js.map +1 -0
- package/dist/{generate-XCM5NDJ6.cjs → generate-XNK7VVP4.cjs} +44 -46
- package/dist/generate-XNK7VVP4.cjs.map +1 -0
- package/dist/index.cjs +26 -21
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +11 -18
- package/dist/index.js.map +1 -1
- package/package.json +11 -11
- package/src/commands/generate.ts +2 -2
- package/dist/chunk-JSNVO6QV.cjs.map +0 -1
- package/dist/generate-72VOKAFH.js.map +0 -1
- package/dist/generate-XCM5NDJ6.cjs.map +0 -1
|
@@ -1,4 +1,50 @@
|
|
|
1
|
-
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var tty = require('tty');
|
|
4
|
+
var url = require('url');
|
|
5
|
+
var child_process = require('child_process');
|
|
6
|
+
var string_decoder = require('string_decoder');
|
|
7
|
+
var util = require('util');
|
|
8
|
+
var process3 = require('process');
|
|
9
|
+
var fs = require('fs');
|
|
10
|
+
var path = require('path');
|
|
11
|
+
var promises$1 = require('timers/promises');
|
|
12
|
+
var os = require('os');
|
|
13
|
+
var events = require('events');
|
|
14
|
+
var v8 = require('v8');
|
|
15
|
+
var promises = require('stream/promises');
|
|
16
|
+
var stream = require('stream');
|
|
17
|
+
var buffer = require('buffer');
|
|
18
|
+
var logger = require('@kubb/core/logger');
|
|
19
|
+
var core = require('@kubb/core');
|
|
20
|
+
var stringArgv = require('string-argv');
|
|
21
|
+
var cliProgress = require('cli-progress');
|
|
22
|
+
|
|
23
|
+
function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
|
|
24
|
+
|
|
25
|
+
function _interopNamespace(e) {
|
|
26
|
+
if (e && e.__esModule) return e;
|
|
27
|
+
var n = Object.create(null);
|
|
28
|
+
if (e) {
|
|
29
|
+
Object.keys(e).forEach(function (k) {
|
|
30
|
+
if (k !== 'default') {
|
|
31
|
+
var d = Object.getOwnPropertyDescriptor(e, k);
|
|
32
|
+
Object.defineProperty(n, k, d.get ? d : {
|
|
33
|
+
enumerable: true,
|
|
34
|
+
get: function () { return e[k]; }
|
|
35
|
+
});
|
|
36
|
+
}
|
|
37
|
+
});
|
|
38
|
+
}
|
|
39
|
+
n.default = e;
|
|
40
|
+
return Object.freeze(n);
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
var tty__default = /*#__PURE__*/_interopDefault(tty);
|
|
44
|
+
var process3__namespace = /*#__PURE__*/_interopNamespace(process3);
|
|
45
|
+
var path__default = /*#__PURE__*/_interopDefault(path);
|
|
46
|
+
|
|
47
|
+
var __create = Object.create;
|
|
2
48
|
var __defProp = Object.defineProperty;
|
|
3
49
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
50
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
@@ -29,21 +75,19 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
29
75
|
// file that has been converted to a CommonJS file using a Babel-
|
|
30
76
|
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
31
77
|
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
32
|
-
|
|
78
|
+
__defProp(target, "default", { value: mod, enumerable: true }) ,
|
|
33
79
|
mod
|
|
34
80
|
));
|
|
35
81
|
|
|
36
|
-
// ../../node_modules/.pnpm/tsup@8.2.4_@microsoft+api-extractor@7.47.7_@types+node@20.16.
|
|
82
|
+
// ../../node_modules/.pnpm/tsup@8.2.4_@microsoft+api-extractor@7.47.7_@types+node@20.16.2__@swc+core@1.7.22_jiti@1.21.6__vls2oipdlkyfowb7gcil3cs6ye/node_modules/tsup/assets/cjs_shims.js
|
|
37
83
|
var init_cjs_shims = __esm({
|
|
38
|
-
"../../node_modules/.pnpm/tsup@8.2.4_@microsoft+api-extractor@7.47.7_@types+node@20.16.
|
|
39
|
-
"use strict";
|
|
84
|
+
"../../node_modules/.pnpm/tsup@8.2.4_@microsoft+api-extractor@7.47.7_@types+node@20.16.2__@swc+core@1.7.22_jiti@1.21.6__vls2oipdlkyfowb7gcil3cs6ye/node_modules/tsup/assets/cjs_shims.js"() {
|
|
40
85
|
}
|
|
41
86
|
});
|
|
42
87
|
|
|
43
88
|
// ../../node_modules/.pnpm/isexe@2.0.0/node_modules/isexe/windows.js
|
|
44
89
|
var require_windows = __commonJS({
|
|
45
90
|
"../../node_modules/.pnpm/isexe@2.0.0/node_modules/isexe/windows.js"(exports, module) {
|
|
46
|
-
"use strict";
|
|
47
91
|
init_cjs_shims();
|
|
48
92
|
module.exports = isexe;
|
|
49
93
|
isexe.sync = sync;
|
|
@@ -85,7 +129,6 @@ var require_windows = __commonJS({
|
|
|
85
129
|
// ../../node_modules/.pnpm/isexe@2.0.0/node_modules/isexe/mode.js
|
|
86
130
|
var require_mode = __commonJS({
|
|
87
131
|
"../../node_modules/.pnpm/isexe@2.0.0/node_modules/isexe/mode.js"(exports, module) {
|
|
88
|
-
"use strict";
|
|
89
132
|
init_cjs_shims();
|
|
90
133
|
module.exports = isexe;
|
|
91
134
|
isexe.sync = sync;
|
|
@@ -120,9 +163,8 @@ var require_mode = __commonJS({
|
|
|
120
163
|
// ../../node_modules/.pnpm/isexe@2.0.0/node_modules/isexe/index.js
|
|
121
164
|
var require_isexe = __commonJS({
|
|
122
165
|
"../../node_modules/.pnpm/isexe@2.0.0/node_modules/isexe/index.js"(exports, module) {
|
|
123
|
-
"use strict";
|
|
124
166
|
init_cjs_shims();
|
|
125
|
-
|
|
167
|
+
__require("fs");
|
|
126
168
|
var core;
|
|
127
169
|
if (process.platform === "win32" || global.TESTING_WINDOWS) {
|
|
128
170
|
core = require_windows();
|
|
@@ -177,7 +219,6 @@ var require_isexe = __commonJS({
|
|
|
177
219
|
// ../../node_modules/.pnpm/which@2.0.2/node_modules/which/which.js
|
|
178
220
|
var require_which = __commonJS({
|
|
179
221
|
"../../node_modules/.pnpm/which@2.0.2/node_modules/which/which.js"(exports, module) {
|
|
180
|
-
"use strict";
|
|
181
222
|
init_cjs_shims();
|
|
182
223
|
var isWindows = process.platform === "win32" || process.env.OSTYPE === "cygwin" || process.env.OSTYPE === "msys";
|
|
183
224
|
var path6 = __require("path");
|
|
@@ -275,7 +316,6 @@ var require_which = __commonJS({
|
|
|
275
316
|
// ../../node_modules/.pnpm/path-key@3.1.1/node_modules/path-key/index.js
|
|
276
317
|
var require_path_key = __commonJS({
|
|
277
318
|
"../../node_modules/.pnpm/path-key@3.1.1/node_modules/path-key/index.js"(exports, module) {
|
|
278
|
-
"use strict";
|
|
279
319
|
init_cjs_shims();
|
|
280
320
|
var pathKey2 = (options = {}) => {
|
|
281
321
|
const environment = options.env || process.env;
|
|
@@ -293,7 +333,6 @@ var require_path_key = __commonJS({
|
|
|
293
333
|
// ../../node_modules/.pnpm/cross-spawn@7.0.3/node_modules/cross-spawn/lib/util/resolveCommand.js
|
|
294
334
|
var require_resolveCommand = __commonJS({
|
|
295
335
|
"../../node_modules/.pnpm/cross-spawn@7.0.3/node_modules/cross-spawn/lib/util/resolveCommand.js"(exports, module) {
|
|
296
|
-
"use strict";
|
|
297
336
|
init_cjs_shims();
|
|
298
337
|
var path6 = __require("path");
|
|
299
338
|
var which = require_which();
|
|
@@ -336,7 +375,6 @@ var require_resolveCommand = __commonJS({
|
|
|
336
375
|
// ../../node_modules/.pnpm/cross-spawn@7.0.3/node_modules/cross-spawn/lib/util/escape.js
|
|
337
376
|
var require_escape = __commonJS({
|
|
338
377
|
"../../node_modules/.pnpm/cross-spawn@7.0.3/node_modules/cross-spawn/lib/util/escape.js"(exports, module) {
|
|
339
|
-
"use strict";
|
|
340
378
|
init_cjs_shims();
|
|
341
379
|
var metaCharsRegExp = /([()\][%!^"`<>&|;, *?])/g;
|
|
342
380
|
function escapeCommand(arg) {
|
|
@@ -362,7 +400,6 @@ var require_escape = __commonJS({
|
|
|
362
400
|
// ../../node_modules/.pnpm/shebang-regex@3.0.0/node_modules/shebang-regex/index.js
|
|
363
401
|
var require_shebang_regex = __commonJS({
|
|
364
402
|
"../../node_modules/.pnpm/shebang-regex@3.0.0/node_modules/shebang-regex/index.js"(exports, module) {
|
|
365
|
-
"use strict";
|
|
366
403
|
init_cjs_shims();
|
|
367
404
|
module.exports = /^#!(.*)/;
|
|
368
405
|
}
|
|
@@ -371,7 +408,6 @@ var require_shebang_regex = __commonJS({
|
|
|
371
408
|
// ../../node_modules/.pnpm/shebang-command@2.0.0/node_modules/shebang-command/index.js
|
|
372
409
|
var require_shebang_command = __commonJS({
|
|
373
410
|
"../../node_modules/.pnpm/shebang-command@2.0.0/node_modules/shebang-command/index.js"(exports, module) {
|
|
374
|
-
"use strict";
|
|
375
411
|
init_cjs_shims();
|
|
376
412
|
var shebangRegex = require_shebang_regex();
|
|
377
413
|
module.exports = (string = "") => {
|
|
@@ -392,7 +428,6 @@ var require_shebang_command = __commonJS({
|
|
|
392
428
|
// ../../node_modules/.pnpm/cross-spawn@7.0.3/node_modules/cross-spawn/lib/util/readShebang.js
|
|
393
429
|
var require_readShebang = __commonJS({
|
|
394
430
|
"../../node_modules/.pnpm/cross-spawn@7.0.3/node_modules/cross-spawn/lib/util/readShebang.js"(exports, module) {
|
|
395
|
-
"use strict";
|
|
396
431
|
init_cjs_shims();
|
|
397
432
|
var fs = __require("fs");
|
|
398
433
|
var shebangCommand = require_shebang_command();
|
|
@@ -415,7 +450,6 @@ var require_readShebang = __commonJS({
|
|
|
415
450
|
// ../../node_modules/.pnpm/cross-spawn@7.0.3/node_modules/cross-spawn/lib/parse.js
|
|
416
451
|
var require_parse = __commonJS({
|
|
417
452
|
"../../node_modules/.pnpm/cross-spawn@7.0.3/node_modules/cross-spawn/lib/parse.js"(exports, module) {
|
|
418
|
-
"use strict";
|
|
419
453
|
init_cjs_shims();
|
|
420
454
|
var path6 = __require("path");
|
|
421
455
|
var resolveCommand = require_resolveCommand();
|
|
@@ -478,7 +512,6 @@ var require_parse = __commonJS({
|
|
|
478
512
|
// ../../node_modules/.pnpm/cross-spawn@7.0.3/node_modules/cross-spawn/lib/enoent.js
|
|
479
513
|
var require_enoent = __commonJS({
|
|
480
514
|
"../../node_modules/.pnpm/cross-spawn@7.0.3/node_modules/cross-spawn/lib/enoent.js"(exports, module) {
|
|
481
|
-
"use strict";
|
|
482
515
|
init_cjs_shims();
|
|
483
516
|
var isWin = process.platform === "win32";
|
|
484
517
|
function notFoundError(original, syscall) {
|
|
@@ -497,7 +530,7 @@ var require_enoent = __commonJS({
|
|
|
497
530
|
const originalEmit = cp.emit;
|
|
498
531
|
cp.emit = function(name, arg1) {
|
|
499
532
|
if (name === "exit") {
|
|
500
|
-
const err = verifyENOENT(arg1, parsed
|
|
533
|
+
const err = verifyENOENT(arg1, parsed);
|
|
501
534
|
if (err) {
|
|
502
535
|
return originalEmit.call(cp, "error", err);
|
|
503
536
|
}
|
|
@@ -529,7 +562,6 @@ var require_enoent = __commonJS({
|
|
|
529
562
|
// ../../node_modules/.pnpm/cross-spawn@7.0.3/node_modules/cross-spawn/index.js
|
|
530
563
|
var require_cross_spawn = __commonJS({
|
|
531
564
|
"../../node_modules/.pnpm/cross-spawn@7.0.3/node_modules/cross-spawn/index.js"(exports, module) {
|
|
532
|
-
"use strict";
|
|
533
565
|
init_cjs_shims();
|
|
534
566
|
var cp = __require("child_process");
|
|
535
567
|
var parse = require_parse();
|
|
@@ -557,7 +589,6 @@ var require_cross_spawn = __commonJS({
|
|
|
557
589
|
// ../../node_modules/.pnpm/eventemitter3@5.0.1/node_modules/eventemitter3/index.js
|
|
558
590
|
var require_eventemitter3 = __commonJS({
|
|
559
591
|
"../../node_modules/.pnpm/eventemitter3@5.0.1/node_modules/eventemitter3/index.js"(exports, module) {
|
|
560
|
-
"use strict";
|
|
561
592
|
init_cjs_shims();
|
|
562
593
|
var has = Object.prototype.hasOwnProperty;
|
|
563
594
|
var prefix = "~";
|
|
@@ -799,10 +830,7 @@ function p(n2 = false) {
|
|
|
799
830
|
) : a;
|
|
800
831
|
return u2;
|
|
801
832
|
}
|
|
802
|
-
|
|
803
|
-
// ../../node_modules/.pnpm/tinyrainbow@1.2.0/node_modules/tinyrainbow/dist/node.js
|
|
804
|
-
var _tty = require('tty'); var _tty2 = _interopRequireDefault(_tty);
|
|
805
|
-
var p2 = p(_tty.isatty.call(void 0, 1));
|
|
833
|
+
var p2 = p(tty.isatty(1));
|
|
806
834
|
|
|
807
835
|
// ../../node_modules/.pnpm/execa@9.3.1/node_modules/execa/index.js
|
|
808
836
|
init_cjs_shims();
|
|
@@ -825,7 +853,6 @@ init_cjs_shims();
|
|
|
825
853
|
|
|
826
854
|
// ../../node_modules/.pnpm/execa@9.3.1/node_modules/execa/lib/arguments/file-url.js
|
|
827
855
|
init_cjs_shims();
|
|
828
|
-
var _url = require('url');
|
|
829
856
|
var safeNormalizeFileUrl = (file, name) => {
|
|
830
857
|
const fileString = normalizeFileUrl(file);
|
|
831
858
|
if (typeof fileString !== "string") {
|
|
@@ -833,7 +860,7 @@ var safeNormalizeFileUrl = (file, name) => {
|
|
|
833
860
|
}
|
|
834
861
|
return fileString;
|
|
835
862
|
};
|
|
836
|
-
var normalizeFileUrl = (file) => file instanceof URL ?
|
|
863
|
+
var normalizeFileUrl = (file) => file instanceof URL ? url.fileURLToPath(file) : file;
|
|
837
864
|
|
|
838
865
|
// ../../node_modules/.pnpm/execa@9.3.1/node_modules/execa/lib/methods/parameters.js
|
|
839
866
|
var normalizeParameters = (rawFile, rawArguments = [], rawOptions = {}) => {
|
|
@@ -858,11 +885,9 @@ var normalizeParameters = (rawFile, rawArguments = [], rawOptions = {}) => {
|
|
|
858
885
|
|
|
859
886
|
// ../../node_modules/.pnpm/execa@9.3.1/node_modules/execa/lib/methods/template.js
|
|
860
887
|
init_cjs_shims();
|
|
861
|
-
var _child_process = require('child_process');
|
|
862
888
|
|
|
863
889
|
// ../../node_modules/.pnpm/execa@9.3.1/node_modules/execa/lib/utils/uint-array.js
|
|
864
890
|
init_cjs_shims();
|
|
865
|
-
var _string_decoder = require('string_decoder');
|
|
866
891
|
var { toString: objectToString } = Object.prototype;
|
|
867
892
|
var isArrayBuffer = (value) => objectToString.call(value) === "[object ArrayBuffer]";
|
|
868
893
|
var isUint8Array = (value) => objectToString.call(value) === "[object Uint8Array]";
|
|
@@ -879,7 +904,7 @@ var uint8ArraysToStrings = (uint8ArraysOrStrings, encoding) => {
|
|
|
879
904
|
if (encoding === "utf8" && uint8ArraysOrStrings.every((uint8ArrayOrString) => typeof uint8ArrayOrString === "string")) {
|
|
880
905
|
return uint8ArraysOrStrings;
|
|
881
906
|
}
|
|
882
|
-
const decoder = new
|
|
907
|
+
const decoder = new string_decoder.StringDecoder(encoding);
|
|
883
908
|
const strings = uint8ArraysOrStrings.map((uint8ArrayOrString) => typeof uint8ArrayOrString === "string" ? stringToUint8Array(uint8ArrayOrString) : uint8ArrayOrString).map((uint8Array) => decoder.write(uint8Array));
|
|
884
909
|
const finalString = decoder.end();
|
|
885
910
|
return finalString === "" ? strings : [...strings, finalString];
|
|
@@ -959,7 +984,7 @@ var splitByWhitespaces = (template, rawTemplate) => {
|
|
|
959
984
|
if (nextRawCharacter === "u" && rawTemplate[rawIndex + 2] === "{") {
|
|
960
985
|
rawIndex = rawTemplate.indexOf("}", rawIndex + 3);
|
|
961
986
|
} else {
|
|
962
|
-
rawIndex +=
|
|
987
|
+
rawIndex += ESCAPE_LENGTH[nextRawCharacter] ?? 1;
|
|
963
988
|
}
|
|
964
989
|
}
|
|
965
990
|
}
|
|
@@ -987,7 +1012,7 @@ var parseExpression = (expression) => {
|
|
|
987
1012
|
if (isPlainObject(expression) && ("stdout" in expression || "isMaxBuffer" in expression)) {
|
|
988
1013
|
return getSubprocessResult(expression);
|
|
989
1014
|
}
|
|
990
|
-
if (expression instanceof
|
|
1015
|
+
if (expression instanceof child_process.ChildProcess || Object.prototype.toString.call(expression) === "[object Promise]") {
|
|
991
1016
|
throw new TypeError("Unexpected subprocess in template expression. Please use ${await subprocess} instead of ${subprocess}.");
|
|
992
1017
|
}
|
|
993
1018
|
throw new TypeError(`Unexpected "${typeOfExpression}" in template expression`);
|
|
@@ -1008,7 +1033,6 @@ var getSubprocessResult = ({ stdout: stdout2 }) => {
|
|
|
1008
1033
|
// ../../node_modules/.pnpm/execa@9.3.1/node_modules/execa/lib/methods/main-sync.js
|
|
1009
1034
|
init_cjs_shims();
|
|
1010
1035
|
|
|
1011
|
-
|
|
1012
1036
|
// ../../node_modules/.pnpm/execa@9.3.1/node_modules/execa/lib/arguments/command.js
|
|
1013
1037
|
init_cjs_shims();
|
|
1014
1038
|
|
|
@@ -1020,15 +1044,13 @@ init_cjs_shims();
|
|
|
1020
1044
|
|
|
1021
1045
|
// ../../node_modules/.pnpm/execa@9.3.1/node_modules/execa/lib/arguments/specific.js
|
|
1022
1046
|
init_cjs_shims();
|
|
1023
|
-
var _util = require('util');
|
|
1024
1047
|
|
|
1025
1048
|
// ../../node_modules/.pnpm/execa@9.3.1/node_modules/execa/lib/utils/standard-stream.js
|
|
1026
1049
|
init_cjs_shims();
|
|
1027
|
-
var _process = require('process'); var process10 = _interopRequireWildcard(_process);
|
|
1028
1050
|
var isStandardStream = (stream) => STANDARD_STREAMS.includes(stream);
|
|
1029
|
-
var STANDARD_STREAMS = [
|
|
1051
|
+
var STANDARD_STREAMS = [process3__namespace.default.stdin, process3__namespace.default.stdout, process3__namespace.default.stderr];
|
|
1030
1052
|
var STANDARD_STREAMS_ALIASES = ["stdin", "stdout", "stderr"];
|
|
1031
|
-
var getStreamName = (fdNumber) =>
|
|
1053
|
+
var getStreamName = (fdNumber) => STANDARD_STREAMS_ALIASES[fdNumber] ?? `stdio[${fdNumber}]`;
|
|
1032
1054
|
|
|
1033
1055
|
// ../../node_modules/.pnpm/execa@9.3.1/node_modules/execa/lib/arguments/specific.js
|
|
1034
1056
|
var normalizeFdSpecificOptions = (options) => {
|
|
@@ -1089,7 +1111,7 @@ var parseFd = (fdName) => {
|
|
|
1089
1111
|
};
|
|
1090
1112
|
var FD_REGEXP = /^fd(\d+)$/;
|
|
1091
1113
|
var addDefaultValue = (optionArray, optionName) => optionArray.map((optionValue) => optionValue === void 0 ? DEFAULT_OPTIONS[optionName] : optionValue);
|
|
1092
|
-
var verboseDefault =
|
|
1114
|
+
var verboseDefault = util.debuglog("execa").enabled ? "full" : "none";
|
|
1093
1115
|
var DEFAULT_OPTIONS = {
|
|
1094
1116
|
lines: false,
|
|
1095
1117
|
buffer: true,
|
|
@@ -1108,26 +1130,22 @@ var getVerboseFunction = ({ verbose }, fdNumber) => {
|
|
|
1108
1130
|
return isVerboseFunction(fdVerbose) ? fdVerbose : void 0;
|
|
1109
1131
|
};
|
|
1110
1132
|
var getFdVerbose = (verbose, fdNumber) => fdNumber === void 0 ? getFdGenericVerbose(verbose) : getFdSpecificValue(verbose, fdNumber);
|
|
1111
|
-
var getFdGenericVerbose = (verbose) =>
|
|
1133
|
+
var getFdGenericVerbose = (verbose) => verbose.find((fdVerbose) => isVerboseFunction(fdVerbose)) ?? VERBOSE_VALUES.findLast((fdVerbose) => verbose.includes(fdVerbose));
|
|
1112
1134
|
var isVerboseFunction = (fdVerbose) => typeof fdVerbose === "function";
|
|
1113
1135
|
var VERBOSE_VALUES = ["none", "short", "full"];
|
|
1114
1136
|
|
|
1115
1137
|
// ../../node_modules/.pnpm/execa@9.3.1/node_modules/execa/lib/verbose/log.js
|
|
1116
1138
|
init_cjs_shims();
|
|
1117
|
-
var _fs = require('fs');
|
|
1118
|
-
|
|
1119
1139
|
|
|
1120
1140
|
// ../../node_modules/.pnpm/execa@9.3.1/node_modules/execa/lib/arguments/escape.js
|
|
1121
1141
|
init_cjs_shims();
|
|
1122
|
-
|
|
1123
|
-
|
|
1124
1142
|
var joinCommand = (filePath, rawArguments) => {
|
|
1125
1143
|
const fileAndArguments = [filePath, ...rawArguments];
|
|
1126
1144
|
const command = fileAndArguments.join(" ");
|
|
1127
1145
|
const escapedCommand = fileAndArguments.map((fileAndArgument) => quoteString(escapeControlCharacters(fileAndArgument))).join(" ");
|
|
1128
1146
|
return { command, escapedCommand };
|
|
1129
1147
|
};
|
|
1130
|
-
var escapeLines = (lines) =>
|
|
1148
|
+
var escapeLines = (lines) => util.stripVTControlCharacters(lines).split("\n").map((line) => escapeControlCharacters(line)).join("\n");
|
|
1131
1149
|
var escapeControlCharacters = (line) => line.replaceAll(SPECIAL_CHAR_REGEXP, (character) => escapeControlCharacter(character));
|
|
1132
1150
|
var escapeControlCharacter = (character) => {
|
|
1133
1151
|
const commonEscape = COMMON_ESCAPES[character];
|
|
@@ -1141,7 +1159,7 @@ var escapeControlCharacter = (character) => {
|
|
|
1141
1159
|
var getSpecialCharRegExp = () => {
|
|
1142
1160
|
try {
|
|
1143
1161
|
return new RegExp("\\p{Separator}|\\p{Other}", "gu");
|
|
1144
|
-
} catch
|
|
1162
|
+
} catch {
|
|
1145
1163
|
return /[\s\u0000-\u001F\u007F-\u009F\u00AD]/g;
|
|
1146
1164
|
}
|
|
1147
1165
|
};
|
|
@@ -1159,7 +1177,7 @@ var quoteString = (escapedArgument) => {
|
|
|
1159
1177
|
if (NO_ESCAPE_REGEXP.test(escapedArgument)) {
|
|
1160
1178
|
return escapedArgument;
|
|
1161
1179
|
}
|
|
1162
|
-
return
|
|
1180
|
+
return process3.platform === "win32" ? `"${escapedArgument.replaceAll('"', '""')}"` : `'${escapedArgument.replaceAll("'", "'\\''")}'`;
|
|
1163
1181
|
};
|
|
1164
1182
|
var NO_ESCAPE_REGEXP = /^[\w./-]+$/;
|
|
1165
1183
|
|
|
@@ -1171,12 +1189,11 @@ init_cjs_shims();
|
|
|
1171
1189
|
|
|
1172
1190
|
// ../../node_modules/.pnpm/is-unicode-supported@2.0.0/node_modules/is-unicode-supported/index.js
|
|
1173
1191
|
init_cjs_shims();
|
|
1174
|
-
|
|
1175
1192
|
function isUnicodeSupported() {
|
|
1176
|
-
if (
|
|
1177
|
-
return
|
|
1193
|
+
if (process3__namespace.default.platform !== "win32") {
|
|
1194
|
+
return process3__namespace.default.env.TERM !== "linux";
|
|
1178
1195
|
}
|
|
1179
|
-
return Boolean(
|
|
1196
|
+
return Boolean(process3__namespace.default.env.WT_SESSION) || Boolean(process3__namespace.default.env.TERMINUS_SUBLIME) || process3__namespace.default.env.ConEmuTask === "{cmd::Cmder}" || process3__namespace.default.env.TERM_PROGRAM === "Terminus-Sublime" || process3__namespace.default.env.TERM_PROGRAM === "vscode" || process3__namespace.default.env.TERM === "xterm-256color" || process3__namespace.default.env.TERM === "alacritty" || process3__namespace.default.env.TERMINAL_EMULATOR === "JetBrains-JediTerm";
|
|
1180
1197
|
}
|
|
1181
1198
|
|
|
1182
1199
|
// ../../node_modules/.pnpm/figures@6.1.0/node_modules/figures/index.js
|
|
@@ -1453,12 +1470,10 @@ var fallbackSymbols = { ...common, ...specialFallbackSymbols };
|
|
|
1453
1470
|
var shouldUseMain = isUnicodeSupported();
|
|
1454
1471
|
var figures = shouldUseMain ? mainSymbols : fallbackSymbols;
|
|
1455
1472
|
var figures_default = figures;
|
|
1456
|
-
var replacements = Object.entries(specialMainSymbols);
|
|
1457
1473
|
|
|
1458
1474
|
// ../../node_modules/.pnpm/yoctocolors@2.1.1/node_modules/yoctocolors/base.js
|
|
1459
1475
|
init_cjs_shims();
|
|
1460
|
-
|
|
1461
|
-
var hasColors = _nullishCoalesce(_optionalChain([_tty2.default, 'optionalAccess', _2 => _2.WriteStream, 'optionalAccess', _3 => _3.prototype, 'optionalAccess', _4 => _4.hasColors, 'optionalCall', _5 => _5()]), () => ( false));
|
|
1476
|
+
var hasColors = tty__default.default?.WriteStream?.prototype?.hasColors?.() ?? false;
|
|
1462
1477
|
var format = (open, close) => {
|
|
1463
1478
|
if (!hasColors) {
|
|
1464
1479
|
return (input) => input;
|
|
@@ -1482,47 +1497,10 @@ var format = (open, close) => {
|
|
|
1482
1497
|
return result;
|
|
1483
1498
|
};
|
|
1484
1499
|
};
|
|
1485
|
-
var reset = format(0, 0);
|
|
1486
1500
|
var bold = format(1, 22);
|
|
1487
|
-
var dim = format(2, 22);
|
|
1488
|
-
var italic = format(3, 23);
|
|
1489
|
-
var underline = format(4, 24);
|
|
1490
|
-
var overline = format(53, 55);
|
|
1491
|
-
var inverse = format(7, 27);
|
|
1492
|
-
var hidden = format(8, 28);
|
|
1493
|
-
var strikethrough = format(9, 29);
|
|
1494
|
-
var black = format(30, 39);
|
|
1495
|
-
var red = format(31, 39);
|
|
1496
|
-
var green = format(32, 39);
|
|
1497
|
-
var yellow = format(33, 39);
|
|
1498
|
-
var blue = format(34, 39);
|
|
1499
|
-
var magenta = format(35, 39);
|
|
1500
|
-
var cyan = format(36, 39);
|
|
1501
|
-
var white = format(37, 39);
|
|
1502
1501
|
var gray = format(90, 39);
|
|
1503
|
-
var bgBlack = format(40, 49);
|
|
1504
|
-
var bgRed = format(41, 49);
|
|
1505
|
-
var bgGreen = format(42, 49);
|
|
1506
|
-
var bgYellow = format(43, 49);
|
|
1507
|
-
var bgBlue = format(44, 49);
|
|
1508
|
-
var bgMagenta = format(45, 49);
|
|
1509
|
-
var bgCyan = format(46, 49);
|
|
1510
|
-
var bgWhite = format(47, 49);
|
|
1511
|
-
var bgGray = format(100, 49);
|
|
1512
1502
|
var redBright = format(91, 39);
|
|
1513
|
-
var greenBright = format(92, 39);
|
|
1514
1503
|
var yellowBright = format(93, 39);
|
|
1515
|
-
var blueBright = format(94, 39);
|
|
1516
|
-
var magentaBright = format(95, 39);
|
|
1517
|
-
var cyanBright = format(96, 39);
|
|
1518
|
-
var whiteBright = format(97, 39);
|
|
1519
|
-
var bgRedBright = format(101, 49);
|
|
1520
|
-
var bgGreenBright = format(102, 49);
|
|
1521
|
-
var bgYellowBright = format(103, 49);
|
|
1522
|
-
var bgBlueBright = format(104, 49);
|
|
1523
|
-
var bgMagentaBright = format(105, 49);
|
|
1524
|
-
var bgCyanBright = format(106, 49);
|
|
1525
|
-
var bgWhiteBright = format(107, 49);
|
|
1526
1504
|
|
|
1527
1505
|
// ../../node_modules/.pnpm/execa@9.3.1/node_modules/execa/lib/verbose/default.js
|
|
1528
1506
|
var defaultVerboseFunction = ({
|
|
@@ -1586,7 +1564,7 @@ var verboseLog = ({ type, verboseMessage, fdNumber, verboseInfo, result }) => {
|
|
|
1586
1564
|
const verboseObject = getVerboseObject({ type, result, verboseInfo });
|
|
1587
1565
|
const printedLines = getPrintedLines(verboseMessage, verboseObject);
|
|
1588
1566
|
const finalLines = applyVerboseOnLines(printedLines, verboseInfo, fdNumber);
|
|
1589
|
-
|
|
1567
|
+
fs.writeFileSync(STDERR_FD, finalLines);
|
|
1590
1568
|
};
|
|
1591
1569
|
var getVerboseObject = ({
|
|
1592
1570
|
type,
|
|
@@ -1608,7 +1586,7 @@ var getPrintedLine = (verboseObject) => {
|
|
|
1608
1586
|
};
|
|
1609
1587
|
var STDERR_FD = 2;
|
|
1610
1588
|
var serializeVerboseMessage = (message) => {
|
|
1611
|
-
const messageString = typeof message === "string" ? message :
|
|
1589
|
+
const messageString = typeof message === "string" ? message : util.inspect(message);
|
|
1612
1590
|
const escapedMessage = escapeLines(messageString);
|
|
1613
1591
|
return escapedMessage.replaceAll(" ", " ".repeat(TAB_SIZE));
|
|
1614
1592
|
};
|
|
@@ -1657,9 +1635,8 @@ var validateVerbose = (verbose) => {
|
|
|
1657
1635
|
|
|
1658
1636
|
// ../../node_modules/.pnpm/execa@9.3.1/node_modules/execa/lib/return/duration.js
|
|
1659
1637
|
init_cjs_shims();
|
|
1660
|
-
|
|
1661
|
-
var
|
|
1662
|
-
var getDurationMs = (startTime) => Number(_process.hrtime.bigint() - startTime) / 1e6;
|
|
1638
|
+
var getStartTime = () => process3.hrtime.bigint();
|
|
1639
|
+
var getDurationMs = (startTime) => Number(process3.hrtime.bigint() - startTime) / 1e6;
|
|
1663
1640
|
|
|
1664
1641
|
// ../../node_modules/.pnpm/execa@9.3.1/node_modules/execa/lib/arguments/command.js
|
|
1665
1642
|
var handleCommand = (filePath, rawArguments, rawOptions) => {
|
|
@@ -1678,16 +1655,11 @@ var handleCommand = (filePath, rawArguments, rawOptions) => {
|
|
|
1678
1655
|
|
|
1679
1656
|
// ../../node_modules/.pnpm/execa@9.3.1/node_modules/execa/lib/arguments/options.js
|
|
1680
1657
|
init_cjs_shims();
|
|
1681
|
-
var import_cross_spawn = __toESM(require_cross_spawn()
|
|
1682
|
-
var _path = require('path'); var _path2 = _interopRequireDefault(_path);
|
|
1683
|
-
|
|
1658
|
+
var import_cross_spawn = __toESM(require_cross_spawn());
|
|
1684
1659
|
|
|
1685
1660
|
// ../../node_modules/.pnpm/npm-run-path@5.3.0/node_modules/npm-run-path/index.js
|
|
1686
1661
|
init_cjs_shims();
|
|
1687
1662
|
|
|
1688
|
-
|
|
1689
|
-
|
|
1690
|
-
|
|
1691
1663
|
// ../../node_modules/.pnpm/path-key@4.0.0/node_modules/path-key/index.js
|
|
1692
1664
|
init_cjs_shims();
|
|
1693
1665
|
function pathKey(options = {}) {
|
|
@@ -1703,14 +1675,14 @@ function pathKey(options = {}) {
|
|
|
1703
1675
|
|
|
1704
1676
|
// ../../node_modules/.pnpm/npm-run-path@5.3.0/node_modules/npm-run-path/index.js
|
|
1705
1677
|
var npmRunPath = ({
|
|
1706
|
-
cwd =
|
|
1707
|
-
path: pathOption =
|
|
1678
|
+
cwd = process3__namespace.default.cwd(),
|
|
1679
|
+
path: pathOption = process3__namespace.default.env[pathKey()],
|
|
1708
1680
|
preferLocal = true,
|
|
1709
|
-
execPath: execPath2 =
|
|
1681
|
+
execPath: execPath2 = process3__namespace.default.execPath,
|
|
1710
1682
|
addExecPath = true
|
|
1711
1683
|
} = {}) => {
|
|
1712
|
-
const cwdString = cwd instanceof URL ?
|
|
1713
|
-
const cwdPath =
|
|
1684
|
+
const cwdString = cwd instanceof URL ? url.fileURLToPath(cwd) : cwd;
|
|
1685
|
+
const cwdPath = path__default.default.resolve(cwdString);
|
|
1714
1686
|
const result = [];
|
|
1715
1687
|
if (preferLocal) {
|
|
1716
1688
|
applyPreferLocal(result, cwdPath);
|
|
@@ -1718,21 +1690,21 @@ var npmRunPath = ({
|
|
|
1718
1690
|
if (addExecPath) {
|
|
1719
1691
|
applyExecPath(result, execPath2, cwdPath);
|
|
1720
1692
|
}
|
|
1721
|
-
return [...result, pathOption].join(
|
|
1693
|
+
return [...result, pathOption].join(path__default.default.delimiter);
|
|
1722
1694
|
};
|
|
1723
1695
|
var applyPreferLocal = (result, cwdPath) => {
|
|
1724
1696
|
let previous;
|
|
1725
1697
|
while (previous !== cwdPath) {
|
|
1726
|
-
result.push(
|
|
1698
|
+
result.push(path__default.default.join(cwdPath, "node_modules/.bin"));
|
|
1727
1699
|
previous = cwdPath;
|
|
1728
|
-
cwdPath =
|
|
1700
|
+
cwdPath = path__default.default.resolve(cwdPath, "..");
|
|
1729
1701
|
}
|
|
1730
1702
|
};
|
|
1731
1703
|
var applyExecPath = (result, execPath2, cwdPath) => {
|
|
1732
|
-
const execPathString = execPath2 instanceof URL ?
|
|
1733
|
-
result.push(
|
|
1704
|
+
const execPathString = execPath2 instanceof URL ? url.fileURLToPath(execPath2) : execPath2;
|
|
1705
|
+
result.push(path__default.default.resolve(cwdPath, execPathString, ".."));
|
|
1734
1706
|
};
|
|
1735
|
-
var npmRunPathEnv = ({ env =
|
|
1707
|
+
var npmRunPathEnv = ({ env = process3__namespace.default.env, ...options } = {}) => {
|
|
1736
1708
|
env = { ...env };
|
|
1737
1709
|
const pathName = pathKey({ env });
|
|
1738
1710
|
options.path = env[pathName];
|
|
@@ -1742,7 +1714,6 @@ var npmRunPathEnv = ({ env = process10.default.env, ...options } = {}) => {
|
|
|
1742
1714
|
|
|
1743
1715
|
// ../../node_modules/.pnpm/execa@9.3.1/node_modules/execa/lib/terminate/kill.js
|
|
1744
1716
|
init_cjs_shims();
|
|
1745
|
-
var _promises = require('timers/promises');
|
|
1746
1717
|
|
|
1747
1718
|
// ../../node_modules/.pnpm/execa@9.3.1/node_modules/execa/lib/return/final-error.js
|
|
1748
1719
|
init_cjs_shims();
|
|
@@ -1779,12 +1750,10 @@ setErrorName(ExecaSyncError, ExecaSyncError.name);
|
|
|
1779
1750
|
|
|
1780
1751
|
// ../../node_modules/.pnpm/execa@9.3.1/node_modules/execa/lib/terminate/signal.js
|
|
1781
1752
|
init_cjs_shims();
|
|
1782
|
-
var _os = require('os');
|
|
1783
1753
|
|
|
1784
1754
|
// ../../node_modules/.pnpm/human-signals@8.0.0/node_modules/human-signals/build/src/main.js
|
|
1785
1755
|
init_cjs_shims();
|
|
1786
1756
|
|
|
1787
|
-
|
|
1788
1757
|
// ../../node_modules/.pnpm/human-signals@8.0.0/node_modules/human-signals/build/src/realtime.js
|
|
1789
1758
|
init_cjs_shims();
|
|
1790
1759
|
var getRealtimeSignals = () => {
|
|
@@ -1804,7 +1773,6 @@ var SIGRTMAX = 64;
|
|
|
1804
1773
|
// ../../node_modules/.pnpm/human-signals@8.0.0/node_modules/human-signals/build/src/signals.js
|
|
1805
1774
|
init_cjs_shims();
|
|
1806
1775
|
|
|
1807
|
-
|
|
1808
1776
|
// ../../node_modules/.pnpm/human-signals@8.0.0/node_modules/human-signals/build/src/core.js
|
|
1809
1777
|
init_cjs_shims();
|
|
1810
1778
|
var SIGNALS = [
|
|
@@ -2095,7 +2063,7 @@ var normalizeSignal = ({
|
|
|
2095
2063
|
}) => {
|
|
2096
2064
|
const {
|
|
2097
2065
|
signals: { [name]: constantSignal }
|
|
2098
|
-
} =
|
|
2066
|
+
} = os.constants;
|
|
2099
2067
|
const supported = constantSignal !== void 0;
|
|
2100
2068
|
const number = supported ? constantSignal : defaultNumber;
|
|
2101
2069
|
return { name, number, description, supported, action, forced, standard };
|
|
@@ -2144,13 +2112,13 @@ var getSignalByNumber = (number, signals2) => {
|
|
|
2144
2112
|
};
|
|
2145
2113
|
};
|
|
2146
2114
|
var findSignalByNumber = (number, signals2) => {
|
|
2147
|
-
const signal = signals2.find(({ name }) =>
|
|
2115
|
+
const signal = signals2.find(({ name }) => os.constants.signals[name] === number);
|
|
2148
2116
|
if (signal !== void 0) {
|
|
2149
2117
|
return signal;
|
|
2150
2118
|
}
|
|
2151
2119
|
return signals2.find((signalA) => signalA.number === number);
|
|
2152
2120
|
};
|
|
2153
|
-
|
|
2121
|
+
getSignalsByNumber();
|
|
2154
2122
|
|
|
2155
2123
|
// ../../node_modules/.pnpm/execa@9.3.1/node_modules/execa/lib/terminate/signal.js
|
|
2156
2124
|
var normalizeKillSignal = (killSignal) => {
|
|
@@ -2178,13 +2146,13 @@ var normalizeSignalInteger = (signalInteger, optionName) => {
|
|
|
2178
2146
|
throw new TypeError(`Invalid ${optionName} ${signalInteger}: this signal integer does not exist.
|
|
2179
2147
|
${getAvailableSignals()}`);
|
|
2180
2148
|
};
|
|
2181
|
-
var getSignalsIntegerToName = () => new Map(Object.entries(
|
|
2149
|
+
var getSignalsIntegerToName = () => new Map(Object.entries(os.constants.signals).reverse().map(([signalName, signalInteger]) => [signalInteger, signalName]));
|
|
2182
2150
|
var signalsIntegerToName = getSignalsIntegerToName();
|
|
2183
2151
|
var normalizeSignalName = (signalName, optionName) => {
|
|
2184
|
-
if (signalName in
|
|
2152
|
+
if (signalName in os.constants.signals) {
|
|
2185
2153
|
return signalName;
|
|
2186
2154
|
}
|
|
2187
|
-
if (signalName.toUpperCase() in
|
|
2155
|
+
if (signalName.toUpperCase() in os.constants.signals) {
|
|
2188
2156
|
throw new TypeError(`Invalid ${optionName} '${signalName}': please rename it to '${signalName.toUpperCase()}'.`);
|
|
2189
2157
|
}
|
|
2190
2158
|
throw new TypeError(`Invalid ${optionName} '${signalName}': this signal name does not exist.
|
|
@@ -2192,8 +2160,8 @@ ${getAvailableSignals()}`);
|
|
|
2192
2160
|
};
|
|
2193
2161
|
var getAvailableSignals = () => `Available signal names: ${getAvailableSignalNames()}.
|
|
2194
2162
|
Available signal numbers: ${getAvailableSignalIntegers()}.`;
|
|
2195
|
-
var getAvailableSignalNames = () => Object.keys(
|
|
2196
|
-
var getAvailableSignalIntegers = () => [...new Set(Object.values(
|
|
2163
|
+
var getAvailableSignalNames = () => Object.keys(os.constants.signals).sort().map((signalName) => `'${signalName}'`).join(", ");
|
|
2164
|
+
var getAvailableSignalIntegers = () => [...new Set(Object.values(os.constants.signals).sort((signalInteger, signalIntegerTwo) => signalInteger - signalIntegerTwo))].join(", ");
|
|
2197
2165
|
var getSignalDescription = (signal) => signalsByName[signal].description;
|
|
2198
2166
|
|
|
2199
2167
|
// ../../node_modules/.pnpm/execa@9.3.1/node_modules/execa/lib/terminate/kill.js
|
|
@@ -2255,11 +2223,11 @@ var killOnTimeout = async ({ kill, forceKillAfterDelay, context, controllerSigna
|
|
|
2255
2223
|
return;
|
|
2256
2224
|
}
|
|
2257
2225
|
try {
|
|
2258
|
-
await
|
|
2226
|
+
await promises$1.setTimeout(forceKillAfterDelay, void 0, { signal: controllerSignal });
|
|
2259
2227
|
if (kill("SIGKILL")) {
|
|
2260
2228
|
context.isForcefullyTerminated ??= true;
|
|
2261
2229
|
}
|
|
2262
|
-
} catch
|
|
2230
|
+
} catch {
|
|
2263
2231
|
}
|
|
2264
2232
|
};
|
|
2265
2233
|
|
|
@@ -2268,10 +2236,9 @@ init_cjs_shims();
|
|
|
2268
2236
|
|
|
2269
2237
|
// ../../node_modules/.pnpm/execa@9.3.1/node_modules/execa/lib/utils/abort-signal.js
|
|
2270
2238
|
init_cjs_shims();
|
|
2271
|
-
var _events2 = require('events');
|
|
2272
2239
|
var onAbortedSignal = async (mainSignal, stopSignal) => {
|
|
2273
2240
|
if (!mainSignal.aborted) {
|
|
2274
|
-
await
|
|
2241
|
+
await events.once(mainSignal, "abort", { signal: stopSignal });
|
|
2275
2242
|
}
|
|
2276
2243
|
};
|
|
2277
2244
|
|
|
@@ -2295,11 +2262,9 @@ init_cjs_shims();
|
|
|
2295
2262
|
// ../../node_modules/.pnpm/execa@9.3.1/node_modules/execa/lib/ipc/graceful.js
|
|
2296
2263
|
init_cjs_shims();
|
|
2297
2264
|
|
|
2298
|
-
|
|
2299
2265
|
// ../../node_modules/.pnpm/execa@9.3.1/node_modules/execa/lib/ipc/send.js
|
|
2300
2266
|
init_cjs_shims();
|
|
2301
2267
|
|
|
2302
|
-
|
|
2303
2268
|
// ../../node_modules/.pnpm/execa@9.3.1/node_modules/execa/lib/ipc/validation.js
|
|
2304
2269
|
init_cjs_shims();
|
|
2305
2270
|
var validateIpcMethod = ({ methodName, isSubprocess, ipc, isConnected: isConnected2 }) => {
|
|
@@ -2470,17 +2435,15 @@ var serializeOptionValue = (value) => {
|
|
|
2470
2435
|
// ../../node_modules/.pnpm/execa@9.3.1/node_modules/execa/lib/ipc/strict.js
|
|
2471
2436
|
init_cjs_shims();
|
|
2472
2437
|
|
|
2473
|
-
|
|
2474
2438
|
// ../../node_modules/.pnpm/execa@9.3.1/node_modules/execa/lib/utils/max-listeners.js
|
|
2475
2439
|
init_cjs_shims();
|
|
2476
|
-
|
|
2477
2440
|
var incrementMaxListeners = (eventEmitter, maxListenersIncrement, signal) => {
|
|
2478
2441
|
const maxListeners = eventEmitter.getMaxListeners();
|
|
2479
2442
|
if (maxListeners === 0 || maxListeners === Number.POSITIVE_INFINITY) {
|
|
2480
2443
|
return;
|
|
2481
2444
|
}
|
|
2482
2445
|
eventEmitter.setMaxListeners(maxListeners + maxListenersIncrement);
|
|
2483
|
-
|
|
2446
|
+
events.addAbortListener(signal, () => {
|
|
2484
2447
|
eventEmitter.setMaxListeners(eventEmitter.getMaxListeners() - maxListenersIncrement);
|
|
2485
2448
|
});
|
|
2486
2449
|
};
|
|
@@ -2488,12 +2451,9 @@ var incrementMaxListeners = (eventEmitter, maxListenersIncrement, signal) => {
|
|
|
2488
2451
|
// ../../node_modules/.pnpm/execa@9.3.1/node_modules/execa/lib/ipc/forward.js
|
|
2489
2452
|
init_cjs_shims();
|
|
2490
2453
|
|
|
2491
|
-
|
|
2492
2454
|
// ../../node_modules/.pnpm/execa@9.3.1/node_modules/execa/lib/ipc/incoming.js
|
|
2493
2455
|
init_cjs_shims();
|
|
2494
2456
|
|
|
2495
|
-
|
|
2496
|
-
|
|
2497
2457
|
// ../../node_modules/.pnpm/execa@9.3.1/node_modules/execa/lib/ipc/reference.js
|
|
2498
2458
|
init_cjs_shims();
|
|
2499
2459
|
var addReference = (channel, reference) => {
|
|
@@ -2540,7 +2500,7 @@ var onMessage = async ({ anyProcess, channel, isSubprocess, ipcEmitter }, wrappe
|
|
|
2540
2500
|
}
|
|
2541
2501
|
while (incomingMessages.length > 0) {
|
|
2542
2502
|
await waitForOutgoingMessages(anyProcess, ipcEmitter, wrappedMessage);
|
|
2543
|
-
await
|
|
2503
|
+
await promises$1.scheduler.yield();
|
|
2544
2504
|
const message = await handleStrictRequest({
|
|
2545
2505
|
wrappedMessage: incomingMessages[0],
|
|
2546
2506
|
anyProcess,
|
|
@@ -2556,8 +2516,8 @@ var onMessage = async ({ anyProcess, channel, isSubprocess, ipcEmitter }, wrappe
|
|
|
2556
2516
|
var onDisconnect = async ({ anyProcess, channel, isSubprocess, ipcEmitter, boundOnMessage }) => {
|
|
2557
2517
|
abortOnDisconnect();
|
|
2558
2518
|
const incomingMessages = INCOMING_MESSAGES.get(anyProcess);
|
|
2559
|
-
while (
|
|
2560
|
-
await
|
|
2519
|
+
while (incomingMessages?.length > 0) {
|
|
2520
|
+
await events.once(ipcEmitter, "message:done");
|
|
2561
2521
|
}
|
|
2562
2522
|
anyProcess.removeListener("message", boundOnMessage);
|
|
2563
2523
|
redoAddedReferences(channel, isSubprocess);
|
|
@@ -2571,7 +2531,7 @@ var getIpcEmitter = (anyProcess, channel, isSubprocess) => {
|
|
|
2571
2531
|
if (IPC_EMITTERS.has(anyProcess)) {
|
|
2572
2532
|
return IPC_EMITTERS.get(anyProcess);
|
|
2573
2533
|
}
|
|
2574
|
-
const ipcEmitter = new
|
|
2534
|
+
const ipcEmitter = new events.EventEmitter();
|
|
2575
2535
|
ipcEmitter.connected = true;
|
|
2576
2536
|
IPC_EMITTERS.set(anyProcess, ipcEmitter);
|
|
2577
2537
|
forwardEvents({
|
|
@@ -2621,7 +2581,7 @@ var handleSendStrict = ({ anyProcess, channel, isSubprocess, message, strict })
|
|
|
2621
2581
|
};
|
|
2622
2582
|
var count = 0n;
|
|
2623
2583
|
var validateStrictDeadlock = (outgoingMessages, wrappedMessage) => {
|
|
2624
|
-
if (
|
|
2584
|
+
if (wrappedMessage?.type !== REQUEST_TYPE || wrappedMessage.hasListeners) {
|
|
2625
2585
|
return;
|
|
2626
2586
|
}
|
|
2627
2587
|
for (const { id } of outgoingMessages) {
|
|
@@ -2631,7 +2591,7 @@ var validateStrictDeadlock = (outgoingMessages, wrappedMessage) => {
|
|
|
2631
2591
|
}
|
|
2632
2592
|
};
|
|
2633
2593
|
var handleStrictRequest = async ({ wrappedMessage, anyProcess, channel, isSubprocess, ipcEmitter }) => {
|
|
2634
|
-
if (
|
|
2594
|
+
if (wrappedMessage?.type !== REQUEST_TYPE || !anyProcess.connected) {
|
|
2635
2595
|
return wrappedMessage;
|
|
2636
2596
|
}
|
|
2637
2597
|
const { id, message } = wrappedMessage;
|
|
@@ -2649,15 +2609,15 @@ var handleStrictRequest = async ({ wrappedMessage, anyProcess, channel, isSubpro
|
|
|
2649
2609
|
return message;
|
|
2650
2610
|
};
|
|
2651
2611
|
var handleStrictResponse = (wrappedMessage) => {
|
|
2652
|
-
if (
|
|
2612
|
+
if (wrappedMessage?.type !== RESPONSE_TYPE) {
|
|
2653
2613
|
return false;
|
|
2654
2614
|
}
|
|
2655
2615
|
const { id, message: hasListeners } = wrappedMessage;
|
|
2656
|
-
|
|
2616
|
+
STRICT_RESPONSES[id]?.resolve({ isDeadlock: false, hasListeners });
|
|
2657
2617
|
return true;
|
|
2658
2618
|
};
|
|
2659
2619
|
var waitForStrictResponse = async (wrappedMessage, anyProcess, isSubprocess) => {
|
|
2660
|
-
if (
|
|
2620
|
+
if (wrappedMessage?.type !== REQUEST_TYPE) {
|
|
2661
2621
|
return;
|
|
2662
2622
|
}
|
|
2663
2623
|
const deferred = createDeferred();
|
|
@@ -2682,7 +2642,7 @@ var waitForStrictResponse = async (wrappedMessage, anyProcess, isSubprocess) =>
|
|
|
2682
2642
|
var STRICT_RESPONSES = {};
|
|
2683
2643
|
var throwOnDisconnect = async (anyProcess, isSubprocess, { signal }) => {
|
|
2684
2644
|
incrementMaxListeners(anyProcess, 1, signal);
|
|
2685
|
-
await
|
|
2645
|
+
await events.once(anyProcess, "disconnect", { signal });
|
|
2686
2646
|
throwOnStrictDisconnect(isSubprocess);
|
|
2687
2647
|
};
|
|
2688
2648
|
var REQUEST_TYPE = "execa:ipc:request";
|
|
@@ -2705,7 +2665,7 @@ var endSendMessage = ({ outgoingMessages, outgoingMessage }) => {
|
|
|
2705
2665
|
outgoingMessage.onMessageSent.resolve();
|
|
2706
2666
|
};
|
|
2707
2667
|
var waitForOutgoingMessages = async (anyProcess, ipcEmitter, wrappedMessage) => {
|
|
2708
|
-
while (!hasMessageListeners(anyProcess, ipcEmitter) &&
|
|
2668
|
+
while (!hasMessageListeners(anyProcess, ipcEmitter) && OUTGOING_MESSAGES.get(anyProcess)?.size > 0) {
|
|
2709
2669
|
const outgoingMessages = [...OUTGOING_MESSAGES.get(anyProcess)];
|
|
2710
2670
|
validateStrictDeadlock(outgoingMessages, wrappedMessage);
|
|
2711
2671
|
await Promise.all(outgoingMessages.map(({ onMessageSent }) => onMessageSent));
|
|
@@ -2779,7 +2739,7 @@ var getSendMethod = (anyProcess) => {
|
|
|
2779
2739
|
if (PROCESS_SEND_METHODS.has(anyProcess)) {
|
|
2780
2740
|
return PROCESS_SEND_METHODS.get(anyProcess);
|
|
2781
2741
|
}
|
|
2782
|
-
const sendMethod =
|
|
2742
|
+
const sendMethod = util.promisify(anyProcess.send.bind(anyProcess));
|
|
2783
2743
|
PROCESS_SEND_METHODS.set(anyProcess, sendMethod);
|
|
2784
2744
|
return sendMethod;
|
|
2785
2745
|
};
|
|
@@ -2820,11 +2780,11 @@ var startIpc = async ({ anyProcess, channel, isSubprocess, ipc }) => {
|
|
|
2820
2780
|
return;
|
|
2821
2781
|
}
|
|
2822
2782
|
getIpcEmitter(anyProcess, channel, isSubprocess);
|
|
2823
|
-
await
|
|
2783
|
+
await promises$1.scheduler.yield();
|
|
2824
2784
|
};
|
|
2825
2785
|
var cancelListening = false;
|
|
2826
2786
|
var handleAbort = (wrappedMessage) => {
|
|
2827
|
-
if (
|
|
2787
|
+
if (wrappedMessage?.type !== GRACEFUL_CANCEL_TYPE) {
|
|
2828
2788
|
return false;
|
|
2829
2789
|
}
|
|
2830
2790
|
cancelController.abort(wrappedMessage.message);
|
|
@@ -2894,7 +2854,6 @@ var getReason = ({ reason }) => {
|
|
|
2894
2854
|
|
|
2895
2855
|
// ../../node_modules/.pnpm/execa@9.3.1/node_modules/execa/lib/terminate/timeout.js
|
|
2896
2856
|
init_cjs_shims();
|
|
2897
|
-
|
|
2898
2857
|
var validateTimeout = ({ timeout }) => {
|
|
2899
2858
|
if (timeout !== void 0 && (!Number.isFinite(timeout) || timeout < 0)) {
|
|
2900
2859
|
throw new TypeError(`Expected the \`timeout\` option to be a non-negative integer, got \`${timeout}\` (${typeof timeout})`);
|
|
@@ -2902,7 +2861,7 @@ var validateTimeout = ({ timeout }) => {
|
|
|
2902
2861
|
};
|
|
2903
2862
|
var throwOnTimeout = (subprocess, timeout, context, controller) => timeout === 0 || timeout === void 0 ? [] : [killAfterTimeout(subprocess, timeout, context, controller)];
|
|
2904
2863
|
var killAfterTimeout = async (subprocess, timeout, context, { signal }) => {
|
|
2905
|
-
await
|
|
2864
|
+
await promises$1.setTimeout(timeout, void 0, { signal });
|
|
2906
2865
|
context.terminationReason ??= "timeout";
|
|
2907
2866
|
subprocess.kill();
|
|
2908
2867
|
throw new DiscardedError();
|
|
@@ -2910,8 +2869,6 @@ var killAfterTimeout = async (subprocess, timeout, context, { signal }) => {
|
|
|
2910
2869
|
|
|
2911
2870
|
// ../../node_modules/.pnpm/execa@9.3.1/node_modules/execa/lib/methods/node.js
|
|
2912
2871
|
init_cjs_shims();
|
|
2913
|
-
|
|
2914
|
-
|
|
2915
2872
|
var mapNode = ({ options }) => {
|
|
2916
2873
|
if (options.node === false) {
|
|
2917
2874
|
throw new TypeError('The "node" option cannot be false with `execaNode()`.');
|
|
@@ -2920,8 +2877,8 @@ var mapNode = ({ options }) => {
|
|
|
2920
2877
|
};
|
|
2921
2878
|
var handleNodeOption = (file, commandArguments, {
|
|
2922
2879
|
node: shouldHandleNode = false,
|
|
2923
|
-
nodePath =
|
|
2924
|
-
nodeOptions =
|
|
2880
|
+
nodePath = process3.execPath,
|
|
2881
|
+
nodeOptions = process3.execArgv.filter((nodeOption) => !nodeOption.startsWith("--inspect")),
|
|
2925
2882
|
cwd,
|
|
2926
2883
|
execPath: formerNodePath,
|
|
2927
2884
|
...options
|
|
@@ -2930,7 +2887,7 @@ var handleNodeOption = (file, commandArguments, {
|
|
|
2930
2887
|
throw new TypeError('The "execPath" option has been removed. Please use the "nodePath" option instead.');
|
|
2931
2888
|
}
|
|
2932
2889
|
const normalizedNodePath = safeNormalizeFileUrl(nodePath, 'The "nodePath" option');
|
|
2933
|
-
const resolvedNodePath =
|
|
2890
|
+
const resolvedNodePath = path__default.default.resolve(cwd, normalizedNodePath);
|
|
2934
2891
|
const newOptions = {
|
|
2935
2892
|
...options,
|
|
2936
2893
|
nodePath: resolvedNodePath,
|
|
@@ -2940,7 +2897,7 @@ var handleNodeOption = (file, commandArguments, {
|
|
|
2940
2897
|
if (!shouldHandleNode) {
|
|
2941
2898
|
return [file, commandArguments, newOptions];
|
|
2942
2899
|
}
|
|
2943
|
-
if (
|
|
2900
|
+
if (path__default.default.basename(file, ".exe") === "node") {
|
|
2944
2901
|
throw new TypeError('When the "node" option is true, the first argument does not need to be "node".');
|
|
2945
2902
|
}
|
|
2946
2903
|
return [
|
|
@@ -2952,7 +2909,6 @@ var handleNodeOption = (file, commandArguments, {
|
|
|
2952
2909
|
|
|
2953
2910
|
// ../../node_modules/.pnpm/execa@9.3.1/node_modules/execa/lib/ipc/ipc-input.js
|
|
2954
2911
|
init_cjs_shims();
|
|
2955
|
-
var _v8 = require('v8');
|
|
2956
2912
|
var validateIpcInputOption = ({ ipcInput, ipc, serialization }) => {
|
|
2957
2913
|
if (ipcInput === void 0) {
|
|
2958
2914
|
return;
|
|
@@ -2964,7 +2920,7 @@ var validateIpcInputOption = ({ ipcInput, ipc, serialization }) => {
|
|
|
2964
2920
|
};
|
|
2965
2921
|
var validateAdvancedInput = (ipcInput) => {
|
|
2966
2922
|
try {
|
|
2967
|
-
|
|
2923
|
+
v8.serialize(ipcInput);
|
|
2968
2924
|
} catch (error) {
|
|
2969
2925
|
throw new Error("The `ipcInput` option is not serializable with a structured clone.", { cause: error });
|
|
2970
2926
|
}
|
|
@@ -3032,16 +2988,13 @@ var serializeEncoding = (encoding) => typeof encoding === "string" ? `"${encodin
|
|
|
3032
2988
|
|
|
3033
2989
|
// ../../node_modules/.pnpm/execa@9.3.1/node_modules/execa/lib/arguments/cwd.js
|
|
3034
2990
|
init_cjs_shims();
|
|
3035
|
-
|
|
3036
|
-
|
|
3037
|
-
|
|
3038
2991
|
var normalizeCwd = (cwd = getDefaultCwd()) => {
|
|
3039
2992
|
const cwdString = safeNormalizeFileUrl(cwd, 'The "cwd" option');
|
|
3040
|
-
return
|
|
2993
|
+
return path__default.default.resolve(cwdString);
|
|
3041
2994
|
};
|
|
3042
2995
|
var getDefaultCwd = () => {
|
|
3043
2996
|
try {
|
|
3044
|
-
return
|
|
2997
|
+
return process3__namespace.default.cwd();
|
|
3045
2998
|
} catch (error) {
|
|
3046
2999
|
error.message = `The current directory does not exist.
|
|
3047
3000
|
${error.message}`;
|
|
@@ -3054,7 +3007,7 @@ var fixCwdError = (originalMessage, cwd) => {
|
|
|
3054
3007
|
}
|
|
3055
3008
|
let cwdStat;
|
|
3056
3009
|
try {
|
|
3057
|
-
cwdStat =
|
|
3010
|
+
cwdStat = fs.statSync(cwd);
|
|
3058
3011
|
} catch (error) {
|
|
3059
3012
|
return `The "cwd" option is invalid: ${cwd}.
|
|
3060
3013
|
${error.message}
|
|
@@ -3084,7 +3037,7 @@ var normalizeOptions = (filePath, rawArguments, rawOptions) => {
|
|
|
3084
3037
|
options.killSignal = normalizeKillSignal(options.killSignal);
|
|
3085
3038
|
options.forceKillAfterDelay = normalizeForceKillAfterDelay(options.forceKillAfterDelay);
|
|
3086
3039
|
options.lines = options.lines.map((lines, fdNumber) => lines && !BINARY_ENCODINGS.has(options.encoding) && options.buffer[fdNumber]);
|
|
3087
|
-
if (
|
|
3040
|
+
if (process3__namespace.default.platform === "win32" && path__default.default.basename(file, ".exe") === "cmd") {
|
|
3088
3041
|
commandArguments.unshift("/q");
|
|
3089
3042
|
}
|
|
3090
3043
|
return { file, commandArguments, options };
|
|
@@ -3125,7 +3078,7 @@ var addDefaultOptions = ({
|
|
|
3125
3078
|
serialization
|
|
3126
3079
|
});
|
|
3127
3080
|
var getEnv = ({ env: envOption, extendEnv, preferLocal, node, localDirectory, nodePath }) => {
|
|
3128
|
-
const env = extendEnv ? { ...
|
|
3081
|
+
const env = extendEnv ? { ...process3__namespace.default.env, ...envOption } : envOption;
|
|
3129
3082
|
if (preferLocal || node) {
|
|
3130
3083
|
return npmRunPathEnv({
|
|
3131
3084
|
env,
|
|
@@ -3144,7 +3097,6 @@ init_cjs_shims();
|
|
|
3144
3097
|
// ../../node_modules/.pnpm/execa@9.3.1/node_modules/execa/lib/return/message.js
|
|
3145
3098
|
init_cjs_shims();
|
|
3146
3099
|
|
|
3147
|
-
|
|
3148
3100
|
// ../../node_modules/.pnpm/strip-final-newline@4.0.0/node_modules/strip-final-newline/index.js
|
|
3149
3101
|
init_cjs_shims();
|
|
3150
3102
|
function stripFinalNewline(input) {
|
|
@@ -3169,8 +3121,6 @@ init_cjs_shims();
|
|
|
3169
3121
|
// ../../node_modules/.pnpm/get-stream@9.0.1/node_modules/get-stream/source/index.js
|
|
3170
3122
|
init_cjs_shims();
|
|
3171
3123
|
|
|
3172
|
-
var _promises3 = require('stream/promises');
|
|
3173
|
-
|
|
3174
3124
|
// ../../node_modules/.pnpm/get-stream@9.0.1/node_modules/get-stream/source/stream.js
|
|
3175
3125
|
init_cjs_shims();
|
|
3176
3126
|
|
|
@@ -3289,7 +3239,7 @@ var getAsyncIterable = (stream) => {
|
|
|
3289
3239
|
if (isReadableStream(stream, { checkOpen: false }) && nodeImports.on !== void 0) {
|
|
3290
3240
|
return getStreamIterable(stream);
|
|
3291
3241
|
}
|
|
3292
|
-
if (typeof
|
|
3242
|
+
if (typeof stream?.[Symbol.asyncIterator] === "function") {
|
|
3293
3243
|
return stream;
|
|
3294
3244
|
}
|
|
3295
3245
|
if (toString.call(stream) === "[object ReadableStream]") {
|
|
@@ -3411,7 +3361,7 @@ var getChunkType = (chunk) => {
|
|
|
3411
3361
|
if (typeOfChunk !== "object" || chunk === null) {
|
|
3412
3362
|
return "others";
|
|
3413
3363
|
}
|
|
3414
|
-
if (
|
|
3364
|
+
if (globalThis.Buffer?.isBuffer(chunk)) {
|
|
3415
3365
|
return "buffer";
|
|
3416
3366
|
}
|
|
3417
3367
|
const prototypeName = objectToString2.call(chunk);
|
|
@@ -3427,12 +3377,12 @@ var getChunkType = (chunk) => {
|
|
|
3427
3377
|
return "others";
|
|
3428
3378
|
};
|
|
3429
3379
|
var { toString: objectToString2 } = Object.prototype;
|
|
3430
|
-
var MaxBufferError =
|
|
3431
|
-
|
|
3380
|
+
var MaxBufferError = class extends Error {
|
|
3381
|
+
name = "MaxBufferError";
|
|
3432
3382
|
constructor() {
|
|
3433
|
-
super("maxBuffer exceeded");
|
|
3383
|
+
super("maxBuffer exceeded");
|
|
3434
3384
|
}
|
|
3435
|
-
}
|
|
3385
|
+
};
|
|
3436
3386
|
|
|
3437
3387
|
// ../../node_modules/.pnpm/get-stream@9.0.1/node_modules/get-stream/source/utils.js
|
|
3438
3388
|
init_cjs_shims();
|
|
@@ -3556,7 +3506,7 @@ var stringMethods = {
|
|
|
3556
3506
|
};
|
|
3557
3507
|
|
|
3558
3508
|
// ../../node_modules/.pnpm/get-stream@9.0.1/node_modules/get-stream/source/index.js
|
|
3559
|
-
Object.assign(nodeImports, { on:
|
|
3509
|
+
Object.assign(nodeImports, { on: events.on, finished: promises.finished });
|
|
3560
3510
|
|
|
3561
3511
|
// ../../node_modules/.pnpm/execa@9.3.1/node_modules/execa/lib/io/max-buffer.js
|
|
3562
3512
|
var handleMaxBuffer = ({ error, stream, readableObjectMode, lines, encoding, fdNumber }) => {
|
|
@@ -3596,7 +3546,7 @@ var getMaxBufferMessage = (error, maxBuffer) => {
|
|
|
3596
3546
|
return `Command's ${streamName} was larger than ${threshold} ${unit}`;
|
|
3597
3547
|
};
|
|
3598
3548
|
var getMaxBufferInfo = (error, maxBuffer) => {
|
|
3599
|
-
if (
|
|
3549
|
+
if (error?.maxBufferInfo === void 0) {
|
|
3600
3550
|
return { streamName: "output", threshold: maxBuffer[1], unit: "bytes" };
|
|
3601
3551
|
}
|
|
3602
3552
|
const { maxBufferInfo: { fdNumber, unit } } = error;
|
|
@@ -3607,7 +3557,7 @@ var getMaxBufferInfo = (error, maxBuffer) => {
|
|
|
3607
3557
|
}
|
|
3608
3558
|
return { streamName: getStreamName(fdNumber), threshold, unit };
|
|
3609
3559
|
};
|
|
3610
|
-
var isMaxBufferSync = (resultError, output, maxBuffer) =>
|
|
3560
|
+
var isMaxBufferSync = (resultError, output, maxBuffer) => resultError?.code === "ENOBUFS" && output !== null && output.some((result) => result !== null && result.length > getMaxBufferSync(maxBuffer));
|
|
3611
3561
|
var truncateMaxBufferSync = (result, isMaxBuffer, maxBuffer) => {
|
|
3612
3562
|
if (!isMaxBuffer) {
|
|
3613
3563
|
return result;
|
|
@@ -3638,7 +3588,7 @@ var createMessages = ({
|
|
|
3638
3588
|
timeout,
|
|
3639
3589
|
cwd
|
|
3640
3590
|
}) => {
|
|
3641
|
-
const errorCode =
|
|
3591
|
+
const errorCode = originalError?.code;
|
|
3642
3592
|
const prefix = getErrorPrefix({
|
|
3643
3593
|
originalError,
|
|
3644
3594
|
timedOut,
|
|
@@ -3719,11 +3669,11 @@ var getOriginalMessage = (originalError, cwd) => {
|
|
|
3719
3669
|
if (originalError instanceof DiscardedError) {
|
|
3720
3670
|
return;
|
|
3721
3671
|
}
|
|
3722
|
-
const originalMessage = isExecaError(originalError) ? originalError.originalMessage : String(
|
|
3672
|
+
const originalMessage = isExecaError(originalError) ? originalError.originalMessage : String(originalError?.message ?? originalError);
|
|
3723
3673
|
const escapedOriginalMessage = escapeLines(fixCwdError(originalMessage, cwd));
|
|
3724
3674
|
return escapedOriginalMessage === "" ? void 0 : escapedOriginalMessage;
|
|
3725
3675
|
};
|
|
3726
|
-
var serializeIpcMessage = (ipcMessage) => typeof ipcMessage === "string" ? ipcMessage :
|
|
3676
|
+
var serializeIpcMessage = (ipcMessage) => typeof ipcMessage === "string" ? ipcMessage : util.inspect(ipcMessage);
|
|
3727
3677
|
var serializeMessagePart = (messagePart) => Array.isArray(messagePart) ? messagePart.map((messageItem) => stripFinalNewline(serializeMessageItem(messageItem))).filter(Boolean).join("\n") : serializeMessageItem(messagePart);
|
|
3728
3678
|
var serializeMessageItem = (messageItem) => {
|
|
3729
3679
|
if (typeof messageItem === "string") {
|
|
@@ -3892,7 +3842,7 @@ var getErrorProperties = ({
|
|
|
3892
3842
|
exitCode,
|
|
3893
3843
|
signal,
|
|
3894
3844
|
signalDescription,
|
|
3895
|
-
code:
|
|
3845
|
+
code: error.cause?.code,
|
|
3896
3846
|
stdout: stdio[1],
|
|
3897
3847
|
stderr: stdio[2],
|
|
3898
3848
|
all,
|
|
@@ -3989,7 +3939,7 @@ function prettyMilliseconds(milliseconds, options) {
|
|
|
3989
3939
|
if ((result.length === 0 || !options.colonNotation) && isZero(value) && !(options.colonNotation && short === "m")) {
|
|
3990
3940
|
return;
|
|
3991
3941
|
}
|
|
3992
|
-
valueString =
|
|
3942
|
+
valueString = valueString ?? String(value);
|
|
3993
3943
|
if (options.colonNotation) {
|
|
3994
3944
|
const wholeDigits = valueString.includes(".") ? valueString.split(".")[0].length : valueString.length;
|
|
3995
3945
|
const minLength = result.length > 0 ? 2 : 1;
|
|
@@ -4087,7 +4037,6 @@ var handleResult = (result, verboseInfo, { reject }) => {
|
|
|
4087
4037
|
// ../../node_modules/.pnpm/execa@9.3.1/node_modules/execa/lib/stdio/handle-sync.js
|
|
4088
4038
|
init_cjs_shims();
|
|
4089
4039
|
|
|
4090
|
-
|
|
4091
4040
|
// ../../node_modules/.pnpm/execa@9.3.1/node_modules/execa/lib/stdio/handle.js
|
|
4092
4041
|
init_cjs_shims();
|
|
4093
4042
|
|
|
@@ -4194,7 +4143,7 @@ var KNOWN_STDIO_STRINGS = /* @__PURE__ */ new Set(["ipc", "ignore", "inherit", "
|
|
|
4194
4143
|
var isReadableStream2 = (value) => Object.prototype.toString.call(value) === "[object ReadableStream]";
|
|
4195
4144
|
var isWritableStream2 = (value) => Object.prototype.toString.call(value) === "[object WritableStream]";
|
|
4196
4145
|
var isWebStream = (value) => isReadableStream2(value) || isWritableStream2(value);
|
|
4197
|
-
var isTransformStream = (value) => isReadableStream2(
|
|
4146
|
+
var isTransformStream = (value) => isReadableStream2(value?.readable) && isWritableStream2(value?.writable);
|
|
4198
4147
|
var isAsyncIterableObject = (value) => isObject(value) && typeof value[Symbol.asyncIterator] === "function";
|
|
4199
4148
|
var isIterableObject = (value) => isObject(value) && typeof value[Symbol.iterator] === "function";
|
|
4200
4149
|
var isObject = (value) => typeof value === "object" && value !== null;
|
|
@@ -4225,12 +4174,12 @@ init_cjs_shims();
|
|
|
4225
4174
|
var getTransformObjectModes = (objectMode, index, newTransforms, direction) => direction === "output" ? getOutputObjectModes(objectMode, index, newTransforms) : getInputObjectModes(objectMode, index, newTransforms);
|
|
4226
4175
|
var getOutputObjectModes = (objectMode, index, newTransforms) => {
|
|
4227
4176
|
const writableObjectMode = index !== 0 && newTransforms[index - 1].value.readableObjectMode;
|
|
4228
|
-
const readableObjectMode =
|
|
4177
|
+
const readableObjectMode = objectMode ?? writableObjectMode;
|
|
4229
4178
|
return { writableObjectMode, readableObjectMode };
|
|
4230
4179
|
};
|
|
4231
4180
|
var getInputObjectModes = (objectMode, index, newTransforms) => {
|
|
4232
4181
|
const writableObjectMode = index === 0 ? objectMode === true : newTransforms[index - 1].value.readableObjectMode;
|
|
4233
|
-
const readableObjectMode = index !== newTransforms.length - 1 && (
|
|
4182
|
+
const readableObjectMode = index !== newTransforms.length - 1 && (objectMode ?? writableObjectMode);
|
|
4234
4183
|
return { writableObjectMode, readableObjectMode };
|
|
4235
4184
|
};
|
|
4236
4185
|
var getFdObjectMode = (stdioItems, direction) => {
|
|
@@ -4337,15 +4286,14 @@ var sortTransforms = (newTransforms, direction) => direction === "input" ? newTr
|
|
|
4337
4286
|
|
|
4338
4287
|
// ../../node_modules/.pnpm/execa@9.3.1/node_modules/execa/lib/stdio/direction.js
|
|
4339
4288
|
init_cjs_shims();
|
|
4340
|
-
|
|
4341
4289
|
var getStreamDirection = (stdioItems, fdNumber, optionName) => {
|
|
4342
4290
|
const directions = stdioItems.map((stdioItem) => getStdioItemDirection(stdioItem, fdNumber));
|
|
4343
4291
|
if (directions.includes("input") && directions.includes("output")) {
|
|
4344
4292
|
throw new TypeError(`The \`${optionName}\` option must not be an array of both readable and writable values.`);
|
|
4345
4293
|
}
|
|
4346
|
-
return
|
|
4294
|
+
return directions.find(Boolean) ?? DEFAULT_DIRECTION;
|
|
4347
4295
|
};
|
|
4348
|
-
var getStdioItemDirection = ({ type, value }, fdNumber) =>
|
|
4296
|
+
var getStdioItemDirection = ({ type, value }, fdNumber) => KNOWN_DIRECTIONS[fdNumber] ?? guessStreamDirection[type](value);
|
|
4349
4297
|
var KNOWN_DIRECTIONS = ["input", "output", "output"];
|
|
4350
4298
|
var anyDirection = () => void 0;
|
|
4351
4299
|
var alwaysInput = () => "input";
|
|
@@ -4377,10 +4325,10 @@ var guessStreamDirection = {
|
|
|
4377
4325
|
}
|
|
4378
4326
|
};
|
|
4379
4327
|
var getStandardStreamDirection = (value) => {
|
|
4380
|
-
if ([0,
|
|
4328
|
+
if ([0, process3__namespace.default.stdin].includes(value)) {
|
|
4381
4329
|
return "input";
|
|
4382
4330
|
}
|
|
4383
|
-
if ([1, 2,
|
|
4331
|
+
if ([1, 2, process3__namespace.default.stdout, process3__namespace.default.stderr].includes(value)) {
|
|
4384
4332
|
return "output";
|
|
4385
4333
|
}
|
|
4386
4334
|
};
|
|
@@ -4429,8 +4377,6 @@ var isOutputPipeOnly = (stdioOption) => stdioOption === "pipe" || Array.isArray(
|
|
|
4429
4377
|
|
|
4430
4378
|
// ../../node_modules/.pnpm/execa@9.3.1/node_modules/execa/lib/stdio/native.js
|
|
4431
4379
|
init_cjs_shims();
|
|
4432
|
-
|
|
4433
|
-
|
|
4434
4380
|
var handleNativeStream = ({ stdioItem, stdioItem: { type }, isStdioArray, fdNumber, direction, isSync }) => {
|
|
4435
4381
|
if (!isStdioArray || type !== "native") {
|
|
4436
4382
|
return stdioItem;
|
|
@@ -4460,10 +4406,10 @@ var getTargetFd = ({ value, optionName, fdNumber, direction }) => {
|
|
|
4460
4406
|
if (direction === "output") {
|
|
4461
4407
|
return { type: "fileNumber", value: targetFdNumber, optionName };
|
|
4462
4408
|
}
|
|
4463
|
-
if (
|
|
4409
|
+
if (tty__default.default.isatty(targetFdNumber)) {
|
|
4464
4410
|
throw new TypeError(`The \`${optionName}: ${serializeOptionValue(value)}\` option is invalid: it cannot be a TTY with synchronous methods.`);
|
|
4465
4411
|
}
|
|
4466
|
-
return { type: "uint8Array", value: bufferToUint8Array(
|
|
4412
|
+
return { type: "uint8Array", value: bufferToUint8Array(fs.readFileSync(targetFdNumber)), optionName };
|
|
4467
4413
|
};
|
|
4468
4414
|
var getTargetFdNumber = (value, fdNumber) => {
|
|
4469
4415
|
if (value === "inherit") {
|
|
@@ -4798,8 +4744,8 @@ var addProperties = {
|
|
|
4798
4744
|
var addPropertiesSync = {
|
|
4799
4745
|
input: {
|
|
4800
4746
|
...addProperties,
|
|
4801
|
-
fileUrl: ({ value }) => ({ contents: [bufferToUint8Array(
|
|
4802
|
-
filePath: ({ value: { file } }) => ({ contents: [bufferToUint8Array(
|
|
4747
|
+
fileUrl: ({ value }) => ({ contents: [bufferToUint8Array(fs.readFileSync(value))] }),
|
|
4748
|
+
filePath: ({ value: { file } }) => ({ contents: [bufferToUint8Array(fs.readFileSync(file))] }),
|
|
4803
4749
|
fileNumber: forbiddenIfSync,
|
|
4804
4750
|
iterable: ({ value }) => ({ contents: [...value] }),
|
|
4805
4751
|
string: ({ value }) => ({ contents: [value] }),
|
|
@@ -4826,7 +4772,6 @@ init_cjs_shims();
|
|
|
4826
4772
|
|
|
4827
4773
|
// ../../node_modules/.pnpm/execa@9.3.1/node_modules/execa/lib/transform/generator.js
|
|
4828
4774
|
init_cjs_shims();
|
|
4829
|
-
var _stream = require('stream');
|
|
4830
4775
|
|
|
4831
4776
|
// ../../node_modules/.pnpm/execa@9.3.1/node_modules/execa/lib/transform/split.js
|
|
4832
4777
|
init_cjs_shims();
|
|
@@ -4911,10 +4856,9 @@ var linesUint8ArrayInfo = {
|
|
|
4911
4856
|
|
|
4912
4857
|
// ../../node_modules/.pnpm/execa@9.3.1/node_modules/execa/lib/transform/validate.js
|
|
4913
4858
|
init_cjs_shims();
|
|
4914
|
-
var _buffer = require('buffer');
|
|
4915
4859
|
var getValidateTransformInput = (writableObjectMode, optionName) => writableObjectMode ? void 0 : validateStringTransformInput.bind(void 0, optionName);
|
|
4916
4860
|
var validateStringTransformInput = function* (optionName, chunk) {
|
|
4917
|
-
if (typeof chunk !== "string" && !isUint8Array(chunk) && !
|
|
4861
|
+
if (typeof chunk !== "string" && !isUint8Array(chunk) && !buffer.Buffer.isBuffer(chunk)) {
|
|
4918
4862
|
throw new TypeError(`The \`${optionName}\` option's transform must use "objectMode: true" to receive as input: ${typeof chunk}.`);
|
|
4919
4863
|
}
|
|
4920
4864
|
yield chunk;
|
|
@@ -4941,8 +4885,6 @@ Instead, \`yield\` should either be called with a value, or not be called at all
|
|
|
4941
4885
|
|
|
4942
4886
|
// ../../node_modules/.pnpm/execa@9.3.1/node_modules/execa/lib/transform/encoding-transform.js
|
|
4943
4887
|
init_cjs_shims();
|
|
4944
|
-
|
|
4945
|
-
|
|
4946
4888
|
var getEncodingTransformGenerator = (binary, encoding, skipped) => {
|
|
4947
4889
|
if (skipped) {
|
|
4948
4890
|
return;
|
|
@@ -4950,14 +4892,14 @@ var getEncodingTransformGenerator = (binary, encoding, skipped) => {
|
|
|
4950
4892
|
if (binary) {
|
|
4951
4893
|
return { transform: encodingUint8ArrayGenerator.bind(void 0, new TextEncoder()) };
|
|
4952
4894
|
}
|
|
4953
|
-
const stringDecoder = new
|
|
4895
|
+
const stringDecoder = new string_decoder.StringDecoder(encoding);
|
|
4954
4896
|
return {
|
|
4955
4897
|
transform: encodingStringGenerator.bind(void 0, stringDecoder),
|
|
4956
4898
|
final: encodingStringFinal.bind(void 0, stringDecoder)
|
|
4957
4899
|
};
|
|
4958
4900
|
};
|
|
4959
4901
|
var encodingUint8ArrayGenerator = function* (textEncoder3, chunk) {
|
|
4960
|
-
if (
|
|
4902
|
+
if (buffer.Buffer.isBuffer(chunk)) {
|
|
4961
4903
|
yield bufferToUint8Array(chunk);
|
|
4962
4904
|
} else if (typeof chunk === "string") {
|
|
4963
4905
|
yield textEncoder3.encode(chunk);
|
|
@@ -4977,8 +4919,7 @@ var encodingStringFinal = function* (stringDecoder) {
|
|
|
4977
4919
|
|
|
4978
4920
|
// ../../node_modules/.pnpm/execa@9.3.1/node_modules/execa/lib/transform/run-async.js
|
|
4979
4921
|
init_cjs_shims();
|
|
4980
|
-
|
|
4981
|
-
var pushChunks = _util.callbackify.call(void 0, async (getChunks, state, getChunksArguments, transformStream) => {
|
|
4922
|
+
var pushChunks = util.callbackify(async (getChunks, state, getChunksArguments, transformStream) => {
|
|
4982
4923
|
state.currentIterable = getChunks(...getChunksArguments);
|
|
4983
4924
|
try {
|
|
4984
4925
|
for await (const chunk of state.currentIterable) {
|
|
@@ -5011,7 +4952,7 @@ var generatorFinalChunks = async function* (final, index, generators) {
|
|
|
5011
4952
|
yield* transformChunk(finalChunk, generators, index + 1);
|
|
5012
4953
|
}
|
|
5013
4954
|
};
|
|
5014
|
-
var destroyTransform =
|
|
4955
|
+
var destroyTransform = util.callbackify(async ({ currentIterable }, error) => {
|
|
5015
4956
|
if (currentIterable !== void 0) {
|
|
5016
4957
|
await (error ? currentIterable.throw(error) : currentIterable.return());
|
|
5017
4958
|
return;
|
|
@@ -5080,11 +5021,11 @@ var generatorToStream = ({
|
|
|
5080
5021
|
const transformMethod = transformAsync ? pushChunks.bind(void 0, transformChunk, state) : pushChunksSync.bind(void 0, transformChunkSync);
|
|
5081
5022
|
const finalMethod = transformAsync || finalAsync ? pushChunks.bind(void 0, finalChunks, state) : pushChunksSync.bind(void 0, finalChunksSync);
|
|
5082
5023
|
const destroyMethod = transformAsync || finalAsync ? destroyTransform.bind(void 0, state) : void 0;
|
|
5083
|
-
const stream = new
|
|
5024
|
+
const stream$1 = new stream.Transform({
|
|
5084
5025
|
writableObjectMode,
|
|
5085
|
-
writableHighWaterMark:
|
|
5026
|
+
writableHighWaterMark: stream.getDefaultHighWaterMark(writableObjectMode),
|
|
5086
5027
|
readableObjectMode,
|
|
5087
|
-
readableHighWaterMark:
|
|
5028
|
+
readableHighWaterMark: stream.getDefaultHighWaterMark(readableObjectMode),
|
|
5088
5029
|
transform(chunk, encoding2, done) {
|
|
5089
5030
|
transformMethod([chunk, generators, 0], this, done);
|
|
5090
5031
|
},
|
|
@@ -5093,7 +5034,7 @@ var generatorToStream = ({
|
|
|
5093
5034
|
},
|
|
5094
5035
|
destroy: destroyMethod
|
|
5095
5036
|
});
|
|
5096
|
-
return { stream };
|
|
5037
|
+
return { stream: stream$1 };
|
|
5097
5038
|
};
|
|
5098
5039
|
var runGeneratorsSync = (chunks, stdioItems, encoding, isInput) => {
|
|
5099
5040
|
const generators = stdioItems.filter(({ type }) => type === "generator");
|
|
@@ -5157,7 +5098,6 @@ var validateSerializable = (newContents) => {
|
|
|
5157
5098
|
// ../../node_modules/.pnpm/execa@9.3.1/node_modules/execa/lib/io/output-sync.js
|
|
5158
5099
|
init_cjs_shims();
|
|
5159
5100
|
|
|
5160
|
-
|
|
5161
5101
|
// ../../node_modules/.pnpm/execa@9.3.1/node_modules/execa/lib/verbose/output.js
|
|
5162
5102
|
init_cjs_shims();
|
|
5163
5103
|
var 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)));
|
|
@@ -5281,10 +5221,10 @@ var writeToFiles = (serializedResult, stdioItems, outputFiles) => {
|
|
|
5281
5221
|
for (const { path: path6 } of stdioItems.filter(({ type }) => FILE_TYPES.has(type))) {
|
|
5282
5222
|
const pathString = typeof path6 === "string" ? path6 : path6.toString();
|
|
5283
5223
|
if (outputFiles.has(pathString)) {
|
|
5284
|
-
|
|
5224
|
+
fs.appendFileSync(path6, serializedResult);
|
|
5285
5225
|
} else {
|
|
5286
5226
|
outputFiles.add(pathString);
|
|
5287
|
-
|
|
5227
|
+
fs.writeFileSync(path6, serializedResult);
|
|
5288
5228
|
}
|
|
5289
5229
|
}
|
|
5290
5230
|
};
|
|
@@ -5318,7 +5258,6 @@ init_cjs_shims();
|
|
|
5318
5258
|
|
|
5319
5259
|
// ../../node_modules/.pnpm/execa@9.3.1/node_modules/execa/lib/resolve/exit-async.js
|
|
5320
5260
|
init_cjs_shims();
|
|
5321
|
-
|
|
5322
5261
|
var waitForExit = async (subprocess, context) => {
|
|
5323
5262
|
const [exitCode, signal] = await waitForExitOrError(subprocess);
|
|
5324
5263
|
context.isForcefullyTerminated ??= false;
|
|
@@ -5326,8 +5265,8 @@ var waitForExit = async (subprocess, context) => {
|
|
|
5326
5265
|
};
|
|
5327
5266
|
var waitForExitOrError = async (subprocess) => {
|
|
5328
5267
|
const [spawnPayload, exitPayload] = await Promise.allSettled([
|
|
5329
|
-
|
|
5330
|
-
|
|
5268
|
+
events.once(subprocess, "spawn"),
|
|
5269
|
+
events.once(subprocess, "exit")
|
|
5331
5270
|
]);
|
|
5332
5271
|
if (spawnPayload.status === "rejected") {
|
|
5333
5272
|
return [];
|
|
@@ -5336,8 +5275,8 @@ var waitForExitOrError = async (subprocess) => {
|
|
|
5336
5275
|
};
|
|
5337
5276
|
var waitForSubprocessExit = async (subprocess) => {
|
|
5338
5277
|
try {
|
|
5339
|
-
return await
|
|
5340
|
-
} catch
|
|
5278
|
+
return await events.once(subprocess, "exit");
|
|
5279
|
+
} catch {
|
|
5341
5280
|
return waitForSubprocessExit(subprocess);
|
|
5342
5281
|
}
|
|
5343
5282
|
};
|
|
@@ -5354,7 +5293,7 @@ var isFailedExit = (exitCode, signal) => exitCode !== 0 || signal !== null;
|
|
|
5354
5293
|
// ../../node_modules/.pnpm/execa@9.3.1/node_modules/execa/lib/resolve/exit-sync.js
|
|
5355
5294
|
var getExitResultSync = ({ error, status: exitCode, signal, output }, { maxBuffer }) => {
|
|
5356
5295
|
const resultError = getResultError(error, exitCode, signal);
|
|
5357
|
-
const timedOut =
|
|
5296
|
+
const timedOut = resultError?.code === "ETIMEDOUT";
|
|
5358
5297
|
const isMaxBuffer = isMaxBufferSync(resultError, output, maxBuffer);
|
|
5359
5298
|
return {
|
|
5360
5299
|
resultError,
|
|
@@ -5462,7 +5401,7 @@ var runSubprocessSync = ({ file, commandArguments, options, command, escapedComm
|
|
|
5462
5401
|
try {
|
|
5463
5402
|
addInputOptionsSync(fileDescriptors, options);
|
|
5464
5403
|
const normalizedOptions = normalizeSpawnSyncOptions(options);
|
|
5465
|
-
return
|
|
5404
|
+
return child_process.spawnSync(file, commandArguments, normalizedOptions);
|
|
5466
5405
|
} catch (error) {
|
|
5467
5406
|
return makeEarlyError({
|
|
5468
5407
|
error,
|
|
@@ -5506,15 +5445,11 @@ var getSyncResult = ({ error, exitCode, signal, timedOut, isMaxBuffer, stdio, al
|
|
|
5506
5445
|
// ../../node_modules/.pnpm/execa@9.3.1/node_modules/execa/lib/methods/main-async.js
|
|
5507
5446
|
init_cjs_shims();
|
|
5508
5447
|
|
|
5509
|
-
|
|
5510
|
-
|
|
5511
5448
|
// ../../node_modules/.pnpm/execa@9.3.1/node_modules/execa/lib/ipc/methods.js
|
|
5512
5449
|
init_cjs_shims();
|
|
5513
5450
|
|
|
5514
|
-
|
|
5515
5451
|
// ../../node_modules/.pnpm/execa@9.3.1/node_modules/execa/lib/ipc/get-one.js
|
|
5516
5452
|
init_cjs_shims();
|
|
5517
|
-
|
|
5518
5453
|
var getOneMessage = ({ anyProcess, channel, isSubprocess, ipc }, { reference = true, filter } = {}) => {
|
|
5519
5454
|
validateIpcMethod({
|
|
5520
5455
|
methodName: "getOneMessage",
|
|
@@ -5550,27 +5485,26 @@ var getOneMessageAsync = async ({ anyProcess, channel, isSubprocess, filter, ref
|
|
|
5550
5485
|
};
|
|
5551
5486
|
var getMessage = async (ipcEmitter, filter, { signal }) => {
|
|
5552
5487
|
if (filter === void 0) {
|
|
5553
|
-
const [message] = await
|
|
5488
|
+
const [message] = await events.once(ipcEmitter, "message", { signal });
|
|
5554
5489
|
return message;
|
|
5555
5490
|
}
|
|
5556
|
-
for await (const [message] of
|
|
5491
|
+
for await (const [message] of events.on(ipcEmitter, "message", { signal })) {
|
|
5557
5492
|
if (filter(message)) {
|
|
5558
5493
|
return message;
|
|
5559
5494
|
}
|
|
5560
5495
|
}
|
|
5561
5496
|
};
|
|
5562
5497
|
var throwOnDisconnect2 = async (ipcEmitter, isSubprocess, { signal }) => {
|
|
5563
|
-
await
|
|
5498
|
+
await events.once(ipcEmitter, "disconnect", { signal });
|
|
5564
5499
|
throwOnEarlyDisconnect(isSubprocess);
|
|
5565
5500
|
};
|
|
5566
5501
|
var throwOnStrictError = async (ipcEmitter, isSubprocess, { signal }) => {
|
|
5567
|
-
const [error] = await
|
|
5502
|
+
const [error] = await events.once(ipcEmitter, "strict:error", { signal });
|
|
5568
5503
|
throw getStrictResponseError(error, isSubprocess);
|
|
5569
5504
|
};
|
|
5570
5505
|
|
|
5571
5506
|
// ../../node_modules/.pnpm/execa@9.3.1/node_modules/execa/lib/ipc/get-each.js
|
|
5572
5507
|
init_cjs_shims();
|
|
5573
|
-
|
|
5574
5508
|
var getEachMessage = ({ anyProcess, channel, isSubprocess, ipc }, { reference = true } = {}) => loopOnMessages({
|
|
5575
5509
|
anyProcess,
|
|
5576
5510
|
channel,
|
|
@@ -5610,26 +5544,26 @@ var loopOnMessages = ({ anyProcess, channel, isSubprocess, ipc, shouldAwait, ref
|
|
|
5610
5544
|
};
|
|
5611
5545
|
var stopOnDisconnect = async (anyProcess, ipcEmitter, controller) => {
|
|
5612
5546
|
try {
|
|
5613
|
-
await
|
|
5547
|
+
await events.once(ipcEmitter, "disconnect", { signal: controller.signal });
|
|
5614
5548
|
controller.abort();
|
|
5615
|
-
} catch
|
|
5549
|
+
} catch {
|
|
5616
5550
|
}
|
|
5617
5551
|
};
|
|
5618
5552
|
var abortOnStrictError = async ({ ipcEmitter, isSubprocess, controller, state }) => {
|
|
5619
5553
|
try {
|
|
5620
|
-
const [error] = await
|
|
5554
|
+
const [error] = await events.once(ipcEmitter, "strict:error", { signal: controller.signal });
|
|
5621
5555
|
state.error = getStrictResponseError(error, isSubprocess);
|
|
5622
5556
|
controller.abort();
|
|
5623
|
-
} catch
|
|
5557
|
+
} catch {
|
|
5624
5558
|
}
|
|
5625
5559
|
};
|
|
5626
5560
|
var iterateOnMessages = async function* ({ anyProcess, channel, ipcEmitter, isSubprocess, shouldAwait, controller, state, reference }) {
|
|
5627
5561
|
try {
|
|
5628
|
-
for await (const [message] of
|
|
5562
|
+
for await (const [message] of events.on(ipcEmitter, "message", { signal: controller.signal })) {
|
|
5629
5563
|
throwIfStrictError(state);
|
|
5630
5564
|
yield message;
|
|
5631
5565
|
}
|
|
5632
|
-
} catch
|
|
5566
|
+
} catch {
|
|
5633
5567
|
throwIfStrictError(state);
|
|
5634
5568
|
} finally {
|
|
5635
5569
|
controller.abort();
|
|
@@ -5653,9 +5587,9 @@ var addIpcMethods = (subprocess, { ipc }) => {
|
|
|
5653
5587
|
Object.assign(subprocess, getIpcMethods(subprocess, false, ipc));
|
|
5654
5588
|
};
|
|
5655
5589
|
var getIpcExport = () => {
|
|
5656
|
-
const anyProcess =
|
|
5590
|
+
const anyProcess = process3__namespace.default;
|
|
5657
5591
|
const isSubprocess = true;
|
|
5658
|
-
const ipc =
|
|
5592
|
+
const ipc = process3__namespace.default.channel !== void 0;
|
|
5659
5593
|
return {
|
|
5660
5594
|
...getIpcMethods(anyProcess, isSubprocess, ipc),
|
|
5661
5595
|
getCancelSignal: getCancelSignal.bind(void 0, {
|
|
@@ -5689,16 +5623,9 @@ var getIpcMethods = (anyProcess, isSubprocess, ipc) => ({
|
|
|
5689
5623
|
|
|
5690
5624
|
// ../../node_modules/.pnpm/execa@9.3.1/node_modules/execa/lib/return/early-error.js
|
|
5691
5625
|
init_cjs_shims();
|
|
5692
|
-
|
|
5693
|
-
|
|
5694
|
-
|
|
5695
|
-
|
|
5696
|
-
|
|
5697
|
-
|
|
5698
|
-
|
|
5699
5626
|
var handleEarlyError = ({ error, command, escapedCommand, fileDescriptors, options, startTime, verboseInfo }) => {
|
|
5700
5627
|
cleanupCustomStreams(fileDescriptors);
|
|
5701
|
-
const subprocess = new
|
|
5628
|
+
const subprocess = new child_process.ChildProcess();
|
|
5702
5629
|
createDummyStreams(subprocess, fileDescriptors);
|
|
5703
5630
|
Object.assign(subprocess, { readable, writable, duplex });
|
|
5704
5631
|
const earlyError = makeEarlyError({
|
|
@@ -5729,24 +5656,21 @@ var createDummyStreams = (subprocess, fileDescriptors) => {
|
|
|
5729
5656
|
});
|
|
5730
5657
|
};
|
|
5731
5658
|
var createDummyStream = () => {
|
|
5732
|
-
const stream = new
|
|
5733
|
-
stream.end();
|
|
5734
|
-
return stream;
|
|
5659
|
+
const stream$1 = new stream.PassThrough();
|
|
5660
|
+
stream$1.end();
|
|
5661
|
+
return stream$1;
|
|
5735
5662
|
};
|
|
5736
|
-
var readable = () => new
|
|
5663
|
+
var readable = () => new stream.Readable({ read() {
|
|
5737
5664
|
} });
|
|
5738
|
-
var writable = () => new
|
|
5665
|
+
var writable = () => new stream.Writable({ write() {
|
|
5739
5666
|
} });
|
|
5740
|
-
var duplex = () => new
|
|
5667
|
+
var duplex = () => new stream.Duplex({ read() {
|
|
5741
5668
|
}, write() {
|
|
5742
5669
|
} });
|
|
5743
5670
|
var handleDummyPromise = async (error, verboseInfo, options) => handleResult(error, verboseInfo, options);
|
|
5744
5671
|
|
|
5745
5672
|
// ../../node_modules/.pnpm/execa@9.3.1/node_modules/execa/lib/stdio/handle-async.js
|
|
5746
5673
|
init_cjs_shims();
|
|
5747
|
-
|
|
5748
|
-
|
|
5749
|
-
|
|
5750
5674
|
var handleStdioAsync = (options, verboseInfo) => handleStdio(addPropertiesAsync, options, verboseInfo, false);
|
|
5751
5675
|
var forbiddenIfAsync = ({ type, optionName }) => {
|
|
5752
5676
|
throw new TypeError(`The \`${optionName}\` option cannot be ${TYPE_TO_MESSAGE[type]}.`);
|
|
@@ -5758,8 +5682,8 @@ var addProperties2 = {
|
|
|
5758
5682
|
nodeStream: ({ value }) => ({ stream: value }),
|
|
5759
5683
|
webTransform({ value: { transform, writableObjectMode, readableObjectMode } }) {
|
|
5760
5684
|
const objectMode = writableObjectMode || readableObjectMode;
|
|
5761
|
-
const stream =
|
|
5762
|
-
return { stream };
|
|
5685
|
+
const stream$1 = stream.Duplex.fromWeb(transform, { objectMode });
|
|
5686
|
+
return { stream: stream$1 };
|
|
5763
5687
|
},
|
|
5764
5688
|
duplex: ({ value: { transform } }) => ({ stream: transform }),
|
|
5765
5689
|
native() {
|
|
@@ -5768,19 +5692,19 @@ var addProperties2 = {
|
|
|
5768
5692
|
var addPropertiesAsync = {
|
|
5769
5693
|
input: {
|
|
5770
5694
|
...addProperties2,
|
|
5771
|
-
fileUrl: ({ value }) => ({ stream:
|
|
5772
|
-
filePath: ({ value: { file } }) => ({ stream:
|
|
5773
|
-
webStream: ({ value }) => ({ stream:
|
|
5774
|
-
iterable: ({ value }) => ({ stream:
|
|
5775
|
-
asyncIterable: ({ value }) => ({ stream:
|
|
5776
|
-
string: ({ value }) => ({ stream:
|
|
5777
|
-
uint8Array: ({ value }) => ({ stream:
|
|
5695
|
+
fileUrl: ({ value }) => ({ stream: fs.createReadStream(value) }),
|
|
5696
|
+
filePath: ({ value: { file } }) => ({ stream: fs.createReadStream(file) }),
|
|
5697
|
+
webStream: ({ value }) => ({ stream: stream.Readable.fromWeb(value) }),
|
|
5698
|
+
iterable: ({ value }) => ({ stream: stream.Readable.from(value) }),
|
|
5699
|
+
asyncIterable: ({ value }) => ({ stream: stream.Readable.from(value) }),
|
|
5700
|
+
string: ({ value }) => ({ stream: stream.Readable.from(value) }),
|
|
5701
|
+
uint8Array: ({ value }) => ({ stream: stream.Readable.from(buffer.Buffer.from(value)) })
|
|
5778
5702
|
},
|
|
5779
5703
|
output: {
|
|
5780
5704
|
...addProperties2,
|
|
5781
|
-
fileUrl: ({ value }) => ({ stream:
|
|
5782
|
-
filePath: ({ value: { file } }) => ({ stream:
|
|
5783
|
-
webStream: ({ value }) => ({ stream:
|
|
5705
|
+
fileUrl: ({ value }) => ({ stream: fs.createWriteStream(value) }),
|
|
5706
|
+
filePath: ({ value: { file } }) => ({ stream: fs.createWriteStream(file) }),
|
|
5707
|
+
webStream: ({ value }) => ({ stream: stream.Writable.fromWeb(value) }),
|
|
5784
5708
|
iterable: forbiddenIfAsync,
|
|
5785
5709
|
asyncIterable: forbiddenIfAsync,
|
|
5786
5710
|
string: forbiddenIfAsync,
|
|
@@ -5793,9 +5717,6 @@ init_cjs_shims();
|
|
|
5793
5717
|
|
|
5794
5718
|
// ../../node_modules/.pnpm/@sindresorhus+merge-streams@4.0.0/node_modules/@sindresorhus/merge-streams/index.js
|
|
5795
5719
|
init_cjs_shims();
|
|
5796
|
-
|
|
5797
|
-
|
|
5798
|
-
|
|
5799
5720
|
function mergeStreams(streams) {
|
|
5800
5721
|
if (!Array.isArray(streams)) {
|
|
5801
5722
|
throw new TypeError(`Expected an array, got \`${typeof streams}\`.`);
|
|
@@ -5817,12 +5738,12 @@ function mergeStreams(streams) {
|
|
|
5817
5738
|
}
|
|
5818
5739
|
var getHighWaterMark = (streams, objectMode) => {
|
|
5819
5740
|
if (streams.length === 0) {
|
|
5820
|
-
return
|
|
5741
|
+
return stream.getDefaultHighWaterMark(objectMode);
|
|
5821
5742
|
}
|
|
5822
5743
|
const highWaterMarks = streams.filter(({ readableObjectMode }) => readableObjectMode === objectMode).map(({ readableHighWaterMark }) => readableHighWaterMark);
|
|
5823
5744
|
return Math.max(...highWaterMarks);
|
|
5824
5745
|
};
|
|
5825
|
-
var MergedStream = class extends
|
|
5746
|
+
var MergedStream = class extends stream.PassThrough {
|
|
5826
5747
|
#streams = /* @__PURE__ */ new Set([]);
|
|
5827
5748
|
#ended = /* @__PURE__ */ new Set([]);
|
|
5828
5749
|
#aborted = /* @__PURE__ */ new Set([]);
|
|
@@ -5878,21 +5799,21 @@ var onMergedStreamFinished = async (passThroughStream, streams, unpipeEvent) =>
|
|
|
5878
5799
|
};
|
|
5879
5800
|
var onMergedStreamEnd = async (passThroughStream, { signal }) => {
|
|
5880
5801
|
try {
|
|
5881
|
-
await
|
|
5802
|
+
await promises.finished(passThroughStream, { signal, cleanup: true });
|
|
5882
5803
|
} catch (error) {
|
|
5883
5804
|
errorOrAbortStream(passThroughStream, error);
|
|
5884
5805
|
throw error;
|
|
5885
5806
|
}
|
|
5886
5807
|
};
|
|
5887
5808
|
var onInputStreamsUnpipe = async (passThroughStream, streams, unpipeEvent, { signal }) => {
|
|
5888
|
-
for await (const [unpipedStream] of
|
|
5809
|
+
for await (const [unpipedStream] of events.on(passThroughStream, "unpipe", { signal })) {
|
|
5889
5810
|
if (streams.has(unpipedStream)) {
|
|
5890
5811
|
unpipedStream.emit(unpipeEvent);
|
|
5891
5812
|
}
|
|
5892
5813
|
}
|
|
5893
5814
|
};
|
|
5894
5815
|
var validateStream = (stream) => {
|
|
5895
|
-
if (typeof
|
|
5816
|
+
if (typeof stream?.pipe !== "function") {
|
|
5896
5817
|
throw new TypeError(`Expected a readable stream, got: \`${typeof stream}\`.`);
|
|
5897
5818
|
}
|
|
5898
5819
|
};
|
|
@@ -5945,7 +5866,7 @@ var afterMergedStreamFinished = async (onFinished, stream, { signal }) => {
|
|
|
5945
5866
|
};
|
|
5946
5867
|
var onInputStreamEnd = async ({ passThroughStream, stream, streams, ended, aborted: aborted2, controller: { signal } }) => {
|
|
5947
5868
|
try {
|
|
5948
|
-
await
|
|
5869
|
+
await promises.finished(stream, {
|
|
5949
5870
|
signal,
|
|
5950
5871
|
cleanup: true,
|
|
5951
5872
|
readable: true,
|
|
@@ -5966,9 +5887,9 @@ var onInputStreamEnd = async ({ passThroughStream, stream, streams, ended, abort
|
|
|
5966
5887
|
}
|
|
5967
5888
|
};
|
|
5968
5889
|
var onInputStreamUnpipe = async ({ stream, streams, ended, aborted: aborted2, unpipeEvent, controller: { signal } }) => {
|
|
5969
|
-
await
|
|
5890
|
+
await events.once(stream, unpipeEvent, { signal });
|
|
5970
5891
|
if (!stream.readable) {
|
|
5971
|
-
return
|
|
5892
|
+
return events.once(signal, "abort", { signal });
|
|
5972
5893
|
}
|
|
5973
5894
|
streams.delete(stream);
|
|
5974
5895
|
ended.delete(stream);
|
|
@@ -5986,7 +5907,7 @@ var errorOrAbortStream = (stream, error) => {
|
|
|
5986
5907
|
errorStream(stream, error);
|
|
5987
5908
|
}
|
|
5988
5909
|
};
|
|
5989
|
-
var isAbortError = (error) =>
|
|
5910
|
+
var isAbortError = (error) => error?.code === "ERR_STREAM_PREMATURE_CLOSE";
|
|
5990
5911
|
var abortStream = (stream) => {
|
|
5991
5912
|
if (stream.readable || stream.writable) {
|
|
5992
5913
|
stream.destroy();
|
|
@@ -6011,7 +5932,6 @@ var PASSTHROUGH_LISTENERS_PER_STREAM = 1;
|
|
|
6011
5932
|
|
|
6012
5933
|
// ../../node_modules/.pnpm/execa@9.3.1/node_modules/execa/lib/io/pipeline.js
|
|
6013
5934
|
init_cjs_shims();
|
|
6014
|
-
|
|
6015
5935
|
var pipeStreams = (source, destination) => {
|
|
6016
5936
|
source.pipe(destination);
|
|
6017
5937
|
onSourceFinish(source, destination);
|
|
@@ -6022,8 +5942,8 @@ var onSourceFinish = async (source, destination) => {
|
|
|
6022
5942
|
return;
|
|
6023
5943
|
}
|
|
6024
5944
|
try {
|
|
6025
|
-
await
|
|
6026
|
-
} catch
|
|
5945
|
+
await promises.finished(source, { cleanup: true, readable: true, writable: false });
|
|
5946
|
+
} catch {
|
|
6027
5947
|
}
|
|
6028
5948
|
endDestinationStream(destination);
|
|
6029
5949
|
};
|
|
@@ -6037,8 +5957,8 @@ var onDestinationFinish = async (source, destination) => {
|
|
|
6037
5957
|
return;
|
|
6038
5958
|
}
|
|
6039
5959
|
try {
|
|
6040
|
-
await
|
|
6041
|
-
} catch
|
|
5960
|
+
await promises.finished(destination, { cleanup: true, readable: false, writable: true });
|
|
5961
|
+
} catch {
|
|
6042
5962
|
}
|
|
6043
5963
|
abortSourceStream(source);
|
|
6044
5964
|
};
|
|
@@ -6090,7 +6010,7 @@ var pipeStdioItem = ({ subprocess, stream, direction, fdNumber, pipeGroups, cont
|
|
|
6090
6010
|
}
|
|
6091
6011
|
setStandardStreamMaxListeners(stream, controller);
|
|
6092
6012
|
const [inputStream, outputStream] = direction === "output" ? [stream, subprocess.stdio[fdNumber]] : [subprocess.stdio[fdNumber], stream];
|
|
6093
|
-
const outputStreams =
|
|
6013
|
+
const outputStreams = pipeGroups.get(inputStream) ?? [];
|
|
6094
6014
|
pipeGroups.set(inputStream, [...outputStreams, outputStream]);
|
|
6095
6015
|
};
|
|
6096
6016
|
var setStandardStreamMaxListeners = (stream, { signal }) => {
|
|
@@ -6103,7 +6023,6 @@ var MAX_LISTENERS_INCREMENT = 2;
|
|
|
6103
6023
|
// ../../node_modules/.pnpm/execa@9.3.1/node_modules/execa/lib/terminate/cleanup.js
|
|
6104
6024
|
init_cjs_shims();
|
|
6105
6025
|
|
|
6106
|
-
|
|
6107
6026
|
// ../../node_modules/.pnpm/signal-exit@4.1.0/node_modules/signal-exit/dist/mjs/index.js
|
|
6108
6027
|
init_cjs_shims();
|
|
6109
6028
|
|
|
@@ -6137,18 +6056,18 @@ var processOk = (process11) => !!process11 && typeof process11 === "object" && t
|
|
|
6137
6056
|
var kExitEmitter = Symbol.for("signal-exit emitter");
|
|
6138
6057
|
var global2 = globalThis;
|
|
6139
6058
|
var ObjectDefineProperty = Object.defineProperty.bind(Object);
|
|
6140
|
-
var Emitter =
|
|
6141
|
-
|
|
6059
|
+
var Emitter = class {
|
|
6060
|
+
emitted = {
|
|
6142
6061
|
afterExit: false,
|
|
6143
6062
|
exit: false
|
|
6144
|
-
}
|
|
6145
|
-
|
|
6063
|
+
};
|
|
6064
|
+
listeners = {
|
|
6146
6065
|
afterExit: [],
|
|
6147
6066
|
exit: []
|
|
6148
|
-
}
|
|
6149
|
-
|
|
6150
|
-
|
|
6151
|
-
constructor() {
|
|
6067
|
+
};
|
|
6068
|
+
count = 0;
|
|
6069
|
+
id = Math.random();
|
|
6070
|
+
constructor() {
|
|
6152
6071
|
if (global2[kExitEmitter]) {
|
|
6153
6072
|
return global2[kExitEmitter];
|
|
6154
6073
|
}
|
|
@@ -6188,7 +6107,7 @@ var Emitter = (_class2 = class {
|
|
|
6188
6107
|
}
|
|
6189
6108
|
return ret;
|
|
6190
6109
|
}
|
|
6191
|
-
}
|
|
6110
|
+
};
|
|
6192
6111
|
var SignalExitBase = class {
|
|
6193
6112
|
};
|
|
6194
6113
|
var signalExitWrap = (handler) => {
|
|
@@ -6258,7 +6177,7 @@ var SignalExit = class extends SignalExitBase {
|
|
|
6258
6177
|
if (this.#loaded === false) {
|
|
6259
6178
|
this.load();
|
|
6260
6179
|
}
|
|
6261
|
-
const ev =
|
|
6180
|
+
const ev = opts?.alwaysLast ? "afterExit" : "exit";
|
|
6262
6181
|
this.#emitter.on(ev, cb);
|
|
6263
6182
|
return () => {
|
|
6264
6183
|
this.#emitter.removeListener(ev, cb);
|
|
@@ -6367,7 +6286,7 @@ var cleanupOnExit = (subprocess, { cleanup, detached }, { signal }) => {
|
|
|
6367
6286
|
const removeExitHandler = onExit(() => {
|
|
6368
6287
|
subprocess.kill();
|
|
6369
6288
|
});
|
|
6370
|
-
|
|
6289
|
+
events.addAbortListener(signal, () => {
|
|
6371
6290
|
removeExitHandler();
|
|
6372
6291
|
});
|
|
6373
6292
|
};
|
|
@@ -6520,7 +6439,6 @@ var waitForBothSubprocesses = async (subprocessPromises) => {
|
|
|
6520
6439
|
|
|
6521
6440
|
// ../../node_modules/.pnpm/execa@9.3.1/node_modules/execa/lib/pipe/streaming.js
|
|
6522
6441
|
init_cjs_shims();
|
|
6523
|
-
|
|
6524
6442
|
var pipeSubprocessStream = (sourceStream, destinationStream, maxListenersController) => {
|
|
6525
6443
|
const mergedStream = MERGED_STREAMS.has(destinationStream) ? pipeMoreSubprocessStream(sourceStream, destinationStream) : pipeFirstSubprocessStream(sourceStream, destinationStream);
|
|
6526
6444
|
incrementMaxListeners(sourceStream, SOURCE_LISTENERS_PER_PIPE, maxListenersController.signal);
|
|
@@ -6541,8 +6459,8 @@ var pipeMoreSubprocessStream = (sourceStream, destinationStream) => {
|
|
|
6541
6459
|
};
|
|
6542
6460
|
var cleanupMergedStreamsMap = async (destinationStream) => {
|
|
6543
6461
|
try {
|
|
6544
|
-
await
|
|
6545
|
-
} catch
|
|
6462
|
+
await promises.finished(destinationStream, { cleanup: true, readable: false, writable: true });
|
|
6463
|
+
} catch {
|
|
6546
6464
|
}
|
|
6547
6465
|
MERGED_STREAMS.delete(destinationStream);
|
|
6548
6466
|
};
|
|
@@ -6552,10 +6470,9 @@ var DESTINATION_LISTENERS_PER_PIPE = 1;
|
|
|
6552
6470
|
|
|
6553
6471
|
// ../../node_modules/.pnpm/execa@9.3.1/node_modules/execa/lib/pipe/abort.js
|
|
6554
6472
|
init_cjs_shims();
|
|
6555
|
-
|
|
6556
6473
|
var unpipeOnAbort = (unpipeSignal, unpipeContext) => unpipeSignal === void 0 ? [] : [unpipeOnSignalAbort(unpipeSignal, unpipeContext)];
|
|
6557
6474
|
var unpipeOnSignalAbort = async (unpipeSignal, { sourceStream, mergedStream, fileDescriptors, sourceOptions, startTime }) => {
|
|
6558
|
-
await
|
|
6475
|
+
await util.aborted(unpipeSignal, sourceStream);
|
|
6559
6476
|
await mergedStream.remove(sourceStream);
|
|
6560
6477
|
const error = new Error("Pipe canceled by `unpipeSignal` option.");
|
|
6561
6478
|
throw createNonCommandError({
|
|
@@ -6634,11 +6551,8 @@ init_cjs_shims();
|
|
|
6634
6551
|
// ../../node_modules/.pnpm/execa@9.3.1/node_modules/execa/lib/io/contents.js
|
|
6635
6552
|
init_cjs_shims();
|
|
6636
6553
|
|
|
6637
|
-
|
|
6638
6554
|
// ../../node_modules/.pnpm/execa@9.3.1/node_modules/execa/lib/io/iterate.js
|
|
6639
6555
|
init_cjs_shims();
|
|
6640
|
-
|
|
6641
|
-
|
|
6642
6556
|
var iterateOnSubprocessStream = ({ subprocessStdout, subprocess, binary, shouldEncode, encoding, preserveNewlines }) => {
|
|
6643
6557
|
const controller = new AbortController();
|
|
6644
6558
|
stopReadingOnExit(subprocess, controller);
|
|
@@ -6655,7 +6569,7 @@ var iterateOnSubprocessStream = ({ subprocessStdout, subprocess, binary, shouldE
|
|
|
6655
6569
|
var stopReadingOnExit = async (subprocess, controller) => {
|
|
6656
6570
|
try {
|
|
6657
6571
|
await subprocess;
|
|
6658
|
-
} catch
|
|
6572
|
+
} catch {
|
|
6659
6573
|
} finally {
|
|
6660
6574
|
controller.abort();
|
|
6661
6575
|
}
|
|
@@ -6677,14 +6591,14 @@ var iterateForResult = ({ stream, onStreamEnd, lines, encoding, stripFinalNewlin
|
|
|
6677
6591
|
var stopReadingOnStreamEnd = async (onStreamEnd, controller, stream) => {
|
|
6678
6592
|
try {
|
|
6679
6593
|
await onStreamEnd;
|
|
6680
|
-
} catch
|
|
6594
|
+
} catch {
|
|
6681
6595
|
stream.destroy();
|
|
6682
6596
|
} finally {
|
|
6683
6597
|
controller.abort();
|
|
6684
6598
|
}
|
|
6685
6599
|
};
|
|
6686
6600
|
var iterateOnStream = ({ stream, controller, binary, shouldEncode, encoding, shouldSplit, preserveNewlines }) => {
|
|
6687
|
-
const onStdoutChunk =
|
|
6601
|
+
const onStdoutChunk = events.on(stream, "data", {
|
|
6688
6602
|
signal: controller.signal,
|
|
6689
6603
|
highWaterMark: HIGH_WATER_MARK,
|
|
6690
6604
|
// Backward compatibility with older name for this option
|
|
@@ -6702,7 +6616,7 @@ var iterateOnStream = ({ stream, controller, binary, shouldEncode, encoding, sho
|
|
|
6702
6616
|
preserveNewlines
|
|
6703
6617
|
});
|
|
6704
6618
|
};
|
|
6705
|
-
var DEFAULT_OBJECT_HIGH_WATER_MARK =
|
|
6619
|
+
var DEFAULT_OBJECT_HIGH_WATER_MARK = stream.getDefaultHighWaterMark(true);
|
|
6706
6620
|
var HIGH_WATER_MARK = DEFAULT_OBJECT_HIGH_WATER_MARK;
|
|
6707
6621
|
var iterateOnData = async function* ({ onStdoutChunk, controller, binary, shouldEncode, encoding, shouldSplit, preserveNewlines }) {
|
|
6708
6622
|
const generators = getGenerators({
|
|
@@ -6768,7 +6682,7 @@ var getStreamOutput = async ({ stream, onStreamEnd, fdNumber, encoding, buffer,
|
|
|
6768
6682
|
};
|
|
6769
6683
|
var logOutputAsync = async ({ stream, onStreamEnd, fdNumber, encoding, allMixed, verboseInfo, streamInfo: { fileDescriptors } }) => {
|
|
6770
6684
|
if (!shouldLogOutput({
|
|
6771
|
-
stdioItems:
|
|
6685
|
+
stdioItems: fileDescriptors[fdNumber]?.stdioItems,
|
|
6772
6686
|
encoding,
|
|
6773
6687
|
verboseInfo,
|
|
6774
6688
|
fdNumber
|
|
@@ -6786,7 +6700,7 @@ var logOutputAsync = async ({ stream, onStreamEnd, fdNumber, encoding, allMixed,
|
|
|
6786
6700
|
await logLines(linesIterable, stream, fdNumber, verboseInfo);
|
|
6787
6701
|
};
|
|
6788
6702
|
var resumeStream = async (stream) => {
|
|
6789
|
-
await
|
|
6703
|
+
await promises$1.setImmediate();
|
|
6790
6704
|
if (stream.readableFlowing === null) {
|
|
6791
6705
|
stream.resume();
|
|
6792
6706
|
}
|
|
@@ -6822,14 +6736,13 @@ var handleBufferedData = ({ bufferedData }) => isArrayBuffer(bufferedData) ? new
|
|
|
6822
6736
|
|
|
6823
6737
|
// ../../node_modules/.pnpm/execa@9.3.1/node_modules/execa/lib/resolve/wait-stream.js
|
|
6824
6738
|
init_cjs_shims();
|
|
6825
|
-
|
|
6826
6739
|
var waitForStream = async (stream, fdNumber, streamInfo, { isSameDirection, stopOnExit = false } = {}) => {
|
|
6827
6740
|
const state = handleStdinDestroy(stream, streamInfo);
|
|
6828
6741
|
const abortController = new AbortController();
|
|
6829
6742
|
try {
|
|
6830
6743
|
await Promise.race([
|
|
6831
6744
|
...stopOnExit ? [streamInfo.exitPromise] : [],
|
|
6832
|
-
|
|
6745
|
+
promises.finished(stream, { cleanup: true, signal: abortController.signal })
|
|
6833
6746
|
]);
|
|
6834
6747
|
} catch (error) {
|
|
6835
6748
|
if (!state.stdinCleanedUp) {
|
|
@@ -6871,8 +6784,8 @@ var shouldIgnoreStreamError = (error, fdNumber, streamInfo, isSameDirection = tr
|
|
|
6871
6784
|
return isInputFileDescriptor(streamInfo, fdNumber) === isSameDirection ? isStreamEpipe(error) : isStreamAbort(error);
|
|
6872
6785
|
};
|
|
6873
6786
|
var isInputFileDescriptor = ({ fileDescriptors }, fdNumber) => fdNumber !== "all" && fileDescriptors[fdNumber].direction === "input";
|
|
6874
|
-
var isStreamAbort = (error) =>
|
|
6875
|
-
var isStreamEpipe = (error) =>
|
|
6787
|
+
var isStreamAbort = (error) => error?.code === "ERR_STREAM_PREMATURE_CLOSE";
|
|
6788
|
+
var isStreamEpipe = (error) => error?.code === "EPIPE";
|
|
6876
6789
|
|
|
6877
6790
|
// ../../node_modules/.pnpm/execa@9.3.1/node_modules/execa/lib/resolve/stdio.js
|
|
6878
6791
|
var waitForStdioStreams = ({ subprocess, encoding, buffer, maxBuffer, lines, stripFinalNewline: stripFinalNewline2, verboseInfo, streamInfo }) => subprocess.stdio.map((stream, fdNumber) => waitForSubprocessStream({
|
|
@@ -6946,7 +6859,6 @@ var getAllMixed = ({ all, stdout: stdout2, stderr }) => all && stdout2 && stderr
|
|
|
6946
6859
|
// ../../node_modules/.pnpm/execa@9.3.1/node_modules/execa/lib/resolve/wait-subprocess.js
|
|
6947
6860
|
init_cjs_shims();
|
|
6948
6861
|
|
|
6949
|
-
|
|
6950
6862
|
// ../../node_modules/.pnpm/execa@9.3.1/node_modules/execa/lib/ipc/buffer-messages.js
|
|
6951
6863
|
init_cjs_shims();
|
|
6952
6864
|
|
|
@@ -7113,7 +7025,7 @@ var waitForCustomStreamsEnd = (fileDescriptors, streamInfo) => fileDescriptors.f
|
|
|
7113
7025
|
stopOnExit: type === "native"
|
|
7114
7026
|
})));
|
|
7115
7027
|
var throwOnSubprocessError = async (subprocess, { signal }) => {
|
|
7116
|
-
const [error] = await
|
|
7028
|
+
const [error] = await events.once(subprocess, "error", { signal });
|
|
7117
7029
|
throw error;
|
|
7118
7030
|
};
|
|
7119
7031
|
|
|
@@ -7150,18 +7062,15 @@ var waitForConcurrentStreams = async ({ resolve, promises }, subprocess) => {
|
|
|
7150
7062
|
// ../../node_modules/.pnpm/execa@9.3.1/node_modules/execa/lib/convert/readable.js
|
|
7151
7063
|
init_cjs_shims();
|
|
7152
7064
|
|
|
7153
|
-
|
|
7154
|
-
|
|
7155
7065
|
// ../../node_modules/.pnpm/execa@9.3.1/node_modules/execa/lib/convert/shared.js
|
|
7156
7066
|
init_cjs_shims();
|
|
7157
|
-
|
|
7158
7067
|
var safeWaitForSubprocessStdin = async (subprocessStdin) => {
|
|
7159
7068
|
if (subprocessStdin === void 0) {
|
|
7160
7069
|
return;
|
|
7161
7070
|
}
|
|
7162
7071
|
try {
|
|
7163
7072
|
await waitForSubprocessStdin(subprocessStdin);
|
|
7164
|
-
} catch
|
|
7073
|
+
} catch {
|
|
7165
7074
|
}
|
|
7166
7075
|
};
|
|
7167
7076
|
var safeWaitForSubprocessStdout = async (subprocessStdout) => {
|
|
@@ -7170,14 +7079,14 @@ var safeWaitForSubprocessStdout = async (subprocessStdout) => {
|
|
|
7170
7079
|
}
|
|
7171
7080
|
try {
|
|
7172
7081
|
await waitForSubprocessStdout(subprocessStdout);
|
|
7173
|
-
} catch
|
|
7082
|
+
} catch {
|
|
7174
7083
|
}
|
|
7175
7084
|
};
|
|
7176
7085
|
var waitForSubprocessStdin = async (subprocessStdin) => {
|
|
7177
|
-
await
|
|
7086
|
+
await promises.finished(subprocessStdin, { cleanup: true, readable: false, writable: true });
|
|
7178
7087
|
};
|
|
7179
7088
|
var waitForSubprocessStdout = async (subprocessStdout) => {
|
|
7180
|
-
await
|
|
7089
|
+
await promises.finished(subprocessStdout, { cleanup: true, readable: true, writable: false });
|
|
7181
7090
|
};
|
|
7182
7091
|
var waitForSubprocess = async (subprocess, error) => {
|
|
7183
7092
|
await subprocess;
|
|
@@ -7205,9 +7114,9 @@ var createReadable = ({ subprocess, concurrentStreams, encoding }, { from, binar
|
|
|
7205
7114
|
encoding,
|
|
7206
7115
|
preserveNewlines
|
|
7207
7116
|
});
|
|
7208
|
-
const readable2 = new
|
|
7117
|
+
const readable2 = new stream.Readable({
|
|
7209
7118
|
read,
|
|
7210
|
-
destroy:
|
|
7119
|
+
destroy: util.callbackify(onReadableDestroy.bind(void 0, { subprocessStdout, subprocess, waitReadableDestroy })),
|
|
7211
7120
|
highWaterMark: readableHighWaterMark,
|
|
7212
7121
|
objectMode: readableObjectMode,
|
|
7213
7122
|
encoding: readableEncoding
|
|
@@ -7251,7 +7160,7 @@ var onRead = async (readable2, onStdoutData, onStdoutDataDone) => {
|
|
|
7251
7160
|
} else {
|
|
7252
7161
|
readable2.push(value);
|
|
7253
7162
|
}
|
|
7254
|
-
} catch
|
|
7163
|
+
} catch {
|
|
7255
7164
|
}
|
|
7256
7165
|
};
|
|
7257
7166
|
var onStdoutFinished = async ({ subprocessStdout, onStdoutDataDone, readable: readable2, subprocess, subprocessStdin }) => {
|
|
@@ -7280,13 +7189,11 @@ var destroyOtherReadable = (stream, error) => {
|
|
|
7280
7189
|
|
|
7281
7190
|
// ../../node_modules/.pnpm/execa@9.3.1/node_modules/execa/lib/convert/writable.js
|
|
7282
7191
|
init_cjs_shims();
|
|
7283
|
-
|
|
7284
|
-
|
|
7285
7192
|
var createWritable = ({ subprocess, concurrentStreams }, { to } = {}) => {
|
|
7286
7193
|
const { subprocessStdin, waitWritableFinal, waitWritableDestroy } = getSubprocessStdin(subprocess, to, concurrentStreams);
|
|
7287
|
-
const writable2 = new
|
|
7194
|
+
const writable2 = new stream.Writable({
|
|
7288
7195
|
...getWritableMethods(subprocessStdin, subprocess, waitWritableFinal),
|
|
7289
|
-
destroy:
|
|
7196
|
+
destroy: util.callbackify(onWritableDestroy.bind(void 0, {
|
|
7290
7197
|
subprocessStdin,
|
|
7291
7198
|
subprocess,
|
|
7292
7199
|
waitWritableFinal,
|
|
@@ -7306,7 +7213,7 @@ var getSubprocessStdin = (subprocess, to, concurrentStreams) => {
|
|
|
7306
7213
|
};
|
|
7307
7214
|
var getWritableMethods = (subprocessStdin, subprocess, waitWritableFinal) => ({
|
|
7308
7215
|
write: onWrite.bind(void 0, subprocessStdin),
|
|
7309
|
-
final:
|
|
7216
|
+
final: util.callbackify(onWritableFinal.bind(void 0, subprocessStdin, subprocess, waitWritableFinal))
|
|
7310
7217
|
});
|
|
7311
7218
|
var onWrite = (subprocessStdin, chunk, encoding, done) => {
|
|
7312
7219
|
if (subprocessStdin.write(chunk, encoding)) {
|
|
@@ -7347,8 +7254,6 @@ var destroyOtherWritable = (stream, error) => {
|
|
|
7347
7254
|
|
|
7348
7255
|
// ../../node_modules/.pnpm/execa@9.3.1/node_modules/execa/lib/convert/duplex.js
|
|
7349
7256
|
init_cjs_shims();
|
|
7350
|
-
|
|
7351
|
-
|
|
7352
7257
|
var createDuplex = ({ subprocess, concurrentStreams, encoding }, { from, to, binary: binaryOption = true, preserveNewlines = true } = {}) => {
|
|
7353
7258
|
const binary = binaryOption || BINARY_ENCODINGS.has(encoding);
|
|
7354
7259
|
const { subprocessStdout, waitReadableDestroy } = getSubprocessStdout(subprocess, from, concurrentStreams);
|
|
@@ -7361,10 +7266,10 @@ var createDuplex = ({ subprocess, concurrentStreams, encoding }, { from, to, bin
|
|
|
7361
7266
|
encoding,
|
|
7362
7267
|
preserveNewlines
|
|
7363
7268
|
});
|
|
7364
|
-
const duplex2 = new
|
|
7269
|
+
const duplex2 = new stream.Duplex({
|
|
7365
7270
|
read,
|
|
7366
7271
|
...getWritableMethods(subprocessStdin, subprocess, waitWritableFinal),
|
|
7367
|
-
destroy:
|
|
7272
|
+
destroy: util.callbackify(onDuplexDestroy.bind(void 0, {
|
|
7368
7273
|
subprocessStdout,
|
|
7369
7274
|
subprocessStdin,
|
|
7370
7275
|
subprocess,
|
|
@@ -7503,7 +7408,7 @@ var handleAsyncOptions = ({ timeout, signal, ...options }) => {
|
|
|
7503
7408
|
var spawnSubprocessAsync = ({ file, commandArguments, options, startTime, verboseInfo, command, escapedCommand, fileDescriptors }) => {
|
|
7504
7409
|
let subprocess;
|
|
7505
7410
|
try {
|
|
7506
|
-
subprocess =
|
|
7411
|
+
subprocess = child_process.spawn(file, commandArguments, options);
|
|
7507
7412
|
} catch (error) {
|
|
7508
7413
|
return handleEarlyError({
|
|
7509
7414
|
error,
|
|
@@ -7516,7 +7421,7 @@ var spawnSubprocessAsync = ({ file, commandArguments, options, startTime, verbos
|
|
|
7516
7421
|
});
|
|
7517
7422
|
}
|
|
7518
7423
|
const controller = new AbortController();
|
|
7519
|
-
|
|
7424
|
+
events.setMaxListeners(Number.POSITIVE_INFINITY, controller.signal);
|
|
7520
7425
|
const originalStreams = [...subprocess.stdio];
|
|
7521
7426
|
pipeOutputAsync(subprocess, fileDescriptors, controller);
|
|
7522
7427
|
cleanupOnExit(subprocess, options, controller);
|
|
@@ -7721,54 +7626,41 @@ var deepScriptOptions = { preferLocal: true };
|
|
|
7721
7626
|
|
|
7722
7627
|
// ../../node_modules/.pnpm/execa@9.3.1/node_modules/execa/index.js
|
|
7723
7628
|
var execa = createExeca(() => ({}));
|
|
7724
|
-
|
|
7725
|
-
|
|
7726
|
-
|
|
7727
|
-
|
|
7728
|
-
|
|
7729
|
-
|
|
7730
|
-
sendMessage: sendMessage2,
|
|
7731
|
-
getOneMessage: getOneMessage2,
|
|
7732
|
-
getEachMessage: getEachMessage2,
|
|
7733
|
-
getCancelSignal: getCancelSignal2
|
|
7734
|
-
} = getIpcExport();
|
|
7629
|
+
createExeca(() => ({ isSync: true }));
|
|
7630
|
+
createExeca(mapCommandAsync);
|
|
7631
|
+
createExeca(mapCommandSync);
|
|
7632
|
+
createExeca(mapNode);
|
|
7633
|
+
createExeca(mapScriptAsync, {}, deepScriptOptions, setScriptSync);
|
|
7634
|
+
getIpcExport();
|
|
7735
7635
|
|
|
7736
7636
|
// src/generate.ts
|
|
7737
7637
|
init_cjs_shims();
|
|
7738
|
-
var _logger = require('@kubb/core/logger');
|
|
7739
|
-
var _core = require('@kubb/core');
|
|
7740
7638
|
|
|
7741
7639
|
// src/utils/executeHooks.ts
|
|
7742
7640
|
init_cjs_shims();
|
|
7743
|
-
var _stringargv = require('string-argv');
|
|
7744
7641
|
|
|
7745
7642
|
// src/utils/Writables.ts
|
|
7746
7643
|
init_cjs_shims();
|
|
7747
|
-
|
|
7748
|
-
|
|
7749
|
-
|
|
7750
|
-
|
|
7751
|
-
|
|
7644
|
+
var ConsolaWritable = class extends stream.Writable {
|
|
7645
|
+
consola;
|
|
7646
|
+
command;
|
|
7752
7647
|
constructor(consola, command, opts) {
|
|
7753
7648
|
super(opts);
|
|
7754
7649
|
this.command = command;
|
|
7755
7650
|
this.consola = consola;
|
|
7756
7651
|
}
|
|
7757
7652
|
_write(chunk, _encoding, callback) {
|
|
7758
|
-
|
|
7653
|
+
process3__namespace.stdout.write(`${p2.dim(chunk?.toString())}`);
|
|
7759
7654
|
callback();
|
|
7760
7655
|
}
|
|
7761
7656
|
};
|
|
7762
7657
|
|
|
7763
|
-
// src/utils/executeHooks.ts
|
|
7764
|
-
|
|
7765
|
-
|
|
7766
7658
|
// ../../node_modules/.pnpm/p-queue@8.0.1/node_modules/p-queue/dist/index.js
|
|
7767
7659
|
init_cjs_shims();
|
|
7768
7660
|
|
|
7769
7661
|
// ../../node_modules/.pnpm/eventemitter3@5.0.1/node_modules/eventemitter3/index.mjs
|
|
7770
7662
|
init_cjs_shims();
|
|
7771
|
-
var import_index = __toESM(require_eventemitter3()
|
|
7663
|
+
var import_index = __toESM(require_eventemitter3());
|
|
7772
7664
|
|
|
7773
7665
|
// ../../node_modules/.pnpm/p-timeout@6.1.2/node_modules/p-timeout/index.js
|
|
7774
7666
|
init_cjs_shims();
|
|
@@ -7833,7 +7725,7 @@ function pTimeout(promise, options) {
|
|
|
7833
7725
|
} else if (message instanceof Error) {
|
|
7834
7726
|
reject(message);
|
|
7835
7727
|
} else {
|
|
7836
|
-
timeoutError.message =
|
|
7728
|
+
timeoutError.message = message ?? `Promise timed out after ${milliseconds} milliseconds`;
|
|
7837
7729
|
reject(timeoutError);
|
|
7838
7730
|
}
|
|
7839
7731
|
}, milliseconds);
|
|
@@ -7897,7 +7789,7 @@ var PriorityQueue = class {
|
|
|
7897
7789
|
}
|
|
7898
7790
|
dequeue() {
|
|
7899
7791
|
const item = this.#queue.shift();
|
|
7900
|
-
return
|
|
7792
|
+
return item?.run;
|
|
7901
7793
|
}
|
|
7902
7794
|
filter(options) {
|
|
7903
7795
|
return this.#queue.filter((element) => element.priority === options.priority).map((element) => element.run);
|
|
@@ -7929,7 +7821,7 @@ var PQueue = class extends import_index.default {
|
|
|
7929
7821
|
|
|
7930
7822
|
Applies to each future operation.
|
|
7931
7823
|
*/
|
|
7932
|
-
|
|
7824
|
+
timeout;
|
|
7933
7825
|
// TODO: The `throwOnTimeout` option should affect the return types of `add()` and `addAll()`
|
|
7934
7826
|
constructor(options) {
|
|
7935
7827
|
super();
|
|
@@ -7943,10 +7835,10 @@ var PQueue = class extends import_index.default {
|
|
|
7943
7835
|
...options
|
|
7944
7836
|
};
|
|
7945
7837
|
if (!(typeof options.intervalCap === "number" && options.intervalCap >= 1)) {
|
|
7946
|
-
throw new TypeError(`Expected \`intervalCap\` to be a number from 1 and up, got \`${
|
|
7838
|
+
throw new TypeError(`Expected \`intervalCap\` to be a number from 1 and up, got \`${options.intervalCap?.toString() ?? ""}\` (${typeof options.intervalCap})`);
|
|
7947
7839
|
}
|
|
7948
7840
|
if (options.interval === void 0 || !(Number.isFinite(options.interval) && options.interval >= 0)) {
|
|
7949
|
-
throw new TypeError(`Expected \`interval\` to be a finite number >= 0, got \`${
|
|
7841
|
+
throw new TypeError(`Expected \`interval\` to be a finite number >= 0, got \`${options.interval?.toString() ?? ""}\` (${typeof options.interval})`);
|
|
7950
7842
|
}
|
|
7951
7843
|
this.#carryoverConcurrencyCount = options.carryoverConcurrencyCount;
|
|
7952
7844
|
this.#isIntervalIgnored = options.intervalCap === Number.POSITIVE_INFINITY || options.interval === 0;
|
|
@@ -8073,7 +7965,7 @@ var PQueue = class extends import_index.default {
|
|
|
8073
7965
|
this.#pending++;
|
|
8074
7966
|
this.#intervalCount++;
|
|
8075
7967
|
try {
|
|
8076
|
-
|
|
7968
|
+
options.signal?.throwIfAborted();
|
|
8077
7969
|
let operation = function_({ signal: options.signal });
|
|
8078
7970
|
if (options.timeout) {
|
|
8079
7971
|
operation = pTimeout(Promise.resolve(operation), { milliseconds: options.timeout });
|
|
@@ -8201,34 +8093,34 @@ var PQueue = class extends import_index.default {
|
|
|
8201
8093
|
};
|
|
8202
8094
|
|
|
8203
8095
|
// src/utils/executeHooks.ts
|
|
8204
|
-
async function executeHooks({ hooks, logger }) {
|
|
8096
|
+
async function executeHooks({ hooks, logger: logger$1 }) {
|
|
8205
8097
|
const commands = Array.isArray(hooks.done) ? hooks.done : [hooks.done].filter(Boolean);
|
|
8206
8098
|
const queue = new PQueue({ concurrency: 1 });
|
|
8207
8099
|
const promises = commands.map(async (command) => {
|
|
8208
|
-
const consolaWritable = new ConsolaWritable(logger.consola, command);
|
|
8209
|
-
const [cmd, ..._args] = [...
|
|
8100
|
+
const consolaWritable = new ConsolaWritable(logger$1.consola, command);
|
|
8101
|
+
const [cmd, ..._args] = [...stringArgv.parseArgsStringToArgv(command)];
|
|
8210
8102
|
if (!cmd) {
|
|
8211
8103
|
return null;
|
|
8212
8104
|
}
|
|
8213
8105
|
await queue.add(async () => {
|
|
8214
|
-
|
|
8106
|
+
logger$1?.emit("start", `Executing hook ${logger$1.logLevel !== logger.LogMapper.silent ? p2.dim(command) : ""}`);
|
|
8215
8107
|
await execa(cmd, _args, {
|
|
8216
8108
|
detached: true,
|
|
8217
|
-
stdout:
|
|
8109
|
+
stdout: logger$1?.logLevel === logger.LogMapper.silent ? void 0 : ["pipe", consolaWritable],
|
|
8218
8110
|
stripFinalNewline: true
|
|
8219
8111
|
});
|
|
8220
|
-
|
|
8112
|
+
logger$1?.emit("success", `Executed hook ${logger$1.logLevel !== logger.LogMapper.silent ? p2.dim(command) : ""}`);
|
|
8221
8113
|
});
|
|
8222
8114
|
});
|
|
8223
8115
|
await Promise.all(promises);
|
|
8224
|
-
|
|
8116
|
+
logger$1?.emit("success", "Executed hooks");
|
|
8225
8117
|
}
|
|
8226
8118
|
|
|
8227
8119
|
// src/utils/getErrorCauses.ts
|
|
8228
8120
|
init_cjs_shims();
|
|
8229
8121
|
function getErrorCauses(errors) {
|
|
8230
8122
|
return errors.reduce((prev, error) => {
|
|
8231
|
-
const causedError =
|
|
8123
|
+
const causedError = error?.cause;
|
|
8232
8124
|
if (causedError) {
|
|
8233
8125
|
prev = [...prev, ...getErrorCauses([causedError])];
|
|
8234
8126
|
return prev;
|
|
@@ -8241,8 +8133,6 @@ function getErrorCauses(errors) {
|
|
|
8241
8133
|
// src/utils/getSummary.ts
|
|
8242
8134
|
init_cjs_shims();
|
|
8243
8135
|
|
|
8244
|
-
|
|
8245
|
-
|
|
8246
8136
|
// src/utils/parseHrtimeToSeconds.ts
|
|
8247
8137
|
init_cjs_shims();
|
|
8248
8138
|
function parseHrtimeToSeconds(hrtime2) {
|
|
@@ -8256,14 +8146,14 @@ function getSummary({ pluginManager, filesCreated, status, hrStart, config }) {
|
|
|
8256
8146
|
const elapsedSeconds = parseHrtimeToSeconds(process.hrtime(hrStart));
|
|
8257
8147
|
const buildStartPlugins = pluginManager.executed.filter((item) => item.hookName === "buildStart" && item.plugin.name !== "core").map((item) => item.plugin.name);
|
|
8258
8148
|
const buildEndPlugins = pluginManager.executed.filter((item) => item.hookName === "buildEnd" && item.plugin.name !== "core").map((item) => item.plugin.name);
|
|
8259
|
-
const failedPlugins =
|
|
8260
|
-
const pluginsCount =
|
|
8149
|
+
const failedPlugins = config.plugins?.filter((plugin) => !buildEndPlugins.includes(plugin.name))?.map((plugin) => plugin.name);
|
|
8150
|
+
const pluginsCount = config.plugins?.length || 0;
|
|
8261
8151
|
const meta = {
|
|
8262
|
-
plugins: status === "success" ? `${p2.green(`${buildStartPlugins.length} successful`)}, ${pluginsCount} total` : `${p2.red(`${
|
|
8263
|
-
pluginsFailed: status === "failed" ?
|
|
8152
|
+
plugins: status === "success" ? `${p2.green(`${buildStartPlugins.length} successful`)}, ${pluginsCount} total` : `${p2.red(`${failedPlugins?.length ?? 1} failed`)}, ${pluginsCount} total`,
|
|
8153
|
+
pluginsFailed: status === "failed" ? failedPlugins?.map((name) => logger.randomCliColour(name))?.join(", ") : void 0,
|
|
8264
8154
|
filesCreated,
|
|
8265
8155
|
time: `${p2.yellow(`${elapsedSeconds}s`)}`,
|
|
8266
|
-
output:
|
|
8156
|
+
output: path__default.default.isAbsolute(config.root) ? path__default.default.resolve(config.root, config.output.path) : config.root
|
|
8267
8157
|
};
|
|
8268
8158
|
logs.push(
|
|
8269
8159
|
[
|
|
@@ -8280,47 +8170,43 @@ function getSummary({ pluginManager, filesCreated, status, hrStart, config }) {
|
|
|
8280
8170
|
);
|
|
8281
8171
|
return logs;
|
|
8282
8172
|
}
|
|
8283
|
-
|
|
8284
|
-
// src/generate.ts
|
|
8285
|
-
var _cliprogress = require('cli-progress');
|
|
8286
|
-
|
|
8287
8173
|
async function generate({ input, config, args }) {
|
|
8288
|
-
const logLevel =
|
|
8289
|
-
const logger =
|
|
8174
|
+
const logLevel = logger.LogMapper[args.logLevel] || 3;
|
|
8175
|
+
const logger$1 = logger.createLogger({
|
|
8290
8176
|
logLevel,
|
|
8291
8177
|
name: config.name
|
|
8292
8178
|
});
|
|
8293
8179
|
const { root = process.cwd(), ...userConfig } = config;
|
|
8294
|
-
const inputPath =
|
|
8295
|
-
if (logger.logLevel !==
|
|
8180
|
+
const inputPath = input ?? ("path" in userConfig.input ? userConfig.input.path : void 0);
|
|
8181
|
+
if (logger$1.logLevel !== logger.LogMapper.debug) {
|
|
8296
8182
|
const progressCache = /* @__PURE__ */ new Map();
|
|
8297
|
-
logger.on("progress_start", ({ id, size, message = "" }) => {
|
|
8298
|
-
|
|
8183
|
+
logger$1.on("progress_start", ({ id, size, message = "" }) => {
|
|
8184
|
+
logger$1.consola?.pauseLogs();
|
|
8299
8185
|
const payload = { id, message };
|
|
8300
|
-
const progressBar = new
|
|
8186
|
+
const progressBar = new cliProgress.SingleBar(
|
|
8301
8187
|
{
|
|
8302
8188
|
format: "{percentage}% {bar} {value}/{total} | {message}",
|
|
8303
8189
|
barsize: 30,
|
|
8304
8190
|
clearOnComplete: true,
|
|
8305
8191
|
emptyOnZero: true
|
|
8306
8192
|
},
|
|
8307
|
-
|
|
8193
|
+
cliProgress.Presets.shades_grey
|
|
8308
8194
|
);
|
|
8309
8195
|
if (!progressCache.has(id)) {
|
|
8310
8196
|
progressCache.set(id, progressBar);
|
|
8311
8197
|
progressBar.start(size, 1, payload);
|
|
8312
8198
|
}
|
|
8313
8199
|
});
|
|
8314
|
-
logger.on("progress_stop", ({ id }) => {
|
|
8315
|
-
|
|
8316
|
-
|
|
8200
|
+
logger$1.on("progress_stop", ({ id }) => {
|
|
8201
|
+
progressCache.get(id)?.stop();
|
|
8202
|
+
logger$1.consola?.resumeLogs();
|
|
8317
8203
|
});
|
|
8318
|
-
logger.on("progressed", ({ id, message = "" }) => {
|
|
8204
|
+
logger$1.on("progressed", ({ id, message = "" }) => {
|
|
8319
8205
|
const payload = { id, message };
|
|
8320
|
-
|
|
8206
|
+
progressCache.get(id)?.increment(1, payload);
|
|
8321
8207
|
});
|
|
8322
8208
|
}
|
|
8323
|
-
logger.emit("start", `Building ${logger.logLevel !==
|
|
8209
|
+
logger$1.emit("start", `Building ${logger$1.logLevel !== logger.LogMapper.silent ? p2.dim(inputPath) : ""}`);
|
|
8324
8210
|
const definedConfig = {
|
|
8325
8211
|
root,
|
|
8326
8212
|
...userConfig,
|
|
@@ -8335,15 +8221,15 @@ async function generate({ input, config, args }) {
|
|
|
8335
8221
|
}
|
|
8336
8222
|
};
|
|
8337
8223
|
const hrStart = process.hrtime();
|
|
8338
|
-
const { pluginManager, files, error } = await
|
|
8224
|
+
const { pluginManager, files, error } = await core.safeBuild({
|
|
8339
8225
|
config: definedConfig,
|
|
8340
|
-
logger
|
|
8226
|
+
logger: logger$1
|
|
8341
8227
|
});
|
|
8342
|
-
if (logger.logLevel ===
|
|
8343
|
-
|
|
8344
|
-
const logFiles = await logger.writeLogs();
|
|
8345
|
-
|
|
8346
|
-
${logFiles.join("\n")}`)
|
|
8228
|
+
if (logger$1.logLevel === logger.LogMapper.debug) {
|
|
8229
|
+
logger$1.consola?.start("Writing logs");
|
|
8230
|
+
const logFiles = await logger$1.writeLogs();
|
|
8231
|
+
logger$1.consola?.success(`Written logs:
|
|
8232
|
+
${logFiles.join("\n")}`);
|
|
8347
8233
|
}
|
|
8348
8234
|
const summary = getSummary({
|
|
8349
8235
|
filesCreated: files.length,
|
|
@@ -8352,10 +8238,10 @@ ${logFiles.join("\n")}`)]);
|
|
|
8352
8238
|
status: error ? "failed" : "success",
|
|
8353
8239
|
hrStart
|
|
8354
8240
|
});
|
|
8355
|
-
if (error && logger.consola) {
|
|
8356
|
-
|
|
8357
|
-
logger.consola.error(`Build failed ${logger.logLevel !==
|
|
8358
|
-
logger.consola.box({
|
|
8241
|
+
if (error && logger$1.consola) {
|
|
8242
|
+
logger$1.consola?.resumeLogs();
|
|
8243
|
+
logger$1.consola.error(`Build failed ${logger$1.logLevel !== logger.LogMapper.silent ? p2.dim(inputPath) : ""}`);
|
|
8244
|
+
logger$1.consola.box({
|
|
8359
8245
|
title: `${config.name || ""}`,
|
|
8360
8246
|
message: summary.join(""),
|
|
8361
8247
|
style: {
|
|
@@ -8365,19 +8251,19 @@ ${logFiles.join("\n")}`)]);
|
|
|
8365
8251
|
}
|
|
8366
8252
|
});
|
|
8367
8253
|
const errors = getErrorCauses([error]);
|
|
8368
|
-
if (logger.consola && errors.length && logger.logLevel ===
|
|
8254
|
+
if (logger$1.consola && errors.length && logger$1.logLevel === logger.LogMapper.debug) {
|
|
8369
8255
|
errors.forEach((err) => {
|
|
8370
|
-
|
|
8256
|
+
logger$1.consola?.error(err);
|
|
8371
8257
|
});
|
|
8372
8258
|
}
|
|
8373
|
-
|
|
8259
|
+
logger$1.consola?.error(error);
|
|
8374
8260
|
process.exit(0);
|
|
8375
8261
|
}
|
|
8376
8262
|
if (config.hooks) {
|
|
8377
|
-
await executeHooks({ hooks: config.hooks, logger });
|
|
8263
|
+
await executeHooks({ hooks: config.hooks, logger: logger$1 });
|
|
8378
8264
|
}
|
|
8379
|
-
|
|
8380
|
-
|
|
8265
|
+
logger$1.consola?.log(`\u26A1Build completed ${logger$1.logLevel !== logger.LogMapper.silent ? p2.dim(inputPath) : ""}`);
|
|
8266
|
+
logger$1.consola?.box({
|
|
8381
8267
|
title: `${config.name || ""}`,
|
|
8382
8268
|
message: summary.join(""),
|
|
8383
8269
|
style: {
|
|
@@ -8385,13 +8271,12 @@ ${logFiles.join("\n")}`)]);
|
|
|
8385
8271
|
borderColor: "green",
|
|
8386
8272
|
borderStyle: "rounded"
|
|
8387
8273
|
}
|
|
8388
|
-
})
|
|
8274
|
+
});
|
|
8389
8275
|
}
|
|
8390
8276
|
|
|
8391
|
-
|
|
8392
|
-
|
|
8393
|
-
|
|
8394
|
-
|
|
8395
|
-
|
|
8396
|
-
|
|
8397
|
-
//# sourceMappingURL=chunk-JSNVO6QV.cjs.map
|
|
8277
|
+
exports.execa = execa;
|
|
8278
|
+
exports.generate = generate;
|
|
8279
|
+
exports.init_cjs_shims = init_cjs_shims;
|
|
8280
|
+
exports.p = p2;
|
|
8281
|
+
//# sourceMappingURL=chunk-IO6NJ3A2.cjs.map
|
|
8282
|
+
//# sourceMappingURL=chunk-IO6NJ3A2.cjs.map
|