@simon_he/pi 0.0.91 → 0.0.93

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.
Files changed (3) hide show
  1. package/dist/index.cjs +585 -79
  2. package/dist/index.js +602 -96
  3. package/package.json +6 -6
package/dist/index.cjs CHANGED
@@ -61,12 +61,12 @@ var __privateWrapper = (obj, member, setter, getter) => ({
61
61
  }
62
62
  });
63
63
 
64
- // node_modules/.pnpm/picocolors@1.0.1/node_modules/picocolors/picocolors.js
64
+ // node_modules/picocolors/picocolors.js
65
65
  var require_picocolors = __commonJS({
66
- "node_modules/.pnpm/picocolors@1.0.1/node_modules/picocolors/picocolors.js"(exports, module2) {
66
+ "node_modules/picocolors/picocolors.js"(exports, module2) {
67
67
  var argv = process.argv || [];
68
- var env2 = process.env;
69
- var isColorSupported = !("NO_COLOR" in env2 || argv.includes("--no-color")) && ("FORCE_COLOR" in env2 || argv.includes("--color") || process.platform === "win32" || require != null && require("tty").isatty(1) && env2.TERM !== "dumb" || "CI" in env2);
68
+ var env3 = process.env;
69
+ 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);
70
70
  var formatter = (open, close, replace = open) => (input) => {
71
71
  let string = "" + input;
72
72
  let index = string.indexOf(close, open.length);
@@ -110,7 +110,23 @@ var require_picocolors = __commonJS({
110
110
  bgBlue: init("\x1B[44m", "\x1B[49m"),
111
111
  bgMagenta: init("\x1B[45m", "\x1B[49m"),
112
112
  bgCyan: init("\x1B[46m", "\x1B[49m"),
113
- bgWhite: init("\x1B[47m", "\x1B[49m")
113
+ bgWhite: init("\x1B[47m", "\x1B[49m"),
114
+ blackBright: init("\x1B[90m", "\x1B[39m"),
115
+ redBright: init("\x1B[91m", "\x1B[39m"),
116
+ greenBright: init("\x1B[92m", "\x1B[39m"),
117
+ yellowBright: init("\x1B[93m", "\x1B[39m"),
118
+ blueBright: init("\x1B[94m", "\x1B[39m"),
119
+ magentaBright: init("\x1B[95m", "\x1B[39m"),
120
+ cyanBright: init("\x1B[96m", "\x1B[39m"),
121
+ whiteBright: init("\x1B[97m", "\x1B[39m"),
122
+ bgBlackBright: init("\x1B[100m", "\x1B[49m"),
123
+ bgRedBright: init("\x1B[101m", "\x1B[49m"),
124
+ bgGreenBright: init("\x1B[102m", "\x1B[49m"),
125
+ bgYellowBright: init("\x1B[103m", "\x1B[49m"),
126
+ bgBlueBright: init("\x1B[104m", "\x1B[49m"),
127
+ bgMagentaBright: init("\x1B[105m", "\x1B[49m"),
128
+ bgCyanBright: init("\x1B[106m", "\x1B[49m"),
129
+ bgWhiteBright: init("\x1B[107m", "\x1B[49m")
114
130
  };
115
131
  };
116
132
  module2.exports = createColors();
@@ -211,11 +227,11 @@ var require_signals = __commonJS({
211
227
  // node_modules/.pnpm/signal-exit@3.0.7/node_modules/signal-exit/index.js
212
228
  var require_signal_exit = __commonJS({
213
229
  "node_modules/.pnpm/signal-exit@3.0.7/node_modules/signal-exit/index.js"(exports, module2) {
214
- var process12 = global.process;
215
- var processOk = function(process13) {
216
- return process13 && typeof process13 === "object" && typeof process13.removeListener === "function" && typeof process13.emit === "function" && typeof process13.reallyExit === "function" && typeof process13.listeners === "function" && typeof process13.kill === "function" && typeof process13.pid === "number" && typeof process13.on === "function";
230
+ var process13 = global.process;
231
+ var processOk = function(process14) {
232
+ 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";
217
233
  };
218
- if (!processOk(process12)) {
234
+ if (!processOk(process13)) {
219
235
  module2.exports = function() {
220
236
  return function() {
221
237
  };
@@ -223,15 +239,15 @@ var require_signal_exit = __commonJS({
223
239
  } else {
224
240
  assert = require("assert");
225
241
  signals = require_signals();
226
- isWin2 = /^win/i.test(process12.platform);
242
+ isWin2 = /^win/i.test(process13.platform);
227
243
  EE = require("events");
228
244
  if (typeof EE !== "function") {
229
245
  EE = EE.EventEmitter;
230
246
  }
231
- if (process12.__signal_exit_emitter__) {
232
- emitter = process12.__signal_exit_emitter__;
247
+ if (process13.__signal_exit_emitter__) {
248
+ emitter = process13.__signal_exit_emitter__;
233
249
  } else {
234
- emitter = process12.__signal_exit_emitter__ = new EE();
250
+ emitter = process13.__signal_exit_emitter__ = new EE();
235
251
  emitter.count = 0;
236
252
  emitter.emitted = {};
237
253
  }
@@ -268,12 +284,12 @@ var require_signal_exit = __commonJS({
268
284
  loaded = false;
269
285
  signals.forEach(function(sig) {
270
286
  try {
271
- process12.removeListener(sig, sigListeners[sig]);
287
+ process13.removeListener(sig, sigListeners[sig]);
272
288
  } catch (er) {
273
289
  }
274
290
  });
275
- process12.emit = originalProcessEmit;
276
- process12.reallyExit = originalProcessReallyExit;
291
+ process13.emit = originalProcessEmit;
292
+ process13.reallyExit = originalProcessReallyExit;
277
293
  emitter.count -= 1;
278
294
  };
279
295
  module2.exports.unload = unload;
@@ -290,7 +306,7 @@ var require_signal_exit = __commonJS({
290
306
  if (!processOk(global.process)) {
291
307
  return;
292
308
  }
293
- var listeners = process12.listeners(sig);
309
+ var listeners = process13.listeners(sig);
294
310
  if (listeners.length === emitter.count) {
295
311
  unload();
296
312
  emit("exit", null, sig);
@@ -298,7 +314,7 @@ var require_signal_exit = __commonJS({
298
314
  if (isWin2 && sig === "SIGHUP") {
299
315
  sig = "SIGINT";
300
316
  }
301
- process12.kill(process12.pid, sig);
317
+ process13.kill(process13.pid, sig);
302
318
  }
303
319
  };
304
320
  });
@@ -314,36 +330,36 @@ var require_signal_exit = __commonJS({
314
330
  emitter.count += 1;
315
331
  signals = signals.filter(function(sig) {
316
332
  try {
317
- process12.on(sig, sigListeners[sig]);
333
+ process13.on(sig, sigListeners[sig]);
318
334
  return true;
319
335
  } catch (er) {
320
336
  return false;
321
337
  }
322
338
  });
323
- process12.emit = processEmit;
324
- process12.reallyExit = processReallyExit;
339
+ process13.emit = processEmit;
340
+ process13.reallyExit = processReallyExit;
325
341
  };
326
342
  module2.exports.load = load;
327
- originalProcessReallyExit = process12.reallyExit;
343
+ originalProcessReallyExit = process13.reallyExit;
328
344
  processReallyExit = function processReallyExit2(code) {
329
345
  if (!processOk(global.process)) {
330
346
  return;
331
347
  }
332
- process12.exitCode = code || /* istanbul ignore next */
348
+ process13.exitCode = code || /* istanbul ignore next */
333
349
  0;
334
- emit("exit", process12.exitCode, null);
335
- emit("afterexit", process12.exitCode, null);
336
- originalProcessReallyExit.call(process12, process12.exitCode);
350
+ emit("exit", process13.exitCode, null);
351
+ emit("afterexit", process13.exitCode, null);
352
+ originalProcessReallyExit.call(process13, process13.exitCode);
337
353
  };
338
- originalProcessEmit = process12.emit;
354
+ originalProcessEmit = process13.emit;
339
355
  processEmit = function processEmit2(ev, arg) {
340
356
  if (ev === "exit" && processOk(global.process)) {
341
357
  if (arg !== void 0) {
342
- process12.exitCode = arg;
358
+ process13.exitCode = arg;
343
359
  }
344
360
  var ret = originalProcessEmit.apply(this, arguments);
345
- emit("exit", process12.exitCode, null);
346
- emit("afterexit", process12.exitCode, null);
361
+ emit("exit", process13.exitCode, null);
362
+ emit("afterexit", process13.exitCode, null);
347
363
  return ret;
348
364
  } else {
349
365
  return originalProcessEmit.apply(this, arguments);
@@ -2038,7 +2054,7 @@ var require_clone = __commonJS({
2038
2054
  if (depth2 == 0)
2039
2055
  return parent2;
2040
2056
  var child;
2041
- var proto2;
2057
+ var proto3;
2042
2058
  if (typeof parent2 != "object") {
2043
2059
  return parent2;
2044
2060
  }
@@ -2060,11 +2076,11 @@ var require_clone = __commonJS({
2060
2076
  return child;
2061
2077
  } else {
2062
2078
  if (typeof prototype == "undefined") {
2063
- proto2 = Object.getPrototypeOf(parent2);
2064
- child = Object.create(proto2);
2079
+ proto3 = Object.getPrototypeOf(parent2);
2080
+ child = Object.create(proto3);
2065
2081
  } else {
2066
2082
  child = Object.create(prototype);
2067
- proto2 = prototype;
2083
+ proto3 = prototype;
2068
2084
  }
2069
2085
  }
2070
2086
  if (circular) {
@@ -2077,8 +2093,8 @@ var require_clone = __commonJS({
2077
2093
  }
2078
2094
  for (var i in parent2) {
2079
2095
  var attrs;
2080
- if (proto2) {
2081
- attrs = Object.getOwnPropertyDescriptor(proto2, i);
2096
+ if (proto3) {
2097
+ attrs = Object.getOwnPropertyDescriptor(proto3, i);
2082
2098
  }
2083
2099
  if (attrs && attrs.set == null) {
2084
2100
  continue;
@@ -5675,9 +5691,9 @@ var import_path = __toESM(require("path"), 1);
5675
5691
  var import_lazy_js_utils = require("lazy-js-utils");
5676
5692
 
5677
5693
  // node_modules/.pnpm/ora@6.3.1/node_modules/ora/index.js
5678
- var import_node_process6 = __toESM(require("process"), 1);
5694
+ var import_node_process7 = __toESM(require("process"), 1);
5679
5695
 
5680
- // node_modules/.pnpm/chalk@5.3.0/node_modules/chalk/source/vendor/ansi-styles/index.js
5696
+ // node_modules/.pnpm/ora@6.3.1/node_modules/ora/node_modules/chalk/source/vendor/ansi-styles/index.js
5681
5697
  var ANSI_BACKGROUND_OFFSET = 10;
5682
5698
  var wrapAnsi16 = (offset = 0) => (code) => `\x1B[${code + offset}m`;
5683
5699
  var wrapAnsi256 = (offset = 0) => (code) => `\x1B[${38 + offset};5;${code}m`;
@@ -5863,7 +5879,7 @@ function assembleStyles() {
5863
5879
  var ansiStyles = assembleStyles();
5864
5880
  var ansi_styles_default = ansiStyles;
5865
5881
 
5866
- // node_modules/.pnpm/chalk@5.3.0/node_modules/chalk/source/vendor/supports-color/index.js
5882
+ // node_modules/.pnpm/ora@6.3.1/node_modules/ora/node_modules/chalk/source/vendor/supports-color/index.js
5867
5883
  var import_node_process = __toESM(require("process"), 1);
5868
5884
  var import_node_os = __toESM(require("os"), 1);
5869
5885
  var import_node_tty = __toESM(require("tty"), 1);
@@ -5989,7 +6005,7 @@ var supportsColor = {
5989
6005
  };
5990
6006
  var supports_color_default = supportsColor;
5991
6007
 
5992
- // node_modules/.pnpm/chalk@5.3.0/node_modules/chalk/source/utilities.js
6008
+ // node_modules/.pnpm/ora@6.3.1/node_modules/ora/node_modules/chalk/source/utilities.js
5993
6009
  function stringReplaceAll(string, substring, replacer) {
5994
6010
  let index = string.indexOf(substring);
5995
6011
  if (index === -1) {
@@ -6019,7 +6035,7 @@ function stringEncaseCRLFWithFirstIndex(string, prefix, postfix, index) {
6019
6035
  return returnValue;
6020
6036
  }
6021
6037
 
6022
- // node_modules/.pnpm/chalk@5.3.0/node_modules/chalk/source/index.js
6038
+ // node_modules/.pnpm/ora@6.3.1/node_modules/ora/node_modules/chalk/source/index.js
6023
6039
  var { stdout: stdoutColor, stderr: stderrColor } = supports_color_default;
6024
6040
  var GENERATOR = Symbol("GENERATOR");
6025
6041
  var STYLER = Symbol("STYLER");
@@ -6039,10 +6055,10 @@ var applyOptions = (object, options = {}) => {
6039
6055
  object.level = options.level === void 0 ? colorLevel : options.level;
6040
6056
  };
6041
6057
  var chalkFactory = (options) => {
6042
- const chalk2 = (...strings) => strings.join(" ");
6043
- applyOptions(chalk2, options);
6044
- Object.setPrototypeOf(chalk2, createChalk.prototype);
6045
- return chalk2;
6058
+ const chalk3 = (...strings) => strings.join(" ");
6059
+ applyOptions(chalk3, options);
6060
+ Object.setPrototypeOf(chalk3, createChalk.prototype);
6061
+ return chalk3;
6046
6062
  };
6047
6063
  function createChalk(options) {
6048
6064
  return chalkFactory(options);
@@ -6213,41 +6229,531 @@ var cli_cursor_default = cliCursor;
6213
6229
  // node_modules/.pnpm/ora@6.3.1/node_modules/ora/index.js
6214
6230
  var import_cli_spinners = __toESM(require_cli_spinners(), 1);
6215
6231
 
6216
- // node_modules/.pnpm/is-unicode-supported@1.3.0/node_modules/is-unicode-supported/index.js
6232
+ // node_modules/.pnpm/chalk@5.3.0/node_modules/chalk/source/vendor/ansi-styles/index.js
6233
+ var ANSI_BACKGROUND_OFFSET2 = 10;
6234
+ var wrapAnsi162 = (offset = 0) => (code) => `\x1B[${code + offset}m`;
6235
+ var wrapAnsi2562 = (offset = 0) => (code) => `\x1B[${38 + offset};5;${code}m`;
6236
+ var wrapAnsi16m2 = (offset = 0) => (red, green, blue) => `\x1B[${38 + offset};2;${red};${green};${blue}m`;
6237
+ var styles3 = {
6238
+ modifier: {
6239
+ reset: [0, 0],
6240
+ // 21 isn't widely supported and 22 does the same thing
6241
+ bold: [1, 22],
6242
+ dim: [2, 22],
6243
+ italic: [3, 23],
6244
+ underline: [4, 24],
6245
+ overline: [53, 55],
6246
+ inverse: [7, 27],
6247
+ hidden: [8, 28],
6248
+ strikethrough: [9, 29]
6249
+ },
6250
+ color: {
6251
+ black: [30, 39],
6252
+ red: [31, 39],
6253
+ green: [32, 39],
6254
+ yellow: [33, 39],
6255
+ blue: [34, 39],
6256
+ magenta: [35, 39],
6257
+ cyan: [36, 39],
6258
+ white: [37, 39],
6259
+ // Bright color
6260
+ blackBright: [90, 39],
6261
+ gray: [90, 39],
6262
+ // Alias of `blackBright`
6263
+ grey: [90, 39],
6264
+ // Alias of `blackBright`
6265
+ redBright: [91, 39],
6266
+ greenBright: [92, 39],
6267
+ yellowBright: [93, 39],
6268
+ blueBright: [94, 39],
6269
+ magentaBright: [95, 39],
6270
+ cyanBright: [96, 39],
6271
+ whiteBright: [97, 39]
6272
+ },
6273
+ bgColor: {
6274
+ bgBlack: [40, 49],
6275
+ bgRed: [41, 49],
6276
+ bgGreen: [42, 49],
6277
+ bgYellow: [43, 49],
6278
+ bgBlue: [44, 49],
6279
+ bgMagenta: [45, 49],
6280
+ bgCyan: [46, 49],
6281
+ bgWhite: [47, 49],
6282
+ // Bright color
6283
+ bgBlackBright: [100, 49],
6284
+ bgGray: [100, 49],
6285
+ // Alias of `bgBlackBright`
6286
+ bgGrey: [100, 49],
6287
+ // Alias of `bgBlackBright`
6288
+ bgRedBright: [101, 49],
6289
+ bgGreenBright: [102, 49],
6290
+ bgYellowBright: [103, 49],
6291
+ bgBlueBright: [104, 49],
6292
+ bgMagentaBright: [105, 49],
6293
+ bgCyanBright: [106, 49],
6294
+ bgWhiteBright: [107, 49]
6295
+ }
6296
+ };
6297
+ var modifierNames2 = Object.keys(styles3.modifier);
6298
+ var foregroundColorNames2 = Object.keys(styles3.color);
6299
+ var backgroundColorNames2 = Object.keys(styles3.bgColor);
6300
+ var colorNames2 = [...foregroundColorNames2, ...backgroundColorNames2];
6301
+ function assembleStyles2() {
6302
+ const codes = /* @__PURE__ */ new Map();
6303
+ for (const [groupName, group] of Object.entries(styles3)) {
6304
+ for (const [styleName, style] of Object.entries(group)) {
6305
+ styles3[styleName] = {
6306
+ open: `\x1B[${style[0]}m`,
6307
+ close: `\x1B[${style[1]}m`
6308
+ };
6309
+ group[styleName] = styles3[styleName];
6310
+ codes.set(style[0], style[1]);
6311
+ }
6312
+ Object.defineProperty(styles3, groupName, {
6313
+ value: group,
6314
+ enumerable: false
6315
+ });
6316
+ }
6317
+ Object.defineProperty(styles3, "codes", {
6318
+ value: codes,
6319
+ enumerable: false
6320
+ });
6321
+ styles3.color.close = "\x1B[39m";
6322
+ styles3.bgColor.close = "\x1B[49m";
6323
+ styles3.color.ansi = wrapAnsi162();
6324
+ styles3.color.ansi256 = wrapAnsi2562();
6325
+ styles3.color.ansi16m = wrapAnsi16m2();
6326
+ styles3.bgColor.ansi = wrapAnsi162(ANSI_BACKGROUND_OFFSET2);
6327
+ styles3.bgColor.ansi256 = wrapAnsi2562(ANSI_BACKGROUND_OFFSET2);
6328
+ styles3.bgColor.ansi16m = wrapAnsi16m2(ANSI_BACKGROUND_OFFSET2);
6329
+ Object.defineProperties(styles3, {
6330
+ rgbToAnsi256: {
6331
+ value(red, green, blue) {
6332
+ if (red === green && green === blue) {
6333
+ if (red < 8) {
6334
+ return 16;
6335
+ }
6336
+ if (red > 248) {
6337
+ return 231;
6338
+ }
6339
+ return Math.round((red - 8) / 247 * 24) + 232;
6340
+ }
6341
+ return 16 + 36 * Math.round(red / 255 * 5) + 6 * Math.round(green / 255 * 5) + Math.round(blue / 255 * 5);
6342
+ },
6343
+ enumerable: false
6344
+ },
6345
+ hexToRgb: {
6346
+ value(hex) {
6347
+ const matches = /[a-f\d]{6}|[a-f\d]{3}/i.exec(hex.toString(16));
6348
+ if (!matches) {
6349
+ return [0, 0, 0];
6350
+ }
6351
+ let [colorString] = matches;
6352
+ if (colorString.length === 3) {
6353
+ colorString = [...colorString].map((character) => character + character).join("");
6354
+ }
6355
+ const integer = Number.parseInt(colorString, 16);
6356
+ return [
6357
+ /* eslint-disable no-bitwise */
6358
+ integer >> 16 & 255,
6359
+ integer >> 8 & 255,
6360
+ integer & 255
6361
+ /* eslint-enable no-bitwise */
6362
+ ];
6363
+ },
6364
+ enumerable: false
6365
+ },
6366
+ hexToAnsi256: {
6367
+ value: (hex) => styles3.rgbToAnsi256(...styles3.hexToRgb(hex)),
6368
+ enumerable: false
6369
+ },
6370
+ ansi256ToAnsi: {
6371
+ value(code) {
6372
+ if (code < 8) {
6373
+ return 30 + code;
6374
+ }
6375
+ if (code < 16) {
6376
+ return 90 + (code - 8);
6377
+ }
6378
+ let red;
6379
+ let green;
6380
+ let blue;
6381
+ if (code >= 232) {
6382
+ red = ((code - 232) * 10 + 8) / 255;
6383
+ green = red;
6384
+ blue = red;
6385
+ } else {
6386
+ code -= 16;
6387
+ const remainder = code % 36;
6388
+ red = Math.floor(code / 36) / 5;
6389
+ green = Math.floor(remainder / 6) / 5;
6390
+ blue = remainder % 6 / 5;
6391
+ }
6392
+ const value = Math.max(red, green, blue) * 2;
6393
+ if (value === 0) {
6394
+ return 30;
6395
+ }
6396
+ let result = 30 + (Math.round(blue) << 2 | Math.round(green) << 1 | Math.round(red));
6397
+ if (value === 2) {
6398
+ result += 60;
6399
+ }
6400
+ return result;
6401
+ },
6402
+ enumerable: false
6403
+ },
6404
+ rgbToAnsi: {
6405
+ value: (red, green, blue) => styles3.ansi256ToAnsi(styles3.rgbToAnsi256(red, green, blue)),
6406
+ enumerable: false
6407
+ },
6408
+ hexToAnsi: {
6409
+ value: (hex) => styles3.ansi256ToAnsi(styles3.hexToAnsi256(hex)),
6410
+ enumerable: false
6411
+ }
6412
+ });
6413
+ return styles3;
6414
+ }
6415
+ var ansiStyles2 = assembleStyles2();
6416
+ var ansi_styles_default2 = ansiStyles2;
6417
+
6418
+ // node_modules/.pnpm/chalk@5.3.0/node_modules/chalk/source/vendor/supports-color/index.js
6217
6419
  var import_node_process4 = __toESM(require("process"), 1);
6420
+ var import_node_os2 = __toESM(require("os"), 1);
6421
+ var import_node_tty2 = __toESM(require("tty"), 1);
6422
+ function hasFlag2(flag, argv = globalThis.Deno ? globalThis.Deno.args : import_node_process4.default.argv) {
6423
+ const prefix = flag.startsWith("-") ? "" : flag.length === 1 ? "-" : "--";
6424
+ const position = argv.indexOf(prefix + flag);
6425
+ const terminatorPosition = argv.indexOf("--");
6426
+ return position !== -1 && (terminatorPosition === -1 || position < terminatorPosition);
6427
+ }
6428
+ var { env: env2 } = import_node_process4.default;
6429
+ var flagForceColor2;
6430
+ if (hasFlag2("no-color") || hasFlag2("no-colors") || hasFlag2("color=false") || hasFlag2("color=never")) {
6431
+ flagForceColor2 = 0;
6432
+ } else if (hasFlag2("color") || hasFlag2("colors") || hasFlag2("color=true") || hasFlag2("color=always")) {
6433
+ flagForceColor2 = 1;
6434
+ }
6435
+ function envForceColor2() {
6436
+ if ("FORCE_COLOR" in env2) {
6437
+ if (env2.FORCE_COLOR === "true") {
6438
+ return 1;
6439
+ }
6440
+ if (env2.FORCE_COLOR === "false") {
6441
+ return 0;
6442
+ }
6443
+ return env2.FORCE_COLOR.length === 0 ? 1 : Math.min(Number.parseInt(env2.FORCE_COLOR, 10), 3);
6444
+ }
6445
+ }
6446
+ function translateLevel2(level) {
6447
+ if (level === 0) {
6448
+ return false;
6449
+ }
6450
+ return {
6451
+ level,
6452
+ hasBasic: true,
6453
+ has256: level >= 2,
6454
+ has16m: level >= 3
6455
+ };
6456
+ }
6457
+ function _supportsColor2(haveStream, { streamIsTTY, sniffFlags = true } = {}) {
6458
+ const noFlagForceColor = envForceColor2();
6459
+ if (noFlagForceColor !== void 0) {
6460
+ flagForceColor2 = noFlagForceColor;
6461
+ }
6462
+ const forceColor = sniffFlags ? flagForceColor2 : noFlagForceColor;
6463
+ if (forceColor === 0) {
6464
+ return 0;
6465
+ }
6466
+ if (sniffFlags) {
6467
+ if (hasFlag2("color=16m") || hasFlag2("color=full") || hasFlag2("color=truecolor")) {
6468
+ return 3;
6469
+ }
6470
+ if (hasFlag2("color=256")) {
6471
+ return 2;
6472
+ }
6473
+ }
6474
+ if ("TF_BUILD" in env2 && "AGENT_NAME" in env2) {
6475
+ return 1;
6476
+ }
6477
+ if (haveStream && !streamIsTTY && forceColor === void 0) {
6478
+ return 0;
6479
+ }
6480
+ const min = forceColor || 0;
6481
+ if (env2.TERM === "dumb") {
6482
+ return min;
6483
+ }
6484
+ if (import_node_process4.default.platform === "win32") {
6485
+ const osRelease = import_node_os2.default.release().split(".");
6486
+ if (Number(osRelease[0]) >= 10 && Number(osRelease[2]) >= 10586) {
6487
+ return Number(osRelease[2]) >= 14931 ? 3 : 2;
6488
+ }
6489
+ return 1;
6490
+ }
6491
+ if ("CI" in env2) {
6492
+ if ("GITHUB_ACTIONS" in env2 || "GITEA_ACTIONS" in env2) {
6493
+ return 3;
6494
+ }
6495
+ if (["TRAVIS", "CIRCLECI", "APPVEYOR", "GITLAB_CI", "BUILDKITE", "DRONE"].some((sign) => sign in env2) || env2.CI_NAME === "codeship") {
6496
+ return 1;
6497
+ }
6498
+ return min;
6499
+ }
6500
+ if ("TEAMCITY_VERSION" in env2) {
6501
+ return /^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(env2.TEAMCITY_VERSION) ? 1 : 0;
6502
+ }
6503
+ if (env2.COLORTERM === "truecolor") {
6504
+ return 3;
6505
+ }
6506
+ if (env2.TERM === "xterm-kitty") {
6507
+ return 3;
6508
+ }
6509
+ if ("TERM_PROGRAM" in env2) {
6510
+ const version2 = Number.parseInt((env2.TERM_PROGRAM_VERSION || "").split(".")[0], 10);
6511
+ switch (env2.TERM_PROGRAM) {
6512
+ case "iTerm.app": {
6513
+ return version2 >= 3 ? 3 : 2;
6514
+ }
6515
+ case "Apple_Terminal": {
6516
+ return 2;
6517
+ }
6518
+ }
6519
+ }
6520
+ if (/-256(color)?$/i.test(env2.TERM)) {
6521
+ return 2;
6522
+ }
6523
+ if (/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(env2.TERM)) {
6524
+ return 1;
6525
+ }
6526
+ if ("COLORTERM" in env2) {
6527
+ return 1;
6528
+ }
6529
+ return min;
6530
+ }
6531
+ function createSupportsColor2(stream, options = {}) {
6532
+ const level = _supportsColor2(stream, {
6533
+ streamIsTTY: stream && stream.isTTY,
6534
+ ...options
6535
+ });
6536
+ return translateLevel2(level);
6537
+ }
6538
+ var supportsColor2 = {
6539
+ stdout: createSupportsColor2({ isTTY: import_node_tty2.default.isatty(1) }),
6540
+ stderr: createSupportsColor2({ isTTY: import_node_tty2.default.isatty(2) })
6541
+ };
6542
+ var supports_color_default2 = supportsColor2;
6543
+
6544
+ // node_modules/.pnpm/chalk@5.3.0/node_modules/chalk/source/utilities.js
6545
+ function stringReplaceAll2(string, substring, replacer) {
6546
+ let index = string.indexOf(substring);
6547
+ if (index === -1) {
6548
+ return string;
6549
+ }
6550
+ const substringLength = substring.length;
6551
+ let endIndex = 0;
6552
+ let returnValue = "";
6553
+ do {
6554
+ returnValue += string.slice(endIndex, index) + substring + replacer;
6555
+ endIndex = index + substringLength;
6556
+ index = string.indexOf(substring, endIndex);
6557
+ } while (index !== -1);
6558
+ returnValue += string.slice(endIndex);
6559
+ return returnValue;
6560
+ }
6561
+ function stringEncaseCRLFWithFirstIndex2(string, prefix, postfix, index) {
6562
+ let endIndex = 0;
6563
+ let returnValue = "";
6564
+ do {
6565
+ const gotCR = string[index - 1] === "\r";
6566
+ returnValue += string.slice(endIndex, gotCR ? index - 1 : index) + prefix + (gotCR ? "\r\n" : "\n") + postfix;
6567
+ endIndex = index + 1;
6568
+ index = string.indexOf("\n", endIndex);
6569
+ } while (index !== -1);
6570
+ returnValue += string.slice(endIndex);
6571
+ return returnValue;
6572
+ }
6573
+
6574
+ // node_modules/.pnpm/chalk@5.3.0/node_modules/chalk/source/index.js
6575
+ var { stdout: stdoutColor2, stderr: stderrColor2 } = supports_color_default2;
6576
+ var GENERATOR2 = Symbol("GENERATOR");
6577
+ var STYLER2 = Symbol("STYLER");
6578
+ var IS_EMPTY2 = Symbol("IS_EMPTY");
6579
+ var levelMapping2 = [
6580
+ "ansi",
6581
+ "ansi",
6582
+ "ansi256",
6583
+ "ansi16m"
6584
+ ];
6585
+ var styles4 = /* @__PURE__ */ Object.create(null);
6586
+ var applyOptions2 = (object, options = {}) => {
6587
+ if (options.level && !(Number.isInteger(options.level) && options.level >= 0 && options.level <= 3)) {
6588
+ throw new Error("The `level` option should be an integer from 0 to 3");
6589
+ }
6590
+ const colorLevel = stdoutColor2 ? stdoutColor2.level : 0;
6591
+ object.level = options.level === void 0 ? colorLevel : options.level;
6592
+ };
6593
+ var chalkFactory2 = (options) => {
6594
+ const chalk3 = (...strings) => strings.join(" ");
6595
+ applyOptions2(chalk3, options);
6596
+ Object.setPrototypeOf(chalk3, createChalk2.prototype);
6597
+ return chalk3;
6598
+ };
6599
+ function createChalk2(options) {
6600
+ return chalkFactory2(options);
6601
+ }
6602
+ Object.setPrototypeOf(createChalk2.prototype, Function.prototype);
6603
+ for (const [styleName, style] of Object.entries(ansi_styles_default2)) {
6604
+ styles4[styleName] = {
6605
+ get() {
6606
+ const builder = createBuilder2(this, createStyler2(style.open, style.close, this[STYLER2]), this[IS_EMPTY2]);
6607
+ Object.defineProperty(this, styleName, { value: builder });
6608
+ return builder;
6609
+ }
6610
+ };
6611
+ }
6612
+ styles4.visible = {
6613
+ get() {
6614
+ const builder = createBuilder2(this, this[STYLER2], true);
6615
+ Object.defineProperty(this, "visible", { value: builder });
6616
+ return builder;
6617
+ }
6618
+ };
6619
+ var getModelAnsi2 = (model, level, type, ...arguments_) => {
6620
+ if (model === "rgb") {
6621
+ if (level === "ansi16m") {
6622
+ return ansi_styles_default2[type].ansi16m(...arguments_);
6623
+ }
6624
+ if (level === "ansi256") {
6625
+ return ansi_styles_default2[type].ansi256(ansi_styles_default2.rgbToAnsi256(...arguments_));
6626
+ }
6627
+ return ansi_styles_default2[type].ansi(ansi_styles_default2.rgbToAnsi(...arguments_));
6628
+ }
6629
+ if (model === "hex") {
6630
+ return getModelAnsi2("rgb", level, type, ...ansi_styles_default2.hexToRgb(...arguments_));
6631
+ }
6632
+ return ansi_styles_default2[type][model](...arguments_);
6633
+ };
6634
+ var usedModels2 = ["rgb", "hex", "ansi256"];
6635
+ for (const model of usedModels2) {
6636
+ styles4[model] = {
6637
+ get() {
6638
+ const { level } = this;
6639
+ return function(...arguments_) {
6640
+ const styler = createStyler2(getModelAnsi2(model, levelMapping2[level], "color", ...arguments_), ansi_styles_default2.color.close, this[STYLER2]);
6641
+ return createBuilder2(this, styler, this[IS_EMPTY2]);
6642
+ };
6643
+ }
6644
+ };
6645
+ const bgModel = "bg" + model[0].toUpperCase() + model.slice(1);
6646
+ styles4[bgModel] = {
6647
+ get() {
6648
+ const { level } = this;
6649
+ return function(...arguments_) {
6650
+ const styler = createStyler2(getModelAnsi2(model, levelMapping2[level], "bgColor", ...arguments_), ansi_styles_default2.bgColor.close, this[STYLER2]);
6651
+ return createBuilder2(this, styler, this[IS_EMPTY2]);
6652
+ };
6653
+ }
6654
+ };
6655
+ }
6656
+ var proto2 = Object.defineProperties(() => {
6657
+ }, {
6658
+ ...styles4,
6659
+ level: {
6660
+ enumerable: true,
6661
+ get() {
6662
+ return this[GENERATOR2].level;
6663
+ },
6664
+ set(level) {
6665
+ this[GENERATOR2].level = level;
6666
+ }
6667
+ }
6668
+ });
6669
+ var createStyler2 = (open, close, parent) => {
6670
+ let openAll;
6671
+ let closeAll;
6672
+ if (parent === void 0) {
6673
+ openAll = open;
6674
+ closeAll = close;
6675
+ } else {
6676
+ openAll = parent.openAll + open;
6677
+ closeAll = close + parent.closeAll;
6678
+ }
6679
+ return {
6680
+ open,
6681
+ close,
6682
+ openAll,
6683
+ closeAll,
6684
+ parent
6685
+ };
6686
+ };
6687
+ var createBuilder2 = (self2, _styler, _isEmpty) => {
6688
+ const builder = (...arguments_) => applyStyle2(builder, arguments_.length === 1 ? "" + arguments_[0] : arguments_.join(" "));
6689
+ Object.setPrototypeOf(builder, proto2);
6690
+ builder[GENERATOR2] = self2;
6691
+ builder[STYLER2] = _styler;
6692
+ builder[IS_EMPTY2] = _isEmpty;
6693
+ return builder;
6694
+ };
6695
+ var applyStyle2 = (self2, string) => {
6696
+ if (self2.level <= 0 || !string) {
6697
+ return self2[IS_EMPTY2] ? "" : string;
6698
+ }
6699
+ let styler = self2[STYLER2];
6700
+ if (styler === void 0) {
6701
+ return string;
6702
+ }
6703
+ const { openAll, closeAll } = styler;
6704
+ if (string.includes("\x1B")) {
6705
+ while (styler !== void 0) {
6706
+ string = stringReplaceAll2(string, styler.close, styler.open);
6707
+ styler = styler.parent;
6708
+ }
6709
+ }
6710
+ const lfIndex = string.indexOf("\n");
6711
+ if (lfIndex !== -1) {
6712
+ string = stringEncaseCRLFWithFirstIndex2(string, closeAll, openAll, lfIndex);
6713
+ }
6714
+ return openAll + string + closeAll;
6715
+ };
6716
+ Object.defineProperties(createChalk2.prototype, styles4);
6717
+ var chalk2 = createChalk2();
6718
+ var chalkStderr2 = createChalk2({ level: stderrColor2 ? stderrColor2.level : 0 });
6719
+ var source_default2 = chalk2;
6720
+
6721
+ // node_modules/.pnpm/is-unicode-supported@1.3.0/node_modules/is-unicode-supported/index.js
6722
+ var import_node_process5 = __toESM(require("process"), 1);
6218
6723
  function isUnicodeSupported() {
6219
- if (import_node_process4.default.platform !== "win32") {
6220
- return import_node_process4.default.env.TERM !== "linux";
6724
+ if (import_node_process5.default.platform !== "win32") {
6725
+ return import_node_process5.default.env.TERM !== "linux";
6221
6726
  }
6222
- 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";
6727
+ return Boolean(import_node_process5.default.env.CI) || Boolean(import_node_process5.default.env.WT_SESSION) || Boolean(import_node_process5.default.env.TERMINUS_SUBLIME) || import_node_process5.default.env.ConEmuTask === "{cmd::Cmder}" || import_node_process5.default.env.TERM_PROGRAM === "Terminus-Sublime" || import_node_process5.default.env.TERM_PROGRAM === "vscode" || import_node_process5.default.env.TERM === "xterm-256color" || import_node_process5.default.env.TERM === "alacritty" || import_node_process5.default.env.TERMINAL_EMULATOR === "JetBrains-JediTerm";
6223
6728
  }
6224
6729
 
6225
6730
  // node_modules/.pnpm/log-symbols@5.1.0/node_modules/log-symbols/index.js
6226
6731
  var main = {
6227
- info: source_default.blue("\u2139"),
6228
- success: source_default.green("\u2714"),
6229
- warning: source_default.yellow("\u26A0"),
6230
- error: source_default.red("\u2716")
6732
+ info: source_default2.blue("\u2139"),
6733
+ success: source_default2.green("\u2714"),
6734
+ warning: source_default2.yellow("\u26A0"),
6735
+ error: source_default2.red("\u2716")
6231
6736
  };
6232
6737
  var fallback = {
6233
- info: source_default.blue("i"),
6234
- success: source_default.green("\u221A"),
6235
- warning: source_default.yellow("\u203C"),
6236
- error: source_default.red("\xD7")
6738
+ info: source_default2.blue("i"),
6739
+ success: source_default2.green("\u221A"),
6740
+ warning: source_default2.yellow("\u203C"),
6741
+ error: source_default2.red("\xD7")
6237
6742
  };
6238
6743
  var logSymbols = isUnicodeSupported() ? main : fallback;
6239
6744
  var log_symbols_default = logSymbols;
6240
6745
 
6241
- // node_modules/.pnpm/ansi-regex@6.0.1/node_modules/ansi-regex/index.js
6746
+ // node_modules/.pnpm/ora@6.3.1/node_modules/ora/node_modules/strip-ansi/node_modules/ansi-regex/index.js
6242
6747
  function ansiRegex({ onlyFirst = false } = {}) {
6748
+ const ST = "(?:\\u0007|\\u001B\\u005C|\\u009C)";
6243
6749
  const pattern = [
6244
- "[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)",
6245
- "(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-ntqry=><~]))"
6750
+ `[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?${ST})`,
6751
+ "(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-nq-uy=><~]))"
6246
6752
  ].join("|");
6247
6753
  return new RegExp(pattern, onlyFirst ? void 0 : "g");
6248
6754
  }
6249
6755
 
6250
- // node_modules/.pnpm/strip-ansi@7.1.0/node_modules/strip-ansi/index.js
6756
+ // node_modules/.pnpm/ora@6.3.1/node_modules/ora/node_modules/strip-ansi/index.js
6251
6757
  var regex = ansiRegex();
6252
6758
  function stripAnsi(string) {
6253
6759
  if (typeof string !== "string") {
@@ -6267,7 +6773,7 @@ function isInteractive({ stream = process.stdout } = {}) {
6267
6773
  }
6268
6774
 
6269
6775
  // node_modules/.pnpm/stdin-discarder@0.1.0/node_modules/stdin-discarder/index.js
6270
- var import_node_process5 = __toESM(require("process"), 1);
6776
+ var import_node_process6 = __toESM(require("process"), 1);
6271
6777
  var import_node_readline = __toESM(require("readline"), 1);
6272
6778
  var import_bl = __toESM(require_bl(), 1);
6273
6779
  var ASCII_ETX_CODE = 3;
@@ -6278,20 +6784,20 @@ var StdinDiscarder = class {
6278
6784
  __privateAdd(this, _mutedStream, new import_bl.BufferListStream());
6279
6785
  __privateAdd(this, _ourEmit, void 0);
6280
6786
  __privateAdd(this, _rl, void 0);
6281
- __privateGet(this, _mutedStream).pipe(import_node_process5.default.stdout);
6787
+ __privateGet(this, _mutedStream).pipe(import_node_process6.default.stdout);
6282
6788
  const self2 = this;
6283
6789
  __privateSet(this, _ourEmit, function(event, data, ...arguments_) {
6284
- const { stdin } = import_node_process5.default;
6790
+ const { stdin } = import_node_process6.default;
6285
6791
  if (__privateGet(self2, _requests) > 0 || stdin.emit === __privateGet(self2, _ourEmit)) {
6286
6792
  if (event === "keypress") {
6287
6793
  return;
6288
6794
  }
6289
6795
  if (event === "data" && data.includes(ASCII_ETX_CODE)) {
6290
- import_node_process5.default.emit("SIGINT");
6796
+ import_node_process6.default.emit("SIGINT");
6291
6797
  }
6292
6798
  Reflect.apply(__privateGet(self2, _ourEmit), this, [event, data, ...arguments_]);
6293
6799
  } else {
6294
- Reflect.apply(import_node_process5.default.stdin.emit, this, [event, data, ...arguments_]);
6800
+ Reflect.apply(import_node_process6.default.stdin.emit, this, [event, data, ...arguments_]);
6295
6801
  }
6296
6802
  });
6297
6803
  }
@@ -6312,24 +6818,24 @@ var StdinDiscarder = class {
6312
6818
  }
6313
6819
  // TODO: Use private methods when targeting Node.js 14.
6314
6820
  _realStart() {
6315
- if (import_node_process5.default.platform === "win32") {
6821
+ if (import_node_process6.default.platform === "win32") {
6316
6822
  return;
6317
6823
  }
6318
6824
  __privateSet(this, _rl, import_node_readline.default.createInterface({
6319
- input: import_node_process5.default.stdin,
6825
+ input: import_node_process6.default.stdin,
6320
6826
  output: __privateGet(this, _mutedStream)
6321
6827
  }));
6322
6828
  __privateGet(this, _rl).on("SIGINT", () => {
6323
- if (import_node_process5.default.listenerCount("SIGINT") === 0) {
6324
- import_node_process5.default.emit("SIGINT");
6829
+ if (import_node_process6.default.listenerCount("SIGINT") === 0) {
6830
+ import_node_process6.default.emit("SIGINT");
6325
6831
  } else {
6326
6832
  __privateGet(this, _rl).close();
6327
- import_node_process5.default.kill(import_node_process5.default.pid, "SIGINT");
6833
+ import_node_process6.default.kill(import_node_process6.default.pid, "SIGINT");
6328
6834
  }
6329
6835
  });
6330
6836
  }
6331
6837
  _realStop() {
6332
- if (import_node_process5.default.platform === "win32") {
6838
+ if (import_node_process6.default.platform === "win32") {
6333
6839
  return;
6334
6840
  }
6335
6841
  __privateGet(this, _rl).close();
@@ -6371,7 +6877,7 @@ var Ora = class {
6371
6877
  }
6372
6878
  __privateSet(this, _options, {
6373
6879
  color: "cyan",
6374
- stream: import_node_process6.default.stderr,
6880
+ stream: import_node_process7.default.stderr,
6375
6881
  discardStdin: true,
6376
6882
  hideCursor: true,
6377
6883
  ...options
@@ -6386,7 +6892,7 @@ var Ora = class {
6386
6892
  this.prefixText = __privateGet(this, _options).prefixText;
6387
6893
  this.suffixText = __privateGet(this, _options).suffixText;
6388
6894
  this.indent = __privateGet(this, _options).indent;
6389
- if (import_node_process6.default.env.NODE_ENV === "test") {
6895
+ if (import_node_process7.default.env.NODE_ENV === "test") {
6390
6896
  this._stream = __privateGet(this, _stream);
6391
6897
  this._isEnabled = __privateGet(this, _isEnabled);
6392
6898
  Object.defineProperty(this, "_linesToClear", {
@@ -6573,7 +7079,7 @@ var Ora = class {
6573
7079
  if (__privateGet(this, _options).hideCursor) {
6574
7080
  cli_cursor_default.hide(__privateGet(this, _stream));
6575
7081
  }
6576
- if (__privateGet(this, _options).discardStdin && import_node_process6.default.stdin.isTTY) {
7082
+ if (__privateGet(this, _options).discardStdin && import_node_process7.default.stdin.isTTY) {
6577
7083
  __privateSet(this, _isDiscardingStdin, true);
6578
7084
  stdin_discarder_default.start();
6579
7085
  }
@@ -6592,7 +7098,7 @@ var Ora = class {
6592
7098
  if (__privateGet(this, _options).hideCursor) {
6593
7099
  cli_cursor_default.show(__privateGet(this, _stream));
6594
7100
  }
6595
- if (__privateGet(this, _options).discardStdin && import_node_process6.default.stdin.isTTY && __privateGet(this, _isDiscardingStdin)) {
7101
+ if (__privateGet(this, _options).discardStdin && import_node_process7.default.stdin.isTTY && __privateGet(this, _isDiscardingStdin)) {
6596
7102
  stdin_discarder_default.stop();
6597
7103
  __privateSet(this, _isDiscardingStdin, false);
6598
7104
  }
@@ -6752,14 +7258,14 @@ function getLatestVersion(pkg, isZh6 = true) {
6752
7258
  throw new Error(result);
6753
7259
  }
6754
7260
  }
6755
- return `${data.join(" ")}${isZh6 ? " \u5B89\u88C5\u6210\u529F! \u{1F60A}" : "successfully! \u{1F60A}"}`;
7261
+ return `${data.join(" ")}${isZh6 ? " \u5B89\u88C5\u6210\u529F! \u{1F60A}" : " successfully! \u{1F60A}"}`;
6756
7262
  }
6757
7263
 
6758
7264
  // src/help.ts
6759
7265
  var import_lazy_js_utils2 = require("lazy-js-utils");
6760
7266
 
6761
7267
  // package.json
6762
- var version = "0.0.91";
7268
+ var version = "0.0.93";
6763
7269
 
6764
7270
  // src/help.ts
6765
7271
  var isZh2 = process.env.PI_Lang === "zh";
@@ -6901,7 +7407,7 @@ async function pi(params, pkg, executor = "ni") {
6901
7407
  stdio,
6902
7408
  errorExit: false
6903
7409
  });
6904
- if (result.includes("pnpm versions with respective Node.js version support")) {
7410
+ if (result && result.includes("pnpm versions with respective Node.js version support")) {
6905
7411
  (0, import_console.log)(result);
6906
7412
  (0, import_console.log)(
6907
7413
  import_picocolors4.default.yellow(