@firebase/storage 0.7.0 → 0.7.1-2022028193537
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/compat/cjs/compat/reference.d.ts +4 -4
- package/dist/compat/cjs/exp/api.d.ts +26 -25
- package/dist/compat/cjs/exp/public-types.d.ts +1 -1
- package/dist/compat/cjs/index.js +4 -4
- package/dist/compat/cjs/index.js.map +1 -1
- package/dist/compat/cjs/src/reference.d.ts +4 -4
- package/dist/compat/esm2017/compat/reference.d.ts +4 -4
- package/dist/compat/esm2017/exp/api.d.ts +26 -25
- package/dist/compat/esm2017/exp/public-types.d.ts +1 -1
- package/dist/compat/esm2017/index.js +4 -4
- package/dist/compat/esm2017/index.js.map +1 -1
- package/dist/compat/esm2017/src/reference.d.ts +4 -4
- package/dist/compat/esm5/compat/reference.d.ts +4 -4
- package/dist/compat/esm5/exp/api.d.ts +26 -25
- package/dist/compat/esm5/exp/public-types.d.ts +1 -1
- package/dist/compat/esm5/index.js +4 -4
- package/dist/compat/esm5/index.js.map +1 -1
- package/dist/compat/esm5/src/reference.d.ts +4 -4
- package/dist/compat/reference.d.ts +4 -4
- package/dist/exp/api.d.ts +26 -25
- package/dist/exp/public-types.d.ts +1 -1
- package/dist/index.browser.cjs.js +26 -25
- package/dist/index.browser.cjs.js.map +1 -1
- package/dist/index.browser.esm.js +26 -25
- package/dist/index.browser.esm.js.map +1 -1
- package/dist/index.browser.esm2017.js +26 -25
- package/dist/index.browser.esm2017.js.map +1 -1
- package/dist/index.node.cjs.js +26 -25
- package/dist/index.node.cjs.js.map +1 -1
- package/dist/src/reference.d.ts +4 -4
- package/exp/dist/compat/reference.d.ts +4 -4
- package/exp/dist/exp/api.d.ts +26 -25
- package/exp/dist/exp/public-types.d.ts +1 -1
- package/exp/dist/index.browser.esm2017.js +25 -24
- package/exp/dist/index.browser.esm2017.js.map +1 -1
- package/exp/dist/index.browser.esm5.js +25 -24
- package/exp/dist/index.browser.esm5.js.map +1 -1
- package/exp/dist/index.node.cjs.js +25 -24
- package/exp/dist/index.node.cjs.js.map +1 -1
- package/exp/dist/src/reference.d.ts +4 -4
- package/exp/dist/storage-public.d.ts +27 -26
- package/exp/dist/storage.d.ts +27 -26
- package/package.json +2 -2
package/dist/src/reference.d.ts
CHANGED
|
@@ -151,7 +151,7 @@ export declare function listAll(ref: Reference): Promise<ListResult>;
|
|
|
151
151
|
*/
|
|
152
152
|
export declare function list(ref: Reference, options?: ListOptions | null): Promise<ListResult>;
|
|
153
153
|
/**
|
|
154
|
-
* A
|
|
154
|
+
* A `Promise` that resolves with the metadata for this object. If this
|
|
155
155
|
* object doesn't exist or metadata cannot be retreived, the promise is
|
|
156
156
|
* rejected.
|
|
157
157
|
* @public
|
|
@@ -165,7 +165,7 @@ export declare function getMetadata(ref: Reference): Promise<Metadata>;
|
|
|
165
165
|
* @param metadata - The new metadata for the object.
|
|
166
166
|
* Only values that have been explicitly set will be changed. Explicitly
|
|
167
167
|
* setting a value to null will remove the metadata.
|
|
168
|
-
* @returns A
|
|
168
|
+
* @returns A `Promise` that resolves
|
|
169
169
|
* with the new metadata for this object.
|
|
170
170
|
* See `firebaseStorage.Reference.prototype.getMetadata`
|
|
171
171
|
*/
|
|
@@ -173,7 +173,7 @@ export declare function updateMetadata(ref: Reference, metadata: Partial<Metadat
|
|
|
173
173
|
/**
|
|
174
174
|
* Returns the download URL for the given Reference.
|
|
175
175
|
* @public
|
|
176
|
-
* @returns A
|
|
176
|
+
* @returns A `Promise` that resolves with the download
|
|
177
177
|
* URL for this object.
|
|
178
178
|
*/
|
|
179
179
|
export declare function getDownloadURL(ref: Reference): Promise<string>;
|
|
@@ -181,7 +181,7 @@ export declare function getDownloadURL(ref: Reference): Promise<string>;
|
|
|
181
181
|
* Deletes the object at this location.
|
|
182
182
|
* @public
|
|
183
183
|
* @param ref - StorageReference for object to delete.
|
|
184
|
-
* @returns A
|
|
184
|
+
* @returns A `Promise` that resolves if the deletion succeeds.
|
|
185
185
|
*/
|
|
186
186
|
export declare function deleteObject(ref: Reference): Promise<void>;
|
|
187
187
|
/**
|
|
@@ -93,7 +93,7 @@ export declare class ReferenceCompat implements types.Reference, Compat<StorageR
|
|
|
93
93
|
*/
|
|
94
94
|
list(options?: types.ListOptions | null): Promise<types.ListResult>;
|
|
95
95
|
/**
|
|
96
|
-
* A
|
|
96
|
+
* A `Promise` that resolves with the metadata for this object. If this
|
|
97
97
|
* object doesn't exist or metadata cannot be retreived, the promise is
|
|
98
98
|
* rejected.
|
|
99
99
|
*/
|
|
@@ -103,19 +103,19 @@ export declare class ReferenceCompat implements types.Reference, Compat<StorageR
|
|
|
103
103
|
* @param metadata - The new metadata for the object.
|
|
104
104
|
* Only values that have been explicitly set will be changed. Explicitly
|
|
105
105
|
* setting a value to null will remove the metadata.
|
|
106
|
-
* @returns A
|
|
106
|
+
* @returns A `Promise` that resolves
|
|
107
107
|
* with the new metadata for this object.
|
|
108
108
|
* @see firebaseStorage.Reference.prototype.getMetadata
|
|
109
109
|
*/
|
|
110
110
|
updateMetadata(metadata: types.SettableMetadata): Promise<types.FullMetadata>;
|
|
111
111
|
/**
|
|
112
|
-
* @returns A
|
|
112
|
+
* @returns A `Promise` that resolves with the download
|
|
113
113
|
* URL for this object.
|
|
114
114
|
*/
|
|
115
115
|
getDownloadURL(): Promise<string>;
|
|
116
116
|
/**
|
|
117
117
|
* Deletes the object at this location.
|
|
118
|
-
* @returns A
|
|
118
|
+
* @returns A `Promise` that resolves if the deletion succeeds.
|
|
119
119
|
*/
|
|
120
120
|
delete(): Promise<void>;
|
|
121
121
|
private _throwIfRoot;
|
package/exp/dist/exp/api.d.ts
CHANGED
|
@@ -58,21 +58,21 @@ export declare function uploadString(ref: StorageReference, value: string, forma
|
|
|
58
58
|
*/
|
|
59
59
|
export declare function uploadBytesResumable(ref: StorageReference, data: Blob | Uint8Array | ArrayBuffer, metadata?: UploadMetadata): UploadTask;
|
|
60
60
|
/**
|
|
61
|
-
* A
|
|
61
|
+
* A `Promise` that resolves with the metadata for this object. If this
|
|
62
62
|
* object doesn't exist or metadata cannot be retreived, the promise is
|
|
63
63
|
* rejected.
|
|
64
64
|
* @public
|
|
65
|
-
* @param ref - StorageReference to get metadata from.
|
|
65
|
+
* @param ref - {@link StorageReference} to get metadata from.
|
|
66
66
|
*/
|
|
67
67
|
export declare function getMetadata(ref: StorageReference): Promise<FullMetadata>;
|
|
68
68
|
/**
|
|
69
69
|
* Updates the metadata for this object.
|
|
70
70
|
* @public
|
|
71
|
-
* @param ref - StorageReference to update metadata for.
|
|
71
|
+
* @param ref - {@link StorageReference} to update metadata for.
|
|
72
72
|
* @param metadata - The new metadata for the object.
|
|
73
73
|
* Only values that have been explicitly set will be changed. Explicitly
|
|
74
74
|
* setting a value to null will remove the metadata.
|
|
75
|
-
* @returns A
|
|
75
|
+
* @returns A `Promise` that resolves with the new metadata for this object.
|
|
76
76
|
*/
|
|
77
77
|
export declare function updateMetadata(ref: StorageReference, metadata: SettableMetadata): Promise<FullMetadata>;
|
|
78
78
|
/**
|
|
@@ -90,9 +90,9 @@ export declare function updateMetadata(ref: StorageReference, metadata: Settable
|
|
|
90
90
|
* list() may fail if there are too many unsupported objects in the bucket.
|
|
91
91
|
* @public
|
|
92
92
|
*
|
|
93
|
-
* @param ref - StorageReference to get list from.
|
|
94
|
-
* @param options - See ListOptions for details.
|
|
95
|
-
* @returns A Promise that resolves with the items and prefixes.
|
|
93
|
+
* @param ref - {@link StorageReference} to get list from.
|
|
94
|
+
* @param options - See {@link ListOptions} for details.
|
|
95
|
+
* @returns A `Promise` that resolves with the items and prefixes.
|
|
96
96
|
* `prefixes` contains references to sub-folders and `items`
|
|
97
97
|
* contains references to objects in this folder. `nextPageToken`
|
|
98
98
|
* can be used to get the rest of the results.
|
|
@@ -107,44 +107,45 @@ export declare function list(ref: StorageReference, options?: ListOptions): Prom
|
|
|
107
107
|
* Note: The results may not be consistent if objects are changed while this
|
|
108
108
|
* operation is running.
|
|
109
109
|
*
|
|
110
|
-
* Warning: listAll may potentially consume too many resources if there are
|
|
110
|
+
* Warning: `listAll` may potentially consume too many resources if there are
|
|
111
111
|
* too many results.
|
|
112
112
|
* @public
|
|
113
|
-
* @param ref - StorageReference to get list from.
|
|
113
|
+
* @param ref - {@link StorageReference} to get list from.
|
|
114
114
|
*
|
|
115
|
-
* @returns A Promise that resolves with all the items and prefixes under
|
|
115
|
+
* @returns A `Promise` that resolves with all the items and prefixes under
|
|
116
116
|
* the current storage reference. `prefixes` contains references to
|
|
117
117
|
* sub-directories and `items` contains references to objects in this
|
|
118
118
|
* folder. `nextPageToken` is never returned.
|
|
119
119
|
*/
|
|
120
120
|
export declare function listAll(ref: StorageReference): Promise<ListResult>;
|
|
121
121
|
/**
|
|
122
|
-
* Returns the download URL for the given
|
|
122
|
+
* Returns the download URL for the given {@link StorageReference}.
|
|
123
123
|
* @public
|
|
124
|
-
* @
|
|
124
|
+
* @param ref - {@link StorageReference} to get the download URL for.
|
|
125
|
+
* @returns A `Promise` that resolves with the download
|
|
125
126
|
* URL for this object.
|
|
126
127
|
*/
|
|
127
128
|
export declare function getDownloadURL(ref: StorageReference): Promise<string>;
|
|
128
129
|
/**
|
|
129
130
|
* Deletes the object at this location.
|
|
130
131
|
* @public
|
|
131
|
-
* @param ref - StorageReference for object to delete.
|
|
132
|
-
* @returns A
|
|
132
|
+
* @param ref - {@link StorageReference} for object to delete.
|
|
133
|
+
* @returns A `Promise` that resolves if the deletion succeeds.
|
|
133
134
|
*/
|
|
134
135
|
export declare function deleteObject(ref: StorageReference): Promise<void>;
|
|
135
136
|
/**
|
|
136
|
-
* Returns a StorageReference for the given url.
|
|
137
|
-
* @param storage -
|
|
137
|
+
* Returns a {@link StorageReference} for the given url.
|
|
138
|
+
* @param storage - {@link FirebaseStorage} instance.
|
|
138
139
|
* @param url - URL. If empty, returns root reference.
|
|
139
140
|
* @public
|
|
140
141
|
*/
|
|
141
142
|
export declare function ref(storage: FirebaseStorage, url?: string): StorageReference;
|
|
142
143
|
/**
|
|
143
|
-
* Returns a StorageReference for the given path in the
|
|
144
|
+
* Returns a {@link StorageReference} for the given path in the
|
|
144
145
|
* default bucket.
|
|
145
|
-
* @param storageOrRef -
|
|
146
|
-
* @param pathOrUrlStorage - path. If empty, returns root reference (if
|
|
147
|
-
* instance provided) or returns same reference (if
|
|
146
|
+
* @param storageOrRef - {@link FirebaseStorage} or {@link StorageReference}.
|
|
147
|
+
* @param pathOrUrlStorage - path. If empty, returns root reference (if {@link FirebaseStorage}
|
|
148
|
+
* instance provided) or returns same reference (if {@link StorageReference} provided).
|
|
148
149
|
* @public
|
|
149
150
|
*/
|
|
150
151
|
export declare function ref(storageOrRef: FirebaseStorage | StorageReference, path?: string): StorageReference;
|
|
@@ -154,18 +155,18 @@ export declare function ref(storageOrRef: FirebaseStorage | StorageReference, pa
|
|
|
154
155
|
export declare function _getChild(ref: StorageReference, childPath: string): Reference;
|
|
155
156
|
export { StringFormat } from '../src/implementation/string';
|
|
156
157
|
/**
|
|
157
|
-
* Gets a
|
|
158
|
+
* Gets a {@link FirebaseStorage} instance for the given Firebase app.
|
|
158
159
|
* @public
|
|
159
|
-
* @param app - Firebase app to get
|
|
160
|
+
* @param app - Firebase app to get {@link FirebaseStorage} instance for.
|
|
160
161
|
* @param bucketUrl - The gs:// url to your Firebase Storage Bucket.
|
|
161
162
|
* If not passed, uses the app's default Storage Bucket.
|
|
162
|
-
* @returns A
|
|
163
|
+
* @returns A {@link FirebaseStorage} instance.
|
|
163
164
|
*/
|
|
164
165
|
export declare function getStorage(app?: FirebaseApp, bucketUrl?: string): FirebaseStorage;
|
|
165
166
|
/**
|
|
166
|
-
* Modify this
|
|
167
|
+
* Modify this {@link FirebaseStorage} instance to communicate with the Cloud Storage emulator.
|
|
167
168
|
*
|
|
168
|
-
* @param storage - The
|
|
169
|
+
* @param storage - The {@link FirebaseStorage} instance
|
|
169
170
|
* @param host - The emulator host (ex: localhost)
|
|
170
171
|
* @param port - The emulator port (ex: 5001)
|
|
171
172
|
* @param options.mockUserToken - the mock auth token to use for unit testing Security Rules.
|
|
@@ -2828,7 +2828,7 @@ async function list$1(ref, options) {
|
|
|
2828
2828
|
return (await ref.storage.makeRequestWithTokens(requestInfo)).getPromise();
|
|
2829
2829
|
}
|
|
2830
2830
|
/**
|
|
2831
|
-
* A
|
|
2831
|
+
* A `Promise` that resolves with the metadata for this object. If this
|
|
2832
2832
|
* object doesn't exist or metadata cannot be retreived, the promise is
|
|
2833
2833
|
* rejected.
|
|
2834
2834
|
* @public
|
|
@@ -2846,7 +2846,7 @@ async function getMetadata$1(ref) {
|
|
|
2846
2846
|
* @param metadata - The new metadata for the object.
|
|
2847
2847
|
* Only values that have been explicitly set will be changed. Explicitly
|
|
2848
2848
|
* setting a value to null will remove the metadata.
|
|
2849
|
-
* @returns A
|
|
2849
|
+
* @returns A `Promise` that resolves
|
|
2850
2850
|
* with the new metadata for this object.
|
|
2851
2851
|
* See `firebaseStorage.Reference.prototype.getMetadata`
|
|
2852
2852
|
*/
|
|
@@ -2858,7 +2858,7 @@ async function updateMetadata$1(ref, metadata) {
|
|
|
2858
2858
|
/**
|
|
2859
2859
|
* Returns the download URL for the given Reference.
|
|
2860
2860
|
* @public
|
|
2861
|
-
* @returns A
|
|
2861
|
+
* @returns A `Promise` that resolves with the download
|
|
2862
2862
|
* URL for this object.
|
|
2863
2863
|
*/
|
|
2864
2864
|
async function getDownloadURL$1(ref) {
|
|
@@ -2877,7 +2877,7 @@ async function getDownloadURL$1(ref) {
|
|
|
2877
2877
|
* Deletes the object at this location.
|
|
2878
2878
|
* @public
|
|
2879
2879
|
* @param ref - StorageReference for object to delete.
|
|
2880
|
-
* @returns A
|
|
2880
|
+
* @returns A `Promise` that resolves if the deletion succeeds.
|
|
2881
2881
|
*/
|
|
2882
2882
|
async function deleteObject$1(ref) {
|
|
2883
2883
|
ref._throwIfRoot('deleteObject');
|
|
@@ -3139,7 +3139,7 @@ class FirebaseStorageImpl {
|
|
|
3139
3139
|
}
|
|
3140
3140
|
|
|
3141
3141
|
const name = "@firebase/storage";
|
|
3142
|
-
const version = "0.7.
|
|
3142
|
+
const version = "0.7.1-2022028193537";
|
|
3143
3143
|
|
|
3144
3144
|
/**
|
|
3145
3145
|
* @license
|
|
@@ -3219,11 +3219,11 @@ function uploadBytesResumable(ref, data, metadata) {
|
|
|
3219
3219
|
return uploadBytesResumable$1(ref, data, metadata);
|
|
3220
3220
|
}
|
|
3221
3221
|
/**
|
|
3222
|
-
* A
|
|
3222
|
+
* A `Promise` that resolves with the metadata for this object. If this
|
|
3223
3223
|
* object doesn't exist or metadata cannot be retreived, the promise is
|
|
3224
3224
|
* rejected.
|
|
3225
3225
|
* @public
|
|
3226
|
-
* @param ref - StorageReference to get metadata from.
|
|
3226
|
+
* @param ref - {@link StorageReference} to get metadata from.
|
|
3227
3227
|
*/
|
|
3228
3228
|
function getMetadata(ref) {
|
|
3229
3229
|
ref = getModularInstance(ref);
|
|
@@ -3232,11 +3232,11 @@ function getMetadata(ref) {
|
|
|
3232
3232
|
/**
|
|
3233
3233
|
* Updates the metadata for this object.
|
|
3234
3234
|
* @public
|
|
3235
|
-
* @param ref - StorageReference to update metadata for.
|
|
3235
|
+
* @param ref - {@link StorageReference} to update metadata for.
|
|
3236
3236
|
* @param metadata - The new metadata for the object.
|
|
3237
3237
|
* Only values that have been explicitly set will be changed. Explicitly
|
|
3238
3238
|
* setting a value to null will remove the metadata.
|
|
3239
|
-
* @returns A
|
|
3239
|
+
* @returns A `Promise` that resolves with the new metadata for this object.
|
|
3240
3240
|
*/
|
|
3241
3241
|
function updateMetadata(ref, metadata) {
|
|
3242
3242
|
ref = getModularInstance(ref);
|
|
@@ -3257,9 +3257,9 @@ function updateMetadata(ref, metadata) {
|
|
|
3257
3257
|
* list() may fail if there are too many unsupported objects in the bucket.
|
|
3258
3258
|
* @public
|
|
3259
3259
|
*
|
|
3260
|
-
* @param ref - StorageReference to get list from.
|
|
3261
|
-
* @param options - See ListOptions for details.
|
|
3262
|
-
* @returns A Promise that resolves with the items and prefixes.
|
|
3260
|
+
* @param ref - {@link StorageReference} to get list from.
|
|
3261
|
+
* @param options - See {@link ListOptions} for details.
|
|
3262
|
+
* @returns A `Promise` that resolves with the items and prefixes.
|
|
3263
3263
|
* `prefixes` contains references to sub-folders and `items`
|
|
3264
3264
|
* contains references to objects in this folder. `nextPageToken`
|
|
3265
3265
|
* can be used to get the rest of the results.
|
|
@@ -3277,12 +3277,12 @@ function list(ref, options) {
|
|
|
3277
3277
|
* Note: The results may not be consistent if objects are changed while this
|
|
3278
3278
|
* operation is running.
|
|
3279
3279
|
*
|
|
3280
|
-
* Warning: listAll may potentially consume too many resources if there are
|
|
3280
|
+
* Warning: `listAll` may potentially consume too many resources if there are
|
|
3281
3281
|
* too many results.
|
|
3282
3282
|
* @public
|
|
3283
|
-
* @param ref - StorageReference to get list from.
|
|
3283
|
+
* @param ref - {@link StorageReference} to get list from.
|
|
3284
3284
|
*
|
|
3285
|
-
* @returns A Promise that resolves with all the items and prefixes under
|
|
3285
|
+
* @returns A `Promise` that resolves with all the items and prefixes under
|
|
3286
3286
|
* the current storage reference. `prefixes` contains references to
|
|
3287
3287
|
* sub-directories and `items` contains references to objects in this
|
|
3288
3288
|
* folder. `nextPageToken` is never returned.
|
|
@@ -3292,9 +3292,10 @@ function listAll(ref) {
|
|
|
3292
3292
|
return listAll$1(ref);
|
|
3293
3293
|
}
|
|
3294
3294
|
/**
|
|
3295
|
-
* Returns the download URL for the given
|
|
3295
|
+
* Returns the download URL for the given {@link StorageReference}.
|
|
3296
3296
|
* @public
|
|
3297
|
-
* @
|
|
3297
|
+
* @param ref - {@link StorageReference} to get the download URL for.
|
|
3298
|
+
* @returns A `Promise` that resolves with the download
|
|
3298
3299
|
* URL for this object.
|
|
3299
3300
|
*/
|
|
3300
3301
|
function getDownloadURL(ref) {
|
|
@@ -3304,8 +3305,8 @@ function getDownloadURL(ref) {
|
|
|
3304
3305
|
/**
|
|
3305
3306
|
* Deletes the object at this location.
|
|
3306
3307
|
* @public
|
|
3307
|
-
* @param ref - StorageReference for object to delete.
|
|
3308
|
-
* @returns A
|
|
3308
|
+
* @param ref - {@link StorageReference} for object to delete.
|
|
3309
|
+
* @returns A `Promise` that resolves if the deletion succeeds.
|
|
3309
3310
|
*/
|
|
3310
3311
|
function deleteObject(ref) {
|
|
3311
3312
|
ref = getModularInstance(ref);
|
|
@@ -3322,12 +3323,12 @@ function _getChild(ref, childPath) {
|
|
|
3322
3323
|
return _getChild$1(ref, childPath);
|
|
3323
3324
|
}
|
|
3324
3325
|
/**
|
|
3325
|
-
* Gets a
|
|
3326
|
+
* Gets a {@link FirebaseStorage} instance for the given Firebase app.
|
|
3326
3327
|
* @public
|
|
3327
|
-
* @param app - Firebase app to get
|
|
3328
|
+
* @param app - Firebase app to get {@link FirebaseStorage} instance for.
|
|
3328
3329
|
* @param bucketUrl - The gs:// url to your Firebase Storage Bucket.
|
|
3329
3330
|
* If not passed, uses the app's default Storage Bucket.
|
|
3330
|
-
* @returns A
|
|
3331
|
+
* @returns A {@link FirebaseStorage} instance.
|
|
3331
3332
|
*/
|
|
3332
3333
|
function getStorage(app = getApp(), bucketUrl) {
|
|
3333
3334
|
app = getModularInstance(app);
|
|
@@ -3338,9 +3339,9 @@ function getStorage(app = getApp(), bucketUrl) {
|
|
|
3338
3339
|
return storageInstance;
|
|
3339
3340
|
}
|
|
3340
3341
|
/**
|
|
3341
|
-
* Modify this
|
|
3342
|
+
* Modify this {@link FirebaseStorage} instance to communicate with the Cloud Storage emulator.
|
|
3342
3343
|
*
|
|
3343
|
-
* @param storage - The
|
|
3344
|
+
* @param storage - The {@link FirebaseStorage} instance
|
|
3344
3345
|
* @param host - The emulator host (ex: localhost)
|
|
3345
3346
|
* @param port - The emulator port (ex: 5001)
|
|
3346
3347
|
* @param options.mockUserToken - the mock auth token to use for unit testing Security Rules.
|