@clickzetta/cz-cli 0.3.63 → 0.3.65
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 +17 -0
- package/package.json +6 -6
package/bin/postinstall.js
CHANGED
|
@@ -20,7 +20,24 @@ function detectPackageManager() {
|
|
|
20
20
|
return "npm";
|
|
21
21
|
}
|
|
22
22
|
|
|
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");
|
|
27
|
+
try {
|
|
28
|
+
if (fs.existsSync(localBin) && !fs.lstatSync(localBin).isSymbolicLink()) {
|
|
29
|
+
fs.unlinkSync(localBin);
|
|
30
|
+
process.stderr.write(`Removed outdated standalone binary: ${localBin}\n`);
|
|
31
|
+
}
|
|
32
|
+
} catch (e) {
|
|
33
|
+
// Permission denied or other error — skip silently
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
|
|
23
37
|
async function main() {
|
|
38
|
+
// Clean up outdated standalone cz-cli binaries that may shadow this npm installation
|
|
39
|
+
cleanupOutdatedBinaries();
|
|
40
|
+
|
|
24
41
|
const spec = getPlatformSpec();
|
|
25
42
|
if (!spec) return;
|
|
26
43
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@clickzetta/cz-cli",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.65",
|
|
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.65",
|
|
16
|
+
"@clickzetta/cz-cli-darwin-x64": "0.3.65",
|
|
17
|
+
"@clickzetta/cz-cli-linux-arm64": "0.3.65",
|
|
18
|
+
"@clickzetta/cz-cli-linux-x64": "0.3.65",
|
|
19
|
+
"@clickzetta/cz-cli-win32-x64": "0.3.65"
|
|
20
20
|
},
|
|
21
21
|
"license": "MIT",
|
|
22
22
|
"repository": {
|