@dforge-core/dforge-mcp 0.1.0-rc.1 → 0.1.0-rc.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/dist/server.js CHANGED
@@ -1064,52 +1064,52 @@ var require_util = __commonJS({
1064
1064
  return hash;
1065
1065
  }
1066
1066
  exports2.toHash = toHash;
1067
- function alwaysValidSchema(it, schema) {
1068
- if (typeof schema == "boolean")
1069
- return schema;
1070
- if (Object.keys(schema).length === 0)
1067
+ function alwaysValidSchema(it, schema2) {
1068
+ if (typeof schema2 == "boolean")
1069
+ return schema2;
1070
+ if (Object.keys(schema2).length === 0)
1071
1071
  return true;
1072
- checkUnknownRules(it, schema);
1073
- return !schemaHasRules(schema, it.self.RULES.all);
1072
+ checkUnknownRules(it, schema2);
1073
+ return !schemaHasRules(schema2, it.self.RULES.all);
1074
1074
  }
1075
1075
  exports2.alwaysValidSchema = alwaysValidSchema;
1076
- function checkUnknownRules(it, schema = it.schema) {
1076
+ function checkUnknownRules(it, schema2 = it.schema) {
1077
1077
  const { opts, self } = it;
1078
1078
  if (!opts.strictSchema)
1079
1079
  return;
1080
- if (typeof schema === "boolean")
1080
+ if (typeof schema2 === "boolean")
1081
1081
  return;
1082
1082
  const rules = self.RULES.keywords;
1083
- for (const key in schema) {
1083
+ for (const key in schema2) {
1084
1084
  if (!rules[key])
1085
1085
  checkStrictMode(it, `unknown keyword: "${key}"`);
1086
1086
  }
1087
1087
  }
1088
1088
  exports2.checkUnknownRules = checkUnknownRules;
1089
- function schemaHasRules(schema, rules) {
1090
- if (typeof schema == "boolean")
1091
- return !schema;
1092
- for (const key in schema)
1089
+ function schemaHasRules(schema2, rules) {
1090
+ if (typeof schema2 == "boolean")
1091
+ return !schema2;
1092
+ for (const key in schema2)
1093
1093
  if (rules[key])
1094
1094
  return true;
1095
1095
  return false;
1096
1096
  }
1097
1097
  exports2.schemaHasRules = schemaHasRules;
1098
- function schemaHasRulesButRef(schema, RULES) {
1099
- if (typeof schema == "boolean")
1100
- return !schema;
1101
- for (const key in schema)
1098
+ function schemaHasRulesButRef(schema2, RULES) {
1099
+ if (typeof schema2 == "boolean")
1100
+ return !schema2;
1101
+ for (const key in schema2)
1102
1102
  if (key !== "$ref" && RULES.all[key])
1103
1103
  return true;
1104
1104
  return false;
1105
1105
  }
1106
1106
  exports2.schemaHasRulesButRef = schemaHasRulesButRef;
1107
- function schemaRefOrVal({ topSchemaRef, schemaPath }, schema, keyword, $data) {
1107
+ function schemaRefOrVal({ topSchemaRef, schemaPath }, schema2, keyword, $data) {
1108
1108
  if (!$data) {
1109
- if (typeof schema == "number" || typeof schema == "boolean")
1110
- return schema;
1111
- if (typeof schema == "string")
1112
- return (0, codegen_1._)`${schema}`;
1109
+ if (typeof schema2 == "number" || typeof schema2 == "boolean")
1110
+ return schema2;
1111
+ if (typeof schema2 == "string")
1112
+ return (0, codegen_1._)`${schema2}`;
1113
1113
  }
1114
1114
  return (0, codegen_1._)`${topSchemaRef}${schemaPath}${(0, codegen_1.getProperty)(keyword)}`;
1115
1115
  }
@@ -1390,10 +1390,10 @@ var require_boolSchema = __commonJS({
1390
1390
  message: "boolean schema is false"
1391
1391
  };
1392
1392
  function topBoolOrEmptySchema(it) {
1393
- const { gen, schema, validateName } = it;
1394
- if (schema === false) {
1393
+ const { gen, schema: schema2, validateName } = it;
1394
+ if (schema2 === false) {
1395
1395
  falseSchemaError(it, false);
1396
- } else if (typeof schema == "object" && schema.$async === true) {
1396
+ } else if (typeof schema2 == "object" && schema2.$async === true) {
1397
1397
  gen.return(names_1.default.data);
1398
1398
  } else {
1399
1399
  gen.assign((0, codegen_1._)`${validateName}.errors`, null);
@@ -1402,8 +1402,8 @@ var require_boolSchema = __commonJS({
1402
1402
  }
1403
1403
  exports2.topBoolOrEmptySchema = topBoolOrEmptySchema;
1404
1404
  function boolOrEmptySchema(it, valid) {
1405
- const { gen, schema } = it;
1406
- if (schema === false) {
1405
+ const { gen, schema: schema2 } = it;
1406
+ if (schema2 === false) {
1407
1407
  gen.var(valid, false);
1408
1408
  falseSchemaError(it);
1409
1409
  } else {
@@ -1465,18 +1465,18 @@ var require_applicability = __commonJS({
1465
1465
  "use strict";
1466
1466
  Object.defineProperty(exports2, "__esModule", { value: true });
1467
1467
  exports2.shouldUseRule = exports2.shouldUseGroup = exports2.schemaHasRulesForType = void 0;
1468
- function schemaHasRulesForType({ schema, self }, type) {
1468
+ function schemaHasRulesForType({ schema: schema2, self }, type) {
1469
1469
  const group = self.RULES.types[type];
1470
- return group && group !== true && shouldUseGroup(schema, group);
1470
+ return group && group !== true && shouldUseGroup(schema2, group);
1471
1471
  }
1472
1472
  exports2.schemaHasRulesForType = schemaHasRulesForType;
1473
- function shouldUseGroup(schema, group) {
1474
- return group.rules.some((rule) => shouldUseRule(schema, rule));
1473
+ function shouldUseGroup(schema2, group) {
1474
+ return group.rules.some((rule) => shouldUseRule(schema2, rule));
1475
1475
  }
1476
1476
  exports2.shouldUseGroup = shouldUseGroup;
1477
- function shouldUseRule(schema, rule) {
1477
+ function shouldUseRule(schema2, rule) {
1478
1478
  var _a;
1479
- return schema[rule.keyword] !== void 0 || ((_a = rule.definition.implements) === null || _a === void 0 ? void 0 : _a.some((kwd) => schema[kwd] !== void 0));
1479
+ return schema2[rule.keyword] !== void 0 || ((_a = rule.definition.implements) === null || _a === void 0 ? void 0 : _a.some((kwd) => schema2[kwd] !== void 0));
1480
1480
  }
1481
1481
  exports2.shouldUseRule = shouldUseRule;
1482
1482
  }
@@ -1498,17 +1498,17 @@ var require_dataType = __commonJS({
1498
1498
  DataType2[DataType2["Correct"] = 0] = "Correct";
1499
1499
  DataType2[DataType2["Wrong"] = 1] = "Wrong";
1500
1500
  })(DataType || (exports2.DataType = DataType = {}));
1501
- function getSchemaTypes(schema) {
1502
- const types = getJSONTypes(schema.type);
1501
+ function getSchemaTypes(schema2) {
1502
+ const types = getJSONTypes(schema2.type);
1503
1503
  const hasNull = types.includes("null");
1504
1504
  if (hasNull) {
1505
- if (schema.nullable === false)
1505
+ if (schema2.nullable === false)
1506
1506
  throw new Error("type: null contradicts nullable: false");
1507
1507
  } else {
1508
- if (!types.length && schema.nullable !== void 0) {
1508
+ if (!types.length && schema2.nullable !== void 0) {
1509
1509
  throw new Error('"nullable" cannot be used without "type"');
1510
1510
  }
1511
- if (schema.nullable === true)
1511
+ if (schema2.nullable === true)
1512
1512
  types.push("null");
1513
1513
  }
1514
1514
  return types;
@@ -1640,8 +1640,8 @@ var require_dataType = __commonJS({
1640
1640
  }
1641
1641
  exports2.checkDataTypes = checkDataTypes;
1642
1642
  var typeError = {
1643
- message: ({ schema }) => `must be ${schema}`,
1644
- params: ({ schema, schemaValue }) => typeof schema == "string" ? (0, codegen_1._)`{type: ${schema}}` : (0, codegen_1._)`{type: ${schemaValue}}`
1643
+ message: ({ schema: schema2 }) => `must be ${schema2}`,
1644
+ params: ({ schema: schema2, schemaValue }) => typeof schema2 == "string" ? (0, codegen_1._)`{type: ${schema2}}` : (0, codegen_1._)`{type: ${schemaValue}}`
1645
1645
  };
1646
1646
  function reportTypeError(it) {
1647
1647
  const cxt = getTypeErrorContext(it);
@@ -1649,16 +1649,16 @@ var require_dataType = __commonJS({
1649
1649
  }
1650
1650
  exports2.reportTypeError = reportTypeError;
1651
1651
  function getTypeErrorContext(it) {
1652
- const { gen, data, schema } = it;
1653
- const schemaCode = (0, util_1.schemaRefOrVal)(it, schema, "type");
1652
+ const { gen, data, schema: schema2 } = it;
1653
+ const schemaCode = (0, util_1.schemaRefOrVal)(it, schema2, "type");
1654
1654
  return {
1655
1655
  gen,
1656
1656
  keyword: "type",
1657
1657
  data,
1658
- schema: schema.type,
1658
+ schema: schema2.type,
1659
1659
  schemaCode,
1660
1660
  schemaValue: schemaCode,
1661
- parentSchema: schema,
1661
+ parentSchema: schema2,
1662
1662
  params: {},
1663
1663
  it
1664
1664
  };
@@ -1811,15 +1811,15 @@ var require_code2 = __commonJS({
1811
1811
  }
1812
1812
  exports2.validateArray = validateArray;
1813
1813
  function validateUnion(cxt) {
1814
- const { gen, schema, keyword, it } = cxt;
1815
- if (!Array.isArray(schema))
1814
+ const { gen, schema: schema2, keyword, it } = cxt;
1815
+ if (!Array.isArray(schema2))
1816
1816
  throw new Error("ajv implementation error");
1817
- const alwaysValid = schema.some((sch) => (0, util_1.alwaysValidSchema)(it, sch));
1817
+ const alwaysValid = schema2.some((sch) => (0, util_1.alwaysValidSchema)(it, sch));
1818
1818
  if (alwaysValid && !it.opts.unevaluated)
1819
1819
  return;
1820
1820
  const valid = gen.let("valid", false);
1821
1821
  const schValid = gen.name("_valid");
1822
- gen.block(() => schema.forEach((_sch, i) => {
1822
+ gen.block(() => schema2.forEach((_sch, i) => {
1823
1823
  const schCxt = cxt.subschema({
1824
1824
  keyword,
1825
1825
  schemaProp: i,
@@ -1847,8 +1847,8 @@ var require_keyword = __commonJS({
1847
1847
  var code_1 = require_code2();
1848
1848
  var errors_1 = require_errors();
1849
1849
  function macroKeywordCode(cxt, def) {
1850
- const { gen, keyword, schema, parentSchema, it } = cxt;
1851
- const macroSchema = def.macro.call(it.self, schema, parentSchema, it);
1850
+ const { gen, keyword, schema: schema2, parentSchema, it } = cxt;
1851
+ const macroSchema = def.macro.call(it.self, schema2, parentSchema, it);
1852
1852
  const schemaRef = useKeyword(gen, keyword, macroSchema);
1853
1853
  if (it.opts.validateSchema !== false)
1854
1854
  it.self.validateSchema(macroSchema, true);
@@ -1865,9 +1865,9 @@ var require_keyword = __commonJS({
1865
1865
  exports2.macroKeywordCode = macroKeywordCode;
1866
1866
  function funcKeywordCode(cxt, def) {
1867
1867
  var _a;
1868
- const { gen, keyword, schema, parentSchema, $data, it } = cxt;
1868
+ const { gen, keyword, schema: schema2, parentSchema, $data, it } = cxt;
1869
1869
  checkAsyncKeyword(it, def);
1870
- const validate = !$data && def.compile ? def.compile.call(it.self, schema, parentSchema, it) : def.validate;
1870
+ const validate = !$data && def.compile ? def.compile.call(it.self, schema2, parentSchema, it) : def.validate;
1871
1871
  const validateRef = useKeyword(gen, keyword, validate);
1872
1872
  const valid = gen.let("valid");
1873
1873
  cxt.block$data(valid, validateKeyword);
@@ -1927,20 +1927,20 @@ var require_keyword = __commonJS({
1927
1927
  throw new Error(`keyword "${keyword}" failed to compile`);
1928
1928
  return gen.scopeValue("keyword", typeof result == "function" ? { ref: result } : { ref: result, code: (0, codegen_1.stringify)(result) });
1929
1929
  }
1930
- function validSchemaType(schema, schemaType, allowUndefined = false) {
1931
- 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");
1930
+ function validSchemaType(schema2, schemaType, allowUndefined = false) {
1931
+ return !schemaType.length || schemaType.some((st) => st === "array" ? Array.isArray(schema2) : st === "object" ? schema2 && typeof schema2 == "object" && !Array.isArray(schema2) : typeof schema2 == st || allowUndefined && typeof schema2 == "undefined");
1932
1932
  }
1933
1933
  exports2.validSchemaType = validSchemaType;
1934
- function validateKeywordUsage({ schema, opts, self, errSchemaPath }, def, keyword) {
1934
+ function validateKeywordUsage({ schema: schema2, opts, self, errSchemaPath }, def, keyword) {
1935
1935
  if (Array.isArray(def.keyword) ? !def.keyword.includes(keyword) : def.keyword !== keyword) {
1936
1936
  throw new Error("ajv implementation error");
1937
1937
  }
1938
1938
  const deps = def.dependencies;
1939
- if (deps === null || deps === void 0 ? void 0 : deps.some((kwd) => !Object.prototype.hasOwnProperty.call(schema, kwd))) {
1939
+ if (deps === null || deps === void 0 ? void 0 : deps.some((kwd) => !Object.prototype.hasOwnProperty.call(schema2, kwd))) {
1940
1940
  throw new Error(`parent schema must have dependencies of ${keyword}: ${deps.join(",")}`);
1941
1941
  }
1942
1942
  if (def.validateSchema) {
1943
- const valid = def.validateSchema(schema[keyword]);
1943
+ const valid = def.validateSchema(schema2[keyword]);
1944
1944
  if (!valid) {
1945
1945
  const msg = `keyword "${keyword}" value is invalid at path "${errSchemaPath}": ` + self.errorsText(def.validateSchema.errors);
1946
1946
  if (opts.validateSchema === "log")
@@ -1962,8 +1962,8 @@ var require_subschema = __commonJS({
1962
1962
  exports2.extendSubschemaMode = exports2.extendSubschemaData = exports2.getSubschema = void 0;
1963
1963
  var codegen_1 = require_codegen();
1964
1964
  var util_1 = require_util();
1965
- function getSubschema(it, { keyword, schemaProp, schema, schemaPath, errSchemaPath, topSchemaRef }) {
1966
- if (keyword !== void 0 && schema !== void 0) {
1965
+ function getSubschema(it, { keyword, schemaProp, schema: schema2, schemaPath, errSchemaPath, topSchemaRef }) {
1966
+ if (keyword !== void 0 && schema2 !== void 0) {
1967
1967
  throw new Error('both "keyword" and "schema" passed, only one allowed');
1968
1968
  }
1969
1969
  if (keyword !== void 0) {
@@ -1978,12 +1978,12 @@ var require_subschema = __commonJS({
1978
1978
  errSchemaPath: `${it.errSchemaPath}/${keyword}/${(0, util_1.escapeFragment)(schemaProp)}`
1979
1979
  };
1980
1980
  }
1981
- if (schema !== void 0) {
1981
+ if (schema2 !== void 0) {
1982
1982
  if (schemaPath === void 0 || errSchemaPath === void 0 || topSchemaRef === void 0) {
1983
1983
  throw new Error('"schemaPath", "errSchemaPath" and "topSchemaRef" are required with "schema"');
1984
1984
  }
1985
1985
  return {
1986
- schema,
1986
+ schema: schema2,
1987
1987
  schemaPath,
1988
1988
  topSchemaRef,
1989
1989
  errSchemaPath
@@ -2076,7 +2076,7 @@ var require_fast_deep_equal = __commonJS({
2076
2076
  var require_json_schema_traverse = __commonJS({
2077
2077
  "node_modules/json-schema-traverse/index.js"(exports2, module2) {
2078
2078
  "use strict";
2079
- var traverse = module2.exports = function(schema, opts, cb) {
2079
+ var traverse = module2.exports = function(schema2, opts, cb) {
2080
2080
  if (typeof opts == "function") {
2081
2081
  cb = opts;
2082
2082
  opts = {};
@@ -2086,7 +2086,7 @@ var require_json_schema_traverse = __commonJS({
2086
2086
  };
2087
2087
  var post = cb.post || function() {
2088
2088
  };
2089
- _traverse(opts, pre, post, schema, "", schema);
2089
+ _traverse(opts, pre, post, schema2, "", schema2);
2090
2090
  };
2091
2091
  traverse.keywords = {
2092
2092
  additionalItems: true,
@@ -2132,26 +2132,26 @@ var require_json_schema_traverse = __commonJS({
2132
2132
  maxProperties: true,
2133
2133
  minProperties: true
2134
2134
  };
2135
- function _traverse(opts, pre, post, schema, jsonPtr, rootSchema, parentJsonPtr, parentKeyword, parentSchema, keyIndex) {
2136
- if (schema && typeof schema == "object" && !Array.isArray(schema)) {
2137
- pre(schema, jsonPtr, rootSchema, parentJsonPtr, parentKeyword, parentSchema, keyIndex);
2138
- for (var key in schema) {
2139
- var sch = schema[key];
2135
+ function _traverse(opts, pre, post, schema2, jsonPtr, rootSchema, parentJsonPtr, parentKeyword, parentSchema, keyIndex) {
2136
+ if (schema2 && typeof schema2 == "object" && !Array.isArray(schema2)) {
2137
+ pre(schema2, jsonPtr, rootSchema, parentJsonPtr, parentKeyword, parentSchema, keyIndex);
2138
+ for (var key in schema2) {
2139
+ var sch = schema2[key];
2140
2140
  if (Array.isArray(sch)) {
2141
2141
  if (key in traverse.arrayKeywords) {
2142
2142
  for (var i = 0; i < sch.length; i++)
2143
- _traverse(opts, pre, post, sch[i], jsonPtr + "/" + key + "/" + i, rootSchema, jsonPtr, key, schema, i);
2143
+ _traverse(opts, pre, post, sch[i], jsonPtr + "/" + key + "/" + i, rootSchema, jsonPtr, key, schema2, i);
2144
2144
  }
2145
2145
  } else if (key in traverse.propsKeywords) {
2146
2146
  if (sch && typeof sch == "object") {
2147
2147
  for (var prop in sch)
2148
- _traverse(opts, pre, post, sch[prop], jsonPtr + "/" + key + "/" + escapeJsonPtr(prop), rootSchema, jsonPtr, key, schema, prop);
2148
+ _traverse(opts, pre, post, sch[prop], jsonPtr + "/" + key + "/" + escapeJsonPtr(prop), rootSchema, jsonPtr, key, schema2, prop);
2149
2149
  }
2150
2150
  } else if (key in traverse.keywords || opts.allKeys && !(key in traverse.skipKeywords)) {
2151
- _traverse(opts, pre, post, sch, jsonPtr + "/" + key, rootSchema, jsonPtr, key, schema);
2151
+ _traverse(opts, pre, post, sch, jsonPtr + "/" + key, rootSchema, jsonPtr, key, schema2);
2152
2152
  }
2153
2153
  }
2154
- post(schema, jsonPtr, rootSchema, parentJsonPtr, parentKeyword, parentSchema, keyIndex);
2154
+ post(schema2, jsonPtr, rootSchema, parentJsonPtr, parentKeyword, parentSchema, keyIndex);
2155
2155
  }
2156
2156
  }
2157
2157
  function escapeJsonPtr(str) {
@@ -2187,14 +2187,14 @@ var require_resolve = __commonJS({
2187
2187
  "enum",
2188
2188
  "const"
2189
2189
  ]);
2190
- function inlineRef(schema, limit = true) {
2191
- if (typeof schema == "boolean")
2190
+ function inlineRef(schema2, limit = true) {
2191
+ if (typeof schema2 == "boolean")
2192
2192
  return true;
2193
2193
  if (limit === true)
2194
- return !hasRef(schema);
2194
+ return !hasRef(schema2);
2195
2195
  if (!limit)
2196
2196
  return false;
2197
- return countKeys(schema) <= limit;
2197
+ return countKeys(schema2) <= limit;
2198
2198
  }
2199
2199
  exports2.inlineRef = inlineRef;
2200
2200
  var REF_KEYWORDS = /* @__PURE__ */ new Set([
@@ -2204,11 +2204,11 @@ var require_resolve = __commonJS({
2204
2204
  "$dynamicRef",
2205
2205
  "$dynamicAnchor"
2206
2206
  ]);
2207
- function hasRef(schema) {
2208
- for (const key in schema) {
2207
+ function hasRef(schema2) {
2208
+ for (const key in schema2) {
2209
2209
  if (REF_KEYWORDS.has(key))
2210
2210
  return true;
2211
- const sch = schema[key];
2211
+ const sch = schema2[key];
2212
2212
  if (Array.isArray(sch) && sch.some(hasRef))
2213
2213
  return true;
2214
2214
  if (typeof sch == "object" && hasRef(sch))
@@ -2216,16 +2216,16 @@ var require_resolve = __commonJS({
2216
2216
  }
2217
2217
  return false;
2218
2218
  }
2219
- function countKeys(schema) {
2219
+ function countKeys(schema2) {
2220
2220
  let count = 0;
2221
- for (const key in schema) {
2221
+ for (const key in schema2) {
2222
2222
  if (key === "$ref")
2223
2223
  return Infinity;
2224
2224
  count++;
2225
2225
  if (SIMPLE_INLINED.has(key))
2226
2226
  continue;
2227
- if (typeof schema[key] == "object") {
2228
- (0, util_1.eachItem)(schema[key], (sch) => count += countKeys(sch));
2227
+ if (typeof schema2[key] == "object") {
2228
+ (0, util_1.eachItem)(schema2[key], (sch) => count += countKeys(sch));
2229
2229
  }
2230
2230
  if (count === Infinity)
2231
2231
  return Infinity;
@@ -2255,16 +2255,16 @@ var require_resolve = __commonJS({
2255
2255
  }
2256
2256
  exports2.resolveUrl = resolveUrl;
2257
2257
  var ANCHOR = /^[a-z_][-a-z0-9._]*$/i;
2258
- function getSchemaRefs(schema, baseId) {
2259
- if (typeof schema == "boolean")
2258
+ function getSchemaRefs(schema2, baseId) {
2259
+ if (typeof schema2 == "boolean")
2260
2260
  return {};
2261
2261
  const { schemaId, uriResolver } = this.opts;
2262
- const schId = normalizeId(schema[schemaId] || baseId);
2262
+ const schId = normalizeId(schema2[schemaId] || baseId);
2263
2263
  const baseIds = { "": schId };
2264
2264
  const pathPrefix = getFullPath(uriResolver, schId, false);
2265
2265
  const localRefs = {};
2266
2266
  const schemaRefs = /* @__PURE__ */ new Set();
2267
- traverse(schema, { allKeys: true }, (sch, jsonPtr, _, parentJsonPtr) => {
2267
+ traverse(schema2, { allKeys: true }, (sch, jsonPtr, _, parentJsonPtr) => {
2268
2268
  if (parentJsonPtr === void 0)
2269
2269
  return;
2270
2270
  const fullPath = pathPrefix + jsonPtr;
@@ -2345,15 +2345,15 @@ var require_validate = __commonJS({
2345
2345
  validateFunction(it, () => (0, boolSchema_1.topBoolOrEmptySchema)(it));
2346
2346
  }
2347
2347
  exports2.validateFunctionCode = validateFunctionCode;
2348
- function validateFunction({ gen, validateName, schema, schemaEnv, opts }, body) {
2348
+ function validateFunction({ gen, validateName, schema: schema2, schemaEnv, opts }, body) {
2349
2349
  if (opts.code.es5) {
2350
2350
  gen.func(validateName, (0, codegen_1._)`${names_1.default.data}, ${names_1.default.valCxt}`, schemaEnv.$async, () => {
2351
- gen.code((0, codegen_1._)`"use strict"; ${funcSourceUrl(schema, opts)}`);
2351
+ gen.code((0, codegen_1._)`"use strict"; ${funcSourceUrl(schema2, opts)}`);
2352
2352
  destructureValCxtES5(gen, opts);
2353
2353
  gen.code(body);
2354
2354
  });
2355
2355
  } else {
2356
- gen.func(validateName, (0, codegen_1._)`${names_1.default.data}, ${destructureValCxt(opts)}`, schemaEnv.$async, () => gen.code(funcSourceUrl(schema, opts)).code(body));
2356
+ gen.func(validateName, (0, codegen_1._)`${names_1.default.data}, ${destructureValCxt(opts)}`, schemaEnv.$async, () => gen.code(funcSourceUrl(schema2, opts)).code(body));
2357
2357
  }
2358
2358
  }
2359
2359
  function destructureValCxt(opts) {
@@ -2377,9 +2377,9 @@ var require_validate = __commonJS({
2377
2377
  });
2378
2378
  }
2379
2379
  function topSchemaObjCode(it) {
2380
- const { schema, opts, gen } = it;
2380
+ const { schema: schema2, opts, gen } = it;
2381
2381
  validateFunction(it, () => {
2382
- if (opts.$comment && schema.$comment)
2382
+ if (opts.$comment && schema2.$comment)
2383
2383
  commentKeyword(it);
2384
2384
  checkNoDefault(it);
2385
2385
  gen.let(names_1.default.vErrors, null);
@@ -2397,8 +2397,8 @@ var require_validate = __commonJS({
2397
2397
  gen.if((0, codegen_1._)`${it.evaluated}.dynamicProps`, () => gen.assign((0, codegen_1._)`${it.evaluated}.props`, (0, codegen_1._)`undefined`));
2398
2398
  gen.if((0, codegen_1._)`${it.evaluated}.dynamicItems`, () => gen.assign((0, codegen_1._)`${it.evaluated}.items`, (0, codegen_1._)`undefined`));
2399
2399
  }
2400
- function funcSourceUrl(schema, opts) {
2401
- const schId = typeof schema == "object" && schema[opts.schemaId];
2400
+ function funcSourceUrl(schema2, opts) {
2401
+ const schId = typeof schema2 == "object" && schema2[opts.schemaId];
2402
2402
  return schId && (opts.code.source || opts.code.process) ? (0, codegen_1._)`/*# sourceURL=${schId} */` : codegen_1.nil;
2403
2403
  }
2404
2404
  function subschemaCode(it, valid) {
@@ -2411,10 +2411,10 @@ var require_validate = __commonJS({
2411
2411
  }
2412
2412
  (0, boolSchema_1.boolOrEmptySchema)(it, valid);
2413
2413
  }
2414
- function schemaCxtHasRules({ schema, self }) {
2415
- if (typeof schema == "boolean")
2416
- return !schema;
2417
- for (const key in schema)
2414
+ function schemaCxtHasRules({ schema: schema2, self }) {
2415
+ if (typeof schema2 == "boolean")
2416
+ return !schema2;
2417
+ for (const key in schema2)
2418
2418
  if (self.RULES.all[key])
2419
2419
  return true;
2420
2420
  return false;
@@ -2423,8 +2423,8 @@ var require_validate = __commonJS({
2423
2423
  return typeof it.schema != "boolean";
2424
2424
  }
2425
2425
  function subSchemaObjCode(it, valid) {
2426
- const { schema, gen, opts } = it;
2427
- if (opts.$comment && schema.$comment)
2426
+ const { schema: schema2, gen, opts } = it;
2427
+ if (opts.$comment && schema2.$comment)
2428
2428
  commentKeyword(it);
2429
2429
  updateContext(it);
2430
2430
  checkAsyncSchema(it);
@@ -2444,14 +2444,14 @@ var require_validate = __commonJS({
2444
2444
  schemaKeywords(it, types, !checkedTypes, errsCount);
2445
2445
  }
2446
2446
  function checkRefsAndKeywords(it) {
2447
- const { schema, errSchemaPath, opts, self } = it;
2448
- if (schema.$ref && opts.ignoreKeywordsWithRef && (0, util_1.schemaHasRulesButRef)(schema, self.RULES)) {
2447
+ const { schema: schema2, errSchemaPath, opts, self } = it;
2448
+ if (schema2.$ref && opts.ignoreKeywordsWithRef && (0, util_1.schemaHasRulesButRef)(schema2, self.RULES)) {
2449
2449
  self.logger.warn(`$ref: keywords ignored in schema at path "${errSchemaPath}"`);
2450
2450
  }
2451
2451
  }
2452
2452
  function checkNoDefault(it) {
2453
- const { schema, opts } = it;
2454
- if (schema.default !== void 0 && opts.useDefaults && opts.strictSchema) {
2453
+ const { schema: schema2, opts } = it;
2454
+ if (schema2.default !== void 0 && opts.useDefaults && opts.strictSchema) {
2455
2455
  (0, util_1.checkStrictMode)(it, "default is ignored in the schema root");
2456
2456
  }
2457
2457
  }
@@ -2464,8 +2464,8 @@ var require_validate = __commonJS({
2464
2464
  if (it.schema.$async && !it.schemaEnv.$async)
2465
2465
  throw new Error("async schema in sync schema");
2466
2466
  }
2467
- function commentKeyword({ gen, schemaEnv, schema, errSchemaPath, opts }) {
2468
- const msg = schema.$comment;
2467
+ function commentKeyword({ gen, schemaEnv, schema: schema2, errSchemaPath, opts }) {
2468
+ const msg = schema2.$comment;
2469
2469
  if (opts.$comment === true) {
2470
2470
  gen.code((0, codegen_1._)`${names_1.default.self}.logger.log(${msg})`);
2471
2471
  } else if (typeof opts.$comment == "function") {
@@ -2492,9 +2492,9 @@ var require_validate = __commonJS({
2492
2492
  gen.assign((0, codegen_1._)`${evaluated}.items`, items);
2493
2493
  }
2494
2494
  function schemaKeywords(it, types, typeErrors, errsCount) {
2495
- const { gen, schema, data, allErrors, opts, self } = it;
2495
+ const { gen, schema: schema2, data, allErrors, opts, self } = it;
2496
2496
  const { RULES } = self;
2497
- if (schema.$ref && (opts.ignoreKeywordsWithRef || !(0, util_1.schemaHasRulesButRef)(schema, RULES))) {
2497
+ if (schema2.$ref && (opts.ignoreKeywordsWithRef || !(0, util_1.schemaHasRulesButRef)(schema2, RULES))) {
2498
2498
  gen.block(() => keywordCode(it, "$ref", RULES.all.$ref.definition));
2499
2499
  return;
2500
2500
  }
@@ -2506,7 +2506,7 @@ var require_validate = __commonJS({
2506
2506
  groupKeywords(RULES.post);
2507
2507
  });
2508
2508
  function groupKeywords(group) {
2509
- if (!(0, applicability_1.shouldUseGroup)(schema, group))
2509
+ if (!(0, applicability_1.shouldUseGroup)(schema2, group))
2510
2510
  return;
2511
2511
  if (group.type) {
2512
2512
  gen.if((0, dataType_2.checkDataType)(group.type, data, opts.strictNumbers));
@@ -2524,12 +2524,12 @@ var require_validate = __commonJS({
2524
2524
  }
2525
2525
  }
2526
2526
  function iterateKeywords(it, group) {
2527
- const { gen, schema, opts: { useDefaults } } = it;
2527
+ const { gen, schema: schema2, opts: { useDefaults } } = it;
2528
2528
  if (useDefaults)
2529
2529
  (0, defaults_1.assignDefaults)(it, group.type);
2530
2530
  gen.block(() => {
2531
2531
  for (const rule of group.rules) {
2532
- if ((0, applicability_1.shouldUseRule)(schema, rule)) {
2532
+ if ((0, applicability_1.shouldUseRule)(schema2, rule)) {
2533
2533
  keywordCode(it, rule.keyword, rule.definition, group.type);
2534
2534
  }
2535
2535
  }
@@ -2874,17 +2874,17 @@ var require_compile = __commonJS({
2874
2874
  var _a;
2875
2875
  this.refs = {};
2876
2876
  this.dynamicAnchors = {};
2877
- let schema;
2877
+ let schema2;
2878
2878
  if (typeof env.schema == "object")
2879
- schema = env.schema;
2879
+ schema2 = env.schema;
2880
2880
  this.schema = env.schema;
2881
2881
  this.schemaId = env.schemaId;
2882
2882
  this.root = env.root || this;
2883
- this.baseId = (_a = env.baseId) !== null && _a !== void 0 ? _a : (0, resolve_1.normalizeId)(schema === null || schema === void 0 ? void 0 : schema[env.schemaId || "$id"]);
2883
+ this.baseId = (_a = env.baseId) !== null && _a !== void 0 ? _a : (0, resolve_1.normalizeId)(schema2 === null || schema2 === void 0 ? void 0 : schema2[env.schemaId || "$id"]);
2884
2884
  this.schemaPath = env.schemaPath;
2885
2885
  this.localRefs = env.localRefs;
2886
2886
  this.meta = env.meta;
2887
- this.$async = schema === null || schema === void 0 ? void 0 : schema.$async;
2887
+ this.$async = schema2 === null || schema2 === void 0 ? void 0 : schema2.$async;
2888
2888
  this.refs = {};
2889
2889
  }
2890
2890
  };
@@ -2983,10 +2983,10 @@ var require_compile = __commonJS({
2983
2983
  return schOrFunc;
2984
2984
  let _sch = resolve4.call(this, root, ref);
2985
2985
  if (_sch === void 0) {
2986
- const schema = (_a = root.localRefs) === null || _a === void 0 ? void 0 : _a[ref];
2986
+ const schema2 = (_a = root.localRefs) === null || _a === void 0 ? void 0 : _a[ref];
2987
2987
  const { schemaId } = this.opts;
2988
- if (schema)
2989
- _sch = new SchemaEnv({ schema, schemaId, root, baseId });
2988
+ if (schema2)
2989
+ _sch = new SchemaEnv({ schema: schema2, schemaId, root, baseId });
2990
2990
  }
2991
2991
  if (_sch === void 0)
2992
2992
  return;
@@ -3034,12 +3034,12 @@ var require_compile = __commonJS({
3034
3034
  if (!schOrRef.validate)
3035
3035
  compileSchema.call(this, schOrRef);
3036
3036
  if (id === (0, resolve_1.normalizeId)(ref)) {
3037
- const { schema } = schOrRef;
3037
+ const { schema: schema2 } = schOrRef;
3038
3038
  const { schemaId } = this.opts;
3039
- const schId = schema[schemaId];
3039
+ const schId = schema2[schemaId];
3040
3040
  if (schId)
3041
3041
  baseId = (0, resolve_1.resolveUrl)(this.opts.uriResolver, baseId, schId);
3042
- return new SchemaEnv({ schema, schemaId, root, baseId });
3042
+ return new SchemaEnv({ schema: schema2, schemaId, root, baseId });
3043
3043
  }
3044
3044
  return getJsonPointer.call(this, p, schOrRef);
3045
3045
  }
@@ -3051,29 +3051,29 @@ var require_compile = __commonJS({
3051
3051
  "dependencies",
3052
3052
  "definitions"
3053
3053
  ]);
3054
- function getJsonPointer(parsedRef, { baseId, schema, root }) {
3054
+ function getJsonPointer(parsedRef, { baseId, schema: schema2, root }) {
3055
3055
  var _a;
3056
3056
  if (((_a = parsedRef.fragment) === null || _a === void 0 ? void 0 : _a[0]) !== "/")
3057
3057
  return;
3058
3058
  for (const part of parsedRef.fragment.slice(1).split("/")) {
3059
- if (typeof schema === "boolean")
3059
+ if (typeof schema2 === "boolean")
3060
3060
  return;
3061
- const partSchema = schema[(0, util_1.unescapeFragment)(part)];
3061
+ const partSchema = schema2[(0, util_1.unescapeFragment)(part)];
3062
3062
  if (partSchema === void 0)
3063
3063
  return;
3064
- schema = partSchema;
3065
- const schId = typeof schema === "object" && schema[this.opts.schemaId];
3064
+ schema2 = partSchema;
3065
+ const schId = typeof schema2 === "object" && schema2[this.opts.schemaId];
3066
3066
  if (!PREVENT_SCOPE_CHANGE.has(part) && schId) {
3067
3067
  baseId = (0, resolve_1.resolveUrl)(this.opts.uriResolver, baseId, schId);
3068
3068
  }
3069
3069
  }
3070
3070
  let env;
3071
- if (typeof schema != "boolean" && schema.$ref && !(0, util_1.schemaHasRulesButRef)(schema, this.RULES)) {
3072
- const $ref = (0, resolve_1.resolveUrl)(this.opts.uriResolver, baseId, schema.$ref);
3071
+ if (typeof schema2 != "boolean" && schema2.$ref && !(0, util_1.schemaHasRulesButRef)(schema2, this.RULES)) {
3072
+ const $ref = (0, resolve_1.resolveUrl)(this.opts.uriResolver, baseId, schema2.$ref);
3073
3073
  env = resolveSchema.call(this, root, $ref);
3074
3074
  }
3075
3075
  const { schemaId } = this.opts;
3076
- env = env || new SchemaEnv({ schema, schemaId, root, baseId });
3076
+ env = env || new SchemaEnv({ schema: schema2, schemaId, root, baseId });
3077
3077
  if (env.schema !== env.root.schema)
3078
3078
  return env;
3079
3079
  return void 0;
@@ -4089,16 +4089,16 @@ var require_core = __commonJS({
4089
4089
  this.errors = v.errors;
4090
4090
  return valid;
4091
4091
  }
4092
- compile(schema, _meta) {
4093
- const sch = this._addSchema(schema, _meta);
4092
+ compile(schema2, _meta) {
4093
+ const sch = this._addSchema(schema2, _meta);
4094
4094
  return sch.validate || this._compileSchemaEnv(sch);
4095
4095
  }
4096
- compileAsync(schema, meta) {
4096
+ compileAsync(schema2, meta) {
4097
4097
  if (typeof this.opts.loadSchema != "function") {
4098
4098
  throw new Error("options.loadSchema should be a function");
4099
4099
  }
4100
4100
  const { loadSchema } = this.opts;
4101
- return runCompileAsync.call(this, schema, meta);
4101
+ return runCompileAsync.call(this, schema2, meta);
4102
4102
  async function runCompileAsync(_schema, _meta) {
4103
4103
  await loadMetaSchema.call(this, _schema.$schema);
4104
4104
  const sch = this._addSchema(_schema, _meta);
@@ -4144,37 +4144,37 @@ var require_core = __commonJS({
4144
4144
  }
4145
4145
  }
4146
4146
  // Adds schema to the instance
4147
- addSchema(schema, key, _meta, _validateSchema = this.opts.validateSchema) {
4148
- if (Array.isArray(schema)) {
4149
- for (const sch of schema)
4147
+ addSchema(schema2, key, _meta, _validateSchema = this.opts.validateSchema) {
4148
+ if (Array.isArray(schema2)) {
4149
+ for (const sch of schema2)
4150
4150
  this.addSchema(sch, void 0, _meta, _validateSchema);
4151
4151
  return this;
4152
4152
  }
4153
4153
  let id;
4154
- if (typeof schema === "object") {
4154
+ if (typeof schema2 === "object") {
4155
4155
  const { schemaId } = this.opts;
4156
- id = schema[schemaId];
4156
+ id = schema2[schemaId];
4157
4157
  if (id !== void 0 && typeof id != "string") {
4158
4158
  throw new Error(`schema ${schemaId} must be string`);
4159
4159
  }
4160
4160
  }
4161
4161
  key = (0, resolve_1.normalizeId)(key || id);
4162
4162
  this._checkUnique(key);
4163
- this.schemas[key] = this._addSchema(schema, _meta, key, _validateSchema, true);
4163
+ this.schemas[key] = this._addSchema(schema2, _meta, key, _validateSchema, true);
4164
4164
  return this;
4165
4165
  }
4166
4166
  // Add schema that will be used to validate other schemas
4167
4167
  // options in META_IGNORE_OPTIONS are alway set to false
4168
- addMetaSchema(schema, key, _validateSchema = this.opts.validateSchema) {
4169
- this.addSchema(schema, key, true, _validateSchema);
4168
+ addMetaSchema(schema2, key, _validateSchema = this.opts.validateSchema) {
4169
+ this.addSchema(schema2, key, true, _validateSchema);
4170
4170
  return this;
4171
4171
  }
4172
4172
  // Validate schema against its meta-schema
4173
- validateSchema(schema, throwOrLogError) {
4174
- if (typeof schema == "boolean")
4173
+ validateSchema(schema2, throwOrLogError) {
4174
+ if (typeof schema2 == "boolean")
4175
4175
  return true;
4176
4176
  let $schema;
4177
- $schema = schema.$schema;
4177
+ $schema = schema2.$schema;
4178
4178
  if ($schema !== void 0 && typeof $schema != "string") {
4179
4179
  throw new Error("$schema must be a string");
4180
4180
  }
@@ -4184,7 +4184,7 @@ var require_core = __commonJS({
4184
4184
  this.errors = null;
4185
4185
  return true;
4186
4186
  }
4187
- const valid = this.validate($schema, schema);
4187
+ const valid = this.validate($schema, schema2);
4188
4188
  if (!valid && throwOrLogError) {
4189
4189
  const message = "schema is invalid: " + this.errorsText();
4190
4190
  if (this.opts.validateSchema === "log")
@@ -4327,9 +4327,9 @@ var require_core = __commonJS({
4327
4327
  if (typeof rule != "object")
4328
4328
  continue;
4329
4329
  const { $data } = rule.definition;
4330
- const schema = keywords[key];
4331
- if ($data && schema)
4332
- keywords[key] = schemaOrData(schema);
4330
+ const schema2 = keywords[key];
4331
+ if ($data && schema2)
4332
+ keywords[key] = schemaOrData(schema2);
4333
4333
  }
4334
4334
  }
4335
4335
  return metaSchema;
@@ -4347,23 +4347,23 @@ var require_core = __commonJS({
4347
4347
  }
4348
4348
  }
4349
4349
  }
4350
- _addSchema(schema, meta, baseId, validateSchema = this.opts.validateSchema, addSchema = this.opts.addUsedSchema) {
4350
+ _addSchema(schema2, meta, baseId, validateSchema = this.opts.validateSchema, addSchema = this.opts.addUsedSchema) {
4351
4351
  let id;
4352
4352
  const { schemaId } = this.opts;
4353
- if (typeof schema == "object") {
4354
- id = schema[schemaId];
4353
+ if (typeof schema2 == "object") {
4354
+ id = schema2[schemaId];
4355
4355
  } else {
4356
4356
  if (this.opts.jtd)
4357
4357
  throw new Error("schema must be object");
4358
- else if (typeof schema != "boolean")
4358
+ else if (typeof schema2 != "boolean")
4359
4359
  throw new Error("schema must be object or boolean");
4360
4360
  }
4361
- let sch = this._cache.get(schema);
4361
+ let sch = this._cache.get(schema2);
4362
4362
  if (sch !== void 0)
4363
4363
  return sch;
4364
4364
  baseId = (0, resolve_1.normalizeId)(id || baseId);
4365
- const localRefs = resolve_1.getSchemaRefs.call(this, schema, baseId);
4366
- sch = new compile_1.SchemaEnv({ schema, schemaId, meta, baseId, localRefs });
4365
+ const localRefs = resolve_1.getSchemaRefs.call(this, schema2, baseId);
4366
+ sch = new compile_1.SchemaEnv({ schema: schema2, schemaId, meta, baseId, localRefs });
4367
4367
  this._cache.set(sch.schema, sch);
4368
4368
  if (addSchema && !baseId.startsWith("#")) {
4369
4369
  if (baseId)
@@ -4371,7 +4371,7 @@ var require_core = __commonJS({
4371
4371
  this.refs[baseId] = sch;
4372
4372
  }
4373
4373
  if (validateSchema)
4374
- this.validateSchema(schema, true);
4374
+ this.validateSchema(schema2, true);
4375
4375
  return sch;
4376
4376
  }
4377
4377
  _checkUnique(id) {
@@ -4525,8 +4525,8 @@ var require_core = __commonJS({
4525
4525
  var $dataRef = {
4526
4526
  $ref: "https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"
4527
4527
  };
4528
- function schemaOrData(schema) {
4529
- return { anyOf: [schema, $dataRef] };
4528
+ function schemaOrData(schema2) {
4529
+ return { anyOf: [schema2, $dataRef] };
4530
4530
  }
4531
4531
  }
4532
4532
  });
@@ -4826,7 +4826,7 @@ var require_pattern = __commonJS({
4826
4826
  $data: true,
4827
4827
  error: error2,
4828
4828
  code(cxt) {
4829
- const { gen, data, $data, schema, schemaCode, it } = cxt;
4829
+ const { gen, data, $data, schema: schema2, schemaCode, it } = cxt;
4830
4830
  const u = it.opts.unicodeRegExp ? "u" : "";
4831
4831
  if ($data) {
4832
4832
  const { regExp } = it.opts.code;
@@ -4835,7 +4835,7 @@ var require_pattern = __commonJS({
4835
4835
  gen.try(() => gen.assign(valid, (0, codegen_1._)`${regExpCode}(${schemaCode}, ${u}).test(${data})`), () => gen.assign(valid, false));
4836
4836
  cxt.fail$data((0, codegen_1._)`!${valid}`);
4837
4837
  } else {
4838
- const regExp = (0, code_1.usePattern)(cxt, schema);
4838
+ const regExp = (0, code_1.usePattern)(cxt, schema2);
4839
4839
  cxt.fail$data((0, codegen_1._)`!${regExp}.test(${data})`);
4840
4840
  }
4841
4841
  }
@@ -4892,11 +4892,11 @@ var require_required = __commonJS({
4892
4892
  $data: true,
4893
4893
  error: error2,
4894
4894
  code(cxt) {
4895
- const { gen, schema, schemaCode, data, $data, it } = cxt;
4895
+ const { gen, schema: schema2, schemaCode, data, $data, it } = cxt;
4896
4896
  const { opts } = it;
4897
- if (!$data && schema.length === 0)
4897
+ if (!$data && schema2.length === 0)
4898
4898
  return;
4899
- const useLoop = schema.length >= opts.loopRequired;
4899
+ const useLoop = schema2.length >= opts.loopRequired;
4900
4900
  if (it.allErrors)
4901
4901
  allErrorsMode();
4902
4902
  else
@@ -4904,7 +4904,7 @@ var require_required = __commonJS({
4904
4904
  if (opts.strictRequired) {
4905
4905
  const props = cxt.parentSchema.properties;
4906
4906
  const { definedProperties } = cxt.it;
4907
- for (const requiredKey of schema) {
4907
+ for (const requiredKey of schema2) {
4908
4908
  if ((props === null || props === void 0 ? void 0 : props[requiredKey]) === void 0 && !definedProperties.has(requiredKey)) {
4909
4909
  const schemaPath = it.schemaEnv.baseId + it.errSchemaPath;
4910
4910
  const msg = `required property "${requiredKey}" is not defined at "${schemaPath}" (strictRequired)`;
@@ -4916,7 +4916,7 @@ var require_required = __commonJS({
4916
4916
  if (useLoop || $data) {
4917
4917
  cxt.block$data(codegen_1.nil, loopAllRequired);
4918
4918
  } else {
4919
- for (const prop of schema) {
4919
+ for (const prop of schema2) {
4920
4920
  (0, code_1.checkReportMissingProp)(cxt, prop);
4921
4921
  }
4922
4922
  }
@@ -4928,7 +4928,7 @@ var require_required = __commonJS({
4928
4928
  cxt.block$data(valid, () => loopUntilMissing(missing, valid));
4929
4929
  cxt.ok(valid);
4930
4930
  } else {
4931
- gen.if((0, code_1.checkMissingProp)(cxt, schema, missing));
4931
+ gen.if((0, code_1.checkMissingProp)(cxt, schema2, missing));
4932
4932
  (0, code_1.reportMissingProp)(cxt, missing);
4933
4933
  gen.else();
4934
4934
  }
@@ -5015,8 +5015,8 @@ var require_uniqueItems = __commonJS({
5015
5015
  $data: true,
5016
5016
  error: error2,
5017
5017
  code(cxt) {
5018
- const { gen, data, $data, schema, parentSchema, schemaCode, it } = cxt;
5019
- if (!$data && !schema)
5018
+ const { gen, data, $data, schema: schema2, parentSchema, schemaCode, it } = cxt;
5019
+ if (!$data && !schema2)
5020
5020
  return;
5021
5021
  const valid = gen.let("valid");
5022
5022
  const itemTypes = parentSchema.items ? (0, dataType_1.getSchemaTypes)(parentSchema.items) : [];
@@ -5079,11 +5079,11 @@ var require_const = __commonJS({
5079
5079
  $data: true,
5080
5080
  error: error2,
5081
5081
  code(cxt) {
5082
- const { gen, data, $data, schemaCode, schema } = cxt;
5083
- if ($data || schema && typeof schema == "object") {
5082
+ const { gen, data, $data, schemaCode, schema: schema2 } = cxt;
5083
+ if ($data || schema2 && typeof schema2 == "object") {
5084
5084
  cxt.fail$data((0, codegen_1._)`!${(0, util_1.useFunc)(gen, equal_1.default)}(${data}, ${schemaCode})`);
5085
5085
  } else {
5086
- cxt.fail((0, codegen_1._)`${schema} !== ${data}`);
5086
+ cxt.fail((0, codegen_1._)`${schema2} !== ${data}`);
5087
5087
  }
5088
5088
  }
5089
5089
  };
@@ -5109,10 +5109,10 @@ var require_enum = __commonJS({
5109
5109
  $data: true,
5110
5110
  error: error2,
5111
5111
  code(cxt) {
5112
- const { gen, data, $data, schema, schemaCode, it } = cxt;
5113
- if (!$data && schema.length === 0)
5112
+ const { gen, data, $data, schema: schema2, schemaCode, it } = cxt;
5113
+ if (!$data && schema2.length === 0)
5114
5114
  throw new Error("enum must have non-empty array");
5115
- const useLoop = schema.length >= it.opts.loopEnum;
5115
+ const useLoop = schema2.length >= it.opts.loopEnum;
5116
5116
  let eql;
5117
5117
  const getEql = () => eql !== null && eql !== void 0 ? eql : eql = (0, util_1.useFunc)(gen, equal_1.default);
5118
5118
  let valid;
@@ -5120,10 +5120,10 @@ var require_enum = __commonJS({
5120
5120
  valid = gen.let("valid");
5121
5121
  cxt.block$data(valid, loopEnum);
5122
5122
  } else {
5123
- if (!Array.isArray(schema))
5123
+ if (!Array.isArray(schema2))
5124
5124
  throw new Error("ajv implementation error");
5125
5125
  const vSchema = gen.const("vSchema", schemaCode);
5126
- valid = (0, codegen_1.or)(...schema.map((_x, i) => equalCode(vSchema, i)));
5126
+ valid = (0, codegen_1.or)(...schema2.map((_x, i) => equalCode(vSchema, i)));
5127
5127
  }
5128
5128
  cxt.pass(valid);
5129
5129
  function loopEnum() {
@@ -5131,7 +5131,7 @@ var require_enum = __commonJS({
5131
5131
  gen.forOf("v", schemaCode, (v) => gen.if((0, codegen_1._)`${getEql()}(${data}, ${v})`, () => gen.assign(valid, true).break()));
5132
5132
  }
5133
5133
  function equalCode(vSchema, i) {
5134
- const sch = schema[i];
5134
+ const sch = schema2[i];
5135
5135
  return typeof sch === "object" && sch !== null ? (0, codegen_1._)`${getEql()}(${data}, ${vSchema}[${i}])` : (0, codegen_1._)`${data} === ${sch}`;
5136
5136
  }
5137
5137
  }
@@ -5207,13 +5207,13 @@ var require_additionalItems = __commonJS({
5207
5207
  }
5208
5208
  };
5209
5209
  function validateAdditionalItems(cxt, items) {
5210
- const { gen, schema, data, keyword, it } = cxt;
5210
+ const { gen, schema: schema2, data, keyword, it } = cxt;
5211
5211
  it.items = true;
5212
5212
  const len = gen.const("len", (0, codegen_1._)`${data}.length`);
5213
- if (schema === false) {
5213
+ if (schema2 === false) {
5214
5214
  cxt.setParams({ len: items.length });
5215
5215
  cxt.pass((0, codegen_1._)`${len} <= ${items.length}`);
5216
- } else if (typeof schema == "object" && !(0, util_1.alwaysValidSchema)(it, schema)) {
5216
+ } else if (typeof schema2 == "object" && !(0, util_1.alwaysValidSchema)(it, schema2)) {
5217
5217
  const valid = gen.var("valid", (0, codegen_1._)`${len} <= ${items.length}`);
5218
5218
  gen.if((0, codegen_1.not)(valid), () => validateItems(valid));
5219
5219
  cxt.ok(valid);
@@ -5246,11 +5246,11 @@ var require_items = __commonJS({
5246
5246
  schemaType: ["object", "array", "boolean"],
5247
5247
  before: "uniqueItems",
5248
5248
  code(cxt) {
5249
- const { schema, it } = cxt;
5250
- if (Array.isArray(schema))
5251
- return validateTuple(cxt, "additionalItems", schema);
5249
+ const { schema: schema2, it } = cxt;
5250
+ if (Array.isArray(schema2))
5251
+ return validateTuple(cxt, "additionalItems", schema2);
5252
5252
  it.items = true;
5253
- if ((0, util_1.alwaysValidSchema)(it, schema))
5253
+ if ((0, util_1.alwaysValidSchema)(it, schema2))
5254
5254
  return;
5255
5255
  cxt.ok((0, code_1.validateArray)(cxt));
5256
5256
  }
@@ -5325,10 +5325,10 @@ var require_items2020 = __commonJS({
5325
5325
  before: "uniqueItems",
5326
5326
  error: error2,
5327
5327
  code(cxt) {
5328
- const { schema, parentSchema, it } = cxt;
5328
+ const { schema: schema2, parentSchema, it } = cxt;
5329
5329
  const { prefixItems } = parentSchema;
5330
5330
  it.items = true;
5331
- if ((0, util_1.alwaysValidSchema)(it, schema))
5331
+ if ((0, util_1.alwaysValidSchema)(it, schema2))
5332
5332
  return;
5333
5333
  if (prefixItems)
5334
5334
  (0, additionalItems_1.validateAdditionalItems)(cxt, prefixItems);
@@ -5359,7 +5359,7 @@ var require_contains = __commonJS({
5359
5359
  trackErrors: true,
5360
5360
  error: error2,
5361
5361
  code(cxt) {
5362
- const { gen, schema, parentSchema, data, it } = cxt;
5362
+ const { gen, schema: schema2, parentSchema, data, it } = cxt;
5363
5363
  let min;
5364
5364
  let max;
5365
5365
  const { minContains, maxContains } = parentSchema;
@@ -5380,7 +5380,7 @@ var require_contains = __commonJS({
5380
5380
  cxt.fail();
5381
5381
  return;
5382
5382
  }
5383
- if ((0, util_1.alwaysValidSchema)(it, schema)) {
5383
+ if ((0, util_1.alwaysValidSchema)(it, schema2)) {
5384
5384
  let cond = (0, codegen_1._)`${len} >= ${min}`;
5385
5385
  if (max !== void 0)
5386
5386
  cond = (0, codegen_1._)`${cond} && ${len} <= ${max}`;
@@ -5465,14 +5465,14 @@ var require_dependencies = __commonJS({
5465
5465
  validateSchemaDeps(cxt, schDeps);
5466
5466
  }
5467
5467
  };
5468
- function splitDependencies({ schema }) {
5468
+ function splitDependencies({ schema: schema2 }) {
5469
5469
  const propertyDeps = {};
5470
5470
  const schemaDeps = {};
5471
- for (const key in schema) {
5471
+ for (const key in schema2) {
5472
5472
  if (key === "__proto__")
5473
5473
  continue;
5474
- const deps = Array.isArray(schema[key]) ? propertyDeps : schemaDeps;
5475
- deps[key] = schema[key];
5474
+ const deps = Array.isArray(schema2[key]) ? propertyDeps : schemaDeps;
5475
+ deps[key] = schema2[key];
5476
5476
  }
5477
5477
  return [propertyDeps, schemaDeps];
5478
5478
  }
@@ -5545,8 +5545,8 @@ var require_propertyNames = __commonJS({
5545
5545
  schemaType: ["object", "boolean"],
5546
5546
  error: error2,
5547
5547
  code(cxt) {
5548
- const { gen, schema, data, it } = cxt;
5549
- if ((0, util_1.alwaysValidSchema)(it, schema))
5548
+ const { gen, schema: schema2, data, it } = cxt;
5549
+ if ((0, util_1.alwaysValidSchema)(it, schema2))
5550
5550
  return;
5551
5551
  const valid = gen.name("valid");
5552
5552
  gen.forIn("key", data, (key) => {
@@ -5592,12 +5592,12 @@ var require_additionalProperties = __commonJS({
5592
5592
  trackErrors: true,
5593
5593
  error: error2,
5594
5594
  code(cxt) {
5595
- const { gen, schema, parentSchema, data, errsCount, it } = cxt;
5595
+ const { gen, schema: schema2, parentSchema, data, errsCount, it } = cxt;
5596
5596
  if (!errsCount)
5597
5597
  throw new Error("ajv implementation error");
5598
5598
  const { allErrors, opts } = it;
5599
5599
  it.props = true;
5600
- if (opts.removeAdditional !== "all" && (0, util_1.alwaysValidSchema)(it, schema))
5600
+ if (opts.removeAdditional !== "all" && (0, util_1.alwaysValidSchema)(it, schema2))
5601
5601
  return;
5602
5602
  const props = (0, code_1.allSchemaProperties)(parentSchema.properties);
5603
5603
  const patProps = (0, code_1.allSchemaProperties)(parentSchema.patternProperties);
@@ -5630,18 +5630,18 @@ var require_additionalProperties = __commonJS({
5630
5630
  gen.code((0, codegen_1._)`delete ${data}[${key}]`);
5631
5631
  }
5632
5632
  function additionalPropertyCode(key) {
5633
- if (opts.removeAdditional === "all" || opts.removeAdditional && schema === false) {
5633
+ if (opts.removeAdditional === "all" || opts.removeAdditional && schema2 === false) {
5634
5634
  deleteAdditional(key);
5635
5635
  return;
5636
5636
  }
5637
- if (schema === false) {
5637
+ if (schema2 === false) {
5638
5638
  cxt.setParams({ additionalProperty: key });
5639
5639
  cxt.error();
5640
5640
  if (!allErrors)
5641
5641
  gen.break();
5642
5642
  return;
5643
5643
  }
5644
- if (typeof schema == "object" && !(0, util_1.alwaysValidSchema)(it, schema)) {
5644
+ if (typeof schema2 == "object" && !(0, util_1.alwaysValidSchema)(it, schema2)) {
5645
5645
  const valid = gen.name("valid");
5646
5646
  if (opts.removeAdditional === "failing") {
5647
5647
  applyAdditionalSchema(key, valid, false);
@@ -5691,18 +5691,18 @@ var require_properties = __commonJS({
5691
5691
  type: "object",
5692
5692
  schemaType: "object",
5693
5693
  code(cxt) {
5694
- const { gen, schema, parentSchema, data, it } = cxt;
5694
+ const { gen, schema: schema2, parentSchema, data, it } = cxt;
5695
5695
  if (it.opts.removeAdditional === "all" && parentSchema.additionalProperties === void 0) {
5696
5696
  additionalProperties_1.default.code(new validate_1.KeywordCxt(it, additionalProperties_1.default, "additionalProperties"));
5697
5697
  }
5698
- const allProps = (0, code_1.allSchemaProperties)(schema);
5698
+ const allProps = (0, code_1.allSchemaProperties)(schema2);
5699
5699
  for (const prop of allProps) {
5700
5700
  it.definedProperties.add(prop);
5701
5701
  }
5702
5702
  if (it.opts.unevaluated && allProps.length && it.props !== true) {
5703
5703
  it.props = util_1.mergeEvaluated.props(gen, (0, util_1.toHash)(allProps), it.props);
5704
5704
  }
5705
- const properties = allProps.filter((p) => !(0, util_1.alwaysValidSchema)(it, schema[p]));
5705
+ const properties = allProps.filter((p) => !(0, util_1.alwaysValidSchema)(it, schema2[p]));
5706
5706
  if (properties.length === 0)
5707
5707
  return;
5708
5708
  const valid = gen.name("valid");
@@ -5720,7 +5720,7 @@ var require_properties = __commonJS({
5720
5720
  cxt.ok(valid);
5721
5721
  }
5722
5722
  function hasDefault(prop) {
5723
- return it.opts.useDefaults && !it.compositeRule && schema[prop].default !== void 0;
5723
+ return it.opts.useDefaults && !it.compositeRule && schema2[prop].default !== void 0;
5724
5724
  }
5725
5725
  function applyPropertySchema(prop) {
5726
5726
  cxt.subschema({
@@ -5749,10 +5749,10 @@ var require_patternProperties = __commonJS({
5749
5749
  type: "object",
5750
5750
  schemaType: "object",
5751
5751
  code(cxt) {
5752
- const { gen, schema, data, parentSchema, it } = cxt;
5752
+ const { gen, schema: schema2, data, parentSchema, it } = cxt;
5753
5753
  const { opts } = it;
5754
- const patterns = (0, code_1.allSchemaProperties)(schema);
5755
- const alwaysValidPatterns = patterns.filter((p) => (0, util_1.alwaysValidSchema)(it, schema[p]));
5754
+ const patterns = (0, code_1.allSchemaProperties)(schema2);
5755
+ const alwaysValidPatterns = patterns.filter((p) => (0, util_1.alwaysValidSchema)(it, schema2[p]));
5756
5756
  if (patterns.length === 0 || alwaysValidPatterns.length === patterns.length && (!it.opts.unevaluated || it.props === true)) {
5757
5757
  return;
5758
5758
  }
@@ -5820,8 +5820,8 @@ var require_not = __commonJS({
5820
5820
  schemaType: ["object", "boolean"],
5821
5821
  trackErrors: true,
5822
5822
  code(cxt) {
5823
- const { gen, schema, it } = cxt;
5824
- if ((0, util_1.alwaysValidSchema)(it, schema)) {
5823
+ const { gen, schema: schema2, it } = cxt;
5824
+ if ((0, util_1.alwaysValidSchema)(it, schema2)) {
5825
5825
  cxt.fail();
5826
5826
  return;
5827
5827
  }
@@ -5874,12 +5874,12 @@ var require_oneOf = __commonJS({
5874
5874
  trackErrors: true,
5875
5875
  error: error2,
5876
5876
  code(cxt) {
5877
- const { gen, schema, parentSchema, it } = cxt;
5878
- if (!Array.isArray(schema))
5877
+ const { gen, schema: schema2, parentSchema, it } = cxt;
5878
+ if (!Array.isArray(schema2))
5879
5879
  throw new Error("ajv implementation error");
5880
5880
  if (it.opts.discriminator && parentSchema.discriminator)
5881
5881
  return;
5882
- const schArr = schema;
5882
+ const schArr = schema2;
5883
5883
  const valid = gen.let("valid", false);
5884
5884
  const passing = gen.let("passing", null);
5885
5885
  const schValid = gen.name("_valid");
@@ -5925,11 +5925,11 @@ var require_allOf = __commonJS({
5925
5925
  keyword: "allOf",
5926
5926
  schemaType: "array",
5927
5927
  code(cxt) {
5928
- const { gen, schema, it } = cxt;
5929
- if (!Array.isArray(schema))
5928
+ const { gen, schema: schema2, it } = cxt;
5929
+ if (!Array.isArray(schema2))
5930
5930
  throw new Error("ajv implementation error");
5931
5931
  const valid = gen.name("valid");
5932
- schema.forEach((sch, i) => {
5932
+ schema2.forEach((sch, i) => {
5933
5933
  if ((0, util_1.alwaysValidSchema)(it, sch))
5934
5934
  return;
5935
5935
  const schCxt = cxt.subschema({ keyword: "allOf", schemaProp: i }, valid);
@@ -6004,8 +6004,8 @@ var require_if = __commonJS({
6004
6004
  }
6005
6005
  };
6006
6006
  function hasSchema(it, keyword) {
6007
- const schema = it.schema[keyword];
6008
- return schema !== void 0 && !(0, util_1.alwaysValidSchema)(it, schema);
6007
+ const schema2 = it.schema[keyword];
6008
+ return schema2 !== void 0 && !(0, util_1.alwaysValidSchema)(it, schema2);
6009
6009
  }
6010
6010
  exports2.default = def;
6011
6011
  }
@@ -6094,7 +6094,7 @@ var require_format = __commonJS({
6094
6094
  $data: true,
6095
6095
  error: error2,
6096
6096
  code(cxt, ruleType) {
6097
- const { gen, data, $data, schema, schemaCode, it } = cxt;
6097
+ const { gen, data, $data, schema: schema2, schemaCode, it } = cxt;
6098
6098
  const { opts, errSchemaPath, schemaEnv, self } = it;
6099
6099
  if (!opts.validateFormats)
6100
6100
  return;
@@ -6124,7 +6124,7 @@ var require_format = __commonJS({
6124
6124
  }
6125
6125
  }
6126
6126
  function validateFormat() {
6127
- const formatDef = self.formats[schema];
6127
+ const formatDef = self.formats[schema2];
6128
6128
  if (!formatDef) {
6129
6129
  unknownFormat();
6130
6130
  return;
@@ -6141,12 +6141,12 @@ var require_format = __commonJS({
6141
6141
  }
6142
6142
  throw new Error(unknownMsg());
6143
6143
  function unknownMsg() {
6144
- return `unknown format "${schema}" ignored in schema at path "${errSchemaPath}"`;
6144
+ return `unknown format "${schema2}" ignored in schema at path "${errSchemaPath}"`;
6145
6145
  }
6146
6146
  }
6147
6147
  function getFormat(fmtDef) {
6148
- 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;
6149
- const fmt = gen.scopeValue("formats", { key: schema, ref: fmtDef, code });
6148
+ const code = fmtDef instanceof RegExp ? (0, codegen_1.regexpCode)(fmtDef) : opts.code.formats ? (0, codegen_1._)`${opts.code.formats}${(0, codegen_1.getProperty)(schema2)}` : void 0;
6149
+ const fmt = gen.scopeValue("formats", { key: schema2, ref: fmtDef, code });
6150
6150
  if (typeof fmtDef == "object" && !(fmtDef instanceof RegExp)) {
6151
6151
  return [fmtDef.type || "string", fmtDef.validate, (0, codegen_1._)`${fmt}.validate`];
6152
6152
  }
@@ -6257,15 +6257,15 @@ var require_discriminator = __commonJS({
6257
6257
  schemaType: "object",
6258
6258
  error: error2,
6259
6259
  code(cxt) {
6260
- const { gen, data, schema, parentSchema, it } = cxt;
6260
+ const { gen, data, schema: schema2, parentSchema, it } = cxt;
6261
6261
  const { oneOf } = parentSchema;
6262
6262
  if (!it.opts.discriminator) {
6263
6263
  throw new Error("discriminator: requires discriminator option");
6264
6264
  }
6265
- const tagName = schema.propertyName;
6265
+ const tagName = schema2.propertyName;
6266
6266
  if (typeof tagName != "string")
6267
6267
  throw new Error("discriminator: requires propertyName");
6268
- if (schema.mapping)
6268
+ if (schema2.mapping)
6269
6269
  throw new Error("discriminator: mapping is not supported");
6270
6270
  if (!oneOf)
6271
6271
  throw new Error("discriminator: requires oneOf keyword");
@@ -9218,9 +9218,9 @@ var ZodArray = class _ZodArray extends ZodType {
9218
9218
  return this.min(1, message);
9219
9219
  }
9220
9220
  };
9221
- ZodArray.create = (schema, params) => {
9221
+ ZodArray.create = (schema2, params) => {
9222
9222
  return new ZodArray({
9223
- type: schema,
9223
+ type: schema2,
9224
9224
  minLength: null,
9225
9225
  maxLength: null,
9226
9226
  exactLength: null,
@@ -9228,30 +9228,30 @@ ZodArray.create = (schema, params) => {
9228
9228
  ...processCreateParams(params)
9229
9229
  });
9230
9230
  };
9231
- function deepPartialify(schema) {
9232
- if (schema instanceof ZodObject) {
9231
+ function deepPartialify(schema2) {
9232
+ if (schema2 instanceof ZodObject) {
9233
9233
  const newShape = {};
9234
- for (const key in schema.shape) {
9235
- const fieldSchema = schema.shape[key];
9234
+ for (const key in schema2.shape) {
9235
+ const fieldSchema = schema2.shape[key];
9236
9236
  newShape[key] = ZodOptional.create(deepPartialify(fieldSchema));
9237
9237
  }
9238
9238
  return new ZodObject({
9239
- ...schema._def,
9239
+ ...schema2._def,
9240
9240
  shape: () => newShape
9241
9241
  });
9242
- } else if (schema instanceof ZodArray) {
9242
+ } else if (schema2 instanceof ZodArray) {
9243
9243
  return new ZodArray({
9244
- ...schema._def,
9245
- type: deepPartialify(schema.element)
9244
+ ...schema2._def,
9245
+ type: deepPartialify(schema2.element)
9246
9246
  });
9247
- } else if (schema instanceof ZodOptional) {
9248
- return ZodOptional.create(deepPartialify(schema.unwrap()));
9249
- } else if (schema instanceof ZodNullable) {
9250
- return ZodNullable.create(deepPartialify(schema.unwrap()));
9251
- } else if (schema instanceof ZodTuple) {
9252
- return ZodTuple.create(schema.items.map((item) => deepPartialify(item)));
9247
+ } else if (schema2 instanceof ZodOptional) {
9248
+ return ZodOptional.create(deepPartialify(schema2.unwrap()));
9249
+ } else if (schema2 instanceof ZodNullable) {
9250
+ return ZodNullable.create(deepPartialify(schema2.unwrap()));
9251
+ } else if (schema2 instanceof ZodTuple) {
9252
+ return ZodTuple.create(schema2.items.map((item) => deepPartialify(item)));
9253
9253
  } else {
9254
- return schema;
9254
+ return schema2;
9255
9255
  }
9256
9256
  }
9257
9257
  var ZodObject = class _ZodObject extends ZodType {
@@ -9467,8 +9467,8 @@ var ZodObject = class _ZodObject extends ZodType {
9467
9467
  // }) as any;
9468
9468
  // return merged;
9469
9469
  // }
9470
- setKey(key, schema) {
9471
- return this.augment({ [key]: schema });
9470
+ setKey(key, schema2) {
9471
+ return this.augment({ [key]: schema2 });
9472
9472
  }
9473
9473
  // merge<Incoming extends AnyZodObject>(
9474
9474
  // merging: Incoming
@@ -9914,10 +9914,10 @@ var ZodTuple = class _ZodTuple extends ZodType {
9914
9914
  status.dirty();
9915
9915
  }
9916
9916
  const items = [...ctx.data].map((item, itemIndex) => {
9917
- const schema = this._def.items[itemIndex] || this._def.rest;
9918
- if (!schema)
9917
+ const schema2 = this._def.items[itemIndex] || this._def.rest;
9918
+ if (!schema2)
9919
9919
  return null;
9920
- return schema._parse(new ParseInputLazyPath(ctx, item, ctx.path, itemIndex));
9920
+ return schema2._parse(new ParseInputLazyPath(ctx, item, ctx.path, itemIndex));
9921
9921
  }).filter((x) => !!x);
9922
9922
  if (ctx.common.async) {
9923
9923
  return Promise.all(items).then((results) => {
@@ -10431,9 +10431,9 @@ var ZodPromise = class extends ZodType {
10431
10431
  }));
10432
10432
  }
10433
10433
  };
10434
- ZodPromise.create = (schema, params) => {
10434
+ ZodPromise.create = (schema2, params) => {
10435
10435
  return new ZodPromise({
10436
- type: schema,
10436
+ type: schema2,
10437
10437
  typeName: ZodFirstPartyTypeKind.ZodPromise,
10438
10438
  ...processCreateParams(params)
10439
10439
  });
@@ -10561,17 +10561,17 @@ var ZodEffects = class extends ZodType {
10561
10561
  util.assertNever(effect);
10562
10562
  }
10563
10563
  };
10564
- ZodEffects.create = (schema, effect, params) => {
10564
+ ZodEffects.create = (schema2, effect, params) => {
10565
10565
  return new ZodEffects({
10566
- schema,
10566
+ schema: schema2,
10567
10567
  typeName: ZodFirstPartyTypeKind.ZodEffects,
10568
10568
  effect,
10569
10569
  ...processCreateParams(params)
10570
10570
  });
10571
10571
  };
10572
- ZodEffects.createWithPreprocess = (preprocess2, schema, params) => {
10572
+ ZodEffects.createWithPreprocess = (preprocess2, schema2, params) => {
10573
10573
  return new ZodEffects({
10574
- schema,
10574
+ schema: schema2,
10575
10575
  effect: { type: "preprocess", transform: preprocess2 },
10576
10576
  typeName: ZodFirstPartyTypeKind.ZodEffects,
10577
10577
  ...processCreateParams(params)
@@ -11316,9 +11316,9 @@ var BIGINT_FORMAT_RANGES = {
11316
11316
  int64: [/* @__PURE__ */ BigInt("-9223372036854775808"), /* @__PURE__ */ BigInt("9223372036854775807")],
11317
11317
  uint64: [/* @__PURE__ */ BigInt(0), /* @__PURE__ */ BigInt("18446744073709551615")]
11318
11318
  };
11319
- function pick(schema, mask) {
11319
+ function pick(schema2, mask) {
11320
11320
  const newShape = {};
11321
- const currDef = schema._zod.def;
11321
+ const currDef = schema2._zod.def;
11322
11322
  for (const key in mask) {
11323
11323
  if (!(key in currDef.shape)) {
11324
11324
  throw new Error(`Unrecognized key: "${key}"`);
@@ -11327,15 +11327,15 @@ function pick(schema, mask) {
11327
11327
  continue;
11328
11328
  newShape[key] = currDef.shape[key];
11329
11329
  }
11330
- return clone(schema, {
11331
- ...schema._zod.def,
11330
+ return clone(schema2, {
11331
+ ...schema2._zod.def,
11332
11332
  shape: newShape,
11333
11333
  checks: []
11334
11334
  });
11335
11335
  }
11336
- function omit(schema, mask) {
11337
- const newShape = { ...schema._zod.def.shape };
11338
- const currDef = schema._zod.def;
11336
+ function omit(schema2, mask) {
11337
+ const newShape = { ...schema2._zod.def.shape };
11338
+ const currDef = schema2._zod.def;
11339
11339
  for (const key in mask) {
11340
11340
  if (!(key in currDef.shape)) {
11341
11341
  throw new Error(`Unrecognized key: "${key}"`);
@@ -11344,27 +11344,27 @@ function omit(schema, mask) {
11344
11344
  continue;
11345
11345
  delete newShape[key];
11346
11346
  }
11347
- return clone(schema, {
11348
- ...schema._zod.def,
11347
+ return clone(schema2, {
11348
+ ...schema2._zod.def,
11349
11349
  shape: newShape,
11350
11350
  checks: []
11351
11351
  });
11352
11352
  }
11353
- function extend(schema, shape) {
11353
+ function extend(schema2, shape) {
11354
11354
  if (!isPlainObject(shape)) {
11355
11355
  throw new Error("Invalid input to extend: expected a plain object");
11356
11356
  }
11357
11357
  const def = {
11358
- ...schema._zod.def,
11358
+ ...schema2._zod.def,
11359
11359
  get shape() {
11360
- const _shape = { ...schema._zod.def.shape, ...shape };
11360
+ const _shape = { ...schema2._zod.def.shape, ...shape };
11361
11361
  assignProp(this, "shape", _shape);
11362
11362
  return _shape;
11363
11363
  },
11364
11364
  checks: []
11365
11365
  // delete existing checks
11366
11366
  };
11367
- return clone(schema, def);
11367
+ return clone(schema2, def);
11368
11368
  }
11369
11369
  function merge(a, b) {
11370
11370
  return clone(a, {
@@ -11379,8 +11379,8 @@ function merge(a, b) {
11379
11379
  // delete existing checks
11380
11380
  });
11381
11381
  }
11382
- function partial(Class2, schema, mask) {
11383
- const oldShape = schema._zod.def.shape;
11382
+ function partial(Class2, schema2, mask) {
11383
+ const oldShape = schema2._zod.def.shape;
11384
11384
  const shape = { ...oldShape };
11385
11385
  if (mask) {
11386
11386
  for (const key in mask) {
@@ -11402,14 +11402,14 @@ function partial(Class2, schema, mask) {
11402
11402
  }) : oldShape[key];
11403
11403
  }
11404
11404
  }
11405
- return clone(schema, {
11406
- ...schema._zod.def,
11405
+ return clone(schema2, {
11406
+ ...schema2._zod.def,
11407
11407
  shape,
11408
11408
  checks: []
11409
11409
  });
11410
11410
  }
11411
- function required(Class2, schema, mask) {
11412
- const oldShape = schema._zod.def.shape;
11411
+ function required(Class2, schema2, mask) {
11412
+ const oldShape = schema2._zod.def.shape;
11413
11413
  const shape = { ...oldShape };
11414
11414
  if (mask) {
11415
11415
  for (const key in mask) {
@@ -11431,8 +11431,8 @@ function required(Class2, schema, mask) {
11431
11431
  });
11432
11432
  }
11433
11433
  }
11434
- return clone(schema, {
11435
- ...schema._zod.def,
11434
+ return clone(schema2, {
11435
+ ...schema2._zod.def,
11436
11436
  shape,
11437
11437
  // optional: [],
11438
11438
  checks: []
@@ -11583,9 +11583,9 @@ function formatError(error2, _mapper) {
11583
11583
  }
11584
11584
 
11585
11585
  // node_modules/zod/v4/core/parse.js
11586
- var _parse = (_Err) => (schema, value, _ctx, _params) => {
11586
+ var _parse = (_Err) => (schema2, value, _ctx, _params) => {
11587
11587
  const ctx = _ctx ? Object.assign(_ctx, { async: false }) : { async: false };
11588
- const result = schema._zod.run({ value, issues: [] }, ctx);
11588
+ const result = schema2._zod.run({ value, issues: [] }, ctx);
11589
11589
  if (result instanceof Promise) {
11590
11590
  throw new $ZodAsyncError();
11591
11591
  }
@@ -11597,9 +11597,9 @@ var _parse = (_Err) => (schema, value, _ctx, _params) => {
11597
11597
  return result.value;
11598
11598
  };
11599
11599
  var parse = /* @__PURE__ */ _parse($ZodRealError);
11600
- var _parseAsync = (_Err) => async (schema, value, _ctx, params) => {
11600
+ var _parseAsync = (_Err) => async (schema2, value, _ctx, params) => {
11601
11601
  const ctx = _ctx ? Object.assign(_ctx, { async: true }) : { async: true };
11602
- let result = schema._zod.run({ value, issues: [] }, ctx);
11602
+ let result = schema2._zod.run({ value, issues: [] }, ctx);
11603
11603
  if (result instanceof Promise)
11604
11604
  result = await result;
11605
11605
  if (result.issues.length) {
@@ -11610,9 +11610,9 @@ var _parseAsync = (_Err) => async (schema, value, _ctx, params) => {
11610
11610
  return result.value;
11611
11611
  };
11612
11612
  var parseAsync = /* @__PURE__ */ _parseAsync($ZodRealError);
11613
- var _safeParse = (_Err) => (schema, value, _ctx) => {
11613
+ var _safeParse = (_Err) => (schema2, value, _ctx) => {
11614
11614
  const ctx = _ctx ? { ..._ctx, async: false } : { async: false };
11615
- const result = schema._zod.run({ value, issues: [] }, ctx);
11615
+ const result = schema2._zod.run({ value, issues: [] }, ctx);
11616
11616
  if (result instanceof Promise) {
11617
11617
  throw new $ZodAsyncError();
11618
11618
  }
@@ -11622,9 +11622,9 @@ var _safeParse = (_Err) => (schema, value, _ctx) => {
11622
11622
  } : { success: true, data: result.value };
11623
11623
  };
11624
11624
  var safeParse = /* @__PURE__ */ _safeParse($ZodRealError);
11625
- var _safeParseAsync = (_Err) => async (schema, value, _ctx) => {
11625
+ var _safeParseAsync = (_Err) => async (schema2, value, _ctx) => {
11626
11626
  const ctx = _ctx ? Object.assign(_ctx, { async: true }) : { async: true };
11627
- let result = schema._zod.run({ value, issues: [] }, ctx);
11627
+ let result = schema2._zod.run({ value, issues: [] }, ctx);
11628
11628
  if (result instanceof Promise)
11629
11629
  result = await result;
11630
11630
  return result.issues.length ? {
@@ -13482,14 +13482,14 @@ var $ZodRegistry = class {
13482
13482
  this._map = /* @__PURE__ */ new Map();
13483
13483
  this._idmap = /* @__PURE__ */ new Map();
13484
13484
  }
13485
- add(schema, ..._meta) {
13485
+ add(schema2, ..._meta) {
13486
13486
  const meta = _meta[0];
13487
- this._map.set(schema, meta);
13487
+ this._map.set(schema2, meta);
13488
13488
  if (meta && typeof meta === "object" && "id" in meta) {
13489
13489
  if (this._idmap.has(meta.id)) {
13490
13490
  throw new Error(`ID ${meta.id} already exists in the registry`);
13491
13491
  }
13492
- this._idmap.set(meta.id, schema);
13492
+ this._idmap.set(meta.id, schema2);
13493
13493
  }
13494
13494
  return this;
13495
13495
  }
@@ -13498,25 +13498,25 @@ var $ZodRegistry = class {
13498
13498
  this._idmap = /* @__PURE__ */ new Map();
13499
13499
  return this;
13500
13500
  }
13501
- remove(schema) {
13502
- const meta = this._map.get(schema);
13501
+ remove(schema2) {
13502
+ const meta = this._map.get(schema2);
13503
13503
  if (meta && typeof meta === "object" && "id" in meta) {
13504
13504
  this._idmap.delete(meta.id);
13505
13505
  }
13506
- this._map.delete(schema);
13506
+ this._map.delete(schema2);
13507
13507
  return this;
13508
13508
  }
13509
- get(schema) {
13510
- const p = schema._zod.parent;
13509
+ get(schema2) {
13510
+ const p = schema2._zod.parent;
13511
13511
  if (p) {
13512
13512
  const pm = { ...this.get(p) ?? {} };
13513
13513
  delete pm.id;
13514
- return { ...pm, ...this._map.get(schema) };
13514
+ return { ...pm, ...this._map.get(schema2) };
13515
13515
  }
13516
- return this._map.get(schema);
13516
+ return this._map.get(schema2);
13517
13517
  }
13518
- has(schema) {
13519
- return this._map.has(schema);
13518
+ has(schema2) {
13519
+ return this._map.has(schema2);
13520
13520
  }
13521
13521
  };
13522
13522
  function registry() {
@@ -13945,22 +13945,22 @@ function _array(Class2, element, params) {
13945
13945
  function _custom(Class2, fn, _params) {
13946
13946
  const norm = normalizeParams(_params);
13947
13947
  norm.abort ?? (norm.abort = true);
13948
- const schema = new Class2({
13948
+ const schema2 = new Class2({
13949
13949
  type: "custom",
13950
13950
  check: "custom",
13951
13951
  fn,
13952
13952
  ...norm
13953
13953
  });
13954
- return schema;
13954
+ return schema2;
13955
13955
  }
13956
13956
  function _refine(Class2, fn, _params) {
13957
- const schema = new Class2({
13957
+ const schema2 = new Class2({
13958
13958
  type: "custom",
13959
13959
  check: "custom",
13960
13960
  fn,
13961
13961
  ...normalizeParams(_params)
13962
13962
  });
13963
- return schema;
13963
+ return schema2;
13964
13964
  }
13965
13965
 
13966
13966
  // node_modules/zod/v4/core/to-json-schema.js
@@ -13975,9 +13975,9 @@ var JSONSchemaGenerator = class {
13975
13975
  this.io = params?.io ?? "output";
13976
13976
  this.seen = /* @__PURE__ */ new Map();
13977
13977
  }
13978
- process(schema, _params = { path: [], schemaPath: [] }) {
13978
+ process(schema2, _params = { path: [], schemaPath: [] }) {
13979
13979
  var _a;
13980
- const def = schema._zod.def;
13980
+ const def = schema2._zod.def;
13981
13981
  const formatMap = {
13982
13982
  guid: "uuid",
13983
13983
  url: "uri",
@@ -13986,27 +13986,27 @@ var JSONSchemaGenerator = class {
13986
13986
  regex: ""
13987
13987
  // do not set
13988
13988
  };
13989
- const seen = this.seen.get(schema);
13989
+ const seen = this.seen.get(schema2);
13990
13990
  if (seen) {
13991
13991
  seen.count++;
13992
- const isCycle = _params.schemaPath.includes(schema);
13992
+ const isCycle = _params.schemaPath.includes(schema2);
13993
13993
  if (isCycle) {
13994
13994
  seen.cycle = _params.path;
13995
13995
  }
13996
13996
  return seen.schema;
13997
13997
  }
13998
13998
  const result = { schema: {}, count: 1, cycle: void 0, path: _params.path };
13999
- this.seen.set(schema, result);
14000
- const overrideSchema = schema._zod.toJSONSchema?.();
13999
+ this.seen.set(schema2, result);
14000
+ const overrideSchema = schema2._zod.toJSONSchema?.();
14001
14001
  if (overrideSchema) {
14002
14002
  result.schema = overrideSchema;
14003
14003
  } else {
14004
14004
  const params = {
14005
14005
  ..._params,
14006
- schemaPath: [..._params.schemaPath, schema],
14006
+ schemaPath: [..._params.schemaPath, schema2],
14007
14007
  path: _params.path
14008
14008
  };
14009
- const parent = schema._zod.parent;
14009
+ const parent = schema2._zod.parent;
14010
14010
  if (parent) {
14011
14011
  result.ref = parent;
14012
14012
  this.process(parent, params);
@@ -14017,7 +14017,7 @@ var JSONSchemaGenerator = class {
14017
14017
  case "string": {
14018
14018
  const json = _json;
14019
14019
  json.type = "string";
14020
- const { minimum, maximum, format, patterns, contentEncoding } = schema._zod.bag;
14020
+ const { minimum, maximum, format, patterns, contentEncoding } = schema2._zod.bag;
14021
14021
  if (typeof minimum === "number")
14022
14022
  json.minLength = minimum;
14023
14023
  if (typeof maximum === "number")
@@ -14046,7 +14046,7 @@ var JSONSchemaGenerator = class {
14046
14046
  }
14047
14047
  case "number": {
14048
14048
  const json = _json;
14049
- const { minimum, maximum, format, multipleOf, exclusiveMaximum, exclusiveMinimum } = schema._zod.bag;
14049
+ const { minimum, maximum, format, multipleOf, exclusiveMaximum, exclusiveMinimum } = schema2._zod.bag;
14050
14050
  if (typeof format === "string" && format.includes("int"))
14051
14051
  json.type = "integer";
14052
14052
  else
@@ -14128,7 +14128,7 @@ var JSONSchemaGenerator = class {
14128
14128
  }
14129
14129
  case "array": {
14130
14130
  const json = _json;
14131
- const { minimum, maximum } = schema._zod.bag;
14131
+ const { minimum, maximum } = schema2._zod.bag;
14132
14132
  if (typeof minimum === "number")
14133
14133
  json.minItems = minimum;
14134
14134
  if (typeof maximum === "number")
@@ -14225,7 +14225,7 @@ var JSONSchemaGenerator = class {
14225
14225
  path: [...params.path, "items"]
14226
14226
  });
14227
14227
  }
14228
- const { minimum, maximum } = schema._zod.bag;
14228
+ const { minimum, maximum } = schema2._zod.bag;
14229
14229
  if (typeof minimum === "number")
14230
14230
  json.minItems = minimum;
14231
14231
  if (typeof maximum === "number")
@@ -14308,7 +14308,7 @@ var JSONSchemaGenerator = class {
14308
14308
  format: "binary",
14309
14309
  contentEncoding: "binary"
14310
14310
  };
14311
- const { minimum, maximum, mime } = schema._zod.bag;
14311
+ const { minimum, maximum, mime } = schema2._zod.bag;
14312
14312
  if (minimum !== void 0)
14313
14313
  file.minLength = minimum;
14314
14314
  if (maximum !== void 0)
@@ -14382,7 +14382,7 @@ var JSONSchemaGenerator = class {
14382
14382
  }
14383
14383
  case "template_literal": {
14384
14384
  const json = _json;
14385
- const pattern = schema._zod.pattern;
14385
+ const pattern = schema2._zod.pattern;
14386
14386
  if (!pattern)
14387
14387
  throw new Error("Pattern not found in template literal");
14388
14388
  json.type = "string";
@@ -14413,7 +14413,7 @@ var JSONSchemaGenerator = class {
14413
14413
  break;
14414
14414
  }
14415
14415
  case "lazy": {
14416
- const innerType = schema._zod.innerType;
14416
+ const innerType = schema2._zod.innerType;
14417
14417
  this.process(innerType, params);
14418
14418
  result.ref = innerType;
14419
14419
  break;
@@ -14430,20 +14430,20 @@ var JSONSchemaGenerator = class {
14430
14430
  }
14431
14431
  }
14432
14432
  }
14433
- const meta = this.metadataRegistry.get(schema);
14433
+ const meta = this.metadataRegistry.get(schema2);
14434
14434
  if (meta)
14435
14435
  Object.assign(result.schema, meta);
14436
- if (this.io === "input" && isTransforming(schema)) {
14436
+ if (this.io === "input" && isTransforming(schema2)) {
14437
14437
  delete result.schema.examples;
14438
14438
  delete result.schema.default;
14439
14439
  }
14440
14440
  if (this.io === "input" && result.schema._prefault)
14441
14441
  (_a = result.schema).default ?? (_a.default = result.schema._prefault);
14442
14442
  delete result.schema._prefault;
14443
- const _result = this.seen.get(schema);
14443
+ const _result = this.seen.get(schema2);
14444
14444
  return _result.schema;
14445
14445
  }
14446
- emit(schema, _params) {
14446
+ emit(schema2, _params) {
14447
14447
  const params = {
14448
14448
  cycles: _params?.cycles ?? "ref",
14449
14449
  reused: _params?.reused ?? "inline",
@@ -14451,7 +14451,7 @@ var JSONSchemaGenerator = class {
14451
14451
  // uri: _params?.uri ?? ((id) => `${id}`),
14452
14452
  external: _params?.external ?? void 0
14453
14453
  };
14454
- const root = this.seen.get(schema);
14454
+ const root = this.seen.get(schema2);
14455
14455
  if (!root)
14456
14456
  throw new Error("Unprocessed schema. This is a bug in Zod.");
14457
14457
  const makeURI = (entry) => {
@@ -14483,11 +14483,11 @@ var JSONSchemaGenerator = class {
14483
14483
  seen.def = { ...seen.schema };
14484
14484
  if (defId)
14485
14485
  seen.defId = defId;
14486
- const schema2 = seen.schema;
14487
- for (const key in schema2) {
14488
- delete schema2[key];
14486
+ const schema3 = seen.schema;
14487
+ for (const key in schema3) {
14488
+ delete schema3[key];
14489
14489
  }
14490
- schema2.$ref = ref;
14490
+ schema3.$ref = ref;
14491
14491
  };
14492
14492
  if (params.cycles === "throw") {
14493
14493
  for (const entry of this.seen.entries()) {
@@ -14501,13 +14501,13 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
14501
14501
  }
14502
14502
  for (const entry of this.seen.entries()) {
14503
14503
  const seen = entry[1];
14504
- if (schema === entry[0]) {
14504
+ if (schema2 === entry[0]) {
14505
14505
  extractToDef(entry);
14506
14506
  continue;
14507
14507
  }
14508
14508
  if (params.external) {
14509
14509
  const ext = params.external.registry.get(entry[0])?.id;
14510
- if (schema !== entry[0] && ext) {
14510
+ if (schema2 !== entry[0] && ext) {
14511
14511
  extractToDef(entry);
14512
14512
  continue;
14513
14513
  }
@@ -14530,8 +14530,8 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
14530
14530
  }
14531
14531
  const flattenRef = (zodSchema, params2) => {
14532
14532
  const seen = this.seen.get(zodSchema);
14533
- const schema2 = seen.def ?? seen.schema;
14534
- const _cached = { ...schema2 };
14533
+ const schema3 = seen.def ?? seen.schema;
14534
+ const _cached = { ...schema3 };
14535
14535
  if (seen.ref === null) {
14536
14536
  return;
14537
14537
  }
@@ -14541,17 +14541,17 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
14541
14541
  flattenRef(ref, params2);
14542
14542
  const refSchema = this.seen.get(ref).schema;
14543
14543
  if (refSchema.$ref && params2.target === "draft-7") {
14544
- schema2.allOf = schema2.allOf ?? [];
14545
- schema2.allOf.push(refSchema);
14544
+ schema3.allOf = schema3.allOf ?? [];
14545
+ schema3.allOf.push(refSchema);
14546
14546
  } else {
14547
- Object.assign(schema2, refSchema);
14548
- Object.assign(schema2, _cached);
14547
+ Object.assign(schema3, refSchema);
14548
+ Object.assign(schema3, _cached);
14549
14549
  }
14550
14550
  }
14551
14551
  if (!seen.isParent)
14552
14552
  this.override({
14553
14553
  zodSchema,
14554
- jsonSchema: schema2,
14554
+ jsonSchema: schema3,
14555
14555
  path: seen.path ?? []
14556
14556
  });
14557
14557
  };
@@ -14567,7 +14567,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
14567
14567
  console.warn(`Invalid target: ${this.target}`);
14568
14568
  }
14569
14569
  if (params.external?.uri) {
14570
- const id = params.external.registry.get(schema)?.id;
14570
+ const id = params.external.registry.get(schema2)?.id;
14571
14571
  if (!id)
14572
14572
  throw new Error("Schema is missing an `id` property");
14573
14573
  result.$id = params.external.uri(id);
@@ -14602,8 +14602,8 @@ function toJSONSchema(input, _params) {
14602
14602
  const gen2 = new JSONSchemaGenerator(_params);
14603
14603
  const defs = {};
14604
14604
  for (const entry of input._idmap.entries()) {
14605
- const [_, schema] = entry;
14606
- gen2.process(schema);
14605
+ const [_, schema2] = entry;
14606
+ gen2.process(schema2);
14607
14607
  }
14608
14608
  const schemas = {};
14609
14609
  const external = {
@@ -14612,8 +14612,8 @@ function toJSONSchema(input, _params) {
14612
14612
  defs
14613
14613
  };
14614
14614
  for (const entry of input._idmap.entries()) {
14615
- const [key, schema] = entry;
14616
- schemas[key] = gen2.emit(schema, {
14615
+ const [key, schema2] = entry;
14616
+ schemas[key] = gen2.emit(schema2, {
14617
14617
  ..._params,
14618
14618
  external
14619
14619
  });
@@ -14635,8 +14635,8 @@ function isTransforming(_schema, _ctx) {
14635
14635
  if (ctx.seen.has(_schema))
14636
14636
  return false;
14637
14637
  ctx.seen.add(_schema);
14638
- const schema = _schema;
14639
- const def = schema._zod.def;
14638
+ const schema2 = _schema;
14639
+ const def = schema2._zod.def;
14640
14640
  switch (def.type) {
14641
14641
  case "string":
14642
14642
  case "number":
@@ -14778,8 +14778,8 @@ function object(shape, params) {
14778
14778
 
14779
14779
  // node_modules/@modelcontextprotocol/sdk/dist/esm/server/zod-compat.js
14780
14780
  function isZ4Schema(s) {
14781
- const schema = s;
14782
- return !!schema._zod;
14781
+ const schema2 = s;
14782
+ return !!schema2._zod;
14783
14783
  }
14784
14784
  function objectFromShape(shape) {
14785
14785
  const values = Object.values(shape);
@@ -14793,33 +14793,33 @@ function objectFromShape(shape) {
14793
14793
  return objectType(shape);
14794
14794
  throw new Error("Mixed Zod versions detected in object shape.");
14795
14795
  }
14796
- function safeParse2(schema, data) {
14797
- if (isZ4Schema(schema)) {
14798
- const result2 = safeParse(schema, data);
14796
+ function safeParse2(schema2, data) {
14797
+ if (isZ4Schema(schema2)) {
14798
+ const result2 = safeParse(schema2, data);
14799
14799
  return result2;
14800
14800
  }
14801
- const v3Schema = schema;
14801
+ const v3Schema = schema2;
14802
14802
  const result = v3Schema.safeParse(data);
14803
14803
  return result;
14804
14804
  }
14805
- async function safeParseAsync2(schema, data) {
14806
- if (isZ4Schema(schema)) {
14807
- const result2 = await safeParseAsync(schema, data);
14805
+ async function safeParseAsync2(schema2, data) {
14806
+ if (isZ4Schema(schema2)) {
14807
+ const result2 = await safeParseAsync(schema2, data);
14808
14808
  return result2;
14809
14809
  }
14810
- const v3Schema = schema;
14810
+ const v3Schema = schema2;
14811
14811
  const result = await v3Schema.safeParseAsync(data);
14812
14812
  return result;
14813
14813
  }
14814
- function getObjectShape(schema) {
14815
- if (!schema)
14814
+ function getObjectShape(schema2) {
14815
+ if (!schema2)
14816
14816
  return void 0;
14817
14817
  let rawShape;
14818
- if (isZ4Schema(schema)) {
14819
- const v4Schema = schema;
14818
+ if (isZ4Schema(schema2)) {
14819
+ const v4Schema = schema2;
14820
14820
  rawShape = v4Schema._zod?.def?.shape;
14821
14821
  } else {
14822
- const v3Schema = schema;
14822
+ const v3Schema = schema2;
14823
14823
  rawShape = v3Schema.shape;
14824
14824
  }
14825
14825
  if (!rawShape)
@@ -14833,29 +14833,29 @@ function getObjectShape(schema) {
14833
14833
  }
14834
14834
  return rawShape;
14835
14835
  }
14836
- function normalizeObjectSchema(schema) {
14837
- if (!schema)
14836
+ function normalizeObjectSchema(schema2) {
14837
+ if (!schema2)
14838
14838
  return void 0;
14839
- if (typeof schema === "object") {
14840
- const asV3 = schema;
14841
- const asV4 = schema;
14839
+ if (typeof schema2 === "object") {
14840
+ const asV3 = schema2;
14841
+ const asV4 = schema2;
14842
14842
  if (!asV3._def && !asV4._zod) {
14843
- const values = Object.values(schema);
14843
+ const values = Object.values(schema2);
14844
14844
  if (values.length > 0 && values.every((v) => typeof v === "object" && v !== null && (v._def !== void 0 || v._zod !== void 0 || typeof v.parse === "function"))) {
14845
- return objectFromShape(schema);
14845
+ return objectFromShape(schema2);
14846
14846
  }
14847
14847
  }
14848
14848
  }
14849
- if (isZ4Schema(schema)) {
14850
- const v4Schema = schema;
14849
+ if (isZ4Schema(schema2)) {
14850
+ const v4Schema = schema2;
14851
14851
  const def = v4Schema._zod?.def;
14852
14852
  if (def && (def.type === "object" || def.shape !== void 0)) {
14853
- return schema;
14853
+ return schema2;
14854
14854
  }
14855
14855
  } else {
14856
- const v3Schema = schema;
14856
+ const v3Schema = schema2;
14857
14857
  if (v3Schema.shape !== void 0) {
14858
- return schema;
14858
+ return schema2;
14859
14859
  }
14860
14860
  }
14861
14861
  return void 0;
@@ -14879,23 +14879,23 @@ function getParseErrorMessage(error2) {
14879
14879
  }
14880
14880
  return String(error2);
14881
14881
  }
14882
- function getSchemaDescription(schema) {
14883
- return schema.description;
14882
+ function getSchemaDescription(schema2) {
14883
+ return schema2.description;
14884
14884
  }
14885
- function isSchemaOptional(schema) {
14886
- if (isZ4Schema(schema)) {
14887
- const v4Schema = schema;
14885
+ function isSchemaOptional(schema2) {
14886
+ if (isZ4Schema(schema2)) {
14887
+ const v4Schema = schema2;
14888
14888
  return v4Schema._zod?.def?.type === "optional";
14889
14889
  }
14890
- const v3Schema = schema;
14891
- if (typeof schema.isOptional === "function") {
14892
- return schema.isOptional();
14890
+ const v3Schema = schema2;
14891
+ if (typeof schema2.isOptional === "function") {
14892
+ return schema2.isOptional();
14893
14893
  }
14894
14894
  return v3Schema._def?.typeName === "ZodOptional";
14895
14895
  }
14896
- function getLiteralValue(schema) {
14897
- if (isZ4Schema(schema)) {
14898
- const v4Schema = schema;
14896
+ function getLiteralValue(schema2) {
14897
+ if (isZ4Schema(schema2)) {
14898
+ const v4Schema = schema2;
14899
14899
  const def2 = v4Schema._zod?.def;
14900
14900
  if (def2) {
14901
14901
  if (def2.value !== void 0)
@@ -14905,7 +14905,7 @@ function getLiteralValue(schema) {
14905
14905
  }
14906
14906
  }
14907
14907
  }
14908
- const v3Schema = schema;
14908
+ const v3Schema = schema2;
14909
14909
  const def = v3Schema._def;
14910
14910
  if (def) {
14911
14911
  if (def.value !== void 0)
@@ -14914,7 +14914,7 @@ function getLiteralValue(schema) {
14914
14914
  return def.values[0];
14915
14915
  }
14916
14916
  }
14917
- const directValue = schema.value;
14917
+ const directValue = schema2.value;
14918
14918
  if (directValue !== void 0)
14919
14919
  return directValue;
14920
14920
  return void 0;
@@ -15608,8 +15608,8 @@ function superRefine(fn) {
15608
15608
  });
15609
15609
  return ch;
15610
15610
  }
15611
- function preprocess(fn, schema) {
15612
- return pipe(transform(fn), schema);
15611
+ function preprocess(fn, schema2) {
15612
+ return pipe(transform(fn), schema2);
15613
15613
  }
15614
15614
 
15615
15615
  // node_modules/zod/v4/classic/external.js
@@ -17434,16 +17434,16 @@ function parseIntersectionDef(def, refs) {
17434
17434
  ].filter((x) => !!x);
17435
17435
  let unevaluatedProperties = refs.target === "jsonSchema2019-09" ? { unevaluatedProperties: false } : void 0;
17436
17436
  const mergedAllOf = [];
17437
- allOf.forEach((schema) => {
17438
- if (isJsonSchema7AllOfType(schema)) {
17439
- mergedAllOf.push(...schema.allOf);
17440
- if (schema.unevaluatedProperties === void 0) {
17437
+ allOf.forEach((schema2) => {
17438
+ if (isJsonSchema7AllOfType(schema2)) {
17439
+ mergedAllOf.push(...schema2.allOf);
17440
+ if (schema2.unevaluatedProperties === void 0) {
17441
17441
  unevaluatedProperties = void 0;
17442
17442
  }
17443
17443
  } else {
17444
- let nestedSchema = schema;
17445
- if ("additionalProperties" in schema && schema.additionalProperties === false) {
17446
- const { additionalProperties, ...rest } = schema;
17444
+ let nestedSchema = schema2;
17445
+ if ("additionalProperties" in schema2 && schema2.additionalProperties === false) {
17446
+ const { additionalProperties, ...rest } = schema2;
17447
17447
  nestedSchema = rest;
17448
17448
  } else {
17449
17449
  unevaluatedProperties = void 0;
@@ -17670,60 +17670,60 @@ function escapeNonAlphaNumeric(source) {
17670
17670
  }
17671
17671
  return result;
17672
17672
  }
17673
- function addFormat(schema, value, message, refs) {
17674
- if (schema.format || schema.anyOf?.some((x) => x.format)) {
17675
- if (!schema.anyOf) {
17676
- schema.anyOf = [];
17673
+ function addFormat(schema2, value, message, refs) {
17674
+ if (schema2.format || schema2.anyOf?.some((x) => x.format)) {
17675
+ if (!schema2.anyOf) {
17676
+ schema2.anyOf = [];
17677
17677
  }
17678
- if (schema.format) {
17679
- schema.anyOf.push({
17680
- format: schema.format,
17681
- ...schema.errorMessage && refs.errorMessages && {
17682
- errorMessage: { format: schema.errorMessage.format }
17678
+ if (schema2.format) {
17679
+ schema2.anyOf.push({
17680
+ format: schema2.format,
17681
+ ...schema2.errorMessage && refs.errorMessages && {
17682
+ errorMessage: { format: schema2.errorMessage.format }
17683
17683
  }
17684
17684
  });
17685
- delete schema.format;
17686
- if (schema.errorMessage) {
17687
- delete schema.errorMessage.format;
17688
- if (Object.keys(schema.errorMessage).length === 0) {
17689
- delete schema.errorMessage;
17685
+ delete schema2.format;
17686
+ if (schema2.errorMessage) {
17687
+ delete schema2.errorMessage.format;
17688
+ if (Object.keys(schema2.errorMessage).length === 0) {
17689
+ delete schema2.errorMessage;
17690
17690
  }
17691
17691
  }
17692
17692
  }
17693
- schema.anyOf.push({
17693
+ schema2.anyOf.push({
17694
17694
  format: value,
17695
17695
  ...message && refs.errorMessages && { errorMessage: { format: message } }
17696
17696
  });
17697
17697
  } else {
17698
- setResponseValueAndErrors(schema, "format", value, message, refs);
17698
+ setResponseValueAndErrors(schema2, "format", value, message, refs);
17699
17699
  }
17700
17700
  }
17701
- function addPattern(schema, regex, message, refs) {
17702
- if (schema.pattern || schema.allOf?.some((x) => x.pattern)) {
17703
- if (!schema.allOf) {
17704
- schema.allOf = [];
17701
+ function addPattern(schema2, regex, message, refs) {
17702
+ if (schema2.pattern || schema2.allOf?.some((x) => x.pattern)) {
17703
+ if (!schema2.allOf) {
17704
+ schema2.allOf = [];
17705
17705
  }
17706
- if (schema.pattern) {
17707
- schema.allOf.push({
17708
- pattern: schema.pattern,
17709
- ...schema.errorMessage && refs.errorMessages && {
17710
- errorMessage: { pattern: schema.errorMessage.pattern }
17706
+ if (schema2.pattern) {
17707
+ schema2.allOf.push({
17708
+ pattern: schema2.pattern,
17709
+ ...schema2.errorMessage && refs.errorMessages && {
17710
+ errorMessage: { pattern: schema2.errorMessage.pattern }
17711
17711
  }
17712
17712
  });
17713
- delete schema.pattern;
17714
- if (schema.errorMessage) {
17715
- delete schema.errorMessage.pattern;
17716
- if (Object.keys(schema.errorMessage).length === 0) {
17717
- delete schema.errorMessage;
17713
+ delete schema2.pattern;
17714
+ if (schema2.errorMessage) {
17715
+ delete schema2.errorMessage.pattern;
17716
+ if (Object.keys(schema2.errorMessage).length === 0) {
17717
+ delete schema2.errorMessage;
17718
17718
  }
17719
17719
  }
17720
17720
  }
17721
- schema.allOf.push({
17721
+ schema2.allOf.push({
17722
17722
  pattern: stringifyRegExpWithFlags(regex, refs),
17723
17723
  ...message && refs.errorMessages && { errorMessage: { pattern: message } }
17724
17724
  });
17725
17725
  } else {
17726
- setResponseValueAndErrors(schema, "pattern", stringifyRegExpWithFlags(regex, refs), message, refs);
17726
+ setResponseValueAndErrors(schema2, "pattern", stringifyRegExpWithFlags(regex, refs), message, refs);
17727
17727
  }
17728
17728
  }
17729
17729
  function stringifyRegExpWithFlags(regex, refs) {
@@ -17821,7 +17821,7 @@ function parseRecordDef(def, refs) {
17821
17821
  additionalProperties: refs.rejectedAdditionalProperties
17822
17822
  };
17823
17823
  }
17824
- const schema = {
17824
+ const schema2 = {
17825
17825
  type: "object",
17826
17826
  additionalProperties: parseDef(def.valueType._def, {
17827
17827
  ...refs,
@@ -17829,17 +17829,17 @@ function parseRecordDef(def, refs) {
17829
17829
  }) ?? refs.allowedAdditionalProperties
17830
17830
  };
17831
17831
  if (refs.target === "openApi3") {
17832
- return schema;
17832
+ return schema2;
17833
17833
  }
17834
17834
  if (def.keyType?._def.typeName === ZodFirstPartyTypeKind.ZodString && def.keyType._def.checks?.length) {
17835
17835
  const { type, ...keyType } = parseStringDef(def.keyType._def, refs);
17836
17836
  return {
17837
- ...schema,
17837
+ ...schema2,
17838
17838
  propertyNames: keyType
17839
17839
  };
17840
17840
  } else if (def.keyType?._def.typeName === ZodFirstPartyTypeKind.ZodEnum) {
17841
17841
  return {
17842
- ...schema,
17842
+ ...schema2,
17843
17843
  propertyNames: {
17844
17844
  enum: def.keyType._def.values
17845
17845
  }
@@ -17847,11 +17847,11 @@ function parseRecordDef(def, refs) {
17847
17847
  } else if (def.keyType?._def.typeName === ZodFirstPartyTypeKind.ZodBranded && def.keyType._def.type._def.typeName === ZodFirstPartyTypeKind.ZodString && def.keyType._def.type._def.checks?.length) {
17848
17848
  const { type, ...keyType } = parseBrandedDef(def.keyType._def, refs);
17849
17849
  return {
17850
- ...schema,
17850
+ ...schema2,
17851
17851
  propertyNames: keyType
17852
17852
  };
17853
17853
  }
17854
- return schema;
17854
+ return schema2;
17855
17855
  }
17856
17856
 
17857
17857
  // node_modules/zod-to-json-schema/dist/esm/parsers/map.js
@@ -18124,9 +18124,9 @@ function decideAdditionalProperties(def, refs) {
18124
18124
  return refs.removeAdditionalStrategy === "strict" ? refs.allowedAdditionalProperties : refs.rejectedAdditionalProperties;
18125
18125
  }
18126
18126
  }
18127
- function safeIsOptional(schema) {
18127
+ function safeIsOptional(schema2) {
18128
18128
  try {
18129
- return schema.isOptional();
18129
+ return schema2.isOptional();
18130
18130
  } catch {
18131
18131
  return true;
18132
18132
  }
@@ -18182,18 +18182,18 @@ function parseSetDef(def, refs) {
18182
18182
  ...refs,
18183
18183
  currentPath: [...refs.currentPath, "items"]
18184
18184
  });
18185
- const schema = {
18185
+ const schema2 = {
18186
18186
  type: "array",
18187
18187
  uniqueItems: true,
18188
18188
  items
18189
18189
  };
18190
18190
  if (def.minSize) {
18191
- setResponseValueAndErrors(schema, "minItems", def.minSize.value, def.minSize.message, refs);
18191
+ setResponseValueAndErrors(schema2, "minItems", def.minSize.value, def.minSize.message, refs);
18192
18192
  }
18193
18193
  if (def.maxSize) {
18194
- setResponseValueAndErrors(schema, "maxItems", def.maxSize.value, def.maxSize.message, refs);
18194
+ setResponseValueAndErrors(schema2, "maxItems", def.maxSize.value, def.maxSize.message, refs);
18195
18195
  }
18196
- return schema;
18196
+ return schema2;
18197
18197
  }
18198
18198
 
18199
18199
  // node_modules/zod-to-json-schema/dist/esm/parsers/tuple.js
@@ -18374,17 +18374,17 @@ var addMeta = (def, refs, jsonSchema) => {
18374
18374
  };
18375
18375
 
18376
18376
  // node_modules/zod-to-json-schema/dist/esm/zodToJsonSchema.js
18377
- var zodToJsonSchema = (schema, options) => {
18377
+ var zodToJsonSchema = (schema2, options) => {
18378
18378
  const refs = getRefs(options);
18379
- let definitions = typeof options === "object" && options.definitions ? Object.entries(options.definitions).reduce((acc, [name2, schema2]) => ({
18379
+ let definitions = typeof options === "object" && options.definitions ? Object.entries(options.definitions).reduce((acc, [name2, schema3]) => ({
18380
18380
  ...acc,
18381
- [name2]: parseDef(schema2._def, {
18381
+ [name2]: parseDef(schema3._def, {
18382
18382
  ...refs,
18383
18383
  currentPath: [...refs.basePath, refs.definitionPath, name2]
18384
18384
  }, true) ?? parseAnyDef(refs)
18385
18385
  }), {}) : void 0;
18386
18386
  const name = typeof options === "string" ? options : options?.nameStrategy === "title" ? void 0 : options?.name;
18387
- const main = parseDef(schema._def, name === void 0 ? refs : {
18387
+ const main = parseDef(schema2._def, name === void 0 ? refs : {
18388
18388
  ...refs,
18389
18389
  currentPath: [...refs.basePath, refs.definitionPath, name]
18390
18390
  }, false) ?? parseAnyDef(refs);
@@ -18445,20 +18445,20 @@ function mapMiniTarget(t) {
18445
18445
  return "draft-2020-12";
18446
18446
  return "draft-7";
18447
18447
  }
18448
- function toJsonSchemaCompat(schema, opts) {
18449
- if (isZ4Schema(schema)) {
18450
- return toJSONSchema(schema, {
18448
+ function toJsonSchemaCompat(schema2, opts) {
18449
+ if (isZ4Schema(schema2)) {
18450
+ return toJSONSchema(schema2, {
18451
18451
  target: mapMiniTarget(opts?.target),
18452
18452
  io: opts?.pipeStrategy ?? "input"
18453
18453
  });
18454
18454
  }
18455
- return zodToJsonSchema(schema, {
18455
+ return zodToJsonSchema(schema2, {
18456
18456
  strictUnions: opts?.strictUnions ?? true,
18457
18457
  pipeStrategy: opts?.pipeStrategy ?? "input"
18458
18458
  });
18459
18459
  }
18460
- function getMethodLiteral(schema) {
18461
- const shape = getObjectShape(schema);
18460
+ function getMethodLiteral(schema2) {
18461
+ const shape = getObjectShape(schema2);
18462
18462
  const methodSchema = shape?.method;
18463
18463
  if (!methodSchema) {
18464
18464
  throw new Error("Schema is missing a method literal");
@@ -18469,8 +18469,8 @@ function getMethodLiteral(schema) {
18469
18469
  }
18470
18470
  return value;
18471
18471
  }
18472
- function parseWithCompat(schema, data) {
18473
- const result = safeParse2(schema, data);
18472
+ function parseWithCompat(schema2, data) {
18473
+ const result = safeParse2(schema2, data);
18474
18474
  if (!result.success) {
18475
18475
  throw result.error;
18476
18476
  }
@@ -19478,8 +19478,8 @@ var AjvJsonSchemaValidator = class {
19478
19478
  * @param schema - Standard JSON Schema object
19479
19479
  * @returns A validator function that validates input data
19480
19480
  */
19481
- getValidator(schema) {
19482
- const ajvValidator = "$id" in schema && typeof schema.$id === "string" ? this._ajv.getSchema(schema.$id) ?? this._ajv.compile(schema) : this._ajv.compile(schema);
19481
+ getValidator(schema2) {
19482
+ const ajvValidator = "$id" in schema2 && typeof schema2.$id === "string" ? this._ajv.getSchema(schema2.$id) ?? this._ajv.compile(schema2) : this._ajv.compile(schema2);
19483
19483
  return (input) => {
19484
19484
  const valid = ajvValidator(input);
19485
19485
  if (valid) {
@@ -20129,11 +20129,11 @@ var Server = class extends Protocol {
20129
20129
 
20130
20130
  // node_modules/@modelcontextprotocol/sdk/dist/esm/server/completable.js
20131
20131
  var COMPLETABLE_SYMBOL = /* @__PURE__ */ Symbol.for("mcp.completable");
20132
- function isCompletable(schema) {
20133
- return !!schema && typeof schema === "object" && COMPLETABLE_SYMBOL in schema;
20132
+ function isCompletable(schema2) {
20133
+ return !!schema2 && typeof schema2 === "object" && COMPLETABLE_SYMBOL in schema2;
20134
20134
  }
20135
- function getCompleter(schema) {
20136
- const meta = schema[COMPLETABLE_SYMBOL];
20135
+ function getCompleter(schema2) {
20136
+ const meta = schema2[COMPLETABLE_SYMBOL];
20137
20137
  return meta?.complete;
20138
20138
  }
20139
20139
  var McpZodTypeKind;
@@ -20952,20 +20952,20 @@ function isZodRawShapeCompat(obj) {
20952
20952
  }
20953
20953
  return Object.values(obj).some(isZodTypeLike);
20954
20954
  }
20955
- function getZodSchemaObject(schema) {
20956
- if (!schema) {
20955
+ function getZodSchemaObject(schema2) {
20956
+ if (!schema2) {
20957
20957
  return void 0;
20958
20958
  }
20959
- if (isZodRawShapeCompat(schema)) {
20960
- return objectFromShape(schema);
20959
+ if (isZodRawShapeCompat(schema2)) {
20960
+ return objectFromShape(schema2);
20961
20961
  }
20962
- if (!isZodSchemaInstance(schema)) {
20962
+ if (!isZodSchemaInstance(schema2)) {
20963
20963
  throw new Error("inputSchema must be a Zod schema or raw shape, received an unrecognized object");
20964
20964
  }
20965
- return schema;
20965
+ return schema2;
20966
20966
  }
20967
- function promptArgumentsFromSchema(schema) {
20968
- const shape = getObjectShape(schema);
20967
+ function promptArgumentsFromSchema(schema2) {
20968
+ const shape = getObjectShape(schema2);
20969
20969
  if (!shape)
20970
20970
  return [];
20971
20971
  return Object.entries(shape).map(([name, field]) => {
@@ -20978,8 +20978,8 @@ function promptArgumentsFromSchema(schema) {
20978
20978
  };
20979
20979
  });
20980
20980
  }
20981
- function getMethodValue(schema) {
20982
- const shape = getObjectShape(schema);
20981
+ function getMethodValue(schema2) {
20982
+ const shape = getObjectShape(schema2);
20983
20983
  const methodSchema = shape?.method;
20984
20984
  if (!methodSchema) {
20985
20985
  throw new Error("Schema is missing a method literal");
@@ -21229,6 +21229,37 @@ function buildGitignore() {
21229
21229
  ""
21230
21230
  ].join("\n");
21231
21231
  }
21232
+ var SCHEMA_BASE = "https://cdn.jsdelivr.net/npm/@dforge-core/dforge-mcp@latest/resources/schemas";
21233
+ var SCHEMA_BINDINGS = [
21234
+ { fileMatch: ["manifest.json"], schema: "manifest" },
21235
+ { fileMatch: ["entities/*.json"], schema: "entity" },
21236
+ { fileMatch: ["ui/data_views.json"], schema: "data-views" },
21237
+ { fileMatch: ["ui/folders.json"], schema: "folders" },
21238
+ { fileMatch: ["ui/menus.json"], schema: "menus" },
21239
+ { fileMatch: ["security/roles.json"], schema: "roles" },
21240
+ { fileMatch: ["logic/jobs.json"], schema: "jobs" },
21241
+ { fileMatch: ["seed-data/*.json"], schema: "seed-data" }
21242
+ ];
21243
+ function buildVscodeSettings() {
21244
+ return {
21245
+ "json.schemas": SCHEMA_BINDINGS.map((b) => ({
21246
+ fileMatch: b.fileMatch,
21247
+ url: `${SCHEMA_BASE}/${b.schema}.schema.json`
21248
+ }))
21249
+ };
21250
+ }
21251
+ function buildZedSettings() {
21252
+ return {
21253
+ languages: {
21254
+ JSON: {
21255
+ "json.schemas": SCHEMA_BINDINGS.map((b) => ({
21256
+ fileMatch: b.fileMatch,
21257
+ url: `${SCHEMA_BASE}/${b.schema}.schema.json`
21258
+ }))
21259
+ }
21260
+ }
21261
+ };
21262
+ }
21232
21263
 
21233
21264
  // src/tools/create-module.ts
21234
21265
  var createModuleSchema = {
@@ -21282,6 +21313,8 @@ function createModuleFiles(args) {
21282
21313
  write("ui/actions.json", buildActions());
21283
21314
  write("security/roles.json", buildRoles(opts));
21284
21315
  writeText(".gitignore", buildGitignore());
21316
+ write(".vscode/settings.json", buildVscodeSettings());
21317
+ write(".zed/settings.json", buildZedSettings());
21285
21318
  if (opts.preset === "full") {
21286
21319
  write("settings.json", buildSettings());
21287
21320
  write("translations/en-US.json", buildTranslations(opts));
@@ -21478,28 +21511,66 @@ function dbmlImport(_args) {
21478
21511
  var fs3 = __toESM(require("fs"));
21479
21512
  var path3 = __toESM(require("path"));
21480
21513
  var RESOURCES_DIR = path3.resolve(__dirname, "..", "resources");
21481
- var resources = [
21482
- {
21483
- uri: "dforge://schema/manifest",
21484
- name: "Module manifest JSON schema",
21485
- description: "JSON Schema for manifest.json. The LLM should consult this before emitting manifest content to make sure required fields, patterns, and types are correct.",
21486
- mimeType: "application/schema+json",
21487
- read: () => readVendored("schemas/manifest.schema.json")
21488
- },
21489
- {
21490
- uri: "dforge://schema/entity",
21491
- name: "Entity JSON schema",
21492
- description: "JSON Schema for entity files under entities/*.json.",
21493
- mimeType: "application/schema+json",
21494
- read: () => readVendored("schemas/entity.schema.json")
21495
- },
21496
- {
21497
- uri: "dforge://schema/data-view",
21498
- name: "Data view JSON schema",
21499
- description: "JSON Schema for entries in ui/data_views.json.",
21514
+ function schema(name, label, description) {
21515
+ return {
21516
+ uri: `dforge://schema/${name}`,
21517
+ name: label,
21518
+ description,
21500
21519
  mimeType: "application/schema+json",
21501
- read: () => readVendored("schemas/data-view.schema.json")
21502
- },
21520
+ read: () => readVendored(`schemas/${name}.schema.json`)
21521
+ };
21522
+ }
21523
+ var resources = [
21524
+ schema(
21525
+ "manifest",
21526
+ "Module manifest JSON schema",
21527
+ "JSON Schema for manifest.json. Consult before emitting manifest content \u2014 covers required fields, semver patterns, and the entities map."
21528
+ ),
21529
+ schema(
21530
+ "entity",
21531
+ "Entity JSON schema",
21532
+ "JSON Schema for entity files under entities/*.json (description, dbObject, toString, traits, fields)."
21533
+ ),
21534
+ schema(
21535
+ "data-views",
21536
+ "Data view JSON schema",
21537
+ "JSON Schema for ui/data_views.json \u2014 the map of viewName \u2192 { viewType, label, dataSources, ... }."
21538
+ ),
21539
+ schema(
21540
+ "folders",
21541
+ "Folders JSON schema",
21542
+ "JSON Schema for ui/folders.json \u2014 root folder tree with per-entity view bindings."
21543
+ ),
21544
+ schema(
21545
+ "menus",
21546
+ "Menus JSON schema",
21547
+ "JSON Schema for ui/menus.json \u2014 nested menu hierarchy with M.it/M.sub style items."
21548
+ ),
21549
+ schema(
21550
+ "roles",
21551
+ "Roles JSON schema",
21552
+ "JSON Schema for security/roles.json \u2014 rights strings (SIUDC / E) per role per entity."
21553
+ ),
21554
+ schema(
21555
+ "jobs",
21556
+ "Scheduled jobs JSON schema",
21557
+ "JSON Schema for logic/jobs.json \u2014 cron + action binding for the scheduler."
21558
+ ),
21559
+ schema(
21560
+ "seed-data",
21561
+ "Seed data JSON schema",
21562
+ "JSON Schema for seed-data/*.json \u2014 initial rows inserted at install time."
21563
+ ),
21564
+ schema(
21565
+ "traits",
21566
+ "Entity traits JSON schema",
21567
+ "JSON Schema describing the inheritable trait set (identity, audit, audit-full, soft-delete, sorting, postable, accumulation, ledger, period)."
21568
+ ),
21569
+ schema(
21570
+ "webhooks",
21571
+ "Webhooks JSON schema",
21572
+ "JSON Schema for ui/webhooks.json \u2014 outbound webhook definitions."
21573
+ ),
21503
21574
  {
21504
21575
  uri: "dforge://docs/conventions",
21505
21576
  name: "dForge module conventions",