@mastra/schema-compat 0.11.3 → 0.11.4
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/CHANGELOG.md +12 -0
- package/dist/index.cjs +1 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +10 -10
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/provider-compats/anthropic.d.ts +2 -2
- package/dist/provider-compats/deepseek.d.ts +2 -2
- package/dist/provider-compats/google.d.ts +2 -2
- package/dist/provider-compats/meta.d.ts +2 -2
- package/dist/provider-compats/openai-reasoning.d.ts +2 -2
- package/dist/provider-compats/openai-reasoning.d.ts.map +1 -1
- package/dist/provider-compats/openai.d.ts +2 -2
- package/dist/schema-compatibility-v3.d.ts +2 -2
- package/dist/schema-compatibility-v4.d.ts +2 -2
- package/dist/schema-compatibility.d.ts +3 -3
- package/dist/utils.d.ts +1 -1
- package/package.json +4 -3
package/dist/index.d.ts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
export { SchemaCompatLayer as SchemaCompatLayerV3, ALL_STRING_CHECKS, ALL_NUMBER_CHECKS, ALL_ARRAY_CHECKS, UNSUPPORTED_ZOD_TYPES, SUPPORTED_ZOD_TYPES, ALL_ZOD_TYPES, type StringCheckType, type NumberCheckType, type ArrayCheckType, type UnsupportedZodType, type SupportedZodType, type AllZodType, type ZodShape, type ShapeKey, type ShapeValue, isOptional, isObj, isArr, isUnion, isString, isNumber, } from './schema-compatibility-v3';
|
|
2
|
-
export { SchemaCompatLayer as SchemaCompatLayerV4 } from './schema-compatibility-v4';
|
|
3
|
-
export { SchemaCompatLayer } from './schema-compatibility';
|
|
4
|
-
export { convertZodSchemaToAISDKSchema, applyCompatLayer, convertSchemaToZod } from './utils';
|
|
5
|
-
export { AnthropicSchemaCompatLayer } from './provider-compats/anthropic';
|
|
6
|
-
export { DeepSeekSchemaCompatLayer } from './provider-compats/deepseek';
|
|
7
|
-
export { GoogleSchemaCompatLayer } from './provider-compats/google';
|
|
8
|
-
export { MetaSchemaCompatLayer } from './provider-compats/meta';
|
|
9
|
-
export { OpenAISchemaCompatLayer } from './provider-compats/openai';
|
|
10
|
-
export { OpenAIReasoningSchemaCompatLayer } from './provider-compats/openai-reasoning';
|
|
1
|
+
export { SchemaCompatLayer as SchemaCompatLayerV3, ALL_STRING_CHECKS, ALL_NUMBER_CHECKS, ALL_ARRAY_CHECKS, UNSUPPORTED_ZOD_TYPES, SUPPORTED_ZOD_TYPES, ALL_ZOD_TYPES, type StringCheckType, type NumberCheckType, type ArrayCheckType, type UnsupportedZodType, type SupportedZodType, type AllZodType, type ZodShape, type ShapeKey, type ShapeValue, isOptional, isObj, isArr, isUnion, isString, isNumber, } from './schema-compatibility-v3.js';
|
|
2
|
+
export { SchemaCompatLayer as SchemaCompatLayerV4 } from './schema-compatibility-v4.js';
|
|
3
|
+
export { SchemaCompatLayer } from './schema-compatibility.js';
|
|
4
|
+
export { convertZodSchemaToAISDKSchema, applyCompatLayer, convertSchemaToZod } from './utils.js';
|
|
5
|
+
export { AnthropicSchemaCompatLayer } from './provider-compats/anthropic.js';
|
|
6
|
+
export { DeepSeekSchemaCompatLayer } from './provider-compats/deepseek.js';
|
|
7
|
+
export { GoogleSchemaCompatLayer } from './provider-compats/google.js';
|
|
8
|
+
export { MetaSchemaCompatLayer } from './provider-compats/meta.js';
|
|
9
|
+
export { OpenAISchemaCompatLayer } from './provider-compats/openai.js';
|
|
10
|
+
export { OpenAIReasoningSchemaCompatLayer } from './provider-compats/openai-reasoning.js';
|
|
11
11
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.js
CHANGED
|
@@ -1367,7 +1367,7 @@ var OpenAIReasoningSchemaCompatLayer = class extends SchemaCompatLayer3 {
|
|
|
1367
1367
|
} else if (isDefault(z)(value)) {
|
|
1368
1368
|
const defaultDef = value._def;
|
|
1369
1369
|
const innerType = defaultDef.innerType;
|
|
1370
|
-
const defaultValue = defaultDef.defaultValue();
|
|
1370
|
+
const defaultValue = typeof defaultDef.defaultValue === "function" ? defaultDef.defaultValue() : defaultDef.defaultValue;
|
|
1371
1371
|
const constraints = {};
|
|
1372
1372
|
if (defaultValue !== void 0) {
|
|
1373
1373
|
constraints.defaultValue = defaultValue;
|