@@ -12,8 +12,7 @@ export class WindowsScriptingHost extends EventEmitter {
1212 const command = options . command || COMMAND ;
1313 const args = options . args || ARGS ;
1414 const scriptFile = options . scriptFile || SCRIPT_FILE ;
15- const trace = options . trace || 0 ;
16- return new WindowsScriptingHost ( await Syncline . spawn ( command , [ ...args , scriptFile ] , { trace} ) ) ;
15+ return new WindowsScriptingHost ( await Syncline . spawn ( command , [ ...args , scriptFile ] , options . syncline ) , options ) ;
1716 }
1817
1918 #syncline;
@@ -22,11 +21,15 @@ export class WindowsScriptingHost extends EventEmitter {
2221 #ref2proxy = new Map ( ) ; // Map< string, WeakRef< Proxy | <custom-mapped>>>
2322 #proxy2ref = new WeakMap ( ) ; // Map< Proxy | <custom-mapped>, string>
2423
25- constructor ( syncline ) {
24+ constructor ( syncline , options ) {
2625 super ( ) ;
2726 this . #syncline = syncline ;
2827 this . #syncline. on ( 'stderr' , line => console . log ( 'wsh-stderr:' , line ) ) ;
2928 this . #syncline. on ( 'stdout' , line => console . log ( 'wsh-stdout:' , line ) ) ;
29+ if ( options . printSynclineIO ) {
30+ this . #syncline. on ( 'input' , line => console . log ( 'syncline-input:' , line ) ) ;
31+ this . #syncline. on ( 'output' , line => console . log ( 'syncline-output' , line ) ) ;
32+ }
3033 }
3134
3235 get remoteObjects ( ) {
0 commit comments