flutterfire_cli icon indicating copy to clipboard operation
flutterfire_cli copied to clipboard

chore: format generated firebase.json for readability

Open amalej opened this issue 2 months ago โ€ข 1 comments

Description

Running flutterfire configure generates a firebase.json like

{"firestore":{"database":"(default)","location":"nam5","rules":"firestore.rules","indexes":"firestore.indexes.json"},"flutter":{"platforms":{"dart":{"lib/firebase_options.dart":{"projectId":"PROJECT_ID","configurations":{"web":"APP_ID"}}}}}}

Add formatting to the generated firebase.json output when running flutterfire configure.

{
  "firestore": {
    "database": "(default)",
    "location": "nam5",
    "rules": "firestore.rules",
    "indexes": "firestore.indexes.json"
  },
  "flutter": {
    "platforms": {
      "dart": {
        "lib/firebase_options.dart": {
          "projectId": "PROJECT_ID",
          "configurations": {
            "web": "APP_ID"
          }
        }
      }
    }
  }
}

Type of Change

  • [ ] โœจ feat -- New feature (non-breaking change which adds functionality)
  • [ ] ๐Ÿ› ๏ธ fix -- Bug fix (non-breaking change which fixes an issue)
  • [ ] โŒ ! -- Breaking change (fix or feature that would cause existing functionality to change)
  • [ ] ๐Ÿงน refactor -- Code refactor
  • [ ] โœ… ci -- Build configuration change
  • [ ] ๐Ÿ“ docs -- Documentation
  • [X] ๐Ÿ—‘๏ธ chore -- Chore

note: it doesn't seem like writeFirebaseJsonFile is used anywhere, but updating it anyway. in case we'd prefer this to be removed, just let me know

amalej avatar Nov 30 '25 19:11 amalej