@simon_he/pi 0.0.94 → 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
@@ -66,8 +66,8 @@ var require_picocolors = __commonJS({
66
66
  "node_modules/.pnpm/picocolors@1.1.1/node_modules/picocolors/picocolors.js"(exports, module2) {
67
67
  var p = process || {};
68
68
  var argv = p.argv || [];
69
- var env3 = p.env || {};
70
- var isColorSupported = !(!!env3.NO_COLOR || argv.includes("--no-color")) && (!!env3.FORCE_COLOR || argv.includes("--color") || p.platform === "win32" || (p.stdout || {}).isTTY && env3.TERM !== "dumb" || !!env3.CI);
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);
71
71
  var formatter = (open, close, replace = open) => (input) => {
72
72
  let string = "" + input, index = string.indexOf(close, open.length);
73
73
  return ~index ? open + replaceClose(string, close, replace, index) + close : open + string + close;
@@ -226,11 +226,11 @@ var require_signals = __commonJS({
226
226
  // node_modules/.pnpm/signal-exit@3.0.7/node_modules/signal-exit/index.js
227
227
  var require_signal_exit = __commonJS({
228
228
  "node_modules/.pnpm/signal-exit@3.0.7/node_modules/signal-exit/index.js"(exports, module2) {
229
- var process13 = global.process;
230
- var processOk = function(process14) {
231
- 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";
232
232
  };
233
- if (!processOk(process13)) {
233
+ if (!processOk(process12)) {
234
234
  module2.exports = function() {
235
235
  return function() {
236
236
  };
@@ -238,15 +238,15 @@ var require_signal_exit = __commonJS({
238
238
  } else {
239
239
  assert = require("assert");
240
240
  signals = require_signals();
241
- isWin2 = /^win/i.test(process13.platform);
241
+ isWin2 = /^win/i.test(process12.platform);
242
242
  EE = require("events");
243
243
  if (typeof EE !== "function") {
244
244
  EE = EE.EventEmitter;
245
245
  }
246
- if (process13.__signal_exit_emitter__) {
247
- emitter = process13.__signal_exit_emitter__;
246
+ if (process12.__signal_exit_emitter__) {
247
+ emitter = process12.__signal_exit_emitter__;
248
248
  } else {
249
- emitter = process13.__signal_exit_emitter__ = new EE();
249
+ emitter = process12.__signal_exit_emitter__ = new EE();
250
250
  emitter.count = 0;
251
251
  emitter.emitted = {};
252
252
  }
@@ -283,12 +283,12 @@ var require_signal_exit = __commonJS({
283
283
  loaded = false;
284
284
  signals.forEach(function(sig) {
285
285
  try {
286
- process13.removeListener(sig, sigListeners[sig]);
286
+ process12.removeListener(sig, sigListeners[sig]);
287
287
  } catch (er) {
288
288
  }
289
289
  });
290
- process13.emit = originalProcessEmit;
291
- process13.reallyExit = originalProcessReallyExit;
290
+ process12.emit = originalProcessEmit;
291
+ process12.reallyExit = originalProcessReallyExit;
292
292
  emitter.count -= 1;
293
293
  };
294
294
  module2.exports.unload = unload;
@@ -305,7 +305,7 @@ var require_signal_exit = __commonJS({
305
305
  if (!processOk(global.process)) {
306
306
  return;
307
307
  }
308
- var listeners = process13.listeners(sig);
308
+ var listeners = process12.listeners(sig);
309
309
  if (listeners.length === emitter.count) {
310
310
  unload();
311
311
  emit("exit", null, sig);
@@ -313,7 +313,7 @@ var require_signal_exit = __commonJS({
313
313
  if (isWin2 && sig === "SIGHUP") {
314
314
  sig = "SIGINT";
315
315
  }
316
- process13.kill(process13.pid, sig);
316
+ process12.kill(process12.pid, sig);
317
317
  }
318
318
  };
319
319
  });
@@ -329,36 +329,36 @@ var require_signal_exit = __commonJS({
329
329
  emitter.count += 1;
330
330
  signals = signals.filter(function(sig) {
331
331
  try {
332
- process13.on(sig, sigListeners[sig]);
332
+ process12.on(sig, sigListeners[sig]);
333
333
  return true;
334
334
  } catch (er) {
335
335
  return false;
336
336
  }
337
337
  });
338
- process13.emit = processEmit;
339
- process13.reallyExit = processReallyExit;
338
+ process12.emit = processEmit;
339
+ process12.reallyExit = processReallyExit;
340
340
  };
341
341
  module2.exports.load = load;
342
- originalProcessReallyExit = process13.reallyExit;
342
+ originalProcessReallyExit = process12.reallyExit;
343
343
  processReallyExit = function processReallyExit2(code) {
344
344
  if (!processOk(global.process)) {
345
345
  return;
346
346
  }
347
- process13.exitCode = code || /* istanbul ignore next */
347
+ process12.exitCode = code || /* istanbul ignore next */
348
348
  0;
349
- emit("exit", process13.exitCode, null);
350
- emit("afterexit", process13.exitCode, null);
351
- originalProcessReallyExit.call(process13, process13.exitCode);
349
+ emit("exit", process12.exitCode, null);
350
+ emit("afterexit", process12.exitCode, null);
351
+ originalProcessReallyExit.call(process12, process12.exitCode);
352
352
  };
353
- originalProcessEmit = process13.emit;
353
+ originalProcessEmit = process12.emit;
354
354
  processEmit = function processEmit2(ev, arg) {
355
355
  if (ev === "exit" && processOk(global.process)) {
356
356
  if (arg !== void 0) {
357
- process13.exitCode = arg;
357
+ process12.exitCode = arg;
358
358
  }
359
359
  var ret = originalProcessEmit.apply(this, arguments);
360
- emit("exit", process13.exitCode, null);
361
- emit("afterexit", process13.exitCode, null);
360
+ emit("exit", process12.exitCode, null);
361
+ emit("afterexit", process12.exitCode, null);
362
362
  return ret;
363
363
  } else {
364
364
  return originalProcessEmit.apply(this, arguments);
@@ -2053,7 +2053,7 @@ var require_clone = __commonJS({
2053
2053
  if (depth2 == 0)
2054
2054
  return parent2;
2055
2055
  var child;
2056
- var proto3;
2056
+ var proto2;
2057
2057
  if (typeof parent2 != "object") {
2058
2058
  return parent2;
2059
2059
  }
@@ -2075,11 +2075,11 @@ var require_clone = __commonJS({
2075
2075
  return child;
2076
2076
  } else {
2077
2077
  if (typeof prototype == "undefined") {
2078
- proto3 = Object.getPrototypeOf(parent2);
2079
- child = Object.create(proto3);
2078
+ proto2 = Object.getPrototypeOf(parent2);
2079
+ child = Object.create(proto2);
2080
2080
  } else {
2081
2081
  child = Object.create(prototype);
2082
- proto3 = prototype;
2082
+ proto2 = prototype;
2083
2083
  }
2084
2084
  }
2085
2085
  if (circular) {
@@ -2092,8 +2092,8 @@ var require_clone = __commonJS({
2092
2092
  }
2093
2093
  for (var i in parent2) {
2094
2094
  var attrs;
2095
- if (proto3) {
2096
- attrs = Object.getOwnPropertyDescriptor(proto3, i);
2095
+ if (proto2) {
2096
+ attrs = Object.getOwnPropertyDescriptor(proto2, i);
2097
2097
  }
2098
2098
  if (attrs && attrs.set == null) {
2099
2099
  continue;
@@ -5680,6 +5680,7 @@ __export(src_exports, {
5680
5680
  });
5681
5681
  module.exports = __toCommonJS(src_exports);
5682
5682
  var import_process4 = __toESM(require("process"), 1);
5683
+ var import_posix = __toESM(require("path/posix"), 1);
5683
5684
  var import_node13 = require("lazy-js-utils/dist/node");
5684
5685
  var import_lazy_js_utils2 = require("lazy-js-utils");
5685
5686
  var import_picocolors8 = __toESM(require_picocolors(), 1);
@@ -5692,9 +5693,9 @@ var import_node = require("lazy-js-utils/dist/node");
5692
5693
  var import_lazy_js_utils = require("lazy-js-utils");
5693
5694
 
5694
5695
  // node_modules/.pnpm/ora@6.3.1/node_modules/ora/index.js
5695
- var import_node_process7 = __toESM(require("process"), 1);
5696
+ var import_node_process6 = __toESM(require("process"), 1);
5696
5697
 
5697
- // 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
5698
5699
  var ANSI_BACKGROUND_OFFSET = 10;
5699
5700
  var wrapAnsi16 = (offset = 0) => (code) => `\x1B[${code + offset}m`;
5700
5701
  var wrapAnsi256 = (offset = 0) => (code) => `\x1B[${38 + offset};5;${code}m`;
@@ -5880,7 +5881,7 @@ function assembleStyles() {
5880
5881
  var ansiStyles = assembleStyles();
5881
5882
  var ansi_styles_default = ansiStyles;
5882
5883
 
5883
- // 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
5884
5885
  var import_node_process = __toESM(require("process"), 1);
5885
5886
  var import_node_os = __toESM(require("os"), 1);
5886
5887
  var import_node_tty = __toESM(require("tty"), 1);
@@ -6006,7 +6007,7 @@ var supportsColor = {
6006
6007
  };
6007
6008
  var supports_color_default = supportsColor;
6008
6009
 
6009
- // 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
6010
6011
  function stringReplaceAll(string, substring, replacer) {
6011
6012
  let index = string.indexOf(substring);
6012
6013
  if (index === -1) {
@@ -6036,7 +6037,7 @@ function stringEncaseCRLFWithFirstIndex(string, prefix, postfix, index) {
6036
6037
  return returnValue;
6037
6038
  }
6038
6039
 
6039
- // 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
6040
6041
  var { stdout: stdoutColor, stderr: stderrColor } = supports_color_default;
6041
6042
  var GENERATOR = Symbol("GENERATOR");
6042
6043
  var STYLER = Symbol("STYLER");
@@ -6056,10 +6057,10 @@ var applyOptions = (object, options = {}) => {
6056
6057
  object.level = options.level === void 0 ? colorLevel : options.level;
6057
6058
  };
6058
6059
  var chalkFactory = (options) => {
6059
- const chalk3 = (...strings) => strings.join(" ");
6060
- applyOptions(chalk3, options);
6061
- Object.setPrototypeOf(chalk3, createChalk.prototype);
6062
- return chalk3;
6060
+ const chalk2 = (...strings) => strings.join(" ");
6061
+ applyOptions(chalk2, options);
6062
+ Object.setPrototypeOf(chalk2, createChalk.prototype);
6063
+ return chalk2;
6063
6064
  };
6064
6065
  function createChalk(options) {
6065
6066
  return chalkFactory(options);
@@ -6230,531 +6231,41 @@ var cli_cursor_default = cliCursor;
6230
6231
  // node_modules/.pnpm/ora@6.3.1/node_modules/ora/index.js
6231
6232
  var import_cli_spinners = __toESM(require_cli_spinners(), 1);
6232
6233
 
6233
- // node_modules/.pnpm/chalk@5.3.0/node_modules/chalk/source/vendor/ansi-styles/index.js
6234
- var ANSI_BACKGROUND_OFFSET2 = 10;
6235
- var wrapAnsi162 = (offset = 0) => (code) => `\x1B[${code + offset}m`;
6236
- var wrapAnsi2562 = (offset = 0) => (code) => `\x1B[${38 + offset};5;${code}m`;
6237
- var wrapAnsi16m2 = (offset = 0) => (red, green, blue) => `\x1B[${38 + offset};2;${red};${green};${blue}m`;
6238
- var styles3 = {
6239
- modifier: {
6240
- reset: [0, 0],
6241
- // 21 isn't widely supported and 22 does the same thing
6242
- bold: [1, 22],
6243
- dim: [2, 22],
6244
- italic: [3, 23],
6245
- underline: [4, 24],
6246
- overline: [53, 55],
6247
- inverse: [7, 27],
6248
- hidden: [8, 28],
6249
- strikethrough: [9, 29]
6250
- },
6251
- color: {
6252
- black: [30, 39],
6253
- red: [31, 39],
6254
- green: [32, 39],
6255
- yellow: [33, 39],
6256
- blue: [34, 39],
6257
- magenta: [35, 39],
6258
- cyan: [36, 39],
6259
- white: [37, 39],
6260
- // Bright color
6261
- blackBright: [90, 39],
6262
- gray: [90, 39],
6263
- // Alias of `blackBright`
6264
- grey: [90, 39],
6265
- // Alias of `blackBright`
6266
- redBright: [91, 39],
6267
- greenBright: [92, 39],
6268
- yellowBright: [93, 39],
6269
- blueBright: [94, 39],
6270
- magentaBright: [95, 39],
6271
- cyanBright: [96, 39],
6272
- whiteBright: [97, 39]
6273
- },
6274
- bgColor: {
6275
- bgBlack: [40, 49],
6276
- bgRed: [41, 49],
6277
- bgGreen: [42, 49],
6278
- bgYellow: [43, 49],
6279
- bgBlue: [44, 49],
6280
- bgMagenta: [45, 49],
6281
- bgCyan: [46, 49],
6282
- bgWhite: [47, 49],
6283
- // Bright color
6284
- bgBlackBright: [100, 49],
6285
- bgGray: [100, 49],
6286
- // Alias of `bgBlackBright`
6287
- bgGrey: [100, 49],
6288
- // Alias of `bgBlackBright`
6289
- bgRedBright: [101, 49],
6290
- bgGreenBright: [102, 49],
6291
- bgYellowBright: [103, 49],
6292
- bgBlueBright: [104, 49],
6293
- bgMagentaBright: [105, 49],
6294
- bgCyanBright: [106, 49],
6295
- bgWhiteBright: [107, 49]
6296
- }
6297
- };
6298
- var modifierNames2 = Object.keys(styles3.modifier);
6299
- var foregroundColorNames2 = Object.keys(styles3.color);
6300
- var backgroundColorNames2 = Object.keys(styles3.bgColor);
6301
- var colorNames2 = [...foregroundColorNames2, ...backgroundColorNames2];
6302
- function assembleStyles2() {
6303
- const codes = /* @__PURE__ */ new Map();
6304
- for (const [groupName, group] of Object.entries(styles3)) {
6305
- for (const [styleName, style] of Object.entries(group)) {
6306
- styles3[styleName] = {
6307
- open: `\x1B[${style[0]}m`,
6308
- close: `\x1B[${style[1]}m`
6309
- };
6310
- group[styleName] = styles3[styleName];
6311
- codes.set(style[0], style[1]);
6312
- }
6313
- Object.defineProperty(styles3, groupName, {
6314
- value: group,
6315
- enumerable: false
6316
- });
6317
- }
6318
- Object.defineProperty(styles3, "codes", {
6319
- value: codes,
6320
- enumerable: false
6321
- });
6322
- styles3.color.close = "\x1B[39m";
6323
- styles3.bgColor.close = "\x1B[49m";
6324
- styles3.color.ansi = wrapAnsi162();
6325
- styles3.color.ansi256 = wrapAnsi2562();
6326
- styles3.color.ansi16m = wrapAnsi16m2();
6327
- styles3.bgColor.ansi = wrapAnsi162(ANSI_BACKGROUND_OFFSET2);
6328
- styles3.bgColor.ansi256 = wrapAnsi2562(ANSI_BACKGROUND_OFFSET2);
6329
- styles3.bgColor.ansi16m = wrapAnsi16m2(ANSI_BACKGROUND_OFFSET2);
6330
- Object.defineProperties(styles3, {
6331
- rgbToAnsi256: {
6332
- value(red, green, blue) {
6333
- if (red === green && green === blue) {
6334
- if (red < 8) {
6335
- return 16;
6336
- }
6337
- if (red > 248) {
6338
- return 231;
6339
- }
6340
- return Math.round((red - 8) / 247 * 24) + 232;
6341
- }
6342
- return 16 + 36 * Math.round(red / 255 * 5) + 6 * Math.round(green / 255 * 5) + Math.round(blue / 255 * 5);
6343
- },
6344
- enumerable: false
6345
- },
6346
- hexToRgb: {
6347
- value(hex) {
6348
- const matches = /[a-f\d]{6}|[a-f\d]{3}/i.exec(hex.toString(16));
6349
- if (!matches) {
6350
- return [0, 0, 0];
6351
- }
6352
- let [colorString] = matches;
6353
- if (colorString.length === 3) {
6354
- colorString = [...colorString].map((character) => character + character).join("");
6355
- }
6356
- const integer = Number.parseInt(colorString, 16);
6357
- return [
6358
- /* eslint-disable no-bitwise */
6359
- integer >> 16 & 255,
6360
- integer >> 8 & 255,
6361
- integer & 255
6362
- /* eslint-enable no-bitwise */
6363
- ];
6364
- },
6365
- enumerable: false
6366
- },
6367
- hexToAnsi256: {
6368
- value: (hex) => styles3.rgbToAnsi256(...styles3.hexToRgb(hex)),
6369
- enumerable: false
6370
- },
6371
- ansi256ToAnsi: {
6372
- value(code) {
6373
- if (code < 8) {
6374
- return 30 + code;
6375
- }
6376
- if (code < 16) {
6377
- return 90 + (code - 8);
6378
- }
6379
- let red;
6380
- let green;
6381
- let blue;
6382
- if (code >= 232) {
6383
- red = ((code - 232) * 10 + 8) / 255;
6384
- green = red;
6385
- blue = red;
6386
- } else {
6387
- code -= 16;
6388
- const remainder = code % 36;
6389
- red = Math.floor(code / 36) / 5;
6390
- green = Math.floor(remainder / 6) / 5;
6391
- blue = remainder % 6 / 5;
6392
- }
6393
- const value = Math.max(red, green, blue) * 2;
6394
- if (value === 0) {
6395
- return 30;
6396
- }
6397
- let result = 30 + (Math.round(blue) << 2 | Math.round(green) << 1 | Math.round(red));
6398
- if (value === 2) {
6399
- result += 60;
6400
- }
6401
- return result;
6402
- },
6403
- enumerable: false
6404
- },
6405
- rgbToAnsi: {
6406
- value: (red, green, blue) => styles3.ansi256ToAnsi(styles3.rgbToAnsi256(red, green, blue)),
6407
- enumerable: false
6408
- },
6409
- hexToAnsi: {
6410
- value: (hex) => styles3.ansi256ToAnsi(styles3.hexToAnsi256(hex)),
6411
- enumerable: false
6412
- }
6413
- });
6414
- return styles3;
6415
- }
6416
- var ansiStyles2 = assembleStyles2();
6417
- var ansi_styles_default2 = ansiStyles2;
6418
-
6419
- // node_modules/.pnpm/chalk@5.3.0/node_modules/chalk/source/vendor/supports-color/index.js
6420
- var import_node_process4 = __toESM(require("process"), 1);
6421
- var import_node_os2 = __toESM(require("os"), 1);
6422
- var import_node_tty2 = __toESM(require("tty"), 1);
6423
- function hasFlag2(flag, argv = globalThis.Deno ? globalThis.Deno.args : import_node_process4.default.argv) {
6424
- const prefix = flag.startsWith("-") ? "" : flag.length === 1 ? "-" : "--";
6425
- const position = argv.indexOf(prefix + flag);
6426
- const terminatorPosition = argv.indexOf("--");
6427
- return position !== -1 && (terminatorPosition === -1 || position < terminatorPosition);
6428
- }
6429
- var { env: env2 } = import_node_process4.default;
6430
- var flagForceColor2;
6431
- if (hasFlag2("no-color") || hasFlag2("no-colors") || hasFlag2("color=false") || hasFlag2("color=never")) {
6432
- flagForceColor2 = 0;
6433
- } else if (hasFlag2("color") || hasFlag2("colors") || hasFlag2("color=true") || hasFlag2("color=always")) {
6434
- flagForceColor2 = 1;
6435
- }
6436
- function envForceColor2() {
6437
- if ("FORCE_COLOR" in env2) {
6438
- if (env2.FORCE_COLOR === "true") {
6439
- return 1;
6440
- }
6441
- if (env2.FORCE_COLOR === "false") {
6442
- return 0;
6443
- }
6444
- return env2.FORCE_COLOR.length === 0 ? 1 : Math.min(Number.parseInt(env2.FORCE_COLOR, 10), 3);
6445
- }
6446
- }
6447
- function translateLevel2(level) {
6448
- if (level === 0) {
6449
- return false;
6450
- }
6451
- return {
6452
- level,
6453
- hasBasic: true,
6454
- has256: level >= 2,
6455
- has16m: level >= 3
6456
- };
6457
- }
6458
- function _supportsColor2(haveStream, { streamIsTTY, sniffFlags = true } = {}) {
6459
- const noFlagForceColor = envForceColor2();
6460
- if (noFlagForceColor !== void 0) {
6461
- flagForceColor2 = noFlagForceColor;
6462
- }
6463
- const forceColor = sniffFlags ? flagForceColor2 : noFlagForceColor;
6464
- if (forceColor === 0) {
6465
- return 0;
6466
- }
6467
- if (sniffFlags) {
6468
- if (hasFlag2("color=16m") || hasFlag2("color=full") || hasFlag2("color=truecolor")) {
6469
- return 3;
6470
- }
6471
- if (hasFlag2("color=256")) {
6472
- return 2;
6473
- }
6474
- }
6475
- if ("TF_BUILD" in env2 && "AGENT_NAME" in env2) {
6476
- return 1;
6477
- }
6478
- if (haveStream && !streamIsTTY && forceColor === void 0) {
6479
- return 0;
6480
- }
6481
- const min = forceColor || 0;
6482
- if (env2.TERM === "dumb") {
6483
- return min;
6484
- }
6485
- if (import_node_process4.default.platform === "win32") {
6486
- const osRelease = import_node_os2.default.release().split(".");
6487
- if (Number(osRelease[0]) >= 10 && Number(osRelease[2]) >= 10586) {
6488
- return Number(osRelease[2]) >= 14931 ? 3 : 2;
6489
- }
6490
- return 1;
6491
- }
6492
- if ("CI" in env2) {
6493
- if ("GITHUB_ACTIONS" in env2 || "GITEA_ACTIONS" in env2) {
6494
- return 3;
6495
- }
6496
- if (["TRAVIS", "CIRCLECI", "APPVEYOR", "GITLAB_CI", "BUILDKITE", "DRONE"].some((sign) => sign in env2) || env2.CI_NAME === "codeship") {
6497
- return 1;
6498
- }
6499
- return min;
6500
- }
6501
- if ("TEAMCITY_VERSION" in env2) {
6502
- return /^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(env2.TEAMCITY_VERSION) ? 1 : 0;
6503
- }
6504
- if (env2.COLORTERM === "truecolor") {
6505
- return 3;
6506
- }
6507
- if (env2.TERM === "xterm-kitty") {
6508
- return 3;
6509
- }
6510
- if ("TERM_PROGRAM" in env2) {
6511
- const version2 = Number.parseInt((env2.TERM_PROGRAM_VERSION || "").split(".")[0], 10);
6512
- switch (env2.TERM_PROGRAM) {
6513
- case "iTerm.app": {
6514
- return version2 >= 3 ? 3 : 2;
6515
- }
6516
- case "Apple_Terminal": {
6517
- return 2;
6518
- }
6519
- }
6520
- }
6521
- if (/-256(color)?$/i.test(env2.TERM)) {
6522
- return 2;
6523
- }
6524
- if (/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(env2.TERM)) {
6525
- return 1;
6526
- }
6527
- if ("COLORTERM" in env2) {
6528
- return 1;
6529
- }
6530
- return min;
6531
- }
6532
- function createSupportsColor2(stream, options = {}) {
6533
- const level = _supportsColor2(stream, {
6534
- streamIsTTY: stream && stream.isTTY,
6535
- ...options
6536
- });
6537
- return translateLevel2(level);
6538
- }
6539
- var supportsColor2 = {
6540
- stdout: createSupportsColor2({ isTTY: import_node_tty2.default.isatty(1) }),
6541
- stderr: createSupportsColor2({ isTTY: import_node_tty2.default.isatty(2) })
6542
- };
6543
- var supports_color_default2 = supportsColor2;
6544
-
6545
- // node_modules/.pnpm/chalk@5.3.0/node_modules/chalk/source/utilities.js
6546
- function stringReplaceAll2(string, substring, replacer) {
6547
- let index = string.indexOf(substring);
6548
- if (index === -1) {
6549
- return string;
6550
- }
6551
- const substringLength = substring.length;
6552
- let endIndex = 0;
6553
- let returnValue = "";
6554
- do {
6555
- returnValue += string.slice(endIndex, index) + substring + replacer;
6556
- endIndex = index + substringLength;
6557
- index = string.indexOf(substring, endIndex);
6558
- } while (index !== -1);
6559
- returnValue += string.slice(endIndex);
6560
- return returnValue;
6561
- }
6562
- function stringEncaseCRLFWithFirstIndex2(string, prefix, postfix, index) {
6563
- let endIndex = 0;
6564
- let returnValue = "";
6565
- do {
6566
- const gotCR = string[index - 1] === "\r";
6567
- returnValue += string.slice(endIndex, gotCR ? index - 1 : index) + prefix + (gotCR ? "\r\n" : "\n") + postfix;
6568
- endIndex = index + 1;
6569
- index = string.indexOf("\n", endIndex);
6570
- } while (index !== -1);
6571
- returnValue += string.slice(endIndex);
6572
- return returnValue;
6573
- }
6574
-
6575
- // node_modules/.pnpm/chalk@5.3.0/node_modules/chalk/source/index.js
6576
- var { stdout: stdoutColor2, stderr: stderrColor2 } = supports_color_default2;
6577
- var GENERATOR2 = Symbol("GENERATOR");
6578
- var STYLER2 = Symbol("STYLER");
6579
- var IS_EMPTY2 = Symbol("IS_EMPTY");
6580
- var levelMapping2 = [
6581
- "ansi",
6582
- "ansi",
6583
- "ansi256",
6584
- "ansi16m"
6585
- ];
6586
- var styles4 = /* @__PURE__ */ Object.create(null);
6587
- var applyOptions2 = (object, options = {}) => {
6588
- if (options.level && !(Number.isInteger(options.level) && options.level >= 0 && options.level <= 3)) {
6589
- throw new Error("The `level` option should be an integer from 0 to 3");
6590
- }
6591
- const colorLevel = stdoutColor2 ? stdoutColor2.level : 0;
6592
- object.level = options.level === void 0 ? colorLevel : options.level;
6593
- };
6594
- var chalkFactory2 = (options) => {
6595
- const chalk3 = (...strings) => strings.join(" ");
6596
- applyOptions2(chalk3, options);
6597
- Object.setPrototypeOf(chalk3, createChalk2.prototype);
6598
- return chalk3;
6599
- };
6600
- function createChalk2(options) {
6601
- return chalkFactory2(options);
6602
- }
6603
- Object.setPrototypeOf(createChalk2.prototype, Function.prototype);
6604
- for (const [styleName, style] of Object.entries(ansi_styles_default2)) {
6605
- styles4[styleName] = {
6606
- get() {
6607
- const builder = createBuilder2(this, createStyler2(style.open, style.close, this[STYLER2]), this[IS_EMPTY2]);
6608
- Object.defineProperty(this, styleName, { value: builder });
6609
- return builder;
6610
- }
6611
- };
6612
- }
6613
- styles4.visible = {
6614
- get() {
6615
- const builder = createBuilder2(this, this[STYLER2], true);
6616
- Object.defineProperty(this, "visible", { value: builder });
6617
- return builder;
6618
- }
6619
- };
6620
- var getModelAnsi2 = (model, level, type, ...arguments_) => {
6621
- if (model === "rgb") {
6622
- if (level === "ansi16m") {
6623
- return ansi_styles_default2[type].ansi16m(...arguments_);
6624
- }
6625
- if (level === "ansi256") {
6626
- return ansi_styles_default2[type].ansi256(ansi_styles_default2.rgbToAnsi256(...arguments_));
6627
- }
6628
- return ansi_styles_default2[type].ansi(ansi_styles_default2.rgbToAnsi(...arguments_));
6629
- }
6630
- if (model === "hex") {
6631
- return getModelAnsi2("rgb", level, type, ...ansi_styles_default2.hexToRgb(...arguments_));
6632
- }
6633
- return ansi_styles_default2[type][model](...arguments_);
6634
- };
6635
- var usedModels2 = ["rgb", "hex", "ansi256"];
6636
- for (const model of usedModels2) {
6637
- styles4[model] = {
6638
- get() {
6639
- const { level } = this;
6640
- return function(...arguments_) {
6641
- const styler = createStyler2(getModelAnsi2(model, levelMapping2[level], "color", ...arguments_), ansi_styles_default2.color.close, this[STYLER2]);
6642
- return createBuilder2(this, styler, this[IS_EMPTY2]);
6643
- };
6644
- }
6645
- };
6646
- const bgModel = "bg" + model[0].toUpperCase() + model.slice(1);
6647
- styles4[bgModel] = {
6648
- get() {
6649
- const { level } = this;
6650
- return function(...arguments_) {
6651
- const styler = createStyler2(getModelAnsi2(model, levelMapping2[level], "bgColor", ...arguments_), ansi_styles_default2.bgColor.close, this[STYLER2]);
6652
- return createBuilder2(this, styler, this[IS_EMPTY2]);
6653
- };
6654
- }
6655
- };
6656
- }
6657
- var proto2 = Object.defineProperties(() => {
6658
- }, {
6659
- ...styles4,
6660
- level: {
6661
- enumerable: true,
6662
- get() {
6663
- return this[GENERATOR2].level;
6664
- },
6665
- set(level) {
6666
- this[GENERATOR2].level = level;
6667
- }
6668
- }
6669
- });
6670
- var createStyler2 = (open, close, parent) => {
6671
- let openAll;
6672
- let closeAll;
6673
- if (parent === void 0) {
6674
- openAll = open;
6675
- closeAll = close;
6676
- } else {
6677
- openAll = parent.openAll + open;
6678
- closeAll = close + parent.closeAll;
6679
- }
6680
- return {
6681
- open,
6682
- close,
6683
- openAll,
6684
- closeAll,
6685
- parent
6686
- };
6687
- };
6688
- var createBuilder2 = (self2, _styler, _isEmpty) => {
6689
- const builder = (...arguments_) => applyStyle2(builder, arguments_.length === 1 ? "" + arguments_[0] : arguments_.join(" "));
6690
- Object.setPrototypeOf(builder, proto2);
6691
- builder[GENERATOR2] = self2;
6692
- builder[STYLER2] = _styler;
6693
- builder[IS_EMPTY2] = _isEmpty;
6694
- return builder;
6695
- };
6696
- var applyStyle2 = (self2, string) => {
6697
- if (self2.level <= 0 || !string) {
6698
- return self2[IS_EMPTY2] ? "" : string;
6699
- }
6700
- let styler = self2[STYLER2];
6701
- if (styler === void 0) {
6702
- return string;
6703
- }
6704
- const { openAll, closeAll } = styler;
6705
- if (string.includes("\x1B")) {
6706
- while (styler !== void 0) {
6707
- string = stringReplaceAll2(string, styler.close, styler.open);
6708
- styler = styler.parent;
6709
- }
6710
- }
6711
- const lfIndex = string.indexOf("\n");
6712
- if (lfIndex !== -1) {
6713
- string = stringEncaseCRLFWithFirstIndex2(string, closeAll, openAll, lfIndex);
6714
- }
6715
- return openAll + string + closeAll;
6716
- };
6717
- Object.defineProperties(createChalk2.prototype, styles4);
6718
- var chalk2 = createChalk2();
6719
- var chalkStderr2 = createChalk2({ level: stderrColor2 ? stderrColor2.level : 0 });
6720
- var source_default2 = chalk2;
6721
-
6722
6234
  // node_modules/.pnpm/is-unicode-supported@1.3.0/node_modules/is-unicode-supported/index.js
6723
- var import_node_process5 = __toESM(require("process"), 1);
6235
+ var import_node_process4 = __toESM(require("process"), 1);
6724
6236
  function isUnicodeSupported() {
6725
- if (import_node_process5.default.platform !== "win32") {
6726
- 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";
6727
6239
  }
6728
- 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";
6729
6241
  }
6730
6242
 
6731
6243
  // node_modules/.pnpm/log-symbols@5.1.0/node_modules/log-symbols/index.js
6732
6244
  var main = {
6733
- info: source_default2.blue("\u2139"),
6734
- success: source_default2.green("\u2714"),
6735
- warning: source_default2.yellow("\u26A0"),
6736
- 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")
6737
6249
  };
6738
6250
  var fallback = {
6739
- info: source_default2.blue("i"),
6740
- success: source_default2.green("\u221A"),
6741
- warning: source_default2.yellow("\u203C"),
6742
- 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")
6743
6255
  };
6744
6256
  var logSymbols = isUnicodeSupported() ? main : fallback;
6745
6257
  var log_symbols_default = logSymbols;
6746
6258
 
6747
- // 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
6748
6260
  function ansiRegex({ onlyFirst = false } = {}) {
6749
- const ST = "(?:\\u0007|\\u001B\\u005C|\\u009C)";
6750
6261
  const pattern = [
6751
- `[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?${ST})`,
6752
- "(?:(?:\\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=><~]))"
6753
6264
  ].join("|");
6754
6265
  return new RegExp(pattern, onlyFirst ? void 0 : "g");
6755
6266
  }
6756
6267
 
6757
- // 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
6758
6269
  var regex = ansiRegex();
6759
6270
  function stripAnsi(string) {
6760
6271
  if (typeof string !== "string") {
@@ -6774,7 +6285,7 @@ function isInteractive({ stream = process.stdout } = {}) {
6774
6285
  }
6775
6286
 
6776
6287
  // node_modules/.pnpm/stdin-discarder@0.1.0/node_modules/stdin-discarder/index.js
6777
- var import_node_process6 = __toESM(require("process"), 1);
6288
+ var import_node_process5 = __toESM(require("process"), 1);
6778
6289
  var import_node_readline = __toESM(require("readline"), 1);
6779
6290
  var import_bl = __toESM(require_bl(), 1);
6780
6291
  var ASCII_ETX_CODE = 3;
@@ -6785,20 +6296,20 @@ var StdinDiscarder = class {
6785
6296
  __privateAdd(this, _mutedStream, new import_bl.BufferListStream());
6786
6297
  __privateAdd(this, _ourEmit, void 0);
6787
6298
  __privateAdd(this, _rl, void 0);
6788
- __privateGet(this, _mutedStream).pipe(import_node_process6.default.stdout);
6299
+ __privateGet(this, _mutedStream).pipe(import_node_process5.default.stdout);
6789
6300
  const self2 = this;
6790
6301
  __privateSet(this, _ourEmit, function(event, data, ...arguments_) {
6791
- const { stdin } = import_node_process6.default;
6302
+ const { stdin } = import_node_process5.default;
6792
6303
  if (__privateGet(self2, _requests) > 0 || stdin.emit === __privateGet(self2, _ourEmit)) {
6793
6304
  if (event === "keypress") {
6794
6305
  return;
6795
6306
  }
6796
6307
  if (event === "data" && data.includes(ASCII_ETX_CODE)) {
6797
- import_node_process6.default.emit("SIGINT");
6308
+ import_node_process5.default.emit("SIGINT");
6798
6309
  }
6799
6310
  Reflect.apply(__privateGet(self2, _ourEmit), this, [event, data, ...arguments_]);
6800
6311
  } else {
6801
- 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_]);
6802
6313
  }
6803
6314
  });
6804
6315
  }
@@ -6819,24 +6330,24 @@ var StdinDiscarder = class {
6819
6330
  }
6820
6331
  // TODO: Use private methods when targeting Node.js 14.
6821
6332
  _realStart() {
6822
- if (import_node_process6.default.platform === "win32") {
6333
+ if (import_node_process5.default.platform === "win32") {
6823
6334
  return;
6824
6335
  }
6825
6336
  __privateSet(this, _rl, import_node_readline.default.createInterface({
6826
- input: import_node_process6.default.stdin,
6337
+ input: import_node_process5.default.stdin,
6827
6338
  output: __privateGet(this, _mutedStream)
6828
6339
  }));
6829
6340
  __privateGet(this, _rl).on("SIGINT", () => {
6830
- if (import_node_process6.default.listenerCount("SIGINT") === 0) {
6831
- import_node_process6.default.emit("SIGINT");
6341
+ if (import_node_process5.default.listenerCount("SIGINT") === 0) {
6342
+ import_node_process5.default.emit("SIGINT");
6832
6343
  } else {
6833
6344
  __privateGet(this, _rl).close();
6834
- import_node_process6.default.kill(import_node_process6.default.pid, "SIGINT");
6345
+ import_node_process5.default.kill(import_node_process5.default.pid, "SIGINT");
6835
6346
  }
6836
6347
  });
6837
6348
  }
6838
6349
  _realStop() {
6839
- if (import_node_process6.default.platform === "win32") {
6350
+ if (import_node_process5.default.platform === "win32") {
6840
6351
  return;
6841
6352
  }
6842
6353
  __privateGet(this, _rl).close();
@@ -6878,7 +6389,7 @@ var Ora = class {
6878
6389
  }
6879
6390
  __privateSet(this, _options, {
6880
6391
  color: "cyan",
6881
- stream: import_node_process7.default.stderr,
6392
+ stream: import_node_process6.default.stderr,
6882
6393
  discardStdin: true,
6883
6394
  hideCursor: true,
6884
6395
  ...options
@@ -6893,7 +6404,7 @@ var Ora = class {
6893
6404
  this.prefixText = __privateGet(this, _options).prefixText;
6894
6405
  this.suffixText = __privateGet(this, _options).suffixText;
6895
6406
  this.indent = __privateGet(this, _options).indent;
6896
- if (import_node_process7.default.env.NODE_ENV === "test") {
6407
+ if (import_node_process6.default.env.NODE_ENV === "test") {
6897
6408
  this._stream = __privateGet(this, _stream);
6898
6409
  this._isEnabled = __privateGet(this, _isEnabled);
6899
6410
  Object.defineProperty(this, "_linesToClear", {
@@ -7080,7 +6591,7 @@ var Ora = class {
7080
6591
  if (__privateGet(this, _options).hideCursor) {
7081
6592
  cli_cursor_default.hide(__privateGet(this, _stream));
7082
6593
  }
7083
- if (__privateGet(this, _options).discardStdin && import_node_process7.default.stdin.isTTY) {
6594
+ if (__privateGet(this, _options).discardStdin && import_node_process6.default.stdin.isTTY) {
7084
6595
  __privateSet(this, _isDiscardingStdin, true);
7085
6596
  stdin_discarder_default.start();
7086
6597
  }
@@ -7099,7 +6610,7 @@ var Ora = class {
7099
6610
  if (__privateGet(this, _options).hideCursor) {
7100
6611
  cli_cursor_default.show(__privateGet(this, _stream));
7101
6612
  }
7102
- 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)) {
7103
6614
  stdin_discarder_default.stop();
7104
6615
  __privateSet(this, _isDiscardingStdin, false);
7105
6616
  }
@@ -7270,7 +6781,7 @@ async function getLatestVersion(pkg, isZh6 = true) {
7270
6781
  var import_node2 = require("lazy-js-utils/dist/node");
7271
6782
 
7272
6783
  // package.json
7273
- var version = "0.0.94";
6784
+ var version = "0.0.95";
7274
6785
 
7275
6786
  // src/help.ts
7276
6787
  var isZh2 = process.env.PI_Lang === "zh";
@@ -7677,9 +7188,9 @@ async function setup() {
7677
7188
  }
7678
7189
  const argv = import_process4.default.argv.slice(2);
7679
7190
  help(argv);
7680
- const params = (0, import_lazy_js_utils2.spaceFormat)(argv.join(" ")).trim();
7681
- if (!(0, import_node13.hasPkg)(rootPath)) {
7682
- if (await (0, import_lazy_js_utils2.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)) {
7683
7194
  if (exec === "pi") {
7684
7195
  const loading_status = await loading(
7685
7196
  `${isZh5 ? "\u6B63\u5728\u4E3A\u60A8\u5B89\u88C5" : "Installing"} ${params} ...
@@ -7713,11 +7224,11 @@ async function setup() {
7713
7224
  } else if (exec === "prun") {
7714
7225
  const match = params ? params.endsWith(".go") ? [`**/${params}`] : [`**/${params}.go`, `**/${params}/main.go`] : "main.go";
7715
7226
  const target = (await (0, import_fast_glob.default)(match))[0];
7716
- return target ? (0, import_node13.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);
7717
7228
  } else if (exec === "pinit") {
7718
- (0, import_node13.jsShell)(`go mod init ${params}`);
7229
+ await (0, import_node13.jsShell)(`go mod init ${params}`, "inherit");
7719
7230
  } else if (exec === "pbuild") {
7720
- (0, import_node13.jsShell)(`go build ${params}`);
7231
+ await (0, import_node13.jsShell)(`go build ${params}`, "inherit");
7721
7232
  } else {
7722
7233
  console.log(
7723
7234
  import_picocolors8.default.red(
@@ -7727,13 +7238,21 @@ async function setup() {
7727
7238
  }
7728
7239
  import_process4.default.exit();
7729
7240
  }
7730
- if (await (0, import_lazy_js_utils2.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)) {
7731
7248
  if (exec === "pi") {
7732
7249
  const loading_status = await loading(
7733
7250
  `${isZh5 ? "\u6B63\u5728\u4E3A\u60A8\u5B89\u88C5" : "Installing"} ${params} ...
7734
7251
  `
7735
7252
  );
7736
- const { status } = await (0, import_node13.useNodeWorker)(`cargo install ${params}`);
7253
+ const { status } = await (0, import_node13.useNodeWorker)(
7254
+ `cargo install ${params}${projectPath ? `--manifest-path=./${projectPath}/Cargo.toml` : ""}`
7255
+ );
7737
7256
  if (status === 0) {
7738
7257
  loading_status.succeed(
7739
7258
  import_picocolors8.default.green(isZh5 ? "\u5B89\u88C5\u6210\u529F! \u{1F60A}" : "Installed successfully! \u{1F60A}")
@@ -7748,7 +7267,9 @@ async function setup() {
7748
7267
  `${isZh5 ? "\u6B63\u5728\u4E3A\u60A8\u5378\u8F7D" : "Uninstalling"} ${params} ...
7749
7268
  `
7750
7269
  );
7751
- const { status } = await (0, import_node13.useNodeWorker)(`cargo uninstall ${params}`);
7270
+ const { status } = await (0, import_node13.useNodeWorker)(
7271
+ `cargo uninstall ${params}${projectPath ? `--manifest-path=./${projectPath}/Cargo.toml` : ""}`
7272
+ );
7752
7273
  if (status === 0) {
7753
7274
  loading_status.succeed(
7754
7275
  import_picocolors8.default.green(isZh5 ? "\u5378\u8F7D\u6210\u529F! \u{1F60A}" : "Uninstalled successfully! \u{1F60A}")
@@ -7759,11 +7280,20 @@ async function setup() {
7759
7280
  );
7760
7281
  }
7761
7282
  } else if (exec === "prun") {
7762
- (0, import_node13.jsShell)(`cargo run ${params}`);
7283
+ await (0, import_node13.jsShell)(
7284
+ `cargo run ${params}${projectPath ? `--manifest-path=./${projectPath}/Cargo.toml` : ""}`,
7285
+ "inherit"
7286
+ );
7763
7287
  } else if (exec === "pinit") {
7764
- (0, import_node13.jsShell)(`cargo init ${params}`);
7288
+ await (0, import_node13.jsShell)(
7289
+ `cargo init ${params}${projectPath ? `--manifest-path=./${projectPath}/Cargo.toml` : ""}`,
7290
+ "inherit"
7291
+ );
7765
7292
  } else if (exec === "pbuild") {
7766
- (0, import_node13.jsShell)(`cargo build ${params}`);
7293
+ await (0, import_node13.jsShell)(
7294
+ `cargo build ${params}${projectPath ? `--manifest-path=./${projectPath}/Cargo.toml` : ""}`,
7295
+ "inherit"
7296
+ );
7767
7297
  } else {
7768
7298
  console.log(
7769
7299
  import_picocolors8.default.red(
@@ -7776,7 +7306,7 @@ async function setup() {
7776
7306
  if (!runMap[exec]) {
7777
7307
  console.log(
7778
7308
  import_picocolors8.default.yellow(
7779
- 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"
7780
7310
  )
7781
7311
  );
7782
7312
  return;