@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
|
@@ -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
|
/**
|
|
@@ -15,9 +15,9 @@ import { Provider } from '@firebase/component';
|
|
|
15
15
|
import { Subscribe } from '@firebase/util';
|
|
16
16
|
import { Unsubscribe } from '@firebase/util';
|
|
17
17
|
/**
|
|
18
|
-
* Modify this
|
|
18
|
+
* Modify this {@link FirebaseStorage} instance to communicate with the Cloud Storage emulator.
|
|
19
19
|
*
|
|
20
|
-
* @param storage - The
|
|
20
|
+
* @param storage - The {@link FirebaseStorage} instance
|
|
21
21
|
* @param host - The emulator host (ex: localhost)
|
|
22
22
|
* @param port - The emulator port (ex: 5001)
|
|
23
23
|
* @param options.mockUserToken - the mock auth token to use for unit testing Security Rules.
|
|
@@ -29,8 +29,8 @@ export declare function connectStorageEmulator(storage: FirebaseStorage, host: s
|
|
|
29
29
|
/**
|
|
30
30
|
* Deletes the object at this location.
|
|
31
31
|
* @public
|
|
32
|
-
* @param ref - StorageReference for object to delete.
|
|
33
|
-
* @returns A
|
|
32
|
+
* @param ref - {@link StorageReference} for object to delete.
|
|
33
|
+
* @returns A `Promise` that resolves if the deletion succeeds.
|
|
34
34
|
*/
|
|
35
35
|
export declare function deleteObject(ref: StorageReference): Promise<void>;
|
|
36
36
|
/* Excluded from this release type: _FbsBlob */
|
|
@@ -119,27 +119,28 @@ export declare interface FullMetadata extends UploadMetadata {
|
|
|
119
119
|
}
|
|
120
120
|
/* Excluded from this release type: _getChild */
|
|
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
|
-
* A
|
|
130
|
+
* A `Promise` that resolves with the metadata for this object. If this
|
|
130
131
|
* object doesn't exist or metadata cannot be retreived, the promise is
|
|
131
132
|
* rejected.
|
|
132
133
|
* @public
|
|
133
|
-
* @param ref - StorageReference to get metadata from.
|
|
134
|
+
* @param ref - {@link StorageReference} to get metadata from.
|
|
134
135
|
*/
|
|
135
136
|
export declare function getMetadata(ref: StorageReference): Promise<FullMetadata>;
|
|
136
137
|
/**
|
|
137
|
-
* Gets a
|
|
138
|
+
* Gets a {@link FirebaseStorage} instance for the given Firebase app.
|
|
138
139
|
* @public
|
|
139
|
-
* @param app - Firebase app to get
|
|
140
|
+
* @param app - Firebase app to get {@link FirebaseStorage} instance for.
|
|
140
141
|
* @param bucketUrl - The gs:// url to your Firebase Storage Bucket.
|
|
141
142
|
* If not passed, uses the app's default Storage Bucket.
|
|
142
|
-
* @returns A
|
|
143
|
+
* @returns A {@link FirebaseStorage} instance.
|
|
143
144
|
*/
|
|
144
145
|
export declare function getStorage(app?: FirebaseApp, bucketUrl?: string): FirebaseStorage;
|
|
145
146
|
/**
|
|
@@ -157,9 +158,9 @@ export declare function getStorage(app?: FirebaseApp, bucketUrl?: string): Fireb
|
|
|
157
158
|
* list() may fail if there are too many unsupported objects in the bucket.
|
|
158
159
|
* @public
|
|
159
160
|
*
|
|
160
|
-
* @param ref - StorageReference to get list from.
|
|
161
|
-
* @param options - See ListOptions for details.
|
|
162
|
-
* @returns A Promise that resolves with the items and prefixes.
|
|
161
|
+
* @param ref - {@link StorageReference} to get list from.
|
|
162
|
+
* @param options - See {@link ListOptions} for details.
|
|
163
|
+
* @returns A `Promise` that resolves with the items and prefixes.
|
|
163
164
|
* `prefixes` contains references to sub-folders and `items`
|
|
164
165
|
* contains references to objects in this folder. `nextPageToken`
|
|
165
166
|
* can be used to get the rest of the results.
|
|
@@ -174,12 +175,12 @@ export declare function list(ref: StorageReference, options?: ListOptions): Prom
|
|
|
174
175
|
* Note: The results may not be consistent if objects are changed while this
|
|
175
176
|
* operation is running.
|
|
176
177
|
*
|
|
177
|
-
* Warning: listAll may potentially consume too many resources if there are
|
|
178
|
+
* Warning: `listAll` may potentially consume too many resources if there are
|
|
178
179
|
* too many results.
|
|
179
180
|
* @public
|
|
180
|
-
* @param ref - StorageReference to get list from.
|
|
181
|
+
* @param ref - {@link StorageReference} to get list from.
|
|
181
182
|
*
|
|
182
|
-
* @returns A Promise that resolves with all the items and prefixes under
|
|
183
|
+
* @returns A `Promise` that resolves with all the items and prefixes under
|
|
183
184
|
* the current storage reference. `prefixes` contains references to
|
|
184
185
|
* sub-directories and `items` contains references to objects in this
|
|
185
186
|
* folder. `nextPageToken` is never returned.
|
|
@@ -226,18 +227,18 @@ export declare interface ListResult {
|
|
|
226
227
|
nextPageToken?: string;
|
|
227
228
|
}
|
|
228
229
|
/**
|
|
229
|
-
* Returns a StorageReference for the given url.
|
|
230
|
-
* @param storage -
|
|
230
|
+
* Returns a {@link StorageReference} for the given url.
|
|
231
|
+
* @param storage - {@link FirebaseStorage} instance.
|
|
231
232
|
* @param url - URL. If empty, returns root reference.
|
|
232
233
|
* @public
|
|
233
234
|
*/
|
|
234
235
|
export declare function ref(storage: FirebaseStorage, url?: string): StorageReference;
|
|
235
236
|
/**
|
|
236
|
-
* Returns a StorageReference for the given path in the
|
|
237
|
+
* Returns a {@link StorageReference} for the given path in the
|
|
237
238
|
* default bucket.
|
|
238
|
-
* @param storageOrRef -
|
|
239
|
-
* @param pathOrUrlStorage - path. If empty, returns root reference (if
|
|
240
|
-
* instance provided) or returns same reference (if
|
|
239
|
+
* @param storageOrRef - {@link FirebaseStorage} or {@link StorageReference}.
|
|
240
|
+
* @param pathOrUrlStorage - path. If empty, returns root reference (if {@link FirebaseStorage}
|
|
241
|
+
* instance provided) or returns same reference (if {@link StorageReference} provided).
|
|
241
242
|
* @public
|
|
242
243
|
*/
|
|
243
244
|
export declare function ref(storageOrRef: FirebaseStorage | StorageReference, path?: string): StorageReference;
|
|
@@ -312,7 +313,7 @@ export declare interface StorageReference {
|
|
|
312
313
|
*/
|
|
313
314
|
name: string;
|
|
314
315
|
/**
|
|
315
|
-
* The
|
|
316
|
+
* The {@link FirebaseStorage} instance associated with this reference.
|
|
316
317
|
*/
|
|
317
318
|
storage: FirebaseStorage;
|
|
318
319
|
/**
|
|
@@ -393,11 +394,11 @@ export declare type TaskState = 'running' | 'paused' | 'success' | 'canceled' |
|
|
|
393
394
|
/**
|
|
394
395
|
* Updates the metadata for this object.
|
|
395
396
|
* @public
|
|
396
|
-
* @param ref - StorageReference to update metadata for.
|
|
397
|
+
* @param ref - {@link StorageReference} to update metadata for.
|
|
397
398
|
* @param metadata - The new metadata for the object.
|
|
398
399
|
* Only values that have been explicitly set will be changed. Explicitly
|
|
399
400
|
* setting a value to null will remove the metadata.
|
|
400
|
-
* @returns A
|
|
401
|
+
* @returns A `Promise` that resolves with the new metadata for this object.
|
|
401
402
|
*/
|
|
402
403
|
export declare function updateMetadata(ref: StorageReference, metadata: SettableMetadata): Promise<FullMetadata>;
|
|
403
404
|
/**
|
package/exp/dist/storage.d.ts
CHANGED
|
@@ -47,9 +47,9 @@ declare class ConnectionPool {
|
|
|
47
47
|
}
|
|
48
48
|
|
|
49
49
|
/**
|
|
50
|
-
* Modify this
|
|
50
|
+
* Modify this {@link FirebaseStorage} instance to communicate with the Cloud Storage emulator.
|
|
51
51
|
*
|
|
52
|
-
* @param storage - The
|
|
52
|
+
* @param storage - The {@link FirebaseStorage} instance
|
|
53
53
|
* @param host - The emulator host (ex: localhost)
|
|
54
54
|
* @param port - The emulator port (ex: 5001)
|
|
55
55
|
* @param options.mockUserToken - the mock auth token to use for unit testing Security Rules.
|
|
@@ -62,8 +62,8 @@ export declare function connectStorageEmulator(storage: FirebaseStorage, host: s
|
|
|
62
62
|
/**
|
|
63
63
|
* Deletes the object at this location.
|
|
64
64
|
* @public
|
|
65
|
-
* @param ref - StorageReference for object to delete.
|
|
66
|
-
* @returns A
|
|
65
|
+
* @param ref - {@link StorageReference} for object to delete.
|
|
66
|
+
* @returns A `Promise` that resolves if the deletion succeeds.
|
|
67
67
|
*/
|
|
68
68
|
export declare function deleteObject(ref: StorageReference): Promise<void>;
|
|
69
69
|
|
|
@@ -318,29 +318,30 @@ export declare interface FullMetadata extends UploadMetadata {
|
|
|
318
318
|
export declare function _getChild(ref: StorageReference, childPath: string): _Reference;
|
|
319
319
|
|
|
320
320
|
/**
|
|
321
|
-
* Returns the download URL for the given
|
|
321
|
+
* Returns the download URL for the given {@link StorageReference}.
|
|
322
322
|
* @public
|
|
323
|
-
* @
|
|
323
|
+
* @param ref - {@link StorageReference} to get the download URL for.
|
|
324
|
+
* @returns A `Promise` that resolves with the download
|
|
324
325
|
* URL for this object.
|
|
325
326
|
*/
|
|
326
327
|
export declare function getDownloadURL(ref: StorageReference): Promise<string>;
|
|
327
328
|
|
|
328
329
|
/**
|
|
329
|
-
* A
|
|
330
|
+
* A `Promise` that resolves with the metadata for this object. If this
|
|
330
331
|
* object doesn't exist or metadata cannot be retreived, the promise is
|
|
331
332
|
* rejected.
|
|
332
333
|
* @public
|
|
333
|
-
* @param ref - StorageReference to get metadata from.
|
|
334
|
+
* @param ref - {@link StorageReference} to get metadata from.
|
|
334
335
|
*/
|
|
335
336
|
export declare function getMetadata(ref: StorageReference): Promise<FullMetadata>;
|
|
336
337
|
|
|
337
338
|
/**
|
|
338
|
-
* Gets a
|
|
339
|
+
* Gets a {@link FirebaseStorage} instance for the given Firebase app.
|
|
339
340
|
* @public
|
|
340
|
-
* @param app - Firebase app to get
|
|
341
|
+
* @param app - Firebase app to get {@link FirebaseStorage} instance for.
|
|
341
342
|
* @param bucketUrl - The gs:// url to your Firebase Storage Bucket.
|
|
342
343
|
* If not passed, uses the app's default Storage Bucket.
|
|
343
|
-
* @returns A
|
|
344
|
+
* @returns A {@link FirebaseStorage} instance.
|
|
344
345
|
*/
|
|
345
346
|
export declare function getStorage(app?: FirebaseApp, bucketUrl?: string): FirebaseStorage;
|
|
346
347
|
|
|
@@ -395,9 +396,9 @@ declare const enum InternalTaskState {
|
|
|
395
396
|
* list() may fail if there are too many unsupported objects in the bucket.
|
|
396
397
|
* @public
|
|
397
398
|
*
|
|
398
|
-
* @param ref - StorageReference to get list from.
|
|
399
|
-
* @param options - See ListOptions for details.
|
|
400
|
-
* @returns A Promise that resolves with the items and prefixes.
|
|
399
|
+
* @param ref - {@link StorageReference} to get list from.
|
|
400
|
+
* @param options - See {@link ListOptions} for details.
|
|
401
|
+
* @returns A `Promise` that resolves with the items and prefixes.
|
|
401
402
|
* `prefixes` contains references to sub-folders and `items`
|
|
402
403
|
* contains references to objects in this folder. `nextPageToken`
|
|
403
404
|
* can be used to get the rest of the results.
|
|
@@ -413,12 +414,12 @@ export declare function list(ref: StorageReference, options?: ListOptions): Prom
|
|
|
413
414
|
* Note: The results may not be consistent if objects are changed while this
|
|
414
415
|
* operation is running.
|
|
415
416
|
*
|
|
416
|
-
* Warning: listAll may potentially consume too many resources if there are
|
|
417
|
+
* Warning: `listAll` may potentially consume too many resources if there are
|
|
417
418
|
* too many results.
|
|
418
419
|
* @public
|
|
419
|
-
* @param ref - StorageReference to get list from.
|
|
420
|
+
* @param ref - {@link StorageReference} to get list from.
|
|
420
421
|
*
|
|
421
|
-
* @returns A Promise that resolves with all the items and prefixes under
|
|
422
|
+
* @returns A `Promise` that resolves with all the items and prefixes under
|
|
422
423
|
* the current storage reference. `prefixes` contains references to
|
|
423
424
|
* sub-directories and `items` contains references to objects in this
|
|
424
425
|
* folder. `nextPageToken` is never returned.
|
|
@@ -516,19 +517,19 @@ declare interface Metadata extends FullMetadata {
|
|
|
516
517
|
declare type NextFn_2<T> = (value: T) => void;
|
|
517
518
|
|
|
518
519
|
/**
|
|
519
|
-
* Returns a StorageReference for the given url.
|
|
520
|
-
* @param storage -
|
|
520
|
+
* Returns a {@link StorageReference} for the given url.
|
|
521
|
+
* @param storage - {@link FirebaseStorage} instance.
|
|
521
522
|
* @param url - URL. If empty, returns root reference.
|
|
522
523
|
* @public
|
|
523
524
|
*/
|
|
524
525
|
export declare function ref(storage: FirebaseStorage, url?: string): StorageReference;
|
|
525
526
|
|
|
526
527
|
/**
|
|
527
|
-
* Returns a StorageReference for the given path in the
|
|
528
|
+
* Returns a {@link StorageReference} for the given path in the
|
|
528
529
|
* default bucket.
|
|
529
|
-
* @param storageOrRef -
|
|
530
|
-
* @param pathOrUrlStorage - path. If empty, returns root reference (if
|
|
531
|
-
* instance provided) or returns same reference (if
|
|
530
|
+
* @param storageOrRef - {@link FirebaseStorage} or {@link StorageReference}.
|
|
531
|
+
* @param pathOrUrlStorage - path. If empty, returns root reference (if {@link FirebaseStorage}
|
|
532
|
+
* instance provided) or returns same reference (if {@link StorageReference} provided).
|
|
532
533
|
* @public
|
|
533
534
|
*/
|
|
534
535
|
export declare function ref(storageOrRef: FirebaseStorage | StorageReference, path?: string): StorageReference;
|
|
@@ -759,7 +760,7 @@ export declare interface StorageReference {
|
|
|
759
760
|
*/
|
|
760
761
|
name: string;
|
|
761
762
|
/**
|
|
762
|
-
* The
|
|
763
|
+
* The {@link FirebaseStorage} instance associated with this reference.
|
|
763
764
|
*/
|
|
764
765
|
storage: FirebaseStorage;
|
|
765
766
|
/**
|
|
@@ -919,11 +920,11 @@ declare type Unsubscribe_2 = () => void;
|
|
|
919
920
|
/**
|
|
920
921
|
* Updates the metadata for this object.
|
|
921
922
|
* @public
|
|
922
|
-
* @param ref - StorageReference to update metadata for.
|
|
923
|
+
* @param ref - {@link StorageReference} to update metadata for.
|
|
923
924
|
* @param metadata - The new metadata for the object.
|
|
924
925
|
* Only values that have been explicitly set will be changed. Explicitly
|
|
925
926
|
* setting a value to null will remove the metadata.
|
|
926
|
-
* @returns A
|
|
927
|
+
* @returns A `Promise` that resolves with the new metadata for this object.
|
|
927
928
|
*/
|
|
928
929
|
export declare function updateMetadata(ref: StorageReference, metadata: SettableMetadata): Promise<FullMetadata>;
|
|
929
930
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@firebase/storage",
|
|
3
|
-
"version": "0.7.
|
|
3
|
+
"version": "0.7.1-2022028193537",
|
|
4
4
|
"description": "",
|
|
5
5
|
"author": "Firebase <firebase-support@google.com> (https://firebase.google.com/)",
|
|
6
6
|
"main": "dist/index.node.cjs.js",
|
|
@@ -41,7 +41,7 @@
|
|
|
41
41
|
"@firebase/storage-types": "0.5.0",
|
|
42
42
|
"@firebase/util": "1.3.0",
|
|
43
43
|
"@firebase/component": "0.5.6",
|
|
44
|
-
"node-fetch": "2.6.
|
|
44
|
+
"node-fetch": "2.6.7",
|
|
45
45
|
"tslib": "^2.1.0"
|
|
46
46
|
},
|
|
47
47
|
"peerDependencies": {
|