mirror of
https://github.com/S2-/minifyfromhtml.git
synced 2025-08-02 20:00:05 +02:00
use terser and clean-css directly
create a sourcemap as well by default
This commit is contained in:
222
node_modules/ajv/dist/ajv.bundle.js
generated
vendored
222
node_modules/ajv/dist/ajv.bundle.js
generated
vendored
@@ -161,7 +161,7 @@ var util = require('./util');
|
||||
|
||||
var DATE = /^(\d\d\d\d)-(\d\d)-(\d\d)$/;
|
||||
var DAYS = [0,31,28,31,30,31,30,31,31,30,31,30,31];
|
||||
var TIME = /^(\d\d):(\d\d):(\d\d)(\.\d+)?(z|[+-]\d\d:\d\d)?$/i;
|
||||
var TIME = /^(\d\d):(\d\d):(\d\d)(\.\d+)?(z|[+-]\d\d(?::?\d\d)?)?$/i;
|
||||
var HOSTNAME = /^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[-0-9a-z]{0,61}[0-9a-z])?)*$/i;
|
||||
var URI = /^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)(?:\?(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i;
|
||||
var URIREF = /^(?:[a-z][a-z0-9+\-.]*:)?(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'"()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?(?:\?(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i;
|
||||
@@ -190,8 +190,8 @@ formats.fast = {
|
||||
// date: http://tools.ietf.org/html/rfc3339#section-5.6
|
||||
date: /^\d\d\d\d-[0-1]\d-[0-3]\d$/,
|
||||
// date-time: http://tools.ietf.org/html/rfc3339#section-5.6
|
||||
time: /^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d:\d\d)?$/i,
|
||||
'date-time': /^\d\d\d\d-[0-1]\d-[0-3]\d[t\s](?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d:\d\d)$/i,
|
||||
time: /^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)?$/i,
|
||||
'date-time': /^\d\d\d\d-[0-1]\d-[0-3]\d[t\s](?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i,
|
||||
// uri: https://github.com/mafintosh/is-my-json-valid/blob/master/formats.js
|
||||
uri: /^(?:[a-z][a-z0-9+-.]*:)(?:\/?\/)?[^\s]*$/i,
|
||||
'uri-reference': /^(?:(?:[a-z][a-z0-9+-.]*:)?\/?\/)?(?:[^\\\s#][^\s#]*)?(?:#[^\\\s]*)?$/i,
|
||||
@@ -694,7 +694,7 @@ function vars(arr, statement) {
|
||||
return code;
|
||||
}
|
||||
|
||||
},{"../dotjs/validate":37,"./error_classes":3,"./resolve":6,"./util":10,"fast-deep-equal":41,"fast-json-stable-stringify":42}],6:[function(require,module,exports){
|
||||
},{"../dotjs/validate":38,"./error_classes":3,"./resolve":6,"./util":10,"fast-deep-equal":42,"fast-json-stable-stringify":43}],6:[function(require,module,exports){
|
||||
'use strict';
|
||||
|
||||
var URI = require('uri-js')
|
||||
@@ -966,7 +966,7 @@ function resolveIds(schema) {
|
||||
return localRefs;
|
||||
}
|
||||
|
||||
},{"./schema_obj":8,"./util":10,"fast-deep-equal":41,"json-schema-traverse":43,"uri-js":44}],7:[function(require,module,exports){
|
||||
},{"./schema_obj":8,"./util":10,"fast-deep-equal":42,"json-schema-traverse":44,"uri-js":45}],7:[function(require,module,exports){
|
||||
'use strict';
|
||||
|
||||
var ruleModules = require('../dotjs')
|
||||
@@ -1034,7 +1034,7 @@ module.exports = function rules() {
|
||||
return RULES;
|
||||
};
|
||||
|
||||
},{"../dotjs":26,"./util":10}],8:[function(require,module,exports){
|
||||
},{"../dotjs":27,"./util":10}],8:[function(require,module,exports){
|
||||
'use strict';
|
||||
|
||||
var util = require('./util');
|
||||
@@ -1343,7 +1343,7 @@ function unescapeJsonPointer(str) {
|
||||
return str.replace(/~1/g, '/').replace(/~0/g, '~');
|
||||
}
|
||||
|
||||
},{"./ucs2length":9,"fast-deep-equal":41}],11:[function(require,module,exports){
|
||||
},{"./ucs2length":9,"fast-deep-equal":42}],11:[function(require,module,exports){
|
||||
'use strict';
|
||||
|
||||
var KEYWORDS = [
|
||||
@@ -1396,6 +1396,45 @@ module.exports = function (metaSchema, keywordsJsonPointers) {
|
||||
|
||||
},{}],12:[function(require,module,exports){
|
||||
'use strict';
|
||||
|
||||
var metaSchema = require('./refs/json-schema-draft-07.json');
|
||||
|
||||
module.exports = {
|
||||
$id: 'https://github.com/epoberezkin/ajv/blob/master/lib/definition_schema.js',
|
||||
definitions: {
|
||||
simpleTypes: metaSchema.definitions.simpleTypes
|
||||
},
|
||||
type: 'object',
|
||||
dependencies: {
|
||||
schema: ['validate'],
|
||||
$data: ['validate'],
|
||||
statements: ['inline'],
|
||||
valid: {not: {required: ['macro']}}
|
||||
},
|
||||
properties: {
|
||||
type: metaSchema.properties.type,
|
||||
schema: {type: 'boolean'},
|
||||
statements: {type: 'boolean'},
|
||||
dependencies: {
|
||||
type: 'array',
|
||||
items: {type: 'string'}
|
||||
},
|
||||
metaSchema: {type: 'object'},
|
||||
modifying: {type: 'boolean'},
|
||||
valid: {type: 'boolean'},
|
||||
$data: {type: 'boolean'},
|
||||
async: {type: 'boolean'},
|
||||
errors: {
|
||||
anyOf: [
|
||||
{type: 'boolean'},
|
||||
{const: 'full'}
|
||||
]
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
},{"./refs/json-schema-draft-07.json":41}],13:[function(require,module,exports){
|
||||
'use strict';
|
||||
module.exports = function generate__limit(it, $keyword, $ruleType) {
|
||||
var out = ' ';
|
||||
var $lvl = it.level;
|
||||
@@ -1553,7 +1592,7 @@ module.exports = function generate__limit(it, $keyword, $ruleType) {
|
||||
return out;
|
||||
}
|
||||
|
||||
},{}],13:[function(require,module,exports){
|
||||
},{}],14:[function(require,module,exports){
|
||||
'use strict';
|
||||
module.exports = function generate__limitItems(it, $keyword, $ruleType) {
|
||||
var out = ' ';
|
||||
@@ -1632,7 +1671,7 @@ module.exports = function generate__limitItems(it, $keyword, $ruleType) {
|
||||
return out;
|
||||
}
|
||||
|
||||
},{}],14:[function(require,module,exports){
|
||||
},{}],15:[function(require,module,exports){
|
||||
'use strict';
|
||||
module.exports = function generate__limitLength(it, $keyword, $ruleType) {
|
||||
var out = ' ';
|
||||
@@ -1716,7 +1755,7 @@ module.exports = function generate__limitLength(it, $keyword, $ruleType) {
|
||||
return out;
|
||||
}
|
||||
|
||||
},{}],15:[function(require,module,exports){
|
||||
},{}],16:[function(require,module,exports){
|
||||
'use strict';
|
||||
module.exports = function generate__limitProperties(it, $keyword, $ruleType) {
|
||||
var out = ' ';
|
||||
@@ -1795,7 +1834,7 @@ module.exports = function generate__limitProperties(it, $keyword, $ruleType) {
|
||||
return out;
|
||||
}
|
||||
|
||||
},{}],16:[function(require,module,exports){
|
||||
},{}],17:[function(require,module,exports){
|
||||
'use strict';
|
||||
module.exports = function generate_allOf(it, $keyword, $ruleType) {
|
||||
var out = ' ';
|
||||
@@ -1815,7 +1854,7 @@ module.exports = function generate_allOf(it, $keyword, $ruleType) {
|
||||
l1 = arr1.length - 1;
|
||||
while ($i < l1) {
|
||||
$sch = arr1[$i += 1];
|
||||
if (it.util.schemaHasRules($sch, it.RULES.all)) {
|
||||
if ((it.opts.strictKeywords ? typeof $sch == 'object' && Object.keys($sch).length > 0 : it.util.schemaHasRules($sch, it.RULES.all))) {
|
||||
$allSchemasEmpty = false;
|
||||
$it.schema = $sch;
|
||||
$it.schemaPath = $schemaPath + '[' + $i + ']';
|
||||
@@ -1840,7 +1879,7 @@ module.exports = function generate_allOf(it, $keyword, $ruleType) {
|
||||
return out;
|
||||
}
|
||||
|
||||
},{}],17:[function(require,module,exports){
|
||||
},{}],18:[function(require,module,exports){
|
||||
'use strict';
|
||||
module.exports = function generate_anyOf(it, $keyword, $ruleType) {
|
||||
var out = ' ';
|
||||
@@ -1858,7 +1897,7 @@ module.exports = function generate_anyOf(it, $keyword, $ruleType) {
|
||||
$it.level++;
|
||||
var $nextValid = 'valid' + $it.level;
|
||||
var $noEmptySchema = $schema.every(function($sch) {
|
||||
return it.util.schemaHasRules($sch, it.RULES.all);
|
||||
return (it.opts.strictKeywords ? typeof $sch == 'object' && Object.keys($sch).length > 0 : it.util.schemaHasRules($sch, it.RULES.all));
|
||||
});
|
||||
if ($noEmptySchema) {
|
||||
var $currentBaseId = $it.baseId;
|
||||
@@ -1916,7 +1955,7 @@ module.exports = function generate_anyOf(it, $keyword, $ruleType) {
|
||||
return out;
|
||||
}
|
||||
|
||||
},{}],18:[function(require,module,exports){
|
||||
},{}],19:[function(require,module,exports){
|
||||
'use strict';
|
||||
module.exports = function generate_comment(it, $keyword, $ruleType) {
|
||||
var out = ' ';
|
||||
@@ -1932,7 +1971,7 @@ module.exports = function generate_comment(it, $keyword, $ruleType) {
|
||||
return out;
|
||||
}
|
||||
|
||||
},{}],19:[function(require,module,exports){
|
||||
},{}],20:[function(require,module,exports){
|
||||
'use strict';
|
||||
module.exports = function generate_const(it, $keyword, $ruleType) {
|
||||
var out = ' ';
|
||||
@@ -1990,7 +2029,7 @@ module.exports = function generate_const(it, $keyword, $ruleType) {
|
||||
return out;
|
||||
}
|
||||
|
||||
},{}],20:[function(require,module,exports){
|
||||
},{}],21:[function(require,module,exports){
|
||||
'use strict';
|
||||
module.exports = function generate_contains(it, $keyword, $ruleType) {
|
||||
var out = ' ';
|
||||
@@ -2011,7 +2050,7 @@ module.exports = function generate_contains(it, $keyword, $ruleType) {
|
||||
$dataNxt = $it.dataLevel = it.dataLevel + 1,
|
||||
$nextData = 'data' + $dataNxt,
|
||||
$currentBaseId = it.baseId,
|
||||
$nonEmptySchema = it.util.schemaHasRules($schema, it.RULES.all);
|
||||
$nonEmptySchema = (it.opts.strictKeywords ? typeof $schema == 'object' && Object.keys($schema).length > 0 : it.util.schemaHasRules($schema, it.RULES.all));
|
||||
out += 'var ' + ($errs) + ' = errors;var ' + ($valid) + ';';
|
||||
if ($nonEmptySchema) {
|
||||
var $wasComposite = it.compositeRule;
|
||||
@@ -2074,7 +2113,7 @@ module.exports = function generate_contains(it, $keyword, $ruleType) {
|
||||
return out;
|
||||
}
|
||||
|
||||
},{}],21:[function(require,module,exports){
|
||||
},{}],22:[function(require,module,exports){
|
||||
'use strict';
|
||||
module.exports = function generate_custom(it, $keyword, $ruleType) {
|
||||
var out = ' ';
|
||||
@@ -2304,7 +2343,7 @@ module.exports = function generate_custom(it, $keyword, $ruleType) {
|
||||
return out;
|
||||
}
|
||||
|
||||
},{}],22:[function(require,module,exports){
|
||||
},{}],23:[function(require,module,exports){
|
||||
'use strict';
|
||||
module.exports = function generate_dependencies(it, $keyword, $ruleType) {
|
||||
var out = ' ';
|
||||
@@ -2449,7 +2488,7 @@ module.exports = function generate_dependencies(it, $keyword, $ruleType) {
|
||||
var $currentBaseId = $it.baseId;
|
||||
for (var $property in $schemaDeps) {
|
||||
var $sch = $schemaDeps[$property];
|
||||
if (it.util.schemaHasRules($sch, it.RULES.all)) {
|
||||
if ((it.opts.strictKeywords ? typeof $sch == 'object' && Object.keys($sch).length > 0 : it.util.schemaHasRules($sch, it.RULES.all))) {
|
||||
out += ' ' + ($nextValid) + ' = true; if ( ' + ($data) + (it.util.getProperty($property)) + ' !== undefined ';
|
||||
if ($ownProperties) {
|
||||
out += ' && Object.prototype.hasOwnProperty.call(' + ($data) + ', \'' + (it.util.escapeQuotes($property)) + '\') ';
|
||||
@@ -2474,7 +2513,7 @@ module.exports = function generate_dependencies(it, $keyword, $ruleType) {
|
||||
return out;
|
||||
}
|
||||
|
||||
},{}],23:[function(require,module,exports){
|
||||
},{}],24:[function(require,module,exports){
|
||||
'use strict';
|
||||
module.exports = function generate_enum(it, $keyword, $ruleType) {
|
||||
var out = ' ';
|
||||
@@ -2542,7 +2581,7 @@ module.exports = function generate_enum(it, $keyword, $ruleType) {
|
||||
return out;
|
||||
}
|
||||
|
||||
},{}],24:[function(require,module,exports){
|
||||
},{}],25:[function(require,module,exports){
|
||||
'use strict';
|
||||
module.exports = function generate_format(it, $keyword, $ruleType) {
|
||||
var out = ' ';
|
||||
@@ -2694,7 +2733,7 @@ module.exports = function generate_format(it, $keyword, $ruleType) {
|
||||
return out;
|
||||
}
|
||||
|
||||
},{}],25:[function(require,module,exports){
|
||||
},{}],26:[function(require,module,exports){
|
||||
'use strict';
|
||||
module.exports = function generate_if(it, $keyword, $ruleType) {
|
||||
var out = ' ';
|
||||
@@ -2712,8 +2751,8 @@ module.exports = function generate_if(it, $keyword, $ruleType) {
|
||||
var $nextValid = 'valid' + $it.level;
|
||||
var $thenSch = it.schema['then'],
|
||||
$elseSch = it.schema['else'],
|
||||
$thenPresent = $thenSch !== undefined && it.util.schemaHasRules($thenSch, it.RULES.all),
|
||||
$elsePresent = $elseSch !== undefined && it.util.schemaHasRules($elseSch, it.RULES.all),
|
||||
$thenPresent = $thenSch !== undefined && (it.opts.strictKeywords ? typeof $thenSch == 'object' && Object.keys($thenSch).length > 0 : it.util.schemaHasRules($thenSch, it.RULES.all)),
|
||||
$elsePresent = $elseSch !== undefined && (it.opts.strictKeywords ? typeof $elseSch == 'object' && Object.keys($elseSch).length > 0 : it.util.schemaHasRules($elseSch, it.RULES.all)),
|
||||
$currentBaseId = $it.baseId;
|
||||
if ($thenPresent || $elsePresent) {
|
||||
var $ifClause;
|
||||
@@ -2800,7 +2839,7 @@ module.exports = function generate_if(it, $keyword, $ruleType) {
|
||||
return out;
|
||||
}
|
||||
|
||||
},{}],26:[function(require,module,exports){
|
||||
},{}],27:[function(require,module,exports){
|
||||
'use strict';
|
||||
|
||||
//all requires must be explicit because browserify won't work with dynamic requires
|
||||
@@ -2835,7 +2874,7 @@ module.exports = {
|
||||
validate: require('./validate')
|
||||
};
|
||||
|
||||
},{"./_limit":12,"./_limitItems":13,"./_limitLength":14,"./_limitProperties":15,"./allOf":16,"./anyOf":17,"./comment":18,"./const":19,"./contains":20,"./dependencies":22,"./enum":23,"./format":24,"./if":25,"./items":27,"./multipleOf":28,"./not":29,"./oneOf":30,"./pattern":31,"./properties":32,"./propertyNames":33,"./ref":34,"./required":35,"./uniqueItems":36,"./validate":37}],27:[function(require,module,exports){
|
||||
},{"./_limit":13,"./_limitItems":14,"./_limitLength":15,"./_limitProperties":16,"./allOf":17,"./anyOf":18,"./comment":19,"./const":20,"./contains":21,"./dependencies":23,"./enum":24,"./format":25,"./if":26,"./items":28,"./multipleOf":29,"./not":30,"./oneOf":31,"./pattern":32,"./properties":33,"./propertyNames":34,"./ref":35,"./required":36,"./uniqueItems":37,"./validate":38}],28:[function(require,module,exports){
|
||||
'use strict';
|
||||
module.exports = function generate_items(it, $keyword, $ruleType) {
|
||||
var out = ' ';
|
||||
@@ -2904,7 +2943,7 @@ module.exports = function generate_items(it, $keyword, $ruleType) {
|
||||
l1 = arr1.length - 1;
|
||||
while ($i < l1) {
|
||||
$sch = arr1[$i += 1];
|
||||
if (it.util.schemaHasRules($sch, it.RULES.all)) {
|
||||
if ((it.opts.strictKeywords ? typeof $sch == 'object' && Object.keys($sch).length > 0 : it.util.schemaHasRules($sch, it.RULES.all))) {
|
||||
out += ' ' + ($nextValid) + ' = true; if (' + ($data) + '.length > ' + ($i) + ') { ';
|
||||
var $passData = $data + '[' + $i + ']';
|
||||
$it.schema = $sch;
|
||||
@@ -2927,7 +2966,7 @@ module.exports = function generate_items(it, $keyword, $ruleType) {
|
||||
}
|
||||
}
|
||||
}
|
||||
if (typeof $additionalItems == 'object' && it.util.schemaHasRules($additionalItems, it.RULES.all)) {
|
||||
if (typeof $additionalItems == 'object' && (it.opts.strictKeywords ? typeof $additionalItems == 'object' && Object.keys($additionalItems).length > 0 : it.util.schemaHasRules($additionalItems, it.RULES.all))) {
|
||||
$it.schema = $additionalItems;
|
||||
$it.schemaPath = it.schemaPath + '.additionalItems';
|
||||
$it.errSchemaPath = it.errSchemaPath + '/additionalItems';
|
||||
@@ -2951,7 +2990,7 @@ module.exports = function generate_items(it, $keyword, $ruleType) {
|
||||
$closingBraces += '}';
|
||||
}
|
||||
}
|
||||
} else if (it.util.schemaHasRules($schema, it.RULES.all)) {
|
||||
} else if ((it.opts.strictKeywords ? typeof $schema == 'object' && Object.keys($schema).length > 0 : it.util.schemaHasRules($schema, it.RULES.all))) {
|
||||
$it.schema = $schema;
|
||||
$it.schemaPath = $schemaPath;
|
||||
$it.errSchemaPath = $errSchemaPath;
|
||||
@@ -2978,7 +3017,7 @@ module.exports = function generate_items(it, $keyword, $ruleType) {
|
||||
return out;
|
||||
}
|
||||
|
||||
},{}],28:[function(require,module,exports){
|
||||
},{}],29:[function(require,module,exports){
|
||||
'use strict';
|
||||
module.exports = function generate_multipleOf(it, $keyword, $ruleType) {
|
||||
var out = ' ';
|
||||
@@ -3057,7 +3096,7 @@ module.exports = function generate_multipleOf(it, $keyword, $ruleType) {
|
||||
return out;
|
||||
}
|
||||
|
||||
},{}],29:[function(require,module,exports){
|
||||
},{}],30:[function(require,module,exports){
|
||||
'use strict';
|
||||
module.exports = function generate_not(it, $keyword, $ruleType) {
|
||||
var out = ' ';
|
||||
@@ -3072,7 +3111,7 @@ module.exports = function generate_not(it, $keyword, $ruleType) {
|
||||
var $it = it.util.copy(it);
|
||||
$it.level++;
|
||||
var $nextValid = 'valid' + $it.level;
|
||||
if (it.util.schemaHasRules($schema, it.RULES.all)) {
|
||||
if ((it.opts.strictKeywords ? typeof $schema == 'object' && Object.keys($schema).length > 0 : it.util.schemaHasRules($schema, it.RULES.all))) {
|
||||
$it.schema = $schema;
|
||||
$it.schemaPath = $schemaPath;
|
||||
$it.errSchemaPath = $errSchemaPath;
|
||||
@@ -3143,7 +3182,7 @@ module.exports = function generate_not(it, $keyword, $ruleType) {
|
||||
return out;
|
||||
}
|
||||
|
||||
},{}],30:[function(require,module,exports){
|
||||
},{}],31:[function(require,module,exports){
|
||||
'use strict';
|
||||
module.exports = function generate_oneOf(it, $keyword, $ruleType) {
|
||||
var out = ' ';
|
||||
@@ -3172,7 +3211,7 @@ module.exports = function generate_oneOf(it, $keyword, $ruleType) {
|
||||
l1 = arr1.length - 1;
|
||||
while ($i < l1) {
|
||||
$sch = arr1[$i += 1];
|
||||
if (it.util.schemaHasRules($sch, it.RULES.all)) {
|
||||
if ((it.opts.strictKeywords ? typeof $sch == 'object' && Object.keys($sch).length > 0 : it.util.schemaHasRules($sch, it.RULES.all))) {
|
||||
$it.schema = $sch;
|
||||
$it.schemaPath = $schemaPath + '[' + $i + ']';
|
||||
$it.errSchemaPath = $errSchemaPath + '/' + $i;
|
||||
@@ -3218,7 +3257,7 @@ module.exports = function generate_oneOf(it, $keyword, $ruleType) {
|
||||
return out;
|
||||
}
|
||||
|
||||
},{}],31:[function(require,module,exports){
|
||||
},{}],32:[function(require,module,exports){
|
||||
'use strict';
|
||||
module.exports = function generate_pattern(it, $keyword, $ruleType) {
|
||||
var out = ' ';
|
||||
@@ -3295,7 +3334,7 @@ module.exports = function generate_pattern(it, $keyword, $ruleType) {
|
||||
return out;
|
||||
}
|
||||
|
||||
},{}],32:[function(require,module,exports){
|
||||
},{}],33:[function(require,module,exports){
|
||||
'use strict';
|
||||
module.exports = function generate_properties(it, $keyword, $ruleType) {
|
||||
var out = ' ';
|
||||
@@ -3481,7 +3520,7 @@ module.exports = function generate_properties(it, $keyword, $ruleType) {
|
||||
while (i3 < l3) {
|
||||
$propertyKey = arr3[i3 += 1];
|
||||
var $sch = $schema[$propertyKey];
|
||||
if (it.util.schemaHasRules($sch, it.RULES.all)) {
|
||||
if ((it.opts.strictKeywords ? typeof $sch == 'object' && Object.keys($sch).length > 0 : it.util.schemaHasRules($sch, it.RULES.all))) {
|
||||
var $prop = it.util.getProperty($propertyKey),
|
||||
$passData = $data + $prop,
|
||||
$hasDefault = $useDefaults && $sch.default !== undefined;
|
||||
@@ -3584,7 +3623,7 @@ module.exports = function generate_properties(it, $keyword, $ruleType) {
|
||||
while (i4 < l4) {
|
||||
$pProperty = arr4[i4 += 1];
|
||||
var $sch = $pProperties[$pProperty];
|
||||
if (it.util.schemaHasRules($sch, it.RULES.all)) {
|
||||
if ((it.opts.strictKeywords ? typeof $sch == 'object' && Object.keys($sch).length > 0 : it.util.schemaHasRules($sch, it.RULES.all))) {
|
||||
$it.schema = $sch;
|
||||
$it.schemaPath = it.schemaPath + '.patternProperties' + it.util.getProperty($pProperty);
|
||||
$it.errSchemaPath = it.errSchemaPath + '/patternProperties/' + it.util.escapeFragment($pProperty);
|
||||
@@ -3627,7 +3666,7 @@ module.exports = function generate_properties(it, $keyword, $ruleType) {
|
||||
return out;
|
||||
}
|
||||
|
||||
},{}],33:[function(require,module,exports){
|
||||
},{}],34:[function(require,module,exports){
|
||||
'use strict';
|
||||
module.exports = function generate_propertyNames(it, $keyword, $ruleType) {
|
||||
var out = ' ';
|
||||
@@ -3644,7 +3683,7 @@ module.exports = function generate_propertyNames(it, $keyword, $ruleType) {
|
||||
$it.level++;
|
||||
var $nextValid = 'valid' + $it.level;
|
||||
out += 'var ' + ($errs) + ' = errors;';
|
||||
if (it.util.schemaHasRules($schema, it.RULES.all)) {
|
||||
if ((it.opts.strictKeywords ? typeof $schema == 'object' && Object.keys($schema).length > 0 : it.util.schemaHasRules($schema, it.RULES.all))) {
|
||||
$it.schema = $schema;
|
||||
$it.schemaPath = $schemaPath;
|
||||
$it.errSchemaPath = $errSchemaPath;
|
||||
@@ -3711,7 +3750,7 @@ module.exports = function generate_propertyNames(it, $keyword, $ruleType) {
|
||||
return out;
|
||||
}
|
||||
|
||||
},{}],34:[function(require,module,exports){
|
||||
},{}],35:[function(require,module,exports){
|
||||
'use strict';
|
||||
module.exports = function generate_ref(it, $keyword, $ruleType) {
|
||||
var out = ' ';
|
||||
@@ -3837,7 +3876,7 @@ module.exports = function generate_ref(it, $keyword, $ruleType) {
|
||||
return out;
|
||||
}
|
||||
|
||||
},{}],35:[function(require,module,exports){
|
||||
},{}],36:[function(require,module,exports){
|
||||
'use strict';
|
||||
module.exports = function generate_required(it, $keyword, $ruleType) {
|
||||
var out = ' ';
|
||||
@@ -3868,7 +3907,7 @@ module.exports = function generate_required(it, $keyword, $ruleType) {
|
||||
while (i1 < l1) {
|
||||
$property = arr1[i1 += 1];
|
||||
var $propertySch = it.schema.properties[$property];
|
||||
if (!($propertySch && it.util.schemaHasRules($propertySch, it.RULES.all))) {
|
||||
if (!($propertySch && (it.opts.strictKeywords ? typeof $propertySch == 'object' && Object.keys($propertySch).length > 0 : it.util.schemaHasRules($propertySch, it.RULES.all)))) {
|
||||
$required[$required.length] = $property;
|
||||
}
|
||||
}
|
||||
@@ -4109,7 +4148,7 @@ module.exports = function generate_required(it, $keyword, $ruleType) {
|
||||
return out;
|
||||
}
|
||||
|
||||
},{}],36:[function(require,module,exports){
|
||||
},{}],37:[function(require,module,exports){
|
||||
'use strict';
|
||||
module.exports = function generate_uniqueItems(it, $keyword, $ruleType) {
|
||||
var out = ' ';
|
||||
@@ -4197,7 +4236,7 @@ module.exports = function generate_uniqueItems(it, $keyword, $ruleType) {
|
||||
return out;
|
||||
}
|
||||
|
||||
},{}],37:[function(require,module,exports){
|
||||
},{}],38:[function(require,module,exports){
|
||||
'use strict';
|
||||
module.exports = function generate_validate(it, $keyword, $ruleType) {
|
||||
var out = '';
|
||||
@@ -4693,12 +4732,12 @@ module.exports = function generate_validate(it, $keyword, $ruleType) {
|
||||
return out;
|
||||
}
|
||||
|
||||
},{}],38:[function(require,module,exports){
|
||||
},{}],39:[function(require,module,exports){
|
||||
'use strict';
|
||||
|
||||
var IDENTIFIER = /^[a-z_$][a-z0-9_$-]*$/i;
|
||||
var customRuleCode = require('./dotjs/custom');
|
||||
var metaSchema = require('./refs/json-schema-draft-07.json');
|
||||
var definitionSchema = require('./definition_schema');
|
||||
|
||||
module.exports = {
|
||||
add: addKeyword,
|
||||
@@ -4707,38 +4746,6 @@ module.exports = {
|
||||
validate: validateKeyword
|
||||
};
|
||||
|
||||
var definitionSchema = {
|
||||
definitions: {
|
||||
simpleTypes: metaSchema.definitions.simpleTypes
|
||||
},
|
||||
type: 'object',
|
||||
dependencies: {
|
||||
schema: ['validate'],
|
||||
$data: ['validate'],
|
||||
statements: ['inline'],
|
||||
valid: {not: {required: ['macro']}}
|
||||
},
|
||||
properties: {
|
||||
type: metaSchema.properties.type,
|
||||
schema: {type: 'boolean'},
|
||||
statements: {type: 'boolean'},
|
||||
dependencies: {
|
||||
type: 'array',
|
||||
items: {type: 'string'}
|
||||
},
|
||||
metaSchema: {type: 'object'},
|
||||
modifying: {type: 'boolean'},
|
||||
valid: {type: 'boolean'},
|
||||
$data: {type: 'boolean'},
|
||||
async: {type: 'boolean'},
|
||||
errors: {
|
||||
anyOf: [
|
||||
{type: 'boolean'},
|
||||
{const: 'full'}
|
||||
]
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* Define custom keyword
|
||||
@@ -4873,7 +4880,7 @@ function validateKeyword(definition, throwError) {
|
||||
return false;
|
||||
}
|
||||
|
||||
},{"./dotjs/custom":21,"./refs/json-schema-draft-07.json":40}],39:[function(require,module,exports){
|
||||
},{"./definition_schema":12,"./dotjs/custom":22}],40:[function(require,module,exports){
|
||||
module.exports={
|
||||
"$schema": "http://json-schema.org/draft-07/schema#",
|
||||
"$id": "https://raw.githubusercontent.com/epoberezkin/ajv/master/lib/refs/data.json#",
|
||||
@@ -4892,7 +4899,7 @@ module.exports={
|
||||
"additionalProperties": false
|
||||
}
|
||||
|
||||
},{}],40:[function(require,module,exports){
|
||||
},{}],41:[function(require,module,exports){
|
||||
module.exports={
|
||||
"$schema": "http://json-schema.org/draft-07/schema#",
|
||||
"$id": "http://json-schema.org/draft-07/schema#",
|
||||
@@ -5062,24 +5069,21 @@ module.exports={
|
||||
"default": true
|
||||
}
|
||||
|
||||
},{}],41:[function(require,module,exports){
|
||||
},{}],42:[function(require,module,exports){
|
||||
'use strict';
|
||||
|
||||
var isArray = Array.isArray;
|
||||
var keyList = Object.keys;
|
||||
var hasProp = Object.prototype.hasOwnProperty;
|
||||
// do not edit .js files directly - edit src/index.jst
|
||||
|
||||
|
||||
|
||||
module.exports = function equal(a, b) {
|
||||
if (a === b) return true;
|
||||
|
||||
if (a && b && typeof a == 'object' && typeof b == 'object') {
|
||||
var arrA = isArray(a)
|
||||
, arrB = isArray(b)
|
||||
, i
|
||||
, length
|
||||
, key;
|
||||
if (a.constructor !== b.constructor) return false;
|
||||
|
||||
if (arrA && arrB) {
|
||||
var length, i, keys;
|
||||
if (Array.isArray(a)) {
|
||||
length = a.length;
|
||||
if (length != b.length) return false;
|
||||
for (i = length; i-- !== 0;)
|
||||
@@ -5087,39 +5091,33 @@ module.exports = function equal(a, b) {
|
||||
return true;
|
||||
}
|
||||
|
||||
if (arrA != arrB) return false;
|
||||
|
||||
var dateA = a instanceof Date
|
||||
, dateB = b instanceof Date;
|
||||
if (dateA != dateB) return false;
|
||||
if (dateA && dateB) return a.getTime() == b.getTime();
|
||||
|
||||
var regexpA = a instanceof RegExp
|
||||
, regexpB = b instanceof RegExp;
|
||||
if (regexpA != regexpB) return false;
|
||||
if (regexpA && regexpB) return a.toString() == b.toString();
|
||||
if (a.constructor === RegExp) return a.source === b.source && a.flags === b.flags;
|
||||
if (a.valueOf !== Object.prototype.valueOf) return a.valueOf() === b.valueOf();
|
||||
if (a.toString !== Object.prototype.toString) return a.toString() === b.toString();
|
||||
|
||||
var keys = keyList(a);
|
||||
keys = Object.keys(a);
|
||||
length = keys.length;
|
||||
|
||||
if (length !== keyList(b).length)
|
||||
return false;
|
||||
if (length !== Object.keys(b).length) return false;
|
||||
|
||||
for (i = length; i-- !== 0;)
|
||||
if (!hasProp.call(b, keys[i])) return false;
|
||||
if (!Object.prototype.hasOwnProperty.call(b, keys[i])) return false;
|
||||
|
||||
for (i = length; i-- !== 0;) {
|
||||
key = keys[i];
|
||||
var key = keys[i];
|
||||
|
||||
if (!equal(a[key], b[key])) return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
// true if both NaN, false otherwise
|
||||
return a!==a && b!==b;
|
||||
};
|
||||
|
||||
},{}],42:[function(require,module,exports){
|
||||
},{}],43:[function(require,module,exports){
|
||||
'use strict';
|
||||
|
||||
module.exports = function (data, opts) {
|
||||
@@ -5180,7 +5178,7 @@ module.exports = function (data, opts) {
|
||||
})(data);
|
||||
};
|
||||
|
||||
},{}],43:[function(require,module,exports){
|
||||
},{}],44:[function(require,module,exports){
|
||||
'use strict';
|
||||
|
||||
var traverse = module.exports = function (schema, opts, cb) {
|
||||
@@ -5271,7 +5269,7 @@ function escapeJsonPtr(str) {
|
||||
return str.replace(/~/g, '~0').replace(/\//g, '~1');
|
||||
}
|
||||
|
||||
},{}],44:[function(require,module,exports){
|
||||
},{}],45:[function(require,module,exports){
|
||||
/** @license URI.js v4.2.1 (c) 2011 Gary Court. License: http://github.com/garycourt/uri-js */
|
||||
(function (global, factory) {
|
||||
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) :
|
||||
@@ -7161,5 +7159,5 @@ function setLogger(self) {
|
||||
|
||||
function noop() {}
|
||||
|
||||
},{"./cache":1,"./compile":5,"./compile/async":2,"./compile/error_classes":3,"./compile/formats":4,"./compile/resolve":6,"./compile/rules":7,"./compile/schema_obj":8,"./compile/util":10,"./data":11,"./keyword":38,"./refs/data.json":39,"./refs/json-schema-draft-07.json":40,"fast-json-stable-stringify":42}]},{},[])("ajv")
|
||||
},{"./cache":1,"./compile":5,"./compile/async":2,"./compile/error_classes":3,"./compile/formats":4,"./compile/resolve":6,"./compile/rules":7,"./compile/schema_obj":8,"./compile/util":10,"./data":11,"./keyword":39,"./refs/data.json":40,"./refs/json-schema-draft-07.json":41,"fast-json-stable-stringify":43}]},{},[])("ajv")
|
||||
});
|
||||
|
Reference in New Issue
Block a user