@@ -65,24 +65,23 @@ const baselineFlag = process.argv.includes("--baseline")
6565const skipInstall = process . argv . includes ( "--skip-install" )
6666const skipEmbedWebUi = process . argv . includes ( "--skip-embed-web-ui" )
6767
68-
69- const createEmbeddedWebUIBundle = async ( ) => {
70- console . log ( `Building Web UI to embed in the binary` ) ;
71- const appDir = path . join ( import . meta. dirname , "../../app" )
72- await $ `bun run --cwd ${ appDir } build` ;
73- const allFiles = await Array . fromAsync ( new Bun . Glob ( "**/*" ) . scan ( { cwd : path . join ( appDir , "dist" ) } ) ) ;
74- const fileMap = `
68+ const createEmbeddedWebUIBundle = async ( ) => {
69+ console . log ( `Building Web UI to embed in the binary` )
70+ const appDir = path . join ( import . meta. dirname , "../../app" )
71+ await $ `bun run --cwd ${ appDir } build`
72+ const allFiles = await Array . fromAsync ( new Bun . Glob ( "**/*" ) . scan ( { cwd : path . join ( appDir , "dist" ) } ) )
73+ const fileMap = `
7574 // Import all files as file_$i with type: "file"
7675 ${ allFiles . map ( ( filePath , i ) => `import file_${ i } from "${ path . join ( appDir , "dist" , filePath ) } " with { type: "file" };` ) . join ( "\n" ) }
7776 // Export with original mappings
7877 export default {
79- ${ allFiles . map ( ( filePath , i ) => `"${ filePath } ": file_${ i } ,` ) . join ( "\n" ) }
78+ ${ allFiles . map ( ( filePath , i ) => `"${ filePath } ": file_${ i } ,` ) . join ( "\n" ) }
8079 }
8180 ` . trim ( )
82- return fileMap ;
81+ return fileMap
8382}
8483
85- const embeddedFileMap = skipEmbedWebUi ? null : await createEmbeddedWebUIBundle ( ) ;
84+ const embeddedFileMap = skipEmbedWebUi ? null : await createEmbeddedWebUIBundle ( )
8685
8786const allTargets : {
8887 os : string
0 commit comments