File tree Expand file tree Collapse file tree 1 file changed +16
-15
lines changed
Expand file tree Collapse file tree 1 file changed +16
-15
lines changed Original file line number Diff line number Diff line change @@ -47,10 +47,10 @@ export default class ReleasesFactory {
4747 public async findManyByProjectId ( projectId : string ) : Promise < ReleaseDBScheme [ ] > {
4848 try {
4949 const releases = await this . collection . aggregate < ReleaseWithFileDetails > ( [
50- {
51- $match : {
52- projectId : projectId
53- }
50+ {
51+ $match : {
52+ projectId : projectId ,
53+ } ,
5454 } ,
5555 {
5656 $lookup : {
@@ -60,21 +60,21 @@ export default class ReleasesFactory {
6060 {
6161 $match : {
6262 $expr : {
63- $in : [ '$_id' , '$$fileIds' ]
64- }
65- }
63+ $in : [ '$_id' , '$$fileIds' ] ,
64+ } ,
65+ } ,
6666 } ,
6767 {
6868 $project : {
6969 _id : 1 ,
7070 length : 1 ,
71- chunkSize : 1
72- }
73- }
71+ chunkSize : 1 ,
72+ } ,
73+ } ,
7474 ] ,
75- as : 'fileDetails'
76- }
77- }
75+ as : 'fileDetails' ,
76+ } ,
77+ } ,
7878 ] ) . toArray ( ) ;
7979
8080 return releases . map ( release => ( {
@@ -83,11 +83,12 @@ export default class ReleasesFactory {
8383 const fileDetail = release . fileDetails ?. find (
8484 ( detail : SourceMapFileChunk ) => detail . _id . toString ( ) === file . _id ?. toString ( )
8585 ) ;
86+
8687 return {
8788 ...file ,
88- size : fileDetail ? fileDetail . length : 0
89+ size : fileDetail ? fileDetail . length : 0 ,
8990 } ;
90- } )
91+ } ) ,
9192 } ) ) ;
9293 } catch ( error ) {
9394 console . error ( `[ReleasesFactory] Error in findManyByProjectId:` , error ) ;
You can’t perform that action at this time.
0 commit comments