From 26105034da4fcce7ac883c899d781f016559310d Mon Sep 17 00:00:00 2001 From: ruki Date: Thu, 8 Nov 2018 00:38:48 +0800 Subject: switch to vuepress --- .../@webpack-contrib/schema-utils/CHANGELOG.md | 126 ++++++++++++ node_modules/@webpack-contrib/schema-utils/LICENSE | 20 ++ .../@webpack-contrib/schema-utils/README.md | 213 +++++++++++++++++++++ .../schema-utils/dist/ValidationError.js | 110 +++++++++++ .../@webpack-contrib/schema-utils/dist/cjs.js | 3 + .../@webpack-contrib/schema-utils/dist/index.js | 13 ++ .../schema-utils/dist/validate-options.js | 121 ++++++++++++ .../schema-utils/node_modules/.bin/webpack | 1 + .../schema-utils/node_modules/ansi-regex/index.js | 10 + .../schema-utils/node_modules/ansi-regex/license | 9 + .../node_modules/ansi-regex/package.json | 53 +++++ .../schema-utils/node_modules/ansi-regex/readme.md | 46 +++++ .../schema-utils/node_modules/strip-ansi/index.js | 4 + .../schema-utils/node_modules/strip-ansi/license | 9 + .../node_modules/strip-ansi/package.json | 52 +++++ .../schema-utils/node_modules/strip-ansi/readme.md | 39 ++++ .../@webpack-contrib/schema-utils/package.json | 89 +++++++++ .../schema-utils/schema/options.json | 25 +++ 18 files changed, 943 insertions(+) create mode 100644 node_modules/@webpack-contrib/schema-utils/CHANGELOG.md create mode 100644 node_modules/@webpack-contrib/schema-utils/LICENSE create mode 100644 node_modules/@webpack-contrib/schema-utils/README.md create mode 100644 node_modules/@webpack-contrib/schema-utils/dist/ValidationError.js create mode 100644 node_modules/@webpack-contrib/schema-utils/dist/cjs.js create mode 100644 node_modules/@webpack-contrib/schema-utils/dist/index.js create mode 100644 node_modules/@webpack-contrib/schema-utils/dist/validate-options.js create mode 120000 node_modules/@webpack-contrib/schema-utils/node_modules/.bin/webpack create mode 100644 node_modules/@webpack-contrib/schema-utils/node_modules/ansi-regex/index.js create mode 100644 node_modules/@webpack-contrib/schema-utils/node_modules/ansi-regex/license create mode 100644 node_modules/@webpack-contrib/schema-utils/node_modules/ansi-regex/package.json create mode 100644 node_modules/@webpack-contrib/schema-utils/node_modules/ansi-regex/readme.md create mode 100644 node_modules/@webpack-contrib/schema-utils/node_modules/strip-ansi/index.js create mode 100644 node_modules/@webpack-contrib/schema-utils/node_modules/strip-ansi/license create mode 100644 node_modules/@webpack-contrib/schema-utils/node_modules/strip-ansi/package.json create mode 100644 node_modules/@webpack-contrib/schema-utils/node_modules/strip-ansi/readme.md create mode 100644 node_modules/@webpack-contrib/schema-utils/package.json create mode 100644 node_modules/@webpack-contrib/schema-utils/schema/options.json (limited to 'node_modules/@webpack-contrib/schema-utils') 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. + + +# [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 + + + + +## [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)) + + + + +## [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)) + + + + +## [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)) + + + + +## [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)) + + + + +## [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)) + + + + +# [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)) + + + + +# [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)) + + + + +## [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)) + + + + +# [0.2.0](https://github.com/webpack-contrib/schema-utils/compare/v0.1.0...v0.2.0) (2017-03-12) + + +# 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 @@ +
+ + + + + + +
+ +[![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. + + + +## 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`. + + + +#### `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. + + + + +## 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.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.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"] +} -- cgit v1.2.3