@loaders.gl/polyfills 4.3.0-alpha.2 → 4.3.0-alpha.4

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.
Files changed (37) hide show
  1. package/dist/crypto/node-hash.d.ts.map +1 -1
  2. package/dist/crypto/node-hash.js +3 -0
  3. package/dist/fetch/decode-data-uri.d.ts.map +1 -1
  4. package/dist/fetch/decode-data-uri.js +3 -0
  5. package/dist/fetch/utils/decode-data-uri.node.d.ts.map +1 -1
  6. package/dist/fetch/utils/decode-data-uri.node.js +3 -0
  7. package/dist/file/blob-stream-controller.d.ts.map +1 -1
  8. package/dist/file/blob-stream-controller.js +3 -0
  9. package/dist/file/blob-stream.d.ts.map +1 -1
  10. package/dist/file/blob-stream.js +3 -0
  11. package/dist/file/blob.d.ts.map +1 -1
  12. package/dist/file/blob.js +3 -0
  13. package/dist/file/file-reader.d.ts.map +1 -1
  14. package/dist/file/file-reader.js +3 -0
  15. package/dist/file/file.d.ts.map +1 -1
  16. package/dist/file/file.js +3 -0
  17. package/dist/file/install-blob-polyfills.d.ts.map +1 -1
  18. package/dist/file/install-blob-polyfills.js +3 -0
  19. package/dist/file/install-file-polyfills.d.ts.map +1 -1
  20. package/dist/file/install-file-polyfills.js +3 -0
  21. package/dist/file/readable-stream.d.ts.map +1 -1
  22. package/dist/file/readable-stream.js +3 -3
  23. package/dist/index.d.ts.map +1 -1
  24. package/dist/index.js +3 -0
  25. package/package.json +5 -5
  26. package/src/crypto/node-hash.ts +4 -0
  27. package/src/fetch/decode-data-uri.ts +4 -0
  28. package/src/fetch/utils/decode-data-uri.node.ts +4 -0
  29. package/src/file/blob-stream-controller.ts +4 -0
  30. package/src/file/blob-stream.ts +4 -0
  31. package/src/file/blob.ts +4 -0
  32. package/src/file/file-reader.ts +4 -0
  33. package/src/file/file.ts +4 -0
  34. package/src/file/install-blob-polyfills.ts +4 -0
  35. package/src/file/install-file-polyfills.ts +4 -0
  36. package/src/file/readable-stream.ts +4 -4
  37. package/src/index.ts +4 -0
