@clickzetta/cz-cli 0.3.64 → 0.3.66

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.
Files changed (2) hide show
  1. package/bin/postinstall.js +7 -14
  2. package/package.json +6 -6
@@ -21,23 +21,16 @@ function detectPackageManager() {
21
21
  }
22
22
 
23
23
  function cleanupOutdatedBinaries() {
24
+ // Only remove standalone binaries in ~/.local/bin that are not symlinks
25
+ // (npm/bun create symlinks in their bin dirs, standalone installs are real files)
26
+ const localBin = path.join(home, ".local", "bin", "cz-cli");
24
27
  try {
25
- const { execSync } = require("child_process");
26
- const output = execSync("which -a cz-cli", { encoding: "utf-8", stdio: ["ignore", "pipe", "ignore"] }).trim();
27
- if (!output) return;
28
- const paths = output.split("\n").filter(Boolean);
29
- for (const p of paths) {
30
- // Skip paths managed by npm or bun — only remove standalone/orphan binaries
31
- if (p.includes("node_modules") || p.includes(".bun")) continue;
32
- try {
33
- fs.unlinkSync(p);
34
- process.stderr.write(`Removed outdated cz-cli binary: ${p}\n`);
35
- } catch (e) {
36
- // Permission denied or other error — skip silently
37
- }
28
+ if (fs.existsSync(localBin) && !fs.lstatSync(localBin).isSymbolicLink()) {
29
+ fs.unlinkSync(localBin);
30
+ process.stderr.write(`Removed outdated standalone binary: ${localBin}\n`);
38
31
  }
39
32
  } catch (e) {
40
- // which not found or no cz-cli in PATH nothing to clean
33
+ // Permission denied or other errorskip silently
41
34
  }
42
35
  }
43
36
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@clickzetta/cz-cli",
3
- "version": "0.3.64",
3
+ "version": "0.3.66",
4
4
  "description": "AI-Agent-friendly CLI for ClickZetta Lakehouse",
5
5
  "bin": {
6
6
  "cz-cli": "bin/run.js"
@@ -12,11 +12,11 @@
12
12
  "bin/"
13
13
  ],
14
14
  "optionalDependencies": {
15
- "@clickzetta/cz-cli-darwin-arm64": "0.3.64",
16
- "@clickzetta/cz-cli-darwin-x64": "0.3.64",
17
- "@clickzetta/cz-cli-linux-arm64": "0.3.64",
18
- "@clickzetta/cz-cli-linux-x64": "0.3.64",
19
- "@clickzetta/cz-cli-win32-x64": "0.3.64"
15
+ "@clickzetta/cz-cli-darwin-arm64": "0.3.66",
16
+ "@clickzetta/cz-cli-darwin-x64": "0.3.66",
17
+ "@clickzetta/cz-cli-linux-arm64": "0.3.66",
18
+ "@clickzetta/cz-cli-linux-x64": "0.3.66",
19
+ "@clickzetta/cz-cli-win32-x64": "0.3.66"
20
20
  },
21
21
  "license": "MIT",
22
22
  "repository": {