Skip to content

Commit

Permalink
Revert "Removing embedding appToken from CI (#10497)" (#10520)
Browse files Browse the repository at this point in the history
* Revert "Removing embedding appToken from CI (#10497)"

This reverts commit 2fc7231.

* Changeset
  • Loading branch information
matthewp authored Mar 21, 2024
1 parent e457bb2 commit 30ce9a0
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/modern-roses-buy.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@astrojs/db": patch
---

Fix accessing remote database URL
5 changes: 4 additions & 1 deletion packages/db/src/core/integration/vite-plugin-db.ts
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,10 @@ export function getStudioVirtualModContents({
return `
import {asDrizzleTable, createRemoteDatabaseClient} from ${RUNTIME_IMPORT};
export const db = await createRemoteDatabaseClient(process.env.ASTRO_STUDIO_APP_TOKEN);
export const db = await createRemoteDatabaseClient(process.env.ASTRO_STUDIO_APP_TOKEN ?? ${JSON.stringify(
appToken
// Respect runtime env for user overrides in SSR
)}, import.meta.env.ASTRO_STUDIO_REMOTE_DB_URL ?? ${JSON.stringify(getRemoteDatabaseUrl())});
export * from ${RUNTIME_CONFIG_IMPORT};
Expand Down

0 comments on commit 30ce9a0

Please sign in to comment.