@simon_he/pi 0.0.93 → 0.0.95

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.js CHANGED
@@ -62,20 +62,19 @@ var __privateWrapper = (obj, member, setter, getter) => ({
62
62
  }
63
63
  });
64
64
 
65
- // node_modules/picocolors/picocolors.js
65
+ // node_modules/.pnpm/picocolors@1.1.1/node_modules/picocolors/picocolors.js
66
66
  var require_picocolors = __commonJS({
67
- "node_modules/picocolors/picocolors.js"(exports, module) {
68
- var argv = process.argv || [];
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);
67
+ "node_modules/.pnpm/picocolors@1.1.1/node_modules/picocolors/picocolors.js"(exports, module) {
68
+ var p = process || {};
69
+ var argv = p.argv || [];
70
+ var env2 = p.env || {};
71
+ var isColorSupported = !(!!env2.NO_COLOR || argv.includes("--no-color")) && (!!env2.FORCE_COLOR || argv.includes("--color") || p.platform === "win32" || (p.stdout || {}).isTTY && env2.TERM !== "dumb" || !!env2.CI);
71
72
  var formatter = (open, close, replace = open) => (input) => {
72
- let string = "" + input;
73
- let index = string.indexOf(close, open.length);
73
+ let string = "" + input, index = string.indexOf(close, open.length);
74
74
  return ~index ? open + replaceClose(string, close, replace, index) + close : open + string + close;
75
75
  };
76
76
  var replaceClose = (string, close, replace, index) => {
77
- let result = "";
78
- let cursor = 0;
77
+ let result = "", cursor = 0;
79
78
  do {
80
79
  result += string.substring(cursor, index) + replace;
81
80
  cursor = index + close.length;
@@ -84,50 +83,50 @@ var require_picocolors = __commonJS({
84
83
  return result + string.substring(cursor);
85
84
  };
86
85
  var createColors = (enabled = isColorSupported) => {
87
- let init = enabled ? formatter : () => String;
86
+ let f = enabled ? formatter : () => String;
88
87
  return {
89
88
  isColorSupported: enabled,
90
- reset: init("\x1B[0m", "\x1B[0m"),
91
- bold: init("\x1B[1m", "\x1B[22m", "\x1B[22m\x1B[1m"),
92
- dim: init("\x1B[2m", "\x1B[22m", "\x1B[22m\x1B[2m"),
93
- italic: init("\x1B[3m", "\x1B[23m"),
94
- underline: init("\x1B[4m", "\x1B[24m"),
95
- inverse: init("\x1B[7m", "\x1B[27m"),
96
- hidden: init("\x1B[8m", "\x1B[28m"),
97
- strikethrough: init("\x1B[9m", "\x1B[29m"),
98
- black: init("\x1B[30m", "\x1B[39m"),
99
- red: init("\x1B[31m", "\x1B[39m"),
100
- green: init("\x1B[32m", "\x1B[39m"),
101
- yellow: init("\x1B[33m", "\x1B[39m"),
102
- blue: init("\x1B[34m", "\x1B[39m"),
103
- magenta: init("\x1B[35m", "\x1B[39m"),
104
- cyan: init("\x1B[36m", "\x1B[39m"),
105
- white: init("\x1B[37m", "\x1B[39m"),
106
- gray: init("\x1B[90m", "\x1B[39m"),
107
- bgBlack: init("\x1B[40m", "\x1B[49m"),
108
- bgRed: init("\x1B[41m", "\x1B[49m"),
109
- bgGreen: init("\x1B[42m", "\x1B[49m"),
110
- bgYellow: init("\x1B[43m", "\x1B[49m"),
111
- bgBlue: init("\x1B[44m", "\x1B[49m"),
112
- bgMagenta: init("\x1B[45m", "\x1B[49m"),
113
- bgCyan: init("\x1B[46m", "\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")
89
+ reset: f("\x1B[0m", "\x1B[0m"),
90
+ bold: f("\x1B[1m", "\x1B[22m", "\x1B[22m\x1B[1m"),
91
+ dim: f("\x1B[2m", "\x1B[22m", "\x1B[22m\x1B[2m"),
92
+ italic: f("\x1B[3m", "\x1B[23m"),
93
+ underline: f("\x1B[4m", "\x1B[24m"),
94
+ inverse: f("\x1B[7m", "\x1B[27m"),
95
+ hidden: f("\x1B[8m", "\x1B[28m"),
96
+ strikethrough: f("\x1B[9m", "\x1B[29m"),
97
+ black: f("\x1B[30m", "\x1B[39m"),
98
+ red: f("\x1B[31m", "\x1B[39m"),
99
+ green: f("\x1B[32m", "\x1B[39m"),
100
+ yellow: f("\x1B[33m", "\x1B[39m"),
101
+ blue: f("\x1B[34m", "\x1B[39m"),
102
+ magenta: f("\x1B[35m", "\x1B[39m"),
103
+ cyan: f("\x1B[36m", "\x1B[39m"),
104
+ white: f("\x1B[37m", "\x1B[39m"),
105
+ gray: f("\x1B[90m", "\x1B[39m"),
106
+ bgBlack: f("\x1B[40m", "\x1B[49m"),
107
+ bgRed: f("\x1B[41m", "\x1B[49m"),
108
+ bgGreen: f("\x1B[42m", "\x1B[49m"),
109
+ bgYellow: f("\x1B[43m", "\x1B[49m"),
110
+ bgBlue: f("\x1B[44m", "\x1B[49m"),
111
+ bgMagenta: f("\x1B[45m", "\x1B[49m"),
112
+ bgCyan: f("\x1B[46m", "\x1B[49m"),
113
+ bgWhite: f("\x1B[47m", "\x1B[49m"),
114
+ blackBright: f("\x1B[90m", "\x1B[39m"),
115
+ redBright: f("\x1B[91m", "\x1B[39m"),
116
+ greenBright: f("\x1B[92m", "\x1B[39m"),
117
+ yellowBright: f("\x1B[93m", "\x1B[39m"),
118
+ blueBright: f("\x1B[94m", "\x1B[39m"),
119
+ magentaBright: f("\x1B[95m", "\x1B[39m"),
120
+ cyanBright: f("\x1B[96m", "\x1B[39m"),
121
+ whiteBright: f("\x1B[97m", "\x1B[39m"),
122
+ bgBlackBright: f("\x1B[100m", "\x1B[49m"),
123
+ bgRedBright: f("\x1B[101m", "\x1B[49m"),
124
+ bgGreenBright: f("\x1B[102m", "\x1B[49m"),
125
+ bgYellowBright: f("\x1B[103m", "\x1B[49m"),
126
+ bgBlueBright: f("\x1B[104m", "\x1B[49m"),
127
+ bgMagentaBright: f("\x1B[105m", "\x1B[49m"),
128
+ bgCyanBright: f("\x1B[106m", "\x1B[49m"),
129
+ bgWhiteBright: f("\x1B[107m", "\x1B[49m")
131
130
  };
132
131
  };
133
132
  module.exports = createColors();
@@ -228,11 +227,11 @@ var require_signals = __commonJS({
228
227
  // node_modules/.pnpm/signal-exit@3.0.7/node_modules/signal-exit/index.js
229
228
  var require_signal_exit = __commonJS({
230
229
  "node_modules/.pnpm/signal-exit@3.0.7/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";
230
+ var process12 = global.process;
231
+ var processOk = function(process13) {
232
+ 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";
234
233
  };
235
- if (!processOk(process13)) {
234
+ if (!processOk(process12)) {
236
235
  module.exports = function() {
237
236
  return function() {
238
237
  };
@@ -240,15 +239,15 @@ var require_signal_exit = __commonJS({
240
239
  } else {
241
240
  assert = __require("assert");
242
241
  signals = require_signals();
243
- isWin2 = /^win/i.test(process13.platform);
242
+ isWin2 = /^win/i.test(process12.platform);
244
243
  EE = __require("events");
245
244
  if (typeof EE !== "function") {
246
245
  EE = EE.EventEmitter;
247
246
  }
248
- if (process13.__signal_exit_emitter__) {
249
- emitter = process13.__signal_exit_emitter__;
247
+ if (process12.__signal_exit_emitter__) {
248
+ emitter = process12.__signal_exit_emitter__;
250
249
  } else {
251
- emitter = process13.__signal_exit_emitter__ = new EE();
250
+ emitter = process12.__signal_exit_emitter__ = new EE();
252
251
  emitter.count = 0;
253
252
  emitter.emitted = {};
254
253
  }
@@ -285,12 +284,12 @@ var require_signal_exit = __commonJS({
285
284
  loaded = false;
286
285
  signals.forEach(function(sig) {
287
286
  try {
288
- process13.removeListener(sig, sigListeners[sig]);
287
+ process12.removeListener(sig, sigListeners[sig]);
289
288
  } catch (er) {
290
289
  }
291
290
  });
292
- process13.emit = originalProcessEmit;
293
- process13.reallyExit = originalProcessReallyExit;
291
+ process12.emit = originalProcessEmit;
292
+ process12.reallyExit = originalProcessReallyExit;
294
293
  emitter.count -= 1;
295
294
  };
296
295
  module.exports.unload = unload;
@@ -307,7 +306,7 @@ var require_signal_exit = __commonJS({
307
306
  if (!processOk(global.process)) {
308
307
  return;
309
308
  }
310
- var listeners = process13.listeners(sig);
309
+ var listeners = process12.listeners(sig);
311
310
  if (listeners.length === emitter.count) {
312
311
  unload();
313
312
  emit("exit", null, sig);
@@ -315,7 +314,7 @@ var require_signal_exit = __commonJS({
315
314
  if (isWin2 && sig === "SIGHUP") {
316
315
  sig = "SIGINT";
317
316
  }
318
- process13.kill(process13.pid, sig);
317
+ process12.kill(process12.pid, sig);
319
318
  }
320
319
  };
321
320
  });
@@ -331,36 +330,36 @@ var require_signal_exit = __commonJS({
331
330
  emitter.count += 1;
332
331
  signals = signals.filter(function(sig) {
333
332
  try {
334
- process13.on(sig, sigListeners[sig]);
333
+ process12.on(sig, sigListeners[sig]);
335
334
  return true;
336
335
  } catch (er) {
337
336
  return false;
338
337
  }
339
338
  });
340
- process13.emit = processEmit;
341
- process13.reallyExit = processReallyExit;
339
+ process12.emit = processEmit;
340
+ process12.reallyExit = processReallyExit;
342
341
  };
343
342
  module.exports.load = load;
344
- originalProcessReallyExit = process13.reallyExit;
343
+ originalProcessReallyExit = process12.reallyExit;
345
344
  processReallyExit = function processReallyExit2(code) {
346
345
  if (!processOk(global.process)) {
347
346
  return;
348
347
  }
349
- process13.exitCode = code || /* istanbul ignore next */
348
+ process12.exitCode = code || /* istanbul ignore next */
350
349
  0;
351
- emit("exit", process13.exitCode, null);
352
- emit("afterexit", process13.exitCode, null);
353
- originalProcessReallyExit.call(process13, process13.exitCode);
350
+ emit("exit", process12.exitCode, null);
351
+ emit("afterexit", process12.exitCode, null);
352
+ originalProcessReallyExit.call(process12, process12.exitCode);
354
353
  };
355
- originalProcessEmit = process13.emit;
354
+ originalProcessEmit = process12.emit;
356
355
  processEmit = function processEmit2(ev, arg) {
357
356
  if (ev === "exit" && processOk(global.process)) {
358
357
  if (arg !== void 0) {
359
- process13.exitCode = arg;
358
+ process12.exitCode = arg;
360
359
  }
361
360
  var ret = originalProcessEmit.apply(this, arguments);
362
- emit("exit", process13.exitCode, null);
363
- emit("afterexit", process13.exitCode, null);
361
+ emit("exit", process12.exitCode, null);
362
+ emit("afterexit", process12.exitCode, null);
364
363
  return ret;
365
364
  } else {
366
365
  return originalProcessEmit.apply(this, arguments);
@@ -2055,7 +2054,7 @@ var require_clone = __commonJS({
2055
2054
  if (depth2 == 0)
2056
2055
  return parent2;
2057
2056
  var child;
2058
- var proto3;
2057
+ var proto2;
2059
2058
  if (typeof parent2 != "object") {
2060
2059
  return parent2;
2061
2060
  }
@@ -2077,11 +2076,11 @@ var require_clone = __commonJS({
2077
2076
  return child;
2078
2077
  } else {
2079
2078
  if (typeof prototype == "undefined") {
2080
- proto3 = Object.getPrototypeOf(parent2);
2081
- child = Object.create(proto3);
2079
+ proto2 = Object.getPrototypeOf(parent2);
2080
+ child = Object.create(proto2);
2082
2081
  } else {
2083
2082
  child = Object.create(prototype);
2084
- proto3 = prototype;
2083
+ proto2 = prototype;
2085
2084
  }
2086
2085
  }
2087
2086
  if (circular) {
@@ -2094,8 +2093,8 @@ var require_clone = __commonJS({
2094
2093
  }
2095
2094
  for (var i in parent2) {
2096
2095
  var attrs;
2097
- if (proto3) {
2098
- attrs = Object.getOwnPropertyDescriptor(proto3, i);
2096
+ if (proto2) {
2097
+ attrs = Object.getOwnPropertyDescriptor(proto2, i);
2099
2098
  }
2100
2099
  if (attrs && attrs.set == null) {
2101
2100
  continue;
@@ -5677,27 +5676,28 @@ var require_bl = __commonJS({
5677
5676
 
5678
5677
  // src/index.ts
5679
5678
  var import_picocolors8 = __toESM(require_picocolors(), 1);
5680
- import process12 from "process";
5679
+ import process11 from "process";
5680
+ import path2 from "path/posix";
5681
5681
  import {
5682
5682
  hasPkg,
5683
5683
  isGo,
5684
5684
  isRust,
5685
- isWin,
5686
5685
  jsShell as jsShell12,
5687
- spaceFormat,
5688
5686
  useNodeWorker as useNodeWorker4
5689
- } from "lazy-js-utils";
5687
+ } from "lazy-js-utils/dist/node";
5688
+ import { isWin, spaceFormat } from "lazy-js-utils";
5690
5689
  import fg from "fast-glob";
5691
5690
  import { ccommand as ccommand3 } from "ccommand";
5692
5691
 
5693
5692
  // src/utils.ts
5694
5693
  import path from "path";
5695
- import { getPkg, getPkgTool, isFile, jsShell } from "lazy-js-utils";
5694
+ import { getPkg, getPkgTool, jsShell } from "lazy-js-utils/dist/node";
5695
+ import { isFile } from "lazy-js-utils";
5696
5696
 
5697
5697
  // node_modules/.pnpm/ora@6.3.1/node_modules/ora/index.js
5698
- import process8 from "process";
5698
+ import process7 from "process";
5699
5699
 
5700
- // node_modules/.pnpm/ora@6.3.1/node_modules/ora/node_modules/chalk/source/vendor/ansi-styles/index.js
5700
+ // node_modules/.pnpm/chalk@5.3.0/node_modules/chalk/source/vendor/ansi-styles/index.js
5701
5701
  var ANSI_BACKGROUND_OFFSET = 10;
5702
5702
  var wrapAnsi16 = (offset = 0) => (code) => `\x1B[${code + offset}m`;
5703
5703
  var wrapAnsi256 = (offset = 0) => (code) => `\x1B[${38 + offset};5;${code}m`;
@@ -5883,7 +5883,7 @@ function assembleStyles() {
5883
5883
  var ansiStyles = assembleStyles();
5884
5884
  var ansi_styles_default = ansiStyles;
5885
5885
 
5886
- // node_modules/.pnpm/ora@6.3.1/node_modules/ora/node_modules/chalk/source/vendor/supports-color/index.js
5886
+ // node_modules/.pnpm/chalk@5.3.0/node_modules/chalk/source/vendor/supports-color/index.js
5887
5887
  import process2 from "process";
5888
5888
  import os from "os";
5889
5889
  import tty from "tty";
@@ -6009,7 +6009,7 @@ var supportsColor = {
6009
6009
  };
6010
6010
  var supports_color_default = supportsColor;
6011
6011
 
6012
- // node_modules/.pnpm/ora@6.3.1/node_modules/ora/node_modules/chalk/source/utilities.js
6012
+ // node_modules/.pnpm/chalk@5.3.0/node_modules/chalk/source/utilities.js
6013
6013
  function stringReplaceAll(string, substring, replacer) {
6014
6014
  let index = string.indexOf(substring);
6015
6015
  if (index === -1) {
@@ -6039,7 +6039,7 @@ function stringEncaseCRLFWithFirstIndex(string, prefix, postfix, index) {
6039
6039
  return returnValue;
6040
6040
  }
6041
6041
 
6042
- // node_modules/.pnpm/ora@6.3.1/node_modules/ora/node_modules/chalk/source/index.js
6042
+ // node_modules/.pnpm/chalk@5.3.0/node_modules/chalk/source/index.js
6043
6043
  var { stdout: stdoutColor, stderr: stderrColor } = supports_color_default;
6044
6044
  var GENERATOR = Symbol("GENERATOR");
6045
6045
  var STYLER = Symbol("STYLER");
@@ -6059,10 +6059,10 @@ var applyOptions = (object, options = {}) => {
6059
6059
  object.level = options.level === void 0 ? colorLevel : options.level;
6060
6060
  };
6061
6061
  var chalkFactory = (options) => {
6062
- const chalk3 = (...strings) => strings.join(" ");
6063
- applyOptions(chalk3, options);
6064
- Object.setPrototypeOf(chalk3, createChalk.prototype);
6065
- return chalk3;
6062
+ const chalk2 = (...strings) => strings.join(" ");
6063
+ applyOptions(chalk2, options);
6064
+ Object.setPrototypeOf(chalk2, createChalk.prototype);
6065
+ return chalk2;
6066
6066
  };
6067
6067
  function createChalk(options) {
6068
6068
  return chalkFactory(options);
@@ -6233,531 +6233,41 @@ var cli_cursor_default = cliCursor;
6233
6233
  // node_modules/.pnpm/ora@6.3.1/node_modules/ora/index.js
6234
6234
  var import_cli_spinners = __toESM(require_cli_spinners(), 1);
6235
6235
 
6236
- // node_modules/.pnpm/chalk@5.3.0/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/.pnpm/chalk@5.3.0/node_modules/chalk/source/vendor/supports-color/index.js
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/.pnpm/chalk@5.3.0/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/.pnpm/chalk@5.3.0/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
6236
  // node_modules/.pnpm/is-unicode-supported@1.3.0/node_modules/is-unicode-supported/index.js
6726
- import process6 from "process";
6237
+ import process5 from "process";
6727
6238
  function isUnicodeSupported() {
6728
- if (process6.platform !== "win32") {
6729
- return process6.env.TERM !== "linux";
6239
+ if (process5.platform !== "win32") {
6240
+ return process5.env.TERM !== "linux";
6730
6241
  }
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";
6242
+ return Boolean(process5.env.CI) || Boolean(process5.env.WT_SESSION) || Boolean(process5.env.TERMINUS_SUBLIME) || process5.env.ConEmuTask === "{cmd::Cmder}" || process5.env.TERM_PROGRAM === "Terminus-Sublime" || process5.env.TERM_PROGRAM === "vscode" || process5.env.TERM === "xterm-256color" || process5.env.TERM === "alacritty" || process5.env.TERMINAL_EMULATOR === "JetBrains-JediTerm";
6732
6243
  }
6733
6244
 
6734
6245
  // node_modules/.pnpm/log-symbols@5.1.0/node_modules/log-symbols/index.js
6735
6246
  var main = {
6736
- info: source_default2.blue("\u2139"),
6737
- success: source_default2.green("\u2714"),
6738
- warning: source_default2.yellow("\u26A0"),
6739
- error: source_default2.red("\u2716")
6247
+ info: source_default.blue("\u2139"),
6248
+ success: source_default.green("\u2714"),
6249
+ warning: source_default.yellow("\u26A0"),
6250
+ error: source_default.red("\u2716")
6740
6251
  };
6741
6252
  var fallback = {
6742
- info: source_default2.blue("i"),
6743
- success: source_default2.green("\u221A"),
6744
- warning: source_default2.yellow("\u203C"),
6745
- error: source_default2.red("\xD7")
6253
+ info: source_default.blue("i"),
6254
+ success: source_default.green("\u221A"),
6255
+ warning: source_default.yellow("\u203C"),
6256
+ error: source_default.red("\xD7")
6746
6257
  };
6747
6258
  var logSymbols = isUnicodeSupported() ? main : fallback;
6748
6259
  var log_symbols_default = logSymbols;
6749
6260
 
6750
- // node_modules/.pnpm/ora@6.3.1/node_modules/ora/node_modules/strip-ansi/node_modules/ansi-regex/index.js
6261
+ // node_modules/.pnpm/ansi-regex@6.0.1/node_modules/ansi-regex/index.js
6751
6262
  function ansiRegex({ onlyFirst = false } = {}) {
6752
- const ST = "(?:\\u0007|\\u001B\\u005C|\\u009C)";
6753
6263
  const pattern = [
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=><~]))"
6264
+ "[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)",
6265
+ "(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-ntqry=><~]))"
6756
6266
  ].join("|");
6757
6267
  return new RegExp(pattern, onlyFirst ? void 0 : "g");
6758
6268
  }
6759
6269
 
6760
- // node_modules/.pnpm/ora@6.3.1/node_modules/ora/node_modules/strip-ansi/index.js
6270
+ // node_modules/.pnpm/strip-ansi@7.1.0/node_modules/strip-ansi/index.js
6761
6271
  var regex = ansiRegex();
6762
6272
  function stripAnsi(string) {
6763
6273
  if (typeof string !== "string") {
@@ -6778,7 +6288,7 @@ function isInteractive({ stream = process.stdout } = {}) {
6778
6288
 
6779
6289
  // node_modules/.pnpm/stdin-discarder@0.1.0/node_modules/stdin-discarder/index.js
6780
6290
  var import_bl = __toESM(require_bl(), 1);
6781
- import process7 from "process";
6291
+ import process6 from "process";
6782
6292
  import readline from "readline";
6783
6293
  var ASCII_ETX_CODE = 3;
6784
6294
  var _requests, _mutedStream, _ourEmit, _rl;
@@ -6788,20 +6298,20 @@ var StdinDiscarder = class {
6788
6298
  __privateAdd(this, _mutedStream, new import_bl.BufferListStream());
6789
6299
  __privateAdd(this, _ourEmit, void 0);
6790
6300
  __privateAdd(this, _rl, void 0);
6791
- __privateGet(this, _mutedStream).pipe(process7.stdout);
6301
+ __privateGet(this, _mutedStream).pipe(process6.stdout);
6792
6302
  const self2 = this;
6793
6303
  __privateSet(this, _ourEmit, function(event, data, ...arguments_) {
6794
- const { stdin } = process7;
6304
+ const { stdin } = process6;
6795
6305
  if (__privateGet(self2, _requests) > 0 || stdin.emit === __privateGet(self2, _ourEmit)) {
6796
6306
  if (event === "keypress") {
6797
6307
  return;
6798
6308
  }
6799
6309
  if (event === "data" && data.includes(ASCII_ETX_CODE)) {
6800
- process7.emit("SIGINT");
6310
+ process6.emit("SIGINT");
6801
6311
  }
6802
6312
  Reflect.apply(__privateGet(self2, _ourEmit), this, [event, data, ...arguments_]);
6803
6313
  } else {
6804
- Reflect.apply(process7.stdin.emit, this, [event, data, ...arguments_]);
6314
+ Reflect.apply(process6.stdin.emit, this, [event, data, ...arguments_]);
6805
6315
  }
6806
6316
  });
6807
6317
  }
@@ -6822,24 +6332,24 @@ var StdinDiscarder = class {
6822
6332
  }
6823
6333
  // TODO: Use private methods when targeting Node.js 14.
6824
6334
  _realStart() {
6825
- if (process7.platform === "win32") {
6335
+ if (process6.platform === "win32") {
6826
6336
  return;
6827
6337
  }
6828
6338
  __privateSet(this, _rl, readline.createInterface({
6829
- input: process7.stdin,
6339
+ input: process6.stdin,
6830
6340
  output: __privateGet(this, _mutedStream)
6831
6341
  }));
6832
6342
  __privateGet(this, _rl).on("SIGINT", () => {
6833
- if (process7.listenerCount("SIGINT") === 0) {
6834
- process7.emit("SIGINT");
6343
+ if (process6.listenerCount("SIGINT") === 0) {
6344
+ process6.emit("SIGINT");
6835
6345
  } else {
6836
6346
  __privateGet(this, _rl).close();
6837
- process7.kill(process7.pid, "SIGINT");
6347
+ process6.kill(process6.pid, "SIGINT");
6838
6348
  }
6839
6349
  });
6840
6350
  }
6841
6351
  _realStop() {
6842
- if (process7.platform === "win32") {
6352
+ if (process6.platform === "win32") {
6843
6353
  return;
6844
6354
  }
6845
6355
  __privateGet(this, _rl).close();
@@ -6881,7 +6391,7 @@ var Ora = class {
6881
6391
  }
6882
6392
  __privateSet(this, _options, {
6883
6393
  color: "cyan",
6884
- stream: process8.stderr,
6394
+ stream: process7.stderr,
6885
6395
  discardStdin: true,
6886
6396
  hideCursor: true,
6887
6397
  ...options
@@ -6896,7 +6406,7 @@ var Ora = class {
6896
6406
  this.prefixText = __privateGet(this, _options).prefixText;
6897
6407
  this.suffixText = __privateGet(this, _options).suffixText;
6898
6408
  this.indent = __privateGet(this, _options).indent;
6899
- if (process8.env.NODE_ENV === "test") {
6409
+ if (process7.env.NODE_ENV === "test") {
6900
6410
  this._stream = __privateGet(this, _stream);
6901
6411
  this._isEnabled = __privateGet(this, _isEnabled);
6902
6412
  Object.defineProperty(this, "_linesToClear", {
@@ -7083,7 +6593,7 @@ var Ora = class {
7083
6593
  if (__privateGet(this, _options).hideCursor) {
7084
6594
  cli_cursor_default.hide(__privateGet(this, _stream));
7085
6595
  }
7086
- if (__privateGet(this, _options).discardStdin && process8.stdin.isTTY) {
6596
+ if (__privateGet(this, _options).discardStdin && process7.stdin.isTTY) {
7087
6597
  __privateSet(this, _isDiscardingStdin, true);
7088
6598
  stdin_discarder_default.start();
7089
6599
  }
@@ -7102,7 +6612,7 @@ var Ora = class {
7102
6612
  if (__privateGet(this, _options).hideCursor) {
7103
6613
  cli_cursor_default.show(__privateGet(this, _stream));
7104
6614
  }
7105
- if (__privateGet(this, _options).discardStdin && process8.stdin.isTTY && __privateGet(this, _isDiscardingStdin)) {
6615
+ if (__privateGet(this, _options).discardStdin && process7.stdin.isTTY && __privateGet(this, _isDiscardingStdin)) {
7106
6616
  stdin_discarder_default.stop();
7107
6617
  __privateSet(this, _isDiscardingStdin, false);
7108
6618
  }
@@ -7248,11 +6758,15 @@ async function getStyle() {
7248
6758
  spinner
7249
6759
  };
7250
6760
  }
7251
- function getLatestVersion(pkg, isZh6 = true) {
6761
+ async function getLatestVersion(pkg, isZh6 = true) {
7252
6762
  const data = [];
7253
6763
  for (const p of pkg.replace(/\s+/, " ").split(" ")) {
7254
6764
  const [pName, v] = p.split("$");
7255
- let { status, result } = jsShell(`npm view ${pName}`, "pipe");
6765
+ let { status, result } = await jsShell(`npm view ${pName}`, [
6766
+ "inherit",
6767
+ "pipe",
6768
+ "inherit"
6769
+ ]);
7256
6770
  if (status === 0) {
7257
6771
  if (result.startsWith("@"))
7258
6772
  result = result.slice(1);
@@ -7266,10 +6780,10 @@ function getLatestVersion(pkg, isZh6 = true) {
7266
6780
  }
7267
6781
 
7268
6782
  // src/help.ts
7269
- import { jsShell as jsShell2 } from "lazy-js-utils";
6783
+ import { jsShell as jsShell2 } from "lazy-js-utils/dist/node";
7270
6784
 
7271
6785
  // package.json
7272
- var version = "0.0.93";
6786
+ var version = "0.0.95";
7273
6787
 
7274
6788
  // src/help.ts
7275
6789
  var isZh2 = process.env.PI_Lang === "zh";
@@ -7291,11 +6805,15 @@ function help(argv) {
7291
6805
 
7292
6806
  // src/installDeps.ts
7293
6807
  var import_picocolors2 = __toESM(require_picocolors(), 1);
7294
- import { isInstallPkg, jsShell as jsShell3 } from "lazy-js-utils";
6808
+ import { isInstallPkg, jsShell as jsShell3 } from "lazy-js-utils/dist/node";
7295
6809
  async function installDeps() {
7296
- if (!isInstallPkg("gum")) {
6810
+ if (!await isInstallPkg("gum")) {
7297
6811
  console.log(import_picocolors2.default.cyan("\u6B63\u5728\u4E3A\u60A8\u5B89\u88C5\u5FC5\u8981\u7684\u4F9D\u8D56gum..."));
7298
- const { status } = await jsShell3("brew install gum", "pipe");
6812
+ const { status } = await jsShell3("brew install gum", [
6813
+ "inherit",
6814
+ "pipe",
6815
+ "inherit"
6816
+ ]);
7299
6817
  if (status === 0) {
7300
6818
  console.log(import_picocolors2.default.cyan("gum \u5B89\u88C5\u6210\u529F!"));
7301
6819
  } else {
@@ -7307,9 +6825,13 @@ async function installDeps() {
7307
6825
  process.exit(1);
7308
6826
  }
7309
6827
  }
7310
- if (!isInstallPkg("ni")) {
6828
+ if (!await isInstallPkg("ni")) {
7311
6829
  console.log(import_picocolors2.default.cyan("\u6B63\u5728\u4E3A\u60A8\u5B89\u88C5\u5FC5\u8981\u7684\u4F9D\u8D56ni..."));
7312
- const { status } = await jsShell3("npm i -g @antfu/ni", "pipe");
6830
+ const { status } = await jsShell3("npm i -g @antfu/ni", [
6831
+ "inherit",
6832
+ "pipe",
6833
+ "inherit"
6834
+ ]);
7313
6835
  if (status === 0) {
7314
6836
  console.log(import_picocolors2.default.cyan("ni \u5B89\u88C5\u6210\u529F!"));
7315
6837
  } else {
@@ -7325,34 +6847,34 @@ async function installDeps() {
7325
6847
 
7326
6848
  // src/pi.ts
7327
6849
  var import_picocolors4 = __toESM(require_picocolors(), 1);
7328
- import process10 from "process";
6850
+ import process9 from "process";
7329
6851
  import { log } from "console";
7330
- import { getPkgTool as getPkgTool2, jsShell as jsShell5, useNodeWorker } from "lazy-js-utils";
6852
+ import { getPkgTool as getPkgTool2, jsShell as jsShell5, useNodeWorker } from "lazy-js-utils/dist/node";
7331
6853
 
7332
6854
  // src/detectNode.ts
7333
6855
  var import_picocolors3 = __toESM(require_picocolors(), 1);
7334
- import process9 from "process";
7335
- import { getPkg as getPkg2, jsShell as jsShell4 } from "lazy-js-utils";
6856
+ import process8 from "process";
6857
+ import { getPkg as getPkg2, jsShell as jsShell4 } from "lazy-js-utils/dist/node";
7336
6858
  async function detectNode() {
7337
6859
  var _a;
7338
6860
  let pkg;
7339
6861
  try {
7340
6862
  pkg = await getPkg2();
7341
6863
  } catch (e) {
7342
- const cwd = process9.cwd();
6864
+ const cwd = process8.cwd();
7343
6865
  console.log(import_picocolors3.default.red(`\u5F53\u524D\u76EE\u5F55: ${cwd} \u6CA1\u6709package.json\u6587\u4EF6`));
7344
- process9.exit(1);
6866
+ process8.exit(1);
7345
6867
  }
7346
6868
  if ((_a = pkg.engines) == null ? void 0 : _a.node) {
7347
6869
  const isSafe = __require("semver").satisfies(
7348
- process9.version,
6870
+ process8.version,
7349
6871
  pkg.engines.node
7350
6872
  );
7351
6873
  if (!isSafe) {
7352
6874
  const { result, status } = await jsShell4(
7353
6875
  `echo "yes
7354
6876
  no" | gum filter --placeholder=" \u5F53\u524Dnode\u7248\u672C\u4E0D\u6EE1\u8DB3 ${pkg.engines.node}\uFF0C\u662F\u5426\u5207\u6362node\u7248\u672C"`,
7355
- "pipe"
6877
+ ["inherit", "pipe", "inherit"]
7356
6878
  );
7357
6879
  if (status === 0 && result === "yes") {
7358
6880
  await jsShell4(
@@ -7364,7 +6886,7 @@ no" | gum filter --placeholder=" \u5F53\u524Dnode\u7248\u672C\u4E0D\u6EE1\u8DB3
7364
6886
  fnm use \${registery% -*}
7365
6887
  fi
7366
6888
  `,
7367
- "pipe"
6889
+ ["inherit", "pipe", "inherit"]
7368
6890
  );
7369
6891
  }
7370
6892
  }
@@ -7372,7 +6894,7 @@ no" | gum filter --placeholder=" \u5F53\u524Dnode\u7248\u672C\u4E0D\u6EE1\u8DB3
7372
6894
  }
7373
6895
 
7374
6896
  // src/pi.ts
7375
- var isZh3 = process10.env.PI_Lang === "zh";
6897
+ var isZh3 = process9.env.PI_Lang === "zh";
7376
6898
  async function pi(params, pkg, executor = "ni") {
7377
6899
  var _a;
7378
6900
  await detectNode();
@@ -7381,15 +6903,15 @@ async function pi(params, pkg, executor = "ni") {
7381
6903
  const start = Date.now();
7382
6904
  let successMsg = "";
7383
6905
  if (isLatest) {
7384
- successMsg = getLatestVersion(pkg, isZh3);
6906
+ successMsg = await getLatestVersion(pkg, isZh3);
7385
6907
  } else {
7386
6908
  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}";
7387
6909
  }
7388
6910
  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}";
7389
6911
  const newParams = isLatest ? params : await getParams(params);
7390
- let stdio = "pipe";
6912
+ let stdio = ["inherit", "pipe", "inherit"];
7391
6913
  let loading_status;
7392
- const { PI_DEFAULT, PI_MaxSockets: sockets } = process10.env;
6914
+ const { PI_DEFAULT, PI_MaxSockets: sockets } = process9.env;
7393
6915
  const pkgTool = await getPkgTool2();
7394
6916
  const maxSockets = sockets || 4;
7395
6917
  const install = PI_DEFAULT === "yarn" || pkgTool === "yarn" ? newParams ? "add" : "" : "install";
@@ -7418,7 +6940,7 @@ async function pi(params, pkg, executor = "ni") {
7418
6940
  isZh3 ? "\u6B63\u5728\u5C1D\u8BD5\u4F7F\u7528 npm \u518D\u6B21\u6267\u884C..." : "Trying to use npm to run again..."
7419
6941
  )
7420
6942
  );
7421
- const { status: newStatus, result: newResult } = jsShell5(
6943
+ const { status: newStatus, result: newResult } = await jsShell5(
7422
6944
  `npm install${newParams ? ` ${newParams}` : runSockets}`,
7423
6945
  {
7424
6946
  stdio
@@ -7451,11 +6973,11 @@ ${result}` : failMsg));
7451
6973
  jsShell5(`pi ${dep}@latest`);
7452
6974
  }
7453
6975
  }
7454
- process10.exit();
6976
+ process9.exit();
7455
6977
  }
7456
6978
 
7457
6979
  // src/pa.ts
7458
- import { jsShell as jsShell6 } from "lazy-js-utils";
6980
+ import { jsShell as jsShell6 } from "lazy-js-utils/dist/node";
7459
6981
  function pa() {
7460
6982
  return jsShell6("na");
7461
6983
  }
@@ -7473,7 +6995,7 @@ function pfind(params) {
7473
6995
 
7474
6996
  // src/pil.ts
7475
6997
  var import_picocolors5 = __toESM(require_picocolors(), 1);
7476
- import { getPkg as getPkg3, jsShell as jsShell7 } from "lazy-js-utils";
6998
+ import { getPkg as getPkg3, jsShell as jsShell7 } from "lazy-js-utils/dist/node";
7477
6999
  async function pil(params) {
7478
7000
  const { dependencies = {}, devDependencies = {} } = await getPkg3();
7479
7001
  if (!params) {
@@ -7483,11 +7005,13 @@ async function pil(params) {
7483
7005
  (key) => `${key}: ${devDependencies[key]}`
7484
7006
  )
7485
7007
  ];
7486
- const { result: choose, status } = jsShell7(
7008
+ const { result: choose, status } = await jsShell7(
7487
7009
  `echo ${deps.join(
7488
7010
  ","
7489
7011
  )} | 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."}"`,
7490
- "pipe"
7012
+ {
7013
+ stdio: ["inherit", "pipe", "inherit"]
7014
+ }
7491
7015
  );
7492
7016
  if (status === 130) {
7493
7017
  console.log(import_picocolors5.default.dim("\u5DF2\u53D6\u6D88"));
@@ -7522,7 +7046,7 @@ async function pil(params) {
7522
7046
  }
7523
7047
 
7524
7048
  // src/pinit.ts
7525
- import { getPkgTool as getPkgTool3, jsShell as jsShell8 } from "lazy-js-utils";
7049
+ import { getPkgTool as getPkgTool3, jsShell as jsShell8 } from "lazy-js-utils/dist/node";
7526
7050
  async function pinit() {
7527
7051
  console.log("Initializing project...");
7528
7052
  switch (await getPkgTool3()) {
@@ -7541,7 +7065,7 @@ async function pinit() {
7541
7065
  }
7542
7066
 
7543
7067
  // src/pix.ts
7544
- import { getPkgTool as getPkgTool4, jsShell as jsShell9 } from "lazy-js-utils";
7068
+ import { getPkgTool as getPkgTool4, jsShell as jsShell9 } from "lazy-js-utils/dist/node";
7545
7069
  async function pix(params) {
7546
7070
  switch (await getPkgTool4()) {
7547
7071
  case "bun":
@@ -7558,14 +7082,14 @@ function prun(params) {
7558
7082
  }
7559
7083
 
7560
7084
  // src/pu.ts
7561
- import { jsShell as jsShell10 } from "lazy-js-utils";
7085
+ import { jsShell as jsShell10 } from "lazy-js-utils/dist/node";
7562
7086
  function pu() {
7563
7087
  return jsShell10("nu");
7564
7088
  }
7565
7089
 
7566
7090
  // src/pui.ts
7567
7091
  var import_picocolors6 = __toESM(require_picocolors(), 1);
7568
- import { getPkg as getPkg4, jsShell as jsShell11, useNodeWorker as useNodeWorker2 } from "lazy-js-utils";
7092
+ import { getPkg as getPkg4, jsShell as jsShell11, useNodeWorker as useNodeWorker2 } from "lazy-js-utils/dist/node";
7569
7093
  var isZh4 = process.env.PI_Lang === "zh";
7570
7094
  async function pui(params, pkg) {
7571
7095
  const text = `${isZh4 ? "\u6B63\u5728\u4E3A\u60A8\u5378\u8F7D" : "Uninstalling"} ${pkg} ...`;
@@ -7577,11 +7101,11 @@ async function pui(params, pkg) {
7577
7101
  (key) => `${key}: ${devDependencies[key]}`
7578
7102
  )
7579
7103
  ];
7580
- const { result: choose, status: status2 } = jsShell11(
7104
+ const { result: choose, status: status2 } = await jsShell11(
7581
7105
  `echo ${deps.join(
7582
7106
  ","
7583
7107
  )} | sed "s/,/\\n/g" | gum filter --placeholder=" \u{1F914}${process.env.PI_Lang === "zh" ? "\u8BF7\u9009\u62E9\u4E00\u4E2A\u9700\u8981\u5220\u9664\u4F9D\u8D56" : "Please select a dependency to get the latest version."}"`,
7584
- "pipe"
7108
+ ["inherit", "pipe", "inherit"]
7585
7109
  );
7586
7110
  if (status2 === 130) {
7587
7111
  console.log(import_picocolors6.default.dim("\u5DF2\u53D6\u6D88"));
@@ -7617,8 +7141,8 @@ ${result}` : failMsg));
7617
7141
 
7618
7142
  // src/pio.ts
7619
7143
  var import_picocolors7 = __toESM(require_picocolors(), 1);
7620
- import process11 from "process";
7621
- import { useNodeWorker as useNodeWorker3 } from "lazy-js-utils";
7144
+ import process10 from "process";
7145
+ import { useNodeWorker as useNodeWorker3 } from "lazy-js-utils/dist/node";
7622
7146
  async function pio(params, pkg, executor = "ni") {
7623
7147
  const successMsg = pkg ? `Installed ${pkg} successfully! \u{1F60A}` : "Updated dependency successfully! \u{1F60A}";
7624
7148
  const failMsg = pkg ? `Failed to install ${pkg} \u{1F62D}` : "Failed to update dependency! \u{1F62D}";
@@ -7635,11 +7159,11 @@ async function pio(params, pkg, executor = "ni") {
7635
7159
  loading_status.fail(import_picocolors7.default.red(result ? `${result}
7636
7160
 
7637
7161
  ${failMsg}` : failMsg));
7638
- process11.exit();
7162
+ process10.exit();
7639
7163
  }
7640
7164
 
7641
7165
  // src/index.ts
7642
- var rootPath = process12.cwd();
7166
+ var rootPath = process11.cwd();
7643
7167
  var runMap = {
7644
7168
  pi,
7645
7169
  pix,
@@ -7653,9 +7177,9 @@ var runMap = {
7653
7177
  pfind,
7654
7178
  pio
7655
7179
  };
7656
- var isZh5 = process12.env.PI_Lang === "zh";
7180
+ var isZh5 = process11.env.PI_Lang === "zh";
7657
7181
  async function setup() {
7658
- const cmd = process12.argv[1];
7182
+ const cmd = process11.argv[1];
7659
7183
  let exec = "";
7660
7184
  if (isWin()) {
7661
7185
  const last = cmd.lastIndexOf("\\") + 1;
@@ -7664,11 +7188,11 @@ async function setup() {
7664
7188
  const last = cmd.lastIndexOf("/") + 1;
7665
7189
  exec = cmd.slice(last, cmd.length);
7666
7190
  }
7667
- const argv = process12.argv.slice(2);
7191
+ const argv = process11.argv.slice(2);
7668
7192
  help(argv);
7669
- const params = spaceFormat(argv.join(" ")).trim();
7670
- if (!hasPkg(rootPath)) {
7671
- if (isGo()) {
7193
+ let params = spaceFormat(argv.join(" ")).trim();
7194
+ if (!await hasPkg(rootPath)) {
7195
+ if (await isGo(rootPath)) {
7672
7196
  if (exec === "pi") {
7673
7197
  const loading_status = await loading(
7674
7198
  `${isZh5 ? "\u6B63\u5728\u4E3A\u60A8\u5B89\u88C5" : "Installing"} ${params} ...
@@ -7702,11 +7226,11 @@ async function setup() {
7702
7226
  } else if (exec === "prun") {
7703
7227
  const match = params ? params.endsWith(".go") ? [`**/${params}`] : [`**/${params}.go`, `**/${params}/main.go`] : "main.go";
7704
7228
  const target = (await fg(match))[0];
7705
- return target ? jsShell12(`go run ${target}`) : ccommand3(params);
7229
+ return target ? await jsShell12(`go run ${target}`, "inherit") : ccommand3(params);
7706
7230
  } else if (exec === "pinit") {
7707
- jsShell12(`go mod init ${params}`);
7231
+ await jsShell12(`go mod init ${params}`, "inherit");
7708
7232
  } else if (exec === "pbuild") {
7709
- jsShell12(`go build ${params}`);
7233
+ await jsShell12(`go build ${params}`, "inherit");
7710
7234
  } else {
7711
7235
  console.log(
7712
7236
  import_picocolors8.default.red(
@@ -7714,15 +7238,23 @@ async function setup() {
7714
7238
  )
7715
7239
  );
7716
7240
  }
7717
- process12.exit();
7241
+ process11.exit();
7718
7242
  }
7719
- if (isRust()) {
7243
+ let projectPath = "";
7244
+ if (params && !await isRust()) {
7245
+ projectPath = params.split(" ")[0];
7246
+ rootPath = path2.resolve(rootPath, projectPath);
7247
+ params = params.replace(projectPath, "").trim();
7248
+ }
7249
+ if (await isRust(rootPath)) {
7720
7250
  if (exec === "pi") {
7721
7251
  const loading_status = await loading(
7722
7252
  `${isZh5 ? "\u6B63\u5728\u4E3A\u60A8\u5B89\u88C5" : "Installing"} ${params} ...
7723
7253
  `
7724
7254
  );
7725
- const { status } = await useNodeWorker4(`cargo install ${params}`);
7255
+ const { status } = await useNodeWorker4(
7256
+ `cargo install ${params}${projectPath ? `--manifest-path=./${projectPath}/Cargo.toml` : ""}`
7257
+ );
7726
7258
  if (status === 0) {
7727
7259
  loading_status.succeed(
7728
7260
  import_picocolors8.default.green(isZh5 ? "\u5B89\u88C5\u6210\u529F! \u{1F60A}" : "Installed successfully! \u{1F60A}")
@@ -7737,7 +7269,9 @@ async function setup() {
7737
7269
  `${isZh5 ? "\u6B63\u5728\u4E3A\u60A8\u5378\u8F7D" : "Uninstalling"} ${params} ...
7738
7270
  `
7739
7271
  );
7740
- const { status } = await useNodeWorker4(`cargo uninstall ${params}`);
7272
+ const { status } = await useNodeWorker4(
7273
+ `cargo uninstall ${params}${projectPath ? `--manifest-path=./${projectPath}/Cargo.toml` : ""}`
7274
+ );
7741
7275
  if (status === 0) {
7742
7276
  loading_status.succeed(
7743
7277
  import_picocolors8.default.green(isZh5 ? "\u5378\u8F7D\u6210\u529F! \u{1F60A}" : "Uninstalled successfully! \u{1F60A}")
@@ -7748,11 +7282,20 @@ async function setup() {
7748
7282
  );
7749
7283
  }
7750
7284
  } else if (exec === "prun") {
7751
- jsShell12(`cargo run ${params}`);
7285
+ await jsShell12(
7286
+ `cargo run ${params}${projectPath ? `--manifest-path=./${projectPath}/Cargo.toml` : ""}`,
7287
+ "inherit"
7288
+ );
7752
7289
  } else if (exec === "pinit") {
7753
- jsShell12(`cargo init ${params}`);
7290
+ await jsShell12(
7291
+ `cargo init ${params}${projectPath ? `--manifest-path=./${projectPath}/Cargo.toml` : ""}`,
7292
+ "inherit"
7293
+ );
7754
7294
  } else if (exec === "pbuild") {
7755
- jsShell12(`cargo build ${params}`);
7295
+ await jsShell12(
7296
+ `cargo build ${params}${projectPath ? `--manifest-path=./${projectPath}/Cargo.toml` : ""}`,
7297
+ "inherit"
7298
+ );
7756
7299
  } else {
7757
7300
  console.log(
7758
7301
  import_picocolors8.default.red(
@@ -7760,12 +7303,12 @@ async function setup() {
7760
7303
  )
7761
7304
  );
7762
7305
  }
7763
- process12.exit();
7306
+ process11.exit();
7764
7307
  }
7765
7308
  if (!runMap[exec]) {
7766
7309
  console.log(
7767
7310
  import_picocolors8.default.yellow(
7768
- isZh5 ? "\u547D\u4EE4\u4E0D\u5B58\u5728\uFF0C\u8BF7\u6267\u884Cpi -h\u67E5\u770B\u5E2E\u52A9" : "The command does not exist, please execute pi -h to view the help"
7311
+ isZh5 ? "\u547D\u4EE4\u4E0D\u5B58\u5728, \u8BF7\u6267\u884C pi -h \u67E5\u770B\u5E2E\u52A9" : "The command does not exist, please execute pi -h to view the help"
7769
7312
  )
7770
7313
  );
7771
7314
  return;