@absolutejs/absolute 0.19.0-beta.1008 → 0.19.0-beta.1009

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.
@@ -5,6 +5,7 @@ export * from './jsonLd';
5
5
  export * from './defineEnv';
6
6
  export * from './getEnv';
7
7
  export * from './networking';
8
+ export * from './projectRoot';
8
9
  export * from './registerClientScript';
9
10
  export * from './streamingSlotMetricSink';
10
11
  export * from './streamingSlots';
@@ -0,0 +1,17 @@
1
+ /**
2
+ * Absolute path to the project root — the directory holding your
3
+ * `absolute.config.*` (falling back to the nearest `package.json`, then
4
+ * `process.cwd()`). Resolved once at import.
5
+ *
6
+ * Anchor runtime and data paths to this instead of `import.meta.dir` /
7
+ * `import.meta.url`. Those resolve the *current module's* location, which is
8
+ * your `src/` tree under `absolute dev` but the bundled `dist/` under
9
+ * `absolute start` — so module-relative paths silently point somewhere else in
10
+ * production. `projectRoot` is identical in both modes because the CLI runs
11
+ * from the project root in both.
12
+ *
13
+ * @example
14
+ * import { projectRoot } from '@absolutejs/absolute';
15
+ * const dbPath = resolve(projectRoot, '.data', 'app.sqlite');
16
+ */
17
+ export declare const projectRoot: string;
package/package.json CHANGED
@@ -403,5 +403,5 @@
403
403
  ]
404
404
  }
405
405
  },
406
- "version": "0.19.0-beta.1008"
406
+ "version": "0.19.0-beta.1009"
407
407
  }