@actcore/act-build 0.3.3

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.
Files changed (2) hide show
  1. package/bin/act-build +43 -0
  2. package/package.json +25 -0
package/bin/act-build ADDED
@@ -0,0 +1,43 @@
1
+ #!/usr/bin/env node
2
+
3
+ const path = require("path");
4
+ const os = require("os");
5
+
6
+ const PLATFORMS = {
7
+ "linux-x64": "@actcore/act-build-linux-x64",
8
+ "linux-arm64": "@actcore/act-build-linux-arm64",
9
+ "linux-riscv64": "@actcore/act-build-linux-riscv64",
10
+ "darwin-x64": "@actcore/act-build-darwin-x64",
11
+ "darwin-arm64": "@actcore/act-build-darwin-arm64",
12
+ "win32-x64": "@actcore/act-build-win32-x64",
13
+ "win32-arm64": "@actcore/act-build-win32-arm64",
14
+ };
15
+
16
+ const platform = os.platform();
17
+ const arch = os.arch();
18
+ const key = `${platform}-${arch}`;
19
+ const pkg = PLATFORMS[key];
20
+
21
+ if (!pkg) {
22
+ console.error(`Unsupported platform: ${key}`);
23
+ process.exit(1);
24
+ }
25
+
26
+ let binPath;
27
+ try {
28
+ const pkgDir = path.dirname(require.resolve(`${pkg}/package.json`));
29
+ const ext = platform === "win32" ? ".exe" : "";
30
+ binPath = path.join(pkgDir, `act-build${ext}`);
31
+ } catch {
32
+ console.error(
33
+ `Could not find binary package ${pkg}. ` +
34
+ `Make sure optional dependencies are installed (npm install --include=optional).`
35
+ );
36
+ process.exit(1);
37
+ }
38
+
39
+ const result = require("child_process").spawnSync(binPath, process.argv.slice(2), {
40
+ stdio: "inherit",
41
+ });
42
+
43
+ process.exit(result.status ?? 1);
package/package.json ADDED
@@ -0,0 +1,25 @@
1
+ {
2
+ "name": "@actcore/act-build",
3
+ "version": "0.3.3",
4
+ "description": "Build tool for ACT WASM components",
5
+ "license": "MIT OR Apache-2.0",
6
+ "repository": {
7
+ "type": "git",
8
+ "url": "https://github.com/actcore/act-cli"
9
+ },
10
+ "homepage": "https://actcore.dev",
11
+ "keywords": ["act", "agent-component-tools", "wasm", "component-model", "build"],
12
+ "bin": {
13
+ "act-build": "bin/act-build"
14
+ },
15
+ "files": ["bin"],
16
+ "optionalDependencies": {
17
+ "@actcore/act-build-linux-x64": "0.3.3",
18
+ "@actcore/act-build-linux-arm64": "0.3.3",
19
+ "@actcore/act-build-linux-riscv64": "0.3.3",
20
+ "@actcore/act-build-darwin-x64": "0.3.3",
21
+ "@actcore/act-build-darwin-arm64": "0.3.3",
22
+ "@actcore/act-build-win32-x64": "0.3.3",
23
+ "@actcore/act-build-win32-arm64": "0.3.3"
24
+ }
25
+ }