@ng-annotate/vite-plugin 0.3.6 → 0.3.8

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.
Files changed (2) hide show
  1. package/dist/store.js +3 -2
  2. package/package.json +1 -1
package/dist/store.js CHANGED
@@ -4,10 +4,11 @@ import { v4 as uuidv4 } from 'uuid';
4
4
  const EMPTY_STORE = { sessions: {}, annotations: {} };
5
5
  // ─── File paths ───────────────────────────────────────────────────────────────
6
6
  export const STORE_DIR = '.ng-annotate';
7
- export const STORE_PATH = path.join(process.cwd(), STORE_DIR, 'store.json');
7
+ const PROJECT_ROOT = process.env.NG_ANNOTATE_PROJECT_ROOT ?? process.cwd();
8
+ export const STORE_PATH = path.join(PROJECT_ROOT, STORE_DIR, 'store.json');
8
9
  // ─── Store init ───────────────────────────────────────────────────────────────
9
10
  export function ensureStore() {
10
- const dir = path.join(process.cwd(), STORE_DIR);
11
+ const dir = path.join(PROJECT_ROOT, STORE_DIR);
11
12
  if (!fs.existsSync(dir))
12
13
  fs.mkdirSync(dir, { recursive: true });
13
14
  if (!fs.existsSync(STORE_PATH)) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ng-annotate/vite-plugin",
3
- "version": "0.3.6",
3
+ "version": "0.3.8",
4
4
  "type": "module",
5
5
  "description": "Vite plugin for ng-annotate-mcp — WebSocket annotation bridge and component manifest for Angular dev tooling",
6
6
  "keywords": [