pipeline.ts — astro Source File
Architecture documentation for pipeline.ts, a typescript file in the astro codebase. 10 imports, 0 dependents.
Entity Profile
Dependency Diagram
graph LR e50c199a_9839_92f2_0355_245e4866ca1d["pipeline.ts"] e9b74c5a_8d34_34a7_e196_5e41b87214aa["../types/astro.js"] e50c199a_9839_92f2_0355_245e4866ca1d --> e9b74c5a_8d34_34a7_e196_5e41b87214aa 135a8084_d596_67c2_9209_cca6693604e6["../types/public/common.js"] e50c199a_9839_92f2_0355_245e4866ca1d --> 135a8084_d596_67c2_9209_cca6693604e6 10d4e39f_edb6_3e34_aa93_ae1211e7da05["../types/public/internal.js"] e50c199a_9839_92f2_0355_245e4866ca1d --> 10d4e39f_edb6_3e34_aa93_ae1211e7da05 be18ffb8_46cb_5266_8b78_659c01f80146["../core/base-pipeline.js"] e50c199a_9839_92f2_0355_245e4866ca1d --> be18ffb8_46cb_5266_8b78_659c01f80146 e099eff3_3f90_76ac_3751_a9ff5a6b8f25["../../core/build/types.js"] e50c199a_9839_92f2_0355_245e4866ca1d --> e099eff3_3f90_76ac_3751_a9ff5a6b8f25 45341dc4_99b6_1351_f590_fc377cd58298["../core/redirects/index.js"] e50c199a_9839_92f2_0355_245e4866ca1d --> 45341dc4_99b6_1351_f590_fc377cd58298 deed754c_ed97_a6b7_2f50_988eb1d9ea7e["../render/ssr-element.js"] e50c199a_9839_92f2_0355_245e4866ca1d --> deed754c_ed97_a6b7_2f50_988eb1d9ea7e b3e8a9be_d20e_da21_abaa_3cb61c3f5a15["../core/routing/helpers.js"] e50c199a_9839_92f2_0355_245e4866ca1d --> b3e8a9be_d20e_da21_abaa_3cb61c3f5a15 99bef061_4ac1_91d4_947d_810691aafb80["../core/routing/rewrite.js"] e50c199a_9839_92f2_0355_245e4866ca1d --> 99bef061_4ac1_91d4_947d_810691aafb80 fa2fbd43_7629_5b9d_8813_6306c2da1dab["./logging.js"] e50c199a_9839_92f2_0355_245e4866ca1d --> fa2fbd43_7629_5b9d_8813_6306c2da1dab style e50c199a_9839_92f2_0355_245e4866ca1d fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
import type { ComponentInstance } from '../../types/astro.js';
import type { RewritePayload } from '../../types/public/common.js';
import type { RouteData, SSRElement } from '../../types/public/internal.js';
import { type HeadElements, Pipeline, type TryRewriteResult } from '../base-pipeline.js';
import type { SinglePageBuiltModule } from '../build/types.js';
import { RedirectSinglePageBuiltModule } from '../redirects/index.js';
import {
createAssetLink,
createModuleScriptElement,
createStylesheetElementSet,
} from '../render/ssr-element.js';
import { getFallbackRoute, routeIsFallback, routeIsRedirect } from '../routing/helpers.js';
import { findRouteToRewrite } from '../routing/rewrite.js';
import { createConsoleLogger } from './logging.js';
export class AppPipeline extends Pipeline {
getName(): string {
return 'AppPipeline';
}
static create({ manifest, streaming }: Pick<AppPipeline, 'manifest' | 'streaming'>) {
const resolve = async function resolve(specifier: string) {
if (!(specifier in manifest.entryModules)) {
throw new Error(`Unable to resolve [${specifier}]`);
}
const bundlePath = manifest.entryModules[specifier];
if (bundlePath.startsWith('data:') || bundlePath.length === 0) {
return bundlePath;
} else {
return createAssetLink(bundlePath, manifest.base, manifest.assetsPrefix);
}
};
const logger = createConsoleLogger(manifest.logLevel);
const pipeline = new AppPipeline(
logger,
manifest,
'production',
manifest.renderers,
resolve,
streaming,
undefined,
undefined,
undefined,
undefined,
undefined,
undefined,
undefined,
undefined,
);
return pipeline;
}
async headElements(routeData: RouteData): Promise<HeadElements> {
const { assetsPrefix, base } = this.manifest;
const routeInfo = this.manifest.routes.find(
(route) => route.routeData.route === routeData.route,
);
// may be used in the future for handling rel=modulepreload, rel=icon, rel=manifest etc.
const links = new Set<never>();
const scripts = new Set<SSRElement>();
// ... (78 more lines)
Domain
Subdomains
Classes
Dependencies
- ../../core/build/types.js
- ../core/base-pipeline.js
- ../core/redirects/index.js
- ../core/routing/helpers.js
- ../core/routing/rewrite.js
- ../render/ssr-element.js
- ../types/astro.js
- ../types/public/common.js
- ../types/public/internal.js
- ./logging.js
Source
Frequently Asked Questions
What does pipeline.ts do?
pipeline.ts is a source file in the astro codebase, written in typescript. It belongs to the CoreAstro domain, CoreMiddleware subdomain.
What does pipeline.ts depend on?
pipeline.ts imports 10 module(s): ../../core/build/types.js, ../core/base-pipeline.js, ../core/redirects/index.js, ../core/routing/helpers.js, ../core/routing/rewrite.js, ../render/ssr-element.js, ../types/astro.js, ../types/public/common.js, and 2 more.
Where is pipeline.ts in the architecture?
pipeline.ts is located at packages/astro/src/core/app/pipeline.ts (domain: CoreAstro, subdomain: CoreMiddleware, 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