Home / File/ seed.ts — astro Source File

seed.ts — astro Source File

Architecture documentation for seed.ts, a typescript file in the astro codebase. 3 imports, 0 dependents.

Entity Profile

Dependency Diagram

graph LR
  1211314c_19e0_57f7_1c59_3da6f60ea8e6["seed.ts"]
  20fa38bb_7609_aa33_b515_1aabe2c22292["theme.ts"]
  1211314c_19e0_57f7_1c59_3da6f60ea8e6 --> 20fa38bb_7609_aa33_b515_1aabe2c22292
  f92f4288_d2a3_264d_4379_34b9b9c2c7f4["astro:db"]
  1211314c_19e0_57f7_1c59_3da6f60ea8e6 --> f92f4288_d2a3_264d_4379_34b9b9c2c7f4
  7ee49e75_9304_6a82_afdf_4193e04c2e40["utils"]
  1211314c_19e0_57f7_1c59_3da6f60ea8e6 --> 7ee49e75_9304_6a82_afdf_4193e04c2e40
  style 1211314c_19e0_57f7_1c59_3da6f60ea8e6 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

import { Author, Session, User, db } from 'astro:db';
import { asDrizzleTable } from '@astrojs/db/utils';
import { Themes as ThemesConfig } from './theme';

const Themes = asDrizzleTable('Themes', ThemesConfig);
export default async function () {
	await db.batch([
		db
			.insert(Themes)
			.values([{ name: 'dracula' }, { name: 'monokai', added: new Date() }])
			.returning({ name: Themes.name }),
		db
			.insert(Author)
			.values([
				{ name: 'Ben' },
				{ name: 'Nate' },
				{ name: 'Erika' },
				{ name: 'Bjorn' },
				{ name: 'Sarah' },
			]),
		db.insert(User).values([{ id: 'mario', username: 'Mario', password: 'itsame' }]),
		db.insert(Session).values([{ id: '12345', expiresAt: new Date().valueOf(), userId: 'mario' }]),
	]);
}

Domain

Dependencies

Frequently Asked Questions

What does seed.ts do?
seed.ts is a source file in the astro codebase, written in typescript. It belongs to the CoreAstro domain.
What does seed.ts depend on?
seed.ts imports 3 module(s): astro:db, theme.ts, utils.
Where is seed.ts in the architecture?
seed.ts is located at packages/db/test/fixtures/basics/db/seed.ts (domain: CoreAstro, directory: packages/db/test/fixtures/basics/db).

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free