@simon_he/pi 0.0.90 → 0.0.92
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/index.cjs +659 -155
- package/dist/index.js +676 -172
- package/package.json +6 -6
package/dist/index.js
CHANGED
|
@@ -62,12 +62,12 @@ var __privateWrapper = (obj, member, setter, getter) => ({
|
|
|
62
62
|
}
|
|
63
63
|
});
|
|
64
64
|
|
|
65
|
-
// node_modules
|
|
65
|
+
// node_modules/picocolors/picocolors.js
|
|
66
66
|
var require_picocolors = __commonJS({
|
|
67
|
-
"node_modules
|
|
67
|
+
"node_modules/picocolors/picocolors.js"(exports, module) {
|
|
68
68
|
var argv = process.argv || [];
|
|
69
|
-
var
|
|
70
|
-
var isColorSupported = !("NO_COLOR" in
|
|
69
|
+
var env3 = process.env;
|
|
70
|
+
var isColorSupported = !("NO_COLOR" in env3 || argv.includes("--no-color")) && ("FORCE_COLOR" in env3 || argv.includes("--color") || process.platform === "win32" || __require != null && __require("tty").isatty(1) && env3.TERM !== "dumb" || "CI" in env3);
|
|
71
71
|
var formatter = (open, close, replace = open) => (input) => {
|
|
72
72
|
let string = "" + input;
|
|
73
73
|
let index = string.indexOf(close, open.length);
|
|
@@ -111,7 +111,23 @@ var require_picocolors = __commonJS({
|
|
|
111
111
|
bgBlue: init("\x1B[44m", "\x1B[49m"),
|
|
112
112
|
bgMagenta: init("\x1B[45m", "\x1B[49m"),
|
|
113
113
|
bgCyan: init("\x1B[46m", "\x1B[49m"),
|
|
114
|
-
bgWhite: init("\x1B[47m", "\x1B[49m")
|
|
114
|
+
bgWhite: init("\x1B[47m", "\x1B[49m"),
|
|
115
|
+
blackBright: init("\x1B[90m", "\x1B[39m"),
|
|
116
|
+
redBright: init("\x1B[91m", "\x1B[39m"),
|
|
117
|
+
greenBright: init("\x1B[92m", "\x1B[39m"),
|
|
118
|
+
yellowBright: init("\x1B[93m", "\x1B[39m"),
|
|
119
|
+
blueBright: init("\x1B[94m", "\x1B[39m"),
|
|
120
|
+
magentaBright: init("\x1B[95m", "\x1B[39m"),
|
|
121
|
+
cyanBright: init("\x1B[96m", "\x1B[39m"),
|
|
122
|
+
whiteBright: init("\x1B[97m", "\x1B[39m"),
|
|
123
|
+
bgBlackBright: init("\x1B[100m", "\x1B[49m"),
|
|
124
|
+
bgRedBright: init("\x1B[101m", "\x1B[49m"),
|
|
125
|
+
bgGreenBright: init("\x1B[102m", "\x1B[49m"),
|
|
126
|
+
bgYellowBright: init("\x1B[103m", "\x1B[49m"),
|
|
127
|
+
bgBlueBright: init("\x1B[104m", "\x1B[49m"),
|
|
128
|
+
bgMagentaBright: init("\x1B[105m", "\x1B[49m"),
|
|
129
|
+
bgCyanBright: init("\x1B[106m", "\x1B[49m"),
|
|
130
|
+
bgWhiteBright: init("\x1B[107m", "\x1B[49m")
|
|
115
131
|
};
|
|
116
132
|
};
|
|
117
133
|
module.exports = createColors();
|
|
@@ -119,9 +135,9 @@ var require_picocolors = __commonJS({
|
|
|
119
135
|
}
|
|
120
136
|
});
|
|
121
137
|
|
|
122
|
-
// node_modules
|
|
138
|
+
// node_modules/restore-cursor/node_modules/onetime/node_modules/mimic-fn/index.js
|
|
123
139
|
var require_mimic_fn = __commonJS({
|
|
124
|
-
"node_modules
|
|
140
|
+
"node_modules/restore-cursor/node_modules/onetime/node_modules/mimic-fn/index.js"(exports, module) {
|
|
125
141
|
"use strict";
|
|
126
142
|
var mimicFn = (to, from) => {
|
|
127
143
|
for (const prop of Reflect.ownKeys(from)) {
|
|
@@ -134,9 +150,9 @@ var require_mimic_fn = __commonJS({
|
|
|
134
150
|
}
|
|
135
151
|
});
|
|
136
152
|
|
|
137
|
-
// node_modules
|
|
153
|
+
// node_modules/restore-cursor/node_modules/onetime/index.js
|
|
138
154
|
var require_onetime = __commonJS({
|
|
139
|
-
"node_modules
|
|
155
|
+
"node_modules/restore-cursor/node_modules/onetime/index.js"(exports, module) {
|
|
140
156
|
"use strict";
|
|
141
157
|
var mimicFn = require_mimic_fn();
|
|
142
158
|
var calledFunctions = /* @__PURE__ */ new WeakMap();
|
|
@@ -172,9 +188,9 @@ var require_onetime = __commonJS({
|
|
|
172
188
|
}
|
|
173
189
|
});
|
|
174
190
|
|
|
175
|
-
// node_modules
|
|
191
|
+
// node_modules/signal-exit/signals.js
|
|
176
192
|
var require_signals = __commonJS({
|
|
177
|
-
"node_modules
|
|
193
|
+
"node_modules/signal-exit/signals.js"(exports, module) {
|
|
178
194
|
module.exports = [
|
|
179
195
|
"SIGABRT",
|
|
180
196
|
"SIGALRM",
|
|
@@ -209,14 +225,14 @@ var require_signals = __commonJS({
|
|
|
209
225
|
}
|
|
210
226
|
});
|
|
211
227
|
|
|
212
|
-
// node_modules
|
|
228
|
+
// node_modules/signal-exit/index.js
|
|
213
229
|
var require_signal_exit = __commonJS({
|
|
214
|
-
"node_modules
|
|
215
|
-
var
|
|
216
|
-
var processOk = function(
|
|
217
|
-
return
|
|
230
|
+
"node_modules/signal-exit/index.js"(exports, module) {
|
|
231
|
+
var process13 = global.process;
|
|
232
|
+
var processOk = function(process14) {
|
|
233
|
+
return process14 && typeof process14 === "object" && typeof process14.removeListener === "function" && typeof process14.emit === "function" && typeof process14.reallyExit === "function" && typeof process14.listeners === "function" && typeof process14.kill === "function" && typeof process14.pid === "number" && typeof process14.on === "function";
|
|
218
234
|
};
|
|
219
|
-
if (!processOk(
|
|
235
|
+
if (!processOk(process13)) {
|
|
220
236
|
module.exports = function() {
|
|
221
237
|
return function() {
|
|
222
238
|
};
|
|
@@ -224,15 +240,15 @@ var require_signal_exit = __commonJS({
|
|
|
224
240
|
} else {
|
|
225
241
|
assert = __require("assert");
|
|
226
242
|
signals = require_signals();
|
|
227
|
-
isWin2 = /^win/i.test(
|
|
243
|
+
isWin2 = /^win/i.test(process13.platform);
|
|
228
244
|
EE = __require("events");
|
|
229
245
|
if (typeof EE !== "function") {
|
|
230
246
|
EE = EE.EventEmitter;
|
|
231
247
|
}
|
|
232
|
-
if (
|
|
233
|
-
emitter =
|
|
248
|
+
if (process13.__signal_exit_emitter__) {
|
|
249
|
+
emitter = process13.__signal_exit_emitter__;
|
|
234
250
|
} else {
|
|
235
|
-
emitter =
|
|
251
|
+
emitter = process13.__signal_exit_emitter__ = new EE();
|
|
236
252
|
emitter.count = 0;
|
|
237
253
|
emitter.emitted = {};
|
|
238
254
|
}
|
|
@@ -269,12 +285,12 @@ var require_signal_exit = __commonJS({
|
|
|
269
285
|
loaded = false;
|
|
270
286
|
signals.forEach(function(sig) {
|
|
271
287
|
try {
|
|
272
|
-
|
|
288
|
+
process13.removeListener(sig, sigListeners[sig]);
|
|
273
289
|
} catch (er) {
|
|
274
290
|
}
|
|
275
291
|
});
|
|
276
|
-
|
|
277
|
-
|
|
292
|
+
process13.emit = originalProcessEmit;
|
|
293
|
+
process13.reallyExit = originalProcessReallyExit;
|
|
278
294
|
emitter.count -= 1;
|
|
279
295
|
};
|
|
280
296
|
module.exports.unload = unload;
|
|
@@ -291,7 +307,7 @@ var require_signal_exit = __commonJS({
|
|
|
291
307
|
if (!processOk(global.process)) {
|
|
292
308
|
return;
|
|
293
309
|
}
|
|
294
|
-
var listeners =
|
|
310
|
+
var listeners = process13.listeners(sig);
|
|
295
311
|
if (listeners.length === emitter.count) {
|
|
296
312
|
unload();
|
|
297
313
|
emit("exit", null, sig);
|
|
@@ -299,7 +315,7 @@ var require_signal_exit = __commonJS({
|
|
|
299
315
|
if (isWin2 && sig === "SIGHUP") {
|
|
300
316
|
sig = "SIGINT";
|
|
301
317
|
}
|
|
302
|
-
|
|
318
|
+
process13.kill(process13.pid, sig);
|
|
303
319
|
}
|
|
304
320
|
};
|
|
305
321
|
});
|
|
@@ -315,36 +331,36 @@ var require_signal_exit = __commonJS({
|
|
|
315
331
|
emitter.count += 1;
|
|
316
332
|
signals = signals.filter(function(sig) {
|
|
317
333
|
try {
|
|
318
|
-
|
|
334
|
+
process13.on(sig, sigListeners[sig]);
|
|
319
335
|
return true;
|
|
320
336
|
} catch (er) {
|
|
321
337
|
return false;
|
|
322
338
|
}
|
|
323
339
|
});
|
|
324
|
-
|
|
325
|
-
|
|
340
|
+
process13.emit = processEmit;
|
|
341
|
+
process13.reallyExit = processReallyExit;
|
|
326
342
|
};
|
|
327
343
|
module.exports.load = load;
|
|
328
|
-
originalProcessReallyExit =
|
|
344
|
+
originalProcessReallyExit = process13.reallyExit;
|
|
329
345
|
processReallyExit = function processReallyExit2(code) {
|
|
330
346
|
if (!processOk(global.process)) {
|
|
331
347
|
return;
|
|
332
348
|
}
|
|
333
|
-
|
|
349
|
+
process13.exitCode = code || /* istanbul ignore next */
|
|
334
350
|
0;
|
|
335
|
-
emit("exit",
|
|
336
|
-
emit("afterexit",
|
|
337
|
-
originalProcessReallyExit.call(
|
|
351
|
+
emit("exit", process13.exitCode, null);
|
|
352
|
+
emit("afterexit", process13.exitCode, null);
|
|
353
|
+
originalProcessReallyExit.call(process13, process13.exitCode);
|
|
338
354
|
};
|
|
339
|
-
originalProcessEmit =
|
|
355
|
+
originalProcessEmit = process13.emit;
|
|
340
356
|
processEmit = function processEmit2(ev, arg) {
|
|
341
357
|
if (ev === "exit" && processOk(global.process)) {
|
|
342
358
|
if (arg !== void 0) {
|
|
343
|
-
|
|
359
|
+
process13.exitCode = arg;
|
|
344
360
|
}
|
|
345
361
|
var ret = originalProcessEmit.apply(this, arguments);
|
|
346
|
-
emit("exit",
|
|
347
|
-
emit("afterexit",
|
|
362
|
+
emit("exit", process13.exitCode, null);
|
|
363
|
+
emit("afterexit", process13.exitCode, null);
|
|
348
364
|
return ret;
|
|
349
365
|
} else {
|
|
350
366
|
return originalProcessEmit.apply(this, arguments);
|
|
@@ -368,9 +384,9 @@ var require_signal_exit = __commonJS({
|
|
|
368
384
|
}
|
|
369
385
|
});
|
|
370
386
|
|
|
371
|
-
// node_modules
|
|
387
|
+
// node_modules/cli-spinners/spinners.json
|
|
372
388
|
var require_spinners = __commonJS({
|
|
373
|
-
"node_modules
|
|
389
|
+
"node_modules/cli-spinners/spinners.json"(exports, module) {
|
|
374
390
|
module.exports = {
|
|
375
391
|
dots: {
|
|
376
392
|
interval: 80,
|
|
@@ -1996,9 +2012,9 @@ var require_spinners = __commonJS({
|
|
|
1996
2012
|
}
|
|
1997
2013
|
});
|
|
1998
2014
|
|
|
1999
|
-
// node_modules
|
|
2015
|
+
// node_modules/cli-spinners/index.js
|
|
2000
2016
|
var require_cli_spinners = __commonJS({
|
|
2001
|
-
"node_modules
|
|
2017
|
+
"node_modules/cli-spinners/index.js"(exports, module) {
|
|
2002
2018
|
"use strict";
|
|
2003
2019
|
var spinners = Object.assign({}, require_spinners());
|
|
2004
2020
|
var spinnersList = Object.keys(spinners);
|
|
@@ -2013,9 +2029,9 @@ var require_cli_spinners = __commonJS({
|
|
|
2013
2029
|
}
|
|
2014
2030
|
});
|
|
2015
2031
|
|
|
2016
|
-
// node_modules
|
|
2032
|
+
// node_modules/clone/clone.js
|
|
2017
2033
|
var require_clone = __commonJS({
|
|
2018
|
-
"node_modules
|
|
2034
|
+
"node_modules/clone/clone.js"(exports, module) {
|
|
2019
2035
|
var clone = function() {
|
|
2020
2036
|
"use strict";
|
|
2021
2037
|
function clone2(parent, circular, depth, prototype) {
|
|
@@ -2039,7 +2055,7 @@ var require_clone = __commonJS({
|
|
|
2039
2055
|
if (depth2 == 0)
|
|
2040
2056
|
return parent2;
|
|
2041
2057
|
var child;
|
|
2042
|
-
var
|
|
2058
|
+
var proto3;
|
|
2043
2059
|
if (typeof parent2 != "object") {
|
|
2044
2060
|
return parent2;
|
|
2045
2061
|
}
|
|
@@ -2061,11 +2077,11 @@ var require_clone = __commonJS({
|
|
|
2061
2077
|
return child;
|
|
2062
2078
|
} else {
|
|
2063
2079
|
if (typeof prototype == "undefined") {
|
|
2064
|
-
|
|
2065
|
-
child = Object.create(
|
|
2080
|
+
proto3 = Object.getPrototypeOf(parent2);
|
|
2081
|
+
child = Object.create(proto3);
|
|
2066
2082
|
} else {
|
|
2067
2083
|
child = Object.create(prototype);
|
|
2068
|
-
|
|
2084
|
+
proto3 = prototype;
|
|
2069
2085
|
}
|
|
2070
2086
|
}
|
|
2071
2087
|
if (circular) {
|
|
@@ -2078,8 +2094,8 @@ var require_clone = __commonJS({
|
|
|
2078
2094
|
}
|
|
2079
2095
|
for (var i in parent2) {
|
|
2080
2096
|
var attrs;
|
|
2081
|
-
if (
|
|
2082
|
-
attrs = Object.getOwnPropertyDescriptor(
|
|
2097
|
+
if (proto3) {
|
|
2098
|
+
attrs = Object.getOwnPropertyDescriptor(proto3, i);
|
|
2083
2099
|
}
|
|
2084
2100
|
if (attrs && attrs.set == null) {
|
|
2085
2101
|
continue;
|
|
@@ -2138,9 +2154,9 @@ var require_clone = __commonJS({
|
|
|
2138
2154
|
}
|
|
2139
2155
|
});
|
|
2140
2156
|
|
|
2141
|
-
// node_modules
|
|
2157
|
+
// node_modules/defaults/index.js
|
|
2142
2158
|
var require_defaults = __commonJS({
|
|
2143
|
-
"node_modules
|
|
2159
|
+
"node_modules/defaults/index.js"(exports, module) {
|
|
2144
2160
|
var clone = require_clone();
|
|
2145
2161
|
module.exports = function(options, defaults) {
|
|
2146
2162
|
options = options || {};
|
|
@@ -2154,9 +2170,9 @@ var require_defaults = __commonJS({
|
|
|
2154
2170
|
}
|
|
2155
2171
|
});
|
|
2156
2172
|
|
|
2157
|
-
// node_modules
|
|
2173
|
+
// node_modules/wcwidth/combining.js
|
|
2158
2174
|
var require_combining = __commonJS({
|
|
2159
|
-
"node_modules
|
|
2175
|
+
"node_modules/wcwidth/combining.js"(exports, module) {
|
|
2160
2176
|
module.exports = [
|
|
2161
2177
|
[768, 879],
|
|
2162
2178
|
[1155, 1158],
|
|
@@ -2304,9 +2320,9 @@ var require_combining = __commonJS({
|
|
|
2304
2320
|
}
|
|
2305
2321
|
});
|
|
2306
2322
|
|
|
2307
|
-
// node_modules
|
|
2323
|
+
// node_modules/wcwidth/index.js
|
|
2308
2324
|
var require_wcwidth = __commonJS({
|
|
2309
|
-
"node_modules
|
|
2325
|
+
"node_modules/wcwidth/index.js"(exports, module) {
|
|
2310
2326
|
"use strict";
|
|
2311
2327
|
var defaults = require_defaults();
|
|
2312
2328
|
var combining = require_combining();
|
|
@@ -2371,16 +2387,16 @@ var require_wcwidth = __commonJS({
|
|
|
2371
2387
|
}
|
|
2372
2388
|
});
|
|
2373
2389
|
|
|
2374
|
-
// node_modules
|
|
2390
|
+
// node_modules/readable-stream/lib/internal/streams/stream.js
|
|
2375
2391
|
var require_stream = __commonJS({
|
|
2376
|
-
"node_modules
|
|
2392
|
+
"node_modules/readable-stream/lib/internal/streams/stream.js"(exports, module) {
|
|
2377
2393
|
module.exports = __require("stream");
|
|
2378
2394
|
}
|
|
2379
2395
|
});
|
|
2380
2396
|
|
|
2381
|
-
// node_modules
|
|
2397
|
+
// node_modules/readable-stream/lib/internal/streams/buffer_list.js
|
|
2382
2398
|
var require_buffer_list = __commonJS({
|
|
2383
|
-
"node_modules
|
|
2399
|
+
"node_modules/readable-stream/lib/internal/streams/buffer_list.js"(exports, module) {
|
|
2384
2400
|
"use strict";
|
|
2385
2401
|
function ownKeys(object, enumerableOnly) {
|
|
2386
2402
|
var keys = Object.keys(object);
|
|
@@ -2640,9 +2656,9 @@ var require_buffer_list = __commonJS({
|
|
|
2640
2656
|
}
|
|
2641
2657
|
});
|
|
2642
2658
|
|
|
2643
|
-
// node_modules
|
|
2659
|
+
// node_modules/readable-stream/lib/internal/streams/destroy.js
|
|
2644
2660
|
var require_destroy = __commonJS({
|
|
2645
|
-
"node_modules
|
|
2661
|
+
"node_modules/readable-stream/lib/internal/streams/destroy.js"(exports, module) {
|
|
2646
2662
|
"use strict";
|
|
2647
2663
|
function destroy(err, cb) {
|
|
2648
2664
|
var _this = this;
|
|
@@ -2733,9 +2749,9 @@ var require_destroy = __commonJS({
|
|
|
2733
2749
|
}
|
|
2734
2750
|
});
|
|
2735
2751
|
|
|
2736
|
-
// node_modules
|
|
2752
|
+
// node_modules/readable-stream/errors.js
|
|
2737
2753
|
var require_errors = __commonJS({
|
|
2738
|
-
"node_modules
|
|
2754
|
+
"node_modules/readable-stream/errors.js"(exports, module) {
|
|
2739
2755
|
"use strict";
|
|
2740
2756
|
var codes = {};
|
|
2741
2757
|
function createErrorType(code, message, Base) {
|
|
@@ -2833,9 +2849,9 @@ var require_errors = __commonJS({
|
|
|
2833
2849
|
}
|
|
2834
2850
|
});
|
|
2835
2851
|
|
|
2836
|
-
// node_modules
|
|
2852
|
+
// node_modules/readable-stream/lib/internal/streams/state.js
|
|
2837
2853
|
var require_state = __commonJS({
|
|
2838
|
-
"node_modules
|
|
2854
|
+
"node_modules/readable-stream/lib/internal/streams/state.js"(exports, module) {
|
|
2839
2855
|
"use strict";
|
|
2840
2856
|
var ERR_INVALID_OPT_VALUE = require_errors().codes.ERR_INVALID_OPT_VALUE;
|
|
2841
2857
|
function highWaterMarkFrom(options, isDuplex, duplexKey) {
|
|
@@ -2858,9 +2874,9 @@ var require_state = __commonJS({
|
|
|
2858
2874
|
}
|
|
2859
2875
|
});
|
|
2860
2876
|
|
|
2861
|
-
// node_modules
|
|
2877
|
+
// node_modules/inherits/inherits_browser.js
|
|
2862
2878
|
var require_inherits_browser = __commonJS({
|
|
2863
|
-
"node_modules
|
|
2879
|
+
"node_modules/inherits/inherits_browser.js"(exports, module) {
|
|
2864
2880
|
if (typeof Object.create === "function") {
|
|
2865
2881
|
module.exports = function inherits(ctor, superCtor) {
|
|
2866
2882
|
if (superCtor) {
|
|
@@ -2890,9 +2906,9 @@ var require_inherits_browser = __commonJS({
|
|
|
2890
2906
|
}
|
|
2891
2907
|
});
|
|
2892
2908
|
|
|
2893
|
-
// node_modules
|
|
2909
|
+
// node_modules/inherits/inherits.js
|
|
2894
2910
|
var require_inherits = __commonJS({
|
|
2895
|
-
"node_modules
|
|
2911
|
+
"node_modules/inherits/inherits.js"(exports, module) {
|
|
2896
2912
|
try {
|
|
2897
2913
|
util = __require("util");
|
|
2898
2914
|
if (typeof util.inherits !== "function")
|
|
@@ -2905,16 +2921,16 @@ var require_inherits = __commonJS({
|
|
|
2905
2921
|
}
|
|
2906
2922
|
});
|
|
2907
2923
|
|
|
2908
|
-
// node_modules
|
|
2924
|
+
// node_modules/util-deprecate/node.js
|
|
2909
2925
|
var require_node = __commonJS({
|
|
2910
|
-
"node_modules
|
|
2926
|
+
"node_modules/util-deprecate/node.js"(exports, module) {
|
|
2911
2927
|
module.exports = __require("util").deprecate;
|
|
2912
2928
|
}
|
|
2913
2929
|
});
|
|
2914
2930
|
|
|
2915
|
-
// node_modules
|
|
2931
|
+
// node_modules/readable-stream/lib/_stream_writable.js
|
|
2916
2932
|
var require_stream_writable = __commonJS({
|
|
2917
|
-
"node_modules
|
|
2933
|
+
"node_modules/readable-stream/lib/_stream_writable.js"(exports, module) {
|
|
2918
2934
|
"use strict";
|
|
2919
2935
|
module.exports = Writable;
|
|
2920
2936
|
function CorkedRequest(state) {
|
|
@@ -3412,9 +3428,9 @@ var require_stream_writable = __commonJS({
|
|
|
3412
3428
|
}
|
|
3413
3429
|
});
|
|
3414
3430
|
|
|
3415
|
-
// node_modules
|
|
3431
|
+
// node_modules/readable-stream/lib/_stream_duplex.js
|
|
3416
3432
|
var require_stream_duplex = __commonJS({
|
|
3417
|
-
"node_modules
|
|
3433
|
+
"node_modules/readable-stream/lib/_stream_duplex.js"(exports, module) {
|
|
3418
3434
|
"use strict";
|
|
3419
3435
|
var objectKeys = Object.keys || function(obj) {
|
|
3420
3436
|
var keys2 = [];
|
|
@@ -3511,9 +3527,9 @@ var require_stream_duplex = __commonJS({
|
|
|
3511
3527
|
}
|
|
3512
3528
|
});
|
|
3513
3529
|
|
|
3514
|
-
// node_modules
|
|
3530
|
+
// node_modules/safe-buffer/index.js
|
|
3515
3531
|
var require_safe_buffer = __commonJS({
|
|
3516
|
-
"node_modules
|
|
3532
|
+
"node_modules/safe-buffer/index.js"(exports, module) {
|
|
3517
3533
|
var buffer = __require("buffer");
|
|
3518
3534
|
var Buffer2 = buffer.Buffer;
|
|
3519
3535
|
function copyProps(src, dst) {
|
|
@@ -3569,9 +3585,9 @@ var require_safe_buffer = __commonJS({
|
|
|
3569
3585
|
}
|
|
3570
3586
|
});
|
|
3571
3587
|
|
|
3572
|
-
// node_modules
|
|
3588
|
+
// node_modules/string_decoder/lib/string_decoder.js
|
|
3573
3589
|
var require_string_decoder = __commonJS({
|
|
3574
|
-
"node_modules
|
|
3590
|
+
"node_modules/string_decoder/lib/string_decoder.js"(exports) {
|
|
3575
3591
|
"use strict";
|
|
3576
3592
|
var Buffer2 = require_safe_buffer().Buffer;
|
|
3577
3593
|
var isEncoding = Buffer2.isEncoding || function(encoding) {
|
|
@@ -3829,9 +3845,9 @@ var require_string_decoder = __commonJS({
|
|
|
3829
3845
|
}
|
|
3830
3846
|
});
|
|
3831
3847
|
|
|
3832
|
-
// node_modules
|
|
3848
|
+
// node_modules/readable-stream/lib/internal/streams/end-of-stream.js
|
|
3833
3849
|
var require_end_of_stream = __commonJS({
|
|
3834
|
-
"node_modules
|
|
3850
|
+
"node_modules/readable-stream/lib/internal/streams/end-of-stream.js"(exports, module) {
|
|
3835
3851
|
"use strict";
|
|
3836
3852
|
var ERR_STREAM_PREMATURE_CLOSE = require_errors().codes.ERR_STREAM_PREMATURE_CLOSE;
|
|
3837
3853
|
function once(callback) {
|
|
@@ -3930,9 +3946,9 @@ var require_end_of_stream = __commonJS({
|
|
|
3930
3946
|
}
|
|
3931
3947
|
});
|
|
3932
3948
|
|
|
3933
|
-
// node_modules
|
|
3949
|
+
// node_modules/readable-stream/lib/internal/streams/async_iterator.js
|
|
3934
3950
|
var require_async_iterator = __commonJS({
|
|
3935
|
-
"node_modules
|
|
3951
|
+
"node_modules/readable-stream/lib/internal/streams/async_iterator.js"(exports, module) {
|
|
3936
3952
|
"use strict";
|
|
3937
3953
|
var _Object$setPrototypeO;
|
|
3938
3954
|
function _defineProperty(obj, key, value) {
|
|
@@ -4115,9 +4131,9 @@ var require_async_iterator = __commonJS({
|
|
|
4115
4131
|
}
|
|
4116
4132
|
});
|
|
4117
4133
|
|
|
4118
|
-
// node_modules
|
|
4134
|
+
// node_modules/readable-stream/lib/internal/streams/from.js
|
|
4119
4135
|
var require_from = __commonJS({
|
|
4120
|
-
"node_modules
|
|
4136
|
+
"node_modules/readable-stream/lib/internal/streams/from.js"(exports, module) {
|
|
4121
4137
|
"use strict";
|
|
4122
4138
|
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {
|
|
4123
4139
|
try {
|
|
@@ -4241,9 +4257,9 @@ var require_from = __commonJS({
|
|
|
4241
4257
|
}
|
|
4242
4258
|
});
|
|
4243
4259
|
|
|
4244
|
-
// node_modules
|
|
4260
|
+
// node_modules/readable-stream/lib/_stream_readable.js
|
|
4245
4261
|
var require_stream_readable = __commonJS({
|
|
4246
|
-
"node_modules
|
|
4262
|
+
"node_modules/readable-stream/lib/_stream_readable.js"(exports, module) {
|
|
4247
4263
|
"use strict";
|
|
4248
4264
|
module.exports = Readable;
|
|
4249
4265
|
var Duplex;
|
|
@@ -5037,9 +5053,9 @@ var require_stream_readable = __commonJS({
|
|
|
5037
5053
|
}
|
|
5038
5054
|
});
|
|
5039
5055
|
|
|
5040
|
-
// node_modules
|
|
5056
|
+
// node_modules/readable-stream/lib/_stream_transform.js
|
|
5041
5057
|
var require_stream_transform = __commonJS({
|
|
5042
|
-
"node_modules
|
|
5058
|
+
"node_modules/readable-stream/lib/_stream_transform.js"(exports, module) {
|
|
5043
5059
|
"use strict";
|
|
5044
5060
|
module.exports = Transform;
|
|
5045
5061
|
var _require$codes = require_errors().codes;
|
|
@@ -5145,9 +5161,9 @@ var require_stream_transform = __commonJS({
|
|
|
5145
5161
|
}
|
|
5146
5162
|
});
|
|
5147
5163
|
|
|
5148
|
-
// node_modules
|
|
5164
|
+
// node_modules/readable-stream/lib/_stream_passthrough.js
|
|
5149
5165
|
var require_stream_passthrough = __commonJS({
|
|
5150
|
-
"node_modules
|
|
5166
|
+
"node_modules/readable-stream/lib/_stream_passthrough.js"(exports, module) {
|
|
5151
5167
|
"use strict";
|
|
5152
5168
|
module.exports = PassThrough;
|
|
5153
5169
|
var Transform = require_stream_transform();
|
|
@@ -5163,9 +5179,9 @@ var require_stream_passthrough = __commonJS({
|
|
|
5163
5179
|
}
|
|
5164
5180
|
});
|
|
5165
5181
|
|
|
5166
|
-
// node_modules
|
|
5182
|
+
// node_modules/readable-stream/lib/internal/streams/pipeline.js
|
|
5167
5183
|
var require_pipeline = __commonJS({
|
|
5168
|
-
"node_modules
|
|
5184
|
+
"node_modules/readable-stream/lib/internal/streams/pipeline.js"(exports, module) {
|
|
5169
5185
|
"use strict";
|
|
5170
5186
|
var eos;
|
|
5171
5187
|
function once(callback) {
|
|
@@ -5262,9 +5278,9 @@ var require_pipeline = __commonJS({
|
|
|
5262
5278
|
}
|
|
5263
5279
|
});
|
|
5264
5280
|
|
|
5265
|
-
// node_modules
|
|
5281
|
+
// node_modules/readable-stream/readable.js
|
|
5266
5282
|
var require_readable = __commonJS({
|
|
5267
|
-
"node_modules
|
|
5283
|
+
"node_modules/readable-stream/readable.js"(exports, module) {
|
|
5268
5284
|
var Stream = __require("stream");
|
|
5269
5285
|
if (process.env.READABLE_STREAM === "disable" && Stream) {
|
|
5270
5286
|
module.exports = Stream.Readable;
|
|
@@ -5284,9 +5300,9 @@ var require_readable = __commonJS({
|
|
|
5284
5300
|
}
|
|
5285
5301
|
});
|
|
5286
5302
|
|
|
5287
|
-
// node_modules
|
|
5303
|
+
// node_modules/bl/BufferList.js
|
|
5288
5304
|
var require_BufferList = __commonJS({
|
|
5289
|
-
"node_modules
|
|
5305
|
+
"node_modules/bl/BufferList.js"(exports, module) {
|
|
5290
5306
|
"use strict";
|
|
5291
5307
|
var { Buffer: Buffer2 } = __require("buffer");
|
|
5292
5308
|
var symbol = Symbol.for("BufferList");
|
|
@@ -5588,9 +5604,9 @@ var require_BufferList = __commonJS({
|
|
|
5588
5604
|
}
|
|
5589
5605
|
});
|
|
5590
5606
|
|
|
5591
|
-
// node_modules
|
|
5607
|
+
// node_modules/bl/bl.js
|
|
5592
5608
|
var require_bl = __commonJS({
|
|
5593
|
-
"node_modules
|
|
5609
|
+
"node_modules/bl/bl.js"(exports, module) {
|
|
5594
5610
|
"use strict";
|
|
5595
5611
|
var DuplexStream = require_readable().Duplex;
|
|
5596
5612
|
var inherits = require_inherits();
|
|
@@ -5661,7 +5677,7 @@ var require_bl = __commonJS({
|
|
|
5661
5677
|
|
|
5662
5678
|
// src/index.ts
|
|
5663
5679
|
var import_picocolors8 = __toESM(require_picocolors(), 1);
|
|
5664
|
-
import
|
|
5680
|
+
import process12 from "process";
|
|
5665
5681
|
import {
|
|
5666
5682
|
hasPkg,
|
|
5667
5683
|
isGo,
|
|
@@ -5678,10 +5694,10 @@ import { ccommand as ccommand3 } from "ccommand";
|
|
|
5678
5694
|
import path from "path";
|
|
5679
5695
|
import { getPkg, getPkgTool, isFile, jsShell } from "lazy-js-utils";
|
|
5680
5696
|
|
|
5681
|
-
// node_modules
|
|
5682
|
-
import
|
|
5697
|
+
// node_modules/ora/index.js
|
|
5698
|
+
import process8 from "process";
|
|
5683
5699
|
|
|
5684
|
-
// node_modules
|
|
5700
|
+
// node_modules/ora/node_modules/chalk/source/vendor/ansi-styles/index.js
|
|
5685
5701
|
var ANSI_BACKGROUND_OFFSET = 10;
|
|
5686
5702
|
var wrapAnsi16 = (offset = 0) => (code) => `\x1B[${code + offset}m`;
|
|
5687
5703
|
var wrapAnsi256 = (offset = 0) => (code) => `\x1B[${38 + offset};5;${code}m`;
|
|
@@ -5867,7 +5883,7 @@ function assembleStyles() {
|
|
|
5867
5883
|
var ansiStyles = assembleStyles();
|
|
5868
5884
|
var ansi_styles_default = ansiStyles;
|
|
5869
5885
|
|
|
5870
|
-
// node_modules
|
|
5886
|
+
// node_modules/ora/node_modules/chalk/source/vendor/supports-color/index.js
|
|
5871
5887
|
import process2 from "process";
|
|
5872
5888
|
import os from "os";
|
|
5873
5889
|
import tty from "tty";
|
|
@@ -5993,7 +6009,7 @@ var supportsColor = {
|
|
|
5993
6009
|
};
|
|
5994
6010
|
var supports_color_default = supportsColor;
|
|
5995
6011
|
|
|
5996
|
-
// node_modules
|
|
6012
|
+
// node_modules/ora/node_modules/chalk/source/utilities.js
|
|
5997
6013
|
function stringReplaceAll(string, substring, replacer) {
|
|
5998
6014
|
let index = string.indexOf(substring);
|
|
5999
6015
|
if (index === -1) {
|
|
@@ -6023,7 +6039,7 @@ function stringEncaseCRLFWithFirstIndex(string, prefix, postfix, index) {
|
|
|
6023
6039
|
return returnValue;
|
|
6024
6040
|
}
|
|
6025
6041
|
|
|
6026
|
-
// node_modules
|
|
6042
|
+
// node_modules/ora/node_modules/chalk/source/index.js
|
|
6027
6043
|
var { stdout: stdoutColor, stderr: stderrColor } = supports_color_default;
|
|
6028
6044
|
var GENERATOR = Symbol("GENERATOR");
|
|
6029
6045
|
var STYLER = Symbol("STYLER");
|
|
@@ -6043,10 +6059,10 @@ var applyOptions = (object, options = {}) => {
|
|
|
6043
6059
|
object.level = options.level === void 0 ? colorLevel : options.level;
|
|
6044
6060
|
};
|
|
6045
6061
|
var chalkFactory = (options) => {
|
|
6046
|
-
const
|
|
6047
|
-
applyOptions(
|
|
6048
|
-
Object.setPrototypeOf(
|
|
6049
|
-
return
|
|
6062
|
+
const chalk3 = (...strings) => strings.join(" ");
|
|
6063
|
+
applyOptions(chalk3, options);
|
|
6064
|
+
Object.setPrototypeOf(chalk3, createChalk.prototype);
|
|
6065
|
+
return chalk3;
|
|
6050
6066
|
};
|
|
6051
6067
|
function createChalk(options) {
|
|
6052
6068
|
return chalkFactory(options);
|
|
@@ -6170,10 +6186,10 @@ var chalk = createChalk();
|
|
|
6170
6186
|
var chalkStderr = createChalk({ level: stderrColor ? stderrColor.level : 0 });
|
|
6171
6187
|
var source_default = chalk;
|
|
6172
6188
|
|
|
6173
|
-
// node_modules
|
|
6189
|
+
// node_modules/cli-cursor/index.js
|
|
6174
6190
|
import process4 from "process";
|
|
6175
6191
|
|
|
6176
|
-
// node_modules
|
|
6192
|
+
// node_modules/restore-cursor/index.js
|
|
6177
6193
|
var import_onetime = __toESM(require_onetime(), 1);
|
|
6178
6194
|
var import_signal_exit = __toESM(require_signal_exit(), 1);
|
|
6179
6195
|
import process3 from "process";
|
|
@@ -6184,7 +6200,7 @@ var restoreCursor = (0, import_onetime.default)(() => {
|
|
|
6184
6200
|
});
|
|
6185
6201
|
var restore_cursor_default = restoreCursor;
|
|
6186
6202
|
|
|
6187
|
-
// node_modules
|
|
6203
|
+
// node_modules/cli-cursor/index.js
|
|
6188
6204
|
var isHidden = false;
|
|
6189
6205
|
var cliCursor = {};
|
|
6190
6206
|
cliCursor.show = (writableStream = process4.stderr) => {
|
|
@@ -6214,44 +6230,534 @@ cliCursor.toggle = (force, writableStream) => {
|
|
|
6214
6230
|
};
|
|
6215
6231
|
var cli_cursor_default = cliCursor;
|
|
6216
6232
|
|
|
6217
|
-
// node_modules
|
|
6233
|
+
// node_modules/ora/index.js
|
|
6218
6234
|
var import_cli_spinners = __toESM(require_cli_spinners(), 1);
|
|
6219
6235
|
|
|
6220
|
-
// node_modules
|
|
6236
|
+
// node_modules/log-symbols/node_modules/chalk/source/vendor/ansi-styles/index.js
|
|
6237
|
+
var ANSI_BACKGROUND_OFFSET2 = 10;
|
|
6238
|
+
var wrapAnsi162 = (offset = 0) => (code) => `\x1B[${code + offset}m`;
|
|
6239
|
+
var wrapAnsi2562 = (offset = 0) => (code) => `\x1B[${38 + offset};5;${code}m`;
|
|
6240
|
+
var wrapAnsi16m2 = (offset = 0) => (red, green, blue) => `\x1B[${38 + offset};2;${red};${green};${blue}m`;
|
|
6241
|
+
var styles3 = {
|
|
6242
|
+
modifier: {
|
|
6243
|
+
reset: [0, 0],
|
|
6244
|
+
// 21 isn't widely supported and 22 does the same thing
|
|
6245
|
+
bold: [1, 22],
|
|
6246
|
+
dim: [2, 22],
|
|
6247
|
+
italic: [3, 23],
|
|
6248
|
+
underline: [4, 24],
|
|
6249
|
+
overline: [53, 55],
|
|
6250
|
+
inverse: [7, 27],
|
|
6251
|
+
hidden: [8, 28],
|
|
6252
|
+
strikethrough: [9, 29]
|
|
6253
|
+
},
|
|
6254
|
+
color: {
|
|
6255
|
+
black: [30, 39],
|
|
6256
|
+
red: [31, 39],
|
|
6257
|
+
green: [32, 39],
|
|
6258
|
+
yellow: [33, 39],
|
|
6259
|
+
blue: [34, 39],
|
|
6260
|
+
magenta: [35, 39],
|
|
6261
|
+
cyan: [36, 39],
|
|
6262
|
+
white: [37, 39],
|
|
6263
|
+
// Bright color
|
|
6264
|
+
blackBright: [90, 39],
|
|
6265
|
+
gray: [90, 39],
|
|
6266
|
+
// Alias of `blackBright`
|
|
6267
|
+
grey: [90, 39],
|
|
6268
|
+
// Alias of `blackBright`
|
|
6269
|
+
redBright: [91, 39],
|
|
6270
|
+
greenBright: [92, 39],
|
|
6271
|
+
yellowBright: [93, 39],
|
|
6272
|
+
blueBright: [94, 39],
|
|
6273
|
+
magentaBright: [95, 39],
|
|
6274
|
+
cyanBright: [96, 39],
|
|
6275
|
+
whiteBright: [97, 39]
|
|
6276
|
+
},
|
|
6277
|
+
bgColor: {
|
|
6278
|
+
bgBlack: [40, 49],
|
|
6279
|
+
bgRed: [41, 49],
|
|
6280
|
+
bgGreen: [42, 49],
|
|
6281
|
+
bgYellow: [43, 49],
|
|
6282
|
+
bgBlue: [44, 49],
|
|
6283
|
+
bgMagenta: [45, 49],
|
|
6284
|
+
bgCyan: [46, 49],
|
|
6285
|
+
bgWhite: [47, 49],
|
|
6286
|
+
// Bright color
|
|
6287
|
+
bgBlackBright: [100, 49],
|
|
6288
|
+
bgGray: [100, 49],
|
|
6289
|
+
// Alias of `bgBlackBright`
|
|
6290
|
+
bgGrey: [100, 49],
|
|
6291
|
+
// Alias of `bgBlackBright`
|
|
6292
|
+
bgRedBright: [101, 49],
|
|
6293
|
+
bgGreenBright: [102, 49],
|
|
6294
|
+
bgYellowBright: [103, 49],
|
|
6295
|
+
bgBlueBright: [104, 49],
|
|
6296
|
+
bgMagentaBright: [105, 49],
|
|
6297
|
+
bgCyanBright: [106, 49],
|
|
6298
|
+
bgWhiteBright: [107, 49]
|
|
6299
|
+
}
|
|
6300
|
+
};
|
|
6301
|
+
var modifierNames2 = Object.keys(styles3.modifier);
|
|
6302
|
+
var foregroundColorNames2 = Object.keys(styles3.color);
|
|
6303
|
+
var backgroundColorNames2 = Object.keys(styles3.bgColor);
|
|
6304
|
+
var colorNames2 = [...foregroundColorNames2, ...backgroundColorNames2];
|
|
6305
|
+
function assembleStyles2() {
|
|
6306
|
+
const codes = /* @__PURE__ */ new Map();
|
|
6307
|
+
for (const [groupName, group] of Object.entries(styles3)) {
|
|
6308
|
+
for (const [styleName, style] of Object.entries(group)) {
|
|
6309
|
+
styles3[styleName] = {
|
|
6310
|
+
open: `\x1B[${style[0]}m`,
|
|
6311
|
+
close: `\x1B[${style[1]}m`
|
|
6312
|
+
};
|
|
6313
|
+
group[styleName] = styles3[styleName];
|
|
6314
|
+
codes.set(style[0], style[1]);
|
|
6315
|
+
}
|
|
6316
|
+
Object.defineProperty(styles3, groupName, {
|
|
6317
|
+
value: group,
|
|
6318
|
+
enumerable: false
|
|
6319
|
+
});
|
|
6320
|
+
}
|
|
6321
|
+
Object.defineProperty(styles3, "codes", {
|
|
6322
|
+
value: codes,
|
|
6323
|
+
enumerable: false
|
|
6324
|
+
});
|
|
6325
|
+
styles3.color.close = "\x1B[39m";
|
|
6326
|
+
styles3.bgColor.close = "\x1B[49m";
|
|
6327
|
+
styles3.color.ansi = wrapAnsi162();
|
|
6328
|
+
styles3.color.ansi256 = wrapAnsi2562();
|
|
6329
|
+
styles3.color.ansi16m = wrapAnsi16m2();
|
|
6330
|
+
styles3.bgColor.ansi = wrapAnsi162(ANSI_BACKGROUND_OFFSET2);
|
|
6331
|
+
styles3.bgColor.ansi256 = wrapAnsi2562(ANSI_BACKGROUND_OFFSET2);
|
|
6332
|
+
styles3.bgColor.ansi16m = wrapAnsi16m2(ANSI_BACKGROUND_OFFSET2);
|
|
6333
|
+
Object.defineProperties(styles3, {
|
|
6334
|
+
rgbToAnsi256: {
|
|
6335
|
+
value(red, green, blue) {
|
|
6336
|
+
if (red === green && green === blue) {
|
|
6337
|
+
if (red < 8) {
|
|
6338
|
+
return 16;
|
|
6339
|
+
}
|
|
6340
|
+
if (red > 248) {
|
|
6341
|
+
return 231;
|
|
6342
|
+
}
|
|
6343
|
+
return Math.round((red - 8) / 247 * 24) + 232;
|
|
6344
|
+
}
|
|
6345
|
+
return 16 + 36 * Math.round(red / 255 * 5) + 6 * Math.round(green / 255 * 5) + Math.round(blue / 255 * 5);
|
|
6346
|
+
},
|
|
6347
|
+
enumerable: false
|
|
6348
|
+
},
|
|
6349
|
+
hexToRgb: {
|
|
6350
|
+
value(hex) {
|
|
6351
|
+
const matches = /[a-f\d]{6}|[a-f\d]{3}/i.exec(hex.toString(16));
|
|
6352
|
+
if (!matches) {
|
|
6353
|
+
return [0, 0, 0];
|
|
6354
|
+
}
|
|
6355
|
+
let [colorString] = matches;
|
|
6356
|
+
if (colorString.length === 3) {
|
|
6357
|
+
colorString = [...colorString].map((character) => character + character).join("");
|
|
6358
|
+
}
|
|
6359
|
+
const integer = Number.parseInt(colorString, 16);
|
|
6360
|
+
return [
|
|
6361
|
+
/* eslint-disable no-bitwise */
|
|
6362
|
+
integer >> 16 & 255,
|
|
6363
|
+
integer >> 8 & 255,
|
|
6364
|
+
integer & 255
|
|
6365
|
+
/* eslint-enable no-bitwise */
|
|
6366
|
+
];
|
|
6367
|
+
},
|
|
6368
|
+
enumerable: false
|
|
6369
|
+
},
|
|
6370
|
+
hexToAnsi256: {
|
|
6371
|
+
value: (hex) => styles3.rgbToAnsi256(...styles3.hexToRgb(hex)),
|
|
6372
|
+
enumerable: false
|
|
6373
|
+
},
|
|
6374
|
+
ansi256ToAnsi: {
|
|
6375
|
+
value(code) {
|
|
6376
|
+
if (code < 8) {
|
|
6377
|
+
return 30 + code;
|
|
6378
|
+
}
|
|
6379
|
+
if (code < 16) {
|
|
6380
|
+
return 90 + (code - 8);
|
|
6381
|
+
}
|
|
6382
|
+
let red;
|
|
6383
|
+
let green;
|
|
6384
|
+
let blue;
|
|
6385
|
+
if (code >= 232) {
|
|
6386
|
+
red = ((code - 232) * 10 + 8) / 255;
|
|
6387
|
+
green = red;
|
|
6388
|
+
blue = red;
|
|
6389
|
+
} else {
|
|
6390
|
+
code -= 16;
|
|
6391
|
+
const remainder = code % 36;
|
|
6392
|
+
red = Math.floor(code / 36) / 5;
|
|
6393
|
+
green = Math.floor(remainder / 6) / 5;
|
|
6394
|
+
blue = remainder % 6 / 5;
|
|
6395
|
+
}
|
|
6396
|
+
const value = Math.max(red, green, blue) * 2;
|
|
6397
|
+
if (value === 0) {
|
|
6398
|
+
return 30;
|
|
6399
|
+
}
|
|
6400
|
+
let result = 30 + (Math.round(blue) << 2 | Math.round(green) << 1 | Math.round(red));
|
|
6401
|
+
if (value === 2) {
|
|
6402
|
+
result += 60;
|
|
6403
|
+
}
|
|
6404
|
+
return result;
|
|
6405
|
+
},
|
|
6406
|
+
enumerable: false
|
|
6407
|
+
},
|
|
6408
|
+
rgbToAnsi: {
|
|
6409
|
+
value: (red, green, blue) => styles3.ansi256ToAnsi(styles3.rgbToAnsi256(red, green, blue)),
|
|
6410
|
+
enumerable: false
|
|
6411
|
+
},
|
|
6412
|
+
hexToAnsi: {
|
|
6413
|
+
value: (hex) => styles3.ansi256ToAnsi(styles3.hexToAnsi256(hex)),
|
|
6414
|
+
enumerable: false
|
|
6415
|
+
}
|
|
6416
|
+
});
|
|
6417
|
+
return styles3;
|
|
6418
|
+
}
|
|
6419
|
+
var ansiStyles2 = assembleStyles2();
|
|
6420
|
+
var ansi_styles_default2 = ansiStyles2;
|
|
6421
|
+
|
|
6422
|
+
// node_modules/log-symbols/node_modules/chalk/source/vendor/supports-color/index.js
|
|
6221
6423
|
import process5 from "process";
|
|
6424
|
+
import os2 from "os";
|
|
6425
|
+
import tty2 from "tty";
|
|
6426
|
+
function hasFlag2(flag, argv = globalThis.Deno ? globalThis.Deno.args : process5.argv) {
|
|
6427
|
+
const prefix = flag.startsWith("-") ? "" : flag.length === 1 ? "-" : "--";
|
|
6428
|
+
const position = argv.indexOf(prefix + flag);
|
|
6429
|
+
const terminatorPosition = argv.indexOf("--");
|
|
6430
|
+
return position !== -1 && (terminatorPosition === -1 || position < terminatorPosition);
|
|
6431
|
+
}
|
|
6432
|
+
var { env: env2 } = process5;
|
|
6433
|
+
var flagForceColor2;
|
|
6434
|
+
if (hasFlag2("no-color") || hasFlag2("no-colors") || hasFlag2("color=false") || hasFlag2("color=never")) {
|
|
6435
|
+
flagForceColor2 = 0;
|
|
6436
|
+
} else if (hasFlag2("color") || hasFlag2("colors") || hasFlag2("color=true") || hasFlag2("color=always")) {
|
|
6437
|
+
flagForceColor2 = 1;
|
|
6438
|
+
}
|
|
6439
|
+
function envForceColor2() {
|
|
6440
|
+
if ("FORCE_COLOR" in env2) {
|
|
6441
|
+
if (env2.FORCE_COLOR === "true") {
|
|
6442
|
+
return 1;
|
|
6443
|
+
}
|
|
6444
|
+
if (env2.FORCE_COLOR === "false") {
|
|
6445
|
+
return 0;
|
|
6446
|
+
}
|
|
6447
|
+
return env2.FORCE_COLOR.length === 0 ? 1 : Math.min(Number.parseInt(env2.FORCE_COLOR, 10), 3);
|
|
6448
|
+
}
|
|
6449
|
+
}
|
|
6450
|
+
function translateLevel2(level) {
|
|
6451
|
+
if (level === 0) {
|
|
6452
|
+
return false;
|
|
6453
|
+
}
|
|
6454
|
+
return {
|
|
6455
|
+
level,
|
|
6456
|
+
hasBasic: true,
|
|
6457
|
+
has256: level >= 2,
|
|
6458
|
+
has16m: level >= 3
|
|
6459
|
+
};
|
|
6460
|
+
}
|
|
6461
|
+
function _supportsColor2(haveStream, { streamIsTTY, sniffFlags = true } = {}) {
|
|
6462
|
+
const noFlagForceColor = envForceColor2();
|
|
6463
|
+
if (noFlagForceColor !== void 0) {
|
|
6464
|
+
flagForceColor2 = noFlagForceColor;
|
|
6465
|
+
}
|
|
6466
|
+
const forceColor = sniffFlags ? flagForceColor2 : noFlagForceColor;
|
|
6467
|
+
if (forceColor === 0) {
|
|
6468
|
+
return 0;
|
|
6469
|
+
}
|
|
6470
|
+
if (sniffFlags) {
|
|
6471
|
+
if (hasFlag2("color=16m") || hasFlag2("color=full") || hasFlag2("color=truecolor")) {
|
|
6472
|
+
return 3;
|
|
6473
|
+
}
|
|
6474
|
+
if (hasFlag2("color=256")) {
|
|
6475
|
+
return 2;
|
|
6476
|
+
}
|
|
6477
|
+
}
|
|
6478
|
+
if ("TF_BUILD" in env2 && "AGENT_NAME" in env2) {
|
|
6479
|
+
return 1;
|
|
6480
|
+
}
|
|
6481
|
+
if (haveStream && !streamIsTTY && forceColor === void 0) {
|
|
6482
|
+
return 0;
|
|
6483
|
+
}
|
|
6484
|
+
const min = forceColor || 0;
|
|
6485
|
+
if (env2.TERM === "dumb") {
|
|
6486
|
+
return min;
|
|
6487
|
+
}
|
|
6488
|
+
if (process5.platform === "win32") {
|
|
6489
|
+
const osRelease = os2.release().split(".");
|
|
6490
|
+
if (Number(osRelease[0]) >= 10 && Number(osRelease[2]) >= 10586) {
|
|
6491
|
+
return Number(osRelease[2]) >= 14931 ? 3 : 2;
|
|
6492
|
+
}
|
|
6493
|
+
return 1;
|
|
6494
|
+
}
|
|
6495
|
+
if ("CI" in env2) {
|
|
6496
|
+
if ("GITHUB_ACTIONS" in env2 || "GITEA_ACTIONS" in env2) {
|
|
6497
|
+
return 3;
|
|
6498
|
+
}
|
|
6499
|
+
if (["TRAVIS", "CIRCLECI", "APPVEYOR", "GITLAB_CI", "BUILDKITE", "DRONE"].some((sign) => sign in env2) || env2.CI_NAME === "codeship") {
|
|
6500
|
+
return 1;
|
|
6501
|
+
}
|
|
6502
|
+
return min;
|
|
6503
|
+
}
|
|
6504
|
+
if ("TEAMCITY_VERSION" in env2) {
|
|
6505
|
+
return /^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(env2.TEAMCITY_VERSION) ? 1 : 0;
|
|
6506
|
+
}
|
|
6507
|
+
if (env2.COLORTERM === "truecolor") {
|
|
6508
|
+
return 3;
|
|
6509
|
+
}
|
|
6510
|
+
if (env2.TERM === "xterm-kitty") {
|
|
6511
|
+
return 3;
|
|
6512
|
+
}
|
|
6513
|
+
if ("TERM_PROGRAM" in env2) {
|
|
6514
|
+
const version2 = Number.parseInt((env2.TERM_PROGRAM_VERSION || "").split(".")[0], 10);
|
|
6515
|
+
switch (env2.TERM_PROGRAM) {
|
|
6516
|
+
case "iTerm.app": {
|
|
6517
|
+
return version2 >= 3 ? 3 : 2;
|
|
6518
|
+
}
|
|
6519
|
+
case "Apple_Terminal": {
|
|
6520
|
+
return 2;
|
|
6521
|
+
}
|
|
6522
|
+
}
|
|
6523
|
+
}
|
|
6524
|
+
if (/-256(color)?$/i.test(env2.TERM)) {
|
|
6525
|
+
return 2;
|
|
6526
|
+
}
|
|
6527
|
+
if (/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(env2.TERM)) {
|
|
6528
|
+
return 1;
|
|
6529
|
+
}
|
|
6530
|
+
if ("COLORTERM" in env2) {
|
|
6531
|
+
return 1;
|
|
6532
|
+
}
|
|
6533
|
+
return min;
|
|
6534
|
+
}
|
|
6535
|
+
function createSupportsColor2(stream, options = {}) {
|
|
6536
|
+
const level = _supportsColor2(stream, {
|
|
6537
|
+
streamIsTTY: stream && stream.isTTY,
|
|
6538
|
+
...options
|
|
6539
|
+
});
|
|
6540
|
+
return translateLevel2(level);
|
|
6541
|
+
}
|
|
6542
|
+
var supportsColor2 = {
|
|
6543
|
+
stdout: createSupportsColor2({ isTTY: tty2.isatty(1) }),
|
|
6544
|
+
stderr: createSupportsColor2({ isTTY: tty2.isatty(2) })
|
|
6545
|
+
};
|
|
6546
|
+
var supports_color_default2 = supportsColor2;
|
|
6547
|
+
|
|
6548
|
+
// node_modules/log-symbols/node_modules/chalk/source/utilities.js
|
|
6549
|
+
function stringReplaceAll2(string, substring, replacer) {
|
|
6550
|
+
let index = string.indexOf(substring);
|
|
6551
|
+
if (index === -1) {
|
|
6552
|
+
return string;
|
|
6553
|
+
}
|
|
6554
|
+
const substringLength = substring.length;
|
|
6555
|
+
let endIndex = 0;
|
|
6556
|
+
let returnValue = "";
|
|
6557
|
+
do {
|
|
6558
|
+
returnValue += string.slice(endIndex, index) + substring + replacer;
|
|
6559
|
+
endIndex = index + substringLength;
|
|
6560
|
+
index = string.indexOf(substring, endIndex);
|
|
6561
|
+
} while (index !== -1);
|
|
6562
|
+
returnValue += string.slice(endIndex);
|
|
6563
|
+
return returnValue;
|
|
6564
|
+
}
|
|
6565
|
+
function stringEncaseCRLFWithFirstIndex2(string, prefix, postfix, index) {
|
|
6566
|
+
let endIndex = 0;
|
|
6567
|
+
let returnValue = "";
|
|
6568
|
+
do {
|
|
6569
|
+
const gotCR = string[index - 1] === "\r";
|
|
6570
|
+
returnValue += string.slice(endIndex, gotCR ? index - 1 : index) + prefix + (gotCR ? "\r\n" : "\n") + postfix;
|
|
6571
|
+
endIndex = index + 1;
|
|
6572
|
+
index = string.indexOf("\n", endIndex);
|
|
6573
|
+
} while (index !== -1);
|
|
6574
|
+
returnValue += string.slice(endIndex);
|
|
6575
|
+
return returnValue;
|
|
6576
|
+
}
|
|
6577
|
+
|
|
6578
|
+
// node_modules/log-symbols/node_modules/chalk/source/index.js
|
|
6579
|
+
var { stdout: stdoutColor2, stderr: stderrColor2 } = supports_color_default2;
|
|
6580
|
+
var GENERATOR2 = Symbol("GENERATOR");
|
|
6581
|
+
var STYLER2 = Symbol("STYLER");
|
|
6582
|
+
var IS_EMPTY2 = Symbol("IS_EMPTY");
|
|
6583
|
+
var levelMapping2 = [
|
|
6584
|
+
"ansi",
|
|
6585
|
+
"ansi",
|
|
6586
|
+
"ansi256",
|
|
6587
|
+
"ansi16m"
|
|
6588
|
+
];
|
|
6589
|
+
var styles4 = /* @__PURE__ */ Object.create(null);
|
|
6590
|
+
var applyOptions2 = (object, options = {}) => {
|
|
6591
|
+
if (options.level && !(Number.isInteger(options.level) && options.level >= 0 && options.level <= 3)) {
|
|
6592
|
+
throw new Error("The `level` option should be an integer from 0 to 3");
|
|
6593
|
+
}
|
|
6594
|
+
const colorLevel = stdoutColor2 ? stdoutColor2.level : 0;
|
|
6595
|
+
object.level = options.level === void 0 ? colorLevel : options.level;
|
|
6596
|
+
};
|
|
6597
|
+
var chalkFactory2 = (options) => {
|
|
6598
|
+
const chalk3 = (...strings) => strings.join(" ");
|
|
6599
|
+
applyOptions2(chalk3, options);
|
|
6600
|
+
Object.setPrototypeOf(chalk3, createChalk2.prototype);
|
|
6601
|
+
return chalk3;
|
|
6602
|
+
};
|
|
6603
|
+
function createChalk2(options) {
|
|
6604
|
+
return chalkFactory2(options);
|
|
6605
|
+
}
|
|
6606
|
+
Object.setPrototypeOf(createChalk2.prototype, Function.prototype);
|
|
6607
|
+
for (const [styleName, style] of Object.entries(ansi_styles_default2)) {
|
|
6608
|
+
styles4[styleName] = {
|
|
6609
|
+
get() {
|
|
6610
|
+
const builder = createBuilder2(this, createStyler2(style.open, style.close, this[STYLER2]), this[IS_EMPTY2]);
|
|
6611
|
+
Object.defineProperty(this, styleName, { value: builder });
|
|
6612
|
+
return builder;
|
|
6613
|
+
}
|
|
6614
|
+
};
|
|
6615
|
+
}
|
|
6616
|
+
styles4.visible = {
|
|
6617
|
+
get() {
|
|
6618
|
+
const builder = createBuilder2(this, this[STYLER2], true);
|
|
6619
|
+
Object.defineProperty(this, "visible", { value: builder });
|
|
6620
|
+
return builder;
|
|
6621
|
+
}
|
|
6622
|
+
};
|
|
6623
|
+
var getModelAnsi2 = (model, level, type, ...arguments_) => {
|
|
6624
|
+
if (model === "rgb") {
|
|
6625
|
+
if (level === "ansi16m") {
|
|
6626
|
+
return ansi_styles_default2[type].ansi16m(...arguments_);
|
|
6627
|
+
}
|
|
6628
|
+
if (level === "ansi256") {
|
|
6629
|
+
return ansi_styles_default2[type].ansi256(ansi_styles_default2.rgbToAnsi256(...arguments_));
|
|
6630
|
+
}
|
|
6631
|
+
return ansi_styles_default2[type].ansi(ansi_styles_default2.rgbToAnsi(...arguments_));
|
|
6632
|
+
}
|
|
6633
|
+
if (model === "hex") {
|
|
6634
|
+
return getModelAnsi2("rgb", level, type, ...ansi_styles_default2.hexToRgb(...arguments_));
|
|
6635
|
+
}
|
|
6636
|
+
return ansi_styles_default2[type][model](...arguments_);
|
|
6637
|
+
};
|
|
6638
|
+
var usedModels2 = ["rgb", "hex", "ansi256"];
|
|
6639
|
+
for (const model of usedModels2) {
|
|
6640
|
+
styles4[model] = {
|
|
6641
|
+
get() {
|
|
6642
|
+
const { level } = this;
|
|
6643
|
+
return function(...arguments_) {
|
|
6644
|
+
const styler = createStyler2(getModelAnsi2(model, levelMapping2[level], "color", ...arguments_), ansi_styles_default2.color.close, this[STYLER2]);
|
|
6645
|
+
return createBuilder2(this, styler, this[IS_EMPTY2]);
|
|
6646
|
+
};
|
|
6647
|
+
}
|
|
6648
|
+
};
|
|
6649
|
+
const bgModel = "bg" + model[0].toUpperCase() + model.slice(1);
|
|
6650
|
+
styles4[bgModel] = {
|
|
6651
|
+
get() {
|
|
6652
|
+
const { level } = this;
|
|
6653
|
+
return function(...arguments_) {
|
|
6654
|
+
const styler = createStyler2(getModelAnsi2(model, levelMapping2[level], "bgColor", ...arguments_), ansi_styles_default2.bgColor.close, this[STYLER2]);
|
|
6655
|
+
return createBuilder2(this, styler, this[IS_EMPTY2]);
|
|
6656
|
+
};
|
|
6657
|
+
}
|
|
6658
|
+
};
|
|
6659
|
+
}
|
|
6660
|
+
var proto2 = Object.defineProperties(() => {
|
|
6661
|
+
}, {
|
|
6662
|
+
...styles4,
|
|
6663
|
+
level: {
|
|
6664
|
+
enumerable: true,
|
|
6665
|
+
get() {
|
|
6666
|
+
return this[GENERATOR2].level;
|
|
6667
|
+
},
|
|
6668
|
+
set(level) {
|
|
6669
|
+
this[GENERATOR2].level = level;
|
|
6670
|
+
}
|
|
6671
|
+
}
|
|
6672
|
+
});
|
|
6673
|
+
var createStyler2 = (open, close, parent) => {
|
|
6674
|
+
let openAll;
|
|
6675
|
+
let closeAll;
|
|
6676
|
+
if (parent === void 0) {
|
|
6677
|
+
openAll = open;
|
|
6678
|
+
closeAll = close;
|
|
6679
|
+
} else {
|
|
6680
|
+
openAll = parent.openAll + open;
|
|
6681
|
+
closeAll = close + parent.closeAll;
|
|
6682
|
+
}
|
|
6683
|
+
return {
|
|
6684
|
+
open,
|
|
6685
|
+
close,
|
|
6686
|
+
openAll,
|
|
6687
|
+
closeAll,
|
|
6688
|
+
parent
|
|
6689
|
+
};
|
|
6690
|
+
};
|
|
6691
|
+
var createBuilder2 = (self2, _styler, _isEmpty) => {
|
|
6692
|
+
const builder = (...arguments_) => applyStyle2(builder, arguments_.length === 1 ? "" + arguments_[0] : arguments_.join(" "));
|
|
6693
|
+
Object.setPrototypeOf(builder, proto2);
|
|
6694
|
+
builder[GENERATOR2] = self2;
|
|
6695
|
+
builder[STYLER2] = _styler;
|
|
6696
|
+
builder[IS_EMPTY2] = _isEmpty;
|
|
6697
|
+
return builder;
|
|
6698
|
+
};
|
|
6699
|
+
var applyStyle2 = (self2, string) => {
|
|
6700
|
+
if (self2.level <= 0 || !string) {
|
|
6701
|
+
return self2[IS_EMPTY2] ? "" : string;
|
|
6702
|
+
}
|
|
6703
|
+
let styler = self2[STYLER2];
|
|
6704
|
+
if (styler === void 0) {
|
|
6705
|
+
return string;
|
|
6706
|
+
}
|
|
6707
|
+
const { openAll, closeAll } = styler;
|
|
6708
|
+
if (string.includes("\x1B")) {
|
|
6709
|
+
while (styler !== void 0) {
|
|
6710
|
+
string = stringReplaceAll2(string, styler.close, styler.open);
|
|
6711
|
+
styler = styler.parent;
|
|
6712
|
+
}
|
|
6713
|
+
}
|
|
6714
|
+
const lfIndex = string.indexOf("\n");
|
|
6715
|
+
if (lfIndex !== -1) {
|
|
6716
|
+
string = stringEncaseCRLFWithFirstIndex2(string, closeAll, openAll, lfIndex);
|
|
6717
|
+
}
|
|
6718
|
+
return openAll + string + closeAll;
|
|
6719
|
+
};
|
|
6720
|
+
Object.defineProperties(createChalk2.prototype, styles4);
|
|
6721
|
+
var chalk2 = createChalk2();
|
|
6722
|
+
var chalkStderr2 = createChalk2({ level: stderrColor2 ? stderrColor2.level : 0 });
|
|
6723
|
+
var source_default2 = chalk2;
|
|
6724
|
+
|
|
6725
|
+
// node_modules/is-unicode-supported/index.js
|
|
6726
|
+
import process6 from "process";
|
|
6222
6727
|
function isUnicodeSupported() {
|
|
6223
|
-
if (
|
|
6224
|
-
return
|
|
6728
|
+
if (process6.platform !== "win32") {
|
|
6729
|
+
return process6.env.TERM !== "linux";
|
|
6225
6730
|
}
|
|
6226
|
-
return Boolean(
|
|
6731
|
+
return Boolean(process6.env.CI) || Boolean(process6.env.WT_SESSION) || Boolean(process6.env.TERMINUS_SUBLIME) || process6.env.ConEmuTask === "{cmd::Cmder}" || process6.env.TERM_PROGRAM === "Terminus-Sublime" || process6.env.TERM_PROGRAM === "vscode" || process6.env.TERM === "xterm-256color" || process6.env.TERM === "alacritty" || process6.env.TERMINAL_EMULATOR === "JetBrains-JediTerm";
|
|
6227
6732
|
}
|
|
6228
6733
|
|
|
6229
|
-
// node_modules
|
|
6734
|
+
// node_modules/log-symbols/index.js
|
|
6230
6735
|
var main = {
|
|
6231
|
-
info:
|
|
6232
|
-
success:
|
|
6233
|
-
warning:
|
|
6234
|
-
error:
|
|
6736
|
+
info: source_default2.blue("\u2139"),
|
|
6737
|
+
success: source_default2.green("\u2714"),
|
|
6738
|
+
warning: source_default2.yellow("\u26A0"),
|
|
6739
|
+
error: source_default2.red("\u2716")
|
|
6235
6740
|
};
|
|
6236
6741
|
var fallback = {
|
|
6237
|
-
info:
|
|
6238
|
-
success:
|
|
6239
|
-
warning:
|
|
6240
|
-
error:
|
|
6742
|
+
info: source_default2.blue("i"),
|
|
6743
|
+
success: source_default2.green("\u221A"),
|
|
6744
|
+
warning: source_default2.yellow("\u203C"),
|
|
6745
|
+
error: source_default2.red("\xD7")
|
|
6241
6746
|
};
|
|
6242
6747
|
var logSymbols = isUnicodeSupported() ? main : fallback;
|
|
6243
6748
|
var log_symbols_default = logSymbols;
|
|
6244
6749
|
|
|
6245
|
-
// node_modules
|
|
6750
|
+
// node_modules/ora/node_modules/strip-ansi/node_modules/ansi-regex/index.js
|
|
6246
6751
|
function ansiRegex({ onlyFirst = false } = {}) {
|
|
6752
|
+
const ST = "(?:\\u0007|\\u001B\\u005C|\\u009C)";
|
|
6247
6753
|
const pattern = [
|
|
6248
|
-
|
|
6249
|
-
"(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-
|
|
6754
|
+
`[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?${ST})`,
|
|
6755
|
+
"(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-nq-uy=><~]))"
|
|
6250
6756
|
].join("|");
|
|
6251
6757
|
return new RegExp(pattern, onlyFirst ? void 0 : "g");
|
|
6252
6758
|
}
|
|
6253
6759
|
|
|
6254
|
-
// node_modules
|
|
6760
|
+
// node_modules/ora/node_modules/strip-ansi/index.js
|
|
6255
6761
|
var regex = ansiRegex();
|
|
6256
6762
|
function stripAnsi(string) {
|
|
6257
6763
|
if (typeof string !== "string") {
|
|
@@ -6260,19 +6766,19 @@ function stripAnsi(string) {
|
|
|
6260
6766
|
return string.replace(regex, "");
|
|
6261
6767
|
}
|
|
6262
6768
|
|
|
6263
|
-
// node_modules
|
|
6769
|
+
// node_modules/ora/index.js
|
|
6264
6770
|
var import_wcwidth = __toESM(require_wcwidth(), 1);
|
|
6265
6771
|
|
|
6266
|
-
// node_modules
|
|
6772
|
+
// node_modules/is-interactive/index.js
|
|
6267
6773
|
function isInteractive({ stream = process.stdout } = {}) {
|
|
6268
6774
|
return Boolean(
|
|
6269
6775
|
stream && stream.isTTY && process.env.TERM !== "dumb" && !("CI" in process.env)
|
|
6270
6776
|
);
|
|
6271
6777
|
}
|
|
6272
6778
|
|
|
6273
|
-
// node_modules
|
|
6779
|
+
// node_modules/stdin-discarder/index.js
|
|
6274
6780
|
var import_bl = __toESM(require_bl(), 1);
|
|
6275
|
-
import
|
|
6781
|
+
import process7 from "process";
|
|
6276
6782
|
import readline from "readline";
|
|
6277
6783
|
var ASCII_ETX_CODE = 3;
|
|
6278
6784
|
var _requests, _mutedStream, _ourEmit, _rl;
|
|
@@ -6282,20 +6788,20 @@ var StdinDiscarder = class {
|
|
|
6282
6788
|
__privateAdd(this, _mutedStream, new import_bl.BufferListStream());
|
|
6283
6789
|
__privateAdd(this, _ourEmit, void 0);
|
|
6284
6790
|
__privateAdd(this, _rl, void 0);
|
|
6285
|
-
__privateGet(this, _mutedStream).pipe(
|
|
6791
|
+
__privateGet(this, _mutedStream).pipe(process7.stdout);
|
|
6286
6792
|
const self2 = this;
|
|
6287
6793
|
__privateSet(this, _ourEmit, function(event, data, ...arguments_) {
|
|
6288
|
-
const { stdin } =
|
|
6794
|
+
const { stdin } = process7;
|
|
6289
6795
|
if (__privateGet(self2, _requests) > 0 || stdin.emit === __privateGet(self2, _ourEmit)) {
|
|
6290
6796
|
if (event === "keypress") {
|
|
6291
6797
|
return;
|
|
6292
6798
|
}
|
|
6293
6799
|
if (event === "data" && data.includes(ASCII_ETX_CODE)) {
|
|
6294
|
-
|
|
6800
|
+
process7.emit("SIGINT");
|
|
6295
6801
|
}
|
|
6296
6802
|
Reflect.apply(__privateGet(self2, _ourEmit), this, [event, data, ...arguments_]);
|
|
6297
6803
|
} else {
|
|
6298
|
-
Reflect.apply(
|
|
6804
|
+
Reflect.apply(process7.stdin.emit, this, [event, data, ...arguments_]);
|
|
6299
6805
|
}
|
|
6300
6806
|
});
|
|
6301
6807
|
}
|
|
@@ -6316,24 +6822,24 @@ var StdinDiscarder = class {
|
|
|
6316
6822
|
}
|
|
6317
6823
|
// TODO: Use private methods when targeting Node.js 14.
|
|
6318
6824
|
_realStart() {
|
|
6319
|
-
if (
|
|
6825
|
+
if (process7.platform === "win32") {
|
|
6320
6826
|
return;
|
|
6321
6827
|
}
|
|
6322
6828
|
__privateSet(this, _rl, readline.createInterface({
|
|
6323
|
-
input:
|
|
6829
|
+
input: process7.stdin,
|
|
6324
6830
|
output: __privateGet(this, _mutedStream)
|
|
6325
6831
|
}));
|
|
6326
6832
|
__privateGet(this, _rl).on("SIGINT", () => {
|
|
6327
|
-
if (
|
|
6328
|
-
|
|
6833
|
+
if (process7.listenerCount("SIGINT") === 0) {
|
|
6834
|
+
process7.emit("SIGINT");
|
|
6329
6835
|
} else {
|
|
6330
6836
|
__privateGet(this, _rl).close();
|
|
6331
|
-
|
|
6837
|
+
process7.kill(process7.pid, "SIGINT");
|
|
6332
6838
|
}
|
|
6333
6839
|
});
|
|
6334
6840
|
}
|
|
6335
6841
|
_realStop() {
|
|
6336
|
-
if (
|
|
6842
|
+
if (process7.platform === "win32") {
|
|
6337
6843
|
return;
|
|
6338
6844
|
}
|
|
6339
6845
|
__privateGet(this, _rl).close();
|
|
@@ -6347,7 +6853,7 @@ _rl = new WeakMap();
|
|
|
6347
6853
|
var stdinDiscarder = new StdinDiscarder();
|
|
6348
6854
|
var stdin_discarder_default = stdinDiscarder;
|
|
6349
6855
|
|
|
6350
|
-
// node_modules
|
|
6856
|
+
// node_modules/ora/index.js
|
|
6351
6857
|
var import_cli_spinners2 = __toESM(require_cli_spinners(), 1);
|
|
6352
6858
|
var _linesToClear, _isDiscardingStdin, _lineCount, _frameIndex, _options, _spinner, _stream, _id, _initialInterval, _isEnabled, _isSilent, _indent, _text, _prefixText, _suffixText;
|
|
6353
6859
|
var Ora = class {
|
|
@@ -6375,7 +6881,7 @@ var Ora = class {
|
|
|
6375
6881
|
}
|
|
6376
6882
|
__privateSet(this, _options, {
|
|
6377
6883
|
color: "cyan",
|
|
6378
|
-
stream:
|
|
6884
|
+
stream: process8.stderr,
|
|
6379
6885
|
discardStdin: true,
|
|
6380
6886
|
hideCursor: true,
|
|
6381
6887
|
...options
|
|
@@ -6390,7 +6896,7 @@ var Ora = class {
|
|
|
6390
6896
|
this.prefixText = __privateGet(this, _options).prefixText;
|
|
6391
6897
|
this.suffixText = __privateGet(this, _options).suffixText;
|
|
6392
6898
|
this.indent = __privateGet(this, _options).indent;
|
|
6393
|
-
if (
|
|
6899
|
+
if (process8.env.NODE_ENV === "test") {
|
|
6394
6900
|
this._stream = __privateGet(this, _stream);
|
|
6395
6901
|
this._isEnabled = __privateGet(this, _isEnabled);
|
|
6396
6902
|
Object.defineProperty(this, "_linesToClear", {
|
|
@@ -6577,7 +7083,7 @@ var Ora = class {
|
|
|
6577
7083
|
if (__privateGet(this, _options).hideCursor) {
|
|
6578
7084
|
cli_cursor_default.hide(__privateGet(this, _stream));
|
|
6579
7085
|
}
|
|
6580
|
-
if (__privateGet(this, _options).discardStdin &&
|
|
7086
|
+
if (__privateGet(this, _options).discardStdin && process8.stdin.isTTY) {
|
|
6581
7087
|
__privateSet(this, _isDiscardingStdin, true);
|
|
6582
7088
|
stdin_discarder_default.start();
|
|
6583
7089
|
}
|
|
@@ -6596,7 +7102,7 @@ var Ora = class {
|
|
|
6596
7102
|
if (__privateGet(this, _options).hideCursor) {
|
|
6597
7103
|
cli_cursor_default.show(__privateGet(this, _stream));
|
|
6598
7104
|
}
|
|
6599
|
-
if (__privateGet(this, _options).discardStdin &&
|
|
7105
|
+
if (__privateGet(this, _options).discardStdin && process8.stdin.isTTY && __privateGet(this, _isDiscardingStdin)) {
|
|
6600
7106
|
stdin_discarder_default.stop();
|
|
6601
7107
|
__privateSet(this, _isDiscardingStdin, false);
|
|
6602
7108
|
}
|
|
@@ -6756,14 +7262,14 @@ function getLatestVersion(pkg, isZh6 = true) {
|
|
|
6756
7262
|
throw new Error(result);
|
|
6757
7263
|
}
|
|
6758
7264
|
}
|
|
6759
|
-
return `${data.join(" ")}${isZh6 ? " \u5B89\u88C5\u6210\u529F! \u{1F60A}" : "successfully! \u{1F60A}"}`;
|
|
7265
|
+
return `${data.join(" ")}${isZh6 ? " \u5B89\u88C5\u6210\u529F! \u{1F60A}" : " successfully! \u{1F60A}"}`;
|
|
6760
7266
|
}
|
|
6761
7267
|
|
|
6762
7268
|
// src/help.ts
|
|
6763
7269
|
import { jsShell as jsShell2 } from "lazy-js-utils";
|
|
6764
7270
|
|
|
6765
7271
|
// package.json
|
|
6766
|
-
var version = "0.0.
|
|
7272
|
+
var version = "0.0.92";
|
|
6767
7273
|
|
|
6768
7274
|
// src/help.ts
|
|
6769
7275
|
var isZh2 = process.env.PI_Lang === "zh";
|
|
@@ -6819,13 +7325,13 @@ async function installDeps() {
|
|
|
6819
7325
|
|
|
6820
7326
|
// src/pi.ts
|
|
6821
7327
|
var import_picocolors4 = __toESM(require_picocolors(), 1);
|
|
6822
|
-
import
|
|
7328
|
+
import process10 from "process";
|
|
6823
7329
|
import { log } from "console";
|
|
6824
7330
|
import { getPkgTool as getPkgTool2, jsShell as jsShell5, useNodeWorker } from "lazy-js-utils";
|
|
6825
7331
|
|
|
6826
7332
|
// src/detectNode.ts
|
|
6827
7333
|
var import_picocolors3 = __toESM(require_picocolors(), 1);
|
|
6828
|
-
import
|
|
7334
|
+
import process9 from "process";
|
|
6829
7335
|
import { getPkg as getPkg2, jsShell as jsShell4 } from "lazy-js-utils";
|
|
6830
7336
|
async function detectNode() {
|
|
6831
7337
|
var _a;
|
|
@@ -6833,13 +7339,13 @@ async function detectNode() {
|
|
|
6833
7339
|
try {
|
|
6834
7340
|
pkg = await getPkg2();
|
|
6835
7341
|
} catch (e) {
|
|
6836
|
-
const cwd =
|
|
7342
|
+
const cwd = process9.cwd();
|
|
6837
7343
|
console.log(import_picocolors3.default.red(`\u5F53\u524D\u76EE\u5F55: ${cwd} \u6CA1\u6709package.json\u6587\u4EF6`));
|
|
6838
|
-
|
|
7344
|
+
process9.exit(1);
|
|
6839
7345
|
}
|
|
6840
7346
|
if ((_a = pkg.engines) == null ? void 0 : _a.node) {
|
|
6841
7347
|
const isSafe = __require("semver").satisfies(
|
|
6842
|
-
|
|
7348
|
+
process9.version,
|
|
6843
7349
|
pkg.engines.node
|
|
6844
7350
|
);
|
|
6845
7351
|
if (!isSafe) {
|
|
@@ -6866,7 +7372,7 @@ no" | gum filter --placeholder=" \u5F53\u524Dnode\u7248\u672C\u4E0D\u6EE1\u8DB3
|
|
|
6866
7372
|
}
|
|
6867
7373
|
|
|
6868
7374
|
// src/pi.ts
|
|
6869
|
-
var isZh3 =
|
|
7375
|
+
var isZh3 = process10.env.PI_Lang === "zh";
|
|
6870
7376
|
async function pi(params, pkg, executor = "ni") {
|
|
6871
7377
|
var _a;
|
|
6872
7378
|
await detectNode();
|
|
@@ -6883,7 +7389,7 @@ async function pi(params, pkg, executor = "ni") {
|
|
|
6883
7389
|
const newParams = isLatest ? params : await getParams(params);
|
|
6884
7390
|
let stdio = "pipe";
|
|
6885
7391
|
let loading_status;
|
|
6886
|
-
const { PI_DEFAULT, PI_MaxSockets: sockets } =
|
|
7392
|
+
const { PI_DEFAULT, PI_MaxSockets: sockets } = process10.env;
|
|
6887
7393
|
const pkgTool = await getPkgTool2();
|
|
6888
7394
|
const maxSockets = sockets || 4;
|
|
6889
7395
|
const install = PI_DEFAULT === "yarn" || pkgTool === "yarn" ? newParams ? "add" : "" : "install";
|
|
@@ -6905,7 +7411,7 @@ async function pi(params, pkg, executor = "ni") {
|
|
|
6905
7411
|
stdio,
|
|
6906
7412
|
errorExit: false
|
|
6907
7413
|
});
|
|
6908
|
-
if (result.includes("pnpm versions with respective Node.js version support")) {
|
|
7414
|
+
if (result && result.includes("pnpm versions with respective Node.js version support")) {
|
|
6909
7415
|
log(result);
|
|
6910
7416
|
log(
|
|
6911
7417
|
import_picocolors4.default.yellow(
|
|
@@ -6945,7 +7451,7 @@ ${result}` : failMsg));
|
|
|
6945
7451
|
jsShell5(`pi ${dep}@latest`);
|
|
6946
7452
|
}
|
|
6947
7453
|
}
|
|
6948
|
-
|
|
7454
|
+
process10.exit();
|
|
6949
7455
|
}
|
|
6950
7456
|
|
|
6951
7457
|
// src/pa.ts
|
|
@@ -6983,7 +7489,6 @@ async function pil(params) {
|
|
|
6983
7489
|
)} | sed "s/,/\\n/g" | gum filter --no-limit --placeholder=" \u{1F914}${process.env.PI_Lang === "zh" ? "\u8BF7\u9009\u62E9\u4E00\u4E2A\u9700\u8981\u83B7\u53D6\u6700\u65B0\u7248\u672C\u7684\u4F9D\u8D56" : "Please select a dependency that needs to obtain the latest version."}"`,
|
|
6984
7490
|
"pipe"
|
|
6985
7491
|
);
|
|
6986
|
-
console.log({ choose, status });
|
|
6987
7492
|
if (status === 130) {
|
|
6988
7493
|
console.log(import_picocolors5.default.dim("\u5DF2\u53D6\u6D88"));
|
|
6989
7494
|
process.exit(0);
|
|
@@ -7001,7 +7506,6 @@ async function pil(params) {
|
|
|
7001
7506
|
let latestPkgname = params;
|
|
7002
7507
|
const reg = /\s(-[dDwW]+)/g;
|
|
7003
7508
|
const suffix = [];
|
|
7004
|
-
console.log({ params });
|
|
7005
7509
|
let command = latestPkgname = (await getParams(params)).replace(
|
|
7006
7510
|
reg,
|
|
7007
7511
|
(_, k) => {
|
|
@@ -7113,7 +7617,7 @@ ${result}` : failMsg));
|
|
|
7113
7617
|
|
|
7114
7618
|
// src/pio.ts
|
|
7115
7619
|
var import_picocolors7 = __toESM(require_picocolors(), 1);
|
|
7116
|
-
import
|
|
7620
|
+
import process11 from "process";
|
|
7117
7621
|
import { useNodeWorker as useNodeWorker3 } from "lazy-js-utils";
|
|
7118
7622
|
async function pio(params, pkg, executor = "ni") {
|
|
7119
7623
|
const successMsg = pkg ? `Installed ${pkg} successfully! \u{1F60A}` : "Updated dependency successfully! \u{1F60A}";
|
|
@@ -7131,11 +7635,11 @@ async function pio(params, pkg, executor = "ni") {
|
|
|
7131
7635
|
loading_status.fail(import_picocolors7.default.red(result ? `${result}
|
|
7132
7636
|
|
|
7133
7637
|
${failMsg}` : failMsg));
|
|
7134
|
-
|
|
7638
|
+
process11.exit();
|
|
7135
7639
|
}
|
|
7136
7640
|
|
|
7137
7641
|
// src/index.ts
|
|
7138
|
-
var rootPath =
|
|
7642
|
+
var rootPath = process12.cwd();
|
|
7139
7643
|
var runMap = {
|
|
7140
7644
|
pi,
|
|
7141
7645
|
pix,
|
|
@@ -7149,9 +7653,9 @@ var runMap = {
|
|
|
7149
7653
|
pfind,
|
|
7150
7654
|
pio
|
|
7151
7655
|
};
|
|
7152
|
-
var isZh5 =
|
|
7656
|
+
var isZh5 = process12.env.PI_Lang === "zh";
|
|
7153
7657
|
async function setup() {
|
|
7154
|
-
const cmd =
|
|
7658
|
+
const cmd = process12.argv[1];
|
|
7155
7659
|
let exec = "";
|
|
7156
7660
|
if (isWin()) {
|
|
7157
7661
|
const last = cmd.lastIndexOf("\\") + 1;
|
|
@@ -7160,7 +7664,7 @@ async function setup() {
|
|
|
7160
7664
|
const last = cmd.lastIndexOf("/") + 1;
|
|
7161
7665
|
exec = cmd.slice(last, cmd.length);
|
|
7162
7666
|
}
|
|
7163
|
-
const argv =
|
|
7667
|
+
const argv = process12.argv.slice(2);
|
|
7164
7668
|
help(argv);
|
|
7165
7669
|
const params = spaceFormat(argv.join(" ")).trim();
|
|
7166
7670
|
if (!hasPkg(rootPath)) {
|
|
@@ -7210,7 +7714,7 @@ async function setup() {
|
|
|
7210
7714
|
)
|
|
7211
7715
|
);
|
|
7212
7716
|
}
|
|
7213
|
-
|
|
7717
|
+
process12.exit();
|
|
7214
7718
|
}
|
|
7215
7719
|
if (isRust()) {
|
|
7216
7720
|
if (exec === "pi") {
|
|
@@ -7256,7 +7760,7 @@ async function setup() {
|
|
|
7256
7760
|
)
|
|
7257
7761
|
);
|
|
7258
7762
|
}
|
|
7259
|
-
|
|
7763
|
+
process12.exit();
|
|
7260
7764
|
}
|
|
7261
7765
|
if (!runMap[exec]) {
|
|
7262
7766
|
console.log(
|