@@ -26,10 +26,9 @@ async function main() {
2626 let CliArgs = getCliArgs ( ) ;
2727 let src = CliArgs . input ;
2828 let outputPath = CliArgs . output ;
29- let runtimeArgs = [
30- CliArgs . debug && '--enable-script-debugging' ,
31- CliArgs . initLocation && `--init-location ${ CliArgs . initLocation } `
32- ] . filter ( Boolean ) . join ( ' ' ) ;
29+ let runtimeArgs = [ ]
30+ CliArgs . debug && runtimeArgs . push ( '--enable-script-debugging' ) ;
31+ CliArgs . initLocation && runtimeArgs . push ( `--init-location ${ CliArgs . initLocation } ` ) ;
3332
3433 // generate wit world string
3534 let wasiDeps = getPackagesWithWasiDeps ( process . cwd ( ) , new Set ( ) , true ) ;
@@ -64,7 +63,7 @@ async function main() {
6463
6564 let inlineWitChecksum = await calculateChecksum ( inlineWit ) ;
6665 // Small optimization to skip componentization if the source file hasn't changed
67- if ( ! ( await ShouldComponentize ( src , outputPath , componentizeVersion , runtimeArgs , inlineWitChecksum ) ) ) {
66+ if ( ! ( await ShouldComponentize ( src , outputPath , componentizeVersion , runtimeArgs . join ( " " ) , inlineWitChecksum ) ) ) {
6867 console . log (
6968 'No changes detected in source file and target World. Skipping componentization.' ,
7069 ) ;
@@ -99,7 +98,7 @@ async function main() {
9998 sourcePath : precompiledSourcePath ,
10099 // @ts -ignore
101100 witWorld : inlineWit ,
102- runtimeArgs,
101+ runtimeArgs : runtimeArgs . join ( " " ) ,
103102 enableAot : CliArgs . aot ,
104103 } ) ;
105104
@@ -110,7 +109,7 @@ async function main() {
110109 getBuildDataPath ( src ) ,
111110 await calculateChecksum ( await readFile ( src ) ) ,
112111 componentizeVersion ,
113- runtimeArgs ,
112+ runtimeArgs . join ( " " ) ,
114113 inlineWitChecksum ,
115114 ) ;
116115
0 commit comments