Home / Function/ loadUserConfigFile() — astro Function Reference

loadUserConfigFile() — astro Function Reference

Architecture documentation for the loadUserConfigFile() function in load-file.ts from the astro codebase.

Entity Profile

Dependency Diagram

graph TD
  9044229a_6784_8c06_1565_918aecd1c713["loadUserConfigFile()"]
  c880535e_510d_6ed5_4280_3abb271db261["load-file.ts"]
  9044229a_6784_8c06_1565_918aecd1c713 -->|defined in| c880535e_510d_6ed5_4280_3abb271db261
  2e0865dc_19f8_a964_71df_d063d209e435["resolveDbConfig()"]
  2e0865dc_19f8_a964_71df_d063d209e435 -->|calls| 9044229a_6784_8c06_1565_918aecd1c713
  70baf2f8_8656_2b85_dc81_210e3628975c["loadAndBundleDbConfigFile()"]
  9044229a_6784_8c06_1565_918aecd1c713 -->|calls| 70baf2f8_8656_2b85_dc81_210e3628975c
  style 9044229a_6784_8c06_1565_918aecd1c713 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

packages/db/src/core/load-file.ts lines 71–82

async function loadUserConfigFile(
	root: URL,
): Promise<{ mod: { default?: unknown } | undefined; dependencies: string[] }> {
	let configFileUrl: URL | undefined;
	for (const fileName of CONFIG_FILE_NAMES) {
		const fileUrl = new URL(fileName, getDbDirectoryUrl(root));
		if (existsSync(fileUrl)) {
			configFileUrl = fileUrl;
		}
	}
	return await loadAndBundleDbConfigFile({ root, fileUrl: configFileUrl });
}

Domain

Subdomains

Called By

Frequently Asked Questions

What does loadUserConfigFile() do?
loadUserConfigFile() is a function in the astro codebase, defined in packages/db/src/core/load-file.ts.
Where is loadUserConfigFile() defined?
loadUserConfigFile() is defined in packages/db/src/core/load-file.ts at line 71.
What does loadUserConfigFile() call?
loadUserConfigFile() calls 1 function(s): loadAndBundleDbConfigFile.
What calls loadUserConfigFile()?
loadUserConfigFile() is called by 1 function(s): resolveDbConfig.

Analyze Your Own Codebase

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

Try Supermodel Free