Home / File/ internal.ts — astro Source File

internal.ts — astro Source File

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

File typescript CoreAstro RenderingEngine 8 imports 2 functions

Entity Profile

Dependency Diagram

graph LR
  5f8ae14a_9d99_50ef_07ac_b89e2336f3ca["internal.ts"]
  a4f2698c_5256_262a_ba7c_f72b51878d10["../core/app/types.js"]
  5f8ae14a_9d99_50ef_07ac_b89e2336f3ca --> a4f2698c_5256_262a_ba7c_f72b51878d10
  5799bf2d_d18e_6c2e_364a_a825ef7f6e79["../../core/cookies/cookies.js"]
  5f8ae14a_9d99_50ef_07ac_b89e2336f3ca --> 5799bf2d_d18e_6c2e_364a_a825ef7f6e79
  9e624f62_bcfa_4352_e9a0_dd454823f706["../../runtime/server/index.js"]
  5f8ae14a_9d99_50ef_07ac_b89e2336f3ca --> 9e624f62_bcfa_4352_e9a0_dd454823f706
  135a8084_d596_67c2_9209_cca6693604e6["../types/public/common.js"]
  5f8ae14a_9d99_50ef_07ac_b89e2336f3ca --> 135a8084_d596_67c2_9209_cca6693604e6
  c32d12e2_d85e_28c0_eea7_9b29629857e0["../types/public/config.js"]
  5f8ae14a_9d99_50ef_07ac_b89e2336f3ca --> c32d12e2_d85e_28c0_eea7_9b29629857e0
  28857b9f_4720_3f29_4abb_a7eec34dcca5["../types/public/context.js"]
  5f8ae14a_9d99_50ef_07ac_b89e2336f3ca --> 28857b9f_4720_3f29_4abb_a7eec34dcca5
  4c453c0b_17bb_ebc3_f7de_e2a632e42c1e["../types/public/integrations.js"]
  5f8ae14a_9d99_50ef_07ac_b89e2336f3ca --> 4c453c0b_17bb_ebc3_f7de_e2a632e42c1e
  263e522e_1aa5_ebc3_e7d6_45ebc51671f7["vite"]
  5f8ae14a_9d99_50ef_07ac_b89e2336f3ca --> 263e522e_1aa5_ebc3_e7d6_45ebc51671f7
  style 5f8ae14a_9d99_50ef_07ac_b89e2336f3ca fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

// TODO: Should the types here really be public?

import type { ErrorPayload as ViteErrorPayload } from 'vite';
import type { SSRManifestCSP } from '../../core/app/types.js';
import type { AstroCookies } from '../../core/cookies/cookies.js';
import type { AstroComponentInstance, ServerIslandComponent } from '../../runtime/server/index.js';
import type { Params } from './common.js';
import type { AstroConfig, RedirectConfig } from './config.js';
import type { AstroGlobal } from './context.js';
import type { AstroRenderer } from './integrations.js';

export type { SSRActions, SSRManifest, SSRManifestCSP } from '../../core/app/types.js';

export interface NamedSSRLoadedRendererValue extends SSRLoadedRendererValue {
	name: string;
}

export interface SSRLoadedRendererValue {
	name?: string;
	check: AsyncRendererComponentFn<boolean>;
	renderToStaticMarkup: AsyncRendererComponentFn<{
		html: string;
		attrs?: Record<string, string>;
	}>;
	supportsAstroStaticSlot?: boolean;
	/**
	 * If provided, Astro will call this function and inject the returned
	 * script in the HTML before the first component handled by this renderer.
	 *
	 * This feature is needed by some renderers (in particular, by Solid). The
	 * Solid official hydration script sets up a page-level data structure.
	 * It is mainly used to transfer data between the server side render phase
	 * and the browser application state. Solid Components rendered later in
	 * the HTML may inject tiny scripts into the HTML that call into this
	 * page-level data structure.
	 */
	renderHydrationScript?: () => string;
}

/**
 * It contains the information about a route
 */
export interface RouteData {
	/**
	 * The current **pattern** of the route. For example:
	 * - `src/pages/index.astro` has a pattern of `/`
	 * - `src/pages/blog/[...slug].astro` has a pattern of `/blog/[...slug]`
	 * - `src/pages/site/[blog]/[...slug].astro` has a pattern of `/site/[blog]/[...slug]`
	 */
	route: string;
	/**
	 *  Source component URL
	 */
	component: string;
	/**
	 * Dynamic and spread route params
	 * ex. "/pages/[lang]/[...slug].astro" will output the params ['lang', '...slug']
	 */
	params: string[];
	/**
// ... (263 more lines)

Domain

Subdomains

Functions

Dependencies

  • ../../core/cookies/cookies.js
  • ../../runtime/server/index.js
  • ../core/app/types.js
  • ../types/public/common.js
  • ../types/public/config.js
  • ../types/public/context.js
  • ../types/public/integrations.js
  • vite

Frequently Asked Questions

What does internal.ts do?
internal.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 internal.ts?
internal.ts defines 2 function(s): Component, s.
What does internal.ts depend on?
internal.ts imports 8 module(s): ../../core/cookies/cookies.js, ../../runtime/server/index.js, ../core/app/types.js, ../types/public/common.js, ../types/public/config.js, ../types/public/context.js, ../types/public/integrations.js, vite.
Where is internal.ts in the architecture?
internal.ts is located at packages/astro/src/types/public/internal.ts (domain: CoreAstro, subdomain: RenderingEngine, directory: packages/astro/src/types/public).

Analyze Your Own Codebase

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

Try Supermodel Free