db() — astro Function Reference
Architecture documentation for the db() function in index.ts from the astro codebase.
Entity Profile
Dependency Diagram
graph TD 8e50c34e_aee2_99a2_ab82_8f53d80afe9d["db()"] 8f8c7696_344b_5a20_81e7_8be51218f690["index.ts"] 8e50c34e_aee2_99a2_ab82_8f53d80afe9d -->|defined in| 8f8c7696_344b_5a20_81e7_8be51218f690 style 8e50c34e_aee2_99a2_ab82_8f53d80afe9d fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
packages/astro/src/cli/db/index.ts lines 11–32
export async function db({ flags }: { flags: Arguments }) {
const logger = createLoggerFromFlags(flags);
const getPackageOpts = {
skipAsk: !!flags.yes || !!flags.y,
cwd: flags.root,
};
const dbPackage = await getPackage<DBPackage>('@astrojs/db', logger, getPackageOpts, []);
if (!dbPackage) {
logger.error(
'check',
'The `@astrojs/db` package is required for this command to work. Please manually install it in your project and try again.',
);
return;
}
const { cli } = dbPackage;
const inlineConfig = flagsToAstroInlineConfig(flags);
const { astroConfig } = await resolveConfig(inlineConfig, 'build');
await cli({ flags, config: astroConfig });
}
Domain
Subdomains
Defined In
Source
Frequently Asked Questions
What does db() do?
db() is a function in the astro codebase, defined in packages/astro/src/cli/db/index.ts.
Where is db() defined?
db() is defined in packages/astro/src/cli/db/index.ts at line 11.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free