@eeshans/howiprompt 2.1.0 → 2.1.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/README.md +3 -0
- package/bin/cli.mjs +7 -21
- package/package.json +3 -2
package/README.md
CHANGED
package/bin/cli.mjs
CHANGED
|
@@ -7,11 +7,10 @@
|
|
|
7
7
|
|
|
8
8
|
import fs from "node:fs";
|
|
9
9
|
import path from "node:path";
|
|
10
|
-
import { execSync } from "node:child_process";
|
|
11
10
|
import { fileURLToPath } from "node:url";
|
|
12
11
|
|
|
13
12
|
import { bootstrapDb } from "./bootstrap-db.mjs";
|
|
14
|
-
import { resolveDataDir, findFreePort, parseArgs, openBrowser
|
|
13
|
+
import { resolveDataDir, findFreePort, parseArgs, openBrowser } from "./cli-helpers.mjs";
|
|
15
14
|
|
|
16
15
|
const __dirname = path.dirname(fileURLToPath(import.meta.url));
|
|
17
16
|
const pkgPath = path.join(__dirname, "..", "package.json");
|
|
@@ -88,26 +87,13 @@ if (!fs.existsSync(metricsPath)) {
|
|
|
88
87
|
} catch { /* no config yet — wizard will show by default */ }
|
|
89
88
|
}
|
|
90
89
|
|
|
91
|
-
// ── Auto-build if needed ──────────────────────────────
|
|
92
90
|
const projectRoot = path.join(__dirname, "..");
|
|
91
|
+
const serverBundlePath = path.join(projectRoot, "dist", "server.js");
|
|
92
|
+
const frontendBundlePath = path.join(projectRoot, "frontend", "dist", "index.html");
|
|
93
93
|
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
console.log(green("done"));
|
|
98
|
-
} catch (e) {
|
|
99
|
-
console.log(red("failed"));
|
|
100
|
-
console.error(e.stderr?.toString() || e.message);
|
|
101
|
-
process.exit(1);
|
|
102
|
-
}
|
|
103
|
-
|
|
104
|
-
process.stdout.write(" Building frontend... ");
|
|
105
|
-
try {
|
|
106
|
-
execSync("npm run build", { cwd: path.join(projectRoot, "frontend"), stdio: "pipe" });
|
|
107
|
-
console.log(green("done"));
|
|
108
|
-
} catch (e) {
|
|
109
|
-
console.log(red("failed"));
|
|
110
|
-
console.error(e.stderr?.toString() || e.message);
|
|
94
|
+
if (!fs.existsSync(serverBundlePath) || !fs.existsSync(frontendBundlePath)) {
|
|
95
|
+
console.error(red("Bundled app assets are missing."));
|
|
96
|
+
console.error(dim("For local development, run `npm run build:cli` or `npm run dev:cli` from the repo."));
|
|
111
97
|
process.exit(1);
|
|
112
98
|
}
|
|
113
99
|
|
|
@@ -131,7 +117,7 @@ try {
|
|
|
131
117
|
const controller = new AbortController();
|
|
132
118
|
versionCheckTimeout = setTimeout(() => controller.abort(), 3000);
|
|
133
119
|
versionCheckTimeout.unref?.();
|
|
134
|
-
const res = await fetch("https://registry.npmjs.org/
|
|
120
|
+
const res = await fetch("https://registry.npmjs.org/@eeshans%2fhowiprompt/latest", {
|
|
135
121
|
signal: controller.signal,
|
|
136
122
|
});
|
|
137
123
|
clearTimeout(versionCheckTimeout);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@eeshans/howiprompt",
|
|
3
|
-
"version": "2.1.
|
|
3
|
+
"version": "2.1.1",
|
|
4
4
|
"description": "Local-first analytics dashboard for your AI coding assistant conversations",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"author": "Eeshan Srivastava (https://eeshans.com)",
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
],
|
|
32
32
|
"repository": {
|
|
33
33
|
"type": "git",
|
|
34
|
-
"url": "https://github.com/eeshansrivastava89/howiprompt"
|
|
34
|
+
"url": "git+https://github.com/eeshansrivastava89/howiprompt.git"
|
|
35
35
|
},
|
|
36
36
|
"homepage": "https://github.com/eeshansrivastava89/howiprompt#readme",
|
|
37
37
|
"bugs": {
|
|
@@ -48,6 +48,7 @@
|
|
|
48
48
|
"build": "tsc",
|
|
49
49
|
"test": "vitest run",
|
|
50
50
|
"test:watch": "vitest",
|
|
51
|
+
"dev:cli": "npm run build:cli && node bin/cli.mjs",
|
|
51
52
|
"build:cli": "node scripts/build-cli.mjs",
|
|
52
53
|
"check:privacy": "node scripts/privacy-gate.mjs",
|
|
53
54
|
"prepack": "node scripts/build-cli.mjs && node scripts/privacy-gate.mjs"
|