@@ -7,6 +7,7 @@ export async function parseInputs(cliInputs) {
7
7
const __dirname = dirname ( fileURLToPath ( import . meta. url ) ) ;
8
8
9
9
let component = false ;
10
+ let adapter ;
10
11
let enableExperimentalHighResolutionTimeMethods = false ;
11
12
let customEngineSet = false ;
12
13
let wasmEngine = join ( __dirname , "../js-compute-runtime.wasm" ) ;
@@ -15,6 +16,12 @@ export async function parseInputs(cliInputs) {
15
16
let customOutputSet = false ;
16
17
let output = join ( process . cwd ( ) , "bin/main.wasm" ) ;
17
18
let cliInput ;
19
+
20
+ let useComponent = ( ) => {
21
+ component = true ;
22
+ wasmEngine = join ( __dirname , "../js-compute-runtime-component.wasm" ) ;
23
+ } ;
24
+
18
25
// eslint-disable-next-line no-cond-assign
19
26
loop: while ( ( cliInput = cliInputs . shift ( ) ) ) {
20
27
switch ( cliInput ) {
@@ -34,8 +41,12 @@ export async function parseInputs(cliInputs) {
34
41
return { help : true } ;
35
42
}
36
43
case "--component" : {
37
- component = true ;
38
- wasmEngine = join ( __dirname , "../js-compute-runtime-component.wasm" ) ;
44
+ useComponent ( ) ;
45
+ break ;
46
+ }
47
+ case "--component-adapter" : {
48
+ useComponent ( ) ;
49
+ adapter = cliInputs . shift ( ) ;
39
50
break ;
40
51
}
41
52
case "--engine-wasm" : {
@@ -93,5 +104,5 @@ export async function parseInputs(cliInputs) {
93
104
}
94
105
}
95
106
}
96
- return { wasmEngine, component, input, output, enableExperimentalHighResolutionTimeMethods } ;
107
+ return { wasmEngine, component, adapter , input, output, enableExperimentalHighResolutionTimeMethods } ;
97
108
}
0 commit comments