bruce-models 4.0.7 → 4.0.8
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/bruce-models.es5.js +18 -3
- package/dist/bruce-models.es5.js.map +1 -1
- package/dist/bruce-models.umd.js +18 -3
- package/dist/bruce-models.umd.js.map +1 -1
- package/dist/lib/api/abstract-api.js +17 -2
- package/dist/lib/api/abstract-api.js.map +1 -1
- package/dist/lib/bruce-models.js +1 -1
- package/dist/types/api/abstract-api.d.ts +3 -0
- package/dist/types/bruce-models.d.ts +1 -1
- package/package.json +1 -1
package/dist/bruce-models.umd.js
CHANGED
|
@@ -278,13 +278,28 @@
|
|
|
278
278
|
else if (encoding === "iso-8859-1") {
|
|
279
279
|
encoding = "utf-8";
|
|
280
280
|
}
|
|
281
|
-
|
|
281
|
+
let text = yield (encoding && encoding !== "utf-8"
|
|
282
282
|
? new TextDecoder(encoding).decode(yield data.arrayBuffer())
|
|
283
283
|
: data.text());
|
|
284
284
|
if (!(text === null || text === void 0 ? void 0 : text.trim())) {
|
|
285
285
|
return null;
|
|
286
286
|
}
|
|
287
|
-
|
|
287
|
+
if (!type) {
|
|
288
|
+
type = "";
|
|
289
|
+
}
|
|
290
|
+
if (type.includes("application/octet-stream")) {
|
|
291
|
+
return new Blob([text]);
|
|
292
|
+
}
|
|
293
|
+
else if (type.includes("text/csv")) {
|
|
294
|
+
return text;
|
|
295
|
+
}
|
|
296
|
+
if (text && typeof text == "string") {
|
|
297
|
+
text = text.trim();
|
|
298
|
+
}
|
|
299
|
+
if (text && text.startsWith("{") && text.endsWith("}")) {
|
|
300
|
+
return JSON.parse(text);
|
|
301
|
+
}
|
|
302
|
+
return text;
|
|
288
303
|
});
|
|
289
304
|
}
|
|
290
305
|
/**
|
|
@@ -11647,7 +11662,7 @@
|
|
|
11647
11662
|
})(exports.DataSource || (exports.DataSource = {}));
|
|
11648
11663
|
|
|
11649
11664
|
// This is updated with the package.json version on build.
|
|
11650
|
-
const VERSION = "4.0.
|
|
11665
|
+
const VERSION = "4.0.8";
|
|
11651
11666
|
|
|
11652
11667
|
exports.VERSION = VERSION;
|
|
11653
11668
|
exports.AbstractApi = AbstractApi;
|