mirror of
https://github.com/S2-/minifyfromhtml.git
synced 2025-08-03 04:10:04 +02:00
update node modules
This commit is contained in:
66
node_modules/ajv/lib/dot/validate.jst
generated
vendored
66
node_modules/ajv/lib/dot/validate.jst
generated
vendored
@@ -20,30 +20,23 @@
|
||||
, $id = it.self._getId(it.schema);
|
||||
}}
|
||||
|
||||
{{? it.isTop }}
|
||||
{{? $async }}
|
||||
{{
|
||||
it.async = true;
|
||||
var $es7 = it.opts.async == 'es7';
|
||||
it.yieldAwait = $es7 ? 'await' : 'yield';
|
||||
}}
|
||||
{{?}}
|
||||
{{
|
||||
if (it.opts.strictKeywords) {
|
||||
var $unknownKwd = it.util.schemaUnknownRules(it.schema, it.RULES.keywords);
|
||||
if ($unknownKwd) {
|
||||
var $keywordsMsg = 'unknown keyword: ' + $unknownKwd;
|
||||
if (it.opts.strictKeywords === 'log') it.logger.warn($keywordsMsg);
|
||||
else throw new Error($keywordsMsg);
|
||||
}
|
||||
}
|
||||
}}
|
||||
|
||||
var validate =
|
||||
{{? $async }}
|
||||
{{? $es7 }}
|
||||
(async function
|
||||
{{??}}
|
||||
{{? it.opts.async != '*'}}co.wrap{{?}}(function*
|
||||
{{?}}
|
||||
{{??}}
|
||||
(function
|
||||
{{? it.isTop }}
|
||||
var validate = {{?$async}}{{it.async = true;}}async {{?}}function(data, dataPath, parentData, parentDataProperty, rootData) {
|
||||
'use strict';
|
||||
{{? $id && (it.opts.sourceCode || it.opts.processCode) }}
|
||||
{{= '/\*# sourceURL=' + $id + ' */' }}
|
||||
{{?}}
|
||||
(data, dataPath, parentData, parentDataProperty, rootData) {
|
||||
'use strict';
|
||||
{{? $id && (it.opts.sourceCode || it.opts.processCode) }}
|
||||
{{= '/\*# sourceURL=' + $id + ' */' }}
|
||||
{{?}}
|
||||
{{?}}
|
||||
|
||||
{{? typeof it.schema == 'boolean' || !($refKeywords || it.schema.$ref) }}
|
||||
@@ -70,7 +63,7 @@
|
||||
{{?}}
|
||||
|
||||
{{? it.isTop}}
|
||||
});
|
||||
};
|
||||
return validate;
|
||||
{{?}}
|
||||
|
||||
@@ -89,6 +82,12 @@
|
||||
delete it.isTop;
|
||||
|
||||
it.dataPathArr = [undefined];
|
||||
|
||||
if (it.schema.default !== undefined && it.opts.useDefaults && it.opts.strictDefaults) {
|
||||
var $defaultMsg = 'default is ignored in the schema root';
|
||||
if (it.opts.strictDefaults === 'log') it.logger.warn($defaultMsg);
|
||||
else throw new Error($defaultMsg);
|
||||
}
|
||||
}}
|
||||
|
||||
var vErrors = null; {{ /* don't edit, used in replace */ }}
|
||||
@@ -118,6 +117,16 @@
|
||||
var $typeSchema = it.schema.type
|
||||
, $typeIsArray = Array.isArray($typeSchema);
|
||||
|
||||
if ($typeSchema && it.opts.nullable && it.schema.nullable === true) {
|
||||
if ($typeIsArray) {
|
||||
if ($typeSchema.indexOf('null') == -1)
|
||||
$typeSchema = $typeSchema.concat('null');
|
||||
} else if ($typeSchema != 'null') {
|
||||
$typeSchema = [$typeSchema, 'null'];
|
||||
$typeIsArray = true;
|
||||
}
|
||||
}
|
||||
|
||||
if ($typeIsArray && $typeSchema.length == 1) {
|
||||
$typeSchema = $typeSchema[0];
|
||||
$typeIsArray = false;
|
||||
@@ -145,6 +154,10 @@
|
||||
{{?}}
|
||||
{{?}}
|
||||
|
||||
{{? it.schema.$comment && it.opts.$comment }}
|
||||
{{= it.RULES.all.$comment.code(it, '$comment') }}
|
||||
{{?}}
|
||||
|
||||
{{? $typeSchema }}
|
||||
{{? it.opts.coerceTypes }}
|
||||
{{ var $coerceToTypes = it.util.coerceToTypes(it.opts.coerceTypes, $typeSchema); }}
|
||||
@@ -176,15 +189,12 @@
|
||||
{{ $closingBraces2 += '}'; }}
|
||||
{{?}}
|
||||
{{??}}
|
||||
{{? it.opts.v5 && it.schema.patternGroups }}
|
||||
{{ it.logger.warn('keyword "patternGroups" is deprecated and disabled. Use option patternGroups: true to enable.'); }}
|
||||
{{?}}
|
||||
{{~ it.RULES:$rulesGroup }}
|
||||
{{? $shouldUseGroup($rulesGroup) }}
|
||||
{{? $rulesGroup.type }}
|
||||
if ({{= it.util.checkDataType($rulesGroup.type, $data) }}) {
|
||||
{{?}}
|
||||
{{? it.opts.useDefaults && !it.compositeRule }}
|
||||
{{? it.opts.useDefaults }}
|
||||
{{? $rulesGroup.type == 'object' && it.schema.properties }}
|
||||
{{# def.defaultProperties }}
|
||||
{{?? $rulesGroup.type == 'array' && Array.isArray(it.schema.items) }}
|
||||
@@ -237,7 +247,7 @@
|
||||
validate.errors = vErrors; {{ /* don't edit, used in replace */ }}
|
||||
return errors === 0; {{ /* don't edit, used in replace */ }}
|
||||
{{?}}
|
||||
});
|
||||
};
|
||||
|
||||
return validate;
|
||||
{{??}}
|
||||
|
Reference in New Issue
Block a user