@rxap/firebase 16.0.0-dev.0 → 16.0.0-dev.10
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/CHANGELOG.md +317 -0
- package/LICENSE +621 -21
- package/LICENSE.md +621 -0
- package/README.md +8 -56
- package/auth/index.d.ts +2 -5
- package/auth/lib/identity-platform.http-interceptor.d.ts +2 -2
- package/auth/lib/identity-platform.service.d.ts +2 -2
- package/esm2022/auth/index.mjs +3 -0
- package/esm2022/auth/lib/identity-platform.http-interceptor.mjs +14 -15
- package/esm2022/auth/lib/identity-platform.service.mjs +11 -12
- package/esm2022/auth/rxap-firebase-auth.mjs +2 -2
- package/esm2022/index.mjs +1 -1
- package/esm2022/lib/app-check.mjs +18 -19
- package/esm2022/lib/firebase-app-check.http-interceptor.mjs +14 -15
- package/esm2022/lib/firebase-messaging.service.mjs +7 -8
- package/esm2022/lib/firebase.config.mjs +1 -1
- package/esm2022/lib/firebase.provider.mjs +49 -49
- package/esm2022/lib/storage.mjs +7 -8
- package/esm2022/lib/tokens.mjs +1 -1
- package/esm2022/rxap-firebase.mjs +1 -1
- package/fesm2022/rxap-firebase-auth.mjs +14 -14
- package/fesm2022/rxap-firebase-auth.mjs.map +1 -1
- package/fesm2022/rxap-firebase.mjs +61 -60
- package/fesm2022/rxap-firebase.mjs.map +1 -1
- package/package.json +52 -45
- package/theme.css +1 -0
- package/auth/public_api.d.ts +0 -2
- package/collection.json +0 -15
- package/esm2022/auth/public_api.mjs +0 -3
- package/migration.json +0 -4
- package/src/schematics/init/index.d.ts +0 -7
- package/src/schematics/init/index.js +0 -422
- package/src/schematics/init/index.js.map +0 -1
- package/src/schematics/init/schema.json +0 -72
- package/src/schematics/ng-add/index.d.ts +0 -3
- package/src/schematics/ng-add/index.js +0 -12
- package/src/schematics/ng-add/index.js.map +0 -1
- package/src/schematics/ng-add/schema.json +0 -51
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { Rule } from '@angular-devkit/schematics';
|
|
2
|
-
import { InitSchema } from './schema';
|
|
3
|
-
export interface UpdateIgnoreFileOptions {
|
|
4
|
-
filePath?: string;
|
|
5
|
-
}
|
|
6
|
-
export declare function UpdateIgnoreFile(ignore: string[], options?: UpdateIgnoreFileOptions): Rule;
|
|
7
|
-
export default function (options: InitSchema): Rule;
|
|
@@ -1,422 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.UpdateIgnoreFile = void 0;
|
|
4
|
-
const tslib_1 = require("tslib");
|
|
5
|
-
const schematics_1 = require("@angular-devkit/schematics");
|
|
6
|
-
const schematics_utilities_1 = require("@rxap/schematics-utilities");
|
|
7
|
-
const ts_morph_1 = require("ts-morph");
|
|
8
|
-
const schematics_ts_morph_1 = require("@rxap/schematics-ts-morph");
|
|
9
|
-
const path_1 = require("path");
|
|
10
|
-
function UpdateIgnoreFile(ignore, options = {}) {
|
|
11
|
-
return tree => {
|
|
12
|
-
var _a;
|
|
13
|
-
const filePath = (_a = options.filePath) !== null && _a !== void 0 ? _a : '.gitignore';
|
|
14
|
-
(0, schematics_utilities_1.CoerceFile)(tree, filePath, '');
|
|
15
|
-
let content = tree.read(filePath).toString('utf-8');
|
|
16
|
-
for (const entry of ignore) {
|
|
17
|
-
if (!content.match(new RegExp(`^${entry}$`))) {
|
|
18
|
-
content += `\n${entry}`;
|
|
19
|
-
}
|
|
20
|
-
}
|
|
21
|
-
tree.overwrite(filePath, content);
|
|
22
|
-
};
|
|
23
|
-
}
|
|
24
|
-
exports.UpdateIgnoreFile = UpdateIgnoreFile;
|
|
25
|
-
function default_1(options) {
|
|
26
|
-
return (host) => tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
27
|
-
const project = new ts_morph_1.Project({
|
|
28
|
-
manipulationSettings: {
|
|
29
|
-
indentationText: ts_morph_1.IndentationText.TwoSpaces
|
|
30
|
-
},
|
|
31
|
-
useInMemoryFileSystem: true
|
|
32
|
-
});
|
|
33
|
-
const projectSourceRoot = (0, schematics_utilities_1.GetProjectSourceRoot)(host, options.project);
|
|
34
|
-
const appModuleSourceFile = project.createSourceFile('app/app.module.ts', host.read((0, path_1.join)(projectSourceRoot, 'app/app.module.ts')).toString('utf-8'));
|
|
35
|
-
const mainSourceFile = project.createSourceFile('main.ts', host.read((0, path_1.join)(projectSourceRoot, 'main.ts')).toString('utf-8'));
|
|
36
|
-
(0, schematics_ts_morph_1.AddToArray)(mainSourceFile, 'configSideLoad', `ConfigService
|
|
37
|
-
.SideLoad('/config.firebase.options.json', 'firebase.options', true)
|
|
38
|
-
.catch(async () => {
|
|
39
|
-
if (!ConfigService.Config.firebase || !ConfigService.Config.firebase.options || !ConfigService.Config.firebase.options.apiKey) {
|
|
40
|
-
try {
|
|
41
|
-
const response = await fetch('/__/firebase/init.json');
|
|
42
|
-
SetObjectValue(ConfigService.Config, 'firebase.options', await response.json());
|
|
43
|
-
} catch (e: any) {
|
|
44
|
-
throw new Error(\`Could not load the firebase: \${e.message}\`);
|
|
45
|
-
}
|
|
46
|
-
}
|
|
47
|
-
}),`, 'Promise<any>[]');
|
|
48
|
-
mainSourceFile.addImportDeclaration({
|
|
49
|
-
namedImports: ['SetObjectValue'],
|
|
50
|
-
moduleSpecifier: '@rxap/utilities'
|
|
51
|
-
});
|
|
52
|
-
(0, schematics_ts_morph_1.AddNgModuleProvider)(appModuleSourceFile, 'FIREBASE_APP_PROVIDERS', [
|
|
53
|
-
{
|
|
54
|
-
namedImports: ['FIREBASE_APP_PROVIDERS'],
|
|
55
|
-
moduleSpecifier: '@rxap/firebase'
|
|
56
|
-
}
|
|
57
|
-
]);
|
|
58
|
-
if (options.functions) {
|
|
59
|
-
(0, schematics_ts_morph_1.AddNgModuleImport)(appModuleSourceFile, 'AngularFireFunctionsModule', '@angular/fire/functions');
|
|
60
|
-
(0, schematics_ts_morph_1.AddNgModuleProvider)(appModuleSourceFile, 'FIREBASE_FUNCTIONS_PROVIDERS', [
|
|
61
|
-
{
|
|
62
|
-
namedImports: ['FIREBASE_FUNCTIONS_PROVIDERS'],
|
|
63
|
-
moduleSpecifier: '@rxap/firebase'
|
|
64
|
-
}
|
|
65
|
-
]);
|
|
66
|
-
}
|
|
67
|
-
if (options.analytics) {
|
|
68
|
-
(0, schematics_ts_morph_1.AddNgModuleImport)(appModuleSourceFile, 'AngularFireAnalyticsModule', '@angular/fire/analytics');
|
|
69
|
-
(0, schematics_ts_morph_1.AddNgModuleProvider)(appModuleSourceFile, 'FIREBASE_ANALYTICS_PROVIDERS', [
|
|
70
|
-
{
|
|
71
|
-
namedImports: ['FIREBASE_ANALYTICS_PROVIDERS'],
|
|
72
|
-
moduleSpecifier: '@rxap/firebase'
|
|
73
|
-
}
|
|
74
|
-
]);
|
|
75
|
-
(0, schematics_ts_morph_1.AddNgModuleProvider)(appModuleSourceFile, 'ScreenTrackingService', [
|
|
76
|
-
{
|
|
77
|
-
namedImports: ['ScreenTrackingService'],
|
|
78
|
-
moduleSpecifier: '@angular/fire/analytics'
|
|
79
|
-
}
|
|
80
|
-
]);
|
|
81
|
-
(0, schematics_ts_morph_1.AddNgModuleProvider)(appModuleSourceFile, 'UserTrackingService', [
|
|
82
|
-
{
|
|
83
|
-
namedImports: ['UserTrackingService'],
|
|
84
|
-
moduleSpecifier: '@angular/fire/analytics'
|
|
85
|
-
}
|
|
86
|
-
]);
|
|
87
|
-
(0, schematics_ts_morph_1.AddNgModuleProvider)(appModuleSourceFile, {
|
|
88
|
-
provide: 'ANALYTICS_APP_VERSION',
|
|
89
|
-
useValue: 'environment.release'
|
|
90
|
-
}, [
|
|
91
|
-
{
|
|
92
|
-
namedImports: [
|
|
93
|
-
{
|
|
94
|
-
name: 'APP_VERSION',
|
|
95
|
-
alias: 'ANALYTICS_APP_VERSION'
|
|
96
|
-
}
|
|
97
|
-
],
|
|
98
|
-
moduleSpecifier: '@angular/fire/analytics'
|
|
99
|
-
},
|
|
100
|
-
{
|
|
101
|
-
namedImports: ['environment'],
|
|
102
|
-
moduleSpecifier: '../environments/environment'
|
|
103
|
-
}
|
|
104
|
-
]);
|
|
105
|
-
}
|
|
106
|
-
if (options.performance) {
|
|
107
|
-
(0, schematics_ts_morph_1.AddNgModuleImport)(appModuleSourceFile, 'AngularFirePerformanceModule', '@angular/fire/performance');
|
|
108
|
-
(0, schematics_ts_morph_1.AddNgModuleProvider)(appModuleSourceFile, 'PerformanceMonitoringService', [
|
|
109
|
-
{
|
|
110
|
-
namedImports: ['PerformanceMonitoringService'],
|
|
111
|
-
moduleSpecifier: '@angular/fire/performance'
|
|
112
|
-
}
|
|
113
|
-
]);
|
|
114
|
-
(0, schematics_ts_morph_1.AddNgModuleProvider)(appModuleSourceFile, 'FIREBASE_PERFORMANCE_PROVIDERS', [
|
|
115
|
-
{
|
|
116
|
-
namedImports: ['FIREBASE_PERFORMANCE_PROVIDERS'],
|
|
117
|
-
moduleSpecifier: '@rxap/firebase'
|
|
118
|
-
}
|
|
119
|
-
]);
|
|
120
|
-
}
|
|
121
|
-
if (options.storage) {
|
|
122
|
-
(0, schematics_ts_morph_1.AddNgModuleImport)(appModuleSourceFile, 'RxapAngularFireStorageModule', '@rxap/firebase');
|
|
123
|
-
(0, schematics_ts_morph_1.AddNgModuleProvider)(appModuleSourceFile, 'FIREBASE_STORAGE_PROVIDERS', [
|
|
124
|
-
{
|
|
125
|
-
namedImports: ['FIREBASE_STORAGE_PROVIDERS'],
|
|
126
|
-
moduleSpecifier: '@rxap/firebase'
|
|
127
|
-
}
|
|
128
|
-
]);
|
|
129
|
-
}
|
|
130
|
-
if (options.appCheck) {
|
|
131
|
-
(0, schematics_ts_morph_1.AddNgModuleImport)(appModuleSourceFile, 'RxapAngularFireAppCheckModule', '@rxap/firebase');
|
|
132
|
-
(0, schematics_ts_morph_1.AddNgModuleProvider)(appModuleSourceFile, 'FIREBASE_APP_CHECK_PROVIDERS', [
|
|
133
|
-
{
|
|
134
|
-
namedImports: ['FIREBASE_APP_CHECK_PROVIDERS'],
|
|
135
|
-
moduleSpecifier: '@rxap/firebase'
|
|
136
|
-
}
|
|
137
|
-
]);
|
|
138
|
-
}
|
|
139
|
-
if (options.firestore) {
|
|
140
|
-
(0, schematics_ts_morph_1.AddNgModuleImport)(appModuleSourceFile, 'AngularFirestoreModule', '@angular/fire/firestore');
|
|
141
|
-
(0, schematics_ts_morph_1.AddNgModuleProvider)(appModuleSourceFile, 'FIREBASE_FIRESTORE_PROVIDERS', [
|
|
142
|
-
{
|
|
143
|
-
namedImports: ['FIREBASE_FIRESTORE_PROVIDERS'],
|
|
144
|
-
moduleSpecifier: '@rxap/firebase'
|
|
145
|
-
}
|
|
146
|
-
]);
|
|
147
|
-
}
|
|
148
|
-
if (options.auth) {
|
|
149
|
-
(0, schematics_ts_morph_1.AddNgModuleImport)(appModuleSourceFile, 'AngularFireAuthModule', '@angular/fire/auth');
|
|
150
|
-
(0, schematics_ts_morph_1.AddNgModuleProvider)(appModuleSourceFile, {
|
|
151
|
-
provide: 'RxapAuthenticationService',
|
|
152
|
-
useClass: 'IdentityPlatformService'
|
|
153
|
-
}, [
|
|
154
|
-
{
|
|
155
|
-
namedImports: ['IdentityPlatformService'],
|
|
156
|
-
moduleSpecifier: '@rxap/firebase/auth'
|
|
157
|
-
},
|
|
158
|
-
{
|
|
159
|
-
namedImports: ['RxapAuthenticationService'],
|
|
160
|
-
moduleSpecifier: '@rxap/authentication'
|
|
161
|
-
}
|
|
162
|
-
]);
|
|
163
|
-
(0, schematics_ts_morph_1.AddNgModuleProvider)(appModuleSourceFile, 'FIREBASE_AUTH_PROVIDERS', [
|
|
164
|
-
{
|
|
165
|
-
namedImports: ['FIREBASE_AUTH_PROVIDERS'],
|
|
166
|
-
moduleSpecifier: '@rxap/firebase'
|
|
167
|
-
}
|
|
168
|
-
]);
|
|
169
|
-
}
|
|
170
|
-
return (0, schematics_1.chain)([
|
|
171
|
-
(0, schematics_ts_morph_1.ApplyTsMorphProject)(project, projectSourceRoot),
|
|
172
|
-
(0, schematics_utilities_1.AddPackageJsonDependency)('first-input-delay'),
|
|
173
|
-
(0, schematics_utilities_1.AddPackageJsonScript)('emulators:start', 'firebase emulators:start --export-on-exit=\".firebase-emulator\" --import=\".firebase-emulator\"'),
|
|
174
|
-
tree => (0, schematics_utilities_1.CoerceFile)(tree, (0, path_1.join)(projectSourceRoot, 'config.firebase.options.json'), JSON.stringify({}, undefined, 2)),
|
|
175
|
-
options.auth ? (0, schematics_utilities_1.AddPackageJsonDependency)('@rxap/authentication') : (0, schematics_1.noop)(),
|
|
176
|
-
options.functions ? (0, schematics_1.chain)([
|
|
177
|
-
tree => (0, schematics_utilities_1.CoerceFile)(tree, (0, path_1.join)(projectSourceRoot, 'config.firebase.functions.json'), JSON.stringify({
|
|
178
|
-
region: 'europe-west3'
|
|
179
|
-
}, undefined, 2)),
|
|
180
|
-
(0, schematics_1.externalSchematic)('@rxap/config', 'side-load', {
|
|
181
|
-
project: options.project,
|
|
182
|
-
url: '/config.firebase.functions.json',
|
|
183
|
-
propertyPath: 'firebase.functions',
|
|
184
|
-
required: true
|
|
185
|
-
})
|
|
186
|
-
]) : (0, schematics_1.noop)(),
|
|
187
|
-
options.analytics ? (0, schematics_1.chain)([
|
|
188
|
-
tree => (0, schematics_utilities_1.CoerceFile)(tree, (0, path_1.join)(projectSourceRoot, 'config.firebase.analytics.json'), JSON.stringify({
|
|
189
|
-
enabled: false
|
|
190
|
-
}, undefined, 2)),
|
|
191
|
-
(0, schematics_1.externalSchematic)('@rxap/config', 'side-load', {
|
|
192
|
-
project: options.project,
|
|
193
|
-
url: '/config.firebase.analytics.json',
|
|
194
|
-
propertyPath: 'firebase.analytics'
|
|
195
|
-
})
|
|
196
|
-
]) : (0, schematics_1.noop)(),
|
|
197
|
-
options.performance ? (0, schematics_1.chain)([
|
|
198
|
-
tree => (0, schematics_utilities_1.CoerceFile)(tree, (0, path_1.join)(projectSourceRoot, 'config.firebase.performance.json'), JSON.stringify({
|
|
199
|
-
instrumentationEnabled: false,
|
|
200
|
-
dataCollectionEnabled: false
|
|
201
|
-
}, undefined, 2)),
|
|
202
|
-
(0, schematics_1.externalSchematic)('@rxap/config', 'side-load', {
|
|
203
|
-
project: options.project,
|
|
204
|
-
url: '/config.firebase.performance.json',
|
|
205
|
-
propertyPath: 'firebase.performance'
|
|
206
|
-
})
|
|
207
|
-
]) : (0, schematics_1.noop)(),
|
|
208
|
-
options.storage ? (0, schematics_1.chain)([
|
|
209
|
-
tree => (0, schematics_utilities_1.CoerceFile)(tree, (0, path_1.join)(projectSourceRoot, 'config.firebase.storage.json'), JSON.stringify({}, undefined, 2)),
|
|
210
|
-
(0, schematics_1.externalSchematic)('@rxap/config', 'side-load', {
|
|
211
|
-
project: options.project,
|
|
212
|
-
url: '/config.firebase.storage.json',
|
|
213
|
-
propertyPath: 'firebase.storage'
|
|
214
|
-
})
|
|
215
|
-
]) : (0, schematics_1.noop)(),
|
|
216
|
-
options.appCheck ? (0, schematics_1.chain)([
|
|
217
|
-
tree => (0, schematics_utilities_1.CoerceFile)(tree, (0, path_1.join)(projectSourceRoot, 'config.firebase.appcheck.json'), JSON.stringify({
|
|
218
|
-
siteKey: '',
|
|
219
|
-
enabled: false
|
|
220
|
-
}, undefined, 2)),
|
|
221
|
-
(0, schematics_1.externalSchematic)('@rxap/config', 'side-load', {
|
|
222
|
-
project: options.project,
|
|
223
|
-
url: '/config.firebase.appcheck.json',
|
|
224
|
-
propertyPath: 'firebase.appCheck',
|
|
225
|
-
required: true
|
|
226
|
-
})
|
|
227
|
-
]) : (0, schematics_1.noop)(),
|
|
228
|
-
options.firestore ? (0, schematics_1.chain)([
|
|
229
|
-
tree => (0, schematics_utilities_1.CoerceFile)(tree, (0, path_1.join)(projectSourceRoot, 'config.firebase.firestore.json'), JSON.stringify({}, undefined, 2)),
|
|
230
|
-
(0, schematics_1.externalSchematic)('@rxap/config', 'side-load', {
|
|
231
|
-
project: options.project,
|
|
232
|
-
url: '/config.firebase.firestore.json',
|
|
233
|
-
propertyPath: 'firebase.firestore'
|
|
234
|
-
})
|
|
235
|
-
]) : (0, schematics_1.noop)(),
|
|
236
|
-
options.auth ? (0, schematics_1.chain)([
|
|
237
|
-
tree => (0, schematics_utilities_1.CoerceFile)(tree, (0, path_1.join)(projectSourceRoot, 'config.firebase.auth.json'), JSON.stringify({}, undefined, 2)),
|
|
238
|
-
(0, schematics_1.externalSchematic)('@rxap/config', 'side-load', {
|
|
239
|
-
project: options.project,
|
|
240
|
-
url: '/config.firebase.auth.json',
|
|
241
|
-
propertyPath: 'firebase.auth'
|
|
242
|
-
})
|
|
243
|
-
]) : (0, schematics_1.noop)(),
|
|
244
|
-
options.useEmulator ? (0, schematics_1.chain)([
|
|
245
|
-
tree => (0, schematics_utilities_1.CoerceFile)(tree, (0, path_1.join)(projectSourceRoot, 'config.firebase.emulator.json'), JSON.stringify(Object.assign({}, options.functions ? {
|
|
246
|
-
auth: ['localhost', 5501]
|
|
247
|
-
} : {}, options.storage ? {
|
|
248
|
-
auth: ['localhost', 9199]
|
|
249
|
-
} : {}, options.firestore ? {
|
|
250
|
-
auth: ['localhost', 8888]
|
|
251
|
-
} : {}, options.auth ? {
|
|
252
|
-
auth: ['localhost', 9099]
|
|
253
|
-
} : {}), undefined, 2)),
|
|
254
|
-
(0, schematics_1.externalSchematic)('@rxap/config', 'side-load', {
|
|
255
|
-
project: options.project,
|
|
256
|
-
url: '/config.firebase.emulator.json',
|
|
257
|
-
propertyPath: 'firebase.emulator'
|
|
258
|
-
})
|
|
259
|
-
]) : (0, schematics_1.noop)(),
|
|
260
|
-
tree => {
|
|
261
|
-
let content = tree.read((0, path_1.join)(projectSourceRoot, 'polyfills.ts')).toString('utf-8');
|
|
262
|
-
if (options.appCheck) {
|
|
263
|
-
if (!content.includes(`import 'firebase/app-check';`)) {
|
|
264
|
-
content = `import 'firebase/app-check';\n\n` + content;
|
|
265
|
-
}
|
|
266
|
-
}
|
|
267
|
-
if (options.performance) {
|
|
268
|
-
if (!content.includes(`import 'first-input-delay';`)) {
|
|
269
|
-
content = `import 'first-input-delay';\n\n` + content;
|
|
270
|
-
}
|
|
271
|
-
}
|
|
272
|
-
tree.overwrite((0, path_1.join)(projectSourceRoot, 'polyfills.ts'), content);
|
|
273
|
-
},
|
|
274
|
-
(0, schematics_utilities_1.UpdateAngularProject)(angularProject => {
|
|
275
|
-
if (!angularProject.targets.has('build')) {
|
|
276
|
-
throw new schematics_1.SchematicsException('The project does not have a build target');
|
|
277
|
-
}
|
|
278
|
-
const buildTarget = angularProject.targets.get('build');
|
|
279
|
-
if (!buildTarget.options.assets) {
|
|
280
|
-
buildTarget.options.assets = [];
|
|
281
|
-
}
|
|
282
|
-
const assets = [
|
|
283
|
-
(0, path_1.join)(projectSourceRoot, 'config.firebase.options.json')
|
|
284
|
-
];
|
|
285
|
-
if (options.functions) {
|
|
286
|
-
assets.push((0, path_1.join)(projectSourceRoot, 'config.firebase.functions.json'));
|
|
287
|
-
}
|
|
288
|
-
if (options.analytics) {
|
|
289
|
-
assets.push((0, path_1.join)(projectSourceRoot, 'config.firebase.analytics.json'));
|
|
290
|
-
}
|
|
291
|
-
if (options.performance) {
|
|
292
|
-
assets.push((0, path_1.join)(projectSourceRoot, 'config.firebase.performance.json'));
|
|
293
|
-
}
|
|
294
|
-
if (options.storage) {
|
|
295
|
-
assets.push((0, path_1.join)(projectSourceRoot, 'config.firebase.storage.json'));
|
|
296
|
-
}
|
|
297
|
-
if (options.appCheck) {
|
|
298
|
-
assets.push((0, path_1.join)(projectSourceRoot, 'config.firebase.appcheck.json'));
|
|
299
|
-
}
|
|
300
|
-
if (options.firestore) {
|
|
301
|
-
assets.push((0, path_1.join)(projectSourceRoot, 'config.firebase.firestore.json'));
|
|
302
|
-
}
|
|
303
|
-
if (options.auth) {
|
|
304
|
-
assets.push((0, path_1.join)(projectSourceRoot, 'config.firebase.auth.json'));
|
|
305
|
-
}
|
|
306
|
-
if (options.useEmulator) {
|
|
307
|
-
assets.push((0, path_1.join)(projectSourceRoot, 'config.firebase.emulator.json'));
|
|
308
|
-
}
|
|
309
|
-
for (const asset of assets) {
|
|
310
|
-
if (!buildTarget.options.assets.includes(asset)) {
|
|
311
|
-
buildTarget.options.assets.push(asset);
|
|
312
|
-
}
|
|
313
|
-
}
|
|
314
|
-
}, { projectName: options.project }),
|
|
315
|
-
(0, schematics_utilities_1.UpdateJsonFile)(jsonFile => {
|
|
316
|
-
if (options.useEmulator) {
|
|
317
|
-
if (!jsonFile.emulators) {
|
|
318
|
-
jsonFile.emulators = {};
|
|
319
|
-
}
|
|
320
|
-
if (options.functions) {
|
|
321
|
-
jsonFile.emulators.functions = { port: 5501 };
|
|
322
|
-
}
|
|
323
|
-
if (options.storage) {
|
|
324
|
-
jsonFile.emulators.storage = { port: 9199 };
|
|
325
|
-
}
|
|
326
|
-
if (options.firestore) {
|
|
327
|
-
jsonFile.emulators.firestore = { port: 8888 };
|
|
328
|
-
}
|
|
329
|
-
if (options.auth) {
|
|
330
|
-
jsonFile.emulators.auth = { port: 9099 };
|
|
331
|
-
}
|
|
332
|
-
jsonFile.emulators.hosting = { port: 5000 };
|
|
333
|
-
jsonFile.emulators.ui = { enabled: true };
|
|
334
|
-
}
|
|
335
|
-
if (options.storage) {
|
|
336
|
-
if (!jsonFile.storage) {
|
|
337
|
-
jsonFile.storage = {};
|
|
338
|
-
}
|
|
339
|
-
jsonFile.storage.rules = 'storage.rules';
|
|
340
|
-
}
|
|
341
|
-
if (options.firestore) {
|
|
342
|
-
if (!jsonFile.firestore) {
|
|
343
|
-
jsonFile.firestore = {};
|
|
344
|
-
}
|
|
345
|
-
jsonFile.firestore.rules = 'firestore.rules';
|
|
346
|
-
jsonFile.firestore.indexes = 'firestore.indexes.json';
|
|
347
|
-
}
|
|
348
|
-
if (options.hostingSite) {
|
|
349
|
-
jsonFile.hosting = {
|
|
350
|
-
site: options.hostingSite,
|
|
351
|
-
public: 'dist/apps/pwa',
|
|
352
|
-
ignore: [
|
|
353
|
-
'**/.*'
|
|
354
|
-
],
|
|
355
|
-
headers: [
|
|
356
|
-
{
|
|
357
|
-
'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)',
|
|
358
|
-
'headers': [
|
|
359
|
-
{
|
|
360
|
-
'key': 'Cache-Control',
|
|
361
|
-
'value': 'public,max-age=31536000,immutable'
|
|
362
|
-
}
|
|
363
|
-
]
|
|
364
|
-
},
|
|
365
|
-
{
|
|
366
|
-
'source': '**/*.@(json)',
|
|
367
|
-
'headers': [
|
|
368
|
-
{
|
|
369
|
-
'key': 'Cache-Control',
|
|
370
|
-
'value': 'public,max-age=60'
|
|
371
|
-
}
|
|
372
|
-
]
|
|
373
|
-
}
|
|
374
|
-
],
|
|
375
|
-
rewrites: [
|
|
376
|
-
{
|
|
377
|
-
'source': '**',
|
|
378
|
-
'destination': '/index.html'
|
|
379
|
-
}
|
|
380
|
-
]
|
|
381
|
-
};
|
|
382
|
-
}
|
|
383
|
-
if (options.functions) {
|
|
384
|
-
jsonFile.functions = {
|
|
385
|
-
source: 'dist/apps/functions'
|
|
386
|
-
};
|
|
387
|
-
}
|
|
388
|
-
}, 'firebase.json', { create: true }),
|
|
389
|
-
options.storage ? tree => (0, schematics_utilities_1.CoerceFile)(tree, 'storage.rules', `rules_version = '2';
|
|
390
|
-
service firebase.storage {
|
|
391
|
-
match /b/{bucket}/o {
|
|
392
|
-
match /{allPaths=**} {
|
|
393
|
-
allow read, write: if false;
|
|
394
|
-
}
|
|
395
|
-
}
|
|
396
|
-
}`) : (0, schematics_1.noop)(),
|
|
397
|
-
options.firestore ? tree => (0, schematics_utilities_1.CoerceFile)(tree, 'firestore.indexes.json', JSON.stringify({
|
|
398
|
-
indexes: [],
|
|
399
|
-
fieldOverrides: []
|
|
400
|
-
}, undefined, 2)) : (0, schematics_1.noop)(),
|
|
401
|
-
options.firestore ? tree => (0, schematics_utilities_1.CoerceFile)(tree, 'firestore.rules', `rules_version = '2';
|
|
402
|
-
service cloud.firestore {
|
|
403
|
-
match /databases/{database}/documents {
|
|
404
|
-
match /{document=**} {
|
|
405
|
-
allow read, write: if false;
|
|
406
|
-
}
|
|
407
|
-
}
|
|
408
|
-
}`) : (0, schematics_1.noop)(),
|
|
409
|
-
UpdateIgnoreFile([
|
|
410
|
-
'.firebase-emulator',
|
|
411
|
-
'.runtimeconfig.json',
|
|
412
|
-
'.firebaserc'
|
|
413
|
-
]),
|
|
414
|
-
UpdateIgnoreFile([
|
|
415
|
-
'config.*.json'
|
|
416
|
-
], { filePath: (0, path_1.join)(projectSourceRoot, '.gitignore') }),
|
|
417
|
-
(0, schematics_utilities_1.InstallNodePackages)()
|
|
418
|
-
]);
|
|
419
|
-
});
|
|
420
|
-
}
|
|
421
|
-
exports.default = default_1;
|
|
422
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../libs/firebase/src/schematics/init/index.ts"],"names":[],"mappings":";;;;AAAA,2DAOoC;AAEpC,qEAQoC;AACpC,uCAGkB;AAClB,mEAKmC;AACnC,+BAA4B;AAM5B,SAAgB,gBAAgB,CAAC,MAAgB,EAAE,UAAmC,EAAE;IACtF,OAAO,IAAI,CAAC,EAAE;;QACZ,MAAM,QAAQ,GAAG,MAAA,OAAO,CAAC,QAAQ,mCAAI,YAAY,CAAC;QAClD,IAAA,iCAAU,EAAC,IAAI,EAAE,QAAQ,EAAE,EAAE,CAAC,CAAC;QAC/B,IAAI,OAAO,GAAG,IAAI,CAAC,IAAI,CAAC,QAAQ,CAAE,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC;QACrD,KAAK,MAAM,KAAK,IAAI,MAAM,EAAE;YAC1B,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,IAAI,MAAM,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,IAAA,iCAAU,EACpC,IAAI,EACJ,wBAAwB,EACxB,IAAI,CAAC,SAAS,CAAC;gBACb,OAAO,EAAS,EAAE;gBAClB,cAAc,EAAE,EAAE;aACnB,EAAE,SAAS,EAAE,CAAC,CAAC,CACjB,CAAC,CAAC,CAAC,IAAA,iBAAI,GAAE;YACV,OAAO,CAAC,SAAS,CAAC,CAAC,CAAC,IAAI,CAAC,EAAE,CAAC,IAAA,iCAAU,EACpC,IAAI,EACJ,iBAAiB,EACjB;;;;;;;EAON,CACK,CAAC,CAAC,CAAC,IAAA,iBAAI,GAAE;YACV,gBAAgB,CAAC;gBACf,oBAAoB;gBACpB,qBAAqB;gBACrB,aAAa;aACd,CAAC;YACF,gBAAgB,CAAC;gBACf,eAAe;aAChB,EAAE,EAAE,QAAQ,EAAE,IAAA,WAAI,EAAC,iBAAiB,EAAE,YAAY,CAAC,EAAE,CAAC;YACvD,IAAA,0CAAmB,GAAE;SACtB,CAAC,CAAC;IAEL,CAAC,CAAA,CAAC;AAEJ,CAAC;AAnnBD,4BAmnBC"}
|
|
@@ -1,72 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"$schema": "http://json-schema.org/schema",
|
|
3
|
-
"$id": "firebase-init",
|
|
4
|
-
"title": "Init",
|
|
5
|
-
"type": "object",
|
|
6
|
-
"properties": {
|
|
7
|
-
"project": {
|
|
8
|
-
"type": "string",
|
|
9
|
-
"description": "The project name where firebase should be init",
|
|
10
|
-
"$default": {
|
|
11
|
-
"$source": "projectName"
|
|
12
|
-
},
|
|
13
|
-
"x-prompt": "Which project should be initialized?"
|
|
14
|
-
},
|
|
15
|
-
"functions": {
|
|
16
|
-
"type": "boolean",
|
|
17
|
-
"default": false,
|
|
18
|
-
"description": "Whether the project should support firebase functions",
|
|
19
|
-
"x-prompt": "Should the project use firebase functions?"
|
|
20
|
-
},
|
|
21
|
-
"analytics": {
|
|
22
|
-
"type": "boolean",
|
|
23
|
-
"default": false,
|
|
24
|
-
"description": "Whether the project should support firebase analytics",
|
|
25
|
-
"x-prompt": "Should the project use firebase analytics?"
|
|
26
|
-
},
|
|
27
|
-
"performance": {
|
|
28
|
-
"type": "boolean",
|
|
29
|
-
"default": false,
|
|
30
|
-
"description": "Whether the project should support firebase performance",
|
|
31
|
-
"x-prompt": "Should the project use firebase performance?"
|
|
32
|
-
},
|
|
33
|
-
"storage": {
|
|
34
|
-
"type": "boolean",
|
|
35
|
-
"default": false,
|
|
36
|
-
"description": "Whether the project should support firebase storage",
|
|
37
|
-
"x-prompt": "Should the project use firebase storage?"
|
|
38
|
-
},
|
|
39
|
-
"appCheck": {
|
|
40
|
-
"type": "boolean",
|
|
41
|
-
"default": false,
|
|
42
|
-
"description": "Whether the project should support firebase app check",
|
|
43
|
-
"x-prompt": "Should the project use firebase app check?"
|
|
44
|
-
},
|
|
45
|
-
"firestore": {
|
|
46
|
-
"type": "boolean",
|
|
47
|
-
"default": false,
|
|
48
|
-
"description": "Whether the project should support firebase firestore",
|
|
49
|
-
"x-prompt": "Should the project use firebase firestore?"
|
|
50
|
-
},
|
|
51
|
-
"auth": {
|
|
52
|
-
"type": "boolean",
|
|
53
|
-
"default": false,
|
|
54
|
-
"description": "Whether the project should support firebase auth",
|
|
55
|
-
"x-prompt": "Should the project use firebase auth?"
|
|
56
|
-
},
|
|
57
|
-
"useEmulator": {
|
|
58
|
-
"type": "boolean",
|
|
59
|
-
"default": false,
|
|
60
|
-
"description": "Whether the firebase emulator should be setup?",
|
|
61
|
-
"x-prompt": "Should the firebase emulator be setup?"
|
|
62
|
-
},
|
|
63
|
-
"hostingSite": {
|
|
64
|
-
"type": "string",
|
|
65
|
-
"description": "The name of the firebase hosting site",
|
|
66
|
-
"x-prompt": "Enter the name of the firebase hosting site: (optional)"
|
|
67
|
-
}
|
|
68
|
-
},
|
|
69
|
-
"required": [
|
|
70
|
-
"project"
|
|
71
|
-
]
|
|
72
|
-
}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const schematics_1 = require("@angular-devkit/schematics");
|
|
4
|
-
const schematics_utilities_1 = require("@rxap/schematics-utilities");
|
|
5
|
-
function default_1(options) {
|
|
6
|
-
return (0, schematics_1.chain)([
|
|
7
|
-
(0, schematics_utilities_1.InstallPeerDependencies)(),
|
|
8
|
-
(0, schematics_1.schematic)('init', options)
|
|
9
|
-
]);
|
|
10
|
-
}
|
|
11
|
-
exports.default = default_1;
|
|
12
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../libs/firebase/src/schematics/ng-add/index.ts"],"names":[],"mappings":";;AAAA,2DAIoC;AACpC,qEAAqE;AAGrE,mBAAwB,OAAoB;IAC1C,OAAO,IAAA,kBAAK,EAAC;QACX,IAAA,8CAAuB,GAAE;QACzB,IAAA,sBAAS,EAAC,MAAM,EAAE,OAAO,CAAC;KAC3B,CAAC,CAAC;AACL,CAAC;AALD,4BAKC"}
|
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"$schema": "http://json-schema.org/draft-07/schema",
|
|
3
|
-
"$id": "firebase-ng-add",
|
|
4
|
-
"type": "object",
|
|
5
|
-
"properties": {
|
|
6
|
-
"project": {
|
|
7
|
-
"type": "string",
|
|
8
|
-
"description": "The project name where firebase should be init",
|
|
9
|
-
"$default": {
|
|
10
|
-
"$source": "projectName"
|
|
11
|
-
}
|
|
12
|
-
},
|
|
13
|
-
"functions": {
|
|
14
|
-
"type": "boolean",
|
|
15
|
-
"description": "Whether the project should support firebase functions"
|
|
16
|
-
},
|
|
17
|
-
"analytics": {
|
|
18
|
-
"type": "boolean",
|
|
19
|
-
"description": "Whether the project should support firebase analytics"
|
|
20
|
-
},
|
|
21
|
-
"performance": {
|
|
22
|
-
"type": "boolean",
|
|
23
|
-
"description": "Whether the project should support firebase performance"
|
|
24
|
-
},
|
|
25
|
-
"storage": {
|
|
26
|
-
"type": "boolean",
|
|
27
|
-
"description": "Whether the project should support firebase storage"
|
|
28
|
-
},
|
|
29
|
-
"appCheck": {
|
|
30
|
-
"type": "boolean",
|
|
31
|
-
"description": "Whether the project should support firebase app check"
|
|
32
|
-
},
|
|
33
|
-
"firestore": {
|
|
34
|
-
"type": "boolean",
|
|
35
|
-
"description": "Whether the project should support firebase firestore"
|
|
36
|
-
},
|
|
37
|
-
"auth": {
|
|
38
|
-
"type": "boolean",
|
|
39
|
-
"description": "Whether the project should support firebase auth"
|
|
40
|
-
},
|
|
41
|
-
"useEmulator": {
|
|
42
|
-
"type": "boolean",
|
|
43
|
-
"description": "Whether the firebase emulator should be setup?"
|
|
44
|
-
},
|
|
45
|
-
"hostingSite": {
|
|
46
|
-
"type": "string",
|
|
47
|
-
"description": "The name of the firebase hosting site"
|
|
48
|
-
}
|
|
49
|
-
},
|
|
50
|
-
"required": []
|
|
51
|
-
}
|