@alexkroman1/aai-cli 1.9.1 → 1.9.2
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/dist/{_bundler-BRQFvx00.mjs → _bundler-CpLVjRzc.mjs} +1 -1
- package/dist/{_dev-server-CBrIeDoI.mjs → _dev-server-8pf2tqvC.mjs} +2 -2
- package/dist/cli.mjs +4 -4
- package/dist/{client-bundler-D4VKqCxw.mjs → client-bundler-Bki_Rned.mjs} +21 -0
- package/dist/client-bundler.mjs +1 -1
- package/dist/{deploy-C0LittrE.mjs → deploy-DOy6wOCd.mjs} +1 -1
- package/dist/{dev-BvjnXK2x.mjs → dev-DGzDKzGZ.mjs} +1 -1
- package/dist/{init-kYsRaf7e.mjs → init-BDhs6-jB.mjs} +1 -1
- package/package.json +3 -3
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import { i as ok } from "./_output-fy2bXRNb.mjs";
|
|
3
3
|
import { n as log } from "./_ui-YqQ6Fi8K.mjs";
|
|
4
4
|
import { s as validateAgentExport } from "./_utils-BeU10C7O.mjs";
|
|
5
|
-
import { t as buildClient } from "./client-bundler-
|
|
5
|
+
import { t as buildClient } from "./client-bundler-Bki_Rned.mjs";
|
|
6
6
|
import { buildWorker } from "./worker-bundler.mjs";
|
|
7
7
|
import path from "node:path";
|
|
8
8
|
import { pathToFileURL } from "node:url";
|
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
import { r as ensureApiKey } from "./_config-zV70t71V.mjs";
|
|
3
3
|
import { n as log } from "./_ui-YqQ6Fi8K.mjs";
|
|
4
4
|
import { n as errorMessage } from "./_utils-BeU10C7O.mjs";
|
|
5
|
-
import { n as fallbackHtmlPlugin } from "./client-bundler-
|
|
5
|
+
import { n as fallbackHtmlPlugin } from "./client-bundler-Bki_Rned.mjs";
|
|
6
6
|
import { buildWorker } from "./worker-bundler.mjs";
|
|
7
|
-
import { evalWorkerBundle } from "./_bundler-
|
|
7
|
+
import { evalWorkerBundle } from "./_bundler-CpLVjRzc.mjs";
|
|
8
8
|
import { t as resolveServerEnv } from "./_server-common-QpOTRZgi.mjs";
|
|
9
9
|
import { createRequire } from "node:module";
|
|
10
10
|
import { existsSync } from "node:fs";
|
package/dist/cli.mjs
CHANGED
|
@@ -119,7 +119,7 @@ const init = defineCommand({
|
|
|
119
119
|
},
|
|
120
120
|
async run({ args }) {
|
|
121
121
|
await runCommand(args, async (mode) => {
|
|
122
|
-
const { executeInit } = await import("./init-
|
|
122
|
+
const { executeInit } = await import("./init-BDhs6-jB.mjs");
|
|
123
123
|
return executeInit({
|
|
124
124
|
dir: args.dir,
|
|
125
125
|
force: args.force,
|
|
@@ -146,7 +146,7 @@ const dev = defineCommand({
|
|
|
146
146
|
async run({ args }) {
|
|
147
147
|
await runCommand(args, async () => {
|
|
148
148
|
const cwd = await setup({ agent: true });
|
|
149
|
-
const { executeDev } = await import("./dev-
|
|
149
|
+
const { executeDev } = await import("./dev-DGzDKzGZ.mjs");
|
|
150
150
|
return executeDev({
|
|
151
151
|
cwd,
|
|
152
152
|
port: args.port
|
|
@@ -187,7 +187,7 @@ const build = defineCommand({
|
|
|
187
187
|
const { runVitest } = await import("./test-C6jwCnFu.mjs");
|
|
188
188
|
runVitest(cwd);
|
|
189
189
|
}
|
|
190
|
-
const { executeBuild } = await import("./_bundler-
|
|
190
|
+
const { executeBuild } = await import("./_bundler-CpLVjRzc.mjs");
|
|
191
191
|
return executeBuild(cwd);
|
|
192
192
|
}, { apiKey: false });
|
|
193
193
|
}
|
|
@@ -204,7 +204,7 @@ const deploy = defineCommand({
|
|
|
204
204
|
async run({ args }) {
|
|
205
205
|
await runCommand(args, async () => {
|
|
206
206
|
const cwd = await setup({ agent: true });
|
|
207
|
-
const { executeDeploy } = await import("./deploy-
|
|
207
|
+
const { executeDeploy } = await import("./deploy-DOy6wOCd.mjs");
|
|
208
208
|
return executeDeploy({
|
|
209
209
|
cwd,
|
|
210
210
|
...args.server ? { server: args.server } : {}
|
|
@@ -81,6 +81,26 @@ function writeTempHtml(root) {
|
|
|
81
81
|
*/
|
|
82
82
|
const DEFAULT_OUT_DIR = ".aai/client";
|
|
83
83
|
/**
|
|
84
|
+
* Packages resolved from the build root rather than from whichever
|
|
85
|
+
* `node_modules` happens to sit above the importing file.
|
|
86
|
+
*
|
|
87
|
+
* `@alexkroman1/aai-ui` declares React as a **peer** dependency — "my consumer
|
|
88
|
+
* supplies it" — but a bundler resolves the bare `react/jsx-runtime` import
|
|
89
|
+
* inside `aai-ui/dist/**` from that file's own real path, not from the
|
|
90
|
+
* consumer's. In the studio's case the two differ: the workspace scratch dir
|
|
91
|
+
* (the build root, under `aai-server`, which owns the React dependency) is
|
|
92
|
+
* nowhere above `packages/aai-ui/dist`, and the production image installs prod
|
|
93
|
+
* deps only, so aai-ui's own devDependency copy of React is pruned there.
|
|
94
|
+
* The result was a publish that failed with *"Rolldown failed to resolve
|
|
95
|
+
* import react/jsx-runtime"* while every local build passed.
|
|
96
|
+
*
|
|
97
|
+
* Deduping states the peer contract in terms the bundler enforces, and it is
|
|
98
|
+
* what a React app wants anyway: two copies of React in one bundle break
|
|
99
|
+
* hooks. Guarded by `client-bundler.test.ts` and, for the half that has to
|
|
100
|
+
* hold in the image, `aai-server/dockerfile-packaging.test.ts`.
|
|
101
|
+
*/
|
|
102
|
+
const DEDUPED_PEERS = ["react", "react-dom"];
|
|
103
|
+
/**
|
|
84
104
|
* Build the client SPA with Vite if `client.tsx` exists.
|
|
85
105
|
* Returns a map of relative file paths to string contents for deploy,
|
|
86
106
|
* or `{}` when the project has no `client.tsx`.
|
|
@@ -97,6 +117,7 @@ async function buildClient(cwd, opts = {}) {
|
|
|
97
117
|
logLevel: "silent",
|
|
98
118
|
...opts.configFile === false && { configFile: false },
|
|
99
119
|
...opts.plugins && { plugins: opts.plugins },
|
|
120
|
+
resolve: { dedupe: DEDUPED_PEERS },
|
|
100
121
|
build: {
|
|
101
122
|
outDir,
|
|
102
123
|
emptyOutDir: true
|
package/dist/client-bundler.mjs
CHANGED
|
@@ -3,7 +3,7 @@ import { s as writeProjectConfig } from "./_config-zV70t71V.mjs";
|
|
|
3
3
|
import { i as ok } from "./_output-fy2bXRNb.mjs";
|
|
4
4
|
import { n as log, t as fmtUrl } from "./_ui-YqQ6Fi8K.mjs";
|
|
5
5
|
import { a as resolveDeployTarget } from "./_agent-cHGzbDVG.mjs";
|
|
6
|
-
import { buildAgentBundle } from "./_bundler-
|
|
6
|
+
import { buildAgentBundle } from "./_bundler-CpLVjRzc.mjs";
|
|
7
7
|
import { t as resolveServerEnv } from "./_server-common-QpOTRZgi.mjs";
|
|
8
8
|
import { t as apiRequest } from "./_api-client-yJD7xGfd.mjs";
|
|
9
9
|
import { gzipSync } from "node:zlib";
|
|
@@ -12,7 +12,7 @@ import { colorize } from "consola/utils";
|
|
|
12
12
|
async function executeDev(opts) {
|
|
13
13
|
const port = parsePort(opts.port);
|
|
14
14
|
const agentName = path.basename(path.resolve(opts.cwd));
|
|
15
|
-
const { startDevServer } = await import("./_dev-server-
|
|
15
|
+
const { startDevServer } = await import("./_dev-server-8pf2tqvC.mjs");
|
|
16
16
|
const cleanup = await startDevServer({
|
|
17
17
|
cwd: opts.cwd,
|
|
18
18
|
port
|
|
@@ -75,7 +75,7 @@ function resolveTargetDir(dir) {
|
|
|
75
75
|
}
|
|
76
76
|
/** Run deploy after init and return deploy metadata if successful. */
|
|
77
77
|
async function tryDeploy(cwd, server) {
|
|
78
|
-
const { executeDeploy } = await import("./deploy-
|
|
78
|
+
const { executeDeploy } = await import("./deploy-DOy6wOCd.mjs");
|
|
79
79
|
const result = await executeDeploy({
|
|
80
80
|
cwd,
|
|
81
81
|
...server ? { server } : {}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@alexkroman1/aai-cli",
|
|
3
|
-
"version": "1.9.
|
|
3
|
+
"version": "1.9.2",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"bin": {
|
|
6
6
|
"aai": "dist/cli.mjs"
|
|
@@ -35,8 +35,8 @@
|
|
|
35
35
|
"p-debounce": "^5.1.0",
|
|
36
36
|
"vite": "^8.1.5",
|
|
37
37
|
"zod": "^4.4.3",
|
|
38
|
-
"@alexkroman1/aai": "1.9.
|
|
39
|
-
"@alexkroman1/aai-ui": "1.9.
|
|
38
|
+
"@alexkroman1/aai": "1.9.2",
|
|
39
|
+
"@alexkroman1/aai-ui": "1.9.2"
|
|
40
40
|
},
|
|
41
41
|
"devDependencies": {
|
|
42
42
|
"playwright": "^1.61.1",
|