@angular/fire 19.0.0-rc.5 → 19.1.0-canary.ec4e3bd

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.
Files changed (44) hide show
  1. package/app-check/app-check.d.ts +6 -0
  2. package/app-check/public_api.d.ts +1 -2
  3. package/auth/firebase.d.ts +1 -2
  4. package/core.d.ts +0 -7
  5. package/database/firebase.d.ts +1 -2
  6. package/docs/zones.md +20 -2
  7. package/fesm2022/angular-fire-analytics.mjs +8 -8
  8. package/fesm2022/angular-fire-analytics.mjs.map +1 -1
  9. package/fesm2022/angular-fire-app-check.mjs +12 -7
  10. package/fesm2022/angular-fire-app-check.mjs.map +1 -1
  11. package/fesm2022/angular-fire-auth.mjs +43 -43
  12. package/fesm2022/angular-fire-auth.mjs.map +1 -1
  13. package/fesm2022/angular-fire-compat-storage.mjs +4 -4
  14. package/fesm2022/angular-fire-compat-storage.mjs.map +1 -1
  15. package/fesm2022/angular-fire-data-connect.mjs +3 -3
  16. package/fesm2022/angular-fire-data-connect.mjs.map +1 -1
  17. package/fesm2022/angular-fire-database.mjs +27 -27
  18. package/fesm2022/angular-fire-database.mjs.map +1 -1
  19. package/fesm2022/angular-fire-firestore-lite.mjs +34 -38
  20. package/fesm2022/angular-fire-firestore-lite.mjs.map +1 -1
  21. package/fesm2022/angular-fire-firestore.mjs +35 -45
  22. package/fesm2022/angular-fire-firestore.mjs.map +1 -1
  23. package/fesm2022/angular-fire-functions.mjs +3 -2
  24. package/fesm2022/angular-fire-functions.mjs.map +1 -1
  25. package/fesm2022/angular-fire-messaging.mjs +1 -1
  26. package/fesm2022/angular-fire-messaging.mjs.map +1 -1
  27. package/fesm2022/angular-fire-performance.mjs +1 -1
  28. package/fesm2022/angular-fire-performance.mjs.map +1 -1
  29. package/fesm2022/angular-fire-remote-config.mjs +3 -2
  30. package/fesm2022/angular-fire-remote-config.mjs.map +1 -1
  31. package/fesm2022/angular-fire-storage.mjs +6 -5
  32. package/fesm2022/angular-fire-storage.mjs.map +1 -1
  33. package/fesm2022/angular-fire-vertexai.mjs +3 -2
  34. package/fesm2022/angular-fire-vertexai.mjs.map +1 -1
  35. package/fesm2022/angular-fire.mjs +25 -63
  36. package/fesm2022/angular-fire.mjs.map +1 -1
  37. package/firestore/firebase.d.ts +1 -12
  38. package/firestore/lite/firebase.d.ts +1 -6
  39. package/package.json +6 -6
  40. package/publish.sh +1 -1
  41. package/remote-config/firebase.d.ts +2 -1
  42. package/schematics/deploy/builder.js +229 -91
  43. package/schematics/setup/index.js +196 -58
  44. package/zones.d.ts +8 -4
@@ -1,9 +1,10 @@
1
- import { ɵgetAllInstancesOf as _getAllInstancesOf, ɵgetDefaultInstanceOf as _getDefaultInstanceOf, VERSION, ɵAngularFireSchedulers as _AngularFireSchedulers, ɵAppCheckInstances as _AppCheckInstances, ɵzoneWrap as _zoneWrap } from '@angular/fire';
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
9
  import { getGenerativeModel as getGenerativeModel$1, getVertexAI as getVertexAI$1 } from 'firebase/vertexai';
9
10
  export * from 'firebase/vertexai';
@@ -80,7 +81,7 @@ function provideVertexAI(fn, ...deps) {
80
81
  Injector,
81
82
  _AngularFireSchedulers,
82
83
  FirebaseApps,
83
- [new Optional(), _AppCheckInstances],
84
+ [new Optional(), AppCheckInstances],
84
85
  ...deps,
85
86
  ]
86
87
  }
