types-generator.ts — astro Source File
Architecture documentation for types-generator.ts, a typescript file in the astro codebase. 16 imports, 0 dependents.
Entity Profile
Dependency Diagram
graph LR eca81928_a18b_c02e_8e5a_0440befa1a98["types-generator.ts"] dd6187d6_53c4_ce90_a1d1_3a0b5e7e7d3f["../../core/errors/errors.js"] eca81928_a18b_c02e_8e5a_0440befa1a98 --> dd6187d6_53c4_ce90_a1d1_3a0b5e7e7d3f ef8a1e3f_e350_75a6_b92d_62a8566d8db9["../core/errors/index.js"] eca81928_a18b_c02e_8e5a_0440befa1a98 --> ef8a1e3f_e350_75a6_b92d_62a8566d8db9 d3861967_b647_84d2_ff48_15013353bd56["../core/logger/core.js"] eca81928_a18b_c02e_8e5a_0440befa1a98 --> d3861967_b647_84d2_ff48_15013353bd56 7e4494c0_5563_4329_1bff_a84be66e1bc2["../core/path.js"] eca81928_a18b_c02e_8e5a_0440befa1a98 --> 7e4494c0_5563_4329_1bff_a84be66e1bc2 e9b74c5a_8d34_34a7_e196_5e41b87214aa["../types/astro.js"] eca81928_a18b_c02e_8e5a_0440befa1a98 --> e9b74c5a_8d34_34a7_e196_5e41b87214aa 7f07e12d_4af0_1918_f31b_31410b415993["../types/public/content.js"] eca81928_a18b_c02e_8e5a_0440befa1a98 --> 7f07e12d_4af0_1918_f31b_31410b415993 4c453c0b_17bb_ebc3_f7de_e2a632e42c1e["../types/public/integrations.js"] eca81928_a18b_c02e_8e5a_0440befa1a98 --> 4c453c0b_17bb_ebc3_f7de_e2a632e42c1e eb7ca709_080c_a438_b9d7_f1238835779d["../content/consts.js"] eca81928_a18b_c02e_8e5a_0440befa1a98 --> eb7ca709_080c_a438_b9d7_f1238835779d 520c567a_b741_f105_70ac_c637eacc7f83["../content/utils.js"] eca81928_a18b_c02e_8e5a_0440befa1a98 --> 520c567a_b741_f105_70ac_c637eacc7f83 7216d952_4e4a_2d18_a85b_74b4ace79e2b["../core/constants.js"] eca81928_a18b_c02e_8e5a_0440befa1a98 --> 7216d952_4e4a_2d18_a85b_74b4ace79e2b e16a223b_37f3_6b25_1ee1_2b7bcb9d9415["node:fs"] eca81928_a18b_c02e_8e5a_0440befa1a98 --> e16a223b_37f3_6b25_1ee1_2b7bcb9d9415 c52a5f83_66e3_37d7_9ebb_767f7129bc62["node:path"] eca81928_a18b_c02e_8e5a_0440befa1a98 --> c52a5f83_66e3_37d7_9ebb_767f7129bc62 d9a92db9_c95e_9165_13ac_24b3d859d946["node:url"] eca81928_a18b_c02e_8e5a_0440befa1a98 --> d9a92db9_c95e_9165_13ac_24b3d859d946 10250468_0e83_bd69_43e9_3bcef2294a91["piccolore"] eca81928_a18b_c02e_8e5a_0440befa1a98 --> 10250468_0e83_bd69_43e9_3bcef2294a91 style eca81928_a18b_c02e_8e5a_0440befa1a98 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
import type fsMod from 'node:fs';
import * as path from 'node:path';
import { fileURLToPath, pathToFileURL } from 'node:url';
import colors from 'piccolore';
import {
type DevEnvironment,
isRunnableDevEnvironment,
normalizePath,
type RunnableDevEnvironment,
type ViteDevServer,
} from 'vite';
import * as z from 'zod/v4';
import { AstroError } from '../core/errors/errors.js';
import { AstroErrorData } from '../core/errors/index.js';
import type { Logger } from '../core/logger/core.js';
import { isRelativePath } from '../core/path.js';
import type { AstroSettings } from '../types/astro.js';
import type { ContentEntryType } from '../types/public/content.js';
import type { InjectedType } from '../types/public/integrations.js';
import {
COLLECTIONS_DIR,
CONTENT_LAYER_TYPE,
CONTENT_TYPES_FILE,
type LIVE_CONTENT_TYPE,
VIRTUAL_MODULE_ID,
} from './consts.js';
import {
type CollectionConfig,
type ContentConfig,
type ContentObservable,
type ContentPaths,
getContentEntryIdAndSlug,
getContentPaths,
getDataEntryExts,
getDataEntryId,
getEntryCollectionName,
getEntryConfigByExtMap,
getEntrySlug,
getEntryType,
reloadContentConfigObserver,
} from './utils.js';
import { ASTRO_VITE_ENVIRONMENT_NAMES } from '../core/constants.js';
type ChokidarEvent = 'add' | 'addDir' | 'change' | 'unlink' | 'unlinkDir';
type RawContentEvent = { name: ChokidarEvent; entry: string };
type ContentEvent = { name: ChokidarEvent; entry: URL };
type DataEntryMetadata = Record<string, never>;
type ContentEntryMetadata = { slug: string };
type CollectionEntryMap = {
[collection: string]:
| {
type: 'unknown';
entries: Record<string, never>;
}
| {
type: 'content';
entries: Record<string, ContentEntryMetadata>;
}
| {
// ... (606 more lines)
Domain
Subdomains
Functions
Types
Dependencies
- ../../core/errors/errors.js
- ../content/consts.js
- ../content/utils.js
- ../core/constants.js
- ../core/errors/index.js
- ../core/logger/core.js
- ../core/path.js
- ../types/astro.js
- ../types/public/content.js
- ../types/public/integrations.js
- node:fs
- node:path
- node:url
- piccolore
- v4
- vite
Source
Frequently Asked Questions
What does types-generator.ts do?
types-generator.ts is a source file in the astro codebase, written in typescript. It belongs to the ContentCollections domain, DataLoaders subdomain.
What functions are defined in types-generator.ts?
types-generator.ts defines 8 function(s): createContentTypesGenerator, generateJSONSchema, getContentLayerSchema, getCreateSchemaResult, invalidateVirtualMod, normalizeConfigPath, typeForCollection, writeContentFiles.
What does types-generator.ts depend on?
types-generator.ts imports 16 module(s): ../../core/errors/errors.js, ../content/consts.js, ../content/utils.js, ../core/constants.js, ../core/errors/index.js, ../core/logger/core.js, ../core/path.js, ../types/astro.js, and 8 more.
Where is types-generator.ts in the architecture?
types-generator.ts is located at packages/astro/src/content/types-generator.ts (domain: ContentCollections, subdomain: DataLoaders, directory: packages/astro/src/content).
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free