@angular/fire 7.6.1 → 16.0.0-canary.1350920
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +11 -27
- package/analytics/analytics.module.d.ts +2 -2
- package/analytics/firebase.d.ts +4 -1
- package/analytics/is-analytics-supported-factory.d.ts +4 -0
- package/analytics/screen-tracking.service.d.ts +3 -3
- package/app-check/app-check.d.ts +0 -6
- package/app-check/app-check.module.d.ts +3 -4
- package/app-check/firebase.d.ts +2 -1
- package/app-check/public_api.d.ts +2 -1
- package/auth/auth.module.d.ts +2 -2
- package/auth/firebase.d.ts +3 -1
- package/auth-guard/auth-guard.d.ts +6 -6
- package/compat/analytics/analytics.d.ts +1 -3
- package/compat/analytics/analytics.module.d.ts +1 -1
- package/compat/analytics/screen-tracking.service.d.ts +1 -1
- package/compat/analytics/user-tracking.service.d.ts +1 -1
- package/compat/auth/auth.d.ts +4 -4
- package/compat/auth-guard/auth-guard.d.ts +8 -6
- package/compat/database/database.d.ts +4 -4
- package/compat/database/interfaces.d.ts +14 -14
- package/compat/database/list/audit-trail.d.ts +1 -1
- package/compat/database/list/create-reference.d.ts +1 -1
- package/compat/database/list/data-operation.d.ts +1 -1
- package/compat/database/list/state-changes.d.ts +1 -1
- package/compat/database/object/create-reference.d.ts +1 -1
- package/compat/database/observable/fromRef.d.ts +1 -1
- package/compat/database/utils.d.ts +1 -1
- package/compat/firebase.app.module.d.ts +1 -1
- package/compat/firestore/collection/collection.d.ts +2 -2
- package/compat/firestore/collection-group/collection-group.d.ts +2 -2
- package/compat/firestore/document/document.d.ts +4 -4
- package/compat/firestore/firestore.d.ts +7 -7
- package/compat/firestore/interfaces.d.ts +19 -19
- package/compat/functions/functions.d.ts +3 -3
- package/compat/messaging/messaging.d.ts +2 -2
- package/compat/performance/performance.d.ts +2 -2
- package/compat/proxy.d.ts +8 -8
- package/compat/remote-config/interfaces.d.ts +1 -1
- package/compat/remote-config/remote-config.d.ts +15 -49
- package/compat/storage/interfaces.d.ts +8 -8
- package/compat/storage/observable/fromTask.d.ts +1 -2
- package/compat/storage/pipes/storageUrl.pipe.d.ts +1 -1
- package/compat/storage/ref.d.ts +1 -1
- package/compat/storage/storage.d.ts +3 -3
- package/compat/storage/task.d.ts +1 -1
- package/core.d.ts +8 -12
- package/database/database.module.d.ts +2 -2
- package/docs/app-check.md +1 -1
- package/docs/auth.md +6 -6
- package/docs/database.md +1 -1
- package/docs/deploy/getting-started.md +2 -2
- package/docs/firestore.md +1 -1
- package/docs/install-and-setup.md +1 -1
- package/docs/install-firebase-tools.md +78 -0
- package/docs/universal/cloud-functions.md +27 -6
- package/docs/universal/getting-started.md +9 -134
- package/{esm2015/analytics/analytics.js → esm2022/analytics/analytics.mjs} +1 -1
- package/esm2022/analytics/analytics.module.mjs +94 -0
- package/esm2022/analytics/firebase.mjs +17 -0
- package/esm2022/analytics/is-analytics-supported-factory.mjs +16 -0
- package/esm2022/analytics/overrides.mjs +3 -0
- package/esm2022/analytics/screen-tracking.service.mjs +148 -0
- package/esm2022/analytics/user-tracking.service.mjs +44 -0
- package/{esm2015/app/app.js → esm2022/app/app.mjs} +1 -1
- package/esm2022/app/app.module.mjs +85 -0
- package/esm2022/app-check/app-check.mjs +10 -0
- package/esm2022/app-check/app-check.module.mjs +78 -0
- package/esm2022/app-check/firebase.mjs +10 -0
- package/esm2022/app-check/public_api.mjs +5 -0
- package/{esm2015/auth/auth.js → esm2022/auth/auth.mjs} +1 -1
- package/esm2022/auth/auth.module.mjs +71 -0
- package/esm2022/auth/firebase.mjs +58 -0
- package/esm2022/auth-guard/auth-guard.mjs +53 -0
- package/{esm2015/auth-guard/auth-guard.module.js → esm2022/auth-guard/auth-guard.module.mjs} +7 -7
- package/esm2022/compat/analytics/analytics.mjs +160 -0
- package/esm2022/compat/analytics/analytics.module.mjs +35 -0
- package/esm2022/compat/analytics/screen-tracking.service.mjs +49 -0
- package/esm2022/compat/analytics/user-tracking.service.mjs +53 -0
- package/esm2022/compat/auth/auth.mjs +161 -0
- package/{esm2015/compat/auth/auth.module.js → esm2022/compat/auth/auth.module.mjs} +7 -7
- package/{esm2015/compat/auth/public_api.js → esm2022/compat/auth/public_api.mjs} +1 -1
- package/esm2022/compat/auth-guard/auth-guard.mjs +53 -0
- package/{esm2015/compat/auth-guard/auth-guard.module.js → esm2022/compat/auth-guard/auth-guard.module.mjs} +7 -7
- package/{esm2015/compat/cache.js → esm2022/compat/cache.mjs} +4 -3
- package/esm2022/compat/database/database.mjs +119 -0
- package/{esm2015/compat/database/database.module.js → esm2022/compat/database/database.module.mjs} +7 -7
- package/esm2022/compat/database/interfaces.mjs +2 -0
- package/{esm2015/compat/database/list/audit-trail.js → esm2022/compat/database/list/audit-trail.mjs} +3 -3
- package/esm2022/compat/database/list/changes.mjs +85 -0
- package/esm2022/compat/database/list/create-reference.mjs +44 -0
- package/{esm2015/compat/database/list/data-operation.js → esm2022/compat/database/list/data-operation.mjs} +1 -1
- package/{esm2015/compat/database/list/snapshot-changes.js → esm2022/compat/database/list/snapshot-changes.mjs} +1 -1
- package/{esm2015/compat/database/list/state-changes.js → esm2022/compat/database/list/state-changes.mjs} +2 -2
- package/{esm2015/compat/database/object/create-reference.js → esm2022/compat/database/object/create-reference.mjs} +2 -2
- package/{esm2015/compat/database/object/snapshot-changes.js → esm2022/compat/database/object/snapshot-changes.mjs} +1 -1
- package/esm2022/compat/database/observable/fromRef.mjs +48 -0
- package/{esm2015/compat/database/utils.js → esm2022/compat/database/utils.mjs} +1 -1
- package/{esm2015/compat/firebase.app.js → esm2022/compat/firebase.app.mjs} +1 -1
- package/esm2022/compat/firebase.app.module.mjs +71 -0
- package/esm2022/compat/firestore/collection/changes.mjs +108 -0
- package/esm2022/compat/firestore/collection/collection.mjs +123 -0
- package/esm2022/compat/firestore/collection-group/collection-group.mjs +86 -0
- package/esm2022/compat/firestore/document/document.mjs +87 -0
- package/esm2022/compat/firestore/firestore.mjs +257 -0
- package/{esm2015/compat/firestore/firestore.module.js → esm2022/compat/firestore/firestore.module.mjs} +7 -7
- package/esm2022/compat/firestore/interfaces.mjs +2 -0
- package/esm2022/compat/firestore/observable/fromRef.mjs +40 -0
- package/esm2022/compat/functions/functions.mjs +69 -0
- package/{esm2015/compat/functions/functions.module.js → esm2022/compat/functions/functions.module.mjs} +7 -7
- package/{esm2015/compat/functions/public_api.js → esm2022/compat/functions/public_api.mjs} +1 -1
- package/esm2022/compat/messaging/messaging.mjs +81 -0
- package/{esm2015/compat/messaging/messaging.module.js → esm2022/compat/messaging/messaging.module.mjs} +7 -7
- package/esm2022/compat/performance/performance.mjs +105 -0
- package/esm2022/compat/performance/performance.module.mjs +27 -0
- package/esm2022/compat/performance/performance.service.mjs +28 -0
- package/esm2022/compat/proxy.mjs +58 -0
- package/esm2022/compat/remote-config/remote-config.mjs +206 -0
- package/{esm2015/compat/remote-config/remote-config.module.js → esm2022/compat/remote-config/remote-config.module.mjs} +7 -7
- package/esm2022/compat/storage/observable/fromTask.mjs +36 -0
- package/esm2022/compat/storage/pipes/storageUrl.pipe.mjs +58 -0
- package/{esm2015/compat/storage/ref.js → esm2022/compat/storage/ref.mjs} +3 -3
- package/esm2022/compat/storage/storage.mjs +95 -0
- package/esm2022/compat/storage/storage.module.mjs +22 -0
- package/{esm2015/compat/storage/task.js → esm2022/compat/storage/task.mjs} +2 -2
- package/esm2022/core.mjs +43 -0
- package/{esm2015/database/database.js → esm2022/database/database.mjs} +1 -1
- package/esm2022/database/database.module.mjs +74 -0
- package/esm2022/firestore/firebase.mjs +73 -0
- package/{esm2015/firestore/firestore.js → esm2022/firestore/firestore.mjs} +1 -1
- package/esm2022/firestore/firestore.module.mjs +74 -0
- package/esm2022/firestore/lite/firebase.mjs +48 -0
- package/{esm2015/firestore/lite/lite.js → esm2022/firestore/lite/lite.mjs} +1 -1
- package/esm2022/firestore/lite/lite.module.mjs +73 -0
- package/esm2022/firestore/lite/rxfire.mjs +12 -0
- package/esm2022/firestore/rxfire.mjs +15 -0
- package/{esm2015/functions/functions.js → esm2022/functions/functions.mjs} +1 -1
- package/esm2022/functions/functions.module.mjs +74 -0
- package/esm2022/messaging/is-messaging-supported-factory.mjs +16 -0
- package/{esm2015/messaging/messaging.js → esm2022/messaging/messaging.mjs} +1 -1
- package/esm2022/messaging/messaging.module.mjs +86 -0
- package/esm2022/messaging/overrides.mjs +3 -0
- package/{esm2015/performance/performance.js → esm2022/performance/performance.mjs} +1 -1
- package/esm2022/performance/performance.module.mjs +81 -0
- package/esm2022/remote-config/is-remote-config-supported-factory.mjs +16 -0
- package/esm2022/remote-config/overrides.mjs +3 -0
- package/{esm2015/remote-config/remote-config.js → esm2022/remote-config/remote-config.mjs} +1 -1
- package/esm2022/remote-config/remote-config.module.mjs +86 -0
- package/{esm2015/storage/storage.js → esm2022/storage/storage.mjs} +1 -1
- package/esm2022/storage/storage.module.mjs +74 -0
- package/esm2022/zones.mjs +194 -0
- package/{fesm2015/angular-fire-analytics.js → fesm2022/angular-fire-analytics.mjs} +68 -41
- package/fesm2022/angular-fire-analytics.mjs.map +1 -0
- package/{fesm2015/angular-fire-app-check.js → fesm2022/angular-fire-app-check.mjs} +18 -25
- package/fesm2022/angular-fire-app-check.mjs.map +1 -0
- package/{fesm2015/angular-fire-app.js → fesm2022/angular-fire-app.mjs} +10 -9
- package/fesm2022/angular-fire-app.mjs.map +1 -0
- package/{fesm2015/angular-fire-auth-guard.js → fesm2022/angular-fire-auth-guard.mjs} +31 -27
- package/fesm2022/angular-fire-auth-guard.mjs.map +1 -0
- package/{fesm2015/angular-fire-auth.js → fesm2022/angular-fire-auth.mjs} +14 -13
- package/fesm2022/angular-fire-auth.mjs.map +1 -0
- package/{fesm2015/angular-fire-compat-analytics.js → fesm2022/angular-fire-compat-analytics.mjs} +43 -41
- package/fesm2022/angular-fire-compat-analytics.mjs.map +1 -0
- package/{fesm2015/angular-fire-compat-auth-guard.js → fesm2022/angular-fire-compat-auth-guard.mjs} +30 -26
- package/fesm2022/angular-fire-compat-auth-guard.mjs.map +1 -0
- package/{fesm2015/angular-fire-compat-auth.js → fesm2022/angular-fire-compat-auth.mjs} +38 -16
- package/fesm2022/angular-fire-compat-auth.mjs.map +1 -0
- package/{fesm2015/angular-fire-compat-database.js → fesm2022/angular-fire-compat-database.mjs} +138 -132
- package/fesm2022/angular-fire-compat-database.mjs.map +1 -0
- package/{fesm2015/angular-fire-compat-firestore.js → fesm2022/angular-fire-compat-firestore.mjs} +119 -98
- package/fesm2022/angular-fire-compat-firestore.mjs.map +1 -0
- package/{fesm2015/angular-fire-compat-functions.js → fesm2022/angular-fire-compat-functions.mjs} +13 -12
- package/fesm2022/angular-fire-compat-functions.mjs.map +1 -0
- package/{fesm2015/angular-fire-compat-messaging.js → fesm2022/angular-fire-compat-messaging.mjs} +25 -19
- package/fesm2022/angular-fire-compat-messaging.mjs.map +1 -0
- package/{fesm2015/angular-fire-compat-performance.js → fesm2022/angular-fire-compat-performance.mjs} +29 -34
- package/fesm2022/angular-fire-compat-performance.mjs.map +1 -0
- package/{fesm2015/angular-fire-compat-remote-config.js → fesm2022/angular-fire-compat-remote-config.mjs} +35 -22
- package/fesm2022/angular-fire-compat-remote-config.mjs.map +1 -0
- package/{fesm2015/angular-fire-compat-storage.js → fesm2022/angular-fire-compat-storage.mjs} +30 -23
- package/fesm2022/angular-fire-compat-storage.mjs.map +1 -0
- package/{fesm2015/angular-fire-compat.js → fesm2022/angular-fire-compat.mjs} +25 -25
- package/fesm2022/angular-fire-compat.mjs.map +1 -0
- package/{fesm2015/angular-fire-database.js → fesm2022/angular-fire-database.mjs} +11 -12
- package/fesm2022/angular-fire-database.mjs.map +1 -0
- package/{fesm2015/angular-fire-firestore-lite.js → fesm2022/angular-fire-firestore-lite.mjs} +25 -15
- package/fesm2022/angular-fire-firestore-lite.mjs.map +1 -0
- package/fesm2022/angular-fire-firestore.mjs +180 -0
- package/fesm2022/angular-fire-firestore.mjs.map +1 -0
- package/{fesm2015/angular-fire-functions.js → fesm2022/angular-fire-functions.mjs} +12 -13
- package/fesm2022/angular-fire-functions.mjs.map +1 -0
- package/{fesm2015/angular-fire-messaging.js → fesm2022/angular-fire-messaging.mjs} +33 -19
- package/fesm2022/angular-fire-messaging.mjs.map +1 -0
- package/{fesm2015/angular-fire-performance.js → fesm2022/angular-fire-performance.mjs} +11 -11
- package/fesm2022/angular-fire-performance.mjs.map +1 -0
- package/{fesm2015/angular-fire-remote-config.js → fesm2022/angular-fire-remote-config.mjs} +34 -20
- package/fesm2022/angular-fire-remote-config.mjs.map +1 -0
- package/{fesm2015/angular-fire-storage.js → fesm2022/angular-fire-storage.mjs} +10 -11
- package/fesm2022/angular-fire-storage.mjs.map +1 -0
- package/{fesm2015/angular-fire.js → fesm2022/angular-fire.mjs} +33 -58
- package/fesm2022/angular-fire.mjs.map +1 -0
- package/firestore/firebase.d.ts +21 -1
- package/firestore/firestore.module.d.ts +2 -2
- package/firestore/lite/firebase.d.ts +10 -1
- package/firestore/lite/lite.module.d.ts +2 -2
- package/firestore/lite/rxfire.d.ts +3 -1
- package/firestore/rxfire.d.ts +3 -1
- package/functions/functions.module.d.ts +2 -2
- package/messaging/is-messaging-supported-factory.d.ts +4 -0
- package/messaging/messaging.module.d.ts +2 -2
- package/package.json +169 -18
- package/performance/performance.module.d.ts +2 -2
- package/remote-config/is-remote-config-supported-factory.d.ts +4 -0
- package/remote-config/remote-config.module.d.ts +2 -2
- package/schematics/add/index.js +2 -2
- package/schematics/common.js +9 -5
- package/schematics/deploy/actions.js +69 -69
- package/schematics/deploy/builder.js +7 -7
- package/schematics/firebaseTools.js +9 -5
- package/schematics/interfaces.js +9 -8
- package/schematics/setup/index.js +48 -64
- package/schematics/setup/prompts.js +22 -18
- package/schematics/update/index.js +1 -1
- package/schematics/update/v7/index.js +7 -7
- package/schematics/utils.js +87 -71
- package/storage/storage.module.d.ts +2 -2
- package/analytics/package.json +0 -11
- package/app/package.json +0 -11
- package/app-check/package.json +0 -11
- package/auth/package.json +0 -11
- package/auth-guard/package.json +0 -11
- package/bundles/angular-fire-analytics.umd.js +0 -673
- package/bundles/angular-fire-analytics.umd.js.map +0 -1
- package/bundles/angular-fire-app-check.umd.js +0 -465
- package/bundles/angular-fire-app-check.umd.js.map +0 -1
- package/bundles/angular-fire-app.umd.js +0 -477
- package/bundles/angular-fire-app.umd.js.map +0 -1
- package/bundles/angular-fire-auth-guard.umd.js +0 -109
- package/bundles/angular-fire-auth-guard.umd.js.map +0 -1
- package/bundles/angular-fire-auth.umd.js +0 -557
- package/bundles/angular-fire-auth.umd.js.map +0 -1
- package/bundles/angular-fire-compat-analytics.umd.js +0 -672
- package/bundles/angular-fire-compat-analytics.umd.js.map +0 -1
- package/bundles/angular-fire-compat-auth-guard.umd.js +0 -112
- package/bundles/angular-fire-compat-auth-guard.umd.js.map +0 -1
- package/bundles/angular-fire-compat-auth.umd.js +0 -559
- package/bundles/angular-fire-compat-auth.umd.js.map +0 -1
- package/bundles/angular-fire-compat-database.umd.js +0 -799
- package/bundles/angular-fire-compat-database.umd.js.map +0 -1
- package/bundles/angular-fire-compat-firestore.umd.js +0 -1073
- package/bundles/angular-fire-compat-firestore.umd.js.map +0 -1
- package/bundles/angular-fire-compat-functions.umd.js +0 -443
- package/bundles/angular-fire-compat-functions.umd.js.map +0 -1
- package/bundles/angular-fire-compat-messaging.umd.js +0 -465
- package/bundles/angular-fire-compat-messaging.umd.js.map +0 -1
- package/bundles/angular-fire-compat-performance.umd.js +0 -212
- package/bundles/angular-fire-compat-performance.umd.js.map +0 -1
- package/bundles/angular-fire-compat-remote-config.umd.js +0 -605
- package/bundles/angular-fire-compat-remote-config.umd.js.map +0 -1
- package/bundles/angular-fire-compat-storage.umd.js +0 -598
- package/bundles/angular-fire-compat-storage.umd.js.map +0 -1
- package/bundles/angular-fire-compat.umd.js +0 -535
- package/bundles/angular-fire-compat.umd.js.map +0 -1
- package/bundles/angular-fire-database.umd.js +0 -557
- package/bundles/angular-fire-database.umd.js.map +0 -1
- package/bundles/angular-fire-firestore-lite.umd.js +0 -531
- package/bundles/angular-fire-firestore-lite.umd.js.map +0 -1
- package/bundles/angular-fire-firestore.umd.js +0 -565
- package/bundles/angular-fire-firestore.umd.js.map +0 -1
- package/bundles/angular-fire-functions.umd.js +0 -461
- package/bundles/angular-fire-functions.umd.js.map +0 -1
- package/bundles/angular-fire-messaging.umd.js +0 -473
- package/bundles/angular-fire-messaging.umd.js.map +0 -1
- package/bundles/angular-fire-performance.umd.js +0 -473
- package/bundles/angular-fire-performance.umd.js.map +0 -1
- package/bundles/angular-fire-remote-config.umd.js +0 -499
- package/bundles/angular-fire-remote-config.umd.js.map +0 -1
- package/bundles/angular-fire-storage.umd.js +0 -485
- package/bundles/angular-fire-storage.umd.js.map +0 -1
- package/bundles/angular-fire.umd.js +0 -308
- package/bundles/angular-fire.umd.js.map +0 -1
- package/compat/analytics/package.json +0 -11
- package/compat/auth/package.json +0 -11
- package/compat/auth-guard/package.json +0 -11
- package/compat/database/package.json +0 -11
- package/compat/firestore/package.json +0 -11
- package/compat/functions/package.json +0 -11
- package/compat/messaging/package.json +0 -11
- package/compat/package.json +0 -11
- package/compat/performance/package.json +0 -11
- package/compat/remote-config/package.json +0 -11
- package/compat/storage/package.json +0 -11
- package/database/package.json +0 -11
- package/esm2015/analytics/analytics.module.js +0 -93
- package/esm2015/analytics/firebase.js +0 -14
- package/esm2015/analytics/overrides.js +0 -3
- package/esm2015/analytics/screen-tracking.service.js +0 -139
- package/esm2015/analytics/user-tracking.service.js +0 -43
- package/esm2015/app/app.module.js +0 -84
- package/esm2015/app-check/app-check.js +0 -16
- package/esm2015/app-check/app-check.module.js +0 -81
- package/esm2015/app-check/firebase.js +0 -9
- package/esm2015/app-check/public_api.js +0 -4
- package/esm2015/auth/auth.module.js +0 -71
- package/esm2015/auth/firebase.js +0 -56
- package/esm2015/auth-guard/auth-guard.js +0 -49
- package/esm2015/compat/analytics/analytics.js +0 -163
- package/esm2015/compat/analytics/analytics.module.js +0 -32
- package/esm2015/compat/analytics/screen-tracking.service.js +0 -49
- package/esm2015/compat/analytics/user-tracking.service.js +0 -52
- package/esm2015/compat/auth/auth.js +0 -139
- package/esm2015/compat/auth-guard/auth-guard.js +0 -49
- package/esm2015/compat/database/database.js +0 -117
- package/esm2015/compat/database/interfaces.js +0 -2
- package/esm2015/compat/database/list/changes.js +0 -85
- package/esm2015/compat/database/list/create-reference.js +0 -41
- package/esm2015/compat/database/observable/fromRef.js +0 -47
- package/esm2015/compat/firebase.app.module.js +0 -69
- package/esm2015/compat/firestore/collection/changes.js +0 -107
- package/esm2015/compat/firestore/collection/collection.js +0 -117
- package/esm2015/compat/firestore/collection-group/collection-group.js +0 -81
- package/esm2015/compat/firestore/document/document.js +0 -82
- package/esm2015/compat/firestore/firestore.js +0 -254
- package/esm2015/compat/firestore/interfaces.js +0 -2
- package/esm2015/compat/firestore/observable/fromRef.js +0 -39
- package/esm2015/compat/functions/functions.js +0 -68
- package/esm2015/compat/messaging/messaging.js +0 -75
- package/esm2015/compat/performance/performance.js +0 -110
- package/esm2015/compat/performance/performance.module.js +0 -28
- package/esm2015/compat/performance/performance.service.js +0 -27
- package/esm2015/compat/proxy.js +0 -61
- package/esm2015/compat/remote-config/remote-config.js +0 -193
- package/esm2015/compat/storage/observable/fromTask.js +0 -34
- package/esm2015/compat/storage/pipes/storageUrl.pipe.js +0 -54
- package/esm2015/compat/storage/storage.js +0 -94
- package/esm2015/compat/storage/storage.module.js +0 -22
- package/esm2015/core.js +0 -79
- package/esm2015/database/database.module.js +0 -74
- package/esm2015/firestore/firebase.js +0 -53
- package/esm2015/firestore/firestore.module.js +0 -74
- package/esm2015/firestore/lite/firebase.js +0 -39
- package/esm2015/firestore/lite/lite.module.js +0 -74
- package/esm2015/firestore/lite/rxfire.js +0 -10
- package/esm2015/firestore/rxfire.js +0 -13
- package/esm2015/functions/functions.module.js +0 -74
- package/esm2015/messaging/messaging.module.js +0 -85
- package/esm2015/messaging/overrides.js +0 -3
- package/esm2015/performance/performance.module.js +0 -81
- package/esm2015/remote-config/overrides.js +0 -3
- package/esm2015/remote-config/remote-config.module.js +0 -85
- package/esm2015/storage/storage.module.js +0 -74
- package/esm2015/zones.js +0 -183
- package/fesm2015/angular-fire-analytics.js.map +0 -1
- package/fesm2015/angular-fire-app-check.js.map +0 -1
- package/fesm2015/angular-fire-app.js.map +0 -1
- package/fesm2015/angular-fire-auth-guard.js.map +0 -1
- package/fesm2015/angular-fire-auth.js.map +0 -1
- package/fesm2015/angular-fire-compat-analytics.js.map +0 -1
- package/fesm2015/angular-fire-compat-auth-guard.js.map +0 -1
- package/fesm2015/angular-fire-compat-auth.js.map +0 -1
- package/fesm2015/angular-fire-compat-database.js.map +0 -1
- package/fesm2015/angular-fire-compat-firestore.js.map +0 -1
- package/fesm2015/angular-fire-compat-functions.js.map +0 -1
- package/fesm2015/angular-fire-compat-messaging.js.map +0 -1
- package/fesm2015/angular-fire-compat-performance.js.map +0 -1
- package/fesm2015/angular-fire-compat-remote-config.js.map +0 -1
- package/fesm2015/angular-fire-compat-storage.js.map +0 -1
- package/fesm2015/angular-fire-compat.js.map +0 -1
- package/fesm2015/angular-fire-database.js.map +0 -1
- package/fesm2015/angular-fire-firestore-lite.js.map +0 -1
- package/fesm2015/angular-fire-firestore.js +0 -159
- package/fesm2015/angular-fire-firestore.js.map +0 -1
- package/fesm2015/angular-fire-functions.js.map +0 -1
- package/fesm2015/angular-fire-messaging.js.map +0 -1
- package/fesm2015/angular-fire-performance.js.map +0 -1
- package/fesm2015/angular-fire-remote-config.js.map +0 -1
- package/fesm2015/angular-fire-storage.js.map +0 -1
- package/fesm2015/angular-fire.js.map +0 -1
- package/firestore/lite/package.json +0 -11
- package/firestore/package.json +0 -11
- package/firestore-protos.js +0 -4
- package/functions/package.json +0 -11
- package/messaging/package.json +0 -11
- package/performance/package.json +0 -11
- package/remote-config/package.json +0 -11
- package/storage/package.json +0 -11
- /package/analytics/{angular-fire-analytics.d.ts → index.d.ts} +0 -0
- /package/app/{angular-fire-app.d.ts → index.d.ts} +0 -0
- /package/app-check/{angular-fire-app-check.d.ts → index.d.ts} +0 -0
- /package/auth/{angular-fire-auth.d.ts → index.d.ts} +0 -0
- /package/auth-guard/{angular-fire-auth-guard.d.ts → index.d.ts} +0 -0
- /package/compat/analytics/{angular-fire-compat-analytics.d.ts → index.d.ts} +0 -0
- /package/compat/auth/{angular-fire-compat-auth.d.ts → index.d.ts} +0 -0
- /package/compat/auth-guard/{angular-fire-compat-auth-guard.d.ts → index.d.ts} +0 -0
- /package/compat/database/{angular-fire-compat-database.d.ts → index.d.ts} +0 -0
- /package/compat/firestore/{angular-fire-compat-firestore.d.ts → index.d.ts} +0 -0
- /package/compat/functions/{angular-fire-compat-functions.d.ts → index.d.ts} +0 -0
- /package/compat/{angular-fire-compat.d.ts → index.d.ts} +0 -0
- /package/compat/messaging/{angular-fire-compat-messaging.d.ts → index.d.ts} +0 -0
- /package/compat/performance/{angular-fire-compat-performance.d.ts → index.d.ts} +0 -0
- /package/compat/remote-config/{angular-fire-compat-remote-config.d.ts → index.d.ts} +0 -0
- /package/compat/storage/{angular-fire-compat-storage.d.ts → index.d.ts} +0 -0
- /package/database/{angular-fire-database.d.ts → index.d.ts} +0 -0
- /package/{esm2015/analytics/angular-fire-analytics.js → esm2022/analytics/angular-fire-analytics.mjs} +0 -0
- /package/{esm2015/analytics/public_api.js → esm2022/analytics/public_api.mjs} +0 -0
- /package/{esm2015/angular-fire.js → esm2022/angular-fire.mjs} +0 -0
- /package/{esm2015/app/angular-fire-app.js → esm2022/app/angular-fire-app.mjs} +0 -0
- /package/{esm2015/app/firebase.js → esm2022/app/firebase.mjs} +0 -0
- /package/{esm2015/app/public_api.js → esm2022/app/public_api.mjs} +0 -0
- /package/{esm2015/app-check/angular-fire-app-check.js → esm2022/app-check/angular-fire-app-check.mjs} +0 -0
- /package/{esm2015/auth/angular-fire-auth.js → esm2022/auth/angular-fire-auth.mjs} +0 -0
- /package/{esm2015/auth/public_api.js → esm2022/auth/public_api.mjs} +0 -0
- /package/{esm2015/auth/rxfire.js → esm2022/auth/rxfire.mjs} +0 -0
- /package/{esm2015/auth-guard/angular-fire-auth-guard.js → esm2022/auth-guard/angular-fire-auth-guard.mjs} +0 -0
- /package/{esm2015/auth-guard/public_api.js → esm2022/auth-guard/public_api.mjs} +0 -0
- /package/{esm2015/compat/analytics/angular-fire-compat-analytics.js → esm2022/compat/analytics/angular-fire-compat-analytics.mjs} +0 -0
- /package/{esm2015/compat/analytics/base.js → esm2022/compat/analytics/base.mjs} +0 -0
- /package/{esm2015/compat/analytics/public_api.js → esm2022/compat/analytics/public_api.mjs} +0 -0
- /package/{esm2015/compat/angular-fire-compat.js → esm2022/compat/angular-fire-compat.mjs} +0 -0
- /package/{esm2015/compat/auth/angular-fire-compat-auth.js → esm2022/compat/auth/angular-fire-compat-auth.mjs} +0 -0
- /package/{esm2015/compat/auth/base.js → esm2022/compat/auth/base.mjs} +0 -0
- /package/{esm2015/compat/auth-guard/angular-fire-compat-auth-guard.js → esm2022/compat/auth-guard/angular-fire-compat-auth-guard.mjs} +0 -0
- /package/{esm2015/compat/auth-guard/public_api.js → esm2022/compat/auth-guard/public_api.mjs} +0 -0
- /package/{esm2015/compat/database/angular-fire-compat-database.js → esm2022/compat/database/angular-fire-compat-database.mjs} +0 -0
- /package/{esm2015/compat/database/list/remove.js → esm2022/compat/database/list/remove.mjs} +0 -0
- /package/{esm2015/compat/database/list/utils.js → esm2022/compat/database/list/utils.mjs} +0 -0
- /package/{esm2015/compat/database/public_api.js → esm2022/compat/database/public_api.mjs} +0 -0
- /package/{esm2015/compat/firestore/angular-fire-compat-firestore.js → esm2022/compat/firestore/angular-fire-compat-firestore.mjs} +0 -0
- /package/{esm2015/compat/firestore/public_api.js → esm2022/compat/firestore/public_api.mjs} +0 -0
- /package/{esm2015/compat/functions/angular-fire-compat-functions.js → esm2022/compat/functions/angular-fire-compat-functions.mjs} +0 -0
- /package/{esm2015/compat/functions/base.js → esm2022/compat/functions/base.mjs} +0 -0
- /package/{esm2015/compat/messaging/angular-fire-compat-messaging.js → esm2022/compat/messaging/angular-fire-compat-messaging.mjs} +0 -0
- /package/{esm2015/compat/messaging/base.js → esm2022/compat/messaging/base.mjs} +0 -0
- /package/{esm2015/compat/messaging/public_api.js → esm2022/compat/messaging/public_api.mjs} +0 -0
- /package/{esm2015/compat/performance/angular-fire-compat-performance.js → esm2022/compat/performance/angular-fire-compat-performance.mjs} +0 -0
- /package/{esm2015/compat/performance/base.js → esm2022/compat/performance/base.mjs} +0 -0
- /package/{esm2015/compat/performance/public_api.js → esm2022/compat/performance/public_api.mjs} +0 -0
- /package/{esm2015/compat/public_api.js → esm2022/compat/public_api.mjs} +0 -0
- /package/{esm2015/compat/remote-config/angular-fire-compat-remote-config.js → esm2022/compat/remote-config/angular-fire-compat-remote-config.mjs} +0 -0
- /package/{esm2015/compat/remote-config/base.js → esm2022/compat/remote-config/base.mjs} +0 -0
- /package/{esm2015/compat/remote-config/interfaces.js → esm2022/compat/remote-config/interfaces.mjs} +0 -0
- /package/{esm2015/compat/remote-config/public_api.js → esm2022/compat/remote-config/public_api.mjs} +0 -0
- /package/{esm2015/compat/storage/angular-fire-compat-storage.js → esm2022/compat/storage/angular-fire-compat-storage.mjs} +0 -0
- /package/{esm2015/compat/storage/interfaces.js → esm2022/compat/storage/interfaces.mjs} +0 -0
- /package/{esm2015/compat/storage/public_api.js → esm2022/compat/storage/public_api.mjs} +0 -0
- /package/{esm2015/database/angular-fire-database.js → esm2022/database/angular-fire-database.mjs} +0 -0
- /package/{esm2015/database/firebase.js → esm2022/database/firebase.mjs} +0 -0
- /package/{esm2015/database/public_api.js → esm2022/database/public_api.mjs} +0 -0
- /package/{esm2015/database/rxfire.js → esm2022/database/rxfire.mjs} +0 -0
- /package/{esm2015/firestore/angular-fire-firestore.js → esm2022/firestore/angular-fire-firestore.mjs} +0 -0
- /package/{esm2015/firestore/lite/angular-fire-firestore-lite.js → esm2022/firestore/lite/angular-fire-firestore-lite.mjs} +0 -0
- /package/{esm2015/firestore/lite/public_api.js → esm2022/firestore/lite/public_api.mjs} +0 -0
- /package/{esm2015/firestore/public_api.js → esm2022/firestore/public_api.mjs} +0 -0
- /package/{esm2015/functions/angular-fire-functions.js → esm2022/functions/angular-fire-functions.mjs} +0 -0
- /package/{esm2015/functions/firebase.js → esm2022/functions/firebase.mjs} +0 -0
- /package/{esm2015/functions/public_api.js → esm2022/functions/public_api.mjs} +0 -0
- /package/{esm2015/functions/rxfire.js → esm2022/functions/rxfire.mjs} +0 -0
- /package/{esm2015/messaging/angular-fire-messaging.js → esm2022/messaging/angular-fire-messaging.mjs} +0 -0
- /package/{esm2015/messaging/firebase.js → esm2022/messaging/firebase.mjs} +0 -0
- /package/{esm2015/messaging/public_api.js → esm2022/messaging/public_api.mjs} +0 -0
- /package/{esm2015/performance/angular-fire-performance.js → esm2022/performance/angular-fire-performance.mjs} +0 -0
- /package/{esm2015/performance/firebase.js → esm2022/performance/firebase.mjs} +0 -0
- /package/{esm2015/performance/public_api.js → esm2022/performance/public_api.mjs} +0 -0
- /package/{esm2015/performance/rxfire.js → esm2022/performance/rxfire.mjs} +0 -0
- /package/{esm2015/public_api.js → esm2022/public_api.mjs} +0 -0
- /package/{esm2015/remote-config/angular-fire-remote-config.js → esm2022/remote-config/angular-fire-remote-config.mjs} +0 -0
- /package/{esm2015/remote-config/firebase.js → esm2022/remote-config/firebase.mjs} +0 -0
- /package/{esm2015/remote-config/public_api.js → esm2022/remote-config/public_api.mjs} +0 -0
- /package/{esm2015/remote-config/rxfire.js → esm2022/remote-config/rxfire.mjs} +0 -0
- /package/{esm2015/storage/angular-fire-storage.js → esm2022/storage/angular-fire-storage.mjs} +0 -0
- /package/{esm2015/storage/firebase.js → esm2022/storage/firebase.mjs} +0 -0
- /package/{esm2015/storage/public_api.js → esm2022/storage/public_api.mjs} +0 -0
- /package/{esm2015/storage/rxfire.js → esm2022/storage/rxfire.mjs} +0 -0
- /package/firestore/{angular-fire-firestore.d.ts → index.d.ts} +0 -0
- /package/firestore/lite/{angular-fire-firestore-lite.d.ts → index.d.ts} +0 -0
- /package/functions/{angular-fire-functions.d.ts → index.d.ts} +0 -0
- /package/{angular-fire.d.ts → index.d.ts} +0 -0
- /package/messaging/{angular-fire-messaging.d.ts → index.d.ts} +0 -0
- /package/performance/{angular-fire-performance.d.ts → index.d.ts} +0 -0
- /package/remote-config/{angular-fire-remote-config.d.ts → index.d.ts} +0 -0
- /package/storage/{angular-fire-storage.d.ts → index.d.ts} +0 -0
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { InjectionToken, NgZone } from '@angular/core';
|
|
2
|
-
import { Observable } from 'rxjs';
|
|
3
|
-
import firebase from 'firebase/compat/app';
|
|
4
2
|
import { ɵPromiseProxy } from '@angular/fire/compat';
|
|
5
3
|
import { FirebaseApp } from '@angular/fire/compat';
|
|
4
|
+
import firebase from 'firebase/compat/app';
|
|
5
|
+
import { Observable } from 'rxjs';
|
|
6
6
|
import * as i0 from "@angular/core";
|
|
7
7
|
export declare const INSTRUMENTATION_ENABLED: InjectionToken<boolean>;
|
|
8
8
|
export declare const DATA_COLLECTION_ENABLED: InjectionToken<boolean>;
|
package/compat/proxy.d.ts
CHANGED
|
@@ -1,21 +1,21 @@
|
|
|
1
1
|
import { NgZone } from '@angular/core';
|
|
2
2
|
import { Observable } from 'rxjs';
|
|
3
|
-
|
|
4
|
-
|
|
3
|
+
type MyFunction = (...args: any[]) => any;
|
|
4
|
+
type FunctionPropertyNames<T> = {
|
|
5
5
|
[K in keyof T]: T[K] extends MyFunction ? K : never;
|
|
6
6
|
}[keyof T];
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
7
|
+
type ReturnTypeOrNever<T> = T extends MyFunction ? ReturnType<T> : never;
|
|
8
|
+
type ParametersOrNever<T> = T extends MyFunction ? Parameters<T> : never;
|
|
9
|
+
type PromiseReturningFunctionPropertyNames<T> = {
|
|
10
10
|
[K in FunctionPropertyNames<T>]: ReturnTypeOrNever<T[K]> extends Promise<any> ? K : never;
|
|
11
11
|
}[FunctionPropertyNames<T>];
|
|
12
|
-
|
|
12
|
+
type NonPromiseReturningFunctionPropertyNames<T> = {
|
|
13
13
|
[K in FunctionPropertyNames<T>]: ReturnTypeOrNever<T[K]> extends Promise<any> ? never : K;
|
|
14
14
|
}[FunctionPropertyNames<T>];
|
|
15
|
-
|
|
15
|
+
type NonFunctionPropertyNames<T> = {
|
|
16
16
|
[K in keyof T]: T[K] extends MyFunction ? never : K;
|
|
17
17
|
}[keyof T];
|
|
18
|
-
export
|
|
18
|
+
export type ɵPromiseProxy<T> = {
|
|
19
19
|
[K in NonFunctionPropertyNames<T>]: Promise<T[K]>;
|
|
20
20
|
} & {
|
|
21
21
|
[K in NonPromiseReturningFunctionPropertyNames<T>]: (...args: ParametersOrNever<T[K]>) => Promise<ReturnTypeOrNever<T[K]>>;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import firebase from 'firebase/compat/app';
|
|
2
|
-
export
|
|
2
|
+
export type Settings = firebase.remoteConfig.Settings;
|
|
@@ -1,14 +1,12 @@
|
|
|
1
1
|
import { InjectionToken, NgZone } from '@angular/core';
|
|
2
|
-
import { MonoTypeOperatorFunction, Observable, OperatorFunction } from 'rxjs';
|
|
3
2
|
import { ɵAngularFireSchedulers } from '@angular/fire';
|
|
4
3
|
import { ɵPromiseProxy } from '@angular/fire/compat';
|
|
5
4
|
import { FirebaseOptions } from 'firebase/app';
|
|
6
5
|
import firebase from 'firebase/compat/app';
|
|
6
|
+
import { MonoTypeOperatorFunction, Observable, OperatorFunction } from 'rxjs';
|
|
7
7
|
import { Settings } from './interfaces';
|
|
8
8
|
import * as i0 from "@angular/core";
|
|
9
|
-
export
|
|
10
|
-
[key: string]: string | number | boolean;
|
|
11
|
-
}
|
|
9
|
+
export type ConfigTemplate = Record<string, string | number | boolean>;
|
|
12
10
|
export declare const SETTINGS: InjectionToken<firebase.remoteConfig.Settings>;
|
|
13
11
|
export declare const DEFAULTS: InjectionToken<ConfigTemplate>;
|
|
14
12
|
export interface AngularFireRemoteConfig extends ɵPromiseProxy<firebase.remoteConfig.RemoteConfig> {
|
|
@@ -33,53 +31,21 @@ export declare class AngularFireRemoteConfig {
|
|
|
33
31
|
private zone;
|
|
34
32
|
readonly changes: Observable<Parameter>;
|
|
35
33
|
readonly parameters: Observable<Parameter[]>;
|
|
36
|
-
readonly numbers: Observable<
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
[key: string]: Observable<number>;
|
|
40
|
-
};
|
|
41
|
-
readonly booleans: Observable<{
|
|
42
|
-
[key: string]: boolean | undefined;
|
|
43
|
-
}> & {
|
|
44
|
-
[key: string]: Observable<boolean>;
|
|
45
|
-
};
|
|
46
|
-
readonly strings: Observable<{
|
|
47
|
-
[key: string]: string | undefined;
|
|
48
|
-
}> & {
|
|
49
|
-
[key: string]: Observable<string | undefined>;
|
|
50
|
-
};
|
|
34
|
+
readonly numbers: Observable<Record<string, number | undefined>> & Record<string, Observable<number>>;
|
|
35
|
+
readonly booleans: Observable<Record<string, boolean | undefined>> & Record<string, Observable<boolean>>;
|
|
36
|
+
readonly strings: Observable<Record<string, string | undefined>> & Record<string, Observable<string | undefined>>;
|
|
51
37
|
constructor(options: FirebaseOptions, name: string | null | undefined, settings: Settings | null, defaultConfig: ConfigTemplate | null, zone: NgZone, schedulers: ɵAngularFireSchedulers, platformId: Object);
|
|
52
38
|
static ɵfac: i0.ɵɵFactoryDeclaration<AngularFireRemoteConfig, [null, { optional: true; }, { optional: true; }, { optional: true; }, null, null, null]>;
|
|
53
39
|
static ɵprov: i0.ɵɵInjectableDeclaration<AngularFireRemoteConfig>;
|
|
54
40
|
}
|
|
55
41
|
export declare const budget: <T>(interval: number) => MonoTypeOperatorFunction<T>;
|
|
56
|
-
export declare function scanToObject(): OperatorFunction<Parameter,
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
export declare function scanToObject(to: '
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
export declare function
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
export declare function
|
|
66
|
-
[key: string]: string | undefined;
|
|
67
|
-
}>;
|
|
68
|
-
export declare function scanToObject<T extends ConfigTemplate>(template: T): OperatorFunction<Parameter, T & {
|
|
69
|
-
[key: string]: string | undefined;
|
|
70
|
-
}>;
|
|
71
|
-
export declare function mapToObject(): OperatorFunction<Parameter[], {
|
|
72
|
-
[key: string]: string | undefined;
|
|
73
|
-
}>;
|
|
74
|
-
export declare function mapToObject(to: 'numbers'): OperatorFunction<Parameter[], {
|
|
75
|
-
[key: string]: number | undefined;
|
|
76
|
-
}>;
|
|
77
|
-
export declare function mapToObject(to: 'booleans'): OperatorFunction<Parameter[], {
|
|
78
|
-
[key: string]: boolean | undefined;
|
|
79
|
-
}>;
|
|
80
|
-
export declare function mapToObject(to: 'strings'): OperatorFunction<Parameter[], {
|
|
81
|
-
[key: string]: string | undefined;
|
|
82
|
-
}>;
|
|
83
|
-
export declare function mapToObject<T extends ConfigTemplate>(template: T): OperatorFunction<Parameter[], T & {
|
|
84
|
-
[key: string]: string | undefined;
|
|
85
|
-
}>;
|
|
42
|
+
export declare function scanToObject(): OperatorFunction<Parameter, Record<string, string | undefined>>;
|
|
43
|
+
export declare function scanToObject(to: 'numbers'): OperatorFunction<Parameter, Record<string, number | undefined>>;
|
|
44
|
+
export declare function scanToObject(to: 'booleans'): OperatorFunction<Parameter, Record<string, boolean | undefined>>;
|
|
45
|
+
export declare function scanToObject(to: 'strings'): OperatorFunction<Parameter, Record<string, string | undefined>>;
|
|
46
|
+
export declare function scanToObject<T extends ConfigTemplate>(template: T): OperatorFunction<Parameter, T & Record<string, string | undefined>>;
|
|
47
|
+
export declare function mapToObject(): OperatorFunction<Parameter[], Record<string, string | undefined>>;
|
|
48
|
+
export declare function mapToObject(to: 'numbers'): OperatorFunction<Parameter[], Record<string, number | undefined>>;
|
|
49
|
+
export declare function mapToObject(to: 'booleans'): OperatorFunction<Parameter[], Record<string, boolean | undefined>>;
|
|
50
|
+
export declare function mapToObject(to: 'strings'): OperatorFunction<Parameter[], Record<string, string | undefined>>;
|
|
51
|
+
export declare function mapToObject<T extends ConfigTemplate>(template: T): OperatorFunction<Parameter[], T & Record<string, string | undefined>>;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import firebase from 'firebase/compat/app';
|
|
2
|
-
export
|
|
3
|
-
export
|
|
4
|
-
export
|
|
5
|
-
export
|
|
6
|
-
export
|
|
7
|
-
export
|
|
8
|
-
export
|
|
9
|
-
export
|
|
2
|
+
export type UploadTask = firebase.storage.UploadTask;
|
|
3
|
+
export type UploadTaskSnapshot = firebase.storage.UploadTaskSnapshot;
|
|
4
|
+
export type UploadMetadata = firebase.storage.UploadMetadata;
|
|
5
|
+
export type SettableMetadata = firebase.storage.SettableMetadata;
|
|
6
|
+
export type Reference = firebase.storage.Reference;
|
|
7
|
+
export type StringFormat = firebase.storage.StringFormat;
|
|
8
|
+
export type ListResult = firebase.storage.ListResult;
|
|
9
|
+
export type ListOptions = firebase.storage.ListOptions;
|
|
@@ -1,4 +1,3 @@
|
|
|
1
1
|
import { Observable } from 'rxjs';
|
|
2
2
|
import { UploadTask } from '../interfaces';
|
|
3
|
-
|
|
4
|
-
export declare function fromTask(task: UploadTask): Observable<firebase.storage.UploadTaskSnapshot>;
|
|
3
|
+
export declare function fromTask(task: UploadTask): Observable<import("firebase/compat").default.storage.UploadTaskSnapshot>;
|
|
@@ -13,7 +13,7 @@ export declare class GetDownloadURLPipe implements PipeTransform, OnDestroy {
|
|
|
13
13
|
transform(path: string): any;
|
|
14
14
|
ngOnDestroy(): void;
|
|
15
15
|
static ɵfac: i0.ɵɵFactoryDeclaration<GetDownloadURLPipe, [null, null, { optional: true; }]>;
|
|
16
|
-
static ɵpipe: i0.ɵɵPipeDeclaration<GetDownloadURLPipe, "getDownloadURL">;
|
|
16
|
+
static ɵpipe: i0.ɵɵPipeDeclaration<GetDownloadURLPipe, "getDownloadURL", false>;
|
|
17
17
|
}
|
|
18
18
|
export declare class GetDownloadURLPipeModule {
|
|
19
19
|
static ɵfac: i0.ɵɵFactoryDeclaration<GetDownloadURLPipeModule, never>;
|
package/compat/storage/ref.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
+
import { Observable } from 'rxjs';
|
|
1
2
|
import { ListOptions, ListResult, Reference, SettableMetadata, UploadMetadata } from './interfaces';
|
|
2
3
|
import { AngularFireUploadTask } from './task';
|
|
3
|
-
import { Observable } from 'rxjs';
|
|
4
4
|
export interface AngularFireStorageReference {
|
|
5
5
|
getDownloadURL(): Observable<any>;
|
|
6
6
|
getMetadata(): Observable<any>;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { InjectionToken, NgZone } from '@angular/core';
|
|
2
2
|
import { ɵAngularFireSchedulers } from '@angular/fire';
|
|
3
|
+
import { AppCheckInstances } from '@angular/fire/app-check';
|
|
3
4
|
import { FirebaseOptions } from 'firebase/app';
|
|
5
|
+
import firebase from 'firebase/compat/app';
|
|
4
6
|
import { UploadMetadata } from './interfaces';
|
|
5
7
|
import 'firebase/compat/storage';
|
|
6
|
-
import firebase from 'firebase/compat/app';
|
|
7
|
-
import { AppCheckInstances } from '@angular/fire/app-check';
|
|
8
8
|
import * as i0 from "@angular/core";
|
|
9
9
|
export declare const BUCKET: InjectionToken<string>;
|
|
10
10
|
export declare const MAX_UPLOAD_RETRY_TIME: InjectionToken<number>;
|
|
@@ -21,7 +21,7 @@ export declare const USE_EMULATOR: InjectionToken<[host: string, port: number, o
|
|
|
21
21
|
*/
|
|
22
22
|
export declare class AngularFireStorage {
|
|
23
23
|
readonly storage: firebase.storage.Storage;
|
|
24
|
-
constructor(options: FirebaseOptions, name: string | null | undefined, storageBucket: string | null, platformId: Object, zone: NgZone, schedulers: ɵAngularFireSchedulers, maxUploadRetryTime:
|
|
24
|
+
constructor(options: FirebaseOptions, name: string | null | undefined, storageBucket: string | null, platformId: Object, zone: NgZone, schedulers: ɵAngularFireSchedulers, maxUploadRetryTime: any, maxOperationRetryTime: any, _useEmulator: any, _appCheckInstances: AppCheckInstances);
|
|
25
25
|
ref(path: string): import("./ref").AngularFireStorageReference;
|
|
26
26
|
refFromURL(path: string): import("./ref").AngularFireStorageReference;
|
|
27
27
|
upload(path: string, data: any, metadata?: UploadMetadata): import("@angular/fire/compat/storage").AngularFireUploadTask;
|
package/compat/storage/task.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { UploadTask, UploadTaskSnapshot } from './interfaces';
|
|
2
1
|
import { Observable } from 'rxjs';
|
|
2
|
+
import { UploadTask, UploadTaskSnapshot } from './interfaces';
|
|
3
3
|
export interface AngularFireUploadTask {
|
|
4
4
|
task: UploadTask;
|
|
5
5
|
snapshotChanges(): Observable<UploadTaskSnapshot | undefined>;
|
package/core.d.ts
CHANGED
|
@@ -1,17 +1,13 @@
|
|
|
1
1
|
import { Version } from '@angular/core';
|
|
2
2
|
import { FirebaseApp } from 'firebase/app';
|
|
3
|
+
import type { AppCheck } from 'firebase/app-check';
|
|
3
4
|
export declare const VERSION: Version;
|
|
4
|
-
export declare const
|
|
5
|
-
async: () => any;
|
|
6
|
-
sync: () => any;
|
|
7
|
-
};
|
|
8
|
-
export declare const ɵisRemoteConfigSupportedFactory: {
|
|
9
|
-
async: () => any;
|
|
10
|
-
sync: () => any;
|
|
11
|
-
};
|
|
12
|
-
export declare const ɵisAnalyticsSupportedFactory: {
|
|
13
|
-
async: () => any;
|
|
14
|
-
sync: () => any;
|
|
15
|
-
};
|
|
5
|
+
export declare const ɵisSupportedError: (module: string) => string;
|
|
16
6
|
export declare function ɵgetDefaultInstanceOf<T = unknown>(identifier: string, provided: T[] | undefined, defaultApp: FirebaseApp): T | undefined;
|
|
17
7
|
export declare const ɵgetAllInstancesOf: <T = unknown>(identifier: string, app?: FirebaseApp) => T[];
|
|
8
|
+
export interface ɵAppCheckInstances extends Array<AppCheck> {
|
|
9
|
+
}
|
|
10
|
+
export declare class ɵAppCheckInstances {
|
|
11
|
+
constructor();
|
|
12
|
+
}
|
|
13
|
+
export declare const ɵAPP_CHECK_PROVIDER_NAME = "app-check";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { InjectionToken, Injector, ModuleWithProviders, NgZone } from '@angular/core';
|
|
2
|
+
import { FirebaseApp } from '@angular/fire/app';
|
|
2
3
|
import { Database as FirebaseDatabase } from 'firebase/database';
|
|
3
4
|
import { Database } from './database';
|
|
4
|
-
import { FirebaseApp } from '@angular/fire/app';
|
|
5
5
|
import * as i0 from "@angular/core";
|
|
6
6
|
export declare const PROVIDED_DATABASE_INSTANCES: InjectionToken<Database[]>;
|
|
7
7
|
export declare function defaultDatabaseInstanceFactory(provided: FirebaseDatabase[] | undefined, defaultApp: FirebaseApp): Database;
|
package/docs/app-check.md
CHANGED
|
@@ -20,7 +20,7 @@ Provide an App Check instance and configuration in the application's `NgModule`
|
|
|
20
20
|
|
|
21
21
|
```ts
|
|
22
22
|
import { provideFirebaseApp, initializeApp } from '@angular/fire/app';
|
|
23
|
-
import {
|
|
23
|
+
import { provideAppCheck } from '@angular/fire/app-check';
|
|
24
24
|
|
|
25
25
|
@NgModule({
|
|
26
26
|
imports: [
|
package/docs/auth.md
CHANGED
|
@@ -70,13 +70,13 @@ import { Auth, User, user } from '@angular/fire/auth';
|
|
|
70
70
|
...
|
|
71
71
|
|
|
72
72
|
export class UserComponent implements OnDestroy {
|
|
73
|
-
private auth: Auth = inject(
|
|
73
|
+
private auth: Auth = inject(Auth);
|
|
74
74
|
user$ = user(auth);
|
|
75
75
|
userSubscription: Subscription;
|
|
76
76
|
...
|
|
77
77
|
|
|
78
78
|
constructor() {
|
|
79
|
-
this.userSubscription = this.user$.subscribe(aUser: User | null => {
|
|
79
|
+
this.userSubscription = this.user$.subscribe((aUser: User | null) => {
|
|
80
80
|
//handle user state changes here. Note, that user will be null if there is no currently logged in user.
|
|
81
81
|
console.log(aUser);
|
|
82
82
|
})
|
|
@@ -100,7 +100,7 @@ import { Auth, authState } from '@angular/fire/auth';
|
|
|
100
100
|
...
|
|
101
101
|
|
|
102
102
|
export class UserComponent implements OnDestroy {
|
|
103
|
-
private auth: Auth = inject(
|
|
103
|
+
private auth: Auth = inject(Auth);
|
|
104
104
|
authState$ = authState(auth);
|
|
105
105
|
authStateSubscription: Subscription;
|
|
106
106
|
...
|
|
@@ -129,7 +129,7 @@ import { Auth, idToken } from '@angular/fire/auth';
|
|
|
129
129
|
...
|
|
130
130
|
|
|
131
131
|
export class UserComponent implements OnDestroy {
|
|
132
|
-
private auth: Auth = inject(
|
|
132
|
+
private auth: Auth = inject(Auth);
|
|
133
133
|
idToken$ = idToken(auth);
|
|
134
134
|
idTokenSubscription: Subscription;
|
|
135
135
|
...
|
|
@@ -148,7 +148,7 @@ export class UserComponent implements OnDestroy {
|
|
|
148
148
|
}
|
|
149
149
|
```
|
|
150
150
|
|
|
151
|
-
## Connecting the
|
|
151
|
+
## Connecting the emulator suite
|
|
152
152
|
|
|
153
153
|
```ts
|
|
154
154
|
import { connectAuthEmulator, getAuth, provideAuth } from '@angular/fire/auth';
|
|
@@ -162,4 +162,4 @@ import { connectAuthEmulator, getAuth, provideAuth } from '@angular/fire/auth';
|
|
|
162
162
|
}),
|
|
163
163
|
]
|
|
164
164
|
})
|
|
165
|
-
```
|
|
165
|
+
```
|
package/docs/database.md
CHANGED
|
@@ -128,7 +128,7 @@ The `fromRef()` function creates an observable that emits reference changes.
|
|
|
128
128
|
| **params** | ref: `Reference\|Query`, event: `ListenEvent` |
|
|
129
129
|
| **return** | `Observable<QueryChange>` |
|
|
130
130
|
|
|
131
|
-
## Connecting
|
|
131
|
+
## Connecting to the emulator suite
|
|
132
132
|
|
|
133
133
|
```ts
|
|
134
134
|
import { connectDatabaseEmulator, getDatabase, provideDatabase } from '@angular/fire/database';
|
|
@@ -91,7 +91,7 @@ To customize the deployment flow, you can use the configuration files you're alr
|
|
|
91
91
|
|
|
92
92
|
### Configuring Cloud Functions
|
|
93
93
|
|
|
94
|
-
Setting `functionsNodeVersion` and `functionsRuntimeOptions` in your `angular.json` allow you to
|
|
94
|
+
Setting `functionsNodeVersion` and `functionsRuntimeOptions` in your `angular.json` allow you to customize the version of Node.js Cloud Functions is running and run-time settings like timeout, VPC connectors, and memory.
|
|
95
95
|
|
|
96
96
|
```json
|
|
97
97
|
"deploy": {
|
|
@@ -201,4 +201,4 @@ The above configuration specifies the following:
|
|
|
201
201
|
2. `ng deploy projectName` will deploy the specified project with default configuration.
|
|
202
202
|
3. `ng deploy projectName --configuration=storybook --siteTarget=mySiteTarget` will deploy `projectName` to `mySiteTarget` with configuration`storybook`.
|
|
203
203
|
|
|
204
|
-
All of the options are optional
|
|
204
|
+
All of the options are optional
|
package/docs/firestore.md
CHANGED
|
@@ -59,7 +59,7 @@ export class UserProfileComponent {
|
|
|
59
59
|
With the reference to Cloud Firestore available in a component it is now possible to connect read from and write to the database.
|
|
60
60
|
|
|
61
61
|
### Reading data
|
|
62
|
-
In Cloud Firestore data is stored in `documents` and `documents` are stored in `collections`. The path to data follows `<collection_name>/<document_id>` and continues if there are subcollections. For example, `"users/
|
|
62
|
+
In Cloud Firestore data is stored in `documents` and `documents` are stored in `collections`. The path to data follows `<collection_name>/<document_id>` and continues if there are subcollections. For example, `"users/ABC12345/posts/XYZ6789"` represents:
|
|
63
63
|
* `users` collection
|
|
64
64
|
* document id `ABC12345`
|
|
65
65
|
* `posts` collection
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
# Firebase Tools Install and Setup
|
|
2
|
+
|
|
3
|
+
### 1. Install package
|
|
4
|
+
|
|
5
|
+
```bash
|
|
6
|
+
npm install -g firebase-tools
|
|
7
|
+
```
|
|
8
|
+
|
|
9
|
+
or with `yarn`
|
|
10
|
+
|
|
11
|
+
```bash
|
|
12
|
+
yarn global add firebase-tools
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
You can also choose to install it as a dependency for your project rather than globally
|
|
16
|
+
|
|
17
|
+
```bash
|
|
18
|
+
npm install --save-dev firebase-tools
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
or with `yarn`
|
|
22
|
+
|
|
23
|
+
```bash
|
|
24
|
+
yarn add -D firebase-tools
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
### 2. Configure Firebase Tools
|
|
28
|
+
|
|
29
|
+
In your projects root directory run:
|
|
30
|
+
|
|
31
|
+
```bash
|
|
32
|
+
firebase init
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
or if your installed it within your project rather than globally
|
|
36
|
+
|
|
37
|
+
```bash
|
|
38
|
+
npx firebase init
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
or with `yarn`
|
|
42
|
+
|
|
43
|
+
```bash
|
|
44
|
+
yarn firebase init
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
This will ask you to login if you are not logged in already, the process will take you through a browser
|
|
48
|
+
redirect to log you into Firebase.
|
|
49
|
+
|
|
50
|
+
### 3. Choose what Firebase features
|
|
51
|
+
|
|
52
|
+
`firebase-tools` displays Firebase features you want to configure.
|
|
53
|
+
|
|
54
|
+
```bash
|
|
55
|
+
? Which Firebase features do you want to set up for this directory? Press Space
|
|
56
|
+
to select features, then Enter to confirm your choices. (Press <space> to select
|
|
57
|
+
, <a> to toggle all, <i> to invert selection, and <enter> to proceed)
|
|
58
|
+
◯ Realtime Database: Configure a security rules file for Realtime Database and
|
|
59
|
+
(optionally) provision default instance
|
|
60
|
+
◯ Firestore: Configure security rules and indexes files for Firestore
|
|
61
|
+
◯ Functions: Configure a Cloud Functions directory and its files
|
|
62
|
+
◯ Hosting: Configure files for Firebase Hosting and (optionally) set up GitHub
|
|
63
|
+
Action deploys
|
|
64
|
+
◯ Hosting: Set up GitHub Action deploys
|
|
65
|
+
(Move up and down to reveal more choices)
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
### 4. Connect your repo to a Firebase project
|
|
69
|
+
|
|
70
|
+
The CLI will then walk you through making sure your repo is configured with a Firebase project.
|
|
71
|
+
|
|
72
|
+
```bash
|
|
73
|
+
? Please select an option:
|
|
74
|
+
◯ Use an existing project
|
|
75
|
+
◯ Create a new project
|
|
76
|
+
◯ Add Firebase to an existing Google Cloud Platform project
|
|
77
|
+
◯ Don't set up a default project
|
|
78
|
+
```
|
|
@@ -40,8 +40,8 @@ Let's go ahead and modify your `package.json` to build for Cloud Functions:
|
|
|
40
40
|
```js
|
|
41
41
|
"scripts": {
|
|
42
42
|
// ... omitted
|
|
43
|
-
"build": "ng build && npm run
|
|
44
|
-
"copy:hosting": "cp -r ./dist/YOUR_PROJECT_NAME/* ./public && rm ./public/index.html",
|
|
43
|
+
"build": "ng build && npm run build:ssr && npm run copy:hosting && npm run build:functions",
|
|
44
|
+
"copy:hosting": "cp -r ./dist/YOUR_PROJECT_NAME/* ./public && rm -f ./public/index.html",
|
|
45
45
|
"build:functions": "npm run --prefix functions build"
|
|
46
46
|
},
|
|
47
47
|
```
|
|
@@ -51,21 +51,42 @@ Change the build script in your `functions/package.json` to the following:
|
|
|
51
51
|
```js
|
|
52
52
|
"scripts": {
|
|
53
53
|
// ... omitted
|
|
54
|
-
"build": "rm -
|
|
54
|
+
"build": "rm -rf ./dist && cp -r ../dist . && tsc",
|
|
55
55
|
}
|
|
56
56
|
```
|
|
57
57
|
|
|
58
|
+
You will either need to install the dependencies from the `functions/package.json` or add them to your root `package.json`.
|
|
59
|
+
|
|
58
60
|
Finally, add the following to your `functions/src/index.ts`:
|
|
59
61
|
|
|
60
62
|
```ts
|
|
61
63
|
export const universal = functions.https.onRequest((request, response) => {
|
|
62
|
-
require(`${process.cwd()}/dist/YOUR_PROJECT_NAME
|
|
64
|
+
require(`${process.cwd()}/dist/YOUR_PROJECT_NAME/server/main`).app()(request, response);
|
|
63
65
|
});
|
|
64
66
|
```
|
|
65
67
|
|
|
66
|
-
|
|
68
|
+
In the `server.ts` file generated by the Angular CLI ensure that the `index.html` is being read from the correct place.
|
|
69
|
+
|
|
70
|
+
As of writing the Angular CLI generates:
|
|
71
|
+
|
|
72
|
+
```typescript
|
|
73
|
+
const indexHtml = existsSync(join(distFolder, 'index.original.html')) ? 'index.original.html' : 'index.html';
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
this needs to be changed to:
|
|
77
|
+
|
|
78
|
+
```typescript
|
|
79
|
+
const indexHtml = existsSync(join(distFolder, 'index.original.html')) ? 'index.original.html' : join(distFolder, 'index.html');
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
So that the `index.html` is read from the correct `dist` folder.
|
|
83
|
+
|
|
84
|
+
You should now be able to run `npm run build` to build your project for Firebase Hosting and Cloud Functions.
|
|
85
|
+
|
|
86
|
+
To test, spin up the emulator with `firebase serve`. Once you've confirmed its working go ahead and `firebase deploy`.
|
|
67
87
|
|
|
68
|
-
|
|
88
|
+
_Note: Universal will now SSR your application and serve it, depending on how you have your deployment setup some assets may fail to
|
|
89
|
+
serve because the Cloud Function is at a different route than the `APP_BASE_REF` configured._
|
|
69
90
|
|
|
70
91
|
### [Next Step: Prerendering your Universal application](prerendering.md)
|
|
71
92
|
|
|
@@ -7,147 +7,22 @@ Server-side rendering (SSR) is the process of converting a JavaScript app to pla
|
|
|
7
7
|
- @angular/cli >= v6.0
|
|
8
8
|
- @angular/fire >= v5.0.0
|
|
9
9
|
|
|
10
|
-
## 1.
|
|
10
|
+
## 1. Add Angular Universal to your project
|
|
11
11
|
|
|
12
|
-
|
|
12
|
+
Follow the steps from the [Angular Universal Tutorial](https://angular.io/guide/universal) to add Universal to your
|
|
13
|
+
project.
|
|
13
14
|
|
|
14
15
|
```
|
|
15
|
-
ng
|
|
16
|
+
ng add @nguniversal/express-engine
|
|
16
17
|
```
|
|
17
18
|
|
|
18
|
-
|
|
19
|
+
This will create all the files you need and setup all the configurations for Universal rendering for your application.
|
|
19
20
|
|
|
20
|
-
|
|
21
|
+
## 2. Next Steps
|
|
21
22
|
|
|
22
|
-
|
|
23
|
-
npm install --save-dev @nguniversal/express-engine @nguniversal/module-map-ngfactory-loader express webpack-cli ts-loader ws xhr2
|
|
24
|
-
```
|
|
25
|
-
|
|
26
|
-
Create a file called `server.ts` in the root of you project.
|
|
27
|
-
|
|
28
|
-
```ts
|
|
29
|
-
// These are important and needed before anything else
|
|
30
|
-
import 'zone.js/dist/zone-node';
|
|
31
|
-
import 'reflect-metadata';
|
|
32
|
-
|
|
33
|
-
import { enableProdMode } from '@angular/core';
|
|
34
|
-
import { ngExpressEngine } from '@nguniversal/express-engine';
|
|
35
|
-
import { provideModuleMap } from '@nguniversal/module-map-ngfactory-loader';
|
|
36
|
-
|
|
37
|
-
import * as express from 'express';
|
|
38
|
-
import { join } from 'path';
|
|
39
|
-
import { readFileSync } from 'fs';
|
|
40
|
-
|
|
41
|
-
// Polyfills required for Firebase
|
|
42
|
-
(global as any).WebSocket = require('ws');
|
|
43
|
-
(global as any).XMLHttpRequest = require('xhr2');
|
|
44
|
-
|
|
45
|
-
// Faster renders in prod mode
|
|
46
|
-
enableProdMode();
|
|
47
|
-
|
|
48
|
-
// Export our express server
|
|
49
|
-
export const app = express();
|
|
50
|
-
|
|
51
|
-
const DIST_FOLDER = join(process.cwd(), 'dist');
|
|
52
|
-
const APP_NAME = 'YOUR_PROJECT_NAME'; // TODO: replace me!
|
|
53
|
-
|
|
54
|
-
const { AppServerModuleNgFactory, LAZY_MODULE_MAP } = require(`./dist/${APP_NAME}-server/main`);
|
|
55
|
-
|
|
56
|
-
// index.html template
|
|
57
|
-
const template = readFileSync(join(DIST_FOLDER, APP_NAME, 'index.html')).toString();
|
|
58
|
-
|
|
59
|
-
app.engine('html', ngExpressEngine({
|
|
60
|
-
bootstrap: AppServerModuleNgFactory,
|
|
61
|
-
providers: [
|
|
62
|
-
provideModuleMap(LAZY_MODULE_MAP)
|
|
63
|
-
]
|
|
64
|
-
}));
|
|
65
|
-
|
|
66
|
-
app.set('view engine', 'html');
|
|
67
|
-
app.set('views', join(DIST_FOLDER, APP_NAME));
|
|
68
|
-
|
|
69
|
-
// Serve static files
|
|
70
|
-
app.get('*.*', express.static(join(DIST_FOLDER, APP_NAME)));
|
|
71
|
-
|
|
72
|
-
// All regular routes use the Universal engine
|
|
73
|
-
app.get('*', (req, res) => {
|
|
74
|
-
res.render(join(DIST_FOLDER, APP_NAME, 'index.html'), { req });
|
|
75
|
-
});
|
|
76
|
-
|
|
77
|
-
// If we're not in the Cloud Functions environment, spin up a Node server
|
|
78
|
-
if (!process.env.FUNCTION_NAME) {
|
|
79
|
-
const PORT = process.env.PORT || 4000;
|
|
80
|
-
app.listen(PORT, () => {
|
|
81
|
-
console.log(`Node server listening on http://localhost:${PORT}`);
|
|
82
|
-
});
|
|
83
|
-
}
|
|
84
|
-
```
|
|
85
|
-
|
|
86
|
-
## 3. Add a Webpack Config for the Express Server
|
|
87
|
-
|
|
88
|
-
Create a new file named `webpack.server.config.js` to bundle the express app from previous step.
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
```js
|
|
92
|
-
const path = require('path');
|
|
93
|
-
const webpack = require('webpack');
|
|
94
|
-
|
|
95
|
-
const APP_NAME = 'YOUR_PROJECT_NAME'; // TODO: replace me!
|
|
96
|
-
|
|
97
|
-
module.exports = {
|
|
98
|
-
entry: { server: './server.ts' },
|
|
99
|
-
resolve: { extensions: ['.js', '.ts'] },
|
|
100
|
-
mode: 'development',
|
|
101
|
-
target: 'node',
|
|
102
|
-
externals: [
|
|
103
|
-
/* Firebase has some troubles being webpacked when in
|
|
104
|
-
in the Node environment, let's skip it.
|
|
105
|
-
Note: you may need to exclude other dependencies depending
|
|
106
|
-
on your project. */
|
|
107
|
-
/^firebase/
|
|
108
|
-
],
|
|
109
|
-
output: {
|
|
110
|
-
// Export a UMD of the webpacked server.ts & deps, for
|
|
111
|
-
// rendering in Cloud Functions
|
|
112
|
-
path: path.join(__dirname, `dist/${APP_NAME}-webpack`),
|
|
113
|
-
library: 'app',
|
|
114
|
-
libraryTarget: 'umd',
|
|
115
|
-
filename: '[name].js'
|
|
116
|
-
},
|
|
117
|
-
module: {
|
|
118
|
-
rules: [
|
|
119
|
-
{ test: /\.ts$/, loader: 'ts-loader' }
|
|
120
|
-
]
|
|
121
|
-
},
|
|
122
|
-
plugins: [
|
|
123
|
-
new webpack.ContextReplacementPlugin(
|
|
124
|
-
/(.+)?angular(\\|\/)core(.+)?/,
|
|
125
|
-
path.join(__dirname, 'src'), // location of your src
|
|
126
|
-
{} // a map of your routes
|
|
127
|
-
),
|
|
128
|
-
new webpack.ContextReplacementPlugin(
|
|
129
|
-
/(.+)?express(\\|\/)(.+)?/,
|
|
130
|
-
path.join(__dirname, 'src'),
|
|
131
|
-
{}
|
|
132
|
-
)
|
|
133
|
-
]
|
|
134
|
-
}
|
|
135
|
-
```
|
|
136
|
-
|
|
137
|
-
## 4.0 Build Scripts
|
|
138
|
-
|
|
139
|
-
Update your `package.json` with the following build scripts, replacing `YOUR_PROJECT_NAME` with the name of your project.
|
|
140
|
-
|
|
141
|
-
```js
|
|
142
|
-
"scripts": {
|
|
143
|
-
// ... omitted
|
|
144
|
-
"build": "ng build && npm run build:ssr",
|
|
145
|
-
"build:ssr": "ng run YOUR_PROJECT_NAME:server && npm run webpack:ssr",
|
|
146
|
-
"webpack:ssr": "webpack --config webpack.server.config.js",
|
|
147
|
-
"serve:ssr": "node dist/YOUR_PROJECT_NAME-webpack/server.js"
|
|
148
|
-
},
|
|
149
|
-
```
|
|
23
|
+
Test your app locally by running `npm run dev:ssr`.
|
|
150
24
|
|
|
151
|
-
|
|
25
|
+
_Note: `dev:ssr` is a command that was added to your `package.json` by the `ng add` command that will run the dev server
|
|
26
|
+
for your Angular with Universal._
|
|
152
27
|
|
|
153
28
|
### [Next Step: Deploying your Universal application on Cloud Functions for Firebase](cloud-functions.md)
|