@simon_he/pi 0.0.78 → 0.0.80
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 +91 -580
- package/dist/index.d.ts +3 -1
- package/dist/index.js +104 -593
- package/package.json +3 -3
package/dist/index.cjs
CHANGED
|
@@ -64,8 +64,8 @@ var __privateWrapper = (obj, member, setter, getter) => ({
|
|
|
64
64
|
// node_modules/.pnpm/picocolors@1.0.0/node_modules/picocolors/picocolors.js
|
|
65
65
|
var require_picocolors = __commonJS({
|
|
66
66
|
"node_modules/.pnpm/picocolors@1.0.0/node_modules/picocolors/picocolors.js"(exports, module2) {
|
|
67
|
-
var
|
|
68
|
-
var isColorSupported = !("NO_COLOR" in process.env || process.argv.includes("--no-color")) && ("FORCE_COLOR" in process.env || process.argv.includes("--color") || process.platform === "win32" ||
|
|
67
|
+
var tty2 = require("tty");
|
|
68
|
+
var isColorSupported = !("NO_COLOR" in process.env || process.argv.includes("--no-color")) && ("FORCE_COLOR" in process.env || process.argv.includes("--color") || process.platform === "win32" || tty2.isatty(1) && process.env.TERM !== "dumb" || "CI" in process.env);
|
|
69
69
|
var formatter = (open, close, replace = open) => (input) => {
|
|
70
70
|
let string = "" + input;
|
|
71
71
|
let index = string.indexOf(close, open.length);
|
|
@@ -203,11 +203,11 @@ var require_signals = __commonJS({
|
|
|
203
203
|
// node_modules/.pnpm/signal-exit@3.0.7/node_modules/signal-exit/index.js
|
|
204
204
|
var require_signal_exit = __commonJS({
|
|
205
205
|
"node_modules/.pnpm/signal-exit@3.0.7/node_modules/signal-exit/index.js"(exports, module2) {
|
|
206
|
-
var
|
|
207
|
-
var processOk = function(
|
|
208
|
-
return
|
|
206
|
+
var process11 = global.process;
|
|
207
|
+
var processOk = function(process12) {
|
|
208
|
+
return process12 && typeof process12 === "object" && typeof process12.removeListener === "function" && typeof process12.emit === "function" && typeof process12.reallyExit === "function" && typeof process12.listeners === "function" && typeof process12.kill === "function" && typeof process12.pid === "number" && typeof process12.on === "function";
|
|
209
209
|
};
|
|
210
|
-
if (!processOk(
|
|
210
|
+
if (!processOk(process11)) {
|
|
211
211
|
module2.exports = function() {
|
|
212
212
|
return function() {
|
|
213
213
|
};
|
|
@@ -215,15 +215,15 @@ var require_signal_exit = __commonJS({
|
|
|
215
215
|
} else {
|
|
216
216
|
assert = require("assert");
|
|
217
217
|
signals = require_signals();
|
|
218
|
-
isWin2 = /^win/i.test(
|
|
218
|
+
isWin2 = /^win/i.test(process11.platform);
|
|
219
219
|
EE = require("events");
|
|
220
220
|
if (typeof EE !== "function") {
|
|
221
221
|
EE = EE.EventEmitter;
|
|
222
222
|
}
|
|
223
|
-
if (
|
|
224
|
-
emitter =
|
|
223
|
+
if (process11.__signal_exit_emitter__) {
|
|
224
|
+
emitter = process11.__signal_exit_emitter__;
|
|
225
225
|
} else {
|
|
226
|
-
emitter =
|
|
226
|
+
emitter = process11.__signal_exit_emitter__ = new EE();
|
|
227
227
|
emitter.count = 0;
|
|
228
228
|
emitter.emitted = {};
|
|
229
229
|
}
|
|
@@ -260,12 +260,12 @@ var require_signal_exit = __commonJS({
|
|
|
260
260
|
loaded = false;
|
|
261
261
|
signals.forEach(function(sig) {
|
|
262
262
|
try {
|
|
263
|
-
|
|
263
|
+
process11.removeListener(sig, sigListeners[sig]);
|
|
264
264
|
} catch (er) {
|
|
265
265
|
}
|
|
266
266
|
});
|
|
267
|
-
|
|
268
|
-
|
|
267
|
+
process11.emit = originalProcessEmit;
|
|
268
|
+
process11.reallyExit = originalProcessReallyExit;
|
|
269
269
|
emitter.count -= 1;
|
|
270
270
|
};
|
|
271
271
|
module2.exports.unload = unload;
|
|
@@ -282,7 +282,7 @@ var require_signal_exit = __commonJS({
|
|
|
282
282
|
if (!processOk(global.process)) {
|
|
283
283
|
return;
|
|
284
284
|
}
|
|
285
|
-
var listeners =
|
|
285
|
+
var listeners = process11.listeners(sig);
|
|
286
286
|
if (listeners.length === emitter.count) {
|
|
287
287
|
unload();
|
|
288
288
|
emit("exit", null, sig);
|
|
@@ -290,7 +290,7 @@ var require_signal_exit = __commonJS({
|
|
|
290
290
|
if (isWin2 && sig === "SIGHUP") {
|
|
291
291
|
sig = "SIGINT";
|
|
292
292
|
}
|
|
293
|
-
|
|
293
|
+
process11.kill(process11.pid, sig);
|
|
294
294
|
}
|
|
295
295
|
};
|
|
296
296
|
});
|
|
@@ -306,36 +306,36 @@ var require_signal_exit = __commonJS({
|
|
|
306
306
|
emitter.count += 1;
|
|
307
307
|
signals = signals.filter(function(sig) {
|
|
308
308
|
try {
|
|
309
|
-
|
|
309
|
+
process11.on(sig, sigListeners[sig]);
|
|
310
310
|
return true;
|
|
311
311
|
} catch (er) {
|
|
312
312
|
return false;
|
|
313
313
|
}
|
|
314
314
|
});
|
|
315
|
-
|
|
316
|
-
|
|
315
|
+
process11.emit = processEmit;
|
|
316
|
+
process11.reallyExit = processReallyExit;
|
|
317
317
|
};
|
|
318
318
|
module2.exports.load = load;
|
|
319
|
-
originalProcessReallyExit =
|
|
319
|
+
originalProcessReallyExit = process11.reallyExit;
|
|
320
320
|
processReallyExit = function processReallyExit2(code) {
|
|
321
321
|
if (!processOk(global.process)) {
|
|
322
322
|
return;
|
|
323
323
|
}
|
|
324
|
-
|
|
324
|
+
process11.exitCode = code || /* istanbul ignore next */
|
|
325
325
|
0;
|
|
326
|
-
emit("exit",
|
|
327
|
-
emit("afterexit",
|
|
328
|
-
originalProcessReallyExit.call(
|
|
326
|
+
emit("exit", process11.exitCode, null);
|
|
327
|
+
emit("afterexit", process11.exitCode, null);
|
|
328
|
+
originalProcessReallyExit.call(process11, process11.exitCode);
|
|
329
329
|
};
|
|
330
|
-
originalProcessEmit =
|
|
330
|
+
originalProcessEmit = process11.emit;
|
|
331
331
|
processEmit = function processEmit2(ev, arg) {
|
|
332
332
|
if (ev === "exit" && processOk(global.process)) {
|
|
333
333
|
if (arg !== void 0) {
|
|
334
|
-
|
|
334
|
+
process11.exitCode = arg;
|
|
335
335
|
}
|
|
336
336
|
var ret = originalProcessEmit.apply(this, arguments);
|
|
337
|
-
emit("exit",
|
|
338
|
-
emit("afterexit",
|
|
337
|
+
emit("exit", process11.exitCode, null);
|
|
338
|
+
emit("afterexit", process11.exitCode, null);
|
|
339
339
|
return ret;
|
|
340
340
|
} else {
|
|
341
341
|
return originalProcessEmit.apply(this, arguments);
|
|
@@ -2030,7 +2030,7 @@ var require_clone = __commonJS({
|
|
|
2030
2030
|
if (depth2 == 0)
|
|
2031
2031
|
return parent2;
|
|
2032
2032
|
var child;
|
|
2033
|
-
var
|
|
2033
|
+
var proto2;
|
|
2034
2034
|
if (typeof parent2 != "object") {
|
|
2035
2035
|
return parent2;
|
|
2036
2036
|
}
|
|
@@ -2052,11 +2052,11 @@ var require_clone = __commonJS({
|
|
|
2052
2052
|
return child;
|
|
2053
2053
|
} else {
|
|
2054
2054
|
if (typeof prototype == "undefined") {
|
|
2055
|
-
|
|
2056
|
-
child = Object.create(
|
|
2055
|
+
proto2 = Object.getPrototypeOf(parent2);
|
|
2056
|
+
child = Object.create(proto2);
|
|
2057
2057
|
} else {
|
|
2058
2058
|
child = Object.create(prototype);
|
|
2059
|
-
|
|
2059
|
+
proto2 = prototype;
|
|
2060
2060
|
}
|
|
2061
2061
|
}
|
|
2062
2062
|
if (circular) {
|
|
@@ -2069,8 +2069,8 @@ var require_clone = __commonJS({
|
|
|
2069
2069
|
}
|
|
2070
2070
|
for (var i in parent2) {
|
|
2071
2071
|
var attrs;
|
|
2072
|
-
if (
|
|
2073
|
-
attrs = Object.getOwnPropertyDescriptor(
|
|
2072
|
+
if (proto2) {
|
|
2073
|
+
attrs = Object.getOwnPropertyDescriptor(proto2, i);
|
|
2074
2074
|
}
|
|
2075
2075
|
if (attrs && attrs.set == null) {
|
|
2076
2076
|
continue;
|
|
@@ -5660,15 +5660,16 @@ var import_process3 = __toESM(require("process"), 1);
|
|
|
5660
5660
|
var import_lazy_js_utils13 = require("lazy-js-utils");
|
|
5661
5661
|
var import_picocolors7 = __toESM(require_picocolors(), 1);
|
|
5662
5662
|
var import_fast_glob = __toESM(require("fast-glob"), 1);
|
|
5663
|
+
var import_ccommand2 = require("ccommand");
|
|
5663
5664
|
|
|
5664
5665
|
// src/utils.ts
|
|
5665
5666
|
var import_path = __toESM(require("path"), 1);
|
|
5666
5667
|
var import_lazy_js_utils = require("lazy-js-utils");
|
|
5667
5668
|
|
|
5668
5669
|
// node_modules/.pnpm/ora@6.3.1/node_modules/ora/index.js
|
|
5669
|
-
var
|
|
5670
|
+
var import_node_process6 = __toESM(require("process"), 1);
|
|
5670
5671
|
|
|
5671
|
-
// node_modules/.pnpm/
|
|
5672
|
+
// node_modules/.pnpm/chalk@5.3.0/node_modules/chalk/source/vendor/ansi-styles/index.js
|
|
5672
5673
|
var ANSI_BACKGROUND_OFFSET = 10;
|
|
5673
5674
|
var wrapAnsi16 = (offset = 0) => (code) => `\x1B[${code + offset}m`;
|
|
5674
5675
|
var wrapAnsi256 = (offset = 0) => (code) => `\x1B[${38 + offset};5;${code}m`;
|
|
@@ -5854,7 +5855,7 @@ function assembleStyles() {
|
|
|
5854
5855
|
var ansiStyles = assembleStyles();
|
|
5855
5856
|
var ansi_styles_default = ansiStyles;
|
|
5856
5857
|
|
|
5857
|
-
// node_modules/.pnpm/
|
|
5858
|
+
// node_modules/.pnpm/chalk@5.3.0/node_modules/chalk/source/vendor/supports-color/index.js
|
|
5858
5859
|
var import_node_process = __toESM(require("process"), 1);
|
|
5859
5860
|
var import_node_os = __toESM(require("os"), 1);
|
|
5860
5861
|
var import_node_tty = __toESM(require("tty"), 1);
|
|
@@ -5980,7 +5981,7 @@ var supportsColor = {
|
|
|
5980
5981
|
};
|
|
5981
5982
|
var supports_color_default = supportsColor;
|
|
5982
5983
|
|
|
5983
|
-
// node_modules/.pnpm/
|
|
5984
|
+
// node_modules/.pnpm/chalk@5.3.0/node_modules/chalk/source/utilities.js
|
|
5984
5985
|
function stringReplaceAll(string, substring, replacer) {
|
|
5985
5986
|
let index = string.indexOf(substring);
|
|
5986
5987
|
if (index === -1) {
|
|
@@ -6010,7 +6011,7 @@ function stringEncaseCRLFWithFirstIndex(string, prefix, postfix, index) {
|
|
|
6010
6011
|
return returnValue;
|
|
6011
6012
|
}
|
|
6012
6013
|
|
|
6013
|
-
// node_modules/.pnpm/
|
|
6014
|
+
// node_modules/.pnpm/chalk@5.3.0/node_modules/chalk/source/index.js
|
|
6014
6015
|
var { stdout: stdoutColor, stderr: stderrColor } = supports_color_default;
|
|
6015
6016
|
var GENERATOR = Symbol("GENERATOR");
|
|
6016
6017
|
var STYLER = Symbol("STYLER");
|
|
@@ -6030,10 +6031,10 @@ var applyOptions = (object, options = {}) => {
|
|
|
6030
6031
|
object.level = options.level === void 0 ? colorLevel : options.level;
|
|
6031
6032
|
};
|
|
6032
6033
|
var chalkFactory = (options) => {
|
|
6033
|
-
const
|
|
6034
|
-
applyOptions(
|
|
6035
|
-
Object.setPrototypeOf(
|
|
6036
|
-
return
|
|
6034
|
+
const chalk2 = (...strings) => strings.join(" ");
|
|
6035
|
+
applyOptions(chalk2, options);
|
|
6036
|
+
Object.setPrototypeOf(chalk2, createChalk.prototype);
|
|
6037
|
+
return chalk2;
|
|
6037
6038
|
};
|
|
6038
6039
|
function createChalk(options) {
|
|
6039
6040
|
return chalkFactory(options);
|
|
@@ -6204,521 +6205,32 @@ var cli_cursor_default = cliCursor;
|
|
|
6204
6205
|
// node_modules/.pnpm/ora@6.3.1/node_modules/ora/index.js
|
|
6205
6206
|
var import_cli_spinners = __toESM(require_cli_spinners(), 1);
|
|
6206
6207
|
|
|
6207
|
-
// node_modules/.pnpm/chalk@5.3.0/node_modules/chalk/source/vendor/ansi-styles/index.js
|
|
6208
|
-
var ANSI_BACKGROUND_OFFSET2 = 10;
|
|
6209
|
-
var wrapAnsi162 = (offset = 0) => (code) => `\x1B[${code + offset}m`;
|
|
6210
|
-
var wrapAnsi2562 = (offset = 0) => (code) => `\x1B[${38 + offset};5;${code}m`;
|
|
6211
|
-
var wrapAnsi16m2 = (offset = 0) => (red, green, blue) => `\x1B[${38 + offset};2;${red};${green};${blue}m`;
|
|
6212
|
-
var styles3 = {
|
|
6213
|
-
modifier: {
|
|
6214
|
-
reset: [0, 0],
|
|
6215
|
-
// 21 isn't widely supported and 22 does the same thing
|
|
6216
|
-
bold: [1, 22],
|
|
6217
|
-
dim: [2, 22],
|
|
6218
|
-
italic: [3, 23],
|
|
6219
|
-
underline: [4, 24],
|
|
6220
|
-
overline: [53, 55],
|
|
6221
|
-
inverse: [7, 27],
|
|
6222
|
-
hidden: [8, 28],
|
|
6223
|
-
strikethrough: [9, 29]
|
|
6224
|
-
},
|
|
6225
|
-
color: {
|
|
6226
|
-
black: [30, 39],
|
|
6227
|
-
red: [31, 39],
|
|
6228
|
-
green: [32, 39],
|
|
6229
|
-
yellow: [33, 39],
|
|
6230
|
-
blue: [34, 39],
|
|
6231
|
-
magenta: [35, 39],
|
|
6232
|
-
cyan: [36, 39],
|
|
6233
|
-
white: [37, 39],
|
|
6234
|
-
// Bright color
|
|
6235
|
-
blackBright: [90, 39],
|
|
6236
|
-
gray: [90, 39],
|
|
6237
|
-
// Alias of `blackBright`
|
|
6238
|
-
grey: [90, 39],
|
|
6239
|
-
// Alias of `blackBright`
|
|
6240
|
-
redBright: [91, 39],
|
|
6241
|
-
greenBright: [92, 39],
|
|
6242
|
-
yellowBright: [93, 39],
|
|
6243
|
-
blueBright: [94, 39],
|
|
6244
|
-
magentaBright: [95, 39],
|
|
6245
|
-
cyanBright: [96, 39],
|
|
6246
|
-
whiteBright: [97, 39]
|
|
6247
|
-
},
|
|
6248
|
-
bgColor: {
|
|
6249
|
-
bgBlack: [40, 49],
|
|
6250
|
-
bgRed: [41, 49],
|
|
6251
|
-
bgGreen: [42, 49],
|
|
6252
|
-
bgYellow: [43, 49],
|
|
6253
|
-
bgBlue: [44, 49],
|
|
6254
|
-
bgMagenta: [45, 49],
|
|
6255
|
-
bgCyan: [46, 49],
|
|
6256
|
-
bgWhite: [47, 49],
|
|
6257
|
-
// Bright color
|
|
6258
|
-
bgBlackBright: [100, 49],
|
|
6259
|
-
bgGray: [100, 49],
|
|
6260
|
-
// Alias of `bgBlackBright`
|
|
6261
|
-
bgGrey: [100, 49],
|
|
6262
|
-
// Alias of `bgBlackBright`
|
|
6263
|
-
bgRedBright: [101, 49],
|
|
6264
|
-
bgGreenBright: [102, 49],
|
|
6265
|
-
bgYellowBright: [103, 49],
|
|
6266
|
-
bgBlueBright: [104, 49],
|
|
6267
|
-
bgMagentaBright: [105, 49],
|
|
6268
|
-
bgCyanBright: [106, 49],
|
|
6269
|
-
bgWhiteBright: [107, 49]
|
|
6270
|
-
}
|
|
6271
|
-
};
|
|
6272
|
-
var modifierNames2 = Object.keys(styles3.modifier);
|
|
6273
|
-
var foregroundColorNames2 = Object.keys(styles3.color);
|
|
6274
|
-
var backgroundColorNames2 = Object.keys(styles3.bgColor);
|
|
6275
|
-
var colorNames2 = [...foregroundColorNames2, ...backgroundColorNames2];
|
|
6276
|
-
function assembleStyles2() {
|
|
6277
|
-
const codes = /* @__PURE__ */ new Map();
|
|
6278
|
-
for (const [groupName, group] of Object.entries(styles3)) {
|
|
6279
|
-
for (const [styleName, style] of Object.entries(group)) {
|
|
6280
|
-
styles3[styleName] = {
|
|
6281
|
-
open: `\x1B[${style[0]}m`,
|
|
6282
|
-
close: `\x1B[${style[1]}m`
|
|
6283
|
-
};
|
|
6284
|
-
group[styleName] = styles3[styleName];
|
|
6285
|
-
codes.set(style[0], style[1]);
|
|
6286
|
-
}
|
|
6287
|
-
Object.defineProperty(styles3, groupName, {
|
|
6288
|
-
value: group,
|
|
6289
|
-
enumerable: false
|
|
6290
|
-
});
|
|
6291
|
-
}
|
|
6292
|
-
Object.defineProperty(styles3, "codes", {
|
|
6293
|
-
value: codes,
|
|
6294
|
-
enumerable: false
|
|
6295
|
-
});
|
|
6296
|
-
styles3.color.close = "\x1B[39m";
|
|
6297
|
-
styles3.bgColor.close = "\x1B[49m";
|
|
6298
|
-
styles3.color.ansi = wrapAnsi162();
|
|
6299
|
-
styles3.color.ansi256 = wrapAnsi2562();
|
|
6300
|
-
styles3.color.ansi16m = wrapAnsi16m2();
|
|
6301
|
-
styles3.bgColor.ansi = wrapAnsi162(ANSI_BACKGROUND_OFFSET2);
|
|
6302
|
-
styles3.bgColor.ansi256 = wrapAnsi2562(ANSI_BACKGROUND_OFFSET2);
|
|
6303
|
-
styles3.bgColor.ansi16m = wrapAnsi16m2(ANSI_BACKGROUND_OFFSET2);
|
|
6304
|
-
Object.defineProperties(styles3, {
|
|
6305
|
-
rgbToAnsi256: {
|
|
6306
|
-
value(red, green, blue) {
|
|
6307
|
-
if (red === green && green === blue) {
|
|
6308
|
-
if (red < 8) {
|
|
6309
|
-
return 16;
|
|
6310
|
-
}
|
|
6311
|
-
if (red > 248) {
|
|
6312
|
-
return 231;
|
|
6313
|
-
}
|
|
6314
|
-
return Math.round((red - 8) / 247 * 24) + 232;
|
|
6315
|
-
}
|
|
6316
|
-
return 16 + 36 * Math.round(red / 255 * 5) + 6 * Math.round(green / 255 * 5) + Math.round(blue / 255 * 5);
|
|
6317
|
-
},
|
|
6318
|
-
enumerable: false
|
|
6319
|
-
},
|
|
6320
|
-
hexToRgb: {
|
|
6321
|
-
value(hex) {
|
|
6322
|
-
const matches = /[a-f\d]{6}|[a-f\d]{3}/i.exec(hex.toString(16));
|
|
6323
|
-
if (!matches) {
|
|
6324
|
-
return [0, 0, 0];
|
|
6325
|
-
}
|
|
6326
|
-
let [colorString] = matches;
|
|
6327
|
-
if (colorString.length === 3) {
|
|
6328
|
-
colorString = [...colorString].map((character) => character + character).join("");
|
|
6329
|
-
}
|
|
6330
|
-
const integer = Number.parseInt(colorString, 16);
|
|
6331
|
-
return [
|
|
6332
|
-
/* eslint-disable no-bitwise */
|
|
6333
|
-
integer >> 16 & 255,
|
|
6334
|
-
integer >> 8 & 255,
|
|
6335
|
-
integer & 255
|
|
6336
|
-
/* eslint-enable no-bitwise */
|
|
6337
|
-
];
|
|
6338
|
-
},
|
|
6339
|
-
enumerable: false
|
|
6340
|
-
},
|
|
6341
|
-
hexToAnsi256: {
|
|
6342
|
-
value: (hex) => styles3.rgbToAnsi256(...styles3.hexToRgb(hex)),
|
|
6343
|
-
enumerable: false
|
|
6344
|
-
},
|
|
6345
|
-
ansi256ToAnsi: {
|
|
6346
|
-
value(code) {
|
|
6347
|
-
if (code < 8) {
|
|
6348
|
-
return 30 + code;
|
|
6349
|
-
}
|
|
6350
|
-
if (code < 16) {
|
|
6351
|
-
return 90 + (code - 8);
|
|
6352
|
-
}
|
|
6353
|
-
let red;
|
|
6354
|
-
let green;
|
|
6355
|
-
let blue;
|
|
6356
|
-
if (code >= 232) {
|
|
6357
|
-
red = ((code - 232) * 10 + 8) / 255;
|
|
6358
|
-
green = red;
|
|
6359
|
-
blue = red;
|
|
6360
|
-
} else {
|
|
6361
|
-
code -= 16;
|
|
6362
|
-
const remainder = code % 36;
|
|
6363
|
-
red = Math.floor(code / 36) / 5;
|
|
6364
|
-
green = Math.floor(remainder / 6) / 5;
|
|
6365
|
-
blue = remainder % 6 / 5;
|
|
6366
|
-
}
|
|
6367
|
-
const value = Math.max(red, green, blue) * 2;
|
|
6368
|
-
if (value === 0) {
|
|
6369
|
-
return 30;
|
|
6370
|
-
}
|
|
6371
|
-
let result = 30 + (Math.round(blue) << 2 | Math.round(green) << 1 | Math.round(red));
|
|
6372
|
-
if (value === 2) {
|
|
6373
|
-
result += 60;
|
|
6374
|
-
}
|
|
6375
|
-
return result;
|
|
6376
|
-
},
|
|
6377
|
-
enumerable: false
|
|
6378
|
-
},
|
|
6379
|
-
rgbToAnsi: {
|
|
6380
|
-
value: (red, green, blue) => styles3.ansi256ToAnsi(styles3.rgbToAnsi256(red, green, blue)),
|
|
6381
|
-
enumerable: false
|
|
6382
|
-
},
|
|
6383
|
-
hexToAnsi: {
|
|
6384
|
-
value: (hex) => styles3.ansi256ToAnsi(styles3.hexToAnsi256(hex)),
|
|
6385
|
-
enumerable: false
|
|
6386
|
-
}
|
|
6387
|
-
});
|
|
6388
|
-
return styles3;
|
|
6389
|
-
}
|
|
6390
|
-
var ansiStyles2 = assembleStyles2();
|
|
6391
|
-
var ansi_styles_default2 = ansiStyles2;
|
|
6392
|
-
|
|
6393
|
-
// node_modules/.pnpm/chalk@5.3.0/node_modules/chalk/source/vendor/supports-color/index.js
|
|
6394
|
-
var import_node_process4 = __toESM(require("process"), 1);
|
|
6395
|
-
var import_node_os2 = __toESM(require("os"), 1);
|
|
6396
|
-
var import_node_tty2 = __toESM(require("tty"), 1);
|
|
6397
|
-
function hasFlag2(flag, argv = globalThis.Deno ? globalThis.Deno.args : import_node_process4.default.argv) {
|
|
6398
|
-
const prefix = flag.startsWith("-") ? "" : flag.length === 1 ? "-" : "--";
|
|
6399
|
-
const position = argv.indexOf(prefix + flag);
|
|
6400
|
-
const terminatorPosition = argv.indexOf("--");
|
|
6401
|
-
return position !== -1 && (terminatorPosition === -1 || position < terminatorPosition);
|
|
6402
|
-
}
|
|
6403
|
-
var { env: env2 } = import_node_process4.default;
|
|
6404
|
-
var flagForceColor2;
|
|
6405
|
-
if (hasFlag2("no-color") || hasFlag2("no-colors") || hasFlag2("color=false") || hasFlag2("color=never")) {
|
|
6406
|
-
flagForceColor2 = 0;
|
|
6407
|
-
} else if (hasFlag2("color") || hasFlag2("colors") || hasFlag2("color=true") || hasFlag2("color=always")) {
|
|
6408
|
-
flagForceColor2 = 1;
|
|
6409
|
-
}
|
|
6410
|
-
function envForceColor2() {
|
|
6411
|
-
if ("FORCE_COLOR" in env2) {
|
|
6412
|
-
if (env2.FORCE_COLOR === "true") {
|
|
6413
|
-
return 1;
|
|
6414
|
-
}
|
|
6415
|
-
if (env2.FORCE_COLOR === "false") {
|
|
6416
|
-
return 0;
|
|
6417
|
-
}
|
|
6418
|
-
return env2.FORCE_COLOR.length === 0 ? 1 : Math.min(Number.parseInt(env2.FORCE_COLOR, 10), 3);
|
|
6419
|
-
}
|
|
6420
|
-
}
|
|
6421
|
-
function translateLevel2(level) {
|
|
6422
|
-
if (level === 0) {
|
|
6423
|
-
return false;
|
|
6424
|
-
}
|
|
6425
|
-
return {
|
|
6426
|
-
level,
|
|
6427
|
-
hasBasic: true,
|
|
6428
|
-
has256: level >= 2,
|
|
6429
|
-
has16m: level >= 3
|
|
6430
|
-
};
|
|
6431
|
-
}
|
|
6432
|
-
function _supportsColor2(haveStream, { streamIsTTY, sniffFlags = true } = {}) {
|
|
6433
|
-
const noFlagForceColor = envForceColor2();
|
|
6434
|
-
if (noFlagForceColor !== void 0) {
|
|
6435
|
-
flagForceColor2 = noFlagForceColor;
|
|
6436
|
-
}
|
|
6437
|
-
const forceColor = sniffFlags ? flagForceColor2 : noFlagForceColor;
|
|
6438
|
-
if (forceColor === 0) {
|
|
6439
|
-
return 0;
|
|
6440
|
-
}
|
|
6441
|
-
if (sniffFlags) {
|
|
6442
|
-
if (hasFlag2("color=16m") || hasFlag2("color=full") || hasFlag2("color=truecolor")) {
|
|
6443
|
-
return 3;
|
|
6444
|
-
}
|
|
6445
|
-
if (hasFlag2("color=256")) {
|
|
6446
|
-
return 2;
|
|
6447
|
-
}
|
|
6448
|
-
}
|
|
6449
|
-
if ("TF_BUILD" in env2 && "AGENT_NAME" in env2) {
|
|
6450
|
-
return 1;
|
|
6451
|
-
}
|
|
6452
|
-
if (haveStream && !streamIsTTY && forceColor === void 0) {
|
|
6453
|
-
return 0;
|
|
6454
|
-
}
|
|
6455
|
-
const min = forceColor || 0;
|
|
6456
|
-
if (env2.TERM === "dumb") {
|
|
6457
|
-
return min;
|
|
6458
|
-
}
|
|
6459
|
-
if (import_node_process4.default.platform === "win32") {
|
|
6460
|
-
const osRelease = import_node_os2.default.release().split(".");
|
|
6461
|
-
if (Number(osRelease[0]) >= 10 && Number(osRelease[2]) >= 10586) {
|
|
6462
|
-
return Number(osRelease[2]) >= 14931 ? 3 : 2;
|
|
6463
|
-
}
|
|
6464
|
-
return 1;
|
|
6465
|
-
}
|
|
6466
|
-
if ("CI" in env2) {
|
|
6467
|
-
if ("GITHUB_ACTIONS" in env2 || "GITEA_ACTIONS" in env2) {
|
|
6468
|
-
return 3;
|
|
6469
|
-
}
|
|
6470
|
-
if (["TRAVIS", "CIRCLECI", "APPVEYOR", "GITLAB_CI", "BUILDKITE", "DRONE"].some((sign) => sign in env2) || env2.CI_NAME === "codeship") {
|
|
6471
|
-
return 1;
|
|
6472
|
-
}
|
|
6473
|
-
return min;
|
|
6474
|
-
}
|
|
6475
|
-
if ("TEAMCITY_VERSION" in env2) {
|
|
6476
|
-
return /^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(env2.TEAMCITY_VERSION) ? 1 : 0;
|
|
6477
|
-
}
|
|
6478
|
-
if (env2.COLORTERM === "truecolor") {
|
|
6479
|
-
return 3;
|
|
6480
|
-
}
|
|
6481
|
-
if (env2.TERM === "xterm-kitty") {
|
|
6482
|
-
return 3;
|
|
6483
|
-
}
|
|
6484
|
-
if ("TERM_PROGRAM" in env2) {
|
|
6485
|
-
const version2 = Number.parseInt((env2.TERM_PROGRAM_VERSION || "").split(".")[0], 10);
|
|
6486
|
-
switch (env2.TERM_PROGRAM) {
|
|
6487
|
-
case "iTerm.app": {
|
|
6488
|
-
return version2 >= 3 ? 3 : 2;
|
|
6489
|
-
}
|
|
6490
|
-
case "Apple_Terminal": {
|
|
6491
|
-
return 2;
|
|
6492
|
-
}
|
|
6493
|
-
}
|
|
6494
|
-
}
|
|
6495
|
-
if (/-256(color)?$/i.test(env2.TERM)) {
|
|
6496
|
-
return 2;
|
|
6497
|
-
}
|
|
6498
|
-
if (/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(env2.TERM)) {
|
|
6499
|
-
return 1;
|
|
6500
|
-
}
|
|
6501
|
-
if ("COLORTERM" in env2) {
|
|
6502
|
-
return 1;
|
|
6503
|
-
}
|
|
6504
|
-
return min;
|
|
6505
|
-
}
|
|
6506
|
-
function createSupportsColor2(stream, options = {}) {
|
|
6507
|
-
const level = _supportsColor2(stream, {
|
|
6508
|
-
streamIsTTY: stream && stream.isTTY,
|
|
6509
|
-
...options
|
|
6510
|
-
});
|
|
6511
|
-
return translateLevel2(level);
|
|
6512
|
-
}
|
|
6513
|
-
var supportsColor2 = {
|
|
6514
|
-
stdout: createSupportsColor2({ isTTY: import_node_tty2.default.isatty(1) }),
|
|
6515
|
-
stderr: createSupportsColor2({ isTTY: import_node_tty2.default.isatty(2) })
|
|
6516
|
-
};
|
|
6517
|
-
var supports_color_default2 = supportsColor2;
|
|
6518
|
-
|
|
6519
|
-
// node_modules/.pnpm/chalk@5.3.0/node_modules/chalk/source/utilities.js
|
|
6520
|
-
function stringReplaceAll2(string, substring, replacer) {
|
|
6521
|
-
let index = string.indexOf(substring);
|
|
6522
|
-
if (index === -1) {
|
|
6523
|
-
return string;
|
|
6524
|
-
}
|
|
6525
|
-
const substringLength = substring.length;
|
|
6526
|
-
let endIndex = 0;
|
|
6527
|
-
let returnValue = "";
|
|
6528
|
-
do {
|
|
6529
|
-
returnValue += string.slice(endIndex, index) + substring + replacer;
|
|
6530
|
-
endIndex = index + substringLength;
|
|
6531
|
-
index = string.indexOf(substring, endIndex);
|
|
6532
|
-
} while (index !== -1);
|
|
6533
|
-
returnValue += string.slice(endIndex);
|
|
6534
|
-
return returnValue;
|
|
6535
|
-
}
|
|
6536
|
-
function stringEncaseCRLFWithFirstIndex2(string, prefix, postfix, index) {
|
|
6537
|
-
let endIndex = 0;
|
|
6538
|
-
let returnValue = "";
|
|
6539
|
-
do {
|
|
6540
|
-
const gotCR = string[index - 1] === "\r";
|
|
6541
|
-
returnValue += string.slice(endIndex, gotCR ? index - 1 : index) + prefix + (gotCR ? "\r\n" : "\n") + postfix;
|
|
6542
|
-
endIndex = index + 1;
|
|
6543
|
-
index = string.indexOf("\n", endIndex);
|
|
6544
|
-
} while (index !== -1);
|
|
6545
|
-
returnValue += string.slice(endIndex);
|
|
6546
|
-
return returnValue;
|
|
6547
|
-
}
|
|
6548
|
-
|
|
6549
|
-
// node_modules/.pnpm/chalk@5.3.0/node_modules/chalk/source/index.js
|
|
6550
|
-
var { stdout: stdoutColor2, stderr: stderrColor2 } = supports_color_default2;
|
|
6551
|
-
var GENERATOR2 = Symbol("GENERATOR");
|
|
6552
|
-
var STYLER2 = Symbol("STYLER");
|
|
6553
|
-
var IS_EMPTY2 = Symbol("IS_EMPTY");
|
|
6554
|
-
var levelMapping2 = [
|
|
6555
|
-
"ansi",
|
|
6556
|
-
"ansi",
|
|
6557
|
-
"ansi256",
|
|
6558
|
-
"ansi16m"
|
|
6559
|
-
];
|
|
6560
|
-
var styles4 = /* @__PURE__ */ Object.create(null);
|
|
6561
|
-
var applyOptions2 = (object, options = {}) => {
|
|
6562
|
-
if (options.level && !(Number.isInteger(options.level) && options.level >= 0 && options.level <= 3)) {
|
|
6563
|
-
throw new Error("The `level` option should be an integer from 0 to 3");
|
|
6564
|
-
}
|
|
6565
|
-
const colorLevel = stdoutColor2 ? stdoutColor2.level : 0;
|
|
6566
|
-
object.level = options.level === void 0 ? colorLevel : options.level;
|
|
6567
|
-
};
|
|
6568
|
-
var chalkFactory2 = (options) => {
|
|
6569
|
-
const chalk3 = (...strings) => strings.join(" ");
|
|
6570
|
-
applyOptions2(chalk3, options);
|
|
6571
|
-
Object.setPrototypeOf(chalk3, createChalk2.prototype);
|
|
6572
|
-
return chalk3;
|
|
6573
|
-
};
|
|
6574
|
-
function createChalk2(options) {
|
|
6575
|
-
return chalkFactory2(options);
|
|
6576
|
-
}
|
|
6577
|
-
Object.setPrototypeOf(createChalk2.prototype, Function.prototype);
|
|
6578
|
-
for (const [styleName, style] of Object.entries(ansi_styles_default2)) {
|
|
6579
|
-
styles4[styleName] = {
|
|
6580
|
-
get() {
|
|
6581
|
-
const builder = createBuilder2(this, createStyler2(style.open, style.close, this[STYLER2]), this[IS_EMPTY2]);
|
|
6582
|
-
Object.defineProperty(this, styleName, { value: builder });
|
|
6583
|
-
return builder;
|
|
6584
|
-
}
|
|
6585
|
-
};
|
|
6586
|
-
}
|
|
6587
|
-
styles4.visible = {
|
|
6588
|
-
get() {
|
|
6589
|
-
const builder = createBuilder2(this, this[STYLER2], true);
|
|
6590
|
-
Object.defineProperty(this, "visible", { value: builder });
|
|
6591
|
-
return builder;
|
|
6592
|
-
}
|
|
6593
|
-
};
|
|
6594
|
-
var getModelAnsi2 = (model, level, type, ...arguments_) => {
|
|
6595
|
-
if (model === "rgb") {
|
|
6596
|
-
if (level === "ansi16m") {
|
|
6597
|
-
return ansi_styles_default2[type].ansi16m(...arguments_);
|
|
6598
|
-
}
|
|
6599
|
-
if (level === "ansi256") {
|
|
6600
|
-
return ansi_styles_default2[type].ansi256(ansi_styles_default2.rgbToAnsi256(...arguments_));
|
|
6601
|
-
}
|
|
6602
|
-
return ansi_styles_default2[type].ansi(ansi_styles_default2.rgbToAnsi(...arguments_));
|
|
6603
|
-
}
|
|
6604
|
-
if (model === "hex") {
|
|
6605
|
-
return getModelAnsi2("rgb", level, type, ...ansi_styles_default2.hexToRgb(...arguments_));
|
|
6606
|
-
}
|
|
6607
|
-
return ansi_styles_default2[type][model](...arguments_);
|
|
6608
|
-
};
|
|
6609
|
-
var usedModels2 = ["rgb", "hex", "ansi256"];
|
|
6610
|
-
for (const model of usedModels2) {
|
|
6611
|
-
styles4[model] = {
|
|
6612
|
-
get() {
|
|
6613
|
-
const { level } = this;
|
|
6614
|
-
return function(...arguments_) {
|
|
6615
|
-
const styler = createStyler2(getModelAnsi2(model, levelMapping2[level], "color", ...arguments_), ansi_styles_default2.color.close, this[STYLER2]);
|
|
6616
|
-
return createBuilder2(this, styler, this[IS_EMPTY2]);
|
|
6617
|
-
};
|
|
6618
|
-
}
|
|
6619
|
-
};
|
|
6620
|
-
const bgModel = "bg" + model[0].toUpperCase() + model.slice(1);
|
|
6621
|
-
styles4[bgModel] = {
|
|
6622
|
-
get() {
|
|
6623
|
-
const { level } = this;
|
|
6624
|
-
return function(...arguments_) {
|
|
6625
|
-
const styler = createStyler2(getModelAnsi2(model, levelMapping2[level], "bgColor", ...arguments_), ansi_styles_default2.bgColor.close, this[STYLER2]);
|
|
6626
|
-
return createBuilder2(this, styler, this[IS_EMPTY2]);
|
|
6627
|
-
};
|
|
6628
|
-
}
|
|
6629
|
-
};
|
|
6630
|
-
}
|
|
6631
|
-
var proto2 = Object.defineProperties(() => {
|
|
6632
|
-
}, {
|
|
6633
|
-
...styles4,
|
|
6634
|
-
level: {
|
|
6635
|
-
enumerable: true,
|
|
6636
|
-
get() {
|
|
6637
|
-
return this[GENERATOR2].level;
|
|
6638
|
-
},
|
|
6639
|
-
set(level) {
|
|
6640
|
-
this[GENERATOR2].level = level;
|
|
6641
|
-
}
|
|
6642
|
-
}
|
|
6643
|
-
});
|
|
6644
|
-
var createStyler2 = (open, close, parent) => {
|
|
6645
|
-
let openAll;
|
|
6646
|
-
let closeAll;
|
|
6647
|
-
if (parent === void 0) {
|
|
6648
|
-
openAll = open;
|
|
6649
|
-
closeAll = close;
|
|
6650
|
-
} else {
|
|
6651
|
-
openAll = parent.openAll + open;
|
|
6652
|
-
closeAll = close + parent.closeAll;
|
|
6653
|
-
}
|
|
6654
|
-
return {
|
|
6655
|
-
open,
|
|
6656
|
-
close,
|
|
6657
|
-
openAll,
|
|
6658
|
-
closeAll,
|
|
6659
|
-
parent
|
|
6660
|
-
};
|
|
6661
|
-
};
|
|
6662
|
-
var createBuilder2 = (self2, _styler, _isEmpty) => {
|
|
6663
|
-
const builder = (...arguments_) => applyStyle2(builder, arguments_.length === 1 ? "" + arguments_[0] : arguments_.join(" "));
|
|
6664
|
-
Object.setPrototypeOf(builder, proto2);
|
|
6665
|
-
builder[GENERATOR2] = self2;
|
|
6666
|
-
builder[STYLER2] = _styler;
|
|
6667
|
-
builder[IS_EMPTY2] = _isEmpty;
|
|
6668
|
-
return builder;
|
|
6669
|
-
};
|
|
6670
|
-
var applyStyle2 = (self2, string) => {
|
|
6671
|
-
if (self2.level <= 0 || !string) {
|
|
6672
|
-
return self2[IS_EMPTY2] ? "" : string;
|
|
6673
|
-
}
|
|
6674
|
-
let styler = self2[STYLER2];
|
|
6675
|
-
if (styler === void 0) {
|
|
6676
|
-
return string;
|
|
6677
|
-
}
|
|
6678
|
-
const { openAll, closeAll } = styler;
|
|
6679
|
-
if (string.includes("\x1B")) {
|
|
6680
|
-
while (styler !== void 0) {
|
|
6681
|
-
string = stringReplaceAll2(string, styler.close, styler.open);
|
|
6682
|
-
styler = styler.parent;
|
|
6683
|
-
}
|
|
6684
|
-
}
|
|
6685
|
-
const lfIndex = string.indexOf("\n");
|
|
6686
|
-
if (lfIndex !== -1) {
|
|
6687
|
-
string = stringEncaseCRLFWithFirstIndex2(string, closeAll, openAll, lfIndex);
|
|
6688
|
-
}
|
|
6689
|
-
return openAll + string + closeAll;
|
|
6690
|
-
};
|
|
6691
|
-
Object.defineProperties(createChalk2.prototype, styles4);
|
|
6692
|
-
var chalk2 = createChalk2();
|
|
6693
|
-
var chalkStderr2 = createChalk2({ level: stderrColor2 ? stderrColor2.level : 0 });
|
|
6694
|
-
var source_default2 = chalk2;
|
|
6695
|
-
|
|
6696
6208
|
// node_modules/.pnpm/is-unicode-supported@1.3.0/node_modules/is-unicode-supported/index.js
|
|
6697
|
-
var
|
|
6209
|
+
var import_node_process4 = __toESM(require("process"), 1);
|
|
6698
6210
|
function isUnicodeSupported() {
|
|
6699
|
-
if (
|
|
6700
|
-
return
|
|
6211
|
+
if (import_node_process4.default.platform !== "win32") {
|
|
6212
|
+
return import_node_process4.default.env.TERM !== "linux";
|
|
6701
6213
|
}
|
|
6702
|
-
return Boolean(
|
|
6214
|
+
return Boolean(import_node_process4.default.env.CI) || Boolean(import_node_process4.default.env.WT_SESSION) || Boolean(import_node_process4.default.env.TERMINUS_SUBLIME) || import_node_process4.default.env.ConEmuTask === "{cmd::Cmder}" || import_node_process4.default.env.TERM_PROGRAM === "Terminus-Sublime" || import_node_process4.default.env.TERM_PROGRAM === "vscode" || import_node_process4.default.env.TERM === "xterm-256color" || import_node_process4.default.env.TERM === "alacritty" || import_node_process4.default.env.TERMINAL_EMULATOR === "JetBrains-JediTerm";
|
|
6703
6215
|
}
|
|
6704
6216
|
|
|
6705
6217
|
// node_modules/.pnpm/log-symbols@5.1.0/node_modules/log-symbols/index.js
|
|
6706
6218
|
var main = {
|
|
6707
|
-
info:
|
|
6708
|
-
success:
|
|
6709
|
-
warning:
|
|
6710
|
-
error:
|
|
6219
|
+
info: source_default.blue("\u2139"),
|
|
6220
|
+
success: source_default.green("\u2714"),
|
|
6221
|
+
warning: source_default.yellow("\u26A0"),
|
|
6222
|
+
error: source_default.red("\u2716")
|
|
6711
6223
|
};
|
|
6712
6224
|
var fallback = {
|
|
6713
|
-
info:
|
|
6714
|
-
success:
|
|
6715
|
-
warning:
|
|
6716
|
-
error:
|
|
6225
|
+
info: source_default.blue("i"),
|
|
6226
|
+
success: source_default.green("\u221A"),
|
|
6227
|
+
warning: source_default.yellow("\u203C"),
|
|
6228
|
+
error: source_default.red("\xD7")
|
|
6717
6229
|
};
|
|
6718
6230
|
var logSymbols = isUnicodeSupported() ? main : fallback;
|
|
6719
6231
|
var log_symbols_default = logSymbols;
|
|
6720
6232
|
|
|
6721
|
-
// node_modules/.pnpm/
|
|
6233
|
+
// node_modules/.pnpm/ansi-regex@6.0.1/node_modules/ansi-regex/index.js
|
|
6722
6234
|
function ansiRegex({ onlyFirst = false } = {}) {
|
|
6723
6235
|
const pattern = [
|
|
6724
6236
|
"[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)",
|
|
@@ -6727,7 +6239,7 @@ function ansiRegex({ onlyFirst = false } = {}) {
|
|
|
6727
6239
|
return new RegExp(pattern, onlyFirst ? void 0 : "g");
|
|
6728
6240
|
}
|
|
6729
6241
|
|
|
6730
|
-
// node_modules/.pnpm/
|
|
6242
|
+
// node_modules/.pnpm/strip-ansi@7.1.0/node_modules/strip-ansi/index.js
|
|
6731
6243
|
var regex = ansiRegex();
|
|
6732
6244
|
function stripAnsi(string) {
|
|
6733
6245
|
if (typeof string !== "string") {
|
|
@@ -6747,7 +6259,7 @@ function isInteractive({ stream = process.stdout } = {}) {
|
|
|
6747
6259
|
}
|
|
6748
6260
|
|
|
6749
6261
|
// node_modules/.pnpm/stdin-discarder@0.1.0/node_modules/stdin-discarder/index.js
|
|
6750
|
-
var
|
|
6262
|
+
var import_node_process5 = __toESM(require("process"), 1);
|
|
6751
6263
|
var import_node_readline = __toESM(require("readline"), 1);
|
|
6752
6264
|
var import_bl = __toESM(require_bl(), 1);
|
|
6753
6265
|
var ASCII_ETX_CODE = 3;
|
|
@@ -6758,20 +6270,20 @@ var StdinDiscarder = class {
|
|
|
6758
6270
|
__privateAdd(this, _mutedStream, new import_bl.BufferListStream());
|
|
6759
6271
|
__privateAdd(this, _ourEmit, void 0);
|
|
6760
6272
|
__privateAdd(this, _rl, void 0);
|
|
6761
|
-
__privateGet(this, _mutedStream).pipe(
|
|
6273
|
+
__privateGet(this, _mutedStream).pipe(import_node_process5.default.stdout);
|
|
6762
6274
|
const self2 = this;
|
|
6763
6275
|
__privateSet(this, _ourEmit, function(event, data, ...arguments_) {
|
|
6764
|
-
const { stdin } =
|
|
6276
|
+
const { stdin } = import_node_process5.default;
|
|
6765
6277
|
if (__privateGet(self2, _requests) > 0 || stdin.emit === __privateGet(self2, _ourEmit)) {
|
|
6766
6278
|
if (event === "keypress") {
|
|
6767
6279
|
return;
|
|
6768
6280
|
}
|
|
6769
6281
|
if (event === "data" && data.includes(ASCII_ETX_CODE)) {
|
|
6770
|
-
|
|
6282
|
+
import_node_process5.default.emit("SIGINT");
|
|
6771
6283
|
}
|
|
6772
6284
|
Reflect.apply(__privateGet(self2, _ourEmit), this, [event, data, ...arguments_]);
|
|
6773
6285
|
} else {
|
|
6774
|
-
Reflect.apply(
|
|
6286
|
+
Reflect.apply(import_node_process5.default.stdin.emit, this, [event, data, ...arguments_]);
|
|
6775
6287
|
}
|
|
6776
6288
|
});
|
|
6777
6289
|
}
|
|
@@ -6792,24 +6304,24 @@ var StdinDiscarder = class {
|
|
|
6792
6304
|
}
|
|
6793
6305
|
// TODO: Use private methods when targeting Node.js 14.
|
|
6794
6306
|
_realStart() {
|
|
6795
|
-
if (
|
|
6307
|
+
if (import_node_process5.default.platform === "win32") {
|
|
6796
6308
|
return;
|
|
6797
6309
|
}
|
|
6798
6310
|
__privateSet(this, _rl, import_node_readline.default.createInterface({
|
|
6799
|
-
input:
|
|
6311
|
+
input: import_node_process5.default.stdin,
|
|
6800
6312
|
output: __privateGet(this, _mutedStream)
|
|
6801
6313
|
}));
|
|
6802
6314
|
__privateGet(this, _rl).on("SIGINT", () => {
|
|
6803
|
-
if (
|
|
6804
|
-
|
|
6315
|
+
if (import_node_process5.default.listenerCount("SIGINT") === 0) {
|
|
6316
|
+
import_node_process5.default.emit("SIGINT");
|
|
6805
6317
|
} else {
|
|
6806
6318
|
__privateGet(this, _rl).close();
|
|
6807
|
-
|
|
6319
|
+
import_node_process5.default.kill(import_node_process5.default.pid, "SIGINT");
|
|
6808
6320
|
}
|
|
6809
6321
|
});
|
|
6810
6322
|
}
|
|
6811
6323
|
_realStop() {
|
|
6812
|
-
if (
|
|
6324
|
+
if (import_node_process5.default.platform === "win32") {
|
|
6813
6325
|
return;
|
|
6814
6326
|
}
|
|
6815
6327
|
__privateGet(this, _rl).close();
|
|
@@ -6851,7 +6363,7 @@ var Ora = class {
|
|
|
6851
6363
|
}
|
|
6852
6364
|
__privateSet(this, _options, {
|
|
6853
6365
|
color: "cyan",
|
|
6854
|
-
stream:
|
|
6366
|
+
stream: import_node_process6.default.stderr,
|
|
6855
6367
|
discardStdin: true,
|
|
6856
6368
|
hideCursor: true,
|
|
6857
6369
|
...options
|
|
@@ -6866,7 +6378,7 @@ var Ora = class {
|
|
|
6866
6378
|
this.prefixText = __privateGet(this, _options).prefixText;
|
|
6867
6379
|
this.suffixText = __privateGet(this, _options).suffixText;
|
|
6868
6380
|
this.indent = __privateGet(this, _options).indent;
|
|
6869
|
-
if (
|
|
6381
|
+
if (import_node_process6.default.env.NODE_ENV === "test") {
|
|
6870
6382
|
this._stream = __privateGet(this, _stream);
|
|
6871
6383
|
this._isEnabled = __privateGet(this, _isEnabled);
|
|
6872
6384
|
Object.defineProperty(this, "_linesToClear", {
|
|
@@ -7053,7 +6565,7 @@ var Ora = class {
|
|
|
7053
6565
|
if (__privateGet(this, _options).hideCursor) {
|
|
7054
6566
|
cli_cursor_default.hide(__privateGet(this, _stream));
|
|
7055
6567
|
}
|
|
7056
|
-
if (__privateGet(this, _options).discardStdin &&
|
|
6568
|
+
if (__privateGet(this, _options).discardStdin && import_node_process6.default.stdin.isTTY) {
|
|
7057
6569
|
__privateSet(this, _isDiscardingStdin, true);
|
|
7058
6570
|
stdin_discarder_default.start();
|
|
7059
6571
|
}
|
|
@@ -7072,7 +6584,7 @@ var Ora = class {
|
|
|
7072
6584
|
if (__privateGet(this, _options).hideCursor) {
|
|
7073
6585
|
cli_cursor_default.show(__privateGet(this, _stream));
|
|
7074
6586
|
}
|
|
7075
|
-
if (__privateGet(this, _options).discardStdin &&
|
|
6587
|
+
if (__privateGet(this, _options).discardStdin && import_node_process6.default.stdin.isTTY && __privateGet(this, _isDiscardingStdin)) {
|
|
7076
6588
|
stdin_discarder_default.stop();
|
|
7077
6589
|
__privateSet(this, _isDiscardingStdin, false);
|
|
7078
6590
|
}
|
|
@@ -7128,12 +6640,12 @@ function ora(options) {
|
|
|
7128
6640
|
|
|
7129
6641
|
// src/utils.ts
|
|
7130
6642
|
var import_picocolors = __toESM(require_picocolors(), 1);
|
|
7131
|
-
var DW = /\s-DW
|
|
7132
|
-
var W = /\s-W
|
|
7133
|
-
var Dw = /\s-Dw
|
|
7134
|
-
var w = /\s-w
|
|
7135
|
-
var D = /\s-D(?!w)
|
|
7136
|
-
var d = /\s-d(?!w)
|
|
6643
|
+
var DW = /\s-DW/g;
|
|
6644
|
+
var W = /\s-W/g;
|
|
6645
|
+
var Dw = /\s-Dw/g;
|
|
6646
|
+
var w = /\s-w/g;
|
|
6647
|
+
var D = /\s-D(?!w)/g;
|
|
6648
|
+
var d = /\s-d(?!w)/g;
|
|
7137
6649
|
var isZh = process.env.PI_Lang === "zh";
|
|
7138
6650
|
async function getParams(params) {
|
|
7139
6651
|
var _a, _b;
|
|
@@ -7239,7 +6751,7 @@ function getLatestVersion(pkg, isZh6 = true) {
|
|
|
7239
6751
|
var import_lazy_js_utils2 = require("lazy-js-utils");
|
|
7240
6752
|
|
|
7241
6753
|
// package.json
|
|
7242
|
-
var version = "0.0.
|
|
6754
|
+
var version = "0.0.80";
|
|
7243
6755
|
|
|
7244
6756
|
// src/help.ts
|
|
7245
6757
|
var isZh2 = process.env.PI_Lang === "zh";
|
|
@@ -7308,7 +6820,7 @@ async function pi(params, pkg, executor = "ni") {
|
|
|
7308
6820
|
} else {
|
|
7309
6821
|
successMsg = pkg ? isZh3 ? `${pkg} \u5B89\u88C5\u6210\u529F! \u{1F60A}` : `Installed ${pkg} successfully! \u{1F60A}` : isZh3 ? "\u4F9D\u8D56\u66F4\u65B0\u6210\u529F! \u{1F60A}" : "Updated dependency successfully! \u{1F60A}";
|
|
7310
6822
|
}
|
|
7311
|
-
const failMsg = pkg ? isZh3 ? `${
|
|
6823
|
+
const failMsg = pkg ? isZh3 ? `${params} \u5B89\u88C5\u5931\u8D25 \u{1F62D}` : `Failed to install ${params} \u{1F62D}` : isZh3 ? "\u4F9D\u8D56\u66F4\u65B0\u5931\u8D25 \u{1F62D}" : "Failed to update dependency \u{1F62D}";
|
|
7312
6824
|
const newParams = isLatest ? params : await getParams(params);
|
|
7313
6825
|
let stdio = "pipe";
|
|
7314
6826
|
let loading_status;
|
|
@@ -7409,17 +6921,20 @@ async function pil(params) {
|
|
|
7409
6921
|
params = names.join(" ");
|
|
7410
6922
|
}
|
|
7411
6923
|
let latestPkgname = params;
|
|
7412
|
-
let suffix = "";
|
|
7413
6924
|
const reg = /\s(-[dDwW]+)/g;
|
|
7414
|
-
|
|
7415
|
-
|
|
7416
|
-
|
|
7417
|
-
|
|
6925
|
+
const suffix = [];
|
|
6926
|
+
let command = latestPkgname = (await getParams(params)).replace(
|
|
6927
|
+
reg,
|
|
6928
|
+
(_, k) => {
|
|
6929
|
+
suffix.push(k);
|
|
6930
|
+
return "";
|
|
6931
|
+
}
|
|
6932
|
+
);
|
|
7418
6933
|
latestPkgname = latestPkgname.replaceAll("@latest", "").split(" ").map((i) => {
|
|
7419
6934
|
const v = dependencies[i] || devDependencies[i];
|
|
7420
6935
|
return `${i}$${v}`;
|
|
7421
6936
|
}).join(" ");
|
|
7422
|
-
|
|
6937
|
+
command = command.replace(/\s+/, " ").split(" ").map((i, index) => `${i} ${suffix[index] || "-s"}`).join(" ");
|
|
7423
6938
|
return await pi(command, latestPkgname.replaceAll("@latest", ""), "pil");
|
|
7424
6939
|
}
|
|
7425
6940
|
|
|
@@ -7576,7 +7091,7 @@ async function setup() {
|
|
|
7576
7091
|
`${isZh5 ? "\u6B63\u5728\u4E3A\u60A8\u5B89\u88C5" : "Installing"} ${params} ...
|
|
7577
7092
|
`
|
|
7578
7093
|
);
|
|
7579
|
-
const { status } = await (0, import_lazy_js_utils13.useNodeWorker)(`go get ${params}`);
|
|
7094
|
+
const { status } = params ? await (0, import_lazy_js_utils13.useNodeWorker)(`go get ${params}`) : await (0, import_lazy_js_utils13.useNodeWorker)("go mod tidy");
|
|
7580
7095
|
if (status === 0) {
|
|
7581
7096
|
loading_status.succeed(
|
|
7582
7097
|
import_picocolors7.default.green(isZh5 ? "\u5B89\u88C5\u6210\u529F! \u{1F60A}" : "Installed successfully! \u{1F60A}")
|
|
@@ -7604,11 +7119,7 @@ async function setup() {
|
|
|
7604
7119
|
} else if (exec === "prun") {
|
|
7605
7120
|
const match = params ? params.endsWith(".go") ? [`**/${params}`] : [`**/${params}.go`, `**/${params}/main.go`] : "main.go";
|
|
7606
7121
|
const target = (await (0, import_fast_glob.default)(match))[0];
|
|
7607
|
-
|
|
7608
|
-
console.log(import_picocolors7.default.red("No such file"));
|
|
7609
|
-
import_process3.default.exit(1);
|
|
7610
|
-
}
|
|
7611
|
-
(0, import_lazy_js_utils13.jsShell)(`go run ${target}`);
|
|
7122
|
+
return target ? (0, import_lazy_js_utils13.jsShell)(`go run ${target}`) : (0, import_ccommand2.ccommand)(params);
|
|
7612
7123
|
} else if (exec === "pinit") {
|
|
7613
7124
|
(0, import_lazy_js_utils13.jsShell)(`go mod init ${params}`);
|
|
7614
7125
|
} else if (exec === "pbuild") {
|