@angular/fire 17.1.0 → 18.0.0-canary.bfc27e2
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 +10 -0
- package/compat/proxy.d.ts +2 -2
- package/compat/storage/pipes/storageUrl.pipe.d.ts +1 -2
- package/docs/analytics.md +14 -20
- package/docs/app-check.md +12 -9
- package/docs/auth.md +44 -9
- package/docs/database.md +12 -12
- package/docs/firestore.md +15 -23
- package/docs/functions.md +11 -9
- package/docs/messaging.md +30 -8
- package/docs/performance.md +11 -9
- package/docs/remote-config.md +11 -9
- package/docs/storage.md +11 -10
- package/docs/vertexai.md +53 -0
- package/esm2022/analytics/analytics.module.mjs +5 -5
- package/esm2022/analytics/is-analytics-supported-factory.mjs +1 -1
- package/esm2022/analytics/screen-tracking.service.mjs +4 -4
- package/esm2022/analytics/user-tracking.service.mjs +4 -4
- package/esm2022/app/app.module.mjs +5 -5
- package/esm2022/app-check/app-check.module.mjs +5 -5
- package/esm2022/auth/auth.module.mjs +5 -5
- package/esm2022/auth-guard/auth-guard.mjs +4 -4
- package/esm2022/auth-guard/auth-guard.module.mjs +5 -5
- package/esm2022/compat/analytics/analytics.mjs +4 -4
- package/esm2022/compat/analytics/analytics.module.mjs +5 -5
- package/esm2022/compat/analytics/screen-tracking.service.mjs +4 -4
- package/esm2022/compat/analytics/user-tracking.service.mjs +4 -4
- package/esm2022/compat/auth/auth.mjs +4 -4
- package/esm2022/compat/auth/auth.module.mjs +5 -5
- package/esm2022/compat/auth-guard/auth-guard.mjs +4 -4
- package/esm2022/compat/auth-guard/auth-guard.module.mjs +5 -5
- package/esm2022/compat/cache.mjs +1 -1
- package/esm2022/compat/database/database.mjs +4 -4
- package/esm2022/compat/database/database.module.mjs +5 -5
- package/esm2022/compat/database/list/changes.mjs +1 -1
- package/esm2022/compat/database/list/create-reference.mjs +1 -1
- package/esm2022/compat/database/list/remove.mjs +1 -1
- package/esm2022/compat/database/list/utils.mjs +1 -1
- package/esm2022/compat/database/observable/fromRef.mjs +1 -1
- package/esm2022/compat/database/utils.mjs +1 -1
- package/esm2022/compat/firebase.app.module.mjs +5 -5
- package/esm2022/compat/firestore/collection/changes.mjs +1 -1
- package/esm2022/compat/firestore/collection/collection.mjs +1 -1
- package/esm2022/compat/firestore/collection-group/collection-group.mjs +1 -1
- package/esm2022/compat/firestore/firestore.mjs +4 -4
- package/esm2022/compat/firestore/firestore.module.mjs +5 -5
- package/esm2022/compat/firestore/observable/fromRef.mjs +1 -1
- package/esm2022/compat/functions/functions.mjs +4 -4
- package/esm2022/compat/functions/functions.module.mjs +5 -5
- package/esm2022/compat/messaging/messaging.mjs +4 -4
- package/esm2022/compat/messaging/messaging.module.mjs +5 -5
- package/esm2022/compat/performance/performance.mjs +4 -4
- package/esm2022/compat/performance/performance.module.mjs +5 -5
- package/esm2022/compat/performance/performance.service.mjs +4 -4
- package/esm2022/compat/proxy.mjs +1 -1
- package/esm2022/compat/remote-config/remote-config.mjs +4 -4
- package/esm2022/compat/remote-config/remote-config.module.mjs +5 -5
- package/esm2022/compat/storage/pipes/storageUrl.pipe.mjs +10 -12
- package/esm2022/compat/storage/storage.mjs +4 -4
- package/esm2022/compat/storage/storage.module.mjs +5 -5
- package/esm2022/core.mjs +1 -1
- package/esm2022/database/database.module.mjs +5 -5
- package/esm2022/firestore/firestore.module.mjs +5 -5
- package/esm2022/firestore/lite/lite.module.mjs +5 -5
- package/esm2022/functions/functions.module.mjs +5 -5
- package/esm2022/messaging/is-messaging-supported-factory.mjs +1 -1
- package/esm2022/messaging/messaging.module.mjs +5 -5
- package/esm2022/performance/performance.module.mjs +5 -5
- package/esm2022/remote-config/is-remote-config-supported-factory.mjs +1 -1
- package/esm2022/remote-config/remote-config.module.mjs +5 -5
- package/esm2022/storage/storage.module.mjs +5 -5
- package/esm2022/vertexai-preview/vertexai.module.mjs +5 -5
- package/esm2022/zones.mjs +4 -4
- package/fesm2022/angular-fire-analytics.mjs +410 -297
- package/fesm2022/angular-fire-analytics.mjs.map +7 -1
- package/fesm2022/angular-fire-app-check.mjs +162 -91
- package/fesm2022/angular-fire-app-check.mjs.map +7 -1
- package/fesm2022/angular-fire-app.mjs +181 -108
- package/fesm2022/angular-fire-app.mjs.map +7 -1
- package/fesm2022/angular-fire-auth-guard.mjs +83 -73
- package/fesm2022/angular-fire-auth-guard.mjs.map +7 -1
- package/fesm2022/angular-fire-auth.mjs +421 -142
- package/fesm2022/angular-fire-auth.mjs.map +7 -1
- package/fesm2022/angular-fire-compat-analytics.mjs +261 -270
- package/fesm2022/angular-fire-compat-analytics.mjs.map +7 -1
- package/fesm2022/angular-fire-compat-auth-guard.mjs +83 -72
- package/fesm2022/angular-fire-compat-auth-guard.mjs.map +7 -1
- package/fesm2022/angular-fire-compat-auth.mjs +214 -213
- package/fesm2022/angular-fire-compat-auth.mjs.map +7 -1
- package/fesm2022/angular-fire-compat-database.mjs +375 -378
- package/fesm2022/angular-fire-compat-database.mjs.map +7 -1
- package/fesm2022/angular-fire-compat-firestore.mjs +537 -677
- package/fesm2022/angular-fire-compat-firestore.mjs.map +7 -1
- package/fesm2022/angular-fire-compat-functions.mjs +97 -93
- package/fesm2022/angular-fire-compat-functions.mjs.map +7 -1
- package/fesm2022/angular-fire-compat-messaging.mjs +106 -106
- package/fesm2022/angular-fire-compat-messaging.mjs.map +7 -1
- package/fesm2022/angular-fire-compat-performance.mjs +157 -151
- package/fesm2022/angular-fire-compat-performance.mjs.map +7 -1
- package/fesm2022/angular-fire-compat-remote-config.mjs +215 -231
- package/fesm2022/angular-fire-compat-remote-config.mjs.map +7 -1
- package/fesm2022/angular-fire-compat-storage.mjs +226 -233
- package/fesm2022/angular-fire-compat-storage.mjs.map +7 -1
- package/fesm2022/angular-fire-compat.mjs +140 -153
- package/fesm2022/angular-fire-compat.mjs.map +7 -1
- package/fesm2022/angular-fire-database.mjs +376 -136
- package/fesm2022/angular-fire-database.mjs.map +7 -1
- package/fesm2022/angular-fire-firestore-lite.mjs +388 -139
- package/fesm2022/angular-fire-firestore-lite.mjs.map +7 -1
- package/fesm2022/angular-fire-firestore.mjs +526 -167
- package/fesm2022/angular-fire-firestore.mjs.map +7 -1
- package/fesm2022/angular-fire-functions.mjs +166 -93
- package/fesm2022/angular-fire-functions.mjs.map +7 -1
- package/fesm2022/angular-fire-messaging.mjs +196 -118
- package/fesm2022/angular-fire-messaging.mjs.map +7 -1
- package/fesm2022/angular-fire-performance.mjs +178 -104
- package/fesm2022/angular-fire-performance.mjs.map +7 -1
- package/fesm2022/angular-fire-remote-config.mjs +254 -132
- package/fesm2022/angular-fire-remote-config.mjs.map +7 -1
- package/fesm2022/angular-fire-storage.mjs +225 -105
- package/fesm2022/angular-fire-storage.mjs.map +7 -1
- package/fesm2022/angular-fire-vertexai-preview.mjs +146 -85
- package/fesm2022/angular-fire-vertexai-preview.mjs.map +7 -1
- package/fesm2022/angular-fire.mjs +183 -213
- package/fesm2022/angular-fire.mjs.map +7 -1
- package/package.json +7 -7
- package/schematics/deploy/actions.js +2 -2
- package/schematics/setup/prompts.js +1 -1
|
@@ -1,122 +1,195 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
+
var __export = (target, all) => {
|
|
6
|
+
for (var name in all)
|
|
7
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
8
|
+
};
|
|
9
|
+
var __copyProps = (to, from2, except, desc) => {
|
|
10
|
+
if (from2 && typeof from2 === "object" || typeof from2 === "function") {
|
|
11
|
+
for (let key of __getOwnPropNames(from2))
|
|
12
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
13
|
+
__defProp(to, key, { get: () => from2[key], enumerable: !(desc = __getOwnPropDesc(from2, key)) || desc.enumerable });
|
|
14
|
+
}
|
|
15
|
+
return to;
|
|
16
|
+
};
|
|
17
|
+
var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
|
|
8
18
|
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
19
|
+
// angular-fire-app.mjs
|
|
20
|
+
var angular_fire_app_exports = {};
|
|
21
|
+
__export(angular_fire_app_exports, {
|
|
22
|
+
FirebaseApp: () => FirebaseApp,
|
|
23
|
+
FirebaseAppModule: () => FirebaseAppModule,
|
|
24
|
+
FirebaseApps: () => FirebaseApps,
|
|
25
|
+
deleteApp: () => deleteApp,
|
|
26
|
+
firebaseApp$: () => firebaseApp$,
|
|
27
|
+
getApp: () => getApp2,
|
|
28
|
+
getApps: () => getApps2,
|
|
29
|
+
initializeApp: () => initializeApp,
|
|
30
|
+
initializeServerApp: () => initializeServerApp,
|
|
31
|
+
onLog: () => onLog,
|
|
32
|
+
provideFirebaseApp: () => provideFirebaseApp,
|
|
33
|
+
registerVersion: () => registerVersion2,
|
|
34
|
+
setLogLevel: () => setLogLevel
|
|
35
|
+
});
|
|
36
|
+
|
|
37
|
+
// public_api.mjs
|
|
38
|
+
var public_api_exports = {};
|
|
39
|
+
__export(public_api_exports, {
|
|
40
|
+
FirebaseApp: () => FirebaseApp,
|
|
41
|
+
FirebaseAppModule: () => FirebaseAppModule,
|
|
42
|
+
FirebaseApps: () => FirebaseApps,
|
|
43
|
+
deleteApp: () => deleteApp,
|
|
44
|
+
firebaseApp$: () => firebaseApp$,
|
|
45
|
+
getApp: () => getApp2,
|
|
46
|
+
getApps: () => getApps2,
|
|
47
|
+
initializeApp: () => initializeApp,
|
|
48
|
+
initializeServerApp: () => initializeServerApp,
|
|
49
|
+
onLog: () => onLog,
|
|
50
|
+
provideFirebaseApp: () => provideFirebaseApp,
|
|
51
|
+
registerVersion: () => registerVersion2,
|
|
52
|
+
setLogLevel: () => setLogLevel
|
|
53
|
+
});
|
|
54
|
+
|
|
55
|
+
// app.mjs
|
|
56
|
+
import { getApps } from "firebase/app";
|
|
57
|
+
import { from, timer } from "rxjs";
|
|
58
|
+
import { concatMap, distinct } from "rxjs/operators";
|
|
59
|
+
var FirebaseApp = class {
|
|
60
|
+
constructor(app) {
|
|
61
|
+
return app;
|
|
62
|
+
}
|
|
63
|
+
};
|
|
64
|
+
var FirebaseApps = class {
|
|
65
|
+
constructor() {
|
|
66
|
+
return getApps();
|
|
67
|
+
}
|
|
68
|
+
};
|
|
69
|
+
var firebaseApp$ = timer(0, 300).pipe(concatMap(() => from(getApps())), distinct());
|
|
20
70
|
|
|
71
|
+
// app.module.mjs
|
|
72
|
+
import { Inject, InjectionToken, Injector, VERSION as NG_VERSION, NgModule, NgZone, Optional, PLATFORM_ID, makeEnvironmentProviders } from "@angular/core";
|
|
73
|
+
import { VERSION, ɵAngularFireSchedulers } from "@angular/fire";
|
|
74
|
+
import { getApp, registerVersion } from "firebase/app";
|
|
75
|
+
import * as i0 from "@angular/core";
|
|
21
76
|
function defaultFirebaseAppFactory(provided) {
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
return new FirebaseApp(getApp$1());
|
|
77
|
+
if (provided && provided.length === 1) {
|
|
78
|
+
return provided[0];
|
|
79
|
+
}
|
|
80
|
+
return new FirebaseApp(getApp());
|
|
27
81
|
}
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
const DEFAULT_FIREBASE_APP_PROVIDER = {
|
|
36
|
-
provide: FirebaseApp,
|
|
37
|
-
useFactory: defaultFirebaseAppFactory,
|
|
38
|
-
deps: [
|
|
39
|
-
[new Optional(), PROVIDED_FIREBASE_APPS],
|
|
40
|
-
],
|
|
82
|
+
var PROVIDED_FIREBASE_APPS = new InjectionToken("angularfire2._apps");
|
|
83
|
+
var DEFAULT_FIREBASE_APP_PROVIDER = {
|
|
84
|
+
provide: FirebaseApp,
|
|
85
|
+
useFactory: defaultFirebaseAppFactory,
|
|
86
|
+
deps: [
|
|
87
|
+
[new Optional(), PROVIDED_FIREBASE_APPS]
|
|
88
|
+
]
|
|
41
89
|
};
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
90
|
+
var FIREBASE_APPS_PROVIDER = {
|
|
91
|
+
provide: FirebaseApps,
|
|
92
|
+
deps: [
|
|
93
|
+
[new Optional(), PROVIDED_FIREBASE_APPS]
|
|
94
|
+
]
|
|
47
95
|
};
|
|
48
96
|
function firebaseAppFactory(fn) {
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
};
|
|
58
|
-
}
|
|
59
|
-
class FirebaseAppModule {
|
|
60
|
-
// eslint-disable-next-line @typescript-eslint/ban-types
|
|
61
|
-
constructor(platformId) {
|
|
62
|
-
registerVersion$1('angularfire', VERSION.full, 'core');
|
|
63
|
-
registerVersion$1('angularfire', VERSION.full, 'app');
|
|
64
|
-
// eslint-disable-next-line @typescript-eslint/no-base-to-string
|
|
65
|
-
registerVersion$1('angular', VERSION$1.full, platformId.toString());
|
|
66
|
-
}
|
|
67
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.6", ngImport: i0, type: FirebaseAppModule, deps: [{ token: PLATFORM_ID }], target: i0.ɵɵFactoryTarget.NgModule });
|
|
68
|
-
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "17.0.6", ngImport: i0, type: FirebaseAppModule });
|
|
69
|
-
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "17.0.6", ngImport: i0, type: FirebaseAppModule, providers: [
|
|
70
|
-
DEFAULT_FIREBASE_APP_PROVIDER,
|
|
71
|
-
FIREBASE_APPS_PROVIDER,
|
|
72
|
-
] });
|
|
97
|
+
return (zone, injector) => {
|
|
98
|
+
const platformId = injector.get(PLATFORM_ID);
|
|
99
|
+
registerVersion("angularfire", VERSION.full, "core");
|
|
100
|
+
registerVersion("angularfire", VERSION.full, "app");
|
|
101
|
+
registerVersion("angular", NG_VERSION.full, platformId.toString());
|
|
102
|
+
const app = zone.runOutsideAngular(() => fn(injector));
|
|
103
|
+
return new FirebaseApp(app);
|
|
104
|
+
};
|
|
73
105
|
}
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
106
|
+
var FirebaseAppModule = class _FirebaseAppModule {
|
|
107
|
+
// eslint-disable-next-line @typescript-eslint/ban-types
|
|
108
|
+
constructor(platformId) {
|
|
109
|
+
registerVersion("angularfire", VERSION.full, "core");
|
|
110
|
+
registerVersion("angularfire", VERSION.full, "app");
|
|
111
|
+
registerVersion("angular", NG_VERSION.full, platformId.toString());
|
|
112
|
+
}
|
|
113
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.0-rc.3", ngImport: i0, type: _FirebaseAppModule, deps: [{ token: PLATFORM_ID }], target: i0.ɵɵFactoryTarget.NgModule });
|
|
114
|
+
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "18.0.0-rc.3", ngImport: i0, type: _FirebaseAppModule });
|
|
115
|
+
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "18.0.0-rc.3", ngImport: i0, type: _FirebaseAppModule, providers: [
|
|
116
|
+
DEFAULT_FIREBASE_APP_PROVIDER,
|
|
117
|
+
FIREBASE_APPS_PROVIDER
|
|
118
|
+
] });
|
|
119
|
+
};
|
|
120
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.0-rc.3", ngImport: i0, type: FirebaseAppModule, decorators: [{
|
|
121
|
+
type: NgModule,
|
|
122
|
+
args: [{
|
|
123
|
+
providers: [
|
|
124
|
+
DEFAULT_FIREBASE_APP_PROVIDER,
|
|
125
|
+
FIREBASE_APPS_PROVIDER
|
|
126
|
+
]
|
|
127
|
+
}]
|
|
128
|
+
}], ctorParameters: () => [{ type: Object, decorators: [{
|
|
129
|
+
type: Inject,
|
|
130
|
+
args: [PLATFORM_ID]
|
|
131
|
+
}] }] });
|
|
89
132
|
function provideFirebaseApp(fn, ...deps) {
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
133
|
+
return makeEnvironmentProviders([
|
|
134
|
+
DEFAULT_FIREBASE_APP_PROVIDER,
|
|
135
|
+
FIREBASE_APPS_PROVIDER,
|
|
136
|
+
{
|
|
137
|
+
provide: PROVIDED_FIREBASE_APPS,
|
|
138
|
+
useFactory: firebaseAppFactory(fn),
|
|
139
|
+
multi: true,
|
|
140
|
+
deps: [
|
|
141
|
+
NgZone,
|
|
142
|
+
Injector,
|
|
143
|
+
ɵAngularFireSchedulers,
|
|
144
|
+
...deps
|
|
145
|
+
]
|
|
146
|
+
}
|
|
147
|
+
]);
|
|
105
148
|
}
|
|
106
149
|
|
|
107
|
-
//
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
150
|
+
// firebase.mjs
|
|
151
|
+
var firebase_exports = {};
|
|
152
|
+
__export(firebase_exports, {
|
|
153
|
+
deleteApp: () => deleteApp,
|
|
154
|
+
getApp: () => getApp2,
|
|
155
|
+
getApps: () => getApps2,
|
|
156
|
+
initializeApp: () => initializeApp,
|
|
157
|
+
initializeServerApp: () => initializeServerApp,
|
|
158
|
+
onLog: () => onLog,
|
|
159
|
+
registerVersion: () => registerVersion2,
|
|
160
|
+
setLogLevel: () => setLogLevel
|
|
161
|
+
});
|
|
162
|
+
__reExport(firebase_exports, app_star);
|
|
163
|
+
import * as app_star from "firebase/app";
|
|
164
|
+
import { ɵzoneWrap } from "@angular/fire";
|
|
165
|
+
import { deleteApp as _deleteApp, getApp as _getApp, getApps as _getApps, initializeApp as _initializeApp, initializeServerApp as _initializeServerApp, onLog as _onLog, registerVersion as _registerVersion, setLogLevel as _setLogLevel } from "firebase/app";
|
|
166
|
+
var deleteApp = ɵzoneWrap(_deleteApp, true);
|
|
167
|
+
var getApp2 = ɵzoneWrap(_getApp, true);
|
|
168
|
+
var getApps2 = ɵzoneWrap(_getApps, true);
|
|
169
|
+
var initializeApp = ɵzoneWrap(_initializeApp, true);
|
|
170
|
+
var initializeServerApp = ɵzoneWrap(_initializeServerApp, true);
|
|
171
|
+
var onLog = ɵzoneWrap(_onLog, true);
|
|
172
|
+
var registerVersion2 = ɵzoneWrap(_registerVersion, true);
|
|
173
|
+
var setLogLevel = ɵzoneWrap(_setLogLevel, true);
|
|
116
174
|
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
*/
|
|
175
|
+
// public_api.mjs
|
|
176
|
+
__reExport(public_api_exports, firebase_exports);
|
|
120
177
|
|
|
121
|
-
|
|
178
|
+
// angular-fire-app.mjs
|
|
179
|
+
__reExport(angular_fire_app_exports, public_api_exports);
|
|
180
|
+
export {
|
|
181
|
+
FirebaseApp,
|
|
182
|
+
FirebaseAppModule,
|
|
183
|
+
FirebaseApps,
|
|
184
|
+
deleteApp,
|
|
185
|
+
firebaseApp$,
|
|
186
|
+
getApp2 as getApp,
|
|
187
|
+
getApps2 as getApps,
|
|
188
|
+
initializeApp,
|
|
189
|
+
initializeServerApp,
|
|
190
|
+
onLog,
|
|
191
|
+
provideFirebaseApp,
|
|
192
|
+
registerVersion2 as registerVersion,
|
|
193
|
+
setLogLevel
|
|
194
|
+
};
|
|
122
195
|
//# sourceMappingURL=angular-fire-app.mjs.map
|
|
@@ -1 +1,7 @@
|
|
|
1
|
-
{
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/app/angular-fire-app.ts", "../../../src/app/public_api.ts", "../../../src/app/app.ts", "../../../src/app/app.module.ts", "../../../src/app/firebase.ts"],
|
|
4
|
+
"sourcesContent": ["/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n", "export { FirebaseApp, FirebaseApps, firebaseApp$ } from './app';\nexport { provideFirebaseApp, FirebaseAppModule } from './app.module';\nexport * from './firebase';\n", "import { FirebaseApp as IFirebaseApp, getApps } from 'firebase/app';\nimport { from, timer } from 'rxjs';\nimport { concatMap, distinct } from 'rxjs/operators';\n\n// Need to turn the FirebaseApp interface exported by firebase/app into a class\n// as types don't work in Angular DI. We want developers to be able to inject FirebaseApp like so\n// constructor(app: FirebaseApp)\n// the cleanest way to achieve this that I found is to export a new interface and class\n// the interface just extends the interface you want to turn into the class. This informs tyepscript\n// that the class has all the same methods/properties as the interface you want to extend without\n// breaking if Firebase adds/removes APIs in future releases. This was a big problem for @angular/fire\n// back when we constructed our own class. Then in the \"new class\" we just return the FirebaseApp in the\n// constructor, this also has the added benefit of Firebase methods taking our DI class without\n// casting. E.g,\n// constructor(private app: FirebaseApp) { }\n// ngOnDestroy() { deleteApp(this.app); }\n//\n// eslint-disable-next-line @typescript-eslint/no-empty-interface\nexport interface FirebaseApp extends IFirebaseApp {}\n\nexport class FirebaseApp {\n constructor(app: IFirebaseApp) {\n return app;\n }\n}\n\n// eslint-disable-next-line @typescript-eslint/no-empty-interface\nexport interface FirebaseApps extends Array<IFirebaseApp> {}\n\nexport class FirebaseApps {\n constructor() {\n return getApps();\n }\n}\n\nexport const firebaseApp$ = timer(0, 300).pipe(\n concatMap(() => from(getApps())),\n distinct(),\n);\n", "import {\n EnvironmentProviders,\n Inject,\n InjectionToken,\n Injector,\n VERSION as NG_VERSION,\n NgModule,\n NgZone,\n Optional,\n PLATFORM_ID,\n makeEnvironmentProviders,\n} from '@angular/core';\nimport { VERSION, ɵAngularFireSchedulers } from '@angular/fire';\nimport { FirebaseApp as IFirebaseApp, getApp, registerVersion } from 'firebase/app';\nimport { FirebaseApp, FirebaseApps } from './app';\n\nexport function defaultFirebaseAppFactory(provided: FirebaseApp[]|undefined) {\n // Use the provided app, if there is only one, otherwise fetch the default app\n if (provided && provided.length === 1) { return provided[0]; }\n return new FirebaseApp(getApp());\n}\n\n// With FIREBASE_APPS I wanted to capture the default app instance, if it is initialized by\n// the reserved URL; ɵPROVIDED_FIREBASE_APPS is not for public consumption and serves to ensure that all\n// provideFirebaseApp(...) calls are satisfied before FirebaseApp$ or FirebaseApp is resolved\nexport const PROVIDED_FIREBASE_APPS = new InjectionToken<FirebaseApp[]>('angularfire2._apps');\n\n// Injecting FirebaseApp will now only inject the default Firebase App\n// this allows allows beginners to import /__/firebase/init.js to auto initialize Firebase App\n// from the reserved URL.\nconst DEFAULT_FIREBASE_APP_PROVIDER = {\n provide: FirebaseApp,\n useFactory: defaultFirebaseAppFactory,\n deps: [\n [new Optional(), PROVIDED_FIREBASE_APPS ],\n ],\n};\n\nconst FIREBASE_APPS_PROVIDER = {\n provide: FirebaseApps,\n deps: [\n [new Optional(), PROVIDED_FIREBASE_APPS ],\n ],\n};\n\nexport function firebaseAppFactory(fn: (injector: Injector) => IFirebaseApp) {\n return (zone: NgZone, injector: Injector) => {\n const platformId = injector.get(PLATFORM_ID);\n registerVersion('angularfire', VERSION.full, 'core');\n registerVersion('angularfire', VERSION.full, 'app');\n // eslint-disable-next-line @typescript-eslint/no-base-to-string\n registerVersion('angular', NG_VERSION.full, platformId.toString());\n\n const app = zone.runOutsideAngular(() => fn(injector));\n return new FirebaseApp(app);\n };\n}\n\n@NgModule({\n providers: [\n DEFAULT_FIREBASE_APP_PROVIDER,\n FIREBASE_APPS_PROVIDER,\n ]\n})\nexport class FirebaseAppModule {\n // eslint-disable-next-line @typescript-eslint/ban-types\n constructor(@Inject(PLATFORM_ID) platformId: Object) {\n registerVersion('angularfire', VERSION.full, 'core');\n registerVersion('angularfire', VERSION.full, 'app');\n // eslint-disable-next-line @typescript-eslint/no-base-to-string\n registerVersion('angular', NG_VERSION.full, platformId.toString());\n }\n}\n\n// Calling initializeApp({ ... }, 'name') multiple times will add more FirebaseApps into the FIREBASE_APPS\n// injection scope. This allows developers to more easily work with multiple Firebase Applications. Downside\n// is that DI for app name and options doesn't really make sense anymore.\nexport function provideFirebaseApp(fn: (injector: Injector) => IFirebaseApp, ...deps: any[]): EnvironmentProviders {\n return makeEnvironmentProviders([\n DEFAULT_FIREBASE_APP_PROVIDER,\n FIREBASE_APPS_PROVIDER,\n {\n provide: PROVIDED_FIREBASE_APPS,\n useFactory: firebaseAppFactory(fn),\n multi: true,\n deps: [\n NgZone,\n Injector,\n ɵAngularFireSchedulers,\n ...deps,\n ],\n }\n ])\n}\n", "// DO NOT MODIFY, this file is autogenerated by tools/build.ts\nexport * from 'firebase/app';\nimport { ɵzoneWrap } from '@angular/fire';\nimport {\n deleteApp as _deleteApp,\n getApp as _getApp,\n getApps as _getApps,\n initializeApp as _initializeApp,\n initializeServerApp as _initializeServerApp,\n onLog as _onLog,\n registerVersion as _registerVersion,\n setLogLevel as _setLogLevel\n} from 'firebase/app';\n\nexport const deleteApp = ɵzoneWrap(_deleteApp, true);\nexport const getApp = ɵzoneWrap(_getApp, true);\nexport const getApps = ɵzoneWrap(_getApps, true);\nexport const initializeApp = ɵzoneWrap(_initializeApp, true);\nexport const initializeServerApp = ɵzoneWrap(_initializeServerApp, true);\nexport const onLog = ɵzoneWrap(_onLog, true);\nexport const registerVersion = ɵzoneWrap(_registerVersion, true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D,+BAAc;;;ADEd,qCAAc;",
|
|
6
|
+
"names": ["getApp", "getApps", "registerVersion", "getApp", "getApps", "registerVersion", "getApp", "getApps", "registerVersion"]
|
|
7
|
+
}
|
|
@@ -1,76 +1,86 @@
|
|
|
1
|
-
|
|
2
|
-
import { Injectable
|
|
3
|
-
import
|
|
4
|
-
import {
|
|
5
|
-
import
|
|
6
|
-
import {
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
import
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
}], ctorParameters: () => [{ type: i1.Router }, { type: i2.Auth }] });
|
|
43
|
-
const canActivate = (pipe) => ({
|
|
44
|
-
canActivate: [AuthGuard], data: { authGuardPipe: pipe }
|
|
1
|
+
// auth-guard.mjs
|
|
2
|
+
import { Injectable } from "@angular/core";
|
|
3
|
+
import { Auth, user } from "@angular/fire/auth";
|
|
4
|
+
import { Router } from "@angular/router";
|
|
5
|
+
import { of, pipe } from "rxjs";
|
|
6
|
+
import { map, switchMap, take } from "rxjs/operators";
|
|
7
|
+
import * as i0 from "@angular/core";
|
|
8
|
+
import * as i1 from "@angular/router";
|
|
9
|
+
import * as i2 from "@angular/fire/auth";
|
|
10
|
+
var loggedIn = map((user2) => !!user2);
|
|
11
|
+
var AuthGuard = class _AuthGuard {
|
|
12
|
+
router;
|
|
13
|
+
auth;
|
|
14
|
+
constructor(router, auth) {
|
|
15
|
+
this.router = router;
|
|
16
|
+
this.auth = auth;
|
|
17
|
+
}
|
|
18
|
+
canActivate = (next, state) => {
|
|
19
|
+
const authPipeFactory = next.data.authGuardPipe || (() => loggedIn);
|
|
20
|
+
return user(this.auth).pipe(take(1), authPipeFactory(next, state), map((can) => {
|
|
21
|
+
if (typeof can === "boolean") {
|
|
22
|
+
return can;
|
|
23
|
+
} else if (Array.isArray(can)) {
|
|
24
|
+
return this.router.createUrlTree(can);
|
|
25
|
+
} else {
|
|
26
|
+
return this.router.parseUrl(can);
|
|
27
|
+
}
|
|
28
|
+
}));
|
|
29
|
+
};
|
|
30
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.0-rc.3", ngImport: i0, type: _AuthGuard, deps: [{ token: i1.Router }, { token: i2.Auth }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
31
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.0.0-rc.3", ngImport: i0, type: _AuthGuard, providedIn: "any" });
|
|
32
|
+
};
|
|
33
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.0-rc.3", ngImport: i0, type: AuthGuard, decorators: [{
|
|
34
|
+
type: Injectable,
|
|
35
|
+
args: [{
|
|
36
|
+
providedIn: "any"
|
|
37
|
+
}]
|
|
38
|
+
}], ctorParameters: () => [{ type: i1.Router }, { type: i2.Auth }] });
|
|
39
|
+
var canActivate = (pipe2) => ({
|
|
40
|
+
canActivate: [AuthGuard],
|
|
41
|
+
data: { authGuardPipe: pipe2 }
|
|
45
42
|
});
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
// eslint-disable-next-line no-prototype-builtins
|
|
52
|
-
(claim) => pipe(customClaims, map(claims => claims.hasOwnProperty(claim)))
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
class AuthGuardModule {
|
|
57
|
-
constructor() {
|
|
58
|
-
registerVersion('angularfire', VERSION.full, 'auth-guard');
|
|
59
|
-
}
|
|
60
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.6", ngImport: i0, type: AuthGuardModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
61
|
-
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "17.0.6", ngImport: i0, type: AuthGuardModule });
|
|
62
|
-
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "17.0.6", ngImport: i0, type: AuthGuardModule, providers: [AuthGuard] });
|
|
63
|
-
}
|
|
64
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.6", ngImport: i0, type: AuthGuardModule, decorators: [{
|
|
65
|
-
type: NgModule,
|
|
66
|
-
args: [{
|
|
67
|
-
providers: [AuthGuard]
|
|
68
|
-
}]
|
|
69
|
-
}], ctorParameters: () => [] });
|
|
70
|
-
|
|
71
|
-
/**
|
|
72
|
-
* Generated bundle index. Do not edit.
|
|
73
|
-
*/
|
|
43
|
+
var isNotAnonymous = map((user2) => !!user2 && !user2.isAnonymous);
|
|
44
|
+
var idTokenResult = switchMap((user2) => user2 ? user2.getIdTokenResult() : of(null));
|
|
45
|
+
var emailVerified = map((user2) => !!user2 && user2.emailVerified);
|
|
46
|
+
var customClaims = pipe(idTokenResult, map((idTokenResult2) => idTokenResult2 ? idTokenResult2.claims : []));
|
|
47
|
+
var hasCustomClaim = (
|
|
48
|
+
// eslint-disable-next-line no-prototype-builtins
|
|
49
|
+
(claim) => pipe(customClaims, map((claims) => claims.hasOwnProperty(claim)))
|
|
50
|
+
);
|
|
51
|
+
var redirectUnauthorizedTo = (redirect) => pipe(loggedIn, map((loggedIn2) => loggedIn2 || redirect));
|
|
52
|
+
var redirectLoggedInTo = (redirect) => pipe(loggedIn, map((loggedIn2) => loggedIn2 && redirect || true));
|
|
74
53
|
|
|
75
|
-
|
|
54
|
+
// auth-guard.module.mjs
|
|
55
|
+
import { NgModule } from "@angular/core";
|
|
56
|
+
import { VERSION } from "@angular/fire";
|
|
57
|
+
import { registerVersion } from "firebase/app";
|
|
58
|
+
import * as i02 from "@angular/core";
|
|
59
|
+
var AuthGuardModule = class _AuthGuardModule {
|
|
60
|
+
constructor() {
|
|
61
|
+
registerVersion("angularfire", VERSION.full, "auth-guard");
|
|
62
|
+
}
|
|
63
|
+
static ɵfac = i02.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.0-rc.3", ngImport: i02, type: _AuthGuardModule, deps: [], target: i02.ɵɵFactoryTarget.NgModule });
|
|
64
|
+
static ɵmod = i02.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "18.0.0-rc.3", ngImport: i02, type: _AuthGuardModule });
|
|
65
|
+
static ɵinj = i02.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "18.0.0-rc.3", ngImport: i02, type: _AuthGuardModule, providers: [AuthGuard] });
|
|
66
|
+
};
|
|
67
|
+
i02.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.0-rc.3", ngImport: i02, type: AuthGuardModule, decorators: [{
|
|
68
|
+
type: NgModule,
|
|
69
|
+
args: [{
|
|
70
|
+
providers: [AuthGuard]
|
|
71
|
+
}]
|
|
72
|
+
}], ctorParameters: () => [] });
|
|
73
|
+
export {
|
|
74
|
+
AuthGuard,
|
|
75
|
+
AuthGuardModule,
|
|
76
|
+
canActivate,
|
|
77
|
+
customClaims,
|
|
78
|
+
emailVerified,
|
|
79
|
+
hasCustomClaim,
|
|
80
|
+
idTokenResult,
|
|
81
|
+
isNotAnonymous,
|
|
82
|
+
loggedIn,
|
|
83
|
+
redirectLoggedInTo,
|
|
84
|
+
redirectUnauthorizedTo
|
|
85
|
+
};
|
|
76
86
|
//# sourceMappingURL=angular-fire-auth-guard.mjs.map
|
|
@@ -1 +1,7 @@
|
|
|
1
|
-
{
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/auth-guard/auth-guard.ts", "../../../src/auth-guard/auth-guard.module.ts"],
|
|
4
|
+
"sourcesContent": ["import { Injectable } from '@angular/core';\nimport { Auth, user } from '@angular/fire/auth';\nimport { ActivatedRouteSnapshot, CanActivate, Router, RouterStateSnapshot } from '@angular/router';\nimport { User } from 'firebase/auth';\nimport { Observable, UnaryFunction, of, pipe } from 'rxjs';\nimport { map, switchMap, take } from 'rxjs/operators';\n\nexport type AuthPipeGenerator = (next: ActivatedRouteSnapshot, state: RouterStateSnapshot) => AuthPipe;\nexport type AuthPipe = UnaryFunction<Observable<User|null>, Observable<boolean|string|any[]>>;\n\nexport const loggedIn: AuthPipe = map(user => !!user);\n\n@Injectable({\n providedIn: 'any'\n})\nexport class AuthGuard implements CanActivate {\n\n constructor(private router: Router, private auth: Auth) {}\n\n canActivate = (next: ActivatedRouteSnapshot, state: RouterStateSnapshot) => {\n const authPipeFactory = next.data.authGuardPipe as AuthPipeGenerator || (() => loggedIn);\n return user(this.auth).pipe(\n take(1),\n authPipeFactory(next, state),\n map(can => {\n if (typeof can === 'boolean') {\n return can;\n } else if (Array.isArray(can)) {\n return this.router.createUrlTree(can);\n } else {\n // TODO(EdricChan03): Add tests\n return this.router.parseUrl(can);\n }\n })\n );\n }\n\n}\n\nexport const canActivate = (pipe: AuthPipeGenerator) => ({\n canActivate: [ AuthGuard ], data: { authGuardPipe: pipe }\n});\n\nexport const isNotAnonymous: AuthPipe = map(user => !!user && !user.isAnonymous);\nexport const idTokenResult = switchMap((user: User|null) => user ? user.getIdTokenResult() : of(null));\nexport const emailVerified: AuthPipe = map(user => !!user && user.emailVerified);\nexport const customClaims = pipe(idTokenResult, map(idTokenResult => idTokenResult ? idTokenResult.claims : []));\nexport const hasCustomClaim: (claim: string) => AuthPipe =\n // eslint-disable-next-line no-prototype-builtins\n (claim) => pipe(customClaims, map(claims => claims.hasOwnProperty(claim)));\nexport const redirectUnauthorizedTo: (redirect: string|any[]) => AuthPipe =\n (redirect) => pipe(loggedIn, map(loggedIn => loggedIn || redirect));\nexport const redirectLoggedInTo: (redirect: string|any[]) => AuthPipe =\n (redirect) => pipe(loggedIn, map(loggedIn => loggedIn && redirect || true));\n", "import { NgModule } from '@angular/core';\nimport { VERSION } from '@angular/fire';\nimport { registerVersion } from 'firebase/app';\nimport { AuthGuard } from './auth-guard';\n\n@NgModule({\n providers: [ AuthGuard ]\n})\nexport class AuthGuardModule {\n constructor() {\n registerVersion('angularfire', VERSION.full, 'auth-guard');\n }\n}\n"],
|
|
5
|
+
"mappings": ";AAAA,SAAS,kBAAkB;AAC3B,SAAS,MAAM,YAAY;AAC3B,SAA8C,cAAmC;AAEjF,SAAoC,IAAI,YAAY;AACpD,SAAS,KAAK,WAAW,YAAY;;;;AAK9B,IAAM,WAAqB,IAAI,CAAAA,UAAQ,CAAC,CAACA,KAAI;AAK9C,IAAO,YAAP,MAAO,WAAS;EAEA;EAAwB;EAA5C,YAAoB,QAAwB,MAAU;AAAlC,SAAA,SAAA;AAAwB,SAAA,OAAA;EAAa;EAEzD,cAAc,CAAC,MAA8B,UAA8B;AACzE,UAAM,kBAAkB,KAAK,KAAK,kBAAuC,MAAM;AAC/E,WAAO,KAAK,KAAK,IAAI,EAAE,KACrB,KAAK,CAAC,GACN,gBAAgB,MAAM,KAAK,GAC3B,IAAI,SAAM;AACR,UAAI,OAAO,QAAQ,WAAW;AAC5B,eAAO;MACT,WAAW,MAAM,QAAQ,GAAG,GAAG;AAC7B,eAAO,KAAK,OAAO,cAAc,GAAG;MACtC,OAAO;AAEL,eAAO,KAAK,OAAO,SAAS,GAAG;MACjC;IACF,CAAC,CAAC;EAEN;0GApBW,YAAS,MAAA,CAAA,EAAA,OAAA,UAAA,GAAA,EAAA,OAAA,QAAA,CAAA,GAAA,QAAA,mBAAA,WAAA,CAAA;8GAAT,YAAS,YAFR,MAAK,CAAA;;gGAEN,WAAS,YAAA,CAAA;QAHrB;SAAW;IACV,YAAY;GACb;;AAyBM,IAAM,cAAc,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