@moda-design/moda 0.15.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/moda.js +22 -0
- package/package.json +20 -0
package/bin/moda.js
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
// Biome-style platform-package resolver shim — no postinstall, no downloads (cli-repo-plan §1.2).
|
|
3
|
+
const { execFileSync } = require('node:child_process');
|
|
4
|
+
const pkg = `@moda-design/cli-${process.platform}-${process.arch}`;
|
|
5
|
+
// Windows will not execute a suffix-less file; scripts/package-npm.ts ships `bin/moda.exe` there.
|
|
6
|
+
const binName = process.platform === 'win32' ? 'moda.exe' : 'moda';
|
|
7
|
+
let bin;
|
|
8
|
+
try {
|
|
9
|
+
bin = require.resolve(`${pkg}/bin/${binName}`);
|
|
10
|
+
} catch {
|
|
11
|
+
console.error(
|
|
12
|
+
`moda: platform binary ${pkg} is not installed.\n` +
|
|
13
|
+
`Reinstall with optional dependencies enabled (npm i -g @moda-design/moda), or download the ` +
|
|
14
|
+
`standalone binary from GitHub Releases (moda-design/moda).`,
|
|
15
|
+
);
|
|
16
|
+
process.exit(1);
|
|
17
|
+
}
|
|
18
|
+
try {
|
|
19
|
+
execFileSync(bin, process.argv.slice(2), { stdio: 'inherit' });
|
|
20
|
+
} catch (e) {
|
|
21
|
+
process.exit(e.status ?? 1);
|
|
22
|
+
}
|
package/package.json
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@moda-design/moda",
|
|
3
|
+
"version": "0.15.0",
|
|
4
|
+
"description": "The moda CLI — drive Moda as a deterministic artifact runtime from any agent harness.",
|
|
5
|
+
"license": "Apache-2.0",
|
|
6
|
+
"repository": "github:moda-design/moda",
|
|
7
|
+
"bin": {
|
|
8
|
+
"moda": "bin/moda.js"
|
|
9
|
+
},
|
|
10
|
+
"optionalDependencies": {
|
|
11
|
+
"@moda-design/cli-darwin-arm64": "0.15.0",
|
|
12
|
+
"@moda-design/cli-darwin-x64": "0.15.0",
|
|
13
|
+
"@moda-design/cli-linux-x64": "0.15.0",
|
|
14
|
+
"@moda-design/cli-linux-arm64": "0.15.0",
|
|
15
|
+
"@moda-design/cli-win32-x64": "0.15.0"
|
|
16
|
+
},
|
|
17
|
+
"publishConfig": {
|
|
18
|
+
"registry": "https://npm.pkg.github.com"
|
|
19
|
+
}
|
|
20
|
+
}
|