@alexkroman1/aai-cli 1.3.0 → 1.3.1
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/cli.mjs
CHANGED
|
@@ -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-DqAHpR4X.mjs");
|
|
117
117
|
return executeInit({
|
|
118
118
|
dir: args.dir,
|
|
119
119
|
force: args.force,
|
|
@@ -4,13 +4,26 @@ 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
5
|
import { getMonorepoRoot, isDevMode } from "./_agent-De8f1JdZ.mjs";
|
|
6
6
|
import path from "node:path";
|
|
7
|
-
import { errorMessage } from "@alexkroman1/aai";
|
|
8
7
|
import * as p from "@clack/prompts";
|
|
9
8
|
import { colorize } from "consola/utils";
|
|
10
9
|
import fs from "node:fs/promises";
|
|
11
10
|
import { execFile } from "node:child_process";
|
|
12
11
|
import { promisify } from "node:util";
|
|
13
12
|
//#region init.ts
|
|
13
|
+
/**
|
|
14
|
+
* Format an install error so the user sees what actually went wrong.
|
|
15
|
+
* pnpm writes failures to stdout (not stderr), and Node's execFile error
|
|
16
|
+
* message is only "Command failed: ..." — so we append both streams.
|
|
17
|
+
*/
|
|
18
|
+
function formatInstallError(err) {
|
|
19
|
+
if (!(err instanceof Error)) return String(err);
|
|
20
|
+
const parts = [err.message];
|
|
21
|
+
const stderr = err.stderr?.trim();
|
|
22
|
+
const stdout = err.stdout?.trim();
|
|
23
|
+
if (stderr) parts.push(stderr);
|
|
24
|
+
if (stdout) parts.push(stdout);
|
|
25
|
+
return parts.join("\n");
|
|
26
|
+
}
|
|
14
27
|
const execFileAsync = promisify(execFile);
|
|
15
28
|
const DEFAULT_PROJECT_NAME = "my-voice-agent";
|
|
16
29
|
/** Prompt for project name or return default when --yes is set. */
|
|
@@ -80,7 +93,7 @@ async function installDeps(cwd, silent) {
|
|
|
80
93
|
await runPnpmInstall(cwd);
|
|
81
94
|
return true;
|
|
82
95
|
} catch (err) {
|
|
83
|
-
log$1.warn(`pnpm install failed: ${
|
|
96
|
+
log$1.warn(`pnpm install failed: ${formatInstallError(err)}`);
|
|
84
97
|
log$1.warn("Run `corepack enable && pnpm install` manually in the project directory.");
|
|
85
98
|
return false;
|
|
86
99
|
}
|
|
@@ -92,7 +105,7 @@ async function installDeps(cwd, silent) {
|
|
|
92
105
|
return true;
|
|
93
106
|
} catch (err) {
|
|
94
107
|
s.stop("Dependency install failed");
|
|
95
|
-
log$1.warn(`pnpm install failed: ${
|
|
108
|
+
log$1.warn(`pnpm install failed: ${formatInstallError(err)}`);
|
|
96
109
|
log$1.warn("Run `corepack enable && pnpm install` manually in the project directory.");
|
|
97
110
|
return false;
|
|
98
111
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@alexkroman1/aai-cli",
|
|
3
|
-
"version": "1.3.
|
|
3
|
+
"version": "1.3.1",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"bin": {
|
|
6
6
|
"aai": "dist/cli.mjs"
|
|
@@ -23,8 +23,8 @@
|
|
|
23
23
|
"p-debounce": "^5.1.0",
|
|
24
24
|
"vite": "^8.0.8",
|
|
25
25
|
"zod": "^4.3.6",
|
|
26
|
-
"@alexkroman1/aai": "1.3.
|
|
27
|
-
"@alexkroman1/aai
|
|
26
|
+
"@alexkroman1/aai-ui": "1.3.1",
|
|
27
|
+
"@alexkroman1/aai": "1.3.1"
|
|
28
28
|
},
|
|
29
29
|
"devDependencies": {
|
|
30
30
|
"get-port": "^7.2.0",
|