@astrojs/db 0.1.10 → 0.1.11

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.
@@ -43,8 +43,15 @@ const params = ${JSON.stringify({
43
43
  seeding: false
44
44
  })};
45
45
 
46
- params.dbUrl = new URL(${JSON.stringify(DB_PATH)}, 'file://' + process.cwd() + '/');
47
- console.log('createLocalDatabaseClient', process.cwd(), fs.readdirSync(process.cwd()+'/vercel/path0'));
46
+ export let dbUrl = ${JSON.stringify(dbUrl)};
47
+
48
+ // This is gross
49
+ if(import.meta.env.VERCEL) {
50
+ dbUrl = new URL(${JSON.stringify(DB_PATH)}, 'file://' + process.cwd() + '/vercel/path0/');
51
+ }
52
+
53
+ params.dbUrl = dbUrl;
54
+ console.log('createLocalDatabaseClient', params);
48
55
  export const db = await createLocalDatabaseClient(params);
49
56
 
50
57
  export * from ${DRIZZLE_MOD_IMPORT};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@astrojs/db",
3
- "version": "0.1.10",
3
+ "version": "0.1.11",
4
4
  "description": "",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -61,8 +61,8 @@
61
61
  "mocha": "^10.2.0",
62
62
  "typescript": "^5.2.2",
63
63
  "vite": "^4.4.11",
64
- "astro-scripts": "0.0.14",
65
- "astro": "4.2.4"
64
+ "astro": "4.2.4",
65
+ "astro-scripts": "0.0.14"
66
66
  },
67
67
  "scripts": {
68
68
  "build": "astro-scripts build \"src/**/*.ts\" && tsc",