File tree Expand file tree Collapse file tree 1 file changed +9
-1
lines changed
packages/core/src/codewhisperer/service/transformByQ Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -378,7 +378,15 @@ export async function zipCode(
378378 continue
379379 }
380380 const relativePath = path . relative ( dependenciesFolder . path , file )
381- zip . addLocalFile ( file , path . dirname ( relativePath ) )
381+ if ( relativePath . includes ( 'compilations.json' ) ) {
382+ let fileContents = await nodefs . promises . readFile ( file , 'utf-8' )
383+ if ( os . platform ( ) === 'win32' ) {
384+ fileContents = fileContents . replace ( / \\ \\ / g, '/' )
385+ }
386+ zip . addFile ( 'compilations.json' , Buffer . from ( fileContents , 'utf-8' ) )
387+ } else {
388+ zip . addLocalFile ( file , path . dirname ( relativePath ) )
389+ }
382390 dependencyFilesSize += ( await nodefs . promises . stat ( file ) ) . size
383391 }
384392 getLogger ( ) . info ( `CodeTransformation: dependency files size = ${ dependencyFilesSize } ` )
You can’t perform that action at this time.
0 commit comments