@zhxiaogg/fluorite-cli 0.4.0 → 0.6.0

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/fluorite.js CHANGED
@@ -63,6 +63,15 @@ if (!binaryPath) {
63
63
  process.exit(1);
64
64
  }
65
65
 
66
+ // Ensure binary has execute permission (npm may strip it during publish/install)
67
+ if (process.platform !== 'win32') {
68
+ try {
69
+ fs.chmodSync(binaryPath, 0o755);
70
+ } catch (e) {
71
+ // Ignore permission errors - spawn will fail with a clearer message
72
+ }
73
+ }
74
+
66
75
  const child = spawn(binaryPath, process.argv.slice(2), {
67
76
  stdio: 'inherit'
68
77
  });
package/install.js CHANGED
@@ -30,6 +30,14 @@ function checkBinaryInstalled() {
30
30
  const binaryPath = path.join(packageDir, 'bin', `fluorite${ext}`);
31
31
 
32
32
  if (fs.existsSync(binaryPath)) {
33
+ // Ensure binary has execute permission (npm may strip it during publish/install)
34
+ if (process.platform !== 'win32') {
35
+ try {
36
+ fs.chmodSync(binaryPath, 0o755);
37
+ } catch (e) {
38
+ console.warn(`Warning: Could not set execute permission on ${binaryPath}: ${e.message}`);
39
+ }
40
+ }
33
41
  console.log(`fluorite binary installed successfully for ${platformKey}`);
34
42
  } else {
35
43
  console.warn(`Warning: Binary not found in ${packageName}`);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zhxiaogg/fluorite-cli",
3
- "version": "0.4.0",
3
+ "version": "0.6.0",
4
4
  "description": "Code generator from YAML/Fluorite schema definitions - generates Rust and TypeScript",
5
5
  "bin": {
6
6
  "fluorite": "./bin/fluorite.js"
@@ -26,10 +26,10 @@
26
26
  "node": ">=16.0.0"
27
27
  },
28
28
  "optionalDependencies": {
29
- "@zhxiaogg/fluorite-darwin-x64": "0.4.0",
30
- "@zhxiaogg/fluorite-darwin-arm64": "0.4.0",
31
- "@zhxiaogg/fluorite-linux-x64": "0.4.0",
32
- "@zhxiaogg/fluorite-linux-arm64": "0.4.0",
33
- "@zhxiaogg/fluorite-win32-x64": "0.4.0"
29
+ "@zhxiaogg/fluorite-darwin-x64": "0.6.0",
30
+ "@zhxiaogg/fluorite-darwin-arm64": "0.6.0",
31
+ "@zhxiaogg/fluorite-linux-x64": "0.6.0",
32
+ "@zhxiaogg/fluorite-linux-arm64": "0.6.0",
33
+ "@zhxiaogg/fluorite-win32-x64": "0.6.0"
34
34
  }
35
35
  }