[
  {
    "__docId__": 0,
    "kind": "file",
    "static": true,
    "variation": null,
    "name": "src/cli/execute.js",
    "memberof": null,
    "longname": "src/cli/execute.js",
    "access": null,
    "description": null,
    "lineNumber": 1,
    "content": "import 'source-map-support/register';\n\nimport { spawn } from 'child_process';\n\n/**\n * Executes a command string.\n *\n * Quite simple in its current state and should be expected to change in the future.\n * Can manage multiple commands if they are divided by either & or &&. Important that there is spacing on both sides.\n *\n * @param {string} command - A command string that should run.\n * @returns {Promise} - A promise that is resolved when all the commands are completed.\n */\nexport function execute(command) {\n    const parallelCommands = command.split(/ & /);\n    return executeNext(parallelCommands);\n}\n\nfunction executeNext(parallelCommands) {\n    const syncCommand = parallelCommands.shift();\n    if (syncCommand) {\n        return Promise.all([runCommand(syncCommand), executeNext(parallelCommands)]);\n    }\n    return Promise.resolve();\n}\n\nfunction runCommand(syncCommand) {\n    const syncCommands = syncCommand.split(/ && /);\n    const command = syncCommands.shift();\n    const parts = command.split(/\\s+/g);\n    const cmd = parts[0];\n    const args = parts.slice(1);\n    return new Promise((resolve) => {\n        spawn(cmd, args, { stdio: 'inherit' })\n            .on('exit', function(code) {\n                if (code) {\n                    /* eslint-disable no-process-exit */\n                    return process.exit(code);\n                    /* eslint-enable */\n                }\n                executeNext(syncCommands).then(resolve);\n            });\n    });\n}\n"
  },
  {
    "__docId__": 1,
    "kind": "function",
    "static": true,
    "variation": null,
    "name": "execute",
    "memberof": "src/cli/execute.js",
    "longname": "src/cli/execute.js~execute",
    "access": null,
    "export": true,
    "importPath": "roc/lib/cli/execute.js",
    "importStyle": "{execute}",
    "description": "Executes a command string.\n\nQuite simple in its current state and should be expected to change in the future.\nCan manage multiple commands if they are divided by either & or &&. Important that there is spacing on both sides.",
    "lineNumber": 14,
    "unknown": [
      {
        "tagName": "@returns",
        "tagValue": "{Promise} - A promise that is resolved when all the commands are completed."
      }
    ],
    "params": [
      {
        "nullable": null,
        "types": [
          "string"
        ],
        "spread": false,
        "optional": false,
        "name": "command",
        "description": "A command string that should run."
      }
    ],
    "return": {
      "nullable": null,
      "types": [
        "Promise"
      ],
      "spread": false,
      "description": "A promise that is resolved when all the commands are completed."
    },
    "generator": false
  },
  {
    "__docId__": 2,
    "kind": "function",
    "static": true,
    "variation": null,
    "name": "executeNext",
    "memberof": "src/cli/execute.js",
    "longname": "src/cli/execute.js~executeNext",
    "access": null,
    "export": false,
    "importPath": "roc/lib/cli/execute.js",
    "importStyle": null,
    "description": null,
    "lineNumber": 19,
    "undocument": true,
    "params": [
      {
        "name": "parallelCommands",
        "types": [
          "*"
        ]
      }
    ],
    "return": {
      "types": [
        "*"
      ]
    },
    "generator": false
  },
  {
    "__docId__": 3,
    "kind": "function",
    "static": true,
    "variation": null,
    "name": "runCommand",
    "memberof": "src/cli/execute.js",
    "longname": "src/cli/execute.js~runCommand",
    "access": null,
    "export": false,
    "importPath": "roc/lib/cli/execute.js",
    "importStyle": null,
    "description": null,
    "lineNumber": 27,
    "undocument": true,
    "params": [
      {
        "name": "syncCommand",
        "types": [
          "*"
        ]
      }
    ],
    "return": {
      "types": [
        "*"
      ]
    },
    "generator": false
  },
  {
    "__docId__": 4,
    "kind": "file",
    "static": true,
    "variation": null,
    "name": "src/cli/helpers.js",
    "memberof": null,
    "longname": "src/cli/helpers.js",
    "access": null,
    "description": null,
    "lineNumber": 1,
    "content": "import 'source-map-support/register';\n\nimport chalk from 'chalk';\nimport { isPlainObject, isBoolean, isString, set, difference } from 'lodash';\nimport resolve from 'resolve';\nimport leven from 'leven';\nimport trimNewlines from 'trim-newlines';\nimport redent from 'redent';\n\nimport { merge } from '../configuration';\nimport buildDocumentationObject from '../documentation/build-documentation-object';\nimport generateTable from '../documentation/generate-table';\nimport { getDefaultValue } from '../documentation/helpers';\nimport { fileExists, getRocDependencies, getPackageJson } from '../helpers';\nimport { throwError } from '../validation';\nimport { isValid } from '../validation';\nimport { warning, importantLabel, errorLabel, warningLabel } from '../helpers/style';\n\n/**\n * Builds the complete configuration objects.\n *\n * @param {boolean} debug - If debug mode should be enabled, logs some extra information.\n * @param {rocConfig} config - The base configuration.\n * @param {rocMetaConfig} meta - The base meta configuration.\n * @param {rocConfig} newConfig - The new configuration to base the merge on.\n * @param {rocMetaConfig} newMeta - The new meta configuration to base the merge on.\n * @param {string} [directory=process.cwd()] - The directory to resolve relative paths from.\n * @param {boolean} [validate=true] - If the newConfig and the newMeta structure should be validated.\n *\n * @returns {Object} - The result of with the built configurations.\n * @property {rocConfig} extensionConfig - The extensions merged configurations\n * @property {rocConfig} config - The final configuration, with application configuration.\n * @property {rocMetaConfig} meta - The merged meta configuration.\n */\nexport function buildCompleteConfig(\n    debug, config = {}, meta = {}, newConfig = {}, newMeta = {}, directory = process.cwd(), validate = true\n) {\n    let finalConfig = { ...config };\n    let finalMeta = { ...meta };\n\n    let usedExtensions = [];\n    const mergeExtension = (extensionName) => {\n        const { baseConfig, metaConfig = {} } = getExtension(extensionName, directory);\n\n        if (baseConfig) {\n            usedExtensions.push(extensionName);\n            finalConfig = merge(finalConfig, baseConfig);\n            finalMeta = merge(finalMeta, metaConfig);\n        }\n    };\n\n    if (fileExists('package.json', directory)) {\n        // If extensions are defined we will use them to merge the configurations\n        if (newConfig.extensions && newConfig.extensions.length) {\n            newConfig.extensions.forEach(mergeExtension);\n        } else {\n            const packageJson = getPackageJson(directory);\n            getRocDependencies(packageJson)\n                .forEach(mergeExtension);\n        }\n\n        if (usedExtensions.length && debug) {\n            console.log(importantLabel('The following Roc extensions will be used:'), usedExtensions, '\\n');\n        }\n\n        // Check for a mismatch between application configuration and extensions.\n        if (validate) {\n            if (Object.keys(newConfig).length) {\n                console.log(validateConfigurationStructure(finalConfig, newConfig));\n            }\n            if (Object.keys(newMeta).length) {\n                console.log(validateConfigurationStructure(finalMeta, newMeta));\n            }\n        }\n    }\n\n    return {\n        extensionConfig: finalConfig,\n        config: merge(finalConfig, newConfig),\n        meta: merge(finalMeta, newMeta)\n    };\n}\n\nfunction getExtension(extensionName, directory) {\n    try {\n        const { baseConfig, metaConfig } = require(resolve.sync(extensionName, { basedir: directory }));\n        return { baseConfig, metaConfig };\n    } catch (err) {\n        console.log(\n            errorLabel(\n                'Failed to load Roc extension ' + chalk.bold(extensionName) + '. ' +\n                'Make sure you have it installed. Try running:'\n            ) + ' ' +\n            chalk.underline('npm install --save ' + extensionName)\n        , '\\n');\n        return {};\n    }\n}\n\nfunction validateConfigurationStructure(config, applicationConfig) {\n    const getKeys = (obj, oldPath = '', allKeys = []) => {\n        Object.keys(obj).forEach((key) => {\n            const value = obj[key];\n            const newPath = oldPath + key;\n\n            if (isPlainObject(value)) {\n                getKeys(value, newPath + '.', allKeys);\n            } else {\n                allKeys.push(newPath);\n            }\n        });\n\n        return allKeys;\n    };\n    const info = [];\n    const keys = getKeys(config);\n    const diff = difference(getKeys(applicationConfig), keys);\n    if (diff.length > 0) {\n        info.push(errorLabel('Configuration problem') +\n            ' There was a mismatch in the application configuration structure, make sure this is correct.\\n');\n        info.push(getSuggestions(diff, keys));\n        info.push('');\n    }\n    // }\n    return info.join('\\n');\n}\n\n/**\n * Will create a string with suggestions for possible typos.\n *\n * @param {string[]} current - The current values that might be incorrect.\n * @param {string[]} possible - All the possible correct values.\n * @param {boolean} [command=false] - If the suggestion should be managed as a command.\n *\n * @returns {string} - A string with possible suggestions for typos.\n */\nexport function getSuggestions(current, possible, command = false) {\n    const info = [];\n\n    current.forEach((currentKey) => {\n        let shortest = 0;\n        let closest;\n\n        for (let key of possible) {\n            let distance = leven(currentKey, key);\n\n            if (distance <= 0 || distance > 4) {\n                continue;\n            }\n\n            if (shortest && distance >= shortest) {\n                continue;\n            }\n\n            closest = key;\n            shortest = distance;\n        }\n\n        const extra = command ? '--' : '';\n        if (closest) {\n            info.push('Did not understand ' + chalk.underline(extra + currentKey) +\n                ' - Did you mean ' + chalk.underline(extra + closest));\n        } else {\n            info.push('Did not understand ' + chalk.underline(extra + currentKey));\n        }\n    });\n\n    return info.join('\\n');\n}\n\n/**\n * Generates a string with information about all the possible commands.\n *\n * @param {rocConfig} commands - The Roc config object, uses commands from it.\n * @param {rocMetaConfig} commandsmeta - The Roc meta config object, uses commands from it.\n *\n * @returns {string} - A string with documentation based on the available commands.\n */\nexport function generateCommandsDocumentation({ commands }, { commands: commandsMeta }) {\n    const header = {\n        name: true,\n        description: true\n    };\n\n    const noCommands = {'No commands available.': ''};\n    commandsMeta = commandsMeta || {};\n\n    let body = [{\n        name: 'Commands',\n        objects: Object.keys(commands || noCommands).map((command) => {\n            const options = commandsMeta[command] ?\n                ' ' + getCommandOptionsAsString(commandsMeta[command]) :\n                '';\n            const description = commandsMeta[command] && commandsMeta[command].description ?\n                commandsMeta[command].description :\n                '';\n\n            return {\n                name: (command + options),\n                description\n            };\n        })\n    }];\n\n    return generateCommandDocsHelper(body, header, 'Options', 'name');\n}\n\nfunction getCommandOptionsAsString(command = {}) {\n    let options = '';\n    (command.options || []).forEach((option) => {\n        options += option.required ? `<${option.name}> ` : `[${option.name}] `;\n    });\n\n    return options;\n}\n\n /**\n  * Generates a string with information about a specific command.\n  *\n  * @param {rocConfig} settings - The Roc config object, uses settings from it.\n  * @param {rocMetaConfig} commands+meta - The Roc meta config object, uses commands and settings from it.\n  * @param {string} command - The selected command.\n  * @param {string} name - The name of the cli.\n  *\n  * @returns {string} - A string with documentation based on the selected commands.\n  */\nexport function generateCommandDocumentation({ settings }, { commands = {}, settings: meta }, command, name) {\n    const rows = [];\n    rows.push('Usage: ' + name + ' ' + command + ' ' + getCommandOptionsAsString(commands[command]));\n    rows.push('');\n\n    if (commands[command] && commands[command].help) {\n        rows.push(redent(trimNewlines(commands[command].help)));\n        rows.push('');\n    }\n\n    let body = [];\n\n    // Generate the options table\n    if (commands[command] && commands[command].settings) {\n        rows.push('Options:');\n        rows.push('');\n\n        const filter = commands[command].settings === true ? [] : commands[command].settings;\n\n        body = buildDocumentationObject(settings, meta, filter);\n    }\n\n    const header = {\n        cli: true,\n        description: {\n            name: 'Description',\n            padding: false\n        },\n        defaultValue: {\n            name: 'Default',\n            renderer: (input) => {\n                input = getDefaultValue(input);\n\n                if (input === undefined) {\n                    return '';\n                }\n\n                if (!input) {\n                    return warning('No default value');\n                }\n\n                return chalk.cyan(input);\n            }\n        }\n    };\n\n    rows.push(generateCommandDocsHelper(body, header, 'CLI options', 'cli'));\n\n    return rows.join('\\n');\n}\n\nfunction generateCommandDocsHelper(body, header, options, name) {\n    body.push({\n        name: options,\n        objects: [{\n            [name]: '-h, --help',\n            description: 'Output usage information.'\n        }, {\n            [name]: '-v, --version',\n            description: 'Output version number.'\n        }, {\n            [name]: '-d, --debug',\n            description: 'Enable debug mode.'\n        }, {\n            [name]: '-c, --config',\n            description: `Path to configuration file, will default to ${chalk.bold('roc.config.js')} in current ` +\n                `working directory.`\n        }, {\n            [name]: '-D, --directory',\n            description: 'Path to working directory, will default to the current working directory. Can be either ' +\n                'absolute or relative.'\n        }]\n    });\n\n    return generateTable(body, header, {\n        compact: true,\n        titleWrapper: (input) => input + ':',\n        cellDivider: '',\n        rowWrapper: (input) => `${input}`,\n        header: false,\n        groupTitleWrapper: (input) => input + ':'\n    });\n}\n\n/**\n * Parses options and validates them.\n *\n * @param {string} command - The command to parse options for.\n * @param {Object} commands - commands from {@link rocMetaConfig}.\n * @param {Object[]} options - Options parsed by minimist.\n *\n * @returns {Object} - Parsed options.\n * @property {object[]} options - The parsed options that was matched against the meta configuration for the command.\n * @property {object[]} rest - The rest of the options that could not be matched against the configuration.\n */\nexport function parseOptions(command, commands, options) {\n    // If the command supports options\n    if (commands[command] && commands[command].options) {\n        let parsedOptions = {};\n        commands[command].options.forEach((option, index) => {\n            const value = options[index];\n\n            if (option.required && !value) {\n                throw new Error(`Required option \"${option.name}\" was not provided.`);\n            }\n\n            if (value && option.validation) {\n                const validationResult = isValid(value, option.validation);\n                if (validationResult !== true) {\n                    try {\n                        throwError(option.name, validationResult, value, 'option');\n                    } catch (err) {\n                        /* eslint-disable no-process-exit, no-console */\n                        console.log(errorLabel('Arguments problem') + ' An option was not valid.\\n');\n                        console.log(err.message);\n                        process.exit(1);\n                        /* eslint-enable */\n                    }\n                }\n            }\n\n            parsedOptions[option.name] = value;\n        });\n\n        return {\n            options: parsedOptions,\n            rest: options.splice(Object.keys(parsedOptions).length)\n        };\n    }\n\n    return {\n        options: undefined,\n        rest: options\n    };\n}\n\n/**\n * Creates mappings between cli commands to their \"path\" in the configuration structure, their validator and type\n * convertor.\n *\n * @param {rocDocumentationObject} documentationObject - Documentation object to create mappings for.\n *\n * @returns {Object} - Properties are the cli command without leading dashes that maps to a {@link rocMapObject}.\n */\nexport function getMappings(documentationObject) {\n    const recursiveHelper = (groups) => {\n        let mappings = {};\n\n        groups.forEach((group) => {\n            group.objects.forEach((element) => {\n                // Remove the two dashes in the beginning to match correctly\n                mappings[element.cli.substr(2)] = {\n                    name: element.cli,\n                    path: element.path,\n                    convertor: getConvertor(element.defaultValue, element.cli),\n                    validator: element.validator\n                };\n            });\n\n            mappings = Object.assign({}, mappings, recursiveHelper(group.children));\n        });\n\n        return mappings;\n    };\n\n    return recursiveHelper(documentationObject);\n}\n\n// Convert values based on their default value\nfunction getConvertor(value, name) {\n    if (isBoolean(value)) {\n        return (input) => {\n            if (isBoolean(input)) {\n                return input;\n            }\n            if (input === 'true' || input === 'false') {\n                return input === 'true';\n            }\n\n            console.log(\n                warningLabel(`Invalid value given for ${chalk.bold(name)}.`),\n                `Will use the default ${chalk.bold(value)}.`\n            );\n\n            return value;\n        };\n    } else if (Array.isArray(value)) {\n        return (input) => {\n            let parsed;\n            try {\n                parsed = JSON.parse(input);\n            } catch (err) {\n                // Ignore this case\n            }\n\n            if (Array.isArray(parsed)) {\n                return parsed;\n            }\n\n            return input.toString().split(',');\n        };\n    } else if (Number.isInteger(value)) {\n        return (input) => parseInt(input, 10);\n    } else if (!isString(value) && (!value || Object.keys(value).length === 0)) {\n        return (input) => JSON.parse(input);\n    }\n\n    return (input) => input;\n}\n\n/**\n * Converts a set of arguments to {@link rocConfigSettings} object.\n *\n * @param {Object} args - Arguments parsed from minimist.\n * @param {Object} mappings - Result from {@link getMappings}.\n *\n * @returns {Object} - The mapped Roc configuration settings object.\n */\nexport function parseArguments(args, mappings) {\n    const config = {};\n    const info = [];\n\n    Object.keys(args).forEach((key) => {\n        if (mappings[key]) {\n            const value = convert(args[key], mappings[key]);\n            set(config, mappings[key].path, value);\n        } else {\n            // We did not find a match\n            info.push(getSuggestions([key], Object.keys(mappings), true));\n        }\n    });\n\n    if (info.length > 0) {\n        console.log(errorLabel('CLI problem'), 'Some commands were not understood.\\n');\n        console.log(info.join('\\n') + '\\n');\n    }\n\n    return config;\n}\n\nfunction convert(value, mapping) {\n    const val = mapping.convertor(value);\n    const validationResult = isValid(val, mapping.validator);\n    if (validationResult === true) {\n        return val;\n    }\n\n    console.log(\n        warning(`There was a problem when trying to automatically convert ${chalk.bold(mapping.name)}. This ` +\n        `value will be ignored.`)\n    );\n    console.log(\n        `Received ${chalk.underline(value)} and it was converted to ${chalk.underline(val)}.`, validationResult, '\\n'\n    );\n}\n"
  },
  {
    "__docId__": 5,
    "kind": "function",
    "static": true,
    "variation": null,
    "name": "buildCompleteConfig",
    "memberof": "src/cli/helpers.js",
    "longname": "src/cli/helpers.js~buildCompleteConfig",
    "access": null,
    "export": true,
    "importPath": "roc/lib/cli/helpers.js",
    "importStyle": "{buildCompleteConfig}",
    "description": "Builds the complete configuration objects.",
    "lineNumber": 35,
    "unknown": [
      {
        "tagName": "@returns",
        "tagValue": "{Object} - The result of with the built configurations."
      }
    ],
    "params": [
      {
        "nullable": null,
        "types": [
          "boolean"
        ],
        "spread": false,
        "optional": false,
        "name": "debug",
        "description": "If debug mode should be enabled, logs some extra information."
      },
      {
        "nullable": null,
        "types": [
          "rocConfig"
        ],
        "spread": false,
        "optional": false,
        "name": "config",
        "description": "The base configuration."
      },
      {
        "nullable": null,
        "types": [
          "rocMetaConfig"
        ],
        "spread": false,
        "optional": false,
        "name": "meta",
        "description": "The base meta configuration."
      },
      {
        "nullable": null,
        "types": [
          "rocConfig"
        ],
        "spread": false,
        "optional": false,
        "name": "newConfig",
        "description": "The new configuration to base the merge on."
      },
      {
        "nullable": null,
        "types": [
          "rocMetaConfig"
        ],
        "spread": false,
        "optional": false,
        "name": "newMeta",
        "description": "The new meta configuration to base the merge on."
      },
      {
        "nullable": null,
        "types": [
          "string"
        ],
        "spread": false,
        "optional": true,
        "defaultValue": "process.cwd()",
        "defaultRaw": "process.cwd()",
        "name": "directory",
        "description": "The directory to resolve relative paths from."
      },
      {
        "nullable": null,
        "types": [
          "boolean"
        ],
        "spread": false,
        "optional": true,
        "defaultValue": "true",
        "defaultRaw": true,
        "name": "validate",
        "description": "If the newConfig and the newMeta structure should be validated."
      }
    ],
    "properties": [
      {
        "nullable": null,
        "types": [
          "rocConfig"
        ],
        "spread": false,
        "optional": false,
        "name": "extensionConfig",
        "description": "The extensions merged configurations"
      },
      {
        "nullable": null,
        "types": [
          "rocConfig"
        ],
        "spread": false,
        "optional": false,
        "name": "config",
        "description": "The final configuration, with application configuration."
      },
      {
        "nullable": null,
        "types": [
          "rocMetaConfig"
        ],
        "spread": false,
        "optional": false,
        "name": "meta",
        "description": "The merged meta configuration."
      }
    ],
    "return": {
      "nullable": null,
      "types": [
        "Object"
      ],
      "spread": false,
      "description": "The result of with the built configurations."
    },
    "generator": false
  },
  {
    "__docId__": 6,
    "kind": "function",
    "static": true,
    "variation": null,
    "name": "getExtension",
    "memberof": "src/cli/helpers.js",
    "longname": "src/cli/helpers.js~getExtension",
    "access": null,
    "export": false,
    "importPath": "roc/lib/cli/helpers.js",
    "importStyle": null,
    "description": null,
    "lineNumber": 84,
    "undocument": true,
    "params": [
      {
        "name": "extensionName",
        "types": [
          "*"
        ]
      },
      {
        "name": "directory",
        "types": [
          "*"
        ]
      }
    ],
    "return": {
      "types": [
        "*"
      ]
    },
    "generator": false
  },
  {
    "__docId__": 7,
    "kind": "function",
    "static": true,
    "variation": null,
    "name": "validateConfigurationStructure",
    "memberof": "src/cli/helpers.js",
    "longname": "src/cli/helpers.js~validateConfigurationStructure",
    "access": null,
    "export": false,
    "importPath": "roc/lib/cli/helpers.js",
    "importStyle": null,
    "description": null,
    "lineNumber": 100,
    "undocument": true,
    "params": [
      {
        "name": "config",
        "types": [
          "*"
        ]
      },
      {
        "name": "applicationConfig",
        "types": [
          "*"
        ]
      }
    ],
    "return": {
      "types": [
        "*"
      ]
    },
    "generator": false
  },
  {
    "__docId__": 8,
    "kind": "function",
    "static": true,
    "variation": null,
    "name": "getSuggestions",
    "memberof": "src/cli/helpers.js",
    "longname": "src/cli/helpers.js~getSuggestions",
    "access": null,
    "export": true,
    "importPath": "roc/lib/cli/helpers.js",
    "importStyle": "{getSuggestions}",
    "description": "Will create a string with suggestions for possible typos.",
    "lineNumber": 137,
    "unknown": [
      {
        "tagName": "@returns",
        "tagValue": "{string} - A string with possible suggestions for typos."
      }
    ],
    "params": [
      {
        "nullable": null,
        "types": [
          "string[]"
        ],
        "spread": false,
        "optional": false,
        "name": "current",
        "description": "The current values that might be incorrect."
      },
      {
        "nullable": null,
        "types": [
          "string[]"
        ],
        "spread": false,
        "optional": false,
        "name": "possible",
        "description": "All the possible correct values."
      },
      {
        "nullable": null,
        "types": [
          "boolean"
        ],
        "spread": false,
        "optional": true,
        "defaultValue": "false",
        "defaultRaw": false,
        "name": "command",
        "description": "If the suggestion should be managed as a command."
      }
    ],
    "return": {
      "nullable": null,
      "types": [
        "string"
      ],
      "spread": false,
      "description": "A string with possible suggestions for typos."
    },
    "generator": false
  },
  {
    "__docId__": 9,
    "kind": "function",
    "static": true,
    "variation": null,
    "name": "generateCommandsDocumentation",
    "memberof": "src/cli/helpers.js",
    "longname": "src/cli/helpers.js~generateCommandsDocumentation",
    "access": null,
    "export": true,
    "importPath": "roc/lib/cli/helpers.js",
    "importStyle": "{generateCommandsDocumentation}",
    "description": "Generates a string with information about all the possible commands.",
    "lineNumber": 179,
    "unknown": [
      {
        "tagName": "@returns",
        "tagValue": "{string} - A string with documentation based on the available commands."
      }
    ],
    "params": [
      {
        "nullable": null,
        "types": [
          "rocConfig"
        ],
        "spread": false,
        "optional": false,
        "name": "commands",
        "description": "The Roc config object, uses commands from it."
      },
      {
        "nullable": null,
        "types": [
          "rocMetaConfig"
        ],
        "spread": false,
        "optional": false,
        "name": "commandsmeta",
        "description": "The Roc meta config object, uses commands from it."
      }
    ],
    "return": {
      "nullable": null,
      "types": [
        "string"
      ],
      "spread": false,
      "description": "A string with documentation based on the available commands."
    },
    "generator": false
  },
  {
    "__docId__": 10,
    "kind": "function",
    "static": true,
    "variation": null,
    "name": "getCommandOptionsAsString",
    "memberof": "src/cli/helpers.js",
    "longname": "src/cli/helpers.js~getCommandOptionsAsString",
    "access": null,
    "export": false,
    "importPath": "roc/lib/cli/helpers.js",
    "importStyle": null,
    "description": null,
    "lineNumber": 208,
    "undocument": true,
    "params": [
      {
        "name": "command",
        "optional": true,
        "types": [
          "{}"
        ],
        "defaultRaw": {},
        "defaultValue": "{}"
      }
    ],
    "return": {
      "types": [
        "*"
      ]
    },
    "generator": false
  },
  {
    "__docId__": 11,
    "kind": "function",
    "static": true,
    "variation": null,
    "name": "generateCommandDocumentation",
    "memberof": "src/cli/helpers.js",
    "longname": "src/cli/helpers.js~generateCommandDocumentation",
    "access": null,
    "export": true,
    "importPath": "roc/lib/cli/helpers.js",
    "importStyle": "{generateCommandDocumentation}",
    "description": "Generates a string with information about a specific command.",
    "lineNumber": 227,
    "unknown": [
      {
        "tagName": "@returns",
        "tagValue": "{string} - A string with documentation based on the selected commands."
      }
    ],
    "params": [
      {
        "nullable": null,
        "types": [
          "rocConfig"
        ],
        "spread": false,
        "optional": false,
        "name": "settings",
        "description": "The Roc config object, uses settings from it."
      },
      {
        "nullable": null,
        "types": [
          "rocMetaConfig"
        ],
        "spread": false,
        "optional": false,
        "name": "commands+meta",
        "description": "The Roc meta config object, uses commands and settings from it."
      },
      {
        "nullable": null,
        "types": [
          "string"
        ],
        "spread": false,
        "optional": false,
        "name": "command",
        "description": "The selected command."
      },
      {
        "nullable": null,
        "types": [
          "string"
        ],
        "spread": false,
        "optional": false,
        "name": "name",
        "description": "The name of the cli."
      }
    ],
    "return": {
      "nullable": null,
      "types": [
        "string"
      ],
      "spread": false,
      "description": "A string with documentation based on the selected commands."
    },
    "generator": false
  },
  {
    "__docId__": 12,
    "kind": "function",
    "static": true,
    "variation": null,
    "name": "generateCommandDocsHelper",
    "memberof": "src/cli/helpers.js",
    "longname": "src/cli/helpers.js~generateCommandDocsHelper",
    "access": null,
    "export": false,
    "importPath": "roc/lib/cli/helpers.js",
    "importStyle": null,
    "description": null,
    "lineNumber": 278,
    "undocument": true,
    "params": [
      {
        "name": "body",
        "types": [
          "*"
        ]
      },
      {
        "name": "header",
        "types": [
          "*"
        ]
      },
      {
        "name": "options",
        "types": [
          "*"
        ]
      },
      {
        "name": "name",
        "types": [
          "*"
        ]
      }
    ],
    "return": {
      "types": [
        "*"
      ]
    },
    "generator": false
  },
  {
    "__docId__": 13,
    "kind": "function",
    "static": true,
    "variation": null,
    "name": "parseOptions",
    "memberof": "src/cli/helpers.js",
    "longname": "src/cli/helpers.js~parseOptions",
    "access": null,
    "export": true,
    "importPath": "roc/lib/cli/helpers.js",
    "importStyle": "{parseOptions}",
    "description": "Parses options and validates them.",
    "lineNumber": 322,
    "unknown": [
      {
        "tagName": "@returns",
        "tagValue": "{Object} - Parsed options."
      }
    ],
    "params": [
      {
        "nullable": null,
        "types": [
          "string"
        ],
        "spread": false,
        "optional": false,
        "name": "command",
        "description": "The command to parse options for."
      },
      {
        "nullable": null,
        "types": [
          "Object"
        ],
        "spread": false,
        "optional": false,
        "name": "commands",
        "description": "commands from {@link rocMetaConfig}."
      },
      {
        "nullable": null,
        "types": [
          "Object[]"
        ],
        "spread": false,
        "optional": false,
        "name": "options",
        "description": "Options parsed by minimist."
      }
    ],
    "properties": [
      {
        "nullable": null,
        "types": [
          "object[]"
        ],
        "spread": false,
        "optional": false,
        "name": "options",
        "description": "The parsed options that was matched against the meta configuration for the command."
      },
      {
        "nullable": null,
        "types": [
          "object[]"
        ],
        "spread": false,
        "optional": false,
        "name": "rest",
        "description": "The rest of the options that could not be matched against the configuration."
      }
    ],
    "return": {
      "nullable": null,
      "types": [
        "Object"
      ],
      "spread": false,
      "description": "Parsed options."
    },
    "generator": false
  },
  {
    "__docId__": 14,
    "kind": "function",
    "static": true,
    "variation": null,
    "name": "getMappings",
    "memberof": "src/cli/helpers.js",
    "longname": "src/cli/helpers.js~getMappings",
    "access": null,
    "export": true,
    "importPath": "roc/lib/cli/helpers.js",
    "importStyle": "{getMappings}",
    "description": "Creates mappings between cli commands to their \"path\" in the configuration structure, their validator and type\nconvertor.",
    "lineNumber": 371,
    "unknown": [
      {
        "tagName": "@returns",
        "tagValue": "{Object} - Properties are the cli command without leading dashes that maps to a {@link rocMapObject}."
      }
    ],
    "params": [
      {
        "nullable": null,
        "types": [
          "rocDocumentationObject"
        ],
        "spread": false,
        "optional": false,
        "name": "documentationObject",
        "description": "Documentation object to create mappings for."
      }
    ],
    "return": {
      "nullable": null,
      "types": [
        "Object"
      ],
      "spread": false,
      "description": "Properties are the cli command without leading dashes that maps to a {@link rocMapObject}."
    },
    "generator": false
  },
  {
    "__docId__": 15,
    "kind": "function",
    "static": true,
    "variation": null,
    "name": "getConvertor",
    "memberof": "src/cli/helpers.js",
    "longname": "src/cli/helpers.js~getConvertor",
    "access": null,
    "export": false,
    "importPath": "roc/lib/cli/helpers.js",
    "importStyle": null,
    "description": null,
    "lineNumber": 396,
    "undocument": true,
    "params": [
      {
        "name": "value",
        "types": [
          "*"
        ]
      },
      {
        "name": "name",
        "types": [
          "*"
        ]
      }
    ],
    "return": {
      "types": [
        "*"
      ]
    },
    "generator": false
  },
  {
    "__docId__": 16,
    "kind": "function",
    "static": true,
    "variation": null,
    "name": "parseArguments",
    "memberof": "src/cli/helpers.js",
    "longname": "src/cli/helpers.js~parseArguments",
    "access": null,
    "export": true,
    "importPath": "roc/lib/cli/helpers.js",
    "importStyle": "{parseArguments}",
    "description": "Converts a set of arguments to {@link rocConfigSettings} object.",
    "lineNumber": 445,
    "unknown": [
      {
        "tagName": "@returns",
        "tagValue": "{Object} - The mapped Roc configuration settings object."
      }
    ],
    "params": [
      {
        "nullable": null,
        "types": [
          "Object"
        ],
        "spread": false,
        "optional": false,
        "name": "args",
        "description": "Arguments parsed from minimist."
      },
      {
        "nullable": null,
        "types": [
          "Object"
        ],
        "spread": false,
        "optional": false,
        "name": "mappings",
        "description": "Result from {@link getMappings}."
      }
    ],
    "return": {
      "nullable": null,
      "types": [
        "Object"
      ],
      "spread": false,
      "description": "The mapped Roc configuration settings object."
    },
    "generator": false
  },
  {
    "__docId__": 17,
    "kind": "function",
    "static": true,
    "variation": null,
    "name": "convert",
    "memberof": "src/cli/helpers.js",
    "longname": "src/cli/helpers.js~convert",
    "access": null,
    "export": false,
    "importPath": "roc/lib/cli/helpers.js",
    "importStyle": null,
    "description": null,
    "lineNumber": 467,
    "undocument": true,
    "params": [
      {
        "name": "value",
        "types": [
          "*"
        ]
      },
      {
        "name": "mapping",
        "types": [
          "*"
        ]
      }
    ],
    "return": {
      "types": [
        "*"
      ]
    },
    "generator": false
  },
  {
    "__docId__": 18,
    "kind": "file",
    "static": true,
    "variation": null,
    "name": "src/cli/index.js",
    "memberof": null,
    "longname": "src/cli/index.js",
    "access": null,
    "description": null,
    "lineNumber": 1,
    "content": "import 'source-map-support/register';\n\nimport minimist from 'minimist';\nimport { isString } from 'lodash';\n\nimport { execute } from './execute';\nimport { getAbsolutePath } from '../helpers';\nimport { validate } from '../validation';\nimport { merge, appendConfig } from '../configuration';\nimport buildDocumentationObject from '../documentation/build-documentation-object';\nimport { getApplicationConfig } from '../configuration/helpers';\nimport {\n    buildCompleteConfig,\n    generateCommandsDocumentation,\n    generateCommandDocumentation,\n    parseOptions,\n    getMappings,\n    parseArguments,\n    getSuggestions\n} from './helpers';\nimport { error as styleError } from '../helpers/style';\n\n/**\n * Invokes the Roc cli.\n *\n * @param {{version: string, name: string}} info - Information about the cli.\n * @param {rocConfig} initalConfig - The inital configuration, will be merged with the selected extensions and\n *  application.\n * @param {rocMetaConfig} initalMeta - The inital meta configuration, will be merged with the selected extensions.\n * @param {string[]} [args=process.argv] - From where it should parse the arguments.\n *\n * @returns {undefined}\n */\nexport function runCli(info = {version: 'Unknown', name: 'Unknown'}, initalConfig, initalMeta, args = process.argv) {\n    const {_, h, help, d, debug, v, version, c, config, D, directory, ...restArgs} = minimist(args.slice(2));\n\n    // The first should be our command if there is one\n    const [command, ...options] = _;\n\n    // If version is selected output that and stop\n    if (version || v) {\n        return console.log(info.version);\n    }\n\n    // Possibe to set a command in debug mode\n    const debugEnabled = (debug || d) ? true : false;\n\n    // Get the application configuration path\n    const applicationConfigPath = config || c;\n\n    // Get the directory Path\n    const directoryPath = getAbsolutePath(directory || D);\n\n    // Build the complete config object\n    const applicationConfig = getApplicationConfig(applicationConfigPath, directoryPath, debugEnabled);\n    let { extensionConfig, config: configObject, meta: metaObject } =\n        buildCompleteConfig(debugEnabled, initalConfig, initalMeta, applicationConfig, undefined, directoryPath);\n\n    // If we have no command we will display some help information about all possible commands\n    if (!command) {\n        return console.log(generateCommandsDocumentation(extensionConfig, metaObject));\n    }\n\n    // If the command does not exist show error\n    // Will ignore application configuration\n    if (!extensionConfig.commands || !extensionConfig.commands[command]) {\n        console.log(styleError('Invalid command'), '\\n');\n        return console.log(getSuggestions([command], Object.keys(extensionConfig.commands)), '\\n');\n    }\n\n    // Show command help information if requested\n    // Will ignore application configuration\n    if (help || h) {\n        return console.log(generateCommandDocumentation(extensionConfig, metaObject, command, info.name));\n    }\n\n    const parsedOptions = parseOptions(command, metaObject.commands, options);\n\n    // Only parse arguments if the command accepts it\n    if (metaObject.commands[command] && metaObject.commands[command].settings) {\n        // Get config from application and only parse options that this command cares about.\n        const filter = metaObject.commands[command].settings === true ? [] : metaObject.commands[command].settings;\n        const documentationObject = buildDocumentationObject(configObject.settings, metaObject.settings, filter);\n\n        const configuration = parseArguments(restArgs, getMappings(documentationObject));\n        configObject = merge(configObject, {\n            settings: configuration\n        });\n\n        // Validate configuration\n        validate(configObject.settings, metaObject.settings, metaObject.commands[command].settings);\n    }\n\n    // Set the configuration object\n    appendConfig(configObject);\n\n    // If string run as shell command\n    if (isString(configObject.commands[command])) {\n        return execute(configObject.commands[command]);\n    }\n\n    // Run the command\n    return configObject.commands[command]({\n        debug: debugEnabled,\n        configObject,\n        metaObject,\n        extensionConfig,\n        parsedOptions\n    });\n}\n"
  },
  {
    "__docId__": 19,
    "kind": "function",
    "static": true,
    "variation": null,
    "name": "runCli",
    "memberof": "src/cli/index.js",
    "longname": "src/cli/index.js~runCli",
    "access": null,
    "export": true,
    "importPath": "roc/lib/cli/index.js",
    "importStyle": "{runCli}",
    "description": "Invokes the Roc cli.",
    "lineNumber": 34,
    "unknown": [
      {
        "tagName": "@returns",
        "tagValue": "{undefined}"
      }
    ],
    "params": [
      {
        "nullable": null,
        "types": [
          "{version: string, name: string}"
        ],
        "spread": false,
        "optional": false,
        "name": "info",
        "description": "Information about the cli."
      },
      {
        "nullable": null,
        "types": [
          "rocConfig"
        ],
        "spread": false,
        "optional": false,
        "name": "initalConfig",
        "description": "The inital configuration, will be merged with the selected extensions and\n application."
      },
      {
        "nullable": null,
        "types": [
          "rocMetaConfig"
        ],
        "spread": false,
        "optional": false,
        "name": "initalMeta",
        "description": "The inital meta configuration, will be merged with the selected extensions."
      },
      {
        "nullable": null,
        "types": [
          "string[]"
        ],
        "spread": false,
        "optional": true,
        "defaultValue": "process.argv",
        "defaultRaw": "process.argv",
        "name": "args",
        "description": "From where it should parse the arguments."
      }
    ],
    "return": {
      "nullable": null,
      "types": [
        "undefined"
      ],
      "spread": false,
      "description": ""
    },
    "generator": false
  },
  {
    "__docId__": 20,
    "kind": "file",
    "static": true,
    "variation": null,
    "name": "src/commands/helpers/default-prompt.js",
    "memberof": null,
    "longname": "src/commands/helpers/default-prompt.js",
    "access": null,
    "description": null,
    "lineNumber": 1,
    "content": "import 'source-map-support/register';\n\n/**\n * The default prompt options.\n */\nexport const defaultPrompt = [{\n    type: 'input',\n    name: 'rocAppName',\n    message: 'What\\'s the name of your application?',\n    default: 'my-roc-app',\n    filter: (input) => input.toLowerCase().split(' ').join('-')\n}, {\n    type: 'input',\n    name: 'rocAppDesc',\n    message: 'What\\'s the description for the application?',\n    default: 'My Roc Application'\n}, {\n    type: 'input',\n    name: 'rocAppAuthor',\n    message: 'Who\\'s the author of the application?',\n    default: 'John Doe'\n}, {\n    type: 'input',\n    name: 'rocAppLicense',\n    message: 'What\\'s the license for the application?',\n    default: 'MIT'\n}];\n"
  },
  {
    "__docId__": 21,
    "kind": "variable",
    "static": true,
    "variation": null,
    "name": "defaultPrompt",
    "memberof": "src/commands/helpers/default-prompt.js",
    "longname": "src/commands/helpers/default-prompt.js~defaultPrompt",
    "access": null,
    "export": true,
    "importPath": "roc/lib/commands/helpers/default-prompt.js",
    "importStyle": "{defaultPrompt}",
    "description": "The default prompt options.",
    "lineNumber": 6,
    "type": {
      "types": [
        "*"
      ]
    }
  },
  {
    "__docId__": 22,
    "kind": "file",
    "static": true,
    "variation": null,
    "name": "src/commands/helpers/general.js",
    "memberof": null,
    "longname": "src/commands/helpers/general.js",
    "access": null,
    "description": null,
    "lineNumber": 1,
    "content": "import 'source-map-support/register';\n\nimport { isObject } from 'lodash';\nimport { fileExists, getRocDependencies, getPackageJson } from '../../helpers';\n\n/**\n * Validates if a directory seems to be a Roc application project.\n * A valid Roc project should have a package.json file that contains some dependecy that match 'roc-*' or\n * a `roc.config.js` file.\n *\n * @param {string} directory - The directory to validate.\n *\n * @returns {boolean} - Whether or not it is a valid Roc project.\n */\nexport function validRocProject(directory) {\n    const packageJson = getPackageJson(directory);\n\n    return !(!isObject(packageJson) ||\n        !fileExists('roc.config.js', directory) && !getRocDependencies(packageJson).length);\n}\n"
  },
  {
    "__docId__": 23,
    "kind": "function",
    "static": true,
    "variation": null,
    "name": "validRocProject",
    "memberof": "src/commands/helpers/general.js",
    "longname": "src/commands/helpers/general.js~validRocProject",
    "access": null,
    "export": true,
    "importPath": "roc/lib/commands/helpers/general.js",
    "importStyle": "{validRocProject}",
    "description": "Validates if a directory seems to be a Roc application project.\nA valid Roc project should have a package.json file that contains some dependecy that match 'roc-*' or\na `roc.config.js` file.",
    "lineNumber": 15,
    "unknown": [
      {
        "tagName": "@returns",
        "tagValue": "{boolean} - Whether or not it is a valid Roc project."
      }
    ],
    "params": [
      {
        "nullable": null,
        "types": [
          "string"
        ],
        "spread": false,
        "optional": false,
        "name": "directory",
        "description": "The directory to validate."
      }
    ],
    "return": {
      "nullable": null,
      "types": [
        "boolean"
      ],
      "spread": false,
      "description": "Whether or not it is a valid Roc project."
    },
    "generator": false
  },
  {
    "__docId__": 24,
    "kind": "file",
    "static": true,
    "variation": null,
    "name": "src/commands/helpers/github.js",
    "memberof": null,
    "longname": "src/commands/helpers/github.js",
    "access": null,
    "description": null,
    "lineNumber": 1,
    "content": "import 'source-map-support/register';\n\nimport request from 'request';\nimport tar from 'tar';\nimport zlib from 'zlib';\nimport temp from 'temp';\n\n// Automatically track and cleanup files at exit\ntemp.track();\n\n/**\n * Fetches an array of all the tags for a Github repo, used as possible versions for a template.\n *\n * @param {string} packageName - A package name, expected to match \"username/repo\"\n *\n * @returns {object[]} - Array of tags/versions for the package\n */\nexport function getVersions(packageName) {\n    if (!packageName) {\n        throw new Error('No packageName was given.');\n    }\n\n    return new Promise((resolve, reject) => {\n        request.get({\n            url: `https://api.github.com/repos/${packageName}/tags`,\n            headers: {\n                'User-Agent': 'request'\n            }\n        }, (error, resp, body) => {\n            if (error) {\n                return reject(error);\n            }\n\n            if (resp.statusCode !== 200) {\n                return reject(new Error(packageName + ': returned ' + resp.statusCode + '\\n\\nbody:\\n' + body));\n            }\n\n            return resolve(JSON.parse(body));\n        });\n    });\n}\n\n/**\n * Fetches the tarball for a repository on Github.\n *\n * @param {string} packageName - A package name, expected to match \"username/repo\".\n * @param {string} [version=\"master\"] The tag/version to fetch.\n *\n * @returns {string} The path to the temporary directory where the unarchived tarball is located.\n */\nexport function get(packageName, version = 'master') {\n    if (!packageName) {\n        throw new Error('No packageName was given.');\n    }\n\n    return new Promise((resolve, reject) => {\n        temp.mkdir('roc', (err, dirPath) => {\n            if (err) {\n                return reject(err);\n            }\n\n            /* eslint-disable new-cap */\n            const writeTar = tar.Extract({strip: 1, path: dirPath});\n            /* eslint-enable */\n\n            writeTar.on('finish', () => resolve(dirPath));\n\n            request\n                .get(`http://github.com/${packageName}/tarball/${version}`)\n                .on('error', reject)\n                .pipe(zlib.createGunzip())\n                .on('error', reject)\n                .pipe(writeTar)\n                .on('error', reject);\n        });\n    });\n}\n"
  },
  {
    "__docId__": 25,
    "kind": "function",
    "static": true,
    "variation": null,
    "name": "getVersions",
    "memberof": "src/commands/helpers/github.js",
    "longname": "src/commands/helpers/github.js~getVersions",
    "access": null,
    "export": true,
    "importPath": "roc/lib/commands/helpers/github.js",
    "importStyle": "{getVersions}",
    "description": "Fetches an array of all the tags for a Github repo, used as possible versions for a template.",
    "lineNumber": 18,
    "unknown": [
      {
        "tagName": "@returns",
        "tagValue": "{object[]} - Array of tags/versions for the package"
      }
    ],
    "params": [
      {
        "nullable": null,
        "types": [
          "string"
        ],
        "spread": false,
        "optional": false,
        "name": "packageName",
        "description": "A package name, expected to match \"username/repo\""
      }
    ],
    "return": {
      "nullable": null,
      "types": [
        "object[]"
      ],
      "spread": false,
      "description": "Array of tags/versions for the package"
    },
    "generator": false
  },
  {
    "__docId__": 26,
    "kind": "function",
    "static": true,
    "variation": null,
    "name": "get",
    "memberof": "src/commands/helpers/github.js",
    "longname": "src/commands/helpers/github.js~get",
    "access": null,
    "export": true,
    "importPath": "roc/lib/commands/helpers/github.js",
    "importStyle": "{get}",
    "description": "Fetches the tarball for a repository on Github.",
    "lineNumber": 51,
    "unknown": [
      {
        "tagName": "@returns",
        "tagValue": "{string} The path to the temporary directory where the unarchived tarball is located."
      }
    ],
    "params": [
      {
        "nullable": null,
        "types": [
          "string"
        ],
        "spread": false,
        "optional": false,
        "name": "packageName",
        "description": "A package name, expected to match \"username/repo\"."
      },
      {
        "nullable": null,
        "types": [
          "string"
        ],
        "spread": false,
        "optional": true,
        "defaultValue": "\"master\"",
        "defaultRaw": "master",
        "name": "version",
        "description": "The tag/version to fetch."
      }
    ],
    "return": {
      "nullable": null,
      "types": [
        "string"
      ],
      "spread": false,
      "description": "The path to the temporary directory where the unarchived tarball is located."
    },
    "generator": false
  },
  {
    "__docId__": 27,
    "kind": "file",
    "static": true,
    "variation": null,
    "name": "src/commands/init.js",
    "memberof": null,
    "longname": "src/commands/init.js",
    "access": null,
    "description": null,
    "lineNumber": 1,
    "content": "import 'source-map-support/register';\n\nimport fs from 'fs-extra';\nimport path from 'path';\nimport { spawn } from 'child_process';\nimport inquirer from 'inquirer';\nimport replace from 'replace';\nimport chalk from 'chalk';\n\nimport { get, getVersions } from './helpers/github';\nimport { validRocProject } from './helpers/general';\nimport { error as styleError, warning, important, ok } from '../helpers/style';\n\n/* This should be fetched from a server!\n */\nconst templates = [{\n    name: 'Simple Roc App',\n    description: 'A simple start on a generic web application',\n    identifier: 'web',\n    repo: 'vgno/roc-template-web'\n}, {\n    name: 'Simple Roc React App',\n    description: 'A simple start on a React web application',\n    identifier: 'web-react',\n    repo: 'vgno/roc-template-web-react'\n}];\n\n/**\n * Command used to init a new Roc project.\n *\n * @param {rocCommandObject} parsedArguments - The Roc command object, uses parsedArguments from it.\n *\n * @returns {Promise} - Promise for the command.\n */\nexport default function init({ parsedOptions }) {\n    const { template, version } = parsedOptions.options;\n\n    // Make sure the directory is empty!\n    assertEmptyDir();\n\n    if (!template) {\n        return interativeMenu();\n    }\n\n    return fetchTemplate(template, version);\n\n    /*\n     * Helpers\n     */\n    function fetchTemplate(toFetch, selectVersion) {\n        if (toFetch.indexOf('/') === -1) {\n            const selectedTemplate = templates.find((elem) => elem.identifier === toFetch);\n            if (!selectedTemplate) {\n                console.log(styleError('Invalid template name given.'));\n                /* eslint-disable no-process-exit */\n                process.exit(1);\n                /* eslint-enable */\n            }\n\n            toFetch = selectedTemplate.repo;\n        }\n\n        return getVersions(toFetch)\n            .then((versions) => {\n                // If the name starts with a number we will automatically add 'v' infront of it to match Github default\n                if (selectVersion && !isNaN(Number(selectVersion.charAt(0))) && selectVersion.charAt(0) !== 'v') {\n                    selectVersion = `v${selectVersion}`;\n                }\n\n                const selectedVersion = versions.find((v) => v.name === selectVersion);\n                const actualVersion = selectedVersion && selectedVersion.name ||\n                    versions[0] && versions[0].name ||\n                    'master';\n\n                if (!selectedVersion && selectVersion) {\n                    console.log(\n                        warning(`Selected template version not found, using ${chalk.bold(actualVersion)}`)\n                    );\n                } else if (!selectedVersion) {\n                    console.log(important(`Using ${chalk.bold(actualVersion)} as template version`));\n                }\n\n                return get(toFetch, actualVersion);\n            })\n            .then((dirPath) => {\n                if (!validRocProject(path.join(dirPath, 'template'))) {\n                    /* eslint-disable no-process-exit */\n                    console.log(styleError('Seems like this is not a Roc template.'));\n                    process.exit(1);\n                    /* eslint-enable */\n                } else {\n                    console.log('\\nInstalling template setup dependencies…');\n                    return npmInstall(dirPath);\n                }\n            })\n            .then((dirPath) => {\n                inquirer.prompt(getPrompt(dirPath), (answers) => {\n                    replaceTemplatedValues(answers, dirPath);\n                    configureFiles(dirPath);\n\n                    console.log(`\\nInstalling template dependencies… ` +\n                        `${chalk.dim('(If this fails you can always try to run npm install directly)')}`);\n                    return npmInstall().then(() => {\n                        console.log(ok('\\nSetup completed!\\n'));\n                        console.log(`Start in dev mode by typing ${chalk.bold('roc dev')}`);\n                    });\n                });\n            })\n            .catch((error) => {\n                console.log(styleError('\\nAn error occured during init!\\n'));\n                console.error(error.stack);\n                /* eslint-disable no-process-exit */\n                process.exit(1);\n                /* eslint-enable */\n            });\n    }\n\n    function getPrompt(dirPath) {\n        try {\n            return require(path.join(dirPath, 'roc.setup.js')).prompt;\n        } catch (error) {\n            return require('./helpers/default-prompt').defaultPrompt;\n        }\n    }\n\n    function replaceTemplatedValues(answers, dirPath) {\n        Object.keys(answers).map((key) => {\n            replace({\n                regex: `{{\\\\s*${key}*\\\\s*}}`,\n                replacement: answers[key],\n                paths: [dirPath + '/template'],\n                recursive: true,\n                silent: true\n            });\n        });\n    }\n\n    function configureFiles(dirPath) {\n        // Rename package.json to .roc for history purposes\n        fs.renameSync(path.join(dirPath, 'package.json'), path.join(dirPath, 'template', '.roc'));\n\n        // Move everything inside template to the current working directory\n        fs.copySync(path.join(dirPath, 'template'), process.cwd());\n    }\n\n    function npmInstall(dirPath) {\n        return new Promise((resolve, reject) => {\n            dirPath = dirPath || process.cwd();\n            // Run npm install\n            const npm = spawn('npm', ['install'], {\n                cwd: dirPath,\n                stdio: 'inherit'\n            });\n\n            npm.on('close', function(code) {\n                if (code !== 0) {\n                    return reject(new Error('npm install failed with status code: ' + code));\n                }\n\n                return resolve(dirPath);\n            });\n        });\n    }\n\n    function interativeMenu() {\n        return new Promise((resolve) => {\n            const choices = templates.map((elem) => ({ name: elem.name, value: elem.identifier }));\n\n            inquirer.prompt([{\n                type: 'rawlist',\n                name: 'option',\n                message: 'Selected a type',\n                choices: choices\n            }], answers => {\n                resolve(fetchTemplate(answers.option));\n            });\n        });\n    }\n\n    function assertEmptyDir() {\n        if (fs.readdirSync(process.cwd()).length > 0) {\n            console.log(styleError('You need to call this command from an empty directory.'));\n            /* eslint-disable no-process-exit */\n            process.exit(1);\n            /* eslint-enable */\n        }\n    }\n}\n"
  },
  {
    "__docId__": 28,
    "kind": "variable",
    "static": true,
    "variation": null,
    "name": "templates",
    "memberof": "src/commands/init.js",
    "longname": "src/commands/init.js~templates",
    "access": null,
    "export": false,
    "importPath": "roc/lib/commands/init.js",
    "importStyle": null,
    "description": null,
    "lineNumber": 16,
    "undocument": true,
    "type": {
      "types": [
        "*"
      ]
    }
  },
  {
    "__docId__": 29,
    "kind": "function",
    "static": true,
    "variation": null,
    "name": "init",
    "memberof": "src/commands/init.js",
    "longname": "src/commands/init.js~init",
    "access": null,
    "export": true,
    "importPath": "roc/lib/commands/init.js",
    "importStyle": "init",
    "description": "Command used to init a new Roc project.",
    "lineNumber": 35,
    "unknown": [
      {
        "tagName": "@returns",
        "tagValue": "{Promise} - Promise for the command."
      }
    ],
    "params": [
      {
        "nullable": null,
        "types": [
          "rocCommandObject"
        ],
        "spread": false,
        "optional": false,
        "name": "parsedArguments",
        "description": "The Roc command object, uses parsedArguments from it."
      }
    ],
    "return": {
      "nullable": null,
      "types": [
        "Promise"
      ],
      "spread": false,
      "description": "Promise for the command."
    },
    "generator": false
  },
  {
    "__docId__": 30,
    "kind": "file",
    "static": true,
    "variation": null,
    "name": "src/configuration/helpers.js",
    "memberof": null,
    "longname": "src/configuration/helpers.js",
    "access": null,
    "description": null,
    "lineNumber": 1,
    "content": "import 'source-map-support/register';\n\nimport fs from 'fs';\nimport chalk from 'chalk';\n\nimport { getAbsolutePath } from '../helpers';\nimport { error as styleError, warning } from '../helpers/style';\n\n/* Make sure that we only print some feedback once */\nlet onceApp = true;\n\n/**\n * Gets the application configuration by reading a file.\n *\n * Will give a warning if ROC_CONFIG_PATH has been set since that will then be used as the path to get the configuration\n * file, even if one is provided to the function.\n *\n * Reads configuration files in this manner:\n * 1. Environment variable ROC_CONFIG_PATH.\n * 2. Path given as applicationConfigPath.\n * 3. Default by trying to read \"roc.config.js\" in the current working directory.\n * 4. Return a empty object along with a warning.\n *\n * @param {string} applicationConfigPath - Path to application configuration file. Can be either relative or absolute.\n * @param {string} [directory=process.cwd()] - The directory to resolve realative paths to. By default will use the\n *     current working directory.\n * @param {boolean} [debug=false] - If extra information should be printed.\n *\n * @returns {object} - The application configuration object.\n * @throws {Error} - When an invalid path override is specified.\n */\nexport function getApplicationConfig(applicationConfigPath, directory = process.cwd(), debug = false) {\n    const configPath = getAbsolutePath(process.env.ROC_CONFIG_PATH || applicationConfigPath, directory);\n\n    if (onceApp && applicationConfigPath && process.env.ROC_CONFIG_PATH) {\n        onceApp = false;\n        console.log(\n            styleError('You have configured a location for the application configuration file but the ' +\n            'environment variable ' + chalk.bold('ROC_CONFIG_PATH') + ' is set and that will be used instead. The ' +\n            'path that will be used is ' + configPath)\n        , '\\n');\n    }\n\n    try {\n        if (configPath) {\n            const stats = fs.statSync(configPath);\n            if (!stats.isFile()) {\n                throw new Error('Not a file.');\n            }\n        }\n    } catch (err) {\n        throwUnaccessableFile(configPath);\n    }\n\n    // Return correct project configuration with fallback to empty object\n    const appConfigPath = configPath || getAbsolutePath('roc.config.js', directory);\n    try {\n        const config = require(appConfigPath);\n\n        if (Object.keys(config).length === 0) {\n            console.log(warning('The configuration file at ' + chalk.bold(appConfigPath) + ' was empty.'));\n        }\n\n        return config;\n    } catch (error) {\n        if (debug) {\n            console.log(warning('Could not read the configuration file at ' + chalk.bold(appConfigPath)));\n        }\n        return {};\n    }\n}\n\nfunction throwUnaccessableFile(configPath) {\n    throw new Error(`Configuration path points to unaccessable file: ${configPath}`);\n}\n"
  },
  {
    "__docId__": 31,
    "kind": "variable",
    "static": true,
    "variation": null,
    "name": "onceApp",
    "memberof": "src/configuration/helpers.js",
    "longname": "src/configuration/helpers.js~onceApp",
    "access": null,
    "export": false,
    "importPath": "roc/lib/configuration/helpers.js",
    "importStyle": null,
    "description": null,
    "lineNumber": 10,
    "undocument": true,
    "type": {
      "types": [
        "boolean"
      ]
    }
  },
  {
    "__docId__": 32,
    "kind": "function",
    "static": true,
    "variation": null,
    "name": "getApplicationConfig",
    "memberof": "src/configuration/helpers.js",
    "longname": "src/configuration/helpers.js~getApplicationConfig",
    "access": null,
    "export": true,
    "importPath": "roc/lib/configuration/helpers.js",
    "importStyle": "{getApplicationConfig}",
    "description": "Gets the application configuration by reading a file.\n\nWill give a warning if ROC_CONFIG_PATH has been set since that will then be used as the path to get the configuration\nfile, even if one is provided to the function.\n\nReads configuration files in this manner:\n1. Environment variable ROC_CONFIG_PATH.\n2. Path given as applicationConfigPath.\n3. Default by trying to read \"roc.config.js\" in the current working directory.\n4. Return a empty object along with a warning.",
    "lineNumber": 32,
    "unknown": [
      {
        "tagName": "@returns",
        "tagValue": "{object} - The application configuration object."
      }
    ],
    "params": [
      {
        "nullable": null,
        "types": [
          "string"
        ],
        "spread": false,
        "optional": false,
        "name": "applicationConfigPath",
        "description": "Path to application configuration file. Can be either relative or absolute."
      },
      {
        "nullable": null,
        "types": [
          "string"
        ],
        "spread": false,
        "optional": true,
        "defaultValue": "process.cwd()",
        "defaultRaw": "process.cwd()",
        "name": "directory",
        "description": "The directory to resolve realative paths to. By default will use the\n    current working directory."
      },
      {
        "nullable": null,
        "types": [
          "boolean"
        ],
        "spread": false,
        "optional": true,
        "defaultValue": "false",
        "defaultRaw": false,
        "name": "debug",
        "description": "If extra information should be printed."
      }
    ],
    "return": {
      "nullable": null,
      "types": [
        "object"
      ],
      "spread": false,
      "description": "The application configuration object."
    },
    "throws": [
      {
        "types": [
          "Error"
        ],
        "description": "When an invalid path override is specified."
      }
    ],
    "generator": false
  },
  {
    "__docId__": 33,
    "kind": "function",
    "static": true,
    "variation": null,
    "name": "throwUnaccessableFile",
    "memberof": "src/configuration/helpers.js",
    "longname": "src/configuration/helpers.js~throwUnaccessableFile",
    "access": null,
    "export": false,
    "importPath": "roc/lib/configuration/helpers.js",
    "importStyle": null,
    "description": null,
    "lineNumber": 73,
    "undocument": true,
    "params": [
      {
        "name": "configPath",
        "types": [
          "*"
        ]
      }
    ],
    "generator": false
  },
  {
    "__docId__": 34,
    "kind": "file",
    "static": true,
    "variation": null,
    "name": "src/configuration/index.js",
    "memberof": null,
    "longname": "src/configuration/index.js",
    "access": null,
    "description": null,
    "lineNumber": 1,
    "content": "import 'source-map-support/register';\n\nimport deepExtend from 'deep-extend';\n\nimport { warning } from '../helpers/style';\n\n/* Make sure that we only print some feedback once */\nlet onceSettings = true;\n\n/* Using global variables here to make sure that we can access the values set from different projects.\n * This guarantees that the variables will live outside the require cache, something that we need for stability.\n */\nglobal.rocConfig = global.rocConfig || {};\n\n/**\n * Merges two configuration objects.\n *\n * @param {!Object} a - Configuration object to base the merge on.\n * @param {!Object} b - Configuration object that is merged into the first, overwriting the first one.\n *\n * @returns {Object} - The merged configuration object\n */\nexport function merge(a, b) {\n    return deepExtend({}, a, b);\n}\n\n/**\n * Gets the current configuration object.\n *\n * @returns {rocConfig} - The application configuration object.\n */\nexport function getConfig() {\n    if (onceSettings && process.env.ROC_CONFIG_SETTINGS) {\n        onceSettings = false;\n\n        if (global.rocConfig.settings && Object.keys(global.rocConfig.settings).length > 0 &&\n            process.env.ROC_CONFIG_SETTINGS\n        ) {\n            console.log(\n                warning('You have settings defined on the environment variable ROC_CONFIG_SETTINGS ' +\n                'and they will be appended to the settings. Will append the following:\\n' +\n                JSON.stringify(process.env.ROC_CONFIG_SETTINGS, null, 2))\n            , '\\n');\n        }\n\n        appendSettings(JSON.parse(process.env.ROC_CONFIG_SETTINGS));\n    }\n\n    return global.rocConfig;\n}\n\n/**\n * Gets the settings in the configuration object.\n *\n * Will by default get all settings.\n *\n * @param {string} [key] - The settings key to fetch.\n *\n * @returns {rocSettings|Object} - The application settings object.\n */\nexport function getSettings(key) {\n    const settings = getConfig().settings;\n    return key ? settings[key] : settings;\n}\n\n/**\n * Appends settings to the configuration object.\n *\n * Will merge with the already existing settings object meaning that this function can be called multiple times and\n * the settings will be a merge of all those calls.\n *\n * @param {!rocSettings} settingsObject - A settings object.\n *\n * @returns {rocSettings} - The settings object.\n */\nexport function appendSettings(settingsObject) {\n    global.rocConfig = merge(getConfig(), { settings: settingsObject });\n    return getSettings();\n}\n\n/**\n * Appends to the configuration object.\n *\n * Will merge with the already existing configuration object meaning that this function can be called multiple times and\n * the configuration will be a merge of all those calls.\n *\n * @param {!rocConfig} configObject - A configuration object.\n *\n * @returns {rocConfig} - The configuration object.\n */\nexport function appendConfig(configObject) {\n    global.rocConfig = merge(getConfig(), configObject);\n    return getConfig();\n}\n"
  },
  {
    "__docId__": 35,
    "kind": "variable",
    "static": true,
    "variation": null,
    "name": "onceSettings",
    "memberof": "src/configuration/index.js",
    "longname": "src/configuration/index.js~onceSettings",
    "access": null,
    "export": false,
    "importPath": "roc/lib/configuration/index.js",
    "importStyle": null,
    "description": null,
    "lineNumber": 8,
    "undocument": true,
    "type": {
      "types": [
        "boolean"
      ]
    }
  },
  {
    "__docId__": 36,
    "kind": "function",
    "static": true,
    "variation": null,
    "name": "merge",
    "memberof": "src/configuration/index.js",
    "longname": "src/configuration/index.js~merge",
    "access": null,
    "export": true,
    "importPath": "roc/lib/configuration/index.js",
    "importStyle": "{merge}",
    "description": "Merges two configuration objects.",
    "lineNumber": 23,
    "unknown": [
      {
        "tagName": "@returns",
        "tagValue": "{Object} - The merged configuration object"
      }
    ],
    "params": [
      {
        "nullable": false,
        "types": [
          "Object"
        ],
        "spread": false,
        "optional": false,
        "name": "a",
        "description": "Configuration object to base the merge on."
      },
      {
        "nullable": false,
        "types": [
          "Object"
        ],
        "spread": false,
        "optional": false,
        "name": "b",
        "description": "Configuration object that is merged into the first, overwriting the first one."
      }
    ],
    "return": {
      "nullable": null,
      "types": [
        "Object"
      ],
      "spread": false,
      "description": "The merged configuration object"
    },
    "generator": false
  },
  {
    "__docId__": 37,
    "kind": "function",
    "static": true,
    "variation": null,
    "name": "getConfig",
    "memberof": "src/configuration/index.js",
    "longname": "src/configuration/index.js~getConfig",
    "access": null,
    "export": true,
    "importPath": "roc/lib/configuration/index.js",
    "importStyle": "{getConfig}",
    "description": "Gets the current configuration object.",
    "lineNumber": 32,
    "unknown": [
      {
        "tagName": "@returns",
        "tagValue": "{rocConfig} - The application configuration object."
      }
    ],
    "params": [],
    "return": {
      "nullable": null,
      "types": [
        "rocConfig"
      ],
      "spread": false,
      "description": "The application configuration object."
    },
    "generator": false
  },
  {
    "__docId__": 38,
    "kind": "function",
    "static": true,
    "variation": null,
    "name": "getSettings",
    "memberof": "src/configuration/index.js",
    "longname": "src/configuration/index.js~getSettings",
    "access": null,
    "export": true,
    "importPath": "roc/lib/configuration/index.js",
    "importStyle": "{getSettings}",
    "description": "Gets the settings in the configuration object.\n\nWill by default get all settings.",
    "lineNumber": 61,
    "unknown": [
      {
        "tagName": "@returns",
        "tagValue": "{rocSettings|Object} - The application settings object."
      }
    ],
    "params": [
      {
        "nullable": null,
        "types": [
          "string"
        ],
        "spread": false,
        "optional": true,
        "name": "key",
        "description": "The settings key to fetch."
      }
    ],
    "return": {
      "nullable": null,
      "types": [
        "rocSettings",
        "Object"
      ],
      "spread": false,
      "description": "The application settings object."
    },
    "generator": false
  },
  {
    "__docId__": 39,
    "kind": "function",
    "static": true,
    "variation": null,
    "name": "appendSettings",
    "memberof": "src/configuration/index.js",
    "longname": "src/configuration/index.js~appendSettings",
    "access": null,
    "export": true,
    "importPath": "roc/lib/configuration/index.js",
    "importStyle": "{appendSettings}",
    "description": "Appends settings to the configuration object.\n\nWill merge with the already existing settings object meaning that this function can be called multiple times and\nthe settings will be a merge of all those calls.",
    "lineNumber": 76,
    "unknown": [
      {
        "tagName": "@returns",
        "tagValue": "{rocSettings} - The settings object."
      }
    ],
    "params": [
      {
        "nullable": false,
        "types": [
          "rocSettings"
        ],
        "spread": false,
        "optional": false,
        "name": "settingsObject",
        "description": "A settings object."
      }
    ],
    "return": {
      "nullable": null,
      "types": [
        "rocSettings"
      ],
      "spread": false,
      "description": "The settings object."
    },
    "generator": false
  },
  {
    "__docId__": 40,
    "kind": "function",
    "static": true,
    "variation": null,
    "name": "appendConfig",
    "memberof": "src/configuration/index.js",
    "longname": "src/configuration/index.js~appendConfig",
    "access": null,
    "export": true,
    "importPath": "roc/lib/configuration/index.js",
    "importStyle": "{appendConfig}",
    "description": "Appends to the configuration object.\n\nWill merge with the already existing configuration object meaning that this function can be called multiple times and\nthe configuration will be a merge of all those calls.",
    "lineNumber": 91,
    "unknown": [
      {
        "tagName": "@returns",
        "tagValue": "{rocConfig} - The configuration object."
      }
    ],
    "params": [
      {
        "nullable": false,
        "types": [
          "rocConfig"
        ],
        "spread": false,
        "optional": false,
        "name": "configObject",
        "description": "A configuration object."
      }
    ],
    "return": {
      "nullable": null,
      "types": [
        "rocConfig"
      ],
      "spread": false,
      "description": "The configuration object."
    },
    "generator": false
  },
  {
    "__docId__": 41,
    "kind": "file",
    "static": true,
    "variation": null,
    "name": "src/documentation/build-documentation-object.js",
    "memberof": null,
    "longname": "src/documentation/build-documentation-object.js",
    "access": null,
    "description": null,
    "lineNumber": 1,
    "content": "import 'source-map-support/register';\n\nimport { isPlainObject, isFunction } from 'lodash';\n\nimport { toCliFlag } from './helpers';\n\nconst defaultValidation = (input, info) => info ? {type: 'Unknown'} : true;\n\n/**\n * Creates a {@link rocDocumentationObject}.\n *\n * @param {Object} initalObject - The object to create a {@link rocDocumentationObject} of.\n * @param {rocMetaSettings} meta - The meta object to use.\n * @param {string[]} [initalFilter=[]] - The groups that should be used, will default to all groups.\n *\n * @returns {rocDocumentationObject} - The completed documentation object.\n */\nexport default function buildDocumentationObject(initalObject, meta = {}, initalFilter = []) {\n    const allObjects = (object, callback) => {\n        return Object.keys(object).map(callback).filter((value) => value !== undefined);\n    };\n\n    const manageGroup = (object, name, group = {}, description = {}, validation = {}, parents, level) => {\n        const groupDescription = isPlainObject(group) ? undefined : group;\n        return {\n            name,\n            level,\n            description: groupDescription,\n            objects: recursiveHelper(object, group, description, validation, [], parents, level + 1, true),\n            children: recursiveHelper(object, group, description, validation, [], parents, level + 1)\n        };\n    };\n\n    const manageLeaf = (object, name, description, validation = defaultValidation, parents) => {\n        const { type = 'Unknown', required = false } = isFunction(validation) ?\n            validation(null, true) :\n            ({type: validation.toString(), req: false });\n\n        return {\n            name,\n            description,\n            type,\n            required,\n            path: parents.join('.'),\n            cli: toCliFlag(parents),\n            defaultValue: object,\n            validator: validation\n        };\n    };\n\n    function recursiveHelper(object, groups = {}, descriptions = {}, validations = {}, filter = [],\n        initalParents = [], level = 0, leaves = false) {\n        return allObjects(object, (key) => {\n            // Make sure that we either have no filter or that there is a match\n            if (filter.length === 0 || filter.indexOf(key) !== -1) {\n                const parents = [].concat(initalParents, key);\n                const value = object[key];\n                if (isPlainObject(value) && Object.keys(value).length > 0 && !leaves) {\n                    return manageGroup(value, key, groups[key], descriptions[key], validations[key], parents, level);\n                } else if ((!isPlainObject(value) || Object.keys(value).length === 0) && leaves) {\n                    return manageLeaf(value, key, descriptions[key], validations[key], parents);\n                }\n            }\n        });\n    }\n\n    return recursiveHelper(initalObject, meta.groups, meta.descriptions, meta.validations, initalFilter);\n}\n"
  },
  {
    "__docId__": 42,
    "kind": "variable",
    "static": true,
    "variation": null,
    "name": "defaultValidation",
    "memberof": "src/documentation/build-documentation-object.js",
    "longname": "src/documentation/build-documentation-object.js~defaultValidation",
    "access": null,
    "export": false,
    "importPath": "roc/lib/documentation/build-documentation-object.js",
    "importStyle": null,
    "description": null,
    "lineNumber": 7,
    "undocument": true,
    "type": {
      "types": [
        "*"
      ]
    }
  },
  {
    "__docId__": 43,
    "kind": "function",
    "static": true,
    "variation": null,
    "name": "buildDocumentationObject",
    "memberof": "src/documentation/build-documentation-object.js",
    "longname": "src/documentation/build-documentation-object.js~buildDocumentationObject",
    "access": null,
    "export": true,
    "importPath": "roc/lib/documentation/build-documentation-object.js",
    "importStyle": "buildDocumentationObject",
    "description": "Creates a {@link rocDocumentationObject}.",
    "lineNumber": 18,
    "unknown": [
      {
        "tagName": "@returns",
        "tagValue": "{rocDocumentationObject} - The completed documentation object."
      }
    ],
    "params": [
      {
        "nullable": null,
        "types": [
          "Object"
        ],
        "spread": false,
        "optional": false,
        "name": "initalObject",
        "description": "The object to create a {@link rocDocumentationObject} of."
      },
      {
        "nullable": null,
        "types": [
          "rocMetaSettings"
        ],
        "spread": false,
        "optional": false,
        "name": "meta",
        "description": "The meta object to use."
      },
      {
        "nullable": null,
        "types": [
          "string[]"
        ],
        "spread": false,
        "optional": true,
        "defaultValue": "[]",
        "defaultRaw": [],
        "name": "initalFilter",
        "description": "The groups that should be used, will default to all groups."
      }
    ],
    "return": {
      "nullable": null,
      "types": [
        "rocDocumentationObject"
      ],
      "spread": false,
      "description": "The completed documentation object."
    },
    "generator": false
  },
  {
    "__docId__": 44,
    "kind": "file",
    "static": true,
    "variation": null,
    "name": "src/documentation/generate-table.js",
    "memberof": null,
    "longname": "src/documentation/generate-table.js",
    "access": null,
    "description": null,
    "lineNumber": 1,
    "content": "import 'source-map-support/register';\n\nimport deepExtend from 'deep-extend';\nimport { isUndefined } from 'lodash';\nimport stripAnsi from 'strip-ansi';\n\nimport { pad, addPadding } from './helpers';\n\nconst defaultSettings = {\n    groupTitleWrapper: (name) => name,\n    cellDivider: '|',\n    rowWrapper: (input) => `|${input}|`,\n    cellWrapper: (input) => ` ${input} `,\n    header: true,\n    compact: false\n};\n\n/**\n * Creates a table based on a {@link rocDocumentationObject}.\n *\n * @param {rocDocumentationObject} initalDocumentationObject - The documentation object to create a table of.\n * @param {rocTableHeader} header - Header object to use.\n * @param {rocTableSettings} settings - The settings to use.\n *\n * @returns {string} - A table.\n */\nexport default function generateTable(initalDocumentationObject, header, settings) {\n    settings = deepExtend({}, defaultSettings, settings);\n    const headerLengths = createLengthObject(header, header, {}, true);\n    const lengths = createLengthObject(initalDocumentationObject, header, headerLengths);\n\n    const printTableCell = (key, element, renderer = (input) => input || '', fill = false) => {\n        if (fill) {\n            return settings.cellWrapper(pad(lengths[key], '-'));\n        }\n        const padding = isUndefined(header[key].padding) ? true : header[key].padding;\n        const text = padding ?\n            addPadding(renderer(element), lengths[key]) :\n            renderer(element);\n\n        return settings.cellWrapper(text);\n    };\n\n    const printTableRow = (object, isHeader = false) => {\n        return settings.rowWrapper(Object.keys(header).map((key) => {\n            const { value, renderer } = getValueAndRenderer(isHeader, header[key], object[key]);\n\n            return printTableCell(key, value, renderer);\n        }).join(settings.cellDivider));\n    };\n\n    const printTableSplitter = () => {\n        return settings.rowWrapper(Object.keys(header).map((key) =>\n            printTableCell(key, undefined, undefined, true)\n        ).join(settings.cellDivider));\n    };\n\n    const printTableHead = (name, description, level = 0) => {\n        const rows = [];\n        rows.push(settings.groupTitleWrapper(name, level));\n\n        if (description) {\n            rows.push(description);\n        }\n\n        // Add a new empty row\n        rows.push('');\n\n        if (settings.header) {\n            rows.push(printTableRow(header, true));\n            rows.push(printTableSplitter());\n        }\n\n        return rows;\n    };\n\n    const recursiveHelper = (documentationObject = []) => {\n        const spacing = settings.compact ? [] : [''];\n\n        return documentationObject.map((group) => {\n            let rows = [];\n            const level = group.level || 0;\n\n            if (level === 0 || !settings.compact) {\n                rows = rows.concat(printTableHead(group.name, group.description, level));\n            }\n\n            rows = rows.concat(group.objects.map((element) =>\n                printTableRow(element)));\n\n            rows = rows.concat(recursiveHelper(group.children));\n\n            if (level === 0 && settings.compact) {\n                rows.push('');\n            }\n\n            return rows;\n        }).reduce((a, b) => a.concat(b), spacing);\n    };\n\n    return recursiveHelper(initalDocumentationObject).join('\\n');\n}\n\nfunction createLengthObject(initalElements, header, initalLengths, isHeader = false) {\n    const getObjectLength = (object, renderer = (input) => input) => {\n        return stripAnsi(renderer(object)).length;\n    };\n\n    const getLength = (newLength, currentLength = 0) => {\n        return newLength > currentLength ? newLength : currentLength;\n    };\n\n    const recursiveHelper = (elements = [], lengths = {}) => {\n        let newLengths = { ...lengths };\n        elements.forEach((element) => {\n            element.objects.forEach((object) => {\n                Object.keys(header).forEach((key) => {\n                    const { value, renderer } = getValueAndRenderer(isHeader, header[key], object[key]);\n                    if (value) {\n                        newLengths[key] = getLength(getObjectLength(value, renderer), newLengths[key]);\n                    }\n                });\n            });\n\n            newLengths = recursiveHelper(element.children, newLengths);\n        });\n\n        return newLengths;\n    };\n\n    // Make sure the data matches the expected format\n    if (!Array.isArray(initalElements)) {\n        initalElements = [{objects: [initalElements], children: []}];\n    }\n\n    return recursiveHelper(initalElements, initalLengths);\n}\n\nfunction getValueAndRenderer(isHeader, headerObject, object) {\n    const value = isHeader ? object.name : object;\n    const renderer = isHeader ? (input) => input : headerObject.renderer;\n\n    return {\n        value,\n        renderer\n    };\n}\n"
  },
  {
    "__docId__": 45,
    "kind": "variable",
    "static": true,
    "variation": null,
    "name": "defaultSettings",
    "memberof": "src/documentation/generate-table.js",
    "longname": "src/documentation/generate-table.js~defaultSettings",
    "access": null,
    "export": false,
    "importPath": "roc/lib/documentation/generate-table.js",
    "importStyle": null,
    "description": null,
    "lineNumber": 9,
    "undocument": true,
    "type": {
      "types": [
        "*"
      ]
    }
  },
  {
    "__docId__": 46,
    "kind": "function",
    "static": true,
    "variation": null,
    "name": "generateTable",
    "memberof": "src/documentation/generate-table.js",
    "longname": "src/documentation/generate-table.js~generateTable",
    "access": null,
    "export": true,
    "importPath": "roc/lib/documentation/generate-table.js",
    "importStyle": "generateTable",
    "description": "Creates a table based on a {@link rocDocumentationObject}.",
    "lineNumber": 27,
    "unknown": [
      {
        "tagName": "@returns",
        "tagValue": "{string} - A table."
      }
    ],
    "params": [
      {
        "nullable": null,
        "types": [
          "rocDocumentationObject"
        ],
        "spread": false,
        "optional": false,
        "name": "initalDocumentationObject",
        "description": "The documentation object to create a table of."
      },
      {
        "nullable": null,
        "types": [
          "rocTableHeader"
        ],
        "spread": false,
        "optional": false,
        "name": "header",
        "description": "Header object to use."
      },
      {
        "nullable": null,
        "types": [
          "rocTableSettings"
        ],
        "spread": false,
        "optional": false,
        "name": "settings",
        "description": "The settings to use."
      }
    ],
    "return": {
      "nullable": null,
      "types": [
        "string"
      ],
      "spread": false,
      "description": "A table."
    },
    "generator": false
  },
  {
    "__docId__": 47,
    "kind": "function",
    "static": true,
    "variation": null,
    "name": "createLengthObject",
    "memberof": "src/documentation/generate-table.js",
    "longname": "src/documentation/generate-table.js~createLengthObject",
    "access": null,
    "export": false,
    "importPath": "roc/lib/documentation/generate-table.js",
    "importStyle": null,
    "description": null,
    "lineNumber": 104,
    "undocument": true,
    "params": [
      {
        "name": "initalElements",
        "types": [
          "*"
        ]
      },
      {
        "name": "header",
        "types": [
          "*"
        ]
      },
      {
        "name": "initalLengths",
        "types": [
          "*"
        ]
      },
      {
        "name": "isHeader",
        "optional": true,
        "types": [
          "boolean"
        ],
        "defaultRaw": false,
        "defaultValue": "false"
      }
    ],
    "return": {
      "types": [
        "*"
      ]
    },
    "generator": false
  },
  {
    "__docId__": 48,
    "kind": "function",
    "static": true,
    "variation": null,
    "name": "getValueAndRenderer",
    "memberof": "src/documentation/generate-table.js",
    "longname": "src/documentation/generate-table.js~getValueAndRenderer",
    "access": null,
    "export": false,
    "importPath": "roc/lib/documentation/generate-table.js",
    "importStyle": null,
    "description": null,
    "lineNumber": 139,
    "undocument": true,
    "params": [
      {
        "name": "isHeader",
        "types": [
          "*"
        ]
      },
      {
        "name": "headerObject",
        "types": [
          "*"
        ]
      },
      {
        "name": "object",
        "types": [
          "*"
        ]
      }
    ],
    "return": {
      "types": [
        "*"
      ]
    },
    "generator": false
  },
  {
    "__docId__": 49,
    "kind": "file",
    "static": true,
    "variation": null,
    "name": "src/documentation/helpers.js",
    "memberof": null,
    "longname": "src/documentation/helpers.js",
    "access": null,
    "description": null,
    "lineNumber": 1,
    "content": "import 'source-map-support/register';\n\nimport stripAnsi from 'strip-ansi';\nimport { isPlainObject, isString } from 'lodash';\n\n/**\n * Returns a string to pad with.\n *\n * @param {number} length - The desired length of the generated string.\n * @param {string} [character=\" \"] - The character to repat.\n *\n * @returns {string} - A string matching the input.\n */\nexport function pad(length, character = ' ') {\n    return Array(length + 1).join(character);\n}\n\n/**\n * Pads a string to a given length with spaces.\n *\n * @param {string} string - The string to be padded.\n * @param {number} length - The desired length of the new string.\n *\n * @returns {string} - A string matching the input.\n */\nexport function addPadding(string, length) {\n    string = string || '';\n    return string + pad(length - stripAnsi(string).length);\n}\n\n/**\n * Takes a configuration path array and convertes it to a cli flag.\n *\n * @param {string[]} configPaths - The configuration path, a array consiting of properties.\n *\n * @returns {string} - The cli flag to set the given configuration option.\n */\nexport function toCliFlag(configPaths) {\n    // Runtime should be added directly\n    if (configPaths[0] === 'runtime') {\n        configPaths.shift();\n    }\n    return '--' + configPaths.join('-');\n}\n\n/**\n * Converts an object to a string.\n *\n * @param {Object} object - The object to convert to a string.\n *\n * @returns {string|null} - The converted object or null if the object is empty.\n */\nexport function getDefaultValue(object) {\n    if (Array.isArray(object) && !object.length ||\n        isString(object) && !object ||\n        isPlainObject(object) && Object.keys(object).length === 0) {\n        return null;\n    }\n\n    return JSON.stringify(object);\n}\n"
  },
  {
    "__docId__": 50,
    "kind": "function",
    "static": true,
    "variation": null,
    "name": "pad",
    "memberof": "src/documentation/helpers.js",
    "longname": "src/documentation/helpers.js~pad",
    "access": null,
    "export": true,
    "importPath": "roc/lib/documentation/helpers.js",
    "importStyle": "{pad}",
    "description": "Returns a string to pad with.",
    "lineNumber": 14,
    "unknown": [
      {
        "tagName": "@returns",
        "tagValue": "{string} - A string matching the input."
      }
    ],
    "params": [
      {
        "nullable": null,
        "types": [
          "number"
        ],
        "spread": false,
        "optional": false,
        "name": "length",
        "description": "The desired length of the generated string."
      },
      {
        "nullable": null,
        "types": [
          "string"
        ],
        "spread": false,
        "optional": true,
        "defaultValue": "\"",
        "defaultRaw": "\"",
        "name": "character",
        "description": "\"] - The character to repat."
      }
    ],
    "return": {
      "nullable": null,
      "types": [
        "string"
      ],
      "spread": false,
      "description": "A string matching the input."
    },
    "generator": false
  },
  {
    "__docId__": 51,
    "kind": "function",
    "static": true,
    "variation": null,
    "name": "addPadding",
    "memberof": "src/documentation/helpers.js",
    "longname": "src/documentation/helpers.js~addPadding",
    "access": null,
    "export": true,
    "importPath": "roc/lib/documentation/helpers.js",
    "importStyle": "{addPadding}",
    "description": "Pads a string to a given length with spaces.",
    "lineNumber": 26,
    "unknown": [
      {
        "tagName": "@returns",
        "tagValue": "{string} - A string matching the input."
      }
    ],
    "params": [
      {
        "nullable": null,
        "types": [
          "string"
        ],
        "spread": false,
        "optional": false,
        "name": "string",
        "description": "The string to be padded."
      },
      {
        "nullable": null,
        "types": [
          "number"
        ],
        "spread": false,
        "optional": false,
        "name": "length",
        "description": "The desired length of the new string."
      }
    ],
    "return": {
      "nullable": null,
      "types": [
        "string"
      ],
      "spread": false,
      "description": "A string matching the input."
    },
    "generator": false
  },
  {
    "__docId__": 52,
    "kind": "function",
    "static": true,
    "variation": null,
    "name": "toCliFlag",
    "memberof": "src/documentation/helpers.js",
    "longname": "src/documentation/helpers.js~toCliFlag",
    "access": null,
    "export": true,
    "importPath": "roc/lib/documentation/helpers.js",
    "importStyle": "{toCliFlag}",
    "description": "Takes a configuration path array and convertes it to a cli flag.",
    "lineNumber": 38,
    "unknown": [
      {
        "tagName": "@returns",
        "tagValue": "{string} - The cli flag to set the given configuration option."
      }
    ],
    "params": [
      {
        "nullable": null,
        "types": [
          "string[]"
        ],
        "spread": false,
        "optional": false,
        "name": "configPaths",
        "description": "The configuration path, a array consiting of properties."
      }
    ],
    "return": {
      "nullable": null,
      "types": [
        "string"
      ],
      "spread": false,
      "description": "The cli flag to set the given configuration option."
    },
    "generator": false
  },
  {
    "__docId__": 53,
    "kind": "function",
    "static": true,
    "variation": null,
    "name": "getDefaultValue",
    "memberof": "src/documentation/helpers.js",
    "longname": "src/documentation/helpers.js~getDefaultValue",
    "access": null,
    "export": true,
    "importPath": "roc/lib/documentation/helpers.js",
    "importStyle": "{getDefaultValue}",
    "description": "Converts an object to a string.",
    "lineNumber": 53,
    "unknown": [
      {
        "tagName": "@returns",
        "tagValue": "{string|null} - The converted object or null if the object is empty."
      }
    ],
    "params": [
      {
        "nullable": null,
        "types": [
          "Object"
        ],
        "spread": false,
        "optional": false,
        "name": "object",
        "description": "The object to convert to a string."
      }
    ],
    "return": {
      "nullable": null,
      "types": [
        "string",
        "null"
      ],
      "spread": false,
      "description": "The converted object or null if the object is empty."
    },
    "generator": false
  },
  {
    "__docId__": 54,
    "kind": "file",
    "static": true,
    "variation": null,
    "name": "src/documentation/index.js",
    "memberof": null,
    "longname": "src/documentation/index.js",
    "access": null,
    "description": null,
    "lineNumber": 1,
    "content": "import 'source-map-support/register';\n\nimport { escape } from 'lodash';\n\nimport buildDocumentationObject from '../documentation/build-documentation-object';\nimport generateTable from '../documentation/generate-table';\nimport { pad, getDefaultValue } from '../documentation/helpers';\nimport { error as styleError, warning, ok } from '../helpers/style';\n\n/**\n * Generates markdown documentation for the provided configuration object.\n *\n * @param {rocConfig} config - The configuration object to generate documentation for.\n * @param {rocMetaConfig} metaConfig - The meta configuration object that has information about the config object.\n * @param {string[]} [filter=[]] - The groups that should be includes, by default all will be used.\n *\n * @returns {string} - A markdown table as a string.\n */\nexport function generateMarkdownDocumentation({ settings }, { settings: meta }, filter = []) {\n    const documentationObject = buildDocumentationObject(settings, meta, filter);\n\n    const header = {\n        name: {\n            name: 'Name'\n        },\n        description: {\n            name: 'Description',\n            renderer: (input) => escape(input)\n        },\n        path: {\n            name: 'Path'\n        },\n        cli: {\n            name: 'CLI Flag'\n        },\n        defaultValue: {\n            name: 'Default',\n            renderer: (input) => input && `\\`${getDefaultValue(input)}\\``\n        },\n        type: {\n            name: 'Type',\n            renderer: (input) => input && `\\`${input}\\``\n        },\n        required: {\n            name: 'Required',\n            renderer: (input) => {\n                if (input === true) {\n                    return 'Yes';\n                }\n                return 'No';\n            }\n        }\n    };\n\n    return generateTable(documentationObject, header, {\n        groupTitleWrapper: (name, level) => pad(level + 1, '#') + ' ' + name.charAt(0).toUpperCase() + name.slice(1)\n    });\n}\n\n/**\n * Generates plain text documentation for the provided configuration object.\n *\n * @param {rocConfig} config - The configuration object to generate documentation for.\n * @param {rocMetaConfig} metaConfig - The meta configuration object that has information about the config object.\n * @param {string[]} [filter=[]] - The groups that should be includes, by default all will be used.\n *\n * @returns {string} - A table as a string.\n */\nexport function generateTextDocumentation({ settings }, { settings: meta }, filter = []) {\n    const documentationObject = buildDocumentationObject(settings, meta, filter);\n\n    const header = {\n        description: {\n            name: 'Description',\n            renderer: (input) => input && input.substr(0, 100) + '…'\n        },\n        path: {\n            name: 'Path'\n        },\n        defaultValue: {\n            name: 'Default',\n            renderer: (input) => {\n                input = getDefaultValue(input);\n                if (!input) {\n                    return warning('No default value');\n                }\n                return input;\n            }\n        },\n        cli: {\n            name: 'CLI Flag'\n        },\n        required: {\n            name: 'Required',\n            renderer: (input) => {\n                if (input === true) {\n                    return ok('Yes');\n                }\n                return styleError('No');\n            }\n        }\n    };\n\n    return generateTable(documentationObject, header);\n}\n"
  },
  {
    "__docId__": 55,
    "kind": "function",
    "static": true,
    "variation": null,
    "name": "generateMarkdownDocumentation",
    "memberof": "src/documentation/index.js",
    "longname": "src/documentation/index.js~generateMarkdownDocumentation",
    "access": null,
    "export": true,
    "importPath": "roc/lib/documentation/index.js",
    "importStyle": "{generateMarkdownDocumentation}",
    "description": "Generates markdown documentation for the provided configuration object.",
    "lineNumber": 19,
    "unknown": [
      {
        "tagName": "@returns",
        "tagValue": "{string} - A markdown table as a string."
      }
    ],
    "params": [
      {
        "nullable": null,
        "types": [
          "rocConfig"
        ],
        "spread": false,
        "optional": false,
        "name": "config",
        "description": "The configuration object to generate documentation for."
      },
      {
        "nullable": null,
        "types": [
          "rocMetaConfig"
        ],
        "spread": false,
        "optional": false,
        "name": "metaConfig",
        "description": "The meta configuration object that has information about the config object."
      },
      {
        "nullable": null,
        "types": [
          "string[]"
        ],
        "spread": false,
        "optional": true,
        "defaultValue": "[]",
        "defaultRaw": [],
        "name": "filter",
        "description": "The groups that should be includes, by default all will be used."
      }
    ],
    "return": {
      "nullable": null,
      "types": [
        "string"
      ],
      "spread": false,
      "description": "A markdown table as a string."
    },
    "generator": false
  },
  {
    "__docId__": 56,
    "kind": "function",
    "static": true,
    "variation": null,
    "name": "generateTextDocumentation",
    "memberof": "src/documentation/index.js",
    "longname": "src/documentation/index.js~generateTextDocumentation",
    "access": null,
    "export": true,
    "importPath": "roc/lib/documentation/index.js",
    "importStyle": "{generateTextDocumentation}",
    "description": "Generates plain text documentation for the provided configuration object.",
    "lineNumber": 69,
    "unknown": [
      {
        "tagName": "@returns",
        "tagValue": "{string} - A table as a string."
      }
    ],
    "params": [
      {
        "nullable": null,
        "types": [
          "rocConfig"
        ],
        "spread": false,
        "optional": false,
        "name": "config",
        "description": "The configuration object to generate documentation for."
      },
      {
        "nullable": null,
        "types": [
          "rocMetaConfig"
        ],
        "spread": false,
        "optional": false,
        "name": "metaConfig",
        "description": "The meta configuration object that has information about the config object."
      },
      {
        "nullable": null,
        "types": [
          "string[]"
        ],
        "spread": false,
        "optional": true,
        "defaultValue": "[]",
        "defaultRaw": [],
        "name": "filter",
        "description": "The groups that should be includes, by default all will be used."
      }
    ],
    "return": {
      "nullable": null,
      "types": [
        "string"
      ],
      "spread": false,
      "description": "A table as a string."
    },
    "generator": false
  },
  {
    "__docId__": 57,
    "kind": "file",
    "static": true,
    "variation": null,
    "name": "src/helpers/index.js",
    "memberof": null,
    "longname": "src/helpers/index.js",
    "access": null,
    "description": null,
    "lineNumber": 1,
    "content": "import 'source-map-support/register';\n\nimport path from 'path';\nimport fs from 'fs';\n\n/**\n* Makes a path absolute if not already is that.\n*\n* @param {string} filepath - The filepath to make absolute.\n* @param {string} [directory=process.cwd()] - The directory to resolve relative paths to. By default will use the\n*     current working directory.\n*\n* @returns {string} - An absolute path.\n*/\nexport function getAbsolutePath(filepath, directory = process.cwd()) {\n    if (filepath) {\n        return path.isAbsolute(filepath) ?\n            filepath :\n            path.join(directory, filepath);\n    }\n}\n\n/**\n* Verifys if a file exists.\n*\n* @param {string} filepath - The filepath to check. Will make it absolute if not already using {@link getAbsolutePath}.\n* @param {string} [directory] - The directory to base the filepath on.\n*\n* @returns {boolean} - Whether or not it is a file.\n*/\nexport function fileExists(filepath, directory) {\n    filepath = getAbsolutePath(filepath, directory);\n    try {\n        return fs.statSync(filepath).isFile();\n    } catch (error) {\n        return false;\n    }\n}\n\n/**\n * Gets the Roc dependencies from a `package.json`.\n *\n * @param {Object} packageJson - A package.json file to fetch Roc dependencies from.\n *\n * @returns {string[]} - An array with Roc extensions that exists in the `package.json`.\n */\nexport function getRocDependencies(packageJson) {\n    return [\n        ...Object.keys(packageJson.dependencies || {}),\n        ...Object.keys(packageJson.devDependencies || {})\n    ]\n    .filter(dependecy => /^roc(-.+)/.test(dependecy));\n}\n\n/**\n * Reads a `package.json` file.\n *\n * @param {string} [directory=processs.cwd()] - In what directory to look for the `package.json`.\n *\n * @returns {Object|undefined} - The object in the `package.json` or undefined if it did not exists.\n */\nexport function getPackageJson(directory = process.cwd()) {\n    if (fileExists('package.json', directory)) {\n        return require(path.join(directory, 'package.json'));\n    }\n\n    return undefined;\n}\n"
  },
  {
    "__docId__": 58,
    "kind": "function",
    "static": true,
    "variation": null,
    "name": "getAbsolutePath",
    "memberof": "src/helpers/index.js",
    "longname": "src/helpers/index.js~getAbsolutePath",
    "access": null,
    "export": true,
    "importPath": "roc/lib/helpers/index.js",
    "importStyle": "{getAbsolutePath}",
    "description": "Makes a path absolute if not already is that.",
    "lineNumber": 15,
    "unknown": [
      {
        "tagName": "@returns",
        "tagValue": "{string} - An absolute path."
      }
    ],
    "params": [
      {
        "nullable": null,
        "types": [
          "string"
        ],
        "spread": false,
        "optional": false,
        "name": "filepath",
        "description": "The filepath to make absolute."
      },
      {
        "nullable": null,
        "types": [
          "string"
        ],
        "spread": false,
        "optional": true,
        "defaultValue": "process.cwd()",
        "defaultRaw": "process.cwd()",
        "name": "directory",
        "description": "The directory to resolve relative paths to. By default will use the\n    current working directory."
      }
    ],
    "return": {
      "nullable": null,
      "types": [
        "string"
      ],
      "spread": false,
      "description": "An absolute path."
    },
    "generator": false
  },
  {
    "__docId__": 59,
    "kind": "function",
    "static": true,
    "variation": null,
    "name": "fileExists",
    "memberof": "src/helpers/index.js",
    "longname": "src/helpers/index.js~fileExists",
    "access": null,
    "export": true,
    "importPath": "roc/lib/helpers/index.js",
    "importStyle": "{fileExists}",
    "description": "Verifys if a file exists.",
    "lineNumber": 31,
    "unknown": [
      {
        "tagName": "@returns",
        "tagValue": "{boolean} - Whether or not it is a file."
      }
    ],
    "params": [
      {
        "nullable": null,
        "types": [
          "string"
        ],
        "spread": false,
        "optional": false,
        "name": "filepath",
        "description": "The filepath to check. Will make it absolute if not already using {@link getAbsolutePath}."
      },
      {
        "nullable": null,
        "types": [
          "string"
        ],
        "spread": false,
        "optional": true,
        "name": "directory",
        "description": "The directory to base the filepath on."
      }
    ],
    "return": {
      "nullable": null,
      "types": [
        "boolean"
      ],
      "spread": false,
      "description": "Whether or not it is a file."
    },
    "generator": false
  },
  {
    "__docId__": 60,
    "kind": "function",
    "static": true,
    "variation": null,
    "name": "getRocDependencies",
    "memberof": "src/helpers/index.js",
    "longname": "src/helpers/index.js~getRocDependencies",
    "access": null,
    "export": true,
    "importPath": "roc/lib/helpers/index.js",
    "importStyle": "{getRocDependencies}",
    "description": "Gets the Roc dependencies from a `package.json`.",
    "lineNumber": 47,
    "unknown": [
      {
        "tagName": "@returns",
        "tagValue": "{string[]} - An array with Roc extensions that exists in the `package.json`."
      }
    ],
    "params": [
      {
        "nullable": null,
        "types": [
          "Object"
        ],
        "spread": false,
        "optional": false,
        "name": "packageJson",
        "description": "A package.json file to fetch Roc dependencies from."
      }
    ],
    "return": {
      "nullable": null,
      "types": [
        "string[]"
      ],
      "spread": false,
      "description": "An array with Roc extensions that exists in the `package.json`."
    },
    "generator": false
  },
  {
    "__docId__": 61,
    "kind": "function",
    "static": true,
    "variation": null,
    "name": "getPackageJson",
    "memberof": "src/helpers/index.js",
    "longname": "src/helpers/index.js~getPackageJson",
    "access": null,
    "export": true,
    "importPath": "roc/lib/helpers/index.js",
    "importStyle": "{getPackageJson}",
    "description": "Reads a `package.json` file.",
    "lineNumber": 62,
    "unknown": [
      {
        "tagName": "@returns",
        "tagValue": "{Object|undefined} - The object in the `package.json` or undefined if it did not exists."
      }
    ],
    "params": [
      {
        "nullable": null,
        "types": [
          "string"
        ],
        "spread": false,
        "optional": true,
        "defaultValue": "processs.cwd()",
        "defaultRaw": "processs.cwd()",
        "name": "directory",
        "description": "In what directory to look for the `package.json`."
      }
    ],
    "return": {
      "nullable": null,
      "types": [
        "Object",
        "undefined"
      ],
      "spread": false,
      "description": "The object in the `package.json` or undefined if it did not exists."
    },
    "generator": false
  },
  {
    "__docId__": 62,
    "kind": "file",
    "static": true,
    "variation": null,
    "name": "src/helpers/style.js",
    "memberof": null,
    "longname": "src/helpers/style.js",
    "access": null,
    "description": null,
    "lineNumber": 1,
    "content": "import chalk from 'chalk';\n\n/**\n* Formats a string suitable for error output.\n*\n* @param {string} text - The text to format for errors.\n*\n* @returns {string} - The formatted text.\n*/\nexport function error(text) {\n    return chalk.red(text);\n}\n\n/**\n* Formats a string suitable for warnings.\n*\n* @param {string} text - The text to format for warnings.\n*\n* @returns {string} - The formatted text.\n*/\nexport function warning(text) {\n    return chalk.yellow(text);\n}\n\n/**\n* Formats a string suitable for confirmations.\n*\n* @param {string} text - The text to format for confirmations.\n*\n* @returns {string} - The formatted text.\n*/\nexport function ok(text) {\n    return chalk.green(text);\n}\n\n/**\n* Formats a string suitable for important messages.\n*\n* @param {string} text - The text to format for important messages.\n*\n* @returns {string} - The formatted text.\n*/\nexport function important(text) {\n    return chalk.cyan(text);\n}\n\n/**\n* Formats a string suitable for error labels.\n*\n* @param {string} text - The text to format for error labels.\n*\n* @returns {string} - The formatted text.\n*/\nexport function errorLabel(text) {\n    return chalk.bgRed(chalk.white(text));\n}\n\n/**\n* Formats a string suitable for warning labels.\n*\n* @param {string} text - The text to format for warning labels.\n*\n* @returns {string} - The formatted text.\n*/\nexport function warningLabel(text) {\n    return chalk.bgYellow(chalk.white(text));\n}\n\n/**\n* Formats a string suitable for confirmation labels.\n*\n* @param {string} text - The text to format for confirmation labels.\n*\n* @returns {string} - The formatted text.\n*/\nexport function okLabel(text) {\n    return chalk.bgGreen(chalk.white(text));\n}\n\n/**\n* Formats a string suitable for important labels.\n*\n* @param {string} text - The text to format for important labels.\n*\n* @returns {string} - The formatted text.\n*/\nexport function importantLabel(text) {\n    return chalk.bgCyan(chalk.black(text));\n}\n"
  },
  {
    "__docId__": 63,
    "kind": "function",
    "static": true,
    "variation": null,
    "name": "error",
    "memberof": "src/helpers/style.js",
    "longname": "src/helpers/style.js~error",
    "access": null,
    "export": true,
    "importPath": "roc/lib/helpers/style.js",
    "importStyle": "{error}",
    "description": "Formats a string suitable for error output.",
    "lineNumber": 10,
    "unknown": [
      {
        "tagName": "@returns",
        "tagValue": "{string} - The formatted text."
      }
    ],
    "params": [
      {
        "nullable": null,
        "types": [
          "string"
        ],
        "spread": false,
        "optional": false,
        "name": "text",
        "description": "The text to format for errors."
      }
    ],
    "return": {
      "nullable": null,
      "types": [
        "string"
      ],
      "spread": false,
      "description": "The formatted text."
    },
    "generator": false
  },
  {
    "__docId__": 64,
    "kind": "function",
    "static": true,
    "variation": null,
    "name": "warning",
    "memberof": "src/helpers/style.js",
    "longname": "src/helpers/style.js~warning",
    "access": null,
    "export": true,
    "importPath": "roc/lib/helpers/style.js",
    "importStyle": "{warning}",
    "description": "Formats a string suitable for warnings.",
    "lineNumber": 21,
    "unknown": [
      {
        "tagName": "@returns",
        "tagValue": "{string} - The formatted text."
      }
    ],
    "params": [
      {
        "nullable": null,
        "types": [
          "string"
        ],
        "spread": false,
        "optional": false,
        "name": "text",
        "description": "The text to format for warnings."
      }
    ],
    "return": {
      "nullable": null,
      "types": [
        "string"
      ],
      "spread": false,
      "description": "The formatted text."
    },
    "generator": false
  },
  {
    "__docId__": 65,
    "kind": "function",
    "static": true,
    "variation": null,
    "name": "ok",
    "memberof": "src/helpers/style.js",
    "longname": "src/helpers/style.js~ok",
    "access": null,
    "export": true,
    "importPath": "roc/lib/helpers/style.js",
    "importStyle": "{ok}",
    "description": "Formats a string suitable for confirmations.",
    "lineNumber": 32,
    "unknown": [
      {
        "tagName": "@returns",
        "tagValue": "{string} - The formatted text."
      }
    ],
    "params": [
      {
        "nullable": null,
        "types": [
          "string"
        ],
        "spread": false,
        "optional": false,
        "name": "text",
        "description": "The text to format for confirmations."
      }
    ],
    "return": {
      "nullable": null,
      "types": [
        "string"
      ],
      "spread": false,
      "description": "The formatted text."
    },
    "generator": false
  },
  {
    "__docId__": 66,
    "kind": "function",
    "static": true,
    "variation": null,
    "name": "important",
    "memberof": "src/helpers/style.js",
    "longname": "src/helpers/style.js~important",
    "access": null,
    "export": true,
    "importPath": "roc/lib/helpers/style.js",
    "importStyle": "{important}",
    "description": "Formats a string suitable for important messages.",
    "lineNumber": 43,
    "unknown": [
      {
        "tagName": "@returns",
        "tagValue": "{string} - The formatted text."
      }
    ],
    "params": [
      {
        "nullable": null,
        "types": [
          "string"
        ],
        "spread": false,
        "optional": false,
        "name": "text",
        "description": "The text to format for important messages."
      }
    ],
    "return": {
      "nullable": null,
      "types": [
        "string"
      ],
      "spread": false,
      "description": "The formatted text."
    },
    "generator": false
  },
  {
    "__docId__": 67,
    "kind": "function",
    "static": true,
    "variation": null,
    "name": "errorLabel",
    "memberof": "src/helpers/style.js",
    "longname": "src/helpers/style.js~errorLabel",
    "access": null,
    "export": true,
    "importPath": "roc/lib/helpers/style.js",
    "importStyle": "{errorLabel}",
    "description": "Formats a string suitable for error labels.",
    "lineNumber": 54,
    "unknown": [
      {
        "tagName": "@returns",
        "tagValue": "{string} - The formatted text."
      }
    ],
    "params": [
      {
        "nullable": null,
        "types": [
          "string"
        ],
        "spread": false,
        "optional": false,
        "name": "text",
        "description": "The text to format for error labels."
      }
    ],
    "return": {
      "nullable": null,
      "types": [
        "string"
      ],
      "spread": false,
      "description": "The formatted text."
    },
    "generator": false
  },
  {
    "__docId__": 68,
    "kind": "function",
    "static": true,
    "variation": null,
    "name": "warningLabel",
    "memberof": "src/helpers/style.js",
    "longname": "src/helpers/style.js~warningLabel",
    "access": null,
    "export": true,
    "importPath": "roc/lib/helpers/style.js",
    "importStyle": "{warningLabel}",
    "description": "Formats a string suitable for warning labels.",
    "lineNumber": 65,
    "unknown": [
      {
        "tagName": "@returns",
        "tagValue": "{string} - The formatted text."
      }
    ],
    "params": [
      {
        "nullable": null,
        "types": [
          "string"
        ],
        "spread": false,
        "optional": false,
        "name": "text",
        "description": "The text to format for warning labels."
      }
    ],
    "return": {
      "nullable": null,
      "types": [
        "string"
      ],
      "spread": false,
      "description": "The formatted text."
    },
    "generator": false
  },
  {
    "__docId__": 69,
    "kind": "function",
    "static": true,
    "variation": null,
    "name": "okLabel",
    "memberof": "src/helpers/style.js",
    "longname": "src/helpers/style.js~okLabel",
    "access": null,
    "export": true,
    "importPath": "roc/lib/helpers/style.js",
    "importStyle": "{okLabel}",
    "description": "Formats a string suitable for confirmation labels.",
    "lineNumber": 76,
    "unknown": [
      {
        "tagName": "@returns",
        "tagValue": "{string} - The formatted text."
      }
    ],
    "params": [
      {
        "nullable": null,
        "types": [
          "string"
        ],
        "spread": false,
        "optional": false,
        "name": "text",
        "description": "The text to format for confirmation labels."
      }
    ],
    "return": {
      "nullable": null,
      "types": [
        "string"
      ],
      "spread": false,
      "description": "The formatted text."
    },
    "generator": false
  },
  {
    "__docId__": 70,
    "kind": "function",
    "static": true,
    "variation": null,
    "name": "importantLabel",
    "memberof": "src/helpers/style.js",
    "longname": "src/helpers/style.js~importantLabel",
    "access": null,
    "export": true,
    "importPath": "roc/lib/helpers/style.js",
    "importStyle": "{importantLabel}",
    "description": "Formats a string suitable for important labels.",
    "lineNumber": 87,
    "unknown": [
      {
        "tagName": "@returns",
        "tagValue": "{string} - The formatted text."
      }
    ],
    "params": [
      {
        "nullable": null,
        "types": [
          "string"
        ],
        "spread": false,
        "optional": false,
        "name": "text",
        "description": "The text to format for important labels."
      }
    ],
    "return": {
      "nullable": null,
      "types": [
        "string"
      ],
      "spread": false,
      "description": "The formatted text."
    },
    "generator": false
  },
  {
    "__docId__": 71,
    "kind": "file",
    "static": true,
    "variation": null,
    "name": "src/index.js",
    "memberof": null,
    "longname": "src/index.js",
    "access": null,
    "description": null,
    "lineNumber": 1,
    "content": "import 'source-map-support/register';\n\nexport {\n    merge,\n    getConfig,\n    appendConfig,\n    getSettings,\n    appendSettings\n} from './configuration';\n\nexport { generateMarkdownDocumentation, generateTextDocumentation } from './documentation';\n\nexport { runCli } from './cli';\n\nexport { validate } from './validation';\n\nexport { execute } from './cli/execute';\n\nexport { getAbsolutePath, fileExists } from './helpers';\n\nexport { defaultPrompt } from './bin/commands/helpers/default-prompt';\n"
  },
  {
    "__docId__": 72,
    "kind": "file",
    "static": true,
    "variation": null,
    "name": "src/typedef/index.js",
    "memberof": null,
    "longname": "src/typedef/index.js",
    "access": null,
    "description": null,
    "lineNumber": 1,
    "content": "/**\n * Validator info object.\n *\n * @typedef {Object} infoObject\n * @property {string} type - The type.\n * @property {boolean} required - If it is required.\n */\n\n/**\n * Validator info object.\n *\n * @typedef {Object} rocCommandObject\n * @property {boolean} debug - If debug mode has been enabled.\n * @property {rocConfig} configObject - The final configuration object where everything has been merged.\n * @property {rocMetaConfig} metaObject - The final meta configuration object where everything has been merged.\n * @property {rocConfig} extensionConfig - The configuration object where all extensions has been merged.\n * @property {rocOptions} parsedOptions - The parsed options given to the cli.\n */\n\n/**\n * Roc config object.\n *\n * @typedef {Object} rocConfig\n * @property {rocSettings} settings\n * @property {Object} commands\n * @property {Object} plugins\n * @property {string[]} extensions\n */\n\n/**\n * Roc meta config object.\n *\n * @typedef {Object} rocMetaConfig\n * @property {rocMetaSettings} settings\n * @property {Object} commands\n * @property {Object} plugins\n */\n\n/**\n * Roc parsed options.\n *\n * @typedef {Object} rocOptions\n * @property {Object} options\n * @property {Object} rest\n */\n\n/**\n * Roc map object.\n *\n * @typedef {Object} rocMapObject\n * @property {string} name\n * @property {string} path\n * @property {function} convertor\n * @property {function} validator\n */\n\n/**\n * Roc documentation object.\n *\n * @typedef {Object[]} rocDocumentationObject\n */\n\n/**\n * Roc table header object.\n *\n * @typedef {Object} rocTableHeader\n */\n\n/**\n * Roc table settings object.\n *\n * See default configuration below:\n * ```\n * {\n *     groupTitleWrapper: (name) => name,\n *     cellDivider: '|',\n *     rowWrapper: (input) => `|${input}|`,\n *     cellWrapper: (input) => ` ${input} `,\n *     header: true,\n *     compact: false\n * }\n * ```\n *\n * @typedef {Object} rocTableSettings\n */\n\n/**\n * Roc settings object.\n *\n * @typedef {Object} rocSettings\n */\n\n /**\n  * Roc meta settings object.\n  *\n  * @typedef {Object} rocMetaSettings\n  */\n\n/**\n * Roc meta settings object.\n *\n * @typedef {Object} rocMetaSettings\n * @property {Object} descriptions\n * @property {Object} groups\n * @property {Object} validations\n */\n"
  },
  {
    "__docId__": 73,
    "kind": "typedef",
    "static": true,
    "variation": null,
    "name": "infoObject",
    "memberof": "src/typedef/index.js",
    "longname": "src/typedef/index.js~infoObject",
    "access": null,
    "description": "Validator info object.",
    "properties": [
      {
        "nullable": null,
        "types": [
          "string"
        ],
        "spread": false,
        "optional": false,
        "name": "type",
        "description": "The type."
      },
      {
        "nullable": null,
        "types": [
          "boolean"
        ],
        "spread": false,
        "optional": false,
        "name": "required",
        "description": "If it is required."
      }
    ],
    "type": {
      "types": [
        "Object"
      ],
      "optional": false,
      "name": "infoObject"
    }
  },
  {
    "__docId__": 74,
    "kind": "typedef",
    "static": true,
    "variation": null,
    "name": "rocCommandObject",
    "memberof": "src/typedef/index.js",
    "longname": "src/typedef/index.js~rocCommandObject",
    "access": null,
    "description": "Validator info object.",
    "properties": [
      {
        "nullable": null,
        "types": [
          "boolean"
        ],
        "spread": false,
        "optional": false,
        "name": "debug",
        "description": "If debug mode has been enabled."
      },
      {
        "nullable": null,
        "types": [
          "rocConfig"
        ],
        "spread": false,
        "optional": false,
        "name": "configObject",
        "description": "The final configuration object where everything has been merged."
      },
      {
        "nullable": null,
        "types": [
          "rocMetaConfig"
        ],
        "spread": false,
        "optional": false,
        "name": "metaObject",
        "description": "The final meta configuration object where everything has been merged."
      },
      {
        "nullable": null,
        "types": [
          "rocConfig"
        ],
        "spread": false,
        "optional": false,
        "name": "extensionConfig",
        "description": "The configuration object where all extensions has been merged."
      },
      {
        "nullable": null,
        "types": [
          "rocOptions"
        ],
        "spread": false,
        "optional": false,
        "name": "parsedOptions",
        "description": "The parsed options given to the cli."
      }
    ],
    "type": {
      "types": [
        "Object"
      ],
      "optional": false,
      "name": "rocCommandObject"
    }
  },
  {
    "__docId__": 75,
    "kind": "typedef",
    "static": true,
    "variation": null,
    "name": "rocConfig",
    "memberof": "src/typedef/index.js",
    "longname": "src/typedef/index.js~rocConfig",
    "access": null,
    "description": "Roc config object.",
    "properties": [
      {
        "nullable": null,
        "types": [
          "rocSettings"
        ],
        "spread": false,
        "optional": false,
        "name": "settings",
        "description": ""
      },
      {
        "nullable": null,
        "types": [
          "Object"
        ],
        "spread": false,
        "optional": false,
        "name": "commands",
        "description": ""
      },
      {
        "nullable": null,
        "types": [
          "Object"
        ],
        "spread": false,
        "optional": false,
        "name": "plugins",
        "description": ""
      },
      {
        "nullable": null,
        "types": [
          "string[]"
        ],
        "spread": false,
        "optional": false,
        "name": "extensions",
        "description": ""
      }
    ],
    "type": {
      "types": [
        "Object"
      ],
      "optional": false,
      "name": "rocConfig"
    }
  },
  {
    "__docId__": 76,
    "kind": "typedef",
    "static": true,
    "variation": null,
    "name": "rocMetaConfig",
    "memberof": "src/typedef/index.js",
    "longname": "src/typedef/index.js~rocMetaConfig",
    "access": null,
    "description": "Roc meta config object.",
    "properties": [
      {
        "nullable": null,
        "types": [
          "rocMetaSettings"
        ],
        "spread": false,
        "optional": false,
        "name": "settings",
        "description": ""
      },
      {
        "nullable": null,
        "types": [
          "Object"
        ],
        "spread": false,
        "optional": false,
        "name": "commands",
        "description": ""
      },
      {
        "nullable": null,
        "types": [
          "Object"
        ],
        "spread": false,
        "optional": false,
        "name": "plugins",
        "description": ""
      }
    ],
    "type": {
      "types": [
        "Object"
      ],
      "optional": false,
      "name": "rocMetaConfig"
    }
  },
  {
    "__docId__": 77,
    "kind": "typedef",
    "static": true,
    "variation": null,
    "name": "rocOptions",
    "memberof": "src/typedef/index.js",
    "longname": "src/typedef/index.js~rocOptions",
    "access": null,
    "description": "Roc parsed options.",
    "properties": [
      {
        "nullable": null,
        "types": [
          "Object"
        ],
        "spread": false,
        "optional": false,
        "name": "options",
        "description": ""
      },
      {
        "nullable": null,
        "types": [
          "Object"
        ],
        "spread": false,
        "optional": false,
        "name": "rest",
        "description": ""
      }
    ],
    "type": {
      "types": [
        "Object"
      ],
      "optional": false,
      "name": "rocOptions"
    }
  },
  {
    "__docId__": 78,
    "kind": "typedef",
    "static": true,
    "variation": null,
    "name": "rocMapObject",
    "memberof": "src/typedef/index.js",
    "longname": "src/typedef/index.js~rocMapObject",
    "access": null,
    "description": "Roc map object.",
    "properties": [
      {
        "nullable": null,
        "types": [
          "string"
        ],
        "spread": false,
        "optional": false,
        "name": "name",
        "description": ""
      },
      {
        "nullable": null,
        "types": [
          "string"
        ],
        "spread": false,
        "optional": false,
        "name": "path",
        "description": ""
      },
      {
        "nullable": null,
        "types": [
          "function"
        ],
        "spread": false,
        "optional": false,
        "name": "convertor",
        "description": ""
      },
      {
        "nullable": null,
        "types": [
          "function"
        ],
        "spread": false,
        "optional": false,
        "name": "validator",
        "description": ""
      }
    ],
    "type": {
      "types": [
        "Object"
      ],
      "optional": false,
      "name": "rocMapObject"
    }
  },
  {
    "__docId__": 79,
    "kind": "typedef",
    "static": true,
    "variation": null,
    "name": "rocDocumentationObject",
    "memberof": "src/typedef/index.js",
    "longname": "src/typedef/index.js~rocDocumentationObject",
    "access": null,
    "description": "Roc documentation object.",
    "type": {
      "types": [
        "Object[]"
      ],
      "optional": false,
      "name": "rocDocumentationObject"
    }
  },
  {
    "__docId__": 80,
    "kind": "typedef",
    "static": true,
    "variation": null,
    "name": "rocTableHeader",
    "memberof": "src/typedef/index.js",
    "longname": "src/typedef/index.js~rocTableHeader",
    "access": null,
    "description": "Roc table header object.",
    "type": {
      "types": [
        "Object"
      ],
      "optional": false,
      "name": "rocTableHeader"
    }
  },
  {
    "__docId__": 81,
    "kind": "typedef",
    "static": true,
    "variation": null,
    "name": "rocTableSettings",
    "memberof": "src/typedef/index.js",
    "longname": "src/typedef/index.js~rocTableSettings",
    "access": null,
    "description": "Roc table settings object.\n\nSee default configuration below:\n```\n{\n    groupTitleWrapper: (name) => name,\n    cellDivider: '|',\n    rowWrapper: (input) => `|${input}|`,\n    cellWrapper: (input) => ` ${input} `,\n    header: true,\n    compact: false\n}\n```",
    "type": {
      "types": [
        "Object"
      ],
      "optional": false,
      "name": "rocTableSettings"
    }
  },
  {
    "__docId__": 82,
    "kind": "typedef",
    "static": true,
    "variation": null,
    "name": "rocSettings",
    "memberof": "src/typedef/index.js",
    "longname": "src/typedef/index.js~rocSettings",
    "access": null,
    "description": "Roc settings object.",
    "type": {
      "types": [
        "Object"
      ],
      "optional": false,
      "name": "rocSettings"
    }
  },
  {
    "__docId__": 83,
    "kind": "typedef",
    "static": true,
    "variation": null,
    "name": "rocMetaSettings",
    "memberof": "src/typedef/index.js",
    "longname": "src/typedef/index.js~rocMetaSettings",
    "access": null,
    "description": "Roc meta settings object.",
    "type": {
      "types": [
        "Object"
      ],
      "optional": false,
      "name": "rocMetaSettings"
    }
  },
  {
    "__docId__": 84,
    "kind": "typedef",
    "static": true,
    "variation": null,
    "name": "rocMetaSettings",
    "memberof": "src/typedef/index.js",
    "longname": "src/typedef/index.js~rocMetaSettings",
    "access": null,
    "description": "Roc meta settings object.",
    "properties": [
      {
        "nullable": null,
        "types": [
          "Object"
        ],
        "spread": false,
        "optional": false,
        "name": "descriptions",
        "description": ""
      },
      {
        "nullable": null,
        "types": [
          "Object"
        ],
        "spread": false,
        "optional": false,
        "name": "groups",
        "description": ""
      },
      {
        "nullable": null,
        "types": [
          "Object"
        ],
        "spread": false,
        "optional": false,
        "name": "validations",
        "description": ""
      }
    ],
    "type": {
      "types": [
        "Object"
      ],
      "optional": false,
      "name": "rocMetaSettings"
    }
  },
  {
    "__docId__": 85,
    "kind": "file",
    "static": true,
    "variation": null,
    "name": "src/validation/index.js",
    "memberof": null,
    "longname": "src/validation/index.js",
    "access": null,
    "description": null,
    "lineNumber": 1,
    "content": "import 'source-map-support/register';\n\nimport chalk from 'chalk';\nimport { isPlainObject, isFunction, isRegExp } from 'lodash';\n\nimport { errorLabel } from '../helpers/style';\n\n/**\n * Helper to use a validator.\n *\n * @param {object} value - Something to validate.\n * @param {function|RegExp} validator - A validator.\n * @return {boolean} - If valid or not.\n */\nexport function isValid(value, validator) {\n    if (isFunction(validator)) {\n        return validator(value);\n    } else if (isRegExp(validator)) {\n        if (!validator.test(value.toString())) {\n            return 'Did not match the regexp: ' + validator;\n        }\n\n        return true;\n    }\n\n    throw new Error('Structure of configuration does not align with validation.');\n}\n\n/**\n * Validates the provided configuration object.\n *\n * @param {rocSettings} settings - The settings object to validate.\n * @param {rocMetaSettings} metaSettings - The meta settings object that has information about how to validate.\n * @param {array|boolean} toValidate - What groups on settings that should be validated.\n * @emits {process.exit} - If the config was invalid it will print the reason and terminate with status 1.\n */\nexport function validate(settings, metaSettings = {}, toValidate = true) {\n    try {\n        if (toValidate === true) {\n            validateMightThrow(settings, metaSettings.validations);\n        } else {\n            toValidate.forEach((group) => {\n                validateMightThrow(settings[group], metaSettings.validations && metaSettings.validations[group]);\n            });\n        }\n    } catch (err) {\n        /* eslint-disable no-process-exit, no-console */\n        console.log(errorLabel('Validation problem') + ' Configuration was not valid.\\n');\n        console.log(err.message);\n        process.exit(1);\n        /* eslint-enable */\n    }\n}\n\n/**\n * Validates the provided configuration object.\n *\n * @param {rocSettings} settings - The settings object to validate.\n * @param {Object} validations - The meta configuration object that has information about how to validate.\n * @throws {Error} throws error if the configuration is invalid\n */\nexport function validateMightThrow(settings, validations) {\n    // If no meta configuration or validation is provided it is valid\n    if (!validations) {\n        return;\n    }\n\n    // validation fields to process one by one\n    const validateKeys = Object.keys(validations);\n\n    for (const validateKey of validateKeys) {\n        const configValue = settings[validateKey];\n        const validator = validations[validateKey];\n\n        // process validation nodes recursively\n        if (isPlainObject(validator) && isPlainObject(configValue)) {\n            validateMightThrow(configValue, {\n                ...validator\n            });\n        } else {\n            assertValid(configValue, validateKey, validator);\n        }\n    }\n}\n\n/**\n * Throws error for failed validations.\n *\n * @param {string} name - String with the name of what failed the validation.\n * @param {string} message - Potential message from the validating function.\n * @param {object} value - The value that was provided.\n * @param {string} [type='field'] - What the failed validation value was.\n * @throws {Error} - Throws error if the configuration is invalid.\n */\nexport function throwError(name, message, value, type = 'field') {\n    value = value || '[Nothing]';\n    throw new Error(\n        `Validation failed for ${type} ${chalk.underline(name)} -` +\n        ` Received: ${value}.` +\n        ` ${message || ''}`\n    );\n}\n\nfunction assertValid(value, validateKey, validator) {\n    const result = isValid(value, validator);\n    if (result !== true) {\n        throwError(validateKey, result, value);\n    }\n}\n"
  },
  {
    "__docId__": 86,
    "kind": "function",
    "static": true,
    "variation": null,
    "name": "isValid",
    "memberof": "src/validation/index.js",
    "longname": "src/validation/index.js~isValid",
    "access": null,
    "export": true,
    "importPath": "roc/lib/validation/index.js",
    "importStyle": "{isValid}",
    "description": "Helper to use a validator.",
    "lineNumber": 15,
    "params": [
      {
        "nullable": null,
        "types": [
          "object"
        ],
        "spread": false,
        "optional": false,
        "name": "value",
        "description": "Something to validate."
      },
      {
        "nullable": null,
        "types": [
          "function",
          "RegExp"
        ],
        "spread": false,
        "optional": false,
        "name": "validator",
        "description": "A validator."
      }
    ],
    "return": {
      "nullable": null,
      "types": [
        "boolean"
      ],
      "spread": false,
      "description": "If valid or not."
    },
    "generator": false
  },
  {
    "__docId__": 87,
    "kind": "function",
    "static": true,
    "variation": null,
    "name": "validate",
    "memberof": "src/validation/index.js",
    "longname": "src/validation/index.js~validate",
    "access": null,
    "export": true,
    "importPath": "roc/lib/validation/index.js",
    "importStyle": "{validate}",
    "description": "Validates the provided configuration object.",
    "lineNumber": 37,
    "params": [
      {
        "nullable": null,
        "types": [
          "rocSettings"
        ],
        "spread": false,
        "optional": false,
        "name": "settings",
        "description": "The settings object to validate."
      },
      {
        "nullable": null,
        "types": [
          "rocMetaSettings"
        ],
        "spread": false,
        "optional": false,
        "name": "metaSettings",
        "description": "The meta settings object that has information about how to validate."
      },
      {
        "nullable": null,
        "types": [
          "array",
          "boolean"
        ],
        "spread": false,
        "optional": false,
        "name": "toValidate",
        "description": "What groups on settings that should be validated."
      }
    ],
    "emits": [
      {
        "types": [
          "process.exit"
        ],
        "description": "If the config was invalid it will print the reason and terminate with status 1."
      }
    ],
    "generator": false
  },
  {
    "__docId__": 88,
    "kind": "function",
    "static": true,
    "variation": null,
    "name": "validateMightThrow",
    "memberof": "src/validation/index.js",
    "longname": "src/validation/index.js~validateMightThrow",
    "access": null,
    "export": true,
    "importPath": "roc/lib/validation/index.js",
    "importStyle": "{validateMightThrow}",
    "description": "Validates the provided configuration object.",
    "lineNumber": 62,
    "params": [
      {
        "nullable": null,
        "types": [
          "rocSettings"
        ],
        "spread": false,
        "optional": false,
        "name": "settings",
        "description": "The settings object to validate."
      },
      {
        "nullable": null,
        "types": [
          "Object"
        ],
        "spread": false,
        "optional": false,
        "name": "validations",
        "description": "The meta configuration object that has information about how to validate."
      }
    ],
    "throws": [
      {
        "types": [
          "Error"
        ],
        "description": "throws error if the configuration is invalid"
      }
    ],
    "generator": false
  },
  {
    "__docId__": 89,
    "kind": "function",
    "static": true,
    "variation": null,
    "name": "throwError",
    "memberof": "src/validation/index.js",
    "longname": "src/validation/index.js~throwError",
    "access": null,
    "export": true,
    "importPath": "roc/lib/validation/index.js",
    "importStyle": "{throwError}",
    "description": "Throws error for failed validations.",
    "lineNumber": 95,
    "params": [
      {
        "nullable": null,
        "types": [
          "string"
        ],
        "spread": false,
        "optional": false,
        "name": "name",
        "description": "String with the name of what failed the validation."
      },
      {
        "nullable": null,
        "types": [
          "string"
        ],
        "spread": false,
        "optional": false,
        "name": "message",
        "description": "Potential message from the validating function."
      },
      {
        "nullable": null,
        "types": [
          "object"
        ],
        "spread": false,
        "optional": false,
        "name": "value",
        "description": "The value that was provided."
      },
      {
        "nullable": null,
        "types": [
          "string"
        ],
        "spread": false,
        "optional": true,
        "defaultValue": "'field'",
        "defaultRaw": "'field'",
        "name": "type",
        "description": "What the failed validation value was."
      }
    ],
    "throws": [
      {
        "types": [
          "Error"
        ],
        "description": "Throws error if the configuration is invalid."
      }
    ],
    "generator": false
  },
  {
    "__docId__": 90,
    "kind": "function",
    "static": true,
    "variation": null,
    "name": "assertValid",
    "memberof": "src/validation/index.js",
    "longname": "src/validation/index.js~assertValid",
    "access": null,
    "export": false,
    "importPath": "roc/lib/validation/index.js",
    "importStyle": null,
    "description": null,
    "lineNumber": 104,
    "undocument": true,
    "params": [
      {
        "name": "value",
        "types": [
          "*"
        ]
      },
      {
        "name": "validateKey",
        "types": [
          "*"
        ]
      },
      {
        "name": "validator",
        "types": [
          "*"
        ]
      }
    ],
    "generator": false
  },
  {
    "__docId__": 91,
    "kind": "file",
    "static": true,
    "variation": null,
    "name": "src/validation/validators.js",
    "memberof": null,
    "longname": "src/validation/validators.js",
    "access": null,
    "description": null,
    "lineNumber": 1,
    "content": "import 'source-map-support/register';\n\nimport {\n  isArray as lodashIsArray,\n  isString as lodashIsString,\n  isBoolean as lodashIsBoolean,\n  isPlainObject as lodashIsPlainObject,\n  isFunction as lodashIsFunction\n} from 'lodash';\n\nimport { isValid } from './index.js';\n\n/**\n * Validates an array using a validator.\n *\n * @param {function|RegExp} validator - The validator to use on the elements in the array.\n * @return {function} - A function that takes a value and that returns true or false if valid or not.\n */\nexport function isArray(validator) {\n    return (input, info) => {\n        if (info) {\n            return infoObject(validator, (wrap) => (`[ ${wrap} ]`));\n        }\n\n        if (!lodashIsArray(input)) {\n            return 'Was not an array!';\n        }\n\n        return isArrayOrSingle(validator)(input);\n    };\n}\n\n/**\n * Validates an object using a validator.\n *\n * @param {function|RegExp} validator - The validator to use on the elements in the object\n * @return {function} - A function that takes a value and that returns true or false if valid or not.\n */\nexport function isObject(validator) {\n    return (input, info) => {\n        if (info) {\n            return infoObject(validator, (wrap) => `{ ${wrap} }`);\n        }\n\n        if (!lodashIsPlainObject(input)) {\n            return 'Was not an object!';\n        }\n\n        if (!validator) {\n            return true;\n        }\n\n        return Object.keys(input).map((key) => isValid(input[key], validator))\n            .reduce((a, b) => a === true && b === true, true);\n    };\n}\n\n/**\n * Validates an pontential array using a validator.\n *\n * Allows that a single value is given.\n *\n * @param {function|RegExp} validator - The validator to use on the elements in the array.\n * @return {function} - A function that takes a value and that returns true or false if valid or not.\n */\nexport function isArrayOrSingle(validator) {\n    return (input, info) => {\n        if (info) {\n            return infoObject(validator, (wrap) => (`${wrap} / [ ${wrap} ]`));\n        }\n\n        const array = [].concat(input);\n        for (const value of array) {\n            const result = isValid(value, validator);\n            if (result !== true) {\n                return result;\n            }\n        }\n\n        return true;\n    };\n}\n\n/**\n * Validates an string.\n *\n * @param {object} value - Something to validate.\n * @param {boolean} info - If type information should be returned.\n * @return {infoObject|boolean|string} - Type information or if it is valid.\n */\nexport function isString(value, info) {\n    if (info) {\n        return infoObject('String');\n    }\n\n    if (!lodashIsString(value)) {\n        return 'Was not a string!';\n    }\n\n    return true;\n}\n\n/**\n * Validates an string.\n *\n * @param {object} value - Something to validate.\n * @param {boolean} info - If type information should be returned.\n * @return {infoObject|boolean|string} - Type information or if it is valid.\n */\nexport function isBoolean(value, info) {\n    if (info) {\n        return infoObject('Boolean');\n    }\n\n    if (!lodashIsBoolean(value)) {\n        return 'Was not a boolean!';\n    }\n\n    return true;\n}\n\n/**\n * Validates an string.\n *\n * @param {object} value - Something to validate.\n * @param {boolean} info - If type information should be returned.\n * @return {infoObject|boolean|string} - Type information or if it is valid.\n */\nexport function isInteger(value, info) {\n    if (info) {\n        return infoObject('Integer');\n    }\n\n    if (!Number.isInteger(value)) {\n        return 'Was not an integer!';\n    }\n\n    return true;\n}\n\n/**\n * Validates an string.\n *\n * @param {object} value - Something to validate.\n * @param {boolean} info - If type information should be returned.\n * @return {infoObject|boolean|string} - Type information or if it is valid.\n */\nexport function isPath(value, info) {\n    if (info) {\n        return infoObject('Filepath');\n    }\n\n    if (isString(value) !== true) {\n        return 'Was not a filepath!';\n    }\n\n    return true;\n}\n\n/**\n * Validates against a list of validators.\n *\n * @param {...function} validators - Validators to validate against.\n * @return {function} - A function that takes a value and that returns true or false if valid or not.\n */\nexport function oneOf(...validators) {\n    if (!validators.length) {\n        throw new Error('You need to use at least one validator.');\n    }\n\n    return (input, info) => {\n        if (info) {\n            let types = [];\n            for (const validator of validators) {\n                types.push(infoObject(validator).type);\n            }\n            return infoObject(types.join(' / '));\n        }\n\n        const invalid = [];\n        for (const validator of validators) {\n            const result = isValid(input, validator);\n            if (result === true) {\n                return true;\n            }\n            invalid.push(validator(null, true).type);\n        }\n\n        return 'Was not any of the possible types:\\n' +\n            invalid.reduce((prev, next) => prev + '\\n' + next, '');\n    };\n}\n\n/**\n * Marks that the value is required\n *\n * @param {function} validator - Validator to validate against\n * @return {function} - A function that takes a value and that returns true or false if valid or not.\n */\nexport function required(validator) {\n    return (input, info) => {\n        if (info) {\n            return infoObject(validator, null, true);\n        }\n\n        if (\n            !input && input !== false ||\n            (lodashIsArray(input) || lodashIsString(input)) && input.length === 0 ||\n            lodashIsPlainObject(input) && Object.keys(input).length === 0\n        ) {\n            return 'A value was required but none was given!';\n        }\n\n        if (!validator) {\n            return true;\n        }\n\n        return validator(input);\n    };\n}\n\nfunction infoObject(validator, wrapper, req = false) {\n    const info = lodashIsFunction(validator) ? validator(null, true).type : validator.toString();\n    const type = wrapper ? wrapper(info) : info;\n    return {\n        type,\n        required: req\n    };\n}\n"
  },
  {
    "__docId__": 92,
    "kind": "function",
    "static": true,
    "variation": null,
    "name": "isArray",
    "memberof": "src/validation/validators.js",
    "longname": "src/validation/validators.js~isArray",
    "access": null,
    "export": true,
    "importPath": "roc/lib/validation/validators.js",
    "importStyle": "{isArray}",
    "description": "Validates an array using a validator.",
    "lineNumber": 19,
    "params": [
      {
        "nullable": null,
        "types": [
          "function",
          "RegExp"
        ],
        "spread": false,
        "optional": false,
        "name": "validator",
        "description": "The validator to use on the elements in the array."
      }
    ],
    "return": {
      "nullable": null,
      "types": [
        "function"
      ],
      "spread": false,
      "description": "A function that takes a value and that returns true or false if valid or not."
    },
    "generator": false
  },
  {
    "__docId__": 93,
    "kind": "function",
    "static": true,
    "variation": null,
    "name": "isObject",
    "memberof": "src/validation/validators.js",
    "longname": "src/validation/validators.js~isObject",
    "access": null,
    "export": true,
    "importPath": "roc/lib/validation/validators.js",
    "importStyle": "{isObject}",
    "description": "Validates an object using a validator.",
    "lineNumber": 39,
    "params": [
      {
        "nullable": null,
        "types": [
          "function",
          "RegExp"
        ],
        "spread": false,
        "optional": false,
        "name": "validator",
        "description": "The validator to use on the elements in the object"
      }
    ],
    "return": {
      "nullable": null,
      "types": [
        "function"
      ],
      "spread": false,
      "description": "A function that takes a value and that returns true or false if valid or not."
    },
    "generator": false
  },
  {
    "__docId__": 94,
    "kind": "function",
    "static": true,
    "variation": null,
    "name": "isArrayOrSingle",
    "memberof": "src/validation/validators.js",
    "longname": "src/validation/validators.js~isArrayOrSingle",
    "access": null,
    "export": true,
    "importPath": "roc/lib/validation/validators.js",
    "importStyle": "{isArrayOrSingle}",
    "description": "Validates an pontential array using a validator.\n\nAllows that a single value is given.",
    "lineNumber": 66,
    "params": [
      {
        "nullable": null,
        "types": [
          "function",
          "RegExp"
        ],
        "spread": false,
        "optional": false,
        "name": "validator",
        "description": "The validator to use on the elements in the array."
      }
    ],
    "return": {
      "nullable": null,
      "types": [
        "function"
      ],
      "spread": false,
      "description": "A function that takes a value and that returns true or false if valid or not."
    },
    "generator": false
  },
  {
    "__docId__": 95,
    "kind": "function",
    "static": true,
    "variation": null,
    "name": "isString",
    "memberof": "src/validation/validators.js",
    "longname": "src/validation/validators.js~isString",
    "access": null,
    "export": true,
    "importPath": "roc/lib/validation/validators.js",
    "importStyle": "{isString}",
    "description": "Validates an string.",
    "lineNumber": 91,
    "params": [
      {
        "nullable": null,
        "types": [
          "object"
        ],
        "spread": false,
        "optional": false,
        "name": "value",
        "description": "Something to validate."
      },
      {
        "nullable": null,
        "types": [
          "boolean"
        ],
        "spread": false,
        "optional": false,
        "name": "info",
        "description": "If type information should be returned."
      }
    ],
    "return": {
      "nullable": null,
      "types": [
        "infoObject",
        "boolean",
        "string"
      ],
      "spread": false,
      "description": "Type information or if it is valid."
    },
    "generator": false
  },
  {
    "__docId__": 96,
    "kind": "function",
    "static": true,
    "variation": null,
    "name": "isBoolean",
    "memberof": "src/validation/validators.js",
    "longname": "src/validation/validators.js~isBoolean",
    "access": null,
    "export": true,
    "importPath": "roc/lib/validation/validators.js",
    "importStyle": "{isBoolean}",
    "description": "Validates an string.",
    "lineNumber": 110,
    "params": [
      {
        "nullable": null,
        "types": [
          "object"
        ],
        "spread": false,
        "optional": false,
        "name": "value",
        "description": "Something to validate."
      },
      {
        "nullable": null,
        "types": [
          "boolean"
        ],
        "spread": false,
        "optional": false,
        "name": "info",
        "description": "If type information should be returned."
      }
    ],
    "return": {
      "nullable": null,
      "types": [
        "infoObject",
        "boolean",
        "string"
      ],
      "spread": false,
      "description": "Type information or if it is valid."
    },
    "generator": false
  },
  {
    "__docId__": 97,
    "kind": "function",
    "static": true,
    "variation": null,
    "name": "isInteger",
    "memberof": "src/validation/validators.js",
    "longname": "src/validation/validators.js~isInteger",
    "access": null,
    "export": true,
    "importPath": "roc/lib/validation/validators.js",
    "importStyle": "{isInteger}",
    "description": "Validates an string.",
    "lineNumber": 129,
    "params": [
      {
        "nullable": null,
        "types": [
          "object"
        ],
        "spread": false,
        "optional": false,
        "name": "value",
        "description": "Something to validate."
      },
      {
        "nullable": null,
        "types": [
          "boolean"
        ],
        "spread": false,
        "optional": false,
        "name": "info",
        "description": "If type information should be returned."
      }
    ],
    "return": {
      "nullable": null,
      "types": [
        "infoObject",
        "boolean",
        "string"
      ],
      "spread": false,
      "description": "Type information or if it is valid."
    },
    "generator": false
  },
  {
    "__docId__": 98,
    "kind": "function",
    "static": true,
    "variation": null,
    "name": "isPath",
    "memberof": "src/validation/validators.js",
    "longname": "src/validation/validators.js~isPath",
    "access": null,
    "export": true,
    "importPath": "roc/lib/validation/validators.js",
    "importStyle": "{isPath}",
    "description": "Validates an string.",
    "lineNumber": 148,
    "params": [
      {
        "nullable": null,
        "types": [
          "object"
        ],
        "spread": false,
        "optional": false,
        "name": "value",
        "description": "Something to validate."
      },
      {
        "nullable": null,
        "types": [
          "boolean"
        ],
        "spread": false,
        "optional": false,
        "name": "info",
        "description": "If type information should be returned."
      }
    ],
    "return": {
      "nullable": null,
      "types": [
        "infoObject",
        "boolean",
        "string"
      ],
      "spread": false,
      "description": "Type information or if it is valid."
    },
    "generator": false
  },
  {
    "__docId__": 99,
    "kind": "function",
    "static": true,
    "variation": null,
    "name": "oneOf",
    "memberof": "src/validation/validators.js",
    "longname": "src/validation/validators.js~oneOf",
    "access": null,
    "export": true,
    "importPath": "roc/lib/validation/validators.js",
    "importStyle": "{oneOf}",
    "description": "Validates against a list of validators.",
    "lineNumber": 166,
    "params": [
      {
        "nullable": null,
        "types": [
          "...function"
        ],
        "spread": true,
        "optional": false,
        "name": "validators",
        "description": "Validators to validate against."
      }
    ],
    "return": {
      "nullable": null,
      "types": [
        "function"
      ],
      "spread": false,
      "description": "A function that takes a value and that returns true or false if valid or not."
    },
    "generator": false
  },
  {
    "__docId__": 100,
    "kind": "function",
    "static": true,
    "variation": null,
    "name": "required",
    "memberof": "src/validation/validators.js",
    "longname": "src/validation/validators.js~required",
    "access": null,
    "export": true,
    "importPath": "roc/lib/validation/validators.js",
    "importStyle": "{required}",
    "description": "Marks that the value is required",
    "lineNumber": 200,
    "params": [
      {
        "nullable": null,
        "types": [
          "function"
        ],
        "spread": false,
        "optional": false,
        "name": "validator",
        "description": "Validator to validate against"
      }
    ],
    "return": {
      "nullable": null,
      "types": [
        "function"
      ],
      "spread": false,
      "description": "A function that takes a value and that returns true or false if valid or not."
    },
    "generator": false
  },
  {
    "__docId__": 101,
    "kind": "function",
    "static": true,
    "variation": null,
    "name": "infoObject",
    "memberof": "src/validation/validators.js",
    "longname": "src/validation/validators.js~infoObject",
    "access": null,
    "export": false,
    "importPath": "roc/lib/validation/validators.js",
    "importStyle": null,
    "description": null,
    "lineNumber": 222,
    "undocument": true,
    "params": [
      {
        "name": "validator",
        "types": [
          "*"
        ]
      },
      {
        "name": "wrapper",
        "types": [
          "*"
        ]
      },
      {
        "name": "req",
        "optional": true,
        "types": [
          "boolean"
        ],
        "defaultRaw": false,
        "defaultValue": "false"
      }
    ],
    "return": {
      "types": [
        "*"
      ]
    },
    "generator": false
  },
  {
    "__docId__": 103,
    "kind": "external",
    "static": true,
    "variation": null,
    "name": "Infinity",
    "externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Infinity",
    "memberof": "BuiltinExternal/ECMAScriptExternal.js",
    "longname": "BuiltinExternal/ECMAScriptExternal.js~Infinity",
    "access": null,
    "description": null,
    "builtinExternal": true
  },
  {
    "__docId__": 104,
    "kind": "external",
    "static": true,
    "variation": null,
    "name": "NaN",
    "externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/NaN",
    "memberof": "BuiltinExternal/ECMAScriptExternal.js",
    "longname": "BuiltinExternal/ECMAScriptExternal.js~NaN",
    "access": null,
    "description": null,
    "builtinExternal": true
  },
  {
    "__docId__": 105,
    "kind": "external",
    "static": true,
    "variation": null,
    "name": "undefined",
    "externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/undefined",
    "memberof": "BuiltinExternal/ECMAScriptExternal.js",
    "longname": "BuiltinExternal/ECMAScriptExternal.js~undefined",
    "access": null,
    "description": null,
    "builtinExternal": true
  },
  {
    "__docId__": 106,
    "kind": "external",
    "static": true,
    "variation": null,
    "name": "null",
    "externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/null",
    "memberof": "BuiltinExternal/ECMAScriptExternal.js",
    "longname": "BuiltinExternal/ECMAScriptExternal.js~null",
    "access": null,
    "description": null,
    "builtinExternal": true
  },
  {
    "__docId__": 107,
    "kind": "external",
    "static": true,
    "variation": null,
    "name": "Object",
    "externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object",
    "memberof": "BuiltinExternal/ECMAScriptExternal.js",
    "longname": "BuiltinExternal/ECMAScriptExternal.js~Object",
    "access": null,
    "description": null,
    "builtinExternal": true
  },
  {
    "__docId__": 108,
    "kind": "external",
    "static": true,
    "variation": null,
    "name": "object",
    "externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object",
    "memberof": "BuiltinExternal/ECMAScriptExternal.js",
    "longname": "BuiltinExternal/ECMAScriptExternal.js~object",
    "access": null,
    "description": null,
    "builtinExternal": true
  },
  {
    "__docId__": 109,
    "kind": "external",
    "static": true,
    "variation": null,
    "name": "Function",
    "externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function",
    "memberof": "BuiltinExternal/ECMAScriptExternal.js",
    "longname": "BuiltinExternal/ECMAScriptExternal.js~Function",
    "access": null,
    "description": null,
    "builtinExternal": true
  },
  {
    "__docId__": 110,
    "kind": "external",
    "static": true,
    "variation": null,
    "name": "function",
    "externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function",
    "memberof": "BuiltinExternal/ECMAScriptExternal.js",
    "longname": "BuiltinExternal/ECMAScriptExternal.js~function",
    "access": null,
    "description": null,
    "builtinExternal": true
  },
  {
    "__docId__": 111,
    "kind": "external",
    "static": true,
    "variation": null,
    "name": "Boolean",
    "externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean",
    "memberof": "BuiltinExternal/ECMAScriptExternal.js",
    "longname": "BuiltinExternal/ECMAScriptExternal.js~Boolean",
    "access": null,
    "description": null,
    "builtinExternal": true
  },
  {
    "__docId__": 112,
    "kind": "external",
    "static": true,
    "variation": null,
    "name": "boolean",
    "externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean",
    "memberof": "BuiltinExternal/ECMAScriptExternal.js",
    "longname": "BuiltinExternal/ECMAScriptExternal.js~boolean",
    "access": null,
    "description": null,
    "builtinExternal": true
  },
  {
    "__docId__": 113,
    "kind": "external",
    "static": true,
    "variation": null,
    "name": "Symbol",
    "externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Symbol",
    "memberof": "BuiltinExternal/ECMAScriptExternal.js",
    "longname": "BuiltinExternal/ECMAScriptExternal.js~Symbol",
    "access": null,
    "description": null,
    "builtinExternal": true
  },
  {
    "__docId__": 114,
    "kind": "external",
    "static": true,
    "variation": null,
    "name": "Error",
    "externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error",
    "memberof": "BuiltinExternal/ECMAScriptExternal.js",
    "longname": "BuiltinExternal/ECMAScriptExternal.js~Error",
    "access": null,
    "description": null,
    "builtinExternal": true
  },
  {
    "__docId__": 115,
    "kind": "external",
    "static": true,
    "variation": null,
    "name": "EvalError",
    "externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/EvalError",
    "memberof": "BuiltinExternal/ECMAScriptExternal.js",
    "longname": "BuiltinExternal/ECMAScriptExternal.js~EvalError",
    "access": null,
    "description": null,
    "builtinExternal": true
  },
  {
    "__docId__": 116,
    "kind": "external",
    "static": true,
    "variation": null,
    "name": "InternalError",
    "externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/InternalError",
    "memberof": "BuiltinExternal/ECMAScriptExternal.js",
    "longname": "BuiltinExternal/ECMAScriptExternal.js~InternalError",
    "access": null,
    "description": null,
    "builtinExternal": true
  },
  {
    "__docId__": 117,
    "kind": "external",
    "static": true,
    "variation": null,
    "name": "RangeError",
    "externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RangeError",
    "memberof": "BuiltinExternal/ECMAScriptExternal.js",
    "longname": "BuiltinExternal/ECMAScriptExternal.js~RangeError",
    "access": null,
    "description": null,
    "builtinExternal": true
  },
  {
    "__docId__": 118,
    "kind": "external",
    "static": true,
    "variation": null,
    "name": "ReferenceError",
    "externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/ReferenceError",
    "memberof": "BuiltinExternal/ECMAScriptExternal.js",
    "longname": "BuiltinExternal/ECMAScriptExternal.js~ReferenceError",
    "access": null,
    "description": null,
    "builtinExternal": true
  },
  {
    "__docId__": 119,
    "kind": "external",
    "static": true,
    "variation": null,
    "name": "SyntaxError",
    "externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/SyntaxError",
    "memberof": "BuiltinExternal/ECMAScriptExternal.js",
    "longname": "BuiltinExternal/ECMAScriptExternal.js~SyntaxError",
    "access": null,
    "description": null,
    "builtinExternal": true
  },
  {
    "__docId__": 120,
    "kind": "external",
    "static": true,
    "variation": null,
    "name": "TypeError",
    "externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypeError",
    "memberof": "BuiltinExternal/ECMAScriptExternal.js",
    "longname": "BuiltinExternal/ECMAScriptExternal.js~TypeError",
    "access": null,
    "description": null,
    "builtinExternal": true
  },
  {
    "__docId__": 121,
    "kind": "external",
    "static": true,
    "variation": null,
    "name": "URIError",
    "externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/URIError",
    "memberof": "BuiltinExternal/ECMAScriptExternal.js",
    "longname": "BuiltinExternal/ECMAScriptExternal.js~URIError",
    "access": null,
    "description": null,
    "builtinExternal": true
  },
  {
    "__docId__": 122,
    "kind": "external",
    "static": true,
    "variation": null,
    "name": "Number",
    "externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number",
    "memberof": "BuiltinExternal/ECMAScriptExternal.js",
    "longname": "BuiltinExternal/ECMAScriptExternal.js~Number",
    "access": null,
    "description": null,
    "builtinExternal": true
  },
  {
    "__docId__": 123,
    "kind": "external",
    "static": true,
    "variation": null,
    "name": "number",
    "externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number",
    "memberof": "BuiltinExternal/ECMAScriptExternal.js",
    "longname": "BuiltinExternal/ECMAScriptExternal.js~number",
    "access": null,
    "description": null,
    "builtinExternal": true
  },
  {
    "__docId__": 124,
    "kind": "external",
    "static": true,
    "variation": null,
    "name": "Date",
    "externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date",
    "memberof": "BuiltinExternal/ECMAScriptExternal.js",
    "longname": "BuiltinExternal/ECMAScriptExternal.js~Date",
    "access": null,
    "description": null,
    "builtinExternal": true
  },
  {
    "__docId__": 125,
    "kind": "external",
    "static": true,
    "variation": null,
    "name": "String",
    "externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String",
    "memberof": "BuiltinExternal/ECMAScriptExternal.js",
    "longname": "BuiltinExternal/ECMAScriptExternal.js~String",
    "access": null,
    "description": null,
    "builtinExternal": true
  },
  {
    "__docId__": 126,
    "kind": "external",
    "static": true,
    "variation": null,
    "name": "string",
    "externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String",
    "memberof": "BuiltinExternal/ECMAScriptExternal.js",
    "longname": "BuiltinExternal/ECMAScriptExternal.js~string",
    "access": null,
    "description": null,
    "builtinExternal": true
  },
  {
    "__docId__": 127,
    "kind": "external",
    "static": true,
    "variation": null,
    "name": "RegExp",
    "externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp",
    "memberof": "BuiltinExternal/ECMAScriptExternal.js",
    "longname": "BuiltinExternal/ECMAScriptExternal.js~RegExp",
    "access": null,
    "description": null,
    "builtinExternal": true
  },
  {
    "__docId__": 128,
    "kind": "external",
    "static": true,
    "variation": null,
    "name": "Array",
    "externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array",
    "memberof": "BuiltinExternal/ECMAScriptExternal.js",
    "longname": "BuiltinExternal/ECMAScriptExternal.js~Array",
    "access": null,
    "description": null,
    "builtinExternal": true
  },
  {
    "__docId__": 129,
    "kind": "external",
    "static": true,
    "variation": null,
    "name": "Int8Array",
    "externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Int8Array",
    "memberof": "BuiltinExternal/ECMAScriptExternal.js",
    "longname": "BuiltinExternal/ECMAScriptExternal.js~Int8Array",
    "access": null,
    "description": null,
    "builtinExternal": true
  },
  {
    "__docId__": 130,
    "kind": "external",
    "static": true,
    "variation": null,
    "name": "Uint8Array",
    "externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array",
    "memberof": "BuiltinExternal/ECMAScriptExternal.js",
    "longname": "BuiltinExternal/ECMAScriptExternal.js~Uint8Array",
    "access": null,
    "description": null,
    "builtinExternal": true
  },
  {
    "__docId__": 131,
    "kind": "external",
    "static": true,
    "variation": null,
    "name": "Uint8ClampedArray",
    "externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Uint8ClampedArray",
    "memberof": "BuiltinExternal/ECMAScriptExternal.js",
    "longname": "BuiltinExternal/ECMAScriptExternal.js~Uint8ClampedArray",
    "access": null,
    "description": null,
    "builtinExternal": true
  },
  {
    "__docId__": 132,
    "kind": "external",
    "static": true,
    "variation": null,
    "name": "Int16Array",
    "externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Int16Array",
    "memberof": "BuiltinExternal/ECMAScriptExternal.js",
    "longname": "BuiltinExternal/ECMAScriptExternal.js~Int16Array",
    "access": null,
    "description": null,
    "builtinExternal": true
  },
  {
    "__docId__": 133,
    "kind": "external",
    "static": true,
    "variation": null,
    "name": "Uint16Array",
    "externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Uint16Array",
    "memberof": "BuiltinExternal/ECMAScriptExternal.js",
    "longname": "BuiltinExternal/ECMAScriptExternal.js~Uint16Array",
    "access": null,
    "description": null,
    "builtinExternal": true
  },
  {
    "__docId__": 134,
    "kind": "external",
    "static": true,
    "variation": null,
    "name": "Int32Array",
    "externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Int32Array",
    "memberof": "BuiltinExternal/ECMAScriptExternal.js",
    "longname": "BuiltinExternal/ECMAScriptExternal.js~Int32Array",
    "access": null,
    "description": null,
    "builtinExternal": true
  },
  {
    "__docId__": 135,
    "kind": "external",
    "static": true,
    "variation": null,
    "name": "Uint32Array",
    "externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Uint32Array",
    "memberof": "BuiltinExternal/ECMAScriptExternal.js",
    "longname": "BuiltinExternal/ECMAScriptExternal.js~Uint32Array",
    "access": null,
    "description": null,
    "builtinExternal": true
  },
  {
    "__docId__": 136,
    "kind": "external",
    "static": true,
    "variation": null,
    "name": "Float32Array",
    "externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Float32Array",
    "memberof": "BuiltinExternal/ECMAScriptExternal.js",
    "longname": "BuiltinExternal/ECMAScriptExternal.js~Float32Array",
    "access": null,
    "description": null,
    "builtinExternal": true
  },
  {
    "__docId__": 137,
    "kind": "external",
    "static": true,
    "variation": null,
    "name": "Float64Array",
    "externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Float64Array",
    "memberof": "BuiltinExternal/ECMAScriptExternal.js",
    "longname": "BuiltinExternal/ECMAScriptExternal.js~Float64Array",
    "access": null,
    "description": null,
    "builtinExternal": true
  },
  {
    "__docId__": 138,
    "kind": "external",
    "static": true,
    "variation": null,
    "name": "Map",
    "externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Map",
    "memberof": "BuiltinExternal/ECMAScriptExternal.js",
    "longname": "BuiltinExternal/ECMAScriptExternal.js~Map",
    "access": null,
    "description": null,
    "builtinExternal": true
  },
  {
    "__docId__": 139,
    "kind": "external",
    "static": true,
    "variation": null,
    "name": "Set",
    "externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Set",
    "memberof": "BuiltinExternal/ECMAScriptExternal.js",
    "longname": "BuiltinExternal/ECMAScriptExternal.js~Set",
    "access": null,
    "description": null,
    "builtinExternal": true
  },
  {
    "__docId__": 140,
    "kind": "external",
    "static": true,
    "variation": null,
    "name": "WeakMap",
    "externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/WeakMap",
    "memberof": "BuiltinExternal/ECMAScriptExternal.js",
    "longname": "BuiltinExternal/ECMAScriptExternal.js~WeakMap",
    "access": null,
    "description": null,
    "builtinExternal": true
  },
  {
    "__docId__": 141,
    "kind": "external",
    "static": true,
    "variation": null,
    "name": "WeakSet",
    "externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/WeakSet",
    "memberof": "BuiltinExternal/ECMAScriptExternal.js",
    "longname": "BuiltinExternal/ECMAScriptExternal.js~WeakSet",
    "access": null,
    "description": null,
    "builtinExternal": true
  },
  {
    "__docId__": 142,
    "kind": "external",
    "static": true,
    "variation": null,
    "name": "ArrayBuffer",
    "externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer",
    "memberof": "BuiltinExternal/ECMAScriptExternal.js",
    "longname": "BuiltinExternal/ECMAScriptExternal.js~ArrayBuffer",
    "access": null,
    "description": null,
    "builtinExternal": true
  },
  {
    "__docId__": 143,
    "kind": "external",
    "static": true,
    "variation": null,
    "name": "DataView",
    "externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/DataView",
    "memberof": "BuiltinExternal/ECMAScriptExternal.js",
    "longname": "BuiltinExternal/ECMAScriptExternal.js~DataView",
    "access": null,
    "description": null,
    "builtinExternal": true
  },
  {
    "__docId__": 144,
    "kind": "external",
    "static": true,
    "variation": null,
    "name": "JSON",
    "externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON",
    "memberof": "BuiltinExternal/ECMAScriptExternal.js",
    "longname": "BuiltinExternal/ECMAScriptExternal.js~JSON",
    "access": null,
    "description": null,
    "builtinExternal": true
  },
  {
    "__docId__": 145,
    "kind": "external",
    "static": true,
    "variation": null,
    "name": "Promise",
    "externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise",
    "memberof": "BuiltinExternal/ECMAScriptExternal.js",
    "longname": "BuiltinExternal/ECMAScriptExternal.js~Promise",
    "access": null,
    "description": null,
    "builtinExternal": true
  },
  {
    "__docId__": 146,
    "kind": "external",
    "static": true,
    "variation": null,
    "name": "Generator",
    "externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Generator",
    "memberof": "BuiltinExternal/ECMAScriptExternal.js",
    "longname": "BuiltinExternal/ECMAScriptExternal.js~Generator",
    "access": null,
    "description": null,
    "builtinExternal": true
  },
  {
    "__docId__": 147,
    "kind": "external",
    "static": true,
    "variation": null,
    "name": "GeneratorFunction",
    "externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/GeneratorFunction",
    "memberof": "BuiltinExternal/ECMAScriptExternal.js",
    "longname": "BuiltinExternal/ECMAScriptExternal.js~GeneratorFunction",
    "access": null,
    "description": null,
    "builtinExternal": true
  },
  {
    "__docId__": 148,
    "kind": "external",
    "static": true,
    "variation": null,
    "name": "Reflect",
    "externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Reflect",
    "memberof": "BuiltinExternal/ECMAScriptExternal.js",
    "longname": "BuiltinExternal/ECMAScriptExternal.js~Reflect",
    "access": null,
    "description": null,
    "builtinExternal": true
  },
  {
    "__docId__": 149,
    "kind": "external",
    "static": true,
    "variation": null,
    "name": "Proxy",
    "externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Proxy",
    "memberof": "BuiltinExternal/ECMAScriptExternal.js",
    "longname": "BuiltinExternal/ECMAScriptExternal.js~Proxy",
    "access": null,
    "description": null,
    "builtinExternal": true
  },
  {
    "__docId__": 151,
    "kind": "external",
    "static": true,
    "variation": null,
    "name": "CanvasRenderingContext2D",
    "externalLink": "https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D",
    "memberof": "BuiltinExternal/WebAPIExternal.js",
    "longname": "BuiltinExternal/WebAPIExternal.js~CanvasRenderingContext2D",
    "access": null,
    "description": null,
    "builtinExternal": true
  },
  {
    "__docId__": 152,
    "kind": "external",
    "static": true,
    "variation": null,
    "name": "DocumentFragment",
    "externalLink": "https://developer.mozilla.org/en-US/docs/Web/API/DocumentFragment",
    "memberof": "BuiltinExternal/WebAPIExternal.js",
    "longname": "BuiltinExternal/WebAPIExternal.js~DocumentFragment",
    "access": null,
    "description": null,
    "builtinExternal": true
  },
  {
    "__docId__": 153,
    "kind": "external",
    "static": true,
    "variation": null,
    "name": "Element",
    "externalLink": "https://developer.mozilla.org/en-US/docs/Web/API/Element",
    "memberof": "BuiltinExternal/WebAPIExternal.js",
    "longname": "BuiltinExternal/WebAPIExternal.js~Element",
    "access": null,
    "description": null,
    "builtinExternal": true
  },
  {
    "__docId__": 154,
    "kind": "external",
    "static": true,
    "variation": null,
    "name": "Event",
    "externalLink": "https://developer.mozilla.org/en-US/docs/Web/API/Event",
    "memberof": "BuiltinExternal/WebAPIExternal.js",
    "longname": "BuiltinExternal/WebAPIExternal.js~Event",
    "access": null,
    "description": null,
    "builtinExternal": true
  },
  {
    "__docId__": 155,
    "kind": "external",
    "static": true,
    "variation": null,
    "name": "Node",
    "externalLink": "https://developer.mozilla.org/en-US/docs/Web/API/Node",
    "memberof": "BuiltinExternal/WebAPIExternal.js",
    "longname": "BuiltinExternal/WebAPIExternal.js~Node",
    "access": null,
    "description": null,
    "builtinExternal": true
  },
  {
    "__docId__": 156,
    "kind": "external",
    "static": true,
    "variation": null,
    "name": "NodeList",
    "externalLink": "https://developer.mozilla.org/en-US/docs/Web/API/NodeList",
    "memberof": "BuiltinExternal/WebAPIExternal.js",
    "longname": "BuiltinExternal/WebAPIExternal.js~NodeList",
    "access": null,
    "description": null,
    "builtinExternal": true
  },
  {
    "__docId__": 157,
    "kind": "external",
    "static": true,
    "variation": null,
    "name": "XMLHttpRequest",
    "externalLink": "https://developer.mozilla.org/en/docs/Web/API/XMLHttpRequest",
    "memberof": "BuiltinExternal/WebAPIExternal.js",
    "longname": "BuiltinExternal/WebAPIExternal.js~XMLHttpRequest",
    "access": null,
    "description": null,
    "builtinExternal": true
  },
  {
    "__docId__": 158,
    "kind": "external",
    "static": true,
    "variation": null,
    "name": "AudioContext",
    "externalLink": "https://developer.mozilla.org/en/docs/Web/API/AudioContext",
    "memberof": "BuiltinExternal/WebAPIExternal.js",
    "longname": "BuiltinExternal/WebAPIExternal.js~AudioContext",
    "access": null,
    "description": null,
    "builtinExternal": true
  }
]