Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
return this.baseConfig;
if (!this.options.valtyr)
return this.baseConfig = [];
try {
const fullPath = path.join(this.directories.getCurrentDirectory(), '.fimbullinter.yaml');
const configProvider = new DefaultConfigurationProvider(this.fs, this.resolver, this.builtinResolver, this.cacheFactory);
const config = configProvider.parse(this.options.valtyr, fullPath, {
stack: [],
load() {
throw new Error('Global configuration is not allowed to extend other configs.');
},
});
validateGlobalConfig(config);
return this.baseConfig = [config];
} catch (e) {
throw new ConfigurationError(`Error parsing global configuration for 'valtyr': ${e.message}`);
}
}
}
private getBaseConfiguration() {
if (this.baseConfig !== undefined)
return this.baseConfig;
if (!this.options.valtyr)
return this.baseConfig = [];
try {
const fullPath = path.join(this.directories.getCurrentDirectory(), '.fimbullinter.yaml');
const configProvider = new DefaultConfigurationProvider(this.fs, this.resolver, this.builtinResolver, this.cacheFactory);
const config = configProvider.parse(this.options.valtyr, fullPath, {
stack: [],
load() {
throw new Error('Global configuration is not allowed to extend other configs.');
},
});
validateGlobalConfig(config);
return this.baseConfig = [config];
} catch (e) {
throw new ConfigurationError(`Error parsing global configuration for 'valtyr': ${e.message}`);
}
}
}