transpic-cli 0.1.3 → 0.1.4
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/Cargo.lock +1 -1
- package/Cargo.toml +1 -1
- package/bin/transpic-cli +0 -0
- package/bin/transpic-cli.exe +0 -0
- package/package.json +1 -1
- package/scripts/copy-binary.js +12 -1
package/Cargo.lock
CHANGED
package/Cargo.toml
CHANGED
package/bin/transpic-cli
ADDED
|
Binary file
|
package/bin/transpic-cli.exe
CHANGED
|
Binary file
|
package/package.json
CHANGED
package/scripts/copy-binary.js
CHANGED
|
@@ -13,10 +13,21 @@ if (!fs.existsSync(binDir)) {
|
|
|
13
13
|
fs.mkdirSync(binDir, { recursive: true });
|
|
14
14
|
}
|
|
15
15
|
|
|
16
|
+
if (!fs.existsSync(source)) {
|
|
17
|
+
console.error(`Error: Source binary not found at ${source}`);
|
|
18
|
+
console.error(`Please run 'cargo build --release' first on this platform.`);
|
|
19
|
+
process.exit(1);
|
|
20
|
+
}
|
|
21
|
+
|
|
16
22
|
try {
|
|
17
23
|
fs.copyFileSync(source, destination);
|
|
18
24
|
console.log(`✓ Binary successfully copied to: ${destination}`);
|
|
25
|
+
|
|
26
|
+
if (process.platform !== 'win32') {
|
|
27
|
+
fs.chmodSync(destination, '755');
|
|
28
|
+
console.log(`✓ Execution permissions (chmod 755) applied.`);
|
|
29
|
+
}
|
|
19
30
|
} catch (err) {
|
|
20
|
-
console.error(`Error
|
|
31
|
+
console.error(`Error during binary deployment: ${err.message}`);
|
|
21
32
|
process.exit(1);
|
|
22
33
|
}
|