Home / File/ consts.ts — astro Source File

consts.ts — astro Source File

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

File typescript 1 imports

Entity Profile

Dependency Diagram

graph LR
  bed6a125_6891_5cd9_c841_b111b31b60f1["consts.ts"]
  ac8a42f6_5aa5_8f99_4bd8_1bb5c48f6021["node:fs"]
  bed6a125_6891_5cd9_c841_b111b31b60f1 --> ac8a42f6_5aa5_8f99_4bd8_1bb5c48f6021
  style bed6a125_6891_5cd9_c841_b111b31b60f1 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

import { readFileSync } from 'node:fs';

const PACKAGE_NAME = JSON.parse(
	readFileSync(new URL('../../package.json', import.meta.url), 'utf8'),
).name;

export const RUNTIME_IMPORT = JSON.stringify(`${PACKAGE_NAME}/runtime`);

export const RUNTIME_VIRTUAL_IMPORT = JSON.stringify(`${PACKAGE_NAME}/dist/runtime/virtual.js`);

export const VIRTUAL_MODULE_ID = 'astro:db';

export const DB_PATH = '.astro/content.db';

export const CONFIG_FILE_NAMES = ['config.ts', 'config.js', 'config.mts', 'config.mjs'];

export const MIGRATION_VERSION = '2024-03-12';

export const VIRTUAL_CLIENT_MODULE_ID = 'virtual:astro:db-client';

export const DB_CLIENTS = {
	node: `${PACKAGE_NAME}/db-client/libsql-node.js`,
	web: `${PACKAGE_NAME}/db-client/libsql-web.js`,
	local: `${PACKAGE_NAME}/db-client/libsql-local.js`,
};

Dependencies

  • node:fs

Frequently Asked Questions

What does consts.ts do?
consts.ts is a source file in the astro codebase, written in typescript.
What does consts.ts depend on?
consts.ts imports 1 module(s): node:fs.
Where is consts.ts in the architecture?
consts.ts is located at packages/db/src/core/consts.ts (directory: packages/db/src/core).

Analyze Your Own Codebase

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

Try Supermodel Free