@ai-sdk/provider-utils 4.0.66 → 4.0.67
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 +6 -0
- package/dist/index.js +2 -2
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +2 -2
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
- package/src/schema.ts +2 -1
package/package.json
CHANGED
package/src/schema.ts
CHANGED
|
@@ -176,7 +176,8 @@ function standardSchema<OBJECT>(
|
|
|
176
176
|
{
|
|
177
177
|
validate: async value => {
|
|
178
178
|
const result = await standardSchema['~standard'].validate(value);
|
|
179
|
-
|
|
179
|
+
// Failed Standard Schema results can also contain a value.
|
|
180
|
+
return result.issues === undefined && 'value' in result
|
|
180
181
|
? { success: true, value: result.value }
|
|
181
182
|
: {
|
|
182
183
|
success: false,
|