@@ -1 +1 @@
1
- {"version":3,"file":"node-hash.d.ts","sourceRoot":"","sources":["../../src/crypto/node-hash.ts"],"names":[],"mappings":"AACA,OAAO,EAAC,IAAI,EAAC,MAAM,oBAAoB,CAAC;AAGxC,KAAK,iBAAiB,GAAG;IACvB,MAAM,EAAE;QACN,SAAS,EAAE,MAAM,CAAC;QAClB,KAAK,CAAC,EAAE,CAAC,MAAM,EAAE;YAAC,IAAI,EAAE,MAAM,CAAA;SAAC,KAAK,GAAG,CAAC;KACzC,CAAC;CACH,CAAC;AAEF;;;GAGG;AACH,qBAAa,QAAS,SAAQ,IAAI;IAChC,QAAQ,CAAC,IAAI,iBAAiB;IAE9B,OAAO,EAAE,iBAAiB,CAAC;IAE3B,OAAO,CAAC,UAAU,CAAC;IAEnB,OAAO,CAAC,KAAK,CAAC;gBAEF,OAAO,EAAE,iBAAiB;IAQtC;;;OAGG;IACG,IAAI,CAAC,KAAK,EAAE,WAAW,EAAE,QAAQ,EAAE,KAAK,GAAG,QAAQ,GAAG,OAAO,CAAC,MAAM,CAAC;IAepE,WAAW,CAChB,aAAa,EAAE,aAAa,CAAC,WAAW,CAAC,GAAG,QAAQ,CAAC,WAAW,CAAC,EACjE,QAAQ,GAAE,KAAK,GAAG,QAAmB,GACpC,aAAa,CAAC,WAAW,CAAC;CAgB9B"}
1
+ {"version":3,"file":"node-hash.d.ts","sourceRoot":"","sources":["../../src/crypto/node-hash.ts"],"names":[],"mappings":"AAKA,OAAO,EAAC,IAAI,EAAC,MAAM,oBAAoB,CAAC;AAGxC,KAAK,iBAAiB,GAAG;IACvB,MAAM,EAAE;QACN,SAAS,EAAE,MAAM,CAAC;QAClB,KAAK,CAAC,EAAE,CAAC,MAAM,EAAE;YAAC,IAAI,EAAE,MAAM,CAAA;SAAC,KAAK,GAAG,CAAC;KACzC,CAAC;CACH,CAAC;AAEF;;;GAGG;AACH,qBAAa,QAAS,SAAQ,IAAI;IAChC,QAAQ,CAAC,IAAI,iBAAiB;IAE9B,OAAO,EAAE,iBAAiB,CAAC;IAE3B,OAAO,CAAC,UAAU,CAAC;IAEnB,OAAO,CAAC,KAAK,CAAC;gBAEF,OAAO,EAAE,iBAAiB;IAQtC;;;OAGG;IACG,IAAI,CAAC,KAAK,EAAE,WAAW,EAAE,QAAQ,EAAE,KAAK,GAAG,QAAQ,GAAG,OAAO,CAAC,MAAM,CAAC;IAepE,WAAW,CAChB,aAAa,EAAE,aAAa,CAAC,WAAW,CAAC,GAAG,QAAQ,CAAC,WAAW,CAAC,EACjE,QAAQ,GAAE,KAAK,GAAG,QAAmB,GACpC,aAAa,CAAC,WAAW,CAAC;CAgB9B"}
@@ -1,3 +1,6 @@
1
+ // loaders.gl
2
+ // SPDX-License-Identifier: MIT
3
+ // Copyright vis.gl contributors
1
4
  // This dependency is too big, application must provide it
2
5
  import { Hash } from '@loaders.gl/crypto';
3
6
  import * as crypto from 'crypto'; // Node.js builtin
@@ -1 +1 @@
1
- {"version":3,"file":"decode-data-uri.d.ts","sourceRoot":"","sources":["../../src/fetch/decode-data-uri.ts"],"names":[],"mappings":"AAKA;;;;;GAKG;AACH,wBAAgB,aAAa,CAAC,GAAG,EAAE,MAAM,GAAG;IAAC,WAAW,EAAE,WAAW,CAAC;IAAC,QAAQ,EAAE,MAAM,CAAA;CAAC,CAoBvF;AAED;;;GAGG;AACH,wBAAgB,aAAa,CAAC,IAAI,EAAE,OAAO,GAAG,WAAW,CA+BxD"}
1
+ {"version":3,"file":"decode-data-uri.d.ts","sourceRoot":"","sources":["../../src/fetch/decode-data-uri.ts"],"names":[],"mappings":"AASA;;;;;GAKG;AACH,wBAAgB,aAAa,CAAC,GAAG,EAAE,MAAM,GAAG;IAAC,WAAW,EAAE,WAAW,CAAC;IAAC,QAAQ,EAAE,MAAM,CAAA;CAAC,CAoBvF;AAED;;;GAGG;AACH,wBAAgB,aAAa,CAAC,IAAI,EAAE,OAAO,GAAG,WAAW,CA+BxD"}
@@ -1,3 +1,6 @@
1
+ // loaders.gl
2
+ // SPDX-License-Identifier: MIT
3
+ // Copyright vis.gl contributors
1
4
  // Based on binary-gltf-utils under MIT license: Copyright (c) 2016-17 Karl Cheng
2
5
  const isArrayBuffer = (x) => x && x instanceof ArrayBuffer;
3
6
  const isBuffer = (x) => x && x instanceof Buffer;
