diff --git a/packages/db/src/core/integration/index.ts b/packages/db/src/core/integration/index.ts index bcaf59bb25..523d4e6ebb 100644 --- a/packages/db/src/core/integration/index.ts +++ b/packages/db/src/core/integration/index.ts @@ -114,7 +114,9 @@ function astroDBIntegration(): AstroIntegration { }, 100); }, 'astro:build:start': async ({ logger }) => { - logger.info('database: ' + (connectedToRemote ? yellow('remote') : blue('local database.'))); + logger.info( + 'database: ' + (connectedToRemote ? yellow('remote') : blue('local database.')) + ); }, 'astro:build:done': async ({ }) => { await appToken?.destroy(); @@ -127,8 +129,10 @@ function astroDBIntegration(): AstroIntegration { * We need to attach the Drizzle `table` and collection name at runtime. * These cannot be determined from `defineCollection()`, * since we don't know the collection name until the `db` config is resolved. + * + * exported for unit testing. */ -function setCollectionsMeta(collections: Record) { +export function setCollectionsMeta(collections: Record) { for (const [name, collection] of Object.entries(collections)) { const table = collectionToTable(name, collection); collection._setMeta?.({ table });