@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.cjs CHANGED
@@ -61,20 +61,19 @@ var __privateWrapper = (obj, member, setter, getter) => ({
61
61
  }
62
62
  });
63
63
 
64
- // node_modules/picocolors/picocolors.js
64
+ // node_modules/.pnpm/picocolors@1.1.1/node_modules/picocolors/picocolors.js
65
65
  var require_picocolors = __commonJS({
66
- "node_modules/picocolors/picocolors.js"(exports, module2) {
67
- var argv = process.argv || [];
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);
66
+ "node_modules/.pnpm/picocolors@1.1.1/node_modules/picocolors/picocolors.js"(exports, module2) {
67
+ var p = process || {};
68
+ var argv = p.argv || [];
69
+ var env2 = p.env || {};
70
+ 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);
70
71
  var formatter = (open, close, replace = open) => (input) => {
71
- let string = "" + input;
72
- let index = string.indexOf(close, open.length);
72
+ let string = "" + input, index = string.indexOf(close, open.length);
73
73
  return ~index ? open + replaceClose(string, close, replace, index) + close : open + string + close;
74
74
  };
75
75
  var replaceClose = (string, close, replace, index) => {
76
- let result = "";
77
- let cursor = 0;
76
+ let result = "", cursor = 0;
78
77
  do {
79
78
  result += string.substring(cursor, index) + replace;
80
79
  cursor = index + close.length;
@@ -83,50 +82,50 @@ var require_picocolors = __commonJS({
83
82
  return result + string.substring(cursor);
84
83
  };
85
84
  var createColors = (enabled = isColorSupported) => {
86
- let init = enabled ? formatter : () => String;
85
+ let f = enabled ? formatter : () => String;
87
86
  return {
88
87
  isColorSupported: enabled,
89
- reset: init("\x1B[0m", "\x1B[0m"),
90
- bold: init("\x1B[1m", "\x1B[22m", "\x1B[22m\x1B[1m"),
91
- dim: init("\x1B[2m", "\x1B[22m", "\x1B[22m\x1B[2m"),
92
- italic: init("\x1B[3m", "\x1B[23m"),
93
- underline: init("\x1B[4m", "\x1B[24m"),
94
- inverse: init("\x1B[7m", "\x1B[27m"),
95
- hidden: init("\x1B[8m", "\x1B[28m"),
96
- strikethrough: init("\x1B[9m", "\x1B[29m"),
97
- black: init("\x1B[30m", "\x1B[39m"),
98
- red: init("\x1B[31m", "\x1B[39m"),
99
- green: init("\x1B[32m", "\x1B[39m"),
100
- yellow: init("\x1B[33m", "\x1B[39m"),
101
- blue: init("\x1B[34m", "\x1B[39m"),
102
- magenta: init("\x1B[35m", "\x1B[39m"),
103
- cyan: init("\x1B[36m", "\x1B[39m"),
104
- white: init("\x1B[37m", "\x1B[39m"),
105
- gray: init("\x1B[90m", "\x1B[39m"),
106
- bgBlack: init("\x1B[40m", "\x1B[49m"),
107
- bgRed: init("\x1B[41m", "\x1B[49m"),
108
- bgGreen: init("\x1B[42m", "\x1B[49m"),
109
- bgYellow: init("\x1B[43m", "\x1B[49m"),
110
- bgBlue: init("\x1B[44m", "\x1B[49m"),
111
- bgMagenta: init("\x1B[45m", "\x1B[49m"),
112
- bgCyan: init("\x1B[46m", "\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")
88
+ reset: f("\x1B[0m", "\x1B[0m"),
89
+ bold: f("\x1B[1m", "\x1B[22m", "\x1B[22m\x1B[1m"),
90
+ dim: f("\x1B[2m", "\x1B[22m", "\x1B[22m\x1B[2m"),
91
+ italic: f("\x1B[3m", "\x1B[23m"),
92
+ underline: f("\x1B[4m", "\x1B[24m"),
93
+ inverse: f("\x1B[7m", "\x1B[27m"),
94
+ hidden: f("\x1B[8m", "\x1B[28m"),
95
+ strikethrough: f("\x1B[9m", "\x1B[29m"),
96
+ black: f("\x1B[30m", "\x1B[39m"),
97
+ red: f("\x1B[31m", "\x1B[39m"),
98
+ green: f("\x1B[32m", "\x1B[39m"),
99
+ yellow: f("\x1B[33m", "\x1B[39m"),
100
+ blue: f("\x1B[34m", "\x1B[39m"),
101
+ magenta: f("\x1B[35m", "\x1B[39m"),
102
+ cyan: f("\x1B[36m", "\x1B[39m"),
103
+ white: f("\x1B[37m", "\x1B[39m"),
104
+ gray: f("\x1B[90m", "\x1B[39m"),
105
+ bgBlack: f("\x1B[40m", "\x1B[49m"),
106
+ bgRed: f("\x1B[41m", "\x1B[49m"),
107
+ bgGreen: f("\x1B[42m", "\x1B[49m"),
108
+ bgYellow: f("\x1B[43m", "\x1B[49m"),
109
+ bgBlue: f("\x1B[44m", "\x1B[49m"),
110
+ bgMagenta: f("\x1B[45m", "\x1B[49m"),
111
+ bgCyan: f("\x1B[46m", "\x1B[49m"),
112
+ bgWhite: f("\x1B[47m", "\x1B[49m"),
113
+ blackBright: f("\x1B[90m", "\x1B[39m"),
114
+ redBright: f("\x1B[91m", "\x1B[39m"),
115
+ greenBright: f("\x1B[92m", "\x1B[39m"),
116
+ yellowBright: f("\x1B[93m", "\x1B[39m"),
117
+ blueBright: f("\x1B[94m", "\x1B[39m"),
118
+ magentaBright: f("\x1B[95m", "\x1B[39m"),
119
+ cyanBright: f("\x1B[96m", "\x1B[39m"),
120
+ whiteBright: f("\x1B[97m", "\x1B[39m"),
121
+ bgBlackBright: f("\x1B[100m", "\x1B[49m"),
122
+ bgRedBright: f("\x1B[101m", "\x1B[49m"),
123
+ bgGreenBright: f("\x1B[102m", "\x1B[49m"),
124
+ bgYellowBright: f("\x1B[103m", "\x1B[49m"),
125
+ bgBlueBright: f("\x1B[104m", "\x1B[49m"),
126
+ bgMagentaBright: f("\x1B[105m", "\x1B[49m"),
127
+ bgCyanBright: f("\x1B[106m", "\x1B[49m"),
128
+ bgWhiteBright: f("\x1B[107m", "\x1B[49m")
130
129
  };
131
130
  };
132
131
  module2.exports = createColors();
@@ -227,11 +226,11 @@ var require_signals = __commonJS({
227
226
  // node_modules/.pnpm/signal-exit@3.0.7/node_modules/signal-exit/index.js
228
227
  var require_signal_exit = __commonJS({
229
228
  "node_modules/.pnpm/signal-exit@3.0.7/node_modules/signal-exit/index.js"(exports, module2) {
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";
229
+ var process12 = global.process;
230
+ var processOk = function(process13) {
231
+ 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";
233
232
  };
234
- if (!processOk(process13)) {
233
+ if (!processOk(process12)) {
235
234
  module2.exports = function() {
236
235
  return function() {
237
236
  };
@@ -239,15 +238,15 @@ var require_signal_exit = __commonJS({
239
238
  } else {
240
239
  assert = require("assert");
241
240
  signals = require_signals();
242
- isWin2 = /^win/i.test(process13.platform);
241
+ isWin2 = /^win/i.test(process12.platform);
243
242
  EE = require("events");
244
243
  if (typeof EE !== "function") {
245
244
  EE = EE.EventEmitter;
246
245
  }
247
- if (process13.__signal_exit_emitter__) {
248
- emitter = process13.__signal_exit_emitter__;
246
+ if (process12.__signal_exit_emitter__) {
247
+ emitter = process12.__signal_exit_emitter__;
249
248
  } else {
250
- emitter = process13.__signal_exit_emitter__ = new EE();
249
+ emitter = process12.__signal_exit_emitter__ = new EE();
251
250
  emitter.count = 0;
252
251
  emitter.emitted = {};
253
252
  }
@@ -284,12 +283,12 @@ var require_signal_exit = __commonJS({
284
283
  loaded = false;
285
284
  signals.forEach(function(sig) {
286
285
  try {
287
- process13.removeListener(sig, sigListeners[sig]);
286
+ process12.removeListener(sig, sigListeners[sig]);
288
287
  } catch (er) {
289
288
  }
290
289
  });
291
- process13.emit = originalProcessEmit;
292
- process13.reallyExit = originalProcessReallyExit;
290
+ process12.emit = originalProcessEmit;
291
+ process12.reallyExit = originalProcessReallyExit;
293
292
  emitter.count -= 1;
294
293
  };
295
294
  module2.exports.unload = unload;
@@ -306,7 +305,7 @@ var require_signal_exit = __commonJS({
306
305
  if (!processOk(global.process)) {
307
306
  return;
308
307
  }
309
- var listeners = process13.listeners(sig);
308
+ var listeners = process12.listeners(sig);
310
309
  if (listeners.length === emitter.count) {
311
310
  unload();
312
311
  emit("exit", null, sig);
@@ -314,7 +313,7 @@ var require_signal_exit = __commonJS({
314
313
  if (isWin2 && sig === "SIGHUP") {
315
314
  sig = "SIGINT";
316
315
  }
317
- process13.kill(process13.pid, sig);
316
+ process12.kill(process12.pid, sig);
318
317
  }
319
318
  };
320
319
  });
@@ -330,36 +329,36 @@ var require_signal_exit = __commonJS({
330
329
  emitter.count += 1;
331
330
  signals = signals.filter(function(sig) {
332
331
  try {
333
- process13.on(sig, sigListeners[sig]);
332
+ process12.on(sig, sigListeners[sig]);
334
333
  return true;
335
334
  } catch (er) {
336
335
  return false;
337
336
  }
338
337
  });
339
- process13.emit = processEmit;
340
- process13.reallyExit = processReallyExit;
338
+ process12.emit = processEmit;
339
+ process12.reallyExit = processReallyExit;
341
340
  };
342
341
  module2.exports.load = load;
343
- originalProcessReallyExit = process13.reallyExit;
342
+ originalProcessReallyExit = process12.reallyExit;
344
343
  processReallyExit = function processReallyExit2(code) {
345
344
  if (!processOk(global.process)) {
346
345
  return;
347
346
  }
348
- process13.exitCode = code || /* istanbul ignore next */
347
+ process12.exitCode = code || /* istanbul ignore next */
349
348
  0;
350
- emit("exit", process13.exitCode, null);
351
- emit("afterexit", process13.exitCode, null);
352
- originalProcessReallyExit.call(process13, process13.exitCode);
349
+ emit("exit", process12.exitCode, null);
350
+ emit("afterexit", process12.exitCode, null);
351
+ originalProcessReallyExit.call(process12, process12.exitCode);
353
352
  };
354
- originalProcessEmit = process13.emit;
353
+ originalProcessEmit = process12.emit;
355
354
  processEmit = function processEmit2(ev, arg) {
356
355
  if (ev === "exit" && processOk(global.process)) {
357
356
  if (arg !== void 0) {
358
- process13.exitCode = arg;
357
+ process12.exitCode = arg;
359
358
  }
360
359
  var ret = originalProcessEmit.apply(this, arguments);
361
- emit("exit", process13.exitCode, null);
362
- emit("afterexit", process13.exitCode, null);
360
+ emit("exit", process12.exitCode, null);
361
+ emit("afterexit", process12.exitCode, null);
363
362
  return ret;
364
363
  } else {
365
364
  return originalProcessEmit.apply(this, arguments);
@@ -2054,7 +2053,7 @@ var require_clone = __commonJS({
2054
2053
  if (depth2 == 0)
2055
2054
  return parent2;
2056
2055
  var child;
2057
- var proto3;
2056
+ var proto2;
2058
2057
  if (typeof parent2 != "object") {
2059
2058
  return parent2;
2060
2059
  }
@@ -2076,11 +2075,11 @@ var require_clone = __commonJS({
2076
2075
  return child;
2077
2076
  } else {
2078
2077
  if (typeof prototype == "undefined") {
2079
- proto3 = Object.getPrototypeOf(parent2);
2080
- child = Object.create(proto3);
2078
+ proto2 = Object.getPrototypeOf(parent2);
2079
+ child = Object.create(proto2);
2081
2080
  } else {
2082
2081
  child = Object.create(prototype);
2083
- proto3 = prototype;
2082
+ proto2 = prototype;
2084
2083
  }
2085
2084
  }
2086
2085
  if (circular) {
@@ -2093,8 +2092,8 @@ var require_clone = __commonJS({
2093
2092
  }
2094
2093
  for (var i in parent2) {
2095
2094
  var attrs;
2096
- if (proto3) {
2097
- attrs = Object.getOwnPropertyDescriptor(proto3, i);
2095
+ if (proto2) {
2096
+ attrs = Object.getOwnPropertyDescriptor(proto2, i);
2098
2097
  }
2099
2098
  if (attrs && attrs.set == null) {
2100
2099
  continue;
@@ -5681,19 +5680,22 @@ __export(src_exports, {
5681
5680
  });
5682
5681
  module.exports = __toCommonJS(src_exports);
5683
5682
  var import_process4 = __toESM(require("process"), 1);
5684
- var import_lazy_js_utils13 = require("lazy-js-utils");
5683
+ var import_posix = __toESM(require("path/posix"), 1);
5684
+ var import_node13 = require("lazy-js-utils/dist/node");
5685
+ var import_lazy_js_utils2 = require("lazy-js-utils");
5685
5686
  var import_picocolors8 = __toESM(require_picocolors(), 1);
5686
5687
  var import_fast_glob = __toESM(require("fast-glob"), 1);
5687
5688
  var import_ccommand3 = require("ccommand");
5688
5689
 
5689
5690
  // src/utils.ts
5690
5691
  var import_path = __toESM(require("path"), 1);
5692
+ var import_node = require("lazy-js-utils/dist/node");
5691
5693
  var import_lazy_js_utils = require("lazy-js-utils");
5692
5694
 
5693
5695
  // node_modules/.pnpm/ora@6.3.1/node_modules/ora/index.js
5694
- var import_node_process7 = __toESM(require("process"), 1);
5696
+ var import_node_process6 = __toESM(require("process"), 1);
5695
5697
 
5696
- // node_modules/.pnpm/ora@6.3.1/node_modules/ora/node_modules/chalk/source/vendor/ansi-styles/index.js
5698
+ // node_modules/.pnpm/chalk@5.3.0/node_modules/chalk/source/vendor/ansi-styles/index.js
5697
5699
  var ANSI_BACKGROUND_OFFSET = 10;
5698
5700
  var wrapAnsi16 = (offset = 0) => (code) => `\x1B[${code + offset}m`;
5699
5701
  var wrapAnsi256 = (offset = 0) => (code) => `\x1B[${38 + offset};5;${code}m`;
@@ -5879,7 +5881,7 @@ function assembleStyles() {
5879
5881
  var ansiStyles = assembleStyles();
5880
5882
  var ansi_styles_default = ansiStyles;
5881
5883
 
5882
- // node_modules/.pnpm/ora@6.3.1/node_modules/ora/node_modules/chalk/source/vendor/supports-color/index.js
5884
+ // node_modules/.pnpm/chalk@5.3.0/node_modules/chalk/source/vendor/supports-color/index.js
5883
5885
  var import_node_process = __toESM(require("process"), 1);
5884
5886
  var import_node_os = __toESM(require("os"), 1);
5885
5887
  var import_node_tty = __toESM(require("tty"), 1);
@@ -6005,7 +6007,7 @@ var supportsColor = {
6005
6007
  };
6006
6008
  var supports_color_default = supportsColor;
6007
6009
 
6008
- // node_modules/.pnpm/ora@6.3.1/node_modules/ora/node_modules/chalk/source/utilities.js
6010
+ // node_modules/.pnpm/chalk@5.3.0/node_modules/chalk/source/utilities.js
6009
6011
  function stringReplaceAll(string, substring, replacer) {
6010
6012
  let index = string.indexOf(substring);
6011
6013
  if (index === -1) {
@@ -6035,7 +6037,7 @@ function stringEncaseCRLFWithFirstIndex(string, prefix, postfix, index) {
6035
6037
  return returnValue;
6036
6038
  }
6037
6039
 
6038
- // node_modules/.pnpm/ora@6.3.1/node_modules/ora/node_modules/chalk/source/index.js
6040
+ // node_modules/.pnpm/chalk@5.3.0/node_modules/chalk/source/index.js
6039
6041
  var { stdout: stdoutColor, stderr: stderrColor } = supports_color_default;
6040
6042
  var GENERATOR = Symbol("GENERATOR");
6041
6043
  var STYLER = Symbol("STYLER");
@@ -6055,10 +6057,10 @@ var applyOptions = (object, options = {}) => {
6055
6057
  object.level = options.level === void 0 ? colorLevel : options.level;
6056
6058
  };
6057
6059
  var chalkFactory = (options) => {
6058
- const chalk3 = (...strings) => strings.join(" ");
6059
- applyOptions(chalk3, options);
6060
- Object.setPrototypeOf(chalk3, createChalk.prototype);
6061
- return chalk3;
6060
+ const chalk2 = (...strings) => strings.join(" ");
6061
+ applyOptions(chalk2, options);
6062
+ Object.setPrototypeOf(chalk2, createChalk.prototype);
6063
+ return chalk2;
6062
6064
  };
6063
6065
  function createChalk(options) {
6064
6066
  return chalkFactory(options);
@@ -6229,531 +6231,41 @@ var cli_cursor_default = cliCursor;
6229
6231
  // node_modules/.pnpm/ora@6.3.1/node_modules/ora/index.js
6230
6232
  var import_cli_spinners = __toESM(require_cli_spinners(), 1);
6231
6233
 
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
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
6234
  // 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);
6235
+ var import_node_process4 = __toESM(require("process"), 1);
6723
6236
  function isUnicodeSupported() {
6724
- if (import_node_process5.default.platform !== "win32") {
6725
- return import_node_process5.default.env.TERM !== "linux";
6237
+ if (import_node_process4.default.platform !== "win32") {
6238
+ return import_node_process4.default.env.TERM !== "linux";
6726
6239
  }
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";
6240
+ 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";
6728
6241
  }
6729
6242
 
6730
6243
  // node_modules/.pnpm/log-symbols@5.1.0/node_modules/log-symbols/index.js
6731
6244
  var main = {
6732
- info: source_default2.blue("\u2139"),
6733
- success: source_default2.green("\u2714"),
6734
- warning: source_default2.yellow("\u26A0"),
6735
- error: source_default2.red("\u2716")
6245
+ info: source_default.blue("\u2139"),
6246
+ success: source_default.green("\u2714"),
6247
+ warning: source_default.yellow("\u26A0"),
6248
+ error: source_default.red("\u2716")
6736
6249
  };
6737
6250
  var fallback = {
6738
- info: source_default2.blue("i"),
6739
- success: source_default2.green("\u221A"),
6740
- warning: source_default2.yellow("\u203C"),
6741
- error: source_default2.red("\xD7")
6251
+ info: source_default.blue("i"),
6252
+ success: source_default.green("\u221A"),
6253
+ warning: source_default.yellow("\u203C"),
6254
+ error: source_default.red("\xD7")
6742
6255
  };
6743
6256
  var logSymbols = isUnicodeSupported() ? main : fallback;
6744
6257
  var log_symbols_default = logSymbols;
6745
6258
 
6746
- // node_modules/.pnpm/ora@6.3.1/node_modules/ora/node_modules/strip-ansi/node_modules/ansi-regex/index.js
6259
+ // node_modules/.pnpm/ansi-regex@6.0.1/node_modules/ansi-regex/index.js
6747
6260
  function ansiRegex({ onlyFirst = false } = {}) {
6748
- const ST = "(?:\\u0007|\\u001B\\u005C|\\u009C)";
6749
6261
  const pattern = [
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=><~]))"
6262
+ "[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)",
6263
+ "(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-ntqry=><~]))"
6752
6264
  ].join("|");
6753
6265
  return new RegExp(pattern, onlyFirst ? void 0 : "g");
6754
6266
  }
6755
6267
 
6756
- // node_modules/.pnpm/ora@6.3.1/node_modules/ora/node_modules/strip-ansi/index.js
6268
+ // node_modules/.pnpm/strip-ansi@7.1.0/node_modules/strip-ansi/index.js
6757
6269
  var regex = ansiRegex();
6758
6270
  function stripAnsi(string) {
6759
6271
  if (typeof string !== "string") {
@@ -6773,7 +6285,7 @@ function isInteractive({ stream = process.stdout } = {}) {
6773
6285
  }
6774
6286
 
6775
6287
  // node_modules/.pnpm/stdin-discarder@0.1.0/node_modules/stdin-discarder/index.js
6776
- var import_node_process6 = __toESM(require("process"), 1);
6288
+ var import_node_process5 = __toESM(require("process"), 1);
6777
6289
  var import_node_readline = __toESM(require("readline"), 1);
6778
6290
  var import_bl = __toESM(require_bl(), 1);
6779
6291
  var ASCII_ETX_CODE = 3;
@@ -6784,20 +6296,20 @@ var StdinDiscarder = class {
6784
6296
  __privateAdd(this, _mutedStream, new import_bl.BufferListStream());
6785
6297
  __privateAdd(this, _ourEmit, void 0);
6786
6298
  __privateAdd(this, _rl, void 0);
6787
- __privateGet(this, _mutedStream).pipe(import_node_process6.default.stdout);
6299
+ __privateGet(this, _mutedStream).pipe(import_node_process5.default.stdout);
6788
6300
  const self2 = this;
6789
6301
  __privateSet(this, _ourEmit, function(event, data, ...arguments_) {
6790
- const { stdin } = import_node_process6.default;
6302
+ const { stdin } = import_node_process5.default;
6791
6303
  if (__privateGet(self2, _requests) > 0 || stdin.emit === __privateGet(self2, _ourEmit)) {
6792
6304
  if (event === "keypress") {
6793
6305
  return;
6794
6306
  }
6795
6307
  if (event === "data" && data.includes(ASCII_ETX_CODE)) {
6796
- import_node_process6.default.emit("SIGINT");
6308
+ import_node_process5.default.emit("SIGINT");
6797
6309
  }
6798
6310
  Reflect.apply(__privateGet(self2, _ourEmit), this, [event, data, ...arguments_]);
6799
6311
  } else {
6800
- Reflect.apply(import_node_process6.default.stdin.emit, this, [event, data, ...arguments_]);
6312
+ Reflect.apply(import_node_process5.default.stdin.emit, this, [event, data, ...arguments_]);
6801
6313
  }
6802
6314
  });
6803
6315
  }
@@ -6818,24 +6330,24 @@ var StdinDiscarder = class {
6818
6330
  }
6819
6331
  // TODO: Use private methods when targeting Node.js 14.
6820
6332
  _realStart() {
6821
- if (import_node_process6.default.platform === "win32") {
6333
+ if (import_node_process5.default.platform === "win32") {
6822
6334
  return;
6823
6335
  }
6824
6336
  __privateSet(this, _rl, import_node_readline.default.createInterface({
6825
- input: import_node_process6.default.stdin,
6337
+ input: import_node_process5.default.stdin,
6826
6338
  output: __privateGet(this, _mutedStream)
6827
6339
  }));
6828
6340
  __privateGet(this, _rl).on("SIGINT", () => {
6829
- if (import_node_process6.default.listenerCount("SIGINT") === 0) {
6830
- import_node_process6.default.emit("SIGINT");
6341
+ if (import_node_process5.default.listenerCount("SIGINT") === 0) {
6342
+ import_node_process5.default.emit("SIGINT");
6831
6343
  } else {
6832
6344
  __privateGet(this, _rl).close();
6833
- import_node_process6.default.kill(import_node_process6.default.pid, "SIGINT");
6345
+ import_node_process5.default.kill(import_node_process5.default.pid, "SIGINT");
6834
6346
  }
6835
6347
  });
6836
6348
  }
6837
6349
  _realStop() {
6838
- if (import_node_process6.default.platform === "win32") {
6350
+ if (import_node_process5.default.platform === "win32") {
6839
6351
  return;
6840
6352
  }
6841
6353
  __privateGet(this, _rl).close();
@@ -6877,7 +6389,7 @@ var Ora = class {
6877
6389
  }
6878
6390
  __privateSet(this, _options, {
6879
6391
  color: "cyan",
6880
- stream: import_node_process7.default.stderr,
6392
+ stream: import_node_process6.default.stderr,
6881
6393
  discardStdin: true,
6882
6394
  hideCursor: true,
6883
6395
  ...options
@@ -6892,7 +6404,7 @@ var Ora = class {
6892
6404
  this.prefixText = __privateGet(this, _options).prefixText;
6893
6405
  this.suffixText = __privateGet(this, _options).suffixText;
6894
6406
  this.indent = __privateGet(this, _options).indent;
6895
- if (import_node_process7.default.env.NODE_ENV === "test") {
6407
+ if (import_node_process6.default.env.NODE_ENV === "test") {
6896
6408
  this._stream = __privateGet(this, _stream);
6897
6409
  this._isEnabled = __privateGet(this, _isEnabled);
6898
6410
  Object.defineProperty(this, "_linesToClear", {
@@ -7079,7 +6591,7 @@ var Ora = class {
7079
6591
  if (__privateGet(this, _options).hideCursor) {
7080
6592
  cli_cursor_default.hide(__privateGet(this, _stream));
7081
6593
  }
7082
- if (__privateGet(this, _options).discardStdin && import_node_process7.default.stdin.isTTY) {
6594
+ if (__privateGet(this, _options).discardStdin && import_node_process6.default.stdin.isTTY) {
7083
6595
  __privateSet(this, _isDiscardingStdin, true);
7084
6596
  stdin_discarder_default.start();
7085
6597
  }
@@ -7098,7 +6610,7 @@ var Ora = class {
7098
6610
  if (__privateGet(this, _options).hideCursor) {
7099
6611
  cli_cursor_default.show(__privateGet(this, _stream));
7100
6612
  }
7101
- if (__privateGet(this, _options).discardStdin && import_node_process7.default.stdin.isTTY && __privateGet(this, _isDiscardingStdin)) {
6613
+ if (__privateGet(this, _options).discardStdin && import_node_process6.default.stdin.isTTY && __privateGet(this, _isDiscardingStdin)) {
7102
6614
  stdin_discarder_default.stop();
7103
6615
  __privateSet(this, _isDiscardingStdin, false);
7104
6616
  }
@@ -7165,7 +6677,7 @@ async function getParams(params) {
7165
6677
  var _a, _b;
7166
6678
  const root = process.cwd();
7167
6679
  try {
7168
- switch (await (0, import_lazy_js_utils.getPkgTool)()) {
6680
+ switch (await (0, import_node.getPkgTool)()) {
7169
6681
  case "pnpm":
7170
6682
  if (!(0, import_lazy_js_utils.isFile)(import_path.default.resolve(root, "./pnpm-workspace.yaml"))) {
7171
6683
  if (DW.test(params))
@@ -7192,7 +6704,7 @@ async function getParams(params) {
7192
6704
  return params.replace(W, " -w");
7193
6705
  return params;
7194
6706
  case "yarn":
7195
- if (!((_a = await (0, import_lazy_js_utils.getPkg)(import_path.default.resolve(root, "./package.json"))) == null ? void 0 : _a.workspaces)) {
6707
+ if (!((_a = await (0, import_node.getPkg)(import_path.default.resolve(root, "./package.json"))) == null ? void 0 : _a.workspaces)) {
7196
6708
  if (Dw.test(params))
7197
6709
  return params.replace(Dw, " -D");
7198
6710
  if (DW.test(params))
@@ -7202,7 +6714,7 @@ async function getParams(params) {
7202
6714
  if (w.test(params))
7203
6715
  return params.replace(w, "");
7204
6716
  }
7205
- if ((_b = await (0, import_lazy_js_utils.getPkg)()) == null ? void 0 : _b.workspaces) {
6717
+ if ((_b = await (0, import_node.getPkg)()) == null ? void 0 : _b.workspaces) {
7206
6718
  if (D.test(params))
7207
6719
  return params.replace(D, " -DW");
7208
6720
  if (d.test(params))
@@ -7244,11 +6756,15 @@ async function getStyle() {
7244
6756
  spinner
7245
6757
  };
7246
6758
  }
7247
- function getLatestVersion(pkg, isZh6 = true) {
6759
+ async function getLatestVersion(pkg, isZh6 = true) {
7248
6760
  const data = [];
7249
6761
  for (const p of pkg.replace(/\s+/, " ").split(" ")) {
7250
6762
  const [pName, v] = p.split("$");
7251
- let { status, result } = (0, import_lazy_js_utils.jsShell)(`npm view ${pName}`, "pipe");
6763
+ let { status, result } = await (0, import_node.jsShell)(`npm view ${pName}`, [
6764
+ "inherit",
6765
+ "pipe",
6766
+ "inherit"
6767
+ ]);
7252
6768
  if (status === 0) {
7253
6769
  if (result.startsWith("@"))
7254
6770
  result = result.slice(1);
@@ -7262,22 +6778,22 @@ function getLatestVersion(pkg, isZh6 = true) {
7262
6778
  }
7263
6779
 
7264
6780
  // src/help.ts
7265
- var import_lazy_js_utils2 = require("lazy-js-utils");
6781
+ var import_node2 = require("lazy-js-utils/dist/node");
7266
6782
 
7267
6783
  // package.json
7268
- var version = "0.0.93";
6784
+ var version = "0.0.95";
7269
6785
 
7270
6786
  // src/help.ts
7271
6787
  var isZh2 = process.env.PI_Lang === "zh";
7272
6788
  function help(argv) {
7273
6789
  const arg = argv[0];
7274
6790
  if (arg === "-v" || arg === "--version") {
7275
- (0, import_lazy_js_utils2.jsShell)(
6791
+ (0, import_node2.jsShell)(
7276
6792
  isZh2 ? `gum style --foreground 212 --border-foreground 212 --border double --align center --width 50 --margin "1 2" --padding "2 4" "pi \u7248\u672C: ${version}" "\u8BF7\u4E3A\u6211\u7684\u52AA\u529B\u70B9\u4E00\u4E2A\u884C \u{1F31F}" "\u8C22\u8C22 \u{1F91F}"` : `gum style --foreground 212 --border-foreground 212 --border double --align center --width 50 --margin "1 2" --padding "2 4" "pi version: ${version}" "Please give me a \u{1F31F} for my efforts" "Thank you \u{1F91F}"`
7277
6793
  );
7278
6794
  process.exit(0);
7279
6795
  } else if (arg === "-h" || arg === "--help") {
7280
- (0, import_lazy_js_utils2.jsShell)(
6796
+ (0, import_node2.jsShell)(
7281
6797
  `gum style --foreground 212 --border-foreground 212 --border double --align left --width 50 --margin "1 2" --padding "1 1" "PI Commands:" "~ pi: install package" "~ pix: npx package" "~ pui: uninstall package" "~ prun: run package script" "~ pinit: package init" "~ pbuild: go build | cargo build" "~ pfind: find monorepo of yarn or pnpm" "~ pa: agent alias" "~ pu: package upgrade" "~ pci: package clean install" "~ pil: package latest install"
7282
6798
  `
7283
6799
  );
@@ -7286,12 +6802,16 @@ function help(argv) {
7286
6802
  }
7287
6803
 
7288
6804
  // src/installDeps.ts
7289
- var import_lazy_js_utils3 = require("lazy-js-utils");
6805
+ var import_node3 = require("lazy-js-utils/dist/node");
7290
6806
  var import_picocolors2 = __toESM(require_picocolors(), 1);
7291
6807
  async function installDeps() {
7292
- if (!(0, import_lazy_js_utils3.isInstallPkg)("gum")) {
6808
+ if (!await (0, import_node3.isInstallPkg)("gum")) {
7293
6809
  console.log(import_picocolors2.default.cyan("\u6B63\u5728\u4E3A\u60A8\u5B89\u88C5\u5FC5\u8981\u7684\u4F9D\u8D56gum..."));
7294
- const { status } = await (0, import_lazy_js_utils3.jsShell)("brew install gum", "pipe");
6810
+ const { status } = await (0, import_node3.jsShell)("brew install gum", [
6811
+ "inherit",
6812
+ "pipe",
6813
+ "inherit"
6814
+ ]);
7295
6815
  if (status === 0) {
7296
6816
  console.log(import_picocolors2.default.cyan("gum \u5B89\u88C5\u6210\u529F!"));
7297
6817
  } else {
@@ -7303,9 +6823,13 @@ async function installDeps() {
7303
6823
  process.exit(1);
7304
6824
  }
7305
6825
  }
7306
- if (!(0, import_lazy_js_utils3.isInstallPkg)("ni")) {
6826
+ if (!await (0, import_node3.isInstallPkg)("ni")) {
7307
6827
  console.log(import_picocolors2.default.cyan("\u6B63\u5728\u4E3A\u60A8\u5B89\u88C5\u5FC5\u8981\u7684\u4F9D\u8D56ni..."));
7308
- const { status } = await (0, import_lazy_js_utils3.jsShell)("npm i -g @antfu/ni", "pipe");
6828
+ const { status } = await (0, import_node3.jsShell)("npm i -g @antfu/ni", [
6829
+ "inherit",
6830
+ "pipe",
6831
+ "inherit"
6832
+ ]);
7309
6833
  if (status === 0) {
7310
6834
  console.log(import_picocolors2.default.cyan("ni \u5B89\u88C5\u6210\u529F!"));
7311
6835
  } else {
@@ -7322,18 +6846,18 @@ async function installDeps() {
7322
6846
  // src/pi.ts
7323
6847
  var import_process2 = __toESM(require("process"), 1);
7324
6848
  var import_console = require("console");
7325
- var import_lazy_js_utils5 = require("lazy-js-utils");
6849
+ var import_node5 = require("lazy-js-utils/dist/node");
7326
6850
  var import_picocolors4 = __toESM(require_picocolors(), 1);
7327
6851
 
7328
6852
  // src/detectNode.ts
7329
6853
  var import_process = __toESM(require("process"), 1);
7330
- var import_lazy_js_utils4 = require("lazy-js-utils");
6854
+ var import_node4 = require("lazy-js-utils/dist/node");
7331
6855
  var import_picocolors3 = __toESM(require_picocolors(), 1);
7332
6856
  async function detectNode() {
7333
6857
  var _a;
7334
6858
  let pkg;
7335
6859
  try {
7336
- pkg = await (0, import_lazy_js_utils4.getPkg)();
6860
+ pkg = await (0, import_node4.getPkg)();
7337
6861
  } catch (e) {
7338
6862
  const cwd = import_process.default.cwd();
7339
6863
  console.log(import_picocolors3.default.red(`\u5F53\u524D\u76EE\u5F55: ${cwd} \u6CA1\u6709package.json\u6587\u4EF6`));
@@ -7345,13 +6869,13 @@ async function detectNode() {
7345
6869
  pkg.engines.node
7346
6870
  );
7347
6871
  if (!isSafe) {
7348
- const { result, status } = await (0, import_lazy_js_utils4.jsShell)(
6872
+ const { result, status } = await (0, import_node4.jsShell)(
7349
6873
  `echo "yes
7350
6874
  no" | gum filter --placeholder=" \u5F53\u524Dnode\u7248\u672C\u4E0D\u6EE1\u8DB3 ${pkg.engines.node}\uFF0C\u662F\u5426\u5207\u6362node\u7248\u672C"`,
7351
- "pipe"
6875
+ ["inherit", "pipe", "inherit"]
7352
6876
  );
7353
6877
  if (status === 0 && result === "yes") {
7354
- await (0, import_lazy_js_utils4.jsShell)(
6878
+ await (0, import_node4.jsShell)(
7355
6879
  `
7356
6880
  current=$(echo $(fnm current))
7357
6881
  registery=$(echo "$(fnm ls)" | sed 's/system//g' | sed 's/default//g' | sed 's/* //g' | sed "s/$current/* $current/g" | gum filter --placeholder=" \u8BF7\u9009\u62E9\u4E00\u4E2Anode\u7248\u672C")
@@ -7360,7 +6884,7 @@ no" | gum filter --placeholder=" \u5F53\u524Dnode\u7248\u672C\u4E0D\u6EE1\u8DB3
7360
6884
  fnm use \${registery% -*}
7361
6885
  fi
7362
6886
  `,
7363
- "pipe"
6887
+ ["inherit", "pipe", "inherit"]
7364
6888
  );
7365
6889
  }
7366
6890
  }
@@ -7377,16 +6901,16 @@ async function pi(params, pkg, executor = "ni") {
7377
6901
  const start = Date.now();
7378
6902
  let successMsg = "";
7379
6903
  if (isLatest) {
7380
- successMsg = getLatestVersion(pkg, isZh3);
6904
+ successMsg = await getLatestVersion(pkg, isZh3);
7381
6905
  } else {
7382
6906
  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}";
7383
6907
  }
7384
6908
  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}";
7385
6909
  const newParams = isLatest ? params : await getParams(params);
7386
- let stdio = "pipe";
6910
+ let stdio = ["inherit", "pipe", "inherit"];
7387
6911
  let loading_status;
7388
6912
  const { PI_DEFAULT, PI_MaxSockets: sockets } = import_process2.default.env;
7389
- const pkgTool = await (0, import_lazy_js_utils5.getPkgTool)();
6913
+ const pkgTool = await (0, import_node5.getPkgTool)();
7390
6914
  const maxSockets = sockets || 4;
7391
6915
  const install = PI_DEFAULT === "yarn" || pkgTool === "yarn" ? newParams ? "add" : "" : "install";
7392
6916
  if (pkgTool === "npm") {
@@ -7402,7 +6926,7 @@ async function pi(params, pkg, executor = "ni") {
7402
6926
  loading_status = await loading(text);
7403
6927
  }
7404
6928
  const runSockets = executor.split(" ")[0] === "npm" ? ` --max-sockets=${maxSockets}` : "";
7405
- let { status, result } = await (0, import_lazy_js_utils5.useNodeWorker)({
6929
+ let { status, result } = await (0, import_node5.useNodeWorker)({
7406
6930
  params: `${executor}${newParams ? ` ${newParams}` : runSockets}`,
7407
6931
  stdio,
7408
6932
  errorExit: false
@@ -7414,7 +6938,7 @@ async function pi(params, pkg, executor = "ni") {
7414
6938
  isZh3 ? "\u6B63\u5728\u5C1D\u8BD5\u4F7F\u7528 npm \u518D\u6B21\u6267\u884C..." : "Trying to use npm to run again..."
7415
6939
  )
7416
6940
  );
7417
- const { status: newStatus, result: newResult } = (0, import_lazy_js_utils5.jsShell)(
6941
+ const { status: newStatus, result: newResult } = await (0, import_node5.jsShell)(
7418
6942
  `npm install${newParams ? ` ${newParams}` : runSockets}`,
7419
6943
  {
7420
6944
  stdio
@@ -7444,16 +6968,16 @@ ${result}` : failMsg));
7444
6968
  const match = result.match(reg);
7445
6969
  if (match) {
7446
6970
  const dep = match[1];
7447
- (0, import_lazy_js_utils5.jsShell)(`pi ${dep}@latest`);
6971
+ (0, import_node5.jsShell)(`pi ${dep}@latest`);
7448
6972
  }
7449
6973
  }
7450
6974
  import_process2.default.exit();
7451
6975
  }
7452
6976
 
7453
6977
  // src/pa.ts
7454
- var import_lazy_js_utils6 = require("lazy-js-utils");
6978
+ var import_node6 = require("lazy-js-utils/dist/node");
7455
6979
  function pa() {
7456
- return (0, import_lazy_js_utils6.jsShell)("na");
6980
+ return (0, import_node6.jsShell)("na");
7457
6981
  }
7458
6982
 
7459
6983
  // src/pci.ts
@@ -7468,10 +6992,10 @@ function pfind(params) {
7468
6992
  }
7469
6993
 
7470
6994
  // src/pil.ts
7471
- var import_lazy_js_utils7 = require("lazy-js-utils");
6995
+ var import_node7 = require("lazy-js-utils/dist/node");
7472
6996
  var import_picocolors5 = __toESM(require_picocolors(), 1);
7473
6997
  async function pil(params) {
7474
- const { dependencies = {}, devDependencies = {} } = await (0, import_lazy_js_utils7.getPkg)();
6998
+ const { dependencies = {}, devDependencies = {} } = await (0, import_node7.getPkg)();
7475
6999
  if (!params) {
7476
7000
  const deps = [
7477
7001
  ...Object.keys(dependencies).map((key) => `${key}: ${dependencies[key]}`),
@@ -7479,11 +7003,13 @@ async function pil(params) {
7479
7003
  (key) => `${key}: ${devDependencies[key]}`
7480
7004
  )
7481
7005
  ];
7482
- const { result: choose, status } = (0, import_lazy_js_utils7.jsShell)(
7006
+ const { result: choose, status } = await (0, import_node7.jsShell)(
7483
7007
  `echo ${deps.join(
7484
7008
  ","
7485
7009
  )} | 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."}"`,
7486
- "pipe"
7010
+ {
7011
+ stdio: ["inherit", "pipe", "inherit"]
7012
+ }
7487
7013
  );
7488
7014
  if (status === 130) {
7489
7015
  console.log(import_picocolors5.default.dim("\u5DF2\u53D6\u6D88"));
@@ -7518,32 +7044,32 @@ async function pil(params) {
7518
7044
  }
7519
7045
 
7520
7046
  // src/pinit.ts
7521
- var import_lazy_js_utils8 = require("lazy-js-utils");
7047
+ var import_node8 = require("lazy-js-utils/dist/node");
7522
7048
  async function pinit() {
7523
7049
  console.log("Initializing project...");
7524
- switch (await (0, import_lazy_js_utils8.getPkgTool)()) {
7050
+ switch (await (0, import_node8.getPkgTool)()) {
7525
7051
  case "npm":
7526
- (0, import_lazy_js_utils8.jsShell)("npm init -y");
7052
+ (0, import_node8.jsShell)("npm init -y");
7527
7053
  return;
7528
7054
  case "yarn":
7529
- (0, import_lazy_js_utils8.jsShell)("yarn init -y");
7055
+ (0, import_node8.jsShell)("yarn init -y");
7530
7056
  return;
7531
7057
  case "pnpm":
7532
- (0, import_lazy_js_utils8.jsShell)("pnpm init -y");
7058
+ (0, import_node8.jsShell)("pnpm init -y");
7533
7059
  return;
7534
7060
  default:
7535
- (0, import_lazy_js_utils8.jsShell)("npm init -y");
7061
+ (0, import_node8.jsShell)("npm init -y");
7536
7062
  }
7537
7063
  }
7538
7064
 
7539
7065
  // src/pix.ts
7540
- var import_lazy_js_utils9 = require("lazy-js-utils");
7066
+ var import_node9 = require("lazy-js-utils/dist/node");
7541
7067
  async function pix(params) {
7542
- switch (await (0, import_lazy_js_utils9.getPkgTool)()) {
7068
+ switch (await (0, import_node9.getPkgTool)()) {
7543
7069
  case "bun":
7544
- return (0, import_lazy_js_utils9.jsShell)(`bunx ${params}`);
7070
+ return (0, import_node9.jsShell)(`bunx ${params}`);
7545
7071
  default:
7546
- return (0, import_lazy_js_utils9.jsShell)(`npx ${params}`);
7072
+ return (0, import_node9.jsShell)(`npx ${params}`);
7547
7073
  }
7548
7074
  }
7549
7075
 
@@ -7554,30 +7080,30 @@ function prun(params) {
7554
7080
  }
7555
7081
 
7556
7082
  // src/pu.ts
7557
- var import_lazy_js_utils10 = require("lazy-js-utils");
7083
+ var import_node10 = require("lazy-js-utils/dist/node");
7558
7084
  function pu() {
7559
- return (0, import_lazy_js_utils10.jsShell)("nu");
7085
+ return (0, import_node10.jsShell)("nu");
7560
7086
  }
7561
7087
 
7562
7088
  // src/pui.ts
7563
- var import_lazy_js_utils11 = require("lazy-js-utils");
7089
+ var import_node11 = require("lazy-js-utils/dist/node");
7564
7090
  var import_picocolors6 = __toESM(require_picocolors(), 1);
7565
7091
  var isZh4 = process.env.PI_Lang === "zh";
7566
7092
  async function pui(params, pkg) {
7567
7093
  const text = `${isZh4 ? "\u6B63\u5728\u4E3A\u60A8\u5378\u8F7D" : "Uninstalling"} ${pkg} ...`;
7568
7094
  if (!params) {
7569
- const { dependencies = {}, devDependencies = {} } = await (0, import_lazy_js_utils11.getPkg)();
7095
+ const { dependencies = {}, devDependencies = {} } = await (0, import_node11.getPkg)();
7570
7096
  const deps = [
7571
7097
  ...Object.keys(dependencies).map((key) => `${key}: ${dependencies[key]}`),
7572
7098
  ...Object.keys(devDependencies).map(
7573
7099
  (key) => `${key}: ${devDependencies[key]}`
7574
7100
  )
7575
7101
  ];
7576
- const { result: choose, status: status2 } = (0, import_lazy_js_utils11.jsShell)(
7102
+ const { result: choose, status: status2 } = await (0, import_node11.jsShell)(
7577
7103
  `echo ${deps.join(
7578
7104
  ","
7579
7105
  )} | 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."}"`,
7580
- "pipe"
7106
+ ["inherit", "pipe", "inherit"]
7581
7107
  );
7582
7108
  if (status2 === 130) {
7583
7109
  console.log(import_picocolors6.default.dim("\u5DF2\u53D6\u6D88"));
@@ -7599,7 +7125,7 @@ async function pui(params, pkg) {
7599
7125
  process.exit(1);
7600
7126
  }
7601
7127
  const loading_status = await loading(text);
7602
- const { status, result } = await (0, import_lazy_js_utils11.useNodeWorker)(`nun ${params}`);
7128
+ const { status, result } = await (0, import_node11.useNodeWorker)(`nun ${params}`);
7603
7129
  const end = Date.now();
7604
7130
  const costTime = (end - start) / 1e3;
7605
7131
  successMsg += import_picocolors6.default.blue(` ---- \u23F0\uFF1A${costTime}s`);
@@ -7613,14 +7139,14 @@ ${result}` : failMsg));
7613
7139
 
7614
7140
  // src/pio.ts
7615
7141
  var import_process3 = __toESM(require("process"), 1);
7616
- var import_lazy_js_utils12 = require("lazy-js-utils");
7142
+ var import_node12 = require("lazy-js-utils/dist/node");
7617
7143
  var import_picocolors7 = __toESM(require_picocolors(), 1);
7618
7144
  async function pio(params, pkg, executor = "ni") {
7619
7145
  const successMsg = pkg ? `Installed ${pkg} successfully! \u{1F60A}` : "Updated dependency successfully! \u{1F60A}";
7620
7146
  const failMsg = pkg ? `Failed to install ${pkg} \u{1F62D}` : "Failed to update dependency! \u{1F62D}";
7621
7147
  const offline = "--prefer-offline";
7622
7148
  const newParams = await getParams(params);
7623
- const { status, result } = await (0, import_lazy_js_utils12.useNodeWorker)({
7149
+ const { status, result } = await (0, import_node12.useNodeWorker)({
7624
7150
  params: `${executor} ${newParams} ${offline}`,
7625
7151
  stdio: "inherit"
7626
7152
  });
@@ -7653,7 +7179,7 @@ var isZh5 = import_process4.default.env.PI_Lang === "zh";
7653
7179
  async function setup() {
7654
7180
  const cmd = import_process4.default.argv[1];
7655
7181
  let exec = "";
7656
- if ((0, import_lazy_js_utils13.isWin)()) {
7182
+ if ((0, import_lazy_js_utils2.isWin)()) {
7657
7183
  const last = cmd.lastIndexOf("\\") + 1;
7658
7184
  exec = cmd.slice(last, cmd.length).split(".").slice(0, -1).join(".");
7659
7185
  } else {
@@ -7662,15 +7188,15 @@ async function setup() {
7662
7188
  }
7663
7189
  const argv = import_process4.default.argv.slice(2);
7664
7190
  help(argv);
7665
- const params = (0, import_lazy_js_utils13.spaceFormat)(argv.join(" ")).trim();
7666
- if (!(0, import_lazy_js_utils13.hasPkg)(rootPath)) {
7667
- if ((0, import_lazy_js_utils13.isGo)()) {
7191
+ let params = (0, import_lazy_js_utils2.spaceFormat)(argv.join(" ")).trim();
7192
+ if (!await (0, import_node13.hasPkg)(rootPath)) {
7193
+ if (await (0, import_node13.isGo)(rootPath)) {
7668
7194
  if (exec === "pi") {
7669
7195
  const loading_status = await loading(
7670
7196
  `${isZh5 ? "\u6B63\u5728\u4E3A\u60A8\u5B89\u88C5" : "Installing"} ${params} ...
7671
7197
  `
7672
7198
  );
7673
- const { status } = params ? await (0, import_lazy_js_utils13.useNodeWorker)(`go get ${params}`) : await (0, import_lazy_js_utils13.useNodeWorker)("go mod tidy");
7199
+ const { status } = params ? await (0, import_node13.useNodeWorker)(`go get ${params}`) : await (0, import_node13.useNodeWorker)("go mod tidy");
7674
7200
  if (status === 0) {
7675
7201
  loading_status.succeed(
7676
7202
  import_picocolors8.default.green(isZh5 ? "\u5B89\u88C5\u6210\u529F! \u{1F60A}" : "Installed successfully! \u{1F60A}")
@@ -7685,7 +7211,7 @@ async function setup() {
7685
7211
  `${isZh5 ? "\u6B63\u5728\u4E3A\u60A8\u5378\u8F7D" : "Uninstalling"} ${params} ...
7686
7212
  `
7687
7213
  );
7688
- const { status } = await (0, import_lazy_js_utils13.useNodeWorker)(`go clean ${params}`);
7214
+ const { status } = await (0, import_node13.useNodeWorker)(`go clean ${params}`);
7689
7215
  if (status === 0) {
7690
7216
  loading_status.succeed(
7691
7217
  import_picocolors8.default.green(isZh5 ? "\u5378\u8F7D\u6210\u529F! \u{1F60A}" : "Uninstalled successfully! \u{1F60A}")
@@ -7698,11 +7224,11 @@ async function setup() {
7698
7224
  } else if (exec === "prun") {
7699
7225
  const match = params ? params.endsWith(".go") ? [`**/${params}`] : [`**/${params}.go`, `**/${params}/main.go`] : "main.go";
7700
7226
  const target = (await (0, import_fast_glob.default)(match))[0];
7701
- return target ? (0, import_lazy_js_utils13.jsShell)(`go run ${target}`) : (0, import_ccommand3.ccommand)(params);
7227
+ return target ? await (0, import_node13.jsShell)(`go run ${target}`, "inherit") : (0, import_ccommand3.ccommand)(params);
7702
7228
  } else if (exec === "pinit") {
7703
- (0, import_lazy_js_utils13.jsShell)(`go mod init ${params}`);
7229
+ await (0, import_node13.jsShell)(`go mod init ${params}`, "inherit");
7704
7230
  } else if (exec === "pbuild") {
7705
- (0, import_lazy_js_utils13.jsShell)(`go build ${params}`);
7231
+ await (0, import_node13.jsShell)(`go build ${params}`, "inherit");
7706
7232
  } else {
7707
7233
  console.log(
7708
7234
  import_picocolors8.default.red(
@@ -7712,13 +7238,21 @@ async function setup() {
7712
7238
  }
7713
7239
  import_process4.default.exit();
7714
7240
  }
7715
- if ((0, import_lazy_js_utils13.isRust)()) {
7241
+ let projectPath = "";
7242
+ if (params && !await (0, import_node13.isRust)()) {
7243
+ projectPath = params.split(" ")[0];
7244
+ rootPath = import_posix.default.resolve(rootPath, projectPath);
7245
+ params = params.replace(projectPath, "").trim();
7246
+ }
7247
+ if (await (0, import_node13.isRust)(rootPath)) {
7716
7248
  if (exec === "pi") {
7717
7249
  const loading_status = await loading(
7718
7250
  `${isZh5 ? "\u6B63\u5728\u4E3A\u60A8\u5B89\u88C5" : "Installing"} ${params} ...
7719
7251
  `
7720
7252
  );
7721
- const { status } = await (0, import_lazy_js_utils13.useNodeWorker)(`cargo install ${params}`);
7253
+ const { status } = await (0, import_node13.useNodeWorker)(
7254
+ `cargo install ${params}${projectPath ? `--manifest-path=./${projectPath}/Cargo.toml` : ""}`
7255
+ );
7722
7256
  if (status === 0) {
7723
7257
  loading_status.succeed(
7724
7258
  import_picocolors8.default.green(isZh5 ? "\u5B89\u88C5\u6210\u529F! \u{1F60A}" : "Installed successfully! \u{1F60A}")
@@ -7733,7 +7267,9 @@ async function setup() {
7733
7267
  `${isZh5 ? "\u6B63\u5728\u4E3A\u60A8\u5378\u8F7D" : "Uninstalling"} ${params} ...
7734
7268
  `
7735
7269
  );
7736
- const { status } = await (0, import_lazy_js_utils13.useNodeWorker)(`cargo uninstall ${params}`);
7270
+ const { status } = await (0, import_node13.useNodeWorker)(
7271
+ `cargo uninstall ${params}${projectPath ? `--manifest-path=./${projectPath}/Cargo.toml` : ""}`
7272
+ );
7737
7273
  if (status === 0) {
7738
7274
  loading_status.succeed(
7739
7275
  import_picocolors8.default.green(isZh5 ? "\u5378\u8F7D\u6210\u529F! \u{1F60A}" : "Uninstalled successfully! \u{1F60A}")
@@ -7744,11 +7280,20 @@ async function setup() {
7744
7280
  );
7745
7281
  }
7746
7282
  } else if (exec === "prun") {
7747
- (0, import_lazy_js_utils13.jsShell)(`cargo run ${params}`);
7283
+ await (0, import_node13.jsShell)(
7284
+ `cargo run ${params}${projectPath ? `--manifest-path=./${projectPath}/Cargo.toml` : ""}`,
7285
+ "inherit"
7286
+ );
7748
7287
  } else if (exec === "pinit") {
7749
- (0, import_lazy_js_utils13.jsShell)(`cargo init ${params}`);
7288
+ await (0, import_node13.jsShell)(
7289
+ `cargo init ${params}${projectPath ? `--manifest-path=./${projectPath}/Cargo.toml` : ""}`,
7290
+ "inherit"
7291
+ );
7750
7292
  } else if (exec === "pbuild") {
7751
- (0, import_lazy_js_utils13.jsShell)(`cargo build ${params}`);
7293
+ await (0, import_node13.jsShell)(
7294
+ `cargo build ${params}${projectPath ? `--manifest-path=./${projectPath}/Cargo.toml` : ""}`,
7295
+ "inherit"
7296
+ );
7752
7297
  } else {
7753
7298
  console.log(
7754
7299
  import_picocolors8.default.red(
@@ -7761,7 +7306,7 @@ async function setup() {
7761
7306
  if (!runMap[exec]) {
7762
7307
  console.log(
7763
7308
  import_picocolors8.default.yellow(
7764
- 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"
7309
+ 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"
7765
7310
  )
7766
7311
  );
7767
7312
  return;