@dforge-core/dforge-cli 0.1.0-rc.1 → 0.1.0-rc.2
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/index.js +15 -0
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -46,6 +46,21 @@ function resolveBinary() {
|
|
|
46
46
|
console.error(`dforge-cli: binary missing at ${binPath}`);
|
|
47
47
|
process.exit(1);
|
|
48
48
|
}
|
|
49
|
+
|
|
50
|
+
// Ensure the binary is executable. pnpm/npm tarball-packing has dropped the
|
|
51
|
+
// +x bit on files outside `bin` fields in some versions, so a freshly-
|
|
52
|
+
// downloaded sidecar can land as 0644 even though the local checkout was
|
|
53
|
+
// 0755. chmod is idempotent — no-op when already executable — and skipped
|
|
54
|
+
// on Windows where it has no effect on .exe invocation.
|
|
55
|
+
if (process.platform !== "win32") {
|
|
56
|
+
try {
|
|
57
|
+
const mode = fs.statSync(binPath).mode;
|
|
58
|
+
if ((mode & 0o111) === 0) fs.chmodSync(binPath, mode | 0o755);
|
|
59
|
+
} catch (e) {
|
|
60
|
+
// Non-fatal: spawnSync below will surface EACCES with a clear message
|
|
61
|
+
// if chmod failed for an unexpected reason (read-only fs, perms).
|
|
62
|
+
}
|
|
63
|
+
}
|
|
49
64
|
return binPath;
|
|
50
65
|
}
|
|
51
66
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dforge-core/dforge-cli",
|
|
3
|
-
"version": "0.1.0-rc.
|
|
3
|
+
"version": "0.1.0-rc.2",
|
|
4
4
|
"description": "dForge CLI — validate, pack, publish, and install dForge modules. Distributes a single-file native binary per platform via optionalDependencies (esbuild-style).",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"homepage": "https://github.com/dforge-core/create-module",
|