Home / Function/ getDefinedEntries() — astro Function Reference

getDefinedEntries() — astro Function Reference

Architecture documentation for the getDefinedEntries() function in build.js from the astro codebase.

Entity Profile

Dependency Diagram

graph TD
  364ea233_0325_d0c3_d524_7cd1b4b3767d["getDefinedEntries()"]
  35c0b351_a315_b75b_aa2a_7f7a823ba60f["build.js"]
  364ea233_0325_d0c3_d524_7cd1b4b3767d -->|defined in| 35c0b351_a315_b75b_aa2a_7f7a823ba60f
  66836503_9c73_8364_2f68_033932da2823["build()"]
  66836503_9c73_8364_2f68_033932da2823 -->|calls| 364ea233_0325_d0c3_d524_7cd1b4b3767d
  429be95e_25ad_7c61_6960_5c7e722292d3["getInternalPackageVersion()"]
  364ea233_0325_d0c3_d524_7cd1b4b3767d -->|calls| 429be95e_25ad_7c61_6960_5c7e722292d3
  54c14f9b_68a8_7018_8347_979f35e3b60e["getWorkspacePackageVersion()"]
  364ea233_0325_d0c3_d524_7cd1b4b3767d -->|calls| 54c14f9b_68a8_7018_8347_979f35e3b60e
  style 364ea233_0325_d0c3_d524_7cd1b4b3767d fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

scripts/cmd/build.js lines 137–156

async function getDefinedEntries() {
	const define = {
		/** The current version (at the time of building) for the current package, such as `astro` or `@astrojs/sitemap` */
		PACKAGE_VERSION: await getInternalPackageVersion('./package.json'),
		/** The current version (at the time of building) for `astro` */
		ASTRO_VERSION: await getInternalPackageVersion(
			new URL('../../packages/astro/package.json', import.meta.url),
		),
		/** The current version (at the time of building) for `@astrojs/check` */
		ASTRO_CHECK_VERSION: await getWorkspacePackageVersion('@astrojs/check'),
		/** The current version (at the time of building) for `typescript` */
		TYPESCRIPT_VERSION: await getWorkspacePackageVersion('typescript'),
	};
	for (const [key, value] of Object.entries(define)) {
		if (value === undefined) {
			delete define[key];
		}
	}
	return Object.entries(define);
}

Domain

Subdomains

Called By

Frequently Asked Questions

What does getDefinedEntries() do?
getDefinedEntries() is a function in the astro codebase, defined in scripts/cmd/build.js.
Where is getDefinedEntries() defined?
getDefinedEntries() is defined in scripts/cmd/build.js at line 137.
What does getDefinedEntries() call?
getDefinedEntries() calls 2 function(s): getInternalPackageVersion, getWorkspacePackageVersion.
What calls getDefinedEntries()?
getDefinedEntries() is called by 1 function(s): build.

Analyze Your Own Codebase

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

Try Supermodel Free