Title: feat(schematics): generate .firebaserc and Firestore starter files during ng add by armando-navarro · Pull Request #3714 · angular/angularfire · GitHub
Open Graph Title: feat(schematics): generate .firebaserc and Firestore starter files during ng add by armando-navarro · Pull Request #3714 · angular/angularfire
X Title: feat(schematics): generate .firebaserc and Firestore starter files during ng add by armando-navarro · Pull Request #3714 · angular/angularfire
Description: Fixes #3713 ng add @angular/fire currently leaves the workspace un-deployable: the project selected during setup is recorded nowhere, firebase.json stays {} (#3559), and selecting Firestore produces no security rules. This PR makes the setup schematic generate the same starter files firebase init would: .firebaserc — records the selected project as projects.default, merging into an existing file (other aliases and targets preserved). Written to the real filesystem after the firebaseTools.init calls, since init writes .firebaserc on disk during the same run. firestore.rules — only when Firestore is selected and no rules file exists: the same test-mode starter template firebase init firestore uses (30-day expiry), with a warning logged at generation time. Never overwrites an existing rules file. firestore.indexes.json — an empty manifest, so a plain firebase deploy doesn't fail on the referenced-but-missing file. firebase.json gains the firestore section pointing at both files, written after the Data Connect initialization (which rewrites firebase.json on disk during the same run). The rules and indexes files go through the schematic Tree (visible in the CREATE log, honored by --dry-run); .firebaserc and the firebase.json section are written to the real filesystem because firebase-tools reads and writes both during the same run. Includes 14 specs (setup/firebaseConfigs.jasmine.ts); verified end-to-end against a real project (all four artifacts generated correctly; firebase use resolves without prompting). Known limitations, not addressed here: the initial firebase.json '{}' write at the top of the flow (pre-existing) uses a raw writeFileSync and fires even under --dry-run; and because the firebase.json firestore section reaches disk before the Tree-staged rules/indexes files do, a failure late in the schematic can leave firebase.json referencing files that were never written. Moving firebase.json fully onto the Tree — the deeper fix for both — is a larger refactor.
Open Graph Description: Fixes #3713 ng add @angular/fire currently leaves the workspace un-deployable: the project selected during setup is recorded nowhere, firebase.json stays {} (#3559), and selecting Firestore produce...
X Description: Fixes #3713 ng add @angular/fire currently leaves the workspace un-deployable: the project selected during setup is recorded nowhere, firebase.json stays {} (#3559), and selecting Firestore produce...
Opengraph URL: https://github.com/angular/angularfire/pull/3714
X: @github
Domain: github.com
| route-pattern | /:user_id/:repository/pull/:id/files(.:format) |
| route-controller | pull_requests |
| route-action | files |
| fetch-nonce | v2:dd28229b-311c-d867-ee25-22763863de3f |
| current-catalog-service-hash | ae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b |
| request-id | A93C:248D3C:249DCB4:3091A41:6A5D7972 |
| html-safe-nonce | 4e2ea30cc08eb759cc5080545cb77fc760cd0899da36410cfc7493f5d35c3bc2 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBOTNDOjI0OEQzQzoyNDlEQ0I0OjMwOTFBNDE6NkE1RDc5NzIiLCJ2aXNpdG9yX2lkIjoiODk3NTk5Nzk4NTU2NzM3MzY4MiIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 08e41959a12732b3a77e5966da0bf9649be9b2f66d6f2e659c06aa7c3041fdd5 |
| hovercard-subject-tag | pull_request:4063006383 |
| github-keyboard-shortcuts | repository,pull-request-list,pull-request-conversation,pull-request-files-changed,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/angular/angularfire/pull/3714/files |
| twitter:image | https://avatars.githubusercontent.com/u/13904589?s=400&v=4 |
| twitter:card | summary_large_image |
| og:image | https://avatars.githubusercontent.com/u/13904589?s=400&v=4 |
| og:image:alt | Fixes #3713 ng add @angular/fire currently leaves the workspace un-deployable: the project selected during setup is recorded nowhere, firebase.json stays {} (#3559), and selecting Firestore produce... |
| og:site_name | GitHub |
| og:type | object |
| hostname | github.com |
| expected-hostname | github.com |
| None | 5290d7e14309ad1e76106a9c4237bd1041517e83ea182c8ab756752cb0c6940b |
| turbo-cache-control | no-preview |
| diff-view | unified |
| go-import | github.com/angular/angularfire git https://github.com/angular/angularfire.git |
| octolytics-dimension-user_id | 139426 |
| octolytics-dimension-user_login | angular |
| octolytics-dimension-repository_id | 49453413 |
| octolytics-dimension-repository_nwo | angular/angularfire |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 49453413 |
| octolytics-dimension-repository_network_root_nwo | angular/angularfire |
| turbo-body-classes | logged-out env-production page-responsive full-width |
| disable-turbo | true |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 9c975978430e9ad293956f2bbdaf153b1bd84a99 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width