clawmacdo 0.7.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/clawmacdo ADDED
@@ -0,0 +1,24 @@
1
+ #!/usr/bin/env node
2
+
3
+ "use strict";
4
+
5
+ const { spawnSync } = require("child_process");
6
+ const { getBinaryPath } = require("../index.js");
7
+
8
+ const binaryPath = getBinaryPath();
9
+ const result = spawnSync(binaryPath, process.argv.slice(2), {
10
+ stdio: "inherit",
11
+ env: process.env,
12
+ });
13
+
14
+ if (result.error) {
15
+ if (result.error.code === "ENOENT") {
16
+ console.error(
17
+ `clawmacdo binary not found at ${binaryPath}. Try reinstalling: npm install clawmacdo`
18
+ );
19
+ } else {
20
+ throw result.error;
21
+ }
22
+ }
23
+
24
+ process.exit(result.status ?? 1);
package/index.d.ts ADDED
@@ -0,0 +1,10 @@
1
+ /**
2
+ * Returns the absolute path to the clawmacdo binary for the current platform.
3
+ * @throws If the current platform is unsupported or the platform package is missing.
4
+ */
5
+ export function getBinaryPath(): string;
6
+
7
+ /**
8
+ * Map of platform keys (e.g. "darwin-arm64") to npm package names.
9
+ */
10
+ export const PLATFORM_PACKAGES: Record<string, string>;
package/index.js ADDED
@@ -0,0 +1,41 @@
1
+ "use strict";
2
+
3
+ const path = require("path");
4
+
5
+ const PLATFORM_PACKAGES = {
6
+ "darwin-arm64": "@clawmacdo/darwin-arm64",
7
+ "linux-x64": "@clawmacdo/linux-x64",
8
+ "win32-x64": "@clawmacdo/win32-x64",
9
+ };
10
+
11
+ /**
12
+ * Returns the absolute path to the clawmacdo binary for the current platform.
13
+ * Throws if the current platform is unsupported or the platform package is missing.
14
+ */
15
+ function getBinaryPath() {
16
+ const platformKey = `${process.platform}-${process.arch}`;
17
+ const pkg = PLATFORM_PACKAGES[platformKey];
18
+
19
+ if (!pkg) {
20
+ const supported = Object.keys(PLATFORM_PACKAGES)
21
+ .map((k) => k.replace("-", " "))
22
+ .join(", ");
23
+ throw new Error(
24
+ `clawmacdo does not support ${process.platform} ${process.arch}. ` +
25
+ `Supported platforms: ${supported}`
26
+ );
27
+ }
28
+
29
+ const binName = process.platform === "win32" ? "clawmacdo.exe" : "clawmacdo";
30
+
31
+ try {
32
+ return require.resolve(`${pkg}/bin/${binName}`);
33
+ } catch {
34
+ throw new Error(
35
+ `The platform package ${pkg} is not installed. ` +
36
+ `Try reinstalling clawmacdo: npm install clawmacdo`
37
+ );
38
+ }
39
+ }
40
+
41
+ module.exports = { getBinaryPath, PLATFORM_PACKAGES };
package/package.json ADDED
@@ -0,0 +1,37 @@
1
+ {
2
+ "name": "clawmacdo",
3
+ "version": "0.7.0",
4
+ "description": "CLI tool for deploying OpenClaw to multiple cloud providers with pre-installed AI dev tools",
5
+ "keywords": [
6
+ "openclaw",
7
+ "deploy",
8
+ "cloud",
9
+ "digitalocean",
10
+ "aws",
11
+ "azure",
12
+ "cli"
13
+ ],
14
+ "license": "MIT",
15
+ "repository": {
16
+ "type": "git",
17
+ "url": "git+https://github.com/kenken64/clawmacdo.git"
18
+ },
19
+ "bin": {
20
+ "clawmacdo": "bin/clawmacdo"
21
+ },
22
+ "main": "index.js",
23
+ "types": "index.d.ts",
24
+ "files": [
25
+ "bin",
26
+ "index.js",
27
+ "index.d.ts"
28
+ ],
29
+ "engines": {
30
+ "node": ">=16"
31
+ },
32
+ "optionalDependencies": {
33
+ "@clawmacdo/darwin-arm64": "0.7.0",
34
+ "@clawmacdo/linux-x64": "0.7.0",
35
+ "@clawmacdo/win32-x64": "0.7.0"
36
+ }
37
+ }