@@ -1 +1 @@
1
- {"version":3,"file":"decode-data-uri.node.d.ts","sourceRoot":"","sources":["../../../src/fetch/utils/decode-data-uri.node.ts"],"names":[],"mappings":"AAKA;;;;;GAKG;AACH,wBAAgB,aAAa,CAAC,GAAG,EAAE,MAAM,GAAG;IAAC,WAAW,EAAE,WAAW,CAAC;IAAC,QAAQ,EAAE,MAAM,CAAA;CAAC,CAoBvF;AAED;;;GAGG;AACH,wBAAgB,aAAa,CAAC,IAAI,EAAE,OAAO,GAAG,WAAW,CA+BxD"}
1
+ {"version":3,"file":"decode-data-uri.node.d.ts","sourceRoot":"","sources":["../../../src/fetch/utils/decode-data-uri.node.ts"],"names":[],"mappings":"AASA;;;;;GAKG;AACH,wBAAgB,aAAa,CAAC,GAAG,EAAE,MAAM,GAAG;IAAC,WAAW,EAAE,WAAW,CAAC;IAAC,QAAQ,EAAE,MAAM,CAAA;CAAC,CAoBvF;AAED;;;GAGG;AACH,wBAAgB,aAAa,CAAC,IAAI,EAAE,OAAO,GAAG,WAAW,CA+BxD"}
@@ -1,3 +1,6 @@
1
+ // loaders.gl
2
+ // SPDX-License-Identifier: MIT
3
+ // Copyright vis.gl contributors
1
4
  // Based on binary-gltf-utils under MIT license: Copyright (c) 2016-17 Karl Cheng
2
5
  const isArrayBuffer = (x) => x && x instanceof ArrayBuffer;
3
6
  const isBuffer = (x) => x && x instanceof Buffer;
