@crowdin/app-project-module 0.98.0-cf-11 → 0.98.0-cf-12
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.
|
@@ -32,7 +32,8 @@ exports.storeFile = storeFile;
|
|
|
32
32
|
function getFileContent(url) {
|
|
33
33
|
return __awaiter(this, void 0, void 0, function* () {
|
|
34
34
|
const response = (yield axios_1.default.get(url, { responseType: 'arraybuffer' })).data;
|
|
35
|
-
|
|
35
|
+
// Support for both Node.js (returns Buffer) and Cloudflare Workers (returns ArrayBuffer)
|
|
36
|
+
return Buffer.isBuffer(response) ? response : Buffer.from(response);
|
|
36
37
|
});
|
|
37
38
|
}
|
|
38
39
|
exports.getFileContent = getFileContent;
|
package/package.json
CHANGED