@simon_he/pi 0.1.22 → 0.1.23

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
@@ -44,7 +44,7 @@ let node_module = require("node:module");
44
44
  let node_url = require("node:url");
45
45
 
46
46
  //#region package.json
47
- var version = "0.1.22";
47
+ var version = "0.1.23";
48
48
 
49
49
  //#endregion
50
50
  //#region src/installDeps.ts
@@ -491,11 +491,15 @@ function pci(params, pkg) {
491
491
  //#region src/require.ts
492
492
  const base = (0, node_url.fileURLToPath)(require("url").pathToFileURL(__filename).href);
493
493
  const localRequire = (0, node_module.createRequire)(base);
494
+ function getCcommand() {
495
+ if (node_process.default.env.CCOMMAND_NO_HISTORY == null) node_process.default.env.CCOMMAND_NO_HISTORY = "1";
496
+ return localRequire("ccommand");
497
+ }
494
498
 
495
499
  //#endregion
496
500
  //#region src/pfind.ts
497
501
  function pfind(params) {
498
- const { ccommand } = localRequire("ccommand");
502
+ const { ccommand } = getCcommand();
499
503
  return ccommand(`find ${params}`);
500
504
  }
501
505
 
@@ -612,7 +616,7 @@ async function pix(params) {
612
616
  //#endregion
613
617
  //#region src/prun.ts
614
618
  function prun(params) {
615
- const { ccommand } = localRequire("ccommand");
619
+ const { ccommand } = getCcommand();
616
620
  return ccommand(params);
617
621
  }
618
622
 
@@ -712,7 +716,7 @@ async function setup() {
712
716
  } else if (exec === "prun") {
713
717
  const target = (await (0, fast_glob.default)(params ? params.endsWith(".go") ? [`**/${params}`] : [`**/${params}.go`, `**/${params}/main.go`] : "main.go"))[0];
714
718
  if (target) return await (0, lazy_js_utils_node.jsShell)(`go run ${target}`, "inherit");
715
- const { ccommand } = localRequire("ccommand");
719
+ const { ccommand } = getCcommand();
716
720
  return ccommand(params);
717
721
  } else if (exec === "pinit") await (0, lazy_js_utils_node.jsShell)(`go mod init ${params}`, "inherit");
718
722
  else if (exec === "pbuild") await (0, lazy_js_utils_node.jsShell)(`go build ${params}`, "inherit");
package/dist/index.mjs CHANGED
@@ -11,7 +11,7 @@ import os from "node:os";
11
11
  import { fileURLToPath } from "node:url";
12
12
 
13
13
  //#region package.json
14
- var version = "0.1.22";
14
+ var version = "0.1.23";
15
15
 
16
16
  //#endregion
17
17
  //#region src/installDeps.ts
@@ -458,11 +458,15 @@ function pci(params, pkg) {
458
458
  //#region src/require.ts
459
459
  const base = fileURLToPath(import.meta.url);
460
460
  const localRequire = createRequire(base);
461
+ function getCcommand() {
462
+ if (process.env.CCOMMAND_NO_HISTORY == null) process.env.CCOMMAND_NO_HISTORY = "1";
463
+ return localRequire("ccommand");
464
+ }
461
465
 
462
466
  //#endregion
463
467
  //#region src/pfind.ts
464
468
  function pfind(params) {
465
- const { ccommand } = localRequire("ccommand");
469
+ const { ccommand } = getCcommand();
466
470
  return ccommand(`find ${params}`);
467
471
  }
468
472
 
@@ -579,7 +583,7 @@ async function pix(params) {
579
583
  //#endregion
580
584
  //#region src/prun.ts
581
585
  function prun(params) {
582
- const { ccommand } = localRequire("ccommand");
586
+ const { ccommand } = getCcommand();
583
587
  return ccommand(params);
584
588
  }
585
589
 
@@ -679,7 +683,7 @@ async function setup() {
679
683
  } else if (exec === "prun") {
680
684
  const target = (await fg(params ? params.endsWith(".go") ? [`**/${params}`] : [`**/${params}.go`, `**/${params}/main.go`] : "main.go"))[0];
681
685
  if (target) return await jsShell(`go run ${target}`, "inherit");
682
- const { ccommand } = localRequire("ccommand");
686
+ const { ccommand } = getCcommand();
683
687
  return ccommand(params);
684
688
  } else if (exec === "pinit") await jsShell(`go mod init ${params}`, "inherit");
685
689
  else if (exec === "pbuild") await jsShell(`go build ${params}`, "inherit");
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@simon_he/pi",
3
3
  "type": "module",
4
- "version": "0.1.22",
4
+ "version": "0.1.23",
5
5
  "description": "An intelligent cross-platform package manager and CLI tool that autodetects project environments (Node.mjs, Go, Rust, Python) with beautiful loading animations and smart command execution.",
6
6
  "author": {
7
7
  "name": "Simon He",
@@ -78,7 +78,7 @@
78
78
  "dist"
79
79
  ],
80
80
  "dependencies": {
81
- "ccommand": "^1.0.88",
81
+ "ccommand": "^1.0.89",
82
82
  "fast-glob": "^3.3.3",
83
83
  "lazy-js-utils": "^0.1.49",
84
84
  "ora": "^8.2.0",