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