@mastra/schema-compat 1.3.15 → 1.3.16

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.
Files changed (42) hide show
  1. package/dist/_types/@internal_ai-sdk-v5/dist/index.d.ts +206 -873
  2. package/dist/_types/@internal_ai-v6/dist/index.d.ts +851 -1176
  3. package/dist/{esm-CWlHuVIx.js → esm-DA8owk0L.js} +60 -70
  4. package/dist/{esm-CWlHuVIx.js.map → esm-DA8owk0L.js.map} +1 -1
  5. package/dist/{esm-CkNCkZSB.cjs → esm-zrVJTTxY.cjs} +60 -70
  6. package/dist/{esm-CkNCkZSB.cjs.map → esm-zrVJTTxY.cjs.map} +1 -1
  7. package/dist/index.cjs +146 -153
  8. package/dist/index.cjs.map +1 -1
  9. package/dist/index.js +146 -153
  10. package/dist/index.js.map +1 -1
  11. package/dist/{json-schema-R8yfooPa.js → json-schema-DcMkkbbI.js} +55 -46
  12. package/dist/{json-schema-R8yfooPa.js.map → json-schema-DcMkkbbI.js.map} +1 -1
  13. package/dist/{json-schema-VSnKq6-P.cjs → json-schema-Dh7B27IP.cjs} +55 -46
  14. package/dist/{json-schema-VSnKq6-P.cjs.map → json-schema-Dh7B27IP.cjs.map} +1 -1
  15. package/dist/{json-schema-traverse-DbuWNYgg.cjs → json-schema-traverse-CKLDTw5l.cjs} +3 -3
  16. package/dist/{json-schema-traverse-DbuWNYgg.cjs.map → json-schema-traverse-CKLDTw5l.cjs.map} +1 -1
  17. package/dist/{json-schema-traverse-B35mHRM8.js → json-schema-traverse-Jrimn_T_.js} +3 -3
  18. package/dist/{json-schema-traverse-B35mHRM8.js.map → json-schema-traverse-Jrimn_T_.js.map} +1 -1
  19. package/dist/json-to-zod.cjs +84 -72
  20. package/dist/json-to-zod.cjs.map +1 -1
  21. package/dist/json-to-zod.js +84 -72
  22. package/dist/json-to-zod.js.map +1 -1
  23. package/dist/{schema-IhrnbMI3.cjs → schema-BXSe2bgB.cjs} +3 -3
  24. package/dist/schema-BXSe2bgB.cjs.map +1 -0
  25. package/dist/{schema-e0VHpMt0.js → schema-CzbEIyhE.js} +2 -2
  26. package/dist/{schema-e0VHpMt0.js.map → schema-CzbEIyhE.js.map} +1 -1
  27. package/dist/schema.cjs +1 -1
  28. package/dist/schema.js +1 -2
  29. package/dist/standard-schema/adapters/ai-sdk.cjs +1 -5
  30. package/dist/standard-schema/adapters/ai-sdk.cjs.map +1 -1
  31. package/dist/standard-schema/adapters/ai-sdk.js +1 -5
  32. package/dist/standard-schema/adapters/ai-sdk.js.map +1 -1
  33. package/dist/standard-schema/adapters/json-schema.cjs +1 -1
  34. package/dist/standard-schema/adapters/json-schema.js +1 -2
  35. package/dist/standard-schema/adapters/zod-v3.cjs +2 -2
  36. package/dist/standard-schema/adapters/zod-v3.js +2 -2
  37. package/dist/zod-to-json.cjs +5 -3
  38. package/dist/zod-to-json.cjs.map +1 -1
  39. package/dist/zod-to-json.js +5 -3
  40. package/dist/zod-to-json.js.map +1 -1
  41. package/package.json +14 -15
  42. package/dist/schema-IhrnbMI3.cjs.map +0 -1
@@ -1,4 +1,4 @@
1
- const require_json_schema_traverse$1 = require("./json-schema-traverse-DbuWNYgg.cjs");
1
+ const require_json_schema_traverse$1 = require("./json-schema-traverse-CKLDTw5l.cjs");
2
2
  //#region ../../../../../setup-pnpm/node_modules/.bin/store/v11/links/@/ajv/8.20.0/030cdf17be110aa8137679eb877279b0c80ee1367e93a2fc22ecf4c20a1be629/node_modules/ajv/dist/compile/codegen/code.js
