base.ts — astro Source File
Architecture documentation for base.ts, a typescript file in the astro codebase. 18 imports, 0 dependents.
Entity Profile
Dependency Diagram
graph LR be39cf2a_62a6_9604_4324_ee218d601bab["base.ts"] 24e4dd71_66ed_5d44_647a_f7752091bd7c["../../assets/utils/index.js"] be39cf2a_62a6_9604_4324_ee218d601bab --> 24e4dd71_66ed_5d44_647a_f7752091bd7c fe669073_2e4e_f283_db9d_18a6d7df3f04["../i18n/index.js"] be39cf2a_62a6_9604_4324_ee218d601bab --> fe669073_2e4e_f283_db9d_18a6d7df3f04 e9b74c5a_8d34_34a7_e196_5e41b87214aa["../types/astro.js"] be39cf2a_62a6_9604_4324_ee218d601bab --> e9b74c5a_8d34_34a7_e196_5e41b87214aa baa53824_73a3_1e03_2043_4d0c058ecca5["../types/public/index.js"] be39cf2a_62a6_9604_4324_ee218d601bab --> baa53824_73a3_1e03_2043_4d0c058ecca5 be18ffb8_46cb_5266_8b78_659c01f80146["../core/base-pipeline.js"] be39cf2a_62a6_9604_4324_ee218d601bab --> be18ffb8_46cb_5266_8b78_659c01f80146 7216d952_4e4a_2d18_a85b_74b4ace79e2b["../core/constants.js"] be39cf2a_62a6_9604_4324_ee218d601bab --> 7216d952_4e4a_2d18_a85b_74b4ace79e2b 34cf60ae_d0fa_22a9_892d_8834050ac3c1["../core/cookies/index.js"] be39cf2a_62a6_9604_4324_ee218d601bab --> 34cf60ae_d0fa_22a9_892d_8834050ac3c1 ef8a1e3f_e350_75a6_b92d_62a8566d8db9["../core/errors/index.js"] be39cf2a_62a6_9604_4324_ee218d601bab --> ef8a1e3f_e350_75a6_b92d_62a8566d8db9 896475af_5dfe_db10_1711_d4787c6dd1a5["../logger/console.js"] be39cf2a_62a6_9604_4324_ee218d601bab --> 896475af_5dfe_db10_1711_d4787c6dd1a5 d3861967_b647_84d2_ff48_15013353bd56["../core/logger/core.js"] be39cf2a_62a6_9604_4324_ee218d601bab --> d3861967_b647_84d2_ff48_15013353bd56 7e14fb1f_4abe_1438_9c6e_bb382e90b0fe["../core/render-context.js"] be39cf2a_62a6_9604_4324_ee218d601bab --> 7e14fb1f_4abe_1438_9c6e_bb382e90b0fe c76397e6_4b28_33b8_0963_02213119b998["../core/routing/3xx.js"] be39cf2a_62a6_9604_4324_ee218d601bab --> c76397e6_4b28_33b8_0963_02213119b998 9448bae7_8c9f_817b_4d45_a0ad40f771b0["../core/routing/astro-designed-error-pages.js"] be39cf2a_62a6_9604_4324_ee218d601bab --> 9448bae7_8c9f_817b_4d45_a0ad40f771b0 a3d56727_13c4_68fd_1bf6_c0b09d68466f["../core/routing/match.js"] be39cf2a_62a6_9604_4324_ee218d601bab --> a3d56727_13c4_68fd_1bf6_c0b09d68466f style be39cf2a_62a6_9604_4324_ee218d601bab fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
import {
appendForwardSlash,
collapseDuplicateTrailingSlashes,
hasFileExtension,
isInternalPath,
joinPaths,
prependForwardSlash,
removeTrailingForwardSlash,
} from '@astrojs/internal-helpers/path';
import { matchPattern } from '../../assets/utils/index.js';
import { normalizeTheLocale } from '../../i18n/index.js';
import type { RoutesList } from '../../types/astro.js';
import type { RemotePattern, RouteData } from '../../types/public/index.js';
import type { Pipeline } from '../base-pipeline.js';
import {
clientAddressSymbol,
DEFAULT_404_COMPONENT,
REROUTABLE_STATUS_CODES,
REROUTE_DIRECTIVE_HEADER,
responseSentSymbol,
} from '../constants.js';
import { getSetCookiesFromResponse } from '../cookies/index.js';
import { AstroError, AstroErrorData } from '../errors/index.js';
import { consoleLogDestination } from '../logger/console.js';
import { AstroIntegrationLogger, Logger } from '../logger/core.js';
import { type CreateRenderContext, RenderContext } from '../render-context.js';
import { redirectTemplate } from '../routing/3xx.js';
import { ensure404Route } from '../routing/astro-designed-error-pages.js';
import { matchRoute } from '../routing/match.js';
import { type AstroSession, PERSIST_SYMBOL } from '../session/runtime.js';
import type { AppPipeline } from './pipeline.js';
import type { SSRManifest } from './types.js';
export interface DevMatch {
routeData: RouteData;
resolvedPathname: string;
}
export interface RenderOptions {
/**
* Whether to automatically add all cookies written by `Astro.cookie.set()` to the response headers.
*
* When set to `true`, they will be added to the `Set-Cookie` header as comma-separated key=value pairs. You can use the standard `response.headers.getSetCookie()` API to read them individually.
*
* When set to `false`, the cookies will only be available from `App.getSetCookieFromResponse(response)`.
*
* @default {false}
*/
addCookieHeader?: boolean;
/**
* The client IP address that will be made available as `Astro.clientAddress` in pages, and as `ctx.clientAddress` in API routes and middleware.
*
* Default: `request[Symbol.for("astro.clientAddress")]`
*/
clientAddress?: string;
/**
* The mutable object that will be made available as `Astro.locals` in pages, and as `ctx.locals` in API routes and middleware.
*/
// ... (616 more lines)
Domain
Subdomains
Functions
Dependencies
- ../../assets/utils/index.js
- ../../core/session/runtime.js
- ../core/app/types.js
- ../core/base-pipeline.js
- ../core/constants.js
- ../core/cookies/index.js
- ../core/errors/index.js
- ../core/logger/core.js
- ../core/render-context.js
- ../core/routing/3xx.js
- ../core/routing/astro-designed-error-pages.js
- ../core/routing/match.js
- ../i18n/index.js
- ../logger/console.js
- ../types/astro.js
- ../types/public/index.js
- ./pipeline.js
- path
Source
Frequently Asked Questions
What does base.ts do?
base.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 base.ts?
base.ts defines 1 function(s): url.
What does base.ts depend on?
base.ts imports 18 module(s): ../../assets/utils/index.js, ../../core/session/runtime.js, ../core/app/types.js, ../core/base-pipeline.js, ../core/constants.js, ../core/cookies/index.js, ../core/errors/index.js, ../core/logger/core.js, and 10 more.
Where is base.ts in the architecture?
base.ts is located at packages/astro/src/core/app/base.ts (domain: CoreAstro, subdomain: RenderingEngine, directory: packages/astro/src/core/app).
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free