@ai-sdk/provider-utils 4.0.0-beta.12 → 4.0.0-beta.13
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 +14 -3
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +14 -3
- package/dist/index.mjs.map +1 -1
- package/package.json +6 -1
package/dist/index.mjs
CHANGED
@@ -194,7 +194,7 @@ function withUserAgentSuffix(headers, ...userAgentSuffixParts) {
|
|
194
194
|
}
|
195
195
|
|
196
196
|
// src/version.ts
|
197
|
-
var VERSION = true ? "4.0.0-beta.
|
197
|
+
var VERSION = true ? "4.0.0-beta.13" : "0.0.0-test";
|
198
198
|
|
199
199
|
// src/get-from-api.ts
|
200
200
|
var getOriginalFetch = () => globalThis.fetch;
|
@@ -997,7 +997,12 @@ var createStatusCodeErrorResponseHandler = () => async ({ response, url, request
|
|
997
997
|
import { TypeValidationError as TypeValidationError4 } from "@ai-sdk/provider";
|
998
998
|
import * as z4 from "zod/v4";
|
999
999
|
|
1000
|
-
// src/
|
1000
|
+
// src/to-json-schema/arktype-to-json-schema.ts
|
1001
|
+
var arktypeToJsonSchema = async (schema) => {
|
1002
|
+
return schema.toJsonSchema();
|
1003
|
+
};
|
1004
|
+
|
1005
|
+
// src/to-json-schema/valibot-to-json-schema.ts
|
1001
1006
|
var valibotToJsonSchema = async (schema) => {
|
1002
1007
|
try {
|
1003
1008
|
const { toJsonSchema } = await import("@valibot/to-json-schema");
|
@@ -2225,7 +2230,7 @@ function asSchema(schema) {
|
|
2225
2230
|
return schema == null ? jsonSchema({
|
2226
2231
|
properties: {},
|
2227
2232
|
additionalProperties: false
|
2228
|
-
}) : isSchema(schema) ? schema :
|
2233
|
+
}) : isSchema(schema) ? schema : "~standard" in schema ? standardSchema(schema) : schema();
|
2229
2234
|
}
|
2230
2235
|
function standardSchema(standardSchema2) {
|
2231
2236
|
const vendor = standardSchema2["~standard"].vendor;
|
@@ -2235,6 +2240,12 @@ function standardSchema(standardSchema2) {
|
|
2235
2240
|
standardSchema2
|
2236
2241
|
);
|
2237
2242
|
}
|
2243
|
+
case "arktype": {
|
2244
|
+
return standardSchemaWithJsonSchemaResolver(
|
2245
|
+
standardSchema2,
|
2246
|
+
arktypeToJsonSchema
|
2247
|
+
);
|
2248
|
+
}
|
2238
2249
|
case "valibot": {
|
2239
2250
|
return standardSchemaWithJsonSchemaResolver(
|
2240
2251
|
standardSchema2,
|