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/dist/index.js CHANGED
@@ -813,7 +813,14 @@ var dataContentSchema = import_zod.z.union([
813
813
  import_zod.z.string(),
814
814
  import_zod.z.instanceof(Uint8Array),
815
815
  import_zod.z.instanceof(ArrayBuffer),
816
- import_zod.z.instanceof(Buffer)
816
+ import_zod.z.custom(
817
+ // Buffer might not be available in some environments such as CloudFlare:
818
+ (value) => {
819
+ var _a12, _b;
820
+ return (_b = (_a12 = globalThis.Buffer) == null ? void 0 : _a12.isBuffer(value)) != null ? _b : false;
821
+ },
822
+ { message: "Must be a Buffer" }
823
+ )
817
824
  ]);
818
825
  function convertDataContentToUint8Array(content) {
819
826
  if (content instanceof Uint8Array) {