@@ -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 { ɵAppCheckInstances } from '@angular/fire';\nimport { FirebaseApp, FirebaseApps } from '@angular/fire/app';\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 getGenerativeModel as _getGenerativeModel,\n getVertexAI as _getVertexAI\n} from 'firebase/vertexai';\n\nexport const getGenerativeModel = ɵzoneWrap(_getGenerativeModel, 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","ɵAppCheckInstances","ɵzoneWrap","_getGenerativeModel","_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,GAAG,IAAI,cAAc,CAAa,iCAAiC,CAAC;AAE7F,SAAA,8BAA8B,CAAC,QAAsC,EAAE,UAAuB,EAAA;IAC5G,MAAM,eAAe,GAAGC,qBAAqB,CAAmB,uBAAuB,EAAE,QAAQ,EAAE,UAAU,CAAC;AAC9G,IAAA,OAAO,eAAe,IAAI,IAAI,QAAQ,CAAC,eAAe,CAAC;AACzD;AAEM,SAAU,uBAAuB,CAAC,EAA4C,EAAA;AAClF,IAAA,OAAO,CAAC,IAAY,EAAE,QAAkB,KAAI;AAC1C,QAAA,MAAM,QAAQ,GAAG,IAAI,CAAC,iBAAiB,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,CAAC;AAC3D,QAAA,OAAO,IAAI,QAAQ,CAAC,QAAQ,CAAC;AAC/B,KAAC;AACH;AAEA,MAAM,4BAA4B,GAAG;AACnC,IAAA,OAAO,EAAE,iBAAiB;AAC1B,I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AM;gBACN,QAAQ;gBACRC,sBAAsB;gBACtB,YAAY;AACZ,gBAAA,CAAC,IAAI,QAAQ,EAAE,EAAEC,kBAAkB,CAAE;AACrC,gBAAA,GAAG,IAAI;AACR;AACF;AACF,KAAA,CAAC;AACJ;;AC9EA;AAQa,MAAA,kBAAkB,GAAGC,SAAS,CAACC,oBAAmB,EAAE,IAAI;AACxD,MAAA,WAAW,GAAGD,SAAS,CAACE,aAAY,EAAE,IAAI;;ACTvD;;AAEG;;;;"}
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 getGenerativeModel as _getGenerativeModel,\n getVertexAI as _getVertexAI\n} from 'firebase/vertexai';\n\nexport const getGenerativeModel = ɵzoneWrap(_getGenerativeModel, 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","_getGenerativeModel","_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,GAAG,IAAI,cAAc,CAAa,iCAAiC,CAAC;AAE7F,SAAA,8BAA8B,CAAC,QAAsC,EAAE,UAAuB,EAAA;IAC5G,MAAM,eAAe,GAAGC,qBAAqB,CAAmB,uBAAuB,EAAE,QAAQ,EAAE,UAAU,CAAC;AAC9G,IAAA,OAAO,eAAe,IAAI,IAAI,QAAQ,CAAC,eAAe,CAAC;AACzD;AAEM,SAAU,uBAAuB,CAAC,EA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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;AAQa,MAAA,kBAAkB,GAAGC,SAAS,CAACC,oBAAmB,EAAE,IAAI;AACxD,MAAA,WAAW,GAAGD,SAAS,CAACE,aAAY,EAAE,IAAI;;ACTvD;;AAEG;;;;"}
@@ -1,9 +1,9 @@
1
1
  import * as i0 from '@angular/core';
2
- import { Version, inject, NgZone, Injectable, isDevMode, runInInjectionContext, PendingTasks, Injector } from '@angular/core';
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 { observeOn, subscribeOn } from 'rxjs/operators';
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, operation) {
105
- if (isDevMode()) {
106
- if (!alreadyWarned) {
107
- alreadyWarned = true;
108
- 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");
109
- }
110
- console.warn(`Firebase API called outside injection context: ${operation}(${original.name})`);
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
- let ngZone;
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
- let ngZone;
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 = getSchedulers();
144
+ schedulers = inject(ɵAngularFireSchedulers);
183
145
  pendingTasks = inject(PendingTasks);
184
- injector = inject(Injector);
146
+ injector = inject(EnvironmentInjector);
185
147
  }
186
148
  catch (e) {
187
- warnOutsideInjectionContext(it, "ɵzoneWrap");
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 { VERSION, observeInsideAngular, observeOutsideAngular, ɵAPP_CHECK_PROVIDER_NAME, ɵAngularFireSchedulers, ɵAppCheckInstances, ɵZoneScheduler, ɵgetAllInstancesOf, ɵgetDefaultInstanceOf, ɵisSupportedError, ɵzoneWrap };
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,M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EjC,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;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. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":["this"],"mappings":";;;;;;;MAIa,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,CAAC,UAAmB,CAAC;IACnF,OAAO,QAAQ,CAAC,YAAY,CAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;AAClD;MAEa,kBAAkB,GAAG,CAAa,UAAkB,EAAE,GAAiB,KAAS;AAC3F,IAAA,MAAM,IAAI,GAAG,GAAG,GAAG,CAAC,GAAG,CAAC,GAAG,OAAO,EAAE;IACpC,MAAM,SAAS,GAAU,EAAE;AAC3B,IAAA,IAAI,CAAC,OAAO,CAAC,CAAC,GAA6B,KAAI;QAC7C,MAAM,QAAQ,GAAQ,GAAG,C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C,UAAU,CAAC,cAAc,CAAC,EACtC,SAAS,CAAC,UAAU,CAAC,aAAa,CAAC,CACpC;;iBACI;AACL,gBAAA,OAAO,GAAG,CAAC,MAAM,GAAG,CAAC;;;AAGzB,QAAA,IAAI,GAAG,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;;;;"}
@@ -1,17 +1,13 @@
1
1
  export * from 'firebase/firestore';
2
- import { addDoc as _addDoc, aggregateFieldEqual as _aggregateFieldEqual, aggregateQuerySnapshotEqual as _aggregateQuerySnapshotEqual, and as _and, arrayRemove as _arrayRemove, arrayUnion as _arrayUnion, average as _average, clearIndexedDbPersistence as _clearIndexedDbPersistence, collection as _collection, collectionGroup as _collectionGroup, connectFirestoreEmulator as _connectFirestoreEmulator, count as _count, 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, memoryEagerGarbageCollector as _memoryEagerGarbageCollector, memoryLocalCache as _memoryLocalCache, memoryLruGarbageCollector as _memoryLruGarbageCollector, namedQuery as _namedQuery, onSnapshot as _onSnapshot, onSnapshotsInSync as _onSnapshotsInSync, or as _or, orderBy as _orderBy, persistentLocalCache as _persistentLocalCache, persistentMultipleTabManager as _persistentMultipleTabManager, persistentSingleTabManager as _persistentSingleTabManager, query as _query, queryEqual as _queryEqual, refEqual as _refEqual, runTransaction as _runTransaction, serverTimestamp as _serverTimestamp, 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';
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, arrayRemove as _arrayRemove, arrayUnion as _arrayUnion, average as _average, collection as _collection, collectionGroup as _collectionGroup, connectFirestoreEmulator as _connectFirestoreEmulator, count as _count, 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, serverTimestamp as _serverTimestamp, 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';
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.0.0-rc.5",
4
+ "version": "19.1.0-canary.ec4e3bd",
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.2",
43
+ "firebase": "^11.2.0",
44
44
  "rxfire": "^6.1.0",
45
45
  "@angular-devkit/schematics": "^19.0.0",
46
46
  "@schematics/angular": "^19.0.0",
@@ -79,14 +79,14 @@
79
79
  "types": "./auth-guard/index.d.ts",
80
80
  "default": "./fesm2022/angular-fire-auth-guard.mjs"
81
81
  },
82
- "./data-connect": {
83
- "types": "./data-connect/index.d.ts",
84
- "default": "./fesm2022/angular-fire-data-connect.mjs"
85
- },
86
82
  "./compat": {
87
83
  "types": "./compat/index.d.ts",
88
84
  "default": "./fesm2022/angular-fire-compat.mjs"
89
85
  },
86
+ "./data-connect": {
87
+ "types": "./data-connect/index.d.ts",
88
+ "default": "./fesm2022/angular-fire-data-connect.mjs"
89
+ },
90
90
  "./database": {
91
91
  "types": "./database/index.d.ts",
92
92
  "default": "./fesm2022/angular-fire-database.mjs"
package/publish.sh CHANGED
@@ -1 +1 @@
1
- npm publish . --tag next
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;