@angular/fire 7.1.0-rc.3 → 7.1.1
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/analytics/analytics.module.d.ts +9 -6
- package/analytics/firebase.d.ts +2 -2
- package/analytics/overrides.d.ts +1 -0
- package/analytics/public_api.d.ts +2 -0
- package/analytics/screen-tracking.service.d.ts +40 -0
- package/analytics/user-tracking.service.d.ts +11 -0
- package/app/app.module.d.ts +3 -3
- package/app-check/app-check.module.d.ts +3 -3
- package/auth/auth.module.d.ts +3 -3
- package/auth-guard/angular-fire-auth-guard.d.ts +5 -0
- package/auth-guard/auth-guard.d.ts +29 -0
- package/auth-guard/auth-guard.module.d.ts +7 -0
- package/auth-guard/package.json +11 -0
- package/auth-guard/public_api.d.ts +2 -0
- package/bundles/angular-fire-analytics.umd.js +548 -41
- package/bundles/angular-fire-analytics.umd.js.map +1 -1
- package/bundles/angular-fire-app-check.umd.js +336 -18
- package/bundles/angular-fire-app-check.umd.js.map +1 -1
- package/bundles/angular-fire-app.umd.js +323 -3
- package/bundles/angular-fire-app.umd.js.map +1 -1
- package/bundles/angular-fire-auth-guard.umd.js +109 -0
- package/bundles/angular-fire-auth-guard.umd.js.map +1 -0
- package/bundles/angular-fire-auth.umd.js +324 -9
- package/bundles/angular-fire-auth.umd.js.map +1 -1
- package/bundles/angular-fire-compat-analytics.umd.js +16 -112
- package/bundles/angular-fire-compat-analytics.umd.js.map +1 -1
- package/bundles/angular-fire-compat-auth.umd.js +1 -1
- package/bundles/angular-fire-compat-auth.umd.js.map +1 -1
- package/bundles/angular-fire-compat-database.umd.js +1 -1
- package/bundles/angular-fire-compat-database.umd.js.map +1 -1
- package/bundles/angular-fire-compat-firestore.umd.js +1 -1
- package/bundles/angular-fire-compat-firestore.umd.js.map +1 -1
- package/bundles/angular-fire-compat-functions.umd.js +1 -1
- package/bundles/angular-fire-compat-functions.umd.js.map +1 -1
- package/bundles/angular-fire-compat-messaging.umd.js +5 -5
- package/bundles/angular-fire-compat-messaging.umd.js.map +1 -1
- package/bundles/angular-fire-compat-performance.umd.js +5 -5
- package/bundles/angular-fire-compat-performance.umd.js.map +1 -1
- package/bundles/angular-fire-compat-remote-config.umd.js +5 -5
- package/bundles/angular-fire-compat-remote-config.umd.js.map +1 -1
- package/bundles/angular-fire-compat-storage.umd.js +2 -1
- package/bundles/angular-fire-compat-storage.umd.js.map +1 -1
- package/bundles/angular-fire-compat.umd.js +38 -2
- package/bundles/angular-fire-compat.umd.js.map +1 -1
- package/bundles/angular-fire-database.umd.js +323 -6
- package/bundles/angular-fire-database.umd.js.map +1 -1
- package/bundles/angular-fire-firestore-lite.umd.js +327 -9
- package/bundles/angular-fire-firestore-lite.umd.js.map +1 -1
- package/bundles/angular-fire-firestore.umd.js +323 -8
- package/bundles/angular-fire-firestore.umd.js.map +1 -1
- package/bundles/angular-fire-functions.umd.js +323 -6
- package/bundles/angular-fire-functions.umd.js.map +1 -1
- package/bundles/angular-fire-messaging.umd.js +339 -24
- package/bundles/angular-fire-messaging.umd.js.map +1 -1
- package/bundles/angular-fire-performance.umd.js +339 -11
- package/bundles/angular-fire-performance.umd.js.map +1 -1
- package/bundles/angular-fire-remote-config.umd.js +342 -6
- package/bundles/angular-fire-remote-config.umd.js.map +1 -1
- package/bundles/angular-fire-storage.umd.js +324 -7
- package/bundles/angular-fire-storage.umd.js.map +1 -1
- package/bundles/angular-fire.umd.js +43 -371
- package/bundles/angular-fire.umd.js.map +1 -1
- package/compat/analytics/screen-tracking.service.d.ts +2 -2
- package/compat/cache.d.ts +1 -0
- package/compat/public_api.d.ts +1 -0
- package/compat/storage/interfaces.d.ts +1 -0
- package/compat/storage/ref.d.ts +2 -1
- package/core.d.ts +13 -3
- package/database/database.module.d.ts +3 -3
- package/docs/deploy/getting-started.md +62 -1
- package/docs/version-7-upgrade.md +1 -1
- package/esm2015/analytics/analytics.module.js +33 -27
- package/esm2015/analytics/firebase.js +3 -3
- package/esm2015/analytics/overrides.js +3 -0
- package/esm2015/analytics/public_api.js +3 -1
- package/esm2015/analytics/screen-tracking.service.js +139 -0
- package/esm2015/analytics/user-tracking.service.js +43 -0
- package/esm2015/app/app.module.js +12 -7
- package/esm2015/app-check/app-check.js +1 -2
- package/esm2015/app-check/app-check.module.js +19 -14
- package/esm2015/auth/auth.js +1 -2
- package/esm2015/auth/auth.module.js +10 -9
- package/esm2015/auth-guard/angular-fire-auth-guard.js +5 -0
- package/esm2015/auth-guard/auth-guard.js +49 -0
- package/esm2015/auth-guard/auth-guard.module.js +20 -0
- package/esm2015/auth-guard/public_api.js +3 -0
- package/esm2015/compat/analytics/analytics.js +2 -3
- package/esm2015/compat/analytics/screen-tracking.service.js +11 -100
- package/esm2015/compat/auth/auth.js +2 -3
- package/esm2015/compat/cache.js +32 -0
- package/esm2015/compat/database/database.js +2 -3
- package/esm2015/compat/firestore/firestore.js +2 -3
- package/esm2015/compat/functions/functions.js +2 -3
- package/esm2015/compat/messaging/messaging.js +3 -3
- package/esm2015/compat/performance/performance.js +2 -3
- package/esm2015/compat/public_api.js +2 -1
- package/esm2015/compat/remote-config/remote-config.js +4 -5
- package/esm2015/compat/storage/interfaces.js +1 -1
- package/esm2015/compat/storage/ref.js +2 -1
- package/esm2015/compat/storage/storage.js +3 -3
- package/esm2015/core.js +44 -52
- package/esm2015/database/database.module.js +9 -7
- package/esm2015/firestore/firestore.module.js +9 -9
- package/esm2015/firestore/lite/lite.module.js +11 -7
- package/esm2015/functions/functions.module.js +9 -7
- package/esm2015/messaging/firebase.js +3 -3
- package/esm2015/messaging/messaging.module.js +19 -21
- package/esm2015/messaging/overrides.js +3 -0
- package/esm2015/performance/performance.module.js +22 -8
- package/esm2015/remote-config/firebase.js +2 -1
- package/esm2015/remote-config/overrides.js +3 -0
- package/esm2015/remote-config/remote-config.module.js +25 -7
- package/esm2015/storage/storage.module.js +10 -8
- package/esm2015/zones.js +3 -2
- package/fesm2015/angular-fire-analytics.js +209 -40
- package/fesm2015/angular-fire-analytics.js.map +1 -1
- package/fesm2015/angular-fire-app-check.js +18 -14
- package/fesm2015/angular-fire-app-check.js.map +1 -1
- package/fesm2015/angular-fire-app.js +11 -6
- package/fesm2015/angular-fire-app.js.map +1 -1
- package/fesm2015/angular-fire-auth-guard.js +72 -0
- package/fesm2015/angular-fire-auth-guard.js.map +1 -0
- package/fesm2015/angular-fire-auth.js +9 -9
- package/fesm2015/angular-fire-auth.js.map +1 -1
- package/fesm2015/angular-fire-compat-analytics.js +10 -98
- package/fesm2015/angular-fire-compat-analytics.js.map +1 -1
- package/fesm2015/angular-fire-compat-auth.js +2 -2
- package/fesm2015/angular-fire-compat-auth.js.map +1 -1
- package/fesm2015/angular-fire-compat-database.js +2 -2
- package/fesm2015/angular-fire-compat-database.js.map +1 -1
- package/fesm2015/angular-fire-compat-firestore.js +2 -2
- package/fesm2015/angular-fire-compat-firestore.js.map +1 -1
- package/fesm2015/angular-fire-compat-functions.js +2 -2
- package/fesm2015/angular-fire-compat-functions.js.map +1 -1
- package/fesm2015/angular-fire-compat-messaging.js +2 -2
- package/fesm2015/angular-fire-compat-messaging.js.map +1 -1
- package/fesm2015/angular-fire-compat-performance.js +2 -2
- package/fesm2015/angular-fire-compat-performance.js.map +1 -1
- package/fesm2015/angular-fire-compat-remote-config.js +4 -4
- package/fesm2015/angular-fire-compat-remote-config.js.map +1 -1
- package/fesm2015/angular-fire-compat-storage.js +3 -2
- package/fesm2015/angular-fire-compat-storage.js.map +1 -1
- package/fesm2015/angular-fire-compat.js +34 -3
- package/fesm2015/angular-fire-compat.js.map +1 -1
- package/fesm2015/angular-fire-database.js +8 -6
- package/fesm2015/angular-fire-database.js.map +1 -1
- package/fesm2015/angular-fire-firestore-lite.js +10 -6
- package/fesm2015/angular-fire-firestore-lite.js.map +1 -1
- package/fesm2015/angular-fire-firestore.js +8 -8
- package/fesm2015/angular-fire-firestore.js.map +1 -1
- package/fesm2015/angular-fire-functions.js +8 -6
- package/fesm2015/angular-fire-functions.js.map +1 -1
- package/fesm2015/angular-fire-messaging.js +22 -22
- package/fesm2015/angular-fire-messaging.js.map +1 -1
- package/fesm2015/angular-fire-performance.js +21 -7
- package/fesm2015/angular-fire-performance.js.map +1 -1
- package/fesm2015/angular-fire-remote-config.js +27 -7
- package/fesm2015/angular-fire-remote-config.js.map +1 -1
- package/fesm2015/angular-fire-storage.js +9 -7
- package/fesm2015/angular-fire-storage.js.map +1 -1
- package/fesm2015/angular-fire.js +46 -53
- package/fesm2015/angular-fire.js.map +1 -1
- package/firestore/firestore.module.d.ts +3 -3
- package/firestore/lite/lite.module.d.ts +3 -3
- package/functions/functions.module.d.ts +3 -3
- package/messaging/firebase.d.ts +2 -2
- package/messaging/messaging.module.d.ts +4 -4
- package/messaging/overrides.d.ts +1 -0
- package/package.json +9 -3
- package/performance/performance.module.d.ts +4 -4
- package/remote-config/firebase.d.ts +1 -0
- package/remote-config/overrides.d.ts +1 -0
- package/remote-config/remote-config.module.d.ts +3 -3
- package/schematics/deploy/actions.js +40 -26
- package/schematics/deploy/schema.json +4 -0
- package/schematics/firebaseTools.js +22 -2
- package/schematics/setup/index.js +9 -2
- package/schematics/setup/prompts.js +1 -1
- package/schematics/setup/ssr.js +7 -1
- package/schematics/setup/static.js +9 -3
- package/schematics/utils.js +1 -1
- package/schematics/versions.json +1 -1
- package/storage/storage.module.d.ts +3 -3
|
@@ -1,4 +1,23 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
|
5
|
+
}) : (function(o, m, k, k2) {
|
|
6
|
+
if (k2 === undefined) k2 = k;
|
|
7
|
+
o[k2] = m[k];
|
|
8
|
+
}));
|
|
9
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
10
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
11
|
+
}) : function(o, v) {
|
|
12
|
+
o["default"] = v;
|
|
13
|
+
});
|
|
14
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
15
|
+
if (mod && mod.__esModule) return mod;
|
|
16
|
+
var result = {};
|
|
17
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
18
|
+
__setModuleDefault(result, mod);
|
|
19
|
+
return result;
|
|
20
|
+
};
|
|
2
21
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
22
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
23
|
};
|
|
@@ -6,6 +25,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
6
25
|
exports.getFirebaseTools = void 0;
|
|
7
26
|
const child_process_1 = require("child_process");
|
|
8
27
|
const ora_1 = __importDefault(require("ora"));
|
|
28
|
+
const semver = __importStar(require("semver"));
|
|
9
29
|
const getFirebaseTools = () => globalThis.firebaseTools ?
|
|
10
30
|
Promise.resolve(globalThis.firebaseTools) :
|
|
11
31
|
new Promise((resolve, reject) => {
|
|
@@ -43,8 +63,8 @@ const getFirebaseTools = () => globalThis.firebaseTools ?
|
|
|
43
63
|
globalThis.firebaseTools = firebaseTools;
|
|
44
64
|
const version = firebaseTools.cli.version();
|
|
45
65
|
console.log(`Using firebase-tools version ${version}`);
|
|
46
|
-
if (
|
|
47
|
-
console.error('firebase-tools version 9 is required');
|
|
66
|
+
if (semver.compare(version, '9.9.0') === -1) {
|
|
67
|
+
console.error('firebase-tools version 9.9+ is required, please upgrade and run again');
|
|
48
68
|
return Promise.reject();
|
|
49
69
|
}
|
|
50
70
|
return firebaseTools;
|
|
@@ -10,6 +10,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
10
10
|
};
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
12
|
exports.ngAddSetupProject = exports.setupProject = void 0;
|
|
13
|
+
const core_1 = require("@angular-devkit/core");
|
|
13
14
|
const schematics_1 = require("@angular-devkit/schematics");
|
|
14
15
|
const utils_1 = require("../utils");
|
|
15
16
|
const prompts_1 = require("./prompts");
|
|
@@ -82,10 +83,16 @@ ${Object.entries(config.sdkConfig).reduce((c, [k, v]) => c.concat(` ${k}: '${
|
|
|
82
83
|
default: throw (new schematics_1.SchematicsException(`Unimplemented PROJECT_TYPE ${config.projectType}`));
|
|
83
84
|
}
|
|
84
85
|
}
|
|
86
|
+
else {
|
|
87
|
+
return Promise.resolve();
|
|
88
|
+
}
|
|
85
89
|
});
|
|
86
90
|
exports.setupProject = setupProject;
|
|
87
91
|
const ngAddSetupProject = (options) => (host, context) => __awaiter(void 0, void 0, void 0, function* () {
|
|
88
|
-
|
|
92
|
+
let projectRoot = host._backend._root;
|
|
93
|
+
if (process.platform.startsWith('win32')) {
|
|
94
|
+
projectRoot = core_1.asWindowsPath(core_1.normalize(projectRoot));
|
|
95
|
+
}
|
|
89
96
|
const features = yield prompts_1.featuresPrompt();
|
|
90
97
|
if (features.length > 0) {
|
|
91
98
|
const firebaseTools = yield firebaseTools_1.getFirebaseTools();
|
|
@@ -96,7 +103,7 @@ const ngAddSetupProject = (options) => (host, context) => __awaiter(void 0, void
|
|
|
96
103
|
yield firebaseTools.login.use(user.email, { projectRoot });
|
|
97
104
|
const { project: ngProject, projectName: ngProjectName } = utils_1.getProject(options, host);
|
|
98
105
|
const [defaultProjectName] = utils_1.getFirebaseProjectNameFromHost(host, ngProjectName);
|
|
99
|
-
const firebaseProject = yield prompts_1.projectPrompt(defaultProjectName, { projectRoot });
|
|
106
|
+
const firebaseProject = yield prompts_1.projectPrompt(defaultProjectName, { projectRoot, account: user.email });
|
|
100
107
|
let hosting = { projectType: 0, prerender: false };
|
|
101
108
|
let firebaseHostingSite;
|
|
102
109
|
if (features.includes(0)) {
|
|
@@ -184,7 +184,7 @@ const projectPrompt = (defaultProject, options) => __awaiter(void 0, void 0, voi
|
|
|
184
184
|
message: 'What would you like to call your project?',
|
|
185
185
|
default: projectId,
|
|
186
186
|
});
|
|
187
|
-
return yield firebaseTools.projects.create(projectId,
|
|
187
|
+
return yield firebaseTools.projects.create(projectId, { account: options.account, displayName, nonInteractive: true });
|
|
188
188
|
}
|
|
189
189
|
return (yield projects).find(it => it.projectId === projectId);
|
|
190
190
|
});
|
package/schematics/setup/ssr.js
CHANGED
|
@@ -15,7 +15,13 @@ function generateHostingConfig(project, dist, functionName, projectType) {
|
|
|
15
15
|
source: '*.[0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f].+(css|js)',
|
|
16
16
|
headers: [{
|
|
17
17
|
key: 'Cache-Control',
|
|
18
|
-
value: 'public,max-age=31536000,immutable'
|
|
18
|
+
value: 'public,max-age=31536000,immutable',
|
|
19
|
+
}]
|
|
20
|
+
}, {
|
|
21
|
+
source: '/@(ngsw-worker.js|ngsw.json)',
|
|
22
|
+
headers: [{
|
|
23
|
+
key: 'Cache-Control',
|
|
24
|
+
value: 'no-cache',
|
|
19
25
|
}]
|
|
20
26
|
}],
|
|
21
27
|
rewrites: [
|
|
@@ -18,13 +18,19 @@ function generateHostingConfig(project, dist) {
|
|
|
18
18
|
source: '*.[0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f].+(css|js)',
|
|
19
19
|
headers: [{
|
|
20
20
|
key: 'Cache-Control',
|
|
21
|
-
value: 'public,max-age=31536000,immutable'
|
|
22
|
-
}]
|
|
21
|
+
value: 'public,max-age=31536000,immutable',
|
|
22
|
+
}],
|
|
23
|
+
}, {
|
|
24
|
+
source: '/@(ngsw-worker.js|ngsw.json)',
|
|
25
|
+
headers: [{
|
|
26
|
+
key: 'Cache-Control',
|
|
27
|
+
value: 'no-cache',
|
|
28
|
+
}],
|
|
23
29
|
}],
|
|
24
30
|
rewrites: [
|
|
25
31
|
{
|
|
26
32
|
source: '**',
|
|
27
|
-
destination: '/index.html'
|
|
33
|
+
destination: '/index.html',
|
|
28
34
|
}
|
|
29
35
|
]
|
|
30
36
|
};
|
package/schematics/utils.js
CHANGED
|
@@ -155,7 +155,7 @@ function addToNgModule(host, options) {
|
|
|
155
155
|
}
|
|
156
156
|
if (options.features.includes(2) &&
|
|
157
157
|
!ast_utils_1.findNode(source, typescript_1.default.SyntaxKind.Identifier, 'provideAnalytics')) {
|
|
158
|
-
changes.push(ast_utils_1.insertImport(source, modulePath, ['provideAnalytics', 'getAnalytics'], '@angular/fire/analytics'), ...ast_utils_1.addImportToModule(source, modulePath, `provideAnalytics(() => getAnalytics())`, null));
|
|
158
|
+
changes.push(ast_utils_1.insertImport(source, modulePath, ['provideAnalytics', 'getAnalytics', 'ScreenTrackingService', 'UserTrackingService'], '@angular/fire/analytics'), ...ast_utils_1.addImportToModule(source, modulePath, `provideAnalytics(() => getAnalytics())`, null), ...ast_utils_1.addProviderToModule(source, modulePath, ['ScreenTrackingService', 'UserTrackingService'], null));
|
|
159
159
|
}
|
|
160
160
|
if (options.features.includes(1) &&
|
|
161
161
|
!ast_utils_1.findNode(source, typescript_1.default.SyntaxKind.Identifier, 'provideAuth')) {
|
package/schematics/versions.json
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import { NgZone, InjectionToken, ModuleWithProviders } from '@angular/core';
|
|
1
|
+
import { NgZone, InjectionToken, ModuleWithProviders, Injector } from '@angular/core';
|
|
2
2
|
import { FirebaseStorage } from 'firebase/storage';
|
|
3
3
|
import { Storage } from './storage';
|
|
4
4
|
import { FirebaseApp } from '@angular/fire/app';
|
|
5
5
|
import * as i0 from "@angular/core";
|
|
6
6
|
export declare const PROVIDED_STORAGE_INSTANCES: InjectionToken<Storage[]>;
|
|
7
7
|
export declare function defaultStorageInstanceFactory(provided: FirebaseStorage[] | undefined, defaultApp: FirebaseApp): Storage;
|
|
8
|
-
export declare function storageInstanceFactory(fn: () => FirebaseStorage): (zone: NgZone) => Storage;
|
|
8
|
+
export declare function storageInstanceFactory(fn: (injector: Injector) => FirebaseStorage): (zone: NgZone, injector: Injector) => Storage;
|
|
9
9
|
export declare class StorageModule {
|
|
10
10
|
constructor();
|
|
11
11
|
static ɵfac: i0.ɵɵFactoryDeclaration<StorageModule, never>;
|
|
12
12
|
static ɵmod: i0.ɵɵNgModuleDeclaration<StorageModule, never, never, never>;
|
|
13
13
|
static ɵinj: i0.ɵɵInjectorDeclaration<StorageModule>;
|
|
14
14
|
}
|
|
15
|
-
export declare function provideStorage(fn: () => FirebaseStorage): ModuleWithProviders<StorageModule>;
|
|
15
|
+
export declare function provideStorage(fn: () => FirebaseStorage, ...deps: any[]): ModuleWithProviders<StorageModule>;
|