vize 0.0.1-alpha.104 → 0.0.1-alpha.106
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/vize +1 -1
- package/package.json +1 -1
- package/scripts/postinstall.js +10 -2
package/bin/vize
CHANGED
|
@@ -6,7 +6,7 @@ import { fileURLToPath } from "url";
|
|
|
6
6
|
import { existsSync } from "fs";
|
|
7
7
|
|
|
8
8
|
const __dirname = dirname(fileURLToPath(import.meta.url));
|
|
9
|
-
const binaryName = process.platform === "win32" ? "vize.exe" : "vize";
|
|
9
|
+
const binaryName = process.platform === "win32" ? "vize-cli.exe" : "vize-cli";
|
|
10
10
|
const binaryPath = join(__dirname, binaryName);
|
|
11
11
|
|
|
12
12
|
if (!existsSync(binaryPath)) {
|
package/package.json
CHANGED
package/scripts/postinstall.js
CHANGED
|
@@ -58,7 +58,7 @@ async function main() {
|
|
|
58
58
|
}
|
|
59
59
|
|
|
60
60
|
const binDir = join(__dirname, "..", "bin");
|
|
61
|
-
const binaryName = process.platform === "win32" ? "vize.exe" : "vize";
|
|
61
|
+
const binaryName = process.platform === "win32" ? "vize-cli.exe" : "vize-cli";
|
|
62
62
|
const binaryPath = join(binDir, binaryName);
|
|
63
63
|
|
|
64
64
|
// Skip if binary already exists (for local development)
|
|
@@ -129,9 +129,17 @@ async function extractTarGz(archivePath, destDir, binaryName) {
|
|
|
129
129
|
}
|
|
130
130
|
}
|
|
131
131
|
|
|
132
|
-
async function extractZip(archivePath, destDir,
|
|
132
|
+
async function extractZip(archivePath, destDir, binaryName) {
|
|
133
133
|
const { execSync } = await import("child_process");
|
|
134
134
|
execSync(`unzip -o "${archivePath}" -d "${destDir}"`, { stdio: "inherit" });
|
|
135
|
+
|
|
136
|
+
// Rename extracted binary to match expected name
|
|
137
|
+
const extractedPath = join(destDir, "vize.exe");
|
|
138
|
+
const targetPath = join(destDir, binaryName);
|
|
139
|
+
if (extractedPath !== targetPath && existsSync(extractedPath)) {
|
|
140
|
+
const { renameSync } = await import("fs");
|
|
141
|
+
renameSync(extractedPath, targetPath);
|
|
142
|
+
}
|
|
135
143
|
}
|
|
136
144
|
|
|
137
145
|
void main();
|