runtime.ts — astro Source File
Architecture documentation for runtime.ts, a typescript file in the astro codebase. 16 imports, 0 dependents.
Entity Profile
Dependency Diagram
graph LR 73d13646_8e80_972f_3adc_f28448b64e4d["runtime.ts"] 416eda3d_47e6_c298_102b_b7a37d86a44e["../../assets/types.js"] 73d13646_8e80_972f_3adc_f28448b64e4d --> 416eda3d_47e6_c298_102b_b7a37d86a44e 0f5629f4_a1af_981a_9bd0_9293cd98e8a8["../assets/utils/resolveImports.js"] 73d13646_8e80_972f_3adc_f28448b64e4d --> 0f5629f4_a1af_981a_9bd0_9293cd98e8a8 ef8a1e3f_e350_75a6_b92d_62a8566d8db9["../core/errors/index.js"] 73d13646_8e80_972f_3adc_f28448b64e4d --> ef8a1e3f_e350_75a6_b92d_62a8566d8db9 7e4494c0_5563_4329_1bff_a84be66e1bc2["../core/path.js"] 73d13646_8e80_972f_3adc_f28448b64e4d --> 7e4494c0_5563_4329_1bff_a84be66e1bc2 9e624f62_bcfa_4352_e9a0_dd454823f706["../../runtime/server/index.js"] 73d13646_8e80_972f_3adc_f28448b64e4d --> 9e624f62_bcfa_4352_e9a0_dd454823f706 7f07e12d_4af0_1918_f31b_31410b415993["../types/public/content.js"] 73d13646_8e80_972f_3adc_f28448b64e4d --> 7f07e12d_4af0_1918_f31b_31410b415993 b5ea8526_64b0_acc5_131c_72693dea2885["./config.js"] 73d13646_8e80_972f_3adc_f28448b64e4d --> b5ea8526_64b0_acc5_131c_72693dea2885 eb7ca709_080c_a438_b9d7_f1238835779d["../content/consts.js"] 73d13646_8e80_972f_3adc_f28448b64e4d --> eb7ca709_080c_a438_b9d7_f1238835779d b1ad5044_5dee_93fa_9942_3365c09d93c8["../../content/data-store.js"] 73d13646_8e80_972f_3adc_f28448b64e4d --> b1ad5044_5dee_93fa_9942_3365c09d93c8 2c4472b4_85ad_f581_f6ca_e0da7470e997["../../content/loaders/errors.js"] 73d13646_8e80_972f_3adc_f28448b64e4d --> 2c4472b4_85ad_f581_f6ca_e0da7470e997 a7935420_ff38_d53d_2988_e0293e03591e["./loaders/types.js"] 73d13646_8e80_972f_3adc_f28448b64e4d --> a7935420_ff38_d53d_2988_e0293e03591e 82f345a2_2234_43f1_c3c4_eea191acdca8["markdown-remark"] 73d13646_8e80_972f_3adc_f28448b64e4d --> 82f345a2_2234_43f1_c3c4_eea191acdca8 fc634da7_3e72_de83_7395_a46311dd837e["html-escaper"] 73d13646_8e80_972f_3adc_f28448b64e4d --> fc634da7_3e72_de83_7395_a46311dd837e 36dc1762_e449_3f26_c49f_a74b1d1be613["modern"] 73d13646_8e80_972f_3adc_f28448b64e4d --> 36dc1762_e449_3f26_c49f_a74b1d1be613 style 73d13646_8e80_972f_3adc_f28448b64e4d fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
import type { MarkdownHeading } from '@astrojs/markdown-remark';
import { escape } from 'html-escaper';
import { Traverse } from 'neotraverse/modern';
import * as z from 'zod/v4';
import type * as zCore from 'zod/v4/core';
import type { GetImageResult, ImageMetadata } from '../assets/types.js';
import { imageSrcToImportId } from '../assets/utils/resolveImports.js';
import { AstroError, AstroErrorData } from '../core/errors/index.js';
import { isRemotePath, prependForwardSlash } from '../core/path.js';
import {
type AstroComponentFactory,
createComponent,
createHeadAndContent,
renderComponent,
renderScriptElement,
renderTemplate,
renderUniqueStylesheet,
render as serverRender,
unescapeHTML,
} from '../runtime/server/index.js';
import type {
CacheHint,
LiveDataCollectionResult,
LiveDataEntry,
LiveDataEntryResult,
} from '../types/public/content.js';
import { defineCollection as defineCollectionOrig } from './config.js';
import { IMAGE_IMPORT_PREFIX, type LIVE_CONTENT_TYPE } from './consts.js';
import { type DataEntry, globalDataStore } from './data-store.js';
import {
LiveCollectionCacheHintError,
LiveCollectionError,
LiveCollectionValidationError,
LiveEntryNotFoundError,
} from './loaders/errors.js';
import type { LiveLoader } from './loaders/types.js';
export {
LiveCollectionError,
LiveCollectionCacheHintError,
LiveEntryNotFoundError,
LiveCollectionValidationError,
};
type LazyImport = () => Promise<any>;
type LiveCollectionConfigMap = Record<
string,
{ loader: LiveLoader; type: typeof LIVE_CONTENT_TYPE; schema?: zCore.$ZodType }
>;
const cacheHintSchema = z.object({
tags: z.array(z.string()).optional(),
lastModified: z.date().optional(),
});
async function parseLiveEntry(
entry: LiveDataEntry,
schema: zCore.$ZodType,
collection: string,
): Promise<{ entry?: LiveDataEntry; error?: LiveCollectionError }> {
try {
const parsed = await z.safeParseAsync(schema, entry.data);
// ... (683 more lines)
Domain
Subdomains
Functions
- Promise()
- createDeprecatedFunction()
- createGetCollection()
- createGetEntries()
- createGetEntry()
- createGetLiveCollection()
- createGetLiveEntry()
- createReference()
- defineCollection()
- defineLiveCollection()
- isPropagatedAssetsModule()
- parseLiveEntry()
- render()
- renderEntry()
- updateImageReferencesInBody()
- updateImageReferencesInData()
- warnForPropertyAccess()
Types
Dependencies
- ../../assets/types.js
- ../../content/data-store.js
- ../../content/loaders/errors.js
- ../../runtime/server/index.js
- ../assets/utils/resolveImports.js
- ../content/consts.js
- ../core/errors/index.js
- ../core/path.js
- ../types/public/content.js
- ./config.js
- ./loaders/types.js
- core
- html-escaper
- markdown-remark
- modern
- v4
Source
Frequently Asked Questions
What does runtime.ts do?
runtime.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 runtime.ts?
runtime.ts defines 17 function(s): Promise, createDeprecatedFunction, createGetCollection, createGetEntries, createGetEntry, createGetLiveCollection, createGetLiveEntry, createReference, defineCollection, defineLiveCollection, and 7 more.
What does runtime.ts depend on?
runtime.ts imports 16 module(s): ../../assets/types.js, ../../content/data-store.js, ../../content/loaders/errors.js, ../../runtime/server/index.js, ../assets/utils/resolveImports.js, ../content/consts.js, ../core/errors/index.js, ../core/path.js, and 8 more.
Where is runtime.ts in the architecture?
runtime.ts is located at packages/astro/src/content/runtime.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