id
int64
0
1.29M
original_id
stringlengths
32
32
swhid
stringlengths
100
170
sha1
stringlengths
40
40
repo_name
stringlengths
2
45
repo_group
stringclasses
12 values
filepath
stringlengths
5
153
name
stringlengths
1
14.9k
type
stringclasses
3 values
code
stringlengths
7
2.12M
1,286,700
5245146c83bab1c45537c5a3a05d66b3
swh:1:cnt:2a99b08d59adc2ce8fc6c785a5ccc34c0960c1f9;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=13-13/
4139866d99aa5239399a8957109301a074ffdff3
wlbdashboard
wmcs
node_modules/workbox-build/node_modules/ajv/lib/vocabularies/applicator/items2020.ts
ItemsError
type
type ItemsError = ErrorObject<"items", {limit: number}, AnySchema>
1,286,701
93acbc2331588ef60097e02c290317fa
swh:1:cnt:2a99b08d59adc2ce8fc6c785a5ccc34c0960c1f9;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=26-33/
4139866d99aa5239399a8957109301a074ffdff3
wlbdashboard
wmcs
node_modules/workbox-build/node_modules/ajv/lib/vocabularies/applicator/items2020.ts
code
function
code(cxt: KeywordCxt) { const {schema, parentSchema, it} = cxt const {prefixItems} = parentSchema it.items = true if (alwaysValidSchema(it, schema)) return if (prefixItems) validateAdditionalItems(cxt, prefixItems) else cxt.ok(validateArray(cxt)) }
1,286,702
accc83e65a87aca1b1e58ad7360043bf
swh:1:cnt:8691db0bf229b778f88a373110311dff1c69c1dc;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=5-5/
b43d586af3ee1932c02e92cce7ffc1900e3d1322
wlbdashboard
wmcs
node_modules/workbox-build/node_modules/ajv/lib/vocabularies/applicator/not.ts
NotKeywordError
type
type NotKeywordError = ErrorNoParams<"not", AnySchema>
1,286,703
59e3512007ee79e8c5bd81cdf316a216
swh:1:cnt:8691db0bf229b778f88a373110311dff1c69c1dc;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=11-34/
b43d586af3ee1932c02e92cce7ffc1900e3d1322
wlbdashboard
wmcs
node_modules/workbox-build/node_modules/ajv/lib/vocabularies/applicator/not.ts
code
function
code(cxt: KeywordCxt) { const {gen, schema, it} = cxt if (alwaysValidSchema(it, schema)) { cxt.fail() return } const valid = gen.name("valid") cxt.subschema( { keyword: "not", compositeRule: true, createErrors: false, allErrors: false, }, ...
1,286,704
cacd51455652f7c8edad1cf35cabe699
swh:1:cnt:c25353ffd648c45dce2433c14cb27841763d5435;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=12-16/
d6ad585b6af686efb5e4d6976ac36520947315cf
wlbdashboard
wmcs
node_modules/workbox-build/node_modules/ajv/lib/vocabularies/applicator/oneOf.ts
OneOfError
type
type OneOfError = ErrorObject< "oneOf", {passingSchemas: [number, number] | null}, AnySchema[] >
1,286,705
9ca6351fd736a60031229ded74c98976
swh:1:cnt:c25353ffd648c45dce2433c14cb27841763d5435;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=28-79/
d6ad585b6af686efb5e4d6976ac36520947315cf
wlbdashboard
wmcs
node_modules/workbox-build/node_modules/ajv/lib/vocabularies/applicator/oneOf.ts
code
function
code(cxt: KeywordCxt) { const {gen, schema, parentSchema, it} = cxt /* istanbul ignore if */ if (!Array.isArray(schema)) throw new Error("ajv implementation error") if (it.opts.discriminator && parentSchema.discriminator) return const schArr: AnySchema[] = schema const valid = gen.let("valid", f...
1,286,706
37744417f04f582df273cdfec6fb4d7b
swh:1:cnt:c25353ffd648c45dce2433c14cb27841763d5435;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=48-78/
d6ad585b6af686efb5e4d6976ac36520947315cf
wlbdashboard
wmcs
node_modules/workbox-build/node_modules/ajv/lib/vocabularies/applicator/oneOf.ts
code::validateOneOf
function
function validateOneOf(): void { schArr.forEach((sch: AnySchema, i: number) => { let schCxt: SchemaCxt | undefined if (alwaysValidSchema(it, sch)) { gen.var(schValid, true) } else { schCxt = cxt.subschema( { keyword: "oneOf", sche...
1,286,707
b9ca13d3ae0f7583fecc2abe2d9a77ed
swh:1:cnt:ea624e230dddb3d71320eb5255a2b89bae5f20b0;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=13-88/
fdcd490afa5422592572d5443fe759e40d81d1b3
wlbdashboard
wmcs
node_modules/workbox-build/node_modules/ajv/lib/vocabularies/applicator/patternProperties.ts
code
function
code(cxt: KeywordCxt) { const {gen, schema, data, parentSchema, it} = cxt const {opts} = it const patterns = allSchemaProperties(schema) const alwaysValidPatterns = patterns.filter((p) => alwaysValidSchema(it, schema[p] as AnySchema) ) if ( patterns.length === 0 || (alwaysVali...
1,286,708
9f44924312fc1199612775e9cf0a7a41
swh:1:cnt:ea624e230dddb3d71320eb5255a2b89bae5f20b0;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=62-87/
fdcd490afa5422592572d5443fe759e40d81d1b3
wlbdashboard
wmcs
node_modules/workbox-build/node_modules/ajv/lib/vocabularies/applicator/patternProperties.ts
code::validateProperties
function
function validateProperties(pat: string): void { gen.forIn("key", data, (key) => { gen.if(_`${usePattern(cxt, pat)}.test(${key})`, () => { const alwaysValid = alwaysValidPatterns.includes(pat) if (!alwaysValid) { cxt.subschema( { keyword: "patt...
1,286,709
5d4f9a3aada98ae57635507db42f3890
swh:1:cnt:ea624e230dddb3d71320eb5255a2b89bae5f20b0;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=38-49/
fdcd490afa5422592572d5443fe759e40d81d1b3
wlbdashboard
wmcs
node_modules/workbox-build/node_modules/ajv/lib/vocabularies/applicator/patternProperties.ts
code::validatePatternProperties
function
function validatePatternProperties(): void { for (const pat of patterns) { if (checkProperties) checkMatchingProperties(pat) if (it.allErrors) { validateProperties(pat) } else { gen.var(valid, true) // TODO var validateProperties(pat) gen.if(valid) ...
1,286,710
1ac9cf620997dc884141e042e4c58d49
swh:1:cnt:ea624e230dddb3d71320eb5255a2b89bae5f20b0;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=51-60/
fdcd490afa5422592572d5443fe759e40d81d1b3
wlbdashboard
wmcs
node_modules/workbox-build/node_modules/ajv/lib/vocabularies/applicator/patternProperties.ts
code::checkMatchingProperties
function
function checkMatchingProperties(pat: string): void { for (const prop in checkProperties) { if (new RegExp(pat).test(prop)) { checkStrictMode( it, `property ${prop} matches pattern ${pat} (use allowMatchingProperties)` ) } } }
1,286,711
b03cb39129cee1752b3f9ab21943d509
swh:1:cnt:a55b19ce5b77d180ce94cb063946a08d22824bd1;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=11-54/
d21ec07e85c0d370af1c547376ad53ce3fc615ec
wlbdashboard
wmcs
node_modules/workbox-build/node_modules/ajv/lib/vocabularies/applicator/properties.ts
code
function
code(cxt: KeywordCxt) { const {gen, schema, parentSchema, data, it} = cxt if (it.opts.removeAdditional === "all" && parentSchema.additionalProperties === undefined) { apDef.code(new KeywordCxt(it, apDef, "additionalProperties")) } const allProps = allSchemaProperties(schema) for (const prop of...
1,286,712
0a6360a876e34a74f11ceabe1c9dd54d
swh:1:cnt:a55b19ce5b77d180ce94cb063946a08d22824bd1;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=40-42/
d21ec07e85c0d370af1c547376ad53ce3fc615ec
wlbdashboard
wmcs
node_modules/workbox-build/node_modules/ajv/lib/vocabularies/applicator/properties.ts
code::hasDefault
function
function hasDefault(prop: string): boolean | undefined { return it.opts.useDefaults && !it.compositeRule && schema[prop].default !== undefined }
1,286,713
23bb12e2cbc97a6af8bbffac77bc40f7
swh:1:cnt:a55b19ce5b77d180ce94cb063946a08d22824bd1;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=44-53/
d21ec07e85c0d370af1c547376ad53ce3fc615ec
wlbdashboard
wmcs
node_modules/workbox-build/node_modules/ajv/lib/vocabularies/applicator/properties.ts
code::applyPropertySchema
function
function applyPropertySchema(prop: string): void { cxt.subschema( { keyword: "properties", schemaProp: prop, dataProp: prop, }, valid ) }
1,286,714
c4ce1b6e751eddace2318e6cd331ede2
swh:1:cnt:1c54d605258600f3e98d4eeb17e87256be6b9f3f;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=11-11/
49116210e9230253a931854007d0b1bf21d379eb
wlbdashboard
wmcs
node_modules/workbox-build/node_modules/ajv/lib/vocabularies/applicator/propertyNames.ts
PropertyNamesError
type
type PropertyNamesError = ErrorObject<"propertyNames", {propertyName: string}, AnySchema>
1,286,715
784a0050c9964a8403457f69de26c1b2
swh:1:cnt:1c54d605258600f3e98d4eeb17e87256be6b9f3f;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=23-47/
49116210e9230253a931854007d0b1bf21d379eb
wlbdashboard
wmcs
node_modules/workbox-build/node_modules/ajv/lib/vocabularies/applicator/propertyNames.ts
code
function
code(cxt: KeywordCxt) { const {gen, schema, data, it} = cxt if (alwaysValidSchema(it, schema)) return const valid = gen.name("valid") gen.forIn("key", data, (key) => { cxt.setParams({propertyName: key}) cxt.subschema( { keyword: "propertyNames", data: key, ...
1,286,716
dd1abdb36039af7915723e8d6dfb5f0b
swh:1:cnt:5055182e89141a257630516d96a52ec2917f72b6;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=8-10/
8efc72e6d54d8da11523112dd44dc6e5dad7dc27
wlbdashboard
wmcs
node_modules/workbox-build/node_modules/ajv/lib/vocabularies/applicator/thenElse.ts
code
function
code({keyword, parentSchema, it}: KeywordCxt) { if (parentSchema.if === undefined) checkStrictMode(it, `"${keyword}" without "if" is ignored`) }
1,286,717
ab56b5727af61ff9980d6c53d7690dc3
swh:1:cnt:aa36c4bb20f45046bb46fc998ca39fa2d9589811;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=5-7/
b56f2e18b4a43c6035346ec70abfc6a05d6b023f
wlbdashboard
wmcs
node_modules/workbox-build/node_modules/ajv/lib/vocabularies/core/id.ts
code
function
code() { throw new Error('NOT SUPPORTED: keyword "id", use "$id" for schema ID') }
1,286,718
42cc2e7eb6c59f9702da0b895f0e4e76
swh:1:cnt:5d59fbcb2a99564106fdcafe244f693bc88e3ea2;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=56-61/
c769350ba1e2f5ce82d5bdf72f022cb2e11aee5d
wlbdashboard
wmcs
node_modules/workbox-build/node_modules/ajv/lib/vocabularies/core/ref.ts
getValidate
function
function getValidate(cxt: KeywordCxt, sch: SchemaEnv): Code { const {gen} = cxt return sch.validate ? gen.scopeValue("validate", {ref: sch.validate}) : _`${gen.scopeValue("wrapper", {ref: sch})}.validate` }
1,286,719
3f1a16d7ad89310546fcebf334d62a33
swh:1:cnt:5d59fbcb2a99564106fdcafe244f693bc88e3ea2;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=29-32/
c769350ba1e2f5ce82d5bdf72f022cb2e11aee5d
wlbdashboard
wmcs
node_modules/workbox-build/node_modules/ajv/lib/vocabularies/core/ref.ts
code::callValidate
function
function callValidate(sch: SchemaEnv): void { const v = getValidate(cxt, sch) callRef(cxt, v, sch, sch.$async) }
1,286,720
d2dfc2e85525c7ea93674f58cc154977
swh:1:cnt:5d59fbcb2a99564106fdcafe244f693bc88e3ea2;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=34-52/
c769350ba1e2f5ce82d5bdf72f022cb2e11aee5d
wlbdashboard
wmcs
node_modules/workbox-build/node_modules/ajv/lib/vocabularies/core/ref.ts
code::inlineRefSchema
function
function inlineRefSchema(sch: AnySchema): void { const schName = gen.scopeValue( "schema", opts.code.source === true ? {ref: sch, code: stringify(sch)} : {ref: sch} ) const valid = gen.name("valid") const schCxt = cxt.subschema( { schema: sch, dataType...
1,286,721
5a6c2073227bba7dda7ae4f1103096f0
swh:1:cnt:5d59fbcb2a99564106fdcafe244f693bc88e3ea2;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=23-27/
c769350ba1e2f5ce82d5bdf72f022cb2e11aee5d
wlbdashboard
wmcs
node_modules/workbox-build/node_modules/ajv/lib/vocabularies/core/ref.ts
code::callRootRef
function
function callRootRef(): void { if (env === root) return callRef(cxt, validateName, env, env.$async) const rootName = gen.scopeValue("root", {ref: root}) return callRef(cxt, _`${rootName}.validate`, root, root.$async) }
1,286,722
83571050e69d96da8b2ef607e331b1ab
swh:1:cnt:5d59fbcb2a99564106fdcafe244f693bc88e3ea2;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=63-127/
c769350ba1e2f5ce82d5bdf72f022cb2e11aee5d
wlbdashboard
wmcs
node_modules/workbox-build/node_modules/ajv/lib/vocabularies/core/ref.ts
callRef
function
function callRef(cxt: KeywordCxt, v: Code, sch?: SchemaEnv, $async?: boolean): void { const {gen, it} = cxt const {allErrors, schemaEnv: env, opts} = it const passCxt = opts.passContext ? N.this : nil if ($async) callAsyncRef() else callSyncRef() function callAsyncRef(): void { if (!env.$async) throw n...
1,286,723
f6db5961c572e3410e5596542c6984e8
swh:1:cnt:5d59fbcb2a99564106fdcafe244f693bc88e3ea2;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=70-86/
c769350ba1e2f5ce82d5bdf72f022cb2e11aee5d
wlbdashboard
wmcs
node_modules/workbox-build/node_modules/ajv/lib/vocabularies/core/ref.ts
callRef::callAsyncRef
function
function callAsyncRef(): void { if (!env.$async) throw new Error("async schema referenced by sync schema") const valid = gen.let("valid") gen.try( () => { gen.code(_`await ${callValidateCode(cxt, v, passCxt)}`) addEvaluatedFrom(v) // TODO will not work with async, it has to be returned...
1,286,724
9de1c705d2d2d4f5aaf380d1c2a94e3d
swh:1:cnt:5d59fbcb2a99564106fdcafe244f693bc88e3ea2;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=88-94/
c769350ba1e2f5ce82d5bdf72f022cb2e11aee5d
wlbdashboard
wmcs
node_modules/workbox-build/node_modules/ajv/lib/vocabularies/core/ref.ts
callRef::callSyncRef
function
function callSyncRef(): void { cxt.result( callValidateCode(cxt, v, passCxt), () => addEvaluatedFrom(v), () => addErrorsFrom(v) ) }
1,286,725
160105bbe04af5a3883fdb6afeb5a395
swh:1:cnt:5d59fbcb2a99564106fdcafe244f693bc88e3ea2;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=96-100/
c769350ba1e2f5ce82d5bdf72f022cb2e11aee5d
wlbdashboard
wmcs
node_modules/workbox-build/node_modules/ajv/lib/vocabularies/core/ref.ts
callRef::addErrorsFrom
function
function addErrorsFrom(source: Code): void { const errs = _`${source}.errors` gen.assign(N.vErrors, _`${N.vErrors} === null ? ${errs} : ${N.vErrors}.concat(${errs})`) // TODO tagged gen.assign(N.errors, _`${N.vErrors}.length`) }
1,286,726
9c7b4d3e7a7418ef86d94adf19a982cb
swh:1:cnt:5d59fbcb2a99564106fdcafe244f693bc88e3ea2;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=13-53/
c769350ba1e2f5ce82d5bdf72f022cb2e11aee5d
wlbdashboard
wmcs
node_modules/workbox-build/node_modules/ajv/lib/vocabularies/core/ref.ts
code
function
code(cxt: KeywordCxt): void { const {gen, schema: $ref, it} = cxt const {baseId, schemaEnv: env, validateName, opts, self} = it const {root} = env if (($ref === "#" || $ref === "#/") && baseId === root.baseId) return callRootRef() const schOrEnv = resolveRef.call(self, root, baseId, $ref) if (sc...
1,286,727
5beb21c08915638ac675fa061d22510d
swh:1:cnt:5d59fbcb2a99564106fdcafe244f693bc88e3ea2;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=102-126/
c769350ba1e2f5ce82d5bdf72f022cb2e11aee5d
wlbdashboard
wmcs
node_modules/workbox-build/node_modules/ajv/lib/vocabularies/core/ref.ts
callRef::addEvaluatedFrom
function
function addEvaluatedFrom(source: Code): void { if (!it.opts.unevaluated) return const schEvaluated = sch?.validate?.evaluated // TODO refactor if (it.props !== true) { if (schEvaluated && !schEvaluated.dynamicProps) { if (schEvaluated.props !== undefined) { it.props = mergeEvalu...
1,286,728
a306f53cabf973b390c2865b690a003f
swh:1:cnt:19ae6049f3464d2dd7518de70a9f10842aa88d66;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=9-9/
3463d9a5f2e7d56f0ec20cd313a76c9b011f8f80
wlbdashboard
wmcs
node_modules/workbox-build/node_modules/ajv/lib/vocabularies/discriminator/index.ts
DiscriminatorError
type
type DiscriminatorError = DiscrErrorObj<DiscrError.Tag> | DiscrErrorObj<DiscrError.Mapping>
1,286,729
6ed538b83efb082509f08c34da37cc3d
swh:1:cnt:19ae6049f3464d2dd7518de70a9f10842aa88d66;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=63-109/
3463d9a5f2e7d56f0ec20cd313a76c9b011f8f80
wlbdashboard
wmcs
node_modules/workbox-build/node_modules/ajv/lib/vocabularies/discriminator/index.ts
code::getMapping
function
function getMapping(): {[T in string]?: number} { const oneOfMapping: {[T in string]?: number} = {} const topRequired = hasRequired(parentSchema) let tagRequired = true for (let i = 0; i < oneOf.length; i++) { let sch = oneOf[i] if (sch?.$ref && !schemaHasRulesButRef(sch, it.self...
1,286,730
935a594f585face3ab569f3e0c6508d7
swh:1:cnt:19ae6049f3464d2dd7518de70a9f10842aa88d66;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=87-89/
3463d9a5f2e7d56f0ec20cd313a76c9b011f8f80
wlbdashboard
wmcs
node_modules/workbox-build/node_modules/ajv/lib/vocabularies/discriminator/index.ts
code::getMapping::hasRequired
function
function hasRequired({required}: AnySchemaObject): boolean { return Array.isArray(required) && required.includes(tagName) }
1,286,731
9f2701ef8c7c04825b36a08a619efb6d
swh:1:cnt:19ae6049f3464d2dd7518de70a9f10842aa88d66;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=56-61/
3463d9a5f2e7d56f0ec20cd313a76c9b011f8f80
wlbdashboard
wmcs
node_modules/workbox-build/node_modules/ajv/lib/vocabularies/discriminator/index.ts
code::applyTagSchema
function
function applyTagSchema(schemaProp?: number): Name { const _valid = gen.name("valid") const schCxt = cxt.subschema({keyword: "oneOf", schemaProp}, _valid) cxt.mergeEvaluated(schCxt, Name) return _valid }
1,286,732
a59701df52f49f7ca1ff76c4955e4f0c
swh:1:cnt:19ae6049f3464d2dd7518de70a9f10842aa88d66;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=44-54/
3463d9a5f2e7d56f0ec20cd313a76c9b011f8f80
wlbdashboard
wmcs
node_modules/workbox-build/node_modules/ajv/lib/vocabularies/discriminator/index.ts
code::validateMapping
function
function validateMapping(): void { const mapping = getMapping() gen.if(false) for (const tagValue in mapping) { gen.elseIf(_`${tag} === ${tagValue}`) gen.assign(valid, applyTagSchema(mapping[tagValue])) } gen.else() cxt.error(false, {discrError: DiscrError.Mapping, ta...
1,286,733
d34c493a8745122d0fd69c501ba37659
swh:1:cnt:19ae6049f3464d2dd7518de70a9f10842aa88d66;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=91-101/
3463d9a5f2e7d56f0ec20cd313a76c9b011f8f80
wlbdashboard
wmcs
node_modules/workbox-build/node_modules/ajv/lib/vocabularies/discriminator/index.ts
code::getMapping::addMappings
function
function addMappings(sch: AnySchemaObject, i: number): void { if (sch.const) { addMapping(sch.const, i) } else if (sch.enum) { for (const tagValue of sch.enum) { addMapping(tagValue, i) } } else { throw new Error(`discriminator: "properties/${t...
1,286,734
2db5967ac6d891468bb9dc7b1dee8f3c
swh:1:cnt:19ae6049f3464d2dd7518de70a9f10842aa88d66;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=103-108/
3463d9a5f2e7d56f0ec20cd313a76c9b011f8f80
wlbdashboard
wmcs
node_modules/workbox-build/node_modules/ajv/lib/vocabularies/discriminator/index.ts
code::getMapping::addMapping
function
function addMapping(tagValue: unknown, i: number): void { if (typeof tagValue != "string" || tagValue in oneOfMapping) { throw new Error(`discriminator: "${tagName}" values must be unique strings`) } oneOfMapping[tagValue] = i }
1,286,735
b2163f1d763e6b574348641ae7f149af
swh:1:cnt:19ae6049f3464d2dd7518de70a9f10842aa88d66;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=25-110/
3463d9a5f2e7d56f0ec20cd313a76c9b011f8f80
wlbdashboard
wmcs
node_modules/workbox-build/node_modules/ajv/lib/vocabularies/discriminator/index.ts
code
function
code(cxt: KeywordCxt) { const {gen, data, schema, parentSchema, it} = cxt const {oneOf} = parentSchema if (!it.opts.discriminator) { throw new Error("discriminator: requires discriminator option") } const tagName = schema.propertyName if (typeof tagName != "string") throw new Error("discri...
1,286,736
0f8092fef3a007a76002925ab7e3cdde
swh:1:cnt:bee5a278508e4926b85cf397fb601a7a3c2a78cb;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=3-6/
91443a8ff3d817ed488f9e318d3ebfa5cb0f179d
wlbdashboard
wmcs
node_modules/workbox-build/node_modules/ajv/lib/vocabularies/discriminator/types.ts
DiscrError
type
enum DiscrError { Tag = "tag", Mapping = "mapping", }
1,286,737
830887d09d00018f2bbac7c234a89ca3
swh:1:cnt:bee5a278508e4926b85cf397fb601a7a3c2a78cb;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=8-12/
91443a8ff3d817ed488f9e318d3ebfa5cb0f179d
wlbdashboard
wmcs
node_modules/workbox-build/node_modules/ajv/lib/vocabularies/discriminator/types.ts
DiscrErrorObj
type
type DiscrErrorObj<E extends DiscrError> = ErrorObject< "discriminator", {error: E; tag: string; tagValue: unknown}, string >
1,286,738
d6a31227028376be60ba32a2ce0117e9
swh:1:cnt:ca1adb912af0347a3bb8e18ca50cf51405f2ba1f;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=14-20/
ee63f8ade138a1ef6f4b54788dd3a8496037bf97
wlbdashboard
wmcs
node_modules/workbox-build/node_modules/ajv/lib/vocabularies/dynamic/dynamicAnchor.ts
dynamicAnchor
function
function dynamicAnchor(cxt: KeywordCxt, anchor: string): void { const {gen, it} = cxt it.schemaEnv.root.dynamicAnchors[anchor] = true const v = _`${N.dynamicAnchors}${getProperty(anchor)}` const validate = it.errSchemaPath === "#" ? it.validateName : _getValidate(cxt) gen.if(_`!${v}`, () => gen.assign(v, vali...
1,286,739
b6a07dbbc0f327a9ab2a9f2a91e88ca3
swh:1:cnt:ca1adb912af0347a3bb8e18ca50cf51405f2ba1f;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=22-29/
ee63f8ade138a1ef6f4b54788dd3a8496037bf97
wlbdashboard
wmcs
node_modules/workbox-build/node_modules/ajv/lib/vocabularies/dynamic/dynamicAnchor.ts
_getValidate
function
function _getValidate(cxt: KeywordCxt): Code { const {schemaEnv, schema, self} = cxt.it const {root, baseId, localRefs, meta} = schemaEnv.root const {schemaId} = self.opts const sch = new SchemaEnv({schema, schemaId, root, baseId, localRefs, meta}) compileSchema.call(self, sch) return getValidate(cxt, sch) ...
1,286,740
c08fb1b49de9f6bed2a8cfe34c146db2
swh:1:cnt:6a573f33024b4fc5045f17f0c251a3d6c75a22a7;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=13-49/
f70feed63c32a5b389e5b790085c8b39107407c9
wlbdashboard
wmcs
node_modules/workbox-build/node_modules/ajv/lib/vocabularies/dynamic/dynamicRef.ts
dynamicRef
function
function dynamicRef(cxt: KeywordCxt, ref: string): void { const {gen, keyword, it} = cxt if (ref[0] !== "#") throw new Error(`"${keyword}" only supports hash fragment reference`) const anchor = ref.slice(1) if (it.allErrors) { _dynamicRef() } else { const valid = gen.let("valid", false) _dynamicRe...
1,286,741
b95b32a92b641afee4df655a25996e99
swh:1:cnt:6a573f33024b4fc5045f17f0c251a3d6c75a22a7;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=40-48/
f70feed63c32a5b389e5b790085c8b39107407c9
wlbdashboard
wmcs
node_modules/workbox-build/node_modules/ajv/lib/vocabularies/dynamic/dynamicRef.ts
dynamicRef::_callRef
function
function _callRef(validate: Code, valid?: Name): () => void { return valid ? () => gen.block(() => { callRef(cxt, validate) gen.let(valid, true) }) : () => callRef(cxt, validate) }
1,286,742
410d183b9806f6ab04364ef6cd4ec7b6
swh:1:cnt:6a573f33024b4fc5045f17f0c251a3d6c75a22a7;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=25-38/
f70feed63c32a5b389e5b790085c8b39107407c9
wlbdashboard
wmcs
node_modules/workbox-build/node_modules/ajv/lib/vocabularies/dynamic/dynamicRef.ts
dynamicRef::_dynamicRef
function
function _dynamicRef(valid?: Name): void { // TODO the assumption here is that `recursiveRef: #` always points to the root // of the schema object, which is not correct, because there may be $id that // makes # point to it, and the target schema may not contain dynamic/recursiveAnchor. // Because of tha...
1,286,743
dc752bb6a8915796d2669007d99a5df7
swh:1:cnt:25f3db96bf07a2c60fc3eb860ea93ee6337e0137;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=8-11/
c5a50e062339d83dfae7b47c0a662030655a8ca6
wlbdashboard
wmcs
node_modules/workbox-build/node_modules/ajv/lib/vocabularies/dynamic/recursiveAnchor.ts
code
function
code(cxt) { if (cxt.schema) dynamicAnchor(cxt, "") else checkStrictMode(cxt.it, "$recursiveAnchor: false is ignored") }
1,286,744
cca9b58355c7b4f1655a1bc08809693e
swh:1:cnt:4b1c13e764375dbb4dff021426a377f8103ab54f;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=12-19/
161a5d1fe2c4ef331ffcc9de2d6d20c69c5fd2ca
wlbdashboard
wmcs
node_modules/workbox-build/node_modules/ajv/lib/vocabularies/format/format.ts
FormatValidate
type
type FormatValidate = | FormatValidator<string> | FormatValidator<number> | AsyncFormatValidator<string> | AsyncFormatValidator<number> | RegExp | string | true
1,286,745
d0d49677645cf3d2790bd91a63a08222
swh:1:cnt:4b1c13e764375dbb4dff021426a377f8103ab54f;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=21-21/
161a5d1fe2c4ef331ffcc9de2d6d20c69c5fd2ca
wlbdashboard
wmcs
node_modules/workbox-build/node_modules/ajv/lib/vocabularies/format/format.ts
FormatError
type
type FormatError = ErrorObject<"format", {format: string}, string | {$data: string}>
1,286,746
6731037f639bfb83e0b1d10a4b1439c4
swh:1:cnt:4b1c13e764375dbb4dff021426a377f8103ab54f;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=63-69/
161a5d1fe2c4ef331ffcc9de2d6d20c69c5fd2ca
wlbdashboard
wmcs
node_modules/workbox-build/node_modules/ajv/lib/vocabularies/format/format.ts
code::validate$DataFormat::invalidFmt
function
function invalidFmt(): Code { const callFormat = schemaEnv.$async ? _`(${fDef}.async ? await ${format}(${data}) : ${format}(${data}))` : _`${format}(${data})` const validData = _`(typeof ${format} == "function" ? ${callFormat} : ${format}.test(${data}))` return _`${format} &&...
1,286,747
e6bac80987987e42f7e39360b3842270
swh:1:cnt:4b1c13e764375dbb4dff021426a377f8103ab54f;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=42-70/
161a5d1fe2c4ef331ffcc9de2d6d20c69c5fd2ca
wlbdashboard
wmcs
node_modules/workbox-build/node_modules/ajv/lib/vocabularies/format/format.ts
code::validate$DataFormat
function
function validate$DataFormat(): void { const fmts = gen.scopeValue("formats", { ref: self.formats, code: opts.code.formats, }) const fDef = gen.const("fDef", _`${fmts}[${schemaCode}]`) const fType = gen.let("fType") const format = gen.let("format") // TODO simplify ...
1,286,748
1a1bc70fc81de90e904e63983df3c916
swh:1:cnt:4b1c13e764375dbb4dff021426a377f8103ab54f;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=72-116/
161a5d1fe2c4ef331ffcc9de2d6d20c69c5fd2ca
wlbdashboard
wmcs
node_modules/workbox-build/node_modules/ajv/lib/vocabularies/format/format.ts
code::validateFormat
function
function validateFormat(): void { const formatDef: AddedFormat | undefined = self.formats[schema] if (!formatDef) { unknownFormat() return } if (formatDef === true) return const [fmtType, format, fmtRef] = getFormat(formatDef) if (fmtType === ruleType) cxt.pass(validC...
1,286,749
d7d473373b0b8bd88a860b4f0fa7ab39
swh:1:cnt:4b1c13e764375dbb4dff021426a377f8103ab54f;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=58-61/
161a5d1fe2c4ef331ffcc9de2d6d20c69c5fd2ca
wlbdashboard
wmcs
node_modules/workbox-build/node_modules/ajv/lib/vocabularies/format/format.ts
code::validate$DataFormat::unknownFmt
function
function unknownFmt(): Code { if (opts.strictSchema === false) return nil return _`${schemaCode} && !${format}` }
1,286,750
05250261b8566f41236050eabd909bc7
swh:1:cnt:4b1c13e764375dbb4dff021426a377f8103ab54f;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=82-92/
161a5d1fe2c4ef331ffcc9de2d6d20c69c5fd2ca
wlbdashboard
wmcs
node_modules/workbox-build/node_modules/ajv/lib/vocabularies/format/format.ts
code::validateFormat::unknownFormat
function
function unknownFormat(): void { if (opts.strictSchema === false) { self.logger.warn(unknownMsg()) return } throw new Error(unknownMsg()) function unknownMsg(): string { return `unknown format "${schema as string}" ignored in schema at path "${errSchemaPath...
1,286,751
f6d37ce075e12546567a58a9119e9859
swh:1:cnt:4b1c13e764375dbb4dff021426a377f8103ab54f;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=89-91/
161a5d1fe2c4ef331ffcc9de2d6d20c69c5fd2ca
wlbdashboard
wmcs
node_modules/workbox-build/node_modules/ajv/lib/vocabularies/format/format.ts
code::validateFormat::unknownFormat::unknownMsg
function
function unknownMsg(): string { return `unknown format "${schema as string}" ignored in schema at path "${errSchemaPath}"` }
1,286,752
7977a5238a1c67e98a4969e77377c00a
swh:1:cnt:4b1c13e764375dbb4dff021426a377f8103ab54f;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=94-107/
161a5d1fe2c4ef331ffcc9de2d6d20c69c5fd2ca
wlbdashboard
wmcs
node_modules/workbox-build/node_modules/ajv/lib/vocabularies/format/format.ts
code::validateFormat::getFormat
function
function getFormat(fmtDef: AddedFormat): [string, FormatValidate, Code] { const code = fmtDef instanceof RegExp ? regexpCode(fmtDef) : opts.code.formats ? _`${opts.code.formats}${getProperty(schema)}` : undefined const fmt = gen.scopeValue("forma...
1,286,753
89880e74c90711f66c0e90b6dc777132
swh:1:cnt:4b1c13e764375dbb4dff021426a377f8103ab54f;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=109-115/
161a5d1fe2c4ef331ffcc9de2d6d20c69c5fd2ca
wlbdashboard
wmcs
node_modules/workbox-build/node_modules/ajv/lib/vocabularies/format/format.ts
code::validateFormat::validCondition
function
function validCondition(): Code { if (typeof formatDef == "object" && !(formatDef instanceof RegExp) && formatDef.async) { if (!schemaEnv.$async) throw new Error("async format in sync schema") return _`await ${fmtRef}(${data})` } return typeof format == "function" ? _`${fmtRe...
1,286,754
62a90f49bb471068c12b5a4ba579124d
swh:1:cnt:4b1c13e764375dbb4dff021426a377f8103ab54f;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=34-117/
161a5d1fe2c4ef331ffcc9de2d6d20c69c5fd2ca
wlbdashboard
wmcs
node_modules/workbox-build/node_modules/ajv/lib/vocabularies/format/format.ts
code
function
code(cxt: KeywordCxt, ruleType?: string) { const {gen, data, $data, schema, schemaCode, it} = cxt const {opts, errSchemaPath, schemaEnv, self} = it if (!opts.validateFormats) return if ($data) validate$DataFormat() else validateFormat() function validate$DataFormat(): void { const fmts =...
1,286,755
000873b7c6689c4390a00c87963407e8
swh:1:cnt:f487c97f84332592ca90b09d5c046a87afd57f9b;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=9-12/
726eb44c3232b209581c45fec7a9dcdb42179b50
wlbdashboard
wmcs
node_modules/workbox-build/node_modules/ajv/lib/vocabularies/jtd/discriminator.ts
JTDDiscriminatorError
type
type JTDDiscriminatorError = | _JTDTypeError<"discriminator", "object", string> | DiscrErrorObj<DiscrError.Tag> | DiscrErrorObj<DiscrError.Mapping>
1,286,756
b7ab18d7bb4befecb69091b61327afa7
swh:1:cnt:f487c97f84332592ca90b09d5c046a87afd57f9b;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=36-86/
726eb44c3232b209581c45fec7a9dcdb42179b50
wlbdashboard
wmcs
node_modules/workbox-build/node_modules/ajv/lib/vocabularies/jtd/discriminator.ts
code
function
code(cxt: KeywordCxt) { checkMetadata(cxt) const {gen, data, schema, parentSchema} = cxt const [valid, cond] = checkNullableObject(cxt, data) gen.if(cond) validateDiscriminator() gen.elseIf(not(valid)) cxt.error() gen.endIf() cxt.ok(valid) function validateDiscriminator(): void...
1,286,757
63aec2bed85da4697ec5062e25718979
swh:1:cnt:f487c97f84332592ca90b09d5c046a87afd57f9b;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=74-85/
726eb44c3232b209581c45fec7a9dcdb42179b50
wlbdashboard
wmcs
node_modules/workbox-build/node_modules/ajv/lib/vocabularies/jtd/discriminator.ts
code::applyTagSchema
function
function applyTagSchema(schemaProp: string): Name { const _valid = gen.name("valid") cxt.subschema( { keyword: "mapping", schemaProp, jtdDiscriminator: schema, }, _valid ) return _valid }
1,286,758
35c0f8cd33f748600b3bed89a8d27adc
swh:1:cnt:f487c97f84332592ca90b09d5c046a87afd57f9b;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=48-57/
726eb44c3232b209581c45fec7a9dcdb42179b50
wlbdashboard
wmcs
node_modules/workbox-build/node_modules/ajv/lib/vocabularies/jtd/discriminator.ts
code::validateDiscriminator
function
function validateDiscriminator(): void { const tag = gen.const("tag", _`${data}${getProperty(schema)}`) gen.if(_`${tag} === undefined`) cxt.error(false, {discrError: DiscrError.Tag, tag}) gen.elseIf(_`typeof ${tag} == "string"`) validateMapping(tag) gen.else() cxt.error(false, ...
1,286,759
c998702db0d57523719a4336a6509d7f
swh:1:cnt:f487c97f84332592ca90b09d5c046a87afd57f9b;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=59-72/
726eb44c3232b209581c45fec7a9dcdb42179b50
wlbdashboard
wmcs
node_modules/workbox-build/node_modules/ajv/lib/vocabularies/jtd/discriminator.ts
code::validateMapping
function
function validateMapping(tag: Name): void { gen.if(false) for (const tagValue in parentSchema.mapping) { gen.elseIf(_`${tag} === ${tagValue}`) gen.assign(valid, applyTagSchema(tagValue)) } gen.else() cxt.error( false, {discrError: DiscrError.Mapping, tag}, ...
1,286,760
0930e6c14baafe2f169514115d9e1803
swh:1:cnt:983af7c0276ed83cf92e5071a2a8a63ef2d522e4;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=10-10/
9d9dd365b7e1a648818d9df0f6f545eb734bd528
wlbdashboard
wmcs
node_modules/workbox-build/node_modules/ajv/lib/vocabularies/jtd/elements.ts
JTDElementsError
type
type JTDElementsError = _JTDTypeError<"elements", "array", SchemaObject>
1,286,761
7cea9acfe48195cf1fcdb31a8697c27f
swh:1:cnt:983af7c0276ed83cf92e5071a2a8a63ef2d522e4;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=16-29/
9d9dd365b7e1a648818d9df0f6f545eb734bd528
wlbdashboard
wmcs
node_modules/workbox-build/node_modules/ajv/lib/vocabularies/jtd/elements.ts
code
function
code(cxt: KeywordCxt) { checkMetadata(cxt) const {gen, data, schema, it} = cxt if (alwaysValidSchema(it, schema)) return const [valid] = checkNullable(cxt) gen.if(not(valid), () => gen.if( _`Array.isArray(${data})`, () => gen.assign(valid, validateArray(cxt)), () => cxt...
1,286,762
2f92c80fc81e62e8b675fe36f52872ac
swh:1:cnt:75464ff8e13f581679d2b33662f34ac79a23e912;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=7-7/
19fcbf9dd8cb19d81ac7a447b857131cb4288db5
wlbdashboard
wmcs
node_modules/workbox-build/node_modules/ajv/lib/vocabularies/jtd/enum.ts
JTDEnumError
type
type JTDEnumError = ErrorObject<"enum", {allowedValues: string[]}, string[]>
1,286,763
6ed5576830a6e355a31575569a6a9d3e
swh:1:cnt:75464ff8e13f581679d2b33662f34ac79a23e912;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=18-42/
19fcbf9dd8cb19d81ac7a447b857131cb4288db5
wlbdashboard
wmcs
node_modules/workbox-build/node_modules/ajv/lib/vocabularies/jtd/enum.ts
code
function
code(cxt: KeywordCxt) { checkMetadata(cxt) const {gen, data, schema, schemaValue, parentSchema, it} = cxt if (schema.length === 0) throw new Error("enum must have non-empty array") if (schema.length !== new Set(schema).size) throw new Error("enum items must be unique") let valid: Code const isSt...
1,286,764
3781a744877ae65f6fbd34035645adbd
swh:1:cnt:75464ff8e13f581679d2b33662f34ac79a23e912;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=37-41/
19fcbf9dd8cb19d81ac7a447b857131cb4288db5
wlbdashboard
wmcs
node_modules/workbox-build/node_modules/ajv/lib/vocabularies/jtd/enum.ts
code::loopEnum
function
function loopEnum(): void { gen.forOf("v", schemaValue as Code, (v) => gen.if(_`${valid} = ${data} === ${v}`, () => gen.break()) ) }
1,286,765
975ab3db2e129c5d406fdb0931c66b54
swh:1:cnt:5069322588ebc486795ec075e49777888bbd8cdf;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=4-8/
dfa872b5c87c5c74e57e28d3504d50312604277e
wlbdashboard
wmcs
node_modules/workbox-build/node_modules/ajv/lib/vocabularies/jtd/error.ts
_JTDTypeError
type
type _JTDTypeError<K extends string, T extends string, S> = ErrorObject< K, {type: T; nullable: boolean}, S >
1,286,766
02cf7eba56acc89a47857eec017db093
swh:1:cnt:5069322588ebc486795ec075e49777888bbd8cdf;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=10-15/
dfa872b5c87c5c74e57e28d3504d50312604277e
wlbdashboard
wmcs
node_modules/workbox-build/node_modules/ajv/lib/vocabularies/jtd/error.ts
typeError
function
function typeError(t: string): KeywordErrorDefinition { return { message: (cxt) => typeErrorMessage(cxt, t), params: (cxt) => typeErrorParams(cxt, t), } }
1,286,767
ca94a8f516867509714f3acae6d21daa
swh:1:cnt:5069322588ebc486795ec075e49777888bbd8cdf;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=21-23/
dfa872b5c87c5c74e57e28d3504d50312604277e
wlbdashboard
wmcs
node_modules/workbox-build/node_modules/ajv/lib/vocabularies/jtd/error.ts
typeErrorParams
function
function typeErrorParams({parentSchema}: KeywordErrorCxt, t: string): Code { return _`{type: ${t}, nullable: ${!!parentSchema?.nullable}}` }
1,286,768
bde22f82172bd55f4a6d90925b17e2d5
swh:1:cnt:5069322588ebc486795ec075e49777888bbd8cdf;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=17-19/
dfa872b5c87c5c74e57e28d3504d50312604277e
wlbdashboard
wmcs
node_modules/workbox-build/node_modules/ajv/lib/vocabularies/jtd/error.ts
typeErrorMessage
function
function typeErrorMessage({parentSchema}: KeywordErrorCxt, t: string): string { return parentSchema?.nullable ? `must be ${t} or null` : `must be ${t}` }
1,286,769
e9db310e4b5097c99f51ca43aee1330c
swh:1:cnt:f7baebc30788d80498e59328809b6b6a312d3315;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=31-37/
1ef32505a612ce945d30d4f4170bec593f34e8d3
wlbdashboard
wmcs
node_modules/workbox-build/node_modules/ajv/lib/vocabularies/jtd/index.ts
JTDErrorObject
type
type JTDErrorObject = | JTDTypeError | JTDEnumError | JTDElementsError | JTDPropertiesError | JTDDiscriminatorError | JTDValuesError
1,286,770
6ee1c34728d8cb07e69626db708c1e53
swh:1:cnt:19eeb8c7d5b8f6ed1ab794cc0368f67d4be8bb8a;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=8-15/
78f21067ed93eeac98accf3ae562cb8bebe34250
wlbdashboard
wmcs
node_modules/workbox-build/node_modules/ajv/lib/vocabularies/jtd/metadata.ts
code
function
code(cxt: KeywordCxt) { checkMetadata(cxt) const {gen, schema, it} = cxt if (alwaysValidSchema(it, schema)) return const valid = gen.name("valid") cxt.subschema({keyword: "metadata", jtdMetadata: true}, valid) cxt.ok(valid) }
1,286,771
fb1795d8c29e8bf84d0ac0861b6373fc
swh:1:cnt:19eeb8c7d5b8f6ed1ab794cc0368f67d4be8bb8a;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=18-22/
78f21067ed93eeac98accf3ae562cb8bebe34250
wlbdashboard
wmcs
node_modules/workbox-build/node_modules/ajv/lib/vocabularies/jtd/metadata.ts
checkMetadata
function
function checkMetadata({it, keyword}: KeywordCxt, metadata?: boolean): void { if (it.jtdMetadata !== metadata) { throw new Error(`JTD: "${keyword}" cannot be used in this schema location`) } }
1,286,772
b004cb70534eec92c6803bd82380db79
swh:1:cnt:c74b05da72dbd4694ac215d5e5616e9050db283c;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=4-16/
bdfb1e2c983ac1c4fc97f1844652d9bad9325928
wlbdashboard
wmcs
node_modules/workbox-build/node_modules/ajv/lib/vocabularies/jtd/nullable.ts
checkNullable
function
function checkNullable( {gen, data, parentSchema}: KeywordCxt, cond: Code = nil ): [Name, Code] { const valid = gen.name("valid") if (parentSchema.nullable) { gen.let(valid, _`${data} === null`) cond = not(valid) } else { gen.let(valid, false) } return [valid, cond] }
1,286,773
b057474db6f590bf4fd4067b8487b6cd
swh:1:cnt:c74b05da72dbd4694ac215d5e5616e9050db283c;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=18-21/
bdfb1e2c983ac1c4fc97f1844652d9bad9325928
wlbdashboard
wmcs
node_modules/workbox-build/node_modules/ajv/lib/vocabularies/jtd/nullable.ts
checkNullableObject
function
function checkNullableObject(cxt: KeywordCxt, cond: Code): [Name, Code] { const [valid, cond_] = checkNullable(cxt, cond) return [valid, _`${cond_} && typeof ${cxt.data} == "object" && !Array.isArray(${cxt.data})`] }
1,286,774
735c642c781140e487590da2b2d5625a
swh:1:cnt:8e91c8d91874407585b29641f22457822079fd66;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=9-12/
0c9010900c9ac0f592b260e8e2d861bc7cb3e663
wlbdashboard
wmcs
node_modules/workbox-build/node_modules/ajv/lib/vocabularies/jtd/optionalProperties.ts
code
function
code(cxt: KeywordCxt) { if (cxt.parentSchema.properties) return validateProperties(cxt) }
1,286,775
1ee15f186bed100b1817f3c1ec5a7dc2
swh:1:cnt:9dd24c5cd62d46a913d644636fc9eacbb7f8a4fe;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=15-18/
fead8b183e72b2a842e415cd407603f7d661b59c
wlbdashboard
wmcs
node_modules/workbox-build/node_modules/ajv/lib/vocabularies/jtd/properties.ts
PropError
type
enum PropError { Additional = "additional", Missing = "missing", }
1,286,776
ea7d4ddb07fb25ae0a391b8f6ebf52a4
swh:1:cnt:9dd24c5cd62d46a913d644636fc9eacbb7f8a4fe;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=24-27/
fead8b183e72b2a842e415cd407603f7d661b59c
wlbdashboard
wmcs
node_modules/workbox-build/node_modules/ajv/lib/vocabularies/jtd/properties.ts
JTDPropertiesError
type
type JTDPropertiesError = | _JTDTypeError<PropKeyword, "object", PropSchema> | ErrorObject<PropKeyword, {error: PropError.Additional; additionalProperty: string}, PropSchema> | ErrorObject<PropKeyword, {error: PropError.Missing; missingProperty: string}, PropSchema>
1,286,777
a2550f55bd8f30a7bd4d3609d542e60f
swh:1:cnt:9dd24c5cd62d46a913d644636fc9eacbb7f8a4fe;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=22-22/
fead8b183e72b2a842e415cd407603f7d661b59c
wlbdashboard
wmcs
node_modules/workbox-build/node_modules/ajv/lib/vocabularies/jtd/properties.ts
PropSchema
type
type PropSchema = {[P in string]?: SchemaObject}
1,286,778
96ecb615843f8f0a5f98ff1d63eeb4b3
swh:1:cnt:9dd24c5cd62d46a913d644636fc9eacbb7f8a4fe;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=20-20/
fead8b183e72b2a842e415cd407603f7d661b59c
wlbdashboard
wmcs
node_modules/workbox-build/node_modules/ajv/lib/vocabularies/jtd/properties.ts
PropKeyword
type
type PropKeyword = "properties" | "optionalProperties"
1,286,779
4ea62d8847352ee15f5705842ff34fdf
swh:1:cnt:9dd24c5cd62d46a913d644636fc9eacbb7f8a4fe;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=60-182/
fead8b183e72b2a842e415cd407603f7d661b59c
wlbdashboard
wmcs
node_modules/workbox-build/node_modules/ajv/lib/vocabularies/jtd/properties.ts
validateProperties
function
function validateProperties(cxt: KeywordCxt): void { checkMetadata(cxt) const {gen, data, parentSchema, it} = cxt const {additionalProperties, nullable} = parentSchema if (it.jtdDiscriminator && nullable) throw new Error("JTD: nullable inside discriminator mapping") if (commonProperties()) { throw new Err...
1,286,780
27de58bdca6d4c824e624c041495c48c
swh:1:cnt:9dd24c5cd62d46a913d644636fc9eacbb7f8a4fe;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=97-105/
fead8b183e72b2a842e415cd407603f7d661b59c
wlbdashboard
wmcs
node_modules/workbox-build/node_modules/ajv/lib/vocabularies/jtd/properties.ts
validateProperties::schemaProperties
function
function schemaProperties(keyword: string): [string[], string[]] { const schema = parentSchema[keyword] const allPs = schema ? allSchemaProperties(schema) : [] if (it.jtdDiscriminator && allPs.some((p) => p === it.jtdDiscriminator)) { throw new Error(`JTD: discriminator tag used in ${keyword}`) } ...
1,286,781
138ab369eee56da923ce476dd26547ac
swh:1:cnt:9dd24c5cd62d46a913d644636fc9eacbb7f8a4fe;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=87-95/
fead8b183e72b2a842e415cd407603f7d661b59c
wlbdashboard
wmcs
node_modules/workbox-build/node_modules/ajv/lib/vocabularies/jtd/properties.ts
validateProperties::commonProperties
function
function commonProperties(): boolean { const props = parentSchema.properties as Record<string, any> | undefined const optProps = parentSchema.optionalProperties as Record<string, any> | undefined if (!(props && optProps)) return false for (const p in props) { if (Object.prototype.hasOwnProperty.ca...
1,286,782
a20f8473a70392a01d2ddc6816852c2c
swh:1:cnt:9dd24c5cd62d46a913d644636fc9eacbb7f8a4fe;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=107-126/
fead8b183e72b2a842e415cd407603f7d661b59c
wlbdashboard
wmcs
node_modules/workbox-build/node_modules/ajv/lib/vocabularies/jtd/properties.ts
validateProperties::validateProps
function
function validateProps(props: string[], keyword: string, required?: boolean): void { const _valid = gen.var("valid") for (const prop of props) { gen.if( propertyInData(gen, data, prop, it.opts.ownProperties), () => applyPropertySchema(prop, keyword, _valid), () => missingProperty(p...
1,286,783
3ca49b3b4026d2916f0e8c57a5aab68c
swh:1:cnt:9dd24c5cd62d46a913d644636fc9eacbb7f8a4fe;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=118-125/
fead8b183e72b2a842e415cd407603f7d661b59c
wlbdashboard
wmcs
node_modules/workbox-build/node_modules/ajv/lib/vocabularies/jtd/properties.ts
validateProperties::validateProps::missingProperty
function
function missingProperty(prop: string): void { if (required) { gen.assign(_valid, false) cxt.error(false, {propError: PropError.Missing, missingProperty: prop}, {schemaPath: prop}) } else { gen.assign(_valid, true) } }
1,286,784
1895290ec13730a014e2f973f663457a
swh:1:cnt:9dd24c5cd62d46a913d644636fc9eacbb7f8a4fe;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=128-137/
fead8b183e72b2a842e415cd407603f7d661b59c
wlbdashboard
wmcs
node_modules/workbox-build/node_modules/ajv/lib/vocabularies/jtd/properties.ts
validateProperties::applyPropertySchema
function
function applyPropertySchema(prop: string, keyword: string, _valid: Name): void { cxt.subschema( { keyword, schemaProp: prop, dataProp: prop, }, _valid ) }
1,286,785
1a9532af1a3d0ef45d358fe44118d799
swh:1:cnt:9dd24c5cd62d46a913d644636fc9eacbb7f8a4fe;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=139-158/
fead8b183e72b2a842e415cd407603f7d661b59c
wlbdashboard
wmcs
node_modules/workbox-build/node_modules/ajv/lib/vocabularies/jtd/properties.ts
validateProperties::validateAdditional
function
function validateAdditional(): void { gen.forIn("key", data, (key: Name) => { const addProp = isAdditional(key, allProps, "properties", it.jtdDiscriminator) const addOptProp = isAdditional(key, allOptProps, "optionalProperties") const extra = addProp === true ? addOptProp : addOptProp === ...
1,286,786
10e53ed16191dc9578d630a2b952f93a
swh:1:cnt:9dd24c5cd62d46a913d644636fc9eacbb7f8a4fe;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=160-181/
fead8b183e72b2a842e415cd407603f7d661b59c
wlbdashboard
wmcs
node_modules/workbox-build/node_modules/ajv/lib/vocabularies/jtd/properties.ts
validateProperties::isAdditional
function
function isAdditional( key: Name, props: string[], keyword: string, jtdDiscriminator?: string ): Code | true { let additional: Code | boolean if (props.length > 8) { // TODO maybe an option instead of hard-coded 8? const propsSchema = schemaRefOrVal(it, parentSchema[keyword], keywo...
1,286,787
219f2d30546687119e8a530175832289
swh:1:cnt:97646ee1b68885bf004ce2e629421abac07a991d;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=38-47/
ce4f2df82c2bd10c63de8b83ed7a880e19d21cf0
wlbdashboard
wmcs
node_modules/workbox-build/node_modules/ajv/lib/vocabularies/jtd/ref.ts
code::callValidate
function
function callValidate(schema: AnySchemaObject): void { const sch = compileSchema.call( it.self, new SchemaEnv({schema, root, schemaPath: `/definitions/${ref}`}) ) const v = getValidate(cxt, sch) const errsCount = gen.const("_errs", N.errors) callRef(cxt, v, sch, sch.$async)...
1,286,788
d10576fa239619f17e88fd0563d2db57
swh:1:cnt:97646ee1b68885bf004ce2e629421abac07a991d;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=29-36/
ce4f2df82c2bd10c63de8b83ed7a880e19d21cf0
wlbdashboard
wmcs
node_modules/workbox-build/node_modules/ajv/lib/vocabularies/jtd/ref.ts
code::validateJtdRef
function
function validateJtdRef(): void { const refSchema = (root.schema as AnySchemaObject).definitions?.[ref] if (!refSchema) { throw new MissingRefError(it.opts.uriResolver, "", ref, `No definition ${ref}`) } if (hasRef(refSchema) || !it.opts.inlineRefs) callValidate(refSchema) else inl...
1,286,789
e926339df720988105c8d8d3b4b2fc80
swh:1:cnt:97646ee1b68885bf004ce2e629421abac07a991d;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=49-64/
ce4f2df82c2bd10c63de8b83ed7a880e19d21cf0
wlbdashboard
wmcs
node_modules/workbox-build/node_modules/ajv/lib/vocabularies/jtd/ref.ts
code::inlineRefSchema
function
function inlineRefSchema(schema: AnySchemaObject): void { const schName = gen.scopeValue( "schema", it.opts.code.source === true ? {ref: schema, code: stringify(schema)} : {ref: schema} ) cxt.subschema( { schema, dataTypes: [], schemaPath: nil, ...
1,286,790
d9e8c1a125b8d0003f1e95962317906d
swh:1:cnt:97646ee1b68885bf004ce2e629421abac07a991d;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=68-74/
ce4f2df82c2bd10c63de8b83ed7a880e19d21cf0
wlbdashboard
wmcs
node_modules/workbox-build/node_modules/ajv/lib/vocabularies/jtd/ref.ts
hasRef
function
function hasRef(schema: AnySchemaObject): boolean { for (const key in schema) { let sch: AnySchemaObject if (key === "ref" || (typeof (sch = schema[key]) == "object" && hasRef(sch))) return true } return false }
1,286,791
c99ecba2b23ef09be881d0dff7e0e67d
swh:1:cnt:97646ee1b68885bf004ce2e629421abac07a991d;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=13-65/
ce4f2df82c2bd10c63de8b83ed7a880e19d21cf0
wlbdashboard
wmcs
node_modules/workbox-build/node_modules/ajv/lib/vocabularies/jtd/ref.ts
code
function
code(cxt: KeywordCxt) { checkMetadata(cxt) const {gen, data, schema: ref, parentSchema, it} = cxt const { schemaEnv: {root}, } = it const valid = gen.name("valid") if (parentSchema.nullable) { gen.var(valid, _`${data} === null`) gen.if(not(valid), validateJtdRef) } else { ...
1,286,792
8b4a0e39cff64536a331a8ae3cf69b4a
swh:1:cnt:17274300b70b11b72977a965a4410f21a8f0f19c;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=9-9/
230497e77b9622dff4f46d8113495789b6edb6ef
wlbdashboard
wmcs
node_modules/workbox-build/node_modules/ajv/lib/vocabularies/jtd/type.ts
JTDTypeError
type
type JTDTypeError = _JTDTypeError<"type", JTDType, JTDType>
1,286,793
28373106ab6b4a8c7ea2899cf5465b78
swh:1:cnt:17274300b70b11b72977a965a4410f21a8f0f19c;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=11-11/
230497e77b9622dff4f46d8113495789b6edb6ef
wlbdashboard
wmcs
node_modules/workbox-build/node_modules/ajv/lib/vocabularies/jtd/type.ts
IntType
type
type IntType = "int8" | "uint8" | "int16" | "uint16" | "int32" | "uint32"
1,286,794
0e79877fac636ae128ae1836486903b3
swh:1:cnt:17274300b70b11b72977a965a4410f21a8f0f19c;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=22-22/
230497e77b9622dff4f46d8113495789b6edb6ef
wlbdashboard
wmcs
node_modules/workbox-build/node_modules/ajv/lib/vocabularies/jtd/type.ts
JTDType
type
type JTDType = "boolean" | "string" | "timestamp" | "float32" | "float64" | IntType
1,286,795
8a63685da578fb6ed0d162cada831a18
swh:1:cnt:17274300b70b11b72977a965a4410f21a8f0f19c;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=29-37/
230497e77b9622dff4f46d8113495789b6edb6ef
wlbdashboard
wmcs
node_modules/workbox-build/node_modules/ajv/lib/vocabularies/jtd/type.ts
timestampCode
function
function timestampCode(cxt: KeywordCxt): Code { const {gen, data, it} = cxt const {timestamp, allowDate} = it.opts if (timestamp === "date") return _`${data} instanceof Date ` const vts = useFunc(gen, validTimestamp) const allowDateArg = allowDate ? _`, true` : nil const validString = _`typeof ${data} == "s...
1,286,796
281cbedacc92186b51e0b8bd24a135c2
swh:1:cnt:17274300b70b11b72977a965a4410f21a8f0f19c;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=43-72/
230497e77b9622dff4f46d8113495789b6edb6ef
wlbdashboard
wmcs
node_modules/workbox-build/node_modules/ajv/lib/vocabularies/jtd/type.ts
code
function
code(cxt: KeywordCxt) { checkMetadata(cxt) const {data, schema, parentSchema, it} = cxt let cond: Code switch (schema) { case "boolean": case "string": cond = _`typeof ${data} == ${schema}` break case "timestamp": { cond = timestampCode(cxt) break ...
1,286,797
66b09bd9c1c4c1ffba302de8b9405788
swh:1:cnt:e64945077647a81d99a6460ae6e86b5394c250c4;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=9-9/
9d5c4f61f7f8878fd493a22f2a37b3194ce6a1c9
wlbdashboard
wmcs
node_modules/workbox-build/node_modules/ajv/lib/vocabularies/jtd/values.ts
JTDValuesError
type
type JTDValuesError = _JTDTypeError<"values", "object", SchemaObject>
1,286,798
070c8ac79c6c428ff5c4367d97bb8c63
swh:1:cnt:e64945077647a81d99a6460ae6e86b5394c250c4;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=15-55/
9d5c4f61f7f8878fd493a22f2a37b3194ce6a1c9
wlbdashboard
wmcs
node_modules/workbox-build/node_modules/ajv/lib/vocabularies/jtd/values.ts
code
function
code(cxt: KeywordCxt) { checkMetadata(cxt) const {gen, data, schema, it} = cxt const [valid, cond] = checkNullableObject(cxt, data) if (alwaysValidSchema(it, schema)) { gen.if(not(or(cond, valid)), () => cxt.error()) } else { gen.if(cond) gen.assign(valid, validateMap()) gen....
1,286,799
f9363199809f391c3d810a0acc5e8689
swh:1:cnt:e64945077647a81d99a6460ae6e86b5394c250c4;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=41-53/
9d5c4f61f7f8878fd493a22f2a37b3194ce6a1c9
wlbdashboard
wmcs
node_modules/workbox-build/node_modules/ajv/lib/vocabularies/jtd/values.ts
code::validateMap::validateValues
function
function validateValues(notValid: () => void): void { gen.forIn("key", data, (key) => { cxt.subschema( { keyword: "values", dataProp: key, dataPropType: Type.Str, }, _valid ) gen.if(not(_valid), notValid)...