Home / Function/ getAll() — astro Function Reference

getAll() — astro Function Reference

Architecture documentation for the getAll() function in static-paths.ts from the astro codebase.

Entity Profile

Dependency Diagram

graph TD
  b66efb8f_3330_f7b0_10b6_3b7accce9458["getAll()"]
  1f9f0fec_a5b7_bce2_94b1_37c4f8b91ea2["StaticPaths"]
  b66efb8f_3330_f7b0_10b6_3b7accce9458 -->|defined in| 1f9f0fec_a5b7_bce2_94b1_37c4f8b91ea2
  f2ec0f49_ebee_541a_094a_1ecabd849206["route()"]
  b66efb8f_3330_f7b0_10b6_3b7accce9458 -->|calls| f2ec0f49_ebee_541a_094a_1ecabd849206
  f9b142d4_24cd_95b2_c85c_7791c215b053["eachRouteInRouteData()"]
  b66efb8f_3330_f7b0_10b6_3b7accce9458 -->|calls| f9b142d4_24cd_95b2_c85c_7791c215b053
  style b66efb8f_3330_f7b0_10b6_3b7accce9458 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

packages/astro/src/runtime/prerender/static-paths.ts lines 35–71

	async getAll(): Promise<PathWithRoute[]> {
		const allPaths: PathWithRoute[] = [];
		const manifest = this.#app.manifest;

		// Collect routes to generate (mirrors retrieveRoutesToGenerate)
		const routesToGenerate: RouteData[] = [];
		for (const { routeData } of manifest.routes) {
			// Skip non-prerendered routes
			if (!routeData.prerender) continue;

			// Include redirects
			if (routeIsRedirect(routeData)) {
				routesToGenerate.push(routeData);
				continue;
			}

			// Include fallbacks if i18n has fallback configured
			if (routeIsFallback(routeData) && manifest.i18n?.fallback) {
				routesToGenerate.push(routeData);
				continue;
			}

			// Regular page
			routesToGenerate.push(routeData);
		}

		// Get paths for each route (mirrors getPathsForRoute)
		for (const route of routesToGenerate) {
			// Also process fallback routes
			for (const currentRoute of eachRouteInRouteData(route)) {
				const paths = await this.#getPathsForRoute(currentRoute);
				allPaths.push(...paths);
			}
		}

		return allPaths;
	}

Domain

Subdomains

Frequently Asked Questions

What does getAll() do?
getAll() is a function in the astro codebase, defined in packages/astro/src/runtime/prerender/static-paths.ts.
Where is getAll() defined?
getAll() is defined in packages/astro/src/runtime/prerender/static-paths.ts at line 35.
What does getAll() call?
getAll() calls 2 function(s): eachRouteInRouteData, route.

Analyze Your Own Codebase

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

Try Supermodel Free