mirror of
https://github.com/withastro/astro.git
synced 2025-02-24 22:46:02 -05:00
wip: logs
This commit is contained in:
parent
918d607daf
commit
a3d88a7f53
1 changed files with 3 additions and 0 deletions
|
@ -25,6 +25,7 @@ export async function createLocalDatabaseClient({
|
|||
}): Promise<LocalDatabaseClient> {
|
||||
const url = isWebContainer ? 'file:content.db' : dbUrl;
|
||||
const client = createClient({ url });
|
||||
console.log('getting db');
|
||||
const db = Object.assign(drizzleLibsql(client), {
|
||||
[Symbol.dispose || Symbol.for('Symbol.dispose')]() {
|
||||
client.close();
|
||||
|
@ -32,6 +33,7 @@ export async function createLocalDatabaseClient({
|
|||
});
|
||||
|
||||
if (seedProps) {
|
||||
console.log('seeding');
|
||||
await seedLocal({ db, ...seedProps });
|
||||
console.log('seed finished');
|
||||
}
|
||||
|
@ -70,6 +72,7 @@ async function seedLocal({
|
|||
fileGlob: Record<string, () => Promise<void>>;
|
||||
}) {
|
||||
await recreateTables({ db, tables });
|
||||
console.log('globbing', fileGlob);
|
||||
for (const fileName of SEED_DEV_FILE_NAMES_SORTED) {
|
||||
const key = Object.keys(fileGlob).find((f) => f.endsWith(fileName));
|
||||
if (key) {
|
||||
|
|
Loading…
Add table
Reference in a new issue