@angular/fire 18.0.1-canary.5a8eeef → 18.0.1-canary.6982c75

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 (40) hide show
  1. package/analytics/firebase.d.ts +2 -2
  2. package/auth/rxfire.d.ts +2 -2
  3. package/database/rxfire.d.ts +4 -4
  4. package/esm2022/analytics/firebase.mjs +3 -3
  5. package/esm2022/auth/rxfire.mjs +3 -3
  6. package/esm2022/compat/firestore/collection/changes.mjs +3 -3
  7. package/esm2022/database/rxfire.mjs +5 -5
  8. package/esm2022/firestore/lite/rxfire.mjs +5 -5
  9. package/esm2022/firestore/rxfire.mjs +8 -8
  10. package/esm2022/performance/rxfire.mjs +3 -3
  11. package/esm2022/remote-config/rxfire.mjs +6 -6
  12. package/esm2022/vertexai-preview/firebase.mjs +3 -3
  13. package/esm2022/zones.mjs +37 -57
  14. package/fesm2022/angular-fire-analytics.mjs +2 -2
  15. package/fesm2022/angular-fire-analytics.mjs.map +1 -1
  16. package/fesm2022/angular-fire-auth.mjs +2 -2
  17. package/fesm2022/angular-fire-auth.mjs.map +1 -1
  18. package/fesm2022/angular-fire-compat-firestore.mjs +2 -2
  19. package/fesm2022/angular-fire-compat-firestore.mjs.map +1 -1
  20. package/fesm2022/angular-fire-database.mjs +4 -4
  21. package/fesm2022/angular-fire-database.mjs.map +1 -1
  22. package/fesm2022/angular-fire-firestore-lite.mjs +4 -4
  23. package/fesm2022/angular-fire-firestore-lite.mjs.map +1 -1
  24. package/fesm2022/angular-fire-firestore.mjs +7 -7
  25. package/fesm2022/angular-fire-firestore.mjs.map +1 -1
  26. package/fesm2022/angular-fire-performance.mjs +2 -2
  27. package/fesm2022/angular-fire-performance.mjs.map +1 -1
  28. package/fesm2022/angular-fire-remote-config.mjs +5 -5
  29. package/fesm2022/angular-fire-remote-config.mjs.map +1 -1
  30. package/fesm2022/angular-fire-vertexai-preview.mjs +2 -2
  31. package/fesm2022/angular-fire-vertexai-preview.mjs.map +1 -1
  32. package/fesm2022/angular-fire.mjs +35 -55
  33. package/fesm2022/angular-fire.mjs.map +1 -1
  34. package/firestore/lite/rxfire.d.ts +4 -4
  35. package/firestore/rxfire.d.ts +7 -7
  36. package/package.json +1 -1
  37. package/performance/rxfire.d.ts +2 -2
  38. package/remote-config/rxfire.d.ts +5 -5
  39. package/vertexai-preview/firebase.d.ts +2 -2
  40. package/zones.d.ts +3 -2
