@kubohiroya/turbowarp-extension-data-editor 0.2.0 → 0.2.2
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/README.md +9 -6
- package/dist/build-info.json +3 -3
- package/dist/fixed-input-branches.d.ts +12 -0
- package/dist/fixed-input-branches.js +180 -0
- package/dist/fixed-input-editor.d.ts +39 -0
- package/dist/fixed-input-editor.js +538 -0
- package/dist/fixed-input-schema.d.ts +15 -0
- package/dist/fixed-input-schema.js +21 -0
- package/dist/fixed-input-snapshot.d.ts +7 -0
- package/dist/fixed-input-snapshot.js +180 -0
- package/dist/fixed-input-types.d.ts +138 -0
- package/dist/fixed-input-types.js +23 -0
- package/dist/fixed-input-view.d.ts +14 -0
- package/dist/fixed-input-view.js +168 -0
- package/dist/index.d.ts +6 -0
- package/dist/index.js +4 -0
- package/dist/react.css +168 -0
- package/dist/react.d.ts +8 -0
- package/dist/react.js +19 -2
- package/dist/registry.d.ts +4 -0
- package/dist/registry.js +45 -7
- package/dist/rjsf-templates.d.ts +11 -0
- package/dist/rjsf-templates.js +129 -0
- package/dist/rjsf.d.ts +24 -1
- package/dist/rjsf.js +35 -3
- package/dist/schema.d.ts +2 -0
- package/dist/schema.js +1 -0
- package/dist/session.d.ts +3 -1
- package/dist/session.js +205 -7
- package/dist/turbowarp/bridge.d.ts +2 -1
- package/dist/turbowarp/bridge.js +37 -5
- package/dist/turbowarp/fixed-fields.d.ts +82 -0
- package/dist/turbowarp/fixed-fields.js +311 -0
- package/dist/turbowarp/fixed-transaction.d.ts +18 -0
- package/dist/turbowarp/fixed-transaction.js +460 -0
- package/dist/turbowarp/host.d.ts +3 -8
- package/dist/turbowarp/host.js +68 -1
- package/dist/turbowarp.d.ts +4 -0
- package/dist/turbowarp.js +1 -1
- package/dist/types.d.ts +5 -0
- package/dist/view.js +4 -0
- package/dist/webpack4/index.js +22 -5
- package/dist/webpack4/metafile.json +592 -299
- package/dist/webpack4/react.js +20 -6
- package/dist/webpack4/react.js.map +2 -2
- package/dist/webpack4/rjsf.js +450 -60
- package/dist/webpack4/rjsf.js.map +4 -4
- package/dist/webpack4/schema.js +6 -3
- package/dist/webpack4/{shared-KQOUMWJ4.js → shared-75QIWLZY.js} +1129 -1244
- package/dist/webpack4/{shared-KQOUMWJ4.js.map → shared-75QIWLZY.js.map} +4 -4
- package/dist/webpack4/shared-FYUILHED.js +1 -0
- package/dist/webpack4/shared-GQLPPRT2.js +210 -0
- package/dist/webpack4/shared-GQLPPRT2.js.map +7 -0
- package/dist/webpack4/shared-P2JBRZFP.js +2206 -0
- package/dist/webpack4/shared-P2JBRZFP.js.map +7 -0
- package/dist/webpack4/turbowarp.js +913 -9
- package/dist/webpack4/turbowarp.js.map +4 -4
- package/docs/api.md +7 -0
- package/docs/fixed-input-contracts.md +77 -0
- package/docs/package-distribution.md +5 -0
- package/docs/stage-2-publication.ja.md +6 -0
- package/package.json +2 -1
- package/dist/webpack4/shared-CQB3NG2A.js +0 -1
- package/dist/webpack4/shared-MRPGBJIH.js +0 -75
- package/dist/webpack4/shared-MRPGBJIH.js.map +0 -7
- package/dist/webpack4/shared-N6YQE2X6.js +0 -1029
- package/dist/webpack4/shared-N6YQE2X6.js.map +0 -7
- /package/dist/webpack4/{shared-CQB3NG2A.js.map → shared-FYUILHED.js.map} +0 -0
|
@@ -1,9 +1,3 @@
|
|
|
1
|
-
import {
|
|
2
|
-
JsonSnapshotError,
|
|
3
|
-
appendPointer,
|
|
4
|
-
isJsonRecord,
|
|
5
|
-
snapshotJson
|
|
6
|
-
} from "./shared-MRPGBJIH.js";
|
|
7
1
|
import {
|
|
8
2
|
__commonJS,
|
|
9
3
|
__toESM
|
|
@@ -4920,12 +4914,12 @@ var require_ref = __commonJS({
|
|
|
4920
4914
|
function callSyncRef() {
|
|
4921
4915
|
cxt.result((0, code_1.callValidateCode)(cxt, v, passCxt), () => addEvaluatedFrom(v), () => addErrorsFrom(v));
|
|
4922
4916
|
}
|
|
4923
|
-
function addErrorsFrom(
|
|
4924
|
-
const errs = (0, codegen_1._)`${
|
|
4917
|
+
function addErrorsFrom(source) {
|
|
4918
|
+
const errs = (0, codegen_1._)`${source}.errors`;
|
|
4925
4919
|
gen.assign(names_1.default.vErrors, (0, codegen_1._)`${names_1.default.vErrors} === null ? ${errs} : ${names_1.default.vErrors}.concat(${errs})`);
|
|
4926
4920
|
gen.assign(names_1.default.errors, (0, codegen_1._)`${names_1.default.vErrors}.length`);
|
|
4927
4921
|
}
|
|
4928
|
-
function addEvaluatedFrom(
|
|
4922
|
+
function addEvaluatedFrom(source) {
|
|
4929
4923
|
var _a;
|
|
4930
4924
|
if (!it.opts.unevaluated)
|
|
4931
4925
|
return;
|
|
@@ -4936,7 +4930,7 @@ var require_ref = __commonJS({
|
|
|
4936
4930
|
it.props = util_1.mergeEvaluated.props(gen, schEvaluated.props, it.props);
|
|
4937
4931
|
}
|
|
4938
4932
|
} else {
|
|
4939
|
-
const props = gen.var("props", (0, codegen_1._)`${
|
|
4933
|
+
const props = gen.var("props", (0, codegen_1._)`${source}.evaluated.props`);
|
|
4940
4934
|
it.props = util_1.mergeEvaluated.props(gen, props, it.props, codegen_1.Name);
|
|
4941
4935
|
}
|
|
4942
4936
|
}
|
|
@@ -4946,7 +4940,7 @@ var require_ref = __commonJS({
|
|
|
4946
4940
|
it.items = util_1.mergeEvaluated.items(gen, schEvaluated.items, it.items);
|
|
4947
4941
|
}
|
|
4948
4942
|
} else {
|
|
4949
|
-
const items = gen.var("items", (0, codegen_1._)`${
|
|
4943
|
+
const items = gen.var("items", (0, codegen_1._)`${source}.evaluated.items`);
|
|
4950
4944
|
it.items = util_1.mergeEvaluated.items(gen, items, it.items, codegen_1.Name);
|
|
4951
4945
|
}
|
|
4952
4946
|
}
|
|
@@ -6366,264 +6360,183 @@ var require_applicator = __commonJS({
|
|
|
6366
6360
|
}
|
|
6367
6361
|
});
|
|
6368
6362
|
|
|
6369
|
-
// node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/
|
|
6370
|
-
var
|
|
6371
|
-
"node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/
|
|
6363
|
+
// node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/dynamic/dynamicAnchor.js
|
|
6364
|
+
var require_dynamicAnchor = __commonJS({
|
|
6365
|
+
"node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/dynamic/dynamicAnchor.js"(exports) {
|
|
6372
6366
|
"use strict";
|
|
6373
6367
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6368
|
+
exports.dynamicAnchor = void 0;
|
|
6374
6369
|
var codegen_1 = require_codegen();
|
|
6375
|
-
var
|
|
6376
|
-
|
|
6377
|
-
|
|
6378
|
-
};
|
|
6370
|
+
var names_1 = require_names();
|
|
6371
|
+
var compile_1 = require_compile();
|
|
6372
|
+
var ref_1 = require_ref();
|
|
6379
6373
|
var def = {
|
|
6380
|
-
keyword: "
|
|
6381
|
-
type: ["number", "string"],
|
|
6374
|
+
keyword: "$dynamicAnchor",
|
|
6382
6375
|
schemaType: "string",
|
|
6383
|
-
|
|
6384
|
-
error,
|
|
6385
|
-
code(cxt, ruleType) {
|
|
6386
|
-
const { gen, data, $data, schema, schemaCode, it } = cxt;
|
|
6387
|
-
const { opts, errSchemaPath, schemaEnv, self } = it;
|
|
6388
|
-
if (!opts.validateFormats)
|
|
6389
|
-
return;
|
|
6390
|
-
if ($data)
|
|
6391
|
-
validate$DataFormat();
|
|
6392
|
-
else
|
|
6393
|
-
validateFormat();
|
|
6394
|
-
function validate$DataFormat() {
|
|
6395
|
-
const fmts = gen.scopeValue("formats", {
|
|
6396
|
-
ref: self.formats,
|
|
6397
|
-
code: opts.code.formats
|
|
6398
|
-
});
|
|
6399
|
-
const fDef = gen.const("fDef", (0, codegen_1._)`${fmts}[${schemaCode}]`);
|
|
6400
|
-
const fType = gen.let("fType");
|
|
6401
|
-
const format = gen.let("format");
|
|
6402
|
-
gen.if((0, codegen_1._)`typeof ${fDef} == "object" && !(${fDef} instanceof RegExp)`, () => gen.assign(fType, (0, codegen_1._)`${fDef}.type || "string"`).assign(format, (0, codegen_1._)`${fDef}.validate`), () => gen.assign(fType, (0, codegen_1._)`"string"`).assign(format, fDef));
|
|
6403
|
-
cxt.fail$data((0, codegen_1.or)(unknownFmt(), invalidFmt()));
|
|
6404
|
-
function unknownFmt() {
|
|
6405
|
-
if (opts.strictSchema === false)
|
|
6406
|
-
return codegen_1.nil;
|
|
6407
|
-
return (0, codegen_1._)`${schemaCode} && !${format}`;
|
|
6408
|
-
}
|
|
6409
|
-
function invalidFmt() {
|
|
6410
|
-
const callFormat = schemaEnv.$async ? (0, codegen_1._)`(${fDef}.async ? await ${format}(${data}) : ${format}(${data}))` : (0, codegen_1._)`${format}(${data})`;
|
|
6411
|
-
const validData = (0, codegen_1._)`(typeof ${format} == "function" ? ${callFormat} : ${format}.test(${data}))`;
|
|
6412
|
-
return (0, codegen_1._)`${format} && ${format} !== true && ${fType} === ${ruleType} && !${validData}`;
|
|
6413
|
-
}
|
|
6414
|
-
}
|
|
6415
|
-
function validateFormat() {
|
|
6416
|
-
const formatDef = self.formats[schema];
|
|
6417
|
-
if (!formatDef) {
|
|
6418
|
-
unknownFormat();
|
|
6419
|
-
return;
|
|
6420
|
-
}
|
|
6421
|
-
if (formatDef === true)
|
|
6422
|
-
return;
|
|
6423
|
-
const [fmtType, format, fmtRef] = getFormat(formatDef);
|
|
6424
|
-
if (fmtType === ruleType)
|
|
6425
|
-
cxt.pass(validCondition());
|
|
6426
|
-
function unknownFormat() {
|
|
6427
|
-
if (opts.strictSchema === false) {
|
|
6428
|
-
self.logger.warn(unknownMsg());
|
|
6429
|
-
return;
|
|
6430
|
-
}
|
|
6431
|
-
throw new Error(unknownMsg());
|
|
6432
|
-
function unknownMsg() {
|
|
6433
|
-
return `unknown format "${schema}" ignored in schema at path "${errSchemaPath}"`;
|
|
6434
|
-
}
|
|
6435
|
-
}
|
|
6436
|
-
function getFormat(fmtDef) {
|
|
6437
|
-
const code = fmtDef instanceof RegExp ? (0, codegen_1.regexpCode)(fmtDef) : opts.code.formats ? (0, codegen_1._)`${opts.code.formats}${(0, codegen_1.getProperty)(schema)}` : void 0;
|
|
6438
|
-
const fmt = gen.scopeValue("formats", { key: schema, ref: fmtDef, code });
|
|
6439
|
-
if (typeof fmtDef == "object" && !(fmtDef instanceof RegExp)) {
|
|
6440
|
-
return [fmtDef.type || "string", fmtDef.validate, (0, codegen_1._)`${fmt}.validate`];
|
|
6441
|
-
}
|
|
6442
|
-
return ["string", fmtDef, fmt];
|
|
6443
|
-
}
|
|
6444
|
-
function validCondition() {
|
|
6445
|
-
if (typeof formatDef == "object" && !(formatDef instanceof RegExp) && formatDef.async) {
|
|
6446
|
-
if (!schemaEnv.$async)
|
|
6447
|
-
throw new Error("async format in sync schema");
|
|
6448
|
-
return (0, codegen_1._)`await ${fmtRef}(${data})`;
|
|
6449
|
-
}
|
|
6450
|
-
return typeof format == "function" ? (0, codegen_1._)`${fmtRef}(${data})` : (0, codegen_1._)`${fmtRef}.test(${data})`;
|
|
6451
|
-
}
|
|
6452
|
-
}
|
|
6453
|
-
}
|
|
6376
|
+
code: (cxt) => dynamicAnchor(cxt, cxt.schema)
|
|
6454
6377
|
};
|
|
6378
|
+
function dynamicAnchor(cxt, anchor) {
|
|
6379
|
+
const { gen, it } = cxt;
|
|
6380
|
+
it.schemaEnv.root.dynamicAnchors[anchor] = true;
|
|
6381
|
+
const v = (0, codegen_1._)`${names_1.default.dynamicAnchors}${(0, codegen_1.getProperty)(anchor)}`;
|
|
6382
|
+
const validate = it.errSchemaPath === "#" ? it.validateName : _getValidate(cxt);
|
|
6383
|
+
gen.if((0, codegen_1._)`!${v}`, () => gen.assign(v, validate));
|
|
6384
|
+
}
|
|
6385
|
+
exports.dynamicAnchor = dynamicAnchor;
|
|
6386
|
+
function _getValidate(cxt) {
|
|
6387
|
+
const { schemaEnv, schema, self } = cxt.it;
|
|
6388
|
+
const { root, baseId, localRefs, meta } = schemaEnv.root;
|
|
6389
|
+
const { schemaId } = self.opts;
|
|
6390
|
+
const sch = new compile_1.SchemaEnv({ schema, schemaId, root, baseId, localRefs, meta });
|
|
6391
|
+
compile_1.compileSchema.call(self, sch);
|
|
6392
|
+
return (0, ref_1.getValidate)(cxt, sch);
|
|
6393
|
+
}
|
|
6455
6394
|
exports.default = def;
|
|
6456
6395
|
}
|
|
6457
6396
|
});
|
|
6458
6397
|
|
|
6459
|
-
// node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/
|
|
6460
|
-
var
|
|
6461
|
-
"node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/
|
|
6398
|
+
// node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/dynamic/dynamicRef.js
|
|
6399
|
+
var require_dynamicRef = __commonJS({
|
|
6400
|
+
"node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/dynamic/dynamicRef.js"(exports) {
|
|
6462
6401
|
"use strict";
|
|
6463
6402
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6464
|
-
|
|
6465
|
-
var
|
|
6466
|
-
|
|
6403
|
+
exports.dynamicRef = void 0;
|
|
6404
|
+
var codegen_1 = require_codegen();
|
|
6405
|
+
var names_1 = require_names();
|
|
6406
|
+
var ref_1 = require_ref();
|
|
6407
|
+
var def = {
|
|
6408
|
+
keyword: "$dynamicRef",
|
|
6409
|
+
schemaType: "string",
|
|
6410
|
+
code: (cxt) => dynamicRef(cxt, cxt.schema)
|
|
6411
|
+
};
|
|
6412
|
+
function dynamicRef(cxt, ref) {
|
|
6413
|
+
const { gen, keyword, it } = cxt;
|
|
6414
|
+
if (ref[0] !== "#")
|
|
6415
|
+
throw new Error(`"${keyword}" only supports hash fragment reference`);
|
|
6416
|
+
const anchor = ref.slice(1);
|
|
6417
|
+
if (it.allErrors) {
|
|
6418
|
+
_dynamicRef();
|
|
6419
|
+
} else {
|
|
6420
|
+
const valid = gen.let("valid", false);
|
|
6421
|
+
_dynamicRef(valid);
|
|
6422
|
+
cxt.ok(valid);
|
|
6423
|
+
}
|
|
6424
|
+
function _dynamicRef(valid) {
|
|
6425
|
+
if (it.schemaEnv.root.dynamicAnchors[anchor]) {
|
|
6426
|
+
const v = gen.let("_v", (0, codegen_1._)`${names_1.default.dynamicAnchors}${(0, codegen_1.getProperty)(anchor)}`);
|
|
6427
|
+
gen.if(v, _callRef(v, valid), _callRef(it.validateName, valid));
|
|
6428
|
+
} else {
|
|
6429
|
+
_callRef(it.validateName, valid)();
|
|
6430
|
+
}
|
|
6431
|
+
}
|
|
6432
|
+
function _callRef(validate, valid) {
|
|
6433
|
+
return valid ? () => gen.block(() => {
|
|
6434
|
+
(0, ref_1.callRef)(cxt, validate);
|
|
6435
|
+
gen.let(valid, true);
|
|
6436
|
+
}) : () => (0, ref_1.callRef)(cxt, validate);
|
|
6437
|
+
}
|
|
6438
|
+
}
|
|
6439
|
+
exports.dynamicRef = dynamicRef;
|
|
6440
|
+
exports.default = def;
|
|
6467
6441
|
}
|
|
6468
6442
|
});
|
|
6469
6443
|
|
|
6470
|
-
// node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/
|
|
6471
|
-
var
|
|
6472
|
-
"node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/
|
|
6444
|
+
// node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/dynamic/recursiveAnchor.js
|
|
6445
|
+
var require_recursiveAnchor = __commonJS({
|
|
6446
|
+
"node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/dynamic/recursiveAnchor.js"(exports) {
|
|
6473
6447
|
"use strict";
|
|
6474
6448
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6475
|
-
|
|
6476
|
-
|
|
6477
|
-
|
|
6478
|
-
"
|
|
6479
|
-
"
|
|
6480
|
-
|
|
6481
|
-
|
|
6482
|
-
|
|
6483
|
-
|
|
6484
|
-
|
|
6485
|
-
|
|
6486
|
-
|
|
6487
|
-
|
|
6488
|
-
"contentSchema"
|
|
6489
|
-
];
|
|
6449
|
+
var dynamicAnchor_1 = require_dynamicAnchor();
|
|
6450
|
+
var util_1 = require_util();
|
|
6451
|
+
var def = {
|
|
6452
|
+
keyword: "$recursiveAnchor",
|
|
6453
|
+
schemaType: "boolean",
|
|
6454
|
+
code(cxt) {
|
|
6455
|
+
if (cxt.schema)
|
|
6456
|
+
(0, dynamicAnchor_1.dynamicAnchor)(cxt, "");
|
|
6457
|
+
else
|
|
6458
|
+
(0, util_1.checkStrictMode)(cxt.it, "$recursiveAnchor: false is ignored");
|
|
6459
|
+
}
|
|
6460
|
+
};
|
|
6461
|
+
exports.default = def;
|
|
6490
6462
|
}
|
|
6491
6463
|
});
|
|
6492
6464
|
|
|
6493
|
-
// node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/
|
|
6494
|
-
var
|
|
6495
|
-
"node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/
|
|
6465
|
+
// node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/dynamic/recursiveRef.js
|
|
6466
|
+
var require_recursiveRef = __commonJS({
|
|
6467
|
+
"node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/dynamic/recursiveRef.js"(exports) {
|
|
6496
6468
|
"use strict";
|
|
6497
6469
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6498
|
-
var
|
|
6499
|
-
var
|
|
6500
|
-
|
|
6501
|
-
|
|
6502
|
-
|
|
6503
|
-
|
|
6504
|
-
|
|
6505
|
-
validation_1.default,
|
|
6506
|
-
(0, applicator_1.default)(),
|
|
6507
|
-
format_1.default,
|
|
6508
|
-
metadata_1.metadataVocabulary,
|
|
6509
|
-
metadata_1.contentVocabulary
|
|
6510
|
-
];
|
|
6511
|
-
exports.default = draft7Vocabularies;
|
|
6470
|
+
var dynamicRef_1 = require_dynamicRef();
|
|
6471
|
+
var def = {
|
|
6472
|
+
keyword: "$recursiveRef",
|
|
6473
|
+
schemaType: "string",
|
|
6474
|
+
code: (cxt) => (0, dynamicRef_1.dynamicRef)(cxt, cxt.schema)
|
|
6475
|
+
};
|
|
6476
|
+
exports.default = def;
|
|
6512
6477
|
}
|
|
6513
6478
|
});
|
|
6514
6479
|
|
|
6515
|
-
// node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/
|
|
6516
|
-
var
|
|
6517
|
-
"node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/
|
|
6480
|
+
// node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/dynamic/index.js
|
|
6481
|
+
var require_dynamic = __commonJS({
|
|
6482
|
+
"node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/dynamic/index.js"(exports) {
|
|
6518
6483
|
"use strict";
|
|
6519
6484
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6520
|
-
|
|
6521
|
-
var
|
|
6522
|
-
(
|
|
6523
|
-
|
|
6524
|
-
|
|
6525
|
-
|
|
6485
|
+
var dynamicAnchor_1 = require_dynamicAnchor();
|
|
6486
|
+
var dynamicRef_1 = require_dynamicRef();
|
|
6487
|
+
var recursiveAnchor_1 = require_recursiveAnchor();
|
|
6488
|
+
var recursiveRef_1 = require_recursiveRef();
|
|
6489
|
+
var dynamic = [dynamicAnchor_1.default, dynamicRef_1.default, recursiveAnchor_1.default, recursiveRef_1.default];
|
|
6490
|
+
exports.default = dynamic;
|
|
6526
6491
|
}
|
|
6527
6492
|
});
|
|
6528
6493
|
|
|
6529
|
-
// node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/
|
|
6530
|
-
var
|
|
6531
|
-
"node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/
|
|
6494
|
+
// node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/validation/dependentRequired.js
|
|
6495
|
+
var require_dependentRequired = __commonJS({
|
|
6496
|
+
"node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/validation/dependentRequired.js"(exports) {
|
|
6532
6497
|
"use strict";
|
|
6533
6498
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6534
|
-
var
|
|
6535
|
-
var types_1 = require_types();
|
|
6536
|
-
var compile_1 = require_compile();
|
|
6537
|
-
var ref_error_1 = require_ref_error();
|
|
6538
|
-
var util_1 = require_util();
|
|
6539
|
-
var error = {
|
|
6540
|
-
message: ({ params: { discrError, tagName } }) => discrError === types_1.DiscrError.Tag ? `tag "${tagName}" must be string` : `value of tag "${tagName}" must be in oneOf`,
|
|
6541
|
-
params: ({ params: { discrError, tag, tagName } }) => (0, codegen_1._)`{error: ${discrError}, tag: ${tagName}, tagValue: ${tag}}`
|
|
6542
|
-
};
|
|
6499
|
+
var dependencies_1 = require_dependencies();
|
|
6543
6500
|
var def = {
|
|
6544
|
-
keyword: "
|
|
6501
|
+
keyword: "dependentRequired",
|
|
6545
6502
|
type: "object",
|
|
6546
6503
|
schemaType: "object",
|
|
6547
|
-
error,
|
|
6548
|
-
code(cxt)
|
|
6549
|
-
|
|
6550
|
-
|
|
6551
|
-
|
|
6552
|
-
|
|
6553
|
-
|
|
6554
|
-
|
|
6555
|
-
|
|
6556
|
-
|
|
6557
|
-
|
|
6558
|
-
|
|
6559
|
-
|
|
6560
|
-
|
|
6561
|
-
|
|
6562
|
-
|
|
6563
|
-
|
|
6564
|
-
|
|
6565
|
-
|
|
6566
|
-
|
|
6567
|
-
|
|
6568
|
-
|
|
6569
|
-
|
|
6570
|
-
|
|
6571
|
-
|
|
6572
|
-
|
|
6573
|
-
|
|
6574
|
-
|
|
6575
|
-
|
|
6576
|
-
|
|
6577
|
-
|
|
6578
|
-
|
|
6579
|
-
|
|
6580
|
-
|
|
6581
|
-
|
|
6582
|
-
|
|
6583
|
-
var _a;
|
|
6584
|
-
const oneOfMapping = {};
|
|
6585
|
-
const topRequired = hasRequired(parentSchema);
|
|
6586
|
-
let tagRequired = true;
|
|
6587
|
-
for (let i = 0; i < oneOf.length; i++) {
|
|
6588
|
-
let sch = oneOf[i];
|
|
6589
|
-
if ((sch === null || sch === void 0 ? void 0 : sch.$ref) && !(0, util_1.schemaHasRulesButRef)(sch, it.self.RULES)) {
|
|
6590
|
-
const ref = sch.$ref;
|
|
6591
|
-
sch = compile_1.resolveRef.call(it.self, it.schemaEnv.root, it.baseId, ref);
|
|
6592
|
-
if (sch instanceof compile_1.SchemaEnv)
|
|
6593
|
-
sch = sch.schema;
|
|
6594
|
-
if (sch === void 0)
|
|
6595
|
-
throw new ref_error_1.default(it.opts.uriResolver, it.baseId, ref);
|
|
6596
|
-
}
|
|
6597
|
-
const propSch = (_a = sch === null || sch === void 0 ? void 0 : sch.properties) === null || _a === void 0 ? void 0 : _a[tagName];
|
|
6598
|
-
if (typeof propSch != "object") {
|
|
6599
|
-
throw new Error(`discriminator: oneOf subschemas (or referenced schemas) must have "properties/${tagName}"`);
|
|
6600
|
-
}
|
|
6601
|
-
tagRequired = tagRequired && (topRequired || hasRequired(sch));
|
|
6602
|
-
addMappings(propSch, i);
|
|
6603
|
-
}
|
|
6604
|
-
if (!tagRequired)
|
|
6605
|
-
throw new Error(`discriminator: "${tagName}" must be required`);
|
|
6606
|
-
return oneOfMapping;
|
|
6607
|
-
function hasRequired({ required }) {
|
|
6608
|
-
return Array.isArray(required) && required.includes(tagName);
|
|
6609
|
-
}
|
|
6610
|
-
function addMappings(sch, i) {
|
|
6611
|
-
if (sch.const) {
|
|
6612
|
-
addMapping(sch.const, i);
|
|
6613
|
-
} else if (sch.enum) {
|
|
6614
|
-
for (const tagValue of sch.enum) {
|
|
6615
|
-
addMapping(tagValue, i);
|
|
6616
|
-
}
|
|
6617
|
-
} else {
|
|
6618
|
-
throw new Error(`discriminator: "properties/${tagName}" must have "const" or "enum"`);
|
|
6619
|
-
}
|
|
6620
|
-
}
|
|
6621
|
-
function addMapping(tagValue, i) {
|
|
6622
|
-
if (typeof tagValue != "string" || tagValue in oneOfMapping) {
|
|
6623
|
-
throw new Error(`discriminator: "${tagName}" values must be unique strings`);
|
|
6624
|
-
}
|
|
6625
|
-
oneOfMapping[tagValue] = i;
|
|
6626
|
-
}
|
|
6504
|
+
error: dependencies_1.error,
|
|
6505
|
+
code: (cxt) => (0, dependencies_1.validatePropertyDeps)(cxt)
|
|
6506
|
+
};
|
|
6507
|
+
exports.default = def;
|
|
6508
|
+
}
|
|
6509
|
+
});
|
|
6510
|
+
|
|
6511
|
+
// node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/applicator/dependentSchemas.js
|
|
6512
|
+
var require_dependentSchemas = __commonJS({
|
|
6513
|
+
"node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/applicator/dependentSchemas.js"(exports) {
|
|
6514
|
+
"use strict";
|
|
6515
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6516
|
+
var dependencies_1 = require_dependencies();
|
|
6517
|
+
var def = {
|
|
6518
|
+
keyword: "dependentSchemas",
|
|
6519
|
+
type: "object",
|
|
6520
|
+
schemaType: "object",
|
|
6521
|
+
code: (cxt) => (0, dependencies_1.validateSchemaDeps)(cxt)
|
|
6522
|
+
};
|
|
6523
|
+
exports.default = def;
|
|
6524
|
+
}
|
|
6525
|
+
});
|
|
6526
|
+
|
|
6527
|
+
// node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/validation/limitContains.js
|
|
6528
|
+
var require_limitContains = __commonJS({
|
|
6529
|
+
"node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/validation/limitContains.js"(exports) {
|
|
6530
|
+
"use strict";
|
|
6531
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6532
|
+
var util_1 = require_util();
|
|
6533
|
+
var def = {
|
|
6534
|
+
keyword: ["maxContains", "minContains"],
|
|
6535
|
+
type: "array",
|
|
6536
|
+
schemaType: "number",
|
|
6537
|
+
code({ keyword, parentSchema, it }) {
|
|
6538
|
+
if (parentSchema.contains === void 0) {
|
|
6539
|
+
(0, util_1.checkStrictMode)(it, `"${keyword}" without "contains" is ignored`);
|
|
6627
6540
|
}
|
|
6628
6541
|
}
|
|
6629
6542
|
};
|
|
@@ -6631,878 +6544,972 @@ var require_discriminator = __commonJS({
|
|
|
6631
6544
|
}
|
|
6632
6545
|
});
|
|
6633
6546
|
|
|
6634
|
-
// node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/
|
|
6635
|
-
var
|
|
6636
|
-
"node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/
|
|
6637
|
-
|
|
6638
|
-
|
|
6639
|
-
|
|
6640
|
-
|
|
6641
|
-
|
|
6642
|
-
|
|
6643
|
-
|
|
6644
|
-
|
|
6645
|
-
|
|
6646
|
-
|
|
6647
|
-
|
|
6648
|
-
|
|
6649
|
-
|
|
6650
|
-
|
|
6651
|
-
|
|
6652
|
-
|
|
6653
|
-
|
|
6654
|
-
|
|
6655
|
-
|
|
6656
|
-
|
|
6657
|
-
|
|
6658
|
-
|
|
6659
|
-
|
|
6660
|
-
|
|
6661
|
-
|
|
6547
|
+
// node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/next.js
|
|
6548
|
+
var require_next = __commonJS({
|
|
6549
|
+
"node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/next.js"(exports) {
|
|
6550
|
+
"use strict";
|
|
6551
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6552
|
+
var dependentRequired_1 = require_dependentRequired();
|
|
6553
|
+
var dependentSchemas_1 = require_dependentSchemas();
|
|
6554
|
+
var limitContains_1 = require_limitContains();
|
|
6555
|
+
var next = [dependentRequired_1.default, dependentSchemas_1.default, limitContains_1.default];
|
|
6556
|
+
exports.default = next;
|
|
6557
|
+
}
|
|
6558
|
+
});
|
|
6559
|
+
|
|
6560
|
+
// node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/unevaluated/unevaluatedProperties.js
|
|
6561
|
+
var require_unevaluatedProperties = __commonJS({
|
|
6562
|
+
"node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/unevaluated/unevaluatedProperties.js"(exports) {
|
|
6563
|
+
"use strict";
|
|
6564
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6565
|
+
var codegen_1 = require_codegen();
|
|
6566
|
+
var util_1 = require_util();
|
|
6567
|
+
var names_1 = require_names();
|
|
6568
|
+
var error = {
|
|
6569
|
+
message: "must NOT have unevaluated properties",
|
|
6570
|
+
params: ({ params }) => (0, codegen_1._)`{unevaluatedProperty: ${params.unevaluatedProperty}}`
|
|
6571
|
+
};
|
|
6572
|
+
var def = {
|
|
6573
|
+
keyword: "unevaluatedProperties",
|
|
6574
|
+
type: "object",
|
|
6575
|
+
schemaType: ["boolean", "object"],
|
|
6576
|
+
trackErrors: true,
|
|
6577
|
+
error,
|
|
6578
|
+
code(cxt) {
|
|
6579
|
+
const { gen, schema, data, errsCount, it } = cxt;
|
|
6580
|
+
if (!errsCount)
|
|
6581
|
+
throw new Error("ajv implementation error");
|
|
6582
|
+
const { allErrors, props } = it;
|
|
6583
|
+
if (props instanceof codegen_1.Name) {
|
|
6584
|
+
gen.if((0, codegen_1._)`${props} !== true`, () => gen.forIn("key", data, (key) => gen.if(unevaluatedDynamic(props, key), () => unevaluatedPropCode(key))));
|
|
6585
|
+
} else if (props !== true) {
|
|
6586
|
+
gen.forIn("key", data, (key) => props === void 0 ? unevaluatedPropCode(key) : gen.if(unevaluatedStatic(props, key), () => unevaluatedPropCode(key)));
|
|
6662
6587
|
}
|
|
6663
|
-
|
|
6664
|
-
|
|
6665
|
-
|
|
6666
|
-
|
|
6667
|
-
|
|
6668
|
-
|
|
6669
|
-
|
|
6670
|
-
|
|
6671
|
-
|
|
6672
|
-
format: "uri"
|
|
6673
|
-
},
|
|
6674
|
-
$ref: {
|
|
6675
|
-
type: "string",
|
|
6676
|
-
format: "uri-reference"
|
|
6677
|
-
},
|
|
6678
|
-
$comment: {
|
|
6679
|
-
type: "string"
|
|
6680
|
-
},
|
|
6681
|
-
title: {
|
|
6682
|
-
type: "string"
|
|
6683
|
-
},
|
|
6684
|
-
description: {
|
|
6685
|
-
type: "string"
|
|
6686
|
-
},
|
|
6687
|
-
default: true,
|
|
6688
|
-
readOnly: {
|
|
6689
|
-
type: "boolean",
|
|
6690
|
-
default: false
|
|
6691
|
-
},
|
|
6692
|
-
examples: {
|
|
6693
|
-
type: "array",
|
|
6694
|
-
items: true
|
|
6695
|
-
},
|
|
6696
|
-
multipleOf: {
|
|
6697
|
-
type: "number",
|
|
6698
|
-
exclusiveMinimum: 0
|
|
6699
|
-
},
|
|
6700
|
-
maximum: {
|
|
6701
|
-
type: "number"
|
|
6702
|
-
},
|
|
6703
|
-
exclusiveMaximum: {
|
|
6704
|
-
type: "number"
|
|
6705
|
-
},
|
|
6706
|
-
minimum: {
|
|
6707
|
-
type: "number"
|
|
6708
|
-
},
|
|
6709
|
-
exclusiveMinimum: {
|
|
6710
|
-
type: "number"
|
|
6711
|
-
},
|
|
6712
|
-
maxLength: { $ref: "#/definitions/nonNegativeInteger" },
|
|
6713
|
-
minLength: { $ref: "#/definitions/nonNegativeIntegerDefault0" },
|
|
6714
|
-
pattern: {
|
|
6715
|
-
type: "string",
|
|
6716
|
-
format: "regex"
|
|
6717
|
-
},
|
|
6718
|
-
additionalItems: { $ref: "#" },
|
|
6719
|
-
items: {
|
|
6720
|
-
anyOf: [{ $ref: "#" }, { $ref: "#/definitions/schemaArray" }],
|
|
6721
|
-
default: true
|
|
6722
|
-
},
|
|
6723
|
-
maxItems: { $ref: "#/definitions/nonNegativeInteger" },
|
|
6724
|
-
minItems: { $ref: "#/definitions/nonNegativeIntegerDefault0" },
|
|
6725
|
-
uniqueItems: {
|
|
6726
|
-
type: "boolean",
|
|
6727
|
-
default: false
|
|
6728
|
-
},
|
|
6729
|
-
contains: { $ref: "#" },
|
|
6730
|
-
maxProperties: { $ref: "#/definitions/nonNegativeInteger" },
|
|
6731
|
-
minProperties: { $ref: "#/definitions/nonNegativeIntegerDefault0" },
|
|
6732
|
-
required: { $ref: "#/definitions/stringArray" },
|
|
6733
|
-
additionalProperties: { $ref: "#" },
|
|
6734
|
-
definitions: {
|
|
6735
|
-
type: "object",
|
|
6736
|
-
additionalProperties: { $ref: "#" },
|
|
6737
|
-
default: {}
|
|
6738
|
-
},
|
|
6739
|
-
properties: {
|
|
6740
|
-
type: "object",
|
|
6741
|
-
additionalProperties: { $ref: "#" },
|
|
6742
|
-
default: {}
|
|
6743
|
-
},
|
|
6744
|
-
patternProperties: {
|
|
6745
|
-
type: "object",
|
|
6746
|
-
additionalProperties: { $ref: "#" },
|
|
6747
|
-
propertyNames: { format: "regex" },
|
|
6748
|
-
default: {}
|
|
6749
|
-
},
|
|
6750
|
-
dependencies: {
|
|
6751
|
-
type: "object",
|
|
6752
|
-
additionalProperties: {
|
|
6753
|
-
anyOf: [{ $ref: "#" }, { $ref: "#/definitions/stringArray" }]
|
|
6588
|
+
it.props = true;
|
|
6589
|
+
cxt.ok((0, codegen_1._)`${errsCount} === ${names_1.default.errors}`);
|
|
6590
|
+
function unevaluatedPropCode(key) {
|
|
6591
|
+
if (schema === false) {
|
|
6592
|
+
cxt.setParams({ unevaluatedProperty: key });
|
|
6593
|
+
cxt.error();
|
|
6594
|
+
if (!allErrors)
|
|
6595
|
+
gen.break();
|
|
6596
|
+
return;
|
|
6754
6597
|
}
|
|
6755
|
-
|
|
6756
|
-
|
|
6757
|
-
|
|
6758
|
-
|
|
6759
|
-
|
|
6760
|
-
|
|
6761
|
-
|
|
6762
|
-
|
|
6763
|
-
|
|
6764
|
-
|
|
6765
|
-
|
|
6766
|
-
|
|
6767
|
-
|
|
6768
|
-
|
|
6769
|
-
|
|
6770
|
-
|
|
6771
|
-
|
|
6772
|
-
|
|
6773
|
-
|
|
6774
|
-
|
|
6775
|
-
|
|
6776
|
-
|
|
6777
|
-
|
|
6778
|
-
if: { $ref: "#" },
|
|
6779
|
-
then: { $ref: "#" },
|
|
6780
|
-
else: { $ref: "#" },
|
|
6781
|
-
allOf: { $ref: "#/definitions/schemaArray" },
|
|
6782
|
-
anyOf: { $ref: "#/definitions/schemaArray" },
|
|
6783
|
-
oneOf: { $ref: "#/definitions/schemaArray" },
|
|
6784
|
-
not: { $ref: "#" }
|
|
6785
|
-
},
|
|
6786
|
-
default: true
|
|
6598
|
+
if (!(0, util_1.alwaysValidSchema)(it, schema)) {
|
|
6599
|
+
const valid = gen.name("valid");
|
|
6600
|
+
cxt.subschema({
|
|
6601
|
+
keyword: "unevaluatedProperties",
|
|
6602
|
+
dataProp: key,
|
|
6603
|
+
dataPropType: util_1.Type.Str
|
|
6604
|
+
}, valid);
|
|
6605
|
+
if (!allErrors)
|
|
6606
|
+
gen.if((0, codegen_1.not)(valid), () => gen.break());
|
|
6607
|
+
}
|
|
6608
|
+
}
|
|
6609
|
+
function unevaluatedDynamic(evaluatedProps, key) {
|
|
6610
|
+
return (0, codegen_1._)`!${evaluatedProps} || !${evaluatedProps}[${key}]`;
|
|
6611
|
+
}
|
|
6612
|
+
function unevaluatedStatic(evaluatedProps, key) {
|
|
6613
|
+
const ps = [];
|
|
6614
|
+
for (const p in evaluatedProps) {
|
|
6615
|
+
if (evaluatedProps[p] === true)
|
|
6616
|
+
ps.push((0, codegen_1._)`${key} !== ${p}`);
|
|
6617
|
+
}
|
|
6618
|
+
return (0, codegen_1.and)(...ps);
|
|
6619
|
+
}
|
|
6620
|
+
}
|
|
6787
6621
|
};
|
|
6622
|
+
exports.default = def;
|
|
6788
6623
|
}
|
|
6789
6624
|
});
|
|
6790
6625
|
|
|
6791
|
-
// node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/
|
|
6792
|
-
var
|
|
6793
|
-
"node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/
|
|
6626
|
+
// node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/unevaluated/unevaluatedItems.js
|
|
6627
|
+
var require_unevaluatedItems = __commonJS({
|
|
6628
|
+
"node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/unevaluated/unevaluatedItems.js"(exports) {
|
|
6794
6629
|
"use strict";
|
|
6795
6630
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6796
|
-
|
|
6797
|
-
var
|
|
6798
|
-
var
|
|
6799
|
-
|
|
6800
|
-
|
|
6801
|
-
|
|
6802
|
-
var
|
|
6803
|
-
|
|
6804
|
-
|
|
6805
|
-
|
|
6806
|
-
|
|
6807
|
-
|
|
6808
|
-
|
|
6809
|
-
|
|
6810
|
-
|
|
6811
|
-
super._addDefaultMetaSchema();
|
|
6812
|
-
if (!this.opts.meta)
|
|
6631
|
+
var codegen_1 = require_codegen();
|
|
6632
|
+
var util_1 = require_util();
|
|
6633
|
+
var error = {
|
|
6634
|
+
message: ({ params: { len } }) => (0, codegen_1.str)`must NOT have more than ${len} items`,
|
|
6635
|
+
params: ({ params: { len } }) => (0, codegen_1._)`{limit: ${len}}`
|
|
6636
|
+
};
|
|
6637
|
+
var def = {
|
|
6638
|
+
keyword: "unevaluatedItems",
|
|
6639
|
+
type: "array",
|
|
6640
|
+
schemaType: ["boolean", "object"],
|
|
6641
|
+
error,
|
|
6642
|
+
code(cxt) {
|
|
6643
|
+
const { gen, schema, data, it } = cxt;
|
|
6644
|
+
const items = it.items || 0;
|
|
6645
|
+
if (items === true)
|
|
6813
6646
|
return;
|
|
6814
|
-
const
|
|
6815
|
-
|
|
6816
|
-
|
|
6817
|
-
|
|
6818
|
-
|
|
6819
|
-
|
|
6647
|
+
const len = gen.const("len", (0, codegen_1._)`${data}.length`);
|
|
6648
|
+
if (schema === false) {
|
|
6649
|
+
cxt.setParams({ len: items });
|
|
6650
|
+
cxt.fail((0, codegen_1._)`${len} > ${items}`);
|
|
6651
|
+
} else if (typeof schema == "object" && !(0, util_1.alwaysValidSchema)(it, schema)) {
|
|
6652
|
+
const valid = gen.var("valid", (0, codegen_1._)`${len} <= ${items}`);
|
|
6653
|
+
gen.if((0, codegen_1.not)(valid), () => validateItems(valid, items));
|
|
6654
|
+
cxt.ok(valid);
|
|
6655
|
+
}
|
|
6656
|
+
it.items = true;
|
|
6657
|
+
function validateItems(valid, from) {
|
|
6658
|
+
gen.forRange("i", from, len, (i) => {
|
|
6659
|
+
cxt.subschema({ keyword: "unevaluatedItems", dataProp: i, dataPropType: util_1.Type.Num }, valid);
|
|
6660
|
+
if (!it.allErrors)
|
|
6661
|
+
gen.if((0, codegen_1.not)(valid), () => gen.break());
|
|
6662
|
+
});
|
|
6663
|
+
}
|
|
6820
6664
|
}
|
|
6821
6665
|
};
|
|
6822
|
-
exports.
|
|
6823
|
-
module.exports = exports = Ajv2;
|
|
6824
|
-
module.exports.Ajv = Ajv2;
|
|
6825
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6826
|
-
exports.default = Ajv2;
|
|
6827
|
-
var validate_1 = require_validate();
|
|
6828
|
-
Object.defineProperty(exports, "KeywordCxt", { enumerable: true, get: function() {
|
|
6829
|
-
return validate_1.KeywordCxt;
|
|
6830
|
-
} });
|
|
6831
|
-
var codegen_1 = require_codegen();
|
|
6832
|
-
Object.defineProperty(exports, "_", { enumerable: true, get: function() {
|
|
6833
|
-
return codegen_1._;
|
|
6834
|
-
} });
|
|
6835
|
-
Object.defineProperty(exports, "str", { enumerable: true, get: function() {
|
|
6836
|
-
return codegen_1.str;
|
|
6837
|
-
} });
|
|
6838
|
-
Object.defineProperty(exports, "stringify", { enumerable: true, get: function() {
|
|
6839
|
-
return codegen_1.stringify;
|
|
6840
|
-
} });
|
|
6841
|
-
Object.defineProperty(exports, "nil", { enumerable: true, get: function() {
|
|
6842
|
-
return codegen_1.nil;
|
|
6843
|
-
} });
|
|
6844
|
-
Object.defineProperty(exports, "Name", { enumerable: true, get: function() {
|
|
6845
|
-
return codegen_1.Name;
|
|
6846
|
-
} });
|
|
6847
|
-
Object.defineProperty(exports, "CodeGen", { enumerable: true, get: function() {
|
|
6848
|
-
return codegen_1.CodeGen;
|
|
6849
|
-
} });
|
|
6850
|
-
var validation_error_1 = require_validation_error();
|
|
6851
|
-
Object.defineProperty(exports, "ValidationError", { enumerable: true, get: function() {
|
|
6852
|
-
return validation_error_1.default;
|
|
6853
|
-
} });
|
|
6854
|
-
var ref_error_1 = require_ref_error();
|
|
6855
|
-
Object.defineProperty(exports, "MissingRefError", { enumerable: true, get: function() {
|
|
6856
|
-
return ref_error_1.default;
|
|
6857
|
-
} });
|
|
6666
|
+
exports.default = def;
|
|
6858
6667
|
}
|
|
6859
6668
|
});
|
|
6860
6669
|
|
|
6861
|
-
// node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/
|
|
6862
|
-
var
|
|
6863
|
-
"node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/
|
|
6670
|
+
// node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/unevaluated/index.js
|
|
6671
|
+
var require_unevaluated = __commonJS({
|
|
6672
|
+
"node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/unevaluated/index.js"(exports) {
|
|
6864
6673
|
"use strict";
|
|
6865
6674
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6866
|
-
|
|
6867
|
-
var
|
|
6868
|
-
var
|
|
6869
|
-
|
|
6870
|
-
var ref_1 = require_ref();
|
|
6871
|
-
var def = {
|
|
6872
|
-
keyword: "$dynamicAnchor",
|
|
6873
|
-
schemaType: "string",
|
|
6874
|
-
code: (cxt) => dynamicAnchor(cxt, cxt.schema)
|
|
6875
|
-
};
|
|
6876
|
-
function dynamicAnchor(cxt, anchor) {
|
|
6877
|
-
const { gen, it } = cxt;
|
|
6878
|
-
it.schemaEnv.root.dynamicAnchors[anchor] = true;
|
|
6879
|
-
const v = (0, codegen_1._)`${names_1.default.dynamicAnchors}${(0, codegen_1.getProperty)(anchor)}`;
|
|
6880
|
-
const validate = it.errSchemaPath === "#" ? it.validateName : _getValidate(cxt);
|
|
6881
|
-
gen.if((0, codegen_1._)`!${v}`, () => gen.assign(v, validate));
|
|
6882
|
-
}
|
|
6883
|
-
exports.dynamicAnchor = dynamicAnchor;
|
|
6884
|
-
function _getValidate(cxt) {
|
|
6885
|
-
const { schemaEnv, schema, self } = cxt.it;
|
|
6886
|
-
const { root, baseId, localRefs, meta } = schemaEnv.root;
|
|
6887
|
-
const { schemaId } = self.opts;
|
|
6888
|
-
const sch = new compile_1.SchemaEnv({ schema, schemaId, root, baseId, localRefs, meta });
|
|
6889
|
-
compile_1.compileSchema.call(self, sch);
|
|
6890
|
-
return (0, ref_1.getValidate)(cxt, sch);
|
|
6891
|
-
}
|
|
6892
|
-
exports.default = def;
|
|
6675
|
+
var unevaluatedProperties_1 = require_unevaluatedProperties();
|
|
6676
|
+
var unevaluatedItems_1 = require_unevaluatedItems();
|
|
6677
|
+
var unevaluated = [unevaluatedProperties_1.default, unevaluatedItems_1.default];
|
|
6678
|
+
exports.default = unevaluated;
|
|
6893
6679
|
}
|
|
6894
6680
|
});
|
|
6895
6681
|
|
|
6896
|
-
// node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/
|
|
6897
|
-
var
|
|
6898
|
-
"node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/
|
|
6682
|
+
// node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/format/format.js
|
|
6683
|
+
var require_format = __commonJS({
|
|
6684
|
+
"node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/format/format.js"(exports) {
|
|
6899
6685
|
"use strict";
|
|
6900
6686
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6901
|
-
exports.dynamicRef = void 0;
|
|
6902
6687
|
var codegen_1 = require_codegen();
|
|
6903
|
-
var
|
|
6904
|
-
|
|
6688
|
+
var error = {
|
|
6689
|
+
message: ({ schemaCode }) => (0, codegen_1.str)`must match format "${schemaCode}"`,
|
|
6690
|
+
params: ({ schemaCode }) => (0, codegen_1._)`{format: ${schemaCode}}`
|
|
6691
|
+
};
|
|
6905
6692
|
var def = {
|
|
6906
|
-
keyword: "
|
|
6693
|
+
keyword: "format",
|
|
6694
|
+
type: ["number", "string"],
|
|
6907
6695
|
schemaType: "string",
|
|
6908
|
-
|
|
6909
|
-
|
|
6910
|
-
|
|
6911
|
-
|
|
6912
|
-
|
|
6913
|
-
|
|
6914
|
-
|
|
6915
|
-
|
|
6916
|
-
|
|
6917
|
-
|
|
6918
|
-
|
|
6919
|
-
|
|
6920
|
-
|
|
6921
|
-
|
|
6922
|
-
|
|
6923
|
-
|
|
6924
|
-
const
|
|
6925
|
-
|
|
6926
|
-
|
|
6927
|
-
|
|
6696
|
+
$data: true,
|
|
6697
|
+
error,
|
|
6698
|
+
code(cxt, ruleType) {
|
|
6699
|
+
const { gen, data, $data, schema, schemaCode, it } = cxt;
|
|
6700
|
+
const { opts, errSchemaPath, schemaEnv, self } = it;
|
|
6701
|
+
if (!opts.validateFormats)
|
|
6702
|
+
return;
|
|
6703
|
+
if ($data)
|
|
6704
|
+
validate$DataFormat();
|
|
6705
|
+
else
|
|
6706
|
+
validateFormat();
|
|
6707
|
+
function validate$DataFormat() {
|
|
6708
|
+
const fmts = gen.scopeValue("formats", {
|
|
6709
|
+
ref: self.formats,
|
|
6710
|
+
code: opts.code.formats
|
|
6711
|
+
});
|
|
6712
|
+
const fDef = gen.const("fDef", (0, codegen_1._)`${fmts}[${schemaCode}]`);
|
|
6713
|
+
const fType = gen.let("fType");
|
|
6714
|
+
const format = gen.let("format");
|
|
6715
|
+
gen.if((0, codegen_1._)`typeof ${fDef} == "object" && !(${fDef} instanceof RegExp)`, () => gen.assign(fType, (0, codegen_1._)`${fDef}.type || "string"`).assign(format, (0, codegen_1._)`${fDef}.validate`), () => gen.assign(fType, (0, codegen_1._)`"string"`).assign(format, fDef));
|
|
6716
|
+
cxt.fail$data((0, codegen_1.or)(unknownFmt(), invalidFmt()));
|
|
6717
|
+
function unknownFmt() {
|
|
6718
|
+
if (opts.strictSchema === false)
|
|
6719
|
+
return codegen_1.nil;
|
|
6720
|
+
return (0, codegen_1._)`${schemaCode} && !${format}`;
|
|
6721
|
+
}
|
|
6722
|
+
function invalidFmt() {
|
|
6723
|
+
const callFormat = schemaEnv.$async ? (0, codegen_1._)`(${fDef}.async ? await ${format}(${data}) : ${format}(${data}))` : (0, codegen_1._)`${format}(${data})`;
|
|
6724
|
+
const validData = (0, codegen_1._)`(typeof ${format} == "function" ? ${callFormat} : ${format}.test(${data}))`;
|
|
6725
|
+
return (0, codegen_1._)`${format} && ${format} !== true && ${fType} === ${ruleType} && !${validData}`;
|
|
6726
|
+
}
|
|
6727
|
+
}
|
|
6728
|
+
function validateFormat() {
|
|
6729
|
+
const formatDef = self.formats[schema];
|
|
6730
|
+
if (!formatDef) {
|
|
6731
|
+
unknownFormat();
|
|
6732
|
+
return;
|
|
6733
|
+
}
|
|
6734
|
+
if (formatDef === true)
|
|
6735
|
+
return;
|
|
6736
|
+
const [fmtType, format, fmtRef] = getFormat(formatDef);
|
|
6737
|
+
if (fmtType === ruleType)
|
|
6738
|
+
cxt.pass(validCondition());
|
|
6739
|
+
function unknownFormat() {
|
|
6740
|
+
if (opts.strictSchema === false) {
|
|
6741
|
+
self.logger.warn(unknownMsg());
|
|
6742
|
+
return;
|
|
6743
|
+
}
|
|
6744
|
+
throw new Error(unknownMsg());
|
|
6745
|
+
function unknownMsg() {
|
|
6746
|
+
return `unknown format "${schema}" ignored in schema at path "${errSchemaPath}"`;
|
|
6747
|
+
}
|
|
6748
|
+
}
|
|
6749
|
+
function getFormat(fmtDef) {
|
|
6750
|
+
const code = fmtDef instanceof RegExp ? (0, codegen_1.regexpCode)(fmtDef) : opts.code.formats ? (0, codegen_1._)`${opts.code.formats}${(0, codegen_1.getProperty)(schema)}` : void 0;
|
|
6751
|
+
const fmt = gen.scopeValue("formats", { key: schema, ref: fmtDef, code });
|
|
6752
|
+
if (typeof fmtDef == "object" && !(fmtDef instanceof RegExp)) {
|
|
6753
|
+
return [fmtDef.type || "string", fmtDef.validate, (0, codegen_1._)`${fmt}.validate`];
|
|
6754
|
+
}
|
|
6755
|
+
return ["string", fmtDef, fmt];
|
|
6756
|
+
}
|
|
6757
|
+
function validCondition() {
|
|
6758
|
+
if (typeof formatDef == "object" && !(formatDef instanceof RegExp) && formatDef.async) {
|
|
6759
|
+
if (!schemaEnv.$async)
|
|
6760
|
+
throw new Error("async format in sync schema");
|
|
6761
|
+
return (0, codegen_1._)`await ${fmtRef}(${data})`;
|
|
6762
|
+
}
|
|
6763
|
+
return typeof format == "function" ? (0, codegen_1._)`${fmtRef}(${data})` : (0, codegen_1._)`${fmtRef}.test(${data})`;
|
|
6764
|
+
}
|
|
6928
6765
|
}
|
|
6929
6766
|
}
|
|
6930
|
-
|
|
6931
|
-
return valid ? () => gen.block(() => {
|
|
6932
|
-
(0, ref_1.callRef)(cxt, validate);
|
|
6933
|
-
gen.let(valid, true);
|
|
6934
|
-
}) : () => (0, ref_1.callRef)(cxt, validate);
|
|
6935
|
-
}
|
|
6936
|
-
}
|
|
6937
|
-
exports.dynamicRef = dynamicRef;
|
|
6767
|
+
};
|
|
6938
6768
|
exports.default = def;
|
|
6939
6769
|
}
|
|
6940
6770
|
});
|
|
6941
6771
|
|
|
6942
|
-
// node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/
|
|
6943
|
-
var
|
|
6944
|
-
"node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/
|
|
6772
|
+
// node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/format/index.js
|
|
6773
|
+
var require_format2 = __commonJS({
|
|
6774
|
+
"node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/format/index.js"(exports) {
|
|
6945
6775
|
"use strict";
|
|
6946
6776
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6947
|
-
var
|
|
6948
|
-
var
|
|
6949
|
-
|
|
6950
|
-
keyword: "$recursiveAnchor",
|
|
6951
|
-
schemaType: "boolean",
|
|
6952
|
-
code(cxt) {
|
|
6953
|
-
if (cxt.schema)
|
|
6954
|
-
(0, dynamicAnchor_1.dynamicAnchor)(cxt, "");
|
|
6955
|
-
else
|
|
6956
|
-
(0, util_1.checkStrictMode)(cxt.it, "$recursiveAnchor: false is ignored");
|
|
6957
|
-
}
|
|
6958
|
-
};
|
|
6959
|
-
exports.default = def;
|
|
6777
|
+
var format_1 = require_format();
|
|
6778
|
+
var format = [format_1.default];
|
|
6779
|
+
exports.default = format;
|
|
6960
6780
|
}
|
|
6961
6781
|
});
|
|
6962
6782
|
|
|
6963
|
-
// node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/
|
|
6964
|
-
var
|
|
6965
|
-
"node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/
|
|
6783
|
+
// node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/metadata.js
|
|
6784
|
+
var require_metadata = __commonJS({
|
|
6785
|
+
"node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/metadata.js"(exports) {
|
|
6966
6786
|
"use strict";
|
|
6967
6787
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6968
|
-
|
|
6969
|
-
|
|
6970
|
-
|
|
6971
|
-
|
|
6972
|
-
|
|
6973
|
-
|
|
6974
|
-
|
|
6788
|
+
exports.contentVocabulary = exports.metadataVocabulary = void 0;
|
|
6789
|
+
exports.metadataVocabulary = [
|
|
6790
|
+
"title",
|
|
6791
|
+
"description",
|
|
6792
|
+
"default",
|
|
6793
|
+
"deprecated",
|
|
6794
|
+
"readOnly",
|
|
6795
|
+
"writeOnly",
|
|
6796
|
+
"examples"
|
|
6797
|
+
];
|
|
6798
|
+
exports.contentVocabulary = [
|
|
6799
|
+
"contentMediaType",
|
|
6800
|
+
"contentEncoding",
|
|
6801
|
+
"contentSchema"
|
|
6802
|
+
];
|
|
6975
6803
|
}
|
|
6976
6804
|
});
|
|
6977
6805
|
|
|
6978
|
-
// node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/
|
|
6979
|
-
var
|
|
6980
|
-
"node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/
|
|
6806
|
+
// node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/draft2020.js
|
|
6807
|
+
var require_draft2020 = __commonJS({
|
|
6808
|
+
"node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/draft2020.js"(exports) {
|
|
6981
6809
|
"use strict";
|
|
6982
6810
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6983
|
-
var
|
|
6984
|
-
var
|
|
6985
|
-
var
|
|
6986
|
-
var
|
|
6987
|
-
var
|
|
6988
|
-
|
|
6811
|
+
var core_1 = require_core2();
|
|
6812
|
+
var validation_1 = require_validation();
|
|
6813
|
+
var applicator_1 = require_applicator();
|
|
6814
|
+
var dynamic_1 = require_dynamic();
|
|
6815
|
+
var next_1 = require_next();
|
|
6816
|
+
var unevaluated_1 = require_unevaluated();
|
|
6817
|
+
var format_1 = require_format2();
|
|
6818
|
+
var metadata_1 = require_metadata();
|
|
6819
|
+
var draft2020Vocabularies = [
|
|
6820
|
+
dynamic_1.default,
|
|
6821
|
+
core_1.default,
|
|
6822
|
+
validation_1.default,
|
|
6823
|
+
(0, applicator_1.default)(true),
|
|
6824
|
+
format_1.default,
|
|
6825
|
+
metadata_1.metadataVocabulary,
|
|
6826
|
+
metadata_1.contentVocabulary,
|
|
6827
|
+
next_1.default,
|
|
6828
|
+
unevaluated_1.default
|
|
6829
|
+
];
|
|
6830
|
+
exports.default = draft2020Vocabularies;
|
|
6989
6831
|
}
|
|
6990
6832
|
});
|
|
6991
6833
|
|
|
6992
|
-
// node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/
|
|
6993
|
-
var
|
|
6994
|
-
"node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/
|
|
6834
|
+
// node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/discriminator/types.js
|
|
6835
|
+
var require_types = __commonJS({
|
|
6836
|
+
"node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/discriminator/types.js"(exports) {
|
|
6995
6837
|
"use strict";
|
|
6996
6838
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6997
|
-
|
|
6998
|
-
var
|
|
6999
|
-
|
|
7000
|
-
|
|
7001
|
-
|
|
7002
|
-
|
|
7003
|
-
code: (cxt) => (0, dependencies_1.validatePropertyDeps)(cxt)
|
|
7004
|
-
};
|
|
7005
|
-
exports.default = def;
|
|
6839
|
+
exports.DiscrError = void 0;
|
|
6840
|
+
var DiscrError;
|
|
6841
|
+
(function(DiscrError2) {
|
|
6842
|
+
DiscrError2["Tag"] = "tag";
|
|
6843
|
+
DiscrError2["Mapping"] = "mapping";
|
|
6844
|
+
})(DiscrError || (exports.DiscrError = DiscrError = {}));
|
|
7006
6845
|
}
|
|
7007
6846
|
});
|
|
7008
6847
|
|
|
7009
|
-
// node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/
|
|
7010
|
-
var
|
|
7011
|
-
"node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/
|
|
6848
|
+
// node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/discriminator/index.js
|
|
6849
|
+
var require_discriminator = __commonJS({
|
|
6850
|
+
"node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/discriminator/index.js"(exports) {
|
|
7012
6851
|
"use strict";
|
|
7013
6852
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7014
|
-
var
|
|
6853
|
+
var codegen_1 = require_codegen();
|
|
6854
|
+
var types_1 = require_types();
|
|
6855
|
+
var compile_1 = require_compile();
|
|
6856
|
+
var ref_error_1 = require_ref_error();
|
|
6857
|
+
var util_1 = require_util();
|
|
6858
|
+
var error = {
|
|
6859
|
+
message: ({ params: { discrError, tagName } }) => discrError === types_1.DiscrError.Tag ? `tag "${tagName}" must be string` : `value of tag "${tagName}" must be in oneOf`,
|
|
6860
|
+
params: ({ params: { discrError, tag, tagName } }) => (0, codegen_1._)`{error: ${discrError}, tag: ${tagName}, tagValue: ${tag}}`
|
|
6861
|
+
};
|
|
7015
6862
|
var def = {
|
|
7016
|
-
keyword: "
|
|
6863
|
+
keyword: "discriminator",
|
|
7017
6864
|
type: "object",
|
|
7018
6865
|
schemaType: "object",
|
|
7019
|
-
|
|
6866
|
+
error,
|
|
6867
|
+
code(cxt) {
|
|
6868
|
+
const { gen, data, schema, parentSchema, it } = cxt;
|
|
6869
|
+
const { oneOf } = parentSchema;
|
|
6870
|
+
if (!it.opts.discriminator) {
|
|
6871
|
+
throw new Error("discriminator: requires discriminator option");
|
|
6872
|
+
}
|
|
6873
|
+
const tagName = schema.propertyName;
|
|
6874
|
+
if (typeof tagName != "string")
|
|
6875
|
+
throw new Error("discriminator: requires propertyName");
|
|
6876
|
+
if (schema.mapping)
|
|
6877
|
+
throw new Error("discriminator: mapping is not supported");
|
|
6878
|
+
if (!oneOf)
|
|
6879
|
+
throw new Error("discriminator: requires oneOf keyword");
|
|
6880
|
+
const valid = gen.let("valid", false);
|
|
6881
|
+
const tag = gen.const("tag", (0, codegen_1._)`${data}${(0, codegen_1.getProperty)(tagName)}`);
|
|
6882
|
+
gen.if((0, codegen_1._)`typeof ${tag} == "string"`, () => validateMapping(), () => cxt.error(false, { discrError: types_1.DiscrError.Tag, tag, tagName }));
|
|
6883
|
+
cxt.ok(valid);
|
|
6884
|
+
function validateMapping() {
|
|
6885
|
+
const mapping = getMapping();
|
|
6886
|
+
gen.if(false);
|
|
6887
|
+
for (const tagValue in mapping) {
|
|
6888
|
+
gen.elseIf((0, codegen_1._)`${tag} === ${tagValue}`);
|
|
6889
|
+
gen.assign(valid, applyTagSchema(mapping[tagValue]));
|
|
6890
|
+
}
|
|
6891
|
+
gen.else();
|
|
6892
|
+
cxt.error(false, { discrError: types_1.DiscrError.Mapping, tag, tagName });
|
|
6893
|
+
gen.endIf();
|
|
6894
|
+
}
|
|
6895
|
+
function applyTagSchema(schemaProp) {
|
|
6896
|
+
const _valid = gen.name("valid");
|
|
6897
|
+
const schCxt = cxt.subschema({ keyword: "oneOf", schemaProp }, _valid);
|
|
6898
|
+
cxt.mergeEvaluated(schCxt, codegen_1.Name);
|
|
6899
|
+
return _valid;
|
|
6900
|
+
}
|
|
6901
|
+
function getMapping() {
|
|
6902
|
+
var _a;
|
|
6903
|
+
const oneOfMapping = {};
|
|
6904
|
+
const topRequired = hasRequired(parentSchema);
|
|
6905
|
+
let tagRequired = true;
|
|
6906
|
+
for (let i = 0; i < oneOf.length; i++) {
|
|
6907
|
+
let sch = oneOf[i];
|
|
6908
|
+
if ((sch === null || sch === void 0 ? void 0 : sch.$ref) && !(0, util_1.schemaHasRulesButRef)(sch, it.self.RULES)) {
|
|
6909
|
+
const ref = sch.$ref;
|
|
6910
|
+
sch = compile_1.resolveRef.call(it.self, it.schemaEnv.root, it.baseId, ref);
|
|
6911
|
+
if (sch instanceof compile_1.SchemaEnv)
|
|
6912
|
+
sch = sch.schema;
|
|
6913
|
+
if (sch === void 0)
|
|
6914
|
+
throw new ref_error_1.default(it.opts.uriResolver, it.baseId, ref);
|
|
6915
|
+
}
|
|
6916
|
+
const propSch = (_a = sch === null || sch === void 0 ? void 0 : sch.properties) === null || _a === void 0 ? void 0 : _a[tagName];
|
|
6917
|
+
if (typeof propSch != "object") {
|
|
6918
|
+
throw new Error(`discriminator: oneOf subschemas (or referenced schemas) must have "properties/${tagName}"`);
|
|
6919
|
+
}
|
|
6920
|
+
tagRequired = tagRequired && (topRequired || hasRequired(sch));
|
|
6921
|
+
addMappings(propSch, i);
|
|
6922
|
+
}
|
|
6923
|
+
if (!tagRequired)
|
|
6924
|
+
throw new Error(`discriminator: "${tagName}" must be required`);
|
|
6925
|
+
return oneOfMapping;
|
|
6926
|
+
function hasRequired({ required }) {
|
|
6927
|
+
return Array.isArray(required) && required.includes(tagName);
|
|
6928
|
+
}
|
|
6929
|
+
function addMappings(sch, i) {
|
|
6930
|
+
if (sch.const) {
|
|
6931
|
+
addMapping(sch.const, i);
|
|
6932
|
+
} else if (sch.enum) {
|
|
6933
|
+
for (const tagValue of sch.enum) {
|
|
6934
|
+
addMapping(tagValue, i);
|
|
6935
|
+
}
|
|
6936
|
+
} else {
|
|
6937
|
+
throw new Error(`discriminator: "properties/${tagName}" must have "const" or "enum"`);
|
|
6938
|
+
}
|
|
6939
|
+
}
|
|
6940
|
+
function addMapping(tagValue, i) {
|
|
6941
|
+
if (typeof tagValue != "string" || tagValue in oneOfMapping) {
|
|
6942
|
+
throw new Error(`discriminator: "${tagName}" values must be unique strings`);
|
|
6943
|
+
}
|
|
6944
|
+
oneOfMapping[tagValue] = i;
|
|
6945
|
+
}
|
|
6946
|
+
}
|
|
6947
|
+
}
|
|
6948
|
+
};
|
|
6949
|
+
exports.default = def;
|
|
6950
|
+
}
|
|
6951
|
+
});
|
|
6952
|
+
|
|
6953
|
+
// node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/refs/json-schema-2020-12/schema.json
|
|
6954
|
+
var require_schema = __commonJS({
|
|
6955
|
+
"node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/refs/json-schema-2020-12/schema.json"(exports, module) {
|
|
6956
|
+
module.exports = {
|
|
6957
|
+
$schema: "https://json-schema.org/draft/2020-12/schema",
|
|
6958
|
+
$id: "https://json-schema.org/draft/2020-12/schema",
|
|
6959
|
+
$vocabulary: {
|
|
6960
|
+
"https://json-schema.org/draft/2020-12/vocab/core": true,
|
|
6961
|
+
"https://json-schema.org/draft/2020-12/vocab/applicator": true,
|
|
6962
|
+
"https://json-schema.org/draft/2020-12/vocab/unevaluated": true,
|
|
6963
|
+
"https://json-schema.org/draft/2020-12/vocab/validation": true,
|
|
6964
|
+
"https://json-schema.org/draft/2020-12/vocab/meta-data": true,
|
|
6965
|
+
"https://json-schema.org/draft/2020-12/vocab/format-annotation": true,
|
|
6966
|
+
"https://json-schema.org/draft/2020-12/vocab/content": true
|
|
6967
|
+
},
|
|
6968
|
+
$dynamicAnchor: "meta",
|
|
6969
|
+
title: "Core and Validation specifications meta-schema",
|
|
6970
|
+
allOf: [
|
|
6971
|
+
{ $ref: "meta/core" },
|
|
6972
|
+
{ $ref: "meta/applicator" },
|
|
6973
|
+
{ $ref: "meta/unevaluated" },
|
|
6974
|
+
{ $ref: "meta/validation" },
|
|
6975
|
+
{ $ref: "meta/meta-data" },
|
|
6976
|
+
{ $ref: "meta/format-annotation" },
|
|
6977
|
+
{ $ref: "meta/content" }
|
|
6978
|
+
],
|
|
6979
|
+
type: ["object", "boolean"],
|
|
6980
|
+
$comment: "This meta-schema also defines keywords that have appeared in previous drafts in order to prevent incompatible extensions as they remain in common use.",
|
|
6981
|
+
properties: {
|
|
6982
|
+
definitions: {
|
|
6983
|
+
$comment: '"definitions" has been replaced by "$defs".',
|
|
6984
|
+
type: "object",
|
|
6985
|
+
additionalProperties: { $dynamicRef: "#meta" },
|
|
6986
|
+
deprecated: true,
|
|
6987
|
+
default: {}
|
|
6988
|
+
},
|
|
6989
|
+
dependencies: {
|
|
6990
|
+
$comment: '"dependencies" has been split and replaced by "dependentSchemas" and "dependentRequired" in order to serve their differing semantics.',
|
|
6991
|
+
type: "object",
|
|
6992
|
+
additionalProperties: {
|
|
6993
|
+
anyOf: [{ $dynamicRef: "#meta" }, { $ref: "meta/validation#/$defs/stringArray" }]
|
|
6994
|
+
},
|
|
6995
|
+
deprecated: true,
|
|
6996
|
+
default: {}
|
|
6997
|
+
},
|
|
6998
|
+
$recursiveAnchor: {
|
|
6999
|
+
$comment: '"$recursiveAnchor" has been replaced by "$dynamicAnchor".',
|
|
7000
|
+
$ref: "meta/core#/$defs/anchorString",
|
|
7001
|
+
deprecated: true
|
|
7002
|
+
},
|
|
7003
|
+
$recursiveRef: {
|
|
7004
|
+
$comment: '"$recursiveRef" has been replaced by "$dynamicRef".',
|
|
7005
|
+
$ref: "meta/core#/$defs/uriReferenceString",
|
|
7006
|
+
deprecated: true
|
|
7007
|
+
}
|
|
7008
|
+
}
|
|
7020
7009
|
};
|
|
7021
|
-
exports.default = def;
|
|
7022
7010
|
}
|
|
7023
7011
|
});
|
|
7024
7012
|
|
|
7025
|
-
// node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/
|
|
7026
|
-
var
|
|
7027
|
-
"node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/
|
|
7028
|
-
|
|
7029
|
-
|
|
7030
|
-
|
|
7031
|
-
|
|
7032
|
-
|
|
7033
|
-
|
|
7034
|
-
|
|
7035
|
-
|
|
7036
|
-
|
|
7037
|
-
|
|
7013
|
+
// node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/refs/json-schema-2020-12/meta/applicator.json
|
|
7014
|
+
var require_applicator2 = __commonJS({
|
|
7015
|
+
"node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/refs/json-schema-2020-12/meta/applicator.json"(exports, module) {
|
|
7016
|
+
module.exports = {
|
|
7017
|
+
$schema: "https://json-schema.org/draft/2020-12/schema",
|
|
7018
|
+
$id: "https://json-schema.org/draft/2020-12/meta/applicator",
|
|
7019
|
+
$vocabulary: {
|
|
7020
|
+
"https://json-schema.org/draft/2020-12/vocab/applicator": true
|
|
7021
|
+
},
|
|
7022
|
+
$dynamicAnchor: "meta",
|
|
7023
|
+
title: "Applicator vocabulary meta-schema",
|
|
7024
|
+
type: ["object", "boolean"],
|
|
7025
|
+
properties: {
|
|
7026
|
+
prefixItems: { $ref: "#/$defs/schemaArray" },
|
|
7027
|
+
items: { $dynamicRef: "#meta" },
|
|
7028
|
+
contains: { $dynamicRef: "#meta" },
|
|
7029
|
+
additionalProperties: { $dynamicRef: "#meta" },
|
|
7030
|
+
properties: {
|
|
7031
|
+
type: "object",
|
|
7032
|
+
additionalProperties: { $dynamicRef: "#meta" },
|
|
7033
|
+
default: {}
|
|
7034
|
+
},
|
|
7035
|
+
patternProperties: {
|
|
7036
|
+
type: "object",
|
|
7037
|
+
additionalProperties: { $dynamicRef: "#meta" },
|
|
7038
|
+
propertyNames: { format: "regex" },
|
|
7039
|
+
default: {}
|
|
7040
|
+
},
|
|
7041
|
+
dependentSchemas: {
|
|
7042
|
+
type: "object",
|
|
7043
|
+
additionalProperties: { $dynamicRef: "#meta" },
|
|
7044
|
+
default: {}
|
|
7045
|
+
},
|
|
7046
|
+
propertyNames: { $dynamicRef: "#meta" },
|
|
7047
|
+
if: { $dynamicRef: "#meta" },
|
|
7048
|
+
then: { $dynamicRef: "#meta" },
|
|
7049
|
+
else: { $dynamicRef: "#meta" },
|
|
7050
|
+
allOf: { $ref: "#/$defs/schemaArray" },
|
|
7051
|
+
anyOf: { $ref: "#/$defs/schemaArray" },
|
|
7052
|
+
oneOf: { $ref: "#/$defs/schemaArray" },
|
|
7053
|
+
not: { $dynamicRef: "#meta" }
|
|
7054
|
+
},
|
|
7055
|
+
$defs: {
|
|
7056
|
+
schemaArray: {
|
|
7057
|
+
type: "array",
|
|
7058
|
+
minItems: 1,
|
|
7059
|
+
items: { $dynamicRef: "#meta" }
|
|
7038
7060
|
}
|
|
7039
7061
|
}
|
|
7040
7062
|
};
|
|
7041
|
-
exports.default = def;
|
|
7042
7063
|
}
|
|
7043
7064
|
});
|
|
7044
7065
|
|
|
7045
|
-
// node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/
|
|
7046
|
-
var
|
|
7047
|
-
"node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/
|
|
7048
|
-
|
|
7049
|
-
|
|
7050
|
-
|
|
7051
|
-
|
|
7052
|
-
|
|
7053
|
-
|
|
7054
|
-
|
|
7066
|
+
// node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/refs/json-schema-2020-12/meta/unevaluated.json
|
|
7067
|
+
var require_unevaluated2 = __commonJS({
|
|
7068
|
+
"node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/refs/json-schema-2020-12/meta/unevaluated.json"(exports, module) {
|
|
7069
|
+
module.exports = {
|
|
7070
|
+
$schema: "https://json-schema.org/draft/2020-12/schema",
|
|
7071
|
+
$id: "https://json-schema.org/draft/2020-12/meta/unevaluated",
|
|
7072
|
+
$vocabulary: {
|
|
7073
|
+
"https://json-schema.org/draft/2020-12/vocab/unevaluated": true
|
|
7074
|
+
},
|
|
7075
|
+
$dynamicAnchor: "meta",
|
|
7076
|
+
title: "Unevaluated applicator vocabulary meta-schema",
|
|
7077
|
+
type: ["object", "boolean"],
|
|
7078
|
+
properties: {
|
|
7079
|
+
unevaluatedItems: { $dynamicRef: "#meta" },
|
|
7080
|
+
unevaluatedProperties: { $dynamicRef: "#meta" }
|
|
7081
|
+
}
|
|
7082
|
+
};
|
|
7055
7083
|
}
|
|
7056
7084
|
});
|
|
7057
7085
|
|
|
7058
|
-
// node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/
|
|
7059
|
-
var
|
|
7060
|
-
"node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/
|
|
7061
|
-
|
|
7062
|
-
|
|
7063
|
-
|
|
7064
|
-
|
|
7065
|
-
|
|
7066
|
-
|
|
7067
|
-
|
|
7068
|
-
|
|
7069
|
-
|
|
7070
|
-
|
|
7071
|
-
|
|
7072
|
-
|
|
7073
|
-
|
|
7074
|
-
trackErrors: true,
|
|
7075
|
-
error,
|
|
7076
|
-
code(cxt) {
|
|
7077
|
-
const { gen, schema, data, errsCount, it } = cxt;
|
|
7078
|
-
if (!errsCount)
|
|
7079
|
-
throw new Error("ajv implementation error");
|
|
7080
|
-
const { allErrors, props } = it;
|
|
7081
|
-
if (props instanceof codegen_1.Name) {
|
|
7082
|
-
gen.if((0, codegen_1._)`${props} !== true`, () => gen.forIn("key", data, (key) => gen.if(unevaluatedDynamic(props, key), () => unevaluatedPropCode(key))));
|
|
7083
|
-
} else if (props !== true) {
|
|
7084
|
-
gen.forIn("key", data, (key) => props === void 0 ? unevaluatedPropCode(key) : gen.if(unevaluatedStatic(props, key), () => unevaluatedPropCode(key)));
|
|
7085
|
-
}
|
|
7086
|
-
it.props = true;
|
|
7087
|
-
cxt.ok((0, codegen_1._)`${errsCount} === ${names_1.default.errors}`);
|
|
7088
|
-
function unevaluatedPropCode(key) {
|
|
7089
|
-
if (schema === false) {
|
|
7090
|
-
cxt.setParams({ unevaluatedProperty: key });
|
|
7091
|
-
cxt.error();
|
|
7092
|
-
if (!allErrors)
|
|
7093
|
-
gen.break();
|
|
7094
|
-
return;
|
|
7095
|
-
}
|
|
7096
|
-
if (!(0, util_1.alwaysValidSchema)(it, schema)) {
|
|
7097
|
-
const valid = gen.name("valid");
|
|
7098
|
-
cxt.subschema({
|
|
7099
|
-
keyword: "unevaluatedProperties",
|
|
7100
|
-
dataProp: key,
|
|
7101
|
-
dataPropType: util_1.Type.Str
|
|
7102
|
-
}, valid);
|
|
7103
|
-
if (!allErrors)
|
|
7104
|
-
gen.if((0, codegen_1.not)(valid), () => gen.break());
|
|
7105
|
-
}
|
|
7106
|
-
}
|
|
7107
|
-
function unevaluatedDynamic(evaluatedProps, key) {
|
|
7108
|
-
return (0, codegen_1._)`!${evaluatedProps} || !${evaluatedProps}[${key}]`;
|
|
7109
|
-
}
|
|
7110
|
-
function unevaluatedStatic(evaluatedProps, key) {
|
|
7111
|
-
const ps = [];
|
|
7112
|
-
for (const p in evaluatedProps) {
|
|
7113
|
-
if (evaluatedProps[p] === true)
|
|
7114
|
-
ps.push((0, codegen_1._)`${key} !== ${p}`);
|
|
7115
|
-
}
|
|
7116
|
-
return (0, codegen_1.and)(...ps);
|
|
7117
|
-
}
|
|
7086
|
+
// node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/refs/json-schema-2020-12/meta/content.json
|
|
7087
|
+
var require_content = __commonJS({
|
|
7088
|
+
"node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/refs/json-schema-2020-12/meta/content.json"(exports, module) {
|
|
7089
|
+
module.exports = {
|
|
7090
|
+
$schema: "https://json-schema.org/draft/2020-12/schema",
|
|
7091
|
+
$id: "https://json-schema.org/draft/2020-12/meta/content",
|
|
7092
|
+
$vocabulary: {
|
|
7093
|
+
"https://json-schema.org/draft/2020-12/vocab/content": true
|
|
7094
|
+
},
|
|
7095
|
+
$dynamicAnchor: "meta",
|
|
7096
|
+
title: "Content vocabulary meta-schema",
|
|
7097
|
+
type: ["object", "boolean"],
|
|
7098
|
+
properties: {
|
|
7099
|
+
contentEncoding: { type: "string" },
|
|
7100
|
+
contentMediaType: { type: "string" },
|
|
7101
|
+
contentSchema: { $dynamicRef: "#meta" }
|
|
7118
7102
|
}
|
|
7119
7103
|
};
|
|
7120
|
-
exports.default = def;
|
|
7121
7104
|
}
|
|
7122
7105
|
});
|
|
7123
7106
|
|
|
7124
|
-
// node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/
|
|
7125
|
-
var
|
|
7126
|
-
"node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/
|
|
7127
|
-
|
|
7128
|
-
|
|
7129
|
-
|
|
7130
|
-
|
|
7131
|
-
|
|
7132
|
-
|
|
7133
|
-
|
|
7134
|
-
|
|
7135
|
-
|
|
7136
|
-
|
|
7137
|
-
|
|
7138
|
-
|
|
7139
|
-
|
|
7140
|
-
|
|
7141
|
-
|
|
7142
|
-
|
|
7143
|
-
|
|
7144
|
-
|
|
7145
|
-
|
|
7146
|
-
|
|
7147
|
-
|
|
7148
|
-
|
|
7149
|
-
|
|
7150
|
-
|
|
7151
|
-
|
|
7152
|
-
|
|
7107
|
+
// node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/refs/json-schema-2020-12/meta/core.json
|
|
7108
|
+
var require_core3 = __commonJS({
|
|
7109
|
+
"node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/refs/json-schema-2020-12/meta/core.json"(exports, module) {
|
|
7110
|
+
module.exports = {
|
|
7111
|
+
$schema: "https://json-schema.org/draft/2020-12/schema",
|
|
7112
|
+
$id: "https://json-schema.org/draft/2020-12/meta/core",
|
|
7113
|
+
$vocabulary: {
|
|
7114
|
+
"https://json-schema.org/draft/2020-12/vocab/core": true
|
|
7115
|
+
},
|
|
7116
|
+
$dynamicAnchor: "meta",
|
|
7117
|
+
title: "Core vocabulary meta-schema",
|
|
7118
|
+
type: ["object", "boolean"],
|
|
7119
|
+
properties: {
|
|
7120
|
+
$id: {
|
|
7121
|
+
$ref: "#/$defs/uriReferenceString",
|
|
7122
|
+
$comment: "Non-empty fragments not allowed.",
|
|
7123
|
+
pattern: "^[^#]*#?$"
|
|
7124
|
+
},
|
|
7125
|
+
$schema: { $ref: "#/$defs/uriString" },
|
|
7126
|
+
$ref: { $ref: "#/$defs/uriReferenceString" },
|
|
7127
|
+
$anchor: { $ref: "#/$defs/anchorString" },
|
|
7128
|
+
$dynamicRef: { $ref: "#/$defs/uriReferenceString" },
|
|
7129
|
+
$dynamicAnchor: { $ref: "#/$defs/anchorString" },
|
|
7130
|
+
$vocabulary: {
|
|
7131
|
+
type: "object",
|
|
7132
|
+
propertyNames: { $ref: "#/$defs/uriString" },
|
|
7133
|
+
additionalProperties: {
|
|
7134
|
+
type: "boolean"
|
|
7135
|
+
}
|
|
7136
|
+
},
|
|
7137
|
+
$comment: {
|
|
7138
|
+
type: "string"
|
|
7139
|
+
},
|
|
7140
|
+
$defs: {
|
|
7141
|
+
type: "object",
|
|
7142
|
+
additionalProperties: { $dynamicRef: "#meta" }
|
|
7153
7143
|
}
|
|
7154
|
-
|
|
7155
|
-
|
|
7156
|
-
|
|
7157
|
-
|
|
7158
|
-
|
|
7159
|
-
|
|
7160
|
-
|
|
7144
|
+
},
|
|
7145
|
+
$defs: {
|
|
7146
|
+
anchorString: {
|
|
7147
|
+
type: "string",
|
|
7148
|
+
pattern: "^[A-Za-z_][-A-Za-z0-9._]*$"
|
|
7149
|
+
},
|
|
7150
|
+
uriString: {
|
|
7151
|
+
type: "string",
|
|
7152
|
+
format: "uri"
|
|
7153
|
+
},
|
|
7154
|
+
uriReferenceString: {
|
|
7155
|
+
type: "string",
|
|
7156
|
+
format: "uri-reference"
|
|
7161
7157
|
}
|
|
7162
7158
|
}
|
|
7163
7159
|
};
|
|
7164
|
-
exports.default = def;
|
|
7165
|
-
}
|
|
7166
|
-
});
|
|
7167
|
-
|
|
7168
|
-
// node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/unevaluated/index.js
|
|
7169
|
-
var require_unevaluated = __commonJS({
|
|
7170
|
-
"node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/unevaluated/index.js"(exports) {
|
|
7171
|
-
"use strict";
|
|
7172
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7173
|
-
var unevaluatedProperties_1 = require_unevaluatedProperties();
|
|
7174
|
-
var unevaluatedItems_1 = require_unevaluatedItems();
|
|
7175
|
-
var unevaluated = [unevaluatedProperties_1.default, unevaluatedItems_1.default];
|
|
7176
|
-
exports.default = unevaluated;
|
|
7177
7160
|
}
|
|
7178
7161
|
});
|
|
7179
7162
|
|
|
7180
|
-
// node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/
|
|
7181
|
-
var
|
|
7182
|
-
"node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/
|
|
7183
|
-
|
|
7184
|
-
|
|
7185
|
-
|
|
7186
|
-
|
|
7187
|
-
|
|
7188
|
-
|
|
7189
|
-
|
|
7190
|
-
|
|
7191
|
-
|
|
7192
|
-
|
|
7193
|
-
|
|
7194
|
-
|
|
7195
|
-
|
|
7196
|
-
validation_1.default,
|
|
7197
|
-
(0, applicator_1.default)(true),
|
|
7198
|
-
format_1.default,
|
|
7199
|
-
metadata_1.metadataVocabulary,
|
|
7200
|
-
metadata_1.contentVocabulary,
|
|
7201
|
-
next_1.default,
|
|
7202
|
-
unevaluated_1.default
|
|
7203
|
-
];
|
|
7204
|
-
exports.default = draft2020Vocabularies;
|
|
7163
|
+
// node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/refs/json-schema-2020-12/meta/format-annotation.json
|
|
7164
|
+
var require_format_annotation = __commonJS({
|
|
7165
|
+
"node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/refs/json-schema-2020-12/meta/format-annotation.json"(exports, module) {
|
|
7166
|
+
module.exports = {
|
|
7167
|
+
$schema: "https://json-schema.org/draft/2020-12/schema",
|
|
7168
|
+
$id: "https://json-schema.org/draft/2020-12/meta/format-annotation",
|
|
7169
|
+
$vocabulary: {
|
|
7170
|
+
"https://json-schema.org/draft/2020-12/vocab/format-annotation": true
|
|
7171
|
+
},
|
|
7172
|
+
$dynamicAnchor: "meta",
|
|
7173
|
+
title: "Format vocabulary meta-schema for annotation results",
|
|
7174
|
+
type: ["object", "boolean"],
|
|
7175
|
+
properties: {
|
|
7176
|
+
format: { type: "string" }
|
|
7177
|
+
}
|
|
7178
|
+
};
|
|
7205
7179
|
}
|
|
7206
7180
|
});
|
|
7207
7181
|
|
|
7208
|
-
// node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/refs/json-schema-2020-12/
|
|
7209
|
-
var
|
|
7210
|
-
"node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/refs/json-schema-2020-12/
|
|
7182
|
+
// node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/refs/json-schema-2020-12/meta/meta-data.json
|
|
7183
|
+
var require_meta_data = __commonJS({
|
|
7184
|
+
"node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/refs/json-schema-2020-12/meta/meta-data.json"(exports, module) {
|
|
7211
7185
|
module.exports = {
|
|
7212
7186
|
$schema: "https://json-schema.org/draft/2020-12/schema",
|
|
7213
|
-
$id: "https://json-schema.org/draft/2020-12/
|
|
7187
|
+
$id: "https://json-schema.org/draft/2020-12/meta/meta-data",
|
|
7214
7188
|
$vocabulary: {
|
|
7215
|
-
"https://json-schema.org/draft/2020-12/vocab/
|
|
7216
|
-
"https://json-schema.org/draft/2020-12/vocab/applicator": true,
|
|
7217
|
-
"https://json-schema.org/draft/2020-12/vocab/unevaluated": true,
|
|
7218
|
-
"https://json-schema.org/draft/2020-12/vocab/validation": true,
|
|
7219
|
-
"https://json-schema.org/draft/2020-12/vocab/meta-data": true,
|
|
7220
|
-
"https://json-schema.org/draft/2020-12/vocab/format-annotation": true,
|
|
7221
|
-
"https://json-schema.org/draft/2020-12/vocab/content": true
|
|
7189
|
+
"https://json-schema.org/draft/2020-12/vocab/meta-data": true
|
|
7222
7190
|
},
|
|
7223
7191
|
$dynamicAnchor: "meta",
|
|
7224
|
-
title: "
|
|
7225
|
-
allOf: [
|
|
7226
|
-
{ $ref: "meta/core" },
|
|
7227
|
-
{ $ref: "meta/applicator" },
|
|
7228
|
-
{ $ref: "meta/unevaluated" },
|
|
7229
|
-
{ $ref: "meta/validation" },
|
|
7230
|
-
{ $ref: "meta/meta-data" },
|
|
7231
|
-
{ $ref: "meta/format-annotation" },
|
|
7232
|
-
{ $ref: "meta/content" }
|
|
7233
|
-
],
|
|
7192
|
+
title: "Meta-data vocabulary meta-schema",
|
|
7234
7193
|
type: ["object", "boolean"],
|
|
7235
|
-
$comment: "This meta-schema also defines keywords that have appeared in previous drafts in order to prevent incompatible extensions as they remain in common use.",
|
|
7236
7194
|
properties: {
|
|
7237
|
-
|
|
7238
|
-
|
|
7239
|
-
type: "object",
|
|
7240
|
-
additionalProperties: { $dynamicRef: "#meta" },
|
|
7241
|
-
deprecated: true,
|
|
7242
|
-
default: {}
|
|
7195
|
+
title: {
|
|
7196
|
+
type: "string"
|
|
7243
7197
|
},
|
|
7244
|
-
|
|
7245
|
-
|
|
7246
|
-
type: "object",
|
|
7247
|
-
additionalProperties: {
|
|
7248
|
-
anyOf: [{ $dynamicRef: "#meta" }, { $ref: "meta/validation#/$defs/stringArray" }]
|
|
7249
|
-
},
|
|
7250
|
-
deprecated: true,
|
|
7251
|
-
default: {}
|
|
7198
|
+
description: {
|
|
7199
|
+
type: "string"
|
|
7252
7200
|
},
|
|
7253
|
-
|
|
7254
|
-
|
|
7255
|
-
|
|
7256
|
-
|
|
7201
|
+
default: true,
|
|
7202
|
+
deprecated: {
|
|
7203
|
+
type: "boolean",
|
|
7204
|
+
default: false
|
|
7257
7205
|
},
|
|
7258
|
-
|
|
7259
|
-
|
|
7260
|
-
|
|
7261
|
-
|
|
7206
|
+
readOnly: {
|
|
7207
|
+
type: "boolean",
|
|
7208
|
+
default: false
|
|
7209
|
+
},
|
|
7210
|
+
writeOnly: {
|
|
7211
|
+
type: "boolean",
|
|
7212
|
+
default: false
|
|
7213
|
+
},
|
|
7214
|
+
examples: {
|
|
7215
|
+
type: "array",
|
|
7216
|
+
items: true
|
|
7262
7217
|
}
|
|
7263
7218
|
}
|
|
7264
7219
|
};
|
|
7265
7220
|
}
|
|
7266
7221
|
});
|
|
7267
7222
|
|
|
7268
|
-
// node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/refs/json-schema-2020-12/meta/
|
|
7269
|
-
var
|
|
7270
|
-
"node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/refs/json-schema-2020-12/meta/
|
|
7223
|
+
// node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/refs/json-schema-2020-12/meta/validation.json
|
|
7224
|
+
var require_validation2 = __commonJS({
|
|
7225
|
+
"node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/refs/json-schema-2020-12/meta/validation.json"(exports, module) {
|
|
7271
7226
|
module.exports = {
|
|
7272
7227
|
$schema: "https://json-schema.org/draft/2020-12/schema",
|
|
7273
|
-
$id: "https://json-schema.org/draft/2020-12/meta/
|
|
7228
|
+
$id: "https://json-schema.org/draft/2020-12/meta/validation",
|
|
7274
7229
|
$vocabulary: {
|
|
7275
|
-
"https://json-schema.org/draft/2020-12/vocab/
|
|
7230
|
+
"https://json-schema.org/draft/2020-12/vocab/validation": true
|
|
7276
7231
|
},
|
|
7277
7232
|
$dynamicAnchor: "meta",
|
|
7278
|
-
title: "
|
|
7233
|
+
title: "Validation vocabulary meta-schema",
|
|
7279
7234
|
type: ["object", "boolean"],
|
|
7280
7235
|
properties: {
|
|
7281
|
-
|
|
7282
|
-
|
|
7283
|
-
|
|
7284
|
-
|
|
7285
|
-
|
|
7286
|
-
|
|
7287
|
-
|
|
7288
|
-
|
|
7236
|
+
type: {
|
|
7237
|
+
anyOf: [
|
|
7238
|
+
{ $ref: "#/$defs/simpleTypes" },
|
|
7239
|
+
{
|
|
7240
|
+
type: "array",
|
|
7241
|
+
items: { $ref: "#/$defs/simpleTypes" },
|
|
7242
|
+
minItems: 1,
|
|
7243
|
+
uniqueItems: true
|
|
7244
|
+
}
|
|
7245
|
+
]
|
|
7289
7246
|
},
|
|
7290
|
-
|
|
7291
|
-
|
|
7292
|
-
|
|
7293
|
-
|
|
7294
|
-
default: {}
|
|
7247
|
+
const: true,
|
|
7248
|
+
enum: {
|
|
7249
|
+
type: "array",
|
|
7250
|
+
items: true
|
|
7295
7251
|
},
|
|
7296
|
-
|
|
7297
|
-
type: "
|
|
7298
|
-
|
|
7299
|
-
default: {}
|
|
7252
|
+
multipleOf: {
|
|
7253
|
+
type: "number",
|
|
7254
|
+
exclusiveMinimum: 0
|
|
7300
7255
|
},
|
|
7301
|
-
|
|
7302
|
-
|
|
7303
|
-
|
|
7304
|
-
|
|
7305
|
-
|
|
7306
|
-
|
|
7307
|
-
|
|
7308
|
-
|
|
7256
|
+
maximum: {
|
|
7257
|
+
type: "number"
|
|
7258
|
+
},
|
|
7259
|
+
exclusiveMaximum: {
|
|
7260
|
+
type: "number"
|
|
7261
|
+
},
|
|
7262
|
+
minimum: {
|
|
7263
|
+
type: "number"
|
|
7264
|
+
},
|
|
7265
|
+
exclusiveMinimum: {
|
|
7266
|
+
type: "number"
|
|
7267
|
+
},
|
|
7268
|
+
maxLength: { $ref: "#/$defs/nonNegativeInteger" },
|
|
7269
|
+
minLength: { $ref: "#/$defs/nonNegativeIntegerDefault0" },
|
|
7270
|
+
pattern: {
|
|
7271
|
+
type: "string",
|
|
7272
|
+
format: "regex"
|
|
7273
|
+
},
|
|
7274
|
+
maxItems: { $ref: "#/$defs/nonNegativeInteger" },
|
|
7275
|
+
minItems: { $ref: "#/$defs/nonNegativeIntegerDefault0" },
|
|
7276
|
+
uniqueItems: {
|
|
7277
|
+
type: "boolean",
|
|
7278
|
+
default: false
|
|
7279
|
+
},
|
|
7280
|
+
maxContains: { $ref: "#/$defs/nonNegativeInteger" },
|
|
7281
|
+
minContains: {
|
|
7282
|
+
$ref: "#/$defs/nonNegativeInteger",
|
|
7283
|
+
default: 1
|
|
7284
|
+
},
|
|
7285
|
+
maxProperties: { $ref: "#/$defs/nonNegativeInteger" },
|
|
7286
|
+
minProperties: { $ref: "#/$defs/nonNegativeIntegerDefault0" },
|
|
7287
|
+
required: { $ref: "#/$defs/stringArray" },
|
|
7288
|
+
dependentRequired: {
|
|
7289
|
+
type: "object",
|
|
7290
|
+
additionalProperties: {
|
|
7291
|
+
$ref: "#/$defs/stringArray"
|
|
7292
|
+
}
|
|
7293
|
+
}
|
|
7309
7294
|
},
|
|
7310
7295
|
$defs: {
|
|
7311
|
-
|
|
7296
|
+
nonNegativeInteger: {
|
|
7297
|
+
type: "integer",
|
|
7298
|
+
minimum: 0
|
|
7299
|
+
},
|
|
7300
|
+
nonNegativeIntegerDefault0: {
|
|
7301
|
+
$ref: "#/$defs/nonNegativeInteger",
|
|
7302
|
+
default: 0
|
|
7303
|
+
},
|
|
7304
|
+
simpleTypes: {
|
|
7305
|
+
enum: ["array", "boolean", "integer", "null", "number", "object", "string"]
|
|
7306
|
+
},
|
|
7307
|
+
stringArray: {
|
|
7312
7308
|
type: "array",
|
|
7313
|
-
|
|
7314
|
-
|
|
7309
|
+
items: { type: "string" },
|
|
7310
|
+
uniqueItems: true,
|
|
7311
|
+
default: []
|
|
7315
7312
|
}
|
|
7316
7313
|
}
|
|
7317
|
-
};
|
|
7314
|
+
};
|
|
7315
|
+
}
|
|
7316
|
+
});
|
|
7317
|
+
|
|
7318
|
+
// node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/refs/json-schema-2020-12/index.js
|
|
7319
|
+
var require_json_schema_2020_12 = __commonJS({
|
|
7320
|
+
"node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/refs/json-schema-2020-12/index.js"(exports) {
|
|
7321
|
+
"use strict";
|
|
7322
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7323
|
+
var metaSchema = require_schema();
|
|
7324
|
+
var applicator = require_applicator2();
|
|
7325
|
+
var unevaluated = require_unevaluated2();
|
|
7326
|
+
var content = require_content();
|
|
7327
|
+
var core = require_core3();
|
|
7328
|
+
var format = require_format_annotation();
|
|
7329
|
+
var metadata = require_meta_data();
|
|
7330
|
+
var validation = require_validation2();
|
|
7331
|
+
var META_SUPPORT_DATA = ["/properties"];
|
|
7332
|
+
function addMetaSchema2020($data) {
|
|
7333
|
+
;
|
|
7334
|
+
[
|
|
7335
|
+
metaSchema,
|
|
7336
|
+
applicator,
|
|
7337
|
+
unevaluated,
|
|
7338
|
+
content,
|
|
7339
|
+
core,
|
|
7340
|
+
with$data(this, format),
|
|
7341
|
+
metadata,
|
|
7342
|
+
with$data(this, validation)
|
|
7343
|
+
].forEach((sch) => this.addMetaSchema(sch, void 0, false));
|
|
7344
|
+
return this;
|
|
7345
|
+
function with$data(ajv, sch) {
|
|
7346
|
+
return $data ? ajv.$dataMetaSchema(sch, META_SUPPORT_DATA) : sch;
|
|
7347
|
+
}
|
|
7348
|
+
}
|
|
7349
|
+
exports.default = addMetaSchema2020;
|
|
7318
7350
|
}
|
|
7319
7351
|
});
|
|
7320
7352
|
|
|
7321
|
-
// node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/
|
|
7322
|
-
var
|
|
7323
|
-
"node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/
|
|
7324
|
-
|
|
7325
|
-
|
|
7326
|
-
|
|
7327
|
-
|
|
7328
|
-
|
|
7329
|
-
|
|
7330
|
-
|
|
7331
|
-
|
|
7332
|
-
|
|
7333
|
-
|
|
7334
|
-
|
|
7335
|
-
|
|
7353
|
+
// node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/2020.js
|
|
7354
|
+
var require__ = __commonJS({
|
|
7355
|
+
"node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/2020.js"(exports, module) {
|
|
7356
|
+
"use strict";
|
|
7357
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7358
|
+
exports.MissingRefError = exports.ValidationError = exports.CodeGen = exports.Name = exports.nil = exports.stringify = exports.str = exports._ = exports.KeywordCxt = exports.Ajv2020 = void 0;
|
|
7359
|
+
var core_1 = require_core();
|
|
7360
|
+
var draft2020_1 = require_draft2020();
|
|
7361
|
+
var discriminator_1 = require_discriminator();
|
|
7362
|
+
var json_schema_2020_12_1 = require_json_schema_2020_12();
|
|
7363
|
+
var META_SCHEMA_ID = "https://json-schema.org/draft/2020-12/schema";
|
|
7364
|
+
var Ajv20202 = class extends core_1.default {
|
|
7365
|
+
constructor(opts = {}) {
|
|
7366
|
+
super({
|
|
7367
|
+
...opts,
|
|
7368
|
+
dynamicRef: true,
|
|
7369
|
+
next: true,
|
|
7370
|
+
unevaluated: true
|
|
7371
|
+
});
|
|
7372
|
+
}
|
|
7373
|
+
_addVocabularies() {
|
|
7374
|
+
super._addVocabularies();
|
|
7375
|
+
draft2020_1.default.forEach((v) => this.addVocabulary(v));
|
|
7376
|
+
if (this.opts.discriminator)
|
|
7377
|
+
this.addKeyword(discriminator_1.default);
|
|
7378
|
+
}
|
|
7379
|
+
_addDefaultMetaSchema() {
|
|
7380
|
+
super._addDefaultMetaSchema();
|
|
7381
|
+
const { $data, meta } = this.opts;
|
|
7382
|
+
if (!meta)
|
|
7383
|
+
return;
|
|
7384
|
+
json_schema_2020_12_1.default.call(this, $data);
|
|
7385
|
+
this.refs["http://json-schema.org/schema"] = META_SCHEMA_ID;
|
|
7386
|
+
}
|
|
7387
|
+
defaultMeta() {
|
|
7388
|
+
return this.opts.defaultMeta = super.defaultMeta() || (this.getSchema(META_SCHEMA_ID) ? META_SCHEMA_ID : void 0);
|
|
7336
7389
|
}
|
|
7337
7390
|
};
|
|
7391
|
+
exports.Ajv2020 = Ajv20202;
|
|
7392
|
+
module.exports = exports = Ajv20202;
|
|
7393
|
+
module.exports.Ajv2020 = Ajv20202;
|
|
7394
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7395
|
+
exports.default = Ajv20202;
|
|
7396
|
+
var validate_1 = require_validate();
|
|
7397
|
+
Object.defineProperty(exports, "KeywordCxt", { enumerable: true, get: function() {
|
|
7398
|
+
return validate_1.KeywordCxt;
|
|
7399
|
+
} });
|
|
7400
|
+
var codegen_1 = require_codegen();
|
|
7401
|
+
Object.defineProperty(exports, "_", { enumerable: true, get: function() {
|
|
7402
|
+
return codegen_1._;
|
|
7403
|
+
} });
|
|
7404
|
+
Object.defineProperty(exports, "str", { enumerable: true, get: function() {
|
|
7405
|
+
return codegen_1.str;
|
|
7406
|
+
} });
|
|
7407
|
+
Object.defineProperty(exports, "stringify", { enumerable: true, get: function() {
|
|
7408
|
+
return codegen_1.stringify;
|
|
7409
|
+
} });
|
|
7410
|
+
Object.defineProperty(exports, "nil", { enumerable: true, get: function() {
|
|
7411
|
+
return codegen_1.nil;
|
|
7412
|
+
} });
|
|
7413
|
+
Object.defineProperty(exports, "Name", { enumerable: true, get: function() {
|
|
7414
|
+
return codegen_1.Name;
|
|
7415
|
+
} });
|
|
7416
|
+
Object.defineProperty(exports, "CodeGen", { enumerable: true, get: function() {
|
|
7417
|
+
return codegen_1.CodeGen;
|
|
7418
|
+
} });
|
|
7419
|
+
var validation_error_1 = require_validation_error();
|
|
7420
|
+
Object.defineProperty(exports, "ValidationError", { enumerable: true, get: function() {
|
|
7421
|
+
return validation_error_1.default;
|
|
7422
|
+
} });
|
|
7423
|
+
var ref_error_1 = require_ref_error();
|
|
7424
|
+
Object.defineProperty(exports, "MissingRefError", { enumerable: true, get: function() {
|
|
7425
|
+
return ref_error_1.default;
|
|
7426
|
+
} });
|
|
7338
7427
|
}
|
|
7339
7428
|
});
|
|
7340
7429
|
|
|
7341
|
-
// node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/
|
|
7342
|
-
var
|
|
7343
|
-
"node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/
|
|
7344
|
-
|
|
7345
|
-
|
|
7346
|
-
|
|
7347
|
-
|
|
7348
|
-
|
|
7349
|
-
|
|
7350
|
-
|
|
7351
|
-
|
|
7352
|
-
|
|
7353
|
-
|
|
7354
|
-
|
|
7355
|
-
|
|
7356
|
-
|
|
7357
|
-
|
|
7358
|
-
|
|
7430
|
+
// node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/draft7.js
|
|
7431
|
+
var require_draft7 = __commonJS({
|
|
7432
|
+
"node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/draft7.js"(exports) {
|
|
7433
|
+
"use strict";
|
|
7434
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7435
|
+
var core_1 = require_core2();
|
|
7436
|
+
var validation_1 = require_validation();
|
|
7437
|
+
var applicator_1 = require_applicator();
|
|
7438
|
+
var format_1 = require_format2();
|
|
7439
|
+
var metadata_1 = require_metadata();
|
|
7440
|
+
var draft7Vocabularies = [
|
|
7441
|
+
core_1.default,
|
|
7442
|
+
validation_1.default,
|
|
7443
|
+
(0, applicator_1.default)(),
|
|
7444
|
+
format_1.default,
|
|
7445
|
+
metadata_1.metadataVocabulary,
|
|
7446
|
+
metadata_1.contentVocabulary
|
|
7447
|
+
];
|
|
7448
|
+
exports.default = draft7Vocabularies;
|
|
7359
7449
|
}
|
|
7360
7450
|
});
|
|
7361
7451
|
|
|
7362
|
-
// node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/refs/json-schema-
|
|
7363
|
-
var
|
|
7364
|
-
"node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/refs/json-schema-
|
|
7452
|
+
// node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/refs/json-schema-draft-07.json
|
|
7453
|
+
var require_json_schema_draft_07 = __commonJS({
|
|
7454
|
+
"node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/refs/json-schema-draft-07.json"(exports, module) {
|
|
7365
7455
|
module.exports = {
|
|
7366
|
-
$schema: "
|
|
7367
|
-
$id: "
|
|
7368
|
-
|
|
7369
|
-
|
|
7370
|
-
|
|
7371
|
-
|
|
7372
|
-
|
|
7373
|
-
|
|
7374
|
-
properties: {
|
|
7375
|
-
$id: {
|
|
7376
|
-
$ref: "#/$defs/uriReferenceString",
|
|
7377
|
-
$comment: "Non-empty fragments not allowed.",
|
|
7378
|
-
pattern: "^[^#]*#?$"
|
|
7456
|
+
$schema: "http://json-schema.org/draft-07/schema#",
|
|
7457
|
+
$id: "http://json-schema.org/draft-07/schema#",
|
|
7458
|
+
title: "Core schema meta-schema",
|
|
7459
|
+
definitions: {
|
|
7460
|
+
schemaArray: {
|
|
7461
|
+
type: "array",
|
|
7462
|
+
minItems: 1,
|
|
7463
|
+
items: { $ref: "#" }
|
|
7379
7464
|
},
|
|
7380
|
-
|
|
7381
|
-
|
|
7382
|
-
|
|
7383
|
-
$dynamicRef: { $ref: "#/$defs/uriReferenceString" },
|
|
7384
|
-
$dynamicAnchor: { $ref: "#/$defs/anchorString" },
|
|
7385
|
-
$vocabulary: {
|
|
7386
|
-
type: "object",
|
|
7387
|
-
propertyNames: { $ref: "#/$defs/uriString" },
|
|
7388
|
-
additionalProperties: {
|
|
7389
|
-
type: "boolean"
|
|
7390
|
-
}
|
|
7465
|
+
nonNegativeInteger: {
|
|
7466
|
+
type: "integer",
|
|
7467
|
+
minimum: 0
|
|
7391
7468
|
},
|
|
7392
|
-
|
|
7393
|
-
|
|
7469
|
+
nonNegativeIntegerDefault0: {
|
|
7470
|
+
allOf: [{ $ref: "#/definitions/nonNegativeInteger" }, { default: 0 }]
|
|
7394
7471
|
},
|
|
7395
|
-
|
|
7396
|
-
|
|
7397
|
-
|
|
7472
|
+
simpleTypes: {
|
|
7473
|
+
enum: ["array", "boolean", "integer", "null", "number", "object", "string"]
|
|
7474
|
+
},
|
|
7475
|
+
stringArray: {
|
|
7476
|
+
type: "array",
|
|
7477
|
+
items: { type: "string" },
|
|
7478
|
+
uniqueItems: true,
|
|
7479
|
+
default: []
|
|
7398
7480
|
}
|
|
7399
7481
|
},
|
|
7400
|
-
|
|
7401
|
-
|
|
7482
|
+
type: ["object", "boolean"],
|
|
7483
|
+
properties: {
|
|
7484
|
+
$id: {
|
|
7402
7485
|
type: "string",
|
|
7403
|
-
|
|
7486
|
+
format: "uri-reference"
|
|
7404
7487
|
},
|
|
7405
|
-
|
|
7488
|
+
$schema: {
|
|
7406
7489
|
type: "string",
|
|
7407
7490
|
format: "uri"
|
|
7408
7491
|
},
|
|
7409
|
-
|
|
7492
|
+
$ref: {
|
|
7410
7493
|
type: "string",
|
|
7411
7494
|
format: "uri-reference"
|
|
7412
|
-
}
|
|
7413
|
-
|
|
7414
|
-
};
|
|
7415
|
-
}
|
|
7416
|
-
});
|
|
7417
|
-
|
|
7418
|
-
// node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/refs/json-schema-2020-12/meta/format-annotation.json
|
|
7419
|
-
var require_format_annotation = __commonJS({
|
|
7420
|
-
"node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/refs/json-schema-2020-12/meta/format-annotation.json"(exports, module) {
|
|
7421
|
-
module.exports = {
|
|
7422
|
-
$schema: "https://json-schema.org/draft/2020-12/schema",
|
|
7423
|
-
$id: "https://json-schema.org/draft/2020-12/meta/format-annotation",
|
|
7424
|
-
$vocabulary: {
|
|
7425
|
-
"https://json-schema.org/draft/2020-12/vocab/format-annotation": true
|
|
7426
|
-
},
|
|
7427
|
-
$dynamicAnchor: "meta",
|
|
7428
|
-
title: "Format vocabulary meta-schema for annotation results",
|
|
7429
|
-
type: ["object", "boolean"],
|
|
7430
|
-
properties: {
|
|
7431
|
-
format: { type: "string" }
|
|
7432
|
-
}
|
|
7433
|
-
};
|
|
7434
|
-
}
|
|
7435
|
-
});
|
|
7436
|
-
|
|
7437
|
-
// node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/refs/json-schema-2020-12/meta/meta-data.json
|
|
7438
|
-
var require_meta_data = __commonJS({
|
|
7439
|
-
"node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/refs/json-schema-2020-12/meta/meta-data.json"(exports, module) {
|
|
7440
|
-
module.exports = {
|
|
7441
|
-
$schema: "https://json-schema.org/draft/2020-12/schema",
|
|
7442
|
-
$id: "https://json-schema.org/draft/2020-12/meta/meta-data",
|
|
7443
|
-
$vocabulary: {
|
|
7444
|
-
"https://json-schema.org/draft/2020-12/vocab/meta-data": true
|
|
7445
|
-
},
|
|
7446
|
-
$dynamicAnchor: "meta",
|
|
7447
|
-
title: "Meta-data vocabulary meta-schema",
|
|
7448
|
-
type: ["object", "boolean"],
|
|
7449
|
-
properties: {
|
|
7450
|
-
title: {
|
|
7495
|
+
},
|
|
7496
|
+
$comment: {
|
|
7451
7497
|
type: "string"
|
|
7452
7498
|
},
|
|
7453
|
-
|
|
7499
|
+
title: {
|
|
7454
7500
|
type: "string"
|
|
7455
7501
|
},
|
|
7456
|
-
|
|
7457
|
-
|
|
7458
|
-
type: "boolean",
|
|
7459
|
-
default: false
|
|
7502
|
+
description: {
|
|
7503
|
+
type: "string"
|
|
7460
7504
|
},
|
|
7505
|
+
default: true,
|
|
7461
7506
|
readOnly: {
|
|
7462
7507
|
type: "boolean",
|
|
7463
7508
|
default: false
|
|
7464
7509
|
},
|
|
7465
|
-
writeOnly: {
|
|
7466
|
-
type: "boolean",
|
|
7467
|
-
default: false
|
|
7468
|
-
},
|
|
7469
7510
|
examples: {
|
|
7470
7511
|
type: "array",
|
|
7471
7512
|
items: true
|
|
7472
|
-
}
|
|
7473
|
-
}
|
|
7474
|
-
};
|
|
7475
|
-
}
|
|
7476
|
-
});
|
|
7477
|
-
|
|
7478
|
-
// node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/refs/json-schema-2020-12/meta/validation.json
|
|
7479
|
-
var require_validation2 = __commonJS({
|
|
7480
|
-
"node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/refs/json-schema-2020-12/meta/validation.json"(exports, module) {
|
|
7481
|
-
module.exports = {
|
|
7482
|
-
$schema: "https://json-schema.org/draft/2020-12/schema",
|
|
7483
|
-
$id: "https://json-schema.org/draft/2020-12/meta/validation",
|
|
7484
|
-
$vocabulary: {
|
|
7485
|
-
"https://json-schema.org/draft/2020-12/vocab/validation": true
|
|
7486
|
-
},
|
|
7487
|
-
$dynamicAnchor: "meta",
|
|
7488
|
-
title: "Validation vocabulary meta-schema",
|
|
7489
|
-
type: ["object", "boolean"],
|
|
7490
|
-
properties: {
|
|
7491
|
-
type: {
|
|
7492
|
-
anyOf: [
|
|
7493
|
-
{ $ref: "#/$defs/simpleTypes" },
|
|
7494
|
-
{
|
|
7495
|
-
type: "array",
|
|
7496
|
-
items: { $ref: "#/$defs/simpleTypes" },
|
|
7497
|
-
minItems: 1,
|
|
7498
|
-
uniqueItems: true
|
|
7499
|
-
}
|
|
7500
|
-
]
|
|
7501
|
-
},
|
|
7502
|
-
const: true,
|
|
7503
|
-
enum: {
|
|
7504
|
-
type: "array",
|
|
7505
|
-
items: true
|
|
7506
7513
|
},
|
|
7507
7514
|
multipleOf: {
|
|
7508
7515
|
type: "number",
|
|
@@ -7520,134 +7527,121 @@ var require_validation2 = __commonJS({
|
|
|
7520
7527
|
exclusiveMinimum: {
|
|
7521
7528
|
type: "number"
|
|
7522
7529
|
},
|
|
7523
|
-
maxLength: { $ref: "
|
|
7524
|
-
minLength: { $ref: "
|
|
7530
|
+
maxLength: { $ref: "#/definitions/nonNegativeInteger" },
|
|
7531
|
+
minLength: { $ref: "#/definitions/nonNegativeIntegerDefault0" },
|
|
7525
7532
|
pattern: {
|
|
7526
7533
|
type: "string",
|
|
7527
7534
|
format: "regex"
|
|
7528
7535
|
},
|
|
7529
|
-
|
|
7530
|
-
|
|
7536
|
+
additionalItems: { $ref: "#" },
|
|
7537
|
+
items: {
|
|
7538
|
+
anyOf: [{ $ref: "#" }, { $ref: "#/definitions/schemaArray" }],
|
|
7539
|
+
default: true
|
|
7540
|
+
},
|
|
7541
|
+
maxItems: { $ref: "#/definitions/nonNegativeInteger" },
|
|
7542
|
+
minItems: { $ref: "#/definitions/nonNegativeIntegerDefault0" },
|
|
7531
7543
|
uniqueItems: {
|
|
7532
7544
|
type: "boolean",
|
|
7533
7545
|
default: false
|
|
7534
7546
|
},
|
|
7535
|
-
|
|
7536
|
-
|
|
7537
|
-
|
|
7538
|
-
|
|
7547
|
+
contains: { $ref: "#" },
|
|
7548
|
+
maxProperties: { $ref: "#/definitions/nonNegativeInteger" },
|
|
7549
|
+
minProperties: { $ref: "#/definitions/nonNegativeIntegerDefault0" },
|
|
7550
|
+
required: { $ref: "#/definitions/stringArray" },
|
|
7551
|
+
additionalProperties: { $ref: "#" },
|
|
7552
|
+
definitions: {
|
|
7553
|
+
type: "object",
|
|
7554
|
+
additionalProperties: { $ref: "#" },
|
|
7555
|
+
default: {}
|
|
7539
7556
|
},
|
|
7540
|
-
|
|
7541
|
-
|
|
7542
|
-
|
|
7543
|
-
|
|
7557
|
+
properties: {
|
|
7558
|
+
type: "object",
|
|
7559
|
+
additionalProperties: { $ref: "#" },
|
|
7560
|
+
default: {}
|
|
7561
|
+
},
|
|
7562
|
+
patternProperties: {
|
|
7563
|
+
type: "object",
|
|
7564
|
+
additionalProperties: { $ref: "#" },
|
|
7565
|
+
propertyNames: { format: "regex" },
|
|
7566
|
+
default: {}
|
|
7567
|
+
},
|
|
7568
|
+
dependencies: {
|
|
7544
7569
|
type: "object",
|
|
7545
7570
|
additionalProperties: {
|
|
7546
|
-
$ref: "
|
|
7571
|
+
anyOf: [{ $ref: "#" }, { $ref: "#/definitions/stringArray" }]
|
|
7547
7572
|
}
|
|
7548
|
-
}
|
|
7549
|
-
},
|
|
7550
|
-
$defs: {
|
|
7551
|
-
nonNegativeInteger: {
|
|
7552
|
-
type: "integer",
|
|
7553
|
-
minimum: 0
|
|
7554
7573
|
},
|
|
7555
|
-
|
|
7556
|
-
|
|
7557
|
-
|
|
7574
|
+
propertyNames: { $ref: "#" },
|
|
7575
|
+
const: true,
|
|
7576
|
+
enum: {
|
|
7577
|
+
type: "array",
|
|
7578
|
+
items: true,
|
|
7579
|
+
minItems: 1,
|
|
7580
|
+
uniqueItems: true
|
|
7558
7581
|
},
|
|
7559
|
-
|
|
7560
|
-
|
|
7582
|
+
type: {
|
|
7583
|
+
anyOf: [
|
|
7584
|
+
{ $ref: "#/definitions/simpleTypes" },
|
|
7585
|
+
{
|
|
7586
|
+
type: "array",
|
|
7587
|
+
items: { $ref: "#/definitions/simpleTypes" },
|
|
7588
|
+
minItems: 1,
|
|
7589
|
+
uniqueItems: true
|
|
7590
|
+
}
|
|
7591
|
+
]
|
|
7561
7592
|
},
|
|
7562
|
-
|
|
7563
|
-
|
|
7564
|
-
|
|
7565
|
-
|
|
7566
|
-
|
|
7567
|
-
}
|
|
7568
|
-
|
|
7593
|
+
format: { type: "string" },
|
|
7594
|
+
contentMediaType: { type: "string" },
|
|
7595
|
+
contentEncoding: { type: "string" },
|
|
7596
|
+
if: { $ref: "#" },
|
|
7597
|
+
then: { $ref: "#" },
|
|
7598
|
+
else: { $ref: "#" },
|
|
7599
|
+
allOf: { $ref: "#/definitions/schemaArray" },
|
|
7600
|
+
anyOf: { $ref: "#/definitions/schemaArray" },
|
|
7601
|
+
oneOf: { $ref: "#/definitions/schemaArray" },
|
|
7602
|
+
not: { $ref: "#" }
|
|
7603
|
+
},
|
|
7604
|
+
default: true
|
|
7569
7605
|
};
|
|
7570
7606
|
}
|
|
7571
7607
|
});
|
|
7572
7608
|
|
|
7573
|
-
// node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/
|
|
7574
|
-
var
|
|
7575
|
-
"node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/
|
|
7576
|
-
"use strict";
|
|
7577
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7578
|
-
var metaSchema = require_schema();
|
|
7579
|
-
var applicator = require_applicator2();
|
|
7580
|
-
var unevaluated = require_unevaluated2();
|
|
7581
|
-
var content = require_content();
|
|
7582
|
-
var core = require_core3();
|
|
7583
|
-
var format = require_format_annotation();
|
|
7584
|
-
var metadata = require_meta_data();
|
|
7585
|
-
var validation = require_validation2();
|
|
7586
|
-
var META_SUPPORT_DATA = ["/properties"];
|
|
7587
|
-
function addMetaSchema2020($data) {
|
|
7588
|
-
;
|
|
7589
|
-
[
|
|
7590
|
-
metaSchema,
|
|
7591
|
-
applicator,
|
|
7592
|
-
unevaluated,
|
|
7593
|
-
content,
|
|
7594
|
-
core,
|
|
7595
|
-
with$data(this, format),
|
|
7596
|
-
metadata,
|
|
7597
|
-
with$data(this, validation)
|
|
7598
|
-
].forEach((sch) => this.addMetaSchema(sch, void 0, false));
|
|
7599
|
-
return this;
|
|
7600
|
-
function with$data(ajv, sch) {
|
|
7601
|
-
return $data ? ajv.$dataMetaSchema(sch, META_SUPPORT_DATA) : sch;
|
|
7602
|
-
}
|
|
7603
|
-
}
|
|
7604
|
-
exports.default = addMetaSchema2020;
|
|
7605
|
-
}
|
|
7606
|
-
});
|
|
7607
|
-
|
|
7608
|
-
// node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/2020.js
|
|
7609
|
-
var require__ = __commonJS({
|
|
7610
|
-
"node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/2020.js"(exports, module) {
|
|
7609
|
+
// node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/ajv.js
|
|
7610
|
+
var require_ajv = __commonJS({
|
|
7611
|
+
"node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/ajv.js"(exports, module) {
|
|
7611
7612
|
"use strict";
|
|
7612
7613
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7613
|
-
exports.MissingRefError = exports.ValidationError = exports.CodeGen = exports.Name = exports.nil = exports.stringify = exports.str = exports._ = exports.KeywordCxt = exports.
|
|
7614
|
+
exports.MissingRefError = exports.ValidationError = exports.CodeGen = exports.Name = exports.nil = exports.stringify = exports.str = exports._ = exports.KeywordCxt = exports.Ajv = void 0;
|
|
7614
7615
|
var core_1 = require_core();
|
|
7615
|
-
var
|
|
7616
|
+
var draft7_1 = require_draft7();
|
|
7616
7617
|
var discriminator_1 = require_discriminator();
|
|
7617
|
-
var
|
|
7618
|
-
var
|
|
7619
|
-
var
|
|
7620
|
-
|
|
7621
|
-
super({
|
|
7622
|
-
...opts,
|
|
7623
|
-
dynamicRef: true,
|
|
7624
|
-
next: true,
|
|
7625
|
-
unevaluated: true
|
|
7626
|
-
});
|
|
7627
|
-
}
|
|
7618
|
+
var draft7MetaSchema = require_json_schema_draft_07();
|
|
7619
|
+
var META_SUPPORT_DATA = ["/properties"];
|
|
7620
|
+
var META_SCHEMA_ID = "http://json-schema.org/draft-07/schema";
|
|
7621
|
+
var Ajv2 = class extends core_1.default {
|
|
7628
7622
|
_addVocabularies() {
|
|
7629
7623
|
super._addVocabularies();
|
|
7630
|
-
|
|
7624
|
+
draft7_1.default.forEach((v) => this.addVocabulary(v));
|
|
7631
7625
|
if (this.opts.discriminator)
|
|
7632
7626
|
this.addKeyword(discriminator_1.default);
|
|
7633
7627
|
}
|
|
7634
7628
|
_addDefaultMetaSchema() {
|
|
7635
7629
|
super._addDefaultMetaSchema();
|
|
7636
|
-
|
|
7637
|
-
if (!meta)
|
|
7630
|
+
if (!this.opts.meta)
|
|
7638
7631
|
return;
|
|
7639
|
-
|
|
7632
|
+
const metaSchema = this.opts.$data ? this.$dataMetaSchema(draft7MetaSchema, META_SUPPORT_DATA) : draft7MetaSchema;
|
|
7633
|
+
this.addMetaSchema(metaSchema, META_SCHEMA_ID, false);
|
|
7640
7634
|
this.refs["http://json-schema.org/schema"] = META_SCHEMA_ID;
|
|
7641
7635
|
}
|
|
7642
7636
|
defaultMeta() {
|
|
7643
7637
|
return this.opts.defaultMeta = super.defaultMeta() || (this.getSchema(META_SCHEMA_ID) ? META_SCHEMA_ID : void 0);
|
|
7644
7638
|
}
|
|
7645
7639
|
};
|
|
7646
|
-
exports.
|
|
7647
|
-
module.exports = exports =
|
|
7648
|
-
module.exports.
|
|
7640
|
+
exports.Ajv = Ajv2;
|
|
7641
|
+
module.exports = exports = Ajv2;
|
|
7642
|
+
module.exports.Ajv = Ajv2;
|
|
7649
7643
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7650
|
-
exports.default =
|
|
7644
|
+
exports.default = Ajv2;
|
|
7651
7645
|
var validate_1 = require_validate();
|
|
7652
7646
|
Object.defineProperty(exports, "KeywordCxt", { enumerable: true, get: function() {
|
|
7653
7647
|
return validate_1.KeywordCxt;
|
|
@@ -7963,6 +7957,74 @@ var require_dist = __commonJS({
|
|
|
7963
7957
|
}
|
|
7964
7958
|
});
|
|
7965
7959
|
|
|
7960
|
+
// dist/schema-json.js
|
|
7961
|
+
var JsonSnapshotError = class extends Error {
|
|
7962
|
+
constructor(kind, dataPath) {
|
|
7963
|
+
super("JSON snapshot failed.");
|
|
7964
|
+
this.kind = kind;
|
|
7965
|
+
this.dataPath = dataPath;
|
|
7966
|
+
}
|
|
7967
|
+
};
|
|
7968
|
+
function appendPointer(path, key) {
|
|
7969
|
+
return `${path}/${key.replace(/~/g, "~0").replace(/\//g, "~1")}`;
|
|
7970
|
+
}
|
|
7971
|
+
function snapshotJson(value) {
|
|
7972
|
+
const active = /* @__PURE__ */ new WeakSet();
|
|
7973
|
+
let remaining = 1e5;
|
|
7974
|
+
const visit = (input, path, depth) => {
|
|
7975
|
+
if (--remaining < 0 || depth > 128)
|
|
7976
|
+
throw new JsonSnapshotError("limit", path);
|
|
7977
|
+
if (input === null || typeof input === "string" || typeof input === "boolean")
|
|
7978
|
+
return input;
|
|
7979
|
+
if (typeof input === "number" && Number.isFinite(input))
|
|
7980
|
+
return input;
|
|
7981
|
+
if (typeof input !== "object" || input === null || active.has(input))
|
|
7982
|
+
throw new JsonSnapshotError("invalid", path);
|
|
7983
|
+
const array = Array.isArray(input);
|
|
7984
|
+
const prototype = Object.getPrototypeOf(input);
|
|
7985
|
+
if (!array && prototype !== null && prototype !== Object.prototype)
|
|
7986
|
+
throw new JsonSnapshotError("invalid", path);
|
|
7987
|
+
if (Object.getOwnPropertySymbols(input).length)
|
|
7988
|
+
throw new JsonSnapshotError("invalid", path);
|
|
7989
|
+
active.add(input);
|
|
7990
|
+
try {
|
|
7991
|
+
if (array) {
|
|
7992
|
+
const length = input.length;
|
|
7993
|
+
if (!Number.isSafeInteger(length) || length > remaining)
|
|
7994
|
+
throw new JsonSnapshotError("limit", path);
|
|
7995
|
+
const result2 = [];
|
|
7996
|
+
for (let i = 0; i < length; i++) {
|
|
7997
|
+
const child = appendPointer(path, String(i));
|
|
7998
|
+
const descriptor = Object.getOwnPropertyDescriptor(input, i);
|
|
7999
|
+
if (!descriptor || !("value" in descriptor))
|
|
8000
|
+
throw new JsonSnapshotError("invalid", child);
|
|
8001
|
+
result2.push(visit(descriptor.value, child, depth + 1));
|
|
8002
|
+
}
|
|
8003
|
+
for (const key of Object.keys(input)) {
|
|
8004
|
+
if (!/^(0|[1-9][0-9]*)$/.test(key) || Number(key) >= length)
|
|
8005
|
+
throw new JsonSnapshotError("invalid", appendPointer(path, key));
|
|
8006
|
+
}
|
|
8007
|
+
return result2;
|
|
8008
|
+
}
|
|
8009
|
+
const result = {};
|
|
8010
|
+
for (const key of Object.keys(input)) {
|
|
8011
|
+
const child = appendPointer(path, key);
|
|
8012
|
+
const descriptor = Object.getOwnPropertyDescriptor(input, key);
|
|
8013
|
+
if (!descriptor || !("value" in descriptor))
|
|
8014
|
+
throw new JsonSnapshotError("invalid", child);
|
|
8015
|
+
Object.defineProperty(result, key, { value: visit(descriptor.value, child, depth + 1), enumerable: true, writable: true, configurable: true });
|
|
8016
|
+
}
|
|
8017
|
+
return result;
|
|
8018
|
+
} finally {
|
|
8019
|
+
active.delete(input);
|
|
8020
|
+
}
|
|
8021
|
+
};
|
|
8022
|
+
return visit(value, "", 0);
|
|
8023
|
+
}
|
|
8024
|
+
function isJsonRecord(value) {
|
|
8025
|
+
return value !== null && typeof value === "object" && !Array.isArray(value);
|
|
8026
|
+
}
|
|
8027
|
+
|
|
7966
8028
|
// dist/schema-engine.js
|
|
7967
8029
|
var import_ajv = __toESM(require_ajv(), 1);
|
|
7968
8030
|
var import__ = __toESM(require__(), 1);
|
|
@@ -8279,212 +8341,35 @@ function compileSchemaBundle(input) {
|
|
|
8279
8341
|
}
|
|
8280
8342
|
}
|
|
8281
8343
|
|
|
8282
|
-
// dist/schema
|
|
8283
|
-
|
|
8284
|
-
|
|
8285
|
-
|
|
8286
|
-
|
|
8287
|
-
|
|
8288
|
-
|
|
8289
|
-
}
|
|
8290
|
-
function ownerFailure(scope, code) {
|
|
8291
|
-
return Object.freeze({ kind: "execution-error", diagnostics: Object.freeze([
|
|
8292
|
-
Object.freeze({ scope, phase: "execution", operation: "semantic", code })
|
|
8293
|
-
]) });
|
|
8294
|
-
}
|
|
8295
|
-
function asyncResult(value) {
|
|
8296
|
-
try {
|
|
8297
|
-
void Promise.prototype.then.call(value, () => void 0, () => void 0);
|
|
8298
|
-
return true;
|
|
8299
|
-
} catch (_a) {
|
|
8300
|
-
}
|
|
8301
|
-
return "then" in value;
|
|
8302
|
-
}
|
|
8303
|
-
function validateSchemaInput(compiled, data, options) {
|
|
8304
|
-
let scope = scopeFor(compiled);
|
|
8305
|
-
let context;
|
|
8306
|
-
let owner;
|
|
8307
|
-
try {
|
|
8308
|
-
if (!isJsonRecord(options))
|
|
8309
|
-
return ownerFailure(scope, "owner-context-invalid");
|
|
8310
|
-
const descriptor = Object.getOwnPropertyDescriptor(options, "context");
|
|
8311
|
-
if (!descriptor || !("value" in descriptor))
|
|
8312
|
-
return ownerFailure(scope, "owner-context-invalid");
|
|
8313
|
-
const candidate = snapshotJson(descriptor.value);
|
|
8314
|
-
if (!isJsonRecord(candidate) || typeof candidate.consumerId !== "string" || typeof candidate.nowMs !== "number" || !Number.isFinite(candidate.nowMs) || !Object.hasOwn(candidate, "settings")) {
|
|
8315
|
-
return ownerFailure(scope, "owner-context-invalid");
|
|
8316
|
-
}
|
|
8317
|
-
context = deepFreeze(candidate);
|
|
8318
|
-
scope = Object.freeze({ ...scope, consumerId: context.consumerId });
|
|
8319
|
-
const ownerDescriptor = Object.getOwnPropertyDescriptor(options, "ownerValidate");
|
|
8320
|
-
if (ownerDescriptor && !("value" in ownerDescriptor))
|
|
8321
|
-
return ownerFailure(scope, "owner-result-invalid");
|
|
8322
|
-
owner = ownerDescriptor === null || ownerDescriptor === void 0 ? void 0 : ownerDescriptor.value;
|
|
8323
|
-
if (owner !== void 0 && typeof owner !== "function")
|
|
8324
|
-
return ownerFailure(scope, "owner-result-invalid");
|
|
8325
|
-
} catch (_a) {
|
|
8326
|
-
return ownerFailure(scope, "owner-context-invalid");
|
|
8327
|
-
}
|
|
8328
|
-
let input;
|
|
8329
|
-
try {
|
|
8330
|
-
input = deepFreeze(snapshotJson(data));
|
|
8331
|
-
const structural = compiled.validate(input, { consumerId: context.consumerId });
|
|
8332
|
-
if (!isJsonRecord(structural) || !Array.isArray(structural.diagnostics) || (structural.kind === "valid" ? structural.diagnostics.length !== 0 : structural.diagnostics.length === 0) || !["valid", "invalid", "execution-error"].includes(structural.kind))
|
|
8333
|
-
throw new Error();
|
|
8334
|
-
if (structural.kind !== "valid")
|
|
8335
|
-
return structural;
|
|
8336
|
-
} catch (error) {
|
|
8337
|
-
if (error instanceof JsonSnapshotError && error.kind === "invalid")
|
|
8338
|
-
return Object.freeze({ kind: "invalid", diagnostics: Object.freeze([
|
|
8339
|
-
Object.freeze({ scope, phase: "structure", code: "input-not-json", dataPath: error.dataPath })
|
|
8340
|
-
]) });
|
|
8341
|
-
return Object.freeze({ kind: "execution-error", diagnostics: Object.freeze([Object.freeze({
|
|
8342
|
-
scope,
|
|
8343
|
-
phase: "execution",
|
|
8344
|
-
operation: "structure",
|
|
8345
|
-
code: error instanceof JsonSnapshotError && error.kind === "limit" || error instanceof RangeError ? "limit-exceeded" : "engine-failed"
|
|
8346
|
-
})]) });
|
|
8347
|
-
}
|
|
8348
|
-
if (!owner)
|
|
8349
|
-
return Object.freeze({ kind: "valid", diagnostics: Object.freeze([]) });
|
|
8350
|
-
let result;
|
|
8351
|
-
try {
|
|
8352
|
-
result = owner(input, context);
|
|
8353
|
-
} catch (_b) {
|
|
8354
|
-
return ownerFailure(scope, "owner-validation-failed");
|
|
8355
|
-
}
|
|
8356
|
-
try {
|
|
8357
|
-
if (result !== null && (typeof result === "object" || typeof result === "function") && asyncResult(result))
|
|
8358
|
-
return ownerFailure(scope, "async-owner-unsupported");
|
|
8359
|
-
const snapshot = snapshotJson(result);
|
|
8360
|
-
if (!isJsonRecord(snapshot) || !Array.isArray(snapshot.issues))
|
|
8361
|
-
return ownerFailure(scope, "owner-result-invalid");
|
|
8362
|
-
if (snapshot.kind === "valid" && snapshot.issues.length === 0)
|
|
8363
|
-
return Object.freeze({ kind: "valid", diagnostics: Object.freeze([]) });
|
|
8364
|
-
if (snapshot.kind !== "invalid" || snapshot.issues.length === 0)
|
|
8365
|
-
return ownerFailure(scope, "owner-result-invalid");
|
|
8366
|
-
const diagnostics = [];
|
|
8367
|
-
for (const issue of snapshot.issues) {
|
|
8368
|
-
if (!isJsonRecord(issue) || typeof issue.dataPath !== "string" || issue.dataPath !== "" && !issue.dataPath.startsWith("/") || /~(?:[^01]|$)/u.test(issue.dataPath) || typeof issue.ruleId !== "string") {
|
|
8369
|
-
return ownerFailure(scope, "owner-result-invalid");
|
|
8370
|
-
}
|
|
8371
|
-
diagnostics.push(Object.freeze({ scope, phase: "semantic", code: "owner-input-invalid", dataPath: issue.dataPath, ruleId: issue.ruleId }));
|
|
8372
|
-
}
|
|
8373
|
-
return Object.freeze({ kind: "invalid", diagnostics: Object.freeze(diagnostics) });
|
|
8374
|
-
} catch (_c) {
|
|
8375
|
-
return ownerFailure(scope, "owner-result-invalid");
|
|
8376
|
-
}
|
|
8377
|
-
}
|
|
8378
|
-
|
|
8379
|
-
// dist/json-value.js
|
|
8380
|
-
var jsonValueSchema = true;
|
|
8381
|
-
var source = {
|
|
8382
|
-
repository: "https://github.com/kubohiroya/turbowarp-extension-data-editor",
|
|
8383
|
-
path: "src/json-value.ts",
|
|
8384
|
-
symbol: "jsonValueSchema"
|
|
8385
|
-
};
|
|
8386
|
-
var jsonValueSchemaBundle = Object.freeze({
|
|
8387
|
-
identity: { ownerId: "@kubohiroya/turbowarp-extension-data-editor", contractId: "json-value", revision: "1", variantId: "json-value" },
|
|
8388
|
-
dialect: "2020-12",
|
|
8389
|
-
root: {
|
|
8390
|
-
retrievalUri: "https://kubohiroya.github.io/turbowarp-extension-data-editor/schemas/json-value",
|
|
8391
|
-
document: jsonValueSchema,
|
|
8392
|
-
artifact: { role: "canonical-schema", source }
|
|
8393
|
-
},
|
|
8394
|
-
resources: [],
|
|
8395
|
-
provenance: { canonicalSources: [source], generatedFiles: [], referenceSchemas: [], generationSources: [] }
|
|
8396
|
-
});
|
|
8397
|
-
|
|
8398
|
-
// dist/schema.js
|
|
8399
|
-
var messages = {
|
|
8400
|
-
"input-format-invalid": "Input format is invalid.",
|
|
8401
|
-
"variant-unrecognized": "Input variant is not recognized.",
|
|
8402
|
-
"input-not-json": "Input must be a JSON-compatible value.",
|
|
8403
|
-
"schema-data-invalid": "Value does not satisfy the schema.",
|
|
8404
|
-
"owner-input-invalid": "Value does not satisfy the owner input rules."
|
|
8405
|
-
};
|
|
8406
|
-
function isRecord(value) {
|
|
8407
|
-
return value !== null && typeof value === "object" && !Array.isArray(value);
|
|
8408
|
-
}
|
|
8409
|
-
function isPointer(value) {
|
|
8410
|
-
return typeof value === "string" && (value === "" || value.startsWith("/")) && !/~(?:[^01]|$)/u.test(value);
|
|
8411
|
-
}
|
|
8412
|
-
function readValidationIssue(value) {
|
|
8413
|
-
if (!isRecord(value))
|
|
8414
|
-
throw new TypeError();
|
|
8415
|
-
const scope = value.scope;
|
|
8416
|
-
if (!isRecord(scope))
|
|
8417
|
-
throw new TypeError();
|
|
8418
|
-
const identity = scope.identity;
|
|
8419
|
-
if (!isRecord(identity))
|
|
8420
|
-
throw new TypeError();
|
|
8421
|
-
if (["ownerId", "contractId", "revision", "variantId"].some((key) => typeof identity[key] !== "string")) {
|
|
8422
|
-
throw new TypeError();
|
|
8423
|
-
}
|
|
8424
|
-
if ("consumerId" in scope && typeof scope.consumerId !== "string")
|
|
8425
|
-
throw new TypeError();
|
|
8426
|
-
if ("resourceUri" in value && typeof value.resourceUri !== "string")
|
|
8427
|
-
throw new TypeError();
|
|
8428
|
-
if ("schemaPath" in value && !isPointer(value.schemaPath))
|
|
8429
|
-
throw new TypeError();
|
|
8430
|
-
const dataPath = value.dataPath;
|
|
8431
|
-
const phase = value.phase;
|
|
8432
|
-
const code = value.code;
|
|
8433
|
-
if (!isPointer(dataPath))
|
|
8434
|
-
throw new TypeError();
|
|
8435
|
-
switch (phase) {
|
|
8436
|
-
case "decode":
|
|
8437
|
-
if (code !== "input-format-invalid" && code !== "variant-unrecognized")
|
|
8438
|
-
throw new TypeError();
|
|
8439
|
-
break;
|
|
8440
|
-
case "structure":
|
|
8441
|
-
if (code !== "input-not-json" && code !== "schema-data-invalid")
|
|
8442
|
-
throw new TypeError();
|
|
8443
|
-
if ("keyword" in value && typeof value.keyword !== "string")
|
|
8444
|
-
throw new TypeError();
|
|
8445
|
-
break;
|
|
8446
|
-
case "semantic":
|
|
8447
|
-
if (code !== "owner-input-invalid" || typeof value.ruleId !== "string")
|
|
8448
|
-
throw new TypeError();
|
|
8449
|
-
break;
|
|
8450
|
-
default:
|
|
8451
|
-
throw new TypeError();
|
|
8452
|
-
}
|
|
8453
|
-
return Object.freeze({ message: messages[code], path: dataPath });
|
|
8454
|
-
}
|
|
8455
|
-
function toValidationIssues(diagnostics) {
|
|
8456
|
-
try {
|
|
8457
|
-
if (!Array.isArray(diagnostics))
|
|
8458
|
-
throw new TypeError();
|
|
8459
|
-
const length = diagnostics.length;
|
|
8460
|
-
if (!Number.isSafeInteger(length) || length < 0)
|
|
8461
|
-
throw new TypeError();
|
|
8462
|
-
const snapshot = [];
|
|
8463
|
-
for (let index = 0; index < length; index++) {
|
|
8464
|
-
if (!Object.hasOwn(diagnostics, index))
|
|
8465
|
-
throw new TypeError();
|
|
8466
|
-
snapshot.push(diagnostics[index]);
|
|
8467
|
-
}
|
|
8468
|
-
const issues = [];
|
|
8469
|
-
for (let index = 0; index < length; index++) {
|
|
8470
|
-
issues.push(readValidationIssue(snapshot[index]));
|
|
8471
|
-
}
|
|
8472
|
-
return Object.freeze(issues);
|
|
8473
|
-
} catch (_a) {
|
|
8474
|
-
throw new TypeError("Invalid input diagnostic.");
|
|
8344
|
+
// dist/fixed-input-schema.js
|
|
8345
|
+
var numberToken = /^-?(?:0|[1-9][0-9]*)(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$/u;
|
|
8346
|
+
var invalidNumber = Object.freeze({ kind: "invalid", code: "fixed-number-input-invalid" });
|
|
8347
|
+
function parseFixedNumberInput(input) {
|
|
8348
|
+
if (typeof input === "number") {
|
|
8349
|
+
if (!Number.isFinite(input))
|
|
8350
|
+
return invalidNumber;
|
|
8351
|
+
return Object.freeze({ kind: "valid", token: Object.is(input, -0) ? "-0" : String(input), value: input });
|
|
8475
8352
|
}
|
|
8353
|
+
if (typeof input !== "string")
|
|
8354
|
+
return invalidNumber;
|
|
8355
|
+
const token = input.trim();
|
|
8356
|
+
if (!numberToken.test(token))
|
|
8357
|
+
return invalidNumber;
|
|
8358
|
+
const value = Number(token);
|
|
8359
|
+
return Number.isFinite(value) ? Object.freeze({ kind: "valid", token, value }) : invalidNumber;
|
|
8476
8360
|
}
|
|
8477
8361
|
|
|
8478
8362
|
export {
|
|
8363
|
+
JsonSnapshotError,
|
|
8364
|
+
snapshotJson,
|
|
8365
|
+
isJsonRecord,
|
|
8479
8366
|
require_fast_uri,
|
|
8480
8367
|
require_ajv,
|
|
8481
8368
|
require__,
|
|
8482
8369
|
require_dist,
|
|
8370
|
+
scopeFor,
|
|
8483
8371
|
prepare,
|
|
8484
8372
|
compileSchemaBundle,
|
|
8485
|
-
|
|
8486
|
-
jsonValueSchema,
|
|
8487
|
-
jsonValueSchemaBundle,
|
|
8488
|
-
toValidationIssues
|
|
8373
|
+
parseFixedNumberInput
|
|
8489
8374
|
};
|
|
8490
|
-
//# sourceMappingURL=shared-
|
|
8375
|
+
//# sourceMappingURL=shared-75QIWLZY.js.map
|