stratal-seeders
@stratal/seeders
CLI tool and infrastructure for database seeding in Stratal applications. Seeders run within request-scoped DI containers with full access to injected services. Full documentation at stratal.dev/testing/seeders.
Writing a Seeder
import { Seeder } from '@stratal/seeders';
import { inject, Transient, DI_TOKENS } from 'stratal/di';
import type { DatabaseService } from '@stratal/framework/database';
@Transient()
export class UserSeeder extends Seeder {
constructor(@inject(DI_TOKENS.Database) private db: DatabaseService) {
super();
}
More from strataljs/stratal
stratal
Build Cloudflare Workers applications with the Stratal framework. Use when code imports from 'stratal' or '@stratal/*', when creating modules, controllers, services, routes, queue consumers, cron jobs, or CLI commands, or when user mentions Stratal, asks to 'create a module', 'add an endpoint', 'set up auth', 'configure database', 'add error handling', 'set up Inertia', or 'run quarry'. Covers DI, routing with OpenAPI, error handling, i18n, testing, auth, RBAC, Inertia.js SSR, and MCP server. Do NOT use for generic Hono apps, plain Cloudflare Workers, or NestJS.
20stratal-framework
>-
7stratal-testing
>-
6stratal-incremental-adoption
>-
6stratal-zenstack-plugin
>-
1