willhlaw / node-firestore-backup-restore

Google Firebase Firestore backup and restore tool
91 stars 24 forks source link

calls listDocuments to also get refs to empty documents #55

Open kitfit-dave opened 5 years ago

kitfit-dave commented 5 years ago

can backup collections that only contain other collections

the api seems to have added listDocuments() to CollectionReference (it's not in the documentation that I can see though...), it returns an array of ~DocumentReferences. When youget()one of those, empty documents will haveexists === true`.

needs newer version of firebase-admin

looks like there could be some refactoring of the promise code, it's is getting a bit deeply nested. could also stop logging out the "restore" message when there will be no actual restore

there are 2 broken tests, but they seem to have already been broken...

see: willhlaw/node-firestore-backup-restore/issues/52 willhlaw/node-firestore-backup-restore/issues/40 also (in the other parent fork): steadyequipment/node-firestore-backup/issues/43 steadyequipment/node-firestore-backup/issues/28 and probably: steadyequipment/node-firestore-backup/issues/13 steadyequipment/node-firestore-backup/issues/12

and about the restore logging: willhlaw/node-firestore-backup-restore/issues/41