@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
@@ -38,13 +38,20 @@ const ɵgetAllInstancesOf = (identifier, app) => {
38
38
  });
39
39
  return instances;
40
40
  };
41
+ class ɵAppCheckInstances {
42
+ constructor() {
43
+ return ɵgetAllInstancesOf(ɵAPP_CHECK_PROVIDER_NAME);
44
+ }
45
+ }
46
+ const ɵAPP_CHECK_PROVIDER_NAME = 'app-check';
41
47
 
48
+ /* eslint-disable @typescript-eslint/ban-ts-comment */
49
+ // eslint-disable-next-line @typescript-eslint/no-empty-function
42
50
  function noop() {
43
51
  }
44
52
  /**
45
53
  * Schedules tasks so that they are invoked inside the Zone that is passed in the constructor.
46
54
  */
47
- // tslint:disable-next-line:class-name
48
55
  class ɵZoneScheduler {
49
56
  zone;
50
57
  delegate;
@@ -94,7 +101,6 @@ class BlockUntilFirstOperator {
94
101
  }, 10);
95
102
  }
96
103
  }
97
- // tslint:disable-next-line:class-name
98
104
  class ɵAngularFireSchedulers {
99
105
  ngZone;
100
106
  outsideAngular;
@@ -107,10 +113,10 @@ class ɵAngularFireSchedulers {
107
113
  this.insideAngular = ngZone.run(() => new ɵZoneScheduler(Zone.current, asyncScheduler));
108
114
  globalThis.ɵAngularFireScheduler ||= this;
109
115
  }
110
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.3", ngImport: i0, type: ɵAngularFireSchedulers, deps: [{ token: i0.NgZone }], target: i0.ɵɵFactoryTarget.Injectable });
111
- static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.1.3", ngImport: i0, type: ɵAngularFireSchedulers, providedIn: 'root' });
116
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.10", ngImport: i0, type: ɵAngularFireSchedulers, deps: [{ token: i0.NgZone }], target: i0.ɵɵFactoryTarget.Injectable });
117
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.2.10", ngImport: i0, type: ɵAngularFireSchedulers, providedIn: 'root' });
112
118
  }
113
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.3", ngImport: i0, type: ɵAngularFireSchedulers, decorators: [{
119
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.10", ngImport: i0, type: ɵAngularFireSchedulers, decorators: [{
114
120
  type: Injectable,
