@clickzetta/cz-cli 0.3.63 → 0.3.64
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/bin/postinstall.js +24 -0
- package/package.json +6 -6
package/bin/postinstall.js
CHANGED
|
@@ -20,7 +20,31 @@ function detectPackageManager() {
|
|
|
20
20
|
return "npm";
|
|
21
21
|
}
|
|
22
22
|
|
|
23
|
+
function cleanupOutdatedBinaries() {
|
|
24
|
+
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
|
+
}
|
|
38
|
+
}
|
|
39
|
+
} catch (e) {
|
|
40
|
+
// which not found or no cz-cli in PATH — nothing to clean
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
|
|
23
44
|
async function main() {
|
|
45
|
+
// Clean up outdated standalone cz-cli binaries that may shadow this npm installation
|
|
46
|
+
cleanupOutdatedBinaries();
|
|
47
|
+
|
|
24
48
|
const spec = getPlatformSpec();
|
|
25
49
|
if (!spec) return;
|
|
26
50
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@clickzetta/cz-cli",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.64",
|
|
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.
|
|
16
|
-
"@clickzetta/cz-cli-darwin-x64": "0.3.
|
|
17
|
-
"@clickzetta/cz-cli-linux-arm64": "0.3.
|
|
18
|
-
"@clickzetta/cz-cli-linux-x64": "0.3.
|
|
19
|
-
"@clickzetta/cz-cli-win32-x64": "0.3.
|
|
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"
|
|
20
20
|
},
|
|
21
21
|
"license": "MIT",
|
|
22
22
|
"repository": {
|