@alexkroman1/aai-cli 0.10.3 → 0.11.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.
@@ -1,23 +0,0 @@
1
- #!/usr/bin/env node
2
- import { n as fileExists } from "./_discover-CbHCotwB.mjs";
3
- import { a as runCommand, i as parsePort, o as step } from "./_ui-C9IvR7Fh.mjs";
4
- import { a as resolveServerEnv, i as loadAgentDef, n as bootServer } from "./_server-common-DekUfYGG.mjs";
5
- import path from "node:path";
6
- //#region start.ts
7
- async function _startProductionServer(cwd, port, log) {
8
- const clientDir = path.join(cwd, ".aai", "client");
9
- log(step("Start", "loading agent"));
10
- await bootServer(await loadAgentDef(cwd), clientDir, await resolveServerEnv(cwd), port);
11
- log(step("Ready", `http://localhost:${port}`));
12
- }
13
- async function runStartCommand(opts) {
14
- const port = parsePort(opts.port);
15
- const buildDir = path.join(opts.cwd, ".aai", "build");
16
- if (!await fileExists(path.join(buildDir, "worker.js"))) throw new Error("No build found — run `aai build` first");
17
- await runCommand(async ({ log }) => {
18
- log(step("Start", `production server on port ${port}`));
19
- await _startProductionServer(opts.cwd, port, log);
20
- });
21
- }
22
- //#endregion
23
- export { runStartCommand };