@angular/fire 16.0.0 → 17.0.0-canary.05e9da2

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 (143) hide show
  1. package/README.md +10 -14
  2. package/analytics/analytics.module.d.ts +2 -2
  3. package/analytics/package.json +3 -0
  4. package/app/app.module.d.ts +2 -2
  5. package/app/package.json +3 -0
  6. package/app-check/app-check.module.d.ts +2 -2
  7. package/app-check/package.json +3 -0
  8. package/auth/auth.module.d.ts +2 -2
  9. package/auth/firebase.d.ts +2 -1
  10. package/auth/package.json +3 -0
  11. package/auth-guard/package.json +3 -0
  12. package/compat/analytics/package.json +3 -0
  13. package/compat/auth/package.json +3 -0
  14. package/compat/auth-guard/package.json +3 -0
  15. package/compat/database/package.json +3 -0
  16. package/compat/firestore/package.json +3 -0
  17. package/compat/functions/package.json +3 -0
  18. package/compat/messaging/package.json +3 -0
  19. package/compat/package.json +3 -0
  20. package/compat/performance/package.json +3 -0
  21. package/compat/remote-config/package.json +3 -0
  22. package/compat/storage/package.json +3 -0
  23. package/database/database.module.d.ts +2 -2
  24. package/database/package.json +3 -0
  25. package/docs/compat/auth/getting-started.md +4 -4
  26. package/docs/compat/emulators/emulators.md +28 -2
  27. package/docs/compat/firestore/collections.md +1 -1
  28. package/docs/compat/firestore/querying-collections.md +2 -2
  29. package/docs/compat.md +1 -1
  30. package/docs/install-and-setup.md +1 -1
  31. package/docs/messaging.md +187 -9
  32. package/esm2022/analytics/analytics.module.mjs +30 -23
  33. package/esm2022/analytics/screen-tracking.service.mjs +6 -6
  34. package/esm2022/analytics/user-tracking.service.mjs +5 -5
  35. package/esm2022/app/app.module.mjs +28 -22
  36. package/esm2022/app-check/app-check.module.mjs +25 -23
  37. package/esm2022/auth/auth.module.mjs +25 -23
  38. package/esm2022/auth/firebase.mjs +3 -2
  39. package/esm2022/auth-guard/auth-guard.mjs +5 -5
  40. package/esm2022/auth-guard/auth-guard.module.mjs +6 -6
  41. package/esm2022/compat/analytics/analytics.mjs +6 -6
  42. package/esm2022/compat/analytics/analytics.module.mjs +7 -7
  43. package/esm2022/compat/analytics/screen-tracking.service.mjs +6 -6
  44. package/esm2022/compat/analytics/user-tracking.service.mjs +6 -6
  45. package/esm2022/compat/auth/auth.mjs +6 -6
  46. package/esm2022/compat/auth/auth.module.mjs +6 -6
  47. package/esm2022/compat/auth-guard/auth-guard.mjs +5 -5
  48. package/esm2022/compat/auth-guard/auth-guard.module.mjs +6 -6
  49. package/esm2022/compat/database/database.mjs +6 -6
  50. package/esm2022/compat/database/database.module.mjs +6 -6
  51. package/esm2022/compat/firebase.app.module.mjs +7 -7
  52. package/esm2022/compat/firestore/firestore.mjs +6 -6
  53. package/esm2022/compat/firestore/firestore.module.mjs +6 -6
  54. package/esm2022/compat/functions/functions.mjs +6 -6
  55. package/esm2022/compat/functions/functions.module.mjs +6 -6
  56. package/esm2022/compat/messaging/messaging.mjs +6 -6
  57. package/esm2022/compat/messaging/messaging.module.mjs +6 -6
  58. package/esm2022/compat/performance/performance.mjs +6 -6
  59. package/esm2022/compat/performance/performance.module.mjs +7 -7
  60. package/esm2022/compat/performance/performance.service.mjs +5 -5
  61. package/esm2022/compat/remote-config/remote-config.mjs +6 -6
  62. package/esm2022/compat/remote-config/remote-config.module.mjs +6 -6
  63. package/esm2022/compat/storage/pipes/storageUrl.pipe.mjs +10 -10
  64. package/esm2022/compat/storage/storage.mjs +6 -6
  65. package/esm2022/compat/storage/storage.module.mjs +6 -6
  66. package/esm2022/database/database.module.mjs +27 -25
  67. package/esm2022/firestore/firestore.module.mjs +27 -25
  68. package/esm2022/firestore/lite/lite.module.mjs +27 -25
  69. package/esm2022/functions/functions.module.mjs +27 -25
  70. package/esm2022/messaging/messaging.module.mjs +29 -22
  71. package/esm2022/performance/performance.module.mjs +25 -23
  72. package/esm2022/remote-config/remote-config.module.mjs +29 -22
  73. package/esm2022/storage/storage.module.mjs +27 -25
  74. package/esm2022/zones.mjs +5 -5
  75. package/fesm2022/angular-fire-analytics.mjs +40 -33
  76. package/fesm2022/angular-fire-analytics.mjs.map +1 -1
  77. package/fesm2022/angular-fire-app-check.mjs +26 -24
  78. package/fesm2022/angular-fire-app-check.mjs.map +1 -1
  79. package/fesm2022/angular-fire-app.mjs +28 -22
  80. package/fesm2022/angular-fire-app.mjs.map +1 -1
  81. package/fesm2022/angular-fire-auth-guard.mjs +9 -9
  82. package/fesm2022/angular-fire-auth-guard.mjs.map +1 -1
  83. package/fesm2022/angular-fire-auth.mjs +28 -25
  84. package/fesm2022/angular-fire-auth.mjs.map +1 -1
  85. package/fesm2022/angular-fire-compat-analytics.mjs +22 -22
  86. package/fesm2022/angular-fire-compat-analytics.mjs.map +1 -1
  87. package/fesm2022/angular-fire-compat-auth-guard.mjs +9 -9
  88. package/fesm2022/angular-fire-compat-auth-guard.mjs.map +1 -1
  89. package/fesm2022/angular-fire-compat-auth.mjs +10 -10
  90. package/fesm2022/angular-fire-compat-auth.mjs.map +1 -1
  91. package/fesm2022/angular-fire-compat-database.mjs +10 -10
  92. package/fesm2022/angular-fire-compat-database.mjs.map +1 -1
  93. package/fesm2022/angular-fire-compat-firestore.mjs +10 -10
  94. package/fesm2022/angular-fire-compat-firestore.mjs.map +1 -1
  95. package/fesm2022/angular-fire-compat-functions.mjs +10 -10
  96. package/fesm2022/angular-fire-compat-functions.mjs.map +1 -1
  97. package/fesm2022/angular-fire-compat-messaging.mjs +11 -11
  98. package/fesm2022/angular-fire-compat-messaging.mjs.map +1 -1
  99. package/fesm2022/angular-fire-compat-performance.mjs +16 -16
  100. package/fesm2022/angular-fire-compat-performance.mjs.map +1 -1
  101. package/fesm2022/angular-fire-compat-remote-config.mjs +11 -11
  102. package/fesm2022/angular-fire-compat-remote-config.mjs.map +1 -1
  103. package/fesm2022/angular-fire-compat-storage.mjs +19 -19
  104. package/fesm2022/angular-fire-compat-storage.mjs.map +1 -1
  105. package/fesm2022/angular-fire-compat.mjs +6 -6
  106. package/fesm2022/angular-fire-compat.mjs.map +1 -1
  107. package/fesm2022/angular-fire-database.mjs +27 -25
  108. package/fesm2022/angular-fire-database.mjs.map +1 -1
  109. package/fesm2022/angular-fire-firestore-lite.mjs +27 -25
  110. package/fesm2022/angular-fire-firestore-lite.mjs.map +1 -1
  111. package/fesm2022/angular-fire-firestore.mjs +27 -25
  112. package/fesm2022/angular-fire-firestore.mjs.map +1 -1
  113. package/fesm2022/angular-fire-functions.mjs +27 -25
  114. package/fesm2022/angular-fire-functions.mjs.map +1 -1
  115. package/fesm2022/angular-fire-messaging.mjs +29 -22
  116. package/fesm2022/angular-fire-messaging.mjs.map +1 -1
  117. package/fesm2022/angular-fire-performance.mjs +25 -23
  118. package/fesm2022/angular-fire-performance.mjs.map +1 -1
  119. package/fesm2022/angular-fire-remote-config.mjs +29 -22
  120. package/fesm2022/angular-fire-remote-config.mjs.map +1 -1
  121. package/fesm2022/angular-fire-storage.mjs +27 -25
  122. package/fesm2022/angular-fire-storage.mjs.map +1 -1
  123. package/fesm2022/angular-fire.mjs +4 -4
  124. package/fesm2022/angular-fire.mjs.map +1 -1
  125. package/firestore/firestore.module.d.ts +2 -2
  126. package/firestore/lite/lite.module.d.ts +2 -2
  127. package/firestore/lite/package.json +3 -0
  128. package/firestore/package.json +3 -0
  129. package/functions/functions.module.d.ts +2 -2
  130. package/functions/package.json +3 -0
  131. package/messaging/messaging.module.d.ts +2 -2
  132. package/messaging/package.json +3 -0
  133. package/package.json +11 -11
  134. package/performance/package.json +3 -0
  135. package/performance/performance.module.d.ts +2 -2
  136. package/remote-config/package.json +3 -0
  137. package/remote-config/remote-config.module.d.ts +2 -2
  138. package/schematics/firebaseTools.js +2 -2
  139. package/schematics/setup/index.js +22 -7
  140. package/schematics/setup/prompts.js +24 -19
  141. package/schematics/utils.js +13 -11
  142. package/storage/package.json +3 -0
  143. package/storage/storage.module.d.ts +2 -2
