Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Alfakhori
M4labplatform
Commits
bf137ad8
Commit
bf137ad8
authored
Jan 04, 2021
by
Patrick
Browse files
CHANGES.md, README.md und 248 weitere dateien aktualisiert...
parent
0081cef7
Changes
250
Hide whitespace changes
Inline
Side-by-side
node_modules/har-validator/node_modules/ajv/lib/compile/resolve.js
View file @
bf137ad8
'
use strict
'
;
'
use strict
'
;
var
URI
=
require
(
'
ur
i-js
'
)
var
url
=
require
(
'
ur
l
'
)
,
equal
=
require
(
'
fast-deep-
equal
'
)
,
equal
=
require
(
'
./
equal
'
)
,
util
=
require
(
'
./util
'
)
,
util
=
require
(
'
./util
'
)
,
SchemaObject
=
require
(
'
./schema_obj
'
)
,
SchemaObject
=
require
(
'
./schema_obj
'
);
,
traverse
=
require
(
'
json-schema-traverse
'
);
module
.
exports
=
resolve
;
module
.
exports
=
resolve
;
...
@@ -48,7 +47,7 @@ function resolve(compile, root, ref) {
...
@@ -48,7 +47,7 @@ function resolve(compile, root, ref) {
if
(
schema
instanceof
SchemaObject
)
{
if
(
schema
instanceof
SchemaObject
)
{
v
=
schema
.
validate
||
compile
.
call
(
this
,
schema
.
schema
,
root
,
undefined
,
baseId
);
v
=
schema
.
validate
||
compile
.
call
(
this
,
schema
.
schema
,
root
,
undefined
,
baseId
);
}
else
if
(
schema
!==
undefined
)
{
}
else
if
(
schema
)
{
v
=
inlineRef
(
schema
,
this
.
_opts
.
inlineRefs
)
v
=
inlineRef
(
schema
,
this
.
_opts
.
inlineRefs
)
?
schema
?
schema
:
compile
.
call
(
this
,
schema
,
root
,
undefined
,
baseId
);
:
compile
.
call
(
this
,
schema
,
root
,
undefined
,
baseId
);
...
@@ -67,10 +66,10 @@ function resolve(compile, root, ref) {
...
@@ -67,10 +66,10 @@ function resolve(compile, root, ref) {
*/
*/
function
resolveSchema
(
root
,
ref
)
{
function
resolveSchema
(
root
,
ref
)
{
/* jshint validthis: true */
/* jshint validthis: true */
var
p
=
URI
.
parse
(
ref
)
var
p
=
url
.
parse
(
ref
,
false
,
true
)
,
refPath
=
_getFullPath
(
p
)
,
refPath
=
_getFullPath
(
p
)
,
baseId
=
getFullPath
(
this
.
_getId
(
root
.
schema
)
);
,
baseId
=
getFullPath
(
root
.
schema
.
id
);
if
(
Object
.
keys
(
root
.
schema
).
length
===
0
||
refPath
!==
baseId
)
{
if
(
refPath
!==
baseId
)
{
var
id
=
normalizeId
(
refPath
);
var
id
=
normalizeId
(
refPath
);
var
refVal
=
this
.
_refs
[
id
];
var
refVal
=
this
.
_refs
[
id
];
if
(
typeof
refVal
==
'
string
'
)
{
if
(
typeof
refVal
==
'
string
'
)
{
...
@@ -90,7 +89,7 @@ function resolveSchema(root, ref) {
...
@@ -90,7 +89,7 @@ function resolveSchema(root, ref) {
}
}
}
}
if
(
!
root
.
schema
)
return
;
if
(
!
root
.
schema
)
return
;
baseId
=
getFullPath
(
this
.
_getId
(
root
.
schema
)
);
baseId
=
getFullPath
(
root
.
schema
.
id
);
}
}
return
getJsonPointer
.
call
(
this
,
p
,
baseId
,
root
.
schema
,
root
);
return
getJsonPointer
.
call
(
this
,
p
,
baseId
,
root
.
schema
,
root
);
}
}
...
@@ -104,8 +103,7 @@ function resolveRecursive(root, ref, parsedRef) {
...
@@ -104,8 +103,7 @@ function resolveRecursive(root, ref, parsedRef) {
var
schema
=
res
.
schema
;
var
schema
=
res
.
schema
;
var
baseId
=
res
.
baseId
;
var
baseId
=
res
.
baseId
;
root
=
res
.
root
;
root
=
res
.
root
;
var
id
=
this
.
_getId
(
schema
);
if
(
schema
.
id
)
baseId
=
resolveUrl
(
baseId
,
schema
.
id
);
if
(
id
)
baseId
=
resolveUrl
(
baseId
,
id
);
return
getJsonPointer
.
call
(
this
,
parsedRef
,
baseId
,
schema
,
root
);
return
getJsonPointer
.
call
(
this
,
parsedRef
,
baseId
,
schema
,
root
);
}
}
}
}
...
@@ -115,33 +113,29 @@ var PREVENT_SCOPE_CHANGE = util.toHash(['properties', 'patternProperties', 'enum
...
@@ -115,33 +113,29 @@ var PREVENT_SCOPE_CHANGE = util.toHash(['properties', 'patternProperties', 'enum
/* @this Ajv */
/* @this Ajv */
function
getJsonPointer
(
parsedRef
,
baseId
,
schema
,
root
)
{
function
getJsonPointer
(
parsedRef
,
baseId
,
schema
,
root
)
{
/* jshint validthis: true */
/* jshint validthis: true */
parsedRef
.
fragment
=
parsedRef
.
fragment
||
''
;
parsedRef
.
hash
=
parsedRef
.
hash
||
''
;
if
(
parsedRef
.
fragment
.
slice
(
0
,
1
)
!=
'
/
'
)
return
;
if
(
parsedRef
.
hash
.
slice
(
0
,
2
)
!=
'
#
/
'
)
return
;
var
parts
=
parsedRef
.
fragment
.
split
(
'
/
'
);
var
parts
=
parsedRef
.
hash
.
split
(
'
/
'
);
for
(
var
i
=
1
;
i
<
parts
.
length
;
i
++
)
{
for
(
var
i
=
1
;
i
<
parts
.
length
;
i
++
)
{
var
part
=
parts
[
i
];
var
part
=
parts
[
i
];
if
(
part
)
{
if
(
part
)
{
part
=
util
.
unescapeFragment
(
part
);
part
=
util
.
unescapeFragment
(
part
);
schema
=
schema
[
part
];
schema
=
schema
[
part
];
if
(
schema
===
undefined
)
break
;
if
(
!
schema
)
break
;
var
id
;
if
(
schema
.
id
&&
!
PREVENT_SCOPE_CHANGE
[
part
])
baseId
=
resolveUrl
(
baseId
,
schema
.
id
);
if
(
!
PREVENT_SCOPE_CHANGE
[
part
])
{
if
(
schema
.
$ref
)
{
id
=
this
.
_getId
(
schema
);
var
$ref
=
resolveUrl
(
baseId
,
schema
.
$ref
);
if
(
id
)
baseId
=
resolveUrl
(
baseId
,
id
);
var
res
=
resolveSchema
.
call
(
this
,
root
,
$ref
);
if
(
schema
.
$ref
)
{
if
(
res
)
{
var
$ref
=
resolveUrl
(
baseId
,
schema
.
$ref
);
schema
=
res
.
schema
;
var
res
=
resolveSchema
.
call
(
this
,
root
,
$ref
);
root
=
res
.
root
;
if
(
res
)
{
baseId
=
res
.
baseId
;
schema
=
res
.
schema
;
root
=
res
.
root
;
baseId
=
res
.
baseId
;
}
}
}
}
}
}
}
}
}
if
(
schema
!==
undefined
&&
schema
!=
=
root
.
schema
)
if
(
schema
&&
schema
!=
root
.
schema
)
return
{
schema
:
schema
,
root
:
root
,
baseId
:
baseId
};
return
{
schema
:
schema
,
root
:
root
,
baseId
:
baseId
};
}
}
...
@@ -206,13 +200,14 @@ function countKeys(schema) {
...
@@ -206,13 +200,14 @@ function countKeys(schema) {
function
getFullPath
(
id
,
normalize
)
{
function
getFullPath
(
id
,
normalize
)
{
if
(
normalize
!==
false
)
id
=
normalizeId
(
id
);
if
(
normalize
!==
false
)
id
=
normalizeId
(
id
);
var
p
=
URI
.
parse
(
id
);
var
p
=
url
.
parse
(
id
,
false
,
true
);
return
_getFullPath
(
p
);
return
_getFullPath
(
p
);
}
}
function
_getFullPath
(
p
)
{
function
_getFullPath
(
p
)
{
return
URI
.
serialize
(
p
).
split
(
'
#
'
)[
0
]
+
'
#
'
;
var
protocolSeparator
=
p
.
protocol
||
p
.
href
.
slice
(
0
,
2
)
==
'
//
'
?
'
//
'
:
''
;
return
(
p
.
protocol
||
''
)
+
protocolSeparator
+
(
p
.
host
||
''
)
+
(
p
.
path
||
''
)
+
'
#
'
;
}
}
...
@@ -224,47 +219,49 @@ function normalizeId(id) {
...
@@ -224,47 +219,49 @@ function normalizeId(id) {
function
resolveUrl
(
baseId
,
id
)
{
function
resolveUrl
(
baseId
,
id
)
{
id
=
normalizeId
(
id
);
id
=
normalizeId
(
id
);
return
URI
.
resolve
(
baseId
,
id
);
return
url
.
resolve
(
baseId
,
id
);
}
}
/* @this Ajv */
/* @this Ajv */
function
resolveIds
(
schema
)
{
function
resolveIds
(
schema
)
{
var
schemaId
=
normalizeId
(
this
.
_getId
(
schema
));
/* eslint no-shadow: 0 */
var
baseIds
=
{
''
:
schemaId
};
/* jshint validthis: true */
var
fullPaths
=
{
''
:
getFullPath
(
schemaId
,
false
)}
;
var
id
=
normalizeId
(
schema
.
id
)
;
var
localRefs
=
{};
var
localRefs
=
{};
var
self
=
this
;
_resolveIds
.
call
(
this
,
schema
,
getFullPath
(
id
,
false
),
id
);
return
localRefs
;
traverse
(
schema
,
{
allKeys
:
true
},
function
(
sch
,
jsonPtr
,
rootSchema
,
parentJsonPtr
,
parentKeyword
,
parentSchema
,
keyIndex
)
{
if
(
jsonPtr
===
''
)
return
;
/* @this Ajv */
var
id
=
self
.
_getId
(
sch
);
function
_resolveIds
(
schema
,
fullPath
,
baseId
)
{
var
baseId
=
baseIds
[
parentJsonPtr
];
/* jshint validthis: true */
var
fullPath
=
fullPaths
[
parentJsonPtr
]
+
'
/
'
+
parentKeyword
;
if
(
Array
.
isArray
(
schema
))
{
if
(
keyIndex
!==
undefined
)
for
(
var
i
=
0
;
i
<
schema
.
length
;
i
++
)
fullPath
+=
'
/
'
+
(
typeof
keyIndex
==
'
number
'
?
keyIndex
:
util
.
escapeFragment
(
keyIndex
));
_resolveIds
.
call
(
this
,
schema
[
i
],
fullPath
+
'
/
'
+
i
,
baseId
);
}
else
if
(
schema
&&
typeof
schema
==
'
object
'
)
{
if
(
typeof
id
==
'
string
'
)
{
if
(
typeof
schema
.
id
==
'
string
'
)
{
id
=
baseId
=
normalizeId
(
baseId
?
URI
.
resolve
(
baseId
,
id
)
:
id
);
var
id
=
baseId
=
baseId
?
url
.
resolve
(
baseId
,
schema
.
id
)
var
refVal
=
self
.
_refs
[
id
];
:
schema
.
id
;
if
(
typeof
refVal
==
'
string
'
)
refVal
=
self
.
_refs
[
refVal
];
id
=
normalizeId
(
id
);
if
(
refVal
&&
refVal
.
schema
)
{
if
(
!
equal
(
sch
,
refVal
.
schema
))
var
refVal
=
this
.
_refs
[
id
];
throw
new
Error
(
'
id "
'
+
id
+
'
" resolves to more than one schema
'
);
if
(
typeof
refVal
==
'
string
'
)
refVal
=
this
.
_refs
[
refVal
];
}
else
if
(
id
!=
normalizeId
(
fullPath
))
{
if
(
refVal
&&
refVal
.
schema
)
{
if
(
id
[
0
]
==
'
#
'
)
{
if
(
!
equal
(
schema
,
refVal
.
schema
))
if
(
localRefs
[
id
]
&&
!
equal
(
sch
,
localRefs
[
id
]))
throw
new
Error
(
'
id "
'
+
id
+
'
" resolves to more than one schema
'
);
throw
new
Error
(
'
id "
'
+
id
+
'
" resolves to more than one schema
'
);
localRefs
[
id
]
=
sch
;
}
else
if
(
id
!=
normalizeId
(
fullPath
))
{
}
else
{
if
(
id
[
0
]
==
'
#
'
)
{
self
.
_refs
[
id
]
=
fullPath
;
if
(
localRefs
[
id
]
&&
!
equal
(
schema
,
localRefs
[
id
]))
throw
new
Error
(
'
id "
'
+
id
+
'
" resolves to more than one schema
'
);
localRefs
[
id
]
=
schema
;
}
else
{
this
.
_refs
[
id
]
=
fullPath
;
}
}
}
}
}
for
(
var
key
in
schema
)
_resolveIds
.
call
(
this
,
schema
[
key
],
fullPath
+
'
/
'
+
util
.
escapeFragment
(
key
),
baseId
);
}
}
baseIds
[
jsonPtr
]
=
baseId
;
}
fullPaths
[
jsonPtr
]
=
fullPath
;
});
return
localRefs
;
}
}
node_modules/har-validator/node_modules/ajv/lib/compile/rules.js
View file @
bf137ad8
'
use strict
'
;
'
use strict
'
;
var
ruleModules
=
require
(
'
.
./dotj
s
'
)
var
ruleModules
=
require
(
'
.
/_rule
s
'
)
,
toHash
=
require
(
'
./util
'
).
toHash
;
,
toHash
=
require
(
'
./util
'
).
toHash
;
module
.
exports
=
function
rules
()
{
module
.
exports
=
function
rules
()
{
var
RULES
=
[
var
RULES
=
[
{
type
:
'
number
'
,
{
type
:
'
number
'
,
rules
:
[
{
'
maximum
'
:
[
'
exclusiveMaximum
'
]
},
rules
:
[
'
maximum
'
,
'
minimum
'
,
'
multipleOf
'
]
},
{
'
minimum
'
:
[
'
exclusiveMinimum
'
]
},
'
multipleOf
'
,
'
format
'
]
},
{
type
:
'
string
'
,
{
type
:
'
string
'
,
rules
:
[
'
maxLength
'
,
'
minLength
'
,
'
pattern
'
,
'
format
'
]
},
rules
:
[
'
maxLength
'
,
'
minLength
'
,
'
pattern
'
,
'
format
'
]
},
{
type
:
'
array
'
,
{
type
:
'
array
'
,
rules
:
[
'
maxItems
'
,
'
minItems
'
,
'
i
tems
'
,
'
contains
'
,
'
uniqueI
tems
'
]
},
rules
:
[
'
maxItems
'
,
'
minItems
'
,
'
uniqueI
tems
'
,
'
i
tems
'
]
},
{
type
:
'
object
'
,
{
type
:
'
object
'
,
rules
:
[
'
maxProperties
'
,
'
minProperties
'
,
'
required
'
,
'
dependencies
'
,
'
propertyNames
'
,
rules
:
[
'
maxProperties
'
,
'
minProperties
'
,
'
required
'
,
'
dependencies
'
,
'
properties
'
]
},
{
'
properties
'
:
[
'
additionalProperties
'
,
'
patternProperties
'
]
}
]
},
{
rules
:
[
'
$ref
'
,
'
enum
'
,
'
not
'
,
'
anyOf
'
,
'
oneOf
'
,
'
allOf
'
]
}
{
rules
:
[
'
$ref
'
,
'
const
'
,
'
enum
'
,
'
not
'
,
'
anyOf
'
,
'
oneOf
'
,
'
allOf
'
,
'
if
'
]
}
];
];
var
ALL
=
[
'
type
'
,
'
$comment
'
];
var
ALL
=
[
'
type
'
,
'
additionalProperties
'
,
'
patternProperties
'
];
var
KEYWORDS
=
[
var
KEYWORDS
=
[
'
additionalItems
'
,
'
$schema
'
,
'
id
'
,
'
title
'
,
'
description
'
,
'
default
'
];
'
$schema
'
,
'
$id
'
,
'
id
'
,
'
$data
'
,
'
$async
'
,
'
title
'
,
'
description
'
,
'
default
'
,
'
definitions
'
,
'
examples
'
,
'
readOnly
'
,
'
writeOnly
'
,
'
contentMediaType
'
,
'
contentEncoding
'
,
'
additionalItems
'
,
'
then
'
,
'
else
'
];
var
TYPES
=
[
'
number
'
,
'
integer
'
,
'
string
'
,
'
array
'
,
'
object
'
,
'
boolean
'
,
'
null
'
];
var
TYPES
=
[
'
number
'
,
'
integer
'
,
'
string
'
,
'
array
'
,
'
object
'
,
'
boolean
'
,
'
null
'
];
RULES
.
all
=
toHash
(
ALL
);
RULES
.
all
=
toHash
(
ALL
);
RULES
.
types
=
toHash
(
TYPES
);
RULES
.
forEach
(
function
(
group
)
{
RULES
.
forEach
(
function
(
group
)
{
group
.
rules
=
group
.
rules
.
map
(
function
(
keyword
)
{
group
.
rules
=
group
.
rules
.
map
(
function
(
keyword
)
{
var
implKeywords
;
if
(
typeof
keyword
==
'
object
'
)
{
var
key
=
Object
.
keys
(
keyword
)[
0
];
implKeywords
=
keyword
[
key
];
keyword
=
key
;
implKeywords
.
forEach
(
function
(
k
)
{
ALL
.
push
(
k
);
RULES
.
all
[
k
]
=
true
;
});
}
ALL
.
push
(
keyword
);
ALL
.
push
(
keyword
);
var
rule
=
RULES
.
all
[
keyword
]
=
{
var
rule
=
RULES
.
all
[
keyword
]
=
{
keyword
:
keyword
,
keyword
:
keyword
,
code
:
ruleModules
[
keyword
],
code
:
ruleModules
[
keyword
]
implements
:
implKeywords
};
};
return
rule
;
return
rule
;
});
});
RULES
.
all
.
$comment
=
{
keyword
:
'
$comment
'
,
code
:
ruleModules
.
$comment
};
if
(
group
.
type
)
RULES
.
types
[
group
.
type
]
=
group
;
});
});
RULES
.
keywords
=
toHash
(
ALL
.
concat
(
KEYWORDS
));
RULES
.
keywords
=
toHash
(
ALL
.
concat
(
KEYWORDS
));
RULES
.
types
=
toHash
(
TYPES
);
RULES
.
custom
=
{};
RULES
.
custom
=
{};
return
RULES
;
return
RULES
;
...
...
node_modules/har-validator/node_modules/ajv/lib/compile/util.js
View file @
bf137ad8
...
@@ -9,21 +9,19 @@ module.exports = {
...
@@ -9,21 +9,19 @@ module.exports = {
toHash
:
toHash
,
toHash
:
toHash
,
getProperty
:
getProperty
,
getProperty
:
getProperty
,
escapeQuotes
:
escapeQuotes
,
escapeQuotes
:
escapeQuotes
,
equal
:
require
(
'
fast-deep-equal
'
),
ucs2length
:
require
(
'
./ucs2length
'
),
ucs2length
:
require
(
'
./ucs2length
'
),
varOccurences
:
varOccurences
,
varOccurences
:
varOccurences
,
varReplace
:
varReplace
,
varReplace
:
varReplace
,
cleanUpCode
:
cleanUpCode
,
cleanUpCode
:
cleanUpCode
,
finalCleanUpCode
:
finalCleanUpCode
,
cleanUpVarErrors
:
cleanUpVarErrors
,
schemaHasRules
:
schemaHasRules
,
schemaHasRules
:
schemaHasRules
,
schemaHasRulesExcept
:
schemaHasRulesExcept
,
schemaHasRulesExcept
:
schemaHasRulesExcept
,
s
chemaUnknownRules
:
schemaUnknownRules
,
s
tableStringify
:
require
(
'
json-stable-stringify
'
)
,
toQuotedString
:
toQuotedString
,
toQuotedString
:
toQuotedString
,
getPathExpr
:
getPathExpr
,
getPathExpr
:
getPathExpr
,
getPath
:
getPath
,
getPath
:
getPath
,
getData
:
getData
,
getData
:
getData
,
unescapeFragment
:
unescapeFragment
,
unescapeFragment
:
unescapeFragment
,
unescapeJsonPointer
:
unescapeJsonPointer
,
escapeFragment
:
escapeFragment
,
escapeFragment
:
escapeFragment
,
escapeJsonPointer
:
escapeJsonPointer
escapeJsonPointer
:
escapeJsonPointer
};
};
...
@@ -146,50 +144,35 @@ function cleanUpCode(out) {
...
@@ -146,50 +144,35 @@ function cleanUpCode(out) {
}
}
var
ERRORS_REGEXP
=
/
[^
v.
]
errors/g
var
ERRORS_REGEXP
=
/
[^
v
\
.]
errors/g
,
REMOVE_ERRORS
=
/var errors = 0;|var vErrors = null;|validate.errors = vErrors;/g
,
REMOVE_ERRORS
=
/var errors = 0;|var vErrors = null;|validate.errors = vErrors;/g
,
REMOVE_ERRORS_ASYNC
=
/var errors = 0;|var vErrors = null;/g
,
REMOVE_ERRORS_ASYNC
=
/var errors = 0;|var vErrors = null;/g
,
RETURN_VALID
=
'
return errors === 0;
'
,
RETURN_VALID
=
'
return errors === 0;
'
,
RETURN_TRUE
=
'
validate.errors = null; return true;
'
,
RETURN_TRUE
=
'
validate.errors = null; return true;
'
,
RETURN_ASYNC
=
/if
\(
errors === 0
\)
return data;
\s
*else throw new ValidationError
\(
vErrors
\)
;/
,
RETURN_ASYNC
=
/if
\(
errors === 0
\)
return true;
\s
*else throw new ValidationError
\(
vErrors
\)
;/
,
RETURN_DATA_ASYNC
=
'
return data;
'
,
RETURN_TRUE_ASYNC
=
'
return true;
'
;
,
ROOTDATA_REGEXP
=
/
[^
A-Za-z_$
]
rootData
[^
A-Za-z0-9_$
]
/g
,
REMOVE_ROOTDATA
=
/if
\(
rootData === undefined
\)
rootData = data;/
;
function
finalCleanUpCode
(
out
,
async
)
{
function
cleanUpVarErrors
(
out
,
async
)
{
var
matches
=
out
.
match
(
ERRORS_REGEXP
);
var
matches
=
out
.
match
(
ERRORS_REGEXP
);
if
(
matches
&&
matches
.
length
==
2
)
{
if
(
!
matches
||
matches
.
length
!
==
2
)
return
out
;
out
=
async
return
async
?
out
.
replace
(
REMOVE_ERRORS_ASYNC
,
''
)
?
out
.
replace
(
REMOVE_ERRORS_ASYNC
,
''
)
.
replace
(
RETURN_ASYNC
,
RETURN_
DATA
_ASYNC
)
.
replace
(
RETURN_ASYNC
,
RETURN_
TRUE
_ASYNC
)
:
out
.
replace
(
REMOVE_ERRORS
,
''
)
:
out
.
replace
(
REMOVE_ERRORS
,
''
)
.
replace
(
RETURN_VALID
,
RETURN_TRUE
);
.
replace
(
RETURN_VALID
,
RETURN_TRUE
);
}
matches
=
out
.
match
(
ROOTDATA_REGEXP
);
if
(
!
matches
||
matches
.
length
!==
3
)
return
out
;
return
out
.
replace
(
REMOVE_ROOTDATA
,
''
);
}
}
function
schemaHasRules
(
schema
,
rules
)
{
function
schemaHasRules
(
schema
,
rules
)
{
if
(
typeof
schema
==
'
boolean
'
)
return
!
schema
;
for
(
var
key
in
schema
)
if
(
rules
[
key
])
return
true
;
for
(
var
key
in
schema
)
if
(
rules
[
key
])
return
true
;
}
}
function
schemaHasRulesExcept
(
schema
,
rules
,
exceptKeyword
)
{
function
schemaHasRulesExcept
(
schema
,
rules
,
exceptKeyword
)
{
if
(
typeof
schema
==
'
boolean
'
)
return
!
schema
&&
exceptKeyword
!=
'
not
'
;
for
(
var
key
in
schema
)
if
(
key
!=
exceptKeyword
&&
rules
[
key
])
return
true
;
for
(
var
key
in
schema
)
if
(
key
!=
exceptKeyword
&&
rules
[
key
])
return
true
;
}
}
function
schemaUnknownRules
(
schema
,
rules
)
{
if
(
typeof
schema
==
'
boolean
'
)
return
;
for
(
var
key
in
schema
)
if
(
!
rules
[
key
])
return
key
;
}
function
toQuotedString
(
str
)
{
function
toQuotedString
(
str
)
{
return
'
\'
'
+
escapeQuotes
(
str
)
+
'
\'
'
;
return
'
\'
'
+
escapeQuotes
(
str
)
+
'
\'
'
;
}
}
...
...
node_modules/har-validator/node_modules/ajv/lib/data.js
deleted
100644 → 0
View file @
0081cef7
'
use strict
'
;
var
KEYWORDS
=
[
'
multipleOf
'
,
'
maximum
'
,
'
exclusiveMaximum
'
,
'
minimum
'
,
'
exclusiveMinimum
'
,
'
maxLength
'
,
'
minLength
'
,
'
pattern
'
,
'
additionalItems
'
,
'
maxItems
'
,
'
minItems
'
,
'
uniqueItems
'
,
'
maxProperties
'
,
'
minProperties
'
,
'
required
'
,
'
additionalProperties
'
,
'
enum
'
,
'
format
'
,
'
const
'
];
module
.
exports
=
function
(
metaSchema
,
keywordsJsonPointers
)
{
for
(
var
i
=
0
;
i
<
keywordsJsonPointers
.
length
;
i
++
)
{
metaSchema
=
JSON
.
parse
(
JSON
.
stringify
(
metaSchema
));
var
segments
=
keywordsJsonPointers
[
i
].
split
(
'
/
'
);
var
keywords
=
metaSchema
;
var
j
;
for
(
j
=
1
;
j
<
segments
.
length
;
j
++
)
keywords
=
keywords
[
segments
[
j
]];
for
(
j
=
0
;
j
<
KEYWORDS
.
length
;
j
++
)
{
var
key
=
KEYWORDS
[
j
];
var
schema
=
keywords
[
key
];
if
(
schema
)
{
keywords
[
key
]
=
{
anyOf
:
[
schema
,
{
$ref
:
'
https://raw.githubusercontent.com/epoberezkin/ajv/master/lib/refs/data.json#
'
}
]
};
}
}
}
return
metaSchema
;
};
node_modules/har-validator/node_modules/ajv/lib/definition_schema.js
deleted
100644 → 0
View file @
0081cef7
'
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
'
}
]
}
}
};
node_modules/har-validator/node_modules/ajv/lib/dot/_limit.jst
View file @
bf137ad8
...
@@ -3,102 +3,47 @@
...
@@ -3,102 +3,47 @@
{{# def.setupKeyword }}
{{# def.setupKeyword }}
{{# def.$data }}
{{# def.$data }}
{{## def.setExclusiveLimit:
$exclusive = true;
$errorKeyword = $exclusiveKeyword;
$errSchemaPath = it.errSchemaPath + '/' + $exclusiveKeyword;
#}}
{{
{{
var $isMax = $keyword == 'maximum'
var $isMax = $keyword == 'maximum'
, $exclusiveKeyword = $isMax ? 'exclusiveMaximum' : 'exclusiveMinimum'
, $exclusiveKeyword = $isMax ? 'exclusiveMaximum' : 'exclusiveMinimum'
, $schemaExcl = it.schema[$exclusiveKeyword]
, $schemaExcl = it.schema[$exclusiveKeyword]
, $isDataExcl = it.opts.
$data
&& $schemaExcl && $schemaExcl.$data
, $isDataExcl = it.opts.
v5
&& $schemaExcl && $schemaExcl.$data
, $op = $isMax ? '<' : '>'
, $op = $isMax ? '<' : '>'
, $notOp = $isMax ? '>' : '<'
, $notOp = $isMax ? '>' : '<';
, $errorKeyword = undefined;
}}
}}
{{? $isDataExcl }}
{{? $isDataExcl }}
{{
{{
var $schemaValueExcl = it.util.getData($schemaExcl.$data, $dataLvl, it.dataPathArr)
var $schemaValueExcl = it.util.getData($schemaExcl.$data, $dataLvl, it.dataPathArr)
, $exclusive = 'exclusive' + $lvl
, $exclusive = 'exclusive' + $lvl
, $exclType = 'exclType' + $lvl
, $exclIsNumber = 'exclIsNumber' + $lvl
, $opExpr = 'op' + $lvl
, $opExpr = 'op' + $lvl
, $opStr = '\' + ' + $opExpr + ' + \'';
, $opStr = '\' + ' + $opExpr + ' + \'';
}}
}}
var schemaExcl{{=$lvl}} = {{=$schemaValueExcl}};
var schemaExcl{{=$lvl}} = {{=$schemaValueExcl}};
{{ $schemaValueExcl = 'schemaExcl' + $lvl; }}
{{ $schemaValueExcl = 'schemaExcl' + $lvl; }}
var {{=$exclusive}};
var exclusive{{=$lvl}};
var {{=$exclType}} = typeof {{=$schemaValueExcl}};
if (typeof {{=$schemaValueExcl}} != 'boolean' && typeof {{=$schemaValueExcl}} != 'undefined') {
if ({{=$exclType}} != 'boolean' && {{=$exclType}} != 'undefined' && {{=$exclType}} != 'number') {
{{ var $errorKeyword = $exclusiveKeyword; }}
{{ var $errorKeyword = $exclusiveKeyword; }}
{{# def.error:'_exclusiveLimit' }}
{{# def.error:'_exclusiveLimit' }}
} else if ({{# def.$dataNotType:'number' }}
} else if({{# def.$dataNotType:'number' }}
{{=$exclType}} == 'number'
((exclusive{{=$lvl}} = {{=$schemaValueExcl}} === true)
? (
? {{=$data}} {{=$notOp}}= {{=$schemaValue}}
({{=$exclusive}} = {{=$schemaValue}} === undefined || {{=$schemaValueExcl}} {{=$op}}= {{=$schemaValue}})
: {{=$data}} {{=$notOp}} {{=$schemaValue}})
? {{=$data}} {{=$notOp}}= {{=$schemaValueExcl}}
: {{=$data}} {{=$notOp}} {{=$schemaValue}}
)
: (
({{=$exclusive}} = {{=$schemaValueExcl}} === true)
? {{=$data}} {{=$notOp}}= {{=$schemaValue}}
: {{=$data}} {{=$notOp}} {{=$schemaValue}}
)
|| {{=$data}} !== {{=$data}}) {
|| {{=$data}} !== {{=$data}}) {
var op{{=$lvl}} = {{=$exclusive}} ? '{{=$op}}' : '{{=$op}}=';
var op{{=$lvl}} = exclusive{{=$lvl}} ? '{{=$op}}' : '{{=$op}}=';
{{
if ($schema === undefined) {
$errorKeyword = $exclusiveKeyword;
$errSchemaPath = it.errSchemaPath + '/' + $exclusiveKeyword;
$schemaValue = $schemaValueExcl;
$isData = $isDataExcl;
}
}}
{{??}}
{{??}}
{{
{{
var $excl
IsNumber = typeof
$schemaExcl ==
'number'
var $excl
usive =
$schemaExcl ==
= true
, $opStr = $op; /*used in error*/
, $opStr = $op; /*used in error*/
if (!$exclusive) $opStr += '=';
var $opExpr = '\'' + $opStr + '\''; /*used in error*/
}}
}}
{{? $exclIsNumber && $isData }}
if ({{# def.$dataNotType:'number' }}
{{ var $opExpr = '\'' + $opStr + '\''; /*used in error*/ }}
{{=$data}} {{=$notOp}}{{?$exclusive}}={{?}} {{=$schemaValue}}
if ({{# def.$dataNotType:'number' }}
|| {{=$data}} !== {{=$data}}) {
( {{=$schemaValue}} === undefined
|| {{=$schemaExcl}} {{=$op}}= {{=$schemaValue}}
? {{=$data}} {{=$notOp}}= {{=$schemaExcl}}
: {{=$data}} {{=$notOp}} {{=$schemaValue}} )
|| {{=$data}} !== {{=$data}}) {
{{??}}
{{
if ($exclIsNumber && $schema === undefined) {
{{# def.setExclusiveLimit }}
$schemaValue = $schemaExcl;
$notOp += '=';
} else {
if ($exclIsNumber)
$schemaValue = Math[$isMax ? 'min' : 'max']($schemaExcl, $schema);
if ($schemaExcl === ($exclIsNumber ? $schemaValue : true)) {
{{# def.setExclusiveLimit }}
$notOp += '=';
} else {
$exclusive = false;
$opStr += '=';
}
}
var $opExpr = '\'' + $opStr + '\''; /*used in error*/
}}
if ({{# def.$dataNotType:'number' }}
{{=$data}} {{=$notOp}} {{=$schemaValue}}
|| {{=$data}} !== {{=$data}}) {
{{?}}
{{?}}
{{?}}
{{
$errorKeyword =
$errorKeyword
||
$keyword; }}
{{
var
$errorKeyword
=
$keyword; }}
{{# def.error:'_limit' }}
{{# def.error:'_limit' }}
} {{? $breakOnError }} else { {{?}}
} {{? $breakOnError }} else { {{?}}
node_modules/har-validator/node_modules/ajv/lib/dot/anyOf.jst
View file @
bf137ad8
...
@@ -35,7 +35,7 @@
...
@@ -35,7 +35,7 @@
{{= $closingBraces }}
{{= $closingBraces }}
if (!{{=$valid}}) {
if (!{{=$valid}}) {
{{# def.
extra
Error:'anyOf' }}
{{# def.
add
Error:'anyOf' }}
} else {
} else {
{{# def.resetErrors }}
{{# def.resetErrors }}
{{? it.opts.allErrors }} } {{?}}
{{? it.opts.allErrors }} } {{?}}
...
...
node_modules/har-validator/node_modules/ajv/lib/dot/comment.jst
deleted
100644 → 0
View file @
0081cef7
{{# def.definitions }}
{{# def.setupKeyword }}
{{ var $comment = it.util.toQuotedString($schema); }}
{{? it.opts.$comment === true }}
console.log({{=$comment}});
{{?? typeof it.opts.$comment == 'function' }}
self._opts.$comment({{=$comment}}, {{=it.util.toQuotedString($errSchemaPath)}}, validate.root.schema);
{{?}}
node_modules/har-validator/node_modules/ajv/lib/dot/const.jst
deleted
100644 → 0
View file @
0081cef7
{{# def.definitions }}
{{# def.errors }}
{{# def.setupKeyword }}
{{# def.$data }}
{{? !$isData }}
var schema{{=$lvl}} = validate.schema{{=$schemaPath}};
{{?}}
var {{=$valid}} = equal({{=$data}}, schema{{=$lvl}});
{{# def.checkError:'const' }}
{{? $breakOnError }} else { {{?}}
node_modules/har-validator/node_modules/ajv/lib/dot/contains.jst
deleted
100644 → 0
View file @
0081cef7
{{# def.definitions }}
{{# def.errors }}
{{# def.setupKeyword }}
{{# def.setupNextLevel }}
{{
var $idx = 'i' + $lvl
, $dataNxt = $it.dataLevel = it.dataLevel + 1
, $nextData = 'data' + $dataNxt
, $currentBaseId = it.baseId
, $nonEmptySchema = {{# def.nonEmptySchema:$schema }};
}}
var {{=$errs}} = errors;
var {{=$valid}};
{{? $nonEmptySchema }}
{{# def.setCompositeRule }}
{{
$it.schema = $schema;
$it.schemaPath = $schemaPath;
$it.errSchemaPath = $errSchemaPath;
}}
var {{=$nextValid}} = false;
for (var {{=$idx}} = 0; {{=$idx}} < {{=$data}}.length; {{=$idx}}++) {
{{
$it.errorPath = it.util.getPathExpr(it.errorPath, $idx, it.opts.jsonPointers, true);
var $passData = $data + '[' + $idx + ']';
$it.dataPathArr[$dataNxt] = $idx;
}}
{{# def.generateSubschemaCode }}
{{# def.optimizeValidate }}
if ({{=$nextValid}}) break;
}
{{# def.resetCompositeRule }}
{{= $closingBraces }}
if (!{{=$nextValid}}) {
{{??}}
if ({{=$data}}.length == 0) {
{{?}}
{{# def.error:'contains' }}
} else {
{{? $nonEmptySchema }}
{{# def.resetErrors }}
{{?}}
{{? it.opts.allErrors }} } {{?}}
{{# def.cleanUp }}
node_modules/har-validator/node_modules/ajv/lib/dot/custom.jst
View file @
bf137ad8
...
@@ -6,8 +6,7 @@
...
@@ -6,8 +6,7 @@
{{
{{
var $rule = this
var $rule = this
, $definition = 'definition' + $lvl
, $definition = 'definition' + $lvl
, $rDef = $rule.definition
, $rDef = $rule.definition;
, $closingBraces = '';
var $validate = $rDef.validate;
var $validate = $rDef.validate;
var $compile, $inline, $macro, $ruleValidate, $validateCode;
var $compile, $inline, $macro, $ruleValidate, $validateCode;
}}
}}
...
@@ -22,7 +21,6 @@
...
@@ -22,7 +21,6 @@
{{??}}
{{??}}
{{
{{
$ruleValidate = it.useCustomRule($rule, $schema, it.schema, it);
$ruleValidate = it.useCustomRule($rule, $schema, it.schema, it);
if (!$ruleValidate) return;
$schemaValue = 'validate.schema' + $schemaPath;
$schemaValue = 'validate.schema' + $schemaPath;
$validateCode = $ruleValidate.code;
$validateCode = $ruleValidate.code;
$compile = $rDef.compile;
$compile = $rDef.compile;
...
@@ -78,16 +76,9 @@ var {{=$valid}};
...
@@ -78,16 +76,9 @@ var {{=$valid}};
#}}
#}}
{{? $isData && $rDef.$data }}
{{? $validateSchema }}
{{ $closingBraces += '}'; }}
{{=$valid}} = {{=$definition}}.validateSchema({{=$schemaValue}});
if ({{=$schemaValue}} === undefined) {
if ({{=$valid}}) {
{{=$valid}} = true;
} else {
{{? $validateSchema }}
{{ $closingBraces += '}'; }}
{{=$valid}} = {{=$definition}}.validateSchema({{=$schemaValue}});
if ({{=$valid}}) {
{{?}}
{{?}}
{{?}}
{{? $inline }}
{{? $inline }}
...
@@ -112,13 +103,13 @@ var {{=$valid}};
...
@@ -112,13 +103,13 @@ var {{=$valid}};
{{# def.storeDefOut:def_callRuleValidate }}
{{# def.storeDefOut:def_callRuleValidate }}
{{? $rDef.errors === false }}
{{? $rDef.errors === false }}
{{=$valid}} = {{? $asyncKeyword }}
a
wait
{{?}}{{= def_callRuleValidate }};
{{=$valid}} = {{? $asyncKeyword }}
{{=it.yieldA
wait
}}
{{?}}{{= def_callRuleValidate }};
{{??}}
{{??}}
{{? $asyncKeyword }}
{{? $asyncKeyword }}
{{ $ruleErrs = 'customErrors' + $lvl; }}
{{ $ruleErrs = 'customErrors' + $lvl; }}
var {{=$ruleErrs}} = null;
var {{=$ruleErrs}} = null;
try {
try {
{{=$valid}} =
a
wait
{{= def_callRuleValidate }};
{{=$valid}} =
{{=it.yieldA
wait
}}
{{= def_callRuleValidate }};
} catch (e) {
} catch (e) {
{{=$valid}} = false;
{{=$valid}} = false;
if (e instanceof ValidationError) {{=$ruleErrs}} = e.errors;
if (e instanceof ValidationError) {{=$ruleErrs}} = e.errors;
...
@@ -132,10 +123,12 @@ var {{=$valid}};
...
@@ -132,10 +123,12 @@ var {{=$valid}};
{{?}}
{{?}}
{{? $rDef.modifying }}
{{? $rDef.modifying }}
if ({{=$parentData}})
{{=$data}} = {{=$parentData}}[{{=$parentDataProperty}}];
{{=$data}} = {{=$parentData}}[{{=$parentDataProperty}}];
{{?}}
{{?}}
{{= $closingBraces }}
{{? $validateSchema }}
}
{{?}}
{{## def.notValidationResult:
{{## def.notValidationResult:
{{? $rDef.valid === undefined }}
{{? $rDef.valid === undefined }}
...
...
node_modules/har-validator/node_modules/ajv/lib/dot/defaults.def
View file @
bf137ad8
{{## def.assignDefault:
{{## def.assignDefault:
{{? it.compositeRule }}
if ({{=$passData}} === undefined)
{{
{{=$passData}} = {{? it.opts.useDefaults == 'shared' }}
if (it.opts.strictDefaults) {
{{= it.useDefault($sch.default) }}
var $defaultMsg = 'default is ignored for: ' + $passData;
{{??}}
if (it.opts.strictDefaults === 'log') it.logger.warn($defaultMsg);
{{= JSON.stringify($sch.default) }}
else throw new Error($defaultMsg);
{{?}};
}
}}
{{??}}
if ({{=$passData}} === undefined
{{? it.opts.useDefaults == 'empty' }}
|| {{=$passData}} === null
|| {{=$passData}} === ''
{{?}}
)
{{=$passData}} = {{? it.opts.useDefaults == 'shared' }}
{{= it.useDefault($sch.default) }}
{{??}}
{{= JSON.stringify($sch.default) }}
{{?}};
{{?}}
#}}
#}}
...
...
node_modules/har-validator/node_modules/ajv/lib/dot/definitions.def
View file @
bf137ad8
...
@@ -63,9 +63,7 @@
...
@@ -63,9 +63,7 @@
{{## def.nonEmptySchema:_schema:
{{## def.nonEmptySchema:_schema:
(it.opts.strictKeywords
it.util.schemaHasRules(_schema, it.RULES.all)
? typeof _schema == 'object' && Object.keys(_schema).length > 0
: it.util.schemaHasRules(_schema, it.RULES.all))
#}}
#}}
...
@@ -115,12 +113,12 @@
...
@@ -115,12 +113,12 @@
{{## def.cleanUp: {{ out = it.util.cleanUpCode(out); }} #}}
{{## def.cleanUp: {{ out = it.util.cleanUpCode(out); }} #}}
{{## def.
finalCleanUp
: {{ out = it.util.
finalCleanUpCode
(out, $async); }} #}}
{{## def.
cleanUpVarErrors
: {{ out = it.util.
cleanUpVarErrors
(out, $async); }} #}}
{{## def.$data:
{{## def.$data:
{{
{{
var $isData = it.opts.
$data
&& $schema && $schema.$data
var $isData = it.opts.
v5
&& $schema && $schema.$data
, $schemaValue;
, $schemaValue;
}}
}}
{{? $isData }}
{{? $isData }}
...
@@ -177,25 +175,8 @@
...
@@ -177,25 +175,8 @@
#}}
#}}
{{## def.
iterate
Propert
ies
:
{{## def.
checkOwn
Propert
y
:
{{? $ownProperties }}
{{? $ownProperties }}
{{=$dataProperties}} = {{=$dataProperties}} || Object.keys({{=$data}});
if (!Object.prototype.hasOwnProperty.call({{=$data}}, {{=$key}})) continue;
for (var {{=$idx}}=0; {{=$idx}}<{{=$dataProperties}}.length; {{=$idx}}++) {
var {{=$key}} = {{=$dataProperties}}[{{=$idx}}];
{{??}}
for (var {{=$key}} in {{=$data}}) {
{{?}}
{{?}}
#}}
#}}
{{## def.noPropertyInData:
{{=$useData}} === undefined
{{? $ownProperties }}
|| !{{# def.isOwnProperty }}
{{?}}
#}}
{{## def.isOwnProperty:
Object.prototype.hasOwnProperty.call({{=$data}}, '{{=it.util.escapeQuotes($propertyKey)}}')
#}}
node_modules/har-validator/node_modules/ajv/lib/dot/dependencies.jst
View file @
bf137ad8
...
@@ -5,18 +5,9 @@
...
@@ -5,18 +5,9 @@
{{# def.setupNextLevel }}
{{# def.setupNextLevel }}
{{## def.propertyInData:
{{=$data}}{{= it.util.getProperty($property) }} !== undefined
{{? $ownProperties }}
&& Object.prototype.hasOwnProperty.call({{=$data}}, '{{=it.util.escapeQuotes($property)}}')
{{?}}
#}}
{{
{{
var $schemaDeps = {}
var $schemaDeps = {}
, $propertyDeps = {}
, $propertyDeps = {};
, $ownProperties = it.opts.ownProperties;
for ($property in $schema) {
for ($property in $schema) {
var $sch = $schema[$property];
var $sch = $schema[$property];
...
@@ -32,19 +23,17 @@ var {{=$errs}} = errors;
...
@@ -32,19 +23,17 @@ var {{=$errs}} = errors;
var missing{{=$lvl}};
var missing{{=$lvl}};
{{ for (var $property in $propertyDeps) { }}
{{ for (var $property in $propertyDeps) { }}
{{ $deps = $propertyDeps[$property]; }}
{{ $deps = $propertyDeps[$property]; }}
{{? $deps.length }}
if ({{=$data}}{{= it.util.getProperty($property) }} !== undefined
if ({{# def.propertyInData }}
{{? $breakOnError }}
{{? $breakOnError }}
&& ({{# def.checkMissingProperty:$deps }})) {
&& ({{# def.checkMissingProperty:$deps }})) {
{{# def.errorMissingProperty:'dependencies' }}
{{# def.errorMissingProperty:'dependencies' }}
{{??}}
{{??}}
) {
) {
{{~ $deps:$reqProperty }}
{{~ $deps:$propertyKey }}
{{# def.allErrorsMissingProperty:'dependencies' }}
{{# def.allErrorsMissingProperty:'dependencies' }}
{{~}}
{{~}}
{{?}}
{{?}}
} {{# def.elseIfValid }}
} {{# def.elseIfValid }}
{{?}}
{{ } }}
{{ } }}
{{
{{
...
@@ -58,7 +47,7 @@ var missing{{=$lvl}};
...
@@ -58,7 +47,7 @@ var missing{{=$lvl}};
{{? {{# def.nonEmptySchema:$sch }} }}
{{? {{# def.nonEmptySchema:$sch }} }}
{{=$nextValid}} = true;
{{=$nextValid}} = true;
if ({{
# def.propertyInData }}
) {
if ({{
=$data}}{{= it.util.getProperty($property) }} !== undefined
) {
{{
{{
$it.schema = $sch;
$it.schema = $sch;
$it.schemaPath = $schemaPath + it.util.getProperty($property);
$it.schemaPath = $schemaPath + it.util.getProperty($property);
...
...
node_modules/har-validator/node_modules/ajv/lib/dot/errors.def
View file @
bf137ad8
...
@@ -87,37 +87,34 @@
...
@@ -87,37 +87,34 @@
{{## def.concatSchema:{{?$isData}}' + {{=$schemaValue}} + '{{??}}{{=$schema}}{{?}}#}}
{{## def.concatSchema:{{?$isData}}' + {{=$schemaValue}} + '{{??}}{{=$schema}}{{?}}#}}
{{## def.appendSchema:{{?$isData}}' + {{=$schemaValue}}{{??}}{{=$schema
Value
}}'{{?}}#}}
{{## def.appendSchema:{{?$isData}}' + {{=$schemaValue}}{{??}}{{=$schema}}'{{?}}#}}
{{## def.concatSchemaEQ:{{?$isData}}' + {{=$schemaValue}} + '{{??}}{{=it.util.escapeQuotes($schema)}}{{?}}#}}
{{## def.concatSchemaEQ:{{?$isData}}' + {{=$schemaValue}} + '{{??}}{{=it.util.escapeQuotes($schema)}}{{?}}#}}
{{## def._errorMessages = {
{{## def._errorMessages = {
'false schema': "'boolean schema is false'",
$ref: "'can\\\'t resolve reference {{=it.util.escapeQuotes($schema)}}'",
$ref: "'can\\\'t resolve reference {{=it.util.escapeQuotes($schema)}}'",
additionalItems: "'should NOT have more than {{=$schema.length}} items'",
additionalItems: "'should NOT have more than {{=$schema.length}} items'",
additionalProperties: "'
{{? it.opts._errorDataPathProperty }}is an invalid additional property{{??}}
should NOT have additional properties
{{?}}
'",
additionalProperties: "'should NOT have additional properties'",
anyOf: "'should match some schema in anyOf'",
anyOf: "'should match some schema in anyOf'",
const: "'should be equal to constant'",
contains: "'should contain a valid item'",
dependencies: "'should have {{? $deps.length == 1 }}property {{= it.util.escapeQuotes($deps[0]) }}{{??}}properties {{= it.util.escapeQuotes($deps.join(\", \")) }}{{?}} when property {{= it.util.escapeQuotes($property) }} is present'",
dependencies: "'should have {{? $deps.length == 1 }}property {{= it.util.escapeQuotes($deps[0]) }}{{??}}properties {{= it.util.escapeQuotes($deps.join(\", \")) }}{{?}} when property {{= it.util.escapeQuotes($property) }} is present'",
'enum': "'should be equal to one of the allowed values'",
'enum': "'should be equal to one of the allowed values'",
format: "'should match format \"{{#def.concatSchemaEQ}}\"'",
format: "'should match format \"{{#def.concatSchemaEQ}}\"'",
'if': "'should match \"' + {{=$ifClause}} + '\" schema'",
_limit: "'should be {{=$opStr}} {{#def.appendSchema}}",
_limit: "'should be {{=$opStr}} {{#def.appendSchema}}",
_exclusiveLimit: "'{{=$exclusiveKeyword}} should be boolean'",
_exclusiveLimit: "'{{=$exclusiveKeyword}} should be boolean'",
_limitItems: "'should NOT have {{?$keyword=='maxItems'}}more{{??}}
fewer
{{?}} than {{#def.concatSchema}} items'",
_limitItems: "'should NOT have {{?$keyword=='maxItems'}}more{{??}}
less
{{?}} than {{#def.concatSchema}} items'",
_limitLength: "'should NOT be {{?$keyword=='maxLength'}}longer{{??}}shorter{{?}} than {{#def.concatSchema}} characters'",
_limitLength: "'should NOT be {{?$keyword=='maxLength'}}longer{{??}}shorter{{?}} than {{#def.concatSchema}} characters'",
_limitProperties:"'should NOT have {{?$keyword=='maxProperties'}}more{{??}}
fewer
{{?}} than {{#def.concatSchema}} properties'",
_limitProperties:"'should NOT have {{?$keyword=='maxProperties'}}more{{??}}
less
{{?}} than {{#def.concatSchema}} properties'",
multipleOf: "'should be multiple of {{#def.appendSchema}}",
multipleOf: "'should be multiple of {{#def.appendSchema}}",
not: "'should NOT be valid'",
not: "'should NOT be valid'",
oneOf: "'should match exactly one schema in oneOf'",
oneOf: "'should match exactly one schema in oneOf'",
pattern: "'should match pattern \"{{#def.concatSchemaEQ}}\"'",
pattern: "'should match pattern \"{{#def.concatSchemaEQ}}\"'",
propertyNames: "'property name \\'{{=$invalidName}}\\' is invalid'",
required: "'{{? it.opts._errorDataPathProperty }}is a required property{{??}}should have required property \\'{{=$missingProperty}}\\'{{?}}'",
required: "'{{? it.opts._errorDataPathProperty }}is a required property{{??}}should have required property \\'{{=$missingProperty}}\\'{{?}}'",
type: "'should be {{? $typeIsArray }}{{= $typeSchema.join(\",\") }}{{??}}{{=$typeSchema}}{{?}}'",
type: "'should be {{? $typeIsArray }}{{= $typeSchema.join(\",\") }}{{??}}{{=$typeSchema}}{{?}}'",
uniqueItems: "'should NOT have duplicate items (items ## ' + j + ' and ' + i + ' are identical)'",
uniqueItems: "'should NOT have duplicate items (items ## ' + j + ' and ' + i + ' are identical)'",
custom: "'should pass \"{{=$rule.keyword}}\" keyword validation'",
custom: "'should pass \"{{=$rule.keyword}}\" keyword validation'",
patternGroups: "'should NOT have {{=$moreOrLess}} than {{=$limit}} properties matching pattern \"{{=it.util.escapeQuotes($pgProperty)}}\"'",
patternRequired: "'should have property matching pattern \\'{{=$missingPattern}}\\''",
patternRequired: "'should have property matching pattern \\'{{=$missingPattern}}\\''",
switch: "'should pass \"switch\" keyword validation'",
switch: "'should pass \"switch\" keyword validation'",
constant: "'should be equal to constant'",
_formatLimit: "'should be {{=$opStr}} \"{{#def.concatSchemaEQ}}\"'",
_formatLimit: "'should be {{=$opStr}} \"{{#def.concatSchemaEQ}}\"'",
_formatExclusiveLimit: "'{{=$exclusiveKeyword}} should be boolean'"
_formatExclusiveLimit: "'{{=$exclusiveKeyword}} should be boolean'"
} #}}
} #}}
...
@@ -127,17 +124,13 @@
...
@@ -127,17 +124,13 @@
{{## def.schemaRefOrQS: {{?$isData}}validate.schema{{=$schemaPath}}{{??}}{{=it.util.toQuotedString($schema)}}{{?}} #}}
{{## def.schemaRefOrQS: {{?$isData}}validate.schema{{=$schemaPath}}{{??}}{{=it.util.toQuotedString($schema)}}{{?}} #}}
{{## def._errorSchemas = {
{{## def._errorSchemas = {
'false schema': "false",
$ref: "{{=it.util.toQuotedString($schema)}}",
$ref: "{{=it.util.toQuotedString($schema)}}",
additionalItems: "false",
additionalItems: "false",
additionalProperties: "false",
additionalProperties: "false",
anyOf: "validate.schema{{=$schemaPath}}",
anyOf: "validate.schema{{=$schemaPath}}",
const: "validate.schema{{=$schemaPath}}",
contains: "validate.schema{{=$schemaPath}}",
dependencies: "validate.schema{{=$schemaPath}}",
dependencies: "validate.schema{{=$schemaPath}}",
'enum': "validate.schema{{=$schemaPath}}",
'enum': "validate.schema{{=$schemaPath}}",
format: "{{#def.schemaRefOrQS}}",
format: "{{#def.schemaRefOrQS}}",
'if': "validate.schema{{=$schemaPath}}",
_limit: "{{#def.schemaRefOrVal}}",
_limit: "{{#def.schemaRefOrVal}}",
_exclusiveLimit: "validate.schema{{=$schemaPath}}",
_exclusiveLimit: "validate.schema{{=$schemaPath}}",
_limitItems: "{{#def.schemaRefOrVal}}",
_limitItems: "{{#def.schemaRefOrVal}}",
...
@@ -147,13 +140,14 @@
...
@@ -147,13 +140,14 @@
not: "validate.schema{{=$schemaPath}}",
not: "validate.schema{{=$schemaPath}}",
oneOf: "validate.schema{{=$schemaPath}}",
oneOf: "validate.schema{{=$schemaPath}}",
pattern: "{{#def.schemaRefOrQS}}",
pattern: "{{#def.schemaRefOrQS}}",
propertyNames: "validate.schema{{=$schemaPath}}",
required: "validate.schema{{=$schemaPath}}",
required: "validate.schema{{=$schemaPath}}",
type: "validate.schema{{=$schemaPath}}",
type: "validate.schema{{=$schemaPath}}",
uniqueItems: "{{#def.schemaRefOrVal}}",
uniqueItems: "{{#def.schemaRefOrVal}}",
custom: "validate.schema{{=$schemaPath}}",
custom: "validate.schema{{=$schemaPath}}",
patternGroups: "validate.schema{{=$schemaPath}}",
patternRequired: "validate.schema{{=$schemaPath}}",
patternRequired: "validate.schema{{=$schemaPath}}",
switch: "validate.schema{{=$schemaPath}}",
switch: "validate.schema{{=$schemaPath}}",
constant: "validate.schema{{=$schemaPath}}",
_formatLimit: "{{#def.schemaRefOrQS}}",
_formatLimit: "{{#def.schemaRefOrQS}}",
_formatExclusiveLimit: "validate.schema{{=$schemaPath}}"
_formatExclusiveLimit: "validate.schema{{=$schemaPath}}"
} #}}
} #}}
...
@@ -162,17 +156,13 @@
...
@@ -162,17 +156,13 @@
{{## def.schemaValueQS: {{?$isData}}{{=$schemaValue}}{{??}}{{=it.util.toQuotedString($schema)}}{{?}} #}}
{{## def.schemaValueQS: {{?$isData}}{{=$schemaValue}}{{??}}{{=it.util.toQuotedString($schema)}}{{?}} #}}
{{## def._errorParams = {
{{## def._errorParams = {
'false schema': "{}",
$ref: "{ ref: '{{=it.util.escapeQuotes($schema)}}' }",
$ref: "{ ref: '{{=it.util.escapeQuotes($schema)}}' }",
additionalItems: "{ limit: {{=$schema.length}} }",
additionalItems: "{ limit: {{=$schema.length}} }",
additionalProperties: "{ additionalProperty: '{{=$additionalProperty}}' }",
additionalProperties: "{ additionalProperty: '{{=$additionalProperty}}' }",
anyOf: "{}",
anyOf: "{}",
const: "{ allowedValue: schema{{=$lvl}} }",
contains: "{}",
dependencies: "{ property: '{{= it.util.escapeQuotes($property) }}', missingProperty: '{{=$missingProperty}}', depsCount: {{=$deps.length}}, deps: '{{= it.util.escapeQuotes($deps.length==1 ? $deps[0] : $deps.join(\", \")) }}' }",
dependencies: "{ property: '{{= it.util.escapeQuotes($property) }}', missingProperty: '{{=$missingProperty}}', depsCount: {{=$deps.length}}, deps: '{{= it.util.escapeQuotes($deps.length==1 ? $deps[0] : $deps.join(\", \")) }}' }",
'enum': "{ allowedValues: schema{{=$lvl}} }",
'enum': "{ allowedValues: schema{{=$lvl}} }",
format: "{ format: {{#def.schemaValueQS}} }",
format: "{ format: {{#def.schemaValueQS}} }",
'if': "{ failingKeyword: {{=$ifClause}} }",
_limit: "{ comparison: {{=$opExpr}}, limit: {{=$schemaValue}}, exclusive: {{=$exclusive}} }",
_limit: "{ comparison: {{=$opExpr}}, limit: {{=$schemaValue}}, exclusive: {{=$exclusive}} }",
_exclusiveLimit: "{}",
_exclusiveLimit: "{}",
_limitItems: "{ limit: {{=$schemaValue}} }",
_limitItems: "{ limit: {{=$schemaValue}} }",
...
@@ -180,15 +170,16 @@
...
@@ -180,15 +170,16 @@
_limitProperties:"{ limit: {{=$schemaValue}} }",
_limitProperties:"{ limit: {{=$schemaValue}} }",
multipleOf: "{ multipleOf: {{=$schemaValue}} }",
multipleOf: "{ multipleOf: {{=$schemaValue}} }",
not: "{}",
not: "{}",
oneOf: "{
passingSchemas: {{=$passingSchemas}}
}",
oneOf: "{}",
pattern: "{ pattern: {{#def.schemaValueQS}} }",
pattern: "{ pattern: {{#def.schemaValueQS}} }",
propertyNames: "{ propertyName: '{{=$invalidName}}' }",
required: "{ missingProperty: '{{=$missingProperty}}' }",
required: "{ missingProperty: '{{=$missingProperty}}' }",
type: "{ type: '{{? $typeIsArray }}{{= $typeSchema.join(\",\") }}{{??}}{{=$typeSchema}}{{?}}' }",
type: "{ type: '{{? $typeIsArray }}{{= $typeSchema.join(\",\") }}{{??}}{{=$typeSchema}}{{?}}' }",
uniqueItems: "{ i: i, j: j }",
uniqueItems: "{ i: i, j: j }",
custom: "{ keyword: '{{=$rule.keyword}}' }",
custom: "{ keyword: '{{=$rule.keyword}}' }",
patternGroups: "{ reason: '{{=$reason}}', limit: {{=$limit}}, pattern: '{{=it.util.escapeQuotes($pgProperty)}}' }",
patternRequired: "{ missingPattern: '{{=$missingPattern}}' }",
patternRequired: "{ missingPattern: '{{=$missingPattern}}' }",
switch: "{ caseIndex: {{=$caseIndex}} }",
switch: "{ caseIndex: {{=$caseIndex}} }",
constant: "{}",
_formatLimit: "{ comparison: {{=$opExpr}}, limit: {{#def.schemaValueQS}}, exclusive: {{=$exclusive}} }",
_formatLimit: "{ comparison: {{=$opExpr}}, limit: {{#def.schemaValueQS}}, exclusive: {{=$exclusive}} }",
_formatExclusiveLimit: "{}"
_formatExclusiveLimit: "{}"
} #}}
} #}}
node_modules/har-validator/node_modules/ajv/lib/dot/format.jst
View file @
bf137ad8
...
@@ -15,16 +15,15 @@
...
@@ -15,16 +15,15 @@
{{## def.$dataCheckFormat:
{{## def.$dataCheckFormat:
{{# def.$dataNotType:'string' }}
{{# def.$dataNotType:'string' }}
({{? $unknownFormats
!= 'ignore'
}}
({{? $unknownFormats
=== true || $allowUnknown
}}
({{=$schemaValue}} && !{{=$format}}
({{=$schemaValue}} && !{{=$format}}
{{? $allowUnknown }}
{{? $allowUnknown }}
&& self._opts.unknownFormats.indexOf({{=$schemaValue}}) == -1
&& self._opts.unknownFormats.indexOf({{=$schemaValue}}) == -1
{{?}}) ||
{{?}}) ||
{{?}}
{{?}}
({{=$format}} && {{=$formatType}} == '{{=$ruleType}}'
({{=$format}} && !(typeof {{=$format}} == 'function'
&& !(typeof {{=$format}} == 'function'
? {{? it.async}}
? {{? it.async}}
(async{{=$lvl}} ?
a
wait {{=$format}}({{=$data}}) : {{=$format}}({{=$data}}))
(async{{=$lvl}} ?
{{=it.yieldA
wait
}}
{{=$format}}({{=$data}}) : {{=$format}}({{=$data}}))
{{??}}
{{??}}
{{=$format}}({{=$data}})
{{=$format}}({{=$data}})
{{?}}
{{?}}
...
@@ -50,17 +49,12 @@
...
@@ -50,17 +49,12 @@
}}
}}
{{? $isData }}
{{? $isData }}
{{
{{ var $format = 'format' + $lvl; }}
var $format = 'format' + $lvl
, $isObject = 'isObject' + $lvl
, $formatType = 'formatType' + $lvl;
}}
var {{=$format}} = formats[{{=$schemaValue}}];
var {{=$format}} = formats[{{=$schemaValue}}];
var {{=$isObject}} = typeof {{=$format}} == 'object'
var isObject{{=$lvl}} = typeof {{=$format}} == 'object'
&& !({{=$format}} instanceof RegExp)
&& !({{=$format}} instanceof RegExp)
&& {{=$format}}.validate;
&& {{=$format}}.validate;
var {{=$formatType}} = {{=$isObject}} && {{=$format}}.type || 'string';
if (isObject{{=$lvl}}) {
if ({{=$isObject}}) {
{{? it.async}}
{{? it.async}}
var async{{=$lvl}} = {{=$format}}.async;
var async{{=$lvl}} = {{=$format}}.async;
{{?}}
{{?}}
...
@@ -70,34 +64,34 @@
...
@@ -70,34 +64,34 @@
{{??}}
{{??}}
{{ var $format = it.formats[$schema]; }}
{{ var $format = it.formats[$schema]; }}
{{? !$format }}
{{? !$format }}
{{? $unknownFormats == 'ignore' }}
{{? $unknownFormats === true || ($allowUnknown && $unknownFormats.indexOf($schema) == -1) }}
{{ it.logger.warn('unknown format "' + $schema + '" ignored in schema at path "' + it.errSchemaPath + '"'); }}
{{# def.skipFormat }}
{{?? $allowUnknown && $unknownFormats.indexOf($schema) >= 0 }}
{{# def.skipFormat }}
{{??}}
{{ throw new Error('unknown format "' + $schema + '" is used in schema at path "' + it.errSchemaPath + '"'); }}
{{ throw new Error('unknown format "' + $schema + '" is used in schema at path "' + it.errSchemaPath + '"'); }}
{{??}}
{{
if (!$allowUnknown) {
console.warn('unknown format "' + $schema + '" ignored in schema at path "' + it.errSchemaPath + '"');
if ($unknownFormats !== 'ignore')
console.warn('In the next major version it will throw exception. See option unknownFormats for more information');
}
}}
{{# def.skipFormat }}
{{?}}
{{?}}
{{?}}
{{?}}
{{
{{
var $isObject = typeof $format == 'object'
var $isObject = typeof $format == 'object'
&& !($format instanceof RegExp)
&& !($format instanceof RegExp)
&& $format.validate;
&& $format.validate;
var $formatType = $isObject && $format.type || 'string';
if ($isObject) {
if ($isObject) {
var $async = $format.async === true;
var $async = $format.async === true;
$format = $format.validate;
$format = $format.validate;
}
}
}}
}}
{{? $formatType != $ruleType }}
{{# def.skipFormat }}
{{?}}
{{? $async }}
{{? $async }}
{{
{{
if (!it.async) throw new Error('async format in sync schema');
if (!it.async) throw new Error('async format in sync schema');
var $formatRef = 'formats' + it.util.getProperty($schema) + '.validate';
var $formatRef = 'formats' + it.util.getProperty($schema) + '.validate';
}}
}}
if (!(
a
wait {{=$formatRef}}({{=$data}}))) {
if (!(
{{=it.yieldA
wait
}}
{{=$formatRef}}({{=$data}}))) {
{{??}}
{{??}}
if (!{{# def.checkFormat }}) {
if (!{{# def.checkFormat }}) {
{{?}}
{{?}}
...
...
node_modules/har-validator/node_modules/ajv/lib/dot/if.jst
deleted
100644 → 0
View file @
0081cef7
{{# def.definitions }}
{{# def.errors }}
{{# def.setupKeyword }}
{{# def.setupNextLevel }}
{{## def.validateIfClause:_clause:
{{
$it.schema = it.schema['_clause'];
$it.schemaPath = it.schemaPath + '._clause';
$it.errSchemaPath = it.errSchemaPath + '/_clause';
}}
{{# def.insertSubschemaCode }}
{{=$valid}} = {{=$nextValid}};
{{? $thenPresent && $elsePresent }}
{{ $ifClause = 'ifClause' + $lvl; }}
var {{=$ifClause}} = '_clause';
{{??}}
{{ $ifClause = '\'_clause\''; }}
{{?}}
#}}
{{
var $thenSch = it.schema['then']
, $elseSch = it.schema['else']
, $thenPresent = $thenSch !== undefined && {{# def.nonEmptySchema:$thenSch }}
, $elsePresent = $elseSch !== undefined && {{# def.nonEmptySchema:$elseSch }}
, $currentBaseId = $it.baseId;
}}
{{? $thenPresent || $elsePresent }}
{{
var $ifClause;
$it.createErrors = false;
$it.schema = $schema;
$it.schemaPath = $schemaPath;
$it.errSchemaPath = $errSchemaPath;
}}
var {{=$errs}} = errors;
var {{=$valid}} = true;
{{# def.setCompositeRule }}
{{# def.insertSubschemaCode }}
{{ $it.createErrors = true; }}
{{# def.resetErrors }}
{{# def.resetCompositeRule }}
{{? $thenPresent }}
if ({{=$nextValid}}) {
{{# def.validateIfClause:then }}
}
{{? $elsePresent }}
else {
{{?}}
{{??}}
if (!{{=$nextValid}}) {
{{?}}
{{? $elsePresent }}
{{# def.validateIfClause:else }}
}
{{?}}
if (!{{=$valid}}) {
{{# def.extraError:'if' }}
}
{{? $breakOnError }} else { {{?}}
{{# def.cleanUp }}
{{??}}
{{? $breakOnError }}
if (true) {
{{?}}
{{?}}
node_modules/har-validator/node_modules/ajv/lib/dot/items.jst
View file @
bf137ad8
...
@@ -90,6 +90,7 @@ var {{=$valid}};
...
@@ -90,6 +90,7 @@ var {{=$valid}};
$it.errSchemaPath = $errSchemaPath;
$it.errSchemaPath = $errSchemaPath;
}}
}}
{{# def.validateItems: 0 }}
{{# def.validateItems: 0 }}
{{# def.ifResultValid }}
{{?}}
{{?}}
{{? $breakOnError }}
{{? $breakOnError }}
...
...
node_modules/har-validator/node_modules/ajv/lib/dot/missing.def
View file @
bf137ad8
{{## def.checkMissingProperty:_properties:
{{## def.checkMissingProperty:_properties:
{{~ _properties:$property
Key
:$i }}
{{~ _properties:
_
$property:$i }}
{{?$i}} || {{?}}
{{?$i}} || {{?}}
{{
{{ var $prop = it.util.getProperty(_$property); }}
var $prop = it.util.getProperty($propertyKey)
( {{=$data}}{{=$prop}} === undefined && (missing{{=$lvl}} = {{= it.util.toQuotedString(it.opts.jsonPointers ? _$property : $prop) }}) )
, $useData = $data + $prop;
}}
( ({{# def.noPropertyInData }}) && (missing{{=$lvl}} = {{= it.util.toQuotedString(it.opts.jsonPointers ? $propertyKey : $prop) }}) )
{{~}}
{{~}}
#}}
#}}
...
@@ -23,17 +20,15 @@
...
@@ -23,17 +20,15 @@
{{# def.error:_error }}
{{# def.error:_error }}
#}}
#}}
{{## def.allErrorsMissingProperty:_error:
{{## def.allErrorsMissingProperty:_error:
{{
{{
var $prop = it.util.getProperty($propertyKey)
var $prop = it.util.getProperty($reqProperty)
, $missingProperty = it.util.escapeQuotes($propertyKey)
, $missingProperty = it.util.escapeQuotes($reqProperty);
, $useData = $data + $prop;
if (it.opts._errorDataPathProperty) {
if (it.opts._errorDataPathProperty) {
it.errorPath = it.util.getPath($currentErrorPath, $
p
roperty
Key
, it.opts.jsonPointers);
it.errorPath = it.util.getPath($currentErrorPath, $
reqP
roperty, it.opts.jsonPointers);
}
}
}}
}}
if ({{
# def.noPropertyInData }}
) {
if ({{
=$data}}{{=$prop}} === undefined
) {
{{# def.addError:_error }}
{{# def.addError:_error }}
}
}
#}}
#}}
node_modules/har-validator/node_modules/ajv/lib/dot/oneOf.jst
View file @
bf137ad8
...
@@ -3,17 +3,11 @@
...
@@ -3,17 +3,11 @@
{{# def.setupKeyword }}
{{# def.setupKeyword }}
{{# def.setupNextLevel }}
{{# def.setupNextLevel }}
{{
var {{=$errs}} = errors;
var $currentBaseId = $it.baseId
var prevValid{{=$lvl}} = false;
, $prevValid = 'prevValid' + $lvl
var {{=$valid}} = false;
, $passingSchemas = 'passingSchemas' + $lvl;
}}
var {{=$errs}} = errors
, {{=$prevValid}} = false
, {{=$valid}} = false
, {{=$passingSchemas}} = null;
{{ var $currentBaseId = $it.baseId; }}
{{# def.setCompositeRule }}
{{# def.setCompositeRule }}
{{~ $schema:$sch:$i }}
{{~ $schema:$sch:$i }}
...
@@ -30,17 +24,13 @@ var {{=$errs}} = errors
...
@@ -30,17 +24,13 @@ var {{=$errs}} = errors
{{?}}
{{?}}
{{? $i }}
{{? $i }}
if ({{=$nextValid}} &&
{{=$
prevValid}})
{
if ({{=$nextValid}} && prevValid
{{=$lvl
}})
{{=$valid}} = false;
{{=$valid}} = false;
{{=$passingSchemas}} = [{{=$passingSchemas}}, {{=$i}}];
else {
} else {
{{ $closingBraces += '}'; }}
{{ $closingBraces += '}'; }}
{{?}}
{{?}}
if ({{=$nextValid}}) {
if ({{=$nextValid}}) {{=$valid}} = prevValid{{=$lvl}} = true;
{{=$valid}} = {{=$prevValid}} = true;
{{=$passingSchemas}} = {{=$i}};
}
{{~}}
{{~}}
{{# def.resetCompositeRule }}
{{# def.resetCompositeRule }}
...
@@ -48,7 +38,7 @@ var {{=$errs}} = errors
...
@@ -48,7 +38,7 @@ var {{=$errs}} = errors
{{= $closingBraces }}
{{= $closingBraces }}
if (!{{=$valid}}) {
if (!{{=$valid}}) {
{{# def.e
xtraE
rror:'oneOf' }}
{{# def.error:'oneOf' }}
} else {
} else {
{{# def.resetErrors }}
{{# def.resetErrors }}
{{? it.opts.allErrors }} } {{?}}
{{? it.opts.allErrors }} } {{?}}
Prev
1
2
3
4
5
6
7
8
…
13
Next
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment