clawup 1.0.0 → 1.0.4

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "clawup",
3
- "version": "1.0.0",
3
+ "version": "1.0.4",
4
4
  "description": "Deploy and manage a fleet of OpenClaw AI agents on AWS",
5
5
  "bin": {
6
6
  "clawup": "dist/bin.js"
@@ -10,13 +10,7 @@
10
10
  "infra",
11
11
  "scripts"
12
12
  ],
13
- "scripts": {
14
- "build": "tsc",
15
- "watch": "tsc --watch",
16
- "postinstall": "node scripts/postinstall.mjs"
17
- },
18
13
  "dependencies": {
19
- "@clawup/core": "workspace:*",
20
14
  "@clack/prompts": "^0.9",
21
15
  "commander": "^13.0",
22
16
  "picocolors": "^1.1",
@@ -24,7 +18,9 @@
24
18
  },
25
19
  "devDependencies": {
26
20
  "@types/node": "^20.0.0",
27
- "typescript": "^5.0.0"
21
+ "esbuild": "^0.27.3",
22
+ "typescript": "^5.0.0",
23
+ "@clawup/core": "0.1.0"
28
24
  },
29
25
  "engines": {
30
26
  "node": ">=18"
@@ -39,5 +35,11 @@
39
35
  "exports": {
40
36
  "./lib/constants": "./dist/lib/constants.js",
41
37
  "./types": "./dist/types.js"
38
+ },
39
+ "scripts": {
40
+ "build": "tsc",
41
+ "build:bundle": "node scripts/bundle.mjs",
42
+ "watch": "tsc --watch",
43
+ "postinstall": "node scripts/postinstall.mjs"
42
44
  }
43
- }
45
+ }
@@ -0,0 +1,35 @@
1
+ /**
2
+ * Bundle the CLI for npm publishing.
3
+ *
4
+ * Uses esbuild to inline @clawup/core into the CLI dist,
5
+ * so it doesn't need to be published as a separate npm package.
6
+ */
7
+
8
+ import { build } from "esbuild";
9
+ import { readFileSync } from "fs";
10
+ import { join, dirname } from "path";
11
+ import { fileURLToPath } from "url";
12
+
13
+ const __dirname = dirname(fileURLToPath(import.meta.url));
14
+ const pkg = JSON.parse(readFileSync(join(__dirname, "..", "package.json"), "utf-8"));
15
+
16
+ // External: all real dependencies (installed from npm) + node builtins
17
+ const external = [
18
+ ...Object.keys(pkg.dependencies || {}).filter((d) => d !== "@clawup/core"),
19
+ ...Object.keys(pkg.devDependencies || {}).filter((d) => d !== "esbuild"),
20
+ ];
21
+
22
+ await build({
23
+ entryPoints: [join(__dirname, "..", "bin.ts")],
24
+ bundle: true,
25
+ platform: "node",
26
+ target: "node18",
27
+ format: "cjs",
28
+ outfile: join(__dirname, "..", "dist", "bin.js"),
29
+ external,
30
+ // Don't minify — keep readable for debugging
31
+ minify: false,
32
+ sourcemap: true,
33
+ });
34
+
35
+ console.log("✓ CLI bundled with @clawup/core inlined");