ai 3.3.12 → 3.3.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ai",
3
- "version": "3.3.12",
3
+ "version": "3.3.13",
4
4
  "description": "Vercel AI SDK - The AI Toolkit for TypeScript and JavaScript",
5
5
  "license": "Apache-2.0",
6
6
  "sideEffects": false,
@@ -356,7 +356,14 @@ var dataContentSchema = z.union([
356
356
  z.string(),
357
357
  z.instanceof(Uint8Array),
358
358
  z.instanceof(ArrayBuffer),
359
- z.instanceof(Buffer)
359
+ z.custom(
360
+ // Buffer might not be available in some environments such as CloudFlare:
361
+ (value) => {
362
+ var _a8, _b;
363
+ return (_b = (_a8 = globalThis.Buffer) == null ? void 0 : _a8.isBuffer(value)) != null ? _b : false;
364
+ },
365
+ { message: "Must be a Buffer" }
366
+ )
360
367
  ]);
361
368
  function convertDataContentToUint8Array(content) {
362
369
  if (content instanceof Uint8Array) {