@@ -49,7 +49,7 @@ export class Exporter {
4949 constructor (
5050 private connection : FirestoreConnectionOptions | Firestore ,
5151 private writer : IDataSourceWriter ,
52- private logger : Logger
52+ private logger : Logger ,
5353 ) { }
5454
5555 async run ( options : ExportOptions ) {
@@ -64,7 +64,7 @@ export class Exporter {
6464 const overwritten = await this . writer . open ( overwrite ) ;
6565 if ( overwritten )
6666 this . logger . debug (
67- `Overwriting existing data at ${ dir ( this . writer . path ) } `
67+ `Overwriting existing data at ${ dir ( this . writer . path ) } ` ,
6868 ) ;
6969
7070 // Get starting paths to explore
@@ -143,7 +143,7 @@ export class Exporter {
143143 `${ count ( this . exploring ) } exploring` ,
144144 `${ count ( this . exploreQueue ) } to explore` ,
145145 `${ count ( this . reads ) } reads` ,
146- ] . join ( ", " )
146+ ] . join ( ", " ) ,
147147 ) ;
148148 }
149149
@@ -171,7 +171,7 @@ export class Exporter {
171171
172172 const [ docPaths , colPaths ] = split ( paths , isDocumentPath ) ;
173173 const docPathsFiltered = docPaths . filter ( ( path ) =>
174- typeof depth === "number" ? documentPathDepth ( path ) < depth : true
174+ typeof depth === "number" ? documentPathDepth ( path ) < depth : true ,
175175 ) ;
176176 this . exploring . decrement ( docPaths . length - docPathsFiltered . length ) ;
177177
@@ -183,11 +183,11 @@ export class Exporter {
183183
184184 private async exploreForDocuments (
185185 paths : string [ ] ,
186- limit ?: number | undefined
186+ limit ?: number | undefined ,
187187 ) {
188188 if ( paths . length > 0 )
189189 this . logger . debug (
190- `Exploring for documents in ${ plural ( paths , "collection" ) } `
190+ `Exploring for documents in ${ plural ( paths , "collection" ) } ` ,
191191 ) ;
192192
193193 for ( const path of paths ) {
@@ -230,7 +230,7 @@ export class Exporter {
230230 private async exploreForSubcollections ( paths : string [ ] ) {
231231 if ( paths . length > 0 )
232232 this . logger . debug (
233- `Exploring for subcollections in ${ plural ( paths , "document" ) } `
233+ `Exploring for subcollections in ${ plural ( paths , "document" ) } ` ,
234234 ) ;
235235
236236 if ( this . limitReached ) {
@@ -243,8 +243,8 @@ export class Exporter {
243243 // The number of paths shouldn't exceed `exploreChunkSize` anyway
244244 const subcollectionsList = await Promise . all (
245245 paths . map ( ( path ) =>
246- ( path ? this . firestore . doc ( path ) : this . firestore ) . listCollections ( )
247- )
246+ ( path ? this . firestore . doc ( path ) : this . firestore ) . listCollections ( ) ,
247+ ) ,
248248 ) ;
249249
250250 const subcollections = subcollectionsList . flat ( ) ;
@@ -294,7 +294,7 @@ export class Exporter {
294294 if ( readyToExport . length >= remaining ) this . limitReached = true ;
295295 readyToExport = readyToExport . splice ( 0 , remaining ) ;
296296 this . logger . verbose (
297- `Exports remaining: ${ count ( remaining ) } / ${ count ( limit ) } `
297+ `Exports remaining: ${ count ( remaining ) } / ${ count ( limit ) } ` ,
298298 ) ;
299299 }
300300
@@ -307,7 +307,7 @@ export class Exporter {
307307
308308 const [ paths , snapshots ] = splitStrict (
309309 readyToExport ,
310- ( ex ) : ex is string => typeof ex === "string"
310+ ( ex ) : ex is string => typeof ex === "string" ,
311311 ) ;
312312
313313 const refs = paths . map ( ( path ) => this . firestore . doc ( path ) ) ;
@@ -319,7 +319,7 @@ export class Exporter {
319319 . map ( ( snapshot ) => {
320320 const document = FirestoreDocument . serialize (
321321 snapshot . ref . path ,
322- snapshot . data ( )
322+ snapshot . data ( ) ,
323323 ) ;
324324 if ( document ) return JSON . stringify ( document ) ;
325325 return null ;
@@ -331,7 +331,7 @@ export class Exporter {
331331 this . exporting . decrement ( readyToExport . length ) ;
332332
333333 this . logger . debug (
334- `Successfully exported ${ plural ( serializedDocuments , "document" ) } `
334+ `Successfully exported ${ plural ( serializedDocuments , "document" ) } ` ,
335335 ) ;
336336 }
337337}
0 commit comments