@dazzle-labs/cli 0.5.6 → 0.5.7
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/run.js +12 -2
- package/package.json +7 -7
package/bin/run.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
|
|
3
3
|
const { execFileSync, execSync } = require("child_process");
|
|
4
|
+
const { chmodSync, realpathSync, statSync } = require("fs");
|
|
4
5
|
const path = require("path");
|
|
5
6
|
|
|
6
7
|
const PLATFORMS = {
|
|
@@ -22,9 +23,13 @@ if (!pkg) {
|
|
|
22
23
|
const ext = process.platform === "win32" ? ".exe" : "";
|
|
23
24
|
const binName = `bin/dazzle${ext}`;
|
|
24
25
|
|
|
26
|
+
// Resolve from the real path of this package so pnpm's strict node_modules
|
|
27
|
+
// layout can find the optional platform dependency via its symlinks.
|
|
28
|
+
const pkgDir = realpathSync(path.resolve(__dirname, ".."));
|
|
29
|
+
|
|
25
30
|
function tryResolve() {
|
|
26
31
|
try {
|
|
27
|
-
return require.resolve(`${pkg}/${binName}
|
|
32
|
+
return require.resolve(`${pkg}/${binName}`, { paths: [pkgDir] });
|
|
28
33
|
} catch {
|
|
29
34
|
return null;
|
|
30
35
|
}
|
|
@@ -36,7 +41,6 @@ if (!binPath) {
|
|
|
36
41
|
// Platform binary not found — install optionalDependencies into this
|
|
37
42
|
// package's directory. This handles npx/pnpx where optional deps are
|
|
38
43
|
// skipped during ephemeral installs (same pattern as turbo).
|
|
39
|
-
const pkgDir = path.resolve(__dirname, "..");
|
|
40
44
|
const env = { ...process.env, npm_config_global: undefined };
|
|
41
45
|
try {
|
|
42
46
|
execSync(
|
|
@@ -61,6 +65,12 @@ if (!binPath) {
|
|
|
61
65
|
}
|
|
62
66
|
}
|
|
63
67
|
|
|
68
|
+
// Ensure the binary is executable (pnpm may strip the bit on unpack)
|
|
69
|
+
try {
|
|
70
|
+
const mode = statSync(binPath).mode;
|
|
71
|
+
if (!(mode & 0o111)) chmodSync(binPath, mode | 0o755);
|
|
72
|
+
} catch {}
|
|
73
|
+
|
|
64
74
|
try {
|
|
65
75
|
execFileSync(binPath, process.argv.slice(2), { stdio: "inherit" });
|
|
66
76
|
} catch (e) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dazzle-labs/cli",
|
|
3
|
-
"version": "0.5.
|
|
3
|
+
"version": "0.5.7",
|
|
4
4
|
"description": "Dazzle CLI — cloud stages for AI agents and live streaming",
|
|
5
5
|
"mcpName": "io.github.dazzle-labs/dazzle",
|
|
6
6
|
"bin": {
|
|
@@ -23,11 +23,11 @@
|
|
|
23
23
|
"cli"
|
|
24
24
|
],
|
|
25
25
|
"optionalDependencies": {
|
|
26
|
-
"@dazzle-labs/cli-darwin-arm64": "0.5.
|
|
27
|
-
"@dazzle-labs/cli-darwin-x64": "0.5.
|
|
28
|
-
"@dazzle-labs/cli-linux-x64": "0.5.
|
|
29
|
-
"@dazzle-labs/cli-linux-arm64": "0.5.
|
|
30
|
-
"@dazzle-labs/cli-win32-x64": "0.5.
|
|
31
|
-
"@dazzle-labs/cli-win32-arm64": "0.5.
|
|
26
|
+
"@dazzle-labs/cli-darwin-arm64": "0.5.7",
|
|
27
|
+
"@dazzle-labs/cli-darwin-x64": "0.5.7",
|
|
28
|
+
"@dazzle-labs/cli-linux-x64": "0.5.7",
|
|
29
|
+
"@dazzle-labs/cli-linux-arm64": "0.5.7",
|
|
30
|
+
"@dazzle-labs/cli-win32-x64": "0.5.7",
|
|
31
|
+
"@dazzle-labs/cli-win32-arm64": "0.5.7"
|
|
32
32
|
}
|
|
33
33
|
}
|