@alexkroman1/aai-cli 1.0.3 → 1.0.5
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/{_agent-CzbSa09n.mjs → _agent-De8f1JdZ.mjs} +1 -1
- package/dist/{_bundler-DgRDzBzD.mjs → _bundler-CMMSjh9o.mjs} +18 -12
- package/dist/{_config-Dv-T6uRj.mjs → _config-B0FXR5GQ.mjs} +1 -1
- package/dist/_default-html-BasMCgr9.mjs +62 -0
- package/dist/{_dev-server-Cag4LlkI.mjs → _dev-server-DMFyqc9v.mjs} +19 -9
- package/dist/{_init-DhX1a2Zb.mjs → _init-CkoOBaYG.mjs} +6 -3
- package/dist/{_output-BKdAJaM5.mjs → _output-vvoR6N1x.mjs} +1 -1
- package/dist/{_ui-r2t6_2eP.mjs → _ui-nOp7hFVy.mjs} +1 -1
- package/dist/cli.mjs +15 -15
- package/dist/{delete-CaiAsY1S.mjs → delete-BEC2ZXbk.mjs} +4 -4
- package/dist/{deploy-CmY2AtML.mjs → deploy-D8uMWSDH.mjs} +7 -7
- package/dist/{dev-Wmola4F6.mjs → dev-D2EwGHYi.mjs} +3 -3
- package/dist/{init-CCmNsa90.mjs → init-DiJBl3es.mjs} +5 -5
- package/dist/{rolldown-runtime-DacLjcLf.mjs → rolldown-runtime-uZa2dNXj.mjs} +1 -0
- package/dist/{secret-lSaf6Uax.mjs → secret-DlSN4FdF.mjs} +4 -4
- package/dist/{test-DhQ4aznR.mjs → test-BLYrV5ap.mjs} +2 -2
- package/package.json +3 -2
- /package/dist/{_api-client-CFfjWfNa.mjs → _api-client-Cf9Lv2Rw.mjs} +0 -0
- /package/dist/{_server-common-Pdb-KUSK.mjs → _server-common-BVkNI-o4.mjs} +0 -0
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import { n as ensureApiKey, r as readProjectConfig } from "./_config-
|
|
2
|
+
import { n as ensureApiKey, r as readProjectConfig } from "./_config-B0FXR5GQ.mjs";
|
|
3
3
|
import { existsSync } from "node:fs";
|
|
4
4
|
import path from "node:path";
|
|
5
5
|
import { fileURLToPath } from "node:url";
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import { a as ok } from "./_output-
|
|
2
|
+
import { a as ok } from "./_output-vvoR6N1x.mjs";
|
|
3
3
|
import { r as validateAgentExport, t as fileExists } from "./_utils-DZo3_J_v.mjs";
|
|
4
|
+
import { n as writeTempHtml } from "./_default-html-BasMCgr9.mjs";
|
|
4
5
|
import path from "node:path";
|
|
5
6
|
import { pathToFileURL } from "node:url";
|
|
6
7
|
import fs from "node:fs/promises";
|
|
@@ -31,7 +32,7 @@ function agentViteBuildBase(entry) {
|
|
|
31
32
|
* second build pass.
|
|
32
33
|
*/
|
|
33
34
|
async function buildAgentBundle(cwd) {
|
|
34
|
-
const { log } = await import("./_ui-
|
|
35
|
+
const { log } = await import("./_ui-nOp7hFVy.mjs").then((n) => n.t);
|
|
35
36
|
const [worker, clientFiles] = await Promise.all([buildWorker(cwd), buildClient(cwd)]);
|
|
36
37
|
const agentDef = await evalWorkerBundle(worker, cwd);
|
|
37
38
|
log.step(`Bundling ${agentDef.name}`);
|
|
@@ -104,15 +105,20 @@ async function buildWorker(cwd) {
|
|
|
104
105
|
async function buildClient(cwd) {
|
|
105
106
|
if (!await fileExists(path.join(cwd, "client.tsx"))) return {};
|
|
106
107
|
const clientDir = path.join(cwd, ".aai", "client");
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
108
|
+
const cleanupHtml = writeTempHtml(cwd);
|
|
109
|
+
try {
|
|
110
|
+
await build({
|
|
111
|
+
root: cwd,
|
|
112
|
+
base: "./",
|
|
113
|
+
logLevel: "silent",
|
|
114
|
+
build: {
|
|
115
|
+
outDir: ".aai/client",
|
|
116
|
+
emptyOutDir: true
|
|
117
|
+
}
|
|
118
|
+
});
|
|
119
|
+
} finally {
|
|
120
|
+
cleanupHtml();
|
|
121
|
+
}
|
|
116
122
|
const files = {};
|
|
117
123
|
async function walk(dir, prefix) {
|
|
118
124
|
for (const entry of await fs.readdir(dir, { withFileTypes: true })) {
|
|
@@ -125,7 +131,7 @@ async function buildClient(cwd) {
|
|
|
125
131
|
return files;
|
|
126
132
|
}
|
|
127
133
|
async function executeBuild(cwd) {
|
|
128
|
-
const { log } = await import("./_ui-
|
|
134
|
+
const { log } = await import("./_ui-nOp7hFVy.mjs").then((n) => n.t);
|
|
129
135
|
const bundle = await buildAgentBundle(cwd);
|
|
130
136
|
log.success("Build complete");
|
|
131
137
|
return ok({
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import { existsSync, unlinkSync, writeFileSync } from "node:fs";
|
|
3
|
+
import path from "node:path";
|
|
4
|
+
//#region _default-html.ts
|
|
5
|
+
/**
|
|
6
|
+
* Default index.html for agents with a custom client.tsx but no index.html.
|
|
7
|
+
* Used by both the dev server (Vite HMR) and the production bundler.
|
|
8
|
+
* Users can override by placing their own index.html in the project root.
|
|
9
|
+
*/
|
|
10
|
+
const DEFAULT_HTML = `<!DOCTYPE html>
|
|
11
|
+
<html lang="en">
|
|
12
|
+
<head>
|
|
13
|
+
<meta charset="UTF-8" />
|
|
14
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0, viewport-fit=cover" />
|
|
15
|
+
<title>aai</title>
|
|
16
|
+
<link rel="icon" href="data:," />
|
|
17
|
+
<style>html, body { background: #101010; margin: 0; }</style>
|
|
18
|
+
</head>
|
|
19
|
+
<body>
|
|
20
|
+
<main id="app"></main>
|
|
21
|
+
<script type="module" src="./client.tsx"><\/script>
|
|
22
|
+
</body>
|
|
23
|
+
</html>`;
|
|
24
|
+
/**
|
|
25
|
+
* Vite plugin that serves a fallback index.html in dev mode when one doesn't
|
|
26
|
+
* exist on disk. No-op if index.html exists (user override).
|
|
27
|
+
*/
|
|
28
|
+
function fallbackHtmlPlugin(root) {
|
|
29
|
+
const htmlExists = existsSync(path.join(root, "index.html"));
|
|
30
|
+
return {
|
|
31
|
+
name: "aai-fallback-html",
|
|
32
|
+
configureServer(server) {
|
|
33
|
+
if (htmlExists) return;
|
|
34
|
+
server.middlewares.use((req, res, next) => {
|
|
35
|
+
if (req.url === "/" || req.url === "/index.html") {
|
|
36
|
+
server.transformIndexHtml("/", DEFAULT_HTML, req.originalUrl).then((html) => {
|
|
37
|
+
res.setHeader("Content-Type", "text/html");
|
|
38
|
+
res.end(html);
|
|
39
|
+
}, next);
|
|
40
|
+
return;
|
|
41
|
+
}
|
|
42
|
+
next();
|
|
43
|
+
});
|
|
44
|
+
}
|
|
45
|
+
};
|
|
46
|
+
}
|
|
47
|
+
/**
|
|
48
|
+
* Write a temporary index.html for Vite build (HTML must be on disk for build).
|
|
49
|
+
* Returns a cleanup function to remove it. No-op if index.html already exists.
|
|
50
|
+
*/
|
|
51
|
+
function writeTempHtml(root) {
|
|
52
|
+
const htmlPath = path.join(root, "index.html");
|
|
53
|
+
if (existsSync(htmlPath)) return () => {};
|
|
54
|
+
writeFileSync(htmlPath, DEFAULT_HTML);
|
|
55
|
+
return () => {
|
|
56
|
+
try {
|
|
57
|
+
unlinkSync(htmlPath);
|
|
58
|
+
} catch {}
|
|
59
|
+
};
|
|
60
|
+
}
|
|
61
|
+
//#endregion
|
|
62
|
+
export { writeTempHtml as n, fallbackHtmlPlugin as t };
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import { r as log } from "./_ui-
|
|
2
|
+
import { r as log } from "./_ui-nOp7hFVy.mjs";
|
|
3
3
|
import { r as validateAgentExport } from "./_utils-DZo3_J_v.mjs";
|
|
4
|
-
import { n as ensureApiKey } from "./_config-
|
|
5
|
-
import { t as
|
|
4
|
+
import { n as ensureApiKey } from "./_config-B0FXR5GQ.mjs";
|
|
5
|
+
import { t as fallbackHtmlPlugin } from "./_default-html-BasMCgr9.mjs";
|
|
6
|
+
import { t as resolveServerEnv } from "./_server-common-BVkNI-o4.mjs";
|
|
7
|
+
import { createRequire } from "node:module";
|
|
6
8
|
import { existsSync, watch } from "node:fs";
|
|
7
9
|
import path from "node:path";
|
|
8
10
|
import { pathToFileURL } from "node:url";
|
|
@@ -61,12 +63,18 @@ async function startDevServer(opts) {
|
|
|
61
63
|
const vitePort = port;
|
|
62
64
|
const agentDef = await loadAgentDef(cwd);
|
|
63
65
|
const env = await resolveAgentEnv(cwd);
|
|
66
|
+
const runtime = createRuntime({
|
|
67
|
+
agent: agentDef,
|
|
68
|
+
env
|
|
69
|
+
});
|
|
70
|
+
function resolveDefaultClientDir() {
|
|
71
|
+
const pkgPath = createRequire(import.meta.url).resolve("@alexkroman1/aai-ui/package.json");
|
|
72
|
+
return path.join(path.dirname(pkgPath), "dist", "default-client");
|
|
73
|
+
}
|
|
64
74
|
const agentServer = createServer({
|
|
65
|
-
runtime
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
}),
|
|
69
|
-
name: agentDef.name
|
|
75
|
+
runtime,
|
|
76
|
+
name: agentDef.name,
|
|
77
|
+
...hasClient ? {} : { clientDir: resolveDefaultClientDir() }
|
|
70
78
|
});
|
|
71
79
|
await agentServer.listen(backendPort);
|
|
72
80
|
let viteServer;
|
|
@@ -75,6 +83,7 @@ async function startDevServer(opts) {
|
|
|
75
83
|
const target = `http://localhost:${backendPort}`;
|
|
76
84
|
viteServer = await createViteServer({
|
|
77
85
|
root: cwd,
|
|
86
|
+
plugins: [fallbackHtmlPlugin(cwd)],
|
|
78
87
|
server: {
|
|
79
88
|
port: vitePort,
|
|
80
89
|
proxy: {
|
|
@@ -111,7 +120,8 @@ async function startDevServer(opts) {
|
|
|
111
120
|
agent: newAgentDef,
|
|
112
121
|
env: currentEnv
|
|
113
122
|
}),
|
|
114
|
-
name: newAgentDef.name
|
|
123
|
+
name: newAgentDef.name,
|
|
124
|
+
...hasClient ? {} : { clientDir: resolveDefaultClientDir() }
|
|
115
125
|
});
|
|
116
126
|
await newServer.listen(backendPort);
|
|
117
127
|
currentServer = newServer;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import { isDevMode } from "./_agent-
|
|
2
|
+
import { isDevMode } from "./_agent-De8f1JdZ.mjs";
|
|
3
3
|
import { existsSync } from "node:fs";
|
|
4
4
|
import path from "node:path";
|
|
5
5
|
import { fileURLToPath } from "node:url";
|
|
@@ -21,7 +21,10 @@ function resolveLocalTemplatesDir() {
|
|
|
21
21
|
async function resolveTemplatesDir() {
|
|
22
22
|
if (process.env.AAI_TEMPLATES_DIR) return process.env.AAI_TEMPLATES_DIR;
|
|
23
23
|
if (isDevMode()) return resolveLocalTemplatesDir();
|
|
24
|
-
const { dir } = await downloadTemplate(`${GIGET_SOURCE}#${GIGET_REF}`, {
|
|
24
|
+
const { dir } = await downloadTemplate(`${GIGET_SOURCE}#${GIGET_REF}`, {
|
|
25
|
+
force: true,
|
|
26
|
+
forceClean: true
|
|
27
|
+
});
|
|
25
28
|
return dir;
|
|
26
29
|
}
|
|
27
30
|
/**
|
|
@@ -114,7 +117,7 @@ async function patchPackageJsonForWorkspace(targetDir) {
|
|
|
114
117
|
const pkgJson = JSON.parse(raw);
|
|
115
118
|
pkgJson.name = path.basename(targetDir);
|
|
116
119
|
delete pkgJson.packageManager;
|
|
117
|
-
const { getMonorepoRoot } = await import("./_agent-
|
|
120
|
+
const { getMonorepoRoot } = await import("./_agent-De8f1JdZ.mjs");
|
|
118
121
|
const root = getMonorepoRoot();
|
|
119
122
|
if (!root) return;
|
|
120
123
|
const packagesDir = path.join(root, "packages");
|
package/dist/cli.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import { i as getOutputMode, r as fail, t as CliError } from "./_output-
|
|
3
|
-
import { a as silenceOutput } from "./_ui-
|
|
2
|
+
import { i as getOutputMode, r as fail, t as CliError } from "./_output-vvoR6N1x.mjs";
|
|
3
|
+
import { a as silenceOutput } from "./_ui-nOp7hFVy.mjs";
|
|
4
4
|
import { n as resolveCwd, t as fileExists } from "./_utils-DZo3_J_v.mjs";
|
|
5
5
|
import { existsSync, readFileSync } from "node:fs";
|
|
6
6
|
import path from "node:path";
|
|
@@ -60,7 +60,7 @@ async function handleErrors(mode, fn) {
|
|
|
60
60
|
process.stdout.write(`${JSON.stringify(result)}\n`);
|
|
61
61
|
process.exit(1);
|
|
62
62
|
}
|
|
63
|
-
const { log } = await import("./_ui-
|
|
63
|
+
const { log } = await import("./_ui-nOp7hFVy.mjs").then((n) => n.t);
|
|
64
64
|
log.error(errorMessage(err));
|
|
65
65
|
process.exit(1);
|
|
66
66
|
}
|
|
@@ -75,7 +75,7 @@ async function runCommand(args, fn, opts = {}) {
|
|
|
75
75
|
silenceOutput();
|
|
76
76
|
if (opts.setYes !== false) args.yes = true;
|
|
77
77
|
}
|
|
78
|
-
const { withOutput } = await import("./_output-
|
|
78
|
+
const { withOutput } = await import("./_output-vvoR6N1x.mjs").then((n) => n.n);
|
|
79
79
|
await handleErrors(mode, () => withOutput(mode, () => fn(mode), () => {}));
|
|
80
80
|
}
|
|
81
81
|
const init = defineCommand({
|
|
@@ -113,7 +113,7 @@ const init = defineCommand({
|
|
|
113
113
|
},
|
|
114
114
|
async run({ args }) {
|
|
115
115
|
await runCommand(args, async (mode) => {
|
|
116
|
-
const { executeInit } = await import("./init-
|
|
116
|
+
const { executeInit } = await import("./init-DiJBl3es.mjs");
|
|
117
117
|
return executeInit({
|
|
118
118
|
dir: args.dir,
|
|
119
119
|
force: args.force,
|
|
@@ -140,7 +140,7 @@ const dev = defineCommand({
|
|
|
140
140
|
async run({ args }) {
|
|
141
141
|
await runCommand(args, async () => {
|
|
142
142
|
const cwd = await setup({ agent: true });
|
|
143
|
-
const { executeDev } = await import("./dev-
|
|
143
|
+
const { executeDev } = await import("./dev-D2EwGHYi.mjs");
|
|
144
144
|
return executeDev({
|
|
145
145
|
cwd,
|
|
146
146
|
port: args.port
|
|
@@ -157,7 +157,7 @@ const test = defineCommand({
|
|
|
157
157
|
async run({ args }) {
|
|
158
158
|
await runCommand(args, async () => {
|
|
159
159
|
const cwd = await setup();
|
|
160
|
-
const { executeTest } = await import("./test-
|
|
160
|
+
const { executeTest } = await import("./test-BLYrV5ap.mjs");
|
|
161
161
|
return executeTest(cwd);
|
|
162
162
|
}, { setYes: false });
|
|
163
163
|
}
|
|
@@ -180,10 +180,10 @@ const build = defineCommand({
|
|
|
180
180
|
await runCommand(args, async () => {
|
|
181
181
|
const cwd = await setup({ agent: true });
|
|
182
182
|
if (!args.skipTests) {
|
|
183
|
-
const { runVitest } = await import("./test-
|
|
183
|
+
const { runVitest } = await import("./test-BLYrV5ap.mjs");
|
|
184
184
|
runVitest(cwd);
|
|
185
185
|
}
|
|
186
|
-
const { executeBuild } = await import("./_bundler-
|
|
186
|
+
const { executeBuild } = await import("./_bundler-CMMSjh9o.mjs");
|
|
187
187
|
return executeBuild(cwd);
|
|
188
188
|
});
|
|
189
189
|
}
|
|
@@ -201,7 +201,7 @@ const deploy = defineCommand({
|
|
|
201
201
|
async run({ args }) {
|
|
202
202
|
await runCommand(args, async () => {
|
|
203
203
|
const cwd = await setup({ agent: true });
|
|
204
|
-
const { executeDeploy } = await import("./deploy-
|
|
204
|
+
const { executeDeploy } = await import("./deploy-D8uMWSDH.mjs");
|
|
205
205
|
return executeDeploy({
|
|
206
206
|
cwd,
|
|
207
207
|
...args.server ? { server: args.server } : {}
|
|
@@ -221,7 +221,7 @@ const del = defineCommand({
|
|
|
221
221
|
async run({ args }) {
|
|
222
222
|
await runCommand(args, async () => {
|
|
223
223
|
const cwd = await setup();
|
|
224
|
-
const { executeDelete } = await import("./delete-
|
|
224
|
+
const { executeDelete } = await import("./delete-BEC2ZXbk.mjs");
|
|
225
225
|
return executeDelete({
|
|
226
226
|
cwd,
|
|
227
227
|
...args.server ? { server: args.server } : {}
|
|
@@ -252,7 +252,7 @@ const secret = defineCommand({
|
|
|
252
252
|
async run({ args }) {
|
|
253
253
|
await runCommand(args, async (mode) => {
|
|
254
254
|
const cwd = await setup();
|
|
255
|
-
const { executeSecretPut, readStdin } = await import("./secret-
|
|
255
|
+
const { executeSecretPut, readStdin } = await import("./secret-DlSN4FdF.mjs");
|
|
256
256
|
const value = mode === "json" ? await readStdin() : void 0;
|
|
257
257
|
if (mode === "json" && !value) {
|
|
258
258
|
const result = fail("no_input", "No value provided", "Pipe secret value to stdin");
|
|
@@ -280,7 +280,7 @@ const secret = defineCommand({
|
|
|
280
280
|
async run({ args }) {
|
|
281
281
|
await runCommand(args, async () => {
|
|
282
282
|
const cwd = await setup();
|
|
283
|
-
const { executeSecretDelete } = await import("./secret-
|
|
283
|
+
const { executeSecretDelete } = await import("./secret-DlSN4FdF.mjs");
|
|
284
284
|
return executeSecretDelete(cwd, args.name, args.server);
|
|
285
285
|
}, { setYes: false });
|
|
286
286
|
}
|
|
@@ -297,7 +297,7 @@ const secret = defineCommand({
|
|
|
297
297
|
async run({ args }) {
|
|
298
298
|
await runCommand(args, async () => {
|
|
299
299
|
const cwd = await setup();
|
|
300
|
-
const { executeSecretList } = await import("./secret-
|
|
300
|
+
const { executeSecretList } = await import("./secret-DlSN4FdF.mjs");
|
|
301
301
|
return executeSecretList(cwd, args.server);
|
|
302
302
|
}, { setYes: false });
|
|
303
303
|
}
|
|
@@ -333,7 +333,7 @@ if (process.env.VITEST !== "true") {
|
|
|
333
333
|
process.argv.splice(2, 0, defaultCmd);
|
|
334
334
|
}
|
|
335
335
|
const cmd = process.argv[2];
|
|
336
|
-
(helpFlags.has(cmd ?? "") || cmd === "test" || cmd === "build" ? Promise.resolve() : import("./_config-
|
|
336
|
+
(helpFlags.has(cmd ?? "") || cmd === "test" || cmd === "build" ? Promise.resolve() : import("./_config-B0FXR5GQ.mjs").then((n) => n.t).then((m) => m.ensureApiKey())).then(() => runMain(mainCommand));
|
|
337
337
|
}
|
|
338
338
|
//#endregion
|
|
339
339
|
export { mainCommand };
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import { a as ok } from "./_output-
|
|
3
|
-
import { r as log } from "./_ui-
|
|
4
|
-
import { getServerInfo } from "./_agent-
|
|
5
|
-
import { t as apiRequestOrThrow } from "./_api-client-
|
|
2
|
+
import { a as ok } from "./_output-vvoR6N1x.mjs";
|
|
3
|
+
import { r as log } from "./_ui-nOp7hFVy.mjs";
|
|
4
|
+
import { getServerInfo } from "./_agent-De8f1JdZ.mjs";
|
|
5
|
+
import { t as apiRequestOrThrow } from "./_api-client-Cf9Lv2Rw.mjs";
|
|
6
6
|
//#region _delete.ts
|
|
7
7
|
async function runDelete(opts) {
|
|
8
8
|
await apiRequestOrThrow(`${opts.url}/${opts.slug}`, {
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import { a as ok } from "./_output-
|
|
3
|
-
import { n as fmtUrl, r as log } from "./_ui-
|
|
4
|
-
import { i as writeProjectConfig, n as ensureApiKey, r as readProjectConfig } from "./_config-
|
|
5
|
-
import { resolveServerUrl } from "./_agent-
|
|
6
|
-
import { buildAgentBundle } from "./_bundler-
|
|
7
|
-
import { t as resolveServerEnv } from "./_server-common-
|
|
8
|
-
import { t as apiRequestOrThrow } from "./_api-client-
|
|
2
|
+
import { a as ok } from "./_output-vvoR6N1x.mjs";
|
|
3
|
+
import { n as fmtUrl, r as log } from "./_ui-nOp7hFVy.mjs";
|
|
4
|
+
import { i as writeProjectConfig, n as ensureApiKey, r as readProjectConfig } from "./_config-B0FXR5GQ.mjs";
|
|
5
|
+
import { resolveServerUrl } from "./_agent-De8f1JdZ.mjs";
|
|
6
|
+
import { buildAgentBundle } from "./_bundler-CMMSjh9o.mjs";
|
|
7
|
+
import { t as resolveServerEnv } from "./_server-common-BVkNI-o4.mjs";
|
|
8
|
+
import { t as apiRequestOrThrow } from "./_api-client-Cf9Lv2Rw.mjs";
|
|
9
9
|
//#region _deploy.ts
|
|
10
10
|
async function runDeploy(opts) {
|
|
11
11
|
const body = JSON.stringify({
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import { a as ok } from "./_output-
|
|
3
|
-
import { i as parsePort, n as fmtUrl, r as log } from "./_ui-
|
|
2
|
+
import { a as ok } from "./_output-vvoR6N1x.mjs";
|
|
3
|
+
import { i as parsePort, n as fmtUrl, r as log } from "./_ui-nOp7hFVy.mjs";
|
|
4
4
|
import path from "node:path";
|
|
5
5
|
import { colorize } from "consola/utils";
|
|
6
6
|
//#region dev.ts
|
|
@@ -11,7 +11,7 @@ import { colorize } from "consola/utils";
|
|
|
11
11
|
async function executeDev(opts) {
|
|
12
12
|
const port = parsePort(opts.port);
|
|
13
13
|
const agentName = path.basename(path.resolve(opts.cwd));
|
|
14
|
-
const { startDevServer } = await import("./_dev-server-
|
|
14
|
+
const { startDevServer } = await import("./_dev-server-DMFyqc9v.mjs");
|
|
15
15
|
const cleanup = await startDevServer({
|
|
16
16
|
cwd: opts.cwd,
|
|
17
17
|
port
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import { a as ok } from "./_output-
|
|
3
|
-
import { r as log$1 } from "./_ui-
|
|
2
|
+
import { a as ok } from "./_output-vvoR6N1x.mjs";
|
|
3
|
+
import { r as log$1 } from "./_ui-nOp7hFVy.mjs";
|
|
4
4
|
import { n as resolveCwd, t as fileExists } from "./_utils-DZo3_J_v.mjs";
|
|
5
|
-
import { getMonorepoRoot, isDevMode } from "./_agent-
|
|
5
|
+
import { getMonorepoRoot, isDevMode } from "./_agent-De8f1JdZ.mjs";
|
|
6
6
|
import path from "node:path";
|
|
7
7
|
import { errorMessage } from "@alexkroman1/aai";
|
|
8
8
|
import * as p from "@clack/prompts";
|
|
@@ -107,7 +107,7 @@ function resolveDeployServer(explicit, monorepoRoot) {
|
|
|
107
107
|
/** Run deploy after init and return deploy metadata if successful. */
|
|
108
108
|
async function tryDeploy(cwd, server, monorepoRoot) {
|
|
109
109
|
const resolvedServer = resolveDeployServer(server, monorepoRoot);
|
|
110
|
-
const { executeDeploy } = await import("./deploy-
|
|
110
|
+
const { executeDeploy } = await import("./deploy-D8uMWSDH.mjs");
|
|
111
111
|
const result = await executeDeploy({
|
|
112
112
|
cwd,
|
|
113
113
|
...resolvedServer ? { server: resolvedServer } : {}
|
|
@@ -119,7 +119,7 @@ async function tryDeploy(cwd, server, monorepoRoot) {
|
|
|
119
119
|
}
|
|
120
120
|
/** Scaffold the project, optionally showing a spinner. */
|
|
121
121
|
async function scaffoldProject(dir, cwd, template, silent) {
|
|
122
|
-
const { runInit } = await import("./_init-
|
|
122
|
+
const { runInit } = await import("./_init-CkoOBaYG.mjs");
|
|
123
123
|
if (silent) {
|
|
124
124
|
await runInit({
|
|
125
125
|
targetDir: cwd,
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import { a as ok, r as fail } from "./_output-
|
|
3
|
-
import { r as log$1 } from "./_ui-
|
|
4
|
-
import { getServerInfo } from "./_agent-
|
|
5
|
-
import { t as apiRequestOrThrow } from "./_api-client-
|
|
2
|
+
import { a as ok, r as fail } from "./_output-vvoR6N1x.mjs";
|
|
3
|
+
import { r as log$1 } from "./_ui-nOp7hFVy.mjs";
|
|
4
|
+
import { getServerInfo } from "./_agent-De8f1JdZ.mjs";
|
|
5
|
+
import { t as apiRequestOrThrow } from "./_api-client-Cf9Lv2Rw.mjs";
|
|
6
6
|
import * as p from "@clack/prompts";
|
|
7
7
|
//#region secret.ts
|
|
8
8
|
async function secretRequest(cwd, pathSuffix, init, server) {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import { a as ok, r as fail } from "./_output-
|
|
3
|
-
import { r as log } from "./_ui-
|
|
2
|
+
import { a as ok, r as fail } from "./_output-vvoR6N1x.mjs";
|
|
3
|
+
import { r as log } from "./_ui-nOp7hFVy.mjs";
|
|
4
4
|
import { existsSync } from "node:fs";
|
|
5
5
|
import path from "node:path";
|
|
6
6
|
import { execFileSync } from "node:child_process";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@alexkroman1/aai-cli",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.5",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"bin": {
|
|
6
6
|
"aai": "dist/cli.mjs"
|
|
@@ -23,7 +23,8 @@
|
|
|
23
23
|
"p-debounce": "^5.1.0",
|
|
24
24
|
"vite": "^8.0.3",
|
|
25
25
|
"zod": "^4.3.6",
|
|
26
|
-
"@alexkroman1/aai": "1.0.
|
|
26
|
+
"@alexkroman1/aai-ui": "1.0.5",
|
|
27
|
+
"@alexkroman1/aai": "1.0.5"
|
|
27
28
|
},
|
|
28
29
|
"devDependencies": {
|
|
29
30
|
"get-port": "^7.2.0",
|
|
File without changes
|
|
File without changes
|