@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.
Files changed (257) hide show
  1. package/README.md +223 -0
  2. package/analytics/analytics.module.d.ts +2 -2
  3. package/analytics/firebase.d.ts +4 -1
  4. package/analytics/screen-tracking.service.d.ts +3 -3
  5. package/app-check/app-check.d.ts +0 -6
  6. package/app-check/app-check.module.d.ts +3 -4
  7. package/app-check/firebase.d.ts +2 -1
  8. package/app-check/public_api.d.ts +2 -1
  9. package/auth/auth.module.d.ts +2 -2
  10. package/auth/firebase.d.ts +3 -1
  11. package/auth-guard/auth-guard.d.ts +2 -2
  12. package/compat/analytics/analytics.d.ts +1 -3
  13. package/compat/analytics/analytics.module.d.ts +1 -1
  14. package/compat/analytics/screen-tracking.service.d.ts +1 -1
  15. package/compat/analytics/user-tracking.service.d.ts +1 -1
  16. package/compat/auth/auth.d.ts +3 -3
  17. package/compat/auth-guard/auth-guard.d.ts +2 -2
  18. package/compat/database/database.d.ts +4 -4
  19. package/compat/database/interfaces.d.ts +2 -2
  20. package/compat/database/list/audit-trail.d.ts +1 -1
  21. package/compat/database/list/create-reference.d.ts +1 -1
  22. package/compat/database/list/data-operation.d.ts +1 -1
  23. package/compat/database/list/state-changes.d.ts +1 -1
  24. package/compat/database/object/create-reference.d.ts +1 -1
  25. package/compat/database/observable/fromRef.d.ts +1 -1
  26. package/compat/database/utils.d.ts +1 -1
  27. package/compat/firebase.app.module.d.ts +1 -1
  28. package/compat/firestore/collection/collection.d.ts +2 -2
  29. package/compat/firestore/collection-group/collection-group.d.ts +2 -2
  30. package/compat/firestore/document/document.d.ts +4 -4
  31. package/compat/firestore/firestore.d.ts +7 -7
  32. package/compat/firestore/interfaces.d.ts +2 -2
  33. package/compat/functions/functions.d.ts +3 -3
  34. package/compat/messaging/messaging.d.ts +2 -2
  35. package/compat/performance/performance.d.ts +2 -2
  36. package/compat/remote-config/remote-config.d.ts +15 -49
  37. package/compat/storage/observable/fromTask.d.ts +1 -2
  38. package/compat/storage/ref.d.ts +1 -1
  39. package/compat/storage/storage.d.ts +3 -3
  40. package/compat/storage/task.d.ts +1 -1
  41. package/core.d.ts +7 -0
  42. package/database/database.module.d.ts +2 -2
  43. package/docs/analytics.md +67 -0
  44. package/docs/app-check.md +53 -0
  45. package/docs/auth.md +165 -0
  46. package/docs/compat/analytics/getting-started.md +137 -0
  47. package/docs/compat/auth/getting-started.md +162 -0
  48. package/docs/compat/auth/router-guards.md +104 -0
  49. package/docs/compat/emulators/emulators.md +134 -0
  50. package/docs/compat/firestore/collections.md +326 -0
  51. package/docs/compat/firestore/documents.md +115 -0
  52. package/docs/compat/firestore/offline-data.md +39 -0
  53. package/docs/compat/firestore/querying-collections.md +204 -0
  54. package/docs/compat/functions/functions.md +166 -0
  55. package/docs/compat/messaging/messaging.md +232 -0
  56. package/docs/compat/performance/getting-started.md +132 -0
  57. package/docs/compat/remote-config/getting-started.md +134 -0
  58. package/docs/compat/rtdb/lists.md +257 -0
  59. package/docs/compat/rtdb/objects.md +182 -0
  60. package/docs/compat/rtdb/querying-lists.md +155 -0
  61. package/docs/compat/storage/storage.md +257 -0
  62. package/docs/compat.md +70 -0
  63. package/docs/database.md +175 -0
  64. package/docs/deploy/getting-started.md +204 -0
  65. package/docs/firebase.json +16 -0
  66. package/docs/firestore.md +148 -0
  67. package/docs/functions.md +52 -0
  68. package/docs/images/analytics-illo_1x.png +0 -0
  69. package/docs/images/auth-illo_1x.png +0 -0
  70. package/docs/images/cloud-messaging-illo_1x.png +0 -0
  71. package/docs/images/database-illo_1x.png +0 -0
  72. package/docs/images/firestore-illo_1x.png +0 -0
  73. package/docs/images/functions-illo_1x.png +0 -0
  74. package/docs/images/hosting-illo_1x.png +0 -0
  75. package/docs/images/performance-illo_1x.png +0 -0
  76. package/docs/images/reCAPTCHA-logo@1x.png +0 -0
  77. package/docs/images/remote-config-illo_1x.png +0 -0
  78. package/docs/images/storage-illo_1x.png +0 -0
  79. package/docs/install-and-setup.md +114 -0
  80. package/docs/install-angular-cli-windows10.md +82 -0
  81. package/docs/install-firebase-tools.md +78 -0
  82. package/docs/messaging.md +25 -0
  83. package/docs/performance.md +57 -0
  84. package/docs/remote-config.md +53 -0
  85. package/docs/storage.md +90 -0
  86. package/docs/universal/cloud-functions.md +96 -0
  87. package/docs/universal/getting-started.md +28 -0
  88. package/docs/universal/prerendering.md +72 -0
  89. package/docs/version-4-upgrade.md +119 -0
  90. package/docs/version-5-upgrade.md +82 -0
  91. package/docs/version-6-upgrade.md +16 -0
  92. package/docs/version-7-upgrade.md +298 -0
  93. package/esm2022/analytics/analytics.mjs +1 -1
  94. package/esm2022/analytics/analytics.module.mjs +10 -10
  95. package/esm2022/analytics/firebase.mjs +5 -2
  96. package/esm2022/analytics/screen-tracking.service.mjs +11 -10
  97. package/esm2022/analytics/user-tracking.service.mjs +5 -5
  98. package/esm2022/app/app.mjs +1 -1
  99. package/esm2022/app/app.module.mjs +9 -8
  100. package/esm2022/app-check/app-check.mjs +3 -9
  101. package/esm2022/app-check/app-check.module.mjs +12 -14
  102. package/esm2022/app-check/firebase.mjs +3 -2
  103. package/esm2022/app-check/public_api.mjs +3 -2
  104. package/esm2022/auth/auth.mjs +1 -1
  105. package/esm2022/auth/auth.module.mjs +11 -11
  106. package/esm2022/auth/firebase.mjs +4 -2
  107. package/esm2022/auth-guard/auth-guard.mjs +8 -6
  108. package/esm2022/auth-guard/auth-guard.module.mjs +7 -7
  109. package/esm2022/compat/analytics/analytics.mjs +12 -13
  110. package/esm2022/compat/analytics/analytics.module.mjs +14 -11
  111. package/esm2022/compat/analytics/screen-tracking.service.mjs +9 -9
  112. package/esm2022/compat/analytics/user-tracking.service.mjs +7 -7
  113. package/esm2022/compat/auth/auth.mjs +13 -13
  114. package/esm2022/compat/auth/auth.module.mjs +7 -7
  115. package/esm2022/compat/auth-guard/auth-guard.mjs +8 -6
  116. package/esm2022/compat/auth-guard/auth-guard.module.mjs +7 -7
  117. package/esm2022/compat/cache.mjs +2 -1
  118. package/esm2022/compat/database/database.mjs +10 -10
  119. package/esm2022/compat/database/database.module.mjs +7 -7
  120. package/esm2022/compat/database/interfaces.mjs +1 -1
  121. package/esm2022/compat/database/list/audit-trail.mjs +3 -3
  122. package/esm2022/compat/database/list/changes.mjs +5 -5
  123. package/esm2022/compat/database/list/create-reference.mjs +5 -5
  124. package/esm2022/compat/database/list/data-operation.mjs +1 -1
  125. package/esm2022/compat/database/list/snapshot-changes.mjs +1 -1
  126. package/esm2022/compat/database/list/state-changes.mjs +2 -2
  127. package/esm2022/compat/database/object/create-reference.mjs +2 -2
  128. package/esm2022/compat/database/object/snapshot-changes.mjs +1 -1
  129. package/esm2022/compat/database/observable/fromRef.mjs +3 -2
  130. package/esm2022/compat/database/utils.mjs +1 -1
  131. package/esm2022/compat/firebase.app.mjs +1 -1
  132. package/esm2022/compat/firebase.app.module.mjs +11 -9
  133. package/esm2022/compat/firestore/collection/changes.mjs +2 -2
  134. package/esm2022/compat/firestore/collection/collection.mjs +4 -4
  135. package/esm2022/compat/firestore/collection-group/collection-group.mjs +4 -4
  136. package/esm2022/compat/firestore/document/document.mjs +4 -4
  137. package/esm2022/compat/firestore/firestore.mjs +11 -11
  138. package/esm2022/compat/firestore/firestore.module.mjs +7 -7
  139. package/esm2022/compat/firestore/interfaces.mjs +1 -1
  140. package/esm2022/compat/firestore/observable/fromRef.mjs +2 -2
  141. package/esm2022/compat/functions/functions.mjs +8 -8
  142. package/esm2022/compat/functions/functions.module.mjs +7 -7
  143. package/esm2022/compat/messaging/messaging.mjs +13 -12
  144. package/esm2022/compat/messaging/messaging.module.mjs +7 -7
  145. package/esm2022/compat/performance/performance.mjs +14 -20
  146. package/esm2022/compat/performance/performance.module.mjs +8 -9
  147. package/esm2022/compat/performance/performance.service.mjs +5 -4
  148. package/esm2022/compat/proxy.mjs +6 -7
  149. package/esm2022/compat/remote-config/remote-config.mjs +10 -11
  150. package/esm2022/compat/remote-config/remote-config.module.mjs +7 -7
  151. package/esm2022/compat/storage/observable/fromTask.mjs +3 -1
  152. package/esm2022/compat/storage/pipes/storageUrl.pipe.mjs +9 -9
  153. package/esm2022/compat/storage/ref.mjs +3 -3
  154. package/esm2022/compat/storage/storage.mjs +8 -8
  155. package/esm2022/compat/storage/storage.module.mjs +7 -7
  156. package/esm2022/compat/storage/task.mjs +2 -2
  157. package/esm2022/core.mjs +7 -1
  158. package/esm2022/database/database.mjs +1 -1
  159. package/esm2022/database/database.module.mjs +11 -11
  160. package/esm2022/firestore/firebase.mjs +22 -2
  161. package/esm2022/firestore/firestore.mjs +1 -1
  162. package/esm2022/firestore/firestore.module.mjs +11 -11
  163. package/esm2022/firestore/lite/firebase.mjs +11 -2
  164. package/esm2022/firestore/lite/lite.mjs +1 -1
  165. package/esm2022/firestore/lite/lite.module.mjs +10 -11
  166. package/esm2022/firestore/lite/rxfire.mjs +4 -2
  167. package/esm2022/firestore/rxfire.mjs +4 -4
  168. package/esm2022/functions/functions.mjs +1 -1
  169. package/esm2022/functions/functions.module.mjs +11 -11
  170. package/esm2022/messaging/messaging.mjs +1 -1
  171. package/esm2022/messaging/messaging.module.mjs +9 -9
  172. package/esm2022/performance/performance.mjs +1 -1
  173. package/esm2022/performance/performance.module.mjs +12 -12
  174. package/esm2022/remote-config/is-remote-config-supported-factory.mjs +2 -2
  175. package/esm2022/remote-config/remote-config.mjs +1 -1
  176. package/esm2022/remote-config/remote-config.module.mjs +9 -9
  177. package/esm2022/storage/storage.mjs +1 -1
  178. package/esm2022/storage/storage.module.mjs +11 -11
  179. package/esm2022/zones.mjs +9 -11
  180. package/fesm2022/angular-fire-analytics.mjs +18 -14
  181. package/fesm2022/angular-fire-analytics.mjs.map +1 -1
  182. package/fesm2022/angular-fire-app-check.mjs +13 -19
  183. package/fesm2022/angular-fire-app-check.mjs.map +1 -1
  184. package/fesm2022/angular-fire-app.mjs +6 -5
  185. package/fesm2022/angular-fire-app.mjs.map +1 -1
  186. package/fesm2022/angular-fire-auth-guard.mjs +13 -11
  187. package/fesm2022/angular-fire-auth-guard.mjs.map +1 -1
  188. package/fesm2022/angular-fire-auth.mjs +10 -9
  189. package/fesm2022/angular-fire-auth.mjs.map +1 -1
  190. package/fesm2022/angular-fire-compat-analytics.mjs +29 -27
  191. package/fesm2022/angular-fire-compat-analytics.mjs.map +1 -1
  192. package/fesm2022/angular-fire-compat-auth-guard.mjs +12 -10
  193. package/fesm2022/angular-fire-compat-auth-guard.mjs.map +1 -1
  194. package/fesm2022/angular-fire-compat-auth.mjs +13 -13
  195. package/fesm2022/angular-fire-compat-auth.mjs.map +1 -1
  196. package/fesm2022/angular-fire-compat-database.mjs +129 -128
  197. package/fesm2022/angular-fire-compat-database.mjs.map +1 -1
  198. package/fesm2022/angular-fire-compat-firestore.mjs +96 -96
  199. package/fesm2022/angular-fire-compat-firestore.mjs.map +1 -1
  200. package/fesm2022/angular-fire-compat-functions.mjs +10 -10
  201. package/fesm2022/angular-fire-compat-functions.mjs.map +1 -1
  202. package/fesm2022/angular-fire-compat-messaging.mjs +13 -12
  203. package/fesm2022/angular-fire-compat-messaging.mjs.map +1 -1
  204. package/fesm2022/angular-fire-compat-performance.mjs +23 -29
  205. package/fesm2022/angular-fire-compat-performance.mjs.map +1 -1
  206. package/fesm2022/angular-fire-compat-remote-config.mjs +10 -11
  207. package/fesm2022/angular-fire-compat-remote-config.mjs.map +1 -1
  208. package/fesm2022/angular-fire-compat-storage.mjs +21 -19
  209. package/fesm2022/angular-fire-compat-storage.mjs.map +1 -1
  210. package/fesm2022/angular-fire-compat.mjs +15 -13
  211. package/fesm2022/angular-fire-compat.mjs.map +1 -1
  212. package/fesm2022/angular-fire-database.mjs +7 -8
  213. package/fesm2022/angular-fire-database.mjs.map +1 -1
  214. package/fesm2022/angular-fire-firestore-lite.mjs +21 -11
  215. package/fesm2022/angular-fire-firestore-lite.mjs.map +1 -1
  216. package/fesm2022/angular-fire-firestore.mjs +32 -13
  217. package/fesm2022/angular-fire-firestore.mjs.map +1 -1
  218. package/fesm2022/angular-fire-functions.mjs +8 -9
  219. package/fesm2022/angular-fire-functions.mjs.map +1 -1
  220. package/fesm2022/angular-fire-messaging.mjs +4 -4
  221. package/fesm2022/angular-fire-messaging.mjs.map +1 -1
  222. package/fesm2022/angular-fire-performance.mjs +7 -7
  223. package/fesm2022/angular-fire-performance.mjs.map +1 -1
  224. package/fesm2022/angular-fire-remote-config.mjs +4 -4
  225. package/fesm2022/angular-fire-remote-config.mjs.map +1 -1
  226. package/fesm2022/angular-fire-storage.mjs +6 -7
  227. package/fesm2022/angular-fire-storage.mjs.map +1 -1
  228. package/fesm2022/angular-fire.mjs +14 -10
  229. package/fesm2022/angular-fire.mjs.map +1 -1
  230. package/firestore/firebase.d.ts +21 -1
  231. package/firestore/firestore.module.d.ts +2 -2
  232. package/firestore/lite/firebase.d.ts +10 -1
  233. package/firestore/lite/lite.module.d.ts +2 -2
  234. package/firestore/lite/rxfire.d.ts +3 -1
  235. package/firestore/rxfire.d.ts +3 -3
  236. package/functions/functions.module.d.ts +2 -2
  237. package/messaging/messaging.module.d.ts +2 -2
  238. package/package.json +17 -17
  239. package/performance/performance.module.d.ts +2 -2
  240. package/remote-config/remote-config.module.d.ts +2 -2
  241. package/schematics/add/index.js +1 -1
  242. package/schematics/add/schema.json +16 -0
  243. package/schematics/builders.json +10 -0
  244. package/schematics/collection.json +15 -0
  245. package/schematics/common.js +1 -1
  246. package/schematics/deploy/actions.js +11 -11
  247. package/schematics/deploy/builder.js +2 -2
  248. package/schematics/deploy/schema.json +119 -0
  249. package/schematics/migration.json +15 -0
  250. package/schematics/setup/index.js +5 -6
  251. package/schematics/setup/prompts.js +5 -6
  252. package/schematics/setup/schema.json +16 -0
  253. package/schematics/update/index.js +1 -1
  254. package/schematics/update/v7/index.js +2 -2
  255. package/schematics/utils.js +4 -4
  256. package/storage/storage.module.d.ts +2 -2
  257. 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, { features: featuresToImport, sourcePath });
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 (yield projects).find(it => it.projectId === projectId);
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 (yield apps).find(it => (0, utils_1.shortAppId)(it) === appId);
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 (yield sites).find(it => (0, common_1.shortSiteName)(it) === siteName);
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, context) => {
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 path_1 = require("path");
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) {
@@ -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) && app.appId.split('/').pop();
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 || !envIdentifier.parent) {
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 && firebaseIdentifier.parent) {
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, options) {
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 { NgZone, InjectionToken, ModuleWithProviders, Injector } from '@angular/core';
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