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.mjs CHANGED
@@ -735,7 +735,14 @@ var dataContentSchema = z.union([
735
735
  z.string(),
736
736
  z.instanceof(Uint8Array),
737
737
  z.instanceof(ArrayBuffer),
738
- z.instanceof(Buffer)
738
+ z.custom(
739
+ // Buffer might not be available in some environments such as CloudFlare:
740
+ (value) => {
741
+ var _a12, _b;
742
+ return (_b = (_a12 = globalThis.Buffer) == null ? void 0 : _a12.isBuffer(value)) != null ? _b : false;
743
+ },
744
+ { message: "Must be a Buffer" }
745
+ )
739
746
  ]);
740
747
  function convertDataContentToUint8Array(content) {
741
748
  if (content instanceof Uint8Array) {