yap2app 1.1.6 → 1.1.7
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/bin/cli-esm.js +15 -1
- package/bin/cli.bundle.js +489 -470
- package/bin/cli.js +489 -470
- package/bridge.js +40 -14
- package/mcp.js +1 -30
- package/package.json +2 -1
- package/scanner.js +7 -0
package/bin/cli.bundle.js
CHANGED
|
@@ -35,18 +35,18 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
35
35
|
|
|
36
36
|
// node_modules/ajv/dist/compile/codegen/code.js
|
|
37
37
|
var require_code = __commonJS({
|
|
38
|
-
"node_modules/ajv/dist/compile/codegen/code.js"(
|
|
38
|
+
"node_modules/ajv/dist/compile/codegen/code.js"(exports) {
|
|
39
39
|
"use strict";
|
|
40
|
-
Object.defineProperty(
|
|
41
|
-
|
|
40
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
41
|
+
exports.regexpCode = exports.getEsmExportName = exports.getProperty = exports.safeStringify = exports.stringify = exports.strConcat = exports.addCodeArg = exports.str = exports._ = exports.nil = exports._Code = exports.Name = exports.IDENTIFIER = exports._CodeOrName = void 0;
|
|
42
42
|
var _CodeOrName = class {
|
|
43
43
|
};
|
|
44
|
-
|
|
45
|
-
|
|
44
|
+
exports._CodeOrName = _CodeOrName;
|
|
45
|
+
exports.IDENTIFIER = /^[a-z$_][a-z$_0-9]*$/i;
|
|
46
46
|
var Name = class extends _CodeOrName {
|
|
47
47
|
constructor(s) {
|
|
48
48
|
super();
|
|
49
|
-
if (!
|
|
49
|
+
if (!exports.IDENTIFIER.test(s))
|
|
50
50
|
throw new Error("CodeGen: name must be a valid identifier");
|
|
51
51
|
this.str = s;
|
|
52
52
|
}
|
|
@@ -60,7 +60,7 @@ var require_code = __commonJS({
|
|
|
60
60
|
return { [this.str]: 1 };
|
|
61
61
|
}
|
|
62
62
|
};
|
|
63
|
-
|
|
63
|
+
exports.Name = Name;
|
|
64
64
|
var _Code = class extends _CodeOrName {
|
|
65
65
|
constructor(code) {
|
|
66
66
|
super();
|
|
@@ -88,8 +88,8 @@ var require_code = __commonJS({
|
|
|
88
88
|
}, {});
|
|
89
89
|
}
|
|
90
90
|
};
|
|
91
|
-
|
|
92
|
-
|
|
91
|
+
exports._Code = _Code;
|
|
92
|
+
exports.nil = new _Code("");
|
|
93
93
|
function _(strs, ...args) {
|
|
94
94
|
const code = [strs[0]];
|
|
95
95
|
let i = 0;
|
|
@@ -99,7 +99,7 @@ var require_code = __commonJS({
|
|
|
99
99
|
}
|
|
100
100
|
return new _Code(code);
|
|
101
101
|
}
|
|
102
|
-
|
|
102
|
+
exports._ = _;
|
|
103
103
|
var plus = new _Code("+");
|
|
104
104
|
function str(strs, ...args) {
|
|
105
105
|
const expr = [safeStringify(strs[0])];
|
|
@@ -112,7 +112,7 @@ var require_code = __commonJS({
|
|
|
112
112
|
optimize(expr);
|
|
113
113
|
return new _Code(expr);
|
|
114
114
|
}
|
|
115
|
-
|
|
115
|
+
exports.str = str;
|
|
116
116
|
function addCodeArg(code, arg) {
|
|
117
117
|
if (arg instanceof _Code)
|
|
118
118
|
code.push(...arg._items);
|
|
@@ -121,7 +121,7 @@ var require_code = __commonJS({
|
|
|
121
121
|
else
|
|
122
122
|
code.push(interpolate(arg));
|
|
123
123
|
}
|
|
124
|
-
|
|
124
|
+
exports.addCodeArg = addCodeArg;
|
|
125
125
|
function optimize(expr) {
|
|
126
126
|
let i = 1;
|
|
127
127
|
while (i < expr.length - 1) {
|
|
@@ -157,42 +157,42 @@ var require_code = __commonJS({
|
|
|
157
157
|
function strConcat(c1, c2) {
|
|
158
158
|
return c2.emptyStr() ? c1 : c1.emptyStr() ? c2 : str`${c1}${c2}`;
|
|
159
159
|
}
|
|
160
|
-
|
|
160
|
+
exports.strConcat = strConcat;
|
|
161
161
|
function interpolate(x) {
|
|
162
162
|
return typeof x == "number" || typeof x == "boolean" || x === null ? x : safeStringify(Array.isArray(x) ? x.join(",") : x);
|
|
163
163
|
}
|
|
164
164
|
function stringify(x) {
|
|
165
165
|
return new _Code(safeStringify(x));
|
|
166
166
|
}
|
|
167
|
-
|
|
167
|
+
exports.stringify = stringify;
|
|
168
168
|
function safeStringify(x) {
|
|
169
169
|
return JSON.stringify(x).replace(/\u2028/g, "\\u2028").replace(/\u2029/g, "\\u2029");
|
|
170
170
|
}
|
|
171
|
-
|
|
171
|
+
exports.safeStringify = safeStringify;
|
|
172
172
|
function getProperty(key) {
|
|
173
|
-
return typeof key == "string" &&
|
|
173
|
+
return typeof key == "string" && exports.IDENTIFIER.test(key) ? new _Code(`.${key}`) : _`[${key}]`;
|
|
174
174
|
}
|
|
175
|
-
|
|
175
|
+
exports.getProperty = getProperty;
|
|
176
176
|
function getEsmExportName(key) {
|
|
177
|
-
if (typeof key == "string" &&
|
|
177
|
+
if (typeof key == "string" && exports.IDENTIFIER.test(key)) {
|
|
178
178
|
return new _Code(`${key}`);
|
|
179
179
|
}
|
|
180
180
|
throw new Error(`CodeGen: invalid export name: ${key}, use explicit $id name mapping`);
|
|
181
181
|
}
|
|
182
|
-
|
|
182
|
+
exports.getEsmExportName = getEsmExportName;
|
|
183
183
|
function regexpCode(rx) {
|
|
184
184
|
return new _Code(rx.toString());
|
|
185
185
|
}
|
|
186
|
-
|
|
186
|
+
exports.regexpCode = regexpCode;
|
|
187
187
|
}
|
|
188
188
|
});
|
|
189
189
|
|
|
190
190
|
// node_modules/ajv/dist/compile/codegen/scope.js
|
|
191
191
|
var require_scope = __commonJS({
|
|
192
|
-
"node_modules/ajv/dist/compile/codegen/scope.js"(
|
|
192
|
+
"node_modules/ajv/dist/compile/codegen/scope.js"(exports) {
|
|
193
193
|
"use strict";
|
|
194
|
-
Object.defineProperty(
|
|
195
|
-
|
|
194
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
195
|
+
exports.ValueScope = exports.ValueScopeName = exports.Scope = exports.varKinds = exports.UsedValueState = void 0;
|
|
196
196
|
var code_1 = require_code();
|
|
197
197
|
var ValueError = class extends Error {
|
|
198
198
|
constructor(name) {
|
|
@@ -204,8 +204,8 @@ var require_scope = __commonJS({
|
|
|
204
204
|
(function(UsedValueState2) {
|
|
205
205
|
UsedValueState2[UsedValueState2["Started"] = 0] = "Started";
|
|
206
206
|
UsedValueState2[UsedValueState2["Completed"] = 1] = "Completed";
|
|
207
|
-
})(UsedValueState || (
|
|
208
|
-
|
|
207
|
+
})(UsedValueState || (exports.UsedValueState = UsedValueState = {}));
|
|
208
|
+
exports.varKinds = {
|
|
209
209
|
const: new code_1.Name("const"),
|
|
210
210
|
let: new code_1.Name("let"),
|
|
211
211
|
var: new code_1.Name("var")
|
|
@@ -234,7 +234,7 @@ var require_scope = __commonJS({
|
|
|
234
234
|
return this._names[prefix] = { prefix, index: 0 };
|
|
235
235
|
}
|
|
236
236
|
};
|
|
237
|
-
|
|
237
|
+
exports.Scope = Scope;
|
|
238
238
|
var ValueScopeName = class extends code_1.Name {
|
|
239
239
|
constructor(prefix, nameStr) {
|
|
240
240
|
super(nameStr);
|
|
@@ -245,7 +245,7 @@ var require_scope = __commonJS({
|
|
|
245
245
|
this.scopePath = (0, code_1._)`.${new code_1.Name(property)}[${itemIndex}]`;
|
|
246
246
|
}
|
|
247
247
|
};
|
|
248
|
-
|
|
248
|
+
exports.ValueScopeName = ValueScopeName;
|
|
249
249
|
var line = (0, code_1._)`\n`;
|
|
250
250
|
var ValueScope = class extends Scope {
|
|
251
251
|
constructor(opts) {
|
|
@@ -315,7 +315,7 @@ var require_scope = __commonJS({
|
|
|
315
315
|
nameSet.set(name, UsedValueState.Started);
|
|
316
316
|
let c = valueCode(name);
|
|
317
317
|
if (c) {
|
|
318
|
-
const def = this.opts.es5 ?
|
|
318
|
+
const def = this.opts.es5 ? exports.varKinds.var : exports.varKinds.const;
|
|
319
319
|
code = (0, code_1._)`${code}${def} ${name} = ${c};${this.opts._n}`;
|
|
320
320
|
} else if (c = getCode === null || getCode === void 0 ? void 0 : getCode(name)) {
|
|
321
321
|
code = (0, code_1._)`${code}${c}${this.opts._n}`;
|
|
@@ -328,57 +328,57 @@ var require_scope = __commonJS({
|
|
|
328
328
|
return code;
|
|
329
329
|
}
|
|
330
330
|
};
|
|
331
|
-
|
|
331
|
+
exports.ValueScope = ValueScope;
|
|
332
332
|
}
|
|
333
333
|
});
|
|
334
334
|
|
|
335
335
|
// node_modules/ajv/dist/compile/codegen/index.js
|
|
336
336
|
var require_codegen = __commonJS({
|
|
337
|
-
"node_modules/ajv/dist/compile/codegen/index.js"(
|
|
337
|
+
"node_modules/ajv/dist/compile/codegen/index.js"(exports) {
|
|
338
338
|
"use strict";
|
|
339
|
-
Object.defineProperty(
|
|
340
|
-
|
|
339
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
340
|
+
exports.or = exports.and = exports.not = exports.CodeGen = exports.operators = exports.varKinds = exports.ValueScopeName = exports.ValueScope = exports.Scope = exports.Name = exports.regexpCode = exports.stringify = exports.getProperty = exports.nil = exports.strConcat = exports.str = exports._ = void 0;
|
|
341
341
|
var code_1 = require_code();
|
|
342
342
|
var scope_1 = require_scope();
|
|
343
343
|
var code_2 = require_code();
|
|
344
|
-
Object.defineProperty(
|
|
344
|
+
Object.defineProperty(exports, "_", { enumerable: true, get: function() {
|
|
345
345
|
return code_2._;
|
|
346
346
|
} });
|
|
347
|
-
Object.defineProperty(
|
|
347
|
+
Object.defineProperty(exports, "str", { enumerable: true, get: function() {
|
|
348
348
|
return code_2.str;
|
|
349
349
|
} });
|
|
350
|
-
Object.defineProperty(
|
|
350
|
+
Object.defineProperty(exports, "strConcat", { enumerable: true, get: function() {
|
|
351
351
|
return code_2.strConcat;
|
|
352
352
|
} });
|
|
353
|
-
Object.defineProperty(
|
|
353
|
+
Object.defineProperty(exports, "nil", { enumerable: true, get: function() {
|
|
354
354
|
return code_2.nil;
|
|
355
355
|
} });
|
|
356
|
-
Object.defineProperty(
|
|
356
|
+
Object.defineProperty(exports, "getProperty", { enumerable: true, get: function() {
|
|
357
357
|
return code_2.getProperty;
|
|
358
358
|
} });
|
|
359
|
-
Object.defineProperty(
|
|
359
|
+
Object.defineProperty(exports, "stringify", { enumerable: true, get: function() {
|
|
360
360
|
return code_2.stringify;
|
|
361
361
|
} });
|
|
362
|
-
Object.defineProperty(
|
|
362
|
+
Object.defineProperty(exports, "regexpCode", { enumerable: true, get: function() {
|
|
363
363
|
return code_2.regexpCode;
|
|
364
364
|
} });
|
|
365
|
-
Object.defineProperty(
|
|
365
|
+
Object.defineProperty(exports, "Name", { enumerable: true, get: function() {
|
|
366
366
|
return code_2.Name;
|
|
367
367
|
} });
|
|
368
368
|
var scope_2 = require_scope();
|
|
369
|
-
Object.defineProperty(
|
|
369
|
+
Object.defineProperty(exports, "Scope", { enumerable: true, get: function() {
|
|
370
370
|
return scope_2.Scope;
|
|
371
371
|
} });
|
|
372
|
-
Object.defineProperty(
|
|
372
|
+
Object.defineProperty(exports, "ValueScope", { enumerable: true, get: function() {
|
|
373
373
|
return scope_2.ValueScope;
|
|
374
374
|
} });
|
|
375
|
-
Object.defineProperty(
|
|
375
|
+
Object.defineProperty(exports, "ValueScopeName", { enumerable: true, get: function() {
|
|
376
376
|
return scope_2.ValueScopeName;
|
|
377
377
|
} });
|
|
378
|
-
Object.defineProperty(
|
|
378
|
+
Object.defineProperty(exports, "varKinds", { enumerable: true, get: function() {
|
|
379
379
|
return scope_2.varKinds;
|
|
380
380
|
} });
|
|
381
|
-
|
|
381
|
+
exports.operators = {
|
|
382
382
|
GT: new code_1._Code(">"),
|
|
383
383
|
GTE: new code_1._Code(">="),
|
|
384
384
|
LT: new code_1._Code("<"),
|
|
@@ -791,7 +791,7 @@ var require_codegen = __commonJS({
|
|
|
791
791
|
}
|
|
792
792
|
// `+=` code
|
|
793
793
|
add(lhs, rhs) {
|
|
794
|
-
return this._leafNode(new AssignOp(lhs,
|
|
794
|
+
return this._leafNode(new AssignOp(lhs, exports.operators.ADD, rhs));
|
|
795
795
|
}
|
|
796
796
|
// appends passed SafeExpr to code or executes Block
|
|
797
797
|
code(c) {
|
|
@@ -991,7 +991,7 @@ var require_codegen = __commonJS({
|
|
|
991
991
|
ns[ns.length - 1] = node;
|
|
992
992
|
}
|
|
993
993
|
};
|
|
994
|
-
|
|
994
|
+
exports.CodeGen = CodeGen;
|
|
995
995
|
function addNames(names, from) {
|
|
996
996
|
for (const n in from)
|
|
997
997
|
names[n] = (names[n] || 0) + (from[n] || 0);
|
|
@@ -1032,17 +1032,17 @@ var require_codegen = __commonJS({
|
|
|
1032
1032
|
function not(x) {
|
|
1033
1033
|
return typeof x == "boolean" || typeof x == "number" || x === null ? !x : (0, code_1._)`!${par(x)}`;
|
|
1034
1034
|
}
|
|
1035
|
-
|
|
1036
|
-
var andCode = mappend(
|
|
1035
|
+
exports.not = not;
|
|
1036
|
+
var andCode = mappend(exports.operators.AND);
|
|
1037
1037
|
function and(...args) {
|
|
1038
1038
|
return args.reduce(andCode);
|
|
1039
1039
|
}
|
|
1040
|
-
|
|
1041
|
-
var orCode = mappend(
|
|
1040
|
+
exports.and = and;
|
|
1041
|
+
var orCode = mappend(exports.operators.OR);
|
|
1042
1042
|
function or(...args) {
|
|
1043
1043
|
return args.reduce(orCode);
|
|
1044
1044
|
}
|
|
1045
|
-
|
|
1045
|
+
exports.or = or;
|
|
1046
1046
|
function mappend(op) {
|
|
1047
1047
|
return (x, y) => x === code_1.nil ? y : y === code_1.nil ? x : (0, code_1._)`${par(x)} ${op} ${par(y)}`;
|
|
1048
1048
|
}
|
|
@@ -1054,10 +1054,10 @@ var require_codegen = __commonJS({
|
|
|
1054
1054
|
|
|
1055
1055
|
// node_modules/ajv/dist/compile/util.js
|
|
1056
1056
|
var require_util = __commonJS({
|
|
1057
|
-
"node_modules/ajv/dist/compile/util.js"(
|
|
1057
|
+
"node_modules/ajv/dist/compile/util.js"(exports) {
|
|
1058
1058
|
"use strict";
|
|
1059
|
-
Object.defineProperty(
|
|
1060
|
-
|
|
1059
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
1060
|
+
exports.checkStrictMode = exports.getErrorPath = exports.Type = exports.useFunc = exports.setEvaluated = exports.evaluatedPropsToName = exports.mergeEvaluated = exports.eachItem = exports.unescapeJsonPointer = exports.escapeJsonPointer = exports.escapeFragment = exports.unescapeFragment = exports.schemaRefOrVal = exports.schemaHasRulesButRef = exports.schemaHasRules = exports.checkUnknownRules = exports.alwaysValidSchema = exports.toHash = void 0;
|
|
1061
1061
|
var codegen_1 = require_codegen();
|
|
1062
1062
|
var code_1 = require_code();
|
|
1063
1063
|
function toHash(arr) {
|
|
@@ -1066,7 +1066,7 @@ var require_util = __commonJS({
|
|
|
1066
1066
|
hash[item] = true;
|
|
1067
1067
|
return hash;
|
|
1068
1068
|
}
|
|
1069
|
-
|
|
1069
|
+
exports.toHash = toHash;
|
|
1070
1070
|
function alwaysValidSchema(it, schema) {
|
|
1071
1071
|
if (typeof schema == "boolean")
|
|
1072
1072
|
return schema;
|
|
@@ -1075,7 +1075,7 @@ var require_util = __commonJS({
|
|
|
1075
1075
|
checkUnknownRules(it, schema);
|
|
1076
1076
|
return !schemaHasRules(schema, it.self.RULES.all);
|
|
1077
1077
|
}
|
|
1078
|
-
|
|
1078
|
+
exports.alwaysValidSchema = alwaysValidSchema;
|
|
1079
1079
|
function checkUnknownRules(it, schema = it.schema) {
|
|
1080
1080
|
const { opts, self: self2 } = it;
|
|
1081
1081
|
if (!opts.strictSchema)
|
|
@@ -1088,7 +1088,7 @@ var require_util = __commonJS({
|
|
|
1088
1088
|
checkStrictMode(it, `unknown keyword: "${key}"`);
|
|
1089
1089
|
}
|
|
1090
1090
|
}
|
|
1091
|
-
|
|
1091
|
+
exports.checkUnknownRules = checkUnknownRules;
|
|
1092
1092
|
function schemaHasRules(schema, rules) {
|
|
1093
1093
|
if (typeof schema == "boolean")
|
|
1094
1094
|
return !schema;
|
|
@@ -1097,7 +1097,7 @@ var require_util = __commonJS({
|
|
|
1097
1097
|
return true;
|
|
1098
1098
|
return false;
|
|
1099
1099
|
}
|
|
1100
|
-
|
|
1100
|
+
exports.schemaHasRules = schemaHasRules;
|
|
1101
1101
|
function schemaHasRulesButRef(schema, RULES) {
|
|
1102
1102
|
if (typeof schema == "boolean")
|
|
1103
1103
|
return !schema;
|
|
@@ -1106,7 +1106,7 @@ var require_util = __commonJS({
|
|
|
1106
1106
|
return true;
|
|
1107
1107
|
return false;
|
|
1108
1108
|
}
|
|
1109
|
-
|
|
1109
|
+
exports.schemaHasRulesButRef = schemaHasRulesButRef;
|
|
1110
1110
|
function schemaRefOrVal({ topSchemaRef, schemaPath }, schema, keyword, $data) {
|
|
1111
1111
|
if (!$data) {
|
|
1112
1112
|
if (typeof schema == "number" || typeof schema == "boolean")
|
|
@@ -1116,25 +1116,25 @@ var require_util = __commonJS({
|
|
|
1116
1116
|
}
|
|
1117
1117
|
return (0, codegen_1._)`${topSchemaRef}${schemaPath}${(0, codegen_1.getProperty)(keyword)}`;
|
|
1118
1118
|
}
|
|
1119
|
-
|
|
1119
|
+
exports.schemaRefOrVal = schemaRefOrVal;
|
|
1120
1120
|
function unescapeFragment(str) {
|
|
1121
1121
|
return unescapeJsonPointer(decodeURIComponent(str));
|
|
1122
1122
|
}
|
|
1123
|
-
|
|
1123
|
+
exports.unescapeFragment = unescapeFragment;
|
|
1124
1124
|
function escapeFragment(str) {
|
|
1125
1125
|
return encodeURIComponent(escapeJsonPointer(str));
|
|
1126
1126
|
}
|
|
1127
|
-
|
|
1127
|
+
exports.escapeFragment = escapeFragment;
|
|
1128
1128
|
function escapeJsonPointer(str) {
|
|
1129
1129
|
if (typeof str == "number")
|
|
1130
1130
|
return `${str}`;
|
|
1131
1131
|
return str.replace(/~/g, "~0").replace(/\//g, "~1");
|
|
1132
1132
|
}
|
|
1133
|
-
|
|
1133
|
+
exports.escapeJsonPointer = escapeJsonPointer;
|
|
1134
1134
|
function unescapeJsonPointer(str) {
|
|
1135
1135
|
return str.replace(/~1/g, "/").replace(/~0/g, "~");
|
|
1136
1136
|
}
|
|
1137
|
-
|
|
1137
|
+
exports.unescapeJsonPointer = unescapeJsonPointer;
|
|
1138
1138
|
function eachItem(xs, f) {
|
|
1139
1139
|
if (Array.isArray(xs)) {
|
|
1140
1140
|
for (const x of xs)
|
|
@@ -1143,14 +1143,14 @@ var require_util = __commonJS({
|
|
|
1143
1143
|
f(xs);
|
|
1144
1144
|
}
|
|
1145
1145
|
}
|
|
1146
|
-
|
|
1146
|
+
exports.eachItem = eachItem;
|
|
1147
1147
|
function makeMergeEvaluated({ mergeNames, mergeToName, mergeValues: mergeValues2, resultToName }) {
|
|
1148
1148
|
return (gen, from, to, toName) => {
|
|
1149
1149
|
const res = to === void 0 ? from : to instanceof codegen_1.Name ? (from instanceof codegen_1.Name ? mergeNames(gen, from, to) : mergeToName(gen, from, to), to) : from instanceof codegen_1.Name ? (mergeToName(gen, to, from), from) : mergeValues2(from, to);
|
|
1150
1150
|
return toName === codegen_1.Name && !(res instanceof codegen_1.Name) ? resultToName(gen, res) : res;
|
|
1151
1151
|
};
|
|
1152
1152
|
}
|
|
1153
|
-
|
|
1153
|
+
exports.mergeEvaluated = {
|
|
1154
1154
|
props: makeMergeEvaluated({
|
|
1155
1155
|
mergeNames: (gen, from, to) => gen.if((0, codegen_1._)`${to} !== true && ${from} !== undefined`, () => {
|
|
1156
1156
|
gen.if((0, codegen_1._)`${from} === true`, () => gen.assign(to, true), () => gen.assign(to, (0, codegen_1._)`${to} || {}`).code((0, codegen_1._)`Object.assign(${to}, ${from})`));
|
|
@@ -1181,11 +1181,11 @@ var require_util = __commonJS({
|
|
|
1181
1181
|
setEvaluated(gen, props, ps);
|
|
1182
1182
|
return props;
|
|
1183
1183
|
}
|
|
1184
|
-
|
|
1184
|
+
exports.evaluatedPropsToName = evaluatedPropsToName;
|
|
1185
1185
|
function setEvaluated(gen, props, ps) {
|
|
1186
1186
|
Object.keys(ps).forEach((p) => gen.assign((0, codegen_1._)`${props}${(0, codegen_1.getProperty)(p)}`, true));
|
|
1187
1187
|
}
|
|
1188
|
-
|
|
1188
|
+
exports.setEvaluated = setEvaluated;
|
|
1189
1189
|
var snippets = {};
|
|
1190
1190
|
function useFunc(gen, f) {
|
|
1191
1191
|
return gen.scopeValue("func", {
|
|
@@ -1193,12 +1193,12 @@ var require_util = __commonJS({
|
|
|
1193
1193
|
code: snippets[f.code] || (snippets[f.code] = new code_1._Code(f.code))
|
|
1194
1194
|
});
|
|
1195
1195
|
}
|
|
1196
|
-
|
|
1196
|
+
exports.useFunc = useFunc;
|
|
1197
1197
|
var Type;
|
|
1198
1198
|
(function(Type2) {
|
|
1199
1199
|
Type2[Type2["Num"] = 0] = "Num";
|
|
1200
1200
|
Type2[Type2["Str"] = 1] = "Str";
|
|
1201
|
-
})(Type || (
|
|
1201
|
+
})(Type || (exports.Type = Type = {}));
|
|
1202
1202
|
function getErrorPath(dataProp, dataPropType, jsPropertySyntax) {
|
|
1203
1203
|
if (dataProp instanceof codegen_1.Name) {
|
|
1204
1204
|
const isNumber = dataPropType === Type.Num;
|
|
@@ -1206,7 +1206,7 @@ var require_util = __commonJS({
|
|
|
1206
1206
|
}
|
|
1207
1207
|
return jsPropertySyntax ? (0, codegen_1.getProperty)(dataProp).toString() : "/" + escapeJsonPointer(dataProp);
|
|
1208
1208
|
}
|
|
1209
|
-
|
|
1209
|
+
exports.getErrorPath = getErrorPath;
|
|
1210
1210
|
function checkStrictMode(it, msg, mode = it.opts.strictSchema) {
|
|
1211
1211
|
if (!mode)
|
|
1212
1212
|
return;
|
|
@@ -1215,15 +1215,15 @@ var require_util = __commonJS({
|
|
|
1215
1215
|
throw new Error(msg);
|
|
1216
1216
|
it.self.logger.warn(msg);
|
|
1217
1217
|
}
|
|
1218
|
-
|
|
1218
|
+
exports.checkStrictMode = checkStrictMode;
|
|
1219
1219
|
}
|
|
1220
1220
|
});
|
|
1221
1221
|
|
|
1222
1222
|
// node_modules/ajv/dist/compile/names.js
|
|
1223
1223
|
var require_names = __commonJS({
|
|
1224
|
-
"node_modules/ajv/dist/compile/names.js"(
|
|
1224
|
+
"node_modules/ajv/dist/compile/names.js"(exports) {
|
|
1225
1225
|
"use strict";
|
|
1226
|
-
Object.defineProperty(
|
|
1226
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
1227
1227
|
var codegen_1 = require_codegen();
|
|
1228
1228
|
var names = {
|
|
1229
1229
|
// validation function arguments
|
|
@@ -1254,26 +1254,26 @@ var require_names = __commonJS({
|
|
|
1254
1254
|
jsonLen: new codegen_1.Name("jsonLen"),
|
|
1255
1255
|
jsonPart: new codegen_1.Name("jsonPart")
|
|
1256
1256
|
};
|
|
1257
|
-
|
|
1257
|
+
exports.default = names;
|
|
1258
1258
|
}
|
|
1259
1259
|
});
|
|
1260
1260
|
|
|
1261
1261
|
// node_modules/ajv/dist/compile/errors.js
|
|
1262
1262
|
var require_errors = __commonJS({
|
|
1263
|
-
"node_modules/ajv/dist/compile/errors.js"(
|
|
1263
|
+
"node_modules/ajv/dist/compile/errors.js"(exports) {
|
|
1264
1264
|
"use strict";
|
|
1265
|
-
Object.defineProperty(
|
|
1266
|
-
|
|
1265
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
1266
|
+
exports.extendErrors = exports.resetErrorsCount = exports.reportExtraError = exports.reportError = exports.keyword$DataError = exports.keywordError = void 0;
|
|
1267
1267
|
var codegen_1 = require_codegen();
|
|
1268
1268
|
var util_1 = require_util();
|
|
1269
1269
|
var names_1 = require_names();
|
|
1270
|
-
|
|
1270
|
+
exports.keywordError = {
|
|
1271
1271
|
message: ({ keyword }) => (0, codegen_1.str)`must pass "${keyword}" keyword validation`
|
|
1272
1272
|
};
|
|
1273
|
-
|
|
1273
|
+
exports.keyword$DataError = {
|
|
1274
1274
|
message: ({ keyword, schemaType }) => schemaType ? (0, codegen_1.str)`"${keyword}" keyword must be ${schemaType} ($data)` : (0, codegen_1.str)`"${keyword}" keyword is invalid ($data)`
|
|
1275
1275
|
};
|
|
1276
|
-
function reportError(cxt, error2 =
|
|
1276
|
+
function reportError(cxt, error2 = exports.keywordError, errorPaths, overrideAllErrors) {
|
|
1277
1277
|
const { it } = cxt;
|
|
1278
1278
|
const { gen, compositeRule, allErrors } = it;
|
|
1279
1279
|
const errObj = errorObjectCode(cxt, error2, errorPaths);
|
|
@@ -1283,8 +1283,8 @@ var require_errors = __commonJS({
|
|
|
1283
1283
|
returnErrors(it, (0, codegen_1._)`[${errObj}]`);
|
|
1284
1284
|
}
|
|
1285
1285
|
}
|
|
1286
|
-
|
|
1287
|
-
function reportExtraError(cxt, error2 =
|
|
1286
|
+
exports.reportError = reportError;
|
|
1287
|
+
function reportExtraError(cxt, error2 = exports.keywordError, errorPaths) {
|
|
1288
1288
|
const { it } = cxt;
|
|
1289
1289
|
const { gen, compositeRule, allErrors } = it;
|
|
1290
1290
|
const errObj = errorObjectCode(cxt, error2, errorPaths);
|
|
@@ -1293,12 +1293,12 @@ var require_errors = __commonJS({
|
|
|
1293
1293
|
returnErrors(it, names_1.default.vErrors);
|
|
1294
1294
|
}
|
|
1295
1295
|
}
|
|
1296
|
-
|
|
1296
|
+
exports.reportExtraError = reportExtraError;
|
|
1297
1297
|
function resetErrorsCount(gen, errsCount) {
|
|
1298
1298
|
gen.assign(names_1.default.errors, errsCount);
|
|
1299
1299
|
gen.if((0, codegen_1._)`${names_1.default.vErrors} !== null`, () => gen.if(errsCount, () => gen.assign((0, codegen_1._)`${names_1.default.vErrors}.length`, errsCount), () => gen.assign(names_1.default.vErrors, null)));
|
|
1300
1300
|
}
|
|
1301
|
-
|
|
1301
|
+
exports.resetErrorsCount = resetErrorsCount;
|
|
1302
1302
|
function extendErrors({ gen, keyword, schemaValue, data, errsCount, it }) {
|
|
1303
1303
|
if (errsCount === void 0)
|
|
1304
1304
|
throw new Error("ajv implementation error");
|
|
@@ -1313,7 +1313,7 @@ var require_errors = __commonJS({
|
|
|
1313
1313
|
}
|
|
1314
1314
|
});
|
|
1315
1315
|
}
|
|
1316
|
-
|
|
1316
|
+
exports.extendErrors = extendErrors;
|
|
1317
1317
|
function addError(gen, errObj) {
|
|
1318
1318
|
const err = gen.const("err", errObj);
|
|
1319
1319
|
gen.if((0, codegen_1._)`${names_1.default.vErrors} === null`, () => gen.assign(names_1.default.vErrors, (0, codegen_1._)`[${err}]`), (0, codegen_1._)`${names_1.default.vErrors}.push(${err})`);
|
|
@@ -1382,10 +1382,10 @@ var require_errors = __commonJS({
|
|
|
1382
1382
|
|
|
1383
1383
|
// node_modules/ajv/dist/compile/validate/boolSchema.js
|
|
1384
1384
|
var require_boolSchema = __commonJS({
|
|
1385
|
-
"node_modules/ajv/dist/compile/validate/boolSchema.js"(
|
|
1385
|
+
"node_modules/ajv/dist/compile/validate/boolSchema.js"(exports) {
|
|
1386
1386
|
"use strict";
|
|
1387
|
-
Object.defineProperty(
|
|
1388
|
-
|
|
1387
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
1388
|
+
exports.boolOrEmptySchema = exports.topBoolOrEmptySchema = void 0;
|
|
1389
1389
|
var errors_1 = require_errors();
|
|
1390
1390
|
var codegen_1 = require_codegen();
|
|
1391
1391
|
var names_1 = require_names();
|
|
@@ -1403,7 +1403,7 @@ var require_boolSchema = __commonJS({
|
|
|
1403
1403
|
gen.return(true);
|
|
1404
1404
|
}
|
|
1405
1405
|
}
|
|
1406
|
-
|
|
1406
|
+
exports.topBoolOrEmptySchema = topBoolOrEmptySchema;
|
|
1407
1407
|
function boolOrEmptySchema(it, valid) {
|
|
1408
1408
|
const { gen, schema } = it;
|
|
1409
1409
|
if (schema === false) {
|
|
@@ -1413,7 +1413,7 @@ var require_boolSchema = __commonJS({
|
|
|
1413
1413
|
gen.var(valid, true);
|
|
1414
1414
|
}
|
|
1415
1415
|
}
|
|
1416
|
-
|
|
1416
|
+
exports.boolOrEmptySchema = boolOrEmptySchema;
|
|
1417
1417
|
function falseSchemaError(it, overrideAllErrors) {
|
|
1418
1418
|
const { gen, data } = it;
|
|
1419
1419
|
const cxt = {
|
|
@@ -1433,16 +1433,16 @@ var require_boolSchema = __commonJS({
|
|
|
1433
1433
|
|
|
1434
1434
|
// node_modules/ajv/dist/compile/rules.js
|
|
1435
1435
|
var require_rules = __commonJS({
|
|
1436
|
-
"node_modules/ajv/dist/compile/rules.js"(
|
|
1436
|
+
"node_modules/ajv/dist/compile/rules.js"(exports) {
|
|
1437
1437
|
"use strict";
|
|
1438
|
-
Object.defineProperty(
|
|
1439
|
-
|
|
1438
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
1439
|
+
exports.getRules = exports.isJSONType = void 0;
|
|
1440
1440
|
var _jsonTypes = ["string", "number", "integer", "boolean", "null", "object", "array"];
|
|
1441
1441
|
var jsonTypes = new Set(_jsonTypes);
|
|
1442
1442
|
function isJSONType(x) {
|
|
1443
1443
|
return typeof x == "string" && jsonTypes.has(x);
|
|
1444
1444
|
}
|
|
1445
|
-
|
|
1445
|
+
exports.isJSONType = isJSONType;
|
|
1446
1446
|
function getRules() {
|
|
1447
1447
|
const groups = {
|
|
1448
1448
|
number: { type: "number", rules: [] },
|
|
@@ -1458,39 +1458,39 @@ var require_rules = __commonJS({
|
|
|
1458
1458
|
keywords: {}
|
|
1459
1459
|
};
|
|
1460
1460
|
}
|
|
1461
|
-
|
|
1461
|
+
exports.getRules = getRules;
|
|
1462
1462
|
}
|
|
1463
1463
|
});
|
|
1464
1464
|
|
|
1465
1465
|
// node_modules/ajv/dist/compile/validate/applicability.js
|
|
1466
1466
|
var require_applicability = __commonJS({
|
|
1467
|
-
"node_modules/ajv/dist/compile/validate/applicability.js"(
|
|
1467
|
+
"node_modules/ajv/dist/compile/validate/applicability.js"(exports) {
|
|
1468
1468
|
"use strict";
|
|
1469
|
-
Object.defineProperty(
|
|
1470
|
-
|
|
1469
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
1470
|
+
exports.shouldUseRule = exports.shouldUseGroup = exports.schemaHasRulesForType = void 0;
|
|
1471
1471
|
function schemaHasRulesForType({ schema, self: self2 }, type) {
|
|
1472
1472
|
const group = self2.RULES.types[type];
|
|
1473
1473
|
return group && group !== true && shouldUseGroup(schema, group);
|
|
1474
1474
|
}
|
|
1475
|
-
|
|
1475
|
+
exports.schemaHasRulesForType = schemaHasRulesForType;
|
|
1476
1476
|
function shouldUseGroup(schema, group) {
|
|
1477
1477
|
return group.rules.some((rule) => shouldUseRule(schema, rule));
|
|
1478
1478
|
}
|
|
1479
|
-
|
|
1479
|
+
exports.shouldUseGroup = shouldUseGroup;
|
|
1480
1480
|
function shouldUseRule(schema, rule) {
|
|
1481
1481
|
var _a3;
|
|
1482
1482
|
return schema[rule.keyword] !== void 0 || ((_a3 = rule.definition.implements) === null || _a3 === void 0 ? void 0 : _a3.some((kwd) => schema[kwd] !== void 0));
|
|
1483
1483
|
}
|
|
1484
|
-
|
|
1484
|
+
exports.shouldUseRule = shouldUseRule;
|
|
1485
1485
|
}
|
|
1486
1486
|
});
|
|
1487
1487
|
|
|
1488
1488
|
// node_modules/ajv/dist/compile/validate/dataType.js
|
|
1489
1489
|
var require_dataType = __commonJS({
|
|
1490
|
-
"node_modules/ajv/dist/compile/validate/dataType.js"(
|
|
1490
|
+
"node_modules/ajv/dist/compile/validate/dataType.js"(exports) {
|
|
1491
1491
|
"use strict";
|
|
1492
|
-
Object.defineProperty(
|
|
1493
|
-
|
|
1492
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
1493
|
+
exports.reportTypeError = exports.checkDataTypes = exports.checkDataType = exports.coerceAndCheckDataType = exports.getJSONTypes = exports.getSchemaTypes = exports.DataType = void 0;
|
|
1494
1494
|
var rules_1 = require_rules();
|
|
1495
1495
|
var applicability_1 = require_applicability();
|
|
1496
1496
|
var errors_1 = require_errors();
|
|
@@ -1500,7 +1500,7 @@ var require_dataType = __commonJS({
|
|
|
1500
1500
|
(function(DataType2) {
|
|
1501
1501
|
DataType2[DataType2["Correct"] = 0] = "Correct";
|
|
1502
1502
|
DataType2[DataType2["Wrong"] = 1] = "Wrong";
|
|
1503
|
-
})(DataType || (
|
|
1503
|
+
})(DataType || (exports.DataType = DataType = {}));
|
|
1504
1504
|
function getSchemaTypes(schema) {
|
|
1505
1505
|
const types = getJSONTypes(schema.type);
|
|
1506
1506
|
const hasNull = types.includes("null");
|
|
@@ -1516,14 +1516,14 @@ var require_dataType = __commonJS({
|
|
|
1516
1516
|
}
|
|
1517
1517
|
return types;
|
|
1518
1518
|
}
|
|
1519
|
-
|
|
1519
|
+
exports.getSchemaTypes = getSchemaTypes;
|
|
1520
1520
|
function getJSONTypes(ts) {
|
|
1521
1521
|
const types = Array.isArray(ts) ? ts : ts ? [ts] : [];
|
|
1522
1522
|
if (types.every(rules_1.isJSONType))
|
|
1523
1523
|
return types;
|
|
1524
1524
|
throw new Error("type must be JSONType or JSONType[]: " + types.join(","));
|
|
1525
1525
|
}
|
|
1526
|
-
|
|
1526
|
+
exports.getJSONTypes = getJSONTypes;
|
|
1527
1527
|
function coerceAndCheckDataType(it, types) {
|
|
1528
1528
|
const { gen, data, opts } = it;
|
|
1529
1529
|
const coerceTo = coerceToTypes(types, opts.coerceTypes);
|
|
@@ -1539,7 +1539,7 @@ var require_dataType = __commonJS({
|
|
|
1539
1539
|
}
|
|
1540
1540
|
return checkTypes;
|
|
1541
1541
|
}
|
|
1542
|
-
|
|
1542
|
+
exports.coerceAndCheckDataType = coerceAndCheckDataType;
|
|
1543
1543
|
var COERCIBLE = /* @__PURE__ */ new Set(["string", "number", "integer", "boolean", "null"]);
|
|
1544
1544
|
function coerceToTypes(types, coerceTypes) {
|
|
1545
1545
|
return coerceTypes ? types.filter((t) => COERCIBLE.has(t) || coerceTypes === "array" && t === "array") : [];
|
|
@@ -1619,7 +1619,7 @@ var require_dataType = __commonJS({
|
|
|
1619
1619
|
return (0, codegen_1.and)((0, codegen_1._)`typeof ${data} == "number"`, _cond, strictNums ? (0, codegen_1._)`isFinite(${data})` : codegen_1.nil);
|
|
1620
1620
|
}
|
|
1621
1621
|
}
|
|
1622
|
-
|
|
1622
|
+
exports.checkDataType = checkDataType;
|
|
1623
1623
|
function checkDataTypes(dataTypes, data, strictNums, correct) {
|
|
1624
1624
|
if (dataTypes.length === 1) {
|
|
1625
1625
|
return checkDataType(dataTypes[0], data, strictNums, correct);
|
|
@@ -1641,7 +1641,7 @@ var require_dataType = __commonJS({
|
|
|
1641
1641
|
cond = (0, codegen_1.and)(cond, checkDataType(t, data, strictNums, correct));
|
|
1642
1642
|
return cond;
|
|
1643
1643
|
}
|
|
1644
|
-
|
|
1644
|
+
exports.checkDataTypes = checkDataTypes;
|
|
1645
1645
|
var typeError = {
|
|
1646
1646
|
message: ({ schema }) => `must be ${schema}`,
|
|
1647
1647
|
params: ({ schema, schemaValue }) => typeof schema == "string" ? (0, codegen_1._)`{type: ${schema}}` : (0, codegen_1._)`{type: ${schemaValue}}`
|
|
@@ -1650,7 +1650,7 @@ var require_dataType = __commonJS({
|
|
|
1650
1650
|
const cxt = getTypeErrorContext(it);
|
|
1651
1651
|
(0, errors_1.reportError)(cxt, typeError);
|
|
1652
1652
|
}
|
|
1653
|
-
|
|
1653
|
+
exports.reportTypeError = reportTypeError;
|
|
1654
1654
|
function getTypeErrorContext(it) {
|
|
1655
1655
|
const { gen, data, schema } = it;
|
|
1656
1656
|
const schemaCode = (0, util_1.schemaRefOrVal)(it, schema, "type");
|
|
@@ -1671,10 +1671,10 @@ var require_dataType = __commonJS({
|
|
|
1671
1671
|
|
|
1672
1672
|
// node_modules/ajv/dist/compile/validate/defaults.js
|
|
1673
1673
|
var require_defaults = __commonJS({
|
|
1674
|
-
"node_modules/ajv/dist/compile/validate/defaults.js"(
|
|
1674
|
+
"node_modules/ajv/dist/compile/validate/defaults.js"(exports) {
|
|
1675
1675
|
"use strict";
|
|
1676
|
-
Object.defineProperty(
|
|
1677
|
-
|
|
1676
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
1677
|
+
exports.assignDefaults = void 0;
|
|
1678
1678
|
var codegen_1 = require_codegen();
|
|
1679
1679
|
var util_1 = require_util();
|
|
1680
1680
|
function assignDefaults(it, ty) {
|
|
@@ -1687,7 +1687,7 @@ var require_defaults = __commonJS({
|
|
|
1687
1687
|
items.forEach((sch, i) => assignDefault(it, i, sch.default));
|
|
1688
1688
|
}
|
|
1689
1689
|
}
|
|
1690
|
-
|
|
1690
|
+
exports.assignDefaults = assignDefaults;
|
|
1691
1691
|
function assignDefault(it, prop, defaultValue) {
|
|
1692
1692
|
const { gen, compositeRule, data, opts } = it;
|
|
1693
1693
|
if (defaultValue === void 0)
|
|
@@ -1708,10 +1708,10 @@ var require_defaults = __commonJS({
|
|
|
1708
1708
|
|
|
1709
1709
|
// node_modules/ajv/dist/vocabularies/code.js
|
|
1710
1710
|
var require_code2 = __commonJS({
|
|
1711
|
-
"node_modules/ajv/dist/vocabularies/code.js"(
|
|
1711
|
+
"node_modules/ajv/dist/vocabularies/code.js"(exports) {
|
|
1712
1712
|
"use strict";
|
|
1713
|
-
Object.defineProperty(
|
|
1714
|
-
|
|
1713
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
1714
|
+
exports.validateUnion = exports.validateArray = exports.usePattern = exports.callValidateCode = exports.schemaProperties = exports.allSchemaProperties = exports.noPropertyInData = exports.propertyInData = exports.isOwnProperty = exports.hasPropFunc = exports.reportMissingProp = exports.checkMissingProp = exports.checkReportMissingProp = void 0;
|
|
1715
1715
|
var codegen_1 = require_codegen();
|
|
1716
1716
|
var util_1 = require_util();
|
|
1717
1717
|
var names_1 = require_names();
|
|
@@ -1723,16 +1723,16 @@ var require_code2 = __commonJS({
|
|
|
1723
1723
|
cxt.error();
|
|
1724
1724
|
});
|
|
1725
1725
|
}
|
|
1726
|
-
|
|
1726
|
+
exports.checkReportMissingProp = checkReportMissingProp;
|
|
1727
1727
|
function checkMissingProp({ gen, data, it: { opts } }, properties, missing) {
|
|
1728
1728
|
return (0, codegen_1.or)(...properties.map((prop) => (0, codegen_1.and)(noPropertyInData(gen, data, prop, opts.ownProperties), (0, codegen_1._)`${missing} = ${prop}`)));
|
|
1729
1729
|
}
|
|
1730
|
-
|
|
1730
|
+
exports.checkMissingProp = checkMissingProp;
|
|
1731
1731
|
function reportMissingProp(cxt, missing) {
|
|
1732
1732
|
cxt.setParams({ missingProperty: missing }, true);
|
|
1733
1733
|
cxt.error();
|
|
1734
1734
|
}
|
|
1735
|
-
|
|
1735
|
+
exports.reportMissingProp = reportMissingProp;
|
|
1736
1736
|
function hasPropFunc(gen) {
|
|
1737
1737
|
return gen.scopeValue("func", {
|
|
1738
1738
|
// eslint-disable-next-line @typescript-eslint/unbound-method
|
|
@@ -1740,29 +1740,29 @@ var require_code2 = __commonJS({
|
|
|
1740
1740
|
code: (0, codegen_1._)`Object.prototype.hasOwnProperty`
|
|
1741
1741
|
});
|
|
1742
1742
|
}
|
|
1743
|
-
|
|
1743
|
+
exports.hasPropFunc = hasPropFunc;
|
|
1744
1744
|
function isOwnProperty(gen, data, property) {
|
|
1745
1745
|
return (0, codegen_1._)`${hasPropFunc(gen)}.call(${data}, ${property})`;
|
|
1746
1746
|
}
|
|
1747
|
-
|
|
1747
|
+
exports.isOwnProperty = isOwnProperty;
|
|
1748
1748
|
function propertyInData(gen, data, property, ownProperties) {
|
|
1749
1749
|
const cond = (0, codegen_1._)`${data}${(0, codegen_1.getProperty)(property)} !== undefined`;
|
|
1750
1750
|
return ownProperties ? (0, codegen_1._)`${cond} && ${isOwnProperty(gen, data, property)}` : cond;
|
|
1751
1751
|
}
|
|
1752
|
-
|
|
1752
|
+
exports.propertyInData = propertyInData;
|
|
1753
1753
|
function noPropertyInData(gen, data, property, ownProperties) {
|
|
1754
1754
|
const cond = (0, codegen_1._)`${data}${(0, codegen_1.getProperty)(property)} === undefined`;
|
|
1755
1755
|
return ownProperties ? (0, codegen_1.or)(cond, (0, codegen_1.not)(isOwnProperty(gen, data, property))) : cond;
|
|
1756
1756
|
}
|
|
1757
|
-
|
|
1757
|
+
exports.noPropertyInData = noPropertyInData;
|
|
1758
1758
|
function allSchemaProperties(schemaMap) {
|
|
1759
1759
|
return schemaMap ? Object.keys(schemaMap).filter((p) => p !== "__proto__") : [];
|
|
1760
1760
|
}
|
|
1761
|
-
|
|
1761
|
+
exports.allSchemaProperties = allSchemaProperties;
|
|
1762
1762
|
function schemaProperties(it, schemaMap) {
|
|
1763
1763
|
return allSchemaProperties(schemaMap).filter((p) => !(0, util_1.alwaysValidSchema)(it, schemaMap[p]));
|
|
1764
1764
|
}
|
|
1765
|
-
|
|
1765
|
+
exports.schemaProperties = schemaProperties;
|
|
1766
1766
|
function callValidateCode({ schemaCode, data, it: { gen, topSchemaRef, schemaPath, errorPath }, it }, func, context, passSchema) {
|
|
1767
1767
|
const dataAndSchema = passSchema ? (0, codegen_1._)`${schemaCode}, ${data}, ${topSchemaRef}${schemaPath}` : data;
|
|
1768
1768
|
const valCxt = [
|
|
@@ -1776,7 +1776,7 @@ var require_code2 = __commonJS({
|
|
|
1776
1776
|
const args = (0, codegen_1._)`${dataAndSchema}, ${gen.object(...valCxt)}`;
|
|
1777
1777
|
return context !== codegen_1.nil ? (0, codegen_1._)`${func}.call(${context}, ${args})` : (0, codegen_1._)`${func}(${args})`;
|
|
1778
1778
|
}
|
|
1779
|
-
|
|
1779
|
+
exports.callValidateCode = callValidateCode;
|
|
1780
1780
|
var newRegExp = (0, codegen_1._)`new RegExp`;
|
|
1781
1781
|
function usePattern({ gen, it: { opts } }, pattern) {
|
|
1782
1782
|
const u = opts.unicodeRegExp ? "u" : "";
|
|
@@ -1788,7 +1788,7 @@ var require_code2 = __commonJS({
|
|
|
1788
1788
|
code: (0, codegen_1._)`${regExp.code === "new RegExp" ? newRegExp : (0, util_2.useFunc)(gen, regExp)}(${pattern}, ${u})`
|
|
1789
1789
|
});
|
|
1790
1790
|
}
|
|
1791
|
-
|
|
1791
|
+
exports.usePattern = usePattern;
|
|
1792
1792
|
function validateArray(cxt) {
|
|
1793
1793
|
const { gen, data, keyword, it } = cxt;
|
|
1794
1794
|
const valid = gen.name("valid");
|
|
@@ -1812,7 +1812,7 @@ var require_code2 = __commonJS({
|
|
|
1812
1812
|
});
|
|
1813
1813
|
}
|
|
1814
1814
|
}
|
|
1815
|
-
|
|
1815
|
+
exports.validateArray = validateArray;
|
|
1816
1816
|
function validateUnion(cxt) {
|
|
1817
1817
|
const { gen, schema, keyword, it } = cxt;
|
|
1818
1818
|
if (!Array.isArray(schema))
|
|
@@ -1835,16 +1835,16 @@ var require_code2 = __commonJS({
|
|
|
1835
1835
|
}));
|
|
1836
1836
|
cxt.result(valid, () => cxt.reset(), () => cxt.error(true));
|
|
1837
1837
|
}
|
|
1838
|
-
|
|
1838
|
+
exports.validateUnion = validateUnion;
|
|
1839
1839
|
}
|
|
1840
1840
|
});
|
|
1841
1841
|
|
|
1842
1842
|
// node_modules/ajv/dist/compile/validate/keyword.js
|
|
1843
1843
|
var require_keyword = __commonJS({
|
|
1844
|
-
"node_modules/ajv/dist/compile/validate/keyword.js"(
|
|
1844
|
+
"node_modules/ajv/dist/compile/validate/keyword.js"(exports) {
|
|
1845
1845
|
"use strict";
|
|
1846
|
-
Object.defineProperty(
|
|
1847
|
-
|
|
1846
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
1847
|
+
exports.validateKeywordUsage = exports.validSchemaType = exports.funcKeywordCode = exports.macroKeywordCode = void 0;
|
|
1848
1848
|
var codegen_1 = require_codegen();
|
|
1849
1849
|
var names_1 = require_names();
|
|
1850
1850
|
var code_1 = require_code2();
|
|
@@ -1865,7 +1865,7 @@ var require_keyword = __commonJS({
|
|
|
1865
1865
|
}, valid);
|
|
1866
1866
|
cxt.pass(valid, () => cxt.error(true));
|
|
1867
1867
|
}
|
|
1868
|
-
|
|
1868
|
+
exports.macroKeywordCode = macroKeywordCode;
|
|
1869
1869
|
function funcKeywordCode(cxt, def) {
|
|
1870
1870
|
var _a3;
|
|
1871
1871
|
const { gen, keyword, schema, parentSchema, $data, it } = cxt;
|
|
@@ -1909,7 +1909,7 @@ var require_keyword = __commonJS({
|
|
|
1909
1909
|
gen.if((0, codegen_1.not)((_a4 = def.valid) !== null && _a4 !== void 0 ? _a4 : valid), errors);
|
|
1910
1910
|
}
|
|
1911
1911
|
}
|
|
1912
|
-
|
|
1912
|
+
exports.funcKeywordCode = funcKeywordCode;
|
|
1913
1913
|
function modifyData(cxt) {
|
|
1914
1914
|
const { gen, data, it } = cxt;
|
|
1915
1915
|
gen.if(it.parentData, () => gen.assign(data, (0, codegen_1._)`${it.parentData}[${it.parentDataProperty}]`));
|
|
@@ -1933,7 +1933,7 @@ var require_keyword = __commonJS({
|
|
|
1933
1933
|
function validSchemaType(schema, schemaType, allowUndefined = false) {
|
|
1934
1934
|
return !schemaType.length || schemaType.some((st) => st === "array" ? Array.isArray(schema) : st === "object" ? schema && typeof schema == "object" && !Array.isArray(schema) : typeof schema == st || allowUndefined && typeof schema == "undefined");
|
|
1935
1935
|
}
|
|
1936
|
-
|
|
1936
|
+
exports.validSchemaType = validSchemaType;
|
|
1937
1937
|
function validateKeywordUsage({ schema, opts, self: self2, errSchemaPath }, def, keyword) {
|
|
1938
1938
|
if (Array.isArray(def.keyword) ? !def.keyword.includes(keyword) : def.keyword !== keyword) {
|
|
1939
1939
|
throw new Error("ajv implementation error");
|
|
@@ -1953,16 +1953,16 @@ var require_keyword = __commonJS({
|
|
|
1953
1953
|
}
|
|
1954
1954
|
}
|
|
1955
1955
|
}
|
|
1956
|
-
|
|
1956
|
+
exports.validateKeywordUsage = validateKeywordUsage;
|
|
1957
1957
|
}
|
|
1958
1958
|
});
|
|
1959
1959
|
|
|
1960
1960
|
// node_modules/ajv/dist/compile/validate/subschema.js
|
|
1961
1961
|
var require_subschema = __commonJS({
|
|
1962
|
-
"node_modules/ajv/dist/compile/validate/subschema.js"(
|
|
1962
|
+
"node_modules/ajv/dist/compile/validate/subschema.js"(exports) {
|
|
1963
1963
|
"use strict";
|
|
1964
|
-
Object.defineProperty(
|
|
1965
|
-
|
|
1964
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
1965
|
+
exports.extendSubschemaMode = exports.extendSubschemaData = exports.getSubschema = void 0;
|
|
1966
1966
|
var codegen_1 = require_codegen();
|
|
1967
1967
|
var util_1 = require_util();
|
|
1968
1968
|
function getSubschema(it, { keyword, schemaProp, schema, schemaPath, errSchemaPath, topSchemaRef }) {
|
|
@@ -1994,7 +1994,7 @@ var require_subschema = __commonJS({
|
|
|
1994
1994
|
}
|
|
1995
1995
|
throw new Error('either "keyword" or "schema" must be passed');
|
|
1996
1996
|
}
|
|
1997
|
-
|
|
1997
|
+
exports.getSubschema = getSubschema;
|
|
1998
1998
|
function extendSubschemaData(subschema, it, { dataProp, dataPropType: dpType, data, dataTypes, propertyName }) {
|
|
1999
1999
|
if (data !== void 0 && dataProp !== void 0) {
|
|
2000
2000
|
throw new Error('both "data" and "dataProp" passed, only one allowed');
|
|
@@ -2025,7 +2025,7 @@ var require_subschema = __commonJS({
|
|
|
2025
2025
|
subschema.dataNames = [...it.dataNames, _nextData];
|
|
2026
2026
|
}
|
|
2027
2027
|
}
|
|
2028
|
-
|
|
2028
|
+
exports.extendSubschemaData = extendSubschemaData;
|
|
2029
2029
|
function extendSubschemaMode(subschema, { jtdDiscriminator, jtdMetadata, compositeRule, createErrors, allErrors }) {
|
|
2030
2030
|
if (compositeRule !== void 0)
|
|
2031
2031
|
subschema.compositeRule = compositeRule;
|
|
@@ -2036,15 +2036,15 @@ var require_subschema = __commonJS({
|
|
|
2036
2036
|
subschema.jtdDiscriminator = jtdDiscriminator;
|
|
2037
2037
|
subschema.jtdMetadata = jtdMetadata;
|
|
2038
2038
|
}
|
|
2039
|
-
|
|
2039
|
+
exports.extendSubschemaMode = extendSubschemaMode;
|
|
2040
2040
|
}
|
|
2041
2041
|
});
|
|
2042
2042
|
|
|
2043
2043
|
// node_modules/fast-deep-equal/index.js
|
|
2044
2044
|
var require_fast_deep_equal = __commonJS({
|
|
2045
|
-
"node_modules/fast-deep-equal/index.js"(
|
|
2045
|
+
"node_modules/fast-deep-equal/index.js"(exports, module) {
|
|
2046
2046
|
"use strict";
|
|
2047
|
-
|
|
2047
|
+
module.exports = function equal(a, b) {
|
|
2048
2048
|
if (a === b) return true;
|
|
2049
2049
|
if (a && b && typeof a == "object" && typeof b == "object") {
|
|
2050
2050
|
if (a.constructor !== b.constructor) return false;
|
|
@@ -2077,9 +2077,9 @@ var require_fast_deep_equal = __commonJS({
|
|
|
2077
2077
|
|
|
2078
2078
|
// node_modules/json-schema-traverse/index.js
|
|
2079
2079
|
var require_json_schema_traverse = __commonJS({
|
|
2080
|
-
"node_modules/json-schema-traverse/index.js"(
|
|
2080
|
+
"node_modules/json-schema-traverse/index.js"(exports, module) {
|
|
2081
2081
|
"use strict";
|
|
2082
|
-
var traverse =
|
|
2082
|
+
var traverse = module.exports = function(schema, opts, cb) {
|
|
2083
2083
|
if (typeof opts == "function") {
|
|
2084
2084
|
cb = opts;
|
|
2085
2085
|
opts = {};
|
|
@@ -2165,10 +2165,10 @@ var require_json_schema_traverse = __commonJS({
|
|
|
2165
2165
|
|
|
2166
2166
|
// node_modules/ajv/dist/compile/resolve.js
|
|
2167
2167
|
var require_resolve = __commonJS({
|
|
2168
|
-
"node_modules/ajv/dist/compile/resolve.js"(
|
|
2168
|
+
"node_modules/ajv/dist/compile/resolve.js"(exports) {
|
|
2169
2169
|
"use strict";
|
|
2170
|
-
Object.defineProperty(
|
|
2171
|
-
|
|
2170
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
2171
|
+
exports.getSchemaRefs = exports.resolveUrl = exports.normalizeId = exports._getFullPath = exports.getFullPath = exports.inlineRef = void 0;
|
|
2172
2172
|
var util_1 = require_util();
|
|
2173
2173
|
var equal = require_fast_deep_equal();
|
|
2174
2174
|
var traverse = require_json_schema_traverse();
|
|
@@ -2199,7 +2199,7 @@ var require_resolve = __commonJS({
|
|
|
2199
2199
|
return false;
|
|
2200
2200
|
return countKeys(schema) <= limit;
|
|
2201
2201
|
}
|
|
2202
|
-
|
|
2202
|
+
exports.inlineRef = inlineRef;
|
|
2203
2203
|
var REF_KEYWORDS = /* @__PURE__ */ new Set([
|
|
2204
2204
|
"$ref",
|
|
2205
2205
|
"$recursiveRef",
|
|
@@ -2241,22 +2241,22 @@ var require_resolve = __commonJS({
|
|
|
2241
2241
|
const p = resolver.parse(id);
|
|
2242
2242
|
return _getFullPath(resolver, p);
|
|
2243
2243
|
}
|
|
2244
|
-
|
|
2244
|
+
exports.getFullPath = getFullPath;
|
|
2245
2245
|
function _getFullPath(resolver, p) {
|
|
2246
2246
|
const serialized = resolver.serialize(p);
|
|
2247
2247
|
return serialized.split("#")[0] + "#";
|
|
2248
2248
|
}
|
|
2249
|
-
|
|
2249
|
+
exports._getFullPath = _getFullPath;
|
|
2250
2250
|
var TRAILING_SLASH_HASH = /#\/?$/;
|
|
2251
2251
|
function normalizeId(id) {
|
|
2252
2252
|
return id ? id.replace(TRAILING_SLASH_HASH, "") : "";
|
|
2253
2253
|
}
|
|
2254
|
-
|
|
2254
|
+
exports.normalizeId = normalizeId;
|
|
2255
2255
|
function resolveUrl(resolver, baseId, id) {
|
|
2256
2256
|
id = normalizeId(id);
|
|
2257
2257
|
return resolver.resolve(baseId, id);
|
|
2258
2258
|
}
|
|
2259
|
-
|
|
2259
|
+
exports.resolveUrl = resolveUrl;
|
|
2260
2260
|
var ANCHOR = /^[a-z_][-a-z0-9._]*$/i;
|
|
2261
2261
|
function getSchemaRefs(schema, baseId) {
|
|
2262
2262
|
if (typeof schema == "boolean")
|
|
@@ -2315,16 +2315,16 @@ var require_resolve = __commonJS({
|
|
|
2315
2315
|
return new Error(`reference "${ref}" resolves to more than one schema`);
|
|
2316
2316
|
}
|
|
2317
2317
|
}
|
|
2318
|
-
|
|
2318
|
+
exports.getSchemaRefs = getSchemaRefs;
|
|
2319
2319
|
}
|
|
2320
2320
|
});
|
|
2321
2321
|
|
|
2322
2322
|
// node_modules/ajv/dist/compile/validate/index.js
|
|
2323
2323
|
var require_validate = __commonJS({
|
|
2324
|
-
"node_modules/ajv/dist/compile/validate/index.js"(
|
|
2324
|
+
"node_modules/ajv/dist/compile/validate/index.js"(exports) {
|
|
2325
2325
|
"use strict";
|
|
2326
|
-
Object.defineProperty(
|
|
2327
|
-
|
|
2326
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
2327
|
+
exports.getData = exports.KeywordCxt = exports.validateFunctionCode = void 0;
|
|
2328
2328
|
var boolSchema_1 = require_boolSchema();
|
|
2329
2329
|
var dataType_1 = require_dataType();
|
|
2330
2330
|
var applicability_1 = require_applicability();
|
|
@@ -2347,7 +2347,7 @@ var require_validate = __commonJS({
|
|
|
2347
2347
|
}
|
|
2348
2348
|
validateFunction(it, () => (0, boolSchema_1.topBoolOrEmptySchema)(it));
|
|
2349
2349
|
}
|
|
2350
|
-
|
|
2350
|
+
exports.validateFunctionCode = validateFunctionCode;
|
|
2351
2351
|
function validateFunction({ gen, validateName, schema, schemaEnv, opts }, body) {
|
|
2352
2352
|
if (opts.code.es5) {
|
|
2353
2353
|
gen.func(validateName, (0, codegen_1._)`${names_1.default.data}, ${names_1.default.valCxt}`, schemaEnv.$async, () => {
|
|
@@ -2768,7 +2768,7 @@ var require_validate = __commonJS({
|
|
|
2768
2768
|
}
|
|
2769
2769
|
}
|
|
2770
2770
|
};
|
|
2771
|
-
|
|
2771
|
+
exports.KeywordCxt = KeywordCxt;
|
|
2772
2772
|
function keywordCode(it, keyword, def, ruleType) {
|
|
2773
2773
|
const cxt = new KeywordCxt(it, def, keyword);
|
|
2774
2774
|
if ("code" in def) {
|
|
@@ -2823,15 +2823,15 @@ var require_validate = __commonJS({
|
|
|
2823
2823
|
return `Cannot access ${pointerType} ${up} levels up, current level is ${dataLevel}`;
|
|
2824
2824
|
}
|
|
2825
2825
|
}
|
|
2826
|
-
|
|
2826
|
+
exports.getData = getData;
|
|
2827
2827
|
}
|
|
2828
2828
|
});
|
|
2829
2829
|
|
|
2830
2830
|
// node_modules/ajv/dist/runtime/validation_error.js
|
|
2831
2831
|
var require_validation_error = __commonJS({
|
|
2832
|
-
"node_modules/ajv/dist/runtime/validation_error.js"(
|
|
2832
|
+
"node_modules/ajv/dist/runtime/validation_error.js"(exports) {
|
|
2833
2833
|
"use strict";
|
|
2834
|
-
Object.defineProperty(
|
|
2834
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
2835
2835
|
var ValidationError = class extends Error {
|
|
2836
2836
|
constructor(errors) {
|
|
2837
2837
|
super("validation failed");
|
|
@@ -2839,15 +2839,15 @@ var require_validation_error = __commonJS({
|
|
|
2839
2839
|
this.ajv = this.validation = true;
|
|
2840
2840
|
}
|
|
2841
2841
|
};
|
|
2842
|
-
|
|
2842
|
+
exports.default = ValidationError;
|
|
2843
2843
|
}
|
|
2844
2844
|
});
|
|
2845
2845
|
|
|
2846
2846
|
// node_modules/ajv/dist/compile/ref_error.js
|
|
2847
2847
|
var require_ref_error = __commonJS({
|
|
2848
|
-
"node_modules/ajv/dist/compile/ref_error.js"(
|
|
2848
|
+
"node_modules/ajv/dist/compile/ref_error.js"(exports) {
|
|
2849
2849
|
"use strict";
|
|
2850
|
-
Object.defineProperty(
|
|
2850
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
2851
2851
|
var resolve_1 = require_resolve();
|
|
2852
2852
|
var MissingRefError = class extends Error {
|
|
2853
2853
|
constructor(resolver, baseId, ref, msg) {
|
|
@@ -2856,16 +2856,16 @@ var require_ref_error = __commonJS({
|
|
|
2856
2856
|
this.missingSchema = (0, resolve_1.normalizeId)((0, resolve_1.getFullPath)(resolver, this.missingRef));
|
|
2857
2857
|
}
|
|
2858
2858
|
};
|
|
2859
|
-
|
|
2859
|
+
exports.default = MissingRefError;
|
|
2860
2860
|
}
|
|
2861
2861
|
});
|
|
2862
2862
|
|
|
2863
2863
|
// node_modules/ajv/dist/compile/index.js
|
|
2864
2864
|
var require_compile = __commonJS({
|
|
2865
|
-
"node_modules/ajv/dist/compile/index.js"(
|
|
2865
|
+
"node_modules/ajv/dist/compile/index.js"(exports) {
|
|
2866
2866
|
"use strict";
|
|
2867
|
-
Object.defineProperty(
|
|
2868
|
-
|
|
2867
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
2868
|
+
exports.resolveSchema = exports.getCompilingSchema = exports.resolveRef = exports.compileSchema = exports.SchemaEnv = void 0;
|
|
2869
2869
|
var codegen_1 = require_codegen();
|
|
2870
2870
|
var validation_error_1 = require_validation_error();
|
|
2871
2871
|
var names_1 = require_names();
|
|
@@ -2891,7 +2891,7 @@ var require_compile = __commonJS({
|
|
|
2891
2891
|
this.refs = {};
|
|
2892
2892
|
}
|
|
2893
2893
|
};
|
|
2894
|
-
|
|
2894
|
+
exports.SchemaEnv = SchemaEnv;
|
|
2895
2895
|
function compileSchema(sch) {
|
|
2896
2896
|
const _sch = getCompilingSchema.call(this, sch);
|
|
2897
2897
|
if (_sch)
|
|
@@ -2977,7 +2977,7 @@ var require_compile = __commonJS({
|
|
|
2977
2977
|
this._compilations.delete(sch);
|
|
2978
2978
|
}
|
|
2979
2979
|
}
|
|
2980
|
-
|
|
2980
|
+
exports.compileSchema = compileSchema;
|
|
2981
2981
|
function resolveRef(root, baseId, ref) {
|
|
2982
2982
|
var _a3;
|
|
2983
2983
|
ref = (0, resolve_1.resolveUrl)(this.opts.uriResolver, baseId, ref);
|
|
@@ -2995,7 +2995,7 @@ var require_compile = __commonJS({
|
|
|
2995
2995
|
return;
|
|
2996
2996
|
return root.refs[ref] = inlineOrCompile.call(this, _sch);
|
|
2997
2997
|
}
|
|
2998
|
-
|
|
2998
|
+
exports.resolveRef = resolveRef;
|
|
2999
2999
|
function inlineOrCompile(sch) {
|
|
3000
3000
|
if ((0, resolve_1.inlineRef)(sch.schema, this.opts.inlineRefs))
|
|
3001
3001
|
return sch.schema;
|
|
@@ -3007,7 +3007,7 @@ var require_compile = __commonJS({
|
|
|
3007
3007
|
return sch;
|
|
3008
3008
|
}
|
|
3009
3009
|
}
|
|
3010
|
-
|
|
3010
|
+
exports.getCompilingSchema = getCompilingSchema;
|
|
3011
3011
|
function sameSchemaEnv(s1, s2) {
|
|
3012
3012
|
return s1.schema === s2.schema && s1.root === s2.root && s1.baseId === s2.baseId;
|
|
3013
3013
|
}
|
|
@@ -3046,7 +3046,7 @@ var require_compile = __commonJS({
|
|
|
3046
3046
|
}
|
|
3047
3047
|
return getJsonPointer.call(this, p, schOrRef);
|
|
3048
3048
|
}
|
|
3049
|
-
|
|
3049
|
+
exports.resolveSchema = resolveSchema;
|
|
3050
3050
|
var PREVENT_SCOPE_CHANGE = /* @__PURE__ */ new Set([
|
|
3051
3051
|
"properties",
|
|
3052
3052
|
"patternProperties",
|
|
@@ -3086,8 +3086,8 @@ var require_compile = __commonJS({
|
|
|
3086
3086
|
|
|
3087
3087
|
// node_modules/ajv/dist/refs/data.json
|
|
3088
3088
|
var require_data = __commonJS({
|
|
3089
|
-
"node_modules/ajv/dist/refs/data.json"(
|
|
3090
|
-
|
|
3089
|
+
"node_modules/ajv/dist/refs/data.json"(exports, module) {
|
|
3090
|
+
module.exports = {
|
|
3091
3091
|
$id: "https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#",
|
|
3092
3092
|
description: "Meta-schema for $data reference (JSON AnySchema extension proposal)",
|
|
3093
3093
|
type: "object",
|
|
@@ -3105,7 +3105,7 @@ var require_data = __commonJS({
|
|
|
3105
3105
|
|
|
3106
3106
|
// node_modules/fast-uri/lib/utils.js
|
|
3107
3107
|
var require_utils = __commonJS({
|
|
3108
|
-
"node_modules/fast-uri/lib/utils.js"(
|
|
3108
|
+
"node_modules/fast-uri/lib/utils.js"(exports, module) {
|
|
3109
3109
|
"use strict";
|
|
3110
3110
|
var isUUID = RegExp.prototype.test.bind(/^[\da-f]{8}-[\da-f]{4}-[\da-f]{4}-[\da-f]{4}-[\da-f]{12}$/iu);
|
|
3111
3111
|
var isIPv4 = RegExp.prototype.test.bind(/^(?:(?:25[0-5]|2[0-4]\d|1\d{2}|[1-9]\d|\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d{2}|[1-9]\d|\d)$/u);
|
|
@@ -3400,7 +3400,7 @@ var require_utils = __commonJS({
|
|
|
3400
3400
|
}
|
|
3401
3401
|
return uriTokens.length ? uriTokens.join("") : void 0;
|
|
3402
3402
|
}
|
|
3403
|
-
|
|
3403
|
+
module.exports = {
|
|
3404
3404
|
nonSimpleDomain,
|
|
3405
3405
|
recomposeAuthority,
|
|
3406
3406
|
reescapeHostDelimiters,
|
|
@@ -3418,7 +3418,7 @@ var require_utils = __commonJS({
|
|
|
3418
3418
|
|
|
3419
3419
|
// node_modules/fast-uri/lib/schemes.js
|
|
3420
3420
|
var require_schemes = __commonJS({
|
|
3421
|
-
"node_modules/fast-uri/lib/schemes.js"(
|
|
3421
|
+
"node_modules/fast-uri/lib/schemes.js"(exports, module) {
|
|
3422
3422
|
"use strict";
|
|
3423
3423
|
var { isUUID } = require_utils();
|
|
3424
3424
|
var URN_REG = /([\da-z][\d\-a-z]{0,31}):((?:[\w!$'()*+,\-.:;=@]|%[\da-f]{2})+)/iu;
|
|
@@ -3617,7 +3617,7 @@ var require_schemes = __commonJS({
|
|
|
3617
3617
|
scheme.toLowerCase()
|
|
3618
3618
|
]) || void 0;
|
|
3619
3619
|
}
|
|
3620
|
-
|
|
3620
|
+
module.exports = {
|
|
3621
3621
|
wsIsSecure,
|
|
3622
3622
|
SCHEMES,
|
|
3623
3623
|
isValidSchemeName,
|
|
@@ -3628,7 +3628,7 @@ var require_schemes = __commonJS({
|
|
|
3628
3628
|
|
|
3629
3629
|
// node_modules/fast-uri/index.js
|
|
3630
3630
|
var require_fast_uri = __commonJS({
|
|
3631
|
-
"node_modules/fast-uri/index.js"(
|
|
3631
|
+
"node_modules/fast-uri/index.js"(exports, module) {
|
|
3632
3632
|
"use strict";
|
|
3633
3633
|
var { normalizeIPv6, removeDotSegments, recomposeAuthority, normalizePercentEncoding, normalizePathEncoding, escapePreservingEscapes, reescapeHostDelimiters, isIPv4, nonSimpleDomain } = require_utils();
|
|
3634
3634
|
var { SCHEMES, getSchemeHandler } = require_schemes();
|
|
@@ -3932,50 +3932,50 @@ var require_fast_uri = __commonJS({
|
|
|
3932
3932
|
serialize,
|
|
3933
3933
|
parse: parse3
|
|
3934
3934
|
};
|
|
3935
|
-
|
|
3936
|
-
|
|
3937
|
-
|
|
3935
|
+
module.exports = fastUri;
|
|
3936
|
+
module.exports.default = fastUri;
|
|
3937
|
+
module.exports.fastUri = fastUri;
|
|
3938
3938
|
}
|
|
3939
3939
|
});
|
|
3940
3940
|
|
|
3941
3941
|
// node_modules/ajv/dist/runtime/uri.js
|
|
3942
3942
|
var require_uri = __commonJS({
|
|
3943
|
-
"node_modules/ajv/dist/runtime/uri.js"(
|
|
3943
|
+
"node_modules/ajv/dist/runtime/uri.js"(exports) {
|
|
3944
3944
|
"use strict";
|
|
3945
|
-
Object.defineProperty(
|
|
3945
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3946
3946
|
var uri = require_fast_uri();
|
|
3947
3947
|
uri.code = 'require("ajv/dist/runtime/uri").default';
|
|
3948
|
-
|
|
3948
|
+
exports.default = uri;
|
|
3949
3949
|
}
|
|
3950
3950
|
});
|
|
3951
3951
|
|
|
3952
3952
|
// node_modules/ajv/dist/core.js
|
|
3953
3953
|
var require_core = __commonJS({
|
|
3954
|
-
"node_modules/ajv/dist/core.js"(
|
|
3954
|
+
"node_modules/ajv/dist/core.js"(exports) {
|
|
3955
3955
|
"use strict";
|
|
3956
|
-
Object.defineProperty(
|
|
3957
|
-
|
|
3956
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3957
|
+
exports.CodeGen = exports.Name = exports.nil = exports.stringify = exports.str = exports._ = exports.KeywordCxt = void 0;
|
|
3958
3958
|
var validate_1 = require_validate();
|
|
3959
|
-
Object.defineProperty(
|
|
3959
|
+
Object.defineProperty(exports, "KeywordCxt", { enumerable: true, get: function() {
|
|
3960
3960
|
return validate_1.KeywordCxt;
|
|
3961
3961
|
} });
|
|
3962
3962
|
var codegen_1 = require_codegen();
|
|
3963
|
-
Object.defineProperty(
|
|
3963
|
+
Object.defineProperty(exports, "_", { enumerable: true, get: function() {
|
|
3964
3964
|
return codegen_1._;
|
|
3965
3965
|
} });
|
|
3966
|
-
Object.defineProperty(
|
|
3966
|
+
Object.defineProperty(exports, "str", { enumerable: true, get: function() {
|
|
3967
3967
|
return codegen_1.str;
|
|
3968
3968
|
} });
|
|
3969
|
-
Object.defineProperty(
|
|
3969
|
+
Object.defineProperty(exports, "stringify", { enumerable: true, get: function() {
|
|
3970
3970
|
return codegen_1.stringify;
|
|
3971
3971
|
} });
|
|
3972
|
-
Object.defineProperty(
|
|
3972
|
+
Object.defineProperty(exports, "nil", { enumerable: true, get: function() {
|
|
3973
3973
|
return codegen_1.nil;
|
|
3974
3974
|
} });
|
|
3975
|
-
Object.defineProperty(
|
|
3975
|
+
Object.defineProperty(exports, "Name", { enumerable: true, get: function() {
|
|
3976
3976
|
return codegen_1.Name;
|
|
3977
3977
|
} });
|
|
3978
|
-
Object.defineProperty(
|
|
3978
|
+
Object.defineProperty(exports, "CodeGen", { enumerable: true, get: function() {
|
|
3979
3979
|
return codegen_1.CodeGen;
|
|
3980
3980
|
} });
|
|
3981
3981
|
var validation_error_1 = require_validation_error();
|
|
@@ -4429,7 +4429,7 @@ var require_core = __commonJS({
|
|
|
4429
4429
|
};
|
|
4430
4430
|
Ajv2.ValidationError = validation_error_1.default;
|
|
4431
4431
|
Ajv2.MissingRefError = ref_error_1.default;
|
|
4432
|
-
|
|
4432
|
+
exports.default = Ajv2;
|
|
4433
4433
|
function checkOptions(checkOpts, options, msg, log = "error") {
|
|
4434
4434
|
for (const key in checkOpts) {
|
|
4435
4435
|
const opt = key;
|
|
@@ -4562,25 +4562,25 @@ var require_core = __commonJS({
|
|
|
4562
4562
|
|
|
4563
4563
|
// node_modules/ajv/dist/vocabularies/core/id.js
|
|
4564
4564
|
var require_id = __commonJS({
|
|
4565
|
-
"node_modules/ajv/dist/vocabularies/core/id.js"(
|
|
4565
|
+
"node_modules/ajv/dist/vocabularies/core/id.js"(exports) {
|
|
4566
4566
|
"use strict";
|
|
4567
|
-
Object.defineProperty(
|
|
4567
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4568
4568
|
var def = {
|
|
4569
4569
|
keyword: "id",
|
|
4570
4570
|
code() {
|
|
4571
4571
|
throw new Error('NOT SUPPORTED: keyword "id", use "$id" for schema ID');
|
|
4572
4572
|
}
|
|
4573
4573
|
};
|
|
4574
|
-
|
|
4574
|
+
exports.default = def;
|
|
4575
4575
|
}
|
|
4576
4576
|
});
|
|
4577
4577
|
|
|
4578
4578
|
// node_modules/ajv/dist/vocabularies/core/ref.js
|
|
4579
4579
|
var require_ref = __commonJS({
|
|
4580
|
-
"node_modules/ajv/dist/vocabularies/core/ref.js"(
|
|
4580
|
+
"node_modules/ajv/dist/vocabularies/core/ref.js"(exports) {
|
|
4581
4581
|
"use strict";
|
|
4582
|
-
Object.defineProperty(
|
|
4583
|
-
|
|
4582
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4583
|
+
exports.callRef = exports.getValidate = void 0;
|
|
4584
4584
|
var ref_error_1 = require_ref_error();
|
|
4585
4585
|
var code_1 = require_code2();
|
|
4586
4586
|
var codegen_1 = require_codegen();
|
|
@@ -4631,7 +4631,7 @@ var require_ref = __commonJS({
|
|
|
4631
4631
|
const { gen } = cxt;
|
|
4632
4632
|
return sch.validate ? gen.scopeValue("validate", { ref: sch.validate }) : (0, codegen_1._)`${gen.scopeValue("wrapper", { ref: sch })}.validate`;
|
|
4633
4633
|
}
|
|
4634
|
-
|
|
4634
|
+
exports.getValidate = getValidate;
|
|
4635
4635
|
function callRef(cxt, v, sch, $async) {
|
|
4636
4636
|
const { gen, it } = cxt;
|
|
4637
4637
|
const { allErrors, schemaEnv: env, opts } = it;
|
|
@@ -4692,16 +4692,16 @@ var require_ref = __commonJS({
|
|
|
4692
4692
|
}
|
|
4693
4693
|
}
|
|
4694
4694
|
}
|
|
4695
|
-
|
|
4696
|
-
|
|
4695
|
+
exports.callRef = callRef;
|
|
4696
|
+
exports.default = def;
|
|
4697
4697
|
}
|
|
4698
4698
|
});
|
|
4699
4699
|
|
|
4700
4700
|
// node_modules/ajv/dist/vocabularies/core/index.js
|
|
4701
4701
|
var require_core2 = __commonJS({
|
|
4702
|
-
"node_modules/ajv/dist/vocabularies/core/index.js"(
|
|
4702
|
+
"node_modules/ajv/dist/vocabularies/core/index.js"(exports) {
|
|
4703
4703
|
"use strict";
|
|
4704
|
-
Object.defineProperty(
|
|
4704
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4705
4705
|
var id_1 = require_id();
|
|
4706
4706
|
var ref_1 = require_ref();
|
|
4707
4707
|
var core = [
|
|
@@ -4714,15 +4714,15 @@ var require_core2 = __commonJS({
|
|
|
4714
4714
|
id_1.default,
|
|
4715
4715
|
ref_1.default
|
|
4716
4716
|
];
|
|
4717
|
-
|
|
4717
|
+
exports.default = core;
|
|
4718
4718
|
}
|
|
4719
4719
|
});
|
|
4720
4720
|
|
|
4721
4721
|
// node_modules/ajv/dist/vocabularies/validation/limitNumber.js
|
|
4722
4722
|
var require_limitNumber = __commonJS({
|
|
4723
|
-
"node_modules/ajv/dist/vocabularies/validation/limitNumber.js"(
|
|
4723
|
+
"node_modules/ajv/dist/vocabularies/validation/limitNumber.js"(exports) {
|
|
4724
4724
|
"use strict";
|
|
4725
|
-
Object.defineProperty(
|
|
4725
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4726
4726
|
var codegen_1 = require_codegen();
|
|
4727
4727
|
var ops = codegen_1.operators;
|
|
4728
4728
|
var KWDs = {
|
|
@@ -4746,15 +4746,15 @@ var require_limitNumber = __commonJS({
|
|
|
4746
4746
|
cxt.fail$data((0, codegen_1._)`${data} ${KWDs[keyword].fail} ${schemaCode} || isNaN(${data})`);
|
|
4747
4747
|
}
|
|
4748
4748
|
};
|
|
4749
|
-
|
|
4749
|
+
exports.default = def;
|
|
4750
4750
|
}
|
|
4751
4751
|
});
|
|
4752
4752
|
|
|
4753
4753
|
// node_modules/ajv/dist/vocabularies/validation/multipleOf.js
|
|
4754
4754
|
var require_multipleOf = __commonJS({
|
|
4755
|
-
"node_modules/ajv/dist/vocabularies/validation/multipleOf.js"(
|
|
4755
|
+
"node_modules/ajv/dist/vocabularies/validation/multipleOf.js"(exports) {
|
|
4756
4756
|
"use strict";
|
|
4757
|
-
Object.defineProperty(
|
|
4757
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4758
4758
|
var codegen_1 = require_codegen();
|
|
4759
4759
|
var error2 = {
|
|
4760
4760
|
message: ({ schemaCode }) => (0, codegen_1.str)`must be multiple of ${schemaCode}`,
|
|
@@ -4774,15 +4774,15 @@ var require_multipleOf = __commonJS({
|
|
|
4774
4774
|
cxt.fail$data((0, codegen_1._)`(${schemaCode} === 0 || (${res} = ${data}/${schemaCode}, ${invalid}))`);
|
|
4775
4775
|
}
|
|
4776
4776
|
};
|
|
4777
|
-
|
|
4777
|
+
exports.default = def;
|
|
4778
4778
|
}
|
|
4779
4779
|
});
|
|
4780
4780
|
|
|
4781
4781
|
// node_modules/ajv/dist/runtime/ucs2length.js
|
|
4782
4782
|
var require_ucs2length = __commonJS({
|
|
4783
|
-
"node_modules/ajv/dist/runtime/ucs2length.js"(
|
|
4783
|
+
"node_modules/ajv/dist/runtime/ucs2length.js"(exports) {
|
|
4784
4784
|
"use strict";
|
|
4785
|
-
Object.defineProperty(
|
|
4785
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4786
4786
|
function ucs2length(str) {
|
|
4787
4787
|
const len = str.length;
|
|
4788
4788
|
let length = 0;
|
|
@@ -4799,16 +4799,16 @@ var require_ucs2length = __commonJS({
|
|
|
4799
4799
|
}
|
|
4800
4800
|
return length;
|
|
4801
4801
|
}
|
|
4802
|
-
|
|
4802
|
+
exports.default = ucs2length;
|
|
4803
4803
|
ucs2length.code = 'require("ajv/dist/runtime/ucs2length").default';
|
|
4804
4804
|
}
|
|
4805
4805
|
});
|
|
4806
4806
|
|
|
4807
4807
|
// node_modules/ajv/dist/vocabularies/validation/limitLength.js
|
|
4808
4808
|
var require_limitLength = __commonJS({
|
|
4809
|
-
"node_modules/ajv/dist/vocabularies/validation/limitLength.js"(
|
|
4809
|
+
"node_modules/ajv/dist/vocabularies/validation/limitLength.js"(exports) {
|
|
4810
4810
|
"use strict";
|
|
4811
|
-
Object.defineProperty(
|
|
4811
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4812
4812
|
var codegen_1 = require_codegen();
|
|
4813
4813
|
var util_1 = require_util();
|
|
4814
4814
|
var ucs2length_1 = require_ucs2length();
|
|
@@ -4832,15 +4832,15 @@ var require_limitLength = __commonJS({
|
|
|
4832
4832
|
cxt.fail$data((0, codegen_1._)`${len} ${op} ${schemaCode}`);
|
|
4833
4833
|
}
|
|
4834
4834
|
};
|
|
4835
|
-
|
|
4835
|
+
exports.default = def;
|
|
4836
4836
|
}
|
|
4837
4837
|
});
|
|
4838
4838
|
|
|
4839
4839
|
// node_modules/ajv/dist/vocabularies/validation/pattern.js
|
|
4840
4840
|
var require_pattern = __commonJS({
|
|
4841
|
-
"node_modules/ajv/dist/vocabularies/validation/pattern.js"(
|
|
4841
|
+
"node_modules/ajv/dist/vocabularies/validation/pattern.js"(exports) {
|
|
4842
4842
|
"use strict";
|
|
4843
|
-
Object.defineProperty(
|
|
4843
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4844
4844
|
var code_1 = require_code2();
|
|
4845
4845
|
var util_1 = require_util();
|
|
4846
4846
|
var codegen_1 = require_codegen();
|
|
@@ -4869,15 +4869,15 @@ var require_pattern = __commonJS({
|
|
|
4869
4869
|
}
|
|
4870
4870
|
}
|
|
4871
4871
|
};
|
|
4872
|
-
|
|
4872
|
+
exports.default = def;
|
|
4873
4873
|
}
|
|
4874
4874
|
});
|
|
4875
4875
|
|
|
4876
4876
|
// node_modules/ajv/dist/vocabularies/validation/limitProperties.js
|
|
4877
4877
|
var require_limitProperties = __commonJS({
|
|
4878
|
-
"node_modules/ajv/dist/vocabularies/validation/limitProperties.js"(
|
|
4878
|
+
"node_modules/ajv/dist/vocabularies/validation/limitProperties.js"(exports) {
|
|
4879
4879
|
"use strict";
|
|
4880
|
-
Object.defineProperty(
|
|
4880
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4881
4881
|
var codegen_1 = require_codegen();
|
|
4882
4882
|
var error2 = {
|
|
4883
4883
|
message({ keyword, schemaCode }) {
|
|
@@ -4898,15 +4898,15 @@ var require_limitProperties = __commonJS({
|
|
|
4898
4898
|
cxt.fail$data((0, codegen_1._)`Object.keys(${data}).length ${op} ${schemaCode}`);
|
|
4899
4899
|
}
|
|
4900
4900
|
};
|
|
4901
|
-
|
|
4901
|
+
exports.default = def;
|
|
4902
4902
|
}
|
|
4903
4903
|
});
|
|
4904
4904
|
|
|
4905
4905
|
// node_modules/ajv/dist/vocabularies/validation/required.js
|
|
4906
4906
|
var require_required = __commonJS({
|
|
4907
|
-
"node_modules/ajv/dist/vocabularies/validation/required.js"(
|
|
4907
|
+
"node_modules/ajv/dist/vocabularies/validation/required.js"(exports) {
|
|
4908
4908
|
"use strict";
|
|
4909
|
-
Object.defineProperty(
|
|
4909
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4910
4910
|
var code_1 = require_code2();
|
|
4911
4911
|
var codegen_1 = require_codegen();
|
|
4912
4912
|
var util_1 = require_util();
|
|
@@ -4980,15 +4980,15 @@ var require_required = __commonJS({
|
|
|
4980
4980
|
}
|
|
4981
4981
|
}
|
|
4982
4982
|
};
|
|
4983
|
-
|
|
4983
|
+
exports.default = def;
|
|
4984
4984
|
}
|
|
4985
4985
|
});
|
|
4986
4986
|
|
|
4987
4987
|
// node_modules/ajv/dist/vocabularies/validation/limitItems.js
|
|
4988
4988
|
var require_limitItems = __commonJS({
|
|
4989
|
-
"node_modules/ajv/dist/vocabularies/validation/limitItems.js"(
|
|
4989
|
+
"node_modules/ajv/dist/vocabularies/validation/limitItems.js"(exports) {
|
|
4990
4990
|
"use strict";
|
|
4991
|
-
Object.defineProperty(
|
|
4991
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4992
4992
|
var codegen_1 = require_codegen();
|
|
4993
4993
|
var error2 = {
|
|
4994
4994
|
message({ keyword, schemaCode }) {
|
|
@@ -5009,26 +5009,26 @@ var require_limitItems = __commonJS({
|
|
|
5009
5009
|
cxt.fail$data((0, codegen_1._)`${data}.length ${op} ${schemaCode}`);
|
|
5010
5010
|
}
|
|
5011
5011
|
};
|
|
5012
|
-
|
|
5012
|
+
exports.default = def;
|
|
5013
5013
|
}
|
|
5014
5014
|
});
|
|
5015
5015
|
|
|
5016
5016
|
// node_modules/ajv/dist/runtime/equal.js
|
|
5017
5017
|
var require_equal = __commonJS({
|
|
5018
|
-
"node_modules/ajv/dist/runtime/equal.js"(
|
|
5018
|
+
"node_modules/ajv/dist/runtime/equal.js"(exports) {
|
|
5019
5019
|
"use strict";
|
|
5020
|
-
Object.defineProperty(
|
|
5020
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5021
5021
|
var equal = require_fast_deep_equal();
|
|
5022
5022
|
equal.code = 'require("ajv/dist/runtime/equal").default';
|
|
5023
|
-
|
|
5023
|
+
exports.default = equal;
|
|
5024
5024
|
}
|
|
5025
5025
|
});
|
|
5026
5026
|
|
|
5027
5027
|
// node_modules/ajv/dist/vocabularies/validation/uniqueItems.js
|
|
5028
5028
|
var require_uniqueItems = __commonJS({
|
|
5029
|
-
"node_modules/ajv/dist/vocabularies/validation/uniqueItems.js"(
|
|
5029
|
+
"node_modules/ajv/dist/vocabularies/validation/uniqueItems.js"(exports) {
|
|
5030
5030
|
"use strict";
|
|
5031
|
-
Object.defineProperty(
|
|
5031
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5032
5032
|
var dataType_1 = require_dataType();
|
|
5033
5033
|
var codegen_1 = require_codegen();
|
|
5034
5034
|
var util_1 = require_util();
|
|
@@ -5087,15 +5087,15 @@ var require_uniqueItems = __commonJS({
|
|
|
5087
5087
|
}
|
|
5088
5088
|
}
|
|
5089
5089
|
};
|
|
5090
|
-
|
|
5090
|
+
exports.default = def;
|
|
5091
5091
|
}
|
|
5092
5092
|
});
|
|
5093
5093
|
|
|
5094
5094
|
// node_modules/ajv/dist/vocabularies/validation/const.js
|
|
5095
5095
|
var require_const = __commonJS({
|
|
5096
|
-
"node_modules/ajv/dist/vocabularies/validation/const.js"(
|
|
5096
|
+
"node_modules/ajv/dist/vocabularies/validation/const.js"(exports) {
|
|
5097
5097
|
"use strict";
|
|
5098
|
-
Object.defineProperty(
|
|
5098
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5099
5099
|
var codegen_1 = require_codegen();
|
|
5100
5100
|
var util_1 = require_util();
|
|
5101
5101
|
var equal_1 = require_equal();
|
|
@@ -5116,15 +5116,15 @@ var require_const = __commonJS({
|
|
|
5116
5116
|
}
|
|
5117
5117
|
}
|
|
5118
5118
|
};
|
|
5119
|
-
|
|
5119
|
+
exports.default = def;
|
|
5120
5120
|
}
|
|
5121
5121
|
});
|
|
5122
5122
|
|
|
5123
5123
|
// node_modules/ajv/dist/vocabularies/validation/enum.js
|
|
5124
5124
|
var require_enum = __commonJS({
|
|
5125
|
-
"node_modules/ajv/dist/vocabularies/validation/enum.js"(
|
|
5125
|
+
"node_modules/ajv/dist/vocabularies/validation/enum.js"(exports) {
|
|
5126
5126
|
"use strict";
|
|
5127
|
-
Object.defineProperty(
|
|
5127
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5128
5128
|
var codegen_1 = require_codegen();
|
|
5129
5129
|
var util_1 = require_util();
|
|
5130
5130
|
var equal_1 = require_equal();
|
|
@@ -5165,15 +5165,15 @@ var require_enum = __commonJS({
|
|
|
5165
5165
|
}
|
|
5166
5166
|
}
|
|
5167
5167
|
};
|
|
5168
|
-
|
|
5168
|
+
exports.default = def;
|
|
5169
5169
|
}
|
|
5170
5170
|
});
|
|
5171
5171
|
|
|
5172
5172
|
// node_modules/ajv/dist/vocabularies/validation/index.js
|
|
5173
5173
|
var require_validation = __commonJS({
|
|
5174
|
-
"node_modules/ajv/dist/vocabularies/validation/index.js"(
|
|
5174
|
+
"node_modules/ajv/dist/vocabularies/validation/index.js"(exports) {
|
|
5175
5175
|
"use strict";
|
|
5176
|
-
Object.defineProperty(
|
|
5176
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5177
5177
|
var limitNumber_1 = require_limitNumber();
|
|
5178
5178
|
var multipleOf_1 = require_multipleOf();
|
|
5179
5179
|
var limitLength_1 = require_limitLength();
|
|
@@ -5203,16 +5203,16 @@ var require_validation = __commonJS({
|
|
|
5203
5203
|
const_1.default,
|
|
5204
5204
|
enum_1.default
|
|
5205
5205
|
];
|
|
5206
|
-
|
|
5206
|
+
exports.default = validation;
|
|
5207
5207
|
}
|
|
5208
5208
|
});
|
|
5209
5209
|
|
|
5210
5210
|
// node_modules/ajv/dist/vocabularies/applicator/additionalItems.js
|
|
5211
5211
|
var require_additionalItems = __commonJS({
|
|
5212
|
-
"node_modules/ajv/dist/vocabularies/applicator/additionalItems.js"(
|
|
5212
|
+
"node_modules/ajv/dist/vocabularies/applicator/additionalItems.js"(exports) {
|
|
5213
5213
|
"use strict";
|
|
5214
|
-
Object.defineProperty(
|
|
5215
|
-
|
|
5214
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5215
|
+
exports.validateAdditionalItems = void 0;
|
|
5216
5216
|
var codegen_1 = require_codegen();
|
|
5217
5217
|
var util_1 = require_util();
|
|
5218
5218
|
var error2 = {
|
|
@@ -5255,17 +5255,17 @@ var require_additionalItems = __commonJS({
|
|
|
5255
5255
|
});
|
|
5256
5256
|
}
|
|
5257
5257
|
}
|
|
5258
|
-
|
|
5259
|
-
|
|
5258
|
+
exports.validateAdditionalItems = validateAdditionalItems;
|
|
5259
|
+
exports.default = def;
|
|
5260
5260
|
}
|
|
5261
5261
|
});
|
|
5262
5262
|
|
|
5263
5263
|
// node_modules/ajv/dist/vocabularies/applicator/items.js
|
|
5264
5264
|
var require_items = __commonJS({
|
|
5265
|
-
"node_modules/ajv/dist/vocabularies/applicator/items.js"(
|
|
5265
|
+
"node_modules/ajv/dist/vocabularies/applicator/items.js"(exports) {
|
|
5266
5266
|
"use strict";
|
|
5267
|
-
Object.defineProperty(
|
|
5268
|
-
|
|
5267
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5268
|
+
exports.validateTuple = void 0;
|
|
5269
5269
|
var codegen_1 = require_codegen();
|
|
5270
5270
|
var util_1 = require_util();
|
|
5271
5271
|
var code_1 = require_code2();
|
|
@@ -5312,16 +5312,16 @@ var require_items = __commonJS({
|
|
|
5312
5312
|
}
|
|
5313
5313
|
}
|
|
5314
5314
|
}
|
|
5315
|
-
|
|
5316
|
-
|
|
5315
|
+
exports.validateTuple = validateTuple;
|
|
5316
|
+
exports.default = def;
|
|
5317
5317
|
}
|
|
5318
5318
|
});
|
|
5319
5319
|
|
|
5320
5320
|
// node_modules/ajv/dist/vocabularies/applicator/prefixItems.js
|
|
5321
5321
|
var require_prefixItems = __commonJS({
|
|
5322
|
-
"node_modules/ajv/dist/vocabularies/applicator/prefixItems.js"(
|
|
5322
|
+
"node_modules/ajv/dist/vocabularies/applicator/prefixItems.js"(exports) {
|
|
5323
5323
|
"use strict";
|
|
5324
|
-
Object.defineProperty(
|
|
5324
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5325
5325
|
var items_1 = require_items();
|
|
5326
5326
|
var def = {
|
|
5327
5327
|
keyword: "prefixItems",
|
|
@@ -5330,15 +5330,15 @@ var require_prefixItems = __commonJS({
|
|
|
5330
5330
|
before: "uniqueItems",
|
|
5331
5331
|
code: (cxt) => (0, items_1.validateTuple)(cxt, "items")
|
|
5332
5332
|
};
|
|
5333
|
-
|
|
5333
|
+
exports.default = def;
|
|
5334
5334
|
}
|
|
5335
5335
|
});
|
|
5336
5336
|
|
|
5337
5337
|
// node_modules/ajv/dist/vocabularies/applicator/items2020.js
|
|
5338
5338
|
var require_items2020 = __commonJS({
|
|
5339
|
-
"node_modules/ajv/dist/vocabularies/applicator/items2020.js"(
|
|
5339
|
+
"node_modules/ajv/dist/vocabularies/applicator/items2020.js"(exports) {
|
|
5340
5340
|
"use strict";
|
|
5341
|
-
Object.defineProperty(
|
|
5341
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5342
5342
|
var codegen_1 = require_codegen();
|
|
5343
5343
|
var util_1 = require_util();
|
|
5344
5344
|
var code_1 = require_code2();
|
|
@@ -5365,15 +5365,15 @@ var require_items2020 = __commonJS({
|
|
|
5365
5365
|
cxt.ok((0, code_1.validateArray)(cxt));
|
|
5366
5366
|
}
|
|
5367
5367
|
};
|
|
5368
|
-
|
|
5368
|
+
exports.default = def;
|
|
5369
5369
|
}
|
|
5370
5370
|
});
|
|
5371
5371
|
|
|
5372
5372
|
// node_modules/ajv/dist/vocabularies/applicator/contains.js
|
|
5373
5373
|
var require_contains = __commonJS({
|
|
5374
|
-
"node_modules/ajv/dist/vocabularies/applicator/contains.js"(
|
|
5374
|
+
"node_modules/ajv/dist/vocabularies/applicator/contains.js"(exports) {
|
|
5375
5375
|
"use strict";
|
|
5376
|
-
Object.defineProperty(
|
|
5376
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5377
5377
|
var codegen_1 = require_codegen();
|
|
5378
5378
|
var util_1 = require_util();
|
|
5379
5379
|
var error2 = {
|
|
@@ -5459,20 +5459,20 @@ var require_contains = __commonJS({
|
|
|
5459
5459
|
}
|
|
5460
5460
|
}
|
|
5461
5461
|
};
|
|
5462
|
-
|
|
5462
|
+
exports.default = def;
|
|
5463
5463
|
}
|
|
5464
5464
|
});
|
|
5465
5465
|
|
|
5466
5466
|
// node_modules/ajv/dist/vocabularies/applicator/dependencies.js
|
|
5467
5467
|
var require_dependencies = __commonJS({
|
|
5468
|
-
"node_modules/ajv/dist/vocabularies/applicator/dependencies.js"(
|
|
5468
|
+
"node_modules/ajv/dist/vocabularies/applicator/dependencies.js"(exports) {
|
|
5469
5469
|
"use strict";
|
|
5470
|
-
Object.defineProperty(
|
|
5471
|
-
|
|
5470
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5471
|
+
exports.validateSchemaDeps = exports.validatePropertyDeps = exports.error = void 0;
|
|
5472
5472
|
var codegen_1 = require_codegen();
|
|
5473
5473
|
var util_1 = require_util();
|
|
5474
5474
|
var code_1 = require_code2();
|
|
5475
|
-
|
|
5475
|
+
exports.error = {
|
|
5476
5476
|
message: ({ params: { property, depsCount, deps } }) => {
|
|
5477
5477
|
const property_ies = depsCount === 1 ? "property" : "properties";
|
|
5478
5478
|
return (0, codegen_1.str)`must have ${property_ies} ${deps} when property ${property} is present`;
|
|
@@ -5487,7 +5487,7 @@ var require_dependencies = __commonJS({
|
|
|
5487
5487
|
keyword: "dependencies",
|
|
5488
5488
|
type: "object",
|
|
5489
5489
|
schemaType: "object",
|
|
5490
|
-
error:
|
|
5490
|
+
error: exports.error,
|
|
5491
5491
|
code(cxt) {
|
|
5492
5492
|
const [propDeps, schDeps] = splitDependencies(cxt);
|
|
5493
5493
|
validatePropertyDeps(cxt, propDeps);
|
|
@@ -5533,7 +5533,7 @@ var require_dependencies = __commonJS({
|
|
|
5533
5533
|
}
|
|
5534
5534
|
}
|
|
5535
5535
|
}
|
|
5536
|
-
|
|
5536
|
+
exports.validatePropertyDeps = validatePropertyDeps;
|
|
5537
5537
|
function validateSchemaDeps(cxt, schemaDeps = cxt.schema) {
|
|
5538
5538
|
const { gen, data, keyword, it } = cxt;
|
|
5539
5539
|
const valid = gen.name("valid");
|
|
@@ -5552,16 +5552,16 @@ var require_dependencies = __commonJS({
|
|
|
5552
5552
|
cxt.ok(valid);
|
|
5553
5553
|
}
|
|
5554
5554
|
}
|
|
5555
|
-
|
|
5556
|
-
|
|
5555
|
+
exports.validateSchemaDeps = validateSchemaDeps;
|
|
5556
|
+
exports.default = def;
|
|
5557
5557
|
}
|
|
5558
5558
|
});
|
|
5559
5559
|
|
|
5560
5560
|
// node_modules/ajv/dist/vocabularies/applicator/propertyNames.js
|
|
5561
5561
|
var require_propertyNames = __commonJS({
|
|
5562
|
-
"node_modules/ajv/dist/vocabularies/applicator/propertyNames.js"(
|
|
5562
|
+
"node_modules/ajv/dist/vocabularies/applicator/propertyNames.js"(exports) {
|
|
5563
5563
|
"use strict";
|
|
5564
|
-
Object.defineProperty(
|
|
5564
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5565
5565
|
var codegen_1 = require_codegen();
|
|
5566
5566
|
var util_1 = require_util();
|
|
5567
5567
|
var error2 = {
|
|
@@ -5596,15 +5596,15 @@ var require_propertyNames = __commonJS({
|
|
|
5596
5596
|
cxt.ok(valid);
|
|
5597
5597
|
}
|
|
5598
5598
|
};
|
|
5599
|
-
|
|
5599
|
+
exports.default = def;
|
|
5600
5600
|
}
|
|
5601
5601
|
});
|
|
5602
5602
|
|
|
5603
5603
|
// node_modules/ajv/dist/vocabularies/applicator/additionalProperties.js
|
|
5604
5604
|
var require_additionalProperties = __commonJS({
|
|
5605
|
-
"node_modules/ajv/dist/vocabularies/applicator/additionalProperties.js"(
|
|
5605
|
+
"node_modules/ajv/dist/vocabularies/applicator/additionalProperties.js"(exports) {
|
|
5606
5606
|
"use strict";
|
|
5607
|
-
Object.defineProperty(
|
|
5607
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5608
5608
|
var code_1 = require_code2();
|
|
5609
5609
|
var codegen_1 = require_codegen();
|
|
5610
5610
|
var names_1 = require_names();
|
|
@@ -5702,15 +5702,15 @@ var require_additionalProperties = __commonJS({
|
|
|
5702
5702
|
}
|
|
5703
5703
|
}
|
|
5704
5704
|
};
|
|
5705
|
-
|
|
5705
|
+
exports.default = def;
|
|
5706
5706
|
}
|
|
5707
5707
|
});
|
|
5708
5708
|
|
|
5709
5709
|
// node_modules/ajv/dist/vocabularies/applicator/properties.js
|
|
5710
5710
|
var require_properties = __commonJS({
|
|
5711
|
-
"node_modules/ajv/dist/vocabularies/applicator/properties.js"(
|
|
5711
|
+
"node_modules/ajv/dist/vocabularies/applicator/properties.js"(exports) {
|
|
5712
5712
|
"use strict";
|
|
5713
|
-
Object.defineProperty(
|
|
5713
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5714
5714
|
var validate_1 = require_validate();
|
|
5715
5715
|
var code_1 = require_code2();
|
|
5716
5716
|
var util_1 = require_util();
|
|
@@ -5760,15 +5760,15 @@ var require_properties = __commonJS({
|
|
|
5760
5760
|
}
|
|
5761
5761
|
}
|
|
5762
5762
|
};
|
|
5763
|
-
|
|
5763
|
+
exports.default = def;
|
|
5764
5764
|
}
|
|
5765
5765
|
});
|
|
5766
5766
|
|
|
5767
5767
|
// node_modules/ajv/dist/vocabularies/applicator/patternProperties.js
|
|
5768
5768
|
var require_patternProperties = __commonJS({
|
|
5769
|
-
"node_modules/ajv/dist/vocabularies/applicator/patternProperties.js"(
|
|
5769
|
+
"node_modules/ajv/dist/vocabularies/applicator/patternProperties.js"(exports) {
|
|
5770
5770
|
"use strict";
|
|
5771
|
-
Object.defineProperty(
|
|
5771
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5772
5772
|
var code_1 = require_code2();
|
|
5773
5773
|
var codegen_1 = require_codegen();
|
|
5774
5774
|
var util_1 = require_util();
|
|
@@ -5834,15 +5834,15 @@ var require_patternProperties = __commonJS({
|
|
|
5834
5834
|
}
|
|
5835
5835
|
}
|
|
5836
5836
|
};
|
|
5837
|
-
|
|
5837
|
+
exports.default = def;
|
|
5838
5838
|
}
|
|
5839
5839
|
});
|
|
5840
5840
|
|
|
5841
5841
|
// node_modules/ajv/dist/vocabularies/applicator/not.js
|
|
5842
5842
|
var require_not = __commonJS({
|
|
5843
|
-
"node_modules/ajv/dist/vocabularies/applicator/not.js"(
|
|
5843
|
+
"node_modules/ajv/dist/vocabularies/applicator/not.js"(exports) {
|
|
5844
5844
|
"use strict";
|
|
5845
|
-
Object.defineProperty(
|
|
5845
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5846
5846
|
var util_1 = require_util();
|
|
5847
5847
|
var def = {
|
|
5848
5848
|
keyword: "not",
|
|
@@ -5865,15 +5865,15 @@ var require_not = __commonJS({
|
|
|
5865
5865
|
},
|
|
5866
5866
|
error: { message: "must NOT be valid" }
|
|
5867
5867
|
};
|
|
5868
|
-
|
|
5868
|
+
exports.default = def;
|
|
5869
5869
|
}
|
|
5870
5870
|
});
|
|
5871
5871
|
|
|
5872
5872
|
// node_modules/ajv/dist/vocabularies/applicator/anyOf.js
|
|
5873
5873
|
var require_anyOf = __commonJS({
|
|
5874
|
-
"node_modules/ajv/dist/vocabularies/applicator/anyOf.js"(
|
|
5874
|
+
"node_modules/ajv/dist/vocabularies/applicator/anyOf.js"(exports) {
|
|
5875
5875
|
"use strict";
|
|
5876
|
-
Object.defineProperty(
|
|
5876
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5877
5877
|
var code_1 = require_code2();
|
|
5878
5878
|
var def = {
|
|
5879
5879
|
keyword: "anyOf",
|
|
@@ -5882,15 +5882,15 @@ var require_anyOf = __commonJS({
|
|
|
5882
5882
|
code: code_1.validateUnion,
|
|
5883
5883
|
error: { message: "must match a schema in anyOf" }
|
|
5884
5884
|
};
|
|
5885
|
-
|
|
5885
|
+
exports.default = def;
|
|
5886
5886
|
}
|
|
5887
5887
|
});
|
|
5888
5888
|
|
|
5889
5889
|
// node_modules/ajv/dist/vocabularies/applicator/oneOf.js
|
|
5890
5890
|
var require_oneOf = __commonJS({
|
|
5891
|
-
"node_modules/ajv/dist/vocabularies/applicator/oneOf.js"(
|
|
5891
|
+
"node_modules/ajv/dist/vocabularies/applicator/oneOf.js"(exports) {
|
|
5892
5892
|
"use strict";
|
|
5893
|
-
Object.defineProperty(
|
|
5893
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5894
5894
|
var codegen_1 = require_codegen();
|
|
5895
5895
|
var util_1 = require_util();
|
|
5896
5896
|
var error2 = {
|
|
@@ -5940,15 +5940,15 @@ var require_oneOf = __commonJS({
|
|
|
5940
5940
|
}
|
|
5941
5941
|
}
|
|
5942
5942
|
};
|
|
5943
|
-
|
|
5943
|
+
exports.default = def;
|
|
5944
5944
|
}
|
|
5945
5945
|
});
|
|
5946
5946
|
|
|
5947
5947
|
// node_modules/ajv/dist/vocabularies/applicator/allOf.js
|
|
5948
5948
|
var require_allOf = __commonJS({
|
|
5949
|
-
"node_modules/ajv/dist/vocabularies/applicator/allOf.js"(
|
|
5949
|
+
"node_modules/ajv/dist/vocabularies/applicator/allOf.js"(exports) {
|
|
5950
5950
|
"use strict";
|
|
5951
|
-
Object.defineProperty(
|
|
5951
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5952
5952
|
var util_1 = require_util();
|
|
5953
5953
|
var def = {
|
|
5954
5954
|
keyword: "allOf",
|
|
@@ -5967,15 +5967,15 @@ var require_allOf = __commonJS({
|
|
|
5967
5967
|
});
|
|
5968
5968
|
}
|
|
5969
5969
|
};
|
|
5970
|
-
|
|
5970
|
+
exports.default = def;
|
|
5971
5971
|
}
|
|
5972
5972
|
});
|
|
5973
5973
|
|
|
5974
5974
|
// node_modules/ajv/dist/vocabularies/applicator/if.js
|
|
5975
5975
|
var require_if = __commonJS({
|
|
5976
|
-
"node_modules/ajv/dist/vocabularies/applicator/if.js"(
|
|
5976
|
+
"node_modules/ajv/dist/vocabularies/applicator/if.js"(exports) {
|
|
5977
5977
|
"use strict";
|
|
5978
|
-
Object.defineProperty(
|
|
5978
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5979
5979
|
var codegen_1 = require_codegen();
|
|
5980
5980
|
var util_1 = require_util();
|
|
5981
5981
|
var error2 = {
|
|
@@ -6036,15 +6036,15 @@ var require_if = __commonJS({
|
|
|
6036
6036
|
const schema = it.schema[keyword];
|
|
6037
6037
|
return schema !== void 0 && !(0, util_1.alwaysValidSchema)(it, schema);
|
|
6038
6038
|
}
|
|
6039
|
-
|
|
6039
|
+
exports.default = def;
|
|
6040
6040
|
}
|
|
6041
6041
|
});
|
|
6042
6042
|
|
|
6043
6043
|
// node_modules/ajv/dist/vocabularies/applicator/thenElse.js
|
|
6044
6044
|
var require_thenElse = __commonJS({
|
|
6045
|
-
"node_modules/ajv/dist/vocabularies/applicator/thenElse.js"(
|
|
6045
|
+
"node_modules/ajv/dist/vocabularies/applicator/thenElse.js"(exports) {
|
|
6046
6046
|
"use strict";
|
|
6047
|
-
Object.defineProperty(
|
|
6047
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6048
6048
|
var util_1 = require_util();
|
|
6049
6049
|
var def = {
|
|
6050
6050
|
keyword: ["then", "else"],
|
|
@@ -6054,15 +6054,15 @@ var require_thenElse = __commonJS({
|
|
|
6054
6054
|
(0, util_1.checkStrictMode)(it, `"${keyword}" without "if" is ignored`);
|
|
6055
6055
|
}
|
|
6056
6056
|
};
|
|
6057
|
-
|
|
6057
|
+
exports.default = def;
|
|
6058
6058
|
}
|
|
6059
6059
|
});
|
|
6060
6060
|
|
|
6061
6061
|
// node_modules/ajv/dist/vocabularies/applicator/index.js
|
|
6062
6062
|
var require_applicator = __commonJS({
|
|
6063
|
-
"node_modules/ajv/dist/vocabularies/applicator/index.js"(
|
|
6063
|
+
"node_modules/ajv/dist/vocabularies/applicator/index.js"(exports) {
|
|
6064
6064
|
"use strict";
|
|
6065
|
-
Object.defineProperty(
|
|
6065
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6066
6066
|
var additionalItems_1 = require_additionalItems();
|
|
6067
6067
|
var prefixItems_1 = require_prefixItems();
|
|
6068
6068
|
var items_1 = require_items();
|
|
@@ -6102,15 +6102,15 @@ var require_applicator = __commonJS({
|
|
|
6102
6102
|
applicator.push(contains_1.default);
|
|
6103
6103
|
return applicator;
|
|
6104
6104
|
}
|
|
6105
|
-
|
|
6105
|
+
exports.default = getApplicator;
|
|
6106
6106
|
}
|
|
6107
6107
|
});
|
|
6108
6108
|
|
|
6109
6109
|
// node_modules/ajv/dist/vocabularies/format/format.js
|
|
6110
6110
|
var require_format = __commonJS({
|
|
6111
|
-
"node_modules/ajv/dist/vocabularies/format/format.js"(
|
|
6111
|
+
"node_modules/ajv/dist/vocabularies/format/format.js"(exports) {
|
|
6112
6112
|
"use strict";
|
|
6113
|
-
Object.defineProperty(
|
|
6113
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6114
6114
|
var codegen_1 = require_codegen();
|
|
6115
6115
|
var error2 = {
|
|
6116
6116
|
message: ({ schemaCode }) => (0, codegen_1.str)`must match format "${schemaCode}"`,
|
|
@@ -6192,28 +6192,28 @@ var require_format = __commonJS({
|
|
|
6192
6192
|
}
|
|
6193
6193
|
}
|
|
6194
6194
|
};
|
|
6195
|
-
|
|
6195
|
+
exports.default = def;
|
|
6196
6196
|
}
|
|
6197
6197
|
});
|
|
6198
6198
|
|
|
6199
6199
|
// node_modules/ajv/dist/vocabularies/format/index.js
|
|
6200
6200
|
var require_format2 = __commonJS({
|
|
6201
|
-
"node_modules/ajv/dist/vocabularies/format/index.js"(
|
|
6201
|
+
"node_modules/ajv/dist/vocabularies/format/index.js"(exports) {
|
|
6202
6202
|
"use strict";
|
|
6203
|
-
Object.defineProperty(
|
|
6203
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6204
6204
|
var format_1 = require_format();
|
|
6205
6205
|
var format = [format_1.default];
|
|
6206
|
-
|
|
6206
|
+
exports.default = format;
|
|
6207
6207
|
}
|
|
6208
6208
|
});
|
|
6209
6209
|
|
|
6210
6210
|
// node_modules/ajv/dist/vocabularies/metadata.js
|
|
6211
6211
|
var require_metadata = __commonJS({
|
|
6212
|
-
"node_modules/ajv/dist/vocabularies/metadata.js"(
|
|
6212
|
+
"node_modules/ajv/dist/vocabularies/metadata.js"(exports) {
|
|
6213
6213
|
"use strict";
|
|
6214
|
-
Object.defineProperty(
|
|
6215
|
-
|
|
6216
|
-
|
|
6214
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6215
|
+
exports.contentVocabulary = exports.metadataVocabulary = void 0;
|
|
6216
|
+
exports.metadataVocabulary = [
|
|
6217
6217
|
"title",
|
|
6218
6218
|
"description",
|
|
6219
6219
|
"default",
|
|
@@ -6222,7 +6222,7 @@ var require_metadata = __commonJS({
|
|
|
6222
6222
|
"writeOnly",
|
|
6223
6223
|
"examples"
|
|
6224
6224
|
];
|
|
6225
|
-
|
|
6225
|
+
exports.contentVocabulary = [
|
|
6226
6226
|
"contentMediaType",
|
|
6227
6227
|
"contentEncoding",
|
|
6228
6228
|
"contentSchema"
|
|
@@ -6232,9 +6232,9 @@ var require_metadata = __commonJS({
|
|
|
6232
6232
|
|
|
6233
6233
|
// node_modules/ajv/dist/vocabularies/draft7.js
|
|
6234
6234
|
var require_draft7 = __commonJS({
|
|
6235
|
-
"node_modules/ajv/dist/vocabularies/draft7.js"(
|
|
6235
|
+
"node_modules/ajv/dist/vocabularies/draft7.js"(exports) {
|
|
6236
6236
|
"use strict";
|
|
6237
|
-
Object.defineProperty(
|
|
6237
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6238
6238
|
var core_1 = require_core2();
|
|
6239
6239
|
var validation_1 = require_validation();
|
|
6240
6240
|
var applicator_1 = require_applicator();
|
|
@@ -6248,29 +6248,29 @@ var require_draft7 = __commonJS({
|
|
|
6248
6248
|
metadata_1.metadataVocabulary,
|
|
6249
6249
|
metadata_1.contentVocabulary
|
|
6250
6250
|
];
|
|
6251
|
-
|
|
6251
|
+
exports.default = draft7Vocabularies;
|
|
6252
6252
|
}
|
|
6253
6253
|
});
|
|
6254
6254
|
|
|
6255
6255
|
// node_modules/ajv/dist/vocabularies/discriminator/types.js
|
|
6256
6256
|
var require_types = __commonJS({
|
|
6257
|
-
"node_modules/ajv/dist/vocabularies/discriminator/types.js"(
|
|
6257
|
+
"node_modules/ajv/dist/vocabularies/discriminator/types.js"(exports) {
|
|
6258
6258
|
"use strict";
|
|
6259
|
-
Object.defineProperty(
|
|
6260
|
-
|
|
6259
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6260
|
+
exports.DiscrError = void 0;
|
|
6261
6261
|
var DiscrError;
|
|
6262
6262
|
(function(DiscrError2) {
|
|
6263
6263
|
DiscrError2["Tag"] = "tag";
|
|
6264
6264
|
DiscrError2["Mapping"] = "mapping";
|
|
6265
|
-
})(DiscrError || (
|
|
6265
|
+
})(DiscrError || (exports.DiscrError = DiscrError = {}));
|
|
6266
6266
|
}
|
|
6267
6267
|
});
|
|
6268
6268
|
|
|
6269
6269
|
// node_modules/ajv/dist/vocabularies/discriminator/index.js
|
|
6270
6270
|
var require_discriminator = __commonJS({
|
|
6271
|
-
"node_modules/ajv/dist/vocabularies/discriminator/index.js"(
|
|
6271
|
+
"node_modules/ajv/dist/vocabularies/discriminator/index.js"(exports) {
|
|
6272
6272
|
"use strict";
|
|
6273
|
-
Object.defineProperty(
|
|
6273
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6274
6274
|
var codegen_1 = require_codegen();
|
|
6275
6275
|
var types_1 = require_types();
|
|
6276
6276
|
var compile_1 = require_compile();
|
|
@@ -6367,14 +6367,14 @@ var require_discriminator = __commonJS({
|
|
|
6367
6367
|
}
|
|
6368
6368
|
}
|
|
6369
6369
|
};
|
|
6370
|
-
|
|
6370
|
+
exports.default = def;
|
|
6371
6371
|
}
|
|
6372
6372
|
});
|
|
6373
6373
|
|
|
6374
6374
|
// node_modules/ajv/dist/refs/json-schema-draft-07.json
|
|
6375
6375
|
var require_json_schema_draft_07 = __commonJS({
|
|
6376
|
-
"node_modules/ajv/dist/refs/json-schema-draft-07.json"(
|
|
6377
|
-
|
|
6376
|
+
"node_modules/ajv/dist/refs/json-schema-draft-07.json"(exports, module) {
|
|
6377
|
+
module.exports = {
|
|
6378
6378
|
$schema: "http://json-schema.org/draft-07/schema#",
|
|
6379
6379
|
$id: "http://json-schema.org/draft-07/schema#",
|
|
6380
6380
|
title: "Core schema meta-schema",
|
|
@@ -6530,10 +6530,10 @@ var require_json_schema_draft_07 = __commonJS({
|
|
|
6530
6530
|
|
|
6531
6531
|
// node_modules/ajv/dist/ajv.js
|
|
6532
6532
|
var require_ajv = __commonJS({
|
|
6533
|
-
"node_modules/ajv/dist/ajv.js"(
|
|
6533
|
+
"node_modules/ajv/dist/ajv.js"(exports, module) {
|
|
6534
6534
|
"use strict";
|
|
6535
|
-
Object.defineProperty(
|
|
6536
|
-
|
|
6535
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6536
|
+
exports.MissingRefError = exports.ValidationError = exports.CodeGen = exports.Name = exports.nil = exports.stringify = exports.str = exports._ = exports.KeywordCxt = exports.Ajv = void 0;
|
|
6537
6537
|
var core_1 = require_core();
|
|
6538
6538
|
var draft7_1 = require_draft7();
|
|
6539
6539
|
var discriminator_1 = require_discriminator();
|
|
@@ -6559,40 +6559,40 @@ var require_ajv = __commonJS({
|
|
|
6559
6559
|
return this.opts.defaultMeta = super.defaultMeta() || (this.getSchema(META_SCHEMA_ID) ? META_SCHEMA_ID : void 0);
|
|
6560
6560
|
}
|
|
6561
6561
|
};
|
|
6562
|
-
|
|
6563
|
-
|
|
6564
|
-
|
|
6565
|
-
Object.defineProperty(
|
|
6566
|
-
|
|
6562
|
+
exports.Ajv = Ajv2;
|
|
6563
|
+
module.exports = exports = Ajv2;
|
|
6564
|
+
module.exports.Ajv = Ajv2;
|
|
6565
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6566
|
+
exports.default = Ajv2;
|
|
6567
6567
|
var validate_1 = require_validate();
|
|
6568
|
-
Object.defineProperty(
|
|
6568
|
+
Object.defineProperty(exports, "KeywordCxt", { enumerable: true, get: function() {
|
|
6569
6569
|
return validate_1.KeywordCxt;
|
|
6570
6570
|
} });
|
|
6571
6571
|
var codegen_1 = require_codegen();
|
|
6572
|
-
Object.defineProperty(
|
|
6572
|
+
Object.defineProperty(exports, "_", { enumerable: true, get: function() {
|
|
6573
6573
|
return codegen_1._;
|
|
6574
6574
|
} });
|
|
6575
|
-
Object.defineProperty(
|
|
6575
|
+
Object.defineProperty(exports, "str", { enumerable: true, get: function() {
|
|
6576
6576
|
return codegen_1.str;
|
|
6577
6577
|
} });
|
|
6578
|
-
Object.defineProperty(
|
|
6578
|
+
Object.defineProperty(exports, "stringify", { enumerable: true, get: function() {
|
|
6579
6579
|
return codegen_1.stringify;
|
|
6580
6580
|
} });
|
|
6581
|
-
Object.defineProperty(
|
|
6581
|
+
Object.defineProperty(exports, "nil", { enumerable: true, get: function() {
|
|
6582
6582
|
return codegen_1.nil;
|
|
6583
6583
|
} });
|
|
6584
|
-
Object.defineProperty(
|
|
6584
|
+
Object.defineProperty(exports, "Name", { enumerable: true, get: function() {
|
|
6585
6585
|
return codegen_1.Name;
|
|
6586
6586
|
} });
|
|
6587
|
-
Object.defineProperty(
|
|
6587
|
+
Object.defineProperty(exports, "CodeGen", { enumerable: true, get: function() {
|
|
6588
6588
|
return codegen_1.CodeGen;
|
|
6589
6589
|
} });
|
|
6590
6590
|
var validation_error_1 = require_validation_error();
|
|
6591
|
-
Object.defineProperty(
|
|
6591
|
+
Object.defineProperty(exports, "ValidationError", { enumerable: true, get: function() {
|
|
6592
6592
|
return validation_error_1.default;
|
|
6593
6593
|
} });
|
|
6594
6594
|
var ref_error_1 = require_ref_error();
|
|
6595
|
-
Object.defineProperty(
|
|
6595
|
+
Object.defineProperty(exports, "MissingRefError", { enumerable: true, get: function() {
|
|
6596
6596
|
return ref_error_1.default;
|
|
6597
6597
|
} });
|
|
6598
6598
|
}
|
|
@@ -6600,14 +6600,14 @@ var require_ajv = __commonJS({
|
|
|
6600
6600
|
|
|
6601
6601
|
// node_modules/ajv-formats/dist/formats.js
|
|
6602
6602
|
var require_formats = __commonJS({
|
|
6603
|
-
"node_modules/ajv-formats/dist/formats.js"(
|
|
6603
|
+
"node_modules/ajv-formats/dist/formats.js"(exports) {
|
|
6604
6604
|
"use strict";
|
|
6605
|
-
Object.defineProperty(
|
|
6606
|
-
|
|
6605
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6606
|
+
exports.formatNames = exports.fastFormats = exports.fullFormats = void 0;
|
|
6607
6607
|
function fmtDef(validate, compare) {
|
|
6608
6608
|
return { validate, compare };
|
|
6609
6609
|
}
|
|
6610
|
-
|
|
6610
|
+
exports.fullFormats = {
|
|
6611
6611
|
// date: http://tools.ietf.org/html/rfc3339#section-5.6
|
|
6612
6612
|
date: fmtDef(date3, compareDate),
|
|
6613
6613
|
// date-time: http://tools.ietf.org/html/rfc3339#section-5.6
|
|
@@ -6654,8 +6654,8 @@ var require_formats = __commonJS({
|
|
|
6654
6654
|
// unchecked string payload
|
|
6655
6655
|
binary: true
|
|
6656
6656
|
};
|
|
6657
|
-
|
|
6658
|
-
...
|
|
6657
|
+
exports.fastFormats = {
|
|
6658
|
+
...exports.fullFormats,
|
|
6659
6659
|
date: fmtDef(/^\d\d\d\d-[0-1]\d-[0-3]\d$/, compareDate),
|
|
6660
6660
|
time: fmtDef(/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i, compareTime),
|
|
6661
6661
|
"date-time": fmtDef(/^\d\d\d\d-[0-1]\d-[0-3]\dt(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i, compareDateTime),
|
|
@@ -6669,7 +6669,7 @@ var require_formats = __commonJS({
|
|
|
6669
6669
|
// http://www.w3.org/TR/html5/forms.html#valid-e-mail-address (search for 'wilful violation')
|
|
6670
6670
|
email: /^[a-z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?)*$/i
|
|
6671
6671
|
};
|
|
6672
|
-
|
|
6672
|
+
exports.formatNames = Object.keys(exports.fullFormats);
|
|
6673
6673
|
function isLeapYear(year) {
|
|
6674
6674
|
return year % 4 === 0 && (year % 100 !== 0 || year % 400 === 0);
|
|
6675
6675
|
}
|
|
@@ -6803,10 +6803,10 @@ var require_formats = __commonJS({
|
|
|
6803
6803
|
|
|
6804
6804
|
// node_modules/ajv-formats/dist/limit.js
|
|
6805
6805
|
var require_limit = __commonJS({
|
|
6806
|
-
"node_modules/ajv-formats/dist/limit.js"(
|
|
6806
|
+
"node_modules/ajv-formats/dist/limit.js"(exports) {
|
|
6807
6807
|
"use strict";
|
|
6808
|
-
Object.defineProperty(
|
|
6809
|
-
|
|
6808
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6809
|
+
exports.formatLimitDefinition = void 0;
|
|
6810
6810
|
var ajv_1 = require_ajv();
|
|
6811
6811
|
var codegen_1 = require_codegen();
|
|
6812
6812
|
var ops = codegen_1.operators;
|
|
@@ -6820,7 +6820,7 @@ var require_limit = __commonJS({
|
|
|
6820
6820
|
message: ({ keyword, schemaCode }) => (0, codegen_1.str)`should be ${KWDs[keyword].okStr} ${schemaCode}`,
|
|
6821
6821
|
params: ({ keyword, schemaCode }) => (0, codegen_1._)`{comparison: ${KWDs[keyword].okStr}, limit: ${schemaCode}}`
|
|
6822
6822
|
};
|
|
6823
|
-
|
|
6823
|
+
exports.formatLimitDefinition = {
|
|
6824
6824
|
keyword: Object.keys(KWDs),
|
|
6825
6825
|
type: "string",
|
|
6826
6826
|
schemaType: "string",
|
|
@@ -6866,18 +6866,18 @@ var require_limit = __commonJS({
|
|
|
6866
6866
|
dependencies: ["format"]
|
|
6867
6867
|
};
|
|
6868
6868
|
var formatLimitPlugin = (ajv) => {
|
|
6869
|
-
ajv.addKeyword(
|
|
6869
|
+
ajv.addKeyword(exports.formatLimitDefinition);
|
|
6870
6870
|
return ajv;
|
|
6871
6871
|
};
|
|
6872
|
-
|
|
6872
|
+
exports.default = formatLimitPlugin;
|
|
6873
6873
|
}
|
|
6874
6874
|
});
|
|
6875
6875
|
|
|
6876
6876
|
// node_modules/ajv-formats/dist/index.js
|
|
6877
6877
|
var require_dist = __commonJS({
|
|
6878
|
-
"node_modules/ajv-formats/dist/index.js"(
|
|
6878
|
+
"node_modules/ajv-formats/dist/index.js"(exports, module) {
|
|
6879
6879
|
"use strict";
|
|
6880
|
-
Object.defineProperty(
|
|
6880
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6881
6881
|
var formats_1 = require_formats();
|
|
6882
6882
|
var limit_1 = require_limit();
|
|
6883
6883
|
var codegen_1 = require_codegen();
|
|
@@ -6909,9 +6909,9 @@ var require_dist = __commonJS({
|
|
|
6909
6909
|
for (const f of list)
|
|
6910
6910
|
ajv.addFormat(f, fs4[f]);
|
|
6911
6911
|
}
|
|
6912
|
-
|
|
6913
|
-
Object.defineProperty(
|
|
6914
|
-
|
|
6912
|
+
module.exports = exports = formatsPlugin;
|
|
6913
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6914
|
+
exports.default = formatsPlugin;
|
|
6915
6915
|
}
|
|
6916
6916
|
});
|
|
6917
6917
|
|
|
@@ -7024,22 +7024,22 @@ if (!Promise.allSettled) {
|
|
|
7024
7024
|
}
|
|
7025
7025
|
|
|
7026
7026
|
// bridge.js
|
|
7027
|
-
|
|
7028
|
-
|
|
7029
|
-
|
|
7030
|
-
|
|
7031
|
-
|
|
7027
|
+
import http from "http";
|
|
7028
|
+
import https from "https";
|
|
7029
|
+
import fsSync2 from "fs";
|
|
7030
|
+
import path2 from "path";
|
|
7031
|
+
import util2 from "util";
|
|
7032
7032
|
|
|
7033
7033
|
// scanner.js
|
|
7034
|
-
|
|
7035
|
-
|
|
7036
|
-
|
|
7037
|
-
var fs =
|
|
7038
|
-
readdir:
|
|
7039
|
-
readFile:
|
|
7040
|
-
writeFile:
|
|
7041
|
-
mkdir:
|
|
7042
|
-
stat:
|
|
7034
|
+
import fsSync from "fs";
|
|
7035
|
+
import path from "path";
|
|
7036
|
+
import util from "util";
|
|
7037
|
+
var fs = fsSync.promises || {
|
|
7038
|
+
readdir: util.promisify(fsSync.readdir),
|
|
7039
|
+
readFile: util.promisify(fsSync.readFile),
|
|
7040
|
+
writeFile: util.promisify(fsSync.writeFile),
|
|
7041
|
+
mkdir: util.promisify(fsSync.mkdir),
|
|
7042
|
+
stat: util.promisify(fsSync.stat)
|
|
7043
7043
|
};
|
|
7044
7044
|
var IGNORED_DIRS = /* @__PURE__ */ new Set([
|
|
7045
7045
|
"node_modules",
|
|
@@ -7066,8 +7066,8 @@ async function walkDir(dir, baseDir, maxDepth = 6, currentDepth = 0) {
|
|
|
7066
7066
|
const rawEntries = await fs.readdir(dir);
|
|
7067
7067
|
for (const rawEntry of rawEntries) {
|
|
7068
7068
|
const entryName = typeof rawEntry === "string" ? rawEntry : rawEntry.name;
|
|
7069
|
-
const fullPath =
|
|
7070
|
-
const relativePath =
|
|
7069
|
+
const fullPath = path.join(dir, entryName);
|
|
7070
|
+
const relativePath = path.relative(baseDir, fullPath);
|
|
7071
7071
|
let isDir = false;
|
|
7072
7072
|
let isFile = false;
|
|
7073
7073
|
if (typeof rawEntry === "object" && rawEntry.isDirectory && rawEntry.isFile) {
|
|
@@ -7075,7 +7075,7 @@ async function walkDir(dir, baseDir, maxDepth = 6, currentDepth = 0) {
|
|
|
7075
7075
|
isFile = rawEntry.isFile();
|
|
7076
7076
|
} else {
|
|
7077
7077
|
try {
|
|
7078
|
-
const st =
|
|
7078
|
+
const st = fsSync.statSync(fullPath);
|
|
7079
7079
|
isDir = st.isDirectory();
|
|
7080
7080
|
isFile = st.isFile();
|
|
7081
7081
|
} catch {
|
|
@@ -7087,7 +7087,7 @@ async function walkDir(dir, baseDir, maxDepth = 6, currentDepth = 0) {
|
|
|
7087
7087
|
results = results.concat(sub);
|
|
7088
7088
|
}
|
|
7089
7089
|
} else if (isFile) {
|
|
7090
|
-
const ext =
|
|
7090
|
+
const ext = path.extname(entryName).toLowerCase();
|
|
7091
7091
|
if ([
|
|
7092
7092
|
".js",
|
|
7093
7093
|
".jsx",
|
|
@@ -7128,7 +7128,7 @@ async function walkDir(dir, baseDir, maxDepth = 6, currentDepth = 0) {
|
|
|
7128
7128
|
relative: relativePath,
|
|
7129
7129
|
name: entryName,
|
|
7130
7130
|
ext,
|
|
7131
|
-
dir:
|
|
7131
|
+
dir: path.relative(baseDir, dir)
|
|
7132
7132
|
});
|
|
7133
7133
|
}
|
|
7134
7134
|
}
|
|
@@ -7151,6 +7151,12 @@ function parsePackageJson(content) {
|
|
|
7151
7151
|
}
|
|
7152
7152
|
}
|
|
7153
7153
|
function detectVerifiedFramework(manifests, allFiles, extensionHistogram) {
|
|
7154
|
+
if (!allFiles || allFiles.length === 0) {
|
|
7155
|
+
return {
|
|
7156
|
+
framework: "plain_html_css_js",
|
|
7157
|
+
displayName: "Plain HTML / CSS / JS (Fresh Workspace)"
|
|
7158
|
+
};
|
|
7159
|
+
}
|
|
7154
7160
|
const hasHbsFiles = (extensionHistogram[".hbs"] || 0) > 0 || (extensionHistogram[".handlebars"] || 0) > 0;
|
|
7155
7161
|
const hasBrightspotConfigs = allFiles.some(
|
|
7156
7162
|
(f) => f.name === "louhi.json" || f.name === "_fields.config.json" || f.name === "_data.json" || f.name === "brightspot.json" || f.name.includes("_config.json") || f.relative.includes("styleguide/") || f.relative.includes("brightspot")
|
|
@@ -7216,7 +7222,7 @@ async function extractDesignTokens(projectRoot, allFiles) {
|
|
|
7216
7222
|
const tailwindConfigFile = allFiles.find((f) => f.name.startsWith("tailwind.config"));
|
|
7217
7223
|
if (tailwindConfigFile) {
|
|
7218
7224
|
try {
|
|
7219
|
-
const fullP =
|
|
7225
|
+
const fullP = path.join(projectRoot, tailwindConfigFile.relative);
|
|
7220
7226
|
const content = await fs.readFile(fullP, "utf8");
|
|
7221
7227
|
tokens.tailwindTheme = content.slice(0, 1e3);
|
|
7222
7228
|
} catch {
|
|
@@ -7227,7 +7233,7 @@ async function extractDesignTokens(projectRoot, allFiles) {
|
|
|
7227
7233
|
).slice(0, 8);
|
|
7228
7234
|
for (const sf of styleFiles) {
|
|
7229
7235
|
try {
|
|
7230
|
-
const fullP =
|
|
7236
|
+
const fullP = path.join(projectRoot, sf.relative);
|
|
7231
7237
|
const content = await fs.readFile(fullP, "utf8");
|
|
7232
7238
|
const varMatches = content.matchAll(/(--[\w-]+)\s*:\s*([^;]+);/g);
|
|
7233
7239
|
for (const m of varMatches) {
|
|
@@ -7306,7 +7312,7 @@ async function extractDesignSystemAndMixins(projectRoot, allFiles, manifests) {
|
|
|
7306
7312
|
).slice(0, 25);
|
|
7307
7313
|
for (const f of styleAndTemplateFiles) {
|
|
7308
7314
|
try {
|
|
7309
|
-
const fullP =
|
|
7315
|
+
const fullP = path.join(projectRoot, f.relative);
|
|
7310
7316
|
const content = await fs.readFile(fullP, "utf8");
|
|
7311
7317
|
if (content.includes("glue-") || content.includes("@include glue-") || content.includes('@import "glue') || content.includes("@import 'glue")) {
|
|
7312
7318
|
hasGlueClasses = true;
|
|
@@ -7344,7 +7350,7 @@ async function extractDesignSystemAndMixins(projectRoot, allFiles, manifests) {
|
|
|
7344
7350
|
const scssFiles = allFiles.filter((f) => f.ext === ".scss").slice(0, 35);
|
|
7345
7351
|
for (const sf of scssFiles) {
|
|
7346
7352
|
try {
|
|
7347
|
-
const fullP =
|
|
7353
|
+
const fullP = path.join(projectRoot, sf.relative);
|
|
7348
7354
|
const content = await fs.readFile(fullP, "utf8");
|
|
7349
7355
|
const mixinMatches = content.matchAll(/@mixin\s+([a-zA-Z0-9_-]+)\s*(\([^)]*\))?/g);
|
|
7350
7356
|
for (const m of mixinMatches) {
|
|
@@ -7371,13 +7377,13 @@ async function extractComponentSignatures(projectRoot, allFiles) {
|
|
|
7371
7377
|
const catalog = [];
|
|
7372
7378
|
const candidateExtensions = [".hbs", ".tsx", ".jsx", ".vue", ".svelte", ".vm", ".ftl", ".html"];
|
|
7373
7379
|
const componentCandidates = allFiles.filter((file) => {
|
|
7374
|
-
const baseName =
|
|
7380
|
+
const baseName = path.basename(file.name, file.ext);
|
|
7375
7381
|
return candidateExtensions.includes(file.ext) && !baseName.startsWith("_") && !baseName.includes(".test") && !baseName.includes(".spec") && !baseName.includes(".story") && !["index", "main", "app", "layout"].includes(baseName.toLowerCase());
|
|
7376
7382
|
}).slice(0, 45);
|
|
7377
7383
|
for (const file of componentCandidates) {
|
|
7378
|
-
const baseName =
|
|
7384
|
+
const baseName = path.basename(file.name, file.ext);
|
|
7379
7385
|
try {
|
|
7380
|
-
const fullP =
|
|
7386
|
+
const fullP = path.join(projectRoot, file.relative);
|
|
7381
7387
|
const rawCode = await fs.readFile(fullP, "utf8");
|
|
7382
7388
|
let propsSnippet = "";
|
|
7383
7389
|
const interfaceMatch = rawCode.match(/(?:interface|type)\s+[\w]+\s*=?\s*\{[\s\S]*?\}/);
|
|
@@ -7472,8 +7478,8 @@ function rankComponentsByRelevance(components = [], prompt = "") {
|
|
|
7472
7478
|
return scored.slice(0, 15).map((item) => item.comp);
|
|
7473
7479
|
}
|
|
7474
7480
|
async function scanCodebase(targetDir = process.cwd(), promptQuery = "") {
|
|
7475
|
-
const projectRoot =
|
|
7476
|
-
const projectName =
|
|
7481
|
+
const projectRoot = path.resolve(targetDir);
|
|
7482
|
+
const projectName = path.basename(projectRoot) || "local-project";
|
|
7477
7483
|
const allFiles = await walkDir(projectRoot, projectRoot, 6, 0);
|
|
7478
7484
|
const discoveredFiles = allFiles.map((f) => f.relative);
|
|
7479
7485
|
const extensionHistogram = {};
|
|
@@ -7504,7 +7510,7 @@ async function scanCodebase(targetDir = process.cwd(), promptQuery = "") {
|
|
|
7504
7510
|
const match = allFiles.find((f) => f.name === mf);
|
|
7505
7511
|
if (match) {
|
|
7506
7512
|
try {
|
|
7507
|
-
const fullP =
|
|
7513
|
+
const fullP = path.join(projectRoot, match.relative);
|
|
7508
7514
|
const content = await fs.readFile(fullP, "utf8");
|
|
7509
7515
|
manifestsFound[mf] = content.slice(0, 1500);
|
|
7510
7516
|
} catch (e) {
|
|
@@ -7516,7 +7522,7 @@ async function scanCodebase(targetDir = process.cwd(), promptQuery = "") {
|
|
|
7516
7522
|
const sampleFiles = allFiles.filter((f) => candidateSampleExtensions.includes(f.ext) && !f.name.startsWith("_") && !f.name.includes(".test.")).slice(0, 4);
|
|
7517
7523
|
for (const sf of sampleFiles) {
|
|
7518
7524
|
try {
|
|
7519
|
-
const fullP =
|
|
7525
|
+
const fullP = path.join(projectRoot, sf.relative);
|
|
7520
7526
|
const rawCode = await fs.readFile(fullP, "utf8");
|
|
7521
7527
|
const lines = rawCode.split("\n").slice(0, 50).join("\n");
|
|
7522
7528
|
codeSamples.push({
|
|
@@ -7564,23 +7570,32 @@ async function scanCodebase(targetDir = process.cwd(), promptQuery = "") {
|
|
|
7564
7570
|
}
|
|
7565
7571
|
|
|
7566
7572
|
// bridge.js
|
|
7567
|
-
var fs2 =
|
|
7568
|
-
readdir:
|
|
7569
|
-
readFile:
|
|
7570
|
-
writeFile:
|
|
7571
|
-
mkdir:
|
|
7572
|
-
stat:
|
|
7573
|
+
var fs2 = fsSync2.promises || {
|
|
7574
|
+
readdir: util2.promisify(fsSync2.readdir),
|
|
7575
|
+
readFile: util2.promisify(fsSync2.readFile),
|
|
7576
|
+
writeFile: util2.promisify(fsSync2.writeFile),
|
|
7577
|
+
mkdir: util2.promisify(fsSync2.mkdir),
|
|
7578
|
+
stat: util2.promisify(fsSync2.stat)
|
|
7573
7579
|
};
|
|
7574
7580
|
var PORT = Number(process.env.YAP2APP_PORT) || 10420;
|
|
7575
7581
|
var PROJECT_ROOT = process.cwd();
|
|
7576
7582
|
var CLOUD_RELAY_URL = process.env.YAP2APP_CLOUD_URL || "https://yap2app-dot-cybage-hackathon.uc.r.appspot.com";
|
|
7577
7583
|
var PAIR_CODE = (process.env.YAP2APP_PAIR_CODE || "CYB-" + Math.floor(100 + Math.random() * 900)).toUpperCase();
|
|
7584
|
+
function safeResolvePath(baseDir, relativePath) {
|
|
7585
|
+
const cleanRel = (relativePath || "").replace(/^[\\\/]+/, "");
|
|
7586
|
+
const resolved = path2.resolve(baseDir, cleanRel);
|
|
7587
|
+
const normalizedBase = path2.resolve(baseDir);
|
|
7588
|
+
if (!resolved.startsWith(normalizedBase + path2.sep) && resolved !== normalizedBase) {
|
|
7589
|
+
throw new Error(`Security Exception: Path traversal attempt blocked for path: "${relativePath}"`);
|
|
7590
|
+
}
|
|
7591
|
+
return resolved;
|
|
7592
|
+
}
|
|
7578
7593
|
function sendCloudRelayRequest(method, endpoint, payload) {
|
|
7579
7594
|
return new Promise((resolve) => {
|
|
7580
7595
|
try {
|
|
7581
7596
|
const url = new URL(`${CLOUD_RELAY_URL}${endpoint}`);
|
|
7582
7597
|
const body = payload ? JSON.stringify(payload) : "";
|
|
7583
|
-
const req =
|
|
7598
|
+
const req = https.request({
|
|
7584
7599
|
hostname: url.hostname,
|
|
7585
7600
|
port: 443,
|
|
7586
7601
|
path: url.pathname + url.search,
|
|
@@ -7662,7 +7677,7 @@ function computeDiff(originalText, newText) {
|
|
|
7662
7677
|
}
|
|
7663
7678
|
return { additions, deletions, diffLines, isNew: false };
|
|
7664
7679
|
}
|
|
7665
|
-
var server =
|
|
7680
|
+
var server = http.createServer(async (req, res) => {
|
|
7666
7681
|
const headers = getCorsHeaders(req);
|
|
7667
7682
|
if (req.method === "OPTIONS") {
|
|
7668
7683
|
res.writeHead(204, headers);
|
|
@@ -7687,7 +7702,7 @@ var server = import_http.default.createServer(async (req, res) => {
|
|
|
7687
7702
|
port: PORT,
|
|
7688
7703
|
pair_code: PAIR_CODE,
|
|
7689
7704
|
project_root: PROJECT_ROOT,
|
|
7690
|
-
project_name:
|
|
7705
|
+
project_name: path2.basename(PROJECT_ROOT),
|
|
7691
7706
|
ready: true
|
|
7692
7707
|
}));
|
|
7693
7708
|
return;
|
|
@@ -7695,7 +7710,6 @@ var server = import_http.default.createServer(async (req, res) => {
|
|
|
7695
7710
|
if (req.method === "GET" && (pathname === "/api/context" || pathname === "/context")) {
|
|
7696
7711
|
try {
|
|
7697
7712
|
const promptQuery = searchParams.get("q") || "";
|
|
7698
|
-
console.log(` [bridge] Scanning codebase in ${import_path2.default.basename(PROJECT_ROOT)}${promptQuery ? ` (query: "${promptQuery}")` : ""}`);
|
|
7699
7713
|
const context = await scanCodebase(PROJECT_ROOT, promptQuery);
|
|
7700
7714
|
res.writeHead(200, headers);
|
|
7701
7715
|
res.end(JSON.stringify(context));
|
|
@@ -7715,9 +7729,9 @@ var server = import_http.default.createServer(async (req, res) => {
|
|
|
7715
7729
|
const files = data.files || [];
|
|
7716
7730
|
const diffResults = [];
|
|
7717
7731
|
for (const file of files) {
|
|
7718
|
-
const fullPath =
|
|
7732
|
+
const fullPath = path2.join(PROJECT_ROOT, file.path);
|
|
7719
7733
|
let originalContent = null;
|
|
7720
|
-
if (
|
|
7734
|
+
if (fsSync2.existsSync(fullPath)) {
|
|
7721
7735
|
originalContent = await fs2.readFile(fullPath, "utf8");
|
|
7722
7736
|
}
|
|
7723
7737
|
const diff = computeDiff(originalContent, file.content);
|
|
@@ -7755,8 +7769,8 @@ var server = import_http.default.createServer(async (req, res) => {
|
|
|
7755
7769
|
const files = data.files || [];
|
|
7756
7770
|
const written = [];
|
|
7757
7771
|
for (const file of files) {
|
|
7758
|
-
const fullPath =
|
|
7759
|
-
await fs2.mkdir(
|
|
7772
|
+
const fullPath = safeResolvePath(PROJECT_ROOT, file.path);
|
|
7773
|
+
await fs2.mkdir(path2.dirname(fullPath), { recursive: true });
|
|
7760
7774
|
await fs2.writeFile(fullPath, file.content, "utf8");
|
|
7761
7775
|
console.log(` [bridge] Wrote ${file.path}`);
|
|
7762
7776
|
written.push(file.path);
|
|
@@ -7767,7 +7781,7 @@ var server = import_http.default.createServer(async (req, res) => {
|
|
|
7767
7781
|
written_count: written.length,
|
|
7768
7782
|
written,
|
|
7769
7783
|
project_root: PROJECT_ROOT,
|
|
7770
|
-
message: `Successfully wrote ${written.length} files to ${
|
|
7784
|
+
message: `Successfully wrote ${written.length} files to ${path2.basename(PROJECT_ROOT)}`
|
|
7771
7785
|
}));
|
|
7772
7786
|
} catch (e) {
|
|
7773
7787
|
console.error(" [bridge] Write error:", e.message);
|
|
@@ -7783,12 +7797,17 @@ var server = import_http.default.createServer(async (req, res) => {
|
|
|
7783
7797
|
server.on("error", (err) => {
|
|
7784
7798
|
if (err && err.code === "EADDRINUSE") {
|
|
7785
7799
|
console.log(`
|
|
7786
|
-
|
|
7800
|
+
---------------------------------------------------------------`);
|
|
7801
|
+
console.log(`Yap2App Bridge`);
|
|
7802
|
+
console.log(`Port ${PORT} is active. Cloud Relay connected.`);
|
|
7803
|
+
console.log(`Active Workspace: ${PROJECT_ROOT}`);
|
|
7804
|
+
console.log(`Pairing Code: ${PAIR_CODE}`);
|
|
7805
|
+
console.log(`Web Studio: ${CLOUD_RELAY_URL}`);
|
|
7806
|
+
console.log(`---------------------------------------------------------------
|
|
7787
7807
|
`);
|
|
7788
|
-
console.log(`
|
|
7789
|
-
console.log(`
|
|
7790
|
-
console.log(`
|
|
7791
|
-
console.log(` Web Studio: ${CLOUD_RELAY_URL}
|
|
7808
|
+
console.log(`Bridge is running.`);
|
|
7809
|
+
console.log(`Open Web Studio in your browser to sync components to this workspace.`);
|
|
7810
|
+
console.log(`Press Ctrl/Cmd+C to stop.
|
|
7792
7811
|
`);
|
|
7793
7812
|
return;
|
|
7794
7813
|
}
|
|
@@ -7797,21 +7816,29 @@ server.on("error", (err) => {
|
|
|
7797
7816
|
async function startBridge(port = PORT) {
|
|
7798
7817
|
server.listen(port, "0.0.0.0", () => {
|
|
7799
7818
|
console.log(`
|
|
7800
|
-
|
|
7819
|
+
---------------------------------------------------------------`);
|
|
7820
|
+
console.log(`Yap2App Bridge v1.1.6`);
|
|
7821
|
+
console.log(`Local Endpoint: http://127.0.0.1:${port}`);
|
|
7822
|
+
console.log(`Active Workspace: ${PROJECT_ROOT}`);
|
|
7823
|
+
console.log(`Pairing Code: ${PAIR_CODE}`);
|
|
7824
|
+
console.log(`Web Studio: ${CLOUD_RELAY_URL}`);
|
|
7825
|
+
console.log(`---------------------------------------------------------------
|
|
7801
7826
|
`);
|
|
7802
|
-
console.log(`
|
|
7803
|
-
console.log(`
|
|
7804
|
-
console.log(`
|
|
7805
|
-
console.log(` Web Studio: ${CLOUD_RELAY_URL}
|
|
7806
|
-
`);
|
|
7807
|
-
console.log(` Ready for sync.
|
|
7827
|
+
console.log(`Bridge is running.`);
|
|
7828
|
+
console.log(`Open Web Studio in your browser to sync components to this workspace.`);
|
|
7829
|
+
console.log(`Press Ctrl/Cmd+C to stop.
|
|
7808
7830
|
`);
|
|
7809
7831
|
});
|
|
7810
7832
|
try {
|
|
7811
7833
|
const initialContext = await scanCodebase(PROJECT_ROOT);
|
|
7834
|
+
if (initialContext && initialContext.total_files_count === 0) {
|
|
7835
|
+
console.log(` \u2139\uFE0F Fresh workspace detected (0 code files).`);
|
|
7836
|
+
console.log(` Yap2App will automatically scaffold directories and write files when synced from Web Studio.
|
|
7837
|
+
`);
|
|
7838
|
+
}
|
|
7812
7839
|
await sendCloudRelayRequest("POST", "/api/v1/bridge/heartbeat", {
|
|
7813
7840
|
pair_code: PAIR_CODE,
|
|
7814
|
-
project_name:
|
|
7841
|
+
project_name: path2.basename(PROJECT_ROOT),
|
|
7815
7842
|
project_root: PROJECT_ROOT,
|
|
7816
7843
|
framework: initialContext.framework,
|
|
7817
7844
|
context: initialContext,
|
|
@@ -7824,7 +7851,7 @@ async function startBridge(port = PORT) {
|
|
|
7824
7851
|
const context = await scanCodebase(PROJECT_ROOT);
|
|
7825
7852
|
const hbResult = await sendCloudRelayRequest("POST", "/api/v1/bridge/heartbeat", {
|
|
7826
7853
|
pair_code: PAIR_CODE,
|
|
7827
|
-
project_name:
|
|
7854
|
+
project_name: path2.basename(PROJECT_ROOT),
|
|
7828
7855
|
project_root: PROJECT_ROOT,
|
|
7829
7856
|
framework: context.framework,
|
|
7830
7857
|
context,
|
|
@@ -7836,8 +7863,8 @@ async function startBridge(port = PORT) {
|
|
|
7836
7863
|
for (const task of tasks) {
|
|
7837
7864
|
const written = [];
|
|
7838
7865
|
for (const file of task.files || []) {
|
|
7839
|
-
const fullPath =
|
|
7840
|
-
await fs2.mkdir(
|
|
7866
|
+
const fullPath = safeResolvePath(PROJECT_ROOT, file.path);
|
|
7867
|
+
await fs2.mkdir(path2.dirname(fullPath), { recursive: true });
|
|
7841
7868
|
await fs2.writeFile(fullPath, file.content, "utf8");
|
|
7842
7869
|
console.log(` [bridge] Wrote ${file.path}`);
|
|
7843
7870
|
written.push(file.path);
|
|
@@ -7846,7 +7873,7 @@ async function startBridge(port = PORT) {
|
|
|
7846
7873
|
task_id: task.task_id,
|
|
7847
7874
|
success: true,
|
|
7848
7875
|
written,
|
|
7849
|
-
message: `Wrote ${written.length} file(s) directly to ${
|
|
7876
|
+
message: `Wrote ${written.length} file(s) directly to ${path2.basename(PROJECT_ROOT)}`
|
|
7850
7877
|
});
|
|
7851
7878
|
}
|
|
7852
7879
|
}
|
|
@@ -16319,7 +16346,7 @@ var Server = class extends Protocol {
|
|
|
16319
16346
|
};
|
|
16320
16347
|
|
|
16321
16348
|
// node_modules/@modelcontextprotocol/sdk/dist/esm/server/stdio.js
|
|
16322
|
-
|
|
16349
|
+
import process3 from "node:process";
|
|
16323
16350
|
|
|
16324
16351
|
// node_modules/@modelcontextprotocol/sdk/dist/esm/shared/stdio.js
|
|
16325
16352
|
var STDIO_DEFAULT_MAX_BUFFER_SIZE = 10 * 1024 * 1024;
|
|
@@ -16360,7 +16387,7 @@ function serializeMessage(message) {
|
|
|
16360
16387
|
|
|
16361
16388
|
// node_modules/@modelcontextprotocol/sdk/dist/esm/server/stdio.js
|
|
16362
16389
|
var StdioServerTransport = class {
|
|
16363
|
-
constructor(_stdin =
|
|
16390
|
+
constructor(_stdin = process3.stdin, _stdout = process3.stdout, options) {
|
|
16364
16391
|
this._stdin = _stdin;
|
|
16365
16392
|
this._stdout = _stdout;
|
|
16366
16393
|
this._started = false;
|
|
@@ -16426,8 +16453,8 @@ var StdioServerTransport = class {
|
|
|
16426
16453
|
};
|
|
16427
16454
|
|
|
16428
16455
|
// mcp.js
|
|
16429
|
-
|
|
16430
|
-
|
|
16456
|
+
import fs3 from "fs";
|
|
16457
|
+
import path3 from "path";
|
|
16431
16458
|
var server2 = new Server({
|
|
16432
16459
|
name: "yap2app-mcp",
|
|
16433
16460
|
version: "1.0.0"
|
|
@@ -16461,19 +16488,6 @@ server2.setRequestHandler(ListToolsRequestSchema, async () => {
|
|
|
16461
16488
|
required: ["componentName"]
|
|
16462
16489
|
}
|
|
16463
16490
|
},
|
|
16464
|
-
{
|
|
16465
|
-
name: "yap2app_mount_snippet",
|
|
16466
|
-
description: "Generates the parent import statement and JSX mounting code snippet for integrating a new component into an existing page or parent component.",
|
|
16467
|
-
inputSchema: {
|
|
16468
|
-
type: "object",
|
|
16469
|
-
properties: {
|
|
16470
|
-
componentName: { type: "string", description: "The component name" },
|
|
16471
|
-
filePath: { type: "string", description: "The component's relative file path" },
|
|
16472
|
-
parentFile: { type: "string", description: "Optional parent file (e.g. 'src/App.tsx' or 'src/app/page.tsx')" }
|
|
16473
|
-
},
|
|
16474
|
-
required: ["componentName", "filePath"]
|
|
16475
|
-
}
|
|
16476
|
-
},
|
|
16477
16491
|
{
|
|
16478
16492
|
name: "yap2app_write_component",
|
|
16479
16493
|
description: "Safely writes a React/Tailwind component to the local filesystem, ensuring directories exist.",
|
|
@@ -16512,38 +16526,24 @@ server2.setRequestHandler(CallToolRequestSchema, async (request) => {
|
|
|
16512
16526
|
else if (granularity === "molecule") subfolder = "components/molecules";
|
|
16513
16527
|
else if (granularity === "feature") subfolder = `features/${componentName.toLowerCase()}`;
|
|
16514
16528
|
else if (granularity === "page") subfolder = "app";
|
|
16515
|
-
const hasSrc =
|
|
16529
|
+
const hasSrc = fs3.existsSync(path3.join(TARGET_DIR, "src"));
|
|
16516
16530
|
const relativePath = hasSrc ? `src/${subfolder}/${componentName}.tsx` : `${subfolder}/${componentName}.tsx`;
|
|
16517
16531
|
const importPath = `@/${subfolder}/${componentName}`;
|
|
16518
16532
|
const suggestion = {
|
|
16519
16533
|
component_name: componentName,
|
|
16520
16534
|
target_file_path: relativePath,
|
|
16521
|
-
import_statement: `import { ${componentName} } from "${importPath}";`,
|
|
16522
16535
|
usage_example: `<${componentName} />`
|
|
16523
16536
|
};
|
|
16524
16537
|
return {
|
|
16525
16538
|
content: [{ type: "text", text: JSON.stringify(suggestion, null, 2) }]
|
|
16526
16539
|
};
|
|
16527
16540
|
}
|
|
16528
|
-
if (name === "yap2app_mount_snippet") {
|
|
16529
|
-
const { componentName, filePath, parentFile } = args;
|
|
16530
|
-
const cleanImport = filePath.replace(/\.[^/.]+$/, "").replace(/^src\//, "@/");
|
|
16531
|
-
const snippet = {
|
|
16532
|
-
target_parent_file: parentFile || "src/App.tsx (or src/app/page.tsx)",
|
|
16533
|
-
import_line: `import { ${componentName} } from "${cleanImport}";`,
|
|
16534
|
-
jsx_insertion: `{/* Render ${componentName} */}
|
|
16535
|
-
<${componentName} />`
|
|
16536
|
-
};
|
|
16537
|
-
return {
|
|
16538
|
-
content: [{ type: "text", text: JSON.stringify(snippet, null, 2) }]
|
|
16539
|
-
};
|
|
16540
|
-
}
|
|
16541
16541
|
if (name === "yap2app_write_component") {
|
|
16542
16542
|
const { filePath, code } = args;
|
|
16543
|
-
const fullPath =
|
|
16543
|
+
const fullPath = path3.join(TARGET_DIR, filePath);
|
|
16544
16544
|
try {
|
|
16545
|
-
|
|
16546
|
-
|
|
16545
|
+
fs3.mkdirSync(path3.dirname(fullPath), { recursive: true });
|
|
16546
|
+
fs3.writeFileSync(fullPath, code, "utf8");
|
|
16547
16547
|
return {
|
|
16548
16548
|
content: [{ type: "text", text: `\u2705 Successfully wrote component to ${filePath}` }]
|
|
16549
16549
|
};
|
|
@@ -16585,6 +16585,24 @@ Yap2App Codebase Context:
|
|
|
16585
16585
|
console.log(` Files: ${context.discovered_files?.length || 0}`);
|
|
16586
16586
|
console.log(` Components: ${(context.component_names || []).join(", ") || "None"}
|
|
16587
16587
|
`);
|
|
16588
|
+
} else if (command === "init" || command === "install") {
|
|
16589
|
+
const context = await scanCodebase(process.cwd());
|
|
16590
|
+
console.log(`
|
|
16591
|
+
\u26A1 Yap2App Workspace Initializer:`);
|
|
16592
|
+
console.log(` Directory: ${context.project_root}`);
|
|
16593
|
+
console.log(` Framework: ${context.framework_display_name || "Plain HTML / CSS / JS (Fresh Workspace)"}`);
|
|
16594
|
+
console.log(` Files Found: ${context.total_files_count}`);
|
|
16595
|
+
if (context.total_files_count === 0) {
|
|
16596
|
+
console.log(`
|
|
16597
|
+
\u2139\uFE0F Fresh / empty directory detected.`);
|
|
16598
|
+
console.log(` Starting Local Bridge. Generate and sync components from Web Studio to scaffold files directly here.
|
|
16599
|
+
`);
|
|
16600
|
+
} else {
|
|
16601
|
+
console.log(`
|
|
16602
|
+
Existing codebase indexed with ${context.total_files_count} files.
|
|
16603
|
+
`);
|
|
16604
|
+
}
|
|
16605
|
+
startBridge();
|
|
16588
16606
|
} else if (command === "start" || command === "bridge" || command === "server") {
|
|
16589
16607
|
startBridge();
|
|
16590
16608
|
} else if (command === "help" || command === "--help" || command === "-h") {
|
|
@@ -16596,7 +16614,8 @@ Usage:
|
|
|
16596
16614
|
|
|
16597
16615
|
Commands:
|
|
16598
16616
|
start, bridge Start local bridge for Web Studio sync (default)
|
|
16599
|
-
|
|
16617
|
+
init, install Initialize and link fresh/existing folder with Web Studio
|
|
16618
|
+
mcp Run MCP server over stdio for Cursor / Claude Desktop
|
|
16600
16619
|
scan Scan codebase context and detected components
|
|
16601
16620
|
help Show this help message
|
|
16602
16621
|
`);
|