Completely updated React, fixed #11, (hopefully)
This commit is contained in:
71
goTorrentWebUI/node_modules/style-loader/node_modules/ajv/README.md
generated
vendored
71
goTorrentWebUI/node_modules/style-loader/node_modules/ajv/README.md
generated
vendored
@@ -7,13 +7,16 @@ The fastest JSON Schema validator for Node.js and browser with draft 6 support.
|
||||
|
||||
[](https://travis-ci.org/epoberezkin/ajv)
|
||||
[](https://www.npmjs.com/package/ajv)
|
||||
[](https://github.com/epoberezkin/ajv/tree/beta)
|
||||
[](https://www.npmjs.com/package/ajv)
|
||||
[](https://codeclimate.com/github/epoberezkin/ajv)
|
||||
[](https://coveralls.io/github/epoberezkin/ajv?branch=master)
|
||||
[](https://greenkeeper.io/)
|
||||
[](https://gitter.im/ajv-validator/ajv)
|
||||
|
||||
|
||||
__Please note__: Ajv [version 6](https://github.com/epoberezkin/ajv/tree/beta) with [JSON Schema draft-07](http://json-schema.org/work-in-progress) support is released. Use `npm install ajv@beta` to install.
|
||||
|
||||
|
||||
## Using version 5
|
||||
|
||||
[JSON Schema draft-06](https://trac.tools.ietf.org/html/draft-wright-json-schema-validation-01) is published.
|
||||
@@ -71,7 +74,7 @@ Currently Ajv is the fastest and the most standard compliant validator according
|
||||
|
||||
Performance of different validators by [json-schema-benchmark](https://github.com/ebdrup/json-schema-benchmark):
|
||||
|
||||
[](https://github.com/ebdrup/json-schema-benchmark/blob/master/README.md#performance)
|
||||
[](https://github.com/ebdrup/json-schema-benchmark/blob/master/README.md#performance)
|
||||
|
||||
|
||||
## Features
|
||||
@@ -107,6 +110,12 @@ Currently Ajv is the only validator that passes all the tests from [JSON Schema
|
||||
npm install ajv
|
||||
```
|
||||
|
||||
or to install [version 6](https://github.com/epoberezkin/ajv/tree/beta):
|
||||
|
||||
```
|
||||
npm install ajv@beta
|
||||
```
|
||||
|
||||
|
||||
## <a name="usage"></a>Getting started
|
||||
|
||||
@@ -136,8 +145,8 @@ or
|
||||
|
||||
```javascript
|
||||
// ...
|
||||
ajv.addSchema(schema, 'mySchema');
|
||||
var valid = ajv.validate('mySchema', data);
|
||||
var valid = ajv.addSchema(schema, 'mySchema')
|
||||
.validate('mySchema', data);
|
||||
if (!valid) console.log(ajv.errorsText());
|
||||
// ...
|
||||
```
|
||||
@@ -274,8 +283,8 @@ or use `addSchema` method:
|
||||
|
||||
```javascript
|
||||
var ajv = new Ajv;
|
||||
ajv.addSchema(defsSchema);
|
||||
var validate = ajv.compile(schema);
|
||||
var validate = ajv.addSchema(defsSchema)
|
||||
.compile(schema);
|
||||
```
|
||||
|
||||
See [Options](#options) and [addSchema](#api) method.
|
||||
@@ -431,14 +440,17 @@ Ajv allows defining keywords with:
|
||||
Example. `range` and `exclusiveRange` keywords using compiled schema:
|
||||
|
||||
```javascript
|
||||
ajv.addKeyword('range', { type: 'number', compile: function (sch, parentSchema) {
|
||||
var min = sch[0];
|
||||
var max = sch[1];
|
||||
ajv.addKeyword('range', {
|
||||
type: 'number',
|
||||
compile: function (sch, parentSchema) {
|
||||
var min = sch[0];
|
||||
var max = sch[1];
|
||||
|
||||
return parentSchema.exclusiveRange === true
|
||||
? function (data) { return data > min && data < max; }
|
||||
: function (data) { return data >= min && data <= max; }
|
||||
} });
|
||||
return parentSchema.exclusiveRange === true
|
||||
? function (data) { return data > min && data < max; }
|
||||
: function (data) { return data >= min && data <= max; }
|
||||
}
|
||||
});
|
||||
|
||||
var schema = { "range": [2, 4], "exclusiveRange": true };
|
||||
var validate = ajv.compile(schema);
|
||||
@@ -905,7 +917,7 @@ __Please note__: every time this method is called the errors are overwritten so
|
||||
If the schema is asynchronous (has `$async` keyword on the top level) this method returns a Promise. See [Asynchronous validation](#asynchronous-validation).
|
||||
|
||||
|
||||
##### .addSchema(Array<Object>|Object schema [, String key])
|
||||
##### .addSchema(Array<Object>|Object schema [, String key]) -> Ajv
|
||||
|
||||
Add schema(s) to validator instance. This method does not compile schemas (but it still validates them). Because of that dependencies can be added in any order and circular dependencies are supported. It also prevents unnecessary compilation of schemas that are containers for other schemas but not used as a whole.
|
||||
|
||||
@@ -920,8 +932,14 @@ Although `addSchema` does not compile schemas, explicit compilation is not requi
|
||||
|
||||
By default the schema is validated against meta-schema before it is added, and if the schema does not pass validation the exception is thrown. This behaviour is controlled by `validateSchema` option.
|
||||
|
||||
__Please note__: Ajv uses the [method chaining syntax](https://en.wikipedia.org/wiki/Method_chaining) for all methods with the prefix `add*` and `remove*`.
|
||||
This allows you to do nice things like the following.
|
||||
|
||||
##### .addMetaSchema(Array<Object>|Object schema [, String key])
|
||||
```javascript
|
||||
var validate = new Ajv().addSchema(schema).addFormat(name, regex).getSchema(uri);
|
||||
```
|
||||
|
||||
##### .addMetaSchema(Array<Object>|Object schema [, String key]) -> Ajv
|
||||
|
||||
Adds meta schema(s) that can be used to validate other schemas. That function should be used instead of `addSchema` because there may be instance options that would compile a meta schema incorrectly (at the moment it is `removeAdditional` option).
|
||||
|
||||
@@ -946,7 +964,7 @@ Errors will be available at `ajv.errors`.
|
||||
Retrieve compiled schema previously added with `addSchema` by the key passed to `addSchema` or by its full reference (id). The returned validating function has `schema` property with the reference to the original schema.
|
||||
|
||||
|
||||
##### .removeSchema([Object schema|String key|String ref|RegExp pattern])
|
||||
##### .removeSchema([Object schema|String key|String ref|RegExp pattern]) -> Ajv
|
||||
|
||||
Remove added/cached schema. Even if schema is referenced by other schemas it can be safely removed as dependent schemas have local references.
|
||||
|
||||
@@ -959,7 +977,7 @@ Schema can be removed using:
|
||||
If no parameter is passed all schemas but meta-schemas will be removed and the cache will be cleared.
|
||||
|
||||
|
||||
##### <a name="api-addformat"></a>.addFormat(String name, String|RegExp|Function|Object format)
|
||||
##### <a name="api-addformat"></a>.addFormat(String name, String|RegExp|Function|Object format) -> Ajv
|
||||
|
||||
Add custom format to validate strings or numbers. It can also be used to replace pre-defined formats for Ajv instance.
|
||||
|
||||
@@ -977,7 +995,7 @@ If object is passed it should have properties `validate`, `compare` and `async`:
|
||||
Custom formats can be also added via `formats` option.
|
||||
|
||||
|
||||
##### <a name="api-addkeyword"></a>.addKeyword(String keyword, Object definition)
|
||||
##### <a name="api-addkeyword"></a>.addKeyword(String keyword, Object definition) -> Ajv
|
||||
|
||||
Add custom validation keyword to Ajv instance.
|
||||
|
||||
@@ -1018,7 +1036,7 @@ See [Defining custom keywords](#defining-custom-keywords) for more details.
|
||||
Returns custom keyword definition, `true` for pre-defined keywords and `false` if the keyword is unknown.
|
||||
|
||||
|
||||
##### .removeKeyword(String keyword)
|
||||
##### .removeKeyword(String keyword) -> Ajv
|
||||
|
||||
Removes custom or pre-defined keyword so you can redefine them.
|
||||
|
||||
@@ -1051,6 +1069,7 @@ Defaults:
|
||||
formats: {},
|
||||
unknownFormats: true,
|
||||
schemas: {},
|
||||
logger: undefined,
|
||||
// referenced schema options:
|
||||
schemaId: undefined // recommended '$id'
|
||||
missingRefs: true,
|
||||
@@ -1096,6 +1115,9 @@ Defaults:
|
||||
- `[String]` - an array of unknown format names that will be ignored. This option can be used to allow usage of third party schemas with format(s) for which you don't have definitions, but still fail if another unknown format is used. If `format` keyword value is [$data reference](#data-reference) and it is not in this array the validation will fail.
|
||||
- `"ignore"` - to log warning during schema compilation and always pass validation (the default behaviour in versions before 5.0.0). This option is not recommended, as it allows to mistype format name and it won't be validated without any error message. This behaviour is required by JSON-schema specification.
|
||||
- _schemas_: an array or object of schemas that will be added to the instance. In case you pass the array the schemas must have IDs in them. When the object is passed the method `addSchema(value, key)` will be called for each schema in this object.
|
||||
- _logger_: sets the logging method. Default is the global `console` object that should have methods `log`, `warn` and `error`. Option values:
|
||||
- custom logger - it should have methods `log`, `warn` and `error`. If any of these methods is missing an exception will be thrown.
|
||||
- `false` - logging is disabled.
|
||||
|
||||
|
||||
##### Referenced schema options
|
||||
@@ -1232,11 +1254,14 @@ Properties of `params` object in errors depend on the keyword that failed valida
|
||||
|
||||
## Related packages
|
||||
|
||||
- [ajv-cli](https://github.com/epoberezkin/ajv-cli) - command line interface for Ajv
|
||||
- [ajv-async](https://github.com/epoberezkin/ajv-async) - configure async validation mode
|
||||
- [ajv-cli](https://github.com/jessedc/ajv-cli) - command line interface
|
||||
- [ajv-errors](https://github.com/epoberezkin/ajv-errors) - custom error messages
|
||||
- [ajv-i18n](https://github.com/epoberezkin/ajv-i18n) - internationalised error messages
|
||||
- [ajv-merge-patch](https://github.com/epoberezkin/ajv-merge-patch) - keywords $merge and $patch.
|
||||
- [ajv-keywords](https://github.com/epoberezkin/ajv-keywords) - several custom keywords that can be used with Ajv (typeof, instanceof, range, propertyNames)
|
||||
- [ajv-errors](https://github.com/epoberezkin/ajv-errors) - custom error messages for Ajv
|
||||
- [ajv-istanbul](https://github.com/epoberezkin/ajv-istanbul) - instrument generated validation code to measure test coverage of your schemas
|
||||
- [ajv-keywords](https://github.com/epoberezkin/ajv-keywords) - custom validation keywords (if/then/else, select, typeof, etc.)
|
||||
- [ajv-merge-patch](https://github.com/epoberezkin/ajv-merge-patch) - keywords $merge and $patch
|
||||
- [ajv-pack](https://github.com/epoberezkin/ajv-pack) - produces a compact module exporting validation functions
|
||||
|
||||
|
||||
## Some packages using Ajv
|
||||
|
75
goTorrentWebUI/node_modules/style-loader/node_modules/ajv/dist/ajv.bundle.js
generated
vendored
75
goTorrentWebUI/node_modules/style-loader/node_modules/ajv/dist/ajv.bundle.js
generated
vendored
@@ -482,6 +482,7 @@ function compile(schema, root, localRefs, baseId) {
|
||||
useCustomRule: useCustomRule,
|
||||
opts: opts,
|
||||
formats: formats,
|
||||
logger: self.logger,
|
||||
self: self
|
||||
});
|
||||
|
||||
@@ -524,7 +525,7 @@ function compile(schema, root, localRefs, baseId) {
|
||||
|
||||
refVal[0] = validate;
|
||||
} catch(e) {
|
||||
console.error('Error compiling schema, function code:', sourceCode);
|
||||
self.logger.error('Error compiling schema, function code:', sourceCode);
|
||||
throw e;
|
||||
}
|
||||
|
||||
@@ -638,7 +639,7 @@ function compile(schema, root, localRefs, baseId) {
|
||||
var valid = validateSchema(schema);
|
||||
if (!valid) {
|
||||
var message = 'keyword schema is invalid: ' + self.errorsText(validateSchema.errors);
|
||||
if (self._opts.validateSchema == 'log') console.error(message);
|
||||
if (self._opts.validateSchema == 'log') self.logger.error(message);
|
||||
else throw new Error(message);
|
||||
}
|
||||
}
|
||||
@@ -1052,7 +1053,7 @@ module.exports = function rules() {
|
||||
|
||||
var ALL = [ 'type' ];
|
||||
var KEYWORDS = [
|
||||
'additionalItems', '$schema', 'id', 'title',
|
||||
'additionalItems', '$schema', '$id', 'id', 'title',
|
||||
'description', 'default', 'definitions'
|
||||
];
|
||||
var TYPES = [ 'number', 'integer', 'string', 'array', 'object', 'boolean', 'null' ];
|
||||
@@ -2563,7 +2564,7 @@ module.exports = function generate_format(it, $keyword, $ruleType) {
|
||||
var $format = it.formats[$schema];
|
||||
if (!$format) {
|
||||
if ($unknownFormats == 'ignore') {
|
||||
console.warn('unknown format "' + $schema + '" ignored in schema at path "' + it.errSchemaPath + '"');
|
||||
it.logger.warn('unknown format "' + $schema + '" ignored in schema at path "' + it.errSchemaPath + '"');
|
||||
if ($breakOnError) {
|
||||
out += ' if (true) { ';
|
||||
}
|
||||
@@ -3687,7 +3688,7 @@ module.exports = function generate_ref(it, $keyword, $ruleType) {
|
||||
if ($refVal === undefined) {
|
||||
var $message = it.MissingRefError.message(it.baseId, $schema);
|
||||
if (it.opts.missingRefs == 'fail') {
|
||||
console.error($message);
|
||||
it.logger.error($message);
|
||||
var $$outStack = $$outStack || [];
|
||||
$$outStack.push(out);
|
||||
out = ''; /* istanbul ignore else */
|
||||
@@ -3718,7 +3719,7 @@ module.exports = function generate_ref(it, $keyword, $ruleType) {
|
||||
out += ' if (false) { ';
|
||||
}
|
||||
} else if (it.opts.missingRefs == 'ignore') {
|
||||
console.warn($message);
|
||||
it.logger.warn($message);
|
||||
if ($breakOnError) {
|
||||
out += ' if (true) { ';
|
||||
}
|
||||
@@ -4256,7 +4257,7 @@ module.exports = function generate_validate(it, $keyword, $ruleType) {
|
||||
throw new Error('$ref: validation keywords used in schema at path "' + it.errSchemaPath + '" (see option extendRefs)');
|
||||
} else if (it.opts.extendRefs !== true) {
|
||||
$refKeywords = false;
|
||||
console.warn('$ref: keywords ignored in schema at path "' + it.errSchemaPath + '"');
|
||||
it.logger.warn('$ref: keywords ignored in schema at path "' + it.errSchemaPath + '"');
|
||||
}
|
||||
}
|
||||
if ($typeSchema) {
|
||||
@@ -4414,7 +4415,7 @@ module.exports = function generate_validate(it, $keyword, $ruleType) {
|
||||
}
|
||||
} else {
|
||||
if (it.opts.v5 && it.schema.patternGroups) {
|
||||
console.warn('keyword "patternGroups" is deprecated and disabled. Use option patternGroups: true to enable.');
|
||||
it.logger.warn('keyword "patternGroups" is deprecated and disabled. Use option patternGroups: true to enable.');
|
||||
}
|
||||
var arr2 = it.RULES;
|
||||
if (arr2) {
|
||||
@@ -4579,10 +4580,10 @@ module.exports = function generate_validate(it, $keyword, $ruleType) {
|
||||
}
|
||||
|
||||
function $shouldUseRule($rule) {
|
||||
return it.schema[$rule.keyword] !== undefined || ($rule.implements && $ruleImlementsSomeKeyword($rule));
|
||||
return it.schema[$rule.keyword] !== undefined || ($rule.implements && $ruleImplementsSomeKeyword($rule));
|
||||
}
|
||||
|
||||
function $ruleImlementsSomeKeyword($rule) {
|
||||
function $ruleImplementsSomeKeyword($rule) {
|
||||
var impl = $rule.implements;
|
||||
for (var i = 0; i < impl.length; i++)
|
||||
if (it.schema[impl[i]] !== undefined) return true;
|
||||
@@ -4607,6 +4608,7 @@ module.exports = {
|
||||
* @this Ajv
|
||||
* @param {String} keyword custom keyword, should be unique (including different from all standard, custom and macro keywords).
|
||||
* @param {Object} definition keyword definition object with properties `type` (type(s) which the keyword applies to), `validate` or `compile`.
|
||||
* @return {Ajv} this for method chaining
|
||||
*/
|
||||
function addKeyword(keyword, definition) {
|
||||
/* jshint validthis: true */
|
||||
@@ -4684,6 +4686,8 @@ function addKeyword(keyword, definition) {
|
||||
function checkDataType(dataType) {
|
||||
if (!RULES.types[dataType]) throw new Error('Unknown type ' + dataType);
|
||||
}
|
||||
|
||||
return this;
|
||||
}
|
||||
|
||||
|
||||
@@ -4704,6 +4708,7 @@ function getKeyword(keyword) {
|
||||
* Remove keyword
|
||||
* @this Ajv
|
||||
* @param {String} keyword pre-defined or custom keyword.
|
||||
* @return {Ajv} this for method chaining
|
||||
*/
|
||||
function removeKeyword(keyword) {
|
||||
/* jshint validthis: true */
|
||||
@@ -4720,6 +4725,7 @@ function removeKeyword(keyword) {
|
||||
}
|
||||
}
|
||||
}
|
||||
return this;
|
||||
}
|
||||
|
||||
},{"./dotjs/custom":21}],37:[function(require,module,exports){
|
||||
@@ -4839,6 +4845,10 @@ module.exports={
|
||||
"type": "string"
|
||||
},
|
||||
"default": {},
|
||||
"examples": {
|
||||
"type": "array",
|
||||
"items": {}
|
||||
},
|
||||
"multipleOf": {
|
||||
"type": "number",
|
||||
"exclusiveMinimum": 0
|
||||
@@ -6882,6 +6892,7 @@ var META_SUPPORT_DATA = ['/properties'];
|
||||
function Ajv(opts) {
|
||||
if (!(this instanceof Ajv)) return new Ajv(opts);
|
||||
opts = this._opts = util.copy(opts) || {};
|
||||
setLogger(this);
|
||||
this._schemas = {};
|
||||
this._refs = {};
|
||||
this._fragments = {};
|
||||
@@ -6955,11 +6966,12 @@ function compile(schema, _meta) {
|
||||
* @param {String} key Optional schema key. Can be passed to `validate` method instead of schema object or id/ref. One schema per instance can have empty `id` and `key`.
|
||||
* @param {Boolean} _skipValidation true to skip schema validation. Used internally, option validateSchema should be used instead.
|
||||
* @param {Boolean} _meta true if schema is a meta-schema. Used internally, addMetaSchema should be used instead.
|
||||
* @return {Ajv} this for method chaining
|
||||
*/
|
||||
function addSchema(schema, key, _skipValidation, _meta) {
|
||||
if (Array.isArray(schema)){
|
||||
for (var i=0; i<schema.length; i++) this.addSchema(schema[i], undefined, _skipValidation, _meta);
|
||||
return;
|
||||
return this;
|
||||
}
|
||||
var id = this._getId(schema);
|
||||
if (id !== undefined && typeof id != 'string')
|
||||
@@ -6967,6 +6979,7 @@ function addSchema(schema, key, _skipValidation, _meta) {
|
||||
key = resolve.normalizeId(key || id);
|
||||
checkUnique(this, key);
|
||||
this._schemas[key] = this._addSchema(schema, _skipValidation, _meta, true);
|
||||
return this;
|
||||
}
|
||||
|
||||
|
||||
@@ -6977,9 +6990,11 @@ function addSchema(schema, key, _skipValidation, _meta) {
|
||||
* @param {Object} schema schema object
|
||||
* @param {String} key optional schema key
|
||||
* @param {Boolean} skipValidation true to skip schema validation, can be used to override validateSchema option for meta-schema
|
||||
* @return {Ajv} this for method chaining
|
||||
*/
|
||||
function addMetaSchema(schema, key, skipValidation) {
|
||||
this.addSchema(schema, key, skipValidation, true);
|
||||
return this;
|
||||
}
|
||||
|
||||
|
||||
@@ -6996,7 +7011,7 @@ function validateSchema(schema, throwOrLogError) {
|
||||
throw new Error('$schema must be a string');
|
||||
$schema = $schema || this._opts.defaultMeta || defaultMeta(this);
|
||||
if (!$schema) {
|
||||
console.warn('meta-schema not available');
|
||||
this.logger.warn('meta-schema not available');
|
||||
this.errors = null;
|
||||
return true;
|
||||
}
|
||||
@@ -7009,7 +7024,7 @@ function validateSchema(schema, throwOrLogError) {
|
||||
finally { this._formats.uri = currentUriFormat; }
|
||||
if (!valid && throwOrLogError) {
|
||||
var message = 'schema is invalid: ' + this.errorsText();
|
||||
if (this._opts.validateSchema == 'log') console.error(message);
|
||||
if (this._opts.validateSchema == 'log') this.logger.error(message);
|
||||
else throw new Error(message);
|
||||
}
|
||||
return valid;
|
||||
@@ -7076,25 +7091,26 @@ function _getSchemaObj(self, keyRef) {
|
||||
* Even if schema is referenced by other schemas it still can be removed as other schemas have local references.
|
||||
* @this Ajv
|
||||
* @param {String|Object|RegExp} schemaKeyRef key, ref, pattern to match key/ref or schema object
|
||||
* @return {Ajv} this for method chaining
|
||||
*/
|
||||
function removeSchema(schemaKeyRef) {
|
||||
if (schemaKeyRef instanceof RegExp) {
|
||||
_removeAllSchemas(this, this._schemas, schemaKeyRef);
|
||||
_removeAllSchemas(this, this._refs, schemaKeyRef);
|
||||
return;
|
||||
return this;
|
||||
}
|
||||
switch (typeof schemaKeyRef) {
|
||||
case 'undefined':
|
||||
_removeAllSchemas(this, this._schemas);
|
||||
_removeAllSchemas(this, this._refs);
|
||||
this._cache.clear();
|
||||
return;
|
||||
return this;
|
||||
case 'string':
|
||||
var schemaObj = _getSchemaObj(this, schemaKeyRef);
|
||||
if (schemaObj) this._cache.del(schemaObj.cacheKey);
|
||||
delete this._schemas[schemaKeyRef];
|
||||
delete this._refs[schemaKeyRef];
|
||||
return;
|
||||
return this;
|
||||
case 'object':
|
||||
var serialize = this._opts.serialize;
|
||||
var cacheKey = serialize ? serialize(schemaKeyRef) : schemaKeyRef;
|
||||
@@ -7106,6 +7122,7 @@ function removeSchema(schemaKeyRef) {
|
||||
delete this._refs[id];
|
||||
}
|
||||
}
|
||||
return this;
|
||||
}
|
||||
|
||||
|
||||
@@ -7208,15 +7225,15 @@ function chooseGetId(opts) {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/* @this Ajv */
|
||||
function _getId(schema) {
|
||||
if (schema.$id) console.warn('schema $id ignored', schema.$id);
|
||||
if (schema.$id) this.logger.warn('schema $id ignored', schema.$id);
|
||||
return schema.id;
|
||||
}
|
||||
|
||||
|
||||
/* @this Ajv */
|
||||
function _get$Id(schema) {
|
||||
if (schema.id) console.warn('schema id ignored', schema.id);
|
||||
if (schema.id) this.logger.warn('schema id ignored', schema.id);
|
||||
return schema.$id;
|
||||
}
|
||||
|
||||
@@ -7256,10 +7273,12 @@ function errorsText(errors, options) {
|
||||
* @this Ajv
|
||||
* @param {String} name format name
|
||||
* @param {String|RegExp|Function} format string is converted to RegExp; function should return boolean (true when valid)
|
||||
* @return {Ajv} this for method chaining
|
||||
*/
|
||||
function addFormat(name, format) {
|
||||
if (typeof format == 'string') format = new RegExp(format);
|
||||
this._formats[name] = format;
|
||||
return this;
|
||||
}
|
||||
|
||||
|
||||
@@ -7306,5 +7325,21 @@ function getMetaSchemaOptions(self) {
|
||||
return metaOpts;
|
||||
}
|
||||
|
||||
|
||||
function setLogger(self) {
|
||||
var logger = self._opts.logger;
|
||||
if (logger === false) {
|
||||
self.logger = {log: noop, warn: noop, error: noop};
|
||||
} else {
|
||||
if (logger === undefined) logger = console;
|
||||
if (!(typeof logger == 'object' && logger.log && logger.warn && logger.error))
|
||||
throw new Error('logger must implement log, warn and error methods');
|
||||
self.logger = logger;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
function noop() {}
|
||||
|
||||
},{"./$data":1,"./cache":2,"./compile":7,"./compile/async":4,"./compile/error_classes":5,"./compile/formats":6,"./compile/resolve":8,"./compile/rules":9,"./compile/schema_obj":10,"./compile/util":12,"./keyword":36,"./patternGroups":37,"./refs/$data.json":38,"./refs/json-schema-draft-06.json":39,"co":40,"fast-json-stable-stringify":42}]},{},[])("ajv")
|
||||
});
|
4
goTorrentWebUI/node_modules/style-loader/node_modules/ajv/dist/ajv.min.js
generated
vendored
4
goTorrentWebUI/node_modules/style-loader/node_modules/ajv/dist/ajv.min.js
generated
vendored
File diff suppressed because one or more lines are too long
2
goTorrentWebUI/node_modules/style-loader/node_modules/ajv/dist/ajv.min.js.map
generated
vendored
2
goTorrentWebUI/node_modules/style-loader/node_modules/ajv/dist/ajv.min.js.map
generated
vendored
File diff suppressed because one or more lines are too long
4
goTorrentWebUI/node_modules/style-loader/node_modules/ajv/dist/nodent.min.js
generated
vendored
4
goTorrentWebUI/node_modules/style-loader/node_modules/ajv/dist/nodent.min.js
generated
vendored
File diff suppressed because one or more lines are too long
4
goTorrentWebUI/node_modules/style-loader/node_modules/ajv/dist/regenerator.min.js
generated
vendored
4
goTorrentWebUI/node_modules/style-loader/node_modules/ajv/dist/regenerator.min.js
generated
vendored
File diff suppressed because one or more lines are too long
138
goTorrentWebUI/node_modules/style-loader/node_modules/ajv/lib/ajv.d.ts
generated
vendored
138
goTorrentWebUI/node_modules/style-loader/node_modules/ajv/lib/ajv.d.ts
generated
vendored
@@ -3,7 +3,7 @@ declare var ajv: {
|
||||
new (options?: ajv.Options): ajv.Ajv;
|
||||
ValidationError: ValidationError;
|
||||
MissingRefError: MissingRefError;
|
||||
$dataMetaSchema: Object;
|
||||
$dataMetaSchema: object;
|
||||
}
|
||||
|
||||
declare namespace ajv {
|
||||
@@ -11,49 +11,51 @@ declare namespace ajv {
|
||||
/**
|
||||
* Validate data using schema
|
||||
* Schema will be compiled and cached (using serialized JSON as key, [fast-json-stable-stringify](https://github.com/epoberezkin/fast-json-stable-stringify) is used to serialize by default).
|
||||
* @param {String|Object|Boolean} schemaKeyRef key, ref or schema object
|
||||
* @param {string|object|Boolean} schemaKeyRef key, ref or schema object
|
||||
* @param {Any} data to be validated
|
||||
* @return {Boolean} validation result. Errors from the last validation will be available in `ajv.errors` (and also in compiled schema: `schema.errors`).
|
||||
*/
|
||||
validate(schemaKeyRef: Object | string | boolean, data: any): boolean | Thenable<any>;
|
||||
validate(schemaKeyRef: object | string | boolean, data: any): boolean | Thenable<any>;
|
||||
/**
|
||||
* Create validating function for passed schema.
|
||||
* @param {Object|Boolean} schema schema object
|
||||
* @param {object|Boolean} schema schema object
|
||||
* @return {Function} validating function
|
||||
*/
|
||||
compile(schema: Object | boolean): ValidateFunction;
|
||||
compile(schema: object | boolean): ValidateFunction;
|
||||
/**
|
||||
* Creates validating function for passed schema with asynchronous loading of missing schemas.
|
||||
* `loadSchema` option should be a function that accepts schema uri and node-style callback.
|
||||
* @this Ajv
|
||||
* @param {Object|Boolean} schema schema object
|
||||
* @param {object|Boolean} schema schema object
|
||||
* @param {Boolean} meta optional true to compile meta-schema; this parameter can be skipped
|
||||
* @param {Function} callback optional node-style callback, it is always called with 2 parameters: error (or null) and validating function.
|
||||
* @return {Thenable<ValidateFunction>} validating function
|
||||
*/
|
||||
compileAsync(schema: Object | boolean, meta?: Boolean, callback?: (err: Error, validate: ValidateFunction) => any): Thenable<ValidateFunction>;
|
||||
compileAsync(schema: object | boolean, meta?: Boolean, callback?: (err: Error, validate: ValidateFunction) => any): Thenable<ValidateFunction>;
|
||||
/**
|
||||
* Adds schema to the instance.
|
||||
* @param {Object|Array} schema schema or array of schemas. If array is passed, `key` and other parameters will be ignored.
|
||||
* @param {String} key Optional schema key. Can be passed to `validate` method instead of schema object or id/ref. One schema per instance can have empty `id` and `key`.
|
||||
* @param {object|Array} schema schema or array of schemas. If array is passed, `key` and other parameters will be ignored.
|
||||
* @param {string} key Optional schema key. Can be passed to `validate` method instead of schema object or id/ref. One schema per instance can have empty `id` and `key`.
|
||||
* @return {Ajv} this for method chaining
|
||||
*/
|
||||
addSchema(schema: Array<Object> | Object, key?: string): void;
|
||||
addSchema(schema: Array<object> | object, key?: string): Ajv;
|
||||
/**
|
||||
* Add schema that will be used to validate other schemas
|
||||
* options in META_IGNORE_OPTIONS are alway set to false
|
||||
* @param {Object} schema schema object
|
||||
* @param {String} key optional schema key
|
||||
* @param {object} schema schema object
|
||||
* @param {string} key optional schema key
|
||||
* @return {Ajv} this for method chaining
|
||||
*/
|
||||
addMetaSchema(schema: Object, key?: string): void;
|
||||
addMetaSchema(schema: object, key?: string): Ajv;
|
||||
/**
|
||||
* Validate schema
|
||||
* @param {Object|Boolean} schema schema to validate
|
||||
* @param {object|Boolean} schema schema to validate
|
||||
* @return {Boolean} true if schema is valid
|
||||
*/
|
||||
validateSchema(schema: Object | boolean): boolean;
|
||||
validateSchema(schema: object | boolean): boolean;
|
||||
/**
|
||||
* Get compiled schema from the instance by `key` or `ref`.
|
||||
* @param {String} keyRef `key` that was passed to `addSchema` or full schema reference (`schema.id` or resolved id).
|
||||
* @param {string} keyRef `key` that was passed to `addSchema` or full schema reference (`schema.id` or resolved id).
|
||||
* @return {Function} schema validating function (with property `schema`).
|
||||
*/
|
||||
getSchema(keyRef: string): ValidateFunction;
|
||||
@@ -62,40 +64,44 @@ declare namespace ajv {
|
||||
* If no parameter is passed all schemas but meta-schemas are removed.
|
||||
* If RegExp is passed all schemas with key/id matching pattern but meta-schemas are removed.
|
||||
* Even if schema is referenced by other schemas it still can be removed as other schemas have local references.
|
||||
* @param {String|Object|RegExp|Boolean} schemaKeyRef key, ref, pattern to match key/ref or schema object
|
||||
* @param {string|object|RegExp|Boolean} schemaKeyRef key, ref, pattern to match key/ref or schema object
|
||||
* @return {Ajv} this for method chaining
|
||||
*/
|
||||
removeSchema(schemaKeyRef?: Object | string | RegExp | boolean): void;
|
||||
removeSchema(schemaKeyRef?: object | string | RegExp | boolean): Ajv;
|
||||
/**
|
||||
* Add custom format
|
||||
* @param {String} name format name
|
||||
* @param {String|RegExp|Function} format string is converted to RegExp; function should return boolean (true when valid)
|
||||
* @param {string} name format name
|
||||
* @param {string|RegExp|Function} format string is converted to RegExp; function should return boolean (true when valid)
|
||||
* @return {Ajv} this for method chaining
|
||||
*/
|
||||
addFormat(name: string, format: FormatValidator | FormatDefinition): void;
|
||||
addFormat(name: string, format: FormatValidator | FormatDefinition): Ajv;
|
||||
/**
|
||||
* Define custom keyword
|
||||
* @this Ajv
|
||||
* @param {String} keyword custom keyword, should be a valid identifier, should be different from all standard, custom and macro keywords.
|
||||
* @param {Object} definition keyword definition object with properties `type` (type(s) which the keyword applies to), `validate` or `compile`.
|
||||
* @param {string} keyword custom keyword, should be a valid identifier, should be different from all standard, custom and macro keywords.
|
||||
* @param {object} definition keyword definition object with properties `type` (type(s) which the keyword applies to), `validate` or `compile`.
|
||||
* @return {Ajv} this for method chaining
|
||||
*/
|
||||
addKeyword(keyword: string, definition: KeywordDefinition): void;
|
||||
addKeyword(keyword: string, definition: KeywordDefinition): Ajv;
|
||||
/**
|
||||
* Get keyword definition
|
||||
* @this Ajv
|
||||
* @param {String} keyword pre-defined or custom keyword.
|
||||
* @return {Object|Boolean} custom keyword definition, `true` if it is a predefined keyword, `false` otherwise.
|
||||
* @param {string} keyword pre-defined or custom keyword.
|
||||
* @return {object|Boolean} custom keyword definition, `true` if it is a predefined keyword, `false` otherwise.
|
||||
*/
|
||||
getKeyword(keyword: string): Object | boolean;
|
||||
getKeyword(keyword: string): object | boolean;
|
||||
/**
|
||||
* Remove keyword
|
||||
* @this Ajv
|
||||
* @param {String} keyword pre-defined or custom keyword.
|
||||
* @param {string} keyword pre-defined or custom keyword.
|
||||
* @return {Ajv} this for method chaining
|
||||
*/
|
||||
removeKeyword(keyword: string): void;
|
||||
removeKeyword(keyword: string): Ajv;
|
||||
/**
|
||||
* Convert array of error message objects to string
|
||||
* @param {Array<Object>} errors optional array of validation errors, if not passed errors from the instance are used.
|
||||
* @param {Object} options optional options with properties `separator` and `dataVar`.
|
||||
* @return {String} human readable string with all errors descriptions
|
||||
* @param {Array<object>} errors optional array of validation errors, if not passed errors from the instance are used.
|
||||
* @param {object} options optional options with properties `separator` and `dataVar`.
|
||||
* @return {string} human readable string with all errors descriptions
|
||||
*/
|
||||
errorsText(errors?: Array<ErrorObject>, options?: ErrorsTextOptions): string;
|
||||
errors?: Array<ErrorObject>;
|
||||
@@ -109,17 +115,17 @@ declare namespace ajv {
|
||||
(
|
||||
data: any,
|
||||
dataPath?: string,
|
||||
parentData?: Object | Array<any>,
|
||||
parentData?: object | Array<any>,
|
||||
parentDataProperty?: string | number,
|
||||
rootData?: Object | Array<any>
|
||||
rootData?: object | Array<any>
|
||||
): boolean | Thenable<any>;
|
||||
schema?: Object | boolean;
|
||||
schema?: object | boolean;
|
||||
errors?: null | Array<ErrorObject>;
|
||||
refs?: Object;
|
||||
refs?: object;
|
||||
refVal?: Array<any>;
|
||||
root?: ValidateFunction | Object;
|
||||
root?: ValidateFunction | object;
|
||||
$async?: true;
|
||||
source?: Object;
|
||||
source?: object;
|
||||
}
|
||||
|
||||
interface Options {
|
||||
@@ -130,19 +136,19 @@ declare namespace ajv {
|
||||
uniqueItems?: boolean;
|
||||
unicode?: boolean;
|
||||
format?: string;
|
||||
formats?: Object;
|
||||
formats?: object;
|
||||
unknownFormats?: true | string[] | 'ignore';
|
||||
schemas?: Array<Object> | Object;
|
||||
schemas?: Array<object> | object;
|
||||
schemaId?: '$id' | 'id';
|
||||
missingRefs?: true | 'ignore' | 'fail';
|
||||
extendRefs?: true | 'ignore' | 'fail';
|
||||
loadSchema?: (uri: string, cb?: (err: Error, schema: Object) => void) => Thenable<Object | boolean>;
|
||||
loadSchema?: (uri: string, cb?: (err: Error, schema: object) => void) => Thenable<object | boolean>;
|
||||
removeAdditional?: boolean | 'all' | 'failing';
|
||||
useDefaults?: boolean | 'shared';
|
||||
coerceTypes?: boolean | 'array';
|
||||
async?: boolean | string;
|
||||
transpile?: string | ((code: string) => string);
|
||||
meta?: boolean | Object;
|
||||
meta?: boolean | object;
|
||||
validateSchema?: boolean | 'log';
|
||||
addUsedSchema?: boolean;
|
||||
inlineRefs?: boolean | number;
|
||||
@@ -154,7 +160,7 @@ declare namespace ajv {
|
||||
messages?: boolean;
|
||||
sourceCode?: boolean;
|
||||
processCode?: (code: string) => string;
|
||||
cache?: Object;
|
||||
cache?: object;
|
||||
}
|
||||
|
||||
type FormatValidator = string | RegExp | ((data: string) => boolean | Thenable<any>);
|
||||
@@ -170,27 +176,57 @@ declare namespace ajv {
|
||||
async?: boolean;
|
||||
$data?: boolean;
|
||||
errors?: boolean | string;
|
||||
metaSchema?: Object;
|
||||
metaSchema?: object;
|
||||
// schema: false makes validate not to expect schema (ValidateFunction)
|
||||
schema?: boolean;
|
||||
modifying?: boolean;
|
||||
valid?: boolean;
|
||||
// one and only one of the following properties should be present
|
||||
validate?: SchemaValidateFunction | ValidateFunction;
|
||||
compile?: (schema: any, parentSchema: Object) => ValidateFunction;
|
||||
macro?: (schema: any, parentSchema: Object) => Object | boolean;
|
||||
inline?: (it: Object, keyword: string, schema: any, parentSchema: Object) => string;
|
||||
compile?: (schema: any, parentSchema: object, it: CompilationContext) => ValidateFunction;
|
||||
macro?: (schema: any, parentSchema: object, it: CompilationContext) => object | boolean;
|
||||
inline?: (it: CompilationContext, keyword: string, schema: any, parentSchema: object) => string;
|
||||
}
|
||||
|
||||
interface CompilationContext {
|
||||
level: number;
|
||||
dataLevel: number;
|
||||
schema: any;
|
||||
schemaPath: string;
|
||||
baseId: string;
|
||||
async: boolean;
|
||||
opts: Options;
|
||||
formats: {
|
||||
[index: string]: FormatDefinition | undefined;
|
||||
};
|
||||
compositeRule: boolean;
|
||||
validate: (schema: object) => boolean;
|
||||
util: {
|
||||
copy(obj: any, target?: any): any;
|
||||
toHash(source: string[]): { [index: string]: true | undefined };
|
||||
equal(obj: any, target: any): boolean;
|
||||
getProperty(str: string): string;
|
||||
schemaHasRules(schema: object, rules: any): string;
|
||||
escapeQuotes(str: string): string;
|
||||
toQuotedString(str: string): string;
|
||||
getData(jsonPointer: string, dataLevel: number, paths: string[]): string;
|
||||
escapeJsonPointer(str: string): string;
|
||||
unescapeJsonPointer(str: string): string;
|
||||
escapeFragment(str: string): string;
|
||||
unescapeFragment(str: string): string;
|
||||
};
|
||||
self: Ajv;
|
||||
}
|
||||
|
||||
interface SchemaValidateFunction {
|
||||
(
|
||||
schema: any,
|
||||
data: any,
|
||||
parentSchema?: Object,
|
||||
parentSchema?: object,
|
||||
dataPath?: string,
|
||||
parentData?: Object | Array<any>,
|
||||
parentData?: object | Array<any>,
|
||||
parentDataProperty?: string | number,
|
||||
rootData?: Object | Array<any>
|
||||
rootData?: object | Array<any>
|
||||
): boolean | Thenable<any>;
|
||||
errors?: Array<ErrorObject>;
|
||||
}
|
||||
@@ -211,7 +247,7 @@ declare namespace ajv {
|
||||
message?: string;
|
||||
// These are added with the `verbose` option.
|
||||
schema?: any;
|
||||
parentSchema?: Object;
|
||||
parentSchema?: object;
|
||||
data?: any;
|
||||
}
|
||||
|
||||
|
45
goTorrentWebUI/node_modules/style-loader/node_modules/ajv/lib/ajv.js
generated
vendored
45
goTorrentWebUI/node_modules/style-loader/node_modules/ajv/lib/ajv.js
generated
vendored
@@ -52,6 +52,7 @@ var META_SUPPORT_DATA = ['/properties'];
|
||||
function Ajv(opts) {
|
||||
if (!(this instanceof Ajv)) return new Ajv(opts);
|
||||
opts = this._opts = util.copy(opts) || {};
|
||||
setLogger(this);
|
||||
this._schemas = {};
|
||||
this._refs = {};
|
||||
this._fragments = {};
|
||||
@@ -125,11 +126,12 @@ function compile(schema, _meta) {
|
||||
* @param {String} key Optional schema key. Can be passed to `validate` method instead of schema object or id/ref. One schema per instance can have empty `id` and `key`.
|
||||
* @param {Boolean} _skipValidation true to skip schema validation. Used internally, option validateSchema should be used instead.
|
||||
* @param {Boolean} _meta true if schema is a meta-schema. Used internally, addMetaSchema should be used instead.
|
||||
* @return {Ajv} this for method chaining
|
||||
*/
|
||||
function addSchema(schema, key, _skipValidation, _meta) {
|
||||
if (Array.isArray(schema)){
|
||||
for (var i=0; i<schema.length; i++) this.addSchema(schema[i], undefined, _skipValidation, _meta);
|
||||
return;
|
||||
return this;
|
||||
}
|
||||
var id = this._getId(schema);
|
||||
if (id !== undefined && typeof id != 'string')
|
||||
@@ -137,6 +139,7 @@ function addSchema(schema, key, _skipValidation, _meta) {
|
||||
key = resolve.normalizeId(key || id);
|
||||
checkUnique(this, key);
|
||||
this._schemas[key] = this._addSchema(schema, _skipValidation, _meta, true);
|
||||
return this;
|
||||
}
|
||||
|
||||
|
||||
@@ -147,9 +150,11 @@ function addSchema(schema, key, _skipValidation, _meta) {
|
||||
* @param {Object} schema schema object
|
||||
* @param {String} key optional schema key
|
||||
* @param {Boolean} skipValidation true to skip schema validation, can be used to override validateSchema option for meta-schema
|
||||
* @return {Ajv} this for method chaining
|
||||
*/
|
||||
function addMetaSchema(schema, key, skipValidation) {
|
||||
this.addSchema(schema, key, skipValidation, true);
|
||||
return this;
|
||||
}
|
||||
|
||||
|
||||
@@ -166,7 +171,7 @@ function validateSchema(schema, throwOrLogError) {
|
||||
throw new Error('$schema must be a string');
|
||||
$schema = $schema || this._opts.defaultMeta || defaultMeta(this);
|
||||
if (!$schema) {
|
||||
console.warn('meta-schema not available');
|
||||
this.logger.warn('meta-schema not available');
|
||||
this.errors = null;
|
||||
return true;
|
||||
}
|
||||
@@ -179,7 +184,7 @@ function validateSchema(schema, throwOrLogError) {
|
||||
finally { this._formats.uri = currentUriFormat; }
|
||||
if (!valid && throwOrLogError) {
|
||||
var message = 'schema is invalid: ' + this.errorsText();
|
||||
if (this._opts.validateSchema == 'log') console.error(message);
|
||||
if (this._opts.validateSchema == 'log') this.logger.error(message);
|
||||
else throw new Error(message);
|
||||
}
|
||||
return valid;
|
||||
@@ -246,25 +251,26 @@ function _getSchemaObj(self, keyRef) {
|
||||
* Even if schema is referenced by other schemas it still can be removed as other schemas have local references.
|
||||
* @this Ajv
|
||||
* @param {String|Object|RegExp} schemaKeyRef key, ref, pattern to match key/ref or schema object
|
||||
* @return {Ajv} this for method chaining
|
||||
*/
|
||||
function removeSchema(schemaKeyRef) {
|
||||
if (schemaKeyRef instanceof RegExp) {
|
||||
_removeAllSchemas(this, this._schemas, schemaKeyRef);
|
||||
_removeAllSchemas(this, this._refs, schemaKeyRef);
|
||||
return;
|
||||
return this;
|
||||
}
|
||||
switch (typeof schemaKeyRef) {
|
||||
case 'undefined':
|
||||
_removeAllSchemas(this, this._schemas);
|
||||
_removeAllSchemas(this, this._refs);
|
||||
this._cache.clear();
|
||||
return;
|
||||
return this;
|
||||
case 'string':
|
||||
var schemaObj = _getSchemaObj(this, schemaKeyRef);
|
||||
if (schemaObj) this._cache.del(schemaObj.cacheKey);
|
||||
delete this._schemas[schemaKeyRef];
|
||||
delete this._refs[schemaKeyRef];
|
||||
return;
|
||||
return this;
|
||||
case 'object':
|
||||
var serialize = this._opts.serialize;
|
||||
var cacheKey = serialize ? serialize(schemaKeyRef) : schemaKeyRef;
|
||||
@@ -276,6 +282,7 @@ function removeSchema(schemaKeyRef) {
|
||||
delete this._refs[id];
|
||||
}
|
||||
}
|
||||
return this;
|
||||
}
|
||||
|
||||
|
||||
@@ -378,15 +385,15 @@ function chooseGetId(opts) {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/* @this Ajv */
|
||||
function _getId(schema) {
|
||||
if (schema.$id) console.warn('schema $id ignored', schema.$id);
|
||||
if (schema.$id) this.logger.warn('schema $id ignored', schema.$id);
|
||||
return schema.id;
|
||||
}
|
||||
|
||||
|
||||
/* @this Ajv */
|
||||
function _get$Id(schema) {
|
||||
if (schema.id) console.warn('schema id ignored', schema.id);
|
||||
if (schema.id) this.logger.warn('schema id ignored', schema.id);
|
||||
return schema.$id;
|
||||
}
|
||||
|
||||
@@ -426,10 +433,12 @@ function errorsText(errors, options) {
|
||||
* @this Ajv
|
||||
* @param {String} name format name
|
||||
* @param {String|RegExp|Function} format string is converted to RegExp; function should return boolean (true when valid)
|
||||
* @return {Ajv} this for method chaining
|
||||
*/
|
||||
function addFormat(name, format) {
|
||||
if (typeof format == 'string') format = new RegExp(format);
|
||||
this._formats[name] = format;
|
||||
return this;
|
||||
}
|
||||
|
||||
|
||||
@@ -475,3 +484,19 @@ function getMetaSchemaOptions(self) {
|
||||
delete metaOpts[META_IGNORE_OPTIONS[i]];
|
||||
return metaOpts;
|
||||
}
|
||||
|
||||
|
||||
function setLogger(self) {
|
||||
var logger = self._opts.logger;
|
||||
if (logger === false) {
|
||||
self.logger = {log: noop, warn: noop, error: noop};
|
||||
} else {
|
||||
if (logger === undefined) logger = console;
|
||||
if (!(typeof logger == 'object' && logger.log && logger.warn && logger.error))
|
||||
throw new Error('logger must implement log, warn and error methods');
|
||||
self.logger = logger;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
function noop() {}
|
||||
|
5
goTorrentWebUI/node_modules/style-loader/node_modules/ajv/lib/compile/index.js
generated
vendored
5
goTorrentWebUI/node_modules/style-loader/node_modules/ajv/lib/compile/index.js
generated
vendored
@@ -104,6 +104,7 @@ function compile(schema, root, localRefs, baseId) {
|
||||
useCustomRule: useCustomRule,
|
||||
opts: opts,
|
||||
formats: formats,
|
||||
logger: self.logger,
|
||||
self: self
|
||||
});
|
||||
|
||||
@@ -146,7 +147,7 @@ function compile(schema, root, localRefs, baseId) {
|
||||
|
||||
refVal[0] = validate;
|
||||
} catch(e) {
|
||||
console.error('Error compiling schema, function code:', sourceCode);
|
||||
self.logger.error('Error compiling schema, function code:', sourceCode);
|
||||
throw e;
|
||||
}
|
||||
|
||||
@@ -260,7 +261,7 @@ function compile(schema, root, localRefs, baseId) {
|
||||
var valid = validateSchema(schema);
|
||||
if (!valid) {
|
||||
var message = 'keyword schema is invalid: ' + self.errorsText(validateSchema.errors);
|
||||
if (self._opts.validateSchema == 'log') console.error(message);
|
||||
if (self._opts.validateSchema == 'log') self.logger.error(message);
|
||||
else throw new Error(message);
|
||||
}
|
||||
}
|
||||
|
2
goTorrentWebUI/node_modules/style-loader/node_modules/ajv/lib/compile/rules.js
generated
vendored
2
goTorrentWebUI/node_modules/style-loader/node_modules/ajv/lib/compile/rules.js
generated
vendored
@@ -20,7 +20,7 @@ module.exports = function rules() {
|
||||
|
||||
var ALL = [ 'type' ];
|
||||
var KEYWORDS = [
|
||||
'additionalItems', '$schema', 'id', 'title',
|
||||
'additionalItems', '$schema', '$id', 'id', 'title',
|
||||
'description', 'default', 'definitions'
|
||||
];
|
||||
var TYPES = [ 'number', 'integer', 'string', 'array', 'object', 'boolean', 'null' ];
|
||||
|
2
goTorrentWebUI/node_modules/style-loader/node_modules/ajv/lib/dot/format.jst
generated
vendored
2
goTorrentWebUI/node_modules/style-loader/node_modules/ajv/lib/dot/format.jst
generated
vendored
@@ -71,7 +71,7 @@
|
||||
{{ var $format = it.formats[$schema]; }}
|
||||
{{? !$format }}
|
||||
{{? $unknownFormats == 'ignore' }}
|
||||
{{ console.warn('unknown format "' + $schema + '" ignored in schema at path "' + it.errSchemaPath + '"'); }}
|
||||
{{ it.logger.warn('unknown format "' + $schema + '" ignored in schema at path "' + it.errSchemaPath + '"'); }}
|
||||
{{# def.skipFormat }}
|
||||
{{?? $allowUnknown && $unknownFormats.indexOf($schema) >= 0 }}
|
||||
{{# def.skipFormat }}
|
||||
|
4
goTorrentWebUI/node_modules/style-loader/node_modules/ajv/lib/dot/ref.jst
generated
vendored
4
goTorrentWebUI/node_modules/style-loader/node_modules/ajv/lib/dot/ref.jst
generated
vendored
@@ -27,11 +27,11 @@
|
||||
{{? $refVal === undefined }}
|
||||
{{ var $message = it.MissingRefError.message(it.baseId, $schema); }}
|
||||
{{? it.opts.missingRefs == 'fail' }}
|
||||
{{ console.error($message); }}
|
||||
{{ it.logger.error($message); }}
|
||||
{{# def.error:'$ref' }}
|
||||
{{? $breakOnError }} if (false) { {{?}}
|
||||
{{?? it.opts.missingRefs == 'ignore' }}
|
||||
{{ console.warn($message); }}
|
||||
{{ it.logger.warn($message); }}
|
||||
{{? $breakOnError }} if (true) { {{?}}
|
||||
{{??}}
|
||||
{{ throw new it.MissingRefError(it.baseId, $schema, $message); }}
|
||||
|
8
goTorrentWebUI/node_modules/style-loader/node_modules/ajv/lib/dot/validate.jst
generated
vendored
8
goTorrentWebUI/node_modules/style-loader/node_modules/ajv/lib/dot/validate.jst
generated
vendored
@@ -140,7 +140,7 @@
|
||||
{{?? it.opts.extendRefs !== true }}
|
||||
{{
|
||||
$refKeywords = false;
|
||||
console.warn('$ref: keywords ignored in schema at path "' + it.errSchemaPath + '"');
|
||||
it.logger.warn('$ref: keywords ignored in schema at path "' + it.errSchemaPath + '"');
|
||||
}}
|
||||
{{?}}
|
||||
{{?}}
|
||||
@@ -177,7 +177,7 @@
|
||||
{{?}}
|
||||
{{??}}
|
||||
{{? it.opts.v5 && it.schema.patternGroups }}
|
||||
{{ console.warn('keyword "patternGroups" is deprecated and disabled. Use option patternGroups: true to enable.'); }}
|
||||
{{ it.logger.warn('keyword "patternGroups" is deprecated and disabled. Use option patternGroups: true to enable.'); }}
|
||||
{{?}}
|
||||
{{~ it.RULES:$rulesGroup }}
|
||||
{{? $shouldUseGroup($rulesGroup) }}
|
||||
@@ -260,10 +260,10 @@
|
||||
|
||||
function $shouldUseRule($rule) {
|
||||
return it.schema[$rule.keyword] !== undefined ||
|
||||
($rule.implements && $ruleImlementsSomeKeyword($rule));
|
||||
($rule.implements && $ruleImplementsSomeKeyword($rule));
|
||||
}
|
||||
|
||||
function $ruleImlementsSomeKeyword($rule) {
|
||||
function $ruleImplementsSomeKeyword($rule) {
|
||||
var impl = $rule.implements;
|
||||
for (var i=0; i < impl.length; i++)
|
||||
if (it.schema[impl[i]] !== undefined)
|
||||
|
2
goTorrentWebUI/node_modules/style-loader/node_modules/ajv/lib/dotjs/format.js
generated
vendored
2
goTorrentWebUI/node_modules/style-loader/node_modules/ajv/lib/dotjs/format.js
generated
vendored
@@ -55,7 +55,7 @@ module.exports = function generate_format(it, $keyword, $ruleType) {
|
||||
var $format = it.formats[$schema];
|
||||
if (!$format) {
|
||||
if ($unknownFormats == 'ignore') {
|
||||
console.warn('unknown format "' + $schema + '" ignored in schema at path "' + it.errSchemaPath + '"');
|
||||
it.logger.warn('unknown format "' + $schema + '" ignored in schema at path "' + it.errSchemaPath + '"');
|
||||
if ($breakOnError) {
|
||||
out += ' if (true) { ';
|
||||
}
|
||||
|
4
goTorrentWebUI/node_modules/style-loader/node_modules/ajv/lib/dotjs/ref.js
generated
vendored
4
goTorrentWebUI/node_modules/style-loader/node_modules/ajv/lib/dotjs/ref.js
generated
vendored
@@ -22,7 +22,7 @@ module.exports = function generate_ref(it, $keyword, $ruleType) {
|
||||
if ($refVal === undefined) {
|
||||
var $message = it.MissingRefError.message(it.baseId, $schema);
|
||||
if (it.opts.missingRefs == 'fail') {
|
||||
console.error($message);
|
||||
it.logger.error($message);
|
||||
var $$outStack = $$outStack || [];
|
||||
$$outStack.push(out);
|
||||
out = ''; /* istanbul ignore else */
|
||||
@@ -53,7 +53,7 @@ module.exports = function generate_ref(it, $keyword, $ruleType) {
|
||||
out += ' if (false) { ';
|
||||
}
|
||||
} else if (it.opts.missingRefs == 'ignore') {
|
||||
console.warn($message);
|
||||
it.logger.warn($message);
|
||||
if ($breakOnError) {
|
||||
out += ' if (true) { ';
|
||||
}
|
||||
|
8
goTorrentWebUI/node_modules/style-loader/node_modules/ajv/lib/dotjs/validate.js
generated
vendored
8
goTorrentWebUI/node_modules/style-loader/node_modules/ajv/lib/dotjs/validate.js
generated
vendored
@@ -123,7 +123,7 @@ module.exports = function generate_validate(it, $keyword, $ruleType) {
|
||||
throw new Error('$ref: validation keywords used in schema at path "' + it.errSchemaPath + '" (see option extendRefs)');
|
||||
} else if (it.opts.extendRefs !== true) {
|
||||
$refKeywords = false;
|
||||
console.warn('$ref: keywords ignored in schema at path "' + it.errSchemaPath + '"');
|
||||
it.logger.warn('$ref: keywords ignored in schema at path "' + it.errSchemaPath + '"');
|
||||
}
|
||||
}
|
||||
if ($typeSchema) {
|
||||
@@ -281,7 +281,7 @@ module.exports = function generate_validate(it, $keyword, $ruleType) {
|
||||
}
|
||||
} else {
|
||||
if (it.opts.v5 && it.schema.patternGroups) {
|
||||
console.warn('keyword "patternGroups" is deprecated and disabled. Use option patternGroups: true to enable.');
|
||||
it.logger.warn('keyword "patternGroups" is deprecated and disabled. Use option patternGroups: true to enable.');
|
||||
}
|
||||
var arr2 = it.RULES;
|
||||
if (arr2) {
|
||||
@@ -446,10 +446,10 @@ module.exports = function generate_validate(it, $keyword, $ruleType) {
|
||||
}
|
||||
|
||||
function $shouldUseRule($rule) {
|
||||
return it.schema[$rule.keyword] !== undefined || ($rule.implements && $ruleImlementsSomeKeyword($rule));
|
||||
return it.schema[$rule.keyword] !== undefined || ($rule.implements && $ruleImplementsSomeKeyword($rule));
|
||||
}
|
||||
|
||||
function $ruleImlementsSomeKeyword($rule) {
|
||||
function $ruleImplementsSomeKeyword($rule) {
|
||||
var impl = $rule.implements;
|
||||
for (var i = 0; i < impl.length; i++)
|
||||
if (it.schema[impl[i]] !== undefined) return true;
|
||||
|
5
goTorrentWebUI/node_modules/style-loader/node_modules/ajv/lib/keyword.js
generated
vendored
5
goTorrentWebUI/node_modules/style-loader/node_modules/ajv/lib/keyword.js
generated
vendored
@@ -14,6 +14,7 @@ module.exports = {
|
||||
* @this Ajv
|
||||
* @param {String} keyword custom keyword, should be unique (including different from all standard, custom and macro keywords).
|
||||
* @param {Object} definition keyword definition object with properties `type` (type(s) which the keyword applies to), `validate` or `compile`.
|
||||
* @return {Ajv} this for method chaining
|
||||
*/
|
||||
function addKeyword(keyword, definition) {
|
||||
/* jshint validthis: true */
|
||||
@@ -91,6 +92,8 @@ function addKeyword(keyword, definition) {
|
||||
function checkDataType(dataType) {
|
||||
if (!RULES.types[dataType]) throw new Error('Unknown type ' + dataType);
|
||||
}
|
||||
|
||||
return this;
|
||||
}
|
||||
|
||||
|
||||
@@ -111,6 +114,7 @@ function getKeyword(keyword) {
|
||||
* Remove keyword
|
||||
* @this Ajv
|
||||
* @param {String} keyword pre-defined or custom keyword.
|
||||
* @return {Ajv} this for method chaining
|
||||
*/
|
||||
function removeKeyword(keyword) {
|
||||
/* jshint validthis: true */
|
||||
@@ -127,4 +131,5 @@ function removeKeyword(keyword) {
|
||||
}
|
||||
}
|
||||
}
|
||||
return this;
|
||||
}
|
||||
|
@@ -57,6 +57,10 @@
|
||||
"type": "string"
|
||||
},
|
||||
"default": {},
|
||||
"examples": {
|
||||
"type": "array",
|
||||
"items": {}
|
||||
},
|
||||
"multipleOf": {
|
||||
"type": "number",
|
||||
"exclusiveMinimum": 0
|
||||
|
28
goTorrentWebUI/node_modules/style-loader/node_modules/ajv/package.json
generated
vendored
28
goTorrentWebUI/node_modules/style-loader/node_modules/ajv/package.json
generated
vendored
@@ -1,31 +1,31 @@
|
||||
{
|
||||
"_args": [
|
||||
[
|
||||
"ajv@5.3.0",
|
||||
"ajv@5.5.2",
|
||||
"C:\\Users\\deranjer\\go\\src\\github.com\\deranjer\\goTorrent\\goTorrentWebUI"
|
||||
]
|
||||
],
|
||||
"_from": "ajv@5.3.0",
|
||||
"_id": "ajv@5.3.0",
|
||||
"_from": "ajv@5.5.2",
|
||||
"_id": "ajv@5.5.2",
|
||||
"_inBundle": false,
|
||||
"_integrity": "sha1-RBT/dKUIecII7l/cgm4ywwNUnto=",
|
||||
"_integrity": "sha1-c7Xuyj+rZT49P5Qis0GtQiBdyWU=",
|
||||
"_location": "/style-loader/ajv",
|
||||
"_phantomChildren": {},
|
||||
"_requested": {
|
||||
"type": "version",
|
||||
"registry": true,
|
||||
"raw": "ajv@5.3.0",
|
||||
"raw": "ajv@5.5.2",
|
||||
"name": "ajv",
|
||||
"escapedName": "ajv",
|
||||
"rawSpec": "5.3.0",
|
||||
"rawSpec": "5.5.2",
|
||||
"saveSpec": null,
|
||||
"fetchSpec": "5.3.0"
|
||||
"fetchSpec": "5.5.2"
|
||||
},
|
||||
"_requiredBy": [
|
||||
"/style-loader/schema-utils"
|
||||
],
|
||||
"_resolved": "https://registry.npmjs.org/ajv/-/ajv-5.3.0.tgz",
|
||||
"_spec": "5.3.0",
|
||||
"_resolved": "https://registry.npmjs.org/ajv/-/ajv-5.5.2.tgz",
|
||||
"_spec": "5.5.2",
|
||||
"_where": "C:\\Users\\deranjer\\go\\src\\github.com\\deranjer\\goTorrent\\goTorrentWebUI",
|
||||
"author": {
|
||||
"name": "Evgeny Poberezkin"
|
||||
@@ -55,7 +55,7 @@
|
||||
"if-node-version": "^1.0.0",
|
||||
"js-beautify": "^1.7.3",
|
||||
"jshint": "^2.9.4",
|
||||
"json-schema-test": "^1.3.0",
|
||||
"json-schema-test": "^2.0.0",
|
||||
"karma": "^1.0.0",
|
||||
"karma-chrome-launcher": "^2.0.0",
|
||||
"karma-mocha": "^1.1.1",
|
||||
@@ -66,9 +66,9 @@
|
||||
"nyc": "^11.0.2",
|
||||
"phantomjs-prebuilt": "^2.1.4",
|
||||
"pre-commit": "^1.1.1",
|
||||
"regenerator": "0.10.0",
|
||||
"regenerator": "^0.12.2",
|
||||
"require-globify": "^1.3.0",
|
||||
"typescript": "^2.0.3",
|
||||
"typescript": "^2.6.2",
|
||||
"uglify-js": "^3.1.5",
|
||||
"watch": "^1.0.0"
|
||||
},
|
||||
@@ -114,7 +114,7 @@
|
||||
"bundle-beautify": "node ./scripts/bundle.js js-beautify",
|
||||
"bundle-nodent": "node ./scripts/bundle.js nodent",
|
||||
"bundle-regenerator": "node ./scripts/bundle.js regenerator",
|
||||
"eslint": "if-node-version \">=4\" eslint lib/*.js lib/compile/*.js spec scripts",
|
||||
"eslint": "if-node-version \">=4\" eslint lib/*.js lib/compile/*.js spec/*.js scripts",
|
||||
"jshint": "jshint lib/*.js lib/**/*.js --exclude lib/dotjs/**/*",
|
||||
"prepublish": "npm run build && npm run bundle-all",
|
||||
"test": "npm run jshint && npm run eslint && npm run test-ts && npm run build && npm run test-cov && if-node-version 4 npm run test-browser",
|
||||
@@ -129,5 +129,5 @@
|
||||
},
|
||||
"tonicExampleFilename": ".tonic_example.js",
|
||||
"typings": "lib/ajv.d.ts",
|
||||
"version": "5.3.0"
|
||||
"version": "5.5.2"
|
||||
}
|
||||
|
Reference in New Issue
Block a user