3
3
  var require_code$1 = /* @__PURE__ */ require_json_schema_traverse$1.__commonJSMin(((exports) => {
4
4
  Object.defineProperty(exports, "__esModule", { value: true });
@@ -1941,10 +1941,12 @@ var require_resolve = /* @__PURE__ */ require_json_schema_traverse$1.__commonJSM
1941
1941
  let schOrRef = this.refs[ref];
1942
1942
  if (typeof schOrRef == "string") schOrRef = this.refs[schOrRef];
1943
1943
  if (typeof schOrRef == "object") checkAmbiguosRef(sch, schOrRef.schema, ref);
1944
- else if (ref !== normalizeId(fullPath)) if (ref[0] === "#") {
1945
- checkAmbiguosRef(sch, localRefs[ref], ref);
1946
- localRefs[ref] = sch;
1947
- } else this.refs[ref] = fullPath;
1944
+ else if (ref !== normalizeId(fullPath)) {
1945
+ if (ref[0] === "#") {
1946
+ checkAmbiguosRef(sch, localRefs[ref], ref);
1947
+ localRefs[ref] = sch;
1948
+ } else this.refs[ref] = fullPath;
1949
+ }
1948
1950
  return ref;
1949
1951
  }
1950
1952
  function addAnchor(anchor) {
@@ -2870,15 +2872,16 @@ var require_utils = /* @__PURE__ */ require_json_schema_traverse$1.__commonJSMin
2870
2872
  let nextSlash = -1;
2871
2873
  let len = 0;
2872
2874
  while (len = input.length) {
2873
- if (len === 1) if (input === ".") break;
2874
- else if (input === "/") {
2875
- output.push("/");
2876
- break;
2877
- } else {
2878
- output.push(input);
2879
- break;
2880
- }
2881
- else if (len === 2) {
2875
+ if (len === 1) {
2876
+ if (input === ".") break;
2877
+ else if (input === "/") {
2878
+ output.push("/");
2879
+ break;
2880
+ } else {
2881
+ output.push(input);
2882
+ break;
2883
+ }
2884
+ } else if (len === 2) {
2882
2885
  if (input[0] === ".") {
2883
2886
  if (input[1] === ".") break;
2884
2887
  else if (input[1] === "/") {
@@ -3567,8 +3570,10 @@ var require_fast_uri = /* @__PURE__ */ require_json_schema_traverse$1.__commonJS
3567
3570
  if (schemeHandler && schemeHandler.serialize) schemeHandler.serialize(component, options);
3568
3571
  const hasAuthority = component.userinfo !== void 0 || component.host !== void 0 || component.port !== void 0;
3569
3572
  const pathNoScheme = !options.skipEscape && component.scheme === void 0 && !hasAuthority;
3570
- if (component.path !== void 0) if (!options.skipEscape) component.path = serializePathEncoding(component.path, pathNoScheme);
3571
- else component.path = normalizePercentEncoding(component.path);
3573
+ if (component.path !== void 0) {
3574
+ if (!options.skipEscape) component.path = serializePathEncoding(component.path, pathNoScheme);
3575
+ else component.path = normalizePercentEncoding(component.path);
3576
+ }
3572
3577
  if (options.reference !== "suffix" && component.scheme) {
3573
3578
  component.scheme = decodeValidScheme(component.scheme);
3574
3579
  uriTokens.push(component.scheme, ":");
@@ -3678,8 +3683,10 @@ var require_fast_uri = /* @__PURE__ */ require_json_schema_traverse$1.__commonJS
3678
3683
  let malformedIPLiteral = false;
3679
3684
  let malformedScheme = false;
3680
3685
  let isIP = false;
3681
- if (options.reference === "suffix") if (options.scheme) uri = options.scheme + ":" + uri;
3682
- else uri = "//" + uri;
3686
+ if (options.reference === "suffix") {
3687
+ if (options.scheme) uri = options.scheme + ":" + uri;
3688
+ else uri = "//" + uri;
3689
+ }
3683
3690
  const authorityMatch = uri.match(AUTHORITY_PREFIX);
3684
3691
  if (authorityMatch !== null && authorityMatch[1].indexOf("\\") !== -1) {
3685
3692
  parsed.error = "URI authority must not contain a literal backslash.";
@@ -3724,18 +3731,20 @@ var require_fast_uri = /* @__PURE__ */ require_json_schema_traverse$1.__commonJS
3724
3731
  parsed.error = parsed.error || parseError;
3725
3732
  malformedAuthorityOrPort = true;
3726
3733
  }
3727
- if (parsed.host) if (isIPv4(parsed.host) === false) {
3728
- const bracketedIPLiteral = isIPLiteral(parsed.host);
3729
- const hasIPLiteralBracket = parsed.host.indexOf("[") !== -1 || parsed.host.indexOf("]") !== -1;
3730
- const ipv6result = normalizeIPv6(parsed.host);
3731
- isIP = ipv6result.isIPV6 || ipv6result.isIPVFuture === true;
3732
- malformedIPLiteral = hasIPLiteralBracket && (!bracketedIPLiteral || ipv6result.error === true);
3733
- parsed.host = isIP ? ipv6result.host : ipv6result.host.toLowerCase();
3734
- if (malformedIPLiteral) {
3735
- parsed.error = parsed.error || "URI host is malformed.";
3736
- malformedAuthorityOrPort = true;
3737
- }
3738
- } else isIP = true;
3734
+ if (parsed.host) {
3735
+ if (isIPv4(parsed.host) === false) {
3736
+ const bracketedIPLiteral = isIPLiteral(parsed.host);
3737
+ const hasIPLiteralBracket = parsed.host.indexOf("[") !== -1 || parsed.host.indexOf("]") !== -1;
3738
+ const ipv6result = normalizeIPv6(parsed.host);
3739
+ isIP = ipv6result.isIPV6 || ipv6result.isIPVFuture === true;
3740
+ malformedIPLiteral = hasIPLiteralBracket && (!bracketedIPLiteral || ipv6result.error === true);
3741
+ parsed.host = isIP ? ipv6result.host : ipv6result.host.toLowerCase();
3742
+ if (malformedIPLiteral) {
3743
+ parsed.error = parsed.error || "URI host is malformed.";
3744
+ malformedAuthorityOrPort = true;
3745
+ }
3746
+ } else isIP = true;
3747
+ }
3739
3748
  if (parsed.scheme === void 0 && parsed.userinfo === void 0 && parsed.host === void 0 && parsed.port === void 0 && parsed.query === void 0 && !parsed.path) parsed.reference = "same-document";
3740
3749
  else if (parsed.scheme === void 0) parsed.reference = "relative";
3741
3750
  else if (parsed.fragment === void 0) parsed.reference = "absolute";
@@ -4502,17 +4511,21 @@ var require_ref = /* @__PURE__ */ require_json_schema_traverse$1.__commonJSMin((
4502
4511
  var _a;
4503
4512
  if (!it.opts.unevaluated) return;
4504
4513
  const schEvaluated = (_a = sch === null || sch === void 0 ? void 0 : sch.validate) === null || _a === void 0 ? void 0 : _a.evaluated;
4505
- if (it.props !== true) if (schEvaluated && !schEvaluated.dynamicProps) {
4506
- if (schEvaluated.props !== void 0) it.props = util_1.mergeEvaluated.props(gen, schEvaluated.props, it.props);
4507
- } else {
4508
- const props = gen.var("props", (0, codegen_1._)`${source}.evaluated.props`);
4509
- it.props = util_1.mergeEvaluated.props(gen, props, it.props, codegen_1.Name);
4514
+ if (it.props !== true) {
4515
+ if (schEvaluated && !schEvaluated.dynamicProps) {
4516
+ if (schEvaluated.props !== void 0) it.props = util_1.mergeEvaluated.props(gen, schEvaluated.props, it.props);
4517
+ } else {
4518
+ const props = gen.var("props", (0, codegen_1._)`${source}.evaluated.props`);
4519
+ it.props = util_1.mergeEvaluated.props(gen, props, it.props, codegen_1.Name);
4520
+ }
4510
4521
  }
4511
- if (it.items !== true) if (schEvaluated && !schEvaluated.dynamicItems) {
4512
- if (schEvaluated.items !== void 0) it.items = util_1.mergeEvaluated.items(gen, schEvaluated.items, it.items);
4513
- } else {
4514
- const items = gen.var("items", (0, codegen_1._)`${source}.evaluated.items`);
4515
- it.items = util_1.mergeEvaluated.items(gen, items, it.items, codegen_1.Name);
4522
+ if (it.items !== true) {
4523
+ if (schEvaluated && !schEvaluated.dynamicItems) {
4524
+ if (schEvaluated.items !== void 0) it.items = util_1.mergeEvaluated.items(gen, schEvaluated.items, it.items);
4525
+ } else {
4526
+ const items = gen.var("items", (0, codegen_1._)`${source}.evaluated.items`);
4527
+ it.items = util_1.mergeEvaluated.items(gen, items, it.items, codegen_1.Name);
4528
+ }
4516
4529
  }
4517
4530
  }
4518
4531
  }
@@ -7042,11 +7055,7 @@ var JsonSchemaWrapper = class {
7042
7055
  case "draft-07":
7043
7056
  clonedSchema.$schema = "http://json-schema.org/draft-07/schema#";
7044
7057
  break;
7045
- case "draft-2020-12":
7046
- clonedSchema.$schema = "https://json-schema.org/draft/2020-12/schema";
7047
- break;
7048
- case "openapi-3.0": break;
7049
- default: break;
7058
+ case "draft-2020-12": clonedSchema.$schema = "https://json-schema.org/draft/2020-12/schema";
7050
7059
  }
7051
7060
  if (options?.libraryOptions?.override) {
7052
7061
  const override = options.libraryOptions.override;
@@ -7140,4 +7149,4 @@ Object.defineProperty(exports, "toStandardSchema", {
7140
7149
  }
7141
7150
  });
7142
7151
 
7143
- //# sourceMappingURL=json-schema-VSnKq6-P.cjs.map
7152
+ //# sourceMappingURL=json-schema-Dh7B27IP.cjs.map