Home / Function/ constructor() — astro Function Reference

constructor() — astro Function Reference

Architecture documentation for the constructor() function in index.ts from the astro codebase.

Entity Profile

Dependency Diagram

graph TD
  a13892fd_40a1_27db_b8a2_2fe254fa56ab["constructor()"]
  cb9f7e72_0a2c_f337_8c0f_3a16cbafeab3["experimental_AstroContainer"]
  a13892fd_40a1_27db_b8a2_2fe254fa56ab -->|defined in| cb9f7e72_0a2c_f337_8c0f_3a16cbafeab3
  247c0bac_3ec9_44e7_0ee7_5587c9701cc7["create()"]
  a13892fd_40a1_27db_b8a2_2fe254fa56ab -->|calls| 247c0bac_3ec9_44e7_0ee7_5587c9701cc7
  710e13c2_fac7_76ec_34a4_baf8f606379f["createManifest()"]
  a13892fd_40a1_27db_b8a2_2fe254fa56ab -->|calls| 710e13c2_fac7_76ec_34a4_baf8f606379f
  style a13892fd_40a1_27db_b8a2_2fe254fa56ab fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

packages/astro/src/container/index.ts lines 286–310

	private constructor({
		streaming = false,
		manifest,
		renderers,
		resolve,
		astroConfig,
	}: AstroContainerConstructor) {
		this.#pipeline = ContainerPipeline.create({
			logger: new Logger({
				level: 'info',
				dest: nodeLogDestination,
			}),
			manifest: createManifest(manifest, renderers),
			streaming,
			renderers: renderers ?? manifest?.renderers ?? [],
			resolve: async (specifier: string) => {
				if (this.#withManifest) {
					return this.#containerResolve(specifier, astroConfig);
				} else if (resolve) {
					return resolve(specifier);
				}
				return specifier;
			},
		});
	}

Domain

Subdomains

Frequently Asked Questions

What does constructor() do?
constructor() is a function in the astro codebase, defined in packages/astro/src/container/index.ts.
Where is constructor() defined?
constructor() is defined in packages/astro/src/container/index.ts at line 286.
What does constructor() call?
constructor() calls 2 function(s): create, createManifest.

Analyze Your Own Codebase

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

Try Supermodel Free