@simon_he/pi 0.0.58 → 0.0.60

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
@@ -6451,7 +6451,7 @@ async function getStyle() {
6451
6451
  var import_lazy_js_utils2 = require("lazy-js-utils");
6452
6452
 
6453
6453
  // package.json
6454
- var version = "0.0.58";
6454
+ var version = "0.0.60";
6455
6455
 
6456
6456
  // src/help.ts
6457
6457
  var isZh2 = process.env.PI_Lang === "zh";
@@ -6507,6 +6507,7 @@ async function pi(params, pkg, executor = "ni") {
6507
6507
  loading_status = await loading(text);
6508
6508
  } else {
6509
6509
  stdio = "inherit";
6510
+ executor = "ni";
6510
6511
  }
6511
6512
  } else {
6512
6513
  executor = `${pkgTool} ${install}`;
@@ -6521,19 +6522,13 @@ async function pi(params, pkg, executor = "ni") {
6521
6522
  loading_status = await loading("");
6522
6523
  if (status === 0) {
6523
6524
  loading_status.succeed(import_picocolors2.default.green(successMsg));
6525
+ } else if (result && result.includes("Not Found - 404")) {
6526
+ const _result = isZh3 ? `${pkg} \u5305\u540D\u53EF\u80FD\u6709\u8BEF\uFF0C\u5E76\u4E0D\u80FD\u5728npm\u4E2D\u641C\u7D22\u5230\uFF0C\u8BF7\u68C0\u67E5` : `${pkg} the package name may be wrong, and cannot be found in npm, please check`;
6527
+ loading_status.fail(import_picocolors2.default.red(result ? `${failMsg}
6528
+ ${_result}` : failMsg));
6524
6529
  } else {
6525
- if (result.includes("Not Found - 404")) {
6526
- const _result = isZh3 ? `${pkg} \u5305\u540D\u53EF\u80FD\u6709\u8BEF\uFF0C\u5E76\u4E0D\u80FD\u5728npm\u4E2D\u641C\u7D22\u5230\uFF0C\u8BF7\u68C0\u67E5` : `${pkg} the package name may be wrong, and cannot be found in npm, please check`;
6527
- loading_status.fail(
6528
- import_picocolors2.default.red(result ? `${failMsg}
6529
- ${_result}` : failMsg)
6530
- );
6531
- } else {
6532
- loading_status.fail(
6533
- import_picocolors2.default.red(result ? `${failMsg}
6534
- ${result}` : failMsg)
6535
- );
6536
- }
6530
+ loading_status.fail(import_picocolors2.default.red(result ? `${failMsg}
6531
+ ${result}` : failMsg));
6537
6532
  }
6538
6533
  if (result) {
6539
6534
  const reg = / No matching version found for ([\w\-\_@\^.]+)/;
@@ -6573,7 +6568,8 @@ async function pil(params) {
6573
6568
  return "";
6574
6569
  });
6575
6570
  const command = `${latestPkgname}${suffix}`;
6576
- return pi(command, command, "pil");
6571
+ console.log("pil~~");
6572
+ return await pi(command, command, "pil");
6577
6573
  }
6578
6574
  function addLatest(params) {
6579
6575
  return params.replace(/\s+/g, " ").trim().split(" ").map((item) => {
package/dist/index.js CHANGED
@@ -6455,7 +6455,7 @@ async function getStyle() {
6455
6455
  import { jsShell } from "lazy-js-utils";
6456
6456
 
6457
6457
  // package.json
6458
- var version = "0.0.58";
6458
+ var version = "0.0.60";
6459
6459
 
6460
6460
  // src/help.ts
6461
6461
  var isZh2 = process.env.PI_Lang === "zh";
@@ -6511,6 +6511,7 @@ async function pi(params, pkg, executor = "ni") {
6511
6511
  loading_status = await loading(text);
6512
6512
  } else {
6513
6513
  stdio = "inherit";
6514
+ executor = "ni";
6514
6515
  }
6515
6516
  } else {
6516
6517
  executor = `${pkgTool} ${install}`;
@@ -6525,19 +6526,13 @@ async function pi(params, pkg, executor = "ni") {
6525
6526
  loading_status = await loading("");
6526
6527
  if (status === 0) {
6527
6528
  loading_status.succeed(import_picocolors2.default.green(successMsg));
6529
+ } else if (result && result.includes("Not Found - 404")) {
6530
+ const _result = isZh3 ? `${pkg} \u5305\u540D\u53EF\u80FD\u6709\u8BEF\uFF0C\u5E76\u4E0D\u80FD\u5728npm\u4E2D\u641C\u7D22\u5230\uFF0C\u8BF7\u68C0\u67E5` : `${pkg} the package name may be wrong, and cannot be found in npm, please check`;
6531
+ loading_status.fail(import_picocolors2.default.red(result ? `${failMsg}
6532
+ ${_result}` : failMsg));
6528
6533
  } else {
6529
- if (result.includes("Not Found - 404")) {
6530
- const _result = isZh3 ? `${pkg} \u5305\u540D\u53EF\u80FD\u6709\u8BEF\uFF0C\u5E76\u4E0D\u80FD\u5728npm\u4E2D\u641C\u7D22\u5230\uFF0C\u8BF7\u68C0\u67E5` : `${pkg} the package name may be wrong, and cannot be found in npm, please check`;
6531
- loading_status.fail(
6532
- import_picocolors2.default.red(result ? `${failMsg}
6533
- ${_result}` : failMsg)
6534
- );
6535
- } else {
6536
- loading_status.fail(
6537
- import_picocolors2.default.red(result ? `${failMsg}
6538
- ${result}` : failMsg)
6539
- );
6540
- }
6534
+ loading_status.fail(import_picocolors2.default.red(result ? `${failMsg}
6535
+ ${result}` : failMsg));
6541
6536
  }
6542
6537
  if (result) {
6543
6538
  const reg = / No matching version found for ([\w\-\_@\^.]+)/;
@@ -6577,7 +6572,8 @@ async function pil(params) {
6577
6572
  return "";
6578
6573
  });
6579
6574
  const command = `${latestPkgname}${suffix}`;
6580
- return pi(command, command, "pil");
6575
+ console.log("pil~~");
6576
+ return await pi(command, command, "pil");
6581
6577
  }
6582
6578
  function addLatest(params) {
6583
6579
  return params.replace(/\s+/g, " ").trim().split(" ").map((item) => {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@simon_he/pi",
3
3
  "type": "module",
4
- "version": "0.0.58",
4
+ "version": "0.0.60",
5
5
  "packageManager": "pnpm@7.26.1",
6
6
  "description": "",
7
7
  "author": "Simon He",