@firebase/storage 0.14.4 → 0.14.5-crashlytics2.142b40983
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/dist/index.browser.cjs.js +1 -1
- package/dist/index.browser.cjs.js.map +1 -1
- package/dist/index.cjs.js +1 -1
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.esm.js +1 -1
- package/dist/index.esm.js.map +1 -1
- package/dist/index.node.cjs.js +1 -1
- package/dist/index.node.cjs.js.map +1 -1
- package/dist/node-esm/index.node.esm.js +1 -1
- package/dist/node-esm/index.node.esm.js.map +1 -1
- package/dist/storage-public.d.ts +53 -3
- package/dist/storage.d.ts +1 -0
- package/dist/{src/tsdoc-metadata.json → tsdoc-metadata.json} +1 -1
- package/package.json +6 -6
package/dist/storage-public.d.ts
CHANGED
|
@@ -3,8 +3,14 @@
|
|
|
3
3
|
*
|
|
4
4
|
* @packageDocumentation
|
|
5
5
|
*/
|
|
6
|
-
|
|
6
|
+
|
|
7
|
+
import { CompleteFn } from '@firebase/util';
|
|
8
|
+
import { EmulatorMockTokenOptions } from '@firebase/util';
|
|
7
9
|
import { FirebaseApp } from '@firebase/app';
|
|
10
|
+
import { FirebaseError } from '@firebase/util';
|
|
11
|
+
import { NextFn } from '@firebase/util';
|
|
12
|
+
import { Subscribe } from '@firebase/util';
|
|
13
|
+
import { Unsubscribe } from '@firebase/util';
|
|
8
14
|
/**
|
|
9
15
|
* Modify this {@link FirebaseStorage} instance to communicate with the Cloud Storage emulator.
|
|
10
16
|
*
|
|
@@ -18,7 +24,9 @@ import { FirebaseApp } from '@firebase/app';
|
|
|
18
24
|
export declare function connectStorageEmulator(storage: FirebaseStorage, host: string, port: number, options?: {
|
|
19
25
|
mockUserToken?: EmulatorMockTokenOptions | string;
|
|
20
26
|
}): void;
|
|
27
|
+
|
|
21
28
|
/* Excluded from this release type: _dataFromString */
|
|
29
|
+
|
|
22
30
|
/**
|
|
23
31
|
* Deletes the object at this location.
|
|
24
32
|
* @public
|
|
@@ -26,9 +34,12 @@ export declare function connectStorageEmulator(storage: FirebaseStorage, host: s
|
|
|
26
34
|
* @returns A `Promise` that resolves if the deletion succeeds.
|
|
27
35
|
*/
|
|
28
36
|
export declare function deleteObject(ref: StorageReference): Promise<void>;
|
|
29
|
-
|
|
37
|
+
|
|
38
|
+
export { EmulatorMockTokenOptions }
|
|
30
39
|
/* Excluded from this release type: _FbsBlob */
|
|
40
|
+
|
|
31
41
|
/* Excluded from this release type: _FirebaseService */
|
|
42
|
+
|
|
32
43
|
/**
|
|
33
44
|
* A Firebase Storage instance.
|
|
34
45
|
* @public
|
|
@@ -48,7 +59,9 @@ export declare interface FirebaseStorage {
|
|
|
48
59
|
*/
|
|
49
60
|
maxOperationRetryTime: number;
|
|
50
61
|
}
|
|
62
|
+
|
|
51
63
|
/* Excluded from this release type: _FirebaseStorageImpl */
|
|
64
|
+
|
|
52
65
|
/**
|
|
53
66
|
* The full set of object metadata, including read-only properties.
|
|
54
67
|
* @public
|
|
@@ -98,6 +111,7 @@ export declare interface FullMetadata extends UploadMetadata {
|
|
|
98
111
|
*/
|
|
99
112
|
ref?: StorageReference | undefined;
|
|
100
113
|
}
|
|
114
|
+
|
|
101
115
|
/**
|
|
102
116
|
* Downloads the data at the object's location. Returns an error if the object
|
|
103
117
|
* is not found.
|
|
@@ -115,6 +129,7 @@ export declare interface FullMetadata extends UploadMetadata {
|
|
|
115
129
|
* @returns A Promise that resolves with a Blob containing the object's bytes
|
|
116
130
|
*/
|
|
117
131
|
export declare function getBlob(ref: StorageReference, maxDownloadSizeBytes?: number): Promise<Blob>;
|
|
132
|
+
|
|
118
133
|
/**
|
|
119
134
|
* Downloads the data at the object's location. Returns an error if the object
|
|
120
135
|
* is not found.
|
|
@@ -130,7 +145,9 @@ export declare function getBlob(ref: StorageReference, maxDownloadSizeBytes?: nu
|
|
|
130
145
|
* @returns A Promise containing the object's bytes
|
|
131
146
|
*/
|
|
132
147
|
export declare function getBytes(ref: StorageReference, maxDownloadSizeBytes?: number): Promise<ArrayBuffer>;
|
|
148
|
+
|
|
133
149
|
/* Excluded from this release type: _getChild */
|
|
150
|
+
|
|
134
151
|
/**
|
|
135
152
|
* Returns the download URL for the given {@link StorageReference}.
|
|
136
153
|
* @public
|
|
@@ -139,6 +156,7 @@ export declare function getBytes(ref: StorageReference, maxDownloadSizeBytes?: n
|
|
|
139
156
|
* URL for this object.
|
|
140
157
|
*/
|
|
141
158
|
export declare function getDownloadURL(ref: StorageReference): Promise<string>;
|
|
159
|
+
|
|
142
160
|
/**
|
|
143
161
|
* A `Promise` that resolves with the metadata for this object. If this
|
|
144
162
|
* object doesn't exist or metadata cannot be retrieved, the promise is
|
|
@@ -147,6 +165,7 @@ export declare function getDownloadURL(ref: StorageReference): Promise<string>;
|
|
|
147
165
|
* @param ref - {@link StorageReference} to get metadata from.
|
|
148
166
|
*/
|
|
149
167
|
export declare function getMetadata(ref: StorageReference): Promise<FullMetadata>;
|
|
168
|
+
|
|
150
169
|
/**
|
|
151
170
|
* Gets a {@link FirebaseStorage} instance for the given Firebase app.
|
|
152
171
|
* @public
|
|
@@ -156,6 +175,7 @@ export declare function getMetadata(ref: StorageReference): Promise<FullMetadata
|
|
|
156
175
|
* @returns A {@link FirebaseStorage} instance.
|
|
157
176
|
*/
|
|
158
177
|
export declare function getStorage(app?: FirebaseApp, bucketUrl?: string): FirebaseStorage;
|
|
178
|
+
|
|
159
179
|
/**
|
|
160
180
|
* Downloads the data at the object's location. Raises an error event if the
|
|
161
181
|
* object is not found.
|
|
@@ -170,7 +190,9 @@ export declare function getStorage(app?: FirebaseApp, bucketUrl?: string): Fireb
|
|
|
170
190
|
*/
|
|
171
191
|
export declare function getStream(ref: StorageReference, maxDownloadSizeBytes?: number): ReadableStream;
|
|
172
192
|
/* Excluded from this release type: _invalidArgument */
|
|
193
|
+
|
|
173
194
|
/* Excluded from this release type: _invalidRootOperation */
|
|
195
|
+
|
|
174
196
|
/**
|
|
175
197
|
* List items (files) and prefixes (folders) under this storage reference.
|
|
176
198
|
*
|
|
@@ -194,6 +216,7 @@ export declare function getStream(ref: StorageReference, maxDownloadSizeBytes?:
|
|
|
194
216
|
* can be used to get the rest of the results.
|
|
195
217
|
*/
|
|
196
218
|
export declare function list(ref: StorageReference, options?: ListOptions): Promise<ListResult>;
|
|
219
|
+
|
|
197
220
|
/**
|
|
198
221
|
* List all items (files) and prefixes (folders) under this storage reference.
|
|
199
222
|
*
|
|
@@ -214,6 +237,7 @@ export declare function list(ref: StorageReference, options?: ListOptions): Prom
|
|
|
214
237
|
* folder. `nextPageToken` is never returned.
|
|
215
238
|
*/
|
|
216
239
|
export declare function listAll(ref: StorageReference): Promise<ListResult>;
|
|
240
|
+
|
|
217
241
|
/**
|
|
218
242
|
* The options `list()` accepts.
|
|
219
243
|
* @public
|
|
@@ -230,6 +254,7 @@ export declare interface ListOptions {
|
|
|
230
254
|
*/
|
|
231
255
|
pageToken?: string | null;
|
|
232
256
|
}
|
|
257
|
+
|
|
233
258
|
/**
|
|
234
259
|
* Result returned by list().
|
|
235
260
|
* @public
|
|
@@ -254,6 +279,8 @@ export declare interface ListResult {
|
|
|
254
279
|
*/
|
|
255
280
|
nextPageToken?: string;
|
|
256
281
|
}
|
|
282
|
+
|
|
283
|
+
/* Excluded from this release type: _Location */
|
|
257
284
|
/**
|
|
258
285
|
* Returns a {@link StorageReference} for the given url.
|
|
259
286
|
* @param storage - {@link FirebaseStorage} instance.
|
|
@@ -261,6 +288,7 @@ export declare interface ListResult {
|
|
|
261
288
|
* @public
|
|
262
289
|
*/
|
|
263
290
|
export declare function ref(storage: FirebaseStorage, url?: string): StorageReference;
|
|
291
|
+
|
|
264
292
|
/**
|
|
265
293
|
* Returns a {@link StorageReference} for the given path in the
|
|
266
294
|
* default bucket.
|
|
@@ -270,6 +298,9 @@ export declare function ref(storage: FirebaseStorage, url?: string): StorageRefe
|
|
|
270
298
|
* @public
|
|
271
299
|
*/
|
|
272
300
|
export declare function ref(storageOrRef: FirebaseStorage | StorageReference, path?: string): StorageReference;
|
|
301
|
+
|
|
302
|
+
/* Excluded from this release type: _Reference */
|
|
303
|
+
|
|
273
304
|
/**
|
|
274
305
|
* Object metadata that can be set at any time.
|
|
275
306
|
* @public
|
|
@@ -302,6 +333,7 @@ export declare interface SettableMetadata {
|
|
|
302
333
|
[key: string]: string;
|
|
303
334
|
} | undefined;
|
|
304
335
|
}
|
|
336
|
+
|
|
305
337
|
/**
|
|
306
338
|
* An error returned by the Firebase Storage SDK.
|
|
307
339
|
* @public
|
|
@@ -329,6 +361,7 @@ export declare class StorageError extends FirebaseError {
|
|
|
329
361
|
get serverResponse(): null | string;
|
|
330
362
|
set serverResponse(serverResponse: string | null);
|
|
331
363
|
}
|
|
364
|
+
|
|
332
365
|
/**
|
|
333
366
|
* @public
|
|
334
367
|
* Error codes that can be attached to `StorageError` objects.
|
|
@@ -360,6 +393,7 @@ export declare enum StorageErrorCode {
|
|
|
360
393
|
INTERNAL_ERROR = "internal-error",
|
|
361
394
|
UNSUPPORTED_ENVIRONMENT = "unsupported-environment"
|
|
362
395
|
}
|
|
396
|
+
|
|
363
397
|
/**
|
|
364
398
|
* A stream observer for Firebase Storage.
|
|
365
399
|
* @public
|
|
@@ -369,6 +403,7 @@ export declare interface StorageObserver<T> {
|
|
|
369
403
|
error?: (error: StorageError) => void | null;
|
|
370
404
|
complete?: CompleteFn | null;
|
|
371
405
|
}
|
|
406
|
+
|
|
372
407
|
/**
|
|
373
408
|
* Represents a reference to a Google Cloud Storage object. Developers can
|
|
374
409
|
* upload, download, and delete objects, as well as get/set object metadata.
|
|
@@ -408,6 +443,7 @@ export declare interface StorageReference {
|
|
|
408
443
|
*/
|
|
409
444
|
parent: StorageReference | null;
|
|
410
445
|
}
|
|
446
|
+
|
|
411
447
|
/**
|
|
412
448
|
* @license
|
|
413
449
|
* Copyright 2017 Google LLC
|
|
@@ -429,6 +465,7 @@ export declare interface StorageReference {
|
|
|
429
465
|
* @public
|
|
430
466
|
*/
|
|
431
467
|
export declare type StringFormat = (typeof StringFormat)[keyof typeof StringFormat];
|
|
468
|
+
|
|
432
469
|
/**
|
|
433
470
|
* An enumeration of the possible string formats for upload.
|
|
434
471
|
* @public
|
|
@@ -472,12 +509,16 @@ export declare const StringFormat: {
|
|
|
472
509
|
* @public
|
|
473
510
|
*/
|
|
474
511
|
export declare type TaskEvent = 'state_changed';
|
|
512
|
+
|
|
475
513
|
/* Excluded from this release type: _TaskEvent */
|
|
514
|
+
|
|
476
515
|
/**
|
|
477
516
|
* Represents the current state of a running upload.
|
|
478
517
|
* @public
|
|
479
518
|
*/
|
|
480
519
|
export declare type TaskState = 'running' | 'paused' | 'success' | 'canceled' | 'error';
|
|
520
|
+
|
|
521
|
+
/* Excluded from this release type: _TaskState */
|
|
481
522
|
/**
|
|
482
523
|
* Updates the metadata for this object.
|
|
483
524
|
* @public
|
|
@@ -488,6 +529,7 @@ export declare type TaskState = 'running' | 'paused' | 'success' | 'canceled' |
|
|
|
488
529
|
* @returns A `Promise` that resolves with the new metadata for this object.
|
|
489
530
|
*/
|
|
490
531
|
export declare function updateMetadata(ref: StorageReference, metadata: SettableMetadata): Promise<FullMetadata>;
|
|
532
|
+
|
|
491
533
|
/**
|
|
492
534
|
* Uploads data to this object's location.
|
|
493
535
|
* The upload is not resumable.
|
|
@@ -498,6 +540,7 @@ export declare function updateMetadata(ref: StorageReference, metadata: Settable
|
|
|
498
540
|
* @returns A Promise containing an UploadResult
|
|
499
541
|
*/
|
|
500
542
|
export declare function uploadBytes(ref: StorageReference, data: Blob | Uint8Array | ArrayBuffer, metadata?: UploadMetadata): Promise<UploadResult>;
|
|
543
|
+
|
|
501
544
|
/**
|
|
502
545
|
* Uploads data to this object's location.
|
|
503
546
|
* The upload can be paused and resumed, and exposes progress updates.
|
|
@@ -508,6 +551,7 @@ export declare function uploadBytes(ref: StorageReference, data: Blob | Uint8Arr
|
|
|
508
551
|
* @returns An UploadTask
|
|
509
552
|
*/
|
|
510
553
|
export declare function uploadBytesResumable(ref: StorageReference, data: Blob | Uint8Array | ArrayBuffer, metadata?: UploadMetadata): UploadTask;
|
|
554
|
+
|
|
511
555
|
/**
|
|
512
556
|
* Object metadata that can be set at upload.
|
|
513
557
|
* @public
|
|
@@ -518,6 +562,7 @@ export declare interface UploadMetadata extends SettableMetadata {
|
|
|
518
562
|
*/
|
|
519
563
|
md5Hash?: string | undefined;
|
|
520
564
|
}
|
|
565
|
+
|
|
521
566
|
/**
|
|
522
567
|
* Result returned from a non-resumable upload.
|
|
523
568
|
* @public
|
|
@@ -532,6 +577,7 @@ export declare interface UploadResult {
|
|
|
532
577
|
*/
|
|
533
578
|
readonly ref: StorageReference;
|
|
534
579
|
}
|
|
580
|
+
|
|
535
581
|
/**
|
|
536
582
|
* Uploads a string to this object's location.
|
|
537
583
|
* The upload is not resumable.
|
|
@@ -543,6 +589,7 @@ export declare interface UploadResult {
|
|
|
543
589
|
* @returns A Promise containing an UploadResult
|
|
544
590
|
*/
|
|
545
591
|
export declare function uploadString(ref: StorageReference, value: string, format?: StringFormat, metadata?: UploadMetadata): Promise<UploadResult>;
|
|
592
|
+
|
|
546
593
|
/**
|
|
547
594
|
* Represents the process of uploading an object. Allows you to monitor and
|
|
548
595
|
* manage the upload.
|
|
@@ -690,7 +737,9 @@ export declare interface UploadTask {
|
|
|
690
737
|
*/
|
|
691
738
|
then(onFulfilled?: ((snapshot: UploadTaskSnapshot) => unknown) | null, onRejected?: ((error: StorageError) => unknown) | null): Promise<unknown>;
|
|
692
739
|
}
|
|
740
|
+
|
|
693
741
|
/* Excluded from this release type: _UploadTask */
|
|
742
|
+
|
|
694
743
|
/**
|
|
695
744
|
* Holds data about the current state of the upload task.
|
|
696
745
|
* @public
|
|
@@ -722,4 +771,5 @@ export declare interface UploadTaskSnapshot {
|
|
|
722
771
|
*/
|
|
723
772
|
totalBytes: number;
|
|
724
773
|
}
|
|
725
|
-
|
|
774
|
+
|
|
775
|
+
export { }
|
package/dist/storage.d.ts
CHANGED
|
@@ -79,6 +79,7 @@ export declare function _dataFromString(format: StringFormat, stringData: string
|
|
|
79
79
|
* @returns A `Promise` that resolves if the deletion succeeds.
|
|
80
80
|
*/
|
|
81
81
|
export declare function deleteObject(ref: StorageReference): Promise<void>;
|
|
82
|
+
|
|
82
83
|
export { EmulatorMockTokenOptions }
|
|
83
84
|
|
|
84
85
|
/**
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@firebase/storage",
|
|
3
|
-
"version": "0.14.
|
|
3
|
+
"version": "0.14.5-crashlytics2.142b40983",
|
|
4
4
|
"description": "",
|
|
5
5
|
"author": "Firebase <firebase-support@google.com> (https://firebase.google.com/)",
|
|
6
6
|
"main": "dist/index.node.cjs.js",
|
|
@@ -46,16 +46,16 @@
|
|
|
46
46
|
},
|
|
47
47
|
"license": "Apache-2.0",
|
|
48
48
|
"dependencies": {
|
|
49
|
-
"@firebase/util": "1.15.
|
|
50
|
-
"@firebase/component": "0.7.
|
|
49
|
+
"@firebase/util": "1.15.3-crashlytics2.142b40983",
|
|
50
|
+
"@firebase/component": "0.7.5-crashlytics2.142b40983",
|
|
51
51
|
"tslib": "^2.1.0"
|
|
52
52
|
},
|
|
53
53
|
"peerDependencies": {
|
|
54
|
-
"@firebase/app": "0.
|
|
54
|
+
"@firebase/app": "0.16.2-crashlytics2.142b40983"
|
|
55
55
|
},
|
|
56
56
|
"devDependencies": {
|
|
57
|
-
"@firebase/app": "0.16.
|
|
58
|
-
"@firebase/auth": "1.13.
|
|
57
|
+
"@firebase/app": "0.16.2-crashlytics2.142b40983",
|
|
58
|
+
"@firebase/auth": "1.13.6-crashlytics2.142b40983",
|
|
59
59
|
"rollup": "4.62.2",
|
|
60
60
|
"@rollup/plugin-alias": "5.1.1",
|
|
61
61
|
"@rollup/plugin-json": "6.1.0",
|