@depup/firebase__storage-compat 0.4.1-depup.0

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/README.md ADDED
@@ -0,0 +1,31 @@
1
+ # @depup/firebase__storage-compat
2
+
3
+ > Dependency-bumped version of [@firebase/storage-compat](https://www.npmjs.com/package/@firebase/storage-compat)
4
+
5
+ Generated by [DepUp](https://github.com/depup/npm) -- all production
6
+ dependencies bumped to latest versions.
7
+
8
+ ## Installation
9
+
10
+ ```bash
11
+ npm install @depup/firebase__storage-compat
12
+ ```
13
+
14
+ | Field | Value |
15
+ |-------|-------|
16
+ | Original | [@firebase/storage-compat](https://www.npmjs.com/package/@firebase/storage-compat) @ 0.4.1 |
17
+ | Processed | 2026-03-17 |
18
+ | Smoke test | failed |
19
+ | Deps updated | 1 |
20
+
21
+ ## Dependency Changes
22
+
23
+ | Dependency | From | To |
24
+ |------------|------|-----|
25
+ | tslib | ^2.1.0 | ^2.8.1 |
26
+
27
+ ---
28
+
29
+ Source: https://github.com/depup/npm | Original: https://www.npmjs.com/package/@firebase/storage-compat
30
+
31
+ License inherited from the original package.
package/changes.json ADDED
@@ -0,0 +1,10 @@
1
+ {
2
+ "bumped": {
3
+ "tslib": {
4
+ "from": "^2.1.0",
5
+ "to": "^2.8.1"
6
+ }
7
+ },
8
+ "timestamp": "2026-03-17T16:31:11.242Z",
9
+ "totalUpdated": 1
10
+ }
@@ -0,0 +1,398 @@
1
+ import firebase from '@firebase/app-compat';
2
+ import { _getChild, uploadBytesResumable, _dataFromString, _UploadTask, _FbsBlob, StringFormat, listAll, list, getMetadata, updateMetadata, getDownloadURL, deleteObject, _invalidRootOperation, _invalidArgument, ref, _Location, connectStorageEmulator, _TaskState, _TaskEvent } from '@firebase/storage';
3
+ import { Component } from '@firebase/component';
4
+
5
+ /**
6
+ * @license
7
+ * Copyright 2020 Google LLC
8
+ *
9
+ * Licensed under the Apache License, Version 2.0 (the "License");
10
+ * you may not use this file except in compliance with the License.
11
+ * You may obtain a copy of the License at
12
+ *
13
+ * http://www.apache.org/licenses/LICENSE-2.0
14
+ *
15
+ * Unless required by applicable law or agreed to in writing, software
16
+ * distributed under the License is distributed on an "AS IS" BASIS,
17
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
18
+ * See the License for the specific language governing permissions and
19
+ * limitations under the License.
20
+ */
21
+ class UploadTaskSnapshotCompat {
22
+ constructor(_delegate, task, ref) {
23
+ this._delegate = _delegate;
24
+ this.task = task;
25
+ this.ref = ref;
26
+ }
27
+ get bytesTransferred() {
28
+ return this._delegate.bytesTransferred;
29
+ }
30
+ get metadata() {
31
+ return this._delegate.metadata;
32
+ }
33
+ get state() {
34
+ return this._delegate.state;
35
+ }
36
+ get totalBytes() {
37
+ return this._delegate.totalBytes;
38
+ }
39
+ }
40
+
41
+ /**
42
+ * @license
43
+ * Copyright 2020 Google LLC
44
+ *
45
+ * Licensed under the Apache License, Version 2.0 (the "License");
46
+ * you may not use this file except in compliance with the License.
47
+ * You may obtain a copy of the License at
48
+ *
49
+ * http://www.apache.org/licenses/LICENSE-2.0
50
+ *
51
+ * Unless required by applicable law or agreed to in writing, software
52
+ * distributed under the License is distributed on an "AS IS" BASIS,
53
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
54
+ * See the License for the specific language governing permissions and
55
+ * limitations under the License.
56
+ */
57
+ class UploadTaskCompat {
58
+ constructor(_delegate, _ref) {
59
+ this._delegate = _delegate;
60
+ this._ref = _ref;
61
+ this.cancel = this._delegate.cancel.bind(this._delegate);
62
+ this.catch = this._delegate.catch.bind(this._delegate);
63
+ this.pause = this._delegate.pause.bind(this._delegate);
64
+ this.resume = this._delegate.resume.bind(this._delegate);
65
+ }
66
+ get snapshot() {
67
+ return new UploadTaskSnapshotCompat(this._delegate.snapshot, this, this._ref);
68
+ }
69
+ then(onFulfilled, onRejected) {
70
+ return this._delegate.then(snapshot => {
71
+ if (onFulfilled) {
72
+ return onFulfilled(new UploadTaskSnapshotCompat(snapshot, this, this._ref));
73
+ }
74
+ }, onRejected);
75
+ }
76
+ on(type, nextOrObserver, error, completed) {
77
+ let wrappedNextOrObserver = undefined;
78
+ if (!!nextOrObserver) {
79
+ if (typeof nextOrObserver === 'function') {
80
+ wrappedNextOrObserver = (taskSnapshot) => nextOrObserver(new UploadTaskSnapshotCompat(taskSnapshot, this, this._ref));
81
+ }
82
+ else {
83
+ wrappedNextOrObserver = {
84
+ next: !!nextOrObserver.next
85
+ ? (taskSnapshot) => nextOrObserver.next(new UploadTaskSnapshotCompat(taskSnapshot, this, this._ref))
86
+ : undefined,
87
+ complete: nextOrObserver.complete || undefined,
88
+ error: nextOrObserver.error || undefined
89
+ };
90
+ }
91
+ }
92
+ return this._delegate.on(type, wrappedNextOrObserver, error || undefined, completed || undefined);
93
+ }
94
+ }
95
+
96
+ class ListResultCompat {
97
+ constructor(_delegate, _service) {
98
+ this._delegate = _delegate;
99
+ this._service = _service;
100
+ }
101
+ get prefixes() {
102
+ return this._delegate.prefixes.map(ref => new ReferenceCompat(ref, this._service));
103
+ }
104
+ get items() {
105
+ return this._delegate.items.map(ref => new ReferenceCompat(ref, this._service));
106
+ }
107
+ get nextPageToken() {
108
+ return this._delegate.nextPageToken || null;
109
+ }
110
+ }
111
+
112
+ /**
113
+ * @license
114
+ * Copyright 2020 Google LLC
115
+ *
116
+ * Licensed under the Apache License, Version 2.0 (the "License");
117
+ * you may not use this file except in compliance with the License.
118
+ * You may obtain a copy of the License at
119
+ *
120
+ * http://www.apache.org/licenses/LICENSE-2.0
121
+ *
122
+ * Unless required by applicable law or agreed to in writing, software
123
+ * distributed under the License is distributed on an "AS IS" BASIS,
124
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
125
+ * See the License for the specific language governing permissions and
126
+ * limitations under the License.
127
+ */
128
+ class ReferenceCompat {
129
+ constructor(_delegate, storage) {
130
+ this._delegate = _delegate;
131
+ this.storage = storage;
132
+ }
133
+ get name() {
134
+ return this._delegate.name;
135
+ }
136
+ get bucket() {
137
+ return this._delegate.bucket;
138
+ }
139
+ get fullPath() {
140
+ return this._delegate.fullPath;
141
+ }
142
+ toString() {
143
+ return this._delegate.toString();
144
+ }
145
+ /**
146
+ * @returns A reference to the object obtained by
147
+ * appending childPath, removing any duplicate, beginning, or trailing
148
+ * slashes.
149
+ */
150
+ child(childPath) {
151
+ const reference = _getChild(this._delegate, childPath);
152
+ return new ReferenceCompat(reference, this.storage);
153
+ }
154
+ get root() {
155
+ return new ReferenceCompat(this._delegate.root, this.storage);
156
+ }
157
+ /**
158
+ * @returns A reference to the parent of the
159
+ * current object, or null if the current object is the root.
160
+ */
161
+ get parent() {
162
+ const reference = this._delegate.parent;
163
+ if (reference == null) {
164
+ return null;
165
+ }
166
+ return new ReferenceCompat(reference, this.storage);
167
+ }
168
+ /**
169
+ * Uploads a blob to this object's location.
170
+ * @param data - The blob to upload.
171
+ * @returns An UploadTask that lets you control and
172
+ * observe the upload.
173
+ */
174
+ put(data, metadata) {
175
+ this._throwIfRoot('put');
176
+ return new UploadTaskCompat(uploadBytesResumable(this._delegate, data, metadata), this);
177
+ }
178
+ /**
179
+ * Uploads a string to this object's location.
180
+ * @param value - The string to upload.
181
+ * @param format - The format of the string to upload.
182
+ * @returns An UploadTask that lets you control and
183
+ * observe the upload.
184
+ */
185
+ putString(value, format = StringFormat.RAW, metadata) {
186
+ this._throwIfRoot('putString');
187
+ const data = _dataFromString(format, value);
188
+ const metadataClone = { ...metadata };
189
+ if (metadataClone['contentType'] == null && data.contentType != null) {
190
+ metadataClone['contentType'] = data.contentType;
191
+ }
192
+ return new UploadTaskCompat(new _UploadTask(this._delegate, new _FbsBlob(data.data, true), metadataClone), this);
193
+ }
194
+ /**
195
+ * List all items (files) and prefixes (folders) under this storage reference.
196
+ *
197
+ * This is a helper method for calling list() repeatedly until there are
198
+ * no more results. The default pagination size is 1000.
199
+ *
200
+ * Note: The results may not be consistent if objects are changed while this
201
+ * operation is running.
202
+ *
203
+ * Warning: listAll may potentially consume too many resources if there are
204
+ * too many results.
205
+ *
206
+ * @returns A Promise that resolves with all the items and prefixes under
207
+ * the current storage reference. `prefixes` contains references to
208
+ * sub-directories and `items` contains references to objects in this
209
+ * folder. `nextPageToken` is never returned.
210
+ */
211
+ listAll() {
212
+ return listAll(this._delegate).then(r => new ListResultCompat(r, this.storage));
213
+ }
214
+ /**
215
+ * List items (files) and prefixes (folders) under this storage reference.
216
+ *
217
+ * List API is only available for Firebase Rules Version 2.
218
+ *
219
+ * GCS is a key-blob store. Firebase Storage imposes the semantic of '/'
220
+ * delimited folder structure. Refer to GCS's List API if you want to learn more.
221
+ *
222
+ * To adhere to Firebase Rules's Semantics, Firebase Storage does not
223
+ * support objects whose paths end with "/" or contain two consecutive
224
+ * "/"s. Firebase Storage List API will filter these unsupported objects.
225
+ * list() may fail if there are too many unsupported objects in the bucket.
226
+ *
227
+ * @param options - See ListOptions for details.
228
+ * @returns A Promise that resolves with the items and prefixes.
229
+ * `prefixes` contains references to sub-folders and `items`
230
+ * contains references to objects in this folder. `nextPageToken`
231
+ * can be used to get the rest of the results.
232
+ */
233
+ list(options) {
234
+ return list(this._delegate, options || undefined).then(r => new ListResultCompat(r, this.storage));
235
+ }
236
+ /**
237
+ * A `Promise` that resolves with the metadata for this object. If this
238
+ * object doesn't exist or metadata cannot be retrieved, the promise is
239
+ * rejected.
240
+ */
241
+ getMetadata() {
242
+ return getMetadata(this._delegate);
243
+ }
244
+ /**
245
+ * Updates the metadata for this object.
246
+ * @param metadata - The new metadata for the object.
247
+ * Only values that have been explicitly set will be changed. Explicitly
248
+ * setting a value to null will remove the metadata.
249
+ * @returns A `Promise` that resolves
250
+ * with the new metadata for this object.
251
+ * @see firebaseStorage.Reference.prototype.getMetadata
252
+ */
253
+ updateMetadata(metadata) {
254
+ return updateMetadata(this._delegate, metadata);
255
+ }
256
+ /**
257
+ * @returns A `Promise` that resolves with the download
258
+ * URL for this object.
259
+ */
260
+ getDownloadURL() {
261
+ return getDownloadURL(this._delegate);
262
+ }
263
+ /**
264
+ * Deletes the object at this location.
265
+ * @returns A `Promise` that resolves if the deletion succeeds.
266
+ */
267
+ delete() {
268
+ this._throwIfRoot('delete');
269
+ return deleteObject(this._delegate);
270
+ }
271
+ _throwIfRoot(name) {
272
+ if (this._delegate._location.path === '') {
273
+ throw _invalidRootOperation(name);
274
+ }
275
+ }
276
+ }
277
+
278
+ /**
279
+ * @license
280
+ * Copyright 2020 Google LLC
281
+ *
282
+ * Licensed under the Apache License, Version 2.0 (the "License");
283
+ * you may not use this file except in compliance with the License.
284
+ * You may obtain a copy of the License at
285
+ *
286
+ * http://www.apache.org/licenses/LICENSE-2.0
287
+ *
288
+ * Unless required by applicable law or agreed to in writing, software
289
+ * distributed under the License is distributed on an "AS IS" BASIS,
290
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
291
+ * See the License for the specific language governing permissions and
292
+ * limitations under the License.
293
+ */
294
+ /**
295
+ * A service that provides firebaseStorage.Reference instances.
296
+ * @param opt_url gs:// url to a custom Storage Bucket
297
+ */
298
+ class StorageServiceCompat {
299
+ constructor(app, _delegate) {
300
+ this.app = app;
301
+ this._delegate = _delegate;
302
+ }
303
+ get maxOperationRetryTime() {
304
+ return this._delegate.maxOperationRetryTime;
305
+ }
306
+ get maxUploadRetryTime() {
307
+ return this._delegate.maxUploadRetryTime;
308
+ }
309
+ /**
310
+ * Returns a firebaseStorage.Reference for the given path in the default
311
+ * bucket.
312
+ */
313
+ ref(path) {
314
+ if (isUrl(path)) {
315
+ throw _invalidArgument('ref() expected a child path but got a URL, use refFromURL instead.');
316
+ }
317
+ return new ReferenceCompat(ref(this._delegate, path), this);
318
+ }
319
+ /**
320
+ * Returns a firebaseStorage.Reference object for the given absolute URL,
321
+ * which must be a gs:// or http[s]:// URL.
322
+ */
323
+ refFromURL(url) {
324
+ if (!isUrl(url)) {
325
+ throw _invalidArgument('refFromURL() expected a full URL but got a child path, use ref() instead.');
326
+ }
327
+ try {
328
+ _Location.makeFromUrl(url, this._delegate.host);
329
+ }
330
+ catch (e) {
331
+ throw _invalidArgument('refFromUrl() expected a valid full URL but got an invalid one.');
332
+ }
333
+ return new ReferenceCompat(ref(this._delegate, url), this);
334
+ }
335
+ setMaxUploadRetryTime(time) {
336
+ this._delegate.maxUploadRetryTime = time;
337
+ }
338
+ setMaxOperationRetryTime(time) {
339
+ this._delegate.maxOperationRetryTime = time;
340
+ }
341
+ useEmulator(host, port, options = {}) {
342
+ connectStorageEmulator(this._delegate, host, port, options);
343
+ }
344
+ }
345
+ function isUrl(path) {
346
+ return /^[A-Za-z]+:\/\//.test(path);
347
+ }
348
+
349
+ const name = "@firebase/storage-compat";
350
+ const version = "0.4.1";
351
+
352
+ /**
353
+ * @license
354
+ * Copyright 2020 Google LLC
355
+ *
356
+ * Licensed under the Apache License, Version 2.0 (the "License");
357
+ * you may not use this file except in compliance with the License.
358
+ * You may obtain a copy of the License at
359
+ *
360
+ * http://www.apache.org/licenses/LICENSE-2.0
361
+ *
362
+ * Unless required by applicable law or agreed to in writing, software
363
+ * distributed under the License is distributed on an "AS IS" BASIS,
364
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
365
+ * See the License for the specific language governing permissions and
366
+ * limitations under the License.
367
+ */
368
+ /**
369
+ * Type constant for Firebase Storage.
370
+ */
371
+ const STORAGE_TYPE = 'storage-compat';
372
+ function factory(container, { instanceIdentifier: url }) {
373
+ // Dependencies
374
+ const app = container.getProvider('app-compat').getImmediate();
375
+ const storageExp = container
376
+ .getProvider('storage')
377
+ .getImmediate({ identifier: url });
378
+ const storageServiceCompat = new StorageServiceCompat(app, storageExp);
379
+ return storageServiceCompat;
380
+ }
381
+ function registerStorage(instance) {
382
+ const namespaceExports = {
383
+ // no-inline
384
+ TaskState: _TaskState,
385
+ TaskEvent: _TaskEvent,
386
+ StringFormat,
387
+ Storage: StorageServiceCompat,
388
+ Reference: ReferenceCompat
389
+ };
390
+ instance.INTERNAL.registerComponent(new Component(STORAGE_TYPE, factory, "PUBLIC" /* ComponentType.PUBLIC */)
391
+ .setServiceProps(namespaceExports)
392
+ .setMultipleInstances(true));
393
+ instance.registerVersion(name, version);
394
+ }
395
+ registerStorage(firebase);
396
+
397
+ export { registerStorage };
398
+ //# sourceMappingURL=index.esm.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.esm.js","sources":["../../src/tasksnapshot.ts","../../src/task.ts","../../src/list.ts","../../src/reference.ts","../../src/service.ts","../../src/index.ts"],"sourcesContent":["/**\n * @license\n * Copyright 2020 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { UploadTaskSnapshot } from '@firebase/storage';\nimport { ReferenceCompat } from './reference';\nimport { UploadTaskCompat } from './task';\nimport * as types from '@firebase/storage-types';\nimport { Compat } from '@firebase/util';\n\nexport class UploadTaskSnapshotCompat\n implements types.UploadTaskSnapshot, Compat<UploadTaskSnapshot>\n{\n constructor(\n readonly _delegate: UploadTaskSnapshot,\n readonly task: UploadTaskCompat,\n readonly ref: ReferenceCompat\n ) {}\n\n get bytesTransferred(): number {\n return this._delegate.bytesTransferred;\n }\n get metadata(): types.FullMetadata {\n return this._delegate.metadata as types.FullMetadata;\n }\n get state(): string {\n return this._delegate.state;\n }\n get totalBytes(): number {\n return this._delegate.totalBytes;\n }\n}\n","/**\n * @license\n * Copyright 2020 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport {\n UploadTask,\n StorageError,\n UploadTaskSnapshot,\n TaskEvent,\n StorageObserver\n} from '@firebase/storage';\nimport { UploadTaskSnapshotCompat } from './tasksnapshot';\nimport { ReferenceCompat } from './reference';\nimport * as types from '@firebase/storage-types';\nimport { Compat } from '@firebase/util';\n\nexport class UploadTaskCompat implements types.UploadTask, Compat<UploadTask> {\n constructor(\n readonly _delegate: UploadTask,\n private readonly _ref: ReferenceCompat\n ) {}\n\n get snapshot(): UploadTaskSnapshotCompat {\n return new UploadTaskSnapshotCompat(\n this._delegate.snapshot,\n this,\n this._ref\n );\n }\n\n cancel = this._delegate.cancel.bind(this._delegate);\n catch = this._delegate.catch.bind(this._delegate);\n pause = this._delegate.pause.bind(this._delegate);\n resume = this._delegate.resume.bind(this._delegate);\n\n then(\n onFulfilled?: ((a: UploadTaskSnapshotCompat) => unknown) | null,\n onRejected?: ((a: StorageError) => unknown) | null\n ): Promise<unknown> {\n return this._delegate.then(snapshot => {\n if (onFulfilled) {\n return onFulfilled(\n new UploadTaskSnapshotCompat(snapshot, this, this._ref)\n );\n }\n }, onRejected);\n }\n\n on(\n type: TaskEvent,\n nextOrObserver?:\n | types.StorageObserver<UploadTaskSnapshotCompat>\n | null\n | ((a: UploadTaskSnapshotCompat) => unknown),\n error?: ((error: StorageError) => void) | null,\n completed?: () => void | null\n ): Unsubscribe | Subscribe<UploadTaskSnapshotCompat> {\n let wrappedNextOrObserver:\n | StorageObserver<UploadTaskSnapshot>\n | undefined\n | ((a: UploadTaskSnapshot) => unknown) = undefined;\n if (!!nextOrObserver) {\n if (typeof nextOrObserver === 'function') {\n wrappedNextOrObserver = (taskSnapshot: UploadTaskSnapshot) =>\n nextOrObserver(\n new UploadTaskSnapshotCompat(taskSnapshot, this, this._ref)\n );\n } else {\n wrappedNextOrObserver = {\n next: !!nextOrObserver.next\n ? (taskSnapshot: UploadTaskSnapshot) =>\n nextOrObserver.next!(\n new UploadTaskSnapshotCompat(taskSnapshot, this, this._ref)\n )\n : undefined,\n complete: nextOrObserver.complete || undefined,\n error: nextOrObserver.error || undefined\n };\n }\n }\n return this._delegate.on(\n type,\n wrappedNextOrObserver,\n error || undefined,\n completed || undefined\n );\n }\n}\n\n/**\n * Subscribes to an event stream.\n */\nexport type Subscribe<T> = (\n next?: NextFn<T> | StorageObserver<T>,\n error?: ErrorFn,\n complete?: CompleteFn\n) => Unsubscribe;\n\n/**\n * Unsubscribes from a stream.\n */\nexport type Unsubscribe = () => void;\n\n/**\n * Function that is called once for each value in a stream of values.\n */\nexport type NextFn<T> = (value: T) => void;\n\n/**\n * A function that is called with a `FirebaseStorageError`\n * if the event stream ends due to an error.\n */\nexport type ErrorFn = (error: StorageError) => void;\n\n/**\n * A function that is called if the event stream ends normally.\n */\nexport type CompleteFn = () => void;\n","/**\n * @license\n * Copyright 2020 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { ListResult } from '@firebase/storage';\nimport * as types from '@firebase/storage-types';\nimport { ReferenceCompat } from './reference';\nimport { StorageServiceCompat } from './service';\nimport { Compat } from '@firebase/util';\n\nexport class ListResultCompat implements types.ListResult, Compat<ListResult> {\n constructor(\n readonly _delegate: ListResult,\n private readonly _service: StorageServiceCompat\n ) {}\n\n get prefixes(): ReferenceCompat[] {\n return this._delegate.prefixes.map(\n ref => new ReferenceCompat(ref, this._service)\n );\n }\n get items(): ReferenceCompat[] {\n return this._delegate.items.map(\n ref => new ReferenceCompat(ref, this._service)\n );\n }\n get nextPageToken(): string | null {\n return this._delegate.nextPageToken || null;\n }\n}\n","/**\n * @license\n * Copyright 2020 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport {\n StorageReference,\n uploadBytesResumable,\n list,\n listAll,\n getDownloadURL,\n getMetadata,\n updateMetadata,\n deleteObject,\n UploadTask,\n StringFormat,\n UploadMetadata,\n FullMetadata,\n SettableMetadata,\n _UploadTask,\n _getChild,\n _Reference,\n _FbsBlob,\n _dataFromString,\n _invalidRootOperation\n} from '@firebase/storage';\n\nimport { UploadTaskCompat } from './task';\nimport { ListResultCompat } from './list';\nimport { StorageServiceCompat } from './service';\n\nimport * as types from '@firebase/storage-types';\nimport { Compat } from '@firebase/util';\n\nexport class ReferenceCompat\n implements types.Reference, Compat<StorageReference>\n{\n constructor(\n readonly _delegate: StorageReference,\n public storage: StorageServiceCompat\n ) {}\n\n get name(): string {\n return this._delegate.name;\n }\n\n get bucket(): string {\n return this._delegate.bucket;\n }\n\n get fullPath(): string {\n return this._delegate.fullPath;\n }\n\n toString(): string {\n return this._delegate.toString();\n }\n\n /**\n * @returns A reference to the object obtained by\n * appending childPath, removing any duplicate, beginning, or trailing\n * slashes.\n */\n child(childPath: string): types.Reference {\n const reference = _getChild(this._delegate, childPath);\n return new ReferenceCompat(reference, this.storage);\n }\n\n get root(): types.Reference {\n return new ReferenceCompat(this._delegate.root, this.storage);\n }\n\n /**\n * @returns A reference to the parent of the\n * current object, or null if the current object is the root.\n */\n get parent(): types.Reference | null {\n const reference = this._delegate.parent;\n if (reference == null) {\n return null;\n }\n return new ReferenceCompat(reference, this.storage);\n }\n\n /**\n * Uploads a blob to this object's location.\n * @param data - The blob to upload.\n * @returns An UploadTask that lets you control and\n * observe the upload.\n */\n put(\n data: Blob | Uint8Array | ArrayBuffer,\n metadata?: types.FullMetadata\n ): types.UploadTask {\n this._throwIfRoot('put');\n return new UploadTaskCompat(\n uploadBytesResumable(this._delegate, data, metadata as UploadMetadata),\n this\n );\n }\n\n /**\n * Uploads a string to this object's location.\n * @param value - The string to upload.\n * @param format - The format of the string to upload.\n * @returns An UploadTask that lets you control and\n * observe the upload.\n */\n putString(\n value: string,\n format: StringFormat = StringFormat.RAW,\n metadata?: types.UploadMetadata\n ): types.UploadTask {\n this._throwIfRoot('putString');\n const data = _dataFromString(format, value);\n const metadataClone = { ...metadata };\n if (metadataClone['contentType'] == null && data.contentType != null) {\n metadataClone['contentType'] = data.contentType;\n }\n return new UploadTaskCompat(\n new _UploadTask(\n this._delegate as _Reference,\n new _FbsBlob(data.data, true),\n metadataClone as FullMetadata & { [k: string]: string }\n ) as UploadTask,\n this\n );\n }\n\n /**\n * List all items (files) and prefixes (folders) under this storage reference.\n *\n * This is a helper method for calling list() repeatedly until there are\n * no more results. The default pagination size is 1000.\n *\n * Note: The results may not be consistent if objects are changed while this\n * operation is running.\n *\n * Warning: listAll may potentially consume too many resources if there are\n * too many results.\n *\n * @returns A Promise that resolves with all the items and prefixes under\n * the current storage reference. `prefixes` contains references to\n * sub-directories and `items` contains references to objects in this\n * folder. `nextPageToken` is never returned.\n */\n listAll(): Promise<types.ListResult> {\n return listAll(this._delegate).then(\n r => new ListResultCompat(r, this.storage)\n );\n }\n\n /**\n * List items (files) and prefixes (folders) under this storage reference.\n *\n * List API is only available for Firebase Rules Version 2.\n *\n * GCS is a key-blob store. Firebase Storage imposes the semantic of '/'\n * delimited folder structure. Refer to GCS's List API if you want to learn more.\n *\n * To adhere to Firebase Rules's Semantics, Firebase Storage does not\n * support objects whose paths end with \"/\" or contain two consecutive\n * \"/\"s. Firebase Storage List API will filter these unsupported objects.\n * list() may fail if there are too many unsupported objects in the bucket.\n *\n * @param options - See ListOptions for details.\n * @returns A Promise that resolves with the items and prefixes.\n * `prefixes` contains references to sub-folders and `items`\n * contains references to objects in this folder. `nextPageToken`\n * can be used to get the rest of the results.\n */\n list(options?: types.ListOptions | null): Promise<types.ListResult> {\n return list(this._delegate, options || undefined).then(\n r => new ListResultCompat(r, this.storage)\n );\n }\n\n /**\n * A `Promise` that resolves with the metadata for this object. If this\n * object doesn't exist or metadata cannot be retrieved, the promise is\n * rejected.\n */\n getMetadata(): Promise<types.FullMetadata> {\n return getMetadata(this._delegate) as Promise<types.FullMetadata>;\n }\n\n /**\n * Updates the metadata for this object.\n * @param metadata - The new metadata for the object.\n * Only values that have been explicitly set will be changed. Explicitly\n * setting a value to null will remove the metadata.\n * @returns A `Promise` that resolves\n * with the new metadata for this object.\n * @see firebaseStorage.Reference.prototype.getMetadata\n */\n updateMetadata(\n metadata: types.SettableMetadata\n ): Promise<types.FullMetadata> {\n return updateMetadata(\n this._delegate,\n metadata as SettableMetadata\n ) as Promise<types.FullMetadata>;\n }\n\n /**\n * @returns A `Promise` that resolves with the download\n * URL for this object.\n */\n getDownloadURL(): Promise<string> {\n return getDownloadURL(this._delegate);\n }\n\n /**\n * Deletes the object at this location.\n * @returns A `Promise` that resolves if the deletion succeeds.\n */\n delete(): Promise<void> {\n this._throwIfRoot('delete');\n return deleteObject(this._delegate);\n }\n\n private _throwIfRoot(name: string): void {\n if ((this._delegate as _Reference)._location.path === '') {\n throw _invalidRootOperation(name);\n }\n }\n}\n","/**\n * @license\n * Copyright 2020 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport * as types from '@firebase/storage-types';\nimport { FirebaseApp } from '@firebase/app-types';\n\nimport {\n ref,\n connectStorageEmulator,\n FirebaseStorage,\n _Location,\n _invalidArgument,\n _FirebaseStorageImpl\n} from '@firebase/storage';\nimport { ReferenceCompat } from './reference';\nimport { Compat, EmulatorMockTokenOptions } from '@firebase/util';\n\n/**\n * A service that provides firebaseStorage.Reference instances.\n * @param opt_url gs:// url to a custom Storage Bucket\n */\nexport class StorageServiceCompat\n implements types.FirebaseStorage, Compat<FirebaseStorage>\n{\n constructor(public app: FirebaseApp, readonly _delegate: FirebaseStorage) {}\n\n get maxOperationRetryTime(): number {\n return this._delegate.maxOperationRetryTime;\n }\n\n get maxUploadRetryTime(): number {\n return this._delegate.maxUploadRetryTime;\n }\n\n /**\n * Returns a firebaseStorage.Reference for the given path in the default\n * bucket.\n */\n ref(path?: string): types.Reference {\n if (isUrl(path)) {\n throw _invalidArgument(\n 'ref() expected a child path but got a URL, use refFromURL instead.'\n );\n }\n return new ReferenceCompat(ref(this._delegate, path), this);\n }\n\n /**\n * Returns a firebaseStorage.Reference object for the given absolute URL,\n * which must be a gs:// or http[s]:// URL.\n */\n refFromURL(url: string): types.Reference {\n if (!isUrl(url)) {\n throw _invalidArgument(\n 'refFromURL() expected a full URL but got a child path, use ref() instead.'\n );\n }\n try {\n _Location.makeFromUrl(url, (this._delegate as _FirebaseStorageImpl).host);\n } catch (e) {\n throw _invalidArgument(\n 'refFromUrl() expected a valid full URL but got an invalid one.'\n );\n }\n return new ReferenceCompat(ref(this._delegate, url), this);\n }\n\n setMaxUploadRetryTime(time: number): void {\n this._delegate.maxUploadRetryTime = time;\n }\n\n setMaxOperationRetryTime(time: number): void {\n this._delegate.maxOperationRetryTime = time;\n }\n\n useEmulator(\n host: string,\n port: number,\n options: {\n mockUserToken?: EmulatorMockTokenOptions | string;\n } = {}\n ): void {\n connectStorageEmulator(this._delegate, host, port, options);\n }\n}\n\nfunction isUrl(path?: string): boolean {\n return /^[A-Za-z]+:\\/\\//.test(path as string);\n}\n","/**\n * @license\n * Copyright 2020 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n// eslint-disable-next-line import/no-extraneous-dependencies\nimport firebase from '@firebase/app-compat';\nimport { _FirebaseNamespace } from '@firebase/app-types/private';\nimport {\n StringFormat,\n _TaskEvent as TaskEvent,\n _TaskState as TaskState\n} from '@firebase/storage';\n\nimport { ReferenceCompat } from './reference';\nimport { StorageServiceCompat } from './service';\nimport * as types from '@firebase/storage-types';\nimport {\n Component,\n ComponentType,\n ComponentContainer,\n InstanceFactoryOptions\n} from '@firebase/component';\n\nimport { name, version } from '../package.json';\n\n/**\n * Type constant for Firebase Storage.\n */\nconst STORAGE_TYPE = 'storage-compat';\n\nfunction factory(\n container: ComponentContainer,\n { instanceIdentifier: url }: InstanceFactoryOptions\n): types.FirebaseStorage {\n // Dependencies\n const app = container.getProvider('app-compat').getImmediate();\n const storageExp = container\n .getProvider('storage')\n .getImmediate({ identifier: url });\n\n const storageServiceCompat: StorageServiceCompat = new StorageServiceCompat(\n app,\n storageExp\n );\n return storageServiceCompat;\n}\n\nexport function registerStorage(instance: _FirebaseNamespace): void {\n const namespaceExports = {\n // no-inline\n TaskState,\n TaskEvent,\n StringFormat,\n Storage: StorageServiceCompat,\n Reference: ReferenceCompat\n };\n instance.INTERNAL.registerComponent(\n new Component(STORAGE_TYPE, factory, ComponentType.PUBLIC)\n .setServiceProps(namespaceExports)\n .setMultipleInstances(true)\n );\n\n instance.registerVersion(name, version);\n}\n\nregisterStorage(firebase as unknown as _FirebaseNamespace);\n\n/**\n * Define extension behavior for `registerStorage`\n */\ndeclare module '@firebase/app-compat' {\n interface FirebaseNamespace {\n storage?: {\n (app?: FirebaseApp, url?: string): types.FirebaseStorage;\n Storage: typeof types.FirebaseStorage;\n\n StringFormat: {\n BASE64: types.StringFormat;\n BASE64URL: types.StringFormat;\n DATA_URL: types.StringFormat;\n RAW: types.StringFormat;\n };\n TaskEvent: {\n STATE_CHANGED: types.TaskEvent;\n };\n TaskState: {\n CANCELED: types.TaskState;\n ERROR: types.TaskState;\n PAUSED: types.TaskState;\n RUNNING: types.TaskState;\n SUCCESS: types.TaskState;\n };\n };\n }\n interface FirebaseApp {\n storage?(storageBucket?: string): types.FirebaseStorage;\n }\n}\n"],"names":["TaskState","TaskEvent"],"mappings":";;;;AAAA;;;;;;;;;;;;;;;AAeG;MAQU,wBAAwB,CAAA;AAGnC,IAAA,WAAA,CACW,SAA6B,EAC7B,IAAsB,EACtB,GAAoB,EAAA;QAFpB,IAAS,CAAA,SAAA,GAAT,SAAS,CAAoB;QAC7B,IAAI,CAAA,IAAA,GAAJ,IAAI,CAAkB;QACtB,IAAG,CAAA,GAAA,GAAH,GAAG,CAAiB;KAC3B;AAEJ,IAAA,IAAI,gBAAgB,GAAA;AAClB,QAAA,OAAO,IAAI,CAAC,SAAS,CAAC,gBAAgB,CAAC;KACxC;AACD,IAAA,IAAI,QAAQ,GAAA;AACV,QAAA,OAAO,IAAI,CAAC,SAAS,CAAC,QAA8B,CAAC;KACtD;AACD,IAAA,IAAI,KAAK,GAAA;AACP,QAAA,OAAO,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC;KAC7B;AACD,IAAA,IAAI,UAAU,GAAA;AACZ,QAAA,OAAO,IAAI,CAAC,SAAS,CAAC,UAAU,CAAC;KAClC;AACF;;AC5CD;;;;;;;;;;;;;;;AAeG;MAcU,gBAAgB,CAAA;IAC3B,WACW,CAAA,SAAqB,EACb,IAAqB,EAAA;QAD7B,IAAS,CAA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AAY,CAAC,CAAC,YAAY,EAAE,CAAC;IAC/D,MAAM,UAAU,GAAG,SAAS;SACzB,WAAW,CAAC,SAAS,CAAC;AACtB,SAAA,YAAY,CAAC,EAAE,UAAU,EAAE,GAAG,EAAE,CAAC,CAAC;IAErC,MAAM,oBAAoB,GAAyB,IAAI,oBAAoB,CACzE,GAAG,EACH,UAAU,CACX,CAAC;AACF,IAAA,OAAO,oBAAoB,CAAC;AAC9B,CAAC;AAEK,SAAU,eAAe,CAAC,QAA4B,EAAA;AAC1D,IAAA,MAAM,gBAAgB,GAAG;;mBAEvBA,UAAS;mBACTC,UAAS;QACT,YAAY;AACZ,QAAA,OAAO,EAAE,oBAAoB;AAC7B,QAAA,SAAS,EAAE,eAAe;KAC3B,CAAC;IACF,QAAQ,CAAC,QAAQ,CAAC,iBAAiB,CACjC,IAAI,SAAS,CAAC,YAAY,EAAE,OAAO,EAAuB,QAAA,4BAAA;SACvD,eAAe,CAAC,gBAAgB,CAAC;AACjC,SAAA,oBAAoB,CAAC,IAAI,CAAC,CAC9B,CAAC;AAEF,IAAA,QAAQ,CAAC,eAAe,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC;AAC1C,CAAC;AAED,eAAe,CAAC,QAAyC,CAAC;;;;"}
@@ -0,0 +1 @@
1
+ {"type":"module"}
@@ -0,0 +1,49 @@
1
+ /**
2
+ * @license
3
+ * Copyright 2020 Google LLC
4
+ *
5
+ * Licensed under the Apache License, Version 2.0 (the "License");
6
+ * you may not use this file except in compliance with the License.
7
+ * You may obtain a copy of the License at
8
+ *
9
+ * http://www.apache.org/licenses/LICENSE-2.0
10
+ *
11
+ * Unless required by applicable law or agreed to in writing, software
12
+ * distributed under the License is distributed on an "AS IS" BASIS,
13
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ * See the License for the specific language governing permissions and
15
+ * limitations under the License.
16
+ */
17
+ import { _FirebaseNamespace } from '@firebase/app-types/private';
18
+ import * as types from '@firebase/storage-types';
19
+ export declare function registerStorage(instance: _FirebaseNamespace): void;
20
+ /**
21
+ * Define extension behavior for `registerStorage`
22
+ */
23
+ declare module '@firebase/app-compat' {
24
+ interface FirebaseNamespace {
25
+ storage?: {
26
+ (app?: FirebaseApp, url?: string): types.FirebaseStorage;
27
+ Storage: typeof types.FirebaseStorage;
28
+ StringFormat: {
29
+ BASE64: types.StringFormat;
30
+ BASE64URL: types.StringFormat;
31
+ DATA_URL: types.StringFormat;
32
+ RAW: types.StringFormat;
33
+ };
34
+ TaskEvent: {
35
+ STATE_CHANGED: types.TaskEvent;
36
+ };
37
+ TaskState: {
38
+ CANCELED: types.TaskState;
39
+ ERROR: types.TaskState;
40
+ PAUSED: types.TaskState;
41
+ RUNNING: types.TaskState;
42
+ SUCCESS: types.TaskState;
43
+ };
44
+ };
45
+ }
46
+ interface FirebaseApp {
47
+ storage?(storageBucket?: string): types.FirebaseStorage;
48
+ }
49
+ }
@@ -0,0 +1,29 @@
1
+ /**
2
+ * @license
3
+ * Copyright 2020 Google LLC
4
+ *
5
+ * Licensed under the Apache License, Version 2.0 (the "License");
6
+ * you may not use this file except in compliance with the License.
7
+ * You may obtain a copy of the License at
8
+ *
9
+ * http://www.apache.org/licenses/LICENSE-2.0
10
+ *
11
+ * Unless required by applicable law or agreed to in writing, software
12
+ * distributed under the License is distributed on an "AS IS" BASIS,
13
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ * See the License for the specific language governing permissions and
15
+ * limitations under the License.
16
+ */
17
+ import { ListResult } from '@firebase/storage';
18
+ import * as types from '@firebase/storage-types';
19
+ import { ReferenceCompat } from './reference';
20
+ import { StorageServiceCompat } from './service';
21
+ import { Compat } from '@firebase/util';
22
+ export declare class ListResultCompat implements types.ListResult, Compat<ListResult> {
23
+ readonly _delegate: ListResult;
24
+ private readonly _service;
25
+ constructor(_delegate: ListResult, _service: StorageServiceCompat);
26
+ get prefixes(): ReferenceCompat[];
27
+ get items(): ReferenceCompat[];
28
+ get nextPageToken(): string | null;
29
+ }