@@ -3,7 +3,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
3
3
  return (mod && mod.__esModule) ? mod : { "default": mod };
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.addIgnoreFiles = exports.featureToRules = exports.addFixesToServer = exports.addEnvironmentEntry = exports.getFirebaseProjectNameFromFs = exports.getFirebaseProjectNameFromHost = exports.getProject = exports.getWorkspace = exports.shortAppId = exports.hasPrerenderOption = exports.isUniversalApp = void 0;
6
+ exports.addIgnoreFiles = exports.featureToRules = exports.addFixesToServer = exports.addEnvironmentEntry = exports.getFirebaseProjectNameFromFs = exports.getFirebaseProjectNameFromHost = exports.getProject = exports.getWorkspace = exports.shortAppId = exports.hasPrerenderOption = exports.isSSRApp = exports.isUniversalApp = void 0;
7
7
  const fs_1 = require("fs");
8
8
  const path_1 = require("path");
9
9
  const schematics_1 = require("@angular-devkit/schematics");
@@ -14,6 +14,8 @@ const change_1 = require("@schematics/angular/utility/change");
14
14
  const common_1 = require("./common");
15
15
  const isUniversalApp = (project) => { var _a; return (_a = project.architect) === null || _a === void 0 ? void 0 : _a.server; };
16
16
  exports.isUniversalApp = isUniversalApp;