115
121
  args: [{
116
122
  providedIn: 'root',
@@ -137,7 +143,6 @@ function observeInsideAngular(obs$) {
137
143
  return obs$.pipe(observeOn(getSchedulers().insideAngular));
138
144
  }
139
145
  function keepUnstableUntilFirst(obs$) {
140
- const scheduler = getSchedulers();
141
146
  return ɵkeepUnstableUntilFirstFactory(getSchedulers())(obs$);
142
147
  }
143
148
  /**
@@ -161,9 +166,9 @@ function ɵkeepUnstableUntilFirstFactory(schedulers) {
161
166
  }
162
167
  // @ts-ignore
163
168
  const zoneWrapFn = (it, macrotask) => {
169
+ // eslint-disable-next-line @typescript-eslint/no-this-alias
164
170
  const _this = this;
165
171
  // function() is needed for the arguments object
166
- // tslint:disable-next-line:only-arrow-functions
167
172
  return function () {
168
173
  const _arguments = arguments;
169
174
  if (macrotask) {
@@ -178,7 +183,6 @@ const zoneWrapFn = (it, macrotask) => {
178
183
  };
179
184
  const ɵzoneWrap = (it, blockUntilFirst) => {
180
185
  // function() is needed for the arguments object
181
- // tslint:disable-next-line:only-arrow-functions
182
186
  return function () {
183
187
  // @ts-ignore
184
188
  let macrotask;
@@ -209,12 +213,12 @@ const ɵzoneWrap = (it, blockUntilFirst) => {
209
213
  return ret.pipe(keepUnstableUntilFirst);
210
214
  }
211
215
  else if (ret instanceof Promise) {
216
+ // eslint-disable-next-line @typescript-eslint/no-misused-promises
212
217
  return run(() => new Promise((resolve, reject) => ret.then(it => run(() => resolve(it)), reason => run(() => reject(reason)))));
213
218
  }
214
219
  else if (typeof ret === 'function' && macrotask) {
215
220
  // Handle unsubscribe
216
221
  // function() is needed for the arguments object
217
- // tslint:disable-next-line:only-arrow-functions
218
222
  return function () {
219
223
  setTimeout(() => {
220
224
  if (macrotask && macrotask.state === 'scheduled') {
@@ -235,5 +239,5 @@ const ɵzoneWrap = (it, blockUntilFirst) => {
235
239
  * Generated bundle index. Do not edit.
236
240
  */
237
241
 
238
- export { VERSION, keepUnstableUntilFirst, observeInsideAngular, observeOutsideAngular, ɵAngularFireSchedulers, ɵZoneScheduler, ɵgetAllInstancesOf, ɵgetDefaultInstanceOf, ɵisSupportedError, ɵkeepUnstableUntilFirstFactory, ɵzoneWrap };
242
+ export { VERSION, keepUnstableUntilFirst, observeInsideAngular, observeOutsideAngular, ɵAPP_CHECK_PROVIDER_NAME, ɵAngularFireSchedulers, ɵAppCheckInstances, ɵZoneScheduler, ɵgetAllInstancesOf, ɵgetDefaultInstanceOf, ɵisSupportedError, ɵkeepUnstableUntilFirstFactory, ɵzoneWrap };
239
243
  //# sourceMappingURL=angular-fire.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"angular-fire.mjs","sources":["../../../src/core.ts","../../../src/zones.ts","../../../src/angular-fire.ts"],"sourcesContent":["import { Version } from '@angular/core';\nimport { FirebaseApp, getApps } from 'firebase/app';\nimport { ComponentContainer } from '@firebase/component';\n\nexport const VERSION = new Version('ANGULARFIRE2_VERSION');\n\nexport const ɵisSupportedError = (module: string) =>\n `The APP_INITIALIZER that is \"making\" isSupported() sync for the sake of convenient DI has not resolved in this\ncontext. Rather than injecting ${module} in the constructor, first ensure that ${module} is supported by calling\n\\`await isSupported()\\`, then retrieve the instance from the injector manually \\`injector.get(${module})\\`.`;\n\n// TODO is there a better way to get at the internal types?\ninterface FirebaseAppWithContainer extends FirebaseApp {\n container: ComponentContainer;\n}\n\nexport function ɵgetDefaultInstanceOf<T= unknown>(identifier: string, provided: T[]|undefined, defaultApp: FirebaseApp): T|undefined {\n if (provided) {\n // Was provide* only called once? If so grab that\n if (provided.length === 1) { return provided[0]; }\n const providedUsingDefaultApp = provided.filter((it: any) => it.app === defaultApp);\n // Was provide* only called once, using the default app? If so use that\n if (providedUsingDefaultApp.length === 1) { return providedUsingDefaultApp[0]; }\n }\n // Grab the default instance from the defaultApp\n const defaultAppWithContainer: FirebaseAppWithContainer = defaultApp as any;\n const provider = defaultAppWithContainer.container.getProvider(identifier as never);\n return provider.getImmediate({ optional: true });\n}\n\nexport const ɵgetAllInstancesOf = <T= unknown>(identifier: string, app?: FirebaseApp): Array<T> => {\n const apps = app ? [app] : getApps();\n const instances: Array<any> = [];\n apps.forEach((app: FirebaseAppWithContainer) => {\n const provider: any = app.container.getProvider(identifier as never);\n provider.instances.forEach((instance: any) => {\n if (!instances.includes(instance)) {\n instances.push(instance);\n }\n });\n });\n return instances;\n};\n","import { Injectable, NgZone } from '@angular/core';\nimport {\n asyncScheduler,\n Observable,\n Operator,\n queueScheduler,\n SchedulerAction,\n SchedulerLike,\n Subscriber,\n Subscription,\n TeardownLogic\n} from 'rxjs';\nimport { observeOn, subscribeOn, tap } from 'rxjs/operators';\n\nfunction noop() {\n}\n\n/**\n * Schedules tasks so that they are invoked inside the Zone that is passed in the constructor.\n */\n// tslint:disable-next-line:class-name\nexport class ɵZoneScheduler implements SchedulerLike {\n constructor(private zone: any, private delegate: any = queueScheduler) {\n }\n\n now() {\n return this.delegate.now();\n }\n\n schedule(work: (this: SchedulerAction<any>, state?: any) => void, delay?: number, state?: any): Subscription {\n const targetZone = this.zone;\n // Wrap the specified work function to make sure that if nested scheduling takes place the\n // work is executed in the correct zone\n const workInZone = function(this: SchedulerAction<any>, state: any) {\n targetZone.runGuarded(() => {\n work.apply(this, [state]);\n });\n };\n\n // Scheduling itself needs to be run in zone to ensure setInterval calls for async scheduling are done\n // inside the correct zone. This scheduler needs to schedule asynchronously always to ensure that\n // firebase emissions are never synchronous. Specifying a delay causes issues with the queueScheduler delegate.\n return this.delegate.schedule(workInZone, delay, state);\n }\n}\n\nclass BlockUntilFirstOperator<T> implements Operator<T, T> {\n // @ts-ignore\n private task: MacroTask | null = null;\n\n constructor(private zone: any) {\n }\n\n call(subscriber: Subscriber<T>, source: Observable<T>): TeardownLogic {\n const unscheduleTask = this.unscheduleTask.bind(this);\n // @ts-ignore\n this.task = this.zone.run(() => Zone.current.scheduleMacroTask('firebaseZoneBlock', noop, {}, noop, noop));\n\n return source.pipe(\n tap({ next: unscheduleTask, complete: unscheduleTask, error: unscheduleTask })\n ).subscribe(subscriber).add(unscheduleTask);\n }\n\n private unscheduleTask() {\n // maybe this is a race condition, invoke in a timeout\n // hold for 10ms while I try to figure out what is going on\n setTimeout(() => {\n if (this.task != null && this.task.state === 'scheduled') {\n this.task.invoke();\n this.task = null;\n }\n }, 10);\n }\n}\n\n@Injectable({\n providedIn: 'root',\n})\n// tslint:disable-next-line:class-name\nexport class ɵAngularFireSchedulers {\n public readonly outsideAngular: ɵZoneScheduler;\n public readonly insideAngular: ɵZoneScheduler;\n\n constructor(public ngZone: NgZone) {\n // @ts-ignore\n this.outsideAngular = ngZone.runOutsideAngular(() => new ɵZoneScheduler(Zone.current));\n // @ts-ignore\n this.insideAngular = ngZone.run(() => new ɵZoneScheduler(Zone.current, asyncScheduler));\n globalThis.ɵAngularFireScheduler ||= this;\n }\n}\n\nfunction getSchedulers() {\n const schedulers = globalThis.ɵAngularFireScheduler as ɵAngularFireSchedulers|undefined;\n if (!schedulers) {\n throw new Error(\n`Either AngularFireModule has not been provided in your AppModule (this can be done manually or implictly using\nprovideFirebaseApp) or you're calling an AngularFire method outside of an NgModule (which is not supported).`);\n }\n return schedulers;\n}\n\nfunction runOutsideAngular<T>(fn: (...args: any[]) => T): T {\n return getSchedulers().ngZone.runOutsideAngular(() => fn());\n}\n\nfunction run<T>(fn: (...args: any[]) => T): T {\n return getSchedulers().ngZone.run(() => fn());\n}\n\nexport function observeOutsideAngular<T>(obs$: Observable<T>): Observable<T> {\n return obs$.pipe(observeOn(getSchedulers().outsideAngular));\n}\n\nexport function observeInsideAngular<T>(obs$: Observable<T>): Observable<T> {\n return obs$.pipe(observeOn(getSchedulers().insideAngular));\n}\n\nexport function keepUnstableUntilFirst<T>(obs$: Observable<T>): Observable<T> {\n const scheduler = getSchedulers();\n return ɵkeepUnstableUntilFirstFactory(getSchedulers())(obs$);\n}\n\n/**\n * Operator to block the zone until the first value has been emitted or the observable\n * has completed/errored. This is used to make sure that universal waits until the first\n * value from firebase but doesn't block the zone forever since the firebase subscription\n * is still alive.\n */\nexport function ɵkeepUnstableUntilFirstFactory(schedulers: ɵAngularFireSchedulers) {\n return function keepUnstableUntilFirst<T>(obs$: Observable<T>): Observable<T> {\n obs$ = obs$.lift(\n new BlockUntilFirstOperator(schedulers.ngZone)\n );\n\n return obs$.pipe(\n // Run the subscribe body outside of Angular (e.g. calling Firebase SDK to add a listener to a change event)\n subscribeOn(schedulers.outsideAngular),\n // Run operators inside the angular zone (e.g. side effects via tap())\n observeOn(schedulers.insideAngular)\n // INVESTIGATE https://github.com/angular/angularfire/pull/2315\n // share()\n );\n };\n}\n\n// @ts-ignore\nconst zoneWrapFn = (it: (...args: any[]) => any, macrotask: MacroTask|undefined) => {\n const _this = this;\n // function() is needed for the arguments object\n // tslint:disable-next-line:only-arrow-functions\n return function() {\n const _arguments = arguments;\n if (macrotask) {\n setTimeout(() => {\n if (macrotask.state === 'scheduled') {\n macrotask.invoke();\n }\n }, 10);\n }\n return run(() => it.apply(_this, _arguments));\n };\n};\n\nexport const ɵzoneWrap = <T= unknown>(it: T, blockUntilFirst: boolean): T => {\n // function() is needed for the arguments object\n // tslint:disable-next-line:only-arrow-functions\n return function() {\n // @ts-ignore\n let macrotask: MacroTask | undefined;\n const _arguments = arguments;\n // if this is a callback function, e.g, onSnapshot, we should create a microtask and invoke it\n // only once one of the callback functions is tripped.\n for (let i = 0; i < arguments.length; i++) {\n if (typeof _arguments[i] === 'function') {\n if (blockUntilFirst) {\n // @ts-ignore\n macrotask ||= run(() => Zone.current.scheduleMacroTask('firebaseZoneBlock', noop, {}, noop, noop));\n }\n // TODO create a microtask to track callback functions\n _arguments[i] = zoneWrapFn(_arguments[i], macrotask);\n }\n }\n const ret = runOutsideAngular(() => (it as any).apply(this, _arguments));\n if (!blockUntilFirst) {\n if (ret instanceof Observable) {\n const schedulers = getSchedulers();\n return ret.pipe( \n subscribeOn(schedulers.outsideAngular),\n observeOn(schedulers.insideAngular),\n );\n } else {\n return run(() => ret);\n }\n }\n if (ret instanceof Observable) {\n return ret.pipe(keepUnstableUntilFirst) as any;\n } else if (ret instanceof Promise) {\n return run(() => new Promise((resolve, reject) => ret.then(it => run(() => resolve(it)), reason => run(() => reject(reason)))));\n } else if (typeof ret === 'function' && macrotask) {\n // Handle unsubscribe\n // function() is needed for the arguments object\n // tslint:disable-next-line:only-arrow-functions\n return function() {\n setTimeout(() => {\n if (macrotask && macrotask.state === 'scheduled') {\n macrotask.invoke();\n }\n }, 10);\n return ret.apply(this, arguments);\n };\n } else {\n // TODO how do we handle storage uploads in Zone? and other stuff with cancel() etc?\n return run(() => ret);\n }\n } as any;\n};\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":["this"],"mappings":";;;;;;MAIa,OAAO,GAAG,IAAI,OAAO,CAAC,sBAAsB,EAAE;MAE9C,iBAAiB,GAAG,CAAC,MAAc,KAC9C,CAAA;AAC+B,+BAAA,EAAA,MAAM,0CAA0C,MAAM,CAAA;AACS,8FAAA,EAAA,MAAM,OAAO;SAO7F,qBAAqB,CAAa,UAAkB,EAAE,QAAuB,EAAE,UAAuB,EAAA;AACpH,IAAA,IAAI,QAAQ,EAAE;;AAEZ,QAAA,IAAI,QAAQ,CAAC,MAAM,KAAK,CAAC,EAAE;AAAE,YAAA,OAAO,QAAQ,CAAC,CAAC,CAAC,CAAC;AAAE,SAAA;AAClD,QAAA,MAAM,uBAAuB,GAAG,QAAQ,CAAC,MAAM,CAAC,CAAC,EAAO,KAAK,EAAE,CAAC,GAAG,KAAK,UAAU,CAAC,CAAC;;AAEpF,QAAA,IAAI,uBAAuB,CAAC,MAAM,KAAK,CAAC,EAAE;AAAE,YAAA,OAAO,uBAAuB,CAAC,CAAC,CAAC,CAAC;AAAE,SAAA;AACjF,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,KAAQ,CAAC;AACX;;ACxNA;;AAEG;;;;"}
1
+ {"version":3,"file":"angular-fire.mjs","sources":["../../../src/core.ts","../../../src/zones.ts","../../../src/angular-fire.ts"],"sourcesContent":["import { Version } from '@angular/core';\nimport { ComponentContainer } from '@firebase/component';\nimport { FirebaseApp, getApps } from 'firebase/app';\nimport type { AppCheck } from 'firebase/app-check';\n\nexport const VERSION = new Version('ANGULARFIRE2_VERSION');\n\nexport const ɵisSupportedError = (module: string) =>\n `The APP_INITIALIZER that is \"making\" isSupported() sync for the sake of convenient DI has not resolved in this\ncontext. Rather than injecting ${module} in the constructor, first ensure that ${module} is supported by calling\n\\`await isSupported()\\`, then retrieve the instance from the injector manually \\`injector.get(${module})\\`.`;\n\n// TODO is there a better way to get at the internal types?\ninterface FirebaseAppWithContainer extends FirebaseApp {\n container: ComponentContainer;\n}\n\nexport function ɵgetDefaultInstanceOf<T= unknown>(identifier: string, provided: T[]|undefined, defaultApp: FirebaseApp): T|undefined {\n if (provided) {\n // Was provide* only called once? If so grab that\n if (provided.length === 1) { return provided[0]; }\n const providedUsingDefaultApp = provided.filter((it: any) => it.app === defaultApp);\n // Was provide* only called once, using the default app? If so use that\n if (providedUsingDefaultApp.length === 1) { return providedUsingDefaultApp[0]; }\n }\n // Grab the default instance from the defaultApp\n const defaultAppWithContainer: FirebaseAppWithContainer = defaultApp as any;\n const provider = defaultAppWithContainer.container.getProvider(identifier as never);\n return provider.getImmediate({ optional: true });\n}\n\nexport const ɵgetAllInstancesOf = <T= unknown>(identifier: string, app?: FirebaseApp): T[] => {\n const apps = app ? [app] : getApps();\n const instances: any[] = [];\n apps.forEach((app: FirebaseAppWithContainer) => {\n const provider: any = app.container.getProvider(identifier as never);\n provider.instances.forEach((instance: any) => {\n if (!instances.includes(instance)) {\n instances.push(instance);\n }\n });\n });\n return instances;\n};\n\n// eslint-disable-next-line @typescript-eslint/no-empty-interface\nexport interface ɵAppCheckInstances extends Array<AppCheck> {}\n\nexport class ɵAppCheckInstances {\n constructor() {\n return ɵgetAllInstancesOf<AppCheck>(ɵAPP_CHECK_PROVIDER_NAME);\n }\n}\n\nexport const ɵAPP_CHECK_PROVIDER_NAME = 'app-check';\n","/* eslint-disable @typescript-eslint/ban-ts-comment */\nimport { Injectable, NgZone } from '@angular/core';\nimport {\n Observable,\n Operator,\n SchedulerAction,\n SchedulerLike,\n Subscriber,\n Subscription,\n TeardownLogic,\n asyncScheduler,\n queueScheduler\n} from 'rxjs';\nimport { observeOn, subscribeOn, tap } from 'rxjs/operators';\n\n// eslint-disable-next-line @typescript-eslint/no-empty-function\nfunction noop() {\n}\n\n/**\n * Schedules tasks so that they are invoked inside the Zone that is passed in the constructor.\n */\nexport class ɵZoneScheduler implements SchedulerLike {\n constructor(private zone: any, private delegate: any = queueScheduler) {\n }\n\n now() {\n return this.delegate.now();\n }\n\n schedule(work: (this: SchedulerAction<any>, state?: any) => void, delay?: number, state?: any): Subscription {\n const targetZone = this.zone;\n // Wrap the specified work function to make sure that if nested scheduling takes place the\n // work is executed in the correct zone\n const workInZone = function(this: SchedulerAction<any>, state: any) {\n targetZone.runGuarded(() => {\n work.apply(this, [state]);\n });\n };\n\n // Scheduling itself needs to be run in zone to ensure setInterval calls for async scheduling are done\n // inside the correct zone. This scheduler needs to schedule asynchronously always to ensure that\n // firebase emissions are never synchronous. Specifying a delay causes issues with the queueScheduler delegate.\n return this.delegate.schedule(workInZone, delay, state);\n }\n}\n\nclass BlockUntilFirstOperator<T> implements Operator<T, T> {\n // @ts-ignore\n private task: MacroTask | null = null;\n\n constructor(private zone: any) {\n }\n\n call(subscriber: Subscriber<T>, source: Observable<T>): TeardownLogic {\n const unscheduleTask = this.unscheduleTask.bind(this);\n // @ts-ignore\n this.task = this.zone.run(() => Zone.current.scheduleMacroTask('firebaseZoneBlock', noop, {}, noop, noop));\n\n return source.pipe(\n tap({ next: unscheduleTask, complete: unscheduleTask, error: unscheduleTask })\n ).subscribe(subscriber).add(unscheduleTask);\n }\n\n private unscheduleTask() {\n // maybe this is a race condition, invoke in a timeout\n // hold for 10ms while I try to figure out what is going on\n setTimeout(() => {\n if (this.task != null && this.task.state === 'scheduled') {\n this.task.invoke();\n this.task = null;\n }\n }, 10);\n }\n}\n\n@Injectable({\n providedIn: 'root',\n})\nexport class ɵAngularFireSchedulers {\n public readonly outsideAngular: ɵZoneScheduler;\n public readonly insideAngular: ɵZoneScheduler;\n\n constructor(public ngZone: NgZone) {\n // @ts-ignore\n this.outsideAngular = ngZone.runOutsideAngular(() => new ɵZoneScheduler(Zone.current));\n // @ts-ignore\n this.insideAngular = ngZone.run(() => new ɵZoneScheduler(Zone.current, asyncScheduler));\n globalThis.ɵAngularFireScheduler ||= this;\n }\n}\n\nfunction getSchedulers() {\n const schedulers = globalThis.ɵAngularFireScheduler as ɵAngularFireSchedulers|undefined;\n if (!schedulers) {\n throw new Error(\n`Either AngularFireModule has not been provided in your AppModule (this can be done manually or implictly using\nprovideFirebaseApp) or you're calling an AngularFire method outside of an NgModule (which is not supported).`);\n }\n return schedulers;\n}\n\nfunction runOutsideAngular<T>(fn: (...args: any[]) => T): T {\n return getSchedulers().ngZone.runOutsideAngular(() => fn());\n}\n\nfunction run<T>(fn: (...args: any[]) => T): T {\n return getSchedulers().ngZone.run(() => fn());\n}\n\nexport function observeOutsideAngular<T>(obs$: Observable<T>): Observable<T> {\n return obs$.pipe(observeOn(getSchedulers().outsideAngular));\n}\n\nexport function observeInsideAngular<T>(obs$: Observable<T>): Observable<T> {\n return obs$.pipe(observeOn(getSchedulers().insideAngular));\n}\n\nexport function keepUnstableUntilFirst<T>(obs$: Observable<T>): Observable<T> {\n return ɵkeepUnstableUntilFirstFactory(getSchedulers())(obs$);\n}\n\n/**\n * Operator to block the zone until the first value has been emitted or the observable\n * has completed/errored. This is used to make sure that universal waits until the first\n * value from firebase but doesn't block the zone forever since the firebase subscription\n * is still alive.\n */\nexport function ɵkeepUnstableUntilFirstFactory(schedulers: ɵAngularFireSchedulers) {\n return function keepUnstableUntilFirst<T>(obs$: Observable<T>): Observable<T> {\n obs$ = obs$.lift(\n new BlockUntilFirstOperator(schedulers.ngZone)\n );\n\n return obs$.pipe(\n // Run the subscribe body outside of Angular (e.g. calling Firebase SDK to add a listener to a change event)\n subscribeOn(schedulers.outsideAngular),\n // Run operators inside the angular zone (e.g. side effects via tap())\n observeOn(schedulers.insideAngular)\n // INVESTIGATE https://github.com/angular/angularfire/pull/2315\n // share()\n );\n };\n}\n\n// @ts-ignore\nconst zoneWrapFn = (it: (...args: any[]) => any, macrotask: MacroTask|undefined) => {\n // eslint-disable-next-line @typescript-eslint/no-this-alias\n const _this = this;\n // function() is needed for the arguments object\n return function() {\n const _arguments = arguments;\n if (macrotask) {\n setTimeout(() => {\n if (macrotask.state === 'scheduled') {\n macrotask.invoke();\n }\n }, 10);\n }\n return run(() => it.apply(_this, _arguments));\n };\n};\n\nexport const ɵzoneWrap = <T= unknown>(it: T, blockUntilFirst: boolean): T => {\n // function() is needed for the arguments object\n return function() {\n // @ts-ignore\n let macrotask: MacroTask | undefined;\n const _arguments = arguments;\n // if this is a callback function, e.g, onSnapshot, we should create a microtask and invoke it\n // only once one of the callback functions is tripped.\n for (let i = 0; i < arguments.length; i++) {\n if (typeof _arguments[i] === 'function') {\n if (blockUntilFirst) {\n // @ts-ignore\n macrotask ||= run(() => Zone.current.scheduleMacroTask('firebaseZoneBlock', noop, {}, noop, noop));\n }\n // TODO create a microtask to track callback functions\n _arguments[i] = zoneWrapFn(_arguments[i], macrotask);\n }\n }\n const ret = runOutsideAngular(() => (it as any).apply(this, _arguments));\n if (!blockUntilFirst) {\n if (ret instanceof Observable) {\n const schedulers = getSchedulers();\n return ret.pipe(\n subscribeOn(schedulers.outsideAngular),\n observeOn(schedulers.insideAngular),\n );\n } else {\n return run(() => ret);\n }\n }\n if (ret instanceof Observable) {\n return ret.pipe(keepUnstableUntilFirst) as any;\n } else if (ret instanceof Promise) {\n // eslint-disable-next-line @typescript-eslint/no-misused-promises\n return run(() => new Promise((resolve, reject) => ret.then(it => run(() => resolve(it)), reason => run(() => reject(reason)))));\n } else if (typeof ret === 'function' && macrotask) {\n // Handle unsubscribe\n // function() is needed for the arguments object\n return function() {\n setTimeout(() => {\n if (macrotask && macrotask.state === 'scheduled') {\n macrotask.invoke();\n }\n }, 10);\n return ret.apply(this, arguments);\n };\n } else {\n // TODO how do we handle storage uploads in Zone? and other stuff with cancel() etc?\n return run(() => ret);\n }\n } as any;\n};\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":["this"],"mappings":";;;;;;MAKa,OAAO,GAAG,IAAI,OAAO,CAAC,sBAAsB,EAAE;MAE9C,iBAAiB,GAAG,CAAC,MAAc,KAC9C,CAAA;AAC+B,+BAAA,EAAA,MAAM,0CAA0C,MAAM,CAAA;AACS,8FAAA,EAAA,MAAM,OAAO;SAO7F,qBAAqB,CAAa,UAAkB,EAAE,QAAuB,EAAE,UAAuB,EAAA;AACpH,IAAA,IAAI,QAAQ,EAAE;;AAEZ,QAAA,IAAI,QAAQ,CAAC,MAAM,KAAK,CAAC,EAAE;AAAE,YAAA,OAAO,QAAQ,CAAC,CAAC,CAAC,CAAC;AAAE,SAAA;AAClD,QAAA,MAAM,uBAAuB,GAAG,QAAQ,CAAC,MAAM,CAAC,CAAC,EAAO,KAAK,EAAE,CAAC,GAAG,KAAK,UAAU,CAAC,CAAC;;AAEpF,QAAA,IAAI,uBAAuB,CAAC,MAAM,KAAK,CAAC,EAAE;AAAE,YAAA,OAAO,uBAAuB,CAAC,CAAC,CAAC,CAAC;AAAE,SAAA;AACjF,KAAA;;IAED,MAAM,uBAAuB,GAA6B,UAAiB,CAAC;IAC5E,MAAM,QAAQ,GAAG,uBAAuB,CAAC,SAAS,CAAC,WAAW,CAAC,UAAmB,CAAC,CAAC;IACpF,OAAO,QAAQ,CAAC,YAAY,CAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC,CAAC;AACnD,CAAC;MAEY,kBAAkB,GAAG,CAAa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ndexedDbPersistence as _clearIndexedDbPersistence, collection as _collection, collectionGroup as _collectionGroup, connectFirestoreEmulator as _connectFirestoreEmulator, deleteDoc as _deleteDoc, deleteField as _deleteField, disableNetwork as _disableNetwork, doc as _doc, documentId as _documentId, enableIndexedDbPersistence as _enableIndexedDbPersistence, enableMultiTabIndexedDbPersistence as _enableMultiTabIndexedDbPersistence, enableNetwork as _enableNetwork, endAt as _endAt, endBefore as _endBefore, getDoc as _getDoc, getDocFromCache as _getDocFromCache, getDocFromServer as _getDocFromServer, getDocs as _getDocs, getDocsFromCache as _getDocsFromCache, getDocsFromServer as _getDocsFromServer, getFirestore as _getFirestore, increment as _increment, initializeFirestore as _initializeFirestore, limit as _limit, limitToLast as _limitToLast, loadBundle as _loadBundle, namedQuery as _namedQuery, onSnapshot as _onSnapshot, onSnapshotsInSync as _onSnapshotsInSync, orderBy as _orderBy, query as _query, queryEqual as _queryEqual, refEqual as _refEqual, runTransaction as _runTransaction, serverTimestamp as _serverTimestamp, setDoc as _setDoc, setLogLevel as _setLogLevel, snapshotEqual as _snapshotEqual, startAfter as _startAfter, startAt as _startAt, terminate as _terminate, updateDoc as _updateDoc, waitForPendingWrites as _waitForPendingWrites, where as _where, writeBatch as _writeBatch } from 'firebase/firestore';
2
+ import { addDoc as _addDoc, aggregateFieldEqual as _aggregateFieldEqual, aggregateQuerySnapshotEqual as _aggregateQuerySnapshotEqual, and as _and, arrayRemove as _arrayRemove, arrayUnion as _arrayUnion, average as _average, clearIndexedDbPersistence as _clearIndexedDbPersistence, collection as _collection, collectionGroup as _collectionGroup, connectFirestoreEmulator as _connectFirestoreEmulator, count as _count, deleteAllPersistentCacheIndexes as _deleteAllPersistentCacheIndexes, deleteDoc as _deleteDoc, deleteField as _deleteField, disableNetwork as _disableNetwork, disablePersistentCacheIndexAutoCreation as _disablePersistentCacheIndexAutoCreation, doc as _doc, documentId as _documentId, enableIndexedDbPersistence as _enableIndexedDbPersistence, enableMultiTabIndexedDbPersistence as _enableMultiTabIndexedDbPersistence, enableNetwork as _enableNetwork, enablePersistentCacheIndexAutoCreation as _enablePersistentCacheIndexAutoCreation, endAt as _endAt, endBefore as _endBefore, getAggregateFromServer as _getAggregateFromServer, getCountFromServer as _getCountFromServer, getDoc as _getDoc, getDocFromCache as _getDocFromCache, getDocFromServer as _getDocFromServer, getDocs as _getDocs, getDocsFromCache as _getDocsFromCache, getDocsFromServer as _getDocsFromServer, getFirestore as _getFirestore, getPersistentCacheIndexManager as _getPersistentCacheIndexManager, increment as _increment, initializeFirestore as _initializeFirestore, limit as _limit, limitToLast as _limitToLast, loadBundle as _loadBundle, memoryEagerGarbageCollector as _memoryEagerGarbageCollector, memoryLocalCache as _memoryLocalCache, memoryLruGarbageCollector as _memoryLruGarbageCollector, namedQuery as _namedQuery, onSnapshot as _onSnapshot, onSnapshotsInSync as _onSnapshotsInSync, or as _or, orderBy as _orderBy, persistentLocalCache as _persistentLocalCache, persistentMultipleTabManager as _persistentMultipleTabManager, persistentSingleTabManager as _persistentSingleTabManager, query as _query, queryEqual as _queryEqual, refEqual as _refEqual, runTransaction as _runTransaction, serverTimestamp as _serverTimestamp, setDoc as _setDoc, setIndexConfiguration as _setIndexConfiguration, setLogLevel as _setLogLevel, snapshotEqual as _snapshotEqual, startAfter as _startAfter, startAt as _startAt, sum as _sum, terminate as _terminate, updateDoc as _updateDoc, waitForPendingWrites as _waitForPendingWrites, where as _where, writeBatch as _writeBatch } from 'firebase/firestore';
3
3
  export declare const addDoc: typeof _addDoc;
4
+ export declare const aggregateFieldEqual: typeof _aggregateFieldEqual;
5
+ export declare const aggregateQuerySnapshotEqual: typeof _aggregateQuerySnapshotEqual;
6
+ export declare const and: typeof _and;
4
7
  export declare const arrayRemove: typeof _arrayRemove;
5
8
  export declare const arrayUnion: typeof _arrayUnion;
9
+ export declare const average: typeof _average;
6
10
  export declare const clearIndexedDbPersistence: typeof _clearIndexedDbPersistence;
7
11
  export declare const collection: typeof _collection;
8
12
  export declare const collectionGroup: typeof _collectionGroup;
9
13
  export declare const connectFirestoreEmulator: typeof _connectFirestoreEmulator;
14
+ export declare const count: typeof _count;
15
+ export declare const deleteAllPersistentCacheIndexes: typeof _deleteAllPersistentCacheIndexes;
10
16
  export declare const deleteDoc: typeof _deleteDoc;
11
17
  export declare const deleteField: typeof _deleteField;
12
18
  export declare const disableNetwork: typeof _disableNetwork;
19
+ export declare const disablePersistentCacheIndexAutoCreation: typeof _disablePersistentCacheIndexAutoCreation;
13
20
  export declare const doc: typeof _doc;
14
21
  export declare const documentId: typeof _documentId;
15
22
  export declare const enableIndexedDbPersistence: typeof _enableIndexedDbPersistence;
16
23
  export declare const enableMultiTabIndexedDbPersistence: typeof _enableMultiTabIndexedDbPersistence;
17
24
  export declare const enableNetwork: typeof _enableNetwork;
25
+ export declare const enablePersistentCacheIndexAutoCreation: typeof _enablePersistentCacheIndexAutoCreation;
18
26
  export declare const endAt: typeof _endAt;
19
27
  export declare const endBefore: typeof _endBefore;
28
+ export declare const getAggregateFromServer: typeof _getAggregateFromServer;
29
+ export declare const getCountFromServer: typeof _getCountFromServer;
20
30
  export declare const getDoc: typeof _getDoc;
21
31
  export declare const getDocFromCache: typeof _getDocFromCache;
22
32
  export declare const getDocFromServer: typeof _getDocFromServer;
@@ -24,25 +34,35 @@ export declare const getDocs: typeof _getDocs;
24
34
  export declare const getDocsFromCache: typeof _getDocsFromCache;
25
35
  export declare const getDocsFromServer: typeof _getDocsFromServer;
26
36
  export declare const getFirestore: typeof _getFirestore;
37
+ export declare const getPersistentCacheIndexManager: typeof _getPersistentCacheIndexManager;
27
38
  export declare const increment: typeof _increment;
28
39
  export declare const initializeFirestore: typeof _initializeFirestore;
29
40
  export declare const limit: typeof _limit;
30
41
  export declare const limitToLast: typeof _limitToLast;
31
42
  export declare const loadBundle: typeof _loadBundle;
43
+ export declare const memoryEagerGarbageCollector: typeof _memoryEagerGarbageCollector;
44
+ export declare const memoryLocalCache: typeof _memoryLocalCache;
45
+ export declare const memoryLruGarbageCollector: typeof _memoryLruGarbageCollector;
32
46
  export declare const namedQuery: typeof _namedQuery;
33
47
  export declare const onSnapshot: typeof _onSnapshot;
34
48
  export declare const onSnapshotsInSync: typeof _onSnapshotsInSync;
49
+ export declare const or: typeof _or;
35
50
  export declare const orderBy: typeof _orderBy;
51
+ export declare const persistentLocalCache: typeof _persistentLocalCache;
52
+ export declare const persistentMultipleTabManager: typeof _persistentMultipleTabManager;
53
+ export declare const persistentSingleTabManager: typeof _persistentSingleTabManager;
36
54
  export declare const query: typeof _query;
37
55
  export declare const queryEqual: typeof _queryEqual;
38
56
  export declare const refEqual: typeof _refEqual;
39
57
  export declare const runTransaction: typeof _runTransaction;
40
58
  export declare const serverTimestamp: typeof _serverTimestamp;
41
59
  export declare const setDoc: typeof _setDoc;
60
+ export declare const setIndexConfiguration: typeof _setIndexConfiguration;
42
61
  export declare const setLogLevel: typeof _setLogLevel;
43
62
  export declare const snapshotEqual: typeof _snapshotEqual;
44
63
  export declare const startAfter: typeof _startAfter;
45
64
  export declare const startAt: typeof _startAt;
65
+ export declare const sum: typeof _sum;
46
66
  export declare const terminate: typeof _terminate;
47
67
  export declare const updateDoc: typeof _updateDoc;
48
68
  export declare const waitForPendingWrites: typeof _waitForPendingWrites;
@@ -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 { Firestore as FirebaseFirestore } from 'firebase/firestore';
3
4
  import { Firestore } from './firestore';
4
- import { FirebaseApp } from '@angular/fire/app';
5
5
  import * as i0 from "@angular/core";
6
6
  export declare const PROVIDED_FIRESTORE_INSTANCES: InjectionToken<Firestore[]>;
7
7
  export declare function defaultFirestoreInstanceFactory(provided: FirebaseFirestore[] | undefined, defaultApp: FirebaseApp): Firestore;
@@ -1,17 +1,24 @@
1
1
  export * from 'firebase/firestore/lite';
2
- import { addDoc as _addDoc, arrayRemove as _arrayRemove, arrayUnion as _arrayUnion, collection as _collection, collectionGroup as _collectionGroup, connectFirestoreEmulator as _connectFirestoreEmulator, deleteDoc as _deleteDoc, deleteField as _deleteField, doc as _doc, documentId as _documentId, endAt as _endAt, endBefore as _endBefore, getDoc as _getDoc, getDocs as _getDocs, getFirestore as _getFirestore, increment as _increment, initializeFirestore as _initializeFirestore, limit as _limit, limitToLast as _limitToLast, orderBy as _orderBy, query as _query, queryEqual as _queryEqual, refEqual as _refEqual, runTransaction as _runTransaction, serverTimestamp as _serverTimestamp, setDoc as _setDoc, setLogLevel as _setLogLevel, snapshotEqual as _snapshotEqual, startAfter as _startAfter, startAt as _startAt, terminate as _terminate, updateDoc as _updateDoc, where as _where, writeBatch as _writeBatch } from 'firebase/firestore/lite';
2
+ import { addDoc as _addDoc, aggregateFieldEqual as _aggregateFieldEqual, aggregateQuerySnapshotEqual as _aggregateQuerySnapshotEqual, and as _and, arrayRemove as _arrayRemove, arrayUnion as _arrayUnion, average as _average, collection as _collection, collectionGroup as _collectionGroup, connectFirestoreEmulator as _connectFirestoreEmulator, count as _count, deleteDoc as _deleteDoc, deleteField as _deleteField, doc as _doc, documentId as _documentId, endAt as _endAt, endBefore as _endBefore, getAggregate as _getAggregate, getCount as _getCount, getDoc as _getDoc, getDocs as _getDocs, getFirestore as _getFirestore, increment as _increment, initializeFirestore as _initializeFirestore, limit as _limit, limitToLast as _limitToLast, or as _or, orderBy as _orderBy, query as _query, queryEqual as _queryEqual, refEqual as _refEqual, runTransaction as _runTransaction, serverTimestamp as _serverTimestamp, setDoc as _setDoc, setLogLevel as _setLogLevel, snapshotEqual as _snapshotEqual, startAfter as _startAfter, startAt as _startAt, sum as _sum, terminate as _terminate, updateDoc as _updateDoc, where as _where, writeBatch as _writeBatch } from 'firebase/firestore/lite';
3
3
  export declare const addDoc: typeof _addDoc;
4
+ export declare const aggregateFieldEqual: typeof _aggregateFieldEqual;
5
+ export declare const aggregateQuerySnapshotEqual: typeof _aggregateQuerySnapshotEqual;
6
+ export declare const and: typeof _and;
4
7
  export declare const arrayRemove: typeof _arrayRemove;
5
8
  export declare const arrayUnion: typeof _arrayUnion;
9
+ export declare const average: typeof _average;
6
10
  export declare const collection: typeof _collection;
7
11
  export declare const collectionGroup: typeof _collectionGroup;
8
12
  export declare const connectFirestoreEmulator: typeof _connectFirestoreEmulator;
13
+ export declare const count: typeof _count;
9
14
  export declare const deleteDoc: typeof _deleteDoc;
10
15
  export declare const deleteField: typeof _deleteField;
11
16
  export declare const doc: typeof _doc;
12
17
  export declare const documentId: typeof _documentId;
13
18
  export declare const endAt: typeof _endAt;
14
19
  export declare const endBefore: typeof _endBefore;
20
+ export declare const getAggregate: typeof _getAggregate;
21
+ export declare const getCount: typeof _getCount;
15
22
  export declare const getDoc: typeof _getDoc;
16
23
  export declare const getDocs: typeof _getDocs;
17
24
  export declare const getFirestore: typeof _getFirestore;
@@ -19,6 +26,7 @@ export declare const increment: typeof _increment;
19
26
  export declare const initializeFirestore: typeof _initializeFirestore;
20
27
  export declare const limit: typeof _limit;
21
28
  export declare const limitToLast: typeof _limitToLast;
29
+ export declare const or: typeof _or;
22
30
  export declare const orderBy: typeof _orderBy;
23
31
  export declare const query: typeof _query;
24
32
  export declare const queryEqual: typeof _queryEqual;
@@ -30,6 +38,7 @@ export declare const setLogLevel: typeof _setLogLevel;
30
38
  export declare const snapshotEqual: typeof _snapshotEqual;
31
39
  export declare const startAfter: typeof _startAfter;
32
40
  export declare const startAt: typeof _startAt;
41
+ export declare const sum: typeof _sum;
33
42
  export declare const terminate: typeof _terminate;
34
43
  export declare const updateDoc: typeof _updateDoc;
35
44
  export declare const where: typeof _where;
@@ -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 { Firestore as FirebaseFirestore } from 'firebase/firestore/lite';
3
4
  import { Firestore } from './lite';
4
- import { FirebaseApp } from '@angular/fire/app';
5
5
  import * as i0 from "@angular/core";
6
6
  export declare const PROVIDED_FIRESTORE_INSTANCES: InjectionToken<Firestore[]>;
7
7
  export declare function defaultFirestoreInstanceFactory(provided: FirebaseFirestore[] | undefined, defaultApp: FirebaseApp): Firestore;
@@ -1,6 +1,8 @@
1
- import { collection as _collection, collectionData as _collectionData, doc as _doc, docData as _docData, snapToData as _snapToData, fromRef as _fromRef } from 'rxfire/firestore/lite';
1
+ import { collection as _collection, collectionData as _collectionData, collectionCountSnap as _collectionCountSnap, collectionCount as _collectionCount, doc as _doc, docData as _docData, snapToData as _snapToData, fromRef as _fromRef } from 'rxfire/firestore/lite';
2
2
  export declare const collectionSnapshots: typeof _collection;
3
3
  export declare const collectionData: typeof _collectionData;
4
+ export declare const collectionCountSnap: typeof _collectionCountSnap;
5
+ export declare const collectionCount: typeof _collectionCount;
4
6
  export declare const docSnapshots: typeof _doc;
5
7
  export declare const docData: typeof _docData;
6
8
  export declare const snapToData: typeof _snapToData;
@@ -1,12 +1,12 @@
1
- import { collectionChanges as _collectionChanges, collection as _collection, sortedChanges as _sortedChanges, auditTrail as _auditTrail, collectionData as _collectionData, doc as _doc, docData as _docData, snapToData as _snapToData, fromRef as _fromRef, collectionCount as _collectionCount, collectionCountSnap as _collectionCountSnap } from 'rxfire/firestore';
1
+ import { collectionChanges as _collectionChanges, collection as _collection, sortedChanges as _sortedChanges, auditTrail as _auditTrail, collectionData as _collectionData, collectionCountSnap as _collectionCountSnap, collectionCount as _collectionCount, doc as _doc, docData as _docData, snapToData as _snapToData, fromRef as _fromRef } from 'rxfire/firestore';
2
2
  export declare const collectionChanges: typeof _collectionChanges;
3
3
  export declare const collectionSnapshots: typeof _collection;
4
4
  export declare const sortedChanges: typeof _sortedChanges;
5
5
  export declare const auditTrail: typeof _auditTrail;
6
6
  export declare const collectionData: typeof _collectionData;
7
+ export declare const collectionCountSnap: typeof _collectionCountSnap;
8
+ export declare const collectionCount: typeof _collectionCount;
7
9
  export declare const docSnapshots: typeof _doc;
8
10
  export declare const docData: typeof _docData;
9
11
  export declare const snapToData: typeof _snapToData;
10
12
  export declare const fromRef: typeof _fromRef;
11
- export declare const collectionCount: typeof _collectionCount;
12
- export declare const collectionCountSnap: typeof _collectionCountSnap;
@@ -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 { Functions as FirebaseFunctions } from 'firebase/functions';
3
4
  import { Functions } from './functions';
4
- import { FirebaseApp } from '@angular/fire/app';
5
5
  import * as i0 from "@angular/core";
6
6
  export declare const PROVIDED_FUNCTIONS_INSTANCES: InjectionToken<Functions[]>;
7
7
  export declare function defaultFunctionsInstanceFactory(provided: FirebaseFunctions[] | undefined, defaultApp: FirebaseApp): Functions;
@@ -1,7 +1,7 @@
1
- import { NgZone, ModuleWithProviders, Injector } from '@angular/core';
1
+ import { Injector, ModuleWithProviders, NgZone } from '@angular/core';
2
+ import { FirebaseApp } from '@angular/fire/app';
2
3
  import { Messaging as FirebaseMessaging } from 'firebase/messaging';
3
4
  import { Messaging } from './messaging';
4
- import { FirebaseApp } from '@angular/fire/app';
5
5
  import * as i0 from "@angular/core";
6
6
  export declare function defaultMessagingInstanceFactory(provided: FirebaseMessaging[] | undefined, defaultApp: FirebaseApp): Messaging;
7
7
  export declare function messagingInstanceFactory(fn: (injector: Injector) => FirebaseMessaging): (zone: NgZone, injector: Injector) => Messaging;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "$schema": "../node_modules/ng-packagr/package.schema.json",
3
3
  "name": "@angular/fire",
4
- "version": "16.0.0-canary.e04cd7f",
4
+ "version": "16.0.0-rc.0",
5
5
  "description": "The official Angular library for Firebase.",
6
6
  "schematics": "./schematics/collection.json",
7
7
  "builders": "./schematics/builders.json",
@@ -23,12 +23,12 @@
23
23
  "author": "angular,firebase",
24
24
  "license": "MIT",
25
25
  "peerDependencies": {
26
- "@angular/common": "^12.0.0 || ^13.0.0 || ^14.0.0 || ^15.0.0 || ^16.0.0",
27
- "@angular/core": "^12.0.0 || ^13.0.0 || ^14.0.0 || ^15.0.0 || ^16.0.0",
28
- "@angular/platform-browser": "^12.0.0 || ^13.0.0 || ^14.0.0 || ^15.0.0 || ^16.0.0",
29
- "@angular/platform-browser-dynamic": "^12.0.0 || ^13.0.0 || ^14.0.0 || ^15.0.0 || ^16.0.0",
30
- "rxjs": "~6.6.0 || ^7.0.0",
31
- "firebase-tools": "^9.9.0 || ^10.0.0 || ^11.0.0 || ^12.0.0"
26
+ "@angular/common": "^16.0.0",
27
+ "@angular/core": "^16.0.0",
28
+ "@angular/platform-browser": "^16.0.0",
29
+ "@angular/platform-browser-dynamic": "^16.0.0",
30
+ "rxjs": "^6.5.3 || ^7.4.0",
31
+ "firebase-tools": "^12.0.0"
32
32
  },
33
33
  "peerDependenciesMeta": {
34
34
  "firebase-tools": {
@@ -36,10 +36,10 @@
36
36
  }
37
37
  },
38
38
  "dependencies": {
39
- "firebase": "^9.8.0",
40
- "rxfire": "^6.0.0",
41
- "@angular-devkit/schematics": "^12.0.0 || ^13.0.0 || ^14.0.0 || ^15.0.0 || ^16.0.0",
42
- "@schematics/angular": "^12.0.0 || ^13.0.0 || ^14.0.0 || ^15.0.0 || ^16.0.0",
39
+ "firebase": "^10.5.0",
40
+ "rxfire": "^6.0.5",
41
+ "@angular-devkit/schematics": "^16.0.0",
42
+ "@schematics/angular": "^16.0.0",
43
43
  "tslib": "^2.0.0",
44
44
  "fuzzy": "^0.1.3",
45
45
  "inquirer-autocomplete-prompt": "^1.0.1",
@@ -152,18 +152,18 @@
152
152
  "esm": "./esm2022/compat/analytics/angular-fire-compat-analytics.mjs",
153
153
  "default": "./fesm2022/angular-fire-compat-analytics.mjs"
154
154
  },
155
- "./compat/auth-guard": {
156
- "types": "./compat/auth-guard/index.d.ts",
157
- "esm2022": "./esm2022/compat/auth-guard/angular-fire-compat-auth-guard.mjs",
158
- "esm": "./esm2022/compat/auth-guard/angular-fire-compat-auth-guard.mjs",
159
- "default": "./fesm2022/angular-fire-compat-auth-guard.mjs"
160
- },
161
155
  "./compat/auth": {
162
156
  "types": "./compat/auth/index.d.ts",
163
157
  "esm2022": "./esm2022/compat/auth/angular-fire-compat-auth.mjs",
164
158
  "esm": "./esm2022/compat/auth/angular-fire-compat-auth.mjs",
165
159
  "default": "./fesm2022/angular-fire-compat-auth.mjs"
166
160
  },
161
+ "./compat/auth-guard": {
162
+ "types": "./compat/auth-guard/index.d.ts",
163
+ "esm2022": "./esm2022/compat/auth-guard/angular-fire-compat-auth-guard.mjs",
164
+ "esm": "./esm2022/compat/auth-guard/angular-fire-compat-auth-guard.mjs",
165
+ "default": "./fesm2022/angular-fire-compat-auth-guard.mjs"
166
+ },
167
167
  "./compat/database": {
168
168
  "types": "./compat/database/index.d.ts",
169
169
  "esm2022": "./esm2022/compat/database/angular-fire-compat-database.mjs",
@@ -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 { FirebasePerformance } from 'firebase/performance';
3
4
  import { Performance } from './performance';
4
- import { FirebaseApp } from '@angular/fire/app';
5
5
  import * as i0 from "@angular/core";
6
6
  export declare const PROVIDED_PERFORMANCE_INSTANCES: InjectionToken<Performance[]>;
7
7
  export declare function defaultPerformanceInstanceFactory(provided: FirebasePerformance[] | undefined, defaultApp: FirebaseApp, platform: Object): Performance;
@@ -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 { RemoteConfig as FirebaseRemoteConfig } from 'firebase/remote-config';
3
4
  import { RemoteConfig } from './remote-config';
4
- import { FirebaseApp } from '@angular/fire/app';
5
5
  import * as i0 from "@angular/core";
6
6
  export declare const PROVIDED_REMOTE_CONFIG_INSTANCES: InjectionToken<RemoteConfig[]>;
7
7
  export declare function defaultRemoteConfigInstanceFactory(provided: FirebaseRemoteConfig[] | undefined, defaultApp: FirebaseApp): RemoteConfig;
@@ -1,9 +1,9 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.ngAdd = void 0;
4
+ const tasks_1 = require("@angular-devkit/schematics/tasks");
4
5
  const common_1 = require("../common");
5
6
  const versions_json_1 = require("../versions.json");
6
- const tasks_1 = require("@angular-devkit/schematics/tasks");
7
7
  const ngAdd = (options) => (tree, context) => {
8
8
  (0, common_1.addDependencies)(tree, versions_json_1.peerDependencies, context);
9
9
  const npmInstallTaskId = context.addTask(new tasks_1.NodePackageInstallTask());
@@ -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
+ }
@@ -0,0 +1,10 @@
1
+ {
2
+ "$schema": "../../node_modules/@angular-devkit/schematics/collection-schema.json",
3
+ "builders": {
4
+ "deploy": {
5
+ "implementation": "./deploy/builder",
6
+ "schema": "./deploy/schema.json",
7
+ "description": "Deploy builder"
8
+ }
9
+ }
10
+ }
@@ -0,0 +1,15 @@
1
+ {
2
+ "$schema": "../../node_modules/@angular-devkit/schematics/collection-schema.json",
3
+ "schematics": {
4
+ "ng-add": {
5
+ "description": "Add firebase deploy schematic",
6
+ "factory": "./add#ngAdd",
7
+ "schema": "./add/schema.json"
8
+ },
9
+ "ng-add-setup-project": {
10
+ "description": "Setup ng deploy",
11
+ "factory": "./setup#ngAddSetupProject",
12
+ "schema": "./setup/schema.json"
13
+ }
14
+ }
15
+ }
@@ -26,7 +26,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
26
26
  exports.addDependencies = exports.safeReadJSON = exports.generateFirebaseRc = exports.overwriteIfExists = exports.stringifyFormatted = exports.shortSiteName = void 0;
27
27
  const schematics_1 = require("@angular-devkit/schematics");
28
28
  const semver = __importStar(require("semver"));
29
- const shortSiteName = (site) => (site === null || site === void 0 ? void 0 : site.name) && site.name.split('/').pop();
29
+ const shortSiteName = (site) => { var _a; return (_a = site === null || site === void 0 ? void 0 : site.name) === null || _a === void 0 ? void 0 : _a.split('/').pop(); };
30
30
  exports.shortSiteName = shortSiteName;
31
31
  const stringifyFormatted = (obj) => JSON.stringify(obj, null, 2);
32
32
  exports.stringifyFormatted = stringifyFormatted;
@@ -36,19 +36,19 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
36
36
  };
37
37
  Object.defineProperty(exports, "__esModule", { value: true });
38
38
  exports.deployToCloudRun = exports.deployToFunction = void 0;
39
- const architect_1 = require("@angular-devkit/architect");
39
+ const child_process_1 = require("child_process");
40
40
  const fs_1 = require("fs");
41
- const fs_extra_1 = require("fs-extra");
42
41
  const path_1 = require("path");
43
- const child_process_1 = require("child_process");
44
- const functions_templates_1 = require("./functions-templates");
45
- const semver_1 = require("semver");
46
- const open_1 = __importDefault(require("open"));
42
+ const architect_1 = require("@angular-devkit/architect");
47
43
  const schematics_1 = require("@angular-devkit/schematics");
48
- const versions_json_1 = require("../versions.json");
49
- const winston = __importStar(require("winston"));
50
- const triple_beam_1 = __importDefault(require("triple-beam"));
44
+ const fs_extra_1 = require("fs-extra");
51
45
  const inquirer = __importStar(require("inquirer"));
46
+ const open_1 = __importDefault(require("open"));
47
+ const semver_1 = require("semver");
48
+ const triple_beam_1 = __importDefault(require("triple-beam"));
49
+ const winston = __importStar(require("winston"));
50
+ const versions_json_1 = require("../versions.json");
51
+ const functions_templates_1 = require("./functions-templates");
52
52
  const DEFAULT_EMULATOR_PORT = 5000;
53
53
  const DEFAULT_EMULATOR_HOST = 'localhost';
54
54
  const DEFAULT_CLOUD_RUN_OPTIONS = {
@@ -85,7 +85,7 @@ const spawnAsync = (command, options) => __awaiter(void 0, void 0, void 0, funct
85
85
  });
86
86
  });
87
87
  });