@@ -46,9 +46,6 @@ class ɵAppCheckInstances {
46
46
  const ɵAPP_CHECK_PROVIDER_NAME = 'app-check';
47
47
 
48
48
  /* eslint-disable @typescript-eslint/ban-ts-comment */
49
- // eslint-disable-next-line @typescript-eslint/no-empty-function
50
- function noop() {
51
- }
52
49
  /**
53
50
  * Schedules tasks so that they are invoked inside the Zone that is passed in the constructor.
54
51
  */
@@ -67,9 +64,14 @@ class ɵZoneScheduler {
67
64
  // Wrap the specified work function to make sure that if nested scheduling takes place the
68
65
  // work is executed in the correct zone
69
66
  const workInZone = function (state) {
70
- targetZone.runGuarded(() => {
67
+ if (targetZone) {
68
+ targetZone.runGuarded(() => {
69
+ work.apply(this, [state]);
70
+ });
71
+ }
72
+ else {
71
73
  work.apply(this, [state]);
72
- });
74
+ }
73
75
  };
74
76
  // Scheduling itself needs to be run in zone to ensure setInterval calls for async scheduling are done
75
77
  // inside the correct zone. This scheduler needs to schedule asynchronously always to ensure that
@@ -79,41 +81,32 @@ class ɵZoneScheduler {
79
81
  }
80
82
  class BlockUntilFirstOperator {
81
83
  zone;
82
- // @ts-ignore
83
- task = null;
84
- constructor(zone) {
84
+ pendingTasks;
85
+ constructor(zone, pendingTasks) {
85
86
  this.zone = zone;
87
+ this.pendingTasks = pendingTasks;
86
88
  }
87
89
  call(subscriber, source) {
88
- const unscheduleTask = this.unscheduleTask.bind(this);
89
- // @ts-ignore
90
- this.task = this.zone.run(() => Zone.current.scheduleMacroTask('firebaseZoneBlock', noop, {}, noop, noop));
91
- return source.pipe(tap({ next: unscheduleTask, complete: unscheduleTask, error: unscheduleTask })).subscribe(subscriber).add(unscheduleTask);
92
- }
93
- unscheduleTask() {
90
+ const taskDone = this.zone.run(() => this.pendingTasks.add());
94
91
  // maybe this is a race condition, invoke in a timeout
95
92
  // hold for 10ms while I try to figure out what is going on
96
- setTimeout(() => {
97
- if (this.task != null && this.task.state === 'scheduled') {
98
- this.task.invoke();
99
- this.task = null;
100
- }
101
- }, 10);
93
+ const unscheduleTask = () => setTimeout(taskDone, 10);
94
+ return source.pipe(tap({ next: unscheduleTask, complete: unscheduleTask, error: unscheduleTask })).subscribe(subscriber).add(unscheduleTask);
102
95
  }
103
96
  }
104
97
  class ɵAngularFireSchedulers {
105
98
  ngZone;
99
+ pendingTasks;
106
100
  outsideAngular;
107
101
  insideAngular;
108
- constructor(ngZone) {
102
+ constructor(ngZone, pendingTasks) {
109
103
  this.ngZone = ngZone;
110
- // @ts-ignore
111
- this.outsideAngular = ngZone.runOutsideAngular(() => new ɵZoneScheduler(Zone.current));
112
- // @ts-ignore
113
- this.insideAngular = ngZone.run(() => new ɵZoneScheduler(Zone.current, asyncScheduler));
104
+ this.pendingTasks = pendingTasks;
105
+ this.outsideAngular = ngZone.runOutsideAngular(() => new ɵZoneScheduler(typeof Zone === 'undefined' ? undefined : Zone.current));
106
+ this.insideAngular = ngZone.run(() => new ɵZoneScheduler(typeof Zone === 'undefined' ? undefined : Zone.current, asyncScheduler));
114
107
  globalThis.ɵAngularFireScheduler ||= this;
115
108
  }
116
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.0", ngImport: i0, type: ɵAngularFireSchedulers, deps: [{ token: i0.NgZone }], target: i0.ɵɵFactoryTarget.Injectable });
109
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.0", ngImport: i0, type: ɵAngularFireSchedulers, deps: [{ token: i0.NgZone }, { token: i0.ExperimentalPendingTasks }], target: i0.ɵɵFactoryTarget.Injectable });
117
110
  static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.0.0", ngImport: i0, type: ɵAngularFireSchedulers, providedIn: 'root' });
118
111
  }
119
112
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.0", ngImport: i0, type: ɵAngularFireSchedulers, decorators: [{
@@ -121,7 +114,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.0", ngImpor
121
114
  args: [{
122
115
  providedIn: 'root',
123
116
  }]
124
- }], ctorParameters: () => [{ type: i0.NgZone }] });
117
+ }], ctorParameters: () => [{ type: i0.NgZone }, { type: i0.ExperimentalPendingTasks }] });
125
118
  function getSchedulers() {
126
119
  const schedulers = globalThis.ɵAngularFireScheduler;
127
120
  if (!schedulers) {
@@ -153,7 +146,7 @@ function keepUnstableUntilFirst(obs$) {
153
146
  */
154
147
  function ɵkeepUnstableUntilFirstFactory(schedulers) {
155
148
  return function keepUnstableUntilFirst(obs$) {
156
- obs$ = obs$.lift(new BlockUntilFirstOperator(schedulers.ngZone));
149
+ obs$ = obs$.lift(new BlockUntilFirstOperator(schedulers.ngZone, schedulers.pendingTasks));
157
150
  return obs$.pipe(
158
151
  // Run the subscribe body outside of Angular (e.g. calling Firebase SDK to add a listener to a change event)
159
152
  subscribeOn(schedulers.outsideAngular),
@@ -164,39 +157,28 @@ function ɵkeepUnstableUntilFirstFactory(schedulers) {
164
157
  );
165
158
  };
166
159
  }
167
- // @ts-ignore
168
- const zoneWrapFn = (it, macrotask) => {
169
- // eslint-disable-next-line @typescript-eslint/no-this-alias
170
- const _this = this;
171
- // function() is needed for the arguments object
172
- return function () {
173
- const _arguments = arguments;
174
- if (macrotask) {
175
- setTimeout(() => {
176
- if (macrotask.state === 'scheduled') {
177
- macrotask.invoke();
178
- }
179
- }, 10);
160
+ const zoneWrapFn = (it, taskDone) => {
161
+ return (...args) => {
162
+ if (taskDone) {
163
+ setTimeout(taskDone, 10);
180
164
  }
181
- return run(() => it.apply(_this, _arguments));
165
+ return run(() => it.apply(this, args));
182
166
  };
183
167
  };
184
168
  const ɵzoneWrap = (it, blockUntilFirst) => {
185
169
  // function() is needed for the arguments object
186
170
  return function () {
187
- // @ts-ignore
188
- let macrotask;
171
+ let taskDone;
189
172
  const _arguments = arguments;
190
- // if this is a callback function, e.g, onSnapshot, we should create a microtask and invoke it
173
+ // if this is a callback function, e.g, onSnapshot, we should create a pending task and complete it
191
174
  // only once one of the callback functions is tripped.
192
175
  for (let i = 0; i < arguments.length; i++) {
193
176
  if (typeof _arguments[i] === 'function') {
194
177
  if (blockUntilFirst) {
195
- // @ts-ignore
196
- macrotask ||= run(() => Zone.current.scheduleMacroTask('firebaseZoneBlock', noop, {}, noop, noop));
178
+ taskDone ||= run(() => getSchedulers().pendingTasks.add());
197
179
  }
198
180
  // TODO create a microtask to track callback functions
199
- _arguments[i] = zoneWrapFn(_arguments[i], macrotask);
181
+ _arguments[i] = zoneWrapFn(_arguments[i], taskDone);
200
182
  }
201
183
  }
202
184
  const ret = runOutsideAngular(() => it.apply(this, _arguments));
@@ -214,17 +196,15 @@ const ɵzoneWrap = (it, blockUntilFirst) => {
214
196
  }
215
197
  else if (ret instanceof Promise) {
216
198
  // eslint-disable-next-line @typescript-eslint/no-misused-promises
217
- return run(() => new Promise((resolve, reject) => ret.then(it => run(() => resolve(it)), reason => run(() => reject(reason)))));
199
+ return run(() => new Promise((resolve, reject) => {
200
+ ret.then((it) => run(() => resolve(it)), (reason) => run(() => reject(reason)));
201
+ }));
218
202
  }
219
- else if (typeof ret === 'function' && macrotask) {
203
+ else if (typeof ret === 'function' && taskDone) {
220
204
  // Handle unsubscribe
221
205
  // function() is needed for the arguments object
222
206
  return function () {
223
- setTimeout(() => {
224
- if (macrotask && macrotask.state === 'scheduled') {
225
- macrotask.invoke();
226
- }
227
- }, 10);
207
+ setTimeout(taskDone, 10);
228
208
  return ret.apply(this, arguments);
229
209
  };
230
210
  }
@@ -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 { Injectable, NgZone } from '@angular/core';\nimport {\n Observable,\n Operator,\n SchedulerAction,\n SchedulerLike,\n Subscriber,\n Subscription,\n TeardownLogic,\n asyncScheduler,\n queueScheduler\n} from 'rxjs';\nimport { observeOn, subscribeOn, tap } from 'rxjs/operators';\n\n// eslint-disable-next-line @typescript-eslint/no-empty-function\nfunction noop() {\n}\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 targetZone.runGuarded(() => {\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\nclass BlockUntilFirstOperator<T> implements Operator<T, T> {\n // @ts-ignore\n private task: MacroTask | null = null;\n\n constructor(private zone: any) {\n }\n\n call(subscriber: Subscriber<T>, source: Observable<T>): TeardownLogic {\n const unscheduleTask = this.unscheduleTask.bind(this);\n // @ts-ignore\n this.task = this.zone.run(() => Zone.current.scheduleMacroTask('firebaseZoneBlock', noop, {}, noop, noop));\n\n return source.pipe(\n tap({ next: unscheduleTask, complete: unscheduleTask, error: unscheduleTask })\n ).subscribe(subscriber).add(unscheduleTask);\n }\n\n private unscheduleTask() {\n // maybe this is a race condition, invoke in a timeout\n // hold for 10ms while I try to figure out what is going on\n setTimeout(() => {\n if (this.task != null && this.task.state === 'scheduled') {\n this.task.invoke();\n this.task = null;\n }\n }, 10);\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(public ngZone: NgZone) {\n // @ts-ignore\n this.outsideAngular = ngZone.runOutsideAngular(() => new ɵZoneScheduler(Zone.current));\n // @ts-ignore\n this.insideAngular = ngZone.run(() => new ɵZoneScheduler(Zone.current, asyncScheduler));\n globalThis.ɵAngularFireScheduler ||= this;\n }\n}\n\nfunction getSchedulers() {\n const schedulers = globalThis.ɵAngularFireScheduler as ɵAngularFireSchedulers|undefined;\n if (!schedulers) {\n throw new Error(\n`Either AngularFireModule has not been provided in your AppModule (this can be done manually or implictly using\nprovideFirebaseApp) or you're calling an AngularFire method outside of an NgModule (which is not supported).`);\n }\n return schedulers;\n}\n\nfunction runOutsideAngular<T>(fn: (...args: any[]) => T): T {\n return getSchedulers().ngZone.runOutsideAngular(() => fn());\n}\n\nfunction run<T>(fn: (...args: any[]) => T): T {\n return getSchedulers().ngZone.run(() => fn());\n}\n\nexport function observeOutsideAngular<T>(obs$: Observable<T>): Observable<T> {\n return obs$.pipe(observeOn(getSchedulers().outsideAngular));\n}\n\nexport function observeInsideAngular<T>(obs$: Observable<T>): Observable<T> {\n return obs$.pipe(observeOn(getSchedulers().insideAngular));\n}\n\nexport function keepUnstableUntilFirst<T>(obs$: Observable<T>): Observable<T> {\n return ɵkeepUnstableUntilFirstFactory(getSchedulers())(obs$);\n}\n\n/**\n * Operator to block the zone until the first value has been emitted or the observable\n * has completed/errored. This is used to make sure that universal waits until the first\n * value from firebase but doesn't block the zone forever since the firebase subscription\n * is still alive.\n */\nexport function ɵkeepUnstableUntilFirstFactory(schedulers: ɵAngularFireSchedulers) {\n return function keepUnstableUntilFirst<T>(obs$: Observable<T>): Observable<T> {\n obs$ = obs$.lift(\n new BlockUntilFirstOperator(schedulers.ngZone)\n );\n\n return obs$.pipe(\n // Run the subscribe body outside of Angular (e.g. calling Firebase SDK to add a listener to a change event)\n subscribeOn(schedulers.outsideAngular),\n // Run operators inside the angular zone (e.g. side effects via tap())\n observeOn(schedulers.insideAngular)\n // INVESTIGATE https://github.com/angular/angularfire/pull/2315\n // share()\n );\n };\n}\n\n// @ts-ignore\nconst zoneWrapFn = (it: (...args: any[]) => any, macrotask: MacroTask|undefined) => {\n // eslint-disable-next-line @typescript-eslint/no-this-alias\n const _this = this;\n // function() is needed for the arguments object\n return function() {\n const _arguments = arguments;\n if (macrotask) {\n setTimeout(() => {\n if (macrotask.state === 'scheduled') {\n macrotask.invoke();\n }\n }, 10);\n }\n return run(() => it.apply(_this, _arguments));\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 // @ts-ignore\n let macrotask: MacroTask | undefined;\n const _arguments = arguments;\n // if this is a callback function, e.g, onSnapshot, we should create a microtask and invoke 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 // @ts-ignore\n macrotask ||= run(() => Zone.current.scheduleMacroTask('firebaseZoneBlock', noop, {}, noop, noop));\n }\n // TODO create a microtask to track callback functions\n _arguments[i] = zoneWrapFn(_arguments[i], macrotask);\n }\n }\n const ret = runOutsideAngular(() => (it as any).apply(this, _arguments));\n if (!blockUntilFirst) {\n if (ret instanceof Observable) {\n const schedulers = getSchedulers();\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(keepUnstableUntilFirst) as any;\n } else if (ret instanceof Promise) {\n // eslint-disable-next-line @typescript-eslint/no-misused-promises\n return run(() => new Promise((resolve, reject) => ret.then(it => run(() => resolve(it)), reason => run(() => reject(reason)))));\n } else if (typeof ret === 'function' && macrotask) {\n // Handle unsubscribe\n // function() is needed for the arguments object\n return function() {\n setTimeout(() => {\n if (macrotask && macrotask.state === 'scheduled') {\n macrotask.invoke();\n }\n }, 10);\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,EAAE;MAE9C,iBAAiB,GAAG,CAAC,MAAc,KAC9C,CAAA;AAC+B,+BAAA,EAAA,MAAM,0CAA0C,MAAM,CAAA;AACS,8FAAA,EAAA,MAAM,OAAO;SAO7F,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,CAAC;SAAE;AAClD,QAAA,MAAM,uBAAuB,GAAG,QAAQ,CAAC,MAAM,CAAC,CAAC,EAAO,KAAK,EAAE,CAAC,GAAG,KAAK,UAAU,CAAC,CAAC;;AAEpF,QAAA,IAAI,uBAAuB,CAAC,MAAM,KAAK,CAAC,EAAE;AAAE,YAAA,OAAO,uBAAuB,CAAC,CAAC,CAAC,CAAC;SAAE;KACjF;;IAED,MAAM,uBAAuB,GAA6B,UAAiB,CAAC;IAC5E,MAAM,QAAQ,GAAG,uBAAuB,CAAC,SAAS,CAAC,WAAW,CAAC,UAAmB,CAAC,CAAC;IACpF,OAAO,QAAQ,CAAC,YAAY,CAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC,CAAC;AACnD,CAAC;MAEY,kBAAkB,GAAG,CAAa,UAAkB,EAAE,GAAiB,KAAS;AAC3F,IAAA,MAAM,IAAI,GAAG,GAAG,GAAG,CAAC,GAAG,CAAC,GAAG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BAAA,OAAO,GAAG,CAAC,MAAM,GAAG,CAAC,CAAC;aACvB;SACF;AACD,QAAA,IAAI,GAAG,YAAY,UAAU,EAAE;AAC7B,YAAA,OAAO,GAAG,CAAC,IAAI,CAAC,sBAAsB,CAAQ,CAAC;SAChD;AAAM,aAAA,IAAI,GAAG,YAAY,OAAO,EAAE;;YAEjC,OAAO,GAAG,CAAC,MAAM,IAAI,OAAO,CAAC,CAAC,OAAO,EAAE,MAAM,KAAK,GAAG,CAAC,IAAI,CAAC,EAAE,IAAI,GAAG,CAAC,MAAM,OAAO,CAAC,EAAE,CAAC,CAAC,EAAE,MAAM,IAAI,GAAG,CAAC,MAAM,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;SACjI;AAAM,aAAA,IAAI,OAAO,GAAG,KAAK,UAAU,IAAI,SAAS,EAAE;;;YAGjD,OAAO,YAAA;gBACL,UAAU,CAAC,MAAK;oBACd,IAAI,SAAS,IAAI,SAAS,CAAC,KAAK,KAAK,WAAW,EAAE;wBAChD,SAAS,CAAC,MAAM,EAAE,CAAC;qBACpB;iBACF,EAAE,EAAE,CAAC,CAAC;gBACP,OAAO,GAAG,CAAC,KAAK,CAAC,IAAI,EAAE,SAAS,CAAC,CAAC;AACpC,aAAC,CAAC;SACH;aAAM;;AAEL,YAAA,OAAO,GAAG,CAAC,MAAM,GAAG,CAAC,CAAC;SACvB;AACH,KAAQ,CAAC;AACX;;ACtNA;;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';\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 ExperimentalPendingTasks,\n Injectable,\n NgZone\n} from '@angular/core';\nimport {\n Observable,\n Operator,\n SchedulerAction,\n SchedulerLike,\n Subscriber,\n Subscription,\n TeardownLogic,\n asyncScheduler,\n queueScheduler\n} from 'rxjs';\nimport { observeOn, subscribeOn, tap } 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\nclass BlockUntilFirstOperator<T> implements Operator<T, T> {\n constructor(\n private zone: any,\n private pendingTasks: ExperimentalPendingTasks\n ) {}\n\n call(subscriber: Subscriber<T>, source: Observable<T>): TeardownLogic {\n const taskDone: VoidFunction = this.zone.run(() => this.pendingTasks.add());\n // maybe this is a race condition, invoke in a timeout\n // hold for 10ms while I try to figure out what is going on\n const unscheduleTask = () => setTimeout(taskDone, 10);\n\n return source.pipe(\n tap({ next: unscheduleTask, complete: unscheduleTask, error: unscheduleTask })\n ).subscribe(subscriber).add(unscheduleTask);\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(public ngZone: NgZone, public pendingTasks: ExperimentalPendingTasks) {\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 globalThis.ɵAngularFireScheduler ||= this;\n }\n}\n\nfunction getSchedulers() {\n const schedulers = globalThis.ɵAngularFireScheduler as ɵAngularFireSchedulers|undefined;\n if (!schedulers) {\n throw new Error(\n`Either AngularFireModule has not been provided in your AppModule (this can be done manually or implictly using\nprovideFirebaseApp) or you're calling an AngularFire method outside of an NgModule (which is not supported).`);\n }\n return schedulers;\n}\n\nfunction runOutsideAngular<T>(fn: (...args: any[]) => T): T {\n return getSchedulers().ngZone.runOutsideAngular(() => fn());\n}\n\nfunction run<T>(fn: (...args: any[]) => T): T {\n return getSchedulers().ngZone.run(() => fn());\n}\n\nexport function observeOutsideAngular<T>(obs$: Observable<T>): Observable<T> {\n return obs$.pipe(observeOn(getSchedulers().outsideAngular));\n}\n\nexport function observeInsideAngular<T>(obs$: Observable<T>): Observable<T> {\n return obs$.pipe(observeOn(getSchedulers().insideAngular));\n}\n\nexport function keepUnstableUntilFirst<T>(obs$: Observable<T>): Observable<T> {\n return ɵkeepUnstableUntilFirstFactory(getSchedulers())(obs$);\n}\n\n/**\n * Operator to block the zone until the first value has been emitted or the observable\n * has completed/errored. This is used to make sure that universal waits until the first\n * value from firebase but doesn't block the zone forever since the firebase subscription\n * is still alive.\n */\nexport function ɵkeepUnstableUntilFirstFactory(\n schedulers: ɵAngularFireSchedulers\n) {\n return function keepUnstableUntilFirst<T>(\n obs$: Observable<T>\n ): Observable<T> {\n obs$ = obs$.lift(\n new BlockUntilFirstOperator(schedulers.ngZone, schedulers.pendingTasks)\n );\n\n return obs$.pipe(\n // Run the subscribe body outside of Angular (e.g. calling Firebase SDK to add a listener to a change event)\n subscribeOn(schedulers.outsideAngular),\n // Run operators inside the angular zone (e.g. side effects via tap())\n observeOn(schedulers.insideAngular)\n // INVESTIGATE https://github.com/angular/angularfire/pull/2315\n // share()\n );\n };\n}\n\nconst zoneWrapFn = (\n it: (...args: any[]) => any,\n taskDone: VoidFunction | undefined\n) => {\n return (...args: any[]) => {\n if (taskDone) {\n setTimeout(taskDone, 10);\n }\n return 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 // 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(() => getSchedulers().pendingTasks.add());\n }\n // TODO create a microtask to track callback functions\n _arguments[i] = zoneWrapFn(_arguments[i], taskDone);\n }\n }\n const ret = runOutsideAngular(() => (it as any).apply(this, _arguments));\n if (!blockUntilFirst) {\n if (ret instanceof Observable) {\n const schedulers = getSchedulers();\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(keepUnstableUntilFirst) as any;\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 ret.then(\n (it) => run(() => resolve(it)),\n (reason) => 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, 10);\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,EAAE;MAE9C,iBAAiB,GAAG,CAAC,MAAc,KAC9C,CAAA;AAC+B,+BAAA,EAAA,MAAM,0CAA0C,MAAM,CAAA;AACS,8FAAA,EAAA,MAAM,OAAO;SAO7F,qBAAqB,CA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C,IAAI,EAAE,SAAS,CAAC,CAAC;AACpC,aAAC,CAAC;SACH;aAAM;;AAEL,YAAA,OAAO,GAAG,CAAC,MAAM,GAAG,CAAC,CAAC;SACvB;AACH,KAAQ,CAAC;AACX;;ACtNA;;AAEG;;;;"}
@@ -1,9 +1,9 @@
1
- import { collection as _collection, collectionData as _collectionData, collectionCountSnap as _collectionCountSnap, collectionCount as _collectionCount, doc as _doc, docData as _docData, snapToData as _snapToData, fromRef as _fromRef } from 'rxfire/firestore/lite';
1
+ import { collection as _collection, collectionCount as _collectionCount, collectionCountSnap as _collectionCountSnap, collectionData as _collectionData, doc as _doc, docData as _docData, fromRef as _fromRef, snapToData as _snapToData } from 'rxfire/firestore/lite';
2
2
  export declare const collectionSnapshots: typeof _collection;
3
- export declare const collectionData: typeof _collectionData;
4
- export declare const collectionCountSnap: typeof _collectionCountSnap;
5
3
  export declare const collectionCount: typeof _collectionCount;
4
+ export declare const collectionCountSnap: typeof _collectionCountSnap;
5
+ export declare const collectionData: typeof _collectionData;
6
6
  export declare const docSnapshots: typeof _doc;
7
7
  export declare const docData: typeof _docData;
8
- export declare const snapToData: typeof _snapToData;
9
8
  export declare const fromRef: typeof _fromRef;
9
+ export declare const snapToData: typeof _snapToData;
@@ -1,12 +1,12 @@
1
- import { collectionChanges as _collectionChanges, collection as _collection, sortedChanges as _sortedChanges, auditTrail as _auditTrail, collectionData as _collectionData, collectionCountSnap as _collectionCountSnap, collectionCount as _collectionCount, doc as _doc, docData as _docData, snapToData as _snapToData, fromRef as _fromRef } from 'rxfire/firestore';
2
- export declare const collectionChanges: typeof _collectionChanges;
3
- export declare const collectionSnapshots: typeof _collection;
4
- export declare const sortedChanges: typeof _sortedChanges;
1
+ import { auditTrail as _auditTrail, collection as _collection, collectionChanges as _collectionChanges, collectionCount as _collectionCount, collectionCountSnap as _collectionCountSnap, collectionData as _collectionData, doc as _doc, docData as _docData, fromRef as _fromRef, snapToData as _snapToData, sortedChanges as _sortedChanges } from 'rxfire/firestore';
5
2
  export declare const auditTrail: typeof _auditTrail;
6
- export declare const collectionData: typeof _collectionData;
7
- export declare const collectionCountSnap: typeof _collectionCountSnap;
3
+ export declare const collectionSnapshots: typeof _collection;
4
+ export declare const collectionChanges: typeof _collectionChanges;
8
5
  export declare const collectionCount: typeof _collectionCount;
6
+ export declare const collectionCountSnap: typeof _collectionCountSnap;
7
+ export declare const collectionData: typeof _collectionData;
9
8
  export declare const docSnapshots: typeof _doc;
10
9
  export declare const docData: typeof _docData;
11
- export declare const snapToData: typeof _snapToData;
12
10
  export declare const fromRef: typeof _fromRef;
11
+ export declare const snapToData: typeof _snapToData;
12
+ export declare const sortedChanges: typeof _sortedChanges;
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": "18.0.1-canary.5a8eeef",
4
+ "version": "18.0.1-canary.6982c75",
5
5
  "description": "Angular + Firebase = ❤️",
6
6
  "schematics": "./schematics/collection.json",
7
7
  "builders": "./schematics/builders.json",
@@ -1,8 +1,8 @@
1
1
  export declare const traceUntil: <T = any>(name: string, test: (a: T) => boolean, options?: {
2
2
  orComplete?: boolean;
3
3
  }) => (source$: import("rxjs").Observable<T>) => import("rxjs").Observable<T>;
4
+ export declare const traceUntilComplete: <T = any>(name: string) => (source$: import("rxjs").Observable<T>) => import("rxjs").Observable<T>;
5
+ export declare const traceUntilFirst: <T = any>(name: string) => (source$: import("rxjs").Observable<T>) => import("rxjs").Observable<T>;
4
6
  export declare const traceWhile: <T = any>(name: string, test: (a: T) => boolean, options?: {
5
7
  orComplete?: boolean;
6
8
  }) => (source$: import("rxjs").Observable<T>) => import("rxjs").Observable<T>;
7
- export declare const traceUntilComplete: <T = any>(name: string) => (source$: import("rxjs").Observable<T>) => import("rxjs").Observable<T>;
8
- export declare const traceUntilFirst: <T = any>(name: string) => (source$: import("rxjs").Observable<T>) => import("rxjs").Observable<T>;
@@ -1,6 +1,6 @@
1
- import { getValue as _getValue, getString as _getString, getNumber as _getNumber, getBoolean as _getBoolean, getAll as _getAll } from 'rxfire/remote-config';
2
- export declare const getValueChanges: typeof _getValue;
3
- export declare const getStringChanges: typeof _getString;
4
- export declare const getNumberChanges: typeof _getNumber;
5
- export declare const getBooleanChanges: typeof _getBoolean;
1
+ import { getAll as _getAll, getBoolean as _getBoolean, getNumber as _getNumber, getString as _getString, getValue as _getValue } from 'rxfire/remote-config';
6
2
  export declare const getAllChanges: typeof _getAll;
3
+ export declare const getBooleanChanges: typeof _getBoolean;
4
+ export declare const getNumberChanges: typeof _getNumber;
5
+ export declare const getStringChanges: typeof _getString;
6
+ export declare const getValueChanges: typeof _getValue;
@@ -1,4 +1,4 @@
1
1
  export * from 'firebase/vertexai-preview';
2
- import { getVertexAI as _getVertexAI, getGenerativeModel as _getGenerativeModel } from 'firebase/vertexai-preview';
3
- export declare const getVertexAI: typeof _getVertexAI;
2
+ import { getGenerativeModel as _getGenerativeModel, getVertexAI as _getVertexAI } from 'firebase/vertexai-preview';
4
3
  export declare const getGenerativeModel: typeof _getGenerativeModel;
4
+ export declare const getVertexAI: typeof _getVertexAI;
package/zones.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { NgZone } from '@angular/core';
1
+ import { ExperimentalPendingTasks, NgZone } from '@angular/core';
2
2
  import { Observable, SchedulerAction, SchedulerLike, Subscription } from 'rxjs';
3
3
  import * as i0 from "@angular/core";
4
4
  /**
@@ -13,9 +13,10 @@ export declare class ɵZoneScheduler implements SchedulerLike {
13
13
  }
14
14
  export declare class ɵAngularFireSchedulers {
15
15
  ngZone: NgZone;
16
+ pendingTasks: ExperimentalPendingTasks;
16
17
  readonly outsideAngular: ɵZoneScheduler;
17
18
  readonly insideAngular: ɵZoneScheduler;
18
- constructor(ngZone: NgZone);
19
+ constructor(ngZone: NgZone, pendingTasks: ExperimentalPendingTasks);
19
20
  static ɵfac: i0.ɵɵFactoryDeclaration<ɵAngularFireSchedulers, never>;
20
21
  static ɵprov: i0.ɵɵInjectableDeclaration<ɵAngularFireSchedulers>;
21
22
  }