@@ -1 +1 @@
1
- {"version":3,"file":"blob-stream-controller.d.ts","sourceRoot":"","sources":["../../src/file/blob-stream-controller.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,qBAAa,oBAAoB;IAC/B,OAAO,CAAC,MAAM,CAAuB;IACrC,OAAO,CAAC,SAAS,CAAkB;IACnC,OAAO,CAAC,WAAW,CAAkB;IAErC;;OAEG;gBACS,MAAM,EAAE,QAAQ,CAAC,UAAU,CAAC;IAIxC;;OAEG;IACH,KAAK,CAAC,UAAU,EAAE,+BAA+B;IAIjD;;;OAGG;IACG,IAAI,CAAC,UAAU,EAAE,+BAA+B;IAyBtD;;;OAGG;IACH,IAAI,CAAC,UAAU,KAAA;IAKf,MAAM;CAGP"}
1
+ {"version":3,"file":"blob-stream-controller.d.ts","sourceRoot":"","sources":["../../src/file/blob-stream-controller.ts"],"names":[],"mappings":"AAIA;;;GAGG;AACH,qBAAa,oBAAoB;IAC/B,OAAO,CAAC,MAAM,CAAuB;IACrC,OAAO,CAAC,SAAS,CAAkB;IACnC,OAAO,CAAC,WAAW,CAAkB;IAErC;;OAEG;gBACS,MAAM,EAAE,QAAQ,CAAC,UAAU,CAAC;IAIxC;;OAEG;IACH,KAAK,CAAC,UAAU,EAAE,+BAA+B;IAIjD;;;OAGG;IACG,IAAI,CAAC,UAAU,EAAE,+BAA+B;IAyBtD;;;OAGG;IACH,IAAI,CAAC,UAAU,KAAA;IAKf,MAAM;CAGP"}
@@ -1,3 +1,6 @@
1
+ // loaders.gl
2
+ // SPDX-License-Identifier: MIT
3
+ // Copyright vis.gl contributors
1
4
  /**
2
5
  * Forked from @gozala's web-blob under MIT license
3
6
  * @see https://github.com/Gozala/web-blob
@@ -1 +1 @@
1
- {"version":3,"file":"blob-stream.d.ts","sourceRoot":"","sources":["../../src/file/blob-stream.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,OAAO,EAAC,sBAAsB,EAAC,6BAA0B;AAGzD;;;;;GAKG;AAEH,qBAAa,UAAU,CAAC,CAAC,CAAE,SAAQ,sBAAsB,CAAC,CAAC,CAAC;IAC1D,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAe;IACvC;;OAEG;gBACS,MAAM,KAAA;IAOlB;;OAEG;IAEI,CAAC,MAAM,CAAC,aAAa,CAAC,CAAC,QAAQ,CAAC,EAAE;QAAC,aAAa,CAAC,EAAE,OAAO,CAAA;KAAC,GAAG,aAAa,CAAC,UAAU,CAAC;CAK/F"}
1
+ {"version":3,"file":"blob-stream.d.ts","sourceRoot":"","sources":["../../src/file/blob-stream.ts"],"names":[],"mappings":"AAIA;;;GAGG;AACH,OAAO,EAAC,sBAAsB,EAAC,6BAA0B;AAGzD;;;;;GAKG;AAEH,qBAAa,UAAU,CAAC,CAAC,CAAE,SAAQ,sBAAsB,CAAC,CAAC,CAAC;IAC1D,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAe;IACvC;;OAEG;gBACS,MAAM,KAAA;IAOlB;;OAEG;IAEI,CAAC,MAAM,CAAC,aAAa,CAAC,CAAC,QAAQ,CAAC,EAAE;QAAC,aAAa,CAAC,EAAE,OAAO,CAAA;KAAC,GAAG,aAAa,CAAC,UAAU,CAAC;CAK/F"}
@@ -1,3 +1,6 @@
1
+ // loaders.gl
2
+ // SPDX-License-Identifier: MIT
3
+ // Copyright vis.gl contributors
1
4
  /**
2
5
  * Forked from @gozala's web-blob under MIT license
3
6
  * @see https://github.com/Gozala/web-blob
@@ -1 +1 @@
1
- {"version":3,"file":"blob.d.ts","sourceRoot":"","sources":["../../src/file/blob.ts"],"names":[],"mappings":"AACA,OAAO,EAAC,UAAU,EAAC,yBAAsB;AAEzC;;;GAGG;AACH,qBAAa,YAAY;IAEvB,4FAA4F;IAC5F,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,oEAAoE;IACpE,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,CAAC,KAAK,CAAe;IAC5B;;;OAGG;gBACS,IAAI,GAAE,QAAQ,EAAO,EAAE,OAAO,GAAE,eAAoB;IAmChE;;;;;;;;;;;;;;;;;;;OAmBG;IACH,KAAK,CAAC,KAAK,GAAE,MAAU,EAAE,GAAG,GAAE,MAAkB,EAAE,IAAI,GAAE,MAAW,GAAG,IAAI;IAyC1E;;;OAGG;IAEG,WAAW,IAAI,OAAO,CAAC,WAAW,CAAC;IAIzC;;;OAGG;IAEG,IAAI,IAAI,OAAO,CAAC,MAAM,CAAC;IAS7B;OACG;IAEH,MAAM,IAAI,UAAU,CAAC,GAAG,CAAC;IAIzB;;OAEG;IACH,QAAQ;IAIR,IAAI,CAAC,MAAM,CAAC,WAAW,CAAC,WAEvB;IAED,cAAc,IAAI,WAAW;CAU9B"}
1
+ {"version":3,"file":"blob.d.ts","sourceRoot":"","sources":["../../src/file/blob.ts"],"names":[],"mappings":"AAKA,OAAO,EAAC,UAAU,EAAC,yBAAsB;AAEzC;;;GAGG;AACH,qBAAa,YAAY;IAEvB,4FAA4F;IAC5F,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,oEAAoE;IACpE,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,CAAC,KAAK,CAAe;IAC5B;;;OAGG;gBACS,IAAI,GAAE,QAAQ,EAAO,EAAE,OAAO,GAAE,eAAoB;IAmChE;;;;;;;;;;;;;;;;;;;OAmBG;IACH,KAAK,CAAC,KAAK,GAAE,MAAU,EAAE,GAAG,GAAE,MAAkB,EAAE,IAAI,GAAE,MAAW,GAAG,IAAI;IAyC1E;;;OAGG;IAEG,WAAW,IAAI,OAAO,CAAC,WAAW,CAAC;IAIzC;;;OAGG;IAEG,IAAI,IAAI,OAAO,CAAC,MAAM,CAAC;IAS7B;OACG;IAEH,MAAM,IAAI,UAAU,CAAC,GAAG,CAAC;IAIzB;;OAEG;IACH,QAAQ;IAIR,IAAI,CAAC,MAAM,CAAC,WAAW,CAAC,WAEvB;IAED,cAAc,IAAI,WAAW;CAU9B"}
package/dist/file/blob.js CHANGED
@@ -1,3 +1,6 @@
1
+ // loaders.gl
2
+ // SPDX-License-Identifier: MIT
3
+ // Copyright vis.gl contributors
1
4
  // Forked from @gozala's web-blob under MIT license https://github.com/Gozala/web-blob
2
5
  import { BlobStream } from "./blob-stream.js";
3
6
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"file-reader.d.ts","sourceRoot":"","sources":["../../src/file/file-reader.ts"],"names":[],"mappings":"AAEA,qBAAa,kBAAmB,YAAW,UAAU;IAEnD,MAAM,MAAC;IACP,OAAO,MAAC;IACR,OAAO,MAAC;IACR,KAAK,MAAC;IACN,WAAW,MAAC;IACZ,SAAS,MAAC;IACV,UAAU,MAAC;IAEX,UAAU,MAAC;IACX,MAAM,MAAC;IACP,IAAI,MAAC;IACL,KAAK,MAAC;IACN,OAAO,MAAC;IACR,gBAAgB,MAAC;IACjB,mBAAmB,MAAC;IACpB,aAAa,MAAC;;IAMd,KAAK,IAAI,IAAI;IAIP,iBAAiB,CAAC,IAAI,EAAE,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC;IAO5C,kBAAkB,CAAC,IAAI,KAAA;IAIvB,aAAa,CAAC,IAAI,KAAA;IAQlB,UAAU,CAAC,IAAI,KAAA;CAMtB"}
1
+ {"version":3,"file":"file-reader.d.ts","sourceRoot":"","sources":["../../src/file/file-reader.ts"],"names":[],"mappings":"AAMA,qBAAa,kBAAmB,YAAW,UAAU;IAEnD,MAAM,MAAC;IACP,OAAO,MAAC;IACR,OAAO,MAAC;IACR,KAAK,MAAC;IACN,WAAW,MAAC;IACZ,SAAS,MAAC;IACV,UAAU,MAAC;IAEX,UAAU,MAAC;IACX,MAAM,MAAC;IACP,IAAI,MAAC;IACL,KAAK,MAAC;IACN,OAAO,MAAC;IACR,gBAAgB,MAAC;IACjB,mBAAmB,MAAC;IACpB,aAAa,MAAC;;IAMd,KAAK,IAAI,IAAI;IAIP,iBAAiB,CAAC,IAAI,EAAE,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC;IAO5C,kBAAkB,CAAC,IAAI,KAAA;IAIvB,aAAa,CAAC,IAAI,KAAA;IAQlB,UAAU,CAAC,IAAI,KAAA;CAMtB"}
@@ -1,3 +1,6 @@
1
+ // loaders.gl
2
+ // SPDX-License-Identifier: MIT
3
+ // Copyright vis.gl contributors
1
4
  import { atob } from "../buffer/btoa.node.js";
2
5
  export class FileReaderPolyfill {
3
6
  // onload: ({result: any}) => void;
@@ -1 +1 @@
1
- {"version":3,"file":"file.d.ts","sourceRoot":"","sources":["../../src/file/file.ts"],"names":[],"mappings":"AAEA;;;GAGG;AAEH,qBAAa,YAAa,SAAQ,UAAU,CAAC,IAAI;IAG/C,0DAA0D;IAC1D,IAAI,EAAE,MAAM,CAAM;IAClB,mDAAmD;IACnD,kBAAkB,EAAE,MAAM,CAAM;IAEhC;;;OAGG;IACH,YAAY,EAAE,MAAM,CAAC;IAErB;;;;;OAKG;gBACS,IAAI,EAAE,QAAQ,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,GAAE,eAAoB;IAUzE,IAAI,CAAC,MAAM,CAAC,WAAW,CAAC,WAEvB;CACF"}
1
+ {"version":3,"file":"file.d.ts","sourceRoot":"","sources":["../../src/file/file.ts"],"names":[],"mappings":"AAMA;;;GAGG;AAEH,qBAAa,YAAa,SAAQ,UAAU,CAAC,IAAI;IAG/C,0DAA0D;IAC1D,IAAI,EAAE,MAAM,CAAM;IAClB,mDAAmD;IACnD,kBAAkB,EAAE,MAAM,CAAM;IAEhC;;;OAGG;IACH,YAAY,EAAE,MAAM,CAAC;IAErB;;;;;OAKG;gBACS,IAAI,EAAE,QAAQ,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,GAAE,eAAoB;IAUzE,IAAI,CAAC,MAAM,CAAC,WAAW,CAAC,WAEvB;CACF"}
package/dist/file/file.js CHANGED
@@ -1,3 +1,6 @@
1
+ // loaders.gl
2
+ // SPDX-License-Identifier: MIT
3
+ // Copyright vis.gl contributors
1
4
  // Forked from @gozala's web-file under MIT license https://github.com/Gozala/web-file
2
5
  /**
3
6
  * Forked from @gozala's web-file under MIT license
@@ -1 +1 @@
1
- {"version":3,"file":"install-blob-polyfills.d.ts","sourceRoot":"","sources":["../../src/file/install-blob-polyfills.ts"],"names":[],"mappings":"AAGA,wBAAgB,mBAAmB;;;EAOlC;AAED,eAAO,MAAM,KAAK;;;CAAwB,CAAC"}
1
+ {"version":3,"file":"install-blob-polyfills.d.ts","sourceRoot":"","sources":["../../src/file/install-blob-polyfills.ts"],"names":[],"mappings":"AAOA,wBAAgB,mBAAmB;;;EAOlC;AAED,eAAO,MAAM,KAAK;;;CAAwB,CAAC"}
@@ -1,3 +1,6 @@
1
+ // loaders.gl
2
+ // SPDX-License-Identifier: MIT
3
+ // Copyright vis.gl contributors
1
4
  // import {ReadableStreamPolyfill} from './readable-stream';
2
5
  import { BlobPolyfill } from "./blob.js";
3
6
  export function instalBlobPolyfills() {
@@ -1 +1 @@
1
- {"version":3,"file":"install-file-polyfills.d.ts","sourceRoot":"","sources":["../../src/file/install-file-polyfills.ts"],"names":[],"mappings":";AAIA,wBAAgB,oBAAoB,kBAanC;AAED,eAAO,MAAM,KAAK,eAAyB,CAAC"}
1
+ {"version":3,"file":"install-file-polyfills.d.ts","sourceRoot":"","sources":["../../src/file/install-file-polyfills.ts"],"names":[],"mappings":";AAQA,wBAAgB,oBAAoB,kBAanC;AAED,eAAO,MAAM,KAAK,eAAyB,CAAC"}
@@ -1,3 +1,6 @@
1
+ // loaders.gl
2
+ // SPDX-License-Identifier: MIT
3
+ // Copyright vis.gl contributors
1
4
  // import {ReadableStreamPolyfill} from './readable-stream';
2
5
  import { FileReaderPolyfill } from "./file-reader.js";
3
6
  import { FilePolyfill } from "./file.js";
@@ -1 +1 @@
1
- {"version":3,"file":"readable-stream.d.ts","sourceRoot":"","sources":["../../src/file/readable-stream.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,cAAc,IAAI,iBAAiB,EAAC,MAAM,sBAAsB,CAAC;AAOzE,qBAAa,sBAAsB,CAAC,CAAC,CAAE,SAAQ,iBAAiB,CAAC,CAAC,CAAE,YAAW,cAAc;CAAG"}
1
+ {"version":3,"file":"readable-stream.d.ts","sourceRoot":"","sources":["../../src/file/readable-stream.ts"],"names":[],"mappings":"AAIA,OAAO,EAAC,cAAc,IAAI,iBAAiB,EAAC,MAAM,sBAAsB,CAAC;AAGzE,qBAAa,sBAAsB,CAAC,CAAC,CAAE,SAAQ,iBAAiB,CAAC,CAAC,CAAE,YAAW,cAAc;CAAG"}
@@ -1,7 +1,7 @@
1
+ // loaders.gl
2
+ // SPDX-License-Identifier: MIT
3
+ // Copyright vis.gl contributors
1
4
  import { ReadableStream as WSPReadableStream } from 'web-streams-polyfill';
2
- // Want a polyfill, but please don't install it
3
- // @ts-ignore
4
- delete globalThis.ReadableStream;
5
5
  // @ts-ignore
6
6
  export class ReadableStreamPolyfill extends WSPReadableStream {
7
7
  }
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAqBA,eAAO,MAAM,WAAW,QAAwC,CAAC;AAMjE,OAAO,EAAC,KAAK,IAAI,IAAI,EAAC,yCAAsC;AAC5D,OAAO,EAAC,KAAK,IAAI,IAAI,EAAC,yCAAsC;AAY5D,OAAO,EAAC,cAAc,EAAC,sCAAmC;AA8D1D,OAAO,EAAC,oBAAoB,EAAC,yCAAsC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAqBA,eAAO,MAAM,WAAW,QAAwC,CAAC;AAMjE,OAAO,EAAC,KAAK,IAAI,IAAI,EAAC,yCAAsC;AAC5D,OAAO,EAAC,KAAK,IAAI,IAAI,EAAC,yCAAsC;AAY5D,OAAO,EAAC,cAAc,EAAC,sCAAmC;AAkE1D,OAAO,EAAC,oBAAoB,EAAC,yCAAsC"}
package/dist/index.js CHANGED
@@ -44,6 +44,9 @@ if (!globalThis.TextDecoder) {
44
44
  // @ts-expect-error
45
45
  globalThis.TextDecoder = TextDecoder;
46
46
  }
47
+ if (!globalThis.ReadableStream) {
48
+ globalThis.ReadableStream = ReadableStream;
49
+ }
47
50
  // POLYFILLS: btoa, atob
48
51
  // - Node: Yes
49
52
  // - Browser: No
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@loaders.gl/polyfills",
3
- "version": "4.3.0-alpha.2",
3
+ "version": "4.3.0-alpha.4",
4
4
  "description": "Polyfills for TextEncoder/TextDecoder",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -45,18 +45,18 @@
45
45
  "build-bundle-dev": "# ocular-bundle ./bundle.ts --env=dev --output=dist/dist.dev.js"
46
46
  },
47
47
  "dependencies": {
48
- "@loaders.gl/crypto": "4.3.0-alpha.2",
49
- "@loaders.gl/loader-utils": "4.3.0-alpha.2",
48
+ "@loaders.gl/crypto": "4.3.0-alpha.4",
49
+ "@loaders.gl/loader-utils": "4.3.0-alpha.4",
50
50
  "buffer": "^6.0.3",
51
51
  "get-pixels": "^3.3.3",
52
52
  "ndarray": "^1.0.19",
53
53
  "save-pixels": "^2.3.6",
54
54
  "stream-to-async-iterator": "^1.0.0",
55
55
  "through": "^2.3.8",
56
- "web-streams-polyfill": "^3.2.1"
56
+ "web-streams-polyfill": "^4.0.0"
57
57
  },
58
58
  "peerDependencies": {
59
59
  "@loaders.gl/core": "^4.0.0"
60
60
  },
61
- "gitHead": "77a3cb538ab7a1fbf74245f25590210451689f5c"
61
+ "gitHead": "4900ac4c4de20366c050b80cef04dc5b52d167af"
62
62
  }
@@ -1,3 +1,7 @@
1
+ // loaders.gl
2
+ // SPDX-License-Identifier: MIT
3
+ // Copyright vis.gl contributors
4
+
1
5
  // This dependency is too big, application must provide it
2
6
  import {Hash} from '@loaders.gl/crypto';
3
7
  import * as crypto from 'crypto'; // Node.js builtin
@@ -1,3 +1,7 @@
1
+ // loaders.gl
2
+ // SPDX-License-Identifier: MIT
3
+ // Copyright vis.gl contributors
4
+
1
5
  // Based on binary-gltf-utils under MIT license: Copyright (c) 2016-17 Karl Cheng
2
6
 
3
7
  const isArrayBuffer = (x) => x && x instanceof ArrayBuffer;
@@ -1,3 +1,7 @@
1
+ // loaders.gl
2
+ // SPDX-License-Identifier: MIT
3
+ // Copyright vis.gl contributors
4
+
1
5
  // Based on binary-gltf-utils under MIT license: Copyright (c) 2016-17 Karl Cheng
2
6
 
3
7
  const isArrayBuffer = (x) => x && x instanceof ArrayBuffer;
@@ -1,3 +1,7 @@
1
+ // loaders.gl
2
+ // SPDX-License-Identifier: MIT
3
+ // Copyright vis.gl contributors
4
+
1
5
  /**
2
6
  * Forked from @gozala's web-blob under MIT license
3
7
  * @see https://github.com/Gozala/web-blob
@@ -1,3 +1,7 @@
1
+ // loaders.gl
2
+ // SPDX-License-Identifier: MIT
3
+ // Copyright vis.gl contributors
4
+
1
5
  /**
2
6
  * Forked from @gozala's web-blob under MIT license
3
7
  * @see https://github.com/Gozala/web-blob
package/src/file/blob.ts CHANGED
@@ -1,3 +1,7 @@
1
+ // loaders.gl
2
+ // SPDX-License-Identifier: MIT
3
+ // Copyright vis.gl contributors
4
+
1
5
  // Forked from @gozala's web-blob under MIT license https://github.com/Gozala/web-blob
2
6
  import {BlobStream} from './blob-stream';
3
7
 
@@ -1,3 +1,7 @@
1
+ // loaders.gl
2
+ // SPDX-License-Identifier: MIT
3
+ // Copyright vis.gl contributors
4
+
1
5
  import {atob} from '../buffer/btoa.node';
2
6
 
3
7
  export class FileReaderPolyfill implements FileReader {
package/src/file/file.ts CHANGED
@@ -1,3 +1,7 @@
1
+ // loaders.gl
2
+ // SPDX-License-Identifier: MIT
3
+ // Copyright vis.gl contributors
4
+
1
5
  // Forked from @gozala's web-file under MIT license https://github.com/Gozala/web-file
2
6
 
3
7
  /**
@@ -1,3 +1,7 @@
1
+ // loaders.gl
2
+ // SPDX-License-Identifier: MIT
3
+ // Copyright vis.gl contributors
4
+
1
5
  // import {ReadableStreamPolyfill} from './readable-stream';
2
6
  import {BlobPolyfill} from './blob';
3
7
 
@@ -1,3 +1,7 @@
1
+ // loaders.gl
2
+ // SPDX-License-Identifier: MIT
3
+ // Copyright vis.gl contributors
4
+
1
5
  // import {ReadableStreamPolyfill} from './readable-stream';
2
6
  import {FileReaderPolyfill} from './file-reader';
3
7
  import {FilePolyfill} from './file';
@@ -1,8 +1,8 @@
1
- import {ReadableStream as WSPReadableStream} from 'web-streams-polyfill';
1
+ // loaders.gl
2
+ // SPDX-License-Identifier: MIT
3
+ // Copyright vis.gl contributors
2
4
 
3
- // Want a polyfill, but please don't install it
4
- // @ts-ignore
5
- delete globalThis.ReadableStream;
5
+ import {ReadableStream as WSPReadableStream} from 'web-streams-polyfill';
6
6
 
7
7
  // @ts-ignore
8
8
  export class ReadableStreamPolyfill<T> extends WSPReadableStream<T> implements ReadableStream {}
package/src/index.ts CHANGED
@@ -63,6 +63,10 @@ if (!globalThis.TextDecoder) {
63
63
  globalThis.TextDecoder = TextDecoder;
64
64
  }
65
65
 
66
+ if (!globalThis.ReadableStream) {
67
+ globalThis.ReadableStream = ReadableStream;
68
+ }
69
+
66
70
  // POLYFILLS: btoa, atob
67
71
  // - Node: Yes
68
72
  // - Browser: No