oxlint 1.76.0 → 1.78.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/configuration_schema.json +286 -21
- package/dist/bindings.js +391 -326
- package/dist/index.d.ts +105 -9
- package/dist/lint.js +1013 -818
- package/dist/plugins-dev.d.ts +1 -1
- package/dist/plugins-dev.js +15 -15
- package/dist/plugins.js +1 -1
- package/dist/workspace2.js +2 -1
- package/package.json +20 -20
package/dist/lint.js
CHANGED
|
@@ -9,7 +9,7 @@ var __create = Object.create, __defProp = Object.defineProperty, __getOwnPropDes
|
|
|
9
9
|
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
10
10
|
});
|
|
11
11
|
return to;
|
|
12
|
-
}, __toESM = (mod, isNodeMode, target) => (target = mod == null ? {} : __create(__getProtoOf(mod)), __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
|
|
12
|
+
}, __toESM = (mod, isNodeMode, target) => (target = mod == null ? {} : __create(__getProtoOf(mod)), __copyProps(isNodeMode || !mod || !mod.__esModule || !__hasOwnProp.call(mod, "default") ? __defProp(target, "default", {
|
|
13
13
|
value: mod,
|
|
14
14
|
enumerable: !0
|
|
15
15
|
}) : target, mod)), __require = /* @__PURE__ */ createRequire(import.meta.url);
|
|
@@ -329,7 +329,7 @@ var keys_default = freeze({
|
|
|
329
329
|
});
|
|
330
330
|
//#endregion
|
|
331
331
|
//#region src-js/plugins/location.ts
|
|
332
|
-
const ObjectDefineProperty$4 = Object.defineProperty, ArrayIsArray$
|
|
332
|
+
const ObjectDefineProperty$4 = Object.defineProperty, ArrayIsArray$5 = Array.isArray, LINE_BREAK_PATTERN = /\r\n|[\r\n\u2028\u2029]/gu, lines = [], lineStartIndices = [0], cachedLocations = [];
|
|
333
333
|
let activeLocationsCount = 0;
|
|
334
334
|
/**
|
|
335
335
|
* Split source text into lines.
|
|
@@ -486,7 +486,7 @@ function traverse(node) {
|
|
|
486
486
|
let keys = keys_default[node.type];
|
|
487
487
|
for (let keyIndex = 0, keysLen = keys.length; keyIndex < keysLen; keyIndex++) {
|
|
488
488
|
let child = node[keys[keyIndex]];
|
|
489
|
-
if (ArrayIsArray$
|
|
489
|
+
if (ArrayIsArray$5(child)) for (let arrIndex = 0, arrLen = child.length; arrIndex < arrLen; arrIndex++) {
|
|
490
490
|
let entry = child[arrIndex];
|
|
491
491
|
if (entry !== null) {
|
|
492
492
|
if (entry.start > index) break;
|
|
@@ -810,7 +810,7 @@ function resetComments() {
|
|
|
810
810
|
}
|
|
811
811
|
//#endregion
|
|
812
812
|
//#region src-js/generated/deserialize.js
|
|
813
|
-
const BufferPrototype$1 = Buffer.prototype, ObjectCreate$1 = Object.create, ObjectPrototype = Object.prototype, StringFromCodePoint = String.fromCodePoint
|
|
813
|
+
const BufferPrototype$1 = Buffer.prototype, ObjectCreate$1 = Object.create, ObjectPrototype = Object.prototype, StringFromCodePoint = String.fromCodePoint;
|
|
814
814
|
let uint8, int32, float64, sourceText$1, sourceTextLatin, sourceStartPos$1 = 0, firstNonAsciiPos = 0, parent = null;
|
|
815
815
|
const { fromCharCode } = String, { utf8Slice: utf8Slice$1, latin1Slice } = BufferPrototype$1, stringDecodeArrays = Array(65).fill(null);
|
|
816
816
|
for (let i = 0; i <= 64; i++) stringDecodeArrays[i] = Array(i).fill(0);
|
|
@@ -1765,15 +1765,18 @@ function deserializeStatement(pos) {
|
|
|
1765
1765
|
case 35: return deserializeBoxTSTypeAliasDeclaration(pos + 8);
|
|
1766
1766
|
case 36: return deserializeBoxTSInterfaceDeclaration(pos + 8);
|
|
1767
1767
|
case 37: return deserializeBoxTSEnumDeclaration(pos + 8);
|
|
1768
|
-
case 38: return
|
|
1769
|
-
case 39: return
|
|
1770
|
-
case 40: return
|
|
1768
|
+
case 38: return deserializeBoxTSExternalModuleDeclaration(pos + 8);
|
|
1769
|
+
case 39: return deserializeBoxTSNamespaceDeclaration(pos + 8);
|
|
1770
|
+
case 40: return deserializeBoxTSGlobalDeclaration(pos + 8);
|
|
1771
|
+
case 41: return deserializeBoxTSImportEqualsDeclaration(pos + 8);
|
|
1771
1772
|
case 64: return deserializeBoxImportDeclaration(pos + 8);
|
|
1772
1773
|
case 65: return deserializeBoxExportAllDeclaration(pos + 8);
|
|
1773
1774
|
case 66: return deserializeBoxExportDefaultDeclaration(pos + 8);
|
|
1774
|
-
case 67: return
|
|
1775
|
-
case 68: return
|
|
1776
|
-
case 69: return
|
|
1775
|
+
case 67: return deserializeBoxExportDeclaration(pos + 8);
|
|
1776
|
+
case 68: return deserializeBoxExportNamedDeclaration(pos + 8);
|
|
1777
|
+
case 69: return deserializeBoxExportFromDeclaration(pos + 8);
|
|
1778
|
+
case 70: return deserializeBoxTSExportAssignment(pos + 8);
|
|
1779
|
+
case 71: return deserializeBoxTSNamespaceExportDeclaration(pos + 8);
|
|
1777
1780
|
default: throw Error(`Unexpected discriminant ${uint8[pos]} for Statement`);
|
|
1778
1781
|
}
|
|
1779
1782
|
}
|
|
@@ -1810,9 +1813,10 @@ function deserializeDeclaration(pos) {
|
|
|
1810
1813
|
case 35: return deserializeBoxTSTypeAliasDeclaration(pos + 8);
|
|
1811
1814
|
case 36: return deserializeBoxTSInterfaceDeclaration(pos + 8);
|
|
1812
1815
|
case 37: return deserializeBoxTSEnumDeclaration(pos + 8);
|
|
1813
|
-
case 38: return
|
|
1814
|
-
case 39: return
|
|
1815
|
-
case 40: return
|
|
1816
|
+
case 38: return deserializeBoxTSExternalModuleDeclaration(pos + 8);
|
|
1817
|
+
case 39: return deserializeBoxTSNamespaceDeclaration(pos + 8);
|
|
1818
|
+
case 40: return deserializeBoxTSGlobalDeclaration(pos + 8);
|
|
1819
|
+
case 41: return deserializeBoxTSImportEqualsDeclaration(pos + 8);
|
|
1816
1820
|
default: throw Error(`Unexpected discriminant ${uint8[pos]} for Declaration`);
|
|
1817
1821
|
}
|
|
1818
1822
|
}
|
|
@@ -1846,7 +1850,7 @@ function deserializeVariableDeclarator(pos) {
|
|
|
1846
1850
|
type: "VariableDeclarator",
|
|
1847
1851
|
id: null,
|
|
1848
1852
|
init: null,
|
|
1849
|
-
definite: deserializeBool(pos +
|
|
1853
|
+
definite: deserializeBool(pos + 12),
|
|
1850
1854
|
start: start = deserializeI32(pos),
|
|
1851
1855
|
end: end = deserializeI32(pos + 4),
|
|
1852
1856
|
range: [start, end],
|
|
@@ -2412,12 +2416,62 @@ function deserializeFunctionBody(pos) {
|
|
|
2412
2416
|
}, body = deserializeVecDirective(pos + 16);
|
|
2413
2417
|
return body.push(...deserializeVecStatement(pos + 40)), node.body = body, parent = previousParent, node;
|
|
2414
2418
|
}
|
|
2419
|
+
function deserializeArrowFunctionBody(pos) {
|
|
2420
|
+
switch (uint8[pos]) {
|
|
2421
|
+
case 0: return deserializeBoxBooleanLiteral(pos + 8);
|
|
2422
|
+
case 1: return deserializeBoxNullLiteral(pos + 8);
|
|
2423
|
+
case 2: return deserializeBoxNumericLiteral(pos + 8);
|
|
2424
|
+
case 3: return deserializeBoxBigIntLiteral(pos + 8);
|
|
2425
|
+
case 4: return deserializeBoxRegExpLiteral(pos + 8);
|
|
2426
|
+
case 5: return deserializeBoxStringLiteral(pos + 8);
|
|
2427
|
+
case 6: return deserializeBoxTemplateLiteral(pos + 8);
|
|
2428
|
+
case 7: return deserializeBoxIdentifierReference(pos + 8);
|
|
2429
|
+
case 8: return deserializeBoxSuper(pos + 8);
|
|
2430
|
+
case 9: return deserializeBoxArrayExpression(pos + 8);
|
|
2431
|
+
case 10: return deserializeBoxArrowFunctionExpression(pos + 8);
|
|
2432
|
+
case 11: return deserializeBoxAssignmentExpression(pos + 8);
|
|
2433
|
+
case 12: return deserializeBoxAwaitExpression(pos + 8);
|
|
2434
|
+
case 13: return deserializeBoxBinaryExpression(pos + 8);
|
|
2435
|
+
case 14: return deserializeBoxCallExpression(pos + 8);
|
|
2436
|
+
case 15: return deserializeBoxChainExpression(pos + 8);
|
|
2437
|
+
case 16: return deserializeBoxClass(pos + 8);
|
|
2438
|
+
case 17: return deserializeBoxConditionalExpression(pos + 8);
|
|
2439
|
+
case 18: return deserializeBoxFunction(pos + 8);
|
|
2440
|
+
case 19: return deserializeBoxImportExpression(pos + 8);
|
|
2441
|
+
case 20: return deserializeBoxLogicalExpression(pos + 8);
|
|
2442
|
+
case 21: return deserializeBoxNewExpression(pos + 8);
|
|
2443
|
+
case 22: return deserializeBoxObjectExpression(pos + 8);
|
|
2444
|
+
case 23: return deserializeBoxParenthesizedExpression(pos + 8);
|
|
2445
|
+
case 24: return deserializeBoxSequenceExpression(pos + 8);
|
|
2446
|
+
case 25: return deserializeBoxTaggedTemplateExpression(pos + 8);
|
|
2447
|
+
case 26: return deserializeBoxThisExpression(pos + 8);
|
|
2448
|
+
case 27: return deserializeBoxUnaryExpression(pos + 8);
|
|
2449
|
+
case 28: return deserializeBoxUpdateExpression(pos + 8);
|
|
2450
|
+
case 29: return deserializeBoxYieldExpression(pos + 8);
|
|
2451
|
+
case 30: return deserializeBoxPrivateInExpression(pos + 8);
|
|
2452
|
+
case 31: return deserializeBoxImportMeta(pos + 8);
|
|
2453
|
+
case 32: return deserializeBoxNewTarget(pos + 8);
|
|
2454
|
+
case 33: return deserializeBoxJSXElement(pos + 8);
|
|
2455
|
+
case 34: return deserializeBoxJSXFragment(pos + 8);
|
|
2456
|
+
case 35: return deserializeBoxTSAsExpression(pos + 8);
|
|
2457
|
+
case 36: return deserializeBoxTSSatisfiesExpression(pos + 8);
|
|
2458
|
+
case 37: return deserializeBoxTSTypeAssertion(pos + 8);
|
|
2459
|
+
case 38: return deserializeBoxTSNonNullExpression(pos + 8);
|
|
2460
|
+
case 39: return deserializeBoxTSInstantiationExpression(pos + 8);
|
|
2461
|
+
case 40: return deserializeBoxV8IntrinsicExpression(pos + 8);
|
|
2462
|
+
case 48: return deserializeBoxComputedMemberExpression(pos + 8);
|
|
2463
|
+
case 49: return deserializeBoxStaticMemberExpression(pos + 8);
|
|
2464
|
+
case 50: return deserializeBoxPrivateFieldExpression(pos + 8);
|
|
2465
|
+
case 64: return deserializeBoxFunctionBody(pos + 8);
|
|
2466
|
+
default: throw Error(`Unexpected discriminant ${uint8[pos]} for ArrowFunctionBody`);
|
|
2467
|
+
}
|
|
2468
|
+
}
|
|
2415
2469
|
function deserializeArrowFunctionExpression(pos) {
|
|
2416
|
-
let
|
|
2470
|
+
let start, end, previousParent = parent, node = parent = {
|
|
2417
2471
|
__proto__: NodeProto,
|
|
2418
2472
|
type: "ArrowFunctionExpression",
|
|
2419
|
-
expression,
|
|
2420
|
-
async: deserializeBool(pos +
|
|
2473
|
+
expression: uint8[pos + 40] !== 64,
|
|
2474
|
+
async: deserializeBool(pos + 56),
|
|
2421
2475
|
typeParameters: null,
|
|
2422
2476
|
params: null,
|
|
2423
2477
|
returnType: null,
|
|
@@ -2428,8 +2482,8 @@ function deserializeArrowFunctionExpression(pos) {
|
|
|
2428
2482
|
end: end = deserializeI32(pos + 4),
|
|
2429
2483
|
range: [start, end],
|
|
2430
2484
|
parent
|
|
2431
|
-
}
|
|
2432
|
-
return
|
|
2485
|
+
};
|
|
2486
|
+
return node.typeParameters = deserializeOptionBoxTSTypeParameterDeclaration(pos + 16), node.params = deserializeBoxFormalParameters(pos + 24), node.returnType = deserializeOptionBoxTSTypeAnnotation(pos + 32), node.body = deserializeArrowFunctionBody(pos + 40), parent = previousParent, node;
|
|
2433
2487
|
}
|
|
2434
2488
|
function deserializeYieldExpression(pos) {
|
|
2435
2489
|
let start, end, previousParent = parent, node = parent = {
|
|
@@ -2461,8 +2515,8 @@ function deserializeClass(pos) {
|
|
|
2461
2515
|
end: end = deserializeI32(pos + 4),
|
|
2462
2516
|
range: [start, end],
|
|
2463
2517
|
parent
|
|
2464
|
-
};
|
|
2465
|
-
return node.decorators = deserializeVecDecorator(pos + 16), node.id = deserializeOptionBindingIdentifier(pos + 40), node.typeParameters = deserializeOptionBoxTSTypeParameterDeclaration(pos + 72), node.superClass =
|
|
2518
|
+
}, superClass = deserializeOptionExpression(pos + 80);
|
|
2519
|
+
return node.decorators = deserializeVecDecorator(pos + 16), node.id = deserializeOptionBindingIdentifier(pos + 40), node.typeParameters = deserializeOptionBoxTSTypeParameterDeclaration(pos + 72), node.superClass = superClass, node.superTypeArguments = superClass === null ? null : deserializeOptionBoxTSTypeParameterInstantiation(pos + 80 + (pos + 16 - pos)), node.implements = deserializeVecTSClassImplements(pos + 104), node.body = deserializeBoxClassBody(pos + 128), parent = previousParent, node;
|
|
2466
2520
|
}
|
|
2467
2521
|
function deserializeClassType(pos) {
|
|
2468
2522
|
switch (uint8[pos]) {
|
|
@@ -2721,7 +2775,39 @@ function deserializeImportAttributeKey(pos) {
|
|
|
2721
2775
|
default: throw Error(`Unexpected discriminant ${uint8[pos]} for ImportAttributeKey`);
|
|
2722
2776
|
}
|
|
2723
2777
|
}
|
|
2778
|
+
function deserializeExportDeclaration(pos) {
|
|
2779
|
+
let start, end, previousParent = parent, node = parent = {
|
|
2780
|
+
__proto__: NodeProto,
|
|
2781
|
+
type: "ExportNamedDeclaration",
|
|
2782
|
+
declaration: null,
|
|
2783
|
+
specifiers: [],
|
|
2784
|
+
source: null,
|
|
2785
|
+
exportKind: null,
|
|
2786
|
+
attributes: [],
|
|
2787
|
+
start: start = deserializeI32(pos),
|
|
2788
|
+
end: end = deserializeI32(pos + 4),
|
|
2789
|
+
range: [start, end],
|
|
2790
|
+
parent
|
|
2791
|
+
}, declaration = deserializeDeclaration(pos + 16);
|
|
2792
|
+
return node.declaration = declaration, node.exportKind = declaration.declare === !0 || declaration.type === "TSTypeAliasDeclaration" || declaration.type === "TSInterfaceDeclaration" ? "type" : "value", parent = previousParent, node;
|
|
2793
|
+
}
|
|
2724
2794
|
function deserializeExportNamedDeclaration(pos) {
|
|
2795
|
+
let start, end, previousParent = parent, node = parent = {
|
|
2796
|
+
__proto__: NodeProto,
|
|
2797
|
+
type: "ExportNamedDeclaration",
|
|
2798
|
+
declaration: null,
|
|
2799
|
+
specifiers: null,
|
|
2800
|
+
source: null,
|
|
2801
|
+
exportKind: deserializeImportOrExportKind(pos + 12),
|
|
2802
|
+
attributes: [],
|
|
2803
|
+
start: start = deserializeI32(pos),
|
|
2804
|
+
end: end = deserializeI32(pos + 4),
|
|
2805
|
+
range: [start, end],
|
|
2806
|
+
parent
|
|
2807
|
+
};
|
|
2808
|
+
return node.specifiers = deserializeVecExportSpecifier(pos + 16), parent = previousParent, node;
|
|
2809
|
+
}
|
|
2810
|
+
function deserializeExportFromDeclaration(pos) {
|
|
2725
2811
|
let start, end, previousParent = parent, node = parent = {
|
|
2726
2812
|
__proto__: NodeProto,
|
|
2727
2813
|
type: "ExportNamedDeclaration",
|
|
@@ -2734,8 +2820,8 @@ function deserializeExportNamedDeclaration(pos) {
|
|
|
2734
2820
|
end: end = deserializeI32(pos + 4),
|
|
2735
2821
|
range: [start, end],
|
|
2736
2822
|
parent
|
|
2737
|
-
}, withClause = deserializeOptionBoxWithClause(pos +
|
|
2738
|
-
return node.
|
|
2823
|
+
}, withClause = deserializeOptionBoxWithClause(pos + 88);
|
|
2824
|
+
return node.specifiers = deserializeVecExportSpecifier(pos + 16), node.source = deserializeStringLiteral(pos + 40), node.attributes = withClause === null ? [] : withClause.attributes, parent = previousParent, node;
|
|
2739
2825
|
}
|
|
2740
2826
|
function deserializeExportDefaultDeclaration(pos) {
|
|
2741
2827
|
let start, end, previousParent = parent, node = parent = {
|
|
@@ -3967,7 +4053,7 @@ function deserializeTSIndexSignature(pos) {
|
|
|
3967
4053
|
range: [start, end],
|
|
3968
4054
|
parent
|
|
3969
4055
|
};
|
|
3970
|
-
return node.parameters =
|
|
4056
|
+
return node.parameters = [deserializeTSIndexSignatureName(pos + 16)], node.typeAnnotation = deserializeBoxTSTypeAnnotation(pos + 56), parent = previousParent, node;
|
|
3971
4057
|
}
|
|
3972
4058
|
function deserializeTSCallSignatureDeclaration(pos) {
|
|
3973
4059
|
let start, end, previousParent = parent, node = parent = {
|
|
@@ -4051,8 +4137,41 @@ function deserializeTSInterfaceHeritage(pos) {
|
|
|
4051
4137
|
end: end = deserializeI32(pos + 4),
|
|
4052
4138
|
range: [start, end],
|
|
4053
4139
|
parent
|
|
4054
|
-
};
|
|
4055
|
-
|
|
4140
|
+
}, expression = deserializeTSTypeName(pos + 16);
|
|
4141
|
+
if (expression.type === "TSQualifiedName") {
|
|
4142
|
+
let object = expression.left, { right } = expression, start, end, previous = expression = {
|
|
4143
|
+
__proto__: NodeProto,
|
|
4144
|
+
type: "MemberExpression",
|
|
4145
|
+
object,
|
|
4146
|
+
property: right,
|
|
4147
|
+
optional: !1,
|
|
4148
|
+
computed: !1,
|
|
4149
|
+
start: start = expression.start,
|
|
4150
|
+
end: end = expression.end,
|
|
4151
|
+
range: [start, end],
|
|
4152
|
+
parent
|
|
4153
|
+
};
|
|
4154
|
+
for (right.parent = previous;;) {
|
|
4155
|
+
if (object.type !== "TSQualifiedName") {
|
|
4156
|
+
object.parent = previous;
|
|
4157
|
+
break;
|
|
4158
|
+
}
|
|
4159
|
+
let { left, right } = object;
|
|
4160
|
+
previous = previous.object = {
|
|
4161
|
+
__proto__: NodeProto,
|
|
4162
|
+
type: "MemberExpression",
|
|
4163
|
+
object: left,
|
|
4164
|
+
property: right,
|
|
4165
|
+
optional: !1,
|
|
4166
|
+
computed: !1,
|
|
4167
|
+
start: start = object.start,
|
|
4168
|
+
end: end = object.end,
|
|
4169
|
+
range: [start, end],
|
|
4170
|
+
parent: previous
|
|
4171
|
+
}, right.parent = previous, object = left;
|
|
4172
|
+
}
|
|
4173
|
+
}
|
|
4174
|
+
return node.expression = expression, node.typeArguments = deserializeOptionBoxTSTypeParameterInstantiation(pos + 32), parent = previousParent, node;
|
|
4056
4175
|
}
|
|
4057
4176
|
function deserializeTSTypePredicate(pos) {
|
|
4058
4177
|
let start, end, previousParent = parent, node = parent = {
|
|
@@ -4075,12 +4194,28 @@ function deserializeTSTypePredicateName(pos) {
|
|
|
4075
4194
|
default: throw Error(`Unexpected discriminant ${uint8[pos]} for TSTypePredicateName`);
|
|
4076
4195
|
}
|
|
4077
4196
|
}
|
|
4078
|
-
function
|
|
4079
|
-
let
|
|
4080
|
-
|
|
4197
|
+
function deserializeTSExternalModuleDeclaration(pos) {
|
|
4198
|
+
let start = deserializeI32(pos), end = deserializeI32(pos + 4), declare = deserializeBool(pos + 72), previousParent = parent, body = deserializeOptionBoxTSModuleBlock(pos + 64), node = parent = {
|
|
4199
|
+
__proto__: NodeProto,
|
|
4200
|
+
type: "TSModuleDeclaration",
|
|
4201
|
+
id: null,
|
|
4202
|
+
...body !== null && { body },
|
|
4203
|
+
kind: "module",
|
|
4204
|
+
declare,
|
|
4205
|
+
global: !1,
|
|
4206
|
+
start,
|
|
4207
|
+
end,
|
|
4208
|
+
range: [start, end],
|
|
4209
|
+
parent
|
|
4210
|
+
};
|
|
4211
|
+
return node.id = deserializeStringLiteral(pos + 16), body !== null && (body.parent = node), parent = previousParent, node;
|
|
4212
|
+
}
|
|
4213
|
+
function deserializeTSNamespaceDeclaration(pos) {
|
|
4214
|
+
let kind = deserializeTSNamespaceDeclarationKind(pos + 64), start = deserializeI32(pos), end = deserializeI32(pos + 4), declare = deserializeBool(pos + 65), previousParent = parent, body = deserializeTSNamespaceDeclarationBody(pos + 48), node = parent = {
|
|
4081
4215
|
__proto__: NodeProto,
|
|
4082
4216
|
type: "TSModuleDeclaration",
|
|
4083
4217
|
id: null,
|
|
4218
|
+
body,
|
|
4084
4219
|
kind,
|
|
4085
4220
|
declare,
|
|
4086
4221
|
global: !1,
|
|
@@ -4088,77 +4223,54 @@ function deserializeTSModuleDeclaration(pos) {
|
|
|
4088
4223
|
end,
|
|
4089
4224
|
range: [start, end],
|
|
4090
4225
|
parent
|
|
4091
|
-
},
|
|
4226
|
+
}, id = deserializeBindingIdentifier(pos + 16);
|
|
4227
|
+
if (body.type === "TSModuleBlock") node.id = id, body.parent = node;
|
|
4092
4228
|
else {
|
|
4093
|
-
|
|
4094
|
-
|
|
4095
|
-
|
|
4096
|
-
|
|
4097
|
-
|
|
4098
|
-
|
|
4099
|
-
|
|
4100
|
-
|
|
4101
|
-
|
|
4102
|
-
|
|
4103
|
-
|
|
4104
|
-
|
|
4105
|
-
|
|
4106
|
-
|
|
4107
|
-
|
|
4108
|
-
|
|
4109
|
-
|
|
4110
|
-
|
|
4111
|
-
|
|
4112
|
-
|
|
4113
|
-
|
|
4114
|
-
|
|
4115
|
-
|
|
4116
|
-
|
|
4117
|
-
|
|
4118
|
-
|
|
4119
|
-
|
|
4120
|
-
|
|
4121
|
-
id.parent = innerId.parent = outerId;
|
|
4122
|
-
} else {
|
|
4123
|
-
node.id = innerId, innerId.parent = node;
|
|
4124
|
-
let { start } = id;
|
|
4125
|
-
for (; innerId.start = innerId.range[0] = start, innerId.left.type !== "Identifier";) innerId = innerId.left;
|
|
4126
|
-
let end, right = innerId.left;
|
|
4127
|
-
id.parent = right.parent = innerId.left = {
|
|
4128
|
-
__proto__: NodeProto,
|
|
4129
|
-
type: "TSQualifiedName",
|
|
4130
|
-
left: id,
|
|
4131
|
-
right,
|
|
4132
|
-
start,
|
|
4133
|
-
end: end = right.end,
|
|
4134
|
-
range: [start, end],
|
|
4135
|
-
parent: innerId
|
|
4136
|
-
};
|
|
4137
|
-
}
|
|
4138
|
-
ObjectHasOwn$4(body, "body") ? (body = body.body, node.body = body, body.parent = node) : body = null;
|
|
4229
|
+
let innerId = body.id;
|
|
4230
|
+
if (innerId.type === "Identifier") {
|
|
4231
|
+
let start, end, outerId = node.id = parent = {
|
|
4232
|
+
__proto__: NodeProto,
|
|
4233
|
+
type: "TSQualifiedName",
|
|
4234
|
+
left: id,
|
|
4235
|
+
right: innerId,
|
|
4236
|
+
start: start = id.start,
|
|
4237
|
+
end: end = innerId.end,
|
|
4238
|
+
range: [start, end],
|
|
4239
|
+
parent: node
|
|
4240
|
+
};
|
|
4241
|
+
id.parent = innerId.parent = outerId;
|
|
4242
|
+
} else {
|
|
4243
|
+
node.id = innerId, innerId.parent = node;
|
|
4244
|
+
let { start } = id;
|
|
4245
|
+
for (; innerId.start = innerId.range[0] = start, innerId.left.type !== "Identifier";) innerId = innerId.left;
|
|
4246
|
+
let end, right = innerId.left;
|
|
4247
|
+
id.parent = right.parent = innerId.left = {
|
|
4248
|
+
__proto__: NodeProto,
|
|
4249
|
+
type: "TSQualifiedName",
|
|
4250
|
+
left: id,
|
|
4251
|
+
right,
|
|
4252
|
+
start,
|
|
4253
|
+
end: end = right.end,
|
|
4254
|
+
range: [start, end],
|
|
4255
|
+
parent: innerId
|
|
4256
|
+
};
|
|
4139
4257
|
}
|
|
4258
|
+
body = body.body, node.body = body, body.parent = node;
|
|
4140
4259
|
}
|
|
4141
4260
|
return parent = previousParent, node;
|
|
4142
4261
|
}
|
|
4143
|
-
function
|
|
4262
|
+
function deserializeTSNamespaceDeclarationKind(pos) {
|
|
4144
4263
|
switch (uint8[pos]) {
|
|
4145
4264
|
case 0: return "module";
|
|
4146
4265
|
case 1: return "namespace";
|
|
4147
|
-
default: throw Error(`Unexpected discriminant ${uint8[pos]} for
|
|
4148
|
-
}
|
|
4149
|
-
}
|
|
4150
|
-
function deserializeTSModuleDeclarationName(pos) {
|
|
4151
|
-
switch (uint8[pos]) {
|
|
4152
|
-
case 0: return deserializeBindingIdentifier(pos + 8);
|
|
4153
|
-
case 1: return deserializeStringLiteral(pos + 8);
|
|
4154
|
-
default: throw Error(`Unexpected discriminant ${uint8[pos]} for TSModuleDeclarationName`);
|
|
4266
|
+
default: throw Error(`Unexpected discriminant ${uint8[pos]} for TSNamespaceDeclarationKind`);
|
|
4155
4267
|
}
|
|
4156
4268
|
}
|
|
4157
|
-
function
|
|
4269
|
+
function deserializeTSNamespaceDeclarationBody(pos) {
|
|
4158
4270
|
switch (uint8[pos]) {
|
|
4159
|
-
case 0: return
|
|
4271
|
+
case 0: return deserializeBoxTSNamespaceDeclaration(pos + 8);
|
|
4160
4272
|
case 1: return deserializeBoxTSModuleBlock(pos + 8);
|
|
4161
|
-
default: throw Error(`Unexpected discriminant ${uint8[pos]} for
|
|
4273
|
+
default: throw Error(`Unexpected discriminant ${uint8[pos]} for TSNamespaceDeclarationBody`);
|
|
4162
4274
|
}
|
|
4163
4275
|
}
|
|
4164
4276
|
function deserializeTSGlobalDeclaration(pos) {
|
|
@@ -4943,8 +5055,11 @@ function deserializeBoxTSInterfaceDeclaration(pos) {
|
|
|
4943
5055
|
function deserializeBoxTSEnumDeclaration(pos) {
|
|
4944
5056
|
return deserializeTSEnumDeclaration(int32[pos >> 2]);
|
|
4945
5057
|
}
|
|
4946
|
-
function
|
|
4947
|
-
return
|
|
5058
|
+
function deserializeBoxTSExternalModuleDeclaration(pos) {
|
|
5059
|
+
return deserializeTSExternalModuleDeclaration(int32[pos >> 2]);
|
|
5060
|
+
}
|
|
5061
|
+
function deserializeBoxTSNamespaceDeclaration(pos) {
|
|
5062
|
+
return deserializeTSNamespaceDeclaration(int32[pos >> 2]);
|
|
4948
5063
|
}
|
|
4949
5064
|
function deserializeBoxTSGlobalDeclaration(pos) {
|
|
4950
5065
|
return deserializeTSGlobalDeclaration(int32[pos >> 2]);
|
|
@@ -5116,9 +5231,15 @@ function deserializeBoxExportAllDeclaration(pos) {
|
|
|
5116
5231
|
function deserializeBoxExportDefaultDeclaration(pos) {
|
|
5117
5232
|
return deserializeExportDefaultDeclaration(int32[pos >> 2]);
|
|
5118
5233
|
}
|
|
5234
|
+
function deserializeBoxExportDeclaration(pos) {
|
|
5235
|
+
return deserializeExportDeclaration(int32[pos >> 2]);
|
|
5236
|
+
}
|
|
5119
5237
|
function deserializeBoxExportNamedDeclaration(pos) {
|
|
5120
5238
|
return deserializeExportNamedDeclaration(int32[pos >> 2]);
|
|
5121
5239
|
}
|
|
5240
|
+
function deserializeBoxExportFromDeclaration(pos) {
|
|
5241
|
+
return deserializeExportFromDeclaration(int32[pos >> 2]);
|
|
5242
|
+
}
|
|
5122
5243
|
function deserializeBoxTSExportAssignment(pos) {
|
|
5123
5244
|
return deserializeTSExportAssignment(int32[pos >> 2]);
|
|
5124
5245
|
}
|
|
@@ -5160,9 +5281,6 @@ function deserializeVecImportAttribute(pos) {
|
|
|
5160
5281
|
for (; pos !== endPos;) arr.push(deserializeImportAttribute(pos)), pos += 120;
|
|
5161
5282
|
return arr;
|
|
5162
5283
|
}
|
|
5163
|
-
function deserializeOptionDeclaration(pos) {
|
|
5164
|
-
return uint8[pos] === 31 ? null : deserializeDeclaration(pos);
|
|
5165
|
-
}
|
|
5166
5284
|
function deserializeVecExportSpecifier(pos) {
|
|
5167
5285
|
let arr = [], pos32 = pos >> 2;
|
|
5168
5286
|
pos = int32[pos32];
|
|
@@ -5170,9 +5288,6 @@ function deserializeVecExportSpecifier(pos) {
|
|
|
5170
5288
|
for (; pos !== endPos;) arr.push(deserializeExportSpecifier(pos)), pos += 128;
|
|
5171
5289
|
return arr;
|
|
5172
5290
|
}
|
|
5173
|
-
function deserializeOptionStringLiteral(pos) {
|
|
5174
|
-
return uint8[pos + 12] === 2 ? null : deserializeStringLiteral(pos);
|
|
5175
|
-
}
|
|
5176
5291
|
function deserializeOptionModuleExportName(pos) {
|
|
5177
5292
|
return uint8[pos] === 255 ? null : deserializeModuleExportName(pos);
|
|
5178
5293
|
}
|
|
@@ -5415,19 +5530,12 @@ function deserializeBoxTSConstructSignatureDeclaration(pos) {
|
|
|
5415
5530
|
function deserializeBoxTSMethodSignature(pos) {
|
|
5416
5531
|
return deserializeTSMethodSignature(int32[pos >> 2]);
|
|
5417
5532
|
}
|
|
5418
|
-
function deserializeVecTSIndexSignatureName(pos) {
|
|
5419
|
-
let arr = [], pos32 = pos >> 2;
|
|
5420
|
-
pos = int32[pos32];
|
|
5421
|
-
let endPos = pos + int32[pos32 + 2] * 40;
|
|
5422
|
-
for (; pos !== endPos;) arr.push(deserializeTSIndexSignatureName(pos)), pos += 40;
|
|
5423
|
-
return arr;
|
|
5424
|
-
}
|
|
5425
|
-
function deserializeOptionTSModuleDeclarationBody(pos) {
|
|
5426
|
-
return uint8[pos] === 2 ? null : deserializeTSModuleDeclarationBody(pos);
|
|
5427
|
-
}
|
|
5428
5533
|
function deserializeBoxTSModuleBlock(pos) {
|
|
5429
5534
|
return deserializeTSModuleBlock(int32[pos >> 2]);
|
|
5430
5535
|
}
|
|
5536
|
+
function deserializeOptionBoxTSModuleBlock(pos) {
|
|
5537
|
+
return int32[pos >> 2] === 0 && int32[(pos >> 2) + 1] === 0 ? null : deserializeBoxTSModuleBlock(pos);
|
|
5538
|
+
}
|
|
5431
5539
|
function deserializeBoxTSTypeParameter(pos) {
|
|
5432
5540
|
return deserializeTSTypeParameter(int32[pos >> 2]);
|
|
5433
5541
|
}
|
|
@@ -11305,8 +11413,10 @@ var require_eslint_visitor_keys = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
11305
11413
|
for (let key of children) {
|
|
11306
11414
|
if (exclude.has(key)) continue;
|
|
11307
11415
|
let child = node[key];
|
|
11308
|
-
if (child)
|
|
11309
|
-
|
|
11416
|
+
if (child) {
|
|
11417
|
+
if (Array.isArray(child)) for (let subChild of child) isNode(subChild) && this.visit(subChild);
|
|
11418
|
+
else isNode(child) && this.visit(child);
|
|
11419
|
+
}
|
|
11310
11420
|
}
|
|
11311
11421
|
}
|
|
11312
11422
|
/**
|
|
@@ -11743,9 +11853,7 @@ var require_eslint_visitor_keys = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
11743
11853
|
case types_1.AST_NODE_TYPES.TSParameterProperty:
|
|
11744
11854
|
this.visitFunctionParameterTypeAnnotation(node.parameter);
|
|
11745
11855
|
break;
|
|
11746
|
-
default:
|
|
11747
|
-
this.visitType(node.typeAnnotation);
|
|
11748
|
-
break;
|
|
11856
|
+
default: this.visitType(node.typeAnnotation);
|
|
11749
11857
|
}
|
|
11750
11858
|
}
|
|
11751
11859
|
visitJSXElement(node) {
|
|
@@ -12793,12 +12901,12 @@ function addGlobals() {
|
|
|
12793
12901
|
}
|
|
12794
12902
|
globalScope.through = globalScope.through.filter((ref) => {
|
|
12795
12903
|
let { name } = ref.identifier, variable = globalScope.set.get(name);
|
|
12796
|
-
return variable
|
|
12904
|
+
return !variable || (ref.resolved = variable, variable.references.push(ref), !1);
|
|
12797
12905
|
});
|
|
12798
12906
|
let { implicit } = globalScope;
|
|
12799
12907
|
implicit.variables = implicit.variables.filter((variable) => {
|
|
12800
12908
|
let { name } = variable;
|
|
12801
|
-
return globalScope.set.has(name)
|
|
12909
|
+
return !globalScope.set.has(name) || (implicit.set.delete(name), !1);
|
|
12802
12910
|
}), implicit.leftToBeResolved = implicit.leftToBeResolved.filter((ref) => !globalScope.set.has(ref.identifier.name));
|
|
12803
12911
|
}
|
|
12804
12912
|
/**
|
|
@@ -14174,7 +14282,7 @@ function resetSettings() {
|
|
|
14174
14282
|
}
|
|
14175
14283
|
//#endregion
|
|
14176
14284
|
//#region package.json
|
|
14177
|
-
var version = "1.
|
|
14285
|
+
var version = "1.78.0";
|
|
14178
14286
|
//#endregion
|
|
14179
14287
|
//#region src-js/plugins/context.ts
|
|
14180
14288
|
const ObjectFreeze$1 = Object.freeze, ObjectCreate = Object.create, ObjectAssign = Object.assign, ObjectPreventExtensions = Object.preventExtensions;
|
|
@@ -14481,7 +14589,8 @@ var require_uri_all = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
14481
14589
|
sets[0] = sets[0].slice(0, -1);
|
|
14482
14590
|
for (var xl = sets.length - 1, x = 1; x < xl; ++x) sets[x] = sets[x].slice(1, -1);
|
|
14483
14591
|
return sets[xl] = sets[xl].slice(1), sets.join("");
|
|
14484
|
-
}
|
|
14592
|
+
}
|
|
14593
|
+
return sets[0];
|
|
14485
14594
|
}
|
|
14486
14595
|
function subexp(str) {
|
|
14487
14596
|
return "(?:" + str + ")";
|
|
@@ -14559,7 +14668,8 @@ var require_uri_all = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
14559
14668
|
if (Array.isArray(arr)) {
|
|
14560
14669
|
for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) arr2[i] = arr[i];
|
|
14561
14670
|
return arr2;
|
|
14562
|
-
}
|
|
14671
|
+
}
|
|
14672
|
+
return Array.from(arr);
|
|
14563
14673
|
}, maxInt = 2147483647, base = 36, tMin = 1, tMax = 26, skew = 38, damp = 700, initialBias = 72, initialN = 128, delimiter = "-", regexPunycode = /^xn--/, regexNonASCII = /[^\0-\x7E]/, regexSeparators = /[\x2E\u3002\uFF0E\uFF61]/g, errors = {
|
|
14564
14674
|
overflow: "Overflow: input needs wider integers to process",
|
|
14565
14675
|
"not-basic": "Illegal input >= 0x80 (not a basic code point)",
|
|
@@ -14815,7 +14925,8 @@ var require_uri_all = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
14815
14925
|
newHost = newFirst.join(":") + "::" + newLast.join(":");
|
|
14816
14926
|
} else newHost = fields.join(":");
|
|
14817
14927
|
return zone && (newHost += "%" + zone), newHost;
|
|
14818
|
-
}
|
|
14928
|
+
}
|
|
14929
|
+
return host;
|
|
14819
14930
|
}
|
|
14820
14931
|
var URI_PARSE = /^(?:([^:\/?#]+):)?(?:\/\/((?:([^\/?#@]*)@)?(\[[^\/?#\]]+\]|[^\/?#:]*)(?:\:(\d*))?))?([^?#]*)(?:\?([^#]*))?(?:#((?:.|\n|\r)*))?/i, NO_MATCH_IS_UNDEFINED = "".match(/(){0}/)[1] === void 0;
|
|
14821
14932
|
function parse(uriString) {
|
|
@@ -14823,7 +14934,7 @@ var require_uri_all = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
14823
14934
|
options.reference === "suffix" && (uriString = (options.scheme ? options.scheme + ":" : "") + "//" + uriString);
|
|
14824
14935
|
var matches = uriString.match(URI_PARSE);
|
|
14825
14936
|
if (matches) {
|
|
14826
|
-
NO_MATCH_IS_UNDEFINED ? (components.scheme = matches[1], components.userinfo = matches[3], components.host = matches[4], components.port = parseInt(matches[5], 10), components.path = matches[6] || "", components.query = matches[7], components.fragment = matches[8], isNaN(components.port) && (components.port = matches[5])) : (components.scheme = matches[1] || void 0, components.userinfo = uriString.indexOf("@") === -1 ? void 0 : matches[3], components.host = uriString.indexOf("//") === -1 ? void 0 : matches[4], components.port = parseInt(matches[5], 10), components.path = matches[6] || "", components.query = uriString.indexOf("?") === -1 ? void 0 : matches[7], components.fragment = uriString.indexOf("#") === -1 ? void 0 : matches[8], isNaN(components.port) && (components.port = uriString.match(/\/\/(?:.|\n)*\:(?:\/|\?|\#|$)/) ? matches[4] : void 0)), components.host &&= _normalizeIPv6(_normalizeIPv4(components.host, protocol), protocol), components.scheme === void 0 && components.userinfo === void 0 && components.host === void 0 && components.port === void 0 && !components.path && components.query === void 0 ?
|
|
14937
|
+
NO_MATCH_IS_UNDEFINED ? (components.scheme = matches[1], components.userinfo = matches[3], components.host = matches[4], components.port = parseInt(matches[5], 10), components.path = matches[6] || "", components.query = matches[7], components.fragment = matches[8], isNaN(components.port) && (components.port = matches[5])) : (components.scheme = matches[1] || void 0, components.userinfo = uriString.indexOf("@") === -1 ? void 0 : matches[3], components.host = uriString.indexOf("//") === -1 ? void 0 : matches[4], components.port = parseInt(matches[5], 10), components.path = matches[6] || "", components.query = uriString.indexOf("?") === -1 ? void 0 : matches[7], components.fragment = uriString.indexOf("#") === -1 ? void 0 : matches[8], isNaN(components.port) && (components.port = uriString.match(/\/\/(?:.|\n)*\:(?:\/|\?|\#|$)/) ? matches[4] : void 0)), components.host &&= _normalizeIPv6(_normalizeIPv4(components.host, protocol), protocol), components.reference = components.scheme === void 0 && components.userinfo === void 0 && components.host === void 0 && components.port === void 0 && !components.path && components.query === void 0 ? "same-document" : components.scheme === void 0 ? "relative" : components.fragment === void 0 ? "absolute" : "uri", options.reference && options.reference !== "suffix" && options.reference !== components.reference && (components.error = components.error || "URI is not a " + options.reference + " reference.");
|
|
14827
14938
|
var schemeHandler = SCHEMES[(options.scheme || components.scheme || "").toLowerCase()];
|
|
14828
14939
|
if (!options.unicodeSupport && (!schemeHandler || !schemeHandler.unicodeSupport)) {
|
|
14829
14940
|
if (components.host && (options.domainHost || schemeHandler && schemeHandler.domainHost)) try {
|
|
@@ -14875,7 +14986,7 @@ var require_uri_all = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
14875
14986
|
}
|
|
14876
14987
|
function resolveComponents(base, relative) {
|
|
14877
14988
|
var options = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {}, skipNormalization = arguments[3], target = {};
|
|
14878
|
-
return skipNormalization || (base = parse(serialize(base, options), options), relative = parse(serialize(relative, options), options)), options ||= {}, !options.tolerant && relative.scheme ? (target.scheme = relative.scheme, target.userinfo = relative.userinfo, target.host = relative.host, target.port = relative.port, target.path = removeDotSegments(relative.path || ""), target.query = relative.query) : (relative.userinfo !== void 0 || relative.host !== void 0 || relative.port !== void 0 ? (target.userinfo = relative.userinfo, target.host = relative.host, target.port = relative.port, target.path = removeDotSegments(relative.path || ""), target.query = relative.query) : (relative.path ? (relative.path.charAt(0) === "/" ? target.path = removeDotSegments(relative.path) : ((base.userinfo !== void 0 || base.host !== void 0 || base.port !== void 0) && !base.path ?
|
|
14989
|
+
return skipNormalization || (base = parse(serialize(base, options), options), relative = parse(serialize(relative, options), options)), options ||= {}, !options.tolerant && relative.scheme ? (target.scheme = relative.scheme, target.userinfo = relative.userinfo, target.host = relative.host, target.port = relative.port, target.path = removeDotSegments(relative.path || ""), target.query = relative.query) : (relative.userinfo !== void 0 || relative.host !== void 0 || relative.port !== void 0 ? (target.userinfo = relative.userinfo, target.host = relative.host, target.port = relative.port, target.path = removeDotSegments(relative.path || ""), target.query = relative.query) : (relative.path ? (relative.path.charAt(0) === "/" ? target.path = removeDotSegments(relative.path) : (target.path = (base.userinfo !== void 0 || base.host !== void 0 || base.port !== void 0) && !base.path ? "/" + relative.path : base.path ? base.path.slice(0, base.path.lastIndexOf("/") + 1) + relative.path : relative.path, target.path = removeDotSegments(target.path)), target.query = relative.query) : (target.path = base.path, target.query = relative.query === void 0 ? base.query : relative.query), target.userinfo = base.userinfo, target.host = base.host, target.port = base.port), target.scheme = base.scheme), target.fragment = relative.fragment, target;
|
|
14879
14990
|
}
|
|
14880
14991
|
function resolve(baseURI, relativeURI, options) {
|
|
14881
14992
|
var schemelessOptions = assign({ scheme: "null" }, options);
|
|
@@ -14953,9 +15064,7 @@ var require_uri_all = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
14953
15064
|
case "body":
|
|
14954
15065
|
mailtoComponents.body = unescapeComponent(hfield[1], options);
|
|
14955
15066
|
break;
|
|
14956
|
-
default:
|
|
14957
|
-
unknownHeaders = !0, headers[unescapeComponent(hfield[0], options)] = unescapeComponent(hfield[1], options);
|
|
14958
|
-
break;
|
|
15067
|
+
default: unknownHeaders = !0, headers[unescapeComponent(hfield[0], options)] = unescapeComponent(hfield[1], options);
|
|
14959
15068
|
}
|
|
14960
15069
|
}
|
|
14961
15070
|
unknownHeaders && (mailtoComponents.headers = headers);
|
|
@@ -15273,8 +15382,10 @@ var require_uri_all = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
15273
15382
|
*/
|
|
15274
15383
|
function resolve(compile, root, ref) {
|
|
15275
15384
|
var refVal = this._refs[ref];
|
|
15276
|
-
if (typeof refVal == "string")
|
|
15277
|
-
|
|
15385
|
+
if (typeof refVal == "string") {
|
|
15386
|
+
if (this._refs[refVal]) refVal = this._refs[refVal];
|
|
15387
|
+
else return resolve.call(this, compile, root, refVal);
|
|
15388
|
+
}
|
|
15278
15389
|
if (refVal ||= this._schemas[ref], refVal instanceof SchemaObject) return inlineRef(refVal.schema, this._opts.inlineRefs) ? refVal.schema : refVal.validate || this._compile(refVal);
|
|
15279
15390
|
var res = resolveSchema.call(this, root, ref), schema, v, baseId;
|
|
15280
15391
|
return res && (schema = res.schema, root = res.root, baseId = res.baseId), schema instanceof SchemaObject ? v = schema.validate || compile.call(this, schema.schema, root, void 0, baseId) : schema !== void 0 && (v = inlineRef(schema, this._opts.inlineRefs) ? schema : compile.call(this, schema, root, void 0, baseId)), v;
|
|
@@ -15404,10 +15515,12 @@ var require_uri_all = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
15404
15515
|
var refVal = self._refs[id];
|
|
15405
15516
|
if (typeof refVal == "string" && (refVal = self._refs[refVal]), refVal && refVal.schema) {
|
|
15406
15517
|
if (!equal(sch, refVal.schema)) throw Error("id \"" + id + "\" resolves to more than one schema");
|
|
15407
|
-
} else if (id != normalizeId(fullPath))
|
|
15408
|
-
if (
|
|
15409
|
-
|
|
15410
|
-
|
|
15518
|
+
} else if (id != normalizeId(fullPath)) {
|
|
15519
|
+
if (id[0] == "#") {
|
|
15520
|
+
if (localRefs[id] && !equal(sch, localRefs[id])) throw Error("id \"" + id + "\" resolves to more than one schema");
|
|
15521
|
+
localRefs[id] = sch;
|
|
15522
|
+
} else self._refs[id] = fullPath;
|
|
15523
|
+
}
|
|
15411
15524
|
}
|
|
15412
15525
|
baseIds[jsonPtr] = baseId, fullPaths[jsonPtr] = fullPath;
|
|
15413
15526
|
}
|
|
@@ -15488,8 +15601,10 @@ var require_uri_all = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
15488
15601
|
var $$outStack = $$outStack || [];
|
|
15489
15602
|
$$outStack.push(out), out = "", it.createErrors === !1 ? out += " {} " : (out += " { keyword: '" + ($errorKeyword || "false schema") + "' , dataPath: (dataPath || '') + " + it.errorPath + " , schemaPath: " + it.util.toQuotedString($errSchemaPath) + " , params: {} ", it.opts.messages !== !1 && (out += " , message: 'boolean schema is false' "), it.opts.verbose && (out += " , schema: false , parentSchema: validate.schema" + it.schemaPath + " , data: " + $data + " "), out += " } ");
|
|
15490
15603
|
var __err = out;
|
|
15491
|
-
out = $$outStack.pop(), !it.compositeRule && $breakOnError ?
|
|
15492
|
-
|
|
15604
|
+
out = $$outStack.pop(), !it.compositeRule && $breakOnError ?
|
|
15605
|
+
/* istanbul ignore if */
|
|
15606
|
+
it.async ? out += " throw new ValidationError([" + __err + "]); " : out += " validate.errors = [" + __err + "]; return false; " : out += " var err = " + __err + "; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ";
|
|
15607
|
+
} else it.isTop ? out += $async ? " return data; " : " validate.errors = null; return true; " : out += " var " + $valid + " = true; ";
|
|
15493
15608
|
return it.isTop && (out += " }; return validate; "), out;
|
|
15494
15609
|
}
|
|
15495
15610
|
if (it.isTop) {
|
|
@@ -15522,21 +15637,25 @@ var require_uri_all = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
15522
15637
|
if (arr1) for (var $type, $i = -1, l1 = arr1.length - 1; $i < l1;) $type = arr1[$i += 1], $type == "string" ? out += " else if (" + $dataType + " == 'number' || " + $dataType + " == 'boolean') " + $coerced + " = '' + " + $data + "; else if (" + $data + " === null) " + $coerced + " = ''; " : $type == "number" || $type == "integer" ? (out += " else if (" + $dataType + " == 'boolean' || " + $data + " === null || (" + $dataType + " == 'string' && " + $data + " && " + $data + " == +" + $data + " ", $type == "integer" && (out += " && !(" + $data + " % 1)"), out += ")) " + $coerced + " = +" + $data + "; ") : $type == "boolean" ? out += " else if (" + $data + " === 'false' || " + $data + " === 0 || " + $data + " === null) " + $coerced + " = false; else if (" + $data + " === 'true' || " + $data + " === 1) " + $coerced + " = true; " : $type == "null" ? out += " else if (" + $data + " === '' || " + $data + " === 0 || " + $data + " === false) " + $coerced + " = null; " : it.opts.coerceTypes == "array" && $type == "array" && (out += " else if (" + $dataType + " == 'string' || " + $dataType + " == 'number' || " + $dataType + " == 'boolean' || " + $data + " == null) " + $coerced + " = [" + $data + "]; ");
|
|
15523
15638
|
out += " else { ";
|
|
15524
15639
|
var $$outStack = $$outStack || [];
|
|
15525
|
-
$$outStack.push(out), out = "", it.createErrors === !1 ? out += " {} " : (out += " { keyword: '" + ($errorKeyword || "type") + "' , dataPath: (dataPath || '') + " + it.errorPath + " , schemaPath: " + it.util.toQuotedString($errSchemaPath) + " , params: { type: '", $typeIsArray ?
|
|
15640
|
+
$$outStack.push(out), out = "", it.createErrors === !1 ? out += " {} " : (out += " { keyword: '" + ($errorKeyword || "type") + "' , dataPath: (dataPath || '') + " + it.errorPath + " , schemaPath: " + it.util.toQuotedString($errSchemaPath) + " , params: { type: '", out += $typeIsArray ? "" + $typeSchema.join(",") : "" + $typeSchema, out += "' } ", it.opts.messages !== !1 && (out += " , message: 'should be ", out += $typeIsArray ? "" + $typeSchema.join(",") : "" + $typeSchema, out += "' "), it.opts.verbose && (out += " , schema: validate.schema" + $schemaPath + " , parentSchema: validate.schema" + it.schemaPath + " , data: " + $data + " "), out += " } ");
|
|
15526
15641
|
var __err = out;
|
|
15527
|
-
out = $$outStack.pop(), !it.compositeRule && $breakOnError ?
|
|
15642
|
+
out = $$outStack.pop(), !it.compositeRule && $breakOnError ?
|
|
15643
|
+
/* istanbul ignore if */
|
|
15644
|
+
it.async ? out += " throw new ValidationError([" + __err + "]); " : out += " validate.errors = [" + __err + "]; return false; " : out += " var err = " + __err + "; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ", out += " } if (" + $coerced + " !== undefined) { ";
|
|
15528
15645
|
var $parentData = $dataLvl ? "data" + ($dataLvl - 1 || "") : "parentData", $parentDataProperty = $dataLvl ? it.dataPathArr[$dataLvl] : "parentDataProperty";
|
|
15529
15646
|
out += " " + $data + " = " + $coerced + "; ", $dataLvl || (out += "if (" + $parentData + " !== undefined)"), out += " " + $parentData + "[" + $parentDataProperty + "] = " + $coerced + "; } ";
|
|
15530
15647
|
} else {
|
|
15531
15648
|
var $$outStack = $$outStack || [];
|
|
15532
|
-
$$outStack.push(out), out = "", it.createErrors === !1 ? out += " {} " : (out += " { keyword: '" + ($errorKeyword || "type") + "' , dataPath: (dataPath || '') + " + it.errorPath + " , schemaPath: " + it.util.toQuotedString($errSchemaPath) + " , params: { type: '", $typeIsArray ?
|
|
15649
|
+
$$outStack.push(out), out = "", it.createErrors === !1 ? out += " {} " : (out += " { keyword: '" + ($errorKeyword || "type") + "' , dataPath: (dataPath || '') + " + it.errorPath + " , schemaPath: " + it.util.toQuotedString($errSchemaPath) + " , params: { type: '", out += $typeIsArray ? "" + $typeSchema.join(",") : "" + $typeSchema, out += "' } ", it.opts.messages !== !1 && (out += " , message: 'should be ", out += $typeIsArray ? "" + $typeSchema.join(",") : "" + $typeSchema, out += "' "), it.opts.verbose && (out += " , schema: validate.schema" + $schemaPath + " , parentSchema: validate.schema" + it.schemaPath + " , data: " + $data + " "), out += " } ");
|
|
15533
15650
|
var __err = out;
|
|
15534
|
-
out = $$outStack.pop(), !it.compositeRule && $breakOnError ?
|
|
15651
|
+
out = $$outStack.pop(), !it.compositeRule && $breakOnError ?
|
|
15652
|
+
/* istanbul ignore if */
|
|
15653
|
+
it.async ? out += " throw new ValidationError([" + __err + "]); " : out += " validate.errors = [" + __err + "]; return false; " : out += " var err = " + __err + "; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ";
|
|
15535
15654
|
}
|
|
15536
15655
|
out += " } ";
|
|
15537
15656
|
}
|
|
15538
15657
|
}
|
|
15539
|
-
if (it.schema.$ref && !$refKeywords) out += " " + it.RULES.all.$ref.code(it, "$ref") + " ", $breakOnError && (out += " } if (errors === ", $top ?
|
|
15658
|
+
if (it.schema.$ref && !$refKeywords) out += " " + it.RULES.all.$ref.code(it, "$ref") + " ", $breakOnError && (out += " } if (errors === ", out += $top ? "0" : "errs_" + $lvl, out += ") { ", $closingBraces2 += "}");
|
|
15540
15659
|
else {
|
|
15541
15660
|
var arr2 = it.RULES;
|
|
15542
15661
|
if (arr2) {
|
|
@@ -15584,11 +15703,13 @@ var require_uri_all = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
15584
15703
|
if ($breakOnError && (out += " " + $closingBraces1 + " ", $closingBraces1 = ""), $rulesGroup.type && (out += " } ", $typeSchema && $typeSchema === $rulesGroup.type && !$coerceToTypes)) {
|
|
15585
15704
|
out += " else { ";
|
|
15586
15705
|
var $schemaPath = it.schemaPath + ".type", $errSchemaPath = it.errSchemaPath + "/type", $$outStack = $$outStack || [];
|
|
15587
|
-
$$outStack.push(out), out = "", it.createErrors === !1 ? out += " {} " : (out += " { keyword: '" + ($errorKeyword || "type") + "' , dataPath: (dataPath || '') + " + it.errorPath + " , schemaPath: " + it.util.toQuotedString($errSchemaPath) + " , params: { type: '", $typeIsArray ?
|
|
15706
|
+
$$outStack.push(out), out = "", it.createErrors === !1 ? out += " {} " : (out += " { keyword: '" + ($errorKeyword || "type") + "' , dataPath: (dataPath || '') + " + it.errorPath + " , schemaPath: " + it.util.toQuotedString($errSchemaPath) + " , params: { type: '", out += $typeIsArray ? "" + $typeSchema.join(",") : "" + $typeSchema, out += "' } ", it.opts.messages !== !1 && (out += " , message: 'should be ", out += $typeIsArray ? "" + $typeSchema.join(",") : "" + $typeSchema, out += "' "), it.opts.verbose && (out += " , schema: validate.schema" + $schemaPath + " , parentSchema: validate.schema" + it.schemaPath + " , data: " + $data + " "), out += " } ");
|
|
15588
15707
|
var __err = out;
|
|
15589
|
-
out = $$outStack.pop(), !it.compositeRule && $breakOnError ?
|
|
15708
|
+
out = $$outStack.pop(), !it.compositeRule && $breakOnError ?
|
|
15709
|
+
/* istanbul ignore if */
|
|
15710
|
+
it.async ? out += " throw new ValidationError([" + __err + "]); " : out += " validate.errors = [" + __err + "]; return false; " : out += " var err = " + __err + "; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ", out += " } ";
|
|
15590
15711
|
}
|
|
15591
|
-
$breakOnError && (out += " if (errors === ", $top ?
|
|
15712
|
+
$breakOnError && (out += " if (errors === ", out += $top ? "0" : "errs_" + $lvl, out += ") { ", $closingBraces2 += "}");
|
|
15592
15713
|
}
|
|
15593
15714
|
}
|
|
15594
15715
|
}
|
|
@@ -15936,7 +16057,9 @@ var require_uri_all = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
15936
16057
|
var $$outStack = $$outStack || [];
|
|
15937
16058
|
$$outStack.push(out), out = "", it.createErrors === !1 ? out += " {} " : (out += " { keyword: '$ref' , dataPath: (dataPath || '') + " + it.errorPath + " , schemaPath: " + it.util.toQuotedString($errSchemaPath) + " , params: { ref: '" + it.util.escapeQuotes($schema) + "' } ", it.opts.messages !== !1 && (out += " , message: 'can\\'t resolve reference " + it.util.escapeQuotes($schema) + "' "), it.opts.verbose && (out += " , schema: " + it.util.toQuotedString($schema) + " , parentSchema: validate.schema" + it.schemaPath + " , data: " + $data + " "), out += " } ");
|
|
15938
16059
|
var __err = out;
|
|
15939
|
-
out = $$outStack.pop(), !it.compositeRule && $breakOnError ?
|
|
16060
|
+
out = $$outStack.pop(), !it.compositeRule && $breakOnError ?
|
|
16061
|
+
/* istanbul ignore if */
|
|
16062
|
+
it.async ? out += " throw new ValidationError([" + __err + "]); " : out += " validate.errors = [" + __err + "]; return false; " : out += " var err = " + __err + "; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ", $breakOnError && (out += " if (false) { ");
|
|
15940
16063
|
} else if (it.opts.missingRefs == "ignore") it.logger.warn($message), $breakOnError && (out += " if (true) { ");
|
|
15941
16064
|
else throw new it.MissingRefError(it.baseId, $schema, $message);
|
|
15942
16065
|
} else if ($refVal.inline) {
|
|
@@ -15967,7 +16090,7 @@ var require_uri_all = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
15967
16090
|
$it.level++;
|
|
15968
16091
|
var $nextValid = "valid" + $it.level, $currentBaseId = $it.baseId, $allSchemasEmpty = !0, arr1 = $schema;
|
|
15969
16092
|
if (arr1) for (var $sch, $i = -1, l1 = arr1.length - 1; $i < l1;) $sch = arr1[$i += 1], (it.opts.strictKeywords ? typeof $sch == "object" && Object.keys($sch).length > 0 || $sch === !1 : it.util.schemaHasRules($sch, it.RULES.all)) && ($allSchemasEmpty = !1, $it.schema = $sch, $it.schemaPath = $schemaPath + "[" + $i + "]", $it.errSchemaPath = $errSchemaPath + "/" + $i, out += " " + it.validate($it) + " ", $it.baseId = $currentBaseId, $breakOnError && (out += " if (" + $nextValid + ") { ", $closingBraces += "}"));
|
|
15970
|
-
return $breakOnError && ($allSchemasEmpty ?
|
|
16093
|
+
return $breakOnError && (out += $allSchemasEmpty ? " if (true) { " : " " + $closingBraces.slice(0, -1) + " "), out;
|
|
15971
16094
|
};
|
|
15972
16095
|
})), require_anyOf = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
15973
16096
|
module.exports = function generate_anyOf(it, $keyword, $ruleType) {
|
|
@@ -15983,7 +16106,9 @@ var require_uri_all = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
15983
16106
|
it.compositeRule = $it.compositeRule = !0;
|
|
15984
16107
|
var arr1 = $schema;
|
|
15985
16108
|
if (arr1) for (var $sch, $i = -1, l1 = arr1.length - 1; $i < l1;) $sch = arr1[$i += 1], $it.schema = $sch, $it.schemaPath = $schemaPath + "[" + $i + "]", $it.errSchemaPath = $errSchemaPath + "/" + $i, out += " " + it.validate($it) + " ", $it.baseId = $currentBaseId, out += " " + $valid + " = " + $valid + " || " + $nextValid + "; if (!" + $valid + ") { ", $closingBraces += "}";
|
|
15986
|
-
it.compositeRule = $it.compositeRule = $wasComposite, out += " " + $closingBraces + " if (!" + $valid + ") { var err = ", it.createErrors === !1 ? out += " {} " : (out += " { keyword: 'anyOf' , dataPath: (dataPath || '') + " + it.errorPath + " , schemaPath: " + it.util.toQuotedString($errSchemaPath) + " , params: {} ", it.opts.messages !== !1 && (out += " , message: 'should match some schema in anyOf' "), it.opts.verbose && (out += " , schema: validate.schema" + $schemaPath + " , parentSchema: validate.schema" + it.schemaPath + " , data: " + $data + " "), out += " } "), out += "; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ", !it.compositeRule && $breakOnError &&
|
|
16109
|
+
it.compositeRule = $it.compositeRule = $wasComposite, out += " " + $closingBraces + " if (!" + $valid + ") { var err = ", it.createErrors === !1 ? out += " {} " : (out += " { keyword: 'anyOf' , dataPath: (dataPath || '') + " + it.errorPath + " , schemaPath: " + it.util.toQuotedString($errSchemaPath) + " , params: {} ", it.opts.messages !== !1 && (out += " , message: 'should match some schema in anyOf' "), it.opts.verbose && (out += " , schema: validate.schema" + $schemaPath + " , parentSchema: validate.schema" + it.schemaPath + " , data: " + $data + " "), out += " } "), out += "; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ", !it.compositeRule && $breakOnError &&
|
|
16110
|
+
/* istanbul ignore if */
|
|
16111
|
+
(it.async ? out += " throw new ValidationError(vErrors); " : out += " validate.errors = vErrors; return false; "), out += " } else { errors = " + $errs + "; if (vErrors !== null) { if (" + $errs + ") vErrors.length = " + $errs + "; else vErrors = null; } ", it.opts.allErrors && (out += " } ");
|
|
15987
16112
|
} else $breakOnError && (out += " if (true) { ");
|
|
15988
16113
|
return out;
|
|
15989
16114
|
};
|
|
@@ -16001,7 +16126,9 @@ var require_uri_all = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
16001
16126
|
var $$outStack = $$outStack || [];
|
|
16002
16127
|
$$outStack.push(out), out = "", it.createErrors === !1 ? out += " {} " : (out += " { keyword: 'const' , dataPath: (dataPath || '') + " + it.errorPath + " , schemaPath: " + it.util.toQuotedString($errSchemaPath) + " , params: { allowedValue: schema" + $lvl + " } ", it.opts.messages !== !1 && (out += " , message: 'should be equal to constant' "), it.opts.verbose && (out += " , schema: validate.schema" + $schemaPath + " , parentSchema: validate.schema" + it.schemaPath + " , data: " + $data + " "), out += " } ");
|
|
16003
16128
|
var __err = out;
|
|
16004
|
-
return out = $$outStack.pop(), !it.compositeRule && $breakOnError ?
|
|
16129
|
+
return out = $$outStack.pop(), !it.compositeRule && $breakOnError ?
|
|
16130
|
+
/* istanbul ignore if */
|
|
16131
|
+
it.async ? out += " throw new ValidationError([" + __err + "]); " : out += " validate.errors = [" + __err + "]; return false; " : out += " var err = " + __err + "; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ", out += " }", $breakOnError && (out += " else { "), out;
|
|
16005
16132
|
};
|
|
16006
16133
|
})), require_contains = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
16007
16134
|
module.exports = function generate_contains(it, $keyword, $ruleType) {
|
|
@@ -16019,7 +16146,9 @@ var require_uri_all = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
16019
16146
|
var $$outStack = $$outStack || [];
|
|
16020
16147
|
$$outStack.push(out), out = "", it.createErrors === !1 ? out += " {} " : (out += " { keyword: 'contains' , dataPath: (dataPath || '') + " + it.errorPath + " , schemaPath: " + it.util.toQuotedString($errSchemaPath) + " , params: {} ", it.opts.messages !== !1 && (out += " , message: 'should contain a valid item' "), it.opts.verbose && (out += " , schema: validate.schema" + $schemaPath + " , parentSchema: validate.schema" + it.schemaPath + " , data: " + $data + " "), out += " } ");
|
|
16021
16148
|
var __err = out;
|
|
16022
|
-
return out = $$outStack.pop(), !it.compositeRule && $breakOnError ?
|
|
16149
|
+
return out = $$outStack.pop(), !it.compositeRule && $breakOnError ?
|
|
16150
|
+
/* istanbul ignore if */
|
|
16151
|
+
it.async ? out += " throw new ValidationError([" + __err + "]); " : out += " validate.errors = [" + __err + "]; return false; " : out += " var err = " + __err + "; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ", out += " } else { ", $nonEmptySchema && (out += " errors = " + $errs + "; if (vErrors !== null) { if (" + $errs + ") vErrors.length = " + $errs + "; else vErrors = null; } "), it.opts.allErrors && (out += " } "), out;
|
|
16023
16152
|
};
|
|
16024
16153
|
})), require_dependencies = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
16025
16154
|
module.exports = function generate_dependencies(it, $keyword, $ruleType) {
|
|
@@ -16047,7 +16176,9 @@ var require_uri_all = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
16047
16176
|
var $$outStack = $$outStack || [];
|
|
16048
16177
|
$$outStack.push(out), out = "", it.createErrors === !1 ? out += " {} " : (out += " { keyword: 'dependencies' , dataPath: (dataPath || '') + " + it.errorPath + " , schemaPath: " + it.util.toQuotedString($errSchemaPath) + " , params: { property: '" + it.util.escapeQuotes($property) + "', missingProperty: '" + $missingProperty + "', depsCount: " + $deps.length + ", deps: '" + it.util.escapeQuotes($deps.length == 1 ? $deps[0] : $deps.join(", ")) + "' } ", it.opts.messages !== !1 && (out += " , message: 'should have ", $deps.length == 1 ? out += "property " + it.util.escapeQuotes($deps[0]) : out += "properties " + it.util.escapeQuotes($deps.join(", ")), out += " when property " + it.util.escapeQuotes($property) + " is present' "), it.opts.verbose && (out += " , schema: validate.schema" + $schemaPath + " , parentSchema: validate.schema" + it.schemaPath + " , data: " + $data + " "), out += " } ");
|
|
16049
16178
|
var __err = out;
|
|
16050
|
-
out = $$outStack.pop(), !it.compositeRule && $breakOnError ?
|
|
16179
|
+
out = $$outStack.pop(), !it.compositeRule && $breakOnError ?
|
|
16180
|
+
/* istanbul ignore if */
|
|
16181
|
+
it.async ? out += " throw new ValidationError([" + __err + "]); " : out += " validate.errors = [" + __err + "]; return false; " : out += " var err = " + __err + "; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ";
|
|
16051
16182
|
} else {
|
|
16052
16183
|
out += " ) { ";
|
|
16053
16184
|
var arr2 = $deps;
|
|
@@ -16076,7 +16207,9 @@ var require_uri_all = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
16076
16207
|
var $$outStack = $$outStack || [];
|
|
16077
16208
|
$$outStack.push(out), out = "", it.createErrors === !1 ? out += " {} " : (out += " { keyword: 'enum' , dataPath: (dataPath || '') + " + it.errorPath + " , schemaPath: " + it.util.toQuotedString($errSchemaPath) + " , params: { allowedValues: schema" + $lvl + " } ", it.opts.messages !== !1 && (out += " , message: 'should be equal to one of the allowed values' "), it.opts.verbose && (out += " , schema: validate.schema" + $schemaPath + " , parentSchema: validate.schema" + it.schemaPath + " , data: " + $data + " "), out += " } ");
|
|
16078
16209
|
var __err = out;
|
|
16079
|
-
return out = $$outStack.pop(), !it.compositeRule && $breakOnError ?
|
|
16210
|
+
return out = $$outStack.pop(), !it.compositeRule && $breakOnError ?
|
|
16211
|
+
/* istanbul ignore if */
|
|
16212
|
+
it.async ? out += " throw new ValidationError([" + __err + "]); " : out += " validate.errors = [" + __err + "]; return false; " : out += " var err = " + __err + "; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ", out += " }", $breakOnError && (out += " else { "), out;
|
|
16080
16213
|
};
|
|
16081
16214
|
})), require_format = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
16082
16215
|
module.exports = function generate_format(it, $keyword, $ruleType) {
|
|
@@ -16108,13 +16241,15 @@ var require_uri_all = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
16108
16241
|
} else {
|
|
16109
16242
|
out += " if (! ";
|
|
16110
16243
|
var $formatRef = "formats" + it.util.getProperty($schema);
|
|
16111
|
-
$isObject && ($formatRef += ".validate"), typeof $format == "function" ?
|
|
16244
|
+
$isObject && ($formatRef += ".validate"), out += typeof $format == "function" ? " " + $formatRef + "(" + $data + ") " : " " + $formatRef + ".test(" + $data + ") ", out += ") { ";
|
|
16112
16245
|
}
|
|
16113
16246
|
}
|
|
16114
16247
|
var $$outStack = $$outStack || [];
|
|
16115
|
-
$$outStack.push(out), out = "", it.createErrors === !1 ? out += " {} " : (out += " { keyword: 'format' , dataPath: (dataPath || '') + " + it.errorPath + " , schemaPath: " + it.util.toQuotedString($errSchemaPath) + " , params: { format: ", $isData ?
|
|
16248
|
+
$$outStack.push(out), out = "", it.createErrors === !1 ? out += " {} " : (out += " { keyword: 'format' , dataPath: (dataPath || '') + " + it.errorPath + " , schemaPath: " + it.util.toQuotedString($errSchemaPath) + " , params: { format: ", out += $isData ? "" + $schemaValue : "" + it.util.toQuotedString($schema), out += " } ", it.opts.messages !== !1 && (out += " , message: 'should match format \"", out += $isData ? "' + " + $schemaValue + " + '" : "" + it.util.escapeQuotes($schema), out += "\"' "), it.opts.verbose && (out += " , schema: ", out += $isData ? "validate.schema" + $schemaPath : "" + it.util.toQuotedString($schema), out += " , parentSchema: validate.schema" + it.schemaPath + " , data: " + $data + " "), out += " } ");
|
|
16116
16249
|
var __err = out;
|
|
16117
|
-
return out = $$outStack.pop(), !it.compositeRule && $breakOnError ?
|
|
16250
|
+
return out = $$outStack.pop(), !it.compositeRule && $breakOnError ?
|
|
16251
|
+
/* istanbul ignore if */
|
|
16252
|
+
it.async ? out += " throw new ValidationError([" + __err + "]); " : out += " validate.errors = [" + __err + "]; return false; " : out += " var err = " + __err + "; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ", out += " } ", $breakOnError && (out += " else { "), out;
|
|
16118
16253
|
};
|
|
16119
16254
|
})), require_if = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
16120
16255
|
module.exports = function generate_if(it, $keyword, $ruleType) {
|
|
@@ -16125,7 +16260,9 @@ var require_uri_all = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
16125
16260
|
var $ifClause;
|
|
16126
16261
|
$it.createErrors = !1, $it.schema = $schema, $it.schemaPath = $schemaPath, $it.errSchemaPath = $errSchemaPath, out += " var " + $errs + " = errors; var " + $valid + " = true; ";
|
|
16127
16262
|
var $wasComposite = it.compositeRule;
|
|
16128
|
-
it.compositeRule = $it.compositeRule = !0, out += " " + it.validate($it) + " ", $it.baseId = $currentBaseId, $it.createErrors = !0, out += " errors = " + $errs + "; if (vErrors !== null) { if (" + $errs + ") vErrors.length = " + $errs + "; else vErrors = null; } ", it.compositeRule = $it.compositeRule = $wasComposite, $thenPresent ? (out += " if (" + $nextValid + ") { ", $it.schema = it.schema.then, $it.schemaPath = it.schemaPath + ".then", $it.errSchemaPath = it.errSchemaPath + "/then", out += " " + it.validate($it) + " ", $it.baseId = $currentBaseId, out += " " + $valid + " = " + $nextValid + "; ", $thenPresent && $elsePresent ? ($ifClause = "ifClause" + $lvl, out += " var " + $ifClause + " = 'then'; ") : $ifClause = "'then'", out += " } ", $elsePresent && (out += " else { ")) : out += " if (!" + $nextValid + ") { ", $elsePresent && ($it.schema = it.schema.else, $it.schemaPath = it.schemaPath + ".else", $it.errSchemaPath = it.errSchemaPath + "/else", out += " " + it.validate($it) + " ", $it.baseId = $currentBaseId, out += " " + $valid + " = " + $nextValid + "; ", $thenPresent && $elsePresent ? ($ifClause = "ifClause" + $lvl, out += " var " + $ifClause + " = 'else'; ") : $ifClause = "'else'", out += " } "), out += " if (!" + $valid + ") { var err = ", it.createErrors === !1 ? out += " {} " : (out += " { keyword: 'if' , dataPath: (dataPath || '') + " + it.errorPath + " , schemaPath: " + it.util.toQuotedString($errSchemaPath) + " , params: { failingKeyword: " + $ifClause + " } ", it.opts.messages !== !1 && (out += " , message: 'should match \"' + " + $ifClause + " + '\" schema' "), it.opts.verbose && (out += " , schema: validate.schema" + $schemaPath + " , parentSchema: validate.schema" + it.schemaPath + " , data: " + $data + " "), out += " } "), out += "; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ", !it.compositeRule && $breakOnError &&
|
|
16263
|
+
it.compositeRule = $it.compositeRule = !0, out += " " + it.validate($it) + " ", $it.baseId = $currentBaseId, $it.createErrors = !0, out += " errors = " + $errs + "; if (vErrors !== null) { if (" + $errs + ") vErrors.length = " + $errs + "; else vErrors = null; } ", it.compositeRule = $it.compositeRule = $wasComposite, $thenPresent ? (out += " if (" + $nextValid + ") { ", $it.schema = it.schema.then, $it.schemaPath = it.schemaPath + ".then", $it.errSchemaPath = it.errSchemaPath + "/then", out += " " + it.validate($it) + " ", $it.baseId = $currentBaseId, out += " " + $valid + " = " + $nextValid + "; ", $thenPresent && $elsePresent ? ($ifClause = "ifClause" + $lvl, out += " var " + $ifClause + " = 'then'; ") : $ifClause = "'then'", out += " } ", $elsePresent && (out += " else { ")) : out += " if (!" + $nextValid + ") { ", $elsePresent && ($it.schema = it.schema.else, $it.schemaPath = it.schemaPath + ".else", $it.errSchemaPath = it.errSchemaPath + "/else", out += " " + it.validate($it) + " ", $it.baseId = $currentBaseId, out += " " + $valid + " = " + $nextValid + "; ", $thenPresent && $elsePresent ? ($ifClause = "ifClause" + $lvl, out += " var " + $ifClause + " = 'else'; ") : $ifClause = "'else'", out += " } "), out += " if (!" + $valid + ") { var err = ", it.createErrors === !1 ? out += " {} " : (out += " { keyword: 'if' , dataPath: (dataPath || '') + " + it.errorPath + " , schemaPath: " + it.util.toQuotedString($errSchemaPath) + " , params: { failingKeyword: " + $ifClause + " } ", it.opts.messages !== !1 && (out += " , message: 'should match \"' + " + $ifClause + " + '\" schema' "), it.opts.verbose && (out += " , schema: validate.schema" + $schemaPath + " , parentSchema: validate.schema" + it.schemaPath + " , data: " + $data + " "), out += " } "), out += "; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ", !it.compositeRule && $breakOnError &&
|
|
16264
|
+
/* istanbul ignore if */
|
|
16265
|
+
(it.async ? out += " throw new ValidationError(vErrors); " : out += " validate.errors = vErrors; return false; "), out += " } ", $breakOnError && (out += " else { ");
|
|
16129
16266
|
} else $breakOnError && (out += " if (true) { ");
|
|
16130
16267
|
return out;
|
|
16131
16268
|
};
|
|
@@ -16143,7 +16280,9 @@ var require_uri_all = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
16143
16280
|
var $$outStack = $$outStack || [];
|
|
16144
16281
|
$$outStack.push(out), out = "", it.createErrors === !1 ? out += " {} " : (out += " { keyword: 'additionalItems' , dataPath: (dataPath || '') + " + it.errorPath + " , schemaPath: " + it.util.toQuotedString($errSchemaPath) + " , params: { limit: " + $schema.length + " } ", it.opts.messages !== !1 && (out += " , message: 'should NOT have more than " + $schema.length + " items' "), it.opts.verbose && (out += " , schema: false , parentSchema: validate.schema" + it.schemaPath + " , data: " + $data + " "), out += " } ");
|
|
16145
16282
|
var __err = out;
|
|
16146
|
-
out = $$outStack.pop(), !it.compositeRule && $breakOnError ?
|
|
16283
|
+
out = $$outStack.pop(), !it.compositeRule && $breakOnError ?
|
|
16284
|
+
/* istanbul ignore if */
|
|
16285
|
+
it.async ? out += " throw new ValidationError([" + __err + "]); " : out += " validate.errors = [" + __err + "]; return false; " : out += " var err = " + __err + "; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ", out += " } ", $errSchemaPath = $currErrSchemaPath, $breakOnError && ($closingBraces += "}", out += " else { ");
|
|
16147
16286
|
}
|
|
16148
16287
|
var arr1 = $schema;
|
|
16149
16288
|
if (arr1) {
|
|
@@ -16184,7 +16323,9 @@ var require_uri_all = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
16184
16323
|
var $errorKeyword = $exclusiveKeyword, $$outStack = $$outStack || [];
|
|
16185
16324
|
$$outStack.push(out), out = "", it.createErrors === !1 ? out += " {} " : (out += " { keyword: '" + ($errorKeyword || "_exclusiveLimit") + "' , dataPath: (dataPath || '') + " + it.errorPath + " , schemaPath: " + it.util.toQuotedString($errSchemaPath) + " , params: {} ", it.opts.messages !== !1 && (out += " , message: '" + $exclusiveKeyword + " should be boolean' "), it.opts.verbose && (out += " , schema: validate.schema" + $schemaPath + " , parentSchema: validate.schema" + it.schemaPath + " , data: " + $data + " "), out += " } ");
|
|
16186
16325
|
var __err = out;
|
|
16187
|
-
out = $$outStack.pop(), !it.compositeRule && $breakOnError ?
|
|
16326
|
+
out = $$outStack.pop(), !it.compositeRule && $breakOnError ?
|
|
16327
|
+
/* istanbul ignore if */
|
|
16328
|
+
it.async ? out += " throw new ValidationError([" + __err + "]); " : out += " validate.errors = [" + __err + "]; return false; " : out += " var err = " + __err + "; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ", out += " } else if ( ", $isData && (out += " (" + $schemaValue + " !== undefined && typeof " + $schemaValue + " != 'number') || "), out += " " + $exclType + " == 'number' ? ( (" + $exclusive + " = " + $schemaValue + " === undefined || " + $schemaValueExcl + " " + $op + "= " + $schemaValue + ") ? " + $data + " " + $notOp + "= " + $schemaValueExcl + " : " + $data + " " + $notOp + " " + $schemaValue + " ) : ( (" + $exclusive + " = " + $schemaValueExcl + " === true) ? " + $data + " " + $notOp + "= " + $schemaValue + " : " + $data + " " + $notOp + " " + $schemaValue + " ) || " + $data + " !== " + $data + ") { var op" + $lvl + " = " + $exclusive + " ? '" + $op + "' : '" + $op + "='; ", $schema === void 0 && ($errorKeyword = $exclusiveKeyword, $errSchemaPath = it.errSchemaPath + "/" + $exclusiveKeyword, $schemaValue = $schemaValueExcl, $isData = $isDataExcl);
|
|
16188
16329
|
} else {
|
|
16189
16330
|
var $exclIsNumber = typeof $schemaExcl == "number", $opStr = $op;
|
|
16190
16331
|
if ($exclIsNumber && $isData) {
|
|
@@ -16198,9 +16339,11 @@ var require_uri_all = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
16198
16339
|
}
|
|
16199
16340
|
$errorKeyword ||= $keyword;
|
|
16200
16341
|
var $$outStack = $$outStack || [];
|
|
16201
|
-
$$outStack.push(out), out = "", it.createErrors === !1 ? out += " {} " : (out += " { keyword: '" + ($errorKeyword || "_limit") + "' , dataPath: (dataPath || '') + " + it.errorPath + " , schemaPath: " + it.util.toQuotedString($errSchemaPath) + " , params: { comparison: " + $opExpr + ", limit: " + $schemaValue + ", exclusive: " + $exclusive + " } ", it.opts.messages !== !1 && (out += " , message: 'should be " + $opStr + " ", $isData ?
|
|
16342
|
+
$$outStack.push(out), out = "", it.createErrors === !1 ? out += " {} " : (out += " { keyword: '" + ($errorKeyword || "_limit") + "' , dataPath: (dataPath || '') + " + it.errorPath + " , schemaPath: " + it.util.toQuotedString($errSchemaPath) + " , params: { comparison: " + $opExpr + ", limit: " + $schemaValue + ", exclusive: " + $exclusive + " } ", it.opts.messages !== !1 && (out += " , message: 'should be " + $opStr + " ", out += $isData ? "' + " + $schemaValue : "" + $schemaValue + "'"), it.opts.verbose && (out += " , schema: ", out += $isData ? "validate.schema" + $schemaPath : "" + $schema, out += " , parentSchema: validate.schema" + it.schemaPath + " , data: " + $data + " "), out += " } ");
|
|
16202
16343
|
var __err = out;
|
|
16203
|
-
return out = $$outStack.pop(), !it.compositeRule && $breakOnError ?
|
|
16344
|
+
return out = $$outStack.pop(), !it.compositeRule && $breakOnError ?
|
|
16345
|
+
/* istanbul ignore if */
|
|
16346
|
+
it.async ? out += " throw new ValidationError([" + __err + "]); " : out += " validate.errors = [" + __err + "]; return false; " : out += " var err = " + __err + "; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ", out += " } ", $breakOnError && (out += " else { "), out;
|
|
16204
16347
|
};
|
|
16205
16348
|
})), require__limitItems = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
16206
16349
|
module.exports = function generate__limitItems(it, $keyword, $ruleType) {
|
|
@@ -16209,9 +16352,11 @@ var require_uri_all = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
16209
16352
|
var $op = $keyword == "maxItems" ? ">" : "<";
|
|
16210
16353
|
out += "if ( ", $isData && (out += " (" + $schemaValue + " !== undefined && typeof " + $schemaValue + " != 'number') || "), out += " " + $data + ".length " + $op + " " + $schemaValue + ") { ";
|
|
16211
16354
|
var $errorKeyword = $keyword, $$outStack = $$outStack || [];
|
|
16212
|
-
$$outStack.push(out), out = "", it.createErrors === !1 ? out += " {} " : (out += " { keyword: '" + ($errorKeyword || "_limitItems") + "' , dataPath: (dataPath || '') + " + it.errorPath + " , schemaPath: " + it.util.toQuotedString($errSchemaPath) + " , params: { limit: " + $schemaValue + " } ", it.opts.messages !== !1 && (out += " , message: 'should NOT have ", $keyword == "maxItems" ?
|
|
16355
|
+
$$outStack.push(out), out = "", it.createErrors === !1 ? out += " {} " : (out += " { keyword: '" + ($errorKeyword || "_limitItems") + "' , dataPath: (dataPath || '') + " + it.errorPath + " , schemaPath: " + it.util.toQuotedString($errSchemaPath) + " , params: { limit: " + $schemaValue + " } ", it.opts.messages !== !1 && (out += " , message: 'should NOT have ", out += $keyword == "maxItems" ? "more" : "fewer", out += " than ", out += $isData ? "' + " + $schemaValue + " + '" : "" + $schema, out += " items' "), it.opts.verbose && (out += " , schema: ", out += $isData ? "validate.schema" + $schemaPath : "" + $schema, out += " , parentSchema: validate.schema" + it.schemaPath + " , data: " + $data + " "), out += " } ");
|
|
16213
16356
|
var __err = out;
|
|
16214
|
-
return out = $$outStack.pop(), !it.compositeRule && $breakOnError ?
|
|
16357
|
+
return out = $$outStack.pop(), !it.compositeRule && $breakOnError ?
|
|
16358
|
+
/* istanbul ignore if */
|
|
16359
|
+
it.async ? out += " throw new ValidationError([" + __err + "]); " : out += " validate.errors = [" + __err + "]; return false; " : out += " var err = " + __err + "; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ", out += "} ", $breakOnError && (out += " else { "), out;
|
|
16215
16360
|
};
|
|
16216
16361
|
})), require__limitLength = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
16217
16362
|
module.exports = function generate__limitLength(it, $keyword, $ruleType) {
|
|
@@ -16220,9 +16365,11 @@ var require_uri_all = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
16220
16365
|
var $op = $keyword == "maxLength" ? ">" : "<";
|
|
16221
16366
|
out += "if ( ", $isData && (out += " (" + $schemaValue + " !== undefined && typeof " + $schemaValue + " != 'number') || "), it.opts.unicode === !1 ? out += " " + $data + ".length " : out += " ucs2length(" + $data + ") ", out += " " + $op + " " + $schemaValue + ") { ";
|
|
16222
16367
|
var $errorKeyword = $keyword, $$outStack = $$outStack || [];
|
|
16223
|
-
$$outStack.push(out), out = "", it.createErrors === !1 ? out += " {} " : (out += " { keyword: '" + ($errorKeyword || "_limitLength") + "' , dataPath: (dataPath || '') + " + it.errorPath + " , schemaPath: " + it.util.toQuotedString($errSchemaPath) + " , params: { limit: " + $schemaValue + " } ", it.opts.messages !== !1 && (out += " , message: 'should NOT be ", $keyword == "maxLength" ?
|
|
16368
|
+
$$outStack.push(out), out = "", it.createErrors === !1 ? out += " {} " : (out += " { keyword: '" + ($errorKeyword || "_limitLength") + "' , dataPath: (dataPath || '') + " + it.errorPath + " , schemaPath: " + it.util.toQuotedString($errSchemaPath) + " , params: { limit: " + $schemaValue + " } ", it.opts.messages !== !1 && (out += " , message: 'should NOT be ", out += $keyword == "maxLength" ? "longer" : "shorter", out += " than ", out += $isData ? "' + " + $schemaValue + " + '" : "" + $schema, out += " characters' "), it.opts.verbose && (out += " , schema: ", out += $isData ? "validate.schema" + $schemaPath : "" + $schema, out += " , parentSchema: validate.schema" + it.schemaPath + " , data: " + $data + " "), out += " } ");
|
|
16224
16369
|
var __err = out;
|
|
16225
|
-
return out = $$outStack.pop(), !it.compositeRule && $breakOnError ?
|
|
16370
|
+
return out = $$outStack.pop(), !it.compositeRule && $breakOnError ?
|
|
16371
|
+
/* istanbul ignore if */
|
|
16372
|
+
it.async ? out += " throw new ValidationError([" + __err + "]); " : out += " validate.errors = [" + __err + "]; return false; " : out += " var err = " + __err + "; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ", out += "} ", $breakOnError && (out += " else { "), out;
|
|
16226
16373
|
};
|
|
16227
16374
|
})), require__limitProperties = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
16228
16375
|
module.exports = function generate__limitProperties(it, $keyword, $ruleType) {
|
|
@@ -16231,9 +16378,11 @@ var require_uri_all = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
16231
16378
|
var $op = $keyword == "maxProperties" ? ">" : "<";
|
|
16232
16379
|
out += "if ( ", $isData && (out += " (" + $schemaValue + " !== undefined && typeof " + $schemaValue + " != 'number') || "), out += " Object.keys(" + $data + ").length " + $op + " " + $schemaValue + ") { ";
|
|
16233
16380
|
var $errorKeyword = $keyword, $$outStack = $$outStack || [];
|
|
16234
|
-
$$outStack.push(out), out = "", it.createErrors === !1 ? out += " {} " : (out += " { keyword: '" + ($errorKeyword || "_limitProperties") + "' , dataPath: (dataPath || '') + " + it.errorPath + " , schemaPath: " + it.util.toQuotedString($errSchemaPath) + " , params: { limit: " + $schemaValue + " } ", it.opts.messages !== !1 && (out += " , message: 'should NOT have ", $keyword == "maxProperties" ?
|
|
16381
|
+
$$outStack.push(out), out = "", it.createErrors === !1 ? out += " {} " : (out += " { keyword: '" + ($errorKeyword || "_limitProperties") + "' , dataPath: (dataPath || '') + " + it.errorPath + " , schemaPath: " + it.util.toQuotedString($errSchemaPath) + " , params: { limit: " + $schemaValue + " } ", it.opts.messages !== !1 && (out += " , message: 'should NOT have ", out += $keyword == "maxProperties" ? "more" : "fewer", out += " than ", out += $isData ? "' + " + $schemaValue + " + '" : "" + $schema, out += " properties' "), it.opts.verbose && (out += " , schema: ", out += $isData ? "validate.schema" + $schemaPath : "" + $schema, out += " , parentSchema: validate.schema" + it.schemaPath + " , data: " + $data + " "), out += " } ");
|
|
16235
16382
|
var __err = out;
|
|
16236
|
-
return out = $$outStack.pop(), !it.compositeRule && $breakOnError ?
|
|
16383
|
+
return out = $$outStack.pop(), !it.compositeRule && $breakOnError ?
|
|
16384
|
+
/* istanbul ignore if */
|
|
16385
|
+
it.async ? out += " throw new ValidationError([" + __err + "]); " : out += " validate.errors = [" + __err + "]; return false; " : out += " var err = " + __err + "; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ", out += "} ", $breakOnError && (out += " else { "), out;
|
|
16237
16386
|
};
|
|
16238
16387
|
})), require_multipleOf = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
16239
16388
|
module.exports = function generate_multipleOf(it, $keyword, $ruleType) {
|
|
@@ -16241,9 +16390,11 @@ var require_uri_all = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
16241
16390
|
if ($isData ? (out += " var schema" + $lvl + " = " + it.util.getData($schema.$data, $dataLvl, it.dataPathArr) + "; ", $schemaValue = "schema" + $lvl) : $schemaValue = $schema, !($isData || typeof $schema == "number")) throw Error($keyword + " must be number");
|
|
16242
16391
|
out += "var division" + $lvl + ";if (", $isData && (out += " " + $schemaValue + " !== undefined && ( typeof " + $schemaValue + " != 'number' || "), out += " (division" + $lvl + " = " + $data + " / " + $schemaValue + ", ", it.opts.multipleOfPrecision ? out += " Math.abs(Math.round(division" + $lvl + ") - division" + $lvl + ") > 1e-" + it.opts.multipleOfPrecision + " " : out += " division" + $lvl + " !== parseInt(division" + $lvl + ") ", out += " ) ", $isData && (out += " ) "), out += " ) { ";
|
|
16243
16392
|
var $$outStack = $$outStack || [];
|
|
16244
|
-
$$outStack.push(out), out = "", it.createErrors === !1 ? out += " {} " : (out += " { keyword: 'multipleOf' , dataPath: (dataPath || '') + " + it.errorPath + " , schemaPath: " + it.util.toQuotedString($errSchemaPath) + " , params: { multipleOf: " + $schemaValue + " } ", it.opts.messages !== !1 && (out += " , message: 'should be multiple of ", $isData ?
|
|
16393
|
+
$$outStack.push(out), out = "", it.createErrors === !1 ? out += " {} " : (out += " { keyword: 'multipleOf' , dataPath: (dataPath || '') + " + it.errorPath + " , schemaPath: " + it.util.toQuotedString($errSchemaPath) + " , params: { multipleOf: " + $schemaValue + " } ", it.opts.messages !== !1 && (out += " , message: 'should be multiple of ", out += $isData ? "' + " + $schemaValue : "" + $schemaValue + "'"), it.opts.verbose && (out += " , schema: ", out += $isData ? "validate.schema" + $schemaPath : "" + $schema, out += " , parentSchema: validate.schema" + it.schemaPath + " , data: " + $data + " "), out += " } ");
|
|
16245
16394
|
var __err = out;
|
|
16246
|
-
return out = $$outStack.pop(), !it.compositeRule && $breakOnError ?
|
|
16395
|
+
return out = $$outStack.pop(), !it.compositeRule && $breakOnError ?
|
|
16396
|
+
/* istanbul ignore if */
|
|
16397
|
+
it.async ? out += " throw new ValidationError([" + __err + "]); " : out += " validate.errors = [" + __err + "]; return false; " : out += " var err = " + __err + "; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ", out += "} ", $breakOnError && (out += " else { "), out;
|
|
16247
16398
|
};
|
|
16248
16399
|
})), require_not = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
16249
16400
|
module.exports = function generate_not(it, $keyword, $ruleType) {
|
|
@@ -16259,7 +16410,9 @@ var require_uri_all = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
16259
16410
|
var $$outStack = $$outStack || [];
|
|
16260
16411
|
$$outStack.push(out), out = "", it.createErrors === !1 ? out += " {} " : (out += " { keyword: 'not' , dataPath: (dataPath || '') + " + it.errorPath + " , schemaPath: " + it.util.toQuotedString($errSchemaPath) + " , params: {} ", it.opts.messages !== !1 && (out += " , message: 'should NOT be valid' "), it.opts.verbose && (out += " , schema: validate.schema" + $schemaPath + " , parentSchema: validate.schema" + it.schemaPath + " , data: " + $data + " "), out += " } ");
|
|
16261
16412
|
var __err = out;
|
|
16262
|
-
out = $$outStack.pop(), !it.compositeRule && $breakOnError ?
|
|
16413
|
+
out = $$outStack.pop(), !it.compositeRule && $breakOnError ?
|
|
16414
|
+
/* istanbul ignore if */
|
|
16415
|
+
it.async ? out += " throw new ValidationError([" + __err + "]); " : out += " validate.errors = [" + __err + "]; return false; " : out += " var err = " + __err + "; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ", out += " } else { errors = " + $errs + "; if (vErrors !== null) { if (" + $errs + ") vErrors.length = " + $errs + "; else vErrors = null; } ", it.opts.allErrors && (out += " } ");
|
|
16263
16416
|
} else out += " var err = ", it.createErrors === !1 ? out += " {} " : (out += " { keyword: 'not' , dataPath: (dataPath || '') + " + it.errorPath + " , schemaPath: " + it.util.toQuotedString($errSchemaPath) + " , params: {} ", it.opts.messages !== !1 && (out += " , message: 'should NOT be valid' "), it.opts.verbose && (out += " , schema: validate.schema" + $schemaPath + " , parentSchema: validate.schema" + it.schemaPath + " , data: " + $data + " "), out += " } "), out += "; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ", $breakOnError && (out += " if (false) { ");
|
|
16264
16417
|
return out;
|
|
16265
16418
|
};
|
|
@@ -16273,7 +16426,9 @@ var require_uri_all = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
16273
16426
|
it.compositeRule = $it.compositeRule = !0;
|
|
16274
16427
|
var arr1 = $schema;
|
|
16275
16428
|
if (arr1) for (var $sch, $i = -1, l1 = arr1.length - 1; $i < l1;) $sch = arr1[$i += 1], (it.opts.strictKeywords ? typeof $sch == "object" && Object.keys($sch).length > 0 || $sch === !1 : it.util.schemaHasRules($sch, it.RULES.all)) ? ($it.schema = $sch, $it.schemaPath = $schemaPath + "[" + $i + "]", $it.errSchemaPath = $errSchemaPath + "/" + $i, out += " " + it.validate($it) + " ", $it.baseId = $currentBaseId) : out += " var " + $nextValid + " = true; ", $i && (out += " if (" + $nextValid + " && " + $prevValid + ") { " + $valid + " = false; " + $passingSchemas + " = [" + $passingSchemas + ", " + $i + "]; } else { ", $closingBraces += "}"), out += " if (" + $nextValid + ") { " + $valid + " = " + $prevValid + " = true; " + $passingSchemas + " = " + $i + "; }";
|
|
16276
|
-
return it.compositeRule = $it.compositeRule = $wasComposite, out += "" + $closingBraces + "if (!" + $valid + ") { var err = ", it.createErrors === !1 ? out += " {} " : (out += " { keyword: 'oneOf' , dataPath: (dataPath || '') + " + it.errorPath + " , schemaPath: " + it.util.toQuotedString($errSchemaPath) + " , params: { passingSchemas: " + $passingSchemas + " } ", it.opts.messages !== !1 && (out += " , message: 'should match exactly one schema in oneOf' "), it.opts.verbose && (out += " , schema: validate.schema" + $schemaPath + " , parentSchema: validate.schema" + it.schemaPath + " , data: " + $data + " "), out += " } "), out += "; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ", !it.compositeRule && $breakOnError &&
|
|
16429
|
+
return it.compositeRule = $it.compositeRule = $wasComposite, out += "" + $closingBraces + "if (!" + $valid + ") { var err = ", it.createErrors === !1 ? out += " {} " : (out += " { keyword: 'oneOf' , dataPath: (dataPath || '') + " + it.errorPath + " , schemaPath: " + it.util.toQuotedString($errSchemaPath) + " , params: { passingSchemas: " + $passingSchemas + " } ", it.opts.messages !== !1 && (out += " , message: 'should match exactly one schema in oneOf' "), it.opts.verbose && (out += " , schema: validate.schema" + $schemaPath + " , parentSchema: validate.schema" + it.schemaPath + " , data: " + $data + " "), out += " } "), out += "; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ", !it.compositeRule && $breakOnError &&
|
|
16430
|
+
/* istanbul ignore if */
|
|
16431
|
+
(it.async ? out += " throw new ValidationError(vErrors); " : out += " validate.errors = vErrors; return false; "), out += "} else { errors = " + $errs + "; if (vErrors !== null) { if (" + $errs + ") vErrors.length = " + $errs + "; else vErrors = null; }", it.opts.allErrors && (out += " } "), out;
|
|
16277
16432
|
};
|
|
16278
16433
|
})), require_pattern = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
16279
16434
|
module.exports = function generate_pattern(it, $keyword, $ruleType) {
|
|
@@ -16286,9 +16441,11 @@ var require_uri_all = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
16286
16441
|
out += " if ( ", $isData && (out += " (" + $schemaValue + " !== undefined && typeof " + $schemaValue + " != 'string') || "), out += " !" + $regexp + ".test(" + $data + ") ) {";
|
|
16287
16442
|
}
|
|
16288
16443
|
var $$outStack = $$outStack || [];
|
|
16289
|
-
$$outStack.push(out), out = "", it.createErrors === !1 ? out += " {} " : (out += " { keyword: 'pattern' , dataPath: (dataPath || '') + " + it.errorPath + " , schemaPath: " + it.util.toQuotedString($errSchemaPath) + " , params: { pattern: ", $isData ?
|
|
16444
|
+
$$outStack.push(out), out = "", it.createErrors === !1 ? out += " {} " : (out += " { keyword: 'pattern' , dataPath: (dataPath || '') + " + it.errorPath + " , schemaPath: " + it.util.toQuotedString($errSchemaPath) + " , params: { pattern: ", out += $isData ? "" + $schemaValue : "" + it.util.toQuotedString($schema), out += " } ", it.opts.messages !== !1 && (out += " , message: 'should match pattern \"", out += $isData ? "' + " + $schemaValue + " + '" : "" + it.util.escapeQuotes($schema), out += "\"' "), it.opts.verbose && (out += " , schema: ", out += $isData ? "validate.schema" + $schemaPath : "" + it.util.toQuotedString($schema), out += " , parentSchema: validate.schema" + it.schemaPath + " , data: " + $data + " "), out += " } ");
|
|
16290
16445
|
var __err = out;
|
|
16291
|
-
return out = $$outStack.pop(), !it.compositeRule && $breakOnError ?
|
|
16446
|
+
return out = $$outStack.pop(), !it.compositeRule && $breakOnError ?
|
|
16447
|
+
/* istanbul ignore if */
|
|
16448
|
+
it.async ? out += " throw new ValidationError([" + __err + "]); " : out += " validate.errors = [" + __err + "]; return false; " : out += " var err = " + __err + "; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ", out += "} ", $breakOnError && (out += " else { "), out;
|
|
16292
16449
|
};
|
|
16293
16450
|
})), require_properties = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
16294
16451
|
module.exports = function generate_properties(it, $keyword, $ruleType) {
|
|
@@ -16300,11 +16457,13 @@ var require_uri_all = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
16300
16457
|
return p !== "__proto__";
|
|
16301
16458
|
}
|
|
16302
16459
|
if (out += "var " + $errs + " = errors;var " + $nextValid + " = true;", $ownProperties && (out += " var " + $dataProperties + " = undefined;"), $checkAdditional) {
|
|
16303
|
-
if ($ownProperties ?
|
|
16304
|
-
if (out += " var isAdditional" + $lvl + " = !(false ", $schemaKeys.length)
|
|
16305
|
-
|
|
16306
|
-
|
|
16307
|
-
|
|
16460
|
+
if (out += $ownProperties ? " " + $dataProperties + " = " + $dataProperties + " || Object.keys(" + $data + "); for (var " + $idx + "=0; " + $idx + "<" + $dataProperties + ".length; " + $idx + "++) { var " + $key + " = " + $dataProperties + "[" + $idx + "]; " : " for (var " + $key + " in " + $data + ") { ", $someProperties) {
|
|
16461
|
+
if (out += " var isAdditional" + $lvl + " = !(false ", $schemaKeys.length) {
|
|
16462
|
+
if ($schemaKeys.length > 8) out += " || validate.schema" + $schemaPath + ".hasOwnProperty(" + $key + ") ";
|
|
16463
|
+
else {
|
|
16464
|
+
var arr1 = $schemaKeys;
|
|
16465
|
+
if (arr1) for (var $propertyKey, i1 = -1, l1 = arr1.length - 1; i1 < l1;) $propertyKey = arr1[i1 += 1], out += " || " + $key + " == " + it.util.toQuotedString($propertyKey) + " ";
|
|
16466
|
+
}
|
|
16308
16467
|
}
|
|
16309
16468
|
if ($pPropertyKeys.length) {
|
|
16310
16469
|
var arr2 = $pPropertyKeys;
|
|
@@ -16315,30 +16474,35 @@ var require_uri_all = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
16315
16474
|
if ($removeAdditional == "all") out += " delete " + $data + "[" + $key + "]; ";
|
|
16316
16475
|
else {
|
|
16317
16476
|
var $currentErrorPath = it.errorPath, $additionalProperty = "' + " + $key + " + '";
|
|
16318
|
-
if (it.opts._errorDataPathProperty && (it.errorPath = it.util.getPathExpr(it.errorPath, $key, it.opts.jsonPointers)), $noAdditional)
|
|
16319
|
-
|
|
16320
|
-
|
|
16321
|
-
|
|
16322
|
-
|
|
16323
|
-
|
|
16324
|
-
|
|
16325
|
-
|
|
16326
|
-
|
|
16327
|
-
|
|
16328
|
-
|
|
16329
|
-
|
|
16330
|
-
|
|
16331
|
-
|
|
16332
|
-
|
|
16333
|
-
|
|
16334
|
-
|
|
16335
|
-
|
|
16336
|
-
|
|
16337
|
-
|
|
16338
|
-
|
|
16339
|
-
|
|
16340
|
-
|
|
16341
|
-
|
|
16477
|
+
if (it.opts._errorDataPathProperty && (it.errorPath = it.util.getPathExpr(it.errorPath, $key, it.opts.jsonPointers)), $noAdditional) {
|
|
16478
|
+
if ($removeAdditional) out += " delete " + $data + "[" + $key + "]; ";
|
|
16479
|
+
else {
|
|
16480
|
+
out += " " + $nextValid + " = false; ";
|
|
16481
|
+
var $currErrSchemaPath = $errSchemaPath;
|
|
16482
|
+
$errSchemaPath = it.errSchemaPath + "/additionalProperties";
|
|
16483
|
+
var $$outStack = $$outStack || [];
|
|
16484
|
+
$$outStack.push(out), out = "", it.createErrors === !1 ? out += " {} " : (out += " { keyword: 'additionalProperties' , dataPath: (dataPath || '') + " + it.errorPath + " , schemaPath: " + it.util.toQuotedString($errSchemaPath) + " , params: { additionalProperty: '" + $additionalProperty + "' } ", it.opts.messages !== !1 && (out += " , message: '", it.opts._errorDataPathProperty ? out += "is an invalid additional property" : out += "should NOT have additional properties", out += "' "), it.opts.verbose && (out += " , schema: false , parentSchema: validate.schema" + it.schemaPath + " , data: " + $data + " "), out += " } ");
|
|
16485
|
+
var __err = out;
|
|
16486
|
+
out = $$outStack.pop(), !it.compositeRule && $breakOnError ?
|
|
16487
|
+
/* istanbul ignore if */
|
|
16488
|
+
it.async ? out += " throw new ValidationError([" + __err + "]); " : out += " validate.errors = [" + __err + "]; return false; " : out += " var err = " + __err + "; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ", $errSchemaPath = $currErrSchemaPath, $breakOnError && (out += " break; ");
|
|
16489
|
+
}
|
|
16490
|
+
} else if ($additionalIsSchema) {
|
|
16491
|
+
if ($removeAdditional == "failing") {
|
|
16492
|
+
out += " var " + $errs + " = errors; ";
|
|
16493
|
+
var $wasComposite = it.compositeRule;
|
|
16494
|
+
it.compositeRule = $it.compositeRule = !0, $it.schema = $aProperties, $it.schemaPath = it.schemaPath + ".additionalProperties", $it.errSchemaPath = it.errSchemaPath + "/additionalProperties", $it.errorPath = it.opts._errorDataPathProperty ? it.errorPath : it.util.getPathExpr(it.errorPath, $key, it.opts.jsonPointers);
|
|
16495
|
+
var $passData = $data + "[" + $key + "]";
|
|
16496
|
+
$it.dataPathArr[$dataNxt] = $key;
|
|
16497
|
+
var $code = it.validate($it);
|
|
16498
|
+
$it.baseId = $currentBaseId, it.util.varOccurences($code, $nextData) < 2 ? out += " " + it.util.varReplace($code, $nextData, $passData) + " " : out += " var " + $nextData + " = " + $passData + "; " + $code + " ", out += " if (!" + $nextValid + ") { errors = " + $errs + "; if (validate.errors !== null) { if (errors) validate.errors.length = errors; else validate.errors = null; } delete " + $data + "[" + $key + "]; } ", it.compositeRule = $it.compositeRule = $wasComposite;
|
|
16499
|
+
} else {
|
|
16500
|
+
$it.schema = $aProperties, $it.schemaPath = it.schemaPath + ".additionalProperties", $it.errSchemaPath = it.errSchemaPath + "/additionalProperties", $it.errorPath = it.opts._errorDataPathProperty ? it.errorPath : it.util.getPathExpr(it.errorPath, $key, it.opts.jsonPointers);
|
|
16501
|
+
var $passData = $data + "[" + $key + "]";
|
|
16502
|
+
$it.dataPathArr[$dataNxt] = $key;
|
|
16503
|
+
var $code = it.validate($it);
|
|
16504
|
+
$it.baseId = $currentBaseId, it.util.varOccurences($code, $nextData) < 2 ? out += " " + it.util.varReplace($code, $nextData, $passData) + " " : out += " var " + $nextData + " = " + $passData + "; " + $code + " ", $breakOnError && (out += " if (!" + $nextValid + ") break; ");
|
|
16505
|
+
}
|
|
16342
16506
|
}
|
|
16343
16507
|
it.errorPath = $currentErrorPath;
|
|
16344
16508
|
}
|
|
@@ -16370,7 +16534,9 @@ var require_uri_all = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
16370
16534
|
var $$outStack = $$outStack || [];
|
|
16371
16535
|
$$outStack.push(out), out = "", it.createErrors === !1 ? out += " {} " : (out += " { keyword: 'required' , dataPath: (dataPath || '') + " + it.errorPath + " , schemaPath: " + it.util.toQuotedString($errSchemaPath) + " , params: { missingProperty: '" + $missingProperty + "' } ", it.opts.messages !== !1 && (out += " , message: '", it.opts._errorDataPathProperty ? out += "is a required property" : out += "should have required property \\'" + $missingProperty + "\\'", out += "' "), it.opts.verbose && (out += " , schema: validate.schema" + $schemaPath + " , parentSchema: validate.schema" + it.schemaPath + " , data: " + $data + " "), out += " } ");
|
|
16372
16536
|
var __err = out;
|
|
16373
|
-
out = $$outStack.pop(), !it.compositeRule && $breakOnError ?
|
|
16537
|
+
out = $$outStack.pop(), !it.compositeRule && $breakOnError ?
|
|
16538
|
+
/* istanbul ignore if */
|
|
16539
|
+
it.async ? out += " throw new ValidationError([" + __err + "]); " : out += " validate.errors = [" + __err + "]; return false; " : out += " var err = " + __err + "; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ", $errSchemaPath = $currErrSchemaPath, it.errorPath = $currentErrorPath, out += " } else { ";
|
|
16374
16540
|
} else $breakOnError ? (out += " if ( " + $useData + " === undefined ", $ownProperties && (out += " || ! Object.prototype.hasOwnProperty.call(" + $data + ", '" + it.util.escapeQuotes($propertyKey) + "') "), out += ") { " + $nextValid + " = true; } else { ") : (out += " if (" + $useData + " !== undefined ", $ownProperties && (out += " && Object.prototype.hasOwnProperty.call(" + $data + ", '" + it.util.escapeQuotes($propertyKey) + "') "), out += " ) { ");
|
|
16375
16541
|
out += " " + $code + " } ";
|
|
16376
16542
|
}
|
|
@@ -16384,7 +16550,7 @@ var require_uri_all = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
16384
16550
|
$pProperty = arr4[i4 += 1];
|
|
16385
16551
|
var $sch = $pProperties[$pProperty];
|
|
16386
16552
|
if (it.opts.strictKeywords ? typeof $sch == "object" && Object.keys($sch).length > 0 || $sch === !1 : it.util.schemaHasRules($sch, it.RULES.all)) {
|
|
16387
|
-
$it.schema = $sch, $it.schemaPath = it.schemaPath + ".patternProperties" + it.util.getProperty($pProperty), $it.errSchemaPath = it.errSchemaPath + "/patternProperties/" + it.util.escapeFragment($pProperty), $ownProperties ?
|
|
16553
|
+
$it.schema = $sch, $it.schemaPath = it.schemaPath + ".patternProperties" + it.util.getProperty($pProperty), $it.errSchemaPath = it.errSchemaPath + "/patternProperties/" + it.util.escapeFragment($pProperty), out += $ownProperties ? " " + $dataProperties + " = " + $dataProperties + " || Object.keys(" + $data + "); for (var " + $idx + "=0; " + $idx + "<" + $dataProperties + ".length; " + $idx + "++) { var " + $key + " = " + $dataProperties + "[" + $idx + "]; " : " for (var " + $key + " in " + $data + ") { ", out += " if (" + it.usePattern($pProperty) + ".test(" + $key + ")) { ", $it.errorPath = it.util.getPathExpr(it.errorPath, $key, it.opts.jsonPointers);
|
|
16388
16554
|
var $passData = $data + "[" + $key + "]";
|
|
16389
16555
|
$it.dataPathArr[$dataNxt] = $key;
|
|
16390
16556
|
var $code = it.validate($it);
|
|
@@ -16402,11 +16568,13 @@ var require_uri_all = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
16402
16568
|
if (out += "var " + $errs + " = errors;", it.opts.strictKeywords ? typeof $schema == "object" && Object.keys($schema).length > 0 || $schema === !1 : it.util.schemaHasRules($schema, it.RULES.all)) {
|
|
16403
16569
|
$it.schema = $schema, $it.schemaPath = $schemaPath, $it.errSchemaPath = $errSchemaPath;
|
|
16404
16570
|
var $key = "key" + $lvl, $idx = "idx" + $lvl, $i = "i" + $lvl, $invalidName = "' + " + $key + " + '", $nextData = "data" + ($it.dataLevel = it.dataLevel + 1), $dataProperties = "dataProperties" + $lvl, $ownProperties = it.opts.ownProperties, $currentBaseId = it.baseId;
|
|
16405
|
-
$ownProperties && (out += " var " + $dataProperties + " = undefined; "), $ownProperties ?
|
|
16571
|
+
$ownProperties && (out += " var " + $dataProperties + " = undefined; "), out += $ownProperties ? " " + $dataProperties + " = " + $dataProperties + " || Object.keys(" + $data + "); for (var " + $idx + "=0; " + $idx + "<" + $dataProperties + ".length; " + $idx + "++) { var " + $key + " = " + $dataProperties + "[" + $idx + "]; " : " for (var " + $key + " in " + $data + ") { ", out += " var startErrs" + $lvl + " = errors; ";
|
|
16406
16572
|
var $passData = $key, $wasComposite = it.compositeRule;
|
|
16407
16573
|
it.compositeRule = $it.compositeRule = !0;
|
|
16408
16574
|
var $code = it.validate($it);
|
|
16409
|
-
$it.baseId = $currentBaseId, it.util.varOccurences($code, $nextData) < 2 ? out += " " + it.util.varReplace($code, $nextData, $passData) + " " : out += " var " + $nextData + " = " + $passData + "; " + $code + " ", it.compositeRule = $it.compositeRule = $wasComposite, out += " if (!" + $nextValid + ") { for (var " + $i + "=startErrs" + $lvl + "; " + $i + "<errors; " + $i + "++) { vErrors[" + $i + "].propertyName = " + $key + "; } var err = ", it.createErrors === !1 ? out += " {} " : (out += " { keyword: 'propertyNames' , dataPath: (dataPath || '') + " + it.errorPath + " , schemaPath: " + it.util.toQuotedString($errSchemaPath) + " , params: { propertyName: '" + $invalidName + "' } ", it.opts.messages !== !1 && (out += " , message: 'property name \\'" + $invalidName + "\\' is invalid' "), it.opts.verbose && (out += " , schema: validate.schema" + $schemaPath + " , parentSchema: validate.schema" + it.schemaPath + " , data: " + $data + " "), out += " } "), out += "; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ", !it.compositeRule && $breakOnError &&
|
|
16575
|
+
$it.baseId = $currentBaseId, it.util.varOccurences($code, $nextData) < 2 ? out += " " + it.util.varReplace($code, $nextData, $passData) + " " : out += " var " + $nextData + " = " + $passData + "; " + $code + " ", it.compositeRule = $it.compositeRule = $wasComposite, out += " if (!" + $nextValid + ") { for (var " + $i + "=startErrs" + $lvl + "; " + $i + "<errors; " + $i + "++) { vErrors[" + $i + "].propertyName = " + $key + "; } var err = ", it.createErrors === !1 ? out += " {} " : (out += " { keyword: 'propertyNames' , dataPath: (dataPath || '') + " + it.errorPath + " , schemaPath: " + it.util.toQuotedString($errSchemaPath) + " , params: { propertyName: '" + $invalidName + "' } ", it.opts.messages !== !1 && (out += " , message: 'property name \\'" + $invalidName + "\\' is invalid' "), it.opts.verbose && (out += " , schema: validate.schema" + $schemaPath + " , parentSchema: validate.schema" + it.schemaPath + " , data: " + $data + " "), out += " } "), out += "; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ", !it.compositeRule && $breakOnError &&
|
|
16576
|
+
/* istanbul ignore if */
|
|
16577
|
+
(it.async ? out += " throw new ValidationError(vErrors); " : out += " validate.errors = vErrors; return false; "), $breakOnError && (out += " break; "), out += " } }";
|
|
16410
16578
|
}
|
|
16411
16579
|
return $breakOnError && (out += " " + $closingBraces + " if (" + $errs + " == errors) {"), out;
|
|
16412
16580
|
};
|
|
@@ -16415,41 +16583,48 @@ var require_uri_all = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
16415
16583
|
var out = " ", $lvl = it.level, $dataLvl = it.dataLevel, $schema = it.schema[$keyword], $schemaPath = it.schemaPath + it.util.getProperty($keyword), $errSchemaPath = it.errSchemaPath + "/" + $keyword, $breakOnError = !it.opts.allErrors, $data = "data" + ($dataLvl || ""), $valid = "valid" + $lvl, $isData = it.opts.$data && $schema && $schema.$data;
|
|
16416
16584
|
$isData && (out += " var schema" + $lvl + " = " + it.util.getData($schema.$data, $dataLvl, it.dataPathArr) + "; ", "" + $lvl);
|
|
16417
16585
|
var $vSchema = "schema" + $lvl;
|
|
16418
|
-
if (!$isData)
|
|
16419
|
-
|
|
16420
|
-
|
|
16421
|
-
$property = arr1
|
|
16422
|
-
|
|
16423
|
-
|
|
16424
|
-
|
|
16425
|
-
|
|
16586
|
+
if (!$isData) {
|
|
16587
|
+
if ($schema.length < it.opts.loopRequired && it.schema.properties && Object.keys(it.schema.properties).length) {
|
|
16588
|
+
var $required = [], arr1 = $schema;
|
|
16589
|
+
if (arr1) for (var $property, i1 = -1, l1 = arr1.length - 1; i1 < l1;) {
|
|
16590
|
+
$property = arr1[i1 += 1];
|
|
16591
|
+
var $propertySch = it.schema.properties[$property];
|
|
16592
|
+
$propertySch && (it.opts.strictKeywords ? typeof $propertySch == "object" && Object.keys($propertySch).length > 0 || $propertySch === !1 : it.util.schemaHasRules($propertySch, it.RULES.all)) || ($required[$required.length] = $property);
|
|
16593
|
+
}
|
|
16594
|
+
} else var $required = $schema;
|
|
16595
|
+
}
|
|
16426
16596
|
if ($isData || $required.length) {
|
|
16427
16597
|
var $currentErrorPath = it.errorPath, $loopRequired = $isData || $required.length >= it.opts.loopRequired, $ownProperties = it.opts.ownProperties;
|
|
16428
|
-
if ($breakOnError)
|
|
16429
|
-
|
|
16430
|
-
|
|
16431
|
-
|
|
16432
|
-
|
|
16433
|
-
|
|
16434
|
-
|
|
16435
|
-
|
|
16436
|
-
|
|
16437
|
-
|
|
16438
|
-
|
|
16439
|
-
|
|
16440
|
-
|
|
16441
|
-
var
|
|
16442
|
-
|
|
16598
|
+
if ($breakOnError) {
|
|
16599
|
+
if (out += " var missing" + $lvl + "; ", $loopRequired) {
|
|
16600
|
+
$isData || (out += " var " + $vSchema + " = validate.schema" + $schemaPath + "; ");
|
|
16601
|
+
var $i = "i" + $lvl, $propertyPath = "schema" + $lvl + "[" + $i + "]", $missingProperty = "' + " + $propertyPath + " + '";
|
|
16602
|
+
it.opts._errorDataPathProperty && (it.errorPath = it.util.getPathExpr($currentErrorPath, $propertyPath, it.opts.jsonPointers)), out += " var " + $valid + " = true; ", $isData && (out += " if (schema" + $lvl + " === undefined) " + $valid + " = true; else if (!Array.isArray(schema" + $lvl + ")) " + $valid + " = false; else {"), out += " for (var " + $i + " = 0; " + $i + " < " + $vSchema + ".length; " + $i + "++) { " + $valid + " = " + $data + "[" + $vSchema + "[" + $i + "]] !== undefined ", $ownProperties && (out += " && Object.prototype.hasOwnProperty.call(" + $data + ", " + $vSchema + "[" + $i + "]) "), out += "; if (!" + $valid + ") break; } ", $isData && (out += " } "), out += " if (!" + $valid + ") { ";
|
|
16603
|
+
var $$outStack = $$outStack || [];
|
|
16604
|
+
$$outStack.push(out), out = "", it.createErrors === !1 ? out += " {} " : (out += " { keyword: 'required' , dataPath: (dataPath || '') + " + it.errorPath + " , schemaPath: " + it.util.toQuotedString($errSchemaPath) + " , params: { missingProperty: '" + $missingProperty + "' } ", it.opts.messages !== !1 && (out += " , message: '", it.opts._errorDataPathProperty ? out += "is a required property" : out += "should have required property \\'" + $missingProperty + "\\'", out += "' "), it.opts.verbose && (out += " , schema: validate.schema" + $schemaPath + " , parentSchema: validate.schema" + it.schemaPath + " , data: " + $data + " "), out += " } ");
|
|
16605
|
+
var __err = out;
|
|
16606
|
+
out = $$outStack.pop(), !it.compositeRule && $breakOnError ?
|
|
16607
|
+
/* istanbul ignore if */
|
|
16608
|
+
it.async ? out += " throw new ValidationError([" + __err + "]); " : out += " validate.errors = [" + __err + "]; return false; " : out += " var err = " + __err + "; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ", out += " } else { ";
|
|
16609
|
+
} else {
|
|
16610
|
+
out += " if ( ";
|
|
16611
|
+
var arr2 = $required;
|
|
16612
|
+
if (arr2) for (var $propertyKey, $i = -1, l2 = arr2.length - 1; $i < l2;) {
|
|
16613
|
+
$propertyKey = arr2[$i += 1], $i && (out += " || ");
|
|
16614
|
+
var $prop = it.util.getProperty($propertyKey), $useData = $data + $prop;
|
|
16615
|
+
out += " ( ( " + $useData + " === undefined ", $ownProperties && (out += " || ! Object.prototype.hasOwnProperty.call(" + $data + ", '" + it.util.escapeQuotes($propertyKey) + "') "), out += ") && (missing" + $lvl + " = " + it.util.toQuotedString(it.opts.jsonPointers ? $propertyKey : $prop) + ") ) ";
|
|
16616
|
+
}
|
|
16617
|
+
out += ") { ";
|
|
16618
|
+
var $propertyPath = "missing" + $lvl, $missingProperty = "' + " + $propertyPath + " + '";
|
|
16619
|
+
it.opts._errorDataPathProperty && (it.errorPath = it.opts.jsonPointers ? it.util.getPathExpr($currentErrorPath, $propertyPath, !0) : $currentErrorPath + " + " + $propertyPath);
|
|
16620
|
+
var $$outStack = $$outStack || [];
|
|
16621
|
+
$$outStack.push(out), out = "", it.createErrors === !1 ? out += " {} " : (out += " { keyword: 'required' , dataPath: (dataPath || '') + " + it.errorPath + " , schemaPath: " + it.util.toQuotedString($errSchemaPath) + " , params: { missingProperty: '" + $missingProperty + "' } ", it.opts.messages !== !1 && (out += " , message: '", it.opts._errorDataPathProperty ? out += "is a required property" : out += "should have required property \\'" + $missingProperty + "\\'", out += "' "), it.opts.verbose && (out += " , schema: validate.schema" + $schemaPath + " , parentSchema: validate.schema" + it.schemaPath + " , data: " + $data + " "), out += " } ");
|
|
16622
|
+
var __err = out;
|
|
16623
|
+
out = $$outStack.pop(), !it.compositeRule && $breakOnError ?
|
|
16624
|
+
/* istanbul ignore if */
|
|
16625
|
+
it.async ? out += " throw new ValidationError([" + __err + "]); " : out += " validate.errors = [" + __err + "]; return false; " : out += " var err = " + __err + "; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ", out += " } else { ";
|
|
16443
16626
|
}
|
|
16444
|
-
|
|
16445
|
-
var $propertyPath = "missing" + $lvl, $missingProperty = "' + " + $propertyPath + " + '";
|
|
16446
|
-
it.opts._errorDataPathProperty && (it.errorPath = it.opts.jsonPointers ? it.util.getPathExpr($currentErrorPath, $propertyPath, !0) : $currentErrorPath + " + " + $propertyPath);
|
|
16447
|
-
var $$outStack = $$outStack || [];
|
|
16448
|
-
$$outStack.push(out), out = "", it.createErrors === !1 ? out += " {} " : (out += " { keyword: 'required' , dataPath: (dataPath || '') + " + it.errorPath + " , schemaPath: " + it.util.toQuotedString($errSchemaPath) + " , params: { missingProperty: '" + $missingProperty + "' } ", it.opts.messages !== !1 && (out += " , message: '", it.opts._errorDataPathProperty ? out += "is a required property" : out += "should have required property \\'" + $missingProperty + "\\'", out += "' "), it.opts.verbose && (out += " , schema: validate.schema" + $schemaPath + " , parentSchema: validate.schema" + it.schemaPath + " , data: " + $data + " "), out += " } ");
|
|
16449
|
-
var __err = out;
|
|
16450
|
-
out = $$outStack.pop(), !it.compositeRule && $breakOnError ? it.async ? out += " throw new ValidationError([" + __err + "]); " : out += " validate.errors = [" + __err + "]; return false; " : out += " var err = " + __err + "; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ", out += " } else { ";
|
|
16451
|
-
}
|
|
16452
|
-
else if ($loopRequired) {
|
|
16627
|
+
} else if ($loopRequired) {
|
|
16453
16628
|
$isData || (out += " var " + $vSchema + " = validate.schema" + $schemaPath + "; ");
|
|
16454
16629
|
var $i = "i" + $lvl, $propertyPath = "schema" + $lvl + "[" + $i + "]", $missingProperty = "' + " + $propertyPath + " + '";
|
|
16455
16630
|
it.opts._errorDataPathProperty && (it.errorPath = it.util.getPathExpr($currentErrorPath, $propertyPath, it.opts.jsonPointers)), $isData && (out += " if (" + $vSchema + " && !Array.isArray(" + $vSchema + ")) { var err = ", it.createErrors === !1 ? out += " {} " : (out += " { keyword: 'required' , dataPath: (dataPath || '') + " + it.errorPath + " , schemaPath: " + it.util.toQuotedString($errSchemaPath) + " , params: { missingProperty: '" + $missingProperty + "' } ", it.opts.messages !== !1 && (out += " , message: '", it.opts._errorDataPathProperty ? out += "is a required property" : out += "should have required property \\'" + $missingProperty + "\\'", out += "' "), it.opts.verbose && (out += " , schema: validate.schema" + $schemaPath + " , parentSchema: validate.schema" + it.schemaPath + " , data: " + $data + " "), out += " } "), out += "; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; } else if (" + $vSchema + " !== undefined) { "), out += " for (var " + $i + " = 0; " + $i + " < " + $vSchema + ".length; " + $i + "++) { if (" + $data + "[" + $vSchema + "[" + $i + "]] === undefined ", $ownProperties && (out += " || ! Object.prototype.hasOwnProperty.call(" + $data + ", " + $vSchema + "[" + $i + "]) "), out += ") { var err = ", it.createErrors === !1 ? out += " {} " : (out += " { keyword: 'required' , dataPath: (dataPath || '') + " + it.errorPath + " , schemaPath: " + it.util.toQuotedString($errSchemaPath) + " , params: { missingProperty: '" + $missingProperty + "' } ", it.opts.messages !== !1 && (out += " , message: '", it.opts._errorDataPathProperty ? out += "is a required property" : out += "should have required property \\'" + $missingProperty + "\\'", out += "' "), it.opts.verbose && (out += " , schema: validate.schema" + $schemaPath + " , parentSchema: validate.schema" + it.schemaPath + " , data: " + $data + " "), out += " } "), out += "; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; } } ", $isData && (out += " } ");
|
|
@@ -16479,9 +16654,11 @@ var require_uri_all = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
16479
16654
|
}
|
|
16480
16655
|
out += " } ", $isData && (out += " } "), out += " if (!" + $valid + ") { ";
|
|
16481
16656
|
var $$outStack = $$outStack || [];
|
|
16482
|
-
$$outStack.push(out), out = "", it.createErrors === !1 ? out += " {} " : (out += " { keyword: 'uniqueItems' , dataPath: (dataPath || '') + " + it.errorPath + " , schemaPath: " + it.util.toQuotedString($errSchemaPath) + " , params: { i: i, j: j } ", it.opts.messages !== !1 && (out += " , message: 'should NOT have duplicate items (items ## ' + j + ' and ' + i + ' are identical)' "), it.opts.verbose && (out += " , schema: ", $isData ?
|
|
16657
|
+
$$outStack.push(out), out = "", it.createErrors === !1 ? out += " {} " : (out += " { keyword: 'uniqueItems' , dataPath: (dataPath || '') + " + it.errorPath + " , schemaPath: " + it.util.toQuotedString($errSchemaPath) + " , params: { i: i, j: j } ", it.opts.messages !== !1 && (out += " , message: 'should NOT have duplicate items (items ## ' + j + ' and ' + i + ' are identical)' "), it.opts.verbose && (out += " , schema: ", out += $isData ? "validate.schema" + $schemaPath : "" + $schema, out += " , parentSchema: validate.schema" + it.schemaPath + " , data: " + $data + " "), out += " } ");
|
|
16483
16658
|
var __err = out;
|
|
16484
|
-
out = $$outStack.pop(), !it.compositeRule && $breakOnError ?
|
|
16659
|
+
out = $$outStack.pop(), !it.compositeRule && $breakOnError ?
|
|
16660
|
+
/* istanbul ignore if */
|
|
16661
|
+
it.async ? out += " throw new ValidationError([" + __err + "]); " : out += " validate.errors = [" + __err + "]; return false; " : out += " var err = " + __err + "; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ", out += " } ", $breakOnError && (out += " else { ");
|
|
16485
16662
|
} else $breakOnError && (out += " if (true) { ");
|
|
16486
16663
|
return out;
|
|
16487
16664
|
};
|
|
@@ -16739,15 +16916,19 @@ var require_uri_all = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
16739
16916
|
}
|
|
16740
16917
|
if ($rDef.modifying && (out += " if (" + $parentData + ") " + $data + " = " + $parentData + "[" + $parentDataProperty + "];"), out += "" + $closingBraces, $rDef.valid) $breakOnError && (out += " if (true) { ");
|
|
16741
16918
|
else {
|
|
16742
|
-
out += " if ( ", $rDef.valid === void 0 ? (out += " !", $macro ?
|
|
16919
|
+
out += " if ( ", $rDef.valid === void 0 ? (out += " !", out += $macro ? "" + $nextValid : "" + $valid) : out += " " + !$rDef.valid + " ", out += ") { ", $errorKeyword = $rule.keyword;
|
|
16743
16920
|
var $$outStack = $$outStack || [];
|
|
16744
16921
|
$$outStack.push(out), out = "";
|
|
16745
16922
|
var $$outStack = $$outStack || [];
|
|
16746
16923
|
$$outStack.push(out), out = "", it.createErrors === !1 ? out += " {} " : (out += " { keyword: '" + ($errorKeyword || "custom") + "' , dataPath: (dataPath || '') + " + it.errorPath + " , schemaPath: " + it.util.toQuotedString($errSchemaPath) + " , params: { keyword: '" + $rule.keyword + "' } ", it.opts.messages !== !1 && (out += " , message: 'should pass \"" + $rule.keyword + "\" keyword validation' "), it.opts.verbose && (out += " , schema: validate.schema" + $schemaPath + " , parentSchema: validate.schema" + it.schemaPath + " , data: " + $data + " "), out += " } ");
|
|
16747
16924
|
var __err = out;
|
|
16748
|
-
out = $$outStack.pop(), !it.compositeRule && $breakOnError ?
|
|
16925
|
+
out = $$outStack.pop(), !it.compositeRule && $breakOnError ?
|
|
16926
|
+
/* istanbul ignore if */
|
|
16927
|
+
it.async ? out += " throw new ValidationError([" + __err + "]); " : out += " validate.errors = [" + __err + "]; return false; " : out += " var err = " + __err + "; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ";
|
|
16749
16928
|
var def_customError = out;
|
|
16750
|
-
out = $$outStack.pop(), $inline ? $rDef.errors ? $rDef.errors != "full" && (out += " for (var " + $i + "=" + $errs + "; " + $i + "<errors; " + $i + "++) { var " + $ruleErr + " = vErrors[" + $i + "]; if (" + $ruleErr + ".dataPath === undefined) " + $ruleErr + ".dataPath = (dataPath || '') + " + it.errorPath + "; if (" + $ruleErr + ".schemaPath === undefined) { " + $ruleErr + ".schemaPath = \"" + $errSchemaPath + "\"; } ", it.opts.verbose && (out += " " + $ruleErr + ".schema = " + $schemaValue + "; " + $ruleErr + ".data = " + $data + "; "), out += " } ") : $rDef.errors === !1 ? out += " " + def_customError + " " : (out += " if (" + $errs + " == errors) { " + def_customError + " } else { for (var " + $i + "=" + $errs + "; " + $i + "<errors; " + $i + "++) { var " + $ruleErr + " = vErrors[" + $i + "]; if (" + $ruleErr + ".dataPath === undefined) " + $ruleErr + ".dataPath = (dataPath || '') + " + it.errorPath + "; if (" + $ruleErr + ".schemaPath === undefined) { " + $ruleErr + ".schemaPath = \"" + $errSchemaPath + "\"; } ", it.opts.verbose && (out += " " + $ruleErr + ".schema = " + $schemaValue + "; " + $ruleErr + ".data = " + $data + "; "), out += " } } ") : $macro ? (out += " var err = ", it.createErrors === !1 ? out += " {} " : (out += " { keyword: '" + ($errorKeyword || "custom") + "' , dataPath: (dataPath || '') + " + it.errorPath + " , schemaPath: " + it.util.toQuotedString($errSchemaPath) + " , params: { keyword: '" + $rule.keyword + "' } ", it.opts.messages !== !1 && (out += " , message: 'should pass \"" + $rule.keyword + "\" keyword validation' "), it.opts.verbose && (out += " , schema: validate.schema" + $schemaPath + " , parentSchema: validate.schema" + it.schemaPath + " , data: " + $data + " "), out += " } "), out += "; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ", !it.compositeRule && $breakOnError &&
|
|
16929
|
+
out = $$outStack.pop(), $inline ? $rDef.errors ? $rDef.errors != "full" && (out += " for (var " + $i + "=" + $errs + "; " + $i + "<errors; " + $i + "++) { var " + $ruleErr + " = vErrors[" + $i + "]; if (" + $ruleErr + ".dataPath === undefined) " + $ruleErr + ".dataPath = (dataPath || '') + " + it.errorPath + "; if (" + $ruleErr + ".schemaPath === undefined) { " + $ruleErr + ".schemaPath = \"" + $errSchemaPath + "\"; } ", it.opts.verbose && (out += " " + $ruleErr + ".schema = " + $schemaValue + "; " + $ruleErr + ".data = " + $data + "; "), out += " } ") : $rDef.errors === !1 ? out += " " + def_customError + " " : (out += " if (" + $errs + " == errors) { " + def_customError + " } else { for (var " + $i + "=" + $errs + "; " + $i + "<errors; " + $i + "++) { var " + $ruleErr + " = vErrors[" + $i + "]; if (" + $ruleErr + ".dataPath === undefined) " + $ruleErr + ".dataPath = (dataPath || '') + " + it.errorPath + "; if (" + $ruleErr + ".schemaPath === undefined) { " + $ruleErr + ".schemaPath = \"" + $errSchemaPath + "\"; } ", it.opts.verbose && (out += " " + $ruleErr + ".schema = " + $schemaValue + "; " + $ruleErr + ".data = " + $data + "; "), out += " } } ") : $macro ? (out += " var err = ", it.createErrors === !1 ? out += " {} " : (out += " { keyword: '" + ($errorKeyword || "custom") + "' , dataPath: (dataPath || '') + " + it.errorPath + " , schemaPath: " + it.util.toQuotedString($errSchemaPath) + " , params: { keyword: '" + $rule.keyword + "' } ", it.opts.messages !== !1 && (out += " , message: 'should pass \"" + $rule.keyword + "\" keyword validation' "), it.opts.verbose && (out += " , schema: validate.schema" + $schemaPath + " , parentSchema: validate.schema" + it.schemaPath + " , data: " + $data + " "), out += " } "), out += "; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ", !it.compositeRule && $breakOnError &&
|
|
16930
|
+
/* istanbul ignore if */
|
|
16931
|
+
(it.async ? out += " throw new ValidationError(vErrors); " : out += " validate.errors = vErrors; return false; ")) : $rDef.errors === !1 ? out += " " + def_customError + " " : (out += " if (Array.isArray(" + $ruleErrs + ")) { if (vErrors === null) vErrors = " + $ruleErrs + "; else vErrors = vErrors.concat(" + $ruleErrs + "); errors = vErrors.length; for (var " + $i + "=" + $errs + "; " + $i + "<errors; " + $i + "++) { var " + $ruleErr + " = vErrors[" + $i + "]; if (" + $ruleErr + ".dataPath === undefined) " + $ruleErr + ".dataPath = (dataPath || '') + " + it.errorPath + "; " + $ruleErr + ".schemaPath = \"" + $errSchemaPath + "\"; ", it.opts.verbose && (out += " " + $ruleErr + ".schema = " + $schemaValue + "; " + $ruleErr + ".data = " + $data + "; "), out += " } } else { " + def_customError + " } "), out += " } ", $breakOnError && (out += " else { ");
|
|
16751
16932
|
}
|
|
16752
16933
|
return out;
|
|
16753
16934
|
};
|
|
@@ -17273,8 +17454,10 @@ var require_uri_all = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
17273
17454
|
}
|
|
17274
17455
|
function addInitialSchemas(self) {
|
|
17275
17456
|
var optsSchemas = self._opts.schemas;
|
|
17276
|
-
if (optsSchemas)
|
|
17277
|
-
|
|
17457
|
+
if (optsSchemas) {
|
|
17458
|
+
if (Array.isArray(optsSchemas)) self.addSchema(optsSchemas);
|
|
17459
|
+
else for (var key in optsSchemas) self.addSchema(optsSchemas[key], key);
|
|
17460
|
+
}
|
|
17278
17461
|
}
|
|
17279
17462
|
function addInitialFormats(self) {
|
|
17280
17463
|
for (var name in self._opts.formats) {
|
|
@@ -17435,7 +17618,7 @@ var require_uri_all = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
17435
17618
|
function switchWorkspace(workspaceUri) {
|
|
17436
17619
|
if (currentWorkspaceUri === workspaceUri) return;
|
|
17437
17620
|
let workspace = workspaces.get(workspaceUri);
|
|
17438
|
-
setCwd(workspace.cwd), setRegisteredRules(workspace.rules), setAllOptions(workspace.allOptions), setCurrentWorkspace(workspace, workspaceUri);
|
|
17621
|
+
setCwd(workspace.cwd), setRegisteredRules(workspace.rules), setRegisteredPluginNames(workspace.pluginNames), setAllOptions(workspace.allOptions), setCurrentWorkspace(workspace, workspaceUri);
|
|
17439
17622
|
}
|
|
17440
17623
|
//#endregion
|
|
17441
17624
|
//#region src-js/plugins/options.ts
|
|
@@ -17600,7 +17783,7 @@ function mergeValues(configValue, defaultValue) {
|
|
|
17600
17783
|
//#endregion
|
|
17601
17784
|
//#region src-js/plugins/load.ts
|
|
17602
17785
|
const JSONStringify$1 = JSON.stringify, ObjectKeys$1 = Object.keys, ArrayIsArray$2 = Array.isArray, ObjectDefineProperty$2 = Object.defineProperty, JSONParse = JSON.parse;
|
|
17603
|
-
let registeredRules = [];
|
|
17786
|
+
let registeredRules = [], registeredPluginNames = /* @__PURE__ */ new Set();
|
|
17604
17787
|
/**
|
|
17605
17788
|
* Set `registeredRules`. Used when switching workspaces.
|
|
17606
17789
|
* @param rules - Array of `RuleDetails` objects
|
|
@@ -17608,6 +17791,13 @@ let registeredRules = [];
|
|
|
17608
17791
|
function setRegisteredRules(rules) {
|
|
17609
17792
|
registeredRules = rules;
|
|
17610
17793
|
}
|
|
17794
|
+
/**
|
|
17795
|
+
* Set `registeredPluginNames`. Used when switching workspaces.
|
|
17796
|
+
* @param pluginNames - Set of registered plugin names
|
|
17797
|
+
*/
|
|
17798
|
+
function setRegisteredPluginNames(pluginNames) {
|
|
17799
|
+
registeredPluginNames = pluginNames;
|
|
17800
|
+
}
|
|
17611
17801
|
const neverRunBeforeHook = () => !1;
|
|
17612
17802
|
/**
|
|
17613
17803
|
* Load a plugin.
|
|
@@ -17637,11 +17827,12 @@ async function loadPlugin(url, pluginName, pluginNameIsAlias, workspaceUri) {
|
|
|
17637
17827
|
* @param workspaceUri - Workspace URI (`null` in CLI, string in LSP)
|
|
17638
17828
|
* @returns - Plugin details
|
|
17639
17829
|
* @throws {Error} If `plugin.meta.name` is `null` / `undefined` and `packageName` not provided
|
|
17830
|
+
* @throws {Error} If another plugin with the same name is already registered
|
|
17640
17831
|
* @throws {TypeError} If one of plugin's rules is malformed, or its `createOnce` method returns invalid visitor
|
|
17641
17832
|
* @throws {TypeError} If `plugin.meta.name` is not a string
|
|
17642
17833
|
*/
|
|
17643
17834
|
function registerPlugin(plugin, pluginName, pluginNameIsAlias, workspaceUri) {
|
|
17644
|
-
pluginName = getPluginName(plugin, pluginName, pluginNameIsAlias), workspaceUri !== null && switchWorkspace(workspaceUri);
|
|
17835
|
+
if (pluginName = getPluginName(plugin, pluginName, pluginNameIsAlias), workspaceUri !== null && switchWorkspace(workspaceUri), registeredPluginNames.has(pluginName)) throw Error(`Plugin name '${pluginName}' is already registered. Use a different name or an alias in \`jsPlugins\`.`);
|
|
17645
17836
|
let offset = registeredRules.length, { rules } = plugin, ruleNames = ObjectKeys$1(rules), ruleNamesLen = ruleNames.length;
|
|
17646
17837
|
for (let i = 0; i < ruleNamesLen; i++) {
|
|
17647
17838
|
let ruleName = ruleNames[i], rule = rules[ruleName], fullRuleName = `${pluginName}/${ruleName}`, isFixable = !1, hasSuggestions = !1, messages = null, defaultOptions = DEFAULT_OPTIONS, schemaValidator = null, ruleMeta = rule.meta;
|
|
@@ -17691,7 +17882,7 @@ function registerPlugin(plugin, pluginName, pluginNameIsAlias, workspaceUri) {
|
|
|
17691
17882
|
}
|
|
17692
17883
|
ObjectDefineProperty$2(ruleDetails.context, "id", { value: fullRuleName }), registeredRules.push(ruleDetails);
|
|
17693
17884
|
}
|
|
17694
|
-
return {
|
|
17885
|
+
return registeredPluginNames.add(pluginName), {
|
|
17695
17886
|
name: pluginName,
|
|
17696
17887
|
offset,
|
|
17697
17888
|
ruleNames
|
|
@@ -17797,7 +17988,7 @@ function conformHookFn(hookFn, hookName) {
|
|
|
17797
17988
|
return hookFn;
|
|
17798
17989
|
}
|
|
17799
17990
|
//#endregion
|
|
17800
|
-
//#region ../../node_modules/.pnpm/eslint@10.
|
|
17991
|
+
//#region ../../node_modules/.pnpm/eslint@10.8.0/node_modules/eslint/lib/shared/assert.js
|
|
17801
17992
|
/**
|
|
17802
17993
|
* @fileoverview Assertion utilities equivalent to the Node.js node:asserts module.
|
|
17803
17994
|
* @author Josh Goldberg
|
|
@@ -18341,7 +18532,7 @@ var require_assert = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
18341
18532
|
* Detect Electron renderer / nwjs process, which is node, but we should
|
|
18342
18533
|
* treat as a browser.
|
|
18343
18534
|
*/
|
|
18344
|
-
typeof process > "u" || process.type === "renderer" || process.browser === !0 || process.__nwjs ?
|
|
18535
|
+
module.exports = typeof process > "u" || process.type === "renderer" || process.browser === !0 || process.__nwjs ? require_browser() : require_node();
|
|
18345
18536
|
})), require_debug_helpers = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
18346
18537
|
let debug = require_src()("eslint:code-path");
|
|
18347
18538
|
/**
|
|
@@ -18394,7 +18585,7 @@ var require_assert = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
18394
18585
|
* @param {boolean} leaving A flag whether or not it's leaving
|
|
18395
18586
|
* @returns {void}
|
|
18396
18587
|
*/
|
|
18397
|
-
dumpState: debug.enabled ? function(node, state, leaving) {
|
|
18588
|
+
dumpState: debug.enabled ? /* c8 ignore next */ function(node, state, leaving) {
|
|
18398
18589
|
for (let i = 0; i < state.currentSegments.length; ++i) {
|
|
18399
18590
|
let segInternal = state.currentSegments[i].internal;
|
|
18400
18591
|
if (leaving) {
|
|
@@ -18409,10 +18600,10 @@ var require_assert = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
18409
18600
|
* The DOT code can be visualized with Graphvis.
|
|
18410
18601
|
* @param {CodePath} codePath A code path to dump.
|
|
18411
18602
|
* @returns {void}
|
|
18412
|
-
* @see
|
|
18603
|
+
* @see https://www.graphviz.org
|
|
18413
18604
|
* @see http://www.webgraphviz.com
|
|
18414
18605
|
*/
|
|
18415
|
-
dumpDot: debug.enabled ? function(codePath) {
|
|
18606
|
+
dumpDot: debug.enabled ? /* c8 ignore next */ function(codePath) {
|
|
18416
18607
|
let text = "\ndigraph {\nnode[shape=box,style=\"rounded,filled\",fillcolor=white];\ninitial[label=\"\",shape=circle,style=filled,fillcolor=black,width=0.25,height=0.25];\n";
|
|
18417
18608
|
codePath.returnedSegments.length > 0 && (text += "final[label=\"\",shape=doublecircle,style=filled,fillcolor=black,width=0.25,height=0.25];\n"), codePath.thrownSegments.length > 0 && (text += "thrown[label=\"✘\",shape=circle,width=0.3,height=0.3,fixedsize=true];\n");
|
|
18418
18609
|
let traceMap = Object.create(null), arrows = this.makeDotArrows(codePath, traceMap);
|
|
@@ -18554,10 +18745,12 @@ var require_assert = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
18554
18745
|
let done = /* @__PURE__ */ new Set();
|
|
18555
18746
|
for (let i = 0; i < segments.length; ++i) {
|
|
18556
18747
|
let segment = segments[i];
|
|
18557
|
-
if (!done.has(segment))
|
|
18558
|
-
|
|
18559
|
-
let
|
|
18560
|
-
|
|
18748
|
+
if (!done.has(segment)) {
|
|
18749
|
+
if (segment.internal.used) done.add(segment);
|
|
18750
|
+
else for (let j = 0; j < segment.allPrevSegments.length; ++j) {
|
|
18751
|
+
let prevSegment = segment.allPrevSegments[j];
|
|
18752
|
+
done.has(prevSegment) || done.add(prevSegment);
|
|
18753
|
+
}
|
|
18561
18754
|
}
|
|
18562
18755
|
}
|
|
18563
18756
|
return [...done];
|
|
@@ -20051,10 +20244,7 @@ var require_assert = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
20051
20244
|
case "ForOfStatement":
|
|
20052
20245
|
parent.left === node ? state.makeForInOfLeft() : parent.right === node ? state.makeForInOfRight() : (assert(parent.body === node), state.makeForInOfBody());
|
|
20053
20246
|
break;
|
|
20054
|
-
case "AssignmentPattern":
|
|
20055
|
-
parent.right === node && (state.pushForkContext(), state.forkBypassPath(), state.forkPath());
|
|
20056
|
-
break;
|
|
20057
|
-
default: break;
|
|
20247
|
+
case "AssignmentPattern": parent.right === node && (state.pushForkContext(), state.forkBypassPath(), state.forkPath());
|
|
20058
20248
|
}
|
|
20059
20249
|
}
|
|
20060
20250
|
/**
|
|
@@ -20126,10 +20316,7 @@ var require_assert = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
20126
20316
|
case "ForOfStatement":
|
|
20127
20317
|
state.pushLoopContext(node.type, getLabel(node));
|
|
20128
20318
|
break;
|
|
20129
|
-
case "LabeledStatement":
|
|
20130
|
-
breakableTypePattern.test(node.body.type) || state.pushBreakContext(!1, node.label.name);
|
|
20131
|
-
break;
|
|
20132
|
-
default: break;
|
|
20319
|
+
case "LabeledStatement": breakableTypePattern.test(node.body.type) || state.pushBreakContext(!1, node.label.name);
|
|
20133
20320
|
}
|
|
20134
20321
|
forwardCurrentToHead(analyzer, node), debug.dumpState(node, state, !1);
|
|
20135
20322
|
}
|
|
@@ -20198,10 +20385,7 @@ var require_assert = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
20198
20385
|
case "AssignmentPattern":
|
|
20199
20386
|
state.popForkContext();
|
|
20200
20387
|
break;
|
|
20201
|
-
case "LabeledStatement":
|
|
20202
|
-
breakableTypePattern.test(node.body.type) || state.popBreakContext();
|
|
20203
|
-
break;
|
|
20204
|
-
default: break;
|
|
20388
|
+
case "LabeledStatement": breakableTypePattern.test(node.body.type) || state.popBreakContext();
|
|
20205
20389
|
}
|
|
20206
20390
|
dontForward || forwardCurrentToHead(analyzer, node), debug.dumpState(node, state, !0);
|
|
20207
20391
|
}
|
|
@@ -20228,10 +20412,7 @@ var require_assert = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
20228
20412
|
case "StaticBlock":
|
|
20229
20413
|
endCodePath();
|
|
20230
20414
|
break;
|
|
20231
|
-
case "CallExpression":
|
|
20232
|
-
node.optional === !0 && node.arguments.length === 0 && CodePath.getState(analyzer.codePath).makeOptionalRight();
|
|
20233
|
-
break;
|
|
20234
|
-
default: break;
|
|
20415
|
+
case "CallExpression": node.optional === !0 && node.arguments.length === 0 && CodePath.getState(analyzer.codePath).makeOptionalRight();
|
|
20235
20416
|
}
|
|
20236
20417
|
isPropertyDefinitionValue(node) && endCodePath();
|
|
20237
20418
|
}
|
|
@@ -20588,503 +20769,505 @@ const NODE_TYPE_IDS_MAP = /* @__PURE__ */ new Map([
|
|
|
20588
20769
|
56
|
|
20589
20770
|
], ArrayIsArray$1 = Array.isArray, ancestors = [];
|
|
20590
20771
|
function walkNode(node, visitors) {
|
|
20591
|
-
if (node != null)
|
|
20592
|
-
|
|
20593
|
-
|
|
20594
|
-
|
|
20595
|
-
|
|
20596
|
-
|
|
20597
|
-
|
|
20598
|
-
|
|
20599
|
-
|
|
20600
|
-
|
|
20601
|
-
|
|
20602
|
-
|
|
20603
|
-
|
|
20604
|
-
|
|
20605
|
-
|
|
20606
|
-
|
|
20607
|
-
|
|
20608
|
-
|
|
20609
|
-
|
|
20610
|
-
|
|
20611
|
-
|
|
20612
|
-
|
|
20613
|
-
|
|
20614
|
-
|
|
20615
|
-
|
|
20616
|
-
|
|
20617
|
-
|
|
20618
|
-
|
|
20619
|
-
|
|
20620
|
-
|
|
20621
|
-
|
|
20622
|
-
|
|
20623
|
-
|
|
20624
|
-
|
|
20625
|
-
|
|
20626
|
-
|
|
20627
|
-
|
|
20628
|
-
|
|
20629
|
-
|
|
20630
|
-
|
|
20631
|
-
|
|
20632
|
-
|
|
20633
|
-
|
|
20634
|
-
|
|
20635
|
-
|
|
20636
|
-
|
|
20637
|
-
|
|
20638
|
-
|
|
20639
|
-
|
|
20640
|
-
|
|
20641
|
-
|
|
20642
|
-
|
|
20643
|
-
|
|
20644
|
-
|
|
20645
|
-
|
|
20646
|
-
|
|
20647
|
-
|
|
20648
|
-
|
|
20649
|
-
|
|
20650
|
-
|
|
20651
|
-
|
|
20652
|
-
|
|
20653
|
-
|
|
20654
|
-
|
|
20655
|
-
|
|
20656
|
-
|
|
20657
|
-
|
|
20658
|
-
|
|
20659
|
-
|
|
20660
|
-
|
|
20661
|
-
|
|
20662
|
-
|
|
20663
|
-
|
|
20664
|
-
|
|
20665
|
-
|
|
20666
|
-
|
|
20667
|
-
|
|
20668
|
-
|
|
20669
|
-
|
|
20670
|
-
|
|
20671
|
-
|
|
20672
|
-
|
|
20673
|
-
|
|
20674
|
-
|
|
20675
|
-
|
|
20676
|
-
|
|
20677
|
-
|
|
20678
|
-
|
|
20679
|
-
|
|
20680
|
-
|
|
20681
|
-
|
|
20682
|
-
|
|
20683
|
-
|
|
20684
|
-
|
|
20685
|
-
|
|
20686
|
-
|
|
20687
|
-
|
|
20688
|
-
|
|
20689
|
-
|
|
20690
|
-
|
|
20691
|
-
|
|
20692
|
-
|
|
20693
|
-
|
|
20694
|
-
|
|
20695
|
-
|
|
20696
|
-
|
|
20697
|
-
|
|
20698
|
-
|
|
20699
|
-
|
|
20700
|
-
|
|
20701
|
-
|
|
20702
|
-
|
|
20703
|
-
|
|
20704
|
-
|
|
20705
|
-
|
|
20706
|
-
|
|
20707
|
-
|
|
20708
|
-
|
|
20709
|
-
|
|
20710
|
-
|
|
20711
|
-
|
|
20712
|
-
|
|
20713
|
-
|
|
20714
|
-
|
|
20715
|
-
|
|
20716
|
-
|
|
20717
|
-
|
|
20718
|
-
|
|
20719
|
-
|
|
20720
|
-
|
|
20721
|
-
|
|
20722
|
-
|
|
20723
|
-
|
|
20724
|
-
|
|
20725
|
-
|
|
20726
|
-
|
|
20727
|
-
|
|
20728
|
-
|
|
20729
|
-
|
|
20730
|
-
|
|
20731
|
-
|
|
20732
|
-
|
|
20733
|
-
|
|
20734
|
-
|
|
20735
|
-
|
|
20736
|
-
|
|
20737
|
-
|
|
20738
|
-
|
|
20739
|
-
|
|
20740
|
-
|
|
20741
|
-
|
|
20742
|
-
|
|
20743
|
-
|
|
20744
|
-
|
|
20745
|
-
|
|
20746
|
-
|
|
20747
|
-
|
|
20748
|
-
|
|
20749
|
-
|
|
20750
|
-
|
|
20751
|
-
|
|
20752
|
-
|
|
20753
|
-
|
|
20754
|
-
|
|
20755
|
-
|
|
20756
|
-
|
|
20757
|
-
|
|
20758
|
-
|
|
20759
|
-
|
|
20760
|
-
|
|
20761
|
-
|
|
20762
|
-
|
|
20763
|
-
|
|
20764
|
-
|
|
20765
|
-
|
|
20766
|
-
|
|
20767
|
-
|
|
20768
|
-
|
|
20769
|
-
|
|
20770
|
-
|
|
20771
|
-
|
|
20772
|
-
|
|
20773
|
-
|
|
20774
|
-
|
|
20775
|
-
|
|
20776
|
-
|
|
20777
|
-
|
|
20778
|
-
|
|
20779
|
-
|
|
20780
|
-
|
|
20781
|
-
|
|
20782
|
-
|
|
20783
|
-
|
|
20784
|
-
|
|
20785
|
-
|
|
20786
|
-
|
|
20787
|
-
|
|
20788
|
-
|
|
20789
|
-
|
|
20790
|
-
|
|
20791
|
-
|
|
20792
|
-
|
|
20793
|
-
|
|
20794
|
-
|
|
20795
|
-
|
|
20796
|
-
|
|
20797
|
-
|
|
20798
|
-
|
|
20799
|
-
|
|
20800
|
-
|
|
20801
|
-
|
|
20802
|
-
|
|
20803
|
-
|
|
20804
|
-
|
|
20805
|
-
|
|
20806
|
-
|
|
20807
|
-
|
|
20808
|
-
|
|
20809
|
-
|
|
20810
|
-
|
|
20811
|
-
|
|
20812
|
-
|
|
20813
|
-
|
|
20814
|
-
|
|
20815
|
-
|
|
20816
|
-
|
|
20817
|
-
|
|
20818
|
-
|
|
20819
|
-
|
|
20820
|
-
|
|
20821
|
-
|
|
20822
|
-
|
|
20823
|
-
|
|
20824
|
-
|
|
20825
|
-
|
|
20826
|
-
|
|
20827
|
-
|
|
20828
|
-
|
|
20829
|
-
|
|
20830
|
-
|
|
20831
|
-
|
|
20832
|
-
|
|
20833
|
-
|
|
20834
|
-
|
|
20835
|
-
|
|
20836
|
-
|
|
20837
|
-
|
|
20838
|
-
|
|
20839
|
-
|
|
20840
|
-
|
|
20841
|
-
|
|
20842
|
-
|
|
20843
|
-
|
|
20844
|
-
|
|
20845
|
-
|
|
20846
|
-
|
|
20847
|
-
|
|
20848
|
-
|
|
20849
|
-
|
|
20850
|
-
|
|
20851
|
-
|
|
20852
|
-
|
|
20853
|
-
|
|
20854
|
-
|
|
20855
|
-
|
|
20856
|
-
|
|
20857
|
-
|
|
20858
|
-
|
|
20859
|
-
|
|
20860
|
-
|
|
20861
|
-
|
|
20862
|
-
|
|
20863
|
-
|
|
20864
|
-
|
|
20865
|
-
|
|
20866
|
-
|
|
20867
|
-
|
|
20868
|
-
|
|
20869
|
-
|
|
20870
|
-
|
|
20871
|
-
|
|
20872
|
-
|
|
20873
|
-
|
|
20874
|
-
|
|
20875
|
-
|
|
20876
|
-
|
|
20877
|
-
|
|
20878
|
-
|
|
20879
|
-
|
|
20880
|
-
|
|
20881
|
-
|
|
20882
|
-
|
|
20883
|
-
|
|
20884
|
-
|
|
20885
|
-
|
|
20886
|
-
|
|
20887
|
-
|
|
20888
|
-
|
|
20889
|
-
|
|
20890
|
-
|
|
20891
|
-
|
|
20892
|
-
|
|
20893
|
-
|
|
20894
|
-
|
|
20895
|
-
|
|
20896
|
-
|
|
20897
|
-
|
|
20898
|
-
|
|
20899
|
-
|
|
20900
|
-
|
|
20901
|
-
|
|
20902
|
-
|
|
20903
|
-
|
|
20904
|
-
|
|
20905
|
-
|
|
20906
|
-
|
|
20907
|
-
|
|
20908
|
-
|
|
20909
|
-
|
|
20910
|
-
|
|
20911
|
-
|
|
20912
|
-
|
|
20913
|
-
|
|
20914
|
-
|
|
20915
|
-
|
|
20916
|
-
|
|
20917
|
-
|
|
20918
|
-
|
|
20919
|
-
|
|
20920
|
-
|
|
20921
|
-
|
|
20922
|
-
|
|
20923
|
-
|
|
20924
|
-
|
|
20925
|
-
|
|
20926
|
-
|
|
20927
|
-
|
|
20928
|
-
|
|
20929
|
-
|
|
20930
|
-
|
|
20931
|
-
|
|
20932
|
-
|
|
20933
|
-
|
|
20934
|
-
|
|
20935
|
-
|
|
20936
|
-
|
|
20937
|
-
|
|
20938
|
-
|
|
20939
|
-
|
|
20940
|
-
|
|
20941
|
-
|
|
20942
|
-
|
|
20943
|
-
|
|
20944
|
-
|
|
20945
|
-
|
|
20946
|
-
|
|
20947
|
-
|
|
20948
|
-
|
|
20949
|
-
|
|
20950
|
-
|
|
20951
|
-
|
|
20952
|
-
|
|
20953
|
-
|
|
20954
|
-
|
|
20955
|
-
|
|
20956
|
-
|
|
20957
|
-
|
|
20958
|
-
|
|
20959
|
-
|
|
20960
|
-
|
|
20961
|
-
|
|
20962
|
-
|
|
20963
|
-
|
|
20964
|
-
|
|
20965
|
-
|
|
20966
|
-
|
|
20967
|
-
|
|
20968
|
-
|
|
20969
|
-
|
|
20970
|
-
|
|
20971
|
-
|
|
20972
|
-
|
|
20973
|
-
|
|
20974
|
-
|
|
20975
|
-
|
|
20976
|
-
|
|
20977
|
-
|
|
20978
|
-
|
|
20979
|
-
|
|
20980
|
-
|
|
20981
|
-
|
|
20982
|
-
|
|
20983
|
-
|
|
20984
|
-
|
|
20985
|
-
|
|
20986
|
-
|
|
20987
|
-
|
|
20988
|
-
|
|
20989
|
-
|
|
20990
|
-
|
|
20991
|
-
|
|
20992
|
-
|
|
20993
|
-
|
|
20994
|
-
|
|
20995
|
-
|
|
20996
|
-
|
|
20997
|
-
|
|
20998
|
-
|
|
20999
|
-
|
|
21000
|
-
|
|
21001
|
-
|
|
21002
|
-
|
|
21003
|
-
|
|
21004
|
-
|
|
21005
|
-
|
|
21006
|
-
|
|
21007
|
-
|
|
21008
|
-
|
|
21009
|
-
|
|
21010
|
-
|
|
21011
|
-
|
|
21012
|
-
|
|
21013
|
-
|
|
21014
|
-
|
|
21015
|
-
|
|
21016
|
-
|
|
21017
|
-
|
|
21018
|
-
|
|
21019
|
-
|
|
21020
|
-
|
|
21021
|
-
|
|
21022
|
-
|
|
21023
|
-
|
|
21024
|
-
|
|
21025
|
-
|
|
21026
|
-
|
|
21027
|
-
|
|
21028
|
-
|
|
21029
|
-
|
|
21030
|
-
|
|
21031
|
-
|
|
21032
|
-
|
|
21033
|
-
|
|
21034
|
-
|
|
21035
|
-
|
|
21036
|
-
|
|
21037
|
-
|
|
21038
|
-
|
|
21039
|
-
|
|
21040
|
-
|
|
21041
|
-
|
|
21042
|
-
|
|
21043
|
-
|
|
21044
|
-
|
|
21045
|
-
|
|
21046
|
-
|
|
21047
|
-
|
|
21048
|
-
|
|
21049
|
-
|
|
21050
|
-
|
|
21051
|
-
|
|
21052
|
-
|
|
21053
|
-
|
|
21054
|
-
|
|
21055
|
-
|
|
21056
|
-
|
|
21057
|
-
|
|
21058
|
-
|
|
21059
|
-
|
|
21060
|
-
|
|
21061
|
-
|
|
21062
|
-
|
|
21063
|
-
|
|
21064
|
-
|
|
21065
|
-
|
|
21066
|
-
|
|
21067
|
-
|
|
21068
|
-
|
|
21069
|
-
|
|
21070
|
-
|
|
21071
|
-
|
|
21072
|
-
|
|
21073
|
-
|
|
21074
|
-
|
|
21075
|
-
|
|
21076
|
-
|
|
21077
|
-
|
|
21078
|
-
|
|
21079
|
-
|
|
21080
|
-
|
|
21081
|
-
|
|
21082
|
-
|
|
21083
|
-
|
|
21084
|
-
|
|
21085
|
-
|
|
21086
|
-
|
|
21087
|
-
|
|
20772
|
+
if (node != null) {
|
|
20773
|
+
if (ArrayIsArray$1(node)) {
|
|
20774
|
+
let len = node.length;
|
|
20775
|
+
for (let i = 0; i < len; i++) walkNode(node[i], visitors);
|
|
20776
|
+
} else switch (node.type) {
|
|
20777
|
+
case "DebuggerStatement":
|
|
20778
|
+
walkDebuggerStatement(node, visitors);
|
|
20779
|
+
break;
|
|
20780
|
+
case "EmptyStatement":
|
|
20781
|
+
walkEmptyStatement(node, visitors);
|
|
20782
|
+
break;
|
|
20783
|
+
case "Literal":
|
|
20784
|
+
walkLiteral(node, visitors);
|
|
20785
|
+
break;
|
|
20786
|
+
case "PrivateIdentifier":
|
|
20787
|
+
walkPrivateIdentifier(node, visitors);
|
|
20788
|
+
break;
|
|
20789
|
+
case "Super":
|
|
20790
|
+
walkSuper(node, visitors);
|
|
20791
|
+
break;
|
|
20792
|
+
case "TemplateElement":
|
|
20793
|
+
walkTemplateElement(node, visitors);
|
|
20794
|
+
break;
|
|
20795
|
+
case "ThisExpression":
|
|
20796
|
+
walkThisExpression(node, visitors);
|
|
20797
|
+
break;
|
|
20798
|
+
case "JSXClosingFragment":
|
|
20799
|
+
walkJSXClosingFragment(node, visitors);
|
|
20800
|
+
break;
|
|
20801
|
+
case "JSXEmptyExpression":
|
|
20802
|
+
walkJSXEmptyExpression(node, visitors);
|
|
20803
|
+
break;
|
|
20804
|
+
case "JSXIdentifier":
|
|
20805
|
+
walkJSXIdentifier(node, visitors);
|
|
20806
|
+
break;
|
|
20807
|
+
case "JSXOpeningFragment":
|
|
20808
|
+
walkJSXOpeningFragment(node, visitors);
|
|
20809
|
+
break;
|
|
20810
|
+
case "JSXText":
|
|
20811
|
+
walkJSXText(node, visitors);
|
|
20812
|
+
break;
|
|
20813
|
+
case "TSAnyKeyword":
|
|
20814
|
+
walkTSAnyKeyword(node, visitors);
|
|
20815
|
+
break;
|
|
20816
|
+
case "TSBigIntKeyword":
|
|
20817
|
+
walkTSBigIntKeyword(node, visitors);
|
|
20818
|
+
break;
|
|
20819
|
+
case "TSBooleanKeyword":
|
|
20820
|
+
walkTSBooleanKeyword(node, visitors);
|
|
20821
|
+
break;
|
|
20822
|
+
case "TSIntrinsicKeyword":
|
|
20823
|
+
walkTSIntrinsicKeyword(node, visitors);
|
|
20824
|
+
break;
|
|
20825
|
+
case "TSJSDocUnknownType":
|
|
20826
|
+
walkTSJSDocUnknownType(node, visitors);
|
|
20827
|
+
break;
|
|
20828
|
+
case "TSNeverKeyword":
|
|
20829
|
+
walkTSNeverKeyword(node, visitors);
|
|
20830
|
+
break;
|
|
20831
|
+
case "TSNullKeyword":
|
|
20832
|
+
walkTSNullKeyword(node, visitors);
|
|
20833
|
+
break;
|
|
20834
|
+
case "TSNumberKeyword":
|
|
20835
|
+
walkTSNumberKeyword(node, visitors);
|
|
20836
|
+
break;
|
|
20837
|
+
case "TSObjectKeyword":
|
|
20838
|
+
walkTSObjectKeyword(node, visitors);
|
|
20839
|
+
break;
|
|
20840
|
+
case "TSStringKeyword":
|
|
20841
|
+
walkTSStringKeyword(node, visitors);
|
|
20842
|
+
break;
|
|
20843
|
+
case "TSSymbolKeyword":
|
|
20844
|
+
walkTSSymbolKeyword(node, visitors);
|
|
20845
|
+
break;
|
|
20846
|
+
case "TSThisType":
|
|
20847
|
+
walkTSThisType(node, visitors);
|
|
20848
|
+
break;
|
|
20849
|
+
case "TSUndefinedKeyword":
|
|
20850
|
+
walkTSUndefinedKeyword(node, visitors);
|
|
20851
|
+
break;
|
|
20852
|
+
case "TSUnknownKeyword":
|
|
20853
|
+
walkTSUnknownKeyword(node, visitors);
|
|
20854
|
+
break;
|
|
20855
|
+
case "TSVoidKeyword":
|
|
20856
|
+
walkTSVoidKeyword(node, visitors);
|
|
20857
|
+
break;
|
|
20858
|
+
case "AccessorProperty":
|
|
20859
|
+
walkAccessorProperty(node, visitors);
|
|
20860
|
+
break;
|
|
20861
|
+
case "ArrayExpression":
|
|
20862
|
+
walkArrayExpression(node, visitors);
|
|
20863
|
+
break;
|
|
20864
|
+
case "ArrayPattern":
|
|
20865
|
+
walkArrayPattern(node, visitors);
|
|
20866
|
+
break;
|
|
20867
|
+
case "ArrowFunctionExpression":
|
|
20868
|
+
walkArrowFunctionExpression(node, visitors);
|
|
20869
|
+
break;
|
|
20870
|
+
case "AssignmentExpression":
|
|
20871
|
+
walkAssignmentExpression(node, visitors);
|
|
20872
|
+
break;
|
|
20873
|
+
case "AssignmentPattern":
|
|
20874
|
+
walkAssignmentPattern(node, visitors);
|
|
20875
|
+
break;
|
|
20876
|
+
case "AwaitExpression":
|
|
20877
|
+
walkAwaitExpression(node, visitors);
|
|
20878
|
+
break;
|
|
20879
|
+
case "BinaryExpression":
|
|
20880
|
+
walkBinaryExpression(node, visitors);
|
|
20881
|
+
break;
|
|
20882
|
+
case "BlockStatement":
|
|
20883
|
+
walkBlockStatement(node, visitors);
|
|
20884
|
+
break;
|
|
20885
|
+
case "BreakStatement":
|
|
20886
|
+
walkBreakStatement(node, visitors);
|
|
20887
|
+
break;
|
|
20888
|
+
case "CallExpression":
|
|
20889
|
+
walkCallExpression(node, visitors);
|
|
20890
|
+
break;
|
|
20891
|
+
case "CatchClause":
|
|
20892
|
+
walkCatchClause(node, visitors);
|
|
20893
|
+
break;
|
|
20894
|
+
case "ChainExpression":
|
|
20895
|
+
walkChainExpression(node, visitors);
|
|
20896
|
+
break;
|
|
20897
|
+
case "ClassBody":
|
|
20898
|
+
walkClassBody(node, visitors);
|
|
20899
|
+
break;
|
|
20900
|
+
case "ClassDeclaration":
|
|
20901
|
+
walkClassDeclaration(node, visitors);
|
|
20902
|
+
break;
|
|
20903
|
+
case "ClassExpression":
|
|
20904
|
+
walkClassExpression(node, visitors);
|
|
20905
|
+
break;
|
|
20906
|
+
case "ConditionalExpression":
|
|
20907
|
+
walkConditionalExpression(node, visitors);
|
|
20908
|
+
break;
|
|
20909
|
+
case "ContinueStatement":
|
|
20910
|
+
walkContinueStatement(node, visitors);
|
|
20911
|
+
break;
|
|
20912
|
+
case "Decorator":
|
|
20913
|
+
walkDecorator(node, visitors);
|
|
20914
|
+
break;
|
|
20915
|
+
case "DoWhileStatement":
|
|
20916
|
+
walkDoWhileStatement(node, visitors);
|
|
20917
|
+
break;
|
|
20918
|
+
case "ExportAllDeclaration":
|
|
20919
|
+
walkExportAllDeclaration(node, visitors);
|
|
20920
|
+
break;
|
|
20921
|
+
case "ExportDefaultDeclaration":
|
|
20922
|
+
walkExportDefaultDeclaration(node, visitors);
|
|
20923
|
+
break;
|
|
20924
|
+
case "ExportNamedDeclaration":
|
|
20925
|
+
walkExportNamedDeclaration(node, visitors);
|
|
20926
|
+
break;
|
|
20927
|
+
case "ExportSpecifier":
|
|
20928
|
+
walkExportSpecifier(node, visitors);
|
|
20929
|
+
break;
|
|
20930
|
+
case "ExpressionStatement":
|
|
20931
|
+
walkExpressionStatement(node, visitors);
|
|
20932
|
+
break;
|
|
20933
|
+
case "ForInStatement":
|
|
20934
|
+
walkForInStatement(node, visitors);
|
|
20935
|
+
break;
|
|
20936
|
+
case "ForOfStatement":
|
|
20937
|
+
walkForOfStatement(node, visitors);
|
|
20938
|
+
break;
|
|
20939
|
+
case "ForStatement":
|
|
20940
|
+
walkForStatement(node, visitors);
|
|
20941
|
+
break;
|
|
20942
|
+
case "FunctionDeclaration":
|
|
20943
|
+
walkFunctionDeclaration(node, visitors);
|
|
20944
|
+
break;
|
|
20945
|
+
case "FunctionExpression":
|
|
20946
|
+
walkFunctionExpression(node, visitors);
|
|
20947
|
+
break;
|
|
20948
|
+
case "Identifier":
|
|
20949
|
+
walkIdentifier(node, visitors);
|
|
20950
|
+
break;
|
|
20951
|
+
case "IfStatement":
|
|
20952
|
+
walkIfStatement(node, visitors);
|
|
20953
|
+
break;
|
|
20954
|
+
case "ImportAttribute":
|
|
20955
|
+
walkImportAttribute(node, visitors);
|
|
20956
|
+
break;
|
|
20957
|
+
case "ImportDeclaration":
|
|
20958
|
+
walkImportDeclaration(node, visitors);
|
|
20959
|
+
break;
|
|
20960
|
+
case "ImportDefaultSpecifier":
|
|
20961
|
+
walkImportDefaultSpecifier(node, visitors);
|
|
20962
|
+
break;
|
|
20963
|
+
case "ImportExpression":
|
|
20964
|
+
walkImportExpression(node, visitors);
|
|
20965
|
+
break;
|
|
20966
|
+
case "ImportNamespaceSpecifier":
|
|
20967
|
+
walkImportNamespaceSpecifier(node, visitors);
|
|
20968
|
+
break;
|
|
20969
|
+
case "ImportSpecifier":
|
|
20970
|
+
walkImportSpecifier(node, visitors);
|
|
20971
|
+
break;
|
|
20972
|
+
case "LabeledStatement":
|
|
20973
|
+
walkLabeledStatement(node, visitors);
|
|
20974
|
+
break;
|
|
20975
|
+
case "LogicalExpression":
|
|
20976
|
+
walkLogicalExpression(node, visitors);
|
|
20977
|
+
break;
|
|
20978
|
+
case "MemberExpression":
|
|
20979
|
+
walkMemberExpression(node, visitors);
|
|
20980
|
+
break;
|
|
20981
|
+
case "MetaProperty":
|
|
20982
|
+
walkMetaProperty(node, visitors);
|
|
20983
|
+
break;
|
|
20984
|
+
case "MethodDefinition":
|
|
20985
|
+
walkMethodDefinition(node, visitors);
|
|
20986
|
+
break;
|
|
20987
|
+
case "NewExpression":
|
|
20988
|
+
walkNewExpression(node, visitors);
|
|
20989
|
+
break;
|
|
20990
|
+
case "ObjectExpression":
|
|
20991
|
+
walkObjectExpression(node, visitors);
|
|
20992
|
+
break;
|
|
20993
|
+
case "ObjectPattern":
|
|
20994
|
+
walkObjectPattern(node, visitors);
|
|
20995
|
+
break;
|
|
20996
|
+
case "ParenthesizedExpression":
|
|
20997
|
+
walkParenthesizedExpression(node, visitors);
|
|
20998
|
+
break;
|
|
20999
|
+
case "Program":
|
|
21000
|
+
walkProgram(node, visitors);
|
|
21001
|
+
break;
|
|
21002
|
+
case "Property":
|
|
21003
|
+
walkProperty(node, visitors);
|
|
21004
|
+
break;
|
|
21005
|
+
case "PropertyDefinition":
|
|
21006
|
+
walkPropertyDefinition(node, visitors);
|
|
21007
|
+
break;
|
|
21008
|
+
case "RestElement":
|
|
21009
|
+
walkRestElement(node, visitors);
|
|
21010
|
+
break;
|
|
21011
|
+
case "ReturnStatement":
|
|
21012
|
+
walkReturnStatement(node, visitors);
|
|
21013
|
+
break;
|
|
21014
|
+
case "SequenceExpression":
|
|
21015
|
+
walkSequenceExpression(node, visitors);
|
|
21016
|
+
break;
|
|
21017
|
+
case "SpreadElement":
|
|
21018
|
+
walkSpreadElement(node, visitors);
|
|
21019
|
+
break;
|
|
21020
|
+
case "StaticBlock":
|
|
21021
|
+
walkStaticBlock(node, visitors);
|
|
21022
|
+
break;
|
|
21023
|
+
case "SwitchCase":
|
|
21024
|
+
walkSwitchCase(node, visitors);
|
|
21025
|
+
break;
|
|
21026
|
+
case "SwitchStatement":
|
|
21027
|
+
walkSwitchStatement(node, visitors);
|
|
21028
|
+
break;
|
|
21029
|
+
case "TaggedTemplateExpression":
|
|
21030
|
+
walkTaggedTemplateExpression(node, visitors);
|
|
21031
|
+
break;
|
|
21032
|
+
case "TemplateLiteral":
|
|
21033
|
+
walkTemplateLiteral(node, visitors);
|
|
21034
|
+
break;
|
|
21035
|
+
case "ThrowStatement":
|
|
21036
|
+
walkThrowStatement(node, visitors);
|
|
21037
|
+
break;
|
|
21038
|
+
case "TryStatement":
|
|
21039
|
+
walkTryStatement(node, visitors);
|
|
21040
|
+
break;
|
|
21041
|
+
case "UnaryExpression":
|
|
21042
|
+
walkUnaryExpression(node, visitors);
|
|
21043
|
+
break;
|
|
21044
|
+
case "UpdateExpression":
|
|
21045
|
+
walkUpdateExpression(node, visitors);
|
|
21046
|
+
break;
|
|
21047
|
+
case "V8IntrinsicExpression":
|
|
21048
|
+
walkV8IntrinsicExpression(node, visitors);
|
|
21049
|
+
break;
|
|
21050
|
+
case "VariableDeclaration":
|
|
21051
|
+
walkVariableDeclaration(node, visitors);
|
|
21052
|
+
break;
|
|
21053
|
+
case "VariableDeclarator":
|
|
21054
|
+
walkVariableDeclarator(node, visitors);
|
|
21055
|
+
break;
|
|
21056
|
+
case "WhileStatement":
|
|
21057
|
+
walkWhileStatement(node, visitors);
|
|
21058
|
+
break;
|
|
21059
|
+
case "WithStatement":
|
|
21060
|
+
walkWithStatement(node, visitors);
|
|
21061
|
+
break;
|
|
21062
|
+
case "YieldExpression":
|
|
21063
|
+
walkYieldExpression(node, visitors);
|
|
21064
|
+
break;
|
|
21065
|
+
case "JSXAttribute":
|
|
21066
|
+
walkJSXAttribute(node, visitors);
|
|
21067
|
+
break;
|
|
21068
|
+
case "JSXClosingElement":
|
|
21069
|
+
walkJSXClosingElement(node, visitors);
|
|
21070
|
+
break;
|
|
21071
|
+
case "JSXElement":
|
|
21072
|
+
walkJSXElement(node, visitors);
|
|
21073
|
+
break;
|
|
21074
|
+
case "JSXExpressionContainer":
|
|
21075
|
+
walkJSXExpressionContainer(node, visitors);
|
|
21076
|
+
break;
|
|
21077
|
+
case "JSXFragment":
|
|
21078
|
+
walkJSXFragment(node, visitors);
|
|
21079
|
+
break;
|
|
21080
|
+
case "JSXMemberExpression":
|
|
21081
|
+
walkJSXMemberExpression(node, visitors);
|
|
21082
|
+
break;
|
|
21083
|
+
case "JSXNamespacedName":
|
|
21084
|
+
walkJSXNamespacedName(node, visitors);
|
|
21085
|
+
break;
|
|
21086
|
+
case "JSXOpeningElement":
|
|
21087
|
+
walkJSXOpeningElement(node, visitors);
|
|
21088
|
+
break;
|
|
21089
|
+
case "JSXSpreadAttribute":
|
|
21090
|
+
walkJSXSpreadAttribute(node, visitors);
|
|
21091
|
+
break;
|
|
21092
|
+
case "JSXSpreadChild":
|
|
21093
|
+
walkJSXSpreadChild(node, visitors);
|
|
21094
|
+
break;
|
|
21095
|
+
case "TSAbstractAccessorProperty":
|
|
21096
|
+
walkTSAbstractAccessorProperty(node, visitors);
|
|
21097
|
+
break;
|
|
21098
|
+
case "TSAbstractMethodDefinition":
|
|
21099
|
+
walkTSAbstractMethodDefinition(node, visitors);
|
|
21100
|
+
break;
|
|
21101
|
+
case "TSAbstractPropertyDefinition":
|
|
21102
|
+
walkTSAbstractPropertyDefinition(node, visitors);
|
|
21103
|
+
break;
|
|
21104
|
+
case "TSArrayType":
|
|
21105
|
+
walkTSArrayType(node, visitors);
|
|
21106
|
+
break;
|
|
21107
|
+
case "TSAsExpression":
|
|
21108
|
+
walkTSAsExpression(node, visitors);
|
|
21109
|
+
break;
|
|
21110
|
+
case "TSCallSignatureDeclaration":
|
|
21111
|
+
walkTSCallSignatureDeclaration(node, visitors);
|
|
21112
|
+
break;
|
|
21113
|
+
case "TSClassImplements":
|
|
21114
|
+
walkTSClassImplements(node, visitors);
|
|
21115
|
+
break;
|
|
21116
|
+
case "TSConditionalType":
|
|
21117
|
+
walkTSConditionalType(node, visitors);
|
|
21118
|
+
break;
|
|
21119
|
+
case "TSConstructSignatureDeclaration":
|
|
21120
|
+
walkTSConstructSignatureDeclaration(node, visitors);
|
|
21121
|
+
break;
|
|
21122
|
+
case "TSConstructorType":
|
|
21123
|
+
walkTSConstructorType(node, visitors);
|
|
21124
|
+
break;
|
|
21125
|
+
case "TSDeclareFunction":
|
|
21126
|
+
walkTSDeclareFunction(node, visitors);
|
|
21127
|
+
break;
|
|
21128
|
+
case "TSEmptyBodyFunctionExpression":
|
|
21129
|
+
walkTSEmptyBodyFunctionExpression(node, visitors);
|
|
21130
|
+
break;
|
|
21131
|
+
case "TSEnumBody":
|
|
21132
|
+
walkTSEnumBody(node, visitors);
|
|
21133
|
+
break;
|
|
21134
|
+
case "TSEnumDeclaration":
|
|
21135
|
+
walkTSEnumDeclaration(node, visitors);
|
|
21136
|
+
break;
|
|
21137
|
+
case "TSEnumMember":
|
|
21138
|
+
walkTSEnumMember(node, visitors);
|
|
21139
|
+
break;
|
|
21140
|
+
case "TSExportAssignment":
|
|
21141
|
+
walkTSExportAssignment(node, visitors);
|
|
21142
|
+
break;
|
|
21143
|
+
case "TSExternalModuleReference":
|
|
21144
|
+
walkTSExternalModuleReference(node, visitors);
|
|
21145
|
+
break;
|
|
21146
|
+
case "TSFunctionType":
|
|
21147
|
+
walkTSFunctionType(node, visitors);
|
|
21148
|
+
break;
|
|
21149
|
+
case "TSImportEqualsDeclaration":
|
|
21150
|
+
walkTSImportEqualsDeclaration(node, visitors);
|
|
21151
|
+
break;
|
|
21152
|
+
case "TSImportType":
|
|
21153
|
+
walkTSImportType(node, visitors);
|
|
21154
|
+
break;
|
|
21155
|
+
case "TSIndexSignature":
|
|
21156
|
+
walkTSIndexSignature(node, visitors);
|
|
21157
|
+
break;
|
|
21158
|
+
case "TSIndexedAccessType":
|
|
21159
|
+
walkTSIndexedAccessType(node, visitors);
|
|
21160
|
+
break;
|
|
21161
|
+
case "TSInferType":
|
|
21162
|
+
walkTSInferType(node, visitors);
|
|
21163
|
+
break;
|
|
21164
|
+
case "TSInstantiationExpression":
|
|
21165
|
+
walkTSInstantiationExpression(node, visitors);
|
|
21166
|
+
break;
|
|
21167
|
+
case "TSInterfaceBody":
|
|
21168
|
+
walkTSInterfaceBody(node, visitors);
|
|
21169
|
+
break;
|
|
21170
|
+
case "TSInterfaceDeclaration":
|
|
21171
|
+
walkTSInterfaceDeclaration(node, visitors);
|
|
21172
|
+
break;
|
|
21173
|
+
case "TSInterfaceHeritage":
|
|
21174
|
+
walkTSInterfaceHeritage(node, visitors);
|
|
21175
|
+
break;
|
|
21176
|
+
case "TSIntersectionType":
|
|
21177
|
+
walkTSIntersectionType(node, visitors);
|
|
21178
|
+
break;
|
|
21179
|
+
case "TSJSDocNonNullableType":
|
|
21180
|
+
walkTSJSDocNonNullableType(node, visitors);
|
|
21181
|
+
break;
|
|
21182
|
+
case "TSJSDocNullableType":
|
|
21183
|
+
walkTSJSDocNullableType(node, visitors);
|
|
21184
|
+
break;
|
|
21185
|
+
case "TSLiteralType":
|
|
21186
|
+
walkTSLiteralType(node, visitors);
|
|
21187
|
+
break;
|
|
21188
|
+
case "TSMappedType":
|
|
21189
|
+
walkTSMappedType(node, visitors);
|
|
21190
|
+
break;
|
|
21191
|
+
case "TSMethodSignature":
|
|
21192
|
+
walkTSMethodSignature(node, visitors);
|
|
21193
|
+
break;
|
|
21194
|
+
case "TSModuleBlock":
|
|
21195
|
+
walkTSModuleBlock(node, visitors);
|
|
21196
|
+
break;
|
|
21197
|
+
case "TSModuleDeclaration":
|
|
21198
|
+
walkTSModuleDeclaration(node, visitors);
|
|
21199
|
+
break;
|
|
21200
|
+
case "TSNamedTupleMember":
|
|
21201
|
+
walkTSNamedTupleMember(node, visitors);
|
|
21202
|
+
break;
|
|
21203
|
+
case "TSNamespaceExportDeclaration":
|
|
21204
|
+
walkTSNamespaceExportDeclaration(node, visitors);
|
|
21205
|
+
break;
|
|
21206
|
+
case "TSNonNullExpression":
|
|
21207
|
+
walkTSNonNullExpression(node, visitors);
|
|
21208
|
+
break;
|
|
21209
|
+
case "TSOptionalType":
|
|
21210
|
+
walkTSOptionalType(node, visitors);
|
|
21211
|
+
break;
|
|
21212
|
+
case "TSParameterProperty":
|
|
21213
|
+
walkTSParameterProperty(node, visitors);
|
|
21214
|
+
break;
|
|
21215
|
+
case "TSParenthesizedType":
|
|
21216
|
+
walkTSParenthesizedType(node, visitors);
|
|
21217
|
+
break;
|
|
21218
|
+
case "TSPropertySignature":
|
|
21219
|
+
walkTSPropertySignature(node, visitors);
|
|
21220
|
+
break;
|
|
21221
|
+
case "TSQualifiedName":
|
|
21222
|
+
walkTSQualifiedName(node, visitors);
|
|
21223
|
+
break;
|
|
21224
|
+
case "TSRestType":
|
|
21225
|
+
walkTSRestType(node, visitors);
|
|
21226
|
+
break;
|
|
21227
|
+
case "TSSatisfiesExpression":
|
|
21228
|
+
walkTSSatisfiesExpression(node, visitors);
|
|
21229
|
+
break;
|
|
21230
|
+
case "TSTemplateLiteralType":
|
|
21231
|
+
walkTSTemplateLiteralType(node, visitors);
|
|
21232
|
+
break;
|
|
21233
|
+
case "TSTupleType":
|
|
21234
|
+
walkTSTupleType(node, visitors);
|
|
21235
|
+
break;
|
|
21236
|
+
case "TSTypeAliasDeclaration":
|
|
21237
|
+
walkTSTypeAliasDeclaration(node, visitors);
|
|
21238
|
+
break;
|
|
21239
|
+
case "TSTypeAnnotation":
|
|
21240
|
+
walkTSTypeAnnotation(node, visitors);
|
|
21241
|
+
break;
|
|
21242
|
+
case "TSTypeAssertion":
|
|
21243
|
+
walkTSTypeAssertion(node, visitors);
|
|
21244
|
+
break;
|
|
21245
|
+
case "TSTypeLiteral":
|
|
21246
|
+
walkTSTypeLiteral(node, visitors);
|
|
21247
|
+
break;
|
|
21248
|
+
case "TSTypeOperator":
|
|
21249
|
+
walkTSTypeOperator(node, visitors);
|
|
21250
|
+
break;
|
|
21251
|
+
case "TSTypeParameter":
|
|
21252
|
+
walkTSTypeParameter(node, visitors);
|
|
21253
|
+
break;
|
|
21254
|
+
case "TSTypeParameterDeclaration":
|
|
21255
|
+
walkTSTypeParameterDeclaration(node, visitors);
|
|
21256
|
+
break;
|
|
21257
|
+
case "TSTypeParameterInstantiation":
|
|
21258
|
+
walkTSTypeParameterInstantiation(node, visitors);
|
|
21259
|
+
break;
|
|
21260
|
+
case "TSTypePredicate":
|
|
21261
|
+
walkTSTypePredicate(node, visitors);
|
|
21262
|
+
break;
|
|
21263
|
+
case "TSTypeQuery":
|
|
21264
|
+
walkTSTypeQuery(node, visitors);
|
|
21265
|
+
break;
|
|
21266
|
+
case "TSTypeReference":
|
|
21267
|
+
walkTSTypeReference(node, visitors);
|
|
21268
|
+
break;
|
|
21269
|
+
case "TSUnionType": walkTSUnionType(node, visitors);
|
|
21270
|
+
}
|
|
21088
21271
|
}
|
|
21089
21272
|
}
|
|
21090
21273
|
function walkDebuggerStatement(node, visitors) {
|
|
@@ -21847,13 +22030,15 @@ function traverseNode(node, enter, leave) {
|
|
|
21847
22030
|
let keys = keys_default[node.type], keysLen = keys.length;
|
|
21848
22031
|
for (let i = 0; i < keysLen; i++) {
|
|
21849
22032
|
let child = node[keys[i]];
|
|
21850
|
-
if (child !== null)
|
|
21851
|
-
|
|
21852
|
-
|
|
21853
|
-
let
|
|
21854
|
-
|
|
21855
|
-
|
|
21856
|
-
|
|
22033
|
+
if (child !== null) {
|
|
22034
|
+
if (ArrayIsArray(child)) {
|
|
22035
|
+
let len = child.length;
|
|
22036
|
+
for (let i = 0; i < len; i++) {
|
|
22037
|
+
let element = child[i];
|
|
22038
|
+
element !== null && traverseNode(element, enter, leave);
|
|
22039
|
+
}
|
|
22040
|
+
} else traverseNode(child, enter, leave);
|
|
22041
|
+
}
|
|
21857
22042
|
}
|
|
21858
22043
|
leave(node);
|
|
21859
22044
|
}
|
|
@@ -22356,16 +22541,18 @@ const resetWeakMaps = resetWeakMapsFn, { matches: esqueryMatches, parse: esquery
|
|
|
22356
22541
|
if (!this.__fallback) throw Error("Unknown node type " + u + ".");
|
|
22357
22542
|
x = this.__fallback(o);
|
|
22358
22543
|
}
|
|
22359
|
-
for (y = x.length; --y >= 0;) if (v = o[E = x[y]])
|
|
22360
|
-
|
|
22361
|
-
|
|
22362
|
-
|
|
22363
|
-
|
|
22364
|
-
|
|
22544
|
+
for (y = x.length; --y >= 0;) if (v = o[E = x[y]]) {
|
|
22545
|
+
if (Array.isArray(v)) {
|
|
22546
|
+
for (m = v.length; --m >= 0;) if (v[m]) {
|
|
22547
|
+
if (h(u, x[y])) d = new c(v[m], [E, m], "Property", new l(v, m));
|
|
22548
|
+
else {
|
|
22549
|
+
if (!p(v[m])) continue;
|
|
22550
|
+
d = new c(v[m], [E, m], null, new l(v, m));
|
|
22551
|
+
}
|
|
22552
|
+
r.push(d);
|
|
22365
22553
|
}
|
|
22366
|
-
|
|
22367
|
-
|
|
22368
|
-
} else p(v) && r.push(new c(v, E, null, new l(o, E)));
|
|
22554
|
+
} else p(v) && r.push(new c(v, E, null, new l(o, E)));
|
|
22555
|
+
}
|
|
22369
22556
|
}
|
|
22370
22557
|
} else if (d = n.pop(), (f = this.__execute(t.leave, d)) !== void 0 && f !== a && f !== i && f !== s && d.ref.replace(f), this.__state !== s && f !== s || b(d), this.__state === a || f === a) return A.root;
|
|
22371
22558
|
return A.root;
|
|
@@ -22711,15 +22898,16 @@ const resetWeakMaps = resetWeakMapsFn, { matches: esqueryMatches, parse: esquery
|
|
|
22711
22898
|
}()) !== s && Ee() !== s ? ((o = function() {
|
|
22712
22899
|
var e, r, n, o, a, i = 36 * ce + 20, u = de[i];
|
|
22713
22900
|
if (u) return ce = u.nextPos, u.result;
|
|
22714
|
-
if (e = ce, t.substr(ce, 5) === "type(" ? (r = "type(", ce += 5) : (r = s, ge(q)), r !== s)
|
|
22715
|
-
if (
|
|
22716
|
-
|
|
22717
|
-
|
|
22718
|
-
|
|
22719
|
-
|
|
22720
|
-
|
|
22901
|
+
if (e = ce, t.substr(ce, 5) === "type(" ? (r = "type(", ce += 5) : (r = s, ge(q)), r !== s) {
|
|
22902
|
+
if (Ee() !== s) {
|
|
22903
|
+
if (n = [], V.test(t.charAt(ce)) ? (o = t.charAt(ce), ce++) : (o = s, ge(G)), o !== s) for (; o !== s;) n.push(o), V.test(t.charAt(ce)) ? (o = t.charAt(ce), ce++) : (o = s, ge(G));
|
|
22904
|
+
else n = s;
|
|
22905
|
+
n !== s && (o = Ee()) !== s ? (t.charCodeAt(ce) === 41 ? (a = ")", ce++) : (a = s, ge(z)), a === s ? (ce = e, e = s) : (r = {
|
|
22906
|
+
type: "type",
|
|
22907
|
+
value: n.join("")
|
|
22908
|
+
}, e = r)) : (ce = e, e = s);
|
|
22909
|
+
} else ce = e, e = s;
|
|
22721
22910
|
} else ce = e, e = s;
|
|
22722
|
-
else ce = e, e = s;
|
|
22723
22911
|
return de[i] = {
|
|
22724
22912
|
nextPos: ce,
|
|
22725
22913
|
result: e
|
|
@@ -22761,10 +22949,12 @@ const resetWeakMaps = resetWeakMapsFn, { matches: esqueryMatches, parse: esquery
|
|
|
22761
22949
|
for (n = [], T.test(t.charAt(ce)) ? (o = t.charAt(ce), ce++) : (o = s, ge(F)), o === s && (o = ce, t.charCodeAt(ce) === 92 ? (a = "\\", ce++) : (a = s, ge(R)), a === s ? (ce = o, o = s) : (t.length > ce ? (i = t.charAt(ce), ce++) : (i = s, ge(O)), i === s ? (ce = o, o = s) : (a = L(a, i), o = a))); o !== s;) n.push(o), T.test(t.charAt(ce)) ? (o = t.charAt(ce), ce++) : (o = s, ge(F)), o === s && (o = ce, t.charCodeAt(ce) === 92 ? (a = "\\", ce++) : (a = s, ge(R)), a === s ? (ce = o, o = s) : (t.length > ce ? (i = t.charAt(ce), ce++) : (i = s, ge(O)), i === s ? (ce = o, o = s) : (a = L(a, i), o = a)));
|
|
22762
22950
|
n === s ? (ce = e, e = s) : (t.charCodeAt(ce) === 34 ? (o = "\"", ce++) : (o = s, ge(j)), o === s ? (ce = e, e = s) : (r = M(n), e = r));
|
|
22763
22951
|
} else ce = e, e = s;
|
|
22764
|
-
if (e === s)
|
|
22765
|
-
|
|
22766
|
-
|
|
22767
|
-
|
|
22952
|
+
if (e === s) {
|
|
22953
|
+
if (e = ce, t.charCodeAt(ce) === 39 ? (r = "'", ce++) : (r = s, ge(B)), r !== s) {
|
|
22954
|
+
for (n = [], U.test(t.charAt(ce)) ? (o = t.charAt(ce), ce++) : (o = s, ge(K)), o === s && (o = ce, t.charCodeAt(ce) === 92 ? (a = "\\", ce++) : (a = s, ge(R)), a === s ? (ce = o, o = s) : (t.length > ce ? (i = t.charAt(ce), ce++) : (i = s, ge(O)), i === s ? (ce = o, o = s) : (a = L(a, i), o = a))); o !== s;) n.push(o), U.test(t.charAt(ce)) ? (o = t.charAt(ce), ce++) : (o = s, ge(K)), o === s && (o = ce, t.charCodeAt(ce) === 92 ? (a = "\\", ce++) : (a = s, ge(R)), a === s ? (ce = o, o = s) : (t.length > ce ? (i = t.charAt(ce), ce++) : (i = s, ge(O)), i === s ? (ce = o, o = s) : (a = L(a, i), o = a)));
|
|
22955
|
+
n === s ? (ce = e, e = s) : (t.charCodeAt(ce) === 39 ? (o = "'", ce++) : (o = s, ge(B)), o === s ? (ce = e, e = s) : (r = M(n), e = r));
|
|
22956
|
+
} else ce = e, e = s;
|
|
22957
|
+
}
|
|
22768
22958
|
return de[u] = {
|
|
22769
22959
|
nextPos: ce,
|
|
22770
22960
|
result: e
|
|
@@ -22808,16 +22998,17 @@ const resetWeakMaps = resetWeakMapsFn, { matches: esqueryMatches, parse: esquery
|
|
|
22808
22998
|
}()) === s && (e = function() {
|
|
22809
22999
|
var e, r, n, o, a, i, u, l, c = 36 * ce + 26, f = de[c];
|
|
22810
23000
|
if (f) return ce = f.nextPos, f.result;
|
|
22811
|
-
if (e = ce, t.charCodeAt(ce) === 46 ? (r = ".", ce++) : (r = s, ge(D)), r !== s)
|
|
22812
|
-
|
|
22813
|
-
|
|
22814
|
-
|
|
22815
|
-
|
|
22816
|
-
|
|
22817
|
-
|
|
22818
|
-
|
|
23001
|
+
if (e = ce, t.charCodeAt(ce) === 46 ? (r = ".", ce++) : (r = s, ge(D)), r !== s) {
|
|
23002
|
+
if ((n = be()) !== s) {
|
|
23003
|
+
for (o = [], a = ce, t.charCodeAt(ce) === 46 ? (i = ".", ce++) : (i = s, ge(D)), i !== s && (u = be()) !== s ? a = i = [i, u] : (ce = a, a = s); a !== s;) o.push(a), a = ce, t.charCodeAt(ce) === 46 ? (i = ".", ce++) : (i = s, ge(D)), i !== s && (u = be()) !== s ? a = i = [i, u] : (ce = a, a = s);
|
|
23004
|
+
o === s ? (ce = e, e = s) : (l = n, r = {
|
|
23005
|
+
type: "field",
|
|
23006
|
+
name: o.reduce((function(e, t) {
|
|
23007
|
+
return e + t[0] + t[1];
|
|
23008
|
+
}), l)
|
|
23009
|
+
}, e = r);
|
|
23010
|
+
} else ce = e, e = s;
|
|
22819
23011
|
} else ce = e, e = s;
|
|
22820
|
-
else ce = e, e = s;
|
|
22821
23012
|
return de[c] = {
|
|
22822
23013
|
nextPos: ce,
|
|
22823
23014
|
result: e
|
|
@@ -22888,12 +23079,13 @@ const resetWeakMaps = resetWeakMapsFn, { matches: esqueryMatches, parse: esquery
|
|
|
22888
23079
|
}()) === s && (e = function() {
|
|
22889
23080
|
var e, r, n, o, a, i = 36 * ce + 33, u = de[i];
|
|
22890
23081
|
if (u) return ce = u.nextPos, u.result;
|
|
22891
|
-
if (e = ce, t.substr(ce, 11) === ":nth-child(" ? (r = ":nth-child(", ce += 11) : (r = s, ge(se)), r !== s)
|
|
22892
|
-
if (
|
|
22893
|
-
|
|
22894
|
-
|
|
23082
|
+
if (e = ce, t.substr(ce, 11) === ":nth-child(" ? (r = ":nth-child(", ce += 11) : (r = s, ge(se)), r !== s) {
|
|
23083
|
+
if (Ee() !== s) {
|
|
23084
|
+
if (n = [], N.test(t.charAt(ce)) ? (o = t.charAt(ce), ce++) : (o = s, ge(W)), o !== s) for (; o !== s;) n.push(o), N.test(t.charAt(ce)) ? (o = t.charAt(ce), ce++) : (o = s, ge(W));
|
|
23085
|
+
else n = s;
|
|
23086
|
+
n !== s && (o = Ee()) !== s ? (t.charCodeAt(ce) === 41 ? (a = ")", ce++) : (a = s, ge(z)), a === s ? (ce = e, e = s) : (r = Fe(parseInt(n.join(""), 10)), e = r)) : (ce = e, e = s);
|
|
23087
|
+
} else ce = e, e = s;
|
|
22895
23088
|
} else ce = e, e = s;
|
|
22896
|
-
else ce = e, e = s;
|
|
22897
23089
|
return de[i] = {
|
|
22898
23090
|
nextPos: ce,
|
|
22899
23091
|
result: e
|
|
@@ -22901,12 +23093,13 @@ const resetWeakMaps = resetWeakMapsFn, { matches: esqueryMatches, parse: esquery
|
|
|
22901
23093
|
}()) === s && (e = function() {
|
|
22902
23094
|
var e, r, n, o, a, i = 36 * ce + 34, u = de[i];
|
|
22903
23095
|
if (u) return ce = u.nextPos, u.result;
|
|
22904
|
-
if (e = ce, t.substr(ce, 16) === ":nth-last-child(" ? (r = ":nth-last-child(", ce += 16) : (r = s, ge(ue)), r !== s)
|
|
22905
|
-
if (
|
|
22906
|
-
|
|
22907
|
-
|
|
23096
|
+
if (e = ce, t.substr(ce, 16) === ":nth-last-child(" ? (r = ":nth-last-child(", ce += 16) : (r = s, ge(ue)), r !== s) {
|
|
23097
|
+
if (Ee() !== s) {
|
|
23098
|
+
if (n = [], N.test(t.charAt(ce)) ? (o = t.charAt(ce), ce++) : (o = s, ge(W)), o !== s) for (; o !== s;) n.push(o), N.test(t.charAt(ce)) ? (o = t.charAt(ce), ce++) : (o = s, ge(W));
|
|
23099
|
+
else n = s;
|
|
23100
|
+
n !== s && (o = Ee()) !== s ? (t.charCodeAt(ce) === 41 ? (a = ")", ce++) : (a = s, ge(z)), a === s ? (ce = e, e = s) : (r = Re(parseInt(n.join(""), 10)), e = r)) : (ce = e, e = s);
|
|
23101
|
+
} else ce = e, e = s;
|
|
22908
23102
|
} else ce = e, e = s;
|
|
22909
|
-
else ce = e, e = s;
|
|
22910
23103
|
return de[i] = {
|
|
22911
23104
|
nextPos: ce,
|
|
22912
23105
|
result: e
|
|
@@ -23237,14 +23430,16 @@ const resetWeakMaps = resetWeakMapsFn, { matches: esqueryMatches, parse: esquery
|
|
|
23237
23430
|
}(t).map(c);
|
|
23238
23431
|
i.traverse(e, {
|
|
23239
23432
|
enter: function(e, t) {
|
|
23240
|
-
if (t != null && s.unshift(t), u(e, s, a))
|
|
23241
|
-
l
|
|
23242
|
-
|
|
23243
|
-
var
|
|
23244
|
-
|
|
23433
|
+
if (t != null && s.unshift(t), u(e, s, a)) {
|
|
23434
|
+
if (l.length) for (var r = 0, n = l.length; r < n; ++r) {
|
|
23435
|
+
l[r](e, s, a) && o(e, t, s);
|
|
23436
|
+
for (var i = 0, c = s.length; i < c; ++i) {
|
|
23437
|
+
var f = s.slice(i + 1);
|
|
23438
|
+
l[r](s[i], f, a) && o(s[i], t, f);
|
|
23439
|
+
}
|
|
23245
23440
|
}
|
|
23441
|
+
else o(e, t, s);
|
|
23246
23442
|
}
|
|
23247
|
-
else o(e, t, s);
|
|
23248
23443
|
},
|
|
23249
23444
|
leave: function() {
|
|
23250
23445
|
s.shift();
|
|
@@ -23703,7 +23898,7 @@ function lintFileImpl(filePath, bufferId, buffer, ruleIds, optionsIds, settingsJ
|
|
|
23703
23898
|
let hasBOM = buffer[2147483574] === 1;
|
|
23704
23899
|
setupSourceForFile(buffer, hasBOM), setSettingsForFile(settingsJSON), setGlobalsForFile(globalsJSON);
|
|
23705
23900
|
for (let i = 0, len = ruleIds.length; i < len; i++) {
|
|
23706
|
-
let
|
|
23901
|
+
let ruleId = ruleIds[i], ruleDetails = registeredRules[ruleId];
|
|
23707
23902
|
ruleDetails.ruleIndex = i;
|
|
23708
23903
|
let optionsId = optionsIds[i];
|
|
23709
23904
|
OPTIONS_DESCRIPTOR.value = optionsId === 0 ? ruleDetails.defaultOptions : allOptions[optionsId], ObjectDefineProperty(ruleDetails.context, "options", OPTIONS_DESCRIPTOR);
|
|
@@ -23761,4 +23956,4 @@ function resetStateAfterError() {
|
|
|
23761
23956
|
runAfterHooks(!1), finalizeCompiledVisitor(), resetCompiledVisitor(), diagnostics.length = 0, ancestors.length = 0, resetFile(), resetCfgWalk();
|
|
23762
23957
|
}
|
|
23763
23958
|
//#endregion
|
|
23764
|
-
export {
|
|
23959
|
+
export { __toESM as S, BLOCK_ALIGN as _, loadPlugin as a, DATA_POINTER_POS_32 as b, registeredRules as c, PLACEHOLDER_REGEX as d, diagnostics as f, ACTIVE_SIZE as g, getNodeByRangeIndex as h, resetStateAfterError as i, allOptions as l, getLineColumnFromOffset as m, lintFile as n, registerPlugin as o, replacePlaceholders as p, lintFileImpl as r, registeredPluginNames as s, buffers as t, setOptions as u, BLOCK_SIZE as v, __commonJSMin as x, BUFFER_SIZE as y };
|