@ai-sdk/provider-utils 4.0.62 → 4.0.63
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 +9 -1
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +9 -1
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
- package/src/uint8-utils.ts +8 -0
package/dist/index.mjs
CHANGED
|
@@ -168,6 +168,14 @@ function convertBase64ToUint8Array(base64String) {
|
|
|
168
168
|
return Uint8Array.from(latin1string, (byte) => byte.codePointAt(0));
|
|
169
169
|
}
|
|
170
170
|
function convertUint8ArrayToBase64(array) {
|
|
171
|
+
var _a2;
|
|
172
|
+
if (typeof ((_a2 = globalThis.Buffer) == null ? void 0 : _a2.from) === "function") {
|
|
173
|
+
return globalThis.Buffer.from(
|
|
174
|
+
array.buffer,
|
|
175
|
+
array.byteOffset,
|
|
176
|
+
array.byteLength
|
|
177
|
+
).toString("base64");
|
|
178
|
+
}
|
|
171
179
|
const chunks = [];
|
|
172
180
|
const chunkSize = 4096;
|
|
173
181
|
for (let i = 0; i < array.length; i += chunkSize) {
|
|
@@ -899,7 +907,7 @@ function withUserAgentSuffix(headers, ...userAgentSuffixParts) {
|
|
|
899
907
|
}
|
|
900
908
|
|
|
901
909
|
// src/version.ts
|
|
902
|
-
var VERSION = true ? "4.0.
|
|
910
|
+
var VERSION = true ? "4.0.63" : "0.0.0-test";
|
|
903
911
|
|
|
904
912
|
// src/get-from-api.ts
|
|
905
913
|
var getOriginalFetch = () => globalThis.fetch;
|