17
+ const isSSRApp = (project) => { var _a, _b; return !!((_b = (_a = project.architect) === null || _a === void 0 ? void 0 : _a.build.options) === null || _b === void 0 ? void 0 : _b.ssr); };
18
+ exports.isSSRApp = isSSRApp;
17
19
  const hasPrerenderOption = (project) => { var _a; return (_a = project.architect) === null || _a === void 0 ? void 0 : _a.prerender; };
18
20
  exports.hasPrerenderOption = hasPrerenderOption;
19
21
  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(); };
@@ -142,7 +144,7 @@ function featureToRules(features, projectName) {
142
144
  return features.map(feature => {
143
145
  switch (feature) {
144
146
  case 3:
145
- return (0, utility_1.addRootImport)(projectName, ({ code, external }) => {
147
+ return (0, utility_1.addRootProvider)(projectName, ({ code, external }) => {
146
148
  external('initializeAppCheck', '@angular/fire/app-check');
147
149
  external('ReCaptchaEnterpriseProvider', '@angular/fire/app-check');
148
150
  return code `${external('provideAppCheck', '@angular/fire/app-check')}(() => {
@@ -153,7 +155,7 @@ function featureToRules(features, projectName) {
153
155
  });
154
156
  case 2:
155
157
  return (0, schematics_1.chain)([
156
- (0, utility_1.addRootImport)(projectName, ({ code, external }) => {
158
+ (0, utility_1.addRootProvider)(projectName, ({ code, external }) => {
157
159
  external('getAnalytics', '@angular/fire/analytics');
158
160
  return code `${external('provideAnalytics', '@angular/fire/analytics')}(() => getAnalytics())`;
159
161
  }),
@@ -167,42 +169,42 @@ function featureToRules(features, projectName) {
167
169
  ] : []),
168
170
  ]);
169
171
  case 1:
170
- return (0, utility_1.addRootImport)(projectName, ({ code, external }) => {
172
+ return (0, utility_1.addRootProvider)(projectName, ({ code, external }) => {
171
173
  external('getAuth', '@angular/fire/auth');
172
174
  return code `${external('provideAuth', '@angular/fire/auth')}(() => getAuth())`;
173
175
  });
174
176
  case 4:
175
- return (0, utility_1.addRootImport)(projectName, ({ code, external }) => {
177
+ return (0, utility_1.addRootProvider)(projectName, ({ code, external }) => {
176
178
  external('getDatabase', '@angular/fire/database');
177
179
  return code `${external('provideDatabase', '@angular/fire/database')}(() => getDatabase())`;
178
180
  });
179
181
  case 8:
180
- return (0, utility_1.addRootImport)(projectName, ({ code, external }) => {
182
+ return (0, utility_1.addRootProvider)(projectName, ({ code, external }) => {
181
183
  external('getFirestore', '@angular/fire/firestore');
182
184
  return code `${external('provideFirestore', '@angular/fire/firestore')}(() => getFirestore())`;
183
185
  });
184
186
  case 5:
185
- return (0, utility_1.addRootImport)(projectName, ({ code, external }) => {
187
+ return (0, utility_1.addRootProvider)(projectName, ({ code, external }) => {
186
188
  external('getFunctions', '@angular/fire/functions');
187
189
  return code `${external('provideFunctions', '@angular/fire/functions')}(() => getFunctions())`;
188
190
  });
189
191
  case 6:
190
- return (0, utility_1.addRootImport)(projectName, ({ code, external }) => {
192
+ return (0, utility_1.addRootProvider)(projectName, ({ code, external }) => {
191
193
  external('getMessaging', '@angular/fire/messaging');
192
194
  return code `${external('provideMessaging', '@angular/fire/messaging')}(() => getMessaging())`;
193
195
  });
194
196
  case 7:
195
- return (0, utility_1.addRootImport)(projectName, ({ code, external }) => {
197
+ return (0, utility_1.addRootProvider)(projectName, ({ code, external }) => {
196
198
  external('getPerformance', '@angular/fire/performance');
197
199
  return code `${external('providePerformance', '@angular/fire/performance')}(() => getPerformance())`;
198
200
  });
199
201
  case 9:
200
- return (0, utility_1.addRootImport)(projectName, ({ code, external }) => {
202
+ return (0, utility_1.addRootProvider)(projectName, ({ code, external }) => {
201
203
  external('getStorage', '@angular/fire/storage');
202
204
  return code `${external('provideStorage', '@angular/fire/storage')}(() => getStorage())`;
203
205
  });
204
206
  case 10:
205
- return (0, utility_1.addRootImport)(projectName, ({ code, external }) => {
207
+ return (0, utility_1.addRootProvider)(projectName, ({ code, external }) => {
206
208
  external('getRemoteConfig', '@angular/fire/remote-config');
207
209
  return code `${external('provideRemoteConfig', '@angular/fire/remote-config')}(() => getRemoteConfig())`;
208
210
  });
@@ -0,0 +1,3 @@
1
+ {
2
+ "module": "../fesm2022/angular-fire-storage.mjs"
3
+ }
@@ -1,4 +1,4 @@
1
- import { InjectionToken, Injector, ModuleWithProviders, NgZone } from '@angular/core';
1
+ import { EnvironmentProviders, InjectionToken, Injector, NgZone } from '@angular/core';
2
2
  import { FirebaseApp } from '@angular/fire/app';
3
3
  import { FirebaseStorage } from 'firebase/storage';
4
4
  import { Storage } from './storage';
@@ -12,4 +12,4 @@ export declare class StorageModule {
12
12
  static ɵmod: i0.ɵɵNgModuleDeclaration<StorageModule, never, never, never>;
13
13
  static ɵinj: i0.ɵɵInjectorDeclaration<StorageModule>;
14
14
  }
15
- export declare function provideStorage(fn: (injector: Injector) => FirebaseStorage, ...deps: any[]): ModuleWithProviders<StorageModule>;
15
+ export declare function provideStorage(fn: (injector: Injector) => FirebaseStorage, ...deps: any[]): EnvironmentProviders;