@angular/fire 19.0.0-canary.e18d8da → 19.0.0-canary.e567618
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +9 -28
- package/analytics/analytics.module.d.ts +2 -2
- package/analytics/firebase.d.ts +2 -2
- package/compat/auth/auth.d.ts +1 -0
- package/compat/database/database.d.ts +1 -0
- package/compat/database/list/create-reference.d.ts +2 -1
- package/compat/database/object/create-reference.d.ts +2 -1
- package/compat/firestore/collection/collection.d.ts +1 -0
- package/compat/firestore/collection-group/collection-group.d.ts +1 -0
- package/compat/firestore/document/document.d.ts +1 -0
- package/compat/firestore/firestore.d.ts +1 -0
- package/compat/remote-config/remote-config.d.ts +1 -0
- package/compat/storage/ref.d.ts +2 -1
- package/compat/storage/storage.d.ts +1 -0
- package/fesm2022/angular-fire-analytics.mjs +14 -41
- package/fesm2022/angular-fire-analytics.mjs.map +1 -1
- package/fesm2022/angular-fire-auth.mjs +1 -1
- package/fesm2022/angular-fire-auth.mjs.map +1 -1
- package/fesm2022/angular-fire-compat-analytics.mjs +2 -2
- package/fesm2022/angular-fire-compat-analytics.mjs.map +1 -1
- package/fesm2022/angular-fire-compat-auth.mjs +3 -2
- package/fesm2022/angular-fire-compat-auth.mjs.map +1 -1
- package/fesm2022/angular-fire-compat-database.mjs +12 -11
- package/fesm2022/angular-fire-compat-database.mjs.map +1 -1
- package/fesm2022/angular-fire-compat-firestore.mjs +18 -14
- package/fesm2022/angular-fire-compat-firestore.mjs.map +1 -1
- package/fesm2022/angular-fire-compat-remote-config.mjs +3 -2
- package/fesm2022/angular-fire-compat-remote-config.mjs.map +1 -1
- package/fesm2022/angular-fire-compat-storage.mjs +9 -8
- package/fesm2022/angular-fire-compat-storage.mjs.map +1 -1
- package/fesm2022/angular-fire-messaging.mjs +11 -38
- package/fesm2022/angular-fire-messaging.mjs.map +1 -1
- package/fesm2022/angular-fire-remote-config.mjs +12 -39
- package/fesm2022/angular-fire-remote-config.mjs.map +1 -1
- package/fesm2022/angular-fire.mjs +75 -15
- package/fesm2022/angular-fire.mjs.map +1 -1
- package/messaging/firebase.d.ts +2 -2
- package/messaging/messaging.module.d.ts +2 -2
- package/package.json +6 -6
- package/remote-config/firebase.d.ts +2 -2
- package/remote-config/remote-config.module.d.ts +2 -2
- package/analytics/is-analytics-supported-factory.d.ts +0 -4
- package/analytics/overrides.d.ts +0 -1
- package/messaging/is-messaging-supported-factory.d.ts +0 -4
- package/messaging/overrides.d.ts +0 -1
- package/remote-config/is-remote-config-supported-factory.d.ts +0 -4
- package/remote-config/overrides.d.ts +0 -1
|
@@ -1,11 +1,12 @@
|
|
|
1
|
-
import { ɵgetAllInstancesOf as _getAllInstancesOf,
|
|
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
|
+
import { isPlatformServer } from '@angular/common';
|
|
4
5
|
import * as i0 from '@angular/core';
|
|
5
|
-
import { InjectionToken, Optional,
|
|
6
|
+
import { InjectionToken, Optional, PLATFORM_ID, NgModule, makeEnvironmentProviders, NgZone, Injector } from '@angular/core';
|
|
6
7
|
import { FirebaseApp, FirebaseApps } from '@angular/fire/app';
|
|
7
8
|
import { registerVersion } from 'firebase/app';
|
|
8
|
-
import {
|
|
9
|
+
import { deleteToken as deleteToken$1, getMessaging as getMessaging$1, getToken as getToken$1, isSupported as isSupported$1, onMessage as onMessage$1 } from 'firebase/messaging';
|
|
9
10
|
export * from 'firebase/messaging';
|
|
10
11
|
|
|
11
12
|
class Messaging {
|
|
@@ -21,31 +22,17 @@ class MessagingInstances {
|
|
|
21
22
|
}
|
|
22
23
|
const messagingInstance$ = timer(0, 300).pipe(concatMap(() => from(_getAllInstancesOf(MESSAGING_PROVIDER_NAME))), distinct());
|
|
23
24
|
|
|
24
|
-
const isMessagingSupportedPromiseSymbol = '__angularfire_symbol__messagingIsSupported';
|
|
25
|
-
const isMessagingSupportedValueSymbol = '__angularfire_symbol__messagingIsSupportedValue';
|
|
26
|
-
globalThis[isMessagingSupportedPromiseSymbol] ||= isSupported$1().then(it => globalThis[isMessagingSupportedValueSymbol] = it).catch(() => globalThis[isMessagingSupportedValueSymbol] = false);
|
|
27
|
-
const isMessagingSupportedFactory = {
|
|
28
|
-
async: () => globalThis[isMessagingSupportedPromiseSymbol],
|
|
29
|
-
sync: () => {
|
|
30
|
-
const ret = globalThis[isMessagingSupportedValueSymbol];
|
|
31
|
-
if (ret === undefined) {
|
|
32
|
-
throw new Error(_isSupportedError('Messaging'));
|
|
33
|
-
}
|
|
34
|
-
return ret;
|
|
35
|
-
}
|
|
36
|
-
};
|
|
37
|
-
|
|
38
25
|
const PROVIDED_MESSAGING_INSTANCES = new InjectionToken('angularfire2.messaging-instances');
|
|
39
|
-
function defaultMessagingInstanceFactory(provided, defaultApp) {
|
|
40
|
-
if (
|
|
26
|
+
function defaultMessagingInstanceFactory(provided, defaultApp, platformId) {
|
|
27
|
+
if (isPlatformServer(platformId)) {
|
|
41
28
|
return null;
|
|
42
29
|
}
|
|
43
30
|
const defaultMessaging = _getDefaultInstanceOf(MESSAGING_PROVIDER_NAME, provided, defaultApp);
|
|
44
31
|
return defaultMessaging && new Messaging(defaultMessaging);
|
|
45
32
|
}
|
|
46
33
|
function messagingInstanceFactory(fn) {
|
|
47
|
-
return (zone, injector) => {
|
|
48
|
-
if (
|
|
34
|
+
return (zone, injector, platformId) => {
|
|
35
|
+
if (isPlatformServer(platformId)) {
|
|
49
36
|
return null;
|
|
50
37
|
}
|
|
51
38
|
const messaging = zone.runOutsideAngular(() => fn(injector));
|
|
@@ -64,6 +51,7 @@ const DEFAULT_MESSAGING_INSTANCE_PROVIDER = {
|
|
|
64
51
|
deps: [
|
|
65
52
|
[new Optional(), PROVIDED_MESSAGING_INSTANCES],
|
|
66
53
|
FirebaseApp,
|
|
54
|
+
PLATFORM_ID,
|
|
67
55
|
]
|
|
68
56
|
};
|
|
69
57
|
class MessagingModule {
|
|
@@ -75,11 +63,6 @@ class MessagingModule {
|
|
|
75
63
|
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.0.0", ngImport: i0, type: MessagingModule, providers: [
|
|
76
64
|
DEFAULT_MESSAGING_INSTANCE_PROVIDER,
|
|
77
65
|
MESSAGING_INSTANCES_PROVIDER,
|
|
78
|
-
{
|
|
79
|
-
provide: APP_INITIALIZER,
|
|
80
|
-
useValue: isMessagingSupportedFactory.async,
|
|
81
|
-
multi: true,
|
|
82
|
-
},
|
|
83
66
|
] });
|
|
84
67
|
}
|
|
85
68
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.0", ngImport: i0, type: MessagingModule, decorators: [{
|
|
@@ -88,11 +71,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.0", ngImpor
|
|
|
88
71
|
providers: [
|
|
89
72
|
DEFAULT_MESSAGING_INSTANCE_PROVIDER,
|
|
90
73
|
MESSAGING_INSTANCES_PROVIDER,
|
|
91
|
-
{
|
|
92
|
-
provide: APP_INITIALIZER,
|
|
93
|
-
useValue: isMessagingSupportedFactory.async,
|
|
94
|
-
multi: true,
|
|
95
|
-
},
|
|
96
74
|
]
|
|
97
75
|
}]
|
|
98
76
|
}], ctorParameters: () => [] });
|
|
@@ -101,11 +79,6 @@ function provideMessaging(fn, ...deps) {
|
|
|
101
79
|
return makeEnvironmentProviders([
|
|
102
80
|
DEFAULT_MESSAGING_INSTANCE_PROVIDER,
|
|
103
81
|
MESSAGING_INSTANCES_PROVIDER,
|
|
104
|
-
{
|
|
105
|
-
provide: APP_INITIALIZER,
|
|
106
|
-
useValue: isMessagingSupportedFactory.async,
|
|
107
|
-
multi: true,
|
|
108
|
-
},
|
|
109
82
|
{
|
|
110
83
|
provide: PROVIDED_MESSAGING_INSTANCES,
|
|
111
84
|
useFactory: messagingInstanceFactory(fn),
|
|
@@ -113,6 +86,7 @@ function provideMessaging(fn, ...deps) {
|
|
|
113
86
|
deps: [
|
|
114
87
|
NgZone,
|
|
115
88
|
Injector,
|
|
89
|
+
PLATFORM_ID,
|
|
116
90
|
_AngularFireSchedulers,
|
|
117
91
|
FirebaseApps,
|
|
118
92
|
...deps,
|
|
@@ -121,12 +95,11 @@ function provideMessaging(fn, ...deps) {
|
|
|
121
95
|
]);
|
|
122
96
|
}
|
|
123
97
|
|
|
124
|
-
const isSupported = isMessagingSupportedFactory.async;
|
|
125
|
-
|
|
126
98
|
// DO NOT MODIFY, this file is autogenerated by tools/build.ts
|
|
127
99
|
const deleteToken = _zoneWrap(deleteToken$1, true);
|
|
128
100
|
const getMessaging = _zoneWrap(getMessaging$1, true);
|
|
129
101
|
const getToken = _zoneWrap(getToken$1, true);
|
|
102
|
+
const isSupported = _zoneWrap(isSupported$1, false);
|
|
130
103
|
const onMessage = _zoneWrap(onMessage$1, false);
|
|
131
104
|
|
|
132
105
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"angular-fire-messaging.mjs","sources":["../../../src/messaging/messaging.ts","../../../src/messaging/
|
|
1
|
+
{"version":3,"file":"angular-fire-messaging.mjs","sources":["../../../src/messaging/messaging.ts","../../../src/messaging/messaging.module.ts","../../../src/messaging/firebase.ts","../../../src/messaging/angular-fire-messaging.ts"],"sourcesContent":["import { ɵgetAllInstancesOf } from '@angular/fire';\nimport { Messaging as FirebaseMessaging } from 'firebase/messaging';\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 Messaging extends FirebaseMessaging {}\n\nexport class Messaging {\n constructor(messaging: FirebaseMessaging) {\n return messaging;\n }\n}\n\nexport const MESSAGING_PROVIDER_NAME = 'messaging';\n\n// eslint-disable-next-line @typescript-eslint/no-empty-interface\nexport interface MessagingInstances extends Array<FirebaseMessaging> {}\n\nexport class MessagingInstances {\n constructor() {\n return ɵgetAllInstancesOf<FirebaseMessaging>(MESSAGING_PROVIDER_NAME);\n }\n}\n\nexport const messagingInstance$ = timer(0, 300).pipe(\n concatMap(() => from(ɵgetAllInstancesOf<FirebaseMessaging>(MESSAGING_PROVIDER_NAME))),\n distinct(),\n);\n","import { isPlatformServer } from '@angular/common';\nimport {\n EnvironmentProviders,\n InjectionToken,\n Injector,\n NgModule,\n NgZone,\n Optional,\n PLATFORM_ID,\n makeEnvironmentProviders,\n} from '@angular/core';\nimport { VERSION, ɵAngularFireSchedulers, ɵgetDefaultInstanceOf } from '@angular/fire';\nimport { FirebaseApp, FirebaseApps } from '@angular/fire/app';\nimport { registerVersion } from 'firebase/app';\nimport { Messaging as FirebaseMessaging } from 'firebase/messaging';\nimport { MESSAGING_PROVIDER_NAME, Messaging, MessagingInstances } from './messaging';\n\nconst PROVIDED_MESSAGING_INSTANCES = new InjectionToken<Messaging[]>('angularfire2.messaging-instances');\n\nexport function defaultMessagingInstanceFactory(provided: FirebaseMessaging[]|undefined, defaultApp: FirebaseApp, platformId: object) {\n if (isPlatformServer(platformId)) { return null; }\n const defaultMessaging = ɵgetDefaultInstanceOf<FirebaseMessaging>(MESSAGING_PROVIDER_NAME, provided, defaultApp);\n return defaultMessaging && new Messaging(defaultMessaging);\n}\n\nexport function messagingInstanceFactory(fn: (injector: Injector) => FirebaseMessaging) {\n return (zone: NgZone, injector: Injector, platformId: object) => {\n if (isPlatformServer(platformId)) { return null; }\n const messaging = zone.runOutsideAngular(() => fn(injector));\n return new Messaging(messaging);\n };\n}\n\nconst MESSAGING_INSTANCES_PROVIDER = {\n provide: MessagingInstances,\n deps: [\n [new Optional(), PROVIDED_MESSAGING_INSTANCES ],\n ]\n};\n\nconst DEFAULT_MESSAGING_INSTANCE_PROVIDER = {\n provide: Messaging,\n useFactory: defaultMessagingInstanceFactory,\n deps: [\n [new Optional(), PROVIDED_MESSAGING_INSTANCES ],\n FirebaseApp,\n PLATFORM_ID,\n ]\n};\n\n@NgModule({\n providers: [\n DEFAULT_MESSAGING_INSTANCE_PROVIDER,\n MESSAGING_INSTANCES_PROVIDER,\n ]\n})\nexport class MessagingModule {\n constructor() {\n registerVersion('angularfire', VERSION.full, 'fcm');\n }\n}\n\nexport function provideMessaging(fn: (injector: Injector) => FirebaseMessaging, ...deps: any[]): EnvironmentProviders {\n registerVersion('angularfire', VERSION.full, 'fcm');\n\n return makeEnvironmentProviders([\n DEFAULT_MESSAGING_INSTANCE_PROVIDER,\n MESSAGING_INSTANCES_PROVIDER,\n {\n provide: PROVIDED_MESSAGING_INSTANCES,\n useFactory: messagingInstanceFactory(fn),\n multi: true,\n deps: [\n NgZone,\n Injector,\n PLATFORM_ID,\n ɵAngularFireSchedulers,\n FirebaseApps,\n ...deps,\n ],\n }\n ]);\n}\n","// DO NOT MODIFY, this file is autogenerated by tools/build.ts\nexport * from 'firebase/messaging';\nimport { ɵzoneWrap } from '@angular/fire';\nimport {\n deleteToken as _deleteToken,\n getMessaging as _getMessaging,\n getToken as _getToken,\n isSupported as _isSupported,\n onMessage as _onMessage\n} from 'firebase/messaging';\n\nexport const deleteToken = ɵzoneWrap(_deleteToken, true);\nexport const getMessaging = ɵzoneWrap(_getMessaging, true);\nexport const getToken = ɵzoneWrap(_getToken, true);\nexport const isSupported = ɵzoneWrap(_isSupported, false);\nexport const onMessage = ɵzoneWrap(_onMessage, false);\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":["ɵgetAllInstancesOf","ɵgetDefaultInstanceOf","ɵAngularFireSchedulers","ɵzoneWrap","_deleteToken","_getMessaging","_getToken","_isSupported","_onMessage"],"mappings":";;;;;;;;;;;MASa,SAAS,CAAA;AACpB,IAAA,WAAA,CAAY,SAA4B,EAAA;AACtC,QAAA,OAAO,SAAS;;A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AW,GAAGC,SAAS,CAACC,aAAY,EAAE,IAAI;AAC1C,MAAA,YAAY,GAAGD,SAAS,CAACE,cAAa,EAAE,IAAI;AAC5C,MAAA,QAAQ,GAAGF,SAAS,CAACG,UAAS,EAAE,IAAI;AACpC,MAAA,WAAW,GAAGH,SAAS,CAACI,aAAY,EAAE,KAAK;AAC3C,MAAA,SAAS,GAAGJ,SAAS,CAACK,WAAU,EAAE,KAAK;;ACfpD;;AAEG;;;;"}
|
|
@@ -1,13 +1,14 @@
|
|
|
1
|
-
import { ɵgetAllInstancesOf as _getAllInstancesOf,
|
|
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
|
+
import { isPlatformServer } from '@angular/common';
|
|
4
5
|
import * as i0 from '@angular/core';
|
|
5
|
-
import { InjectionToken, Optional,
|
|
6
|
+
import { InjectionToken, Optional, PLATFORM_ID, NgModule, makeEnvironmentProviders, NgZone, Injector } from '@angular/core';
|
|
6
7
|
import { FirebaseApp, FirebaseApps } from '@angular/fire/app';
|
|
7
8
|
import { registerVersion } from 'firebase/app';
|
|
8
|
-
import { isSupported as isSupported$1, activate as activate$1, ensureInitialized as ensureInitialized$1, fetchAndActivate as fetchAndActivate$1, fetchConfig as fetchConfig$1, getAll as getAll$2, getBoolean as getBoolean$2, getNumber as getNumber$2, getRemoteConfig as getRemoteConfig$1, getString as getString$2, getValue as getValue$2, setLogLevel as setLogLevel$1 } from 'firebase/remote-config';
|
|
9
|
-
export * from 'firebase/remote-config';
|
|
10
9
|
import { getAll as getAll$1, getBoolean as getBoolean$1, getNumber as getNumber$1, getString as getString$1, getValue as getValue$1 } from 'rxfire/remote-config';
|
|
10
|
+
import { activate as activate$1, ensureInitialized as ensureInitialized$1, fetchAndActivate as fetchAndActivate$1, fetchConfig as fetchConfig$1, getAll as getAll$2, getBoolean as getBoolean$2, getNumber as getNumber$2, getRemoteConfig as getRemoteConfig$1, getString as getString$2, getValue as getValue$2, isSupported as isSupported$1, setLogLevel as setLogLevel$1 } from 'firebase/remote-config';
|
|
11
|
+
export * from 'firebase/remote-config';
|
|
11
12
|
|
|
12
13
|
class RemoteConfig {
|
|
13
14
|
constructor(remoteConfig) {
|
|
@@ -22,31 +23,17 @@ class RemoteConfigInstances {
|
|
|
22
23
|
}
|
|
23
24
|
const remoteConfigInstance$ = timer(0, 300).pipe(concatMap(() => from(_getAllInstancesOf(REMOTE_CONFIG_PROVIDER_NAME))), distinct());
|
|
24
25
|
|
|
25
|
-
const isRemoteConfigSupportedValueSymbol = '__angularfire_symbol__remoteConfigIsSupportedValue';
|
|
26
|
-
const isRemoteConfigSupportedPromiseSymbol = '__angularfire_symbol__remoteConfigIsSupported';
|
|
27
|
-
globalThis[isRemoteConfigSupportedPromiseSymbol] ||= isSupported$1().then(it => globalThis[isRemoteConfigSupportedValueSymbol] = it).catch(() => globalThis[isRemoteConfigSupportedValueSymbol] = false);
|
|
28
|
-
const isRemoteConfigSupportedFactory = {
|
|
29
|
-
async: () => globalThis[isRemoteConfigSupportedPromiseSymbol],
|
|
30
|
-
sync: () => {
|
|
31
|
-
const ret = globalThis[isRemoteConfigSupportedValueSymbol];
|
|
32
|
-
if (ret === undefined) {
|
|
33
|
-
throw new Error(_isSupportedError('RemoteConfig'));
|
|
34
|
-
}
|
|
35
|
-
return ret;
|
|
36
|
-
}
|
|
37
|
-
};
|
|
38
|
-
|
|
39
26
|
const PROVIDED_REMOTE_CONFIG_INSTANCES = new InjectionToken('angularfire2.remote-config-instances');
|
|
40
|
-
function defaultRemoteConfigInstanceFactory(provided, defaultApp) {
|
|
41
|
-
if (
|
|
27
|
+
function defaultRemoteConfigInstanceFactory(provided, defaultApp, platformId) {
|
|
28
|
+
if (isPlatformServer(platformId)) {
|
|
42
29
|
return null;
|
|
43
30
|
}
|
|
44
31
|
const defaultRemoteConfig = _getDefaultInstanceOf(REMOTE_CONFIG_PROVIDER_NAME, provided, defaultApp);
|
|
45
32
|
return defaultRemoteConfig && new RemoteConfig(defaultRemoteConfig);
|
|
46
33
|
}
|
|
47
34
|
function remoteConfigInstanceFactory(fn) {
|
|
48
|
-
return (zone, injector) => {
|
|
49
|
-
if (
|
|
35
|
+
return (zone, injector, platformId) => {
|
|
36
|
+
if (isPlatformServer(platformId)) {
|
|
50
37
|
return null;
|
|
51
38
|
}
|
|
52
39
|
const remoteConfig = zone.runOutsideAngular(() => fn(injector));
|
|
@@ -65,6 +52,7 @@ const DEFAULT_REMOTE_CONFIG_INSTANCE_PROVIDER = {
|
|
|
65
52
|
deps: [
|
|
66
53
|
[new Optional(), PROVIDED_REMOTE_CONFIG_INSTANCES],
|
|
67
54
|
FirebaseApp,
|
|
55
|
+
PLATFORM_ID,
|
|
68
56
|
]
|
|
69
57
|
};
|
|
70
58
|
class RemoteConfigModule {
|
|
@@ -76,11 +64,6 @@ class RemoteConfigModule {
|
|
|
76
64
|
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.0.0", ngImport: i0, type: RemoteConfigModule, providers: [
|
|
77
65
|
DEFAULT_REMOTE_CONFIG_INSTANCE_PROVIDER,
|
|
78
66
|
REMOTE_CONFIG_INSTANCES_PROVIDER,
|
|
79
|
-
{
|
|
80
|
-
provide: APP_INITIALIZER,
|
|
81
|
-
useValue: isRemoteConfigSupportedFactory.async,
|
|
82
|
-
multi: true,
|
|
83
|
-
},
|
|
84
67
|
] });
|
|
85
68
|
}
|
|
86
69
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.0", ngImport: i0, type: RemoteConfigModule, decorators: [{
|
|
@@ -89,11 +72,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.0", ngImpor
|
|
|
89
72
|
providers: [
|
|
90
73
|
DEFAULT_REMOTE_CONFIG_INSTANCE_PROVIDER,
|
|
91
74
|
REMOTE_CONFIG_INSTANCES_PROVIDER,
|
|
92
|
-
{
|
|
93
|
-
provide: APP_INITIALIZER,
|
|
94
|
-
useValue: isRemoteConfigSupportedFactory.async,
|
|
95
|
-
multi: true,
|
|
96
|
-
},
|
|
97
75
|
]
|
|
98
76
|
}]
|
|
99
77
|
}], ctorParameters: () => [] });
|
|
@@ -102,11 +80,6 @@ function provideRemoteConfig(fn, ...deps) {
|
|
|
102
80
|
return makeEnvironmentProviders([
|
|
103
81
|
DEFAULT_REMOTE_CONFIG_INSTANCE_PROVIDER,
|
|
104
82
|
REMOTE_CONFIG_INSTANCES_PROVIDER,
|
|
105
|
-
{
|
|
106
|
-
provide: APP_INITIALIZER,
|
|
107
|
-
useValue: isRemoteConfigSupportedFactory.async,
|
|
108
|
-
multi: true,
|
|
109
|
-
},
|
|
110
83
|
{
|
|
111
84
|
provide: PROVIDED_REMOTE_CONFIG_INSTANCES,
|
|
112
85
|
useFactory: remoteConfigInstanceFactory(fn),
|
|
@@ -114,6 +87,7 @@ function provideRemoteConfig(fn, ...deps) {
|
|
|
114
87
|
deps: [
|
|
115
88
|
NgZone,
|
|
116
89
|
Injector,
|
|
90
|
+
PLATFORM_ID,
|
|
117
91
|
_AngularFireSchedulers,
|
|
118
92
|
FirebaseApps,
|
|
119
93
|
...deps,
|
|
@@ -129,8 +103,6 @@ const getNumberChanges = _zoneWrap(getNumber$1, true);
|
|
|
129
103
|
const getStringChanges = _zoneWrap(getString$1, true);
|
|
130
104
|
const getValueChanges = _zoneWrap(getValue$1, true);
|
|
131
105
|
|
|
132
|
-
const isSupported = isRemoteConfigSupportedFactory.async;
|
|
133
|
-
|
|
134
106
|
// DO NOT MODIFY, this file is autogenerated by tools/build.ts
|
|
135
107
|
const activate = _zoneWrap(activate$1, true);
|
|
136
108
|
const ensureInitialized = _zoneWrap(ensureInitialized$1, true);
|
|
@@ -142,6 +114,7 @@ const getNumber = _zoneWrap(getNumber$2, true);
|
|
|
142
114
|
const getRemoteConfig = _zoneWrap(getRemoteConfig$1, true);
|
|
143
115
|
const getString = _zoneWrap(getString$2, true);
|
|
144
116
|
const getValue = _zoneWrap(getValue$2, true);
|
|
117
|
+
const isSupported = _zoneWrap(isSupported$1, true);
|
|
145
118
|
const setLogLevel = _zoneWrap(setLogLevel$1, true);
|
|
146
119
|
|
|
147
120
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"angular-fire-remote-config.mjs","sources":["../../../src/remote-config/remote-config.ts","../../../src/remote-config/is-remote-config-supported-factory.ts","../../../src/remote-config/remote-config.module.ts","../../../src/remote-config/rxfire.ts","../../../src/remote-config/overrides.ts","../../../src/remote-config/firebase.ts","../../../src/remote-config/angular-fire-remote-config.ts"],"sourcesContent":["import { ɵgetAllInstancesOf } from '@angular/fire';\nimport { RemoteConfig as FirebaseRemoteConfig } from 'firebase/remote-config';\nimport { from, timer } from 'rxjs';\nimport { concatMap, distinct } from 'rxjs/operators';\n\n// see notes in core/firebase.app.module.ts for why we're building the class like this\n// eslint-disable-next-line @typescript-eslint/no-empty-interface\nexport interface RemoteConfig extends FirebaseRemoteConfig {}\n\nexport class RemoteConfig {\n constructor(remoteConfig: FirebaseRemoteConfig) {\n return remoteConfig;\n }\n}\n\nexport const REMOTE_CONFIG_PROVIDER_NAME = 'remote-config';\n\n// eslint-disable-next-line @typescript-eslint/no-empty-interface\nexport interface RemoteConfigInstances extends Array<FirebaseRemoteConfig> {}\n\nexport class RemoteConfigInstances {\n constructor() {\n return ɵgetAllInstancesOf<FirebaseRemoteConfig>(REMOTE_CONFIG_PROVIDER_NAME);\n }\n}\n\nexport const remoteConfigInstance$ = timer(0, 300).pipe(\n concatMap(() => from(ɵgetAllInstancesOf<FirebaseRemoteConfig>(REMOTE_CONFIG_PROVIDER_NAME))),\n distinct(),\n);\n","import { ɵisSupportedError } from '@angular/fire';\nimport { isSupported } from 'firebase/remote-config';\n\nconst isRemoteConfigSupportedValueSymbol = '__angularfire_symbol__remoteConfigIsSupportedValue';\nconst isRemoteConfigSupportedPromiseSymbol = '__angularfire_symbol__remoteConfigIsSupported';\n\nglobalThis[isRemoteConfigSupportedPromiseSymbol] ||= isSupported().then(it =>\n globalThis[isRemoteConfigSupportedValueSymbol] = it\n).catch(() =>\n globalThis[isRemoteConfigSupportedValueSymbol] = false\n);\n\nexport const isRemoteConfigSupportedFactory = {\n async: () => globalThis[isRemoteConfigSupportedPromiseSymbol],\n sync: () => {\n const ret = globalThis[isRemoteConfigSupportedValueSymbol];\n if (ret === undefined) { throw new Error(ɵisSupportedError('RemoteConfig')); }\n return ret;\n }\n};\n","import {\n APP_INITIALIZER,\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 { registerVersion } from 'firebase/app';\nimport { RemoteConfig as FirebaseRemoteConfig } from 'firebase/remote-config';\nimport { isRemoteConfigSupportedFactory } from './is-remote-config-supported-factory';\nimport { REMOTE_CONFIG_PROVIDER_NAME, RemoteConfig, RemoteConfigInstances } from './remote-config';\n\nexport const PROVIDED_REMOTE_CONFIG_INSTANCES = new InjectionToken<RemoteConfig[]>('angularfire2.remote-config-instances');\n\nexport function defaultRemoteConfigInstanceFactory(\n provided: FirebaseRemoteConfig[]|undefined,\n defaultApp: FirebaseApp,\n) {\n if (!isRemoteConfigSupportedFactory.sync()) { return null; }\n const defaultRemoteConfig = ɵgetDefaultInstanceOf<FirebaseRemoteConfig>(REMOTE_CONFIG_PROVIDER_NAME, provided, defaultApp);\n return defaultRemoteConfig && new RemoteConfig(defaultRemoteConfig);\n}\n\nexport function remoteConfigInstanceFactory(fn: (injector: Injector) => FirebaseRemoteConfig) {\n return (zone: NgZone, injector: Injector) => {\n if (!isRemoteConfigSupportedFactory.sync()) { return null; }\n const remoteConfig = zone.runOutsideAngular(() => fn(injector));\n return new RemoteConfig(remoteConfig);\n };\n}\n\nconst REMOTE_CONFIG_INSTANCES_PROVIDER = {\n provide: RemoteConfigInstances,\n deps: [\n [new Optional(), PROVIDED_REMOTE_CONFIG_INSTANCES ],\n ]\n};\n\nconst DEFAULT_REMOTE_CONFIG_INSTANCE_PROVIDER = {\n provide: RemoteConfig,\n useFactory: defaultRemoteConfigInstanceFactory,\n deps: [\n [new Optional(), PROVIDED_REMOTE_CONFIG_INSTANCES ],\n FirebaseApp,\n ]\n};\n\n@NgModule({\n providers: [\n DEFAULT_REMOTE_CONFIG_INSTANCE_PROVIDER,\n REMOTE_CONFIG_INSTANCES_PROVIDER,\n {\n provide: APP_INITIALIZER,\n useValue: isRemoteConfigSupportedFactory.async,\n multi: true,\n },\n ]\n})\nexport class RemoteConfigModule {\n constructor() {\n registerVersion('angularfire', VERSION.full, 'rc');\n }\n}\n\nexport function provideRemoteConfig(\n fn: (injector: Injector) => FirebaseRemoteConfig, ...deps: any[]\n): EnvironmentProviders {\n registerVersion('angularfire', VERSION.full, 'rc');\n\n return makeEnvironmentProviders([\n DEFAULT_REMOTE_CONFIG_INSTANCE_PROVIDER,\n REMOTE_CONFIG_INSTANCES_PROVIDER,\n {\n provide: APP_INITIALIZER,\n useValue: isRemoteConfigSupportedFactory.async,\n multi: true,\n },\n {\n provide: PROVIDED_REMOTE_CONFIG_INSTANCES,\n useFactory: remoteConfigInstanceFactory(fn),\n multi: true,\n deps: [\n NgZone,\n Injector,\n ɵAngularFireSchedulers,\n FirebaseApps,\n ...deps,\n ]\n }\n ]);\n}\n","// DO NOT MODIFY, this file is autogenerated by tools/build.ts\nimport { ɵzoneWrap } from '@angular/fire';\nimport {\n getAll as _getAll,\n getBoolean as _getBoolean,\n getNumber as _getNumber,\n getString as _getString,\n getValue as _getValue\n} from 'rxfire/remote-config';\n\nexport const getAllChanges = ɵzoneWrap(_getAll, true);\nexport const getBooleanChanges = ɵzoneWrap(_getBoolean, true);\nexport const getNumberChanges = ɵzoneWrap(_getNumber, true);\nexport const getStringChanges = ɵzoneWrap(_getString, true);\nexport const getValueChanges = ɵzoneWrap(_getValue, true);\n","import { isRemoteConfigSupportedFactory } from './is-remote-config-supported-factory';\n\nexport const isSupported = isRemoteConfigSupportedFactory.async;\n","// DO NOT MODIFY, this file is autogenerated by tools/build.ts\nexport * from 'firebase/remote-config';\nimport { ɵzoneWrap } from '@angular/fire';\nimport {\n activate as _activate,\n ensureInitialized as _ensureInitialized,\n fetchAndActivate as _fetchAndActivate,\n fetchConfig as _fetchConfig,\n getAll as _getAll,\n getBoolean as _getBoolean,\n getNumber as _getNumber,\n getRemoteConfig as _getRemoteConfig,\n getString as _getString,\n getValue as _getValue,\n setLogLevel as _setLogLevel\n} from 'firebase/remote-config';\n\nexport {\n isSupported\n} from './overrides';\n\nexport const activate = ɵzoneWrap(_activate, true);\nexport const ensureInitialized = ɵzoneWrap(_ensureInitialized, true);\nexport const fetchAndActivate = ɵzoneWrap(_fetchAndActivate, true);\nexport const fetchConfig = ɵzoneWrap(_fetchConfig, true);\nexport const getAll = ɵzoneWrap(_getAll, true);\nexport const getBoolean = ɵzoneWrap(_getBoolean, true);\nexport const getNumber = ɵzoneWrap(_getNumber, true);\nexport const getRemoteConfig = ɵzoneWrap(_getRemoteConfig, true);\nexport const getString = ɵzoneWrap(_getString, true);\nexport const getValue = ɵzoneWrap(_getValue, true);\nexport const setLogLevel = ɵzoneWrap(_setLogLevel, true);\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":["ɵgetAllInstancesOf","isSupported","ɵisSupportedError","ɵgetDefaultInstanceOf","ɵAngularFireSchedulers","ɵzoneWrap","_getAll","_getBoolean","_getNumber","_getString","_getValue","_activate","_ensureInitialized","_fetchAndActivate","_fetchConfig","_getRemoteConfig","_setLogLevel"],"mappings":";;;;;;;;;;;MASa,YAAY,CAAA;AACv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GJ,SAAS,CAACK,UAAS,EAAE,IAAI;;ACZ3C,MAAA,WAAW,GAAG,8BAA8B,CAAC;;ACF1D;AAqBa,MAAA,QAAQ,GAAGL,SAAS,CAACM,UAAS,EAAE,IAAI;AACpC,MAAA,iBAAiB,GAAGN,SAAS,CAACO,mBAAkB,EAAE,IAAI;AACtD,MAAA,gBAAgB,GAAGP,SAAS,CAACQ,kBAAiB,EAAE,IAAI;AACpD,MAAA,WAAW,GAAGR,SAAS,CAACS,aAAY,EAAE,IAAI;AAC1C,MAAA,MAAM,GAAGT,SAAS,CAACC,QAAO,EAAE,IAAI;AAChC,MAAA,UAAU,GAAGD,SAAS,CAACE,YAAW,EAAE,IAAI;AACxC,MAAA,SAAS,GAAGF,SAAS,CAACG,WAAU,EAAE,IAAI;AACtC,MAAA,eAAe,GAAGH,SAAS,CAACU,iBAAgB,EAAE,IAAI;AAClD,MAAA,SAAS,GAAGV,SAAS,CAACI,WAAU,EAAE,IAAI;AACtC,MAAA,QAAQ,GAAGJ,SAAS,CAACK,UAAS,EAAE,IAAI;AACpC,MAAA,WAAW,GAAGL,SAAS,CAACW,aAAY,EAAE,IAAI;;AC/BvD;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"angular-fire-remote-config.mjs","sources":["../../../src/remote-config/remote-config.ts","../../../src/remote-config/remote-config.module.ts","../../../src/remote-config/rxfire.ts","../../../src/remote-config/firebase.ts","../../../src/remote-config/angular-fire-remote-config.ts"],"sourcesContent":["import { ɵgetAllInstancesOf } from '@angular/fire';\nimport { RemoteConfig as FirebaseRemoteConfig } from 'firebase/remote-config';\nimport { from, timer } from 'rxjs';\nimport { concatMap, distinct } from 'rxjs/operators';\n\n// see notes in core/firebase.app.module.ts for why we're building the class like this\n// eslint-disable-next-line @typescript-eslint/no-empty-interface\nexport interface RemoteConfig extends FirebaseRemoteConfig {}\n\nexport class RemoteConfig {\n constructor(remoteConfig: FirebaseRemoteConfig) {\n return remoteConfig;\n }\n}\n\nexport const REMOTE_CONFIG_PROVIDER_NAME = 'remote-config';\n\n// eslint-disable-next-line @typescript-eslint/no-empty-interface\nexport interface RemoteConfigInstances extends Array<FirebaseRemoteConfig> {}\n\nexport class RemoteConfigInstances {\n constructor() {\n return ɵgetAllInstancesOf<FirebaseRemoteConfig>(REMOTE_CONFIG_PROVIDER_NAME);\n }\n}\n\nexport const remoteConfigInstance$ = timer(0, 300).pipe(\n concatMap(() => from(ɵgetAllInstancesOf<FirebaseRemoteConfig>(REMOTE_CONFIG_PROVIDER_NAME))),\n distinct(),\n);\n","import { isPlatformServer } from '@angular/common';\nimport {\n EnvironmentProviders,\n InjectionToken,\n Injector,\n NgModule,\n NgZone,\n Optional,\n PLATFORM_ID,\n makeEnvironmentProviders,\n} from '@angular/core';\nimport { VERSION, ɵAngularFireSchedulers, ɵgetDefaultInstanceOf } from '@angular/fire';\nimport { FirebaseApp, FirebaseApps } from '@angular/fire/app';\nimport { registerVersion } from 'firebase/app';\nimport { RemoteConfig as FirebaseRemoteConfig } from 'firebase/remote-config';\nimport { REMOTE_CONFIG_PROVIDER_NAME, RemoteConfig, RemoteConfigInstances } from './remote-config';\n\nexport const PROVIDED_REMOTE_CONFIG_INSTANCES = new InjectionToken<RemoteConfig[]>('angularfire2.remote-config-instances');\n\nexport function defaultRemoteConfigInstanceFactory(\n provided: FirebaseRemoteConfig[]|undefined,\n defaultApp: FirebaseApp,\n platformId: object,\n) {\n if (isPlatformServer(platformId)) { return null; }\n const defaultRemoteConfig = ɵgetDefaultInstanceOf<FirebaseRemoteConfig>(REMOTE_CONFIG_PROVIDER_NAME, provided, defaultApp);\n return defaultRemoteConfig && new RemoteConfig(defaultRemoteConfig);\n}\n\nexport function remoteConfigInstanceFactory(fn: (injector: Injector) => FirebaseRemoteConfig) {\n return (zone: NgZone, injector: Injector, platformId: object) => {\n if (isPlatformServer(platformId)) { return null; }\n const remoteConfig = zone.runOutsideAngular(() => fn(injector));\n return new RemoteConfig(remoteConfig);\n };\n}\n\nconst REMOTE_CONFIG_INSTANCES_PROVIDER = {\n provide: RemoteConfigInstances,\n deps: [\n [new Optional(), PROVIDED_REMOTE_CONFIG_INSTANCES ],\n ]\n};\n\nconst DEFAULT_REMOTE_CONFIG_INSTANCE_PROVIDER = {\n provide: RemoteConfig,\n useFactory: defaultRemoteConfigInstanceFactory,\n deps: [\n [new Optional(), PROVIDED_REMOTE_CONFIG_INSTANCES ],\n FirebaseApp,\n PLATFORM_ID,\n ]\n};\n\n@NgModule({\n providers: [\n DEFAULT_REMOTE_CONFIG_INSTANCE_PROVIDER,\n REMOTE_CONFIG_INSTANCES_PROVIDER,\n ]\n})\nexport class RemoteConfigModule {\n constructor() {\n registerVersion('angularfire', VERSION.full, 'rc');\n }\n}\n\nexport function provideRemoteConfig(\n fn: (injector: Injector) => FirebaseRemoteConfig, ...deps: any[]\n): EnvironmentProviders {\n registerVersion('angularfire', VERSION.full, 'rc');\n\n return makeEnvironmentProviders([\n DEFAULT_REMOTE_CONFIG_INSTANCE_PROVIDER,\n REMOTE_CONFIG_INSTANCES_PROVIDER,\n {\n provide: PROVIDED_REMOTE_CONFIG_INSTANCES,\n useFactory: remoteConfigInstanceFactory(fn),\n multi: true,\n deps: [\n NgZone,\n Injector,\n PLATFORM_ID,\n ɵAngularFireSchedulers,\n FirebaseApps,\n ...deps,\n ]\n }\n ]);\n}\n","// DO NOT MODIFY, this file is autogenerated by tools/build.ts\nimport { ɵzoneWrap } from '@angular/fire';\nimport {\n getAll as _getAll,\n getBoolean as _getBoolean,\n getNumber as _getNumber,\n getString as _getString,\n getValue as _getValue\n} from 'rxfire/remote-config';\n\nexport const getAllChanges = ɵzoneWrap(_getAll, true);\nexport const getBooleanChanges = ɵzoneWrap(_getBoolean, true);\nexport const getNumberChanges = ɵzoneWrap(_getNumber, true);\nexport const getStringChanges = ɵzoneWrap(_getString, true);\nexport const getValueChanges = ɵzoneWrap(_getValue, true);\n","// DO NOT MODIFY, this file is autogenerated by tools/build.ts\nexport * from 'firebase/remote-config';\nimport { ɵzoneWrap } from '@angular/fire';\nimport {\n activate as _activate,\n ensureInitialized as _ensureInitialized,\n fetchAndActivate as _fetchAndActivate,\n fetchConfig as _fetchConfig,\n getAll as _getAll,\n getBoolean as _getBoolean,\n getNumber as _getNumber,\n getRemoteConfig as _getRemoteConfig,\n getString as _getString,\n getValue as _getValue,\n isSupported as _isSupported,\n setLogLevel as _setLogLevel\n} from 'firebase/remote-config';\n\nexport const activate = ɵzoneWrap(_activate, true);\nexport const ensureInitialized = ɵzoneWrap(_ensureInitialized, true);\nexport const fetchAndActivate = ɵzoneWrap(_fetchAndActivate, true);\nexport const fetchConfig = ɵzoneWrap(_fetchConfig, true);\nexport const getAll = ɵzoneWrap(_getAll, true);\nexport const getBoolean = ɵzoneWrap(_getBoolean, true);\nexport const getNumber = ɵzoneWrap(_getNumber, true);\nexport const getRemoteConfig = ɵzoneWrap(_getRemoteConfig, true);\nexport const getString = ɵzoneWrap(_getString, true);\nexport const getValue = ɵzoneWrap(_getValue, true);\nexport const isSupported = ɵzoneWrap(_isSupported, true);\nexport const setLogLevel = ɵzoneWrap(_setLogLevel, true);\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":["ɵgetAllInstancesOf","ɵgetDefaultInstanceOf","ɵAngularFireSchedulers","ɵzoneWrap","_getAll","_getBoolean","_getNumber","_getString","_getValue","_activate","_ensureInitialized","_fetchAndActivate","_fetchConfig","_getRemoteConfig","_isSupported","_setLogLevel"],"mappings":";;;;;;;;;;;;MASa,YAAY,CAAA;AACvB,IAAA,WAAA,CAAY,YAAkC,EAAA;AAC5C,QAAA,OAAO,YAAY;;AAEtB;AAEM,MAAM,2BAA2B,GAAG,eAAe;MAK7C,qBAAqB,CAAA;AAChC,IAAA,WAAA,GAAA;AACE,QAAA,OAAOA,kBAAkB,CAAuB,2BAA2B,CAAC;;AAE/E;AAEM,MAAM,qBAAqB,GAAG,KAAK,CAAC,CAAC,EAAE,GAAG,CAAC,CAAC,IAAI,CAC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AE,IAAI;AAC7C,MAAA,eAAe,GAAGJ,SAAS,CAACK,UAAS,EAAE,IAAI;;ACdxD;AAkBa,MAAA,QAAQ,GAAGL,SAAS,CAACM,UAAS,EAAE,IAAI;AACpC,MAAA,iBAAiB,GAAGN,SAAS,CAACO,mBAAkB,EAAE,IAAI;AACtD,MAAA,gBAAgB,GAAGP,SAAS,CAACQ,kBAAiB,EAAE,IAAI;AACpD,MAAA,WAAW,GAAGR,SAAS,CAACS,aAAY,EAAE,IAAI;AAC1C,MAAA,MAAM,GAAGT,SAAS,CAACC,QAAO,EAAE,IAAI;AAChC,MAAA,UAAU,GAAGD,SAAS,CAACE,YAAW,EAAE,IAAI;AACxC,MAAA,SAAS,GAAGF,SAAS,CAACG,WAAU,EAAE,IAAI;AACtC,MAAA,eAAe,GAAGH,SAAS,CAACU,iBAAgB,EAAE,IAAI;AAClD,MAAA,SAAS,GAAGV,SAAS,CAACI,WAAU,EAAE,IAAI;AACtC,MAAA,QAAQ,GAAGJ,SAAS,CAACK,UAAS,EAAE,IAAI;AACpC,MAAA,WAAW,GAAGL,SAAS,CAACW,aAAY,EAAE,IAAI;AAC1C,MAAA,WAAW,GAAGX,SAAS,CAACY,aAAY,EAAE,IAAI;;AC7BvD;;AAEG;;;;"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { Version, inject, NgZone, Injectable, PendingTasks } from '@angular/core';
|
|
2
|
+
import { Version, inject, NgZone, Injectable, isDevMode, runInInjectionContext, PendingTasks, Injector } 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';
|
|
@@ -100,24 +100,74 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.0", ngImpor
|
|
|
100
100
|
function getSchedulers() {
|
|
101
101
|
return inject(ɵAngularFireSchedulers);
|
|
102
102
|
}
|
|
103
|
+
var alreadyWarned = false;
|
|
104
|
+
function warnOutsideInjectionContext(original, operation) {
|
|
105
|
+
if (isDevMode()) {
|
|
106
|
+
console.warn(`Firebase API called outside injection context: ${operation}(${original.name})`);
|
|
107
|
+
if (!alreadyWarned) {
|
|
108
|
+
alreadyWarned = true;
|
|
109
|
+
console.error("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");
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
}
|
|
103
113
|
function runOutsideAngular(fn) {
|
|
104
|
-
|
|
114
|
+
let ngZone;
|
|
115
|
+
try {
|
|
116
|
+
ngZone = inject(NgZone);
|
|
117
|
+
}
|
|
118
|
+
catch (e) {
|
|
119
|
+
warnOutsideInjectionContext(fn, "runOutsideAngular");
|
|
120
|
+
}
|
|
121
|
+
if (!ngZone) {
|
|
122
|
+
return fn();
|
|
123
|
+
}
|
|
124
|
+
return ngZone.runOutsideAngular(() => fn());
|
|
105
125
|
}
|
|
106
126
|
function run(fn) {
|
|
107
|
-
|
|
127
|
+
let ngZone;
|
|
128
|
+
try {
|
|
129
|
+
ngZone = inject(NgZone);
|
|
130
|
+
}
|
|
131
|
+
catch (e) {
|
|
132
|
+
warnOutsideInjectionContext(fn, "run");
|
|
133
|
+
}
|
|
134
|
+
if (!ngZone) {
|
|
135
|
+
return fn();
|
|
136
|
+
}
|
|
137
|
+
return ngZone.run(() => fn());
|
|
108
138
|
}
|
|
109
139
|
function observeOutsideAngular(obs$) {
|
|
110
|
-
|
|
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));
|
|
111
151
|
}
|
|
112
152
|
function observeInsideAngular(obs$) {
|
|
113
|
-
|
|
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));
|
|
114
164
|
}
|
|
115
|
-
const zoneWrapFn = (it, taskDone) => {
|
|
165
|
+
const zoneWrapFn = (it, taskDone, injector) => {
|
|
116
166
|
return (...args) => {
|
|
117
167
|
if (taskDone) {
|
|
118
|
-
setTimeout(taskDone,
|
|
168
|
+
setTimeout(taskDone, 0);
|
|
119
169
|
}
|
|
120
|
-
return run(() => it.apply(this, args));
|
|
170
|
+
return runInInjectionContext(injector, () => run(() => it.apply(this, args)));
|
|
121
171
|
};
|
|
122
172
|
};
|
|
123
173
|
const ɵzoneWrap = (it, blockUntilFirst) => {
|
|
@@ -125,21 +175,32 @@ const ɵzoneWrap = (it, blockUntilFirst) => {
|
|
|
125
175
|
return function () {
|
|
126
176
|
let taskDone;
|
|
127
177
|
const _arguments = arguments;
|
|
178
|
+
let schedulers;
|
|
179
|
+
let pendingTasks;
|
|
180
|
+
let injector;
|
|
181
|
+
try {
|
|
182
|
+
schedulers = getSchedulers();
|
|
183
|
+
pendingTasks = inject(PendingTasks);
|
|
184
|
+
injector = inject(Injector);
|
|
185
|
+
}
|
|
186
|
+
catch (e) {
|
|
187
|
+
warnOutsideInjectionContext(it, "ɵzoneWrap");
|
|
188
|
+
return it.apply(this, _arguments);
|
|
189
|
+
}
|
|
128
190
|
// if this is a callback function, e.g, onSnapshot, we should create a pending task and complete it
|
|
129
191
|
// only once one of the callback functions is tripped.
|
|
130
192
|
for (let i = 0; i < arguments.length; i++) {
|
|
131
193
|
if (typeof _arguments[i] === 'function') {
|
|
132
194
|
if (blockUntilFirst) {
|
|
133
|
-
taskDone ||= run(() =>
|
|
195
|
+
taskDone ||= run(() => pendingTasks.add());
|
|
134
196
|
}
|
|
135
197
|
// TODO create a microtask to track callback functions
|
|
136
|
-
_arguments[i] = zoneWrapFn(_arguments[i], taskDone);
|
|
198
|
+
_arguments[i] = zoneWrapFn(_arguments[i], taskDone, injector);
|
|
137
199
|
}
|
|
138
200
|
}
|
|
139
201
|
const ret = runOutsideAngular(() => it.apply(this, _arguments));
|
|
140
202
|
if (!blockUntilFirst) {
|
|
141
203
|
if (ret instanceof Observable) {
|
|
142
|
-
const schedulers = getSchedulers();
|
|
143
204
|
return ret.pipe(subscribeOn(schedulers.outsideAngular), observeOn(schedulers.insideAngular));
|
|
144
205
|
}
|
|
145
206
|
else {
|
|
@@ -147,20 +208,19 @@ const ɵzoneWrap = (it, blockUntilFirst) => {
|
|
|
147
208
|
}
|
|
148
209
|
}
|
|
149
210
|
if (ret instanceof Observable) {
|
|
150
|
-
|
|
151
|
-
return ret.pipe(subscribeOn(schedulers.outsideAngular), observeOn(schedulers.insideAngular), pendingUntilEvent());
|
|
211
|
+
return ret.pipe(subscribeOn(schedulers.outsideAngular), observeOn(schedulers.insideAngular), pendingUntilEvent(injector));
|
|
152
212
|
}
|
|
153
213
|
else if (ret instanceof Promise) {
|
|
154
214
|
// eslint-disable-next-line @typescript-eslint/no-misused-promises
|
|
155
215
|
return run(() => new Promise((resolve, reject) => {
|
|
156
|
-
|
|
216
|
+
pendingTasks.run(() => ret).then((it) => runInInjectionContext(injector, () => run(() => resolve(it))), (reason) => runInInjectionContext(injector, () => run(() => reject(reason))));
|
|
157
217
|
}));
|
|
158
218
|
}
|
|
159
219
|
else if (typeof ret === 'function' && taskDone) {
|
|
160
220
|
// Handle unsubscribe
|
|
161
221
|
// function() is needed for the arguments object
|
|
162
222
|
return function () {
|
|
163
|
-
setTimeout(taskDone,
|
|
223
|
+
setTimeout(taskDone, 0);
|
|
164
224
|
return ret.apply(this, arguments);
|
|
165
225
|
};
|
|
166
226
|
}
|
|
@@ -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 NgZone,\n PendingTasks,\n inject\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\nfunction runOutsideAngular<T>(fn: (...args: any[]) => T): T {\n return inject(NgZone).runOutsideAngular(() => fn());\n}\n\nfunction run<T>(fn: (...args: any[]) => T): T {\n return inject(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\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(() => inject(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 const schedulers = getSchedulers();\n return ret.pipe(\n subscribeOn(schedulers.outsideAngular),\n observeOn(schedulers.insideAngular),\n pendingUntilEvent(),\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 inject(PendingTasks).run(() => 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;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,MA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AAM,GAAG,CAAC;;AAEzB,KAAQ;AACV;;ACnKA;;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 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 console.warn(`Firebase API called outside injection context: ${operation}(${original.name})`);\n if (!alreadyWarned) {\n alreadyWarned = true;\n console.error(\"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 }\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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AAEzB,KAAQ;AACV;;ACvNA;;AAEG;;;;"}
|
package/messaging/firebase.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export * from 'firebase/messaging';
|
|
2
|
-
import { deleteToken as _deleteToken, getMessaging as _getMessaging, getToken as _getToken, onMessage as _onMessage } from 'firebase/messaging';
|
|
3
|
-
export { isSupported } from './overrides';
|
|
2
|
+
import { deleteToken as _deleteToken, getMessaging as _getMessaging, getToken as _getToken, isSupported as _isSupported, onMessage as _onMessage } from 'firebase/messaging';
|
|
4
3
|
export declare const deleteToken: typeof _deleteToken;
|
|
5
4
|
export declare const getMessaging: typeof _getMessaging;
|
|
6
5
|
export declare const getToken: typeof _getToken;
|
|
6
|
+
export declare const isSupported: typeof _isSupported;
|
|
7
7
|
export declare const onMessage: typeof _onMessage;
|
|
@@ -3,8 +3,8 @@ import { FirebaseApp } from '@angular/fire/app';
|
|
|
3
3
|
import { Messaging as FirebaseMessaging } from 'firebase/messaging';
|
|
4
4
|
import { Messaging } from './messaging';
|
|
5
5
|
import * as i0 from "@angular/core";
|
|
6
|
-
export declare function defaultMessagingInstanceFactory(provided: FirebaseMessaging[] | undefined, defaultApp: FirebaseApp): Messaging;
|
|
7
|
-
export declare function messagingInstanceFactory(fn: (injector: Injector) => FirebaseMessaging): (zone: NgZone, injector: Injector) => Messaging;
|
|
6
|
+
export declare function defaultMessagingInstanceFactory(provided: FirebaseMessaging[] | undefined, defaultApp: FirebaseApp, platformId: object): Messaging;
|
|
7
|
+
export declare function messagingInstanceFactory(fn: (injector: Injector) => FirebaseMessaging): (zone: NgZone, injector: Injector, platformId: object) => Messaging;
|
|
8
8
|
export declare class MessagingModule {
|
|
9
9
|
constructor();
|
|
10
10
|
static ɵfac: i0.ɵɵFactoryDeclaration<MessagingModule, never>;
|
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-canary.
|
|
4
|
+
"version": "19.0.0-canary.e567618",
|
|
5
5
|
"description": "Angular + Firebase = ❤️",
|
|
6
6
|
"schematics": "./schematics/collection.json",
|
|
7
7
|
"builders": "./schematics/builders.json",
|
|
@@ -41,7 +41,7 @@
|
|
|
41
41
|
},
|
|
42
42
|
"dependencies": {
|
|
43
43
|
"firebase": "^11.0.2",
|
|
44
|
-
"rxfire": "^6.0
|
|
44
|
+
"rxfire": "^6.1.0",
|
|
45
45
|
"@angular-devkit/schematics": "^19.0.0",
|
|
46
46
|
"@schematics/angular": "^19.0.0",
|
|
47
47
|
"tslib": "^2.3.0"
|
|
@@ -83,14 +83,14 @@
|
|
|
83
83
|
"types": "./compat/index.d.ts",
|
|
84
84
|
"default": "./fesm2022/angular-fire-compat.mjs"
|
|
85
85
|
},
|
|
86
|
-
"./data-connect": {
|
|
87
|
-
"types": "./data-connect/index.d.ts",
|
|
88
|
-
"default": "./fesm2022/angular-fire-data-connect.mjs"
|
|
89
|
-
},
|
|
90
86
|
"./database": {
|
|
91
87
|
"types": "./database/index.d.ts",
|
|
92
88
|
"default": "./fesm2022/angular-fire-database.mjs"
|
|
93
89
|
},
|
|
90
|
+
"./data-connect": {
|
|
91
|
+
"types": "./data-connect/index.d.ts",
|
|
92
|
+
"default": "./fesm2022/angular-fire-data-connect.mjs"
|
|
93
|
+
},
|
|
94
94
|
"./firestore": {
|
|
95
95
|
"types": "./firestore/index.d.ts",
|
|
96
96
|
"default": "./fesm2022/angular-fire-firestore.mjs"
|
|
@@ -1,6 +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, setLogLevel as _setLogLevel } from 'firebase/remote-config';
|
|
3
|
-
export { isSupported } from './overrides';
|
|
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';
|
|
4
3
|
export declare const activate: typeof _activate;
|
|
5
4
|
export declare const ensureInitialized: typeof _ensureInitialized;
|
|
6
5
|
export declare const fetchAndActivate: typeof _fetchAndActivate;
|
|
@@ -11,4 +10,5 @@ export declare const getNumber: typeof _getNumber;
|
|
|
11
10
|
export declare const getRemoteConfig: typeof _getRemoteConfig;
|
|
12
11
|
export declare const getString: typeof _getString;
|
|
13
12
|
export declare const getValue: typeof _getValue;
|
|
13
|
+
export declare const isSupported: typeof _isSupported;
|
|
14
14
|
export declare const setLogLevel: typeof _setLogLevel;
|