@angular/fire 19.0.0-rc.5 → 19.1.0-canary.20bee94
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/ai/ai.d.ts +13 -0
- package/ai/ai.module.d.ts +15 -0
- package/ai/firebase.d.ts +6 -0
- package/ai/index.d.ts +5 -0
- package/ai/package.json +3 -0
- package/ai/public_api.d.ts +3 -0
- package/app-check/app-check.d.ts +6 -0
- package/app-check/public_api.d.ts +1 -2
- package/auth/firebase.d.ts +1 -2
- package/core.d.ts +0 -7
- package/database/firebase.d.ts +1 -2
- package/docs/zones.md +20 -2
- package/fesm2022/angular-fire-ai.mjs +102 -0
- package/fesm2022/angular-fire-ai.mjs.map +1 -0
- package/fesm2022/angular-fire-analytics.mjs +8 -8
- package/fesm2022/angular-fire-analytics.mjs.map +1 -1
- package/fesm2022/angular-fire-app-check.mjs +12 -7
- package/fesm2022/angular-fire-app-check.mjs.map +1 -1
- package/fesm2022/angular-fire-auth.mjs +43 -43
- package/fesm2022/angular-fire-auth.mjs.map +1 -1
- package/fesm2022/angular-fire-compat-storage.mjs +4 -4
- package/fesm2022/angular-fire-compat-storage.mjs.map +1 -1
- package/fesm2022/angular-fire-data-connect.mjs +3 -3
- package/fesm2022/angular-fire-data-connect.mjs.map +1 -1
- package/fesm2022/angular-fire-database.mjs +27 -27
- package/fesm2022/angular-fire-database.mjs.map +1 -1
- package/fesm2022/angular-fire-firestore-lite.mjs +34 -38
- package/fesm2022/angular-fire-firestore-lite.mjs.map +1 -1
- package/fesm2022/angular-fire-firestore.mjs +35 -45
- package/fesm2022/angular-fire-firestore.mjs.map +1 -1
- package/fesm2022/angular-fire-functions.mjs +3 -2
- package/fesm2022/angular-fire-functions.mjs.map +1 -1
- package/fesm2022/angular-fire-messaging.mjs +1 -1
- package/fesm2022/angular-fire-messaging.mjs.map +1 -1
- package/fesm2022/angular-fire-performance.mjs +1 -1
- package/fesm2022/angular-fire-performance.mjs.map +1 -1
- package/fesm2022/angular-fire-remote-config.mjs +3 -2
- package/fesm2022/angular-fire-remote-config.mjs.map +1 -1
- package/fesm2022/angular-fire-storage.mjs +6 -5
- package/fesm2022/angular-fire-storage.mjs.map +1 -1
- package/fesm2022/angular-fire-vertexai.mjs +7 -4
- package/fesm2022/angular-fire-vertexai.mjs.map +1 -1
- package/fesm2022/angular-fire.mjs +25 -63
- package/fesm2022/angular-fire.mjs.map +1 -1
- package/firestore/firebase.d.ts +1 -12
- package/firestore/lite/firebase.d.ts +1 -6
- package/package.json +10 -6
- package/publish.sh +1 -1
- package/remote-config/firebase.d.ts +2 -1
- package/schematics/deploy/builder.js +229 -91
- package/schematics/setup/index.js +196 -58
- package/vertexai/firebase.d.ts +3 -1
- package/vertexai/vertexai.d.ts +1 -1
- package/zones.d.ts +8 -4
|
@@ -7,7 +7,7 @@ import { InjectionToken, Optional, PLATFORM_ID, NgModule, makeEnvironmentProvide
|
|
|
7
7
|
import { FirebaseApp, FirebaseApps } from '@angular/fire/app';
|
|
8
8
|
import { registerVersion } from 'firebase/app';
|
|
9
9
|
import { getAll as getAll$1, getBoolean as getBoolean$1, getNumber as getNumber$1, getString as getString$1, getValue as getValue$1 } from 'rxfire/remote-config';
|
|
10
|
-
import { activate as activate$1, ensureInitialized as ensureInitialized$1, fetchAndActivate as fetchAndActivate$1, fetchConfig as fetchConfig$1, getAll as getAll$2, getBoolean as getBoolean$2, getNumber as getNumber$2, getRemoteConfig as getRemoteConfig$1, getString as getString$2, getValue as getValue$2, isSupported as isSupported$1, setLogLevel as setLogLevel$1 } from 'firebase/remote-config';
|
|
10
|
+
import { activate as activate$1, ensureInitialized as ensureInitialized$1, fetchAndActivate as fetchAndActivate$1, fetchConfig as fetchConfig$1, getAll as getAll$2, getBoolean as getBoolean$2, getNumber as getNumber$2, getRemoteConfig as getRemoteConfig$1, getString as getString$2, getValue as getValue$2, isSupported as isSupported$1, setCustomSignals as setCustomSignals$1, setLogLevel as setLogLevel$1 } from 'firebase/remote-config';
|
|
11
11
|
export * from 'firebase/remote-config';
|
|
12
12
|
|
|
13
13
|
class RemoteConfig {
|
|
@@ -115,11 +115,12 @@ const getRemoteConfig = _zoneWrap(getRemoteConfig$1, true);
|
|
|
115
115
|
const getString = _zoneWrap(getString$2, true);
|
|
116
116
|
const getValue = _zoneWrap(getValue$2, true);
|
|
117
117
|
const isSupported = _zoneWrap(isSupported$1, true);
|
|
118
|
+
const setCustomSignals = _zoneWrap(setCustomSignals$1, true);
|
|
118
119
|
const setLogLevel = _zoneWrap(setLogLevel$1, true);
|
|
119
120
|
|
|
120
121
|
/**
|
|
121
122
|
* Generated bundle index. Do not edit.
|
|
122
123
|
*/
|
|
123
124
|
|
|
124
|
-
export { RemoteConfig, RemoteConfigInstances, RemoteConfigModule, activate, ensureInitialized, fetchAndActivate, fetchConfig, getAll, getAllChanges, getBoolean, getBooleanChanges, getNumber, getNumberChanges, getRemoteConfig, getString, getStringChanges, getValue, getValueChanges, isSupported, provideRemoteConfig, remoteConfigInstance$, setLogLevel };
|
|
125
|
+
export { RemoteConfig, RemoteConfigInstances, RemoteConfigModule, activate, ensureInitialized, fetchAndActivate, fetchConfig, getAll, getAllChanges, getBoolean, getBooleanChanges, getNumber, getNumberChanges, getRemoteConfig, getString, getStringChanges, getValue, getValueChanges, isSupported, provideRemoteConfig, remoteConfigInstance$, setCustomSignals, setLogLevel };
|
|
125
126
|
//# sourceMappingURL=angular-fire-remote-config.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"angular-fire-remote-config.mjs","sources":["../../../src/remote-config/remote-config.ts","../../../src/remote-config/remote-config.module.ts","../../../src/remote-config/rxfire.ts","../../../src/remote-config/firebase.ts","../../../src/remote-config/angular-fire-remote-config.ts"],"sourcesContent":["import { ɵgetAllInstancesOf } from '@angular/fire';\nimport { RemoteConfig as FirebaseRemoteConfig } from 'firebase/remote-config';\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// eslint-disable-next-line @typescript-eslint/no-empty-interface\nexport interface RemoteConfig extends FirebaseRemoteConfig {}\n\nexport class RemoteConfig {\n constructor(remoteConfig: FirebaseRemoteConfig) {\n return remoteConfig;\n }\n}\n\nexport const REMOTE_CONFIG_PROVIDER_NAME = 'remote-config';\n\n// eslint-disable-next-line @typescript-eslint/no-empty-interface\nexport interface RemoteConfigInstances extends Array<FirebaseRemoteConfig> {}\n\nexport class RemoteConfigInstances {\n constructor() {\n return ɵgetAllInstancesOf<FirebaseRemoteConfig>(REMOTE_CONFIG_PROVIDER_NAME);\n }\n}\n\nexport const remoteConfigInstance$ = timer(0, 300).pipe(\n concatMap(() => from(ɵgetAllInstancesOf<FirebaseRemoteConfig>(REMOTE_CONFIG_PROVIDER_NAME))),\n distinct(),\n);\n","import { isPlatformServer } from '@angular/common';\nimport {\n EnvironmentProviders,\n InjectionToken,\n Injector,\n NgModule,\n NgZone,\n Optional,\n PLATFORM_ID,\n makeEnvironmentProviders,\n} from '@angular/core';\nimport { VERSION, ɵAngularFireSchedulers, ɵgetDefaultInstanceOf } from '@angular/fire';\nimport { FirebaseApp, FirebaseApps } from '@angular/fire/app';\nimport { registerVersion } from 'firebase/app';\nimport { RemoteConfig as FirebaseRemoteConfig } from 'firebase/remote-config';\nimport { REMOTE_CONFIG_PROVIDER_NAME, RemoteConfig, RemoteConfigInstances } from './remote-config';\n\nexport const PROVIDED_REMOTE_CONFIG_INSTANCES = new InjectionToken<RemoteConfig[]>('angularfire2.remote-config-instances');\n\nexport function defaultRemoteConfigInstanceFactory(\n provided: FirebaseRemoteConfig[]|undefined,\n defaultApp: FirebaseApp,\n platformId: object,\n) {\n if (isPlatformServer(platformId)) { return null; }\n const defaultRemoteConfig = ɵgetDefaultInstanceOf<FirebaseRemoteConfig>(REMOTE_CONFIG_PROVIDER_NAME, provided, defaultApp);\n return defaultRemoteConfig && new RemoteConfig(defaultRemoteConfig);\n}\n\nexport function remoteConfigInstanceFactory(fn: (injector: Injector) => FirebaseRemoteConfig) {\n return (zone: NgZone, injector: Injector, platformId: object) => {\n if (isPlatformServer(platformId)) { return null; }\n const remoteConfig = zone.runOutsideAngular(() => fn(injector));\n return new RemoteConfig(remoteConfig);\n };\n}\n\nconst REMOTE_CONFIG_INSTANCES_PROVIDER = {\n provide: RemoteConfigInstances,\n deps: [\n [new Optional(), PROVIDED_REMOTE_CONFIG_INSTANCES ],\n ]\n};\n\nconst DEFAULT_REMOTE_CONFIG_INSTANCE_PROVIDER = {\n provide: RemoteConfig,\n useFactory: defaultRemoteConfigInstanceFactory,\n deps: [\n [new Optional(), PROVIDED_REMOTE_CONFIG_INSTANCES ],\n FirebaseApp,\n PLATFORM_ID,\n ]\n};\n\n@NgModule({\n providers: [\n DEFAULT_REMOTE_CONFIG_INSTANCE_PROVIDER,\n REMOTE_CONFIG_INSTANCES_PROVIDER,\n ]\n})\nexport class RemoteConfigModule {\n constructor() {\n registerVersion('angularfire', VERSION.full, 'rc');\n }\n}\n\nexport function provideRemoteConfig(\n fn: (injector: Injector) => FirebaseRemoteConfig, ...deps: any[]\n): EnvironmentProviders {\n registerVersion('angularfire', VERSION.full, 'rc');\n\n return makeEnvironmentProviders([\n DEFAULT_REMOTE_CONFIG_INSTANCE_PROVIDER,\n REMOTE_CONFIG_INSTANCES_PROVIDER,\n {\n provide: PROVIDED_REMOTE_CONFIG_INSTANCES,\n useFactory: remoteConfigInstanceFactory(fn),\n multi: true,\n deps: [\n NgZone,\n Injector,\n PLATFORM_ID,\n ɵAngularFireSchedulers,\n FirebaseApps,\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 getAll as _getAll,\n getBoolean as _getBoolean,\n getNumber as _getNumber,\n getString as _getString,\n getValue as _getValue\n} from 'rxfire/remote-config';\n\nexport const getAllChanges = ɵzoneWrap(_getAll, true);\nexport const getBooleanChanges = ɵzoneWrap(_getBoolean, true);\nexport const getNumberChanges = ɵzoneWrap(_getNumber, true);\nexport const getStringChanges = ɵzoneWrap(_getString, true);\nexport const getValueChanges = ɵzoneWrap(_getValue, true);\n","// DO NOT MODIFY, this file is autogenerated by tools/build.ts\nexport * from 'firebase/remote-config';\nimport { ɵzoneWrap } from '@angular/fire';\nimport {\n activate as _activate,\n ensureInitialized as _ensureInitialized,\n fetchAndActivate as _fetchAndActivate,\n fetchConfig as _fetchConfig,\n getAll as _getAll,\n getBoolean as _getBoolean,\n getNumber as _getNumber,\n getRemoteConfig as _getRemoteConfig,\n getString as _getString,\n getValue as _getValue,\n isSupported as _isSupported,\n setLogLevel as _setLogLevel\n} from 'firebase/remote-config';\n\nexport const activate = ɵzoneWrap(_activate, true);\nexport const ensureInitialized = ɵzoneWrap(_ensureInitialized, true);\nexport const fetchAndActivate = ɵzoneWrap(_fetchAndActivate, true);\nexport const fetchConfig = ɵzoneWrap(_fetchConfig, true);\nexport const getAll = ɵzoneWrap(_getAll, true);\nexport const getBoolean = ɵzoneWrap(_getBoolean, true);\nexport const getNumber = ɵzoneWrap(_getNumber, true);\nexport const getRemoteConfig = ɵzoneWrap(_getRemoteConfig, true);\nexport const getString = ɵzoneWrap(_getString, true);\nexport const getValue = ɵzoneWrap(_getValue, true);\nexport const isSupported = ɵzoneWrap(_isSupported, true);\nexport const setLogLevel = ɵzoneWrap(_setLogLevel, true);\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":["ɵgetAllInstancesOf","ɵgetDefaultInstanceOf","ɵAngularFireSchedulers","ɵzoneWrap","_getAll","_getBoolean","_getNumber","_getString","_getValue","_activate","_ensureInitialized","_fetchAndActivate","_fetchConfig","_getRemoteConfig","_isSupported","_setLogLevel"],"mappings":";;;;;;;;;;;;MASa,YAAY,CAAA;AACvB,IAAA,WAAA,CAAY,YAAkC,EAAA;AAC5C,QAAA,OAAO,YAAY;;AAEtB;AAEM,MAAM,2BAA2B,GAAG,eAA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AO,EAAE,IAAI;AACvC,MAAA,iBAAiB,GAAGD,SAAS,CAACE,YAAW,EAAE,IAAI;AAC/C,MAAA,gBAAgB,GAAGF,SAAS,CAACG,WAAU,EAAE,IAAI;AAC7C,MAAA,gBAAgB,GAAGH,SAAS,CAACI,WAAU,EAAE,IAAI;AAC7C,MAAA,eAAe,GAAGJ,SAAS,CAACK,UAAS,EAAE,IAAI;;ACdxD;
|
|
1
|
+
{"version":3,"file":"angular-fire-remote-config.mjs","sources":["../../../src/remote-config/remote-config.ts","../../../src/remote-config/remote-config.module.ts","../../../src/remote-config/rxfire.ts","../../../src/remote-config/firebase.ts","../../../src/remote-config/angular-fire-remote-config.ts"],"sourcesContent":["import { ɵgetAllInstancesOf } from '@angular/fire';\nimport { RemoteConfig as FirebaseRemoteConfig } from 'firebase/remote-config';\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// eslint-disable-next-line @typescript-eslint/no-empty-interface\nexport interface RemoteConfig extends FirebaseRemoteConfig {}\n\nexport class RemoteConfig {\n constructor(remoteConfig: FirebaseRemoteConfig) {\n return remoteConfig;\n }\n}\n\nexport const REMOTE_CONFIG_PROVIDER_NAME = 'remote-config';\n\n// eslint-disable-next-line @typescript-eslint/no-empty-interface\nexport interface RemoteConfigInstances extends Array<FirebaseRemoteConfig> {}\n\nexport class RemoteConfigInstances {\n constructor() {\n return ɵgetAllInstancesOf<FirebaseRemoteConfig>(REMOTE_CONFIG_PROVIDER_NAME);\n }\n}\n\nexport const remoteConfigInstance$ = timer(0, 300).pipe(\n concatMap(() => from(ɵgetAllInstancesOf<FirebaseRemoteConfig>(REMOTE_CONFIG_PROVIDER_NAME))),\n distinct(),\n);\n","import { isPlatformServer } from '@angular/common';\nimport {\n EnvironmentProviders,\n InjectionToken,\n Injector,\n NgModule,\n NgZone,\n Optional,\n PLATFORM_ID,\n makeEnvironmentProviders,\n} from '@angular/core';\nimport { VERSION, ɵAngularFireSchedulers, ɵgetDefaultInstanceOf } from '@angular/fire';\nimport { FirebaseApp, FirebaseApps } from '@angular/fire/app';\nimport { registerVersion } from 'firebase/app';\nimport { RemoteConfig as FirebaseRemoteConfig } from 'firebase/remote-config';\nimport { REMOTE_CONFIG_PROVIDER_NAME, RemoteConfig, RemoteConfigInstances } from './remote-config';\n\nexport const PROVIDED_REMOTE_CONFIG_INSTANCES = new InjectionToken<RemoteConfig[]>('angularfire2.remote-config-instances');\n\nexport function defaultRemoteConfigInstanceFactory(\n provided: FirebaseRemoteConfig[]|undefined,\n defaultApp: FirebaseApp,\n platformId: object,\n) {\n if (isPlatformServer(platformId)) { return null; }\n const defaultRemoteConfig = ɵgetDefaultInstanceOf<FirebaseRemoteConfig>(REMOTE_CONFIG_PROVIDER_NAME, provided, defaultApp);\n return defaultRemoteConfig && new RemoteConfig(defaultRemoteConfig);\n}\n\nexport function remoteConfigInstanceFactory(fn: (injector: Injector) => FirebaseRemoteConfig) {\n return (zone: NgZone, injector: Injector, platformId: object) => {\n if (isPlatformServer(platformId)) { return null; }\n const remoteConfig = zone.runOutsideAngular(() => fn(injector));\n return new RemoteConfig(remoteConfig);\n };\n}\n\nconst REMOTE_CONFIG_INSTANCES_PROVIDER = {\n provide: RemoteConfigInstances,\n deps: [\n [new Optional(), PROVIDED_REMOTE_CONFIG_INSTANCES ],\n ]\n};\n\nconst DEFAULT_REMOTE_CONFIG_INSTANCE_PROVIDER = {\n provide: RemoteConfig,\n useFactory: defaultRemoteConfigInstanceFactory,\n deps: [\n [new Optional(), PROVIDED_REMOTE_CONFIG_INSTANCES ],\n FirebaseApp,\n PLATFORM_ID,\n ]\n};\n\n@NgModule({\n providers: [\n DEFAULT_REMOTE_CONFIG_INSTANCE_PROVIDER,\n REMOTE_CONFIG_INSTANCES_PROVIDER,\n ]\n})\nexport class RemoteConfigModule {\n constructor() {\n registerVersion('angularfire', VERSION.full, 'rc');\n }\n}\n\nexport function provideRemoteConfig(\n fn: (injector: Injector) => FirebaseRemoteConfig, ...deps: any[]\n): EnvironmentProviders {\n registerVersion('angularfire', VERSION.full, 'rc');\n\n return makeEnvironmentProviders([\n DEFAULT_REMOTE_CONFIG_INSTANCE_PROVIDER,\n REMOTE_CONFIG_INSTANCES_PROVIDER,\n {\n provide: PROVIDED_REMOTE_CONFIG_INSTANCES,\n useFactory: remoteConfigInstanceFactory(fn),\n multi: true,\n deps: [\n NgZone,\n Injector,\n PLATFORM_ID,\n ɵAngularFireSchedulers,\n FirebaseApps,\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 getAll as _getAll,\n getBoolean as _getBoolean,\n getNumber as _getNumber,\n getString as _getString,\n getValue as _getValue\n} from 'rxfire/remote-config';\n\nexport const getAllChanges = ɵzoneWrap(_getAll, true);\nexport const getBooleanChanges = ɵzoneWrap(_getBoolean, true);\nexport const getNumberChanges = ɵzoneWrap(_getNumber, true);\nexport const getStringChanges = ɵzoneWrap(_getString, true);\nexport const getValueChanges = ɵzoneWrap(_getValue, true);\n","// DO NOT MODIFY, this file is autogenerated by tools/build.ts\nexport * from 'firebase/remote-config';\nimport { ɵzoneWrap } from '@angular/fire';\nimport {\n activate as _activate,\n ensureInitialized as _ensureInitialized,\n fetchAndActivate as _fetchAndActivate,\n fetchConfig as _fetchConfig,\n getAll as _getAll,\n getBoolean as _getBoolean,\n getNumber as _getNumber,\n getRemoteConfig as _getRemoteConfig,\n getString as _getString,\n getValue as _getValue,\n isSupported as _isSupported,\n setCustomSignals as _setCustomSignals,\n setLogLevel as _setLogLevel\n} from 'firebase/remote-config';\n\nexport const activate = ɵzoneWrap(_activate, true);\nexport const ensureInitialized = ɵzoneWrap(_ensureInitialized, true);\nexport const fetchAndActivate = ɵzoneWrap(_fetchAndActivate, true);\nexport const fetchConfig = ɵzoneWrap(_fetchConfig, true);\nexport const getAll = ɵzoneWrap(_getAll, true);\nexport const getBoolean = ɵzoneWrap(_getBoolean, true);\nexport const getNumber = ɵzoneWrap(_getNumber, true);\nexport const getRemoteConfig = ɵzoneWrap(_getRemoteConfig, true);\nexport const getString = ɵzoneWrap(_getString, true);\nexport const getValue = ɵzoneWrap(_getValue, true);\nexport const isSupported = ɵzoneWrap(_isSupported, true);\nexport const setCustomSignals = ɵzoneWrap(_setCustomSignals, true);\nexport const setLogLevel = ɵzoneWrap(_setLogLevel, true);\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":["ɵgetAllInstancesOf","ɵgetDefaultInstanceOf","ɵAngularFireSchedulers","ɵzoneWrap","_getAll","_getBoolean","_getNumber","_getString","_getValue","_activate","_ensureInitialized","_fetchAndActivate","_fetchConfig","_getRemoteConfig","_isSupported","_setCustomSignals","_setLogLevel"],"mappings":";;;;;;;;;;;;MASa,YAAY,CAAA;AACvB,IAAA,WAAA,CAAY,YAAkC,EAAA;AAC5C,QAAA,OAAO,YAAY;;AAEtB;AAEM,MAAM,2BAA2B,GAAG,eAAe;MAK7C,qBAAqB,CAAA;AAChC,IAAA,WAAA,GAAA;AACE,QAAA,OAAOA,kBAAkB,CAAuB,2BAA2B,CAAC;;AAE/E;AAEM,MAAM,qBAAqB,GAAG,KAAK,CAAC,CAAC,EAAE,GAAG,CAAC,CAAC,IAAI,CACrD,SAAS,CAAC,MAAM,IAAI,CAACA,kBAAkB,CAAuB,2BAA2B,CAAC,CAAC,CAAC,EAC5F,QAAQ,EAAE;;ACXL,MAAM,gCAAgC,GAAG,IAAI,cAAc,CAAiB,sCAAsC,CAAC;SAE1G,kCAAkC,CAChD,QAA0C,EAC1C,UAAuB,EACvB,UAAkB,EAAA;AAElB,IAAA,IAAI,gBAAgB,CAAC,UAAU,CAAC,EAAE;AAAE,QAAA,OAAO,IAAI;;IAC/C,MAAM,mBAAmB,GAAGC,qBAAqB,CAAuB,2BAA2B,EAAE,QAAQ,EAAE,UAAU,CAAC;AAC1H,IAAA,OAAO,mBAA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YAAW,EAAE,IAAI;AACxC,MAAA,SAAS,GAAGF,SAAS,CAACG,WAAU,EAAE,IAAI;AACtC,MAAA,eAAe,GAAGH,SAAS,CAACU,iBAAgB,EAAE,IAAI;AAClD,MAAA,SAAS,GAAGV,SAAS,CAACI,WAAU,EAAE,IAAI;AACtC,MAAA,QAAQ,GAAGJ,SAAS,CAACK,UAAS,EAAE,IAAI;AACpC,MAAA,WAAW,GAAGL,SAAS,CAACW,aAAY,EAAE,IAAI;AAC1C,MAAA,gBAAgB,GAAGX,SAAS,CAACY,kBAAiB,EAAE,IAAI;AACpD,MAAA,WAAW,GAAGZ,SAAS,CAACa,aAAY,EAAE,IAAI;;AC/BvD;;AAEG;;;;"}
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
import { ɵgetAllInstancesOf as _getAllInstancesOf, ɵgetDefaultInstanceOf as _getDefaultInstanceOf, VERSION, ɵAngularFireSchedulers as _AngularFireSchedulers,
|
|
1
|
+
import { ɵgetAllInstancesOf as _getAllInstancesOf, ɵgetDefaultInstanceOf as _getDefaultInstanceOf, VERSION, ɵAngularFireSchedulers as _AngularFireSchedulers, ɵzoneWrap as _zoneWrap } from '@angular/fire';
|
|
2
2
|
import { timer, from } from 'rxjs';
|
|
3
3
|
import { concatMap, distinct } from 'rxjs/operators';
|
|
4
4
|
import * as i0 from '@angular/core';
|
|
5
5
|
import { InjectionToken, Optional, NgModule, makeEnvironmentProviders, NgZone, Injector } from '@angular/core';
|
|
6
6
|
import { FirebaseApp, FirebaseApps } from '@angular/fire/app';
|
|
7
|
+
import { AppCheckInstances } from '@angular/fire/app-check';
|
|
7
8
|
import { AuthInstances } from '@angular/fire/auth';
|
|
8
9
|
import { registerVersion } from 'firebase/app';
|
|
9
10
|
import { fromTask as fromTask$1, percentage as percentage$1 } from 'rxfire/storage';
|
|
@@ -84,7 +85,7 @@ function provideStorage(fn, ...deps) {
|
|
|
84
85
|
FirebaseApps,
|
|
85
86
|
// Defensively load Auth first, if provided
|
|
86
87
|
[new Optional(), AuthInstances],
|
|
87
|
-
[new Optional(),
|
|
88
|
+
[new Optional(), AppCheckInstances],
|
|
88
89
|
...deps,
|
|
89
90
|
]
|
|
90
91
|
}
|
|
@@ -97,7 +98,7 @@ const percentage = _zoneWrap(percentage$1, true);
|
|
|
97
98
|
|
|
98
99
|
// DO NOT MODIFY, this file is autogenerated by tools/build.ts
|
|
99
100
|
const connectStorageEmulator = _zoneWrap(connectStorageEmulator$1, true);
|
|
100
|
-
const deleteObject = _zoneWrap(deleteObject$1, true);
|
|
101
|
+
const deleteObject = _zoneWrap(deleteObject$1, true, 2);
|
|
101
102
|
const getBlob = _zoneWrap(getBlob$1, true);
|
|
102
103
|
const getBytes = _zoneWrap(getBytes$1, true);
|
|
103
104
|
const getDownloadURL = _zoneWrap(getDownloadURL$1, true);
|
|
@@ -106,8 +107,8 @@ const getStorage = _zoneWrap(getStorage$1, true);
|
|
|
106
107
|
const getStream = _zoneWrap(getStream$1, true);
|
|
107
108
|
const list = _zoneWrap(list$1, true);
|
|
108
109
|
const listAll = _zoneWrap(listAll$1, true);
|
|
109
|
-
const ref = _zoneWrap(ref$1, true);
|
|
110
|
-
const updateMetadata = _zoneWrap(updateMetadata$1, true);
|
|
110
|
+
const ref = _zoneWrap(ref$1, true, 2);
|
|
111
|
+
const updateMetadata = _zoneWrap(updateMetadata$1, true, 2);
|
|
111
112
|
const uploadBytes = _zoneWrap(uploadBytes$1, true);
|
|
112
113
|
const uploadBytesResumable = _zoneWrap(uploadBytesResumable$1, true);
|
|
113
114
|
const uploadString = _zoneWrap(uploadString$1, true);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"angular-fire-storage.mjs","sources":["../../../src/storage/storage.ts","../../../src/storage/storage.module.ts","../../../src/storage/rxfire.ts","../../../src/storage/firebase.ts","../../../src/storage/angular-fire-storage.ts"],"sourcesContent":["import { ɵgetAllInstancesOf } from '@angular/fire';\nimport { FirebaseStorage } from 'firebase/storage';\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// eslint-disable-next-line @typescript-eslint/no-empty-interface\nexport interface Storage extends FirebaseStorage {}\n\nexport class Storage {\n constructor(auth: FirebaseStorage) {\n return auth;\n }\n}\n\nexport const STORAGE_PROVIDER_NAME = 'storage';\n\n// eslint-disable-next-line @typescript-eslint/no-empty-interface\nexport interface StorageInstances extends Array<FirebaseStorage> {}\n\nexport class StorageInstances {\n constructor() {\n return ɵgetAllInstancesOf<FirebaseStorage>(STORAGE_PROVIDER_NAME);\n }\n}\n\nexport const storageInstance$ = timer(0, 300).pipe(\n concatMap(() => from(ɵgetAllInstancesOf<FirebaseStorage>(STORAGE_PROVIDER_NAME))),\n distinct(),\n);\n","import {\n EnvironmentProviders,\n InjectionToken,\n Injector,\n NgModule,\n NgZone,\n Optional,\n makeEnvironmentProviders,\n} from '@angular/core';\nimport { VERSION, ɵAngularFireSchedulers, ɵgetDefaultInstanceOf } from '@angular/fire';\nimport {
|
|
1
|
+
{"version":3,"file":"angular-fire-storage.mjs","sources":["../../../src/storage/storage.ts","../../../src/storage/storage.module.ts","../../../src/storage/rxfire.ts","../../../src/storage/firebase.ts","../../../src/storage/angular-fire-storage.ts"],"sourcesContent":["import { ɵgetAllInstancesOf } from '@angular/fire';\nimport { FirebaseStorage } from 'firebase/storage';\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// eslint-disable-next-line @typescript-eslint/no-empty-interface\nexport interface Storage extends FirebaseStorage {}\n\nexport class Storage {\n constructor(auth: FirebaseStorage) {\n return auth;\n }\n}\n\nexport const STORAGE_PROVIDER_NAME = 'storage';\n\n// eslint-disable-next-line @typescript-eslint/no-empty-interface\nexport interface StorageInstances extends Array<FirebaseStorage> {}\n\nexport class StorageInstances {\n constructor() {\n return ɵgetAllInstancesOf<FirebaseStorage>(STORAGE_PROVIDER_NAME);\n }\n}\n\nexport const storageInstance$ = timer(0, 300).pipe(\n concatMap(() => from(ɵgetAllInstancesOf<FirebaseStorage>(STORAGE_PROVIDER_NAME))),\n distinct(),\n);\n","import {\n EnvironmentProviders,\n InjectionToken,\n Injector,\n NgModule,\n NgZone,\n Optional,\n makeEnvironmentProviders,\n} from '@angular/core';\nimport { VERSION, ɵAngularFireSchedulers, ɵgetDefaultInstanceOf } from '@angular/fire';\nimport { FirebaseApp, FirebaseApps } from '@angular/fire/app';\nimport { AppCheckInstances } from '@angular/fire/app-check';\nimport { AuthInstances } from '@angular/fire/auth';\nimport { registerVersion } from 'firebase/app';\nimport { FirebaseStorage } from 'firebase/storage';\nimport { STORAGE_PROVIDER_NAME, Storage, StorageInstances } from './storage';\n\nexport const PROVIDED_STORAGE_INSTANCES = new InjectionToken<Storage[]>('angularfire2.storage-instances');\n\nexport function defaultStorageInstanceFactory(provided: FirebaseStorage[]|undefined, defaultApp: FirebaseApp) {\n const defaultStorage = ɵgetDefaultInstanceOf<FirebaseStorage>(STORAGE_PROVIDER_NAME, provided, defaultApp);\n return defaultStorage && new Storage(defaultStorage);\n}\n\nexport function storageInstanceFactory(fn: (injector: Injector) => FirebaseStorage) {\n return (zone: NgZone, injector: Injector) => {\n const storage = zone.runOutsideAngular(() => fn(injector));\n return new Storage(storage);\n };\n}\n\nconst STORAGE_INSTANCES_PROVIDER = {\n provide: StorageInstances,\n deps: [\n [new Optional(), PROVIDED_STORAGE_INSTANCES ],\n ]\n};\n\nconst DEFAULT_STORAGE_INSTANCE_PROVIDER = {\n provide: Storage,\n useFactory: defaultStorageInstanceFactory,\n deps: [\n [new Optional(), PROVIDED_STORAGE_INSTANCES ],\n FirebaseApp,\n ]\n};\n\n@NgModule({\n providers: [\n DEFAULT_STORAGE_INSTANCE_PROVIDER,\n STORAGE_INSTANCES_PROVIDER,\n ]\n})\nexport class StorageModule {\n constructor() {\n registerVersion('angularfire', VERSION.full, 'gcs');\n }\n}\n\nexport function provideStorage(fn: (injector: Injector) => FirebaseStorage, ...deps: any[]): EnvironmentProviders {\n registerVersion('angularfire', VERSION.full, 'gcs');\n\n return makeEnvironmentProviders([\n DEFAULT_STORAGE_INSTANCE_PROVIDER,\n STORAGE_INSTANCES_PROVIDER,\n {\n provide: PROVIDED_STORAGE_INSTANCES,\n useFactory: storageInstanceFactory(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 fromTask as _fromTask,\n percentage as _percentage\n} from 'rxfire/storage';\n\nexport const fromTask = ɵzoneWrap(_fromTask, true);\nexport const percentage = ɵzoneWrap(_percentage, true);\n","// DO NOT MODIFY, this file is autogenerated by tools/build.ts\nexport * from 'firebase/storage';\nimport { ɵzoneWrap } from '@angular/fire';\nimport {\n connectStorageEmulator as _connectStorageEmulator,\n deleteObject as _deleteObject,\n getBlob as _getBlob,\n getBytes as _getBytes,\n getDownloadURL as _getDownloadURL,\n getMetadata as _getMetadata,\n getStorage as _getStorage,\n getStream as _getStream,\n list as _list,\n listAll as _listAll,\n ref as _ref,\n updateMetadata as _updateMetadata,\n uploadBytes as _uploadBytes,\n uploadBytesResumable as _uploadBytesResumable,\n uploadString as _uploadString\n} from 'firebase/storage';\n\nexport const connectStorageEmulator = ɵzoneWrap(_connectStorageEmulator, true);\nexport const deleteObject = ɵzoneWrap(_deleteObject, true, 2);\nexport const getBlob = ɵzoneWrap(_getBlob, true);\nexport const getBytes = ɵzoneWrap(_getBytes, true);\nexport const getDownloadURL = ɵzoneWrap(_getDownloadURL, true);\nexport const getMetadata = ɵzoneWrap(_getMetadata, true);\nexport const getStorage = ɵzoneWrap(_getStorage, true);\nexport const getStream = ɵzoneWrap(_getStream, true);\nexport const list = ɵzoneWrap(_list, true);\nexport const listAll = ɵzoneWrap(_listAll, true);\nexport const ref = ɵzoneWrap(_ref, true, 2);\nexport const updateMetadata = ɵzoneWrap(_updateMetadata, true, 2);\nexport const uploadBytes = ɵzoneWrap(_uploadBytes, true);\nexport const uploadBytesResumable = ɵzoneWrap(_uploadBytesResumable, true);\nexport const uploadString = ɵzoneWrap(_uploadString, true);\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":["ɵgetAllInstancesOf","ɵgetDefaultInstanceOf","ɵAngularFireSchedulers","ɵzoneWrap","_fromTask","_percentage","_connectStorageEmulator","_deleteObject","_getBlob","_getBytes","_getDownloadURL","_getMetadata","_getStorage","_getStream","_list","_listAll","_ref","_updateMetadata","_uploadBytes","_uploadBytesResumable","_uploadString"],"mappings":";;;;;;;;;;;;;MASa,OAAO,CAAA;AAClB,IAAA,WAAA,CAAY,IAAqB,EAAA;AAC/B,QAAA,OAAO,IAAI;;AAEd;AAEM,MAAM,qBAAqB,GAAG,SAAS;MAKjC,gBAAgB,CAAA;AAC3B,IAAA,WAAA,GAAA;AACE,QAAA,OAAOA,kBAAkB,CAAkB,qBAAqB,CAAC;;AAEpE;AAEM,MAAM,gBAAgB,GAAG,KAAK,CAAC,CAAC,EAAE,GAAG,CAAC,CAAC,IAAI,CAChD,SAAS,CAAC,MAAM,IAAI,CAACA,kBAAkB,CAAkB,qBAAqB,CAAC,CAAC,CAAC,EACjF,QAAQ,EAAE;;ACXL,MAAM,0BAA0B,GAAG,IAAI,cAAc,CAAY,gCAAgC,CAAC;AAEzF,SAAA,6BAA6B,CAAC,QAAqC,EAAE,UAAuB,EAAA;IAC1G,MAAM,cAAc,GAAGC,qBAAqB,CAAkB,qBAAqB,EAAE,QAAQ,EAAE,UAAU,CAAC;AAC1G,IAAA,OAAO,cAAc,IAAI,IAAI,OAAO,CAAC,cAAc,CAAC;AACtD;AAEM,SAAU,sBAAsB,CAAC,EAA2C,EAAA;AAChF,IAAA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a,KAAI,EAAE,IAAI,EAAE,CAAC;AACnC,MAAM,cAAc,GAAGb,SAAS,CAACc,gBAAe,EAAE,IAAI,EAAE,CAAC;AACnD,MAAA,WAAW,GAAGd,SAAS,CAACe,aAAY,EAAE,IAAI;AAC1C,MAAA,oBAAoB,GAAGf,SAAS,CAACgB,sBAAqB,EAAE,IAAI;AAC5D,MAAA,YAAY,GAAGhB,SAAS,CAACiB,cAAa,EAAE,IAAI;;ACnCzD;;AAEG;;;;"}
|
|
@@ -1,11 +1,12 @@
|
|
|
1
|
-
import { ɵgetAllInstancesOf as _getAllInstancesOf, ɵgetDefaultInstanceOf as _getDefaultInstanceOf, VERSION, ɵAngularFireSchedulers as _AngularFireSchedulers,
|
|
1
|
+
import { ɵgetAllInstancesOf as _getAllInstancesOf, ɵgetDefaultInstanceOf as _getDefaultInstanceOf, VERSION, ɵAngularFireSchedulers as _AngularFireSchedulers, ɵzoneWrap as _zoneWrap } from '@angular/fire';
|
|
2
2
|
import { timer, from } from 'rxjs';
|
|
3
3
|
import { concatMap, distinct } from 'rxjs/operators';
|
|
4
4
|
import * as i0 from '@angular/core';
|
|
5
5
|
import { InjectionToken, Optional, NgModule, makeEnvironmentProviders, NgZone, Injector } from '@angular/core';
|
|
6
6
|
import { FirebaseApp, FirebaseApps } from '@angular/fire/app';
|
|
7
|
+
import { AppCheckInstances } from '@angular/fire/app-check';
|
|
7
8
|
import { registerVersion } from 'firebase/app';
|
|
8
|
-
import { getGenerativeModel as getGenerativeModel$1, getVertexAI as getVertexAI$1 } from 'firebase/vertexai';
|
|
9
|
+
import { getAI as getAI$1, getGenerativeModel as getGenerativeModel$1, getImagenModel as getImagenModel$1, getVertexAI as getVertexAI$1 } from 'firebase/vertexai';
|
|
9
10
|
export * from 'firebase/vertexai';
|
|
10
11
|
|
|
11
12
|
class VertexAI {
|
|
@@ -80,7 +81,7 @@ function provideVertexAI(fn, ...deps) {
|
|
|
80
81
|
Injector,
|
|
81
82
|
_AngularFireSchedulers,
|
|
82
83
|
FirebaseApps,
|
|
83
|
-
[new Optional(),
|
|
84
|
+
[new Optional(), AppCheckInstances],
|
|
84
85
|
...deps,
|
|
85
86
|
]
|
|
86
87
|
}
|
|
@@ -88,12 +89,14 @@ function provideVertexAI(fn, ...deps) {
|
|
|
88
89
|
}
|
|
89
90
|
|
|
90
91
|
// DO NOT MODIFY, this file is autogenerated by tools/build.ts
|
|
92
|
+
const getAI = _zoneWrap(getAI$1, true);
|
|
91
93
|
const getGenerativeModel = _zoneWrap(getGenerativeModel$1, true);
|
|
94
|
+
const getImagenModel = _zoneWrap(getImagenModel$1, true);
|
|
92
95
|
const getVertexAI = _zoneWrap(getVertexAI$1, true);
|
|
93
96
|
|
|
94
97
|
/**
|
|
95
98
|
* Generated bundle index. Do not edit.
|
|
96
99
|
*/
|
|
97
100
|
|
|
98
|
-
export { VertexAI, VertexAIInstances, VertexAIModule, getGenerativeModel, getVertexAI, provideVertexAI, vertexAIInstance$ };
|
|
101
|
+
export { VertexAI, VertexAIInstances, VertexAIModule, getAI, getGenerativeModel, getImagenModel, getVertexAI, provideVertexAI, vertexAIInstance$ };
|
|
99
102
|
//# sourceMappingURL=angular-fire-vertexai.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"angular-fire-vertexai.mjs","sources":["../../../src/vertexai/vertexai.ts","../../../src/vertexai/vertexai.module.ts","../../../src/vertexai/firebase.ts","../../../src/vertexai/angular-fire-vertexai.ts"],"sourcesContent":["import { ɵgetAllInstancesOf } from '@angular/fire';\nimport { VertexAI as FirebaseVertexAI } from 'firebase/vertexai';\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// eslint-disable-next-line @typescript-eslint/no-empty-interface\nexport interface VertexAI extends FirebaseVertexAI {}\n\nexport class VertexAI {\n constructor(vertexai: FirebaseVertexAI) {\n return vertexai;\n }\n}\n\nexport const VERTEX_AI_PROVIDER_NAME = 'vertexai';\n\n// eslint-disable-next-line @typescript-eslint/no-empty-interface\nexport interface VertexAIInstances extends Array<FirebaseVertexAI> {}\n\nexport class VertexAIInstances {\n constructor() {\n return ɵgetAllInstancesOf<FirebaseVertexAI>(VERTEX_AI_PROVIDER_NAME);\n }\n}\n\nexport const vertexAIInstance$ = timer(0, 300).pipe(\n concatMap(() => from(ɵgetAllInstancesOf<FirebaseVertexAI>(VERTEX_AI_PROVIDER_NAME))),\n distinct(),\n);\n","import {\n EnvironmentProviders,\n InjectionToken,\n Injector,\n NgModule,\n NgZone,\n Optional,\n makeEnvironmentProviders,\n} from '@angular/core';\nimport { VERSION, ɵAngularFireSchedulers, ɵgetDefaultInstanceOf } from '@angular/fire';\nimport {
|
|
1
|
+
{"version":3,"file":"angular-fire-vertexai.mjs","sources":["../../../src/vertexai/vertexai.ts","../../../src/vertexai/vertexai.module.ts","../../../src/vertexai/firebase.ts","../../../src/vertexai/angular-fire-vertexai.ts"],"sourcesContent":["import { ɵgetAllInstancesOf } from '@angular/fire';\nimport { VertexAI as FirebaseVertexAI } from 'firebase/vertexai';\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// eslint-disable-next-line @typescript-eslint/no-empty-interface\nexport interface VertexAI extends FirebaseVertexAI {}\n\nexport class VertexAI {\n constructor(vertexai: FirebaseVertexAI) {\n return vertexai;\n }\n}\n\nexport const VERTEX_AI_PROVIDER_NAME = 'vertexai';\n\n// eslint-disable-next-line @typescript-eslint/no-empty-interface\nexport interface VertexAIInstances extends Array<FirebaseVertexAI> {}\n\nexport class VertexAIInstances {\n constructor() {\n return ɵgetAllInstancesOf<FirebaseVertexAI>(VERTEX_AI_PROVIDER_NAME);\n }\n}\n\nexport const vertexAIInstance$ = timer(0, 300).pipe(\n concatMap(() => from(ɵgetAllInstancesOf<FirebaseVertexAI>(VERTEX_AI_PROVIDER_NAME))),\n distinct(),\n);\n","import {\n EnvironmentProviders,\n InjectionToken,\n Injector,\n NgModule,\n NgZone,\n Optional,\n makeEnvironmentProviders,\n} from '@angular/core';\nimport { VERSION, ɵAngularFireSchedulers, ɵgetDefaultInstanceOf } from '@angular/fire';\nimport { FirebaseApp, FirebaseApps } from '@angular/fire/app';\nimport { AppCheckInstances } from '@angular/fire/app-check';\nimport { registerVersion } from 'firebase/app';\nimport { VertexAI as FirebaseVertexAI } from 'firebase/vertexai';\nimport { VERTEX_AI_PROVIDER_NAME, VertexAI, VertexAIInstances } from './vertexai';\n\nexport const PROVIDED_VERTEX_AI_INSTANCES = new InjectionToken<VertexAI[]>('angularfire2.vertexai-instances');\n\nexport function defaultVertexAIInstanceFactory(provided: FirebaseVertexAI[]|undefined, defaultApp: FirebaseApp) {\n const defaultVertexAI = ɵgetDefaultInstanceOf<FirebaseVertexAI>(VERTEX_AI_PROVIDER_NAME, provided, defaultApp);\n return defaultVertexAI && new VertexAI(defaultVertexAI);\n}\n\nexport function vertexAIInstanceFactory(fn: (injector: Injector) => FirebaseVertexAI) {\n return (zone: NgZone, injector: Injector) => {\n const vertexAI = zone.runOutsideAngular(() => fn(injector));\n return new VertexAI(vertexAI);\n };\n}\n\nconst VERTEX_AI_INSTANCES_PROVIDER = {\n provide: VertexAIInstances,\n deps: [\n [new Optional(), PROVIDED_VERTEX_AI_INSTANCES ],\n ]\n};\n\nconst DEFAULT_VERTEX_AI_INSTANCE_PROVIDER = {\n provide: VertexAI,\n useFactory: defaultVertexAIInstanceFactory,\n deps: [\n [new Optional(), PROVIDED_VERTEX_AI_INSTANCES ],\n FirebaseApp,\n ]\n};\n\n@NgModule({\n providers: [\n DEFAULT_VERTEX_AI_INSTANCE_PROVIDER,\n VERTEX_AI_INSTANCES_PROVIDER,\n ]\n})\nexport class VertexAIModule {\n constructor() {\n registerVersion('angularfire', VERSION.full, 'vertexai');\n }\n}\n\nexport function provideVertexAI(fn: (injector: Injector) => FirebaseVertexAI, ...deps: any[]): EnvironmentProviders {\n registerVersion('angularfire', VERSION.full, 'vertexai');\n\n return makeEnvironmentProviders([\n DEFAULT_VERTEX_AI_INSTANCE_PROVIDER,\n VERTEX_AI_INSTANCES_PROVIDER,\n {\n provide: PROVIDED_VERTEX_AI_INSTANCES,\n useFactory: vertexAIInstanceFactory(fn),\n multi: true,\n deps: [\n NgZone,\n Injector,\n ɵAngularFireSchedulers,\n FirebaseApps,\n [new Optional(), AppCheckInstances ],\n ...deps,\n ]\n }\n ]);\n}\n","// DO NOT MODIFY, this file is autogenerated by tools/build.ts\nexport * from 'firebase/vertexai';\nimport { ɵzoneWrap } from '@angular/fire';\nimport {\n getAI as _getAI,\n getGenerativeModel as _getGenerativeModel,\n getImagenModel as _getImagenModel,\n getVertexAI as _getVertexAI\n} from 'firebase/vertexai';\n\nexport const getAI = ɵzoneWrap(_getAI, true);\nexport const getGenerativeModel = ɵzoneWrap(_getGenerativeModel, true);\nexport const getImagenModel = ɵzoneWrap(_getImagenModel, true);\nexport const getVertexAI = ɵzoneWrap(_getVertexAI, true);\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":["ɵgetAllInstancesOf","ɵgetDefaultInstanceOf","ɵAngularFireSchedulers","ɵzoneWrap","_getAI","_getGenerativeModel","_getImagenModel","_getVertexAI"],"mappings":";;;;;;;;;;;MASa,QAAQ,CAAA;AACnB,IAAA,WAAA,CAAY,QAA0B,EAAA;AACpC,QAAA,OAAO,QAAQ;;AAElB;AAEM,MAAM,uBAAuB,GAAG,UAAU;MAKpC,iBAAiB,CAAA;AAC5B,IAAA,WAAA,GAAA;AACE,QAAA,OAAOA,kBAAkB,CAAmB,uBAAuB,CAAC;;AAEvE;AAEM,MAAM,iBAAiB,GAAG,KAAK,CAAC,CAAC,EAAE,GAAG,CAAC,CAAC,IAAI,CACjD,SAAS,CAAC,MAAM,IAAI,CAACA,kBAAkB,CAAmB,uBAAuB,CAAC,CAAC,CAAC,EACpF,QAAQ,EAAE;;ACZL,MAAM,4BAA4B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,EALd,SAAA,EAAA;YACT,mCAAmC;YACnC,4BAA4B;AAC7B,SAAA,EAAA,CAAA;;2FAEU,cAAc,EAAA,UAAA,EAAA,CAAA;kBAN1B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,SAAS,EAAE;wBACT,mCAAmC;wBACnC,4BAA4B;AAC7B;AACF,iBAAA;;SAOe,eAAe,CAAC,EAA4C,EAAE,GAAG,IAAW,EAAA;IAC1F,eAAe,CAAC,aAAa,EAAE,OAAO,CAAC,IAAI,EAAE,UAAU,CAAC;AAExD,IAAA,OAAO,wBAAwB,CAAC;QAC9B,mCAAmC;QACnC,4BAA4B;AAC5B,QAAA;AACE,YAAA,OAAO,EAAE,4BAA4B;AACrC,YAAA,UAAU,EAAE,uBAAuB,CAAC,EAAE,CAAC;AACvC,YAAA,KAAK,EAAE,IAAI;AACX,YAAA,IAAI,EAAE;gBACJ,MAAM;gBACN,QAAQ;gBACRC,sBAAsB;gBACtB,YAAY;AACZ,gBAAA,CAAC,IAAI,QAAQ,EAAE,EAAE,iBAAiB,CAAE;AACpC,gBAAA,GAAG,IAAI;AACR;AACF;AACF,KAAA,CAAC;AACJ;;AC9EA;AAUa,MAAA,KAAK,GAAGC,SAAS,CAACC,OAAM,EAAE,IAAI;AAC9B,MAAA,kBAAkB,GAAGD,SAAS,CAACE,oBAAmB,EAAE,IAAI;AACxD,MAAA,cAAc,GAAGF,SAAS,CAACG,gBAAe,EAAE,IAAI;AAChD,MAAA,WAAW,GAAGH,SAAS,CAACI,aAAY,EAAE,IAAI;;ACbvD;;AAEG;;;;"}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { Version, inject, NgZone, Injectable,
|
|
2
|
+
import { Version, isDevMode, inject, NgZone, Injectable, runInInjectionContext, PendingTasks, EnvironmentInjector } from '@angular/core';
|
|
3
3
|
import { getApps } from 'firebase/app';
|
|
4
4
|
import { pendingUntilEvent } from '@angular/core/rxjs-interop';
|
|
5
5
|
import { queueScheduler, asyncScheduler, Observable } from 'rxjs';
|
|
6
|
-
import {
|
|
6
|
+
import { subscribeOn, observeOn } from 'rxjs/operators';
|
|
7
7
|
|
|
8
8
|
const VERSION = new Version('ANGULARFIRE2_VERSION');
|
|
9
9
|
const ɵisSupportedError = (module) => `The APP_INITIALIZER that is "making" isSupported() sync for the sake of convenient DI has not resolved in this
|
|
@@ -39,14 +39,16 @@ const ɵgetAllInstancesOf = (identifier, app) => {
|
|
|
39
39
|
});
|
|
40
40
|
return instances;
|
|
41
41
|
};
|
|
42
|
-
class ɵAppCheckInstances {
|
|
43
|
-
constructor() {
|
|
44
|
-
return ɵgetAllInstancesOf(ɵAPP_CHECK_PROVIDER_NAME);
|
|
45
|
-
}
|
|
46
|
-
}
|
|
47
|
-
const ɵAPP_CHECK_PROVIDER_NAME = 'app-check';
|
|
48
42
|
|
|
49
43
|
/* eslint-disable @typescript-eslint/ban-ts-comment */
|
|
44
|
+
var LogLevel;
|
|
45
|
+
(function (LogLevel) {
|
|
46
|
+
LogLevel[LogLevel["SILENT"] = 0] = "SILENT";
|
|
47
|
+
LogLevel[LogLevel["WARN"] = 1] = "WARN";
|
|
48
|
+
LogLevel[LogLevel["VERBOSE"] = 2] = "VERBOSE";
|
|
49
|
+
})(LogLevel || (LogLevel = {}));
|
|
50
|
+
var currentLogLevel = (isDevMode() && typeof Zone !== "undefined") ? LogLevel.WARN : LogLevel.SILENT;
|
|
51
|
+
const setLogLevel = (logLevel) => currentLogLevel = logLevel;
|
|
50
52
|
/**
|
|
51
53
|
* Schedules tasks so that they are invoked inside the Zone that is passed in the constructor.
|
|
52
54
|
*/
|
|
@@ -97,71 +99,30 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.0", ngImpor
|
|
|
97
99
|
providedIn: 'root',
|
|
98
100
|
}]
|
|
99
101
|
}], ctorParameters: () => [] });
|
|
100
|
-
function getSchedulers() {
|
|
101
|
-
return inject(ɵAngularFireSchedulers);
|
|
102
|
-
}
|
|
103
102
|
var alreadyWarned = false;
|
|
104
|
-
function warnOutsideInjectionContext(original,
|
|
105
|
-
if (isDevMode()) {
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
console.warn(`Firebase API called outside injection context: ${
|
|
103
|
+
function warnOutsideInjectionContext(original, logLevel) {
|
|
104
|
+
if (!alreadyWarned && (currentLogLevel > LogLevel.SILENT || isDevMode())) {
|
|
105
|
+
alreadyWarned = true;
|
|
106
|
+
console.warn("Calling Firebase APIs outside of an Injection context may destabilize your application leading to subtle change-detection and hydration bugs. Find more at https://github.com/angular/angularfire/blob/main/docs/zones.md");
|
|
107
|
+
}
|
|
108
|
+
if (currentLogLevel >= logLevel) {
|
|
109
|
+
console.warn(`Firebase API called outside injection context: ${original.name}`);
|
|
111
110
|
}
|
|
112
111
|
}
|
|
113
112
|
function runOutsideAngular(fn) {
|
|
114
|
-
|
|
115
|
-
try {
|
|
116
|
-
ngZone = inject(NgZone);
|
|
117
|
-
}
|
|
118
|
-
catch (e) {
|
|
119
|
-
warnOutsideInjectionContext(fn, "runOutsideAngular");
|
|
120
|
-
}
|
|
113
|
+
const ngZone = inject(NgZone, { optional: true });
|
|
121
114
|
if (!ngZone) {
|
|
122
115
|
return fn();
|
|
123
116
|
}
|
|
124
117
|
return ngZone.runOutsideAngular(() => fn());
|
|
125
118
|
}
|
|
126
119
|
function run(fn) {
|
|
127
|
-
|
|
128
|
-
try {
|
|
129
|
-
ngZone = inject(NgZone);
|
|
130
|
-
}
|
|
131
|
-
catch (e) {
|
|
132
|
-
warnOutsideInjectionContext(fn, "run");
|
|
133
|
-
}
|
|
120
|
+
const ngZone = inject(NgZone, { optional: true });
|
|
134
121
|
if (!ngZone) {
|
|
135
122
|
return fn();
|
|
136
123
|
}
|
|
137
124
|
return ngZone.run(() => fn());
|
|
138
125
|
}
|
|
139
|
-
function observeOutsideAngular(obs$) {
|
|
140
|
-
let schedulers;
|
|
141
|
-
try {
|
|
142
|
-
schedulers = getSchedulers();
|
|
143
|
-
}
|
|
144
|
-
catch (e) {
|
|
145
|
-
warnOutsideInjectionContext(obs$, "observeOutsideAngular");
|
|
146
|
-
}
|
|
147
|
-
if (!schedulers) {
|
|
148
|
-
return obs$;
|
|
149
|
-
}
|
|
150
|
-
return obs$.pipe(observeOn(schedulers.outsideAngular));
|
|
151
|
-
}
|
|
152
|
-
function observeInsideAngular(obs$) {
|
|
153
|
-
let schedulers;
|
|
154
|
-
try {
|
|
155
|
-
schedulers = getSchedulers();
|
|
156
|
-
}
|
|
157
|
-
catch (e) {
|
|
158
|
-
warnOutsideInjectionContext(obs$, "observeInsideAngular");
|
|
159
|
-
}
|
|
160
|
-
if (!schedulers) {
|
|
161
|
-
return obs$;
|
|
162
|
-
}
|
|
163
|
-
return obs$.pipe(observeOn(schedulers.insideAngular));
|
|
164
|
-
}
|
|
165
126
|
const zoneWrapFn = (it, taskDone, injector) => {
|
|
166
127
|
return (...args) => {
|
|
167
128
|
if (taskDone) {
|
|
@@ -170,7 +131,8 @@ const zoneWrapFn = (it, taskDone, injector) => {
|
|
|
170
131
|
return runInInjectionContext(injector, () => run(() => it.apply(this, args)));
|
|
171
132
|
};
|
|
172
133
|
};
|
|
173
|
-
const ɵzoneWrap = (it, blockUntilFirst) => {
|
|
134
|
+
const ɵzoneWrap = (it, blockUntilFirst, logLevel) => {
|
|
135
|
+
logLevel ||= blockUntilFirst ? LogLevel.WARN : LogLevel.VERBOSE;
|
|
174
136
|
// function() is needed for the arguments object
|
|
175
137
|
return function () {
|
|
176
138
|
let taskDone;
|
|
@@ -179,12 +141,12 @@ const ɵzoneWrap = (it, blockUntilFirst) => {
|
|
|
179
141
|
let pendingTasks;
|
|
180
142
|
let injector;
|
|
181
143
|
try {
|
|
182
|
-
schedulers =
|
|
144
|
+
schedulers = inject(ɵAngularFireSchedulers);
|
|
183
145
|
pendingTasks = inject(PendingTasks);
|
|
184
|
-
injector = inject(
|
|
146
|
+
injector = inject(EnvironmentInjector);
|
|
185
147
|
}
|
|
186
148
|
catch (e) {
|
|
187
|
-
warnOutsideInjectionContext(it,
|
|
149
|
+
warnOutsideInjectionContext(it, logLevel);
|
|
188
150
|
return it.apply(this, _arguments);
|
|
189
151
|
}
|
|
190
152
|
// if this is a callback function, e.g, onSnapshot, we should create a pending task and complete it
|
|
@@ -235,5 +197,5 @@ const ɵzoneWrap = (it, blockUntilFirst) => {
|
|
|
235
197
|
* Generated bundle index. Do not edit.
|
|
236
198
|
*/
|
|
237
199
|
|
|
238
|
-
export {
|
|
200
|
+
export { LogLevel, VERSION, setLogLevel, ɵAngularFireSchedulers, ɵZoneScheduler, ɵgetAllInstancesOf, ɵgetDefaultInstanceOf, ɵisSupportedError, ɵzoneWrap };
|
|
239
201
|
//# sourceMappingURL=angular-fire.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"angular-fire.mjs","sources":["../../../src/core.ts","../../../src/zones.ts","../../../src/angular-fire.ts"],"sourcesContent":["import { Version } from '@angular/core';\nimport { ComponentContainer } from '@firebase/component';\nimport { FirebaseApp, getApps } from 'firebase/app';\nimport type { AppCheck } from 'firebase/app-check';\n\nexport const VERSION = new Version('ANGULARFIRE2_VERSION');\n\nexport const ɵisSupportedError = (module: string) =>\n `The APP_INITIALIZER that is \"making\" isSupported() sync for the sake of convenient DI has not resolved in this\ncontext. Rather than injecting ${module} in the constructor, first ensure that ${module} is supported by calling\n\\`await isSupported()\\`, then retrieve the instance from the injector manually \\`injector.get(${module})\\`.`;\n\n// TODO is there a better way to get at the internal types?\ninterface FirebaseAppWithContainer extends FirebaseApp {\n container: ComponentContainer;\n}\n\nexport function ɵgetDefaultInstanceOf<T= unknown>(identifier: string, provided: T[]|undefined, defaultApp: FirebaseApp): T|undefined {\n if (provided) {\n // Was provide* only called once? If so grab that\n if (provided.length === 1) { return provided[0]; }\n const providedUsingDefaultApp = provided.filter((it: any) => it.app === defaultApp);\n // Was provide* only called once, using the default app? If so use that\n if (providedUsingDefaultApp.length === 1) { return providedUsingDefaultApp[0]; }\n }\n // Grab the default instance from the defaultApp\n const defaultAppWithContainer: FirebaseAppWithContainer = defaultApp as any;\n const provider = defaultAppWithContainer.container.getProvider(identifier as never);\n return provider.getImmediate({ optional: true });\n}\n\nexport const ɵgetAllInstancesOf = <T= unknown>(identifier: string, app?: FirebaseApp): T[] => {\n const apps = app ? [app] : getApps();\n const instances: any[] = [];\n apps.forEach((app: FirebaseAppWithContainer) => {\n const provider: any = app.container.getProvider(identifier as never);\n provider.instances.forEach((instance: any) => {\n if (!instances.includes(instance)) {\n instances.push(instance);\n }\n });\n });\n return instances;\n};\n\n// eslint-disable-next-line @typescript-eslint/no-empty-interface\nexport interface ɵAppCheckInstances extends Array<AppCheck> {}\n\nexport class ɵAppCheckInstances {\n constructor() {\n return ɵgetAllInstancesOf<AppCheck>(ɵAPP_CHECK_PROVIDER_NAME);\n }\n}\n\nexport const ɵAPP_CHECK_PROVIDER_NAME = 'app-check';\n","/* eslint-disable @typescript-eslint/ban-ts-comment */\nimport {\n Injectable,\n Injector,\n NgZone,\n PendingTasks,\n inject,\n isDevMode,\n runInInjectionContext\n} from '@angular/core';\nimport { pendingUntilEvent } from '@angular/core/rxjs-interop';\nimport {\n Observable,\n SchedulerAction,\n SchedulerLike,\n Subscription,\n asyncScheduler,\n queueScheduler\n} from 'rxjs';\nimport { observeOn, subscribeOn } from 'rxjs/operators';\n\ndeclare const Zone: {current: unknown} | undefined; \n\n/**\n * Schedules tasks so that they are invoked inside the Zone that is passed in the constructor.\n */\nexport class ɵZoneScheduler implements SchedulerLike {\n constructor(private zone: any, private delegate: any = queueScheduler) {\n }\n\n now() {\n return this.delegate.now();\n }\n\n schedule(work: (this: SchedulerAction<any>, state?: any) => void, delay?: number, state?: any): Subscription {\n const targetZone = this.zone;\n // Wrap the specified work function to make sure that if nested scheduling takes place the\n // work is executed in the correct zone\n const workInZone = function(this: SchedulerAction<any>, state: any) {\n if (targetZone) {\n targetZone.runGuarded(() => {\n work.apply(this, [state]);\n });\n } else {\n work.apply(this, [state]);\n }\n };\n\n // Scheduling itself needs to be run in zone to ensure setInterval calls for async scheduling are done\n // inside the correct zone. This scheduler needs to schedule asynchronously always to ensure that\n // firebase emissions are never synchronous. Specifying a delay causes issues with the queueScheduler delegate.\n return this.delegate.schedule(workInZone, delay, state);\n }\n}\n\n@Injectable({\n providedIn: 'root',\n})\nexport class ɵAngularFireSchedulers {\n public readonly outsideAngular: ɵZoneScheduler;\n public readonly insideAngular: ɵZoneScheduler;\n\n constructor() {\n const ngZone = inject(NgZone);\n this.outsideAngular = ngZone.runOutsideAngular(\n () => new ɵZoneScheduler(typeof Zone === 'undefined' ? undefined : Zone.current)\n );\n this.insideAngular = ngZone.run(\n () => new ɵZoneScheduler(\n typeof Zone === 'undefined' ? undefined : Zone.current,\n asyncScheduler\n )\n );\n }\n}\n\nfunction getSchedulers() {\n return inject(ɵAngularFireSchedulers);\n}\n\nvar alreadyWarned = false;\nfunction warnOutsideInjectionContext(original: any, operation: string) {\n if (isDevMode()) {\n if (!alreadyWarned) {\n alreadyWarned = true;\n console.warn(\"Calling Firebase APIs outside of an Injection context may destabilize your application leading to subtle change-detection and hydration bugs. Find more at https://github.com/angular/angularfire/blob/main/docs/zones.md\");\n }\n console.warn(`Firebase API called outside injection context: ${operation}(${original.name})`);\n }\n}\n\nfunction runOutsideAngular<T>(fn: (...args: any[]) => T): T {\n let ngZone: NgZone|undefined;\n try {\n ngZone = inject(NgZone);\n } catch(e) {\n warnOutsideInjectionContext(fn, \"runOutsideAngular\");\n }\n if (!ngZone) {return fn();}\n return ngZone.runOutsideAngular(() => fn());\n}\n\nfunction run<T>(fn: (...args: any[]) => T): T {\n let ngZone: NgZone|undefined;\n try {\n ngZone = inject(NgZone);\n } catch(e) {\n warnOutsideInjectionContext(fn, \"run\");\n }\n if (!ngZone) {return fn();}\n return ngZone.run(() => fn());\n}\n\nexport function observeOutsideAngular<T>(obs$: Observable<T>): Observable<T> {\n let schedulers: ɵAngularFireSchedulers|undefined;\n try {\n schedulers = getSchedulers();\n } catch(e) {\n warnOutsideInjectionContext(obs$, \"observeOutsideAngular\");\n }\n if (!schedulers) {return obs$;}\n return obs$.pipe(observeOn(schedulers.outsideAngular));\n}\n\nexport function observeInsideAngular<T>(obs$: Observable<T>): Observable<T> {\n let schedulers: ɵAngularFireSchedulers|undefined;\n try {\n schedulers = getSchedulers();\n } catch(e) {\n warnOutsideInjectionContext(obs$, \"observeInsideAngular\");\n }\n if (!schedulers) {return obs$;}\n return obs$.pipe(observeOn(schedulers.insideAngular));\n}\n\nconst zoneWrapFn = (\n it: (...args: any[]) => any,\n taskDone: VoidFunction | undefined,\n injector: Injector,\n) => {\n return (...args: any[]) => {\n if (taskDone) {\n setTimeout(taskDone, 0);\n }\n return runInInjectionContext(injector, () => run(() => it.apply(this, args)));\n };\n};\n\nexport const ɵzoneWrap = <T= unknown>(it: T, blockUntilFirst: boolean): T => {\n // function() is needed for the arguments object\n return function () {\n let taskDone: VoidFunction | undefined;\n const _arguments = arguments;\n let schedulers: ɵAngularFireSchedulers;\n let pendingTasks: PendingTasks;\n let injector: Injector;\n try {\n schedulers = getSchedulers();\n pendingTasks = inject(PendingTasks);\n injector = inject(Injector);\n } catch(e) {\n warnOutsideInjectionContext(it, \"ɵzoneWrap\");\n return (it as any).apply(this, _arguments);\n }\n // if this is a callback function, e.g, onSnapshot, we should create a pending task and complete it\n // only once one of the callback functions is tripped.\n for (let i = 0; i < arguments.length; i++) {\n if (typeof _arguments[i] === 'function') {\n if (blockUntilFirst) {\n taskDone ||= run(() => pendingTasks.add());\n }\n // TODO create a microtask to track callback functions\n _arguments[i] = zoneWrapFn(_arguments[i], taskDone, injector);\n }\n }\n const ret = runOutsideAngular(() => (it as any).apply(this, _arguments));\n if (!blockUntilFirst) {\n if (ret instanceof Observable) {\n return ret.pipe(\n subscribeOn(schedulers.outsideAngular),\n observeOn(schedulers.insideAngular),\n );\n } else {\n return run(() => ret);\n }\n }\n if (ret instanceof Observable) {\n return ret.pipe(\n subscribeOn(schedulers.outsideAngular),\n observeOn(schedulers.insideAngular),\n pendingUntilEvent(injector),\n );\n } else if (ret instanceof Promise) {\n // eslint-disable-next-line @typescript-eslint/no-misused-promises\n return run(\n () =>\n new Promise((resolve, reject) => {\n pendingTasks.run(() => ret).then(\n (it) => runInInjectionContext(injector, () => run(() => resolve(it))),\n (reason) => runInInjectionContext(injector, () => run(() => reject(reason)))\n );\n })\n );\n } else if (typeof ret === 'function' && taskDone) {\n // Handle unsubscribe\n // function() is needed for the arguments object\n return function () {\n setTimeout(taskDone, 0);\n return ret.apply(this, arguments);\n };\n } else {\n // TODO how do we handle storage uploads in Zone? and other stuff with cancel() etc?\n return run(() => ret);\n }\n } as any;\n};\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":["this"],"mappings":";;;;;;;MAKa,OAAO,GAAG,IAAI,OAAO,CAAC,sBAAsB;MAE5C,iBAAiB,GAAG,CAAC,MAAc,KAC9C,CAAA;AAC+B,+BAAA,EAAA,MAAM,0CAA0C,MAAM,CAAA;AACS,8FAAA,EAAA,MAAM;SAOtF,qBAAqB,CAAa,UAAkB,EAAE,QAAuB,EAAE,UAAuB,EAAA;IACpH,IAAI,QAAQ,EAAE;;AAEZ,QAAA,IAAI,QAAQ,CAAC,MAAM,KAAK,CAAC,EAAE;AAAE,YAAA,OAAO,QAAQ,CAAC,CAAC,CAAC;;AAC/C,QAAA,MAAM,uBAAuB,GAAG,QAAQ,CAAC,MAAM,CAAC,CAAC,EAAO,KAAK,EAAE,CAAC,GAAG,KAAK,UAAU,CAAC;;AAEnF,QAAA,IAAI,uBAAuB,CAAC,MAAM,KAAK,CAAC,EAAE;AAAE,YAAA,OAAO,uBAAuB,CAAC,CAAC,CAAC;;;;IAG/E,MAAM,uBAAuB,GAA6B,UAAiB;IAC3E,MAAM,QAAQ,GAAG,uBAAuB,CAAC,SAAS,CAAC,WAAW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AK,qBAAqB,CAAC,QAAQ,EAAE,MAAM,GAAG,CAAC,MAAM,OAAO,CAAC,EAAE,CAAC,CAAC,CAAC,EACrE,CAAC,MAAM,KAAK,qBAAqB,CAAC,QAAQ,EAAE,MAAM,GAAG,CAAC,MAAM,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC,CAC7E;aACF,CAAC,CACL;;AACI,aAAA,IAAI,OAAO,GAAG,KAAK,UAAU,IAAI,QAAQ,EAAE;;;YAGhD,OAAO,YAAA;AACL,gBAAA,UAAU,CAAC,QAAQ,EAAE,CAAC,CAAC;gBACvB,OAAO,GAAG,CAAC,KAAK,CAAC,IAAI,EAAE,SAAS,CAAC;AACnC,aAAC;;aACI;;AAEL,YAAA,OAAO,GAAG,CAAC,MAAM,GAAG,CAAC;;AAEzB,KAAQ;AACV;;ACvNA;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"angular-fire.mjs","sources":["../../../src/core.ts","../../../src/zones.ts","../../../src/angular-fire.ts"],"sourcesContent":["import { Version } from '@angular/core';\nimport { ComponentContainer } from '@firebase/component';\nimport { FirebaseApp, getApps } from 'firebase/app';\n\nexport const VERSION = new Version('ANGULARFIRE2_VERSION');\n\nexport const ɵisSupportedError = (module: string) =>\n `The APP_INITIALIZER that is \"making\" isSupported() sync for the sake of convenient DI has not resolved in this\ncontext. Rather than injecting ${module} in the constructor, first ensure that ${module} is supported by calling\n\\`await isSupported()\\`, then retrieve the instance from the injector manually \\`injector.get(${module})\\`.`;\n\n// TODO is there a better way to get at the internal types?\ninterface FirebaseAppWithContainer extends FirebaseApp {\n container: ComponentContainer;\n}\n\nexport function ɵgetDefaultInstanceOf<T= unknown>(identifier: string, provided: T[]|undefined, defaultApp: FirebaseApp): T|undefined {\n if (provided) {\n // Was provide* only called once? If so grab that\n if (provided.length === 1) { return provided[0]; }\n const providedUsingDefaultApp = provided.filter((it: any) => it.app === defaultApp);\n // Was provide* only called once, using the default app? If so use that\n if (providedUsingDefaultApp.length === 1) { return providedUsingDefaultApp[0]; }\n }\n // Grab the default instance from the defaultApp\n const defaultAppWithContainer: FirebaseAppWithContainer = defaultApp as any;\n const provider = defaultAppWithContainer.container.getProvider(identifier as never);\n return provider.getImmediate({ optional: true });\n}\n\nexport const ɵgetAllInstancesOf = <T= unknown>(identifier: string, app?: FirebaseApp): T[] => {\n const apps = app ? [app] : getApps();\n const instances: any[] = [];\n apps.forEach((app: FirebaseAppWithContainer) => {\n const provider: any = app.container.getProvider(identifier as never);\n provider.instances.forEach((instance: any) => {\n if (!instances.includes(instance)) {\n instances.push(instance);\n }\n });\n });\n return instances;\n};\n","/* eslint-disable @typescript-eslint/ban-ts-comment */\nimport {\n EnvironmentInjector,\n Injectable,\n NgZone,\n PendingTasks,\n inject,\n isDevMode,\n runInInjectionContext\n} from '@angular/core';\nimport { pendingUntilEvent } from '@angular/core/rxjs-interop';\nimport {\n Observable,\n SchedulerAction,\n SchedulerLike,\n Subscription,\n asyncScheduler,\n queueScheduler\n} from 'rxjs';\nimport { observeOn, subscribeOn } from 'rxjs/operators';\n\ndeclare const Zone: {current: unknown} | undefined;\n\nexport enum LogLevel {\n \"SILENT\" = 0, \n \"WARN\" = 1,\n \"VERBOSE\" = 2,\n}\n\n\nvar currentLogLevel = (isDevMode() && typeof Zone !== \"undefined\") ? LogLevel.WARN : LogLevel.SILENT;\n\nexport const setLogLevel = (logLevel: LogLevel) => currentLogLevel = logLevel;\n\n/**\n * Schedules tasks so that they are invoked inside the Zone that is passed in the constructor.\n */\nexport class ɵZoneScheduler implements SchedulerLike {\n constructor(private zone: any, private delegate: any = queueScheduler) {\n }\n\n now() {\n return this.delegate.now();\n }\n\n schedule(work: (this: SchedulerAction<any>, state?: any) => void, delay?: number, state?: any): Subscription {\n const targetZone = this.zone;\n // Wrap the specified work function to make sure that if nested scheduling takes place the\n // work is executed in the correct zone\n const workInZone = function(this: SchedulerAction<any>, state: any) {\n if (targetZone) {\n targetZone.runGuarded(() => {\n work.apply(this, [state]);\n });\n } else {\n work.apply(this, [state]);\n }\n };\n\n // Scheduling itself needs to be run in zone to ensure setInterval calls for async scheduling are done\n // inside the correct zone. This scheduler needs to schedule asynchronously always to ensure that\n // firebase emissions are never synchronous. Specifying a delay causes issues with the queueScheduler delegate.\n return this.delegate.schedule(workInZone, delay, state);\n }\n}\n\n@Injectable({\n providedIn: 'root',\n})\nexport class ɵAngularFireSchedulers {\n public readonly outsideAngular: ɵZoneScheduler;\n public readonly insideAngular: ɵZoneScheduler;\n\n constructor() {\n const ngZone = inject(NgZone);\n this.outsideAngular = ngZone.runOutsideAngular(\n () => new ɵZoneScheduler(typeof Zone === 'undefined' ? undefined : Zone.current)\n );\n this.insideAngular = ngZone.run(\n () => new ɵZoneScheduler(\n typeof Zone === 'undefined' ? undefined : Zone.current,\n asyncScheduler\n )\n );\n }\n}\n\nvar alreadyWarned = false;\nfunction warnOutsideInjectionContext(original: any, logLevel: LogLevel) {\n if (!alreadyWarned && (currentLogLevel > LogLevel.SILENT || isDevMode())) {\n alreadyWarned = true;\n console.warn(\"Calling Firebase APIs outside of an Injection context may destabilize your application leading to subtle change-detection and hydration bugs. Find more at https://github.com/angular/angularfire/blob/main/docs/zones.md\");\n }\n if (currentLogLevel >= logLevel) {\n console.warn(`Firebase API called outside injection context: ${original.name}`);\n }\n}\n\nfunction runOutsideAngular<T>(fn: (...args: any[]) => T): T {\n const ngZone = inject(NgZone, { optional: true });\n if (!ngZone) {return fn();}\n return ngZone.runOutsideAngular(() => fn());\n}\n\nfunction run<T>(fn: (...args: any[]) => T): T {\n const ngZone = inject(NgZone, { optional: true });\n if (!ngZone) {return fn();}\n return ngZone.run(() => fn());\n}\n\nconst zoneWrapFn = (\n it: (...args: any[]) => any,\n taskDone: VoidFunction | undefined,\n injector: EnvironmentInjector,\n) => {\n return (...args: any[]) => {\n if (taskDone) {\n setTimeout(taskDone, 0);\n }\n return runInInjectionContext(injector, () => run(() => it.apply(this, args)));\n };\n};\n\nexport const ɵzoneWrap = <T= unknown>(it: T, blockUntilFirst: boolean, logLevel?: LogLevel): T => {\n logLevel ||= blockUntilFirst ? LogLevel.WARN : LogLevel.VERBOSE;\n // function() is needed for the arguments object\n return function () {\n let taskDone: VoidFunction | undefined;\n const _arguments = arguments;\n let schedulers: ɵAngularFireSchedulers;\n let pendingTasks: PendingTasks;\n let injector: EnvironmentInjector;\n try {\n schedulers = inject(ɵAngularFireSchedulers);\n pendingTasks = inject(PendingTasks);\n injector = inject(EnvironmentInjector);\n } catch(e) {\n warnOutsideInjectionContext(it, logLevel);\n return (it as any).apply(this, _arguments);\n }\n // if this is a callback function, e.g, onSnapshot, we should create a pending task and complete it\n // only once one of the callback functions is tripped.\n for (let i = 0; i < arguments.length; i++) {\n if (typeof _arguments[i] === 'function') {\n if (blockUntilFirst) {\n taskDone ||= run(() => pendingTasks.add());\n }\n // TODO create a microtask to track callback functions\n _arguments[i] = zoneWrapFn(_arguments[i], taskDone, injector);\n }\n }\n const ret = runOutsideAngular(() => (it as any).apply(this, _arguments));\n if (!blockUntilFirst) {\n if (ret instanceof Observable) {\n return ret.pipe(\n subscribeOn(schedulers.outsideAngular),\n observeOn(schedulers.insideAngular),\n );\n } else {\n return run(() => ret);\n }\n }\n if (ret instanceof Observable) {\n return ret.pipe(\n subscribeOn(schedulers.outsideAngular),\n observeOn(schedulers.insideAngular),\n pendingUntilEvent(injector),\n );\n } else if (ret instanceof Promise) {\n // eslint-disable-next-line @typescript-eslint/no-misused-promises\n return run(\n () =>\n new Promise((resolve, reject) => {\n pendingTasks.run(() => ret).then(\n (it) => runInInjectionContext(injector, () => run(() => resolve(it))),\n (reason) => runInInjectionContext(injector, () => run(() => reject(reason)))\n );\n }));\n } else if (typeof ret === 'function' && taskDone) {\n // Handle unsubscribe\n // function() is needed for the arguments object\n return function () {\n setTimeout(taskDone, 0);\n return ret.apply(this, arguments);\n };\n } else {\n // TODO how do we handle storage uploads in Zone? and other stuff with cancel() etc?\n return run(() => ret);\n }\n } as any;\n};\n","/**\n * Generated bundle index.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YAAY,UAAU,EAAE;YAC7B,OAAO,GAAG,CAAC,IAAI,CACb,WAAW,CAAC,UAAU,CAAC,cAAc,CAAC,EACtC,SAAS,CAAC,UAAU,CAAC,aAAa,CAAC,EACnC,iBAAiB,CAAC,QAAQ,CAAC,CAC5B;;AACI,aAAA,IAAI,GAAG,YAAY,OAAO,EAAE;;AAEjC,YAAA,OAAO,GAAG,CACR,MACE,IAAI,OAAO,CAAC,CAAC,OAAO,EAAE,MAAM,KAAI;gBAC9B,YAAY,CAAC,GAAG,CAAC,MAAM,GAAG,CAAC,CAAC,IAAI,CAC9B,CAAC,EAAE,KAAK,qBAAqB,CAAC,QAAQ,EAAE,MAAM,GAAG,CAAC,MAAM,OAAO,CAAC,EAAE,CAAC,CAAC,CAAC,EACrE,CAAC,MAAM,KAAK,qBAAqB,CAAC,QAAQ,EAAE,MAAM,GAAG,CAAC,MAAM,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC,CAC7E;aACN,CAAC,CAAC;;AACE,aAAA,IAAI,OAAO,GAAG,KAAK,UAAU,IAAI,QAAQ,EAAE;;;YAGhD,OAAO,YAAA;AACL,gBAAA,UAAU,CAAC,QAAQ,EAAE,CAAC,CAAC;gBACvB,OAAO,GAAG,CAAC,KAAK,CAAC,IAAI,EAAE,SAAS,CAAC;AACnC,aAAC;;aACI;;AAEL,YAAA,OAAO,GAAG,CAAC,MAAM,GAAG,CAAC;;AAEzB,KAAQ;AACV;;AC9LA;;AAEG;;;;"}
|
package/firestore/firebase.d.ts
CHANGED
|
@@ -1,17 +1,13 @@
|
|
|
1
1
|
export * from 'firebase/firestore';
|
|
2
|
-
import { addDoc as _addDoc, aggregateFieldEqual as _aggregateFieldEqual, aggregateQuerySnapshotEqual as _aggregateQuerySnapshotEqual, and as _and,
|
|
2
|
+
import { addDoc as _addDoc, aggregateFieldEqual as _aggregateFieldEqual, aggregateQuerySnapshotEqual as _aggregateQuerySnapshotEqual, and as _and, clearIndexedDbPersistence as _clearIndexedDbPersistence, collection as _collection, collectionGroup as _collectionGroup, connectFirestoreEmulator as _connectFirestoreEmulator, deleteAllPersistentCacheIndexes as _deleteAllPersistentCacheIndexes, deleteDoc as _deleteDoc, deleteField as _deleteField, disableNetwork as _disableNetwork, disablePersistentCacheIndexAutoCreation as _disablePersistentCacheIndexAutoCreation, doc as _doc, documentId as _documentId, enableIndexedDbPersistence as _enableIndexedDbPersistence, enableMultiTabIndexedDbPersistence as _enableMultiTabIndexedDbPersistence, enableNetwork as _enableNetwork, enablePersistentCacheIndexAutoCreation as _enablePersistentCacheIndexAutoCreation, endAt as _endAt, endBefore as _endBefore, getAggregateFromServer as _getAggregateFromServer, getCountFromServer as _getCountFromServer, getDoc as _getDoc, getDocFromCache as _getDocFromCache, getDocFromServer as _getDocFromServer, getDocs as _getDocs, getDocsFromCache as _getDocsFromCache, getDocsFromServer as _getDocsFromServer, getFirestore as _getFirestore, getPersistentCacheIndexManager as _getPersistentCacheIndexManager, increment as _increment, initializeFirestore as _initializeFirestore, limit as _limit, limitToLast as _limitToLast, loadBundle as _loadBundle, namedQuery as _namedQuery, onSnapshot as _onSnapshot, onSnapshotsInSync as _onSnapshotsInSync, or as _or, orderBy as _orderBy, query as _query, queryEqual as _queryEqual, refEqual as _refEqual, runTransaction as _runTransaction, setDoc as _setDoc, setIndexConfiguration as _setIndexConfiguration, setLogLevel as _setLogLevel, snapshotEqual as _snapshotEqual, startAfter as _startAfter, startAt as _startAt, sum as _sum, terminate as _terminate, updateDoc as _updateDoc, vector as _vector, waitForPendingWrites as _waitForPendingWrites, where as _where, writeBatch as _writeBatch } from 'firebase/firestore';
|
|
3
3
|
export declare const addDoc: typeof _addDoc;
|
|
4
4
|
export declare const aggregateFieldEqual: typeof _aggregateFieldEqual;
|
|
5
5
|
export declare const aggregateQuerySnapshotEqual: typeof _aggregateQuerySnapshotEqual;
|
|
6
6
|
export declare const and: typeof _and;
|
|
7
|
-
export declare const arrayRemove: typeof _arrayRemove;
|
|
8
|
-
export declare const arrayUnion: typeof _arrayUnion;
|
|
9
|
-
export declare const average: typeof _average;
|
|
10
7
|
export declare const clearIndexedDbPersistence: typeof _clearIndexedDbPersistence;
|
|
11
8
|
export declare const collection: typeof _collection;
|
|
12
9
|
export declare const collectionGroup: typeof _collectionGroup;
|
|
13
10
|
export declare const connectFirestoreEmulator: typeof _connectFirestoreEmulator;
|
|
14
|
-
export declare const count: typeof _count;
|
|
15
11
|
export declare const deleteAllPersistentCacheIndexes: typeof _deleteAllPersistentCacheIndexes;
|
|
16
12
|
export declare const deleteDoc: typeof _deleteDoc;
|
|
17
13
|
export declare const deleteField: typeof _deleteField;
|
|
@@ -40,22 +36,15 @@ export declare const initializeFirestore: typeof _initializeFirestore;
|
|
|
40
36
|
export declare const limit: typeof _limit;
|
|
41
37
|
export declare const limitToLast: typeof _limitToLast;
|
|
42
38
|
export declare const loadBundle: typeof _loadBundle;
|
|
43
|
-
export declare const memoryEagerGarbageCollector: typeof _memoryEagerGarbageCollector;
|
|
44
|
-
export declare const memoryLocalCache: typeof _memoryLocalCache;
|
|
45
|
-
export declare const memoryLruGarbageCollector: typeof _memoryLruGarbageCollector;
|
|
46
39
|
export declare const namedQuery: typeof _namedQuery;
|
|
47
40
|
export declare const onSnapshot: typeof _onSnapshot;
|
|
48
41
|
export declare const onSnapshotsInSync: typeof _onSnapshotsInSync;
|
|
49
42
|
export declare const or: typeof _or;
|
|
50
43
|
export declare const orderBy: typeof _orderBy;
|
|
51
|
-
export declare const persistentLocalCache: typeof _persistentLocalCache;
|
|
52
|
-
export declare const persistentMultipleTabManager: typeof _persistentMultipleTabManager;
|
|
53
|
-
export declare const persistentSingleTabManager: typeof _persistentSingleTabManager;
|
|
54
44
|
export declare const query: typeof _query;
|
|
55
45
|
export declare const queryEqual: typeof _queryEqual;
|
|
56
46
|
export declare const refEqual: typeof _refEqual;
|
|
57
47
|
export declare const runTransaction: typeof _runTransaction;
|
|
58
|
-
export declare const serverTimestamp: typeof _serverTimestamp;
|
|
59
48
|
export declare const setDoc: typeof _setDoc;
|
|
60
49
|
export declare const setIndexConfiguration: typeof _setIndexConfiguration;
|
|
61
50
|
export declare const setLogLevel: typeof _setLogLevel;
|
|
@@ -1,16 +1,12 @@
|
|
|
1
1
|
export * from 'firebase/firestore/lite';
|
|
2
|
-
import { addDoc as _addDoc, aggregateFieldEqual as _aggregateFieldEqual, aggregateQuerySnapshotEqual as _aggregateQuerySnapshotEqual, and as _and,
|
|
2
|
+
import { addDoc as _addDoc, aggregateFieldEqual as _aggregateFieldEqual, aggregateQuerySnapshotEqual as _aggregateQuerySnapshotEqual, and as _and, collection as _collection, collectionGroup as _collectionGroup, connectFirestoreEmulator as _connectFirestoreEmulator, deleteDoc as _deleteDoc, deleteField as _deleteField, doc as _doc, documentId as _documentId, endAt as _endAt, endBefore as _endBefore, getAggregate as _getAggregate, getCount as _getCount, getDoc as _getDoc, getDocs as _getDocs, getFirestore as _getFirestore, increment as _increment, initializeFirestore as _initializeFirestore, limit as _limit, limitToLast as _limitToLast, or as _or, orderBy as _orderBy, query as _query, queryEqual as _queryEqual, refEqual as _refEqual, runTransaction as _runTransaction, setDoc as _setDoc, setLogLevel as _setLogLevel, snapshotEqual as _snapshotEqual, startAfter as _startAfter, startAt as _startAt, sum as _sum, terminate as _terminate, updateDoc as _updateDoc, vector as _vector, where as _where, writeBatch as _writeBatch } from 'firebase/firestore/lite';
|
|
3
3
|
export declare const addDoc: typeof _addDoc;
|
|
4
4
|
export declare const aggregateFieldEqual: typeof _aggregateFieldEqual;
|
|
5
5
|
export declare const aggregateQuerySnapshotEqual: typeof _aggregateQuerySnapshotEqual;
|
|
6
6
|
export declare const and: typeof _and;
|
|
7
|
-
export declare const arrayRemove: typeof _arrayRemove;
|
|
8
|
-
export declare const arrayUnion: typeof _arrayUnion;
|
|
9
|
-
export declare const average: typeof _average;
|
|
10
7
|
export declare const collection: typeof _collection;
|
|
11
8
|
export declare const collectionGroup: typeof _collectionGroup;
|
|
12
9
|
export declare const connectFirestoreEmulator: typeof _connectFirestoreEmulator;
|
|
13
|
-
export declare const count: typeof _count;
|
|
14
10
|
export declare const deleteDoc: typeof _deleteDoc;
|
|
15
11
|
export declare const deleteField: typeof _deleteField;
|
|
16
12
|
export declare const doc: typeof _doc;
|
|
@@ -32,7 +28,6 @@ export declare const query: typeof _query;
|
|
|
32
28
|
export declare const queryEqual: typeof _queryEqual;
|
|
33
29
|
export declare const refEqual: typeof _refEqual;
|
|
34
30
|
export declare const runTransaction: typeof _runTransaction;
|
|
35
|
-
export declare const serverTimestamp: typeof _serverTimestamp;
|
|
36
31
|
export declare const setDoc: typeof _setDoc;
|
|
37
32
|
export declare const setLogLevel: typeof _setLogLevel;
|
|
38
33
|
export declare const snapshotEqual: typeof _snapshotEqual;
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "../node_modules/ng-packagr/package.schema.json",
|
|
3
3
|
"name": "@angular/fire",
|
|
4
|
-
"version": "19.
|
|
4
|
+
"version": "19.1.0-canary.20bee94",
|
|
5
5
|
"description": "Angular + Firebase = ❤️",
|
|
6
6
|
"schematics": "./schematics/collection.json",
|
|
7
7
|
"builders": "./schematics/builders.json",
|
|
@@ -40,7 +40,7 @@
|
|
|
40
40
|
}
|
|
41
41
|
},
|
|
42
42
|
"dependencies": {
|
|
43
|
-
"firebase": "^11.0
|
|
43
|
+
"firebase": "^11.8.0",
|
|
44
44
|
"rxfire": "^6.1.0",
|
|
45
45
|
"@angular-devkit/schematics": "^19.0.0",
|
|
46
46
|
"@schematics/angular": "^19.0.0",
|
|
@@ -59,6 +59,10 @@
|
|
|
59
59
|
"types": "./index.d.ts",
|
|
60
60
|
"default": "./fesm2022/angular-fire.mjs"
|
|
61
61
|
},
|
|
62
|
+
"./ai": {
|
|
63
|
+
"types": "./ai/index.d.ts",
|
|
64
|
+
"default": "./fesm2022/angular-fire-ai.mjs"
|
|
65
|
+
},
|
|
62
66
|
"./analytics": {
|
|
63
67
|
"types": "./analytics/index.d.ts",
|
|
64
68
|
"default": "./fesm2022/angular-fire-analytics.mjs"
|
|
@@ -79,14 +83,14 @@
|
|
|
79
83
|
"types": "./auth-guard/index.d.ts",
|
|
80
84
|
"default": "./fesm2022/angular-fire-auth-guard.mjs"
|
|
81
85
|
},
|
|
82
|
-
"./data-connect": {
|
|
83
|
-
"types": "./data-connect/index.d.ts",
|
|
84
|
-
"default": "./fesm2022/angular-fire-data-connect.mjs"
|
|
85
|
-
},
|
|
86
86
|
"./compat": {
|
|
87
87
|
"types": "./compat/index.d.ts",
|
|
88
88
|
"default": "./fesm2022/angular-fire-compat.mjs"
|
|
89
89
|
},
|
|
90
|
+
"./data-connect": {
|
|
91
|
+
"types": "./data-connect/index.d.ts",
|
|
92
|
+
"default": "./fesm2022/angular-fire-data-connect.mjs"
|
|
93
|
+
},
|
|
90
94
|
"./database": {
|
|
91
95
|
"types": "./database/index.d.ts",
|
|
92
96
|
"default": "./fesm2022/angular-fire-database.mjs"
|
package/publish.sh
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
npm publish . --tag
|
|
1
|
+
npm publish . --tag canary
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export * from 'firebase/remote-config';
|
|
2
|
-
import { activate as _activate, ensureInitialized as _ensureInitialized, fetchAndActivate as _fetchAndActivate, fetchConfig as _fetchConfig, getAll as _getAll, getBoolean as _getBoolean, getNumber as _getNumber, getRemoteConfig as _getRemoteConfig, getString as _getString, getValue as _getValue, isSupported as _isSupported, setLogLevel as _setLogLevel } from 'firebase/remote-config';
|
|
2
|
+
import { activate as _activate, ensureInitialized as _ensureInitialized, fetchAndActivate as _fetchAndActivate, fetchConfig as _fetchConfig, getAll as _getAll, getBoolean as _getBoolean, getNumber as _getNumber, getRemoteConfig as _getRemoteConfig, getString as _getString, getValue as _getValue, isSupported as _isSupported, setCustomSignals as _setCustomSignals, setLogLevel as _setLogLevel } from 'firebase/remote-config';
|
|
3
3
|
export declare const activate: typeof _activate;
|
|
4
4
|
export declare const ensureInitialized: typeof _ensureInitialized;
|
|
5
5
|
export declare const fetchAndActivate: typeof _fetchAndActivate;
|
|
@@ -11,4 +11,5 @@ export declare const getRemoteConfig: typeof _getRemoteConfig;
|
|
|
11
11
|
export declare const getString: typeof _getString;
|
|
12
12
|
export declare const getValue: typeof _getValue;
|
|
13
13
|
export declare const isSupported: typeof _isSupported;
|
|
14
|
+
export declare const setCustomSignals: typeof _setCustomSignals;
|
|
14
15
|
export declare const setLogLevel: typeof _setLogLevel;
|