aboutsummaryrefslogtreecommitdiff
path: root/node_modules/@webpack-contrib
diff options
context:
space:
mode:
authorruki <waruqi@gmail.com>2018-11-08 00:38:48 +0800
committerruki <waruqi@gmail.com>2018-11-07 21:53:09 +0800
commit26105034da4fcce7ac883c899d781f016559310d (patch)
treec459a5dc4e3aa0972d9919033ece511ce76dd129 /node_modules/@webpack-contrib
parent2c77f00f1a7ecb6c8192f9c16d3b2001b254a107 (diff)
downloadxmake-docs-26105034da4fcce7ac883c899d781f016559310d.tar.gz
xmake-docs-26105034da4fcce7ac883c899d781f016559310d.zip
switch to vuepress
Diffstat (limited to 'node_modules/@webpack-contrib')
-rw-r--r--node_modules/@webpack-contrib/config-loader/CHANGELOG.md3
-rw-r--r--node_modules/@webpack-contrib/config-loader/LICENSE20
-rw-r--r--node_modules/@webpack-contrib/config-loader/README.md237
-rw-r--r--node_modules/@webpack-contrib/config-loader/lib/LoadConfigError.js13
-rw-r--r--node_modules/@webpack-contrib/config-loader/lib/RequireModuleError.js13
-rw-r--r--node_modules/@webpack-contrib/config-loader/lib/extend.js96
-rw-r--r--node_modules/@webpack-contrib/config-loader/lib/filters/plugins.js21
-rw-r--r--node_modules/@webpack-contrib/config-loader/lib/filters/rules.js30
-rw-r--r--node_modules/@webpack-contrib/config-loader/lib/index.js29
-rw-r--r--node_modules/@webpack-contrib/config-loader/lib/load.js99
-rw-r--r--node_modules/@webpack-contrib/config-loader/lib/resolve.js30
l---------node_modules/@webpack-contrib/config-loader/node_modules/.bin/webpack1
-rw-r--r--node_modules/@webpack-contrib/config-loader/package.json100
-rw-r--r--node_modules/@webpack-contrib/schema-utils/CHANGELOG.md126
-rw-r--r--node_modules/@webpack-contrib/schema-utils/LICENSE20
-rw-r--r--node_modules/@webpack-contrib/schema-utils/README.md213
-rw-r--r--node_modules/@webpack-contrib/schema-utils/dist/ValidationError.js110
-rw-r--r--node_modules/@webpack-contrib/schema-utils/dist/cjs.js3
-rw-r--r--node_modules/@webpack-contrib/schema-utils/dist/index.js13
-rw-r--r--node_modules/@webpack-contrib/schema-utils/dist/validate-options.js121
l---------node_modules/@webpack-contrib/schema-utils/node_modules/.bin/webpack1
-rw-r--r--node_modules/@webpack-contrib/schema-utils/node_modules/ansi-regex/index.js10
-rw-r--r--node_modules/@webpack-contrib/schema-utils/node_modules/ansi-regex/license9
-rw-r--r--node_modules/@webpack-contrib/schema-utils/node_modules/ansi-regex/package.json53
-rw-r--r--node_modules/@webpack-contrib/schema-utils/node_modules/ansi-regex/readme.md46
-rw-r--r--node_modules/@webpack-contrib/schema-utils/node_modules/strip-ansi/index.js4
-rw-r--r--node_modules/@webpack-contrib/schema-utils/node_modules/strip-ansi/license9
-rw-r--r--node_modules/@webpack-contrib/schema-utils/node_modules/strip-ansi/package.json52
-rw-r--r--node_modules/@webpack-contrib/schema-utils/node_modules/strip-ansi/readme.md39
-rw-r--r--node_modules/@webpack-contrib/schema-utils/package.json89
-rw-r--r--node_modules/@webpack-contrib/schema-utils/schema/options.json25
31 files changed, 1635 insertions, 0 deletions
diff --git a/node_modules/@webpack-contrib/config-loader/CHANGELOG.md b/node_modules/@webpack-contrib/config-loader/CHANGELOG.md
new file mode 100644
index 00000000..a72cd5aa
--- /dev/null
+++ b/node_modules/@webpack-contrib/config-loader/CHANGELOG.md
@@ -0,0 +1,3 @@
+# Change Log
+
+All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
diff --git a/node_modules/@webpack-contrib/config-loader/LICENSE b/node_modules/@webpack-contrib/config-loader/LICENSE
new file mode 100644
index 00000000..8c11fc72
--- /dev/null
+++ b/node_modules/@webpack-contrib/config-loader/LICENSE
@@ -0,0 +1,20 @@
+Copyright JS Foundation and other contributors
+
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of this software and associated documentation files (the
+'Software'), to deal in the Software without restriction, including
+without limitation the rights to use, copy, modify, merge, publish,
+distribute, sublicense, and/or sell copies of the Software, and to
+permit persons to whom the Software is furnished to do so, subject to
+the following conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/node_modules/@webpack-contrib/config-loader/README.md b/node_modules/@webpack-contrib/config-loader/README.md
new file mode 100644
index 00000000..49656e4a
--- /dev/null
+++ b/node_modules/@webpack-contrib/config-loader/README.md
@@ -0,0 +1,237 @@
+<div align="center">
+ <a href="https://github.com/webpack/webpack">
+ <img width="200" height="200" src="https://webpack.js.org/assets/icon-square-big.svg">
+ </a>
+</div>
+
+[![npm][npm]][npm-url]
+[![node][node]][node-url]
+[![deps][deps]][deps-url]
+[![tests][tests]][tests-url]
+[![chat][chat]][chat-url]
+
+# config-loader
+
+A webpack configuration loader.
+
+This module utilizes [`cosmiconfig`](https://github.com/davidtheclark/cosmiconfig)
+which supports declaring a webpack configuration in a number of different file
+formats including; `.webpackrc`, `webpack.config.js`, and a `webpack` property
+in a `package.json`.
+
+`config-loader` supports configuration modules which export an `Object`, `Array`,
+`Function`, `Promise`, and `Function` which returns a `Promise`.
+
+The module also validates found configurations against webpack's options schema
+to ensure that the configuration is correct before webpack attempts to use it.
+
+## Requirements
+
+This module requires a minimum of Node v6.9.0 and Webpack v4.0.0.
+
+## Getting Started
+
+To begin, you'll need to install `config-loader`:
+
+```console
+$ npm install @webpack-contrib/config-loader --save-dev
+```
+
+And get straight to loading a config:
+
+```js
+const loader = require('@webpack-contrib/config-loader');
+const options = { ... };
+
+loader(options).then((result) => {
+ // ...
+ // result = { config: Object, configPath: String }
+});
+
+```
+
+## Extending Configuration Files
+
+This module supports extending webpack configuration files with
+[ESLint-style](https://eslint.org/docs/user-guide/configuring#extending-configuration-files)
+`extends` functionality. This feature allows users to create a "base" config and
+in essence, "inherit" from that base config in a separate config. A bare-bones
+example:
+
+```js
+// base.config.js
+module.exports = {
+ name: 'base',
+ mode: 'development',
+ plugins: [...]
+}
+```
+
+```js
+// webpack.config.js
+module.exports = {
+ extends: path.join(..., 'base-config.js'),
+ name: 'dev'
+```
+
+The resulting configuration object would resemble:
+
+```js
+// result
+{
+ name: 'dev',
+ mode: 'development',
+ plugins: [...]
+}
+```
+
+The `webpack.config.js` file will be intelligently extended with properties
+from `base.config.js`.
+
+The `extends` property also supports naming installed NPM modules which export
+webpack configurations. Various configuration properties can also be filtered in
+different ways based on need.
+
+[Read More about Extending Configuration Files](./docs/EXTENDS.md)
+
+## Gotchas
+
+When using a configuration file that exports a `Function`, users of `webpack-cli`
+have become accustom to the function signature:
+
+```
+function config (env, argv)
+```
+
+`webpack-cli` provides any CLI flags prefixed with `--env` as a single object in
+the `env` parameter, which is an unnecessary feature.
+[Environment Variables](https://en.wikipedia.org/wiki/Environment_variable#Syntax)
+have long served the same purpose, and are easily accessible within a
+[Node environment](https://nodejs.org/api/process.html#process_process_env).
+
+As such, `config-loader` does not call `Function` configs with the `env`
+parameter. Rather, it makes calls with only the `argv` parameter.
+
+## Supported Compilers
+
+This module can support non-standard JavaScript file formats when a compatible
+compiler is registered via the `require` option. If the option is defined,
+`config-loader` will attempt to require the specified module(s) before the
+target config is found and loaded.
+
+As such, `config-loader` will also search for the following file extensions;
+`.js`, `.es6`, `.flow`, `.mjs`, and `.ts`.
+
+The module is also tested with the following compilers:
+
+- [`babel-register`](https://github.com/babel/babel/tree/6.x/packages/babel-register)
+- [`flow-remove-types/register`](https://github.com/flowtype/flow-remove-types)
+- [`ts-node/register`](https://www.npmjs.com/package/ts-node)
+
+_Note: Compilers are not part of or built-into this module. To use a specific compiler, you
+must install it and specify its use by using the `--require` CLI flag._
+
+## API
+
+### loader([options])
+
+Returns a `Promise`, which resolves with an `Object` containing:
+
+#### `config`
+
+Type: `Object`
+
+Contains the actual configuration object.
+
+#### `configPath`
+
+Type: `String`
+
+Contains the full, absolute filesystem path to the configuration file.
+
+## Options
+
+#### `allowMissing`
+
+Type: `Boolean`
+Default: `false`
+
+Instructs the module to allow a missing config file, and returns an `Object`
+with empty `config` and `configPath` properties in the event a config file was
+not found.
+
+### `configPath`
+
+Type: `String`
+Default: `undefined`
+
+Specifies an absolute path to a valid configuration file on the filesystem.
+
+### `cwd`
+
+Type: `String`
+Default: `process.cwd()`
+
+Specifies an filesystem path from which point `config-loader` will begin looking
+for a configuration file.
+
+### `require`
+
+Type: `String | Array[String]`
+Default: `undefined`
+
+Specifies compiler(s) to use when loading modules from files containing the
+configuration. For example:
+
+```js
+const loader = require('@webpack-contrib/config-loader');
+const options = { require: 'ts-node/register' };
+
+loader(options).then((result) => { ... });
+
+```
+
+See
+[Supported Compilers](https://github.com/webpack-contrib/config-loader#supported-compilers)
+for more information.
+
+### `schema`
+
+Type: `Object`
+Default: `undefined`
+
+An object containing a valid
+[JSON Schema Definition](http://json-schema.org/latest/json-schema-validation.html).
+
+By default, `config-loader` validates your webpack config against the
+[webpack config schema](https://github.com/webpack/webpack/blob/master/schemas/WebpackOptions.json).
+However, it can be useful to append additional schema data to allow configs,
+which contain properties not present in the webpack schema, to pass validation.
+
+## Contributing
+
+Please take a moment to read our contributing guidelines if you haven't yet done so.
+
+#### [CONTRIBUTING](./.github/CONTRIBUTING)
+
+## License
+
+#### [MIT](./LICENSE)
+
+[npm]: https://img.shields.io/npm/v/@webpack-contrib/config-loader.svg
+[npm-url]: https://npmjs.com/package/@webpack-contrib/config-loader
+
+[node]: https://img.shields.io/node/v/@webpack-contrib/config-loader.svg
+[node-url]: https://nodejs.org
+
+[deps]: https://david-dm.org/webpack-contrib/config-loader.svg
+[deps-url]: https://david-dm.org/webpack-contrib/config-loader
+
+[tests]: https://img.shields.io/circleci/project/github/webpack-contrib/config-loader.svg
+[tests-url]: https://circleci.com/gh/webpack-contrib/config-loader
+
+[cover]: https://codecov.io/gh/webpack-contrib/config-loader/branch/master/graph/badge.svg
+[cover-url]: https://codecov.io/gh/webpack-contrib/config-loader
+
+[chat]: https://img.shields.io/badge/gitter-webpack%2Fwebpack-brightgreen.svg
+[chat-url]: https://gitter.im/webpack/webpack
diff --git a/node_modules/@webpack-contrib/config-loader/lib/LoadConfigError.js b/node_modules/@webpack-contrib/config-loader/lib/LoadConfigError.js
new file mode 100644
index 00000000..5c6e0c45
--- /dev/null
+++ b/node_modules/@webpack-contrib/config-loader/lib/LoadConfigError.js
@@ -0,0 +1,13 @@
+module.exports = class LoadConfigError extends Error {
+ constructor(error, configPath) {
+ super(error.message);
+
+ this.name = 'LoadConfigError';
+
+ const stack = error.stack.split('\n').slice(1);
+ stack.unshift(this.toString());
+
+ this.stack = stack.join('\n');
+ this.meta = { configPath };
+ }
+};
diff --git a/node_modules/@webpack-contrib/config-loader/lib/RequireModuleError.js b/node_modules/@webpack-contrib/config-loader/lib/RequireModuleError.js
new file mode 100644
index 00000000..ecaeae33
--- /dev/null
+++ b/node_modules/@webpack-contrib/config-loader/lib/RequireModuleError.js
@@ -0,0 +1,13 @@
+module.exports = class RequireModuleError extends Error {
+ constructor(error, moduleName) {
+ super(error.message);
+
+ this.name = 'RequireModuleError';
+
+ const stack = error.stack.split('\n').slice(1);
+ stack.unshift(this.toString());
+
+ this.stack = stack.join('\n');
+ this.meta = { moduleName };
+ }
+};
diff --git a/node_modules/@webpack-contrib/config-loader/lib/extend.js b/node_modules/@webpack-contrib/config-loader/lib/extend.js
new file mode 100644
index 00000000..0854032a
--- /dev/null
+++ b/node_modules/@webpack-contrib/config-loader/lib/extend.js
@@ -0,0 +1,96 @@
+const path = require('path');
+
+const isPlainObj = require('is-plain-obj');
+const merge = require('merge-options').bind({ concatArrays: true });
+
+const load = require('./load');
+const resolve = require('./resolve');
+const pluginFilters = require('./filters/plugins');
+const ruleFilters = require('./filters/rules');
+
+const loadExtends = (extent, options) => {
+ let result;
+ /* istanbul ignore else */
+ if (path.isAbsolute(extent)) {
+ result = load({ allowMissing: true, configPath: extent });
+ } else {
+ // eslint-disable-next-line import/no-dynamic-require, global-require
+ result = { config: require(extent), configPath: extent };
+ }
+
+ // eslint-disable-next-line no-use-before-define
+ return resolve(result).then(({ config }) => mergeExtend(config, options));
+};
+
+const filterPlugins = (config, options = {}) => {
+ const filterName = options.plugins || 'default';
+ const filter = pluginFilters[filterName] || pluginFilters.default;
+
+ return filter(config);
+};
+
+const filterRules = (config, options = {}) => {
+ const filterName = options.rules || 'default';
+ const filter = ruleFilters[filterName] || ruleFilters.default;
+
+ return filter(config);
+};
+
+const filterModule = (config, options = {}) => {
+ const { module } = config;
+ /* istanbul ignore else */
+ if (module) {
+ module.rules = filterRules(config, options);
+ }
+
+ return module;
+};
+
+const filter = (config, options = {}) => {
+ /* eslint-disable no-param-reassign */
+ config.module = filterModule(config, options);
+ config.plugins = filterPlugins(config, options);
+
+ return config;
+};
+
+const mergeExtend = (config, options = {}) => {
+ let { extends: configExtends } = config;
+
+ if (configExtends) {
+ if (isPlainObj(configExtends)) {
+ // eslint-disable-next-line no-param-reassign
+ options = configExtends.filters;
+ configExtends = configExtends.configs;
+ }
+
+ configExtends = [].concat(configExtends);
+
+ const result = configExtends.reduceRight(
+ (prev, conf) =>
+ loadExtends(conf, options).then((extent) =>
+ prev.then((prevConfig) => filter(merge(extent, prevConfig), options))
+ ),
+ Promise.resolve(config)
+ );
+
+ return result;
+ }
+
+ return Promise.resolve(config);
+};
+
+module.exports = {
+ extend(config, options) {
+ const promises = [].concat(config).map((conf) =>
+ mergeExtend(conf, options).then((result) => {
+ delete result.extends;
+ return result;
+ })
+ );
+
+ return Promise.all(promises).then(
+ (results) => (results.length > 1 ? results : results[0])
+ );
+ },
+};
diff --git a/node_modules/@webpack-contrib/config-loader/lib/filters/plugins.js b/node_modules/@webpack-contrib/config-loader/lib/filters/plugins.js
new file mode 100644
index 00000000..925c2068
--- /dev/null
+++ b/node_modules/@webpack-contrib/config-loader/lib/filters/plugins.js
@@ -0,0 +1,21 @@
+module.exports = {
+ default: (config) => config.plugins,
+
+ constructor: (config) => {
+ const { plugins } = config;
+ /* istanbul ignore if */
+ if (!plugins || !plugins.length) {
+ return plugins;
+ }
+
+ return plugins.reduceRight(
+ (array, other) =>
+ array.findIndex(
+ (plugin) => plugin.constructor.name === other.constructor.name
+ ) < 0
+ ? [...array, other]
+ : array,
+ []
+ );
+ },
+};
diff --git a/node_modules/@webpack-contrib/config-loader/lib/filters/rules.js b/node_modules/@webpack-contrib/config-loader/lib/filters/rules.js
new file mode 100644
index 00000000..87a29303
--- /dev/null
+++ b/node_modules/@webpack-contrib/config-loader/lib/filters/rules.js
@@ -0,0 +1,30 @@
+const regexEqual = (reg, exp) =>
+ reg instanceof RegExp &&
+ exp instanceof RegExp &&
+ reg.source === exp.source &&
+ reg.global === exp.global &&
+ reg.ignoreCase === exp.ignoreCase &&
+ reg.multiline === exp.multiline;
+
+module.exports = {
+ default: (config) => {
+ const { rules } = config.module;
+ /* istanbul ignore if */
+ if (!rules || !rules.length) {
+ return rules;
+ }
+
+ return rules.reduce(
+ (array, other) =>
+ array.findIndex(
+ (rule) =>
+ rule.test === other.test || regexEqual(rule.test, other.test)
+ ) < 0
+ ? [...array, other]
+ : array,
+ []
+ );
+ },
+
+ none: (config) => config.module.rules,
+};
diff --git a/node_modules/@webpack-contrib/config-loader/lib/index.js b/node_modules/@webpack-contrib/config-loader/lib/index.js
new file mode 100644
index 00000000..cafce44c
--- /dev/null
+++ b/node_modules/@webpack-contrib/config-loader/lib/index.js
@@ -0,0 +1,29 @@
+const merge = require('merge-options');
+const webpackLog = require('webpack-log');
+const validate = require('@webpack-contrib/schema-utils');
+const webpackSchema = require('webpack/schemas/WebpackOptions.json');
+
+const { extend } = require('./extend');
+const load = require('./load');
+const resolve = require('./resolve');
+
+module.exports = (options = {}) => {
+ webpackLog({ name: 'config', id: 'webpack-config-loader' });
+
+ const name = 'config-loader';
+ const raw = load(options);
+ const schema = merge({}, options.schema, webpackSchema);
+
+ return resolve(raw).then((result) => {
+ const { config, configPath } = result;
+
+ return extend(config).then((finalConfig) => {
+ // finalConfig may be a single Object or it may be an Array[Object]
+ // for simplicity, concat into an array and treat both types the same.
+ for (const target of [].concat(finalConfig)) {
+ validate({ name, schema, target });
+ }
+ return { config: finalConfig, configPath };
+ });
+ });
+};
diff --git a/node_modules/@webpack-contrib/config-loader/lib/load.js b/node_modules/@webpack-contrib/config-loader/lib/load.js
new file mode 100644
index 00000000..62279036
--- /dev/null
+++ b/node_modules/@webpack-contrib/config-loader/lib/load.js
@@ -0,0 +1,99 @@
+const chalk = require('chalk');
+const cosmiconfig = require('cosmiconfig');
+const resolvePath = require('resolve').sync;
+const webpackLog = require('webpack-log');
+
+const LoadConfigError = require('./LoadConfigError');
+const RequireModuleError = require('./RequireModuleError');
+
+const cwd = process.cwd();
+const { loadJs } = cosmiconfig;
+const prefix = 'webpack';
+const cosmicOptions = {
+ loaders: {
+ '.es6': loadJs,
+ '.flow': loadJs,
+ '.mjs': loadJs,
+ '.ts': loadJs,
+ },
+ searchPlaces: [
+ `${prefix}.config.js`,
+ `${prefix}.config.es6`,
+ `${prefix}.config.flow`,
+ `${prefix}.config.mjs`,
+ `${prefix}.config.ts`,
+ `.${prefix}rc`,
+ 'package.json',
+ `.${prefix}rc.json`,
+ `.${prefix}rc.yaml`,
+ `.${prefix}rc.yml`,
+ ],
+};
+
+module.exports = (options = {}) => {
+ const log = webpackLog({ name: 'config', id: 'webpack-config-loader' });
+ const requires = [].concat(options.require).filter((r) => !!r);
+
+ // eslint-disable-next-line no-param-reassign
+ options = Object.assign({ cwd: process.cwd() }, options);
+
+ for (const module of requires) {
+ try {
+ const modulePath = resolvePath(module, { basedir: cwd });
+
+ log.info(chalk`Requiring the {cyan ${module}} module`);
+
+ if (options.requireOptions) {
+ const { requireOptions } = options;
+ // eslint-disable-next-line import/no-dynamic-require, global-require
+ require(modulePath)(requireOptions);
+ } else {
+ // eslint-disable-next-line import/no-dynamic-require, global-require
+ require(modulePath);
+ }
+ } catch (e) {
+ log.error(chalk`An error occurred while requiring: {grey ${module}}`);
+ throw new RequireModuleError(e, module);
+ }
+ }
+
+ let config = {};
+ let { configPath } = options;
+
+ const explorer = cosmiconfig(prefix, cosmicOptions);
+
+ try {
+ let result;
+ if (configPath) {
+ result = explorer.loadSync(configPath) || {};
+ } else {
+ result = explorer.searchSync(options.cwd) || {};
+ }
+
+ ({ config, filepath: configPath } = result);
+
+ log.debug(chalk`Found config at {grey ${configPath}}`);
+ } catch (e) {
+ /* istanbul ignore else */
+ if (configPath) {
+ log.error(chalk`An error occurred while trying to load {grey ${configPath}}
+ Did you forget to specify a --require?`);
+ } else {
+ log.error(chalk`An error occurred while trying to find a config file
+ Did you forget to specify a --require?`);
+ }
+ throw new LoadConfigError(e, configPath);
+ }
+
+ if (!configPath && !options.allowMissing) {
+ // prettier-ignore
+ log.error(chalk`Unable to load a config from: {grey ${options.cwd}}`);
+ const e = new Error(`Unable to load a config from: ${options.cwd}`);
+ throw new LoadConfigError(e, configPath);
+ } else {
+ config = config || {};
+ configPath = configPath || '';
+ }
+
+ return { config, configPath };
+};
diff --git a/node_modules/@webpack-contrib/config-loader/lib/resolve.js b/node_modules/@webpack-contrib/config-loader/lib/resolve.js
new file mode 100644
index 00000000..2ed5cf1a
--- /dev/null
+++ b/node_modules/@webpack-contrib/config-loader/lib/resolve.js
@@ -0,0 +1,30 @@
+const minimist = require('minimist');
+
+const fromFunction = (config, argv) => {
+ const result = config(argv);
+
+ return Promise.resolve(result);
+};
+
+const fromObject = (config) => Promise.resolve(config);
+
+const handlers = {
+ function: fromFunction,
+ object: fromObject,
+};
+
+module.exports = (configSet, argv) => {
+ const { config, configPath } = configSet;
+ const type = typeof (config.default || config);
+ const handler = handlers[type];
+
+ // eslint-disable-next-line no-param-reassign
+ argv = argv || minimist(process.argv.slice(2));
+
+ return handler(config.default || config, argv).then((configResult) => {
+ return {
+ config: configResult,
+ configPath,
+ };
+ });
+};
diff --git a/node_modules/@webpack-contrib/config-loader/node_modules/.bin/webpack b/node_modules/@webpack-contrib/config-loader/node_modules/.bin/webpack
new file mode 120000
index 00000000..324aada8
--- /dev/null
+++ b/node_modules/@webpack-contrib/config-loader/node_modules/.bin/webpack
@@ -0,0 +1 @@
+../../../../webpack/bin/webpack.js \ No newline at end of file
diff --git a/node_modules/@webpack-contrib/config-loader/package.json b/node_modules/@webpack-contrib/config-loader/package.json
new file mode 100644
index 00000000..13f3afb5
--- /dev/null
+++ b/node_modules/@webpack-contrib/config-loader/package.json
@@ -0,0 +1,100 @@
+{
+ "name": "@webpack-contrib/config-loader",
+ "version": "1.2.1",
+ "description": "A webpack configuration loader",
+ "license": "MIT",
+ "repository": "webpack-contrib/config-loader",
+ "author": "Andrew Powell <andrew@shellscape.org>",
+ "homepage": "https://github.com/webpack-contrib/config-loader",
+ "bugs": "https://github.com/webpack-contrib/config-loader/issues",
+ "main": "lib/index.js",
+ "engines": {
+ "node": ">= 6.9.0 <7.0.0 || >= 8.9.0"
+ },
+ "publishConfig": {
+ "access": "public"
+ },
+ "scripts": {
+ "commitlint": "commitlint",
+ "commitmsg": "commitlint -e $GIT_PARAMS",
+ "lint": "eslint --cache lib test",
+ "ci:lint:commits": "commitlint --from=${CIRCLE_BRANCH} --to=${CIRCLE_SHA1}",
+ "lint-staged": "lint-staged",
+ "release": "standard-version",
+ "release:ci": "conventional-github-releaser -p angular",
+ "release:validate": "commitlint --from=$(git describe --tags --abbrev=0) --to=$(git rev-parse HEAD)",
+ "security": "nsp check",
+ "test": "mocha test/test.js --exit --mode=superman",
+ "test:coverage": "mkdir -p coverage && nyc --silent npm test && npm run test:coverage:report",
+ "test:coverage:report": "nyc report --reporter=lcov --reporter=text-lcov --reporter=json --reporter=clover > coverage/lcov.info",
+ "ci:lint": "npm run lint && npm run security",
+ "ci:test": "npm run test -- --runInBand",
+ "ci:coverage": "npm run test:coverage -- --runInBand",
+ "defaults": "webpack-defaults"
+ },
+ "files": [
+ "lib/",
+ "index.js"
+ ],
+ "peerDependencies": {
+ "webpack": "^4.3.0"
+ },
+ "dependencies": {
+ "@webpack-contrib/schema-utils": "^1.0.0-beta.0",
+ "chalk": "^2.1.0",
+ "cosmiconfig": "^5.0.2",
+ "is-plain-obj": "^1.1.0",
+ "loud-rejection": "^1.6.0",
+ "merge-options": "^1.0.1",
+ "minimist": "^1.2.0",
+ "resolve": "^1.6.0",
+ "webpack-log": "^1.1.2"
+ },
+ "devDependencies": {
+ "@commitlint/cli": "^7.0.0",
+ "@commitlint/config-conventional": "^7.0.1",
+ "@webpack-contrib/eslint-config-webpack": "^2.0.4",
+ "babel-cli": "^6.26.0",
+ "babel-core": "^6.26.0",
+ "babel-plugin-transform-object-rest-spread": "^6.26.0",
+ "babel-polyfill": "^6.26.0",
+ "babel-preset-env": "^1.6.1",
+ "babel-register": "^6.26.0",
+ "conventional-github-releaser": "^3.1.2",
+ "cross-env": "^5.1.4",
+ "del": "^3.0.0",
+ "del-cli": "^1.1.0",
+ "eslint": "^4.19.1",
+ "eslint-plugin-import": "^2.10.0",
+ "eslint-plugin-prettier": "^2.6.0",
+ "esm": "^3.0.15",
+ "execa": "^0.10.0",
+ "expect": "^23.2.0",
+ "flow-remove-types": "^1.2.3",
+ "husky": "^0.14.3",
+ "jest-serializer-path": "^0.1.15",
+ "jest-snapshot": "^23.2.0",
+ "lint-staged": "^7.2.0",
+ "memory-fs": "^0.4.1",
+ "mocha": "^5.0.5",
+ "nsp": "^3.2.1",
+ "nyc": "^12.0.2",
+ "pre-commit": "^1.2.2",
+ "prettier": "^1.11.1",
+ "standard-version": "^4.3.0",
+ "ts-node": "^5.0.1",
+ "typescript": "^2.8.1",
+ "webpack": "^4.4.1",
+ "webpack-defaults": "^2.3.0"
+ },
+ "keywords": [
+ "webpack"
+ ],
+ "pre-commit": "lint-staged",
+ "lint-staged": {
+ "*.js": [
+ "eslint --fix",
+ "git add"
+ ]
+ }
+}
diff --git a/node_modules/@webpack-contrib/schema-utils/CHANGELOG.md b/node_modules/@webpack-contrib/schema-utils/CHANGELOG.md
new file mode 100644
index 00000000..a284c97a
--- /dev/null
+++ b/node_modules/@webpack-contrib/schema-utils/CHANGELOG.md
@@ -0,0 +1,126 @@
+# Change Log
+
+All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
+
+<a name="1.0.0-beta.0"></a>
+# [1.0.0-beta.0](https://github.com/webpack-contrib/schema-utils/compare/v0.4.5...v1.0.0-beta.0) (2018-04-02)
+
+
+### Code Refactoring
+
+* refactor exports, self-validate, pretty output ([#25](https://github.com/webpack-contrib/schema-utils/issues/25)) ([f6fd667](https://github.com/webpack-contrib/schema-utils/commit/f6fd667))
+
+
+### BREAKING CHANGES
+
+* Minor API change along with a significant improvment in output readability and general development experience.
+
+MIGRATION: See https://github.com/webpack-contrib/schema-utils#api
+
+* test(jest): update tests and snapshots
+* docs(meta): add output images
+* docs(readme): update readme with api, options, images
+* fix(validation error): Workaround for extending builtin
+* style: Breaks up import groups
+
+
+
+<a name="0.4.5"></a>
+## [0.4.5](https://github.com/webpack-contrib/schema-utils/compare/v0.4.4...v0.4.5) (2018-02-13)
+
+
+### Bug Fixes
+
+* **CHANGELOG:** update broken links ([4483b9f](https://github.com/webpack-contrib/schema-utils/commit/4483b9f))
+* **package:** update broken links ([f2494ba](https://github.com/webpack-contrib/schema-utils/commit/f2494ba))
+
+
+
+<a name="0.4.4"></a>
+## [0.4.4](https://github.com/webpack-contrib/schema-utils/compare/v0.4.3...v0.4.4) (2018-02-13)
+
+
+### Bug Fixes
+
+* **package:** update `dependencies` ([#22](https://github.com/webpack-contrib/schema-utils/issues/22)) ([3aecac6](https://github.com/webpack-contrib/schema-utils/commit/3aecac6))
+
+
+
+<a name="0.4.3"></a>
+## [0.4.3](https://github.com/webpack-contrib/schema-utils/compare/v0.4.2...v0.4.3) (2017-12-14)
+
+
+### Bug Fixes
+
+* **validateOptions:** throw `err` instead of `process.exit(1)` ([#17](https://github.com/webpack-contrib/schema-utils/issues/17)) ([c595eda](https://github.com/webpack-contrib/schema-utils/commit/c595eda))
+* **ValidationError:** never return `this` in the ctor ([#16](https://github.com/webpack-contrib/schema-utils/issues/16)) ([c723791](https://github.com/webpack-contrib/schema-utils/commit/c723791))
+
+
+
+<a name="0.4.2"></a>
+## [0.4.2](https://github.com/webpack-contrib/schema-utils/compare/v0.4.1...v0.4.2) (2017-11-09)
+
+
+### Bug Fixes
+
+* **validateOptions:** catch `ValidationError` and handle it internally ([#15](https://github.com/webpack-contrib/schema-utils/issues/15)) ([9c5ef5e](https://github.com/webpack-contrib/schema-utils/commit/9c5ef5e))
+
+
+
+<a name="0.4.1"></a>
+## [0.4.1](https://github.com/webpack-contrib/schema-utils/compare/v0.4.0...v0.4.1) (2017-11-03)
+
+
+### Bug Fixes
+
+* **ValidationError:** use `Error.captureStackTrace` for `err.stack` handling ([#14](https://github.com/webpack-contrib/schema-utils/issues/14)) ([a6fb974](https://github.com/webpack-contrib/schema-utils/commit/a6fb974))
+
+
+
+<a name="0.4.0"></a>
+# [0.4.0](https://github.com/webpack-contrib/schema-utils/compare/v0.3.0...v0.4.0) (2017-10-28)
+
+
+### Features
+
+* add support for `typeof`, `instanceof` (`{Function\|RegExp}`) ([#10](https://github.com/webpack-contrib/schema-utils/issues/10)) ([9f01816](https://github.com/webpack-contrib/schema-utils/commit/9f01816))
+
+
+
+<a name="0.3.0"></a>
+# [0.3.0](https://github.com/webpack-contrib/schema-utils/compare/v0.2.1...v0.3.0) (2017-04-29)
+
+
+### Features
+
+* add ValidationError ([#8](https://github.com/webpack-contrib/schema-utils/issues/8)) ([d48f0fb](https://github.com/webpack-contrib/schema-utils/commit/d48f0fb))
+
+
+
+<a name="0.2.1"></a>
+## [0.2.1](https://github.com/webpack-contrib/schema-utils/compare/v0.2.0...v0.2.1) (2017-03-13)
+
+
+### Bug Fixes
+
+* Include .babelrc to `files` ([28f0363](https://github.com/webpack-contrib/schema-utils/commit/28f0363))
+* Include source to `files` ([43b0f2f](https://github.com/webpack-contrib/schema-utils/commit/43b0f2f))
+
+
+
+<a name="0.2.0"></a>
+# [0.2.0](https://github.com/webpack-contrib/schema-utils/compare/v0.1.0...v0.2.0) (2017-03-12)
+
+<a name="0.1.0"></a>
+# 0.1.0 (2017-03-07)
+
+
+### Features
+
+* **validations:** add validateOptions module ([ae9b47b](https://github.com/webpack-contrib/schema-utils/commit/ae9b47b))
+
+
+
+# Change Log
+
+All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
diff --git a/node_modules/@webpack-contrib/schema-utils/LICENSE b/node_modules/@webpack-contrib/schema-utils/LICENSE
new file mode 100644
index 00000000..8c11fc72
--- /dev/null
+++ b/node_modules/@webpack-contrib/schema-utils/LICENSE
@@ -0,0 +1,20 @@
+Copyright JS Foundation and other contributors
+
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of this software and associated documentation files (the
+'Software'), to deal in the Software without restriction, including
+without limitation the rights to use, copy, modify, merge, publish,
+distribute, sublicense, and/or sell copies of the Software, and to
+permit persons to whom the Software is furnished to do so, subject to
+the following conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/node_modules/@webpack-contrib/schema-utils/README.md b/node_modules/@webpack-contrib/schema-utils/README.md
new file mode 100644
index 00000000..b4245958
--- /dev/null
+++ b/node_modules/@webpack-contrib/schema-utils/README.md
@@ -0,0 +1,213 @@
+<div align="center">
+ <a href="http://json-schema.org">
+ <img width="200"
+ src="https://cdn.rawgit.com/webpack-contrib/schema-utils/master/.github/json-schema-logo.svg">
+ </a>
+ <a href="https://github.com/webpack/webpack">
+ <img width="200" src="https://webpack.js.org/assets/icon-square-big.svg">
+ </a>
+</div>
+
+[![npm][npm]][npm-url]
+[![node][node]][node-url]
+[![deps][deps]][deps-url]
+[![tests][tests]][tests-url]
+[![chat][chat]][chat-url]
+
+# schema-utils
+
+Webpack Schema Validation Utilities
+
+Validates `options` objects against a [JSON Schema](http://json-schema.org) and
+displays the output beautifully.
+
+<img width="645"
+ src="https://cdn.rawgit.com/webpack-contrib/schema-utils/master/.github/pretty.png">
+
+## Requirements
+
+This module requires a minimum of Node v6.9.0 and Webpack v4.0.0.
+
+## Getting Started
+
+To begin, you'll need to install `schema-utils`:
+
+```console
+$ npm install @webpack-contrib/schema-utils --save-dev
+```
+
+## API
+
+When using the API directly, the main entry point is the `serve` function, which
+is the default export of the module.
+
+```js
+const validate = require('@webpack-contrib/schema-utils');
+const schema = require('path/to/schema.json');
+const target = { ... }; // the options object to validate
+const name = '...'; // the load or plugin name validate() is being used in
+
+validate({ name, schema, target });
+```
+
+### serve(options)
+
+Returns `true` if validation succeeded, `false` validation failed and options
+allow the function to return a value. (see options below).
+
+### options
+
+Type: `Object`
+
+Options for initializing and controlling the server provided. The option names
+listed below belong to the `options` object.
+
+#### `exit`
+
+Type: `Boolean`
+Default: `false`
+
+If `true`, will instruct the validator to end the process with an error code of
+`1`.
+
+#### `log`
+
+Type: `Boolean`
+Default: `false`
+
+If `true`, will instruct the validator to log the results of the validation (in
+the event of a failure) in a
+[webpack-style log output](https://github.com/webpack-contrib/webpack-log). This
+is typically used with `throw: false`.
+
+<img width="500"
+ src="https://cdn.rawgit.com/webpack-contrib/schema-utils/master/.github/output-log-true.png">
+
+#### `name`
+
+Type: `String`
+Default: `undefined`
+_**Required**_
+
+A `String` specifying the name of the loader or plugin utilizing the validator.
+
+#### `schema`
+
+Type: `String|Object`
+Default: `undefined`
+_**Required**_
+
+A `String` specifying the filesystem path to the schema used for validation.
+Alternatively, you may specify an `object` containing the JSON-parsed schema.
+
+#### `target`
+
+Type: `Object`
+Default: `undefined`
+_**Required**_
+
+An `Object` containing the options to validate against the specified schema.
+
+#### `throw`
+
+Type: `Boolean`
+Default: `true`
+
+By default the validator will throw an error and display validation results upon
+failure. If this option is set to `false`, the validator will not throw an error.
+This is typically used in situations where a return value of `false` for
+`validate()` is sufficient, a stack trace is uneeded, or when
+[webpack-style log output](https://github.com/webpack-contrib/webpack-log) is
+preferred.
+
+<img width="645"
+ src="https://cdn.rawgit.com/webpack-contrib/schema-utils/master/.github/output-throws-true.png">
+
+
+## Examples
+
+Below is a basic example of how this validator might be used:
+
+```json
+# schema.json
+{
+ "type": "object",
+ "properties": {
+ "name": {
+ "type": "string"
+ },
+ "test": {
+ "anyOf": [
+ { "type": "array" },
+ { "type": "string" },
+ { "instanceof": "RegExp" }
+ ]
+ },
+ "transform": {
+ "instanceof": "Function"
+ },
+ "sourceMap": {
+ "type": "boolean"
+ }
+ },
+ "additionalProperties": false
+}
+```
+
+### Use in a Loader
+
+```js
+const { getOptions } = require('loader-utils');
+const validate = require('@webpack-contrib/schema-utils');
+
+import schema from 'path/to/schema.json'
+
+function loader (src, map) {
+ const options = getOptions(this) || {};
+
+ validate({ name: 'Loader Name', schema, target: options });
+
+ // Code...
+}
+```
+
+### Use in a Plugin
+
+```js
+const validate = require('@webpack-contrib/schema-utils');
+const schema = require('path/to/schema.json');
+
+class Plugin {
+ constructor (options) {
+ validate({ name: 'Plugin Name', schema, target: options });
+
+ this.options = options;
+ }
+
+ apply (compiler) {
+ // Code...
+ }
+}
+```
+
+## License
+
+#### [MIT](./LICENSE)
+
+[npm]: https://img.shields.io/npm/v/schema-utils.svg
+[npm-url]: https://npmjs.com/package/schema-utils
+
+[node]: https://img.shields.io/node/v/schema-utils.svg
+[node-url]: https://nodejs.org
+
+[deps]: https://david-dm.org/webpack-contrib/schema-utils.svg
+[deps-url]: https://david-dm.org/webpack-contrib/schema-utils
+
+[tests]: https://img.shields.io/circleci/project/github/webpack-contrib/schema-utils.svg
+[tests-url]: https://circleci.com/gh/webpack-contrib/schema-utils
+
+[cover]: https://codecov.io/gh/webpack-contrib/schema-utils/branch/master/graph/badge.svg
+[cover-url]: https://codecov.io/gh/webpack-contrib/schema-utils
+
+[chat]: https://img.shields.io/badge/gitter-webpack%2Fwebpack-brightgreen.svg
+[chat-url]: https://gitter.im/webpack/webpack \ No newline at end of file
diff --git a/node_modules/@webpack-contrib/schema-utils/dist/ValidationError.js b/node_modules/@webpack-contrib/schema-utils/dist/ValidationError.js
new file mode 100644
index 00000000..238317bb
--- /dev/null
+++ b/node_modules/@webpack-contrib/schema-utils/dist/ValidationError.js
@@ -0,0 +1,110 @@
+'use strict';
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+
+var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
+
+var _chalk = require('chalk');
+
+var _chalk2 = _interopRequireDefault(_chalk);
+
+var _stripAnsi = require('strip-ansi');
+
+var _stripAnsi2 = _interopRequireDefault(_stripAnsi);
+
+var _textTable = require('text-table');
+
+var _textTable2 = _interopRequireDefault(_textTable);
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
+
+function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
+
+function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
+
+var ValidationError = function (_Error) {
+ _inherits(ValidationError, _Error);
+
+ function ValidationError(options) {
+ _classCallCheck(this, ValidationError);
+
+ // Workaround for https://github.com/istanbuljs/istanbuljs/issues/139
+ var _this = _possibleConstructorReturn(this, (ValidationError.__proto__ || Object.getPrototypeOf(ValidationError)).call(this));
+
+ _this.constructor = ValidationError;
+ _this.__proto__ = ValidationError.prototype;
+ // End Workaround
+ // prettier-ignore
+ _this.message = _chalk2.default`${options.name}`;
+ _this.meta = options;
+ _this.meta.desc = _chalk2.default`{underline Options Validation Error}`;
+ _this.name = 'ValidationError';
+
+ if (options.log) {
+ _this.message += `: ${_this.meta.desc}`;
+ } else {
+ _this.message += `\n\n ${_this.meta.desc}\n\n${_this.format()}\n`;
+ }
+
+ Error.captureStackTrace(_this, _this.constructor);
+ return _this;
+ }
+
+ _createClass(ValidationError, [{
+ key: 'format',
+ value: function format() {
+ var errors = this.meta.errors;
+
+ var rows = [];
+ var options = {
+ align: ['', 'l', 'l'],
+ stringLength(str) {
+ return (0, _stripAnsi2.default)(str).length;
+ }
+ };
+
+ var _iteratorNormalCompletion = true;
+ var _didIteratorError = false;
+ var _iteratorError = undefined;
+
+ try {
+ for (var _iterator = errors[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {
+ var err = _step.value;
+
+ rows.push(['', _chalk2.default`{dim options}${err.dataPath}`, _chalk2.default`{blue ${err.message}}`]);
+ }
+ } catch (err) {
+ _didIteratorError = true;
+ _iteratorError = err;
+ } finally {
+ try {
+ if (!_iteratorNormalCompletion && _iterator.return) {
+ _iterator.return();
+ }
+ } finally {
+ if (_didIteratorError) {
+ throw _iteratorError;
+ }
+ }
+ }
+
+ return (0, _textTable2.default)(rows, options);
+ }
+
+ // eslint-disable-next-line class-methods-use-this
+
+ }, {
+ key: 'toString',
+ value: function toString() {
+ return `${this.message}\n\n${this.format()}`;
+ }
+ }]);
+
+ return ValidationError;
+}(Error);
+
+exports.default = ValidationError; \ No newline at end of file
diff --git a/node_modules/@webpack-contrib/schema-utils/dist/cjs.js b/node_modules/@webpack-contrib/schema-utils/dist/cjs.js
new file mode 100644
index 00000000..61cc3574
--- /dev/null
+++ b/node_modules/@webpack-contrib/schema-utils/dist/cjs.js
@@ -0,0 +1,3 @@
+'use strict';
+
+module.exports = require('./index').default; \ No newline at end of file
diff --git a/node_modules/@webpack-contrib/schema-utils/dist/index.js b/node_modules/@webpack-contrib/schema-utils/dist/index.js
new file mode 100644
index 00000000..79e5482d
--- /dev/null
+++ b/node_modules/@webpack-contrib/schema-utils/dist/index.js
@@ -0,0 +1,13 @@
+'use strict';
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+
+var _validateOptions = require('./validate-options');
+
+var _validateOptions2 = _interopRequireDefault(_validateOptions);
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+exports.default = _validateOptions2.default; \ No newline at end of file
diff --git a/node_modules/@webpack-contrib/schema-utils/dist/validate-options.js b/node_modules/@webpack-contrib/schema-utils/dist/validate-options.js
new file mode 100644
index 00000000..81331987
--- /dev/null
+++ b/node_modules/@webpack-contrib/schema-utils/dist/validate-options.js
@@ -0,0 +1,121 @@
+'use strict';
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+
+var _path = require('path');
+
+var _path2 = _interopRequireDefault(_path);
+
+var _fs = require('fs');
+
+var _fs2 = _interopRequireDefault(_fs);
+
+var _ajv = require('ajv');
+
+var _ajv2 = _interopRequireDefault(_ajv);
+
+var _ajvKeywords = require('ajv-keywords');
+
+var _ajvKeywords2 = _interopRequireDefault(_ajvKeywords);
+
+var _webpackLog = require('webpack-log');
+
+var _webpackLog2 = _interopRequireDefault(_webpackLog);
+
+var _options = require('../schema/options.json');
+
+var _options2 = _interopRequireDefault(_options);
+
+var _ValidationError = require('./ValidationError');
+
+var _ValidationError2 = _interopRequireDefault(_ValidationError);
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+var ajv = new _ajv2.default({
+ allErrors: true,
+ useDefaults: true,
+ errorDataPath: 'property'
+});
+var defaults = {
+ exit: false,
+ log: false,
+ name: '',
+ schema: '',
+ target: {},
+ throw: true
+};
+var logName = 'schema-utils';
+
+(0, _ajvKeywords2.default)(ajv, ['instanceof', 'typeof']);
+
+var validate = function validate(options) {
+ var schema = void 0;
+
+ if (typeof options.schema === 'string') {
+ schema = _fs2.default.readFileSync(_path2.default.resolve(options.schema), 'utf8');
+ schema = JSON.parse(schema);
+ } else {
+ schema = Object.assign({}, options.schema);
+ }
+
+ if (!ajv.validate(schema, options.target)) {
+ var errors = ajv.errors;
+
+
+ errors = errors.sort(function (a, b) {
+ var aPath = a.dataPath;
+ var bPath = b.dataPath;
+
+ if (aPath.startsWith('[')) {
+ if (!bPath.startsWith('[')) {
+ return -1;
+ }
+
+ return aPath < bPath ? -1 : 1;
+ }
+
+ if (aPath.startsWith('.') && bPath.startsWith('.')) {
+ return aPath < bPath ? -1 : 1;
+ }
+
+ return 0;
+ });
+
+ var err = new _ValidationError2.default(Object.assign(options, { errors }));
+
+ if (options.throw) {
+ throw err;
+ }
+
+ if (options.log) {
+ var log = (0, _webpackLog2.default)({
+ name: options.name || logName,
+ id: `${logName}-validator`
+ });
+ log.error(`${err.meta.desc}\n\n${err.format()}\n`);
+ }
+
+ if (options.exit) {
+ process.exit(1);
+ }
+ }
+
+ return true;
+};
+
+var validator = function validator(opts) {
+ validate({
+ throw: true,
+ schema: _options2.default,
+ target: opts
+ });
+
+ var options = Object.assign({}, defaults, opts);
+
+ return validate(options);
+};
+
+exports.default = validator; \ No newline at end of file
diff --git a/node_modules/@webpack-contrib/schema-utils/node_modules/.bin/webpack b/node_modules/@webpack-contrib/schema-utils/node_modules/.bin/webpack
new file mode 120000
index 00000000..324aada8
--- /dev/null
+++ b/node_modules/@webpack-contrib/schema-utils/node_modules/.bin/webpack
@@ -0,0 +1 @@
+../../../../webpack/bin/webpack.js \ No newline at end of file
diff --git a/node_modules/@webpack-contrib/schema-utils/node_modules/ansi-regex/index.js b/node_modules/@webpack-contrib/schema-utils/node_modules/ansi-regex/index.js
new file mode 100644
index 00000000..c4aaecf5
--- /dev/null
+++ b/node_modules/@webpack-contrib/schema-utils/node_modules/ansi-regex/index.js
@@ -0,0 +1,10 @@
+'use strict';
+
+module.exports = () => {
+ const pattern = [
+ '[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:[a-zA-Z\\d]*(?:;[a-zA-Z\\d]*)*)?\\u0007)',
+ '(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PRZcf-ntqry=><~]))'
+ ].join('|');
+
+ return new RegExp(pattern, 'g');
+};
diff --git a/node_modules/@webpack-contrib/schema-utils/node_modules/ansi-regex/license b/node_modules/@webpack-contrib/schema-utils/node_modules/ansi-regex/license
new file mode 100644
index 00000000..e7af2f77
--- /dev/null
+++ b/node_modules/@webpack-contrib/schema-utils/node_modules/ansi-regex/license
@@ -0,0 +1,9 @@
+MIT License
+
+Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (sindresorhus.com)
+
+Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/node_modules/@webpack-contrib/schema-utils/node_modules/ansi-regex/package.json b/node_modules/@webpack-contrib/schema-utils/node_modules/ansi-regex/package.json
new file mode 100644
index 00000000..e94852fd
--- /dev/null
+++ b/node_modules/@webpack-contrib/schema-utils/node_modules/ansi-regex/package.json
@@ -0,0 +1,53 @@
+{
+ "name": "ansi-regex",
+ "version": "3.0.0",
+ "description": "Regular expression for matching ANSI escape codes",
+ "license": "MIT",
+ "repository": "chalk/ansi-regex",
+ "author": {
+ "name": "Sindre Sorhus",
+ "email": "sindresorhus@gmail.com",
+ "url": "sindresorhus.com"
+ },
+ "engines": {
+ "node": ">=4"
+ },
+ "scripts": {
+ "test": "xo && ava",
+ "view-supported": "node fixtures/view-codes.js"
+ },
+ "files": [
+ "index.js"
+ ],
+ "keywords": [
+ "ansi",
+ "styles",
+ "color",
+ "colour",
+ "colors",
+ "terminal",
+ "console",
+ "cli",
+ "string",
+ "tty",
+ "escape",
+ "formatting",
+ "rgb",
+ "256",
+ "shell",
+ "xterm",
+ "command-line",
+ "text",
+ "regex",
+ "regexp",
+ "re",
+ "match",
+ "test",
+ "find",
+ "pattern"
+ ],
+ "devDependencies": {
+ "ava": "*",
+ "xo": "*"
+ }
+}
diff --git a/node_modules/@webpack-contrib/schema-utils/node_modules/ansi-regex/readme.md b/node_modules/@webpack-contrib/schema-utils/node_modules/ansi-regex/readme.md
new file mode 100644
index 00000000..22db1c34
--- /dev/null
+++ b/node_modules/@webpack-contrib/schema-utils/node_modules/ansi-regex/readme.md
@@ -0,0 +1,46 @@
+# ansi-regex [![Build Status](https://travis-ci.org/chalk/ansi-regex.svg?branch=master)](https://travis-ci.org/chalk/ansi-regex)
+
+> Regular expression for matching [ANSI escape codes](https://en.wikipedia.org/wiki/ANSI_escape_code)
+
+
+## Install
+
+```
+$ npm install ansi-regex
+```
+
+
+## Usage
+
+```js
+const ansiRegex = require('ansi-regex');
+
+ansiRegex().test('\u001B[4mcake\u001B[0m');
+//=> true
+
+ansiRegex().test('cake');
+//=> false
+
+'\u001B[4mcake\u001B[0m'.match(ansiRegex());
+//=> ['\u001B[4m', '\u001B[0m']
+```
+
+
+## FAQ
+
+### Why do you test for codes not in the ECMA 48 standard?
+
+Some of the codes we run as a test are codes that we acquired finding various lists of non-standard or manufacturer specific codes. We test for both standard and non-standard codes, as most of them follow the same or similar format and can be safely matched in strings without the risk of removing actual string content. There are a few non-standard control codes that do not follow the traditional format (i.e. they end in numbers) thus forcing us to exclude them from the test because we cannot reliably match them.
+
+On the historical side, those ECMA standards were established in the early 90's whereas the VT100, for example, was designed in the mid/late 70's. At that point in time, control codes were still pretty ungoverned and engineers used them for a multitude of things, namely to activate hardware ports that may have been proprietary. Somewhere else you see a similar 'anarchy' of codes is in the x86 architecture for processors; there are a ton of "interrupts" that can mean different things on certain brands of processors, most of which have been phased out.
+
+
+## Maintainers
+
+- [Sindre Sorhus](https://github.com/sindresorhus)
+- [Josh Junon](https://github.com/qix-)
+
+
+## License
+
+MIT
diff --git a/node_modules/@webpack-contrib/schema-utils/node_modules/strip-ansi/index.js b/node_modules/@webpack-contrib/schema-utils/node_modules/strip-ansi/index.js
new file mode 100644
index 00000000..96e0292c
--- /dev/null
+++ b/node_modules/@webpack-contrib/schema-utils/node_modules/strip-ansi/index.js
@@ -0,0 +1,4 @@
+'use strict';
+const ansiRegex = require('ansi-regex');
+
+module.exports = input => typeof input === 'string' ? input.replace(ansiRegex(), '') : input;
diff --git a/node_modules/@webpack-contrib/schema-utils/node_modules/strip-ansi/license b/node_modules/@webpack-contrib/schema-utils/node_modules/strip-ansi/license
new file mode 100644
index 00000000..e7af2f77
--- /dev/null
+++ b/node_modules/@webpack-contrib/schema-utils/node_modules/strip-ansi/license
@@ -0,0 +1,9 @@
+MIT License
+
+Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (sindresorhus.com)
+
+Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/node_modules/@webpack-contrib/schema-utils/node_modules/strip-ansi/package.json b/node_modules/@webpack-contrib/schema-utils/node_modules/strip-ansi/package.json
new file mode 100644
index 00000000..555f1946
--- /dev/null
+++ b/node_modules/@webpack-contrib/schema-utils/node_modules/strip-ansi/package.json
@@ -0,0 +1,52 @@
+{
+ "name": "strip-ansi",
+ "version": "4.0.0",
+ "description": "Strip ANSI escape codes",
+ "license": "MIT",
+ "repository": "chalk/strip-ansi",
+ "author": {
+ "name": "Sindre Sorhus",
+ "email": "sindresorhus@gmail.com",
+ "url": "sindresorhus.com"
+ },
+ "engines": {
+ "node": ">=4"
+ },
+ "scripts": {
+ "test": "xo && ava"
+ },
+ "files": [
+ "index.js"
+ ],
+ "keywords": [
+ "strip",
+ "trim",
+ "remove",
+ "ansi",
+ "styles",
+ "color",
+ "colour",
+ "colors",
+ "terminal",
+ "console",
+ "string",
+ "tty",
+ "escape",
+ "formatting",
+ "rgb",
+ "256",
+ "shell",
+ "xterm",
+ "log",
+ "logging",
+ "command-line",
+ "text"
+ ],
+ "dependencies": {
+ "ansi-regex": "^3.0.0"
+ },
+ "devDependencies": {
+ "ava": "*",
+ "xo": "*"
+ }
+}
diff --git a/node_modules/@webpack-contrib/schema-utils/node_modules/strip-ansi/readme.md b/node_modules/@webpack-contrib/schema-utils/node_modules/strip-ansi/readme.md
new file mode 100644
index 00000000..dc76f0cb
--- /dev/null
+++ b/node_modules/@webpack-contrib/schema-utils/node_modules/strip-ansi/readme.md
@@ -0,0 +1,39 @@
+# strip-ansi [![Build Status](https://travis-ci.org/chalk/strip-ansi.svg?branch=master)](https://travis-ci.org/chalk/strip-ansi)
+
+> Strip [ANSI escape codes](https://en.wikipedia.org/wiki/ANSI_escape_code)
+
+
+## Install
+
+```
+$ npm install strip-ansi
+```
+
+
+## Usage
+
+```js
+const stripAnsi = require('strip-ansi');
+
+stripAnsi('\u001B[4mUnicorn\u001B[0m');
+//=> 'Unicorn'
+```
+
+
+## Related
+
+- [strip-ansi-cli](https://github.com/chalk/strip-ansi-cli) - CLI for this module
+- [has-ansi](https://github.com/chalk/has-ansi) - Check if a string has ANSI escape codes
+- [ansi-regex](https://github.com/chalk/ansi-regex) - Regular expression for matching ANSI escape codes
+- [chalk](https://github.com/chalk/chalk) - Terminal string styling done right
+
+
+## Maintainers
+
+- [Sindre Sorhus](https://github.com/sindresorhus)
+- [Josh Junon](https://github.com/qix-)
+
+
+## License
+
+MIT
diff --git a/node_modules/@webpack-contrib/schema-utils/package.json b/node_modules/@webpack-contrib/schema-utils/package.json
new file mode 100644
index 00000000..b40c8110
--- /dev/null
+++ b/node_modules/@webpack-contrib/schema-utils/package.json
@@ -0,0 +1,89 @@
+{
+ "name": "@webpack-contrib/schema-utils",
+ "version": "1.0.0-beta.0",
+ "description": "Webpack Schema Validation Utilities",
+ "license": "MIT",
+ "repository": "webpack-contrib/schema-utils",
+ "author": "Webpack Contrib (https://github.com/webpack-contrib)",
+ "homepage": "https://github.com/webpack-contrib/schema-utils",
+ "bugs": "https://github.com/webpack-contrib/schema-utils/issues",
+ "main": "dist/cjs.js",
+ "engines": {
+ "node": ">= 6.9.0 || >= 8.9.0"
+ },
+ "scripts": {
+ "start": "npm run build -- -w",
+ "build": "cross-env NODE_ENV=production babel src -d dist --ignore 'src/**/*.test.js' --copy-files",
+ "clean": "del-cli dist",
+ "commitlint": "commitlint",
+ "commitmsg": "commitlint -e $GIT_PARAMS",
+ "lint": "eslint --cache src test",
+ "ci:lint:commits": "commitlint --from=${CIRCLE_BRANCH} --to=${CIRCLE_SHA1}",
+ "lint-staged": "lint-staged",
+ "prebuild": "npm run clean",
+ "prepublish": "npm run build",
+ "release": "standard-version",
+ "release:ci": "conventional-github-releaser -p angular",
+ "release:validate": "commitlint --from=$(git describe --tags --abbrev=0) --to=$(git rev-parse HEAD)",
+ "security": "nsp check",
+ "test": "jest",
+ "test:watch": "jest --watch",
+ "test:coverage": "jest --collectCoverageFrom='src/**/*.js' --coverage",
+ "ci:lint": "npm run lint && npm run security",
+ "ci:test": "npm run test -- --runInBand",
+ "ci:coverage": "npm run test:coverage -- --runInBand",
+ "defaults": "webpack-defaults"
+ },
+ "files": [
+ "dist/",
+ "schema/"
+ ],
+ "keywords": [
+ "webpack"
+ ],
+ "peerDependencies": {
+ "webpack": "^3.0.0 || ^4.0.0"
+ },
+ "dependencies": {
+ "ajv": "^6.1.0",
+ "ajv-keywords": "^3.1.0",
+ "chalk": "^2.3.2",
+ "strip-ansi": "^4.0.0",
+ "text-table": "^0.2.0",
+ "webpack-log": "^1.1.2"
+ },
+ "devDependencies": {
+ "@commitlint/cli": "^5.2.8",
+ "@commitlint/config-angular": "^5.1.1",
+ "@webpack-contrib/eslint-config-webpack": "^2.0.2",
+ "babel-cli": "^6.26.0",
+ "babel-jest": "^22.4.3",
+ "babel-plugin-transform-object-rest-spread": "^6.26.0",
+ "babel-polyfill": "^6.26.0",
+ "babel-preset-env": "^1.6.1",
+ "conventional-github-releaser": "^2.0.0",
+ "cross-env": "^5.1.3",
+ "del": "^3.0.0",
+ "del-cli": "^1.1.0",
+ "eslint": "^4.17.0",
+ "eslint-plugin-import": "^2.8.0",
+ "eslint-plugin-prettier": "^2.6.0",
+ "husky": "^0.14.3",
+ "jest": "^22.4.3",
+ "lint-staged": "^6.1.0",
+ "memory-fs": "^0.4.1",
+ "nsp": "^3.1.0",
+ "pre-commit": "^1.2.2",
+ "prettier": "^1.10.2",
+ "standard-version": "^4.3.0",
+ "webpack": "^4.4.1",
+ "webpack-defaults": "^2.1.4"
+ },
+ "pre-commit": "lint-staged",
+ "lint-staged": {
+ "*.js": [
+ "eslint --fix",
+ "git add"
+ ]
+ }
+}
diff --git a/node_modules/@webpack-contrib/schema-utils/schema/options.json b/node_modules/@webpack-contrib/schema-utils/schema/options.json
new file mode 100644
index 00000000..d88fbf16
--- /dev/null
+++ b/node_modules/@webpack-contrib/schema-utils/schema/options.json
@@ -0,0 +1,25 @@
+{
+ "type": "object",
+ "properties": {
+ "exit": {
+ "type": "boolean"
+ },
+ "log": {
+ "type": "boolean"
+ },
+ "name": {
+ "type": "string"
+ },
+ "schema": {
+ "type": ["string", "object"]
+ },
+ "target": {
+ "type": "object"
+ },
+ "throw": {
+ "type": "boolean"
+ }
+ },
+ "additionalProperties": false,
+ "required": ["name", "schema", "target"]
+}