ai-spector 0.4.8 → 0.4.9
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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ai-spector",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.9",
|
|
4
4
|
"description": "Cursor-first documentation workflow: traceability graph, SRS/basic/detail design templates, and ai-spector CLI",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
@@ -59,6 +59,7 @@
|
|
|
59
59
|
},
|
|
60
60
|
"dependencies": {
|
|
61
61
|
"@types/mdast": "^4.0.4",
|
|
62
|
+
"ai-spector": "^0.4.8",
|
|
62
63
|
"ajv": "^8.17.1",
|
|
63
64
|
"ajv-formats": "^3.0.1",
|
|
64
65
|
"commander": "^12.1.0",
|
|
@@ -260,9 +260,23 @@ npx ai-spector prototype sync --json
|
|
|
260
260
|
|
|
261
261
|
Output includes each screen's `screenDoc → uri` mapping.
|
|
262
262
|
|
|
263
|
+
### Vite base path — required before first build
|
|
264
|
+
|
|
265
|
+
Vite defaults to `base: '/'`, generating absolute asset URLs (`/assets/app.js`). When `dist/` is deployed to a subdirectory, all asset requests resolve from the server root and return 403/404.
|
|
266
|
+
|
|
267
|
+
**Set `base: './'` in `vite.config.ts` before building:**
|
|
268
|
+
|
|
269
|
+
```ts
|
|
270
|
+
export default defineConfig({
|
|
271
|
+
base: './', // relative paths — works at any subdirectory depth
|
|
272
|
+
})
|
|
273
|
+
```
|
|
274
|
+
|
|
263
275
|
### Full SPA workflow
|
|
264
276
|
|
|
265
277
|
```bash
|
|
278
|
+
# 0. Ensure vite.config.ts has base: './' ← required or assets will 403
|
|
279
|
+
|
|
266
280
|
# 1. Build the SPA
|
|
267
281
|
cd frontend && npm run build && cd ..
|
|
268
282
|
|
|
@@ -21,6 +21,28 @@ Skip when:
|
|
|
21
21
|
| SvelteKit | `svelte` | `spa` | `routes/<slug>/+page.svelte` per screen |
|
|
22
22
|
| Angular | `angular` | `spa` | component per screen |
|
|
23
23
|
|
|
24
|
+
## Required: relative base path for Vite-based stacks (vue, react, svelte)
|
|
25
|
+
|
|
26
|
+
> Vite defaults to `base: '/'` which generates **absolute** asset URLs (`/assets/app.js`). When the built `dist/` is served from a subdirectory (e.g. `/project-id/1.4/dist/`), all asset requests hit the server root and return 403/404.
|
|
27
|
+
|
|
28
|
+
**Always set `base: './'` in `vite.config.ts` before the first build:**
|
|
29
|
+
|
|
30
|
+
```ts
|
|
31
|
+
// vite.config.ts
|
|
32
|
+
export default defineConfig({
|
|
33
|
+
base: './', // relative paths — works at any subdirectory depth
|
|
34
|
+
})
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
After adding this, rebuild and resync:
|
|
38
|
+
|
|
39
|
+
```bash
|
|
40
|
+
npm run build
|
|
41
|
+
npx ai-spector prototype sync --clean
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
When the agent sets up a Vite-based stack (vue / react / svelte), it **must** write or verify `base: './'` in `vite.config.ts` before generating any other files. Flag it explicitly to the user if the config is missing or set to `'/'`.
|
|
45
|
+
|
|
24
46
|
## Step 1 — Check stored stack
|
|
25
47
|
|
|
26
48
|
Read `.ai-spector/.docflow/config/prototype.config.json`. If `techStack` is set, skip this entire flow.
|