index.ts — astro Source File
Architecture documentation for index.ts, a typescript file in the astro codebase. 5 imports, 0 dependents.
Entity Profile
Dependency Diagram
graph LR 8f8c7696_344b_5a20_81e7_8be51218f690["index.ts"] 0b371444_fc7b_922f_b8b5_b663fe1868ae["../config/config.js"] 8f8c7696_344b_5a20_81e7_8be51218f690 --> 0b371444_fc7b_922f_b8b5_b663fe1868ae c32d12e2_d85e_28c0_eea7_9b29629857e0["../types/public/config.js"] 8f8c7696_344b_5a20_81e7_8be51218f690 --> c32d12e2_d85e_28c0_eea7_9b29629857e0 9323e55c_9236_cd3d_d0b3_e20df52a4e84["../flags.js"] 8f8c7696_344b_5a20_81e7_8be51218f690 --> 9323e55c_9236_cd3d_d0b3_e20df52a4e84 5f310fba_45ef_87f3_baa6_5e93f993468e["../../cli/install-package.js"] 8f8c7696_344b_5a20_81e7_8be51218f690 --> 5f310fba_45ef_87f3_baa6_5e93f993468e efd0f150_4239_ba62_fbb9_bcf24bd27236["yargs-parser"] 8f8c7696_344b_5a20_81e7_8be51218f690 --> efd0f150_4239_ba62_fbb9_bcf24bd27236 style 8f8c7696_344b_5a20_81e7_8be51218f690 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
import type { Arguments } from 'yargs-parser';
import { resolveConfig } from '../../core/config/config.js';
import type { AstroConfig } from '../../types/public/config.js';
import { createLoggerFromFlags, flagsToAstroInlineConfig } from '../flags.js';
import { getPackage } from '../install-package.js';
type DBPackage = {
cli: (args: { flags: Arguments; config: AstroConfig }) => unknown;
};
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
Types
Dependencies
- ../../cli/install-package.js
- ../config/config.js
- ../flags.js
- ../types/public/config.js
- yargs-parser
Source
Frequently Asked Questions
What does index.ts do?
index.ts is a source file in the astro codebase, written in typescript. It belongs to the CoreAstro domain, RenderingEngine subdomain.
What functions are defined in index.ts?
index.ts defines 2 function(s): args, db.
What does index.ts depend on?
index.ts imports 5 module(s): ../../cli/install-package.js, ../config/config.js, ../flags.js, ../types/public/config.js, yargs-parser.
Where is index.ts in the architecture?
index.ts is located at packages/astro/src/cli/db/index.ts (domain: CoreAstro, subdomain: RenderingEngine, directory: packages/astro/src/cli/db).
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free