Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
'use strict';
const _ = require('lodash');
const configparser = require('gemini-configparser');
const browserOptions = require('./browser-options');
const defaults = require('./defaults');
const optionsBuilder = require('./options-builder');
const options = optionsBuilder(_.propertyOf(defaults));
const section = configparser.section;
const map = configparser.map;
const coreOptions = require('gemini-core').config.options;
const ENV_PREFIX = `${require('../../package').name}_`;
const rootSection = section(_.extend(browserOptions.getTopLevel(), {
browsers: map(section(browserOptions.getPerBrowser())),
prepareEnvironment: options.optionalFunction('prepareEnvironment'),
system: section({
debug: options.boolean('debug'),
mochaOpts: options.optionalObject('mochaOpts'),
const configparser = require('gemini-configparser');
const _ = require('lodash');
const GeminiError = require('../errors/gemini-error');
const util = require('./util');
const browserOptions = require('./browser-options');
const coreOptions = require('gemini-core').config.options;
const ENV_PREFIX = `${require('../../package').name}_`;
const is = util.is;
const anyObject = util.anyObject;
const resolveWithProjectRoot = util.resolveWithProjectRoot;
const booleanOption = util.booleanOption;
const positiveIntegerOption = util.positiveIntegerOption;
const root = configparser.root;
const section = configparser.section;
const option = configparser.option;
const map = configparser.map;
module.exports = root(
section(_.extend(browserOptions.getTopLevel(), {
system: section({
projectRoot: option({
validate: is('string'),
map: _.ary(path.resolve, 1)
}),
sourceRoot: option({
validate: is('string'),
map: resolveWithProjectRoot,
defaultValue: (config) => config.system.projectRoot
}),
const configParser = require('gemini-configparser');
const root = configParser.root;
const section = configParser.section;
const option = configParser.option;
const shouldBeBoolean = require('../metadata/validation-utils').shouldBeBoolean;
const shouldBeString = require('../metadata/validation-utils').shouldBeString;
const ENV_PREFIX = `${require('../../package').name}_`;
/**
* Parsing scheme for the config. Determines config structure.
* Raw values parsing process:
* 1. Override JSON values with CLI and ENV variables
* 2. Ensure requred fields presented
* 3. Validate values
* 4. Map values
* Current structure:
* ```