aboutsummaryrefslogtreecommitdiff
path: root/packages/db/src/core/consts.ts
diff options
context:
space:
mode:
Diffstat (limited to 'packages/db/src/core/consts.ts')
-rw-r--r--packages/db/src/core/consts.ts17
1 files changed, 17 insertions, 0 deletions
diff --git a/packages/db/src/core/consts.ts b/packages/db/src/core/consts.ts
new file mode 100644
index 000000000..8b8ccaf2d
--- /dev/null
+++ b/packages/db/src/core/consts.ts
@@ -0,0 +1,17 @@
+import { readFileSync } from 'node:fs';
+
+const PACKAGE_NAME = JSON.parse(
+ readFileSync(new URL('../../package.json', import.meta.url), 'utf8'),
+).name;
+
+export const RUNTIME_IMPORT = JSON.stringify(`${PACKAGE_NAME}/runtime`);
+
+export const RUNTIME_VIRTUAL_IMPORT = JSON.stringify(`${PACKAGE_NAME}/dist/runtime/virtual.js`);
+
+export const VIRTUAL_MODULE_ID = 'astro:db';
+
+export const DB_PATH = '.astro/content.db';
+
+export const CONFIG_FILE_NAMES = ['config.ts', 'config.js', 'config.mts', 'config.mjs'];
+
+export const MIGRATION_VERSION = '2024-03-12';