0
Fork 0
mirror of https://github.com/withastro/astro.git synced 2025-03-10 23:01:26 -05:00

Revert "Removing embedding appToken from CI (#10497)" (#10520)

* Revert "Removing embedding appToken from CI (#10497)"

This reverts commit 2fc7231df2.

* Changeset
This commit is contained in:
Matthew Phillips 2024-03-21 10:21:35 -04:00 committed by GitHub
parent e457bb2e90
commit 30ce9a0c47
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 9 additions and 1 deletions

View file

@ -0,0 +1,5 @@
---
"@astrojs/db": patch
---
Fix accessing remote database URL

View file

@ -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};