@firebase/storage 0.9.13 → 0.9.14-canary.a9add5e44
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.browser.cjs.js +10 -1
- package/dist/index.browser.cjs.js.map +1 -1
- package/dist/index.esm2017.js +10 -1
- package/dist/index.esm2017.js.map +1 -1
- package/dist/index.esm5.js +10 -1
- package/dist/index.esm5.js.map +1 -1
- package/dist/index.node.cjs.js +4 -1
- package/dist/index.node.cjs.js.map +1 -1
- package/dist/node-esm/index.node.esm.js +4 -1
- package/dist/node-esm/index.node.esm.js.map +1 -1
- package/dist/node-esm/src/implementation/error.d.ts +1 -0
- package/dist/node-esm/test/browser/string.browser.test.d.ts +17 -0
- package/dist/src/implementation/error.d.ts +1 -0
- package/dist/test/browser/string.browser.test.d.ts +17 -0
- package/package.json +6 -6
package/dist/index.esm2017.js
CHANGED
|
@@ -168,6 +168,9 @@ function serverFileWrongSize() {
|
|
|
168
168
|
function noDownloadURL() {
|
|
169
169
|
return new StorageError("no-download-url" /* NO_DOWNLOAD_URL */, 'The given file does not have any download URLs.');
|
|
170
170
|
}
|
|
171
|
+
function missingPolyFill(polyFill) {
|
|
172
|
+
return new StorageError("unsupported-environment" /* UNSUPPORTED_ENVIRONMENT */, `${polyFill} is missing. Make sure to install the required polyfills. See https://firebase.google.com/docs/web/environments-js-sdk#polyfills for more information.`);
|
|
173
|
+
}
|
|
171
174
|
/**
|
|
172
175
|
* @internal
|
|
173
176
|
*/
|
|
@@ -904,6 +907,9 @@ function sliceBlob(blob, start, end) {
|
|
|
904
907
|
*/
|
|
905
908
|
/** Converts a Base64 encoded string to a binary string. */
|
|
906
909
|
function decodeBase64(encoded) {
|
|
910
|
+
if (typeof atob === 'undefined') {
|
|
911
|
+
throw missingPolyFill('base-64');
|
|
912
|
+
}
|
|
907
913
|
return atob(encoded);
|
|
908
914
|
}
|
|
909
915
|
|
|
@@ -1064,6 +1070,9 @@ function base64Bytes_(format, value) {
|
|
|
1064
1070
|
bytes = decodeBase64(value);
|
|
1065
1071
|
}
|
|
1066
1072
|
catch (e) {
|
|
1073
|
+
if (e.message.includes('polyfill')) {
|
|
1074
|
+
throw e;
|
|
1075
|
+
}
|
|
1067
1076
|
throw invalidFormat(format, 'Invalid character found');
|
|
1068
1077
|
}
|
|
1069
1078
|
const array = new Uint8Array(bytes.length);
|
|
@@ -3305,7 +3314,7 @@ class FirebaseStorageImpl {
|
|
|
3305
3314
|
}
|
|
3306
3315
|
|
|
3307
3316
|
const name = "@firebase/storage";
|
|
3308
|
-
const version = "0.9.
|
|
3317
|
+
const version = "0.9.14-canary.a9add5e44";
|
|
3309
3318
|
|
|
3310
3319
|
/**
|
|
3311
3320
|
* @license
|