bruce-models 4.0.9 → 4.1.0

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.
@@ -275,6 +275,12 @@
275
275
  else if (encoding === "iso-8859-1") {
276
276
  encoding = "utf-8";
277
277
  }
278
+ if (type == "application/octet-stream" || type == "model/gltf-binary") {
279
+ if (encoding !== "utf-8") {
280
+ console.warn("Binary data is being returned with an unexpected encoding:", encoding);
281
+ }
282
+ return data.blob();
283
+ }
278
284
  let text = yield (encoding && encoding !== "utf-8"
279
285
  ? new TextDecoder(encoding).decode(yield data.arrayBuffer())
280
286
  : data.text());
@@ -284,10 +290,7 @@
284
290
  if (!type) {
285
291
  type = "";
286
292
  }
287
- if (type == "application/octet-stream" || type == "model/gltf-binary") {
288
- return new Blob([text]);
289
- }
290
- else if (type.includes("text/csv")) {
293
+ if (type.includes("text/csv")) {
291
294
  return text;
292
295
  }
293
296
  if (text && typeof text == "string") {
@@ -11659,7 +11662,7 @@
11659
11662
  })(exports.DataSource || (exports.DataSource = {}));
11660
11663
 
11661
11664
  // This is updated with the package.json version on build.
11662
- const VERSION = "4.0.9";
11665
+ const VERSION = "4.1.0";
11663
11666
 
11664
11667
  exports.VERSION = VERSION;
11665
11668
  exports.AbstractApi = AbstractApi;