@agentuity/cli 0.0.30 → 0.0.31

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.
@@ -1 +1 @@
1
- {"version":3,"file":"bundler.d.ts","sourceRoot":"","sources":["../../../src/cmd/bundle/bundler.ts"],"names":[],"mappings":"AAMA,MAAM,WAAW,aAAa;IAC7B,OAAO,EAAE,MAAM,CAAC;IAChB,GAAG,CAAC,EAAE,OAAO,CAAC;CACd;AAED,wBAAsB,MAAM,CAAC,EAAE,GAAW,EAAE,OAAO,EAAE,EAAE,aAAa,iBA6HnE"}
1
+ {"version":3,"file":"bundler.d.ts","sourceRoot":"","sources":["../../../src/cmd/bundle/bundler.ts"],"names":[],"mappings":"AAMA,MAAM,WAAW,aAAa;IAC7B,OAAO,EAAE,MAAM,CAAC;IAChB,GAAG,CAAC,EAAE,OAAO,CAAC;CACd;AAED,wBAAsB,MAAM,CAAC,EAAE,GAAW,EAAE,OAAO,EAAE,EAAE,aAAa,iBA8HnE"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@agentuity/cli",
3
- "version": "0.0.30",
3
+ "version": "0.0.31",
4
4
  "type": "module",
5
5
  "main": "./src/index.ts",
6
6
  "types": "./dist/index.d.ts",
@@ -38,17 +38,12 @@ export async function bundle({ dev = false, rootDir }: BundleOptions) {
38
38
 
39
39
  const webDir = join(srcDir, 'web');
40
40
 
41
- const webEntrypoints = [...new Bun.Glob('**.html').scanSync(webDir)].map((a) =>
42
- resolve(webDir, a)
43
- );
44
-
45
41
  if (existsSync(outDir)) {
46
42
  rmSync(outDir, { recursive: true, force: true });
47
43
  }
48
44
 
49
45
  const pkgFile = Bun.file('./package.json');
50
46
  const pkgContents = JSON.parse(await pkgFile.text());
51
-
52
47
  const isProd = !dev;
53
48
 
54
49
  const define = {
@@ -81,7 +76,7 @@ export async function bundle({ dev = false, rootDir }: BundleOptions) {
81
76
  })();
82
77
 
83
78
  await (async () => {
84
- // Find monorepo root by looking for package.json with workspaces
79
+ // Find workspace root for monorepo support
85
80
  let workspaceRoot = rootDir;
86
81
  let currentDir = rootDir;
87
82
  while (currentDir !== '/') {
@@ -96,9 +91,14 @@ export async function bundle({ dev = false, rootDir }: BundleOptions) {
96
91
  currentDir = resolve(currentDir, '..');
97
92
  }
98
93
 
94
+ // Make webEntrypoints - just the HTML files themselves
95
+ const webEntrypoints = [...new Bun.Glob('**.html').scanSync(webDir)].map((htmlFile) =>
96
+ resolve(webDir, htmlFile)
97
+ );
98
+
99
99
  const config: Bun.BuildConfig = {
100
100
  entrypoints: webEntrypoints,
101
- root: workspaceRoot,
101
+ root: webDir,
102
102
  outdir: join(outDir, 'web'),
103
103
  define,
104
104
  sourcemap: dev ? 'inline' : 'linked',
@@ -115,6 +115,7 @@ export async function bundle({ dev = false, rootDir }: BundleOptions) {
115
115
  asset: 'asset/[name]-[hash].[ext]',
116
116
  },
117
117
  packages: 'bundle',
118
+ external: workspaceRoot !== rootDir ? [] : undefined,
118
119
  };
119
120
  try {
120
121
  await Bun.build(config);