@angular/fire 16.0.0-canary.e04cd7f → 16.0.0-rc.0
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 +223 -0
- package/analytics/analytics.module.d.ts +2 -2
- package/analytics/firebase.d.ts +4 -1
- package/analytics/screen-tracking.service.d.ts +3 -3
- package/app-check/app-check.d.ts +0 -6
- package/app-check/app-check.module.d.ts +3 -4
- package/app-check/firebase.d.ts +2 -1
- package/app-check/public_api.d.ts +2 -1
- package/auth/auth.module.d.ts +2 -2
- package/auth/firebase.d.ts +3 -1
- package/auth-guard/auth-guard.d.ts +2 -2
- package/compat/analytics/analytics.d.ts +1 -3
- package/compat/analytics/analytics.module.d.ts +1 -1
- package/compat/analytics/screen-tracking.service.d.ts +1 -1
- package/compat/analytics/user-tracking.service.d.ts +1 -1
- package/compat/auth/auth.d.ts +3 -3
- package/compat/auth-guard/auth-guard.d.ts +2 -2
- package/compat/database/database.d.ts +4 -4
- package/compat/database/interfaces.d.ts +2 -2
- package/compat/database/list/audit-trail.d.ts +1 -1
- package/compat/database/list/create-reference.d.ts +1 -1
- package/compat/database/list/data-operation.d.ts +1 -1
- package/compat/database/list/state-changes.d.ts +1 -1
- package/compat/database/object/create-reference.d.ts +1 -1
- package/compat/database/observable/fromRef.d.ts +1 -1
- package/compat/database/utils.d.ts +1 -1
- package/compat/firebase.app.module.d.ts +1 -1
- package/compat/firestore/collection/collection.d.ts +2 -2
- package/compat/firestore/collection-group/collection-group.d.ts +2 -2
- package/compat/firestore/document/document.d.ts +4 -4
- package/compat/firestore/firestore.d.ts +7 -7
- package/compat/firestore/interfaces.d.ts +2 -2
- package/compat/functions/functions.d.ts +3 -3
- package/compat/messaging/messaging.d.ts +2 -2
- package/compat/performance/performance.d.ts +2 -2
- package/compat/remote-config/remote-config.d.ts +15 -49
- package/compat/storage/observable/fromTask.d.ts +1 -2
- package/compat/storage/ref.d.ts +1 -1
- package/compat/storage/storage.d.ts +3 -3
- package/compat/storage/task.d.ts +1 -1
- package/core.d.ts +7 -0
- package/database/database.module.d.ts +2 -2
- package/docs/analytics.md +67 -0
- package/docs/app-check.md +53 -0
- package/docs/auth.md +165 -0
- package/docs/compat/analytics/getting-started.md +137 -0
- package/docs/compat/auth/getting-started.md +162 -0
- package/docs/compat/auth/router-guards.md +104 -0
- package/docs/compat/emulators/emulators.md +134 -0
- package/docs/compat/firestore/collections.md +326 -0
- package/docs/compat/firestore/documents.md +115 -0
- package/docs/compat/firestore/offline-data.md +39 -0
- package/docs/compat/firestore/querying-collections.md +204 -0
- package/docs/compat/functions/functions.md +166 -0
- package/docs/compat/messaging/messaging.md +232 -0
- package/docs/compat/performance/getting-started.md +132 -0
- package/docs/compat/remote-config/getting-started.md +134 -0
- package/docs/compat/rtdb/lists.md +257 -0
- package/docs/compat/rtdb/objects.md +182 -0
- package/docs/compat/rtdb/querying-lists.md +155 -0
- package/docs/compat/storage/storage.md +257 -0
- package/docs/compat.md +70 -0
- package/docs/database.md +175 -0
- package/docs/deploy/getting-started.md +204 -0
- package/docs/firebase.json +16 -0
- package/docs/firestore.md +148 -0
- package/docs/functions.md +52 -0
- package/docs/images/analytics-illo_1x.png +0 -0
- package/docs/images/auth-illo_1x.png +0 -0
- package/docs/images/cloud-messaging-illo_1x.png +0 -0
- package/docs/images/database-illo_1x.png +0 -0
- package/docs/images/firestore-illo_1x.png +0 -0
- package/docs/images/functions-illo_1x.png +0 -0
- package/docs/images/hosting-illo_1x.png +0 -0
- package/docs/images/performance-illo_1x.png +0 -0
- package/docs/images/reCAPTCHA-logo@1x.png +0 -0
- package/docs/images/remote-config-illo_1x.png +0 -0
- package/docs/images/storage-illo_1x.png +0 -0
- package/docs/install-and-setup.md +114 -0
- package/docs/install-angular-cli-windows10.md +82 -0
- package/docs/install-firebase-tools.md +78 -0
- package/docs/messaging.md +25 -0
- package/docs/performance.md +57 -0
- package/docs/remote-config.md +53 -0
- package/docs/storage.md +90 -0
- package/docs/universal/cloud-functions.md +96 -0
- package/docs/universal/getting-started.md +28 -0
- package/docs/universal/prerendering.md +72 -0
- package/docs/version-4-upgrade.md +119 -0
- package/docs/version-5-upgrade.md +82 -0
- package/docs/version-6-upgrade.md +16 -0
- package/docs/version-7-upgrade.md +298 -0
- package/esm2022/analytics/analytics.mjs +1 -1
- package/esm2022/analytics/analytics.module.mjs +10 -10
- package/esm2022/analytics/firebase.mjs +5 -2
- package/esm2022/analytics/screen-tracking.service.mjs +11 -10
- package/esm2022/analytics/user-tracking.service.mjs +5 -5
- package/esm2022/app/app.mjs +1 -1
- package/esm2022/app/app.module.mjs +9 -8
- package/esm2022/app-check/app-check.mjs +3 -9
- package/esm2022/app-check/app-check.module.mjs +12 -14
- package/esm2022/app-check/firebase.mjs +3 -2
- package/esm2022/app-check/public_api.mjs +3 -2
- package/esm2022/auth/auth.mjs +1 -1
- package/esm2022/auth/auth.module.mjs +11 -11
- package/esm2022/auth/firebase.mjs +4 -2
- package/esm2022/auth-guard/auth-guard.mjs +8 -6
- package/esm2022/auth-guard/auth-guard.module.mjs +7 -7
- package/esm2022/compat/analytics/analytics.mjs +12 -13
- package/esm2022/compat/analytics/analytics.module.mjs +14 -11
- package/esm2022/compat/analytics/screen-tracking.service.mjs +9 -9
- package/esm2022/compat/analytics/user-tracking.service.mjs +7 -7
- package/esm2022/compat/auth/auth.mjs +13 -13
- package/esm2022/compat/auth/auth.module.mjs +7 -7
- package/esm2022/compat/auth-guard/auth-guard.mjs +8 -6
- package/esm2022/compat/auth-guard/auth-guard.module.mjs +7 -7
- package/esm2022/compat/cache.mjs +2 -1
- package/esm2022/compat/database/database.mjs +10 -10
- package/esm2022/compat/database/database.module.mjs +7 -7
- package/esm2022/compat/database/interfaces.mjs +1 -1
- package/esm2022/compat/database/list/audit-trail.mjs +3 -3
- package/esm2022/compat/database/list/changes.mjs +5 -5
- package/esm2022/compat/database/list/create-reference.mjs +5 -5
- package/esm2022/compat/database/list/data-operation.mjs +1 -1
- package/esm2022/compat/database/list/snapshot-changes.mjs +1 -1
- package/esm2022/compat/database/list/state-changes.mjs +2 -2
- package/esm2022/compat/database/object/create-reference.mjs +2 -2
- package/esm2022/compat/database/object/snapshot-changes.mjs +1 -1
- package/esm2022/compat/database/observable/fromRef.mjs +3 -2
- package/esm2022/compat/database/utils.mjs +1 -1
- package/esm2022/compat/firebase.app.mjs +1 -1
- package/esm2022/compat/firebase.app.module.mjs +11 -9
- package/esm2022/compat/firestore/collection/changes.mjs +2 -2
- package/esm2022/compat/firestore/collection/collection.mjs +4 -4
- package/esm2022/compat/firestore/collection-group/collection-group.mjs +4 -4
- package/esm2022/compat/firestore/document/document.mjs +4 -4
- package/esm2022/compat/firestore/firestore.mjs +11 -11
- package/esm2022/compat/firestore/firestore.module.mjs +7 -7
- package/esm2022/compat/firestore/interfaces.mjs +1 -1
- package/esm2022/compat/firestore/observable/fromRef.mjs +2 -2
- package/esm2022/compat/functions/functions.mjs +8 -8
- package/esm2022/compat/functions/functions.module.mjs +7 -7
- package/esm2022/compat/messaging/messaging.mjs +13 -12
- package/esm2022/compat/messaging/messaging.module.mjs +7 -7
- package/esm2022/compat/performance/performance.mjs +14 -20
- package/esm2022/compat/performance/performance.module.mjs +8 -9
- package/esm2022/compat/performance/performance.service.mjs +5 -4
- package/esm2022/compat/proxy.mjs +6 -7
- package/esm2022/compat/remote-config/remote-config.mjs +10 -11
- package/esm2022/compat/remote-config/remote-config.module.mjs +7 -7
- package/esm2022/compat/storage/observable/fromTask.mjs +3 -1
- package/esm2022/compat/storage/pipes/storageUrl.pipe.mjs +9 -9
- package/esm2022/compat/storage/ref.mjs +3 -3
- package/esm2022/compat/storage/storage.mjs +8 -8
- package/esm2022/compat/storage/storage.module.mjs +7 -7
- package/esm2022/compat/storage/task.mjs +2 -2
- package/esm2022/core.mjs +7 -1
- package/esm2022/database/database.mjs +1 -1
- package/esm2022/database/database.module.mjs +11 -11
- package/esm2022/firestore/firebase.mjs +22 -2
- package/esm2022/firestore/firestore.mjs +1 -1
- package/esm2022/firestore/firestore.module.mjs +11 -11
- package/esm2022/firestore/lite/firebase.mjs +11 -2
- package/esm2022/firestore/lite/lite.mjs +1 -1
- package/esm2022/firestore/lite/lite.module.mjs +10 -11
- package/esm2022/firestore/lite/rxfire.mjs +4 -2
- package/esm2022/firestore/rxfire.mjs +4 -4
- package/esm2022/functions/functions.mjs +1 -1
- package/esm2022/functions/functions.module.mjs +11 -11
- package/esm2022/messaging/messaging.mjs +1 -1
- package/esm2022/messaging/messaging.module.mjs +9 -9
- package/esm2022/performance/performance.mjs +1 -1
- package/esm2022/performance/performance.module.mjs +12 -12
- package/esm2022/remote-config/is-remote-config-supported-factory.mjs +2 -2
- package/esm2022/remote-config/remote-config.mjs +1 -1
- package/esm2022/remote-config/remote-config.module.mjs +9 -9
- package/esm2022/storage/storage.mjs +1 -1
- package/esm2022/storage/storage.module.mjs +11 -11
- package/esm2022/zones.mjs +9 -11
- package/fesm2022/angular-fire-analytics.mjs +18 -14
- package/fesm2022/angular-fire-analytics.mjs.map +1 -1
- package/fesm2022/angular-fire-app-check.mjs +13 -19
- package/fesm2022/angular-fire-app-check.mjs.map +1 -1
- package/fesm2022/angular-fire-app.mjs +6 -5
- package/fesm2022/angular-fire-app.mjs.map +1 -1
- package/fesm2022/angular-fire-auth-guard.mjs +13 -11
- package/fesm2022/angular-fire-auth-guard.mjs.map +1 -1
- package/fesm2022/angular-fire-auth.mjs +10 -9
- package/fesm2022/angular-fire-auth.mjs.map +1 -1
- package/fesm2022/angular-fire-compat-analytics.mjs +29 -27
- package/fesm2022/angular-fire-compat-analytics.mjs.map +1 -1
- package/fesm2022/angular-fire-compat-auth-guard.mjs +12 -10
- package/fesm2022/angular-fire-compat-auth-guard.mjs.map +1 -1
- package/fesm2022/angular-fire-compat-auth.mjs +13 -13
- package/fesm2022/angular-fire-compat-auth.mjs.map +1 -1
- package/fesm2022/angular-fire-compat-database.mjs +129 -128
- package/fesm2022/angular-fire-compat-database.mjs.map +1 -1
- package/fesm2022/angular-fire-compat-firestore.mjs +96 -96
- package/fesm2022/angular-fire-compat-firestore.mjs.map +1 -1
- package/fesm2022/angular-fire-compat-functions.mjs +10 -10
- package/fesm2022/angular-fire-compat-functions.mjs.map +1 -1
- package/fesm2022/angular-fire-compat-messaging.mjs +13 -12
- package/fesm2022/angular-fire-compat-messaging.mjs.map +1 -1
- package/fesm2022/angular-fire-compat-performance.mjs +23 -29
- package/fesm2022/angular-fire-compat-performance.mjs.map +1 -1
- package/fesm2022/angular-fire-compat-remote-config.mjs +10 -11
- package/fesm2022/angular-fire-compat-remote-config.mjs.map +1 -1
- package/fesm2022/angular-fire-compat-storage.mjs +21 -19
- package/fesm2022/angular-fire-compat-storage.mjs.map +1 -1
- package/fesm2022/angular-fire-compat.mjs +15 -13
- package/fesm2022/angular-fire-compat.mjs.map +1 -1
- package/fesm2022/angular-fire-database.mjs +7 -8
- package/fesm2022/angular-fire-database.mjs.map +1 -1
- package/fesm2022/angular-fire-firestore-lite.mjs +21 -11
- package/fesm2022/angular-fire-firestore-lite.mjs.map +1 -1
- package/fesm2022/angular-fire-firestore.mjs +32 -13
- package/fesm2022/angular-fire-firestore.mjs.map +1 -1
- package/fesm2022/angular-fire-functions.mjs +8 -9
- package/fesm2022/angular-fire-functions.mjs.map +1 -1
- package/fesm2022/angular-fire-messaging.mjs +4 -4
- package/fesm2022/angular-fire-messaging.mjs.map +1 -1
- package/fesm2022/angular-fire-performance.mjs +7 -7
- package/fesm2022/angular-fire-performance.mjs.map +1 -1
- package/fesm2022/angular-fire-remote-config.mjs +4 -4
- package/fesm2022/angular-fire-remote-config.mjs.map +1 -1
- package/fesm2022/angular-fire-storage.mjs +6 -7
- package/fesm2022/angular-fire-storage.mjs.map +1 -1
- package/fesm2022/angular-fire.mjs +14 -10
- package/fesm2022/angular-fire.mjs.map +1 -1
- package/firestore/firebase.d.ts +21 -1
- package/firestore/firestore.module.d.ts +2 -2
- package/firestore/lite/firebase.d.ts +10 -1
- package/firestore/lite/lite.module.d.ts +2 -2
- package/firestore/lite/rxfire.d.ts +3 -1
- package/firestore/rxfire.d.ts +3 -3
- package/functions/functions.module.d.ts +2 -2
- package/messaging/messaging.module.d.ts +2 -2
- package/package.json +17 -17
- package/performance/performance.module.d.ts +2 -2
- package/remote-config/remote-config.module.d.ts +2 -2
- package/schematics/add/index.js +1 -1
- package/schematics/add/schema.json +16 -0
- package/schematics/builders.json +10 -0
- package/schematics/collection.json +15 -0
- package/schematics/common.js +1 -1
- package/schematics/deploy/actions.js +11 -11
- package/schematics/deploy/builder.js +2 -2
- package/schematics/deploy/schema.json +119 -0
- package/schematics/migration.json +15 -0
- package/schematics/setup/index.js +5 -6
- package/schematics/setup/prompts.js +5 -6
- package/schematics/setup/schema.json +16 -0
- package/schematics/update/index.js +1 -1
- package/schematics/update/v7/index.js +2 -2
- package/schematics/utils.js +4 -4
- package/storage/storage.module.d.ts +2 -2
- package/publish.sh +0 -1
|
@@ -0,0 +1,119 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "http://json-schema.org/draft-07/schema",
|
|
3
|
+
"$id": "FirebaseDeploySchema",
|
|
4
|
+
"title": "Firebase Deploy",
|
|
5
|
+
"description": "Ng Deploy target options for Firebase.",
|
|
6
|
+
"properties": {
|
|
7
|
+
"buildTarget": {
|
|
8
|
+
"type": "string",
|
|
9
|
+
"description": "Target to build.",
|
|
10
|
+
"pattern": "^[^:\\s]+:[^:\\s]+(:[^\\s]+)?$"
|
|
11
|
+
},
|
|
12
|
+
"browserTarget": {
|
|
13
|
+
"type": "string",
|
|
14
|
+
"description": "Target to build.",
|
|
15
|
+
"pattern": "^[^:\\s]+:[^:\\s]+(:[^\\s]+)?$"
|
|
16
|
+
},
|
|
17
|
+
"prerenderTarget": {
|
|
18
|
+
"type": "string",
|
|
19
|
+
"description": "Target to build.",
|
|
20
|
+
"pattern": "^[^:\\s]+:[^:\\s]+(:[^\\s]+)?$"
|
|
21
|
+
},
|
|
22
|
+
"serverTarget": {
|
|
23
|
+
"type": "string",
|
|
24
|
+
"description": "Target to build.",
|
|
25
|
+
"pattern": "^[^:\\s]+:[^:\\s]+(:[^\\s]+)?$"
|
|
26
|
+
},
|
|
27
|
+
"universalBuildTarget": {
|
|
28
|
+
"type": "string",
|
|
29
|
+
"description": "Target to build.",
|
|
30
|
+
"pattern": "^[^:\\s]+:[^:\\s]+(:[^\\s]+)?$"
|
|
31
|
+
},
|
|
32
|
+
"ssr": {
|
|
33
|
+
"oneOf": [{ "type": "boolean" }, { "type": "string" }],
|
|
34
|
+
"description": "Should we attempt to deploy the function to Cloud Functions (true or 'cloud-functions') / Cloud Run ('cloud-run') or just Hosting (false)"
|
|
35
|
+
},
|
|
36
|
+
"prerender": {
|
|
37
|
+
"type": "boolean",
|
|
38
|
+
"description": "Prerender before deploy?"
|
|
39
|
+
},
|
|
40
|
+
"firebaseProject": {
|
|
41
|
+
"type": "string",
|
|
42
|
+
"description": "The Firebase project name or project alias to use when deploying"
|
|
43
|
+
},
|
|
44
|
+
"target": {
|
|
45
|
+
"type": "string",
|
|
46
|
+
"description": "The Firebase hosting target in firebase.json for multi-site"
|
|
47
|
+
},
|
|
48
|
+
"firebaseHostingSite": {
|
|
49
|
+
"type": "string",
|
|
50
|
+
"description": "The Firebase Hosting site to deploy to"
|
|
51
|
+
},
|
|
52
|
+
"functionName": {
|
|
53
|
+
"type": "string",
|
|
54
|
+
"description": "The name of the Cloud Function or Cloud Run serviceId to deploy SSR to"
|
|
55
|
+
},
|
|
56
|
+
"functionsNodeVersion": {
|
|
57
|
+
"oneOf": [{ "type": "number" }, { "type": "string" }],
|
|
58
|
+
"description": "Version of Node.js to run Cloud Functions / Run on"
|
|
59
|
+
},
|
|
60
|
+
"CF3v2": {
|
|
61
|
+
"type": "boolean",
|
|
62
|
+
"description": "Generation of the Functions product to run on"
|
|
63
|
+
},
|
|
64
|
+
"region": {
|
|
65
|
+
"type": "string",
|
|
66
|
+
"description": "The region to deploy Cloud Functions or Cloud Run to"
|
|
67
|
+
},
|
|
68
|
+
"outputPath": {
|
|
69
|
+
"type": "string",
|
|
70
|
+
"description": "Where to output the deploy artifacts"
|
|
71
|
+
},
|
|
72
|
+
"functionsRuntimeOptions": {
|
|
73
|
+
"type": "object",
|
|
74
|
+
"description": "Runtime options for Cloud Functions, if deploying to Cloud Functions"
|
|
75
|
+
},
|
|
76
|
+
"preview": {
|
|
77
|
+
"type": "boolean",
|
|
78
|
+
"description": "Do not deploy the application, just set up the Firebase Function in the project output directory. Can be used for testing the Firebase Function with `firebase serve`."
|
|
79
|
+
},
|
|
80
|
+
"cloudRunOptions": {
|
|
81
|
+
"type": "object",
|
|
82
|
+
"description": "Options passed to Cloud Run, if deploying to Cloud Run.",
|
|
83
|
+
"properties": {
|
|
84
|
+
"cpus": {
|
|
85
|
+
"type": "number",
|
|
86
|
+
"description": "Set a CPU limit in Kubernetes cpu units."
|
|
87
|
+
},
|
|
88
|
+
"maxConcurrency": {
|
|
89
|
+
"oneOf": [{ "type": "number" }, { "type": "string" }],
|
|
90
|
+
"pattern": "^(\\d+|default)$",
|
|
91
|
+
"description": "Set the maximum number of concurrent requests allowed per container instance. If concurrency is unspecified, any number of concurrent requests are allowed. To unset this field, provide the special value default."
|
|
92
|
+
},
|
|
93
|
+
"maxInstances": {
|
|
94
|
+
"oneOf": [{ "type": "number" }, { "type": "string" }],
|
|
95
|
+
"pattern": "^(\\d+|default)$",
|
|
96
|
+
"description": "The maximum number of container instances of the Service to run. Use 'default' to unset the limit and use the platform default."
|
|
97
|
+
},
|
|
98
|
+
"memory": {
|
|
99
|
+
"type": "string",
|
|
100
|
+
"pattern": "^\\d+(G|M)i$",
|
|
101
|
+
"description": "Set a memory limit. Ex: 1Gi, 512Mi."
|
|
102
|
+
},
|
|
103
|
+
"minInstances": {
|
|
104
|
+
"oneOf": [{ "type": "number" }, { "type": "string" }],
|
|
105
|
+
"pattern": "^(\\d+|default)$",
|
|
106
|
+
"description": "The minimum number of container instances of the Service to run or 'default' to remove any minimum."
|
|
107
|
+
},
|
|
108
|
+
"timeout": {
|
|
109
|
+
"type": "number",
|
|
110
|
+
"description": "Set the maximum request execution time (timeout) in seconds."
|
|
111
|
+
},
|
|
112
|
+
"vpcConnector": {
|
|
113
|
+
"type": "string",
|
|
114
|
+
"description": "Set a VPC connector for this resource."
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "../../node_modules/@angular-devkit/schematics/collection-schema.json",
|
|
3
|
+
"schematics": {
|
|
4
|
+
"migration-v7": {
|
|
5
|
+
"version": "7.0.0",
|
|
6
|
+
"description": "Update @angular/fire to v7",
|
|
7
|
+
"factory": "./update/v7#ngUpdate"
|
|
8
|
+
},
|
|
9
|
+
"ng-post-upgate": {
|
|
10
|
+
"description": "Print out results after ng-update",
|
|
11
|
+
"factory": "./update#ngPostUpdate",
|
|
12
|
+
"private": true
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
}
|
|
@@ -10,15 +10,14 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
10
10
|
};
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
12
|
exports.setupFirebase = exports.generateFirebaseJson = exports.ngAddSetupProject = exports.setupProject = void 0;
|
|
13
|
+
const fs_1 = require("fs");
|
|
14
|
+
const path_1 = require("path");
|
|
13
15
|
const core_1 = require("@angular-devkit/core");
|
|
14
16
|
const schematics_1 = require("@angular-devkit/schematics");
|
|
17
|
+
const common_1 = require("../common");
|
|
18
|
+
const firebaseTools_1 = require("../firebaseTools");
|
|
15
19
|
const utils_1 = require("../utils");
|
|
16
20
|
const prompts_1 = require("./prompts");
|
|
17
|
-
const firebaseTools_1 = require("../firebaseTools");
|
|
18
|
-
const fs_1 = require("fs");
|
|
19
|
-
const path_1 = require("path");
|
|
20
|
-
const common_1 = require("../common");
|
|
21
|
-
;
|
|
22
21
|
const setupProject = (tree, context, features, config) => __awaiter(void 0, void 0, void 0, function* () {
|
|
23
22
|
var _a;
|
|
24
23
|
const { path: workspacePath, workspace } = (0, utils_1.getWorkspace)(tree);
|
|
@@ -28,7 +27,7 @@ const setupProject = (tree, context, features, config) => __awaiter(void 0, void
|
|
|
28
27
|
const featuresToImport = features.filter(it => it !== 0);
|
|
29
28
|
if (featuresToImport.length > 0) {
|
|
30
29
|
(0, utils_1.addToNgModule)(tree, { features: featuresToImport, sourcePath });
|
|
31
|
-
(0, utils_1.addFixesToServer)(tree
|
|
30
|
+
(0, utils_1.addFixesToServer)(tree);
|
|
32
31
|
}
|
|
33
32
|
if (config.sdkConfig) {
|
|
34
33
|
const source = `
|
|
@@ -35,10 +35,10 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
35
35
|
exports.projectTypePrompt = exports.sitePrompt = exports.appPrompt = exports.projectPrompt = exports.userPrompt = exports.featuresPrompt = exports.searchSites = exports.searchApps = exports.searchProjects = void 0;
|
|
36
36
|
const fuzzy = __importStar(require("fuzzy"));
|
|
37
37
|
const inquirer = __importStar(require("inquirer"));
|
|
38
|
+
const common_1 = require("../common");
|
|
39
|
+
const firebaseTools_1 = require("../firebaseTools");
|
|
38
40
|
const interfaces_1 = require("../interfaces");
|
|
39
41
|
const utils_1 = require("../utils");
|
|
40
|
-
const firebaseTools_1 = require("../firebaseTools");
|
|
41
|
-
const common_1 = require("../common");
|
|
42
42
|
inquirer.registerPrompt('autocomplete', require('inquirer-autocomplete-prompt'));
|
|
43
43
|
const NEW_OPTION = '~~angularfire-new~~';
|
|
44
44
|
const DEFAULT_SITE_TYPE = 'DEFAULT_SITE';
|
|
@@ -190,7 +190,7 @@ const projectPrompt = (defaultProject, options) => __awaiter(void 0, void 0, voi
|
|
|
190
190
|
});
|
|
191
191
|
return yield firebaseTools.projects.create(projectId, { account: options.account, displayName, nonInteractive: true });
|
|
192
192
|
}
|
|
193
|
-
return (
|
|
193
|
+
return (projects).find(it => it.projectId === projectId);
|
|
194
194
|
});
|
|
195
195
|
exports.projectPrompt = projectPrompt;
|
|
196
196
|
const appPrompt = ({ projectId: project }, defaultAppId, options) => __awaiter(void 0, void 0, void 0, function* () {
|
|
@@ -209,10 +209,9 @@ const appPrompt = ({ projectId: project }, defaultAppId, options) => __awaiter(v
|
|
|
209
209
|
name: 'displayName',
|
|
210
210
|
message: 'What would you like to call your app?',
|
|
211
211
|
});
|
|
212
|
-
;
|
|
213
212
|
return yield firebaseTools.apps.create('web', displayName, Object.assign(Object.assign({}, options), { nonInteractive: true, project }));
|
|
214
213
|
}
|
|
215
|
-
return (
|
|
214
|
+
return (apps).find(it => (0, utils_1.shortAppId)(it) === appId);
|
|
216
215
|
});
|
|
217
216
|
exports.appPrompt = appPrompt;
|
|
218
217
|
const sitePrompt = ({ projectId: project }, options) => __awaiter(void 0, void 0, void 0, function* () {
|
|
@@ -245,7 +244,7 @@ const sitePrompt = ({ projectId: project }, options) => __awaiter(void 0, void 0
|
|
|
245
244
|
});
|
|
246
245
|
return yield firebaseTools.hosting.sites.create(subdomain, Object.assign(Object.assign({}, options), { nonInteractive: true, project }));
|
|
247
246
|
}
|
|
248
|
-
return (
|
|
247
|
+
return (sites).find(it => (0, common_1.shortSiteName)(it) === siteName);
|
|
249
248
|
});
|
|
250
249
|
exports.sitePrompt = sitePrompt;
|
|
251
250
|
const DEFAULT_REGION = 'us-central1';
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "http://json-schema.org/draft-07/schema",
|
|
3
|
+
"$id": "angular-fire-ng-add",
|
|
4
|
+
"title": "AngularFire ng-add",
|
|
5
|
+
"type": "object",
|
|
6
|
+
"properties": {
|
|
7
|
+
"project": {
|
|
8
|
+
"type": "string",
|
|
9
|
+
"description": "The name of the project.",
|
|
10
|
+
"$default": {
|
|
11
|
+
"$source": "projectName"
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
},
|
|
15
|
+
"required": []
|
|
16
|
+
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.ngPostUpdate = void 0;
|
|
4
|
-
const ngPostUpdate = () => (host,
|
|
4
|
+
const ngPostUpdate = () => (host, _context) => {
|
|
5
5
|
return host;
|
|
6
6
|
};
|
|
7
7
|
exports.ngPostUpdate = ngPostUpdate;
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.ngUpdate = void 0;
|
|
4
|
+
const path_1 = require("path");
|
|
4
5
|
const schematics_1 = require("@angular-devkit/schematics");
|
|
5
6
|
const tasks_1 = require("@angular-devkit/schematics/tasks");
|
|
6
7
|
const common_1 = require("../../common");
|
|
7
8
|
const versions_json_1 = require("../../versions.json");
|
|
8
|
-
const
|
|
9
|
-
const IMPORT_REGEX = /(?<key>import|export)\s+(?:(?<alias>[\w,{}\s\*]+)\s+from)?\s*(?:(?<quote>["'])?(?<ref>[@\w\s\\\/.-]+)\3?)\s*(?<term>[;\n])/g;
|
|
9
|
+
const IMPORT_REGEX = /(?<key>import|export)\s+(?:(?<alias>[\w,{}\s*]+)\s+from)?\s*(?:(?<quote>["'])?(?<ref>[@\w\s\\/.-]+)\3?)\s*(?<term>[;\n])/g;
|
|
10
10
|
const ngUpdate = () => (host, context) => {
|
|
11
11
|
const packageJson = host.exists('package.json') && (0, common_1.safeReadJSON)('package.json', host);
|
|
12
12
|
if (packageJson === undefined) {
|
package/schematics/utils.js
CHANGED
|
@@ -16,7 +16,7 @@ const isUniversalApp = (project) => { var _a; return (_a = project.architect) ==
|
|
|
16
16
|
exports.isUniversalApp = isUniversalApp;
|
|
17
17
|
const hasPrerenderOption = (project) => { var _a; return (_a = project.architect) === null || _a === void 0 ? void 0 : _a.prerender; };
|
|
18
18
|
exports.hasPrerenderOption = hasPrerenderOption;
|
|
19
|
-
const shortAppId = (app) => (app === null || app === void 0 ? void 0 : app.appId)
|
|
19
|
+
const shortAppId = (app) => { var _a; return (_a = app === null || app === void 0 ? void 0 : app.appId) === null || _a === void 0 ? void 0 : _a.split('/').pop(); };
|
|
20
20
|
exports.shortAppId = shortAppId;
|
|
21
21
|
function getWorkspace(host) {
|
|
22
22
|
const path = '/angular.json';
|
|
@@ -88,7 +88,7 @@ function addEnvironmentEntry(host, filePath, data) {
|
|
|
88
88
|
}
|
|
89
89
|
const sourceFile = typescript_1.default.createSourceFile(filePath, buffer.toString('utf-8'), typescript_1.default.ScriptTarget.Latest, true);
|
|
90
90
|
const envIdentifier = (0, ast_utils_1.findNode)(sourceFile, typescript_1.default.SyntaxKind.Identifier, 'environment');
|
|
91
|
-
if (!envIdentifier ||
|
|
91
|
+
if (!(envIdentifier === null || envIdentifier === void 0 ? void 0 : envIdentifier.parent)) {
|
|
92
92
|
throw new schematics_1.SchematicsException(`Cannot find 'environment' identifier in ${filePath}`);
|
|
93
93
|
}
|
|
94
94
|
const envObjectLiteral = envIdentifier.parent.getChildren().find(({ kind }) => kind === typescript_1.default.SyntaxKind.ObjectLiteralExpression);
|
|
@@ -97,7 +97,7 @@ function addEnvironmentEntry(host, filePath, data) {
|
|
|
97
97
|
}
|
|
98
98
|
const firebaseIdentifier = (0, ast_utils_1.findNode)(envObjectLiteral, typescript_1.default.SyntaxKind.Identifier, 'firebase');
|
|
99
99
|
const recorder = host.beginUpdate(filePath);
|
|
100
|
-
if (firebaseIdentifier
|
|
100
|
+
if (firebaseIdentifier === null || firebaseIdentifier === void 0 ? void 0 : firebaseIdentifier.parent) {
|
|
101
101
|
const change = new change_1.ReplaceChange(filePath, firebaseIdentifier.parent.pos, firebaseIdentifier.parent.getFullText(), data);
|
|
102
102
|
(0, change_1.applyToUpdateRecorder)(recorder, [change]);
|
|
103
103
|
}
|
|
@@ -120,7 +120,7 @@ function addEnvironmentEntry(host, filePath, data) {
|
|
|
120
120
|
return host;
|
|
121
121
|
}
|
|
122
122
|
exports.addEnvironmentEntry = addEnvironmentEntry;
|
|
123
|
-
function addFixesToServer(host
|
|
123
|
+
function addFixesToServer(host) {
|
|
124
124
|
const serverPath = `/server.ts`;
|
|
125
125
|
if (!host.exists(serverPath)) {
|
|
126
126
|
return host;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { InjectionToken, Injector, ModuleWithProviders, NgZone } from '@angular/core';
|
|
2
|
+
import { FirebaseApp } from '@angular/fire/app';
|
|
2
3
|
import { FirebaseStorage } from 'firebase/storage';
|
|
3
4
|
import { Storage } from './storage';
|
|
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;
|
package/publish.sh
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
npm publish . --tag canary
|