@workclaw/openclaw-workclaw 1.0.339 → 1.0.340
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/dist/_virtual/index10.js +2 -2
- package/dist/_virtual/index11.js +2 -2
- package/dist/_virtual/index12.js +2 -2
- package/dist/_virtual/index13.js +2 -2
- package/dist/_virtual/index14.js +2 -2
- package/dist/_virtual/index17.js +2 -2
- package/dist/_virtual/index18.js +2 -2
- package/dist/_virtual/index4.js +2 -2
- package/dist/_virtual/index5.js +2 -2
- package/dist/_virtual/index6.js +2 -2
- package/dist/_virtual/index7.js +2 -2
- package/dist/_virtual/index8.js +2 -2
- package/dist/_virtual/index9.js +2 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +23 -14
- package/dist/node_modules/.pnpm/ajv-formats@3.0.1_ajv@8.20.0/node_modules/ajv-formats/dist/index.js +2 -2
- package/dist/node_modules/.pnpm/ajv-formats@3.0.1_ajv@8.20.0/node_modules/ajv-formats/dist/limit.js +1 -1
- package/dist/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/ajv.js +8 -6
- package/dist/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/compile/codegen/index.js +1 -1
- package/dist/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/compile/errors.js +1 -1
- package/dist/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/compile/index.js +19 -17
- package/dist/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/compile/names.js +1 -1
- package/dist/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/compile/util.js +1 -1
- package/dist/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/compile/validate/applicability.js +16 -22
- package/dist/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/compile/validate/boolSchema.js +43 -49
- package/dist/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/compile/validate/dataType.js +4 -3
- package/dist/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/compile/validate/defaults.js +28 -34
- package/dist/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/compile/validate/index.js +466 -467
- package/dist/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/compile/validate/keyword.js +103 -109
- package/dist/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/compile/validate/subschema.js +73 -79
- package/dist/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/core.js +8 -6
- package/dist/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/runtime/validation_error.js +7 -16
- package/dist/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/applicator/additionalItems.js +1 -1
- package/dist/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/applicator/additionalProperties.js +1 -1
- package/dist/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/applicator/contains.js +1 -1
- package/dist/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/applicator/dependencies.js +1 -1
- package/dist/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/applicator/if.js +1 -1
- package/dist/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/applicator/index.js +1 -1
- package/dist/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/applicator/items.js +1 -1
- package/dist/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/applicator/items2020.js +1 -1
- package/dist/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/applicator/oneOf.js +1 -1
- package/dist/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/applicator/patternProperties.js +1 -1
- package/dist/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/applicator/properties.js +3 -2
- package/dist/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/applicator/propertyNames.js +1 -1
- package/dist/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/code.js +1 -1
- package/dist/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/core/index.js +1 -1
- package/dist/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/core/ref.js +2 -2
- package/dist/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/discriminator/index.js +3 -3
- package/dist/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/draft7.js +4 -4
- package/dist/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/format/format.js +1 -1
- package/dist/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/format/index.js +1 -1
- package/dist/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/validation/const.js +1 -1
- package/dist/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/validation/enum.js +1 -1
- package/dist/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/validation/index.js +1 -1
- package/dist/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/validation/limitItems.js +1 -1
- package/dist/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/validation/limitLength.js +1 -1
- package/dist/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/validation/limitNumber.js +1 -1
- package/dist/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/validation/limitProperties.js +1 -1
- package/dist/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/validation/multipleOf.js +1 -1
- package/dist/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/validation/pattern.js +1 -1
- package/dist/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/validation/required.js +1 -1
- package/dist/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/validation/uniqueItems.js +1 -1
- package/dist/node_modules/.pnpm/cross-spawn@7.0.6/node_modules/cross-spawn/index.js +1 -1
- package/dist/node_modules/.pnpm/fast-uri@3.1.2/node_modules/fast-uri/index.js +1 -1
- package/dist/node_modules/.pnpm/openclaw@2026.5.22/node_modules/openclaw/dist/installed-plugin-index-store-C1Oen9wR.js +1 -1
- package/dist/node_modules/.pnpm/openclaw@2026.5.22/node_modules/openclaw/dist/zod-schema.core-D7Y_eqdd.js +2 -2
- package/dist/node_modules/.pnpm/path-key@3.1.1/node_modules/path-key/index.js +1 -1
- package/dist/node_modules/.pnpm/signal-exit@3.0.7/node_modules/signal-exit/index.js +1 -1
- package/dist/packages/plugin/src/gateway/config-writer.js +1 -34
- package/dist/src/gateway/config-writer.d.ts.map +1 -1
- package/openclaw.plugin.json +7 -1
- package/package.json +1 -1
- package/dist/node_modules/.pnpm/openclaw@2026.5.22/node_modules/openclaw/dist/config-schema-DBTUnI0T.js +0 -34
package/dist/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/compile/validate/keyword.js
CHANGED
|
@@ -3,127 +3,121 @@ import "../codegen/index.js";
|
|
|
3
3
|
import "../names.js";
|
|
4
4
|
import "../../vocabularies/code.js";
|
|
5
5
|
import "../errors.js";
|
|
6
|
-
import { __exports as codegen } from "../../../../../../../../_virtual/
|
|
6
|
+
import { __exports as codegen } from "../../../../../../../../_virtual/index5.js";
|
|
7
7
|
import { __exports as names } from "../../../../../../../../_virtual/names.js";
|
|
8
8
|
import { __exports as code } from "../../../../../../../../_virtual/code2.js";
|
|
9
9
|
import { __exports as errors } from "../../../../../../../../_virtual/errors.js";
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
const
|
|
18
|
-
const
|
|
19
|
-
const
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
const ruleErrs = def.async ? validateAsync() : validateSync();
|
|
54
|
-
if (def.modifying)
|
|
55
|
-
modifyData(cxt);
|
|
56
|
-
reportErrs(() => addErrs(cxt, ruleErrs));
|
|
57
|
-
}
|
|
58
|
-
}
|
|
59
|
-
function validateAsync() {
|
|
60
|
-
const ruleErrs = gen.let("ruleErrs", null);
|
|
61
|
-
gen.try(() => assignValid((0, codegen_1._)`await `), (e) => gen.assign(valid, false).if((0, codegen_1._)`${e} instanceof ${it.ValidationError}`, () => gen.assign(ruleErrs, (0, codegen_1._)`${e}.errors`), () => gen.throw(e)));
|
|
62
|
-
return ruleErrs;
|
|
63
|
-
}
|
|
64
|
-
function validateSync() {
|
|
65
|
-
const validateErrs = (0, codegen_1._)`${validateRef}.errors`;
|
|
66
|
-
gen.assign(validateErrs, null);
|
|
67
|
-
assignValid(codegen_1.nil);
|
|
68
|
-
return validateErrs;
|
|
69
|
-
}
|
|
70
|
-
function assignValid(_await = def.async ? (0, codegen_1._)`await ` : codegen_1.nil) {
|
|
71
|
-
const passCxt = it.opts.passContext ? names_1.default.this : names_1.default.self;
|
|
72
|
-
const passSchema = !("compile" in def && !$data || def.schema === false);
|
|
73
|
-
gen.assign(valid, (0, codegen_1._)`${_await}${(0, code_1.callValidateCode)(cxt, validateRef, passCxt, passSchema)}`, def.modifying);
|
|
74
|
-
}
|
|
75
|
-
function reportErrs(errors2) {
|
|
76
|
-
var _a2;
|
|
77
|
-
gen.if((0, codegen_1.not)((_a2 = def.valid) !== null && _a2 !== void 0 ? _a2 : valid), errors2);
|
|
10
|
+
Object.defineProperty(keyword, "__esModule", { value: true });
|
|
11
|
+
keyword.validateKeywordUsage = keyword.validSchemaType = keyword.funcKeywordCode = keyword.macroKeywordCode = void 0;
|
|
12
|
+
const codegen_1 = codegen;
|
|
13
|
+
const names_1 = names;
|
|
14
|
+
const code_1 = code;
|
|
15
|
+
const errors_1 = errors;
|
|
16
|
+
function macroKeywordCode(cxt, def) {
|
|
17
|
+
const { gen, keyword: keyword2, schema, parentSchema, it } = cxt;
|
|
18
|
+
const macroSchema = def.macro.call(it.self, schema, parentSchema, it);
|
|
19
|
+
const schemaRef = useKeyword(gen, keyword2, macroSchema);
|
|
20
|
+
if (it.opts.validateSchema !== false)
|
|
21
|
+
it.self.validateSchema(macroSchema, true);
|
|
22
|
+
const valid = gen.name("valid");
|
|
23
|
+
cxt.subschema({
|
|
24
|
+
schema: macroSchema,
|
|
25
|
+
schemaPath: codegen_1.nil,
|
|
26
|
+
errSchemaPath: `${it.errSchemaPath}/${keyword2}`,
|
|
27
|
+
topSchemaRef: schemaRef,
|
|
28
|
+
compositeRule: true
|
|
29
|
+
}, valid);
|
|
30
|
+
cxt.pass(valid, () => cxt.error(true));
|
|
31
|
+
}
|
|
32
|
+
keyword.macroKeywordCode = macroKeywordCode;
|
|
33
|
+
function funcKeywordCode(cxt, def) {
|
|
34
|
+
var _a;
|
|
35
|
+
const { gen, keyword: keyword2, schema, parentSchema, $data, it } = cxt;
|
|
36
|
+
checkAsyncKeyword(it, def);
|
|
37
|
+
const validate = !$data && def.compile ? def.compile.call(it.self, schema, parentSchema, it) : def.validate;
|
|
38
|
+
const validateRef = useKeyword(gen, keyword2, validate);
|
|
39
|
+
const valid = gen.let("valid");
|
|
40
|
+
cxt.block$data(valid, validateKeyword);
|
|
41
|
+
cxt.ok((_a = def.valid) !== null && _a !== void 0 ? _a : valid);
|
|
42
|
+
function validateKeyword() {
|
|
43
|
+
if (def.errors === false) {
|
|
44
|
+
assignValid();
|
|
45
|
+
if (def.modifying)
|
|
46
|
+
modifyData(cxt);
|
|
47
|
+
reportErrs(() => cxt.error());
|
|
48
|
+
} else {
|
|
49
|
+
const ruleErrs = def.async ? validateAsync() : validateSync();
|
|
50
|
+
if (def.modifying)
|
|
51
|
+
modifyData(cxt);
|
|
52
|
+
reportErrs(() => addErrs(cxt, ruleErrs));
|
|
78
53
|
}
|
|
79
54
|
}
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
55
|
+
function validateAsync() {
|
|
56
|
+
const ruleErrs = gen.let("ruleErrs", null);
|
|
57
|
+
gen.try(() => assignValid((0, codegen_1._)`await `), (e) => gen.assign(valid, false).if((0, codegen_1._)`${e} instanceof ${it.ValidationError}`, () => gen.assign(ruleErrs, (0, codegen_1._)`${e}.errors`), () => gen.throw(e)));
|
|
58
|
+
return ruleErrs;
|
|
84
59
|
}
|
|
85
|
-
function
|
|
86
|
-
const
|
|
87
|
-
gen.
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
}, () => cxt.error());
|
|
60
|
+
function validateSync() {
|
|
61
|
+
const validateErrs = (0, codegen_1._)`${validateRef}.errors`;
|
|
62
|
+
gen.assign(validateErrs, null);
|
|
63
|
+
assignValid(codegen_1.nil);
|
|
64
|
+
return validateErrs;
|
|
91
65
|
}
|
|
92
|
-
function
|
|
93
|
-
|
|
94
|
-
|
|
66
|
+
function assignValid(_await = def.async ? (0, codegen_1._)`await ` : codegen_1.nil) {
|
|
67
|
+
const passCxt = it.opts.passContext ? names_1.default.this : names_1.default.self;
|
|
68
|
+
const passSchema = !("compile" in def && !$data || def.schema === false);
|
|
69
|
+
gen.assign(valid, (0, codegen_1._)`${_await}${(0, code_1.callValidateCode)(cxt, validateRef, passCxt, passSchema)}`, def.modifying);
|
|
95
70
|
}
|
|
96
|
-
function
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
return gen.scopeValue("keyword", typeof result == "function" ? { ref: result } : { ref: result, code: (0, codegen_1.stringify)(result) });
|
|
71
|
+
function reportErrs(errors2) {
|
|
72
|
+
var _a2;
|
|
73
|
+
gen.if((0, codegen_1.not)((_a2 = def.valid) !== null && _a2 !== void 0 ? _a2 : valid), errors2);
|
|
100
74
|
}
|
|
101
|
-
|
|
102
|
-
|
|
75
|
+
}
|
|
76
|
+
keyword.funcKeywordCode = funcKeywordCode;
|
|
77
|
+
function modifyData(cxt) {
|
|
78
|
+
const { gen, data, it } = cxt;
|
|
79
|
+
gen.if(it.parentData, () => gen.assign(data, (0, codegen_1._)`${it.parentData}[${it.parentDataProperty}]`));
|
|
80
|
+
}
|
|
81
|
+
function addErrs(cxt, errs) {
|
|
82
|
+
const { gen } = cxt;
|
|
83
|
+
gen.if((0, codegen_1._)`Array.isArray(${errs})`, () => {
|
|
84
|
+
gen.assign(names_1.default.vErrors, (0, codegen_1._)`${names_1.default.vErrors} === null ? ${errs} : ${names_1.default.vErrors}.concat(${errs})`).assign(names_1.default.errors, (0, codegen_1._)`${names_1.default.vErrors}.length`);
|
|
85
|
+
(0, errors_1.extendErrors)(cxt);
|
|
86
|
+
}, () => cxt.error());
|
|
87
|
+
}
|
|
88
|
+
function checkAsyncKeyword({ schemaEnv }, def) {
|
|
89
|
+
if (def.async && !schemaEnv.$async)
|
|
90
|
+
throw new Error("async keyword in sync schema");
|
|
91
|
+
}
|
|
92
|
+
function useKeyword(gen, keyword2, result) {
|
|
93
|
+
if (result === void 0)
|
|
94
|
+
throw new Error(`keyword "${keyword2}" failed to compile`);
|
|
95
|
+
return gen.scopeValue("keyword", typeof result == "function" ? { ref: result } : { ref: result, code: (0, codegen_1.stringify)(result) });
|
|
96
|
+
}
|
|
97
|
+
function validSchemaType(schema, schemaType, allowUndefined = false) {
|
|
98
|
+
return !schemaType.length || schemaType.some((st) => st === "array" ? Array.isArray(schema) : st === "object" ? schema && typeof schema == "object" && !Array.isArray(schema) : typeof schema == st || allowUndefined && typeof schema == "undefined");
|
|
99
|
+
}
|
|
100
|
+
keyword.validSchemaType = validSchemaType;
|
|
101
|
+
function validateKeywordUsage({ schema, opts, self, errSchemaPath }, def, keyword2) {
|
|
102
|
+
if (Array.isArray(def.keyword) ? !def.keyword.includes(keyword2) : def.keyword !== keyword2) {
|
|
103
|
+
throw new Error("ajv implementation error");
|
|
103
104
|
}
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
const
|
|
110
|
-
if (
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
const msg = `keyword "${keyword2}" value is invalid at path "${errSchemaPath}": ` + self.errorsText(def.validateSchema.errors);
|
|
117
|
-
if (opts.validateSchema === "log")
|
|
118
|
-
self.logger.error(msg);
|
|
119
|
-
else
|
|
120
|
-
throw new Error(msg);
|
|
121
|
-
}
|
|
105
|
+
const deps = def.dependencies;
|
|
106
|
+
if (deps === null || deps === void 0 ? void 0 : deps.some((kwd) => !Object.prototype.hasOwnProperty.call(schema, kwd))) {
|
|
107
|
+
throw new Error(`parent schema must have dependencies of ${keyword2}: ${deps.join(",")}`);
|
|
108
|
+
}
|
|
109
|
+
if (def.validateSchema) {
|
|
110
|
+
const valid = def.validateSchema(schema[keyword2]);
|
|
111
|
+
if (!valid) {
|
|
112
|
+
const msg = `keyword "${keyword2}" value is invalid at path "${errSchemaPath}": ` + self.errorsText(def.validateSchema.errors);
|
|
113
|
+
if (opts.validateSchema === "log")
|
|
114
|
+
self.logger.error(msg);
|
|
115
|
+
else
|
|
116
|
+
throw new Error(msg);
|
|
122
117
|
}
|
|
123
118
|
}
|
|
124
|
-
keyword.validateKeywordUsage = validateKeywordUsage;
|
|
125
|
-
return keyword;
|
|
126
119
|
}
|
|
120
|
+
keyword.validateKeywordUsage = validateKeywordUsage;
|
|
127
121
|
export {
|
|
128
|
-
|
|
122
|
+
keyword as default
|
|
129
123
|
};
|
package/dist/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/compile/validate/subschema.js
CHANGED
|
@@ -1,90 +1,84 @@
|
|
|
1
1
|
import { __exports as subschema } from "../../../../../../../../_virtual/subschema.js";
|
|
2
2
|
import "../codegen/index.js";
|
|
3
3
|
import "../util.js";
|
|
4
|
-
import { __exports as codegen } from "../../../../../../../../_virtual/
|
|
4
|
+
import { __exports as codegen } from "../../../../../../../../_virtual/index5.js";
|
|
5
5
|
import { __exports as util } from "../../../../../../../../_virtual/util.js";
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
const util_1 = util;
|
|
14
|
-
function getSubschema(it, { keyword, schemaProp, schema, schemaPath, errSchemaPath, topSchemaRef }) {
|
|
15
|
-
if (keyword !== void 0 && schema !== void 0) {
|
|
16
|
-
throw new Error('both "keyword" and "schema" passed, only one allowed');
|
|
17
|
-
}
|
|
18
|
-
if (keyword !== void 0) {
|
|
19
|
-
const sch = it.schema[keyword];
|
|
20
|
-
return schemaProp === void 0 ? {
|
|
21
|
-
schema: sch,
|
|
22
|
-
schemaPath: (0, codegen_1._)`${it.schemaPath}${(0, codegen_1.getProperty)(keyword)}`,
|
|
23
|
-
errSchemaPath: `${it.errSchemaPath}/${keyword}`
|
|
24
|
-
} : {
|
|
25
|
-
schema: sch[schemaProp],
|
|
26
|
-
schemaPath: (0, codegen_1._)`${it.schemaPath}${(0, codegen_1.getProperty)(keyword)}${(0, codegen_1.getProperty)(schemaProp)}`,
|
|
27
|
-
errSchemaPath: `${it.errSchemaPath}/${keyword}/${(0, util_1.escapeFragment)(schemaProp)}`
|
|
28
|
-
};
|
|
29
|
-
}
|
|
30
|
-
if (schema !== void 0) {
|
|
31
|
-
if (schemaPath === void 0 || errSchemaPath === void 0 || topSchemaRef === void 0) {
|
|
32
|
-
throw new Error('"schemaPath", "errSchemaPath" and "topSchemaRef" are required with "schema"');
|
|
33
|
-
}
|
|
34
|
-
return {
|
|
35
|
-
schema,
|
|
36
|
-
schemaPath,
|
|
37
|
-
topSchemaRef,
|
|
38
|
-
errSchemaPath
|
|
39
|
-
};
|
|
40
|
-
}
|
|
41
|
-
throw new Error('either "keyword" or "schema" must be passed');
|
|
6
|
+
Object.defineProperty(subschema, "__esModule", { value: true });
|
|
7
|
+
subschema.extendSubschemaMode = subschema.extendSubschemaData = subschema.getSubschema = void 0;
|
|
8
|
+
const codegen_1 = codegen;
|
|
9
|
+
const util_1 = util;
|
|
10
|
+
function getSubschema(it, { keyword, schemaProp, schema, schemaPath, errSchemaPath, topSchemaRef }) {
|
|
11
|
+
if (keyword !== void 0 && schema !== void 0) {
|
|
12
|
+
throw new Error('both "keyword" and "schema" passed, only one allowed');
|
|
42
13
|
}
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
const nextData = data instanceof codegen_1.Name ? data : gen.let("data", data, true);
|
|
59
|
-
dataContextProps(nextData);
|
|
60
|
-
if (propertyName !== void 0)
|
|
61
|
-
subschema2.propertyName = propertyName;
|
|
62
|
-
}
|
|
63
|
-
if (dataTypes)
|
|
64
|
-
subschema2.dataTypes = dataTypes;
|
|
65
|
-
function dataContextProps(_nextData) {
|
|
66
|
-
subschema2.data = _nextData;
|
|
67
|
-
subschema2.dataLevel = it.dataLevel + 1;
|
|
68
|
-
subschema2.dataTypes = [];
|
|
69
|
-
it.definedProperties = /* @__PURE__ */ new Set();
|
|
70
|
-
subschema2.parentData = it.data;
|
|
71
|
-
subschema2.dataNames = [...it.dataNames, _nextData];
|
|
14
|
+
if (keyword !== void 0) {
|
|
15
|
+
const sch = it.schema[keyword];
|
|
16
|
+
return schemaProp === void 0 ? {
|
|
17
|
+
schema: sch,
|
|
18
|
+
schemaPath: (0, codegen_1._)`${it.schemaPath}${(0, codegen_1.getProperty)(keyword)}`,
|
|
19
|
+
errSchemaPath: `${it.errSchemaPath}/${keyword}`
|
|
20
|
+
} : {
|
|
21
|
+
schema: sch[schemaProp],
|
|
22
|
+
schemaPath: (0, codegen_1._)`${it.schemaPath}${(0, codegen_1.getProperty)(keyword)}${(0, codegen_1.getProperty)(schemaProp)}`,
|
|
23
|
+
errSchemaPath: `${it.errSchemaPath}/${keyword}/${(0, util_1.escapeFragment)(schemaProp)}`
|
|
24
|
+
};
|
|
25
|
+
}
|
|
26
|
+
if (schema !== void 0) {
|
|
27
|
+
if (schemaPath === void 0 || errSchemaPath === void 0 || topSchemaRef === void 0) {
|
|
28
|
+
throw new Error('"schemaPath", "errSchemaPath" and "topSchemaRef" are required with "schema"');
|
|
72
29
|
}
|
|
30
|
+
return {
|
|
31
|
+
schema,
|
|
32
|
+
schemaPath,
|
|
33
|
+
topSchemaRef,
|
|
34
|
+
errSchemaPath
|
|
35
|
+
};
|
|
36
|
+
}
|
|
37
|
+
throw new Error('either "keyword" or "schema" must be passed');
|
|
38
|
+
}
|
|
39
|
+
subschema.getSubschema = getSubschema;
|
|
40
|
+
function extendSubschemaData(subschema2, it, { dataProp, dataPropType: dpType, data, dataTypes, propertyName }) {
|
|
41
|
+
if (data !== void 0 && dataProp !== void 0) {
|
|
42
|
+
throw new Error('both "data" and "dataProp" passed, only one allowed');
|
|
73
43
|
}
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
subschema2.jtdDiscriminator = jtdDiscriminator;
|
|
83
|
-
subschema2.jtdMetadata = jtdMetadata;
|
|
44
|
+
const { gen } = it;
|
|
45
|
+
if (dataProp !== void 0) {
|
|
46
|
+
const { errorPath, dataPathArr, opts } = it;
|
|
47
|
+
const nextData = gen.let("data", (0, codegen_1._)`${it.data}${(0, codegen_1.getProperty)(dataProp)}`, true);
|
|
48
|
+
dataContextProps(nextData);
|
|
49
|
+
subschema2.errorPath = (0, codegen_1.str)`${errorPath}${(0, util_1.getErrorPath)(dataProp, dpType, opts.jsPropertySyntax)}`;
|
|
50
|
+
subschema2.parentDataProperty = (0, codegen_1._)`${dataProp}`;
|
|
51
|
+
subschema2.dataPathArr = [...dataPathArr, subschema2.parentDataProperty];
|
|
84
52
|
}
|
|
85
|
-
|
|
86
|
-
|
|
53
|
+
if (data !== void 0) {
|
|
54
|
+
const nextData = data instanceof codegen_1.Name ? data : gen.let("data", data, true);
|
|
55
|
+
dataContextProps(nextData);
|
|
56
|
+
if (propertyName !== void 0)
|
|
57
|
+
subschema2.propertyName = propertyName;
|
|
58
|
+
}
|
|
59
|
+
if (dataTypes)
|
|
60
|
+
subschema2.dataTypes = dataTypes;
|
|
61
|
+
function dataContextProps(_nextData) {
|
|
62
|
+
subschema2.data = _nextData;
|
|
63
|
+
subschema2.dataLevel = it.dataLevel + 1;
|
|
64
|
+
subschema2.dataTypes = [];
|
|
65
|
+
it.definedProperties = /* @__PURE__ */ new Set();
|
|
66
|
+
subschema2.parentData = it.data;
|
|
67
|
+
subschema2.dataNames = [...it.dataNames, _nextData];
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
subschema.extendSubschemaData = extendSubschemaData;
|
|
71
|
+
function extendSubschemaMode(subschema2, { jtdDiscriminator, jtdMetadata, compositeRule, createErrors, allErrors }) {
|
|
72
|
+
if (compositeRule !== void 0)
|
|
73
|
+
subschema2.compositeRule = compositeRule;
|
|
74
|
+
if (createErrors !== void 0)
|
|
75
|
+
subschema2.createErrors = createErrors;
|
|
76
|
+
if (allErrors !== void 0)
|
|
77
|
+
subschema2.allErrors = allErrors;
|
|
78
|
+
subschema2.jtdDiscriminator = jtdDiscriminator;
|
|
79
|
+
subschema2.jtdMetadata = jtdMetadata;
|
|
87
80
|
}
|
|
81
|
+
subschema.extendSubschemaMode = extendSubschemaMode;
|
|
88
82
|
export {
|
|
89
|
-
|
|
83
|
+
subschema as default
|
|
90
84
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { __exports as core } from "../../../../../../_virtual/core.js";
|
|
2
|
-
import
|
|
2
|
+
import "./compile/validate/index.js";
|
|
3
3
|
import "./compile/codegen/index.js";
|
|
4
|
-
import
|
|
4
|
+
import "./runtime/validation_error.js";
|
|
5
5
|
import "./compile/ref_error.js";
|
|
6
6
|
import "./compile/rules.js";
|
|
7
7
|
import "./compile/index.js";
|
|
@@ -10,18 +10,20 @@ import "./compile/validate/dataType.js";
|
|
|
10
10
|
import "./compile/util.js";
|
|
11
11
|
import require$$9 from "./refs/data.json.js";
|
|
12
12
|
import "./runtime/uri.js";
|
|
13
|
-
import { __exports as
|
|
13
|
+
import { __exports as validate } from "../../../../../../_virtual/index4.js";
|
|
14
|
+
import { __exports as codegen } from "../../../../../../_virtual/index5.js";
|
|
15
|
+
import { __exports as validation_error } from "../../../../../../_virtual/validation_error.js";
|
|
14
16
|
import { __exports as ref_error } from "../../../../../../_virtual/ref_error.js";
|
|
15
17
|
import { __exports as rules } from "../../../../../../_virtual/rules.js";
|
|
16
18
|
import { __exports as resolve } from "../../../../../../_virtual/resolve.js";
|
|
17
|
-
import { __exports as compile } from "../../../../../../_virtual/
|
|
19
|
+
import { __exports as compile } from "../../../../../../_virtual/index10.js";
|
|
18
20
|
import { __exports as util } from "../../../../../../_virtual/util.js";
|
|
19
21
|
import { __exports as dataType } from "../../../../../../_virtual/dataType.js";
|
|
20
22
|
import { __exports as uri } from "../../../../../../_virtual/uri.js";
|
|
21
23
|
(function(exports$1) {
|
|
22
24
|
Object.defineProperty(exports$1, "__esModule", { value: true });
|
|
23
25
|
exports$1.CodeGen = exports$1.Name = exports$1.nil = exports$1.stringify = exports$1.str = exports$1._ = exports$1.KeywordCxt = void 0;
|
|
24
|
-
var validate_1 =
|
|
26
|
+
var validate_1 = validate;
|
|
25
27
|
Object.defineProperty(exports$1, "KeywordCxt", { enumerable: true, get: function() {
|
|
26
28
|
return validate_1.KeywordCxt;
|
|
27
29
|
} });
|
|
@@ -44,7 +46,7 @@ import { __exports as uri } from "../../../../../../_virtual/uri.js";
|
|
|
44
46
|
Object.defineProperty(exports$1, "CodeGen", { enumerable: true, get: function() {
|
|
45
47
|
return codegen_1.CodeGen;
|
|
46
48
|
} });
|
|
47
|
-
const validation_error_1 =
|
|
49
|
+
const validation_error_1 = validation_error;
|
|
48
50
|
const ref_error_1 = ref_error;
|
|
49
51
|
const rules_1 = rules;
|
|
50
52
|
const compile_1 = compile;
|
package/dist/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/runtime/validation_error.js
CHANGED
|
@@ -1,19 +1,10 @@
|
|
|
1
1
|
import { __exports as validation_error } from "../../../../../../../_virtual/validation_error.js";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
constructor(errors) {
|
|
9
|
-
super("validation failed");
|
|
10
|
-
this.errors = errors;
|
|
11
|
-
this.ajv = this.validation = true;
|
|
12
|
-
}
|
|
2
|
+
Object.defineProperty(validation_error, "__esModule", { value: true });
|
|
3
|
+
class ValidationError extends Error {
|
|
4
|
+
constructor(errors) {
|
|
5
|
+
super("validation failed");
|
|
6
|
+
this.errors = errors;
|
|
7
|
+
this.ajv = this.validation = true;
|
|
13
8
|
}
|
|
14
|
-
validation_error.default = ValidationError;
|
|
15
|
-
return validation_error;
|
|
16
9
|
}
|
|
17
|
-
|
|
18
|
-
requireValidation_error as __require
|
|
19
|
-
};
|
|
10
|
+
validation_error.default = ValidationError;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { __exports as additionalItems } from "../../../../../../../../_virtual/additionalItems.js";
|
|
2
2
|
import "../../compile/codegen/index.js";
|
|
3
3
|
import "../../compile/util.js";
|
|
4
|
-
import { __exports as codegen } from "../../../../../../../../_virtual/
|
|
4
|
+
import { __exports as codegen } from "../../../../../../../../_virtual/index5.js";
|
|
5
5
|
import { __exports as util } from "../../../../../../../../_virtual/util.js";
|
|
6
6
|
Object.defineProperty(additionalItems, "__esModule", { value: true });
|
|
7
7
|
additionalItems.validateAdditionalItems = void 0;
|
|
@@ -6,7 +6,7 @@ import "../../compile/util.js";
|
|
|
6
6
|
import { __exports as util } from "../../../../../../../../_virtual/util.js";
|
|
7
7
|
import { __exports as code } from "../../../../../../../../_virtual/code2.js";
|
|
8
8
|
import { __exports as names } from "../../../../../../../../_virtual/names.js";
|
|
9
|
-
import { __exports as codegen } from "../../../../../../../../_virtual/
|
|
9
|
+
import { __exports as codegen } from "../../../../../../../../_virtual/index5.js";
|
|
10
10
|
Object.defineProperty(additionalProperties, "__esModule", { value: true });
|
|
11
11
|
const code_1 = code;
|
|
12
12
|
const codegen_1 = codegen;
|
package/dist/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/applicator/contains.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { __exports as contains } from "../../../../../../../../_virtual/contains.js";
|
|
2
2
|
import "../../compile/codegen/index.js";
|
|
3
3
|
import "../../compile/util.js";
|
|
4
|
-
import { __exports as codegen } from "../../../../../../../../_virtual/
|
|
4
|
+
import { __exports as codegen } from "../../../../../../../../_virtual/index5.js";
|
|
5
5
|
import { __exports as util } from "../../../../../../../../_virtual/util.js";
|
|
6
6
|
Object.defineProperty(contains, "__esModule", { value: true });
|
|
7
7
|
const codegen_1 = codegen;
|
|
@@ -2,7 +2,7 @@ import { __exports as dependencies } from "../../../../../../../../_virtual/depe
|
|
|
2
2
|
import "../../compile/codegen/index.js";
|
|
3
3
|
import "../../compile/util.js";
|
|
4
4
|
import "../code.js";
|
|
5
|
-
import { __exports as codegen } from "../../../../../../../../_virtual/
|
|
5
|
+
import { __exports as codegen } from "../../../../../../../../_virtual/index5.js";
|
|
6
6
|
import { __exports as code } from "../../../../../../../../_virtual/code2.js";
|
|
7
7
|
import { __exports as util } from "../../../../../../../../_virtual/util.js";
|
|
8
8
|
(function(exports$1) {
|
package/dist/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/applicator/if.js
CHANGED
|
@@ -2,7 +2,7 @@ import { __exports as _if } from "../../../../../../../../_virtual/if.js";
|
|
|
2
2
|
import "../../compile/codegen/index.js";
|
|
3
3
|
import "../../compile/util.js";
|
|
4
4
|
import { __exports as util } from "../../../../../../../../_virtual/util.js";
|
|
5
|
-
import { __exports as codegen } from "../../../../../../../../_virtual/
|
|
5
|
+
import { __exports as codegen } from "../../../../../../../../_virtual/index5.js";
|
|
6
6
|
Object.defineProperty(_if, "__esModule", { value: true });
|
|
7
7
|
const codegen_1 = codegen;
|
|
8
8
|
const util_1 = util;
|
package/dist/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/applicator/items.js
CHANGED
|
@@ -3,7 +3,7 @@ import "../../compile/codegen/index.js";
|
|
|
3
3
|
import "../../compile/util.js";
|
|
4
4
|
import "../code.js";
|
|
5
5
|
import { __exports as util } from "../../../../../../../../_virtual/util.js";
|
|
6
|
-
import { __exports as codegen } from "../../../../../../../../_virtual/
|
|
6
|
+
import { __exports as codegen } from "../../../../../../../../_virtual/index5.js";
|
|
7
7
|
import { __exports as code } from "../../../../../../../../_virtual/code2.js";
|
|
8
8
|
Object.defineProperty(items, "__esModule", { value: true });
|
|
9
9
|
items.validateTuple = void 0;
|
|
@@ -6,7 +6,7 @@ import "./additionalItems.js";
|
|
|
6
6
|
import { __exports as util } from "../../../../../../../../_virtual/util.js";
|
|
7
7
|
import { __exports as additionalItems } from "../../../../../../../../_virtual/additionalItems.js";
|
|
8
8
|
import { __exports as code } from "../../../../../../../../_virtual/code2.js";
|
|
9
|
-
import { __exports as codegen } from "../../../../../../../../_virtual/
|
|
9
|
+
import { __exports as codegen } from "../../../../../../../../_virtual/index5.js";
|
|
10
10
|
Object.defineProperty(items2020, "__esModule", { value: true });
|
|
11
11
|
const codegen_1 = codegen;
|
|
12
12
|
const util_1 = util;
|
package/dist/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/applicator/oneOf.js
CHANGED
|
@@ -2,7 +2,7 @@ import { __exports as oneOf } from "../../../../../../../../_virtual/oneOf.js";
|
|
|
2
2
|
import "../../compile/codegen/index.js";
|
|
3
3
|
import "../../compile/util.js";
|
|
4
4
|
import { __exports as util } from "../../../../../../../../_virtual/util.js";
|
|
5
|
-
import { __exports as codegen } from "../../../../../../../../_virtual/
|
|
5
|
+
import { __exports as codegen } from "../../../../../../../../_virtual/index5.js";
|
|
6
6
|
Object.defineProperty(oneOf, "__esModule", { value: true });
|
|
7
7
|
const codegen_1 = codegen;
|
|
8
8
|
const util_1 = util;
|
|
@@ -4,7 +4,7 @@ import "../../compile/codegen/index.js";
|
|
|
4
4
|
import "../../compile/util.js";
|
|
5
5
|
import { __exports as code } from "../../../../../../../../_virtual/code2.js";
|
|
6
6
|
import { __exports as util } from "../../../../../../../../_virtual/util.js";
|
|
7
|
-
import { __exports as codegen } from "../../../../../../../../_virtual/
|
|
7
|
+
import { __exports as codegen } from "../../../../../../../../_virtual/index5.js";
|
|
8
8
|
Object.defineProperty(patternProperties, "__esModule", { value: true });
|
|
9
9
|
const code_1 = code;
|
|
10
10
|
const codegen_1 = codegen;
|
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
import { __exports as properties } from "../../../../../../../../_virtual/properties.js";
|
|
2
|
-
import
|
|
2
|
+
import "../../compile/validate/index.js";
|
|
3
3
|
import "../code.js";
|
|
4
4
|
import "../../compile/util.js";
|
|
5
5
|
import "./additionalProperties.js";
|
|
6
6
|
import { __exports as additionalProperties } from "../../../../../../../../_virtual/additionalProperties.js";
|
|
7
|
+
import { __exports as validate } from "../../../../../../../../_virtual/index4.js";
|
|
7
8
|
import { __exports as code } from "../../../../../../../../_virtual/code2.js";
|
|
8
9
|
import { __exports as util } from "../../../../../../../../_virtual/util.js";
|
|
9
10
|
Object.defineProperty(properties, "__esModule", { value: true });
|
|
10
|
-
const validate_1 =
|
|
11
|
+
const validate_1 = validate;
|
|
11
12
|
const code_1 = code;
|
|
12
13
|
const util_1 = util;
|
|
13
14
|
const additionalProperties_1 = additionalProperties;
|
|
@@ -2,7 +2,7 @@ import { __exports as propertyNames } from "../../../../../../../../_virtual/pro
|
|
|
2
2
|
import "../../compile/codegen/index.js";
|
|
3
3
|
import "../../compile/util.js";
|
|
4
4
|
import { __exports as util } from "../../../../../../../../_virtual/util.js";
|
|
5
|
-
import { __exports as codegen } from "../../../../../../../../_virtual/
|
|
5
|
+
import { __exports as codegen } from "../../../../../../../../_virtual/index5.js";
|
|
6
6
|
Object.defineProperty(propertyNames, "__esModule", { value: true });
|
|
7
7
|
const codegen_1 = codegen;
|
|
8
8
|
const util_1 = util;
|
|
@@ -2,7 +2,7 @@ import { __exports as code } from "../../../../../../../_virtual/code2.js";
|
|
|
2
2
|
import "../compile/codegen/index.js";
|
|
3
3
|
import "../compile/util.js";
|
|
4
4
|
import "../compile/names.js";
|
|
5
|
-
import { __exports as codegen } from "../../../../../../../_virtual/
|
|
5
|
+
import { __exports as codegen } from "../../../../../../../_virtual/index5.js";
|
|
6
6
|
import { __exports as util } from "../../../../../../../_virtual/util.js";
|
|
7
7
|
import { __exports as names } from "../../../../../../../_virtual/names.js";
|
|
8
8
|
Object.defineProperty(code, "__esModule", { value: true });
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { __exports as core$1 } from "../../../../../../../../_virtual/
|
|
1
|
+
import { __exports as core$1 } from "../../../../../../../../_virtual/index11.js";
|
|
2
2
|
import "./id.js";
|
|
3
3
|
import "./ref.js";
|
|
4
4
|
import { __exports as id } from "../../../../../../../../_virtual/id.js";
|