88
- const escapeRegExp = (str) => str.replace(/[\-\[\]\/{}()*+?.\\^$|]/g, '\\$&');
88
+ const escapeRegExp = (str) => str.replace(/[-[\]/{}()*+?.\\^$|]/g, '\\$&');
89
89
  const moveSync = (src, dest) => {
90
90
  (0, fs_extra_1.copySync)(src, dest);
91
91
  (0, fs_extra_1.removeSync)(src);
@@ -128,7 +128,7 @@ const defaultFsHost = {
128
128
  existsSync: fs_1.existsSync,
129
129
  };
130
130
  const findPackageVersion = (packageManager, name) => {
131
- const match = (0, child_process_1.execSync)(`${packageManager} list ${name}`).toString().match(`[^|\s]${escapeRegExp(name)}[@| ][^\s]+(\s.+)?$`);
131
+ const match = (0, child_process_1.execSync)(`${packageManager} list ${name}`).toString().match(`[^|s]${escapeRegExp(name)}[@| ][^s]+(s.+)?$`);
132
132
  return match ? match[0].split(new RegExp(`${escapeRegExp(name)}[@| ]`))[1].split(/\s/)[0] : null;
133
133
  };
134
134
  const getPackageJson = (context, workspaceRoot, options, main) => {
@@ -13,9 +13,9 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
13
13
  };
14
14
  Object.defineProperty(exports, "__esModule", { value: true });
15
15
  const architect_1 = require("@angular-devkit/architect");
16
- const actions_1 = __importDefault(require("./actions"));
17
- const utils_1 = require("../utils");
18
16
  const firebaseTools_1 = require("../firebaseTools");
17
+ const utils_1 = require("../utils");
18
+ const actions_1 = __importDefault(require("./actions"));
19
19
  exports.default = (0, architect_1.createBuilder)((options, context) => __awaiter(void 0, void 0, void 0, function* () {
20
20
  if (!context.target) {
21
21
  throw new Error('Cannot deploy the application without a target');