@astrojs/db 0.14.2 → 0.14.3

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.
@@ -27,7 +27,7 @@ function printHelp({
27
27
  message.push(
28
28
  linebreak(),
29
29
  ` ${bgGreen(black(` ${commandName} `))} ${green(
30
- `v${"0.14.2"}`
30
+ `v${"0.14.3"}`
31
31
  )} ${headline}`
32
32
  );
33
33
  }
@@ -111,7 +111,7 @@ function astroDBIntegration() {
111
111
  ...CONFIG_FILE_NAMES.map((c) => new URL(c, getDbDirectoryUrl(root))),
112
112
  ...configFileDependencies.map((c) => new URL(c, root))
113
113
  ];
114
- server.watcher.on("all", (event, relativeEntry) => {
114
+ server.watcher.on("all", (_event, relativeEntry) => {
115
115
  const entry = new URL(relativeEntry, root);
116
116
  if (filesToWatch.some((f) => entry.href === f.href)) {
117
117
  server.restart();
@@ -74,12 +74,13 @@ function getLocalVirtualModContents({
74
74
  tables,
75
75
  root
76
76
  }) {
77
+ const { ASTRO_DATABASE_FILE } = getAstroEnv();
77
78
  const dbInfo = getRemoteDatabaseInfo();
78
79
  const dbUrl = new URL(DB_PATH, root);
79
80
  return `
80
81
  import { asDrizzleTable, createLocalDatabaseClient, normalizeDatabaseUrl } from ${RUNTIME_IMPORT};
81
82
 
82
- const dbUrl = normalizeDatabaseUrl(import.meta.env.ASTRO_DATABASE_FILE, ${JSON.stringify(dbUrl)});
83
+ const dbUrl = normalizeDatabaseUrl(${JSON.stringify(ASTRO_DATABASE_FILE)}, ${JSON.stringify(dbUrl)});
83
84
  export const db = createLocalDatabaseClient({ dbUrl, enableTransactions: ${dbInfo.url === "libsql"} });
84
85
 
85
86
  export * from ${RUNTIME_VIRTUAL_IMPORT};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@astrojs/db",
3
- "version": "0.14.2",
3
+ "version": "0.14.3",
4
4
  "description": "Add libSQL and Astro Studio support to your Astro site",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -81,9 +81,9 @@
81
81
  "@types/prompts": "^2.4.9",
82
82
  "@types/yargs-parser": "^21.0.3",
83
83
  "cheerio": "1.0.0",
84
- "typescript": "^5.6.2",
85
- "vite": "^5.4.8",
86
- "astro": "4.15.12",
84
+ "typescript": "^5.6.3",
85
+ "vite": "^5.4.9",
86
+ "astro": "4.16.7",
87
87
  "astro-scripts": "0.0.14"
88
88
  },
89
89
  "scripts": {