1 line
No EOL
6.6 KiB
Text
1 line
No EOL
6.6 KiB
Text
{"version":3,"file":"angular-fire-functions.js","sources":["../../../src/functions/functions.ts","../../../src/functions/functions.module.ts","../../../src/functions/rxfire.ts","../../../src/functions/firebase.ts","../../../src/functions/angular-fire-functions.ts"],"sourcesContent":["import { Functions as FirebaseFunctions } from 'firebase/functions';\nimport { ɵgetAllInstancesOf } from '@angular/fire';\nimport { from, timer } from 'rxjs';\nimport { concatMap, distinct } from 'rxjs/operators';\n\n// see notes in core/firebase.app.module.ts for why we're building the class like this\n// tslint:disable-next-line:no-empty-interface\nexport interface Functions extends FirebaseFunctions {}\n\nexport class Functions {\n constructor(functions: FirebaseFunctions) {\n return functions;\n }\n}\n\nexport const FUNCTIONS_PROVIDER_NAME = 'functions';\n\n// tslint:disable-next-line:no-empty-interface\nexport interface FunctionsInstances extends Array<FirebaseFunctions> {}\n\nexport class FunctionsInstances {\n constructor() {\n return ɵgetAllInstancesOf<FirebaseFunctions>(FUNCTIONS_PROVIDER_NAME);\n }\n}\n\nexport const functionInstance$ = timer(0, 300).pipe(\n concatMap(() => from(ɵgetAllInstancesOf<FirebaseFunctions>(FUNCTIONS_PROVIDER_NAME))),\n distinct(),\n);\n","import { NgModule, Optional, NgZone, InjectionToken, ModuleWithProviders, Injector } from '@angular/core';\nimport { Functions as FirebaseFunctions } from 'firebase/functions';\nimport { ɵgetDefaultInstanceOf, ɵAngularFireSchedulers, VERSION } from '@angular/fire';\nimport { Functions, FunctionsInstances, FUNCTIONS_PROVIDER_NAME } from './functions';\nimport { FirebaseApps, FirebaseApp } from '@angular/fire/app';\nimport { AuthInstances } from '@angular/fire/auth';\nimport { registerVersion } from 'firebase/app';\nimport { AppCheckInstances } from '@angular/fire/app-check';\n\nexport const PROVIDED_FUNCTIONS_INSTANCES = new InjectionToken<Functions[]>('angularfire2.functions-instances');\n\nexport function defaultFunctionsInstanceFactory(provided: FirebaseFunctions[]|undefined, defaultApp: FirebaseApp) {\n const defaultAuth = ɵgetDefaultInstanceOf<FirebaseFunctions>(FUNCTIONS_PROVIDER_NAME, provided, defaultApp);\n return defaultAuth && new Functions(defaultAuth);\n}\n\nexport function functionsInstanceFactory(fn: (injector: Injector) => FirebaseFunctions) {\n return (zone: NgZone, injector: Injector) => {\n const functions = zone.runOutsideAngular(() => fn(injector));\n return new Functions(functions);\n };\n}\n\nconst FUNCTIONS_INSTANCES_PROVIDER = {\n provide: FunctionsInstances,\n deps: [\n [new Optional(), PROVIDED_FUNCTIONS_INSTANCES ],\n ]\n};\n\nconst DEFAULT_FUNCTIONS_INSTANCE_PROVIDER = {\n provide: Functions,\n useFactory: defaultFunctionsInstanceFactory,\n deps: [\n [new Optional(), PROVIDED_FUNCTIONS_INSTANCES ],\n FirebaseApp,\n ]\n};\n\n@NgModule({\n providers: [\n DEFAULT_FUNCTIONS_INSTANCE_PROVIDER,\n FUNCTIONS_INSTANCES_PROVIDER,\n ]\n})\nexport class FunctionsModule {\n constructor() {\n registerVersion('angularfire', VERSION.full, 'fn');\n }\n}\n\nexport function provideFunctions(fn: (injector: Injector) => FirebaseFunctions, ...deps: any[]): ModuleWithProviders<FunctionsModule> {\n return {\n ngModule: FunctionsModule,\n providers: [{\n provide: PROVIDED_FUNCTIONS_INSTANCES,\n useFactory: functionsInstanceFactory(fn),\n multi: true,\n deps: [\n NgZone,\n Injector,\n ɵAngularFireSchedulers,\n FirebaseApps,\n // Defensively load Auth first, if provided\n [new Optional(), AuthInstances ],\n [new Optional(), AppCheckInstances ],\n ...deps,\n ]\n }]\n };\n}\n","// DO NOT MODIFY, this file is autogenerated by tools/build.ts\nimport { ɵzoneWrap } from '@angular/fire';\nimport {\n httpsCallable as _httpsCallable\n} from 'rxfire/functions';\n\nexport const httpsCallableData = ɵzoneWrap(_httpsCallable, true);\n","// DO NOT MODIFY, this file is autogenerated by tools/build.ts\nexport * from 'firebase/functions';\nimport { ɵzoneWrap } from '@angular/fire';\nimport {\n connectFunctionsEmulator as _connectFunctionsEmulator,\n getFunctions as _getFunctions,\n httpsCallable as _httpsCallable,\n httpsCallableFromURL as _httpsCallableFromURL\n} from 'firebase/functions';\n\nexport const connectFunctionsEmulator = ɵzoneWrap(_connectFunctionsEmulator, true);\nexport const getFunctions = ɵzoneWrap(_getFunctions, true);\nexport const httpsCallable = ɵzoneWrap(_httpsCallable, true);\nexport const httpsCallableFromURL = ɵzoneWrap(_httpsCallableFromURL, true);\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":["_httpsCallable","_connectFunctionsEmulator","_getFunctions","_httpsCallableFromURL"],"mappings":";;;;;;;;;;;;;MASa,SAAS;IACpB,YAAY,SAA4B;QACtC,OAAO,SAAS,CAAC;KAClB;CACF;AAEM,MAAM,uBAAuB,GAAG,WAAW,CAAC;MAKtC,kBAAkB;IAC7B;QACE,OAAO,kBAAkB,CAAoB,uBAAuB,CAAC,CAAC;KACvE;CACF;MAEY,iBAAiB,GAAG,KAAK,CAAC,CAAC,EAAE,GAAG,CAAC,CAAC,IAAI,CACjD,SAAS,CAAC,MAAM,IAAI,CAAC,kBAAkB,CAAoB,uBAAuB,CAAC,CAAC,CAAC,EACrF,QAAQ,EAAE;;ACnBL,MAAM,4BAA4B,GAAG,IAAI,cAAc,CAAc,kCAAkC,CAAC,CAAC;SAEhG,+BAA+B,CAAC,QAAuC,EAAE,UAAuB;IAC9G,MAAM,WAAW,GAAG,qBAAqB,CAAoB,uBAAuB,EAAE,QAAQ,EAAE,UAAU,CAAC,CAAC;IAC5G,OAAO,WAAW,IAAI,IAAI,SAAS,CAAC,WAAW,CAAC,CAAC;AACnD,CAAC;SAEe,wBAAwB,CAAC,EAA6C;IACpF,OAAO,CAAC,IAAY,EAAE,QAAkB;QACtC,MAAM,SAAS,GAAG,IAAI,CAAC,iBAAiB,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,CAAC,CAAC;QAC7D,OAAO,IAAI,SAAS,CAAC,SAAS,CAAC,CAAC;KACjC,CAAC;AACJ,CAAC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