MCPcopy Create free account
hub / github.com/angular/dev-infra / getUserConfig

Function getUserConfig

ng-dev/utils/config.ts:163–174  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

161 * present. The object is an untyped object as there are no required user configurations.
162 */
163export async function getUserConfig() {
164 // If the global config is not defined, load it from the file system.
165 if (userConfig === null) {
166 // The full path to the configuration file.
167 const configPath = join(determineRepoBaseDirFromCwd(), USER_CONFIG_FILE_PATH);
168 // Set the global config object.
169 userConfig = await readConfigFile(configPath, true);
170 }
171 // Return a clone of the user config to ensure that a new instance of the config is returned
172 // each time, preventing unexpected effects of modifications to the config object.
173 return {...userConfig};
174}
175
176/** A standard error class to thrown during assertions while validating configuration. */
177export class ConfigValidationError extends Error {

Callers 1

getIsErrorModeDefaultFunction · 0.85

Calls 2

readConfigFileFunction · 0.85

Tested by

no test coverage detected