No Description
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

index.esm5.js.map 30KB

1
  1. {"version":3,"file":"index.esm5.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 retreived, 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;AAQH,IAAA,wBAAA,kBAAA,YAAA;AAGE,IAAA,SAAA,wBAAA,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,MAAA,CAAA,cAAA,CAAI,wBAAgB,CAAA,SAAA,EAAA,kBAAA,EAAA;AAApB,QAAA,GAAA,EAAA,YAAA;AACE,YAAA,OAAO,IAAI,CAAC,SAAS,CAAC,gBAAgB,CAAC;SACxC;;;AAAA,KAAA,CAAA,CAAA;AACD,IAAA,MAAA,CAAA,cAAA,CAAI,wBAAQ,CAAA,SAAA,EAAA,UAAA,EAAA;AAAZ,QAAA,GAAA,EAAA,YAAA;AACE,YAAA,OAAO,IAAI,CAAC,SAAS,CAAC,QAA8B,CAAC;SACtD;;;AAAA,KAAA,CAAA,CAAA;AACD,IAAA,MAAA,CAAA,cAAA,CAAI,wBAAK,CAAA,SAAA,EAAA,OAAA,EAAA;AAAT,QAAA,GAAA,EAAA,YAAA;AACE,YAAA,OAAO,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC;SAC7B;;;AAAA,KAAA,CAAA,CAAA;AACD,IAAA,MAAA,CAAA,cAAA,CAAI,wBAAU,CAAA,SAAA,EAA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