@@ -38,7 +38,7 @@ describe('smoketest: object-oriented devbox', () => {
3838
3939 test ( 'execute synchronous command' , async ( ) => {
4040 expect ( devbox ) . toBeDefined ( ) ;
41- const result = await devbox . cmd . exec ( { command : 'echo "Hello from SDK!"' } ) ;
41+ const result = await devbox . cmd . exec ( 'echo "Hello from SDK!"' ) ;
4242 expect ( result ) . toBeDefined ( ) ;
4343 expect ( result . exitCode ) . toBe ( 0 ) ;
4444 const output = await result . stdout ( ) ;
@@ -47,7 +47,7 @@ describe('smoketest: object-oriented devbox', () => {
4747
4848 test ( 'execute asynchronous command' , async ( ) => {
4949 expect ( devbox ) . toBeDefined ( ) ;
50- const execution = await devbox . cmd . execAsync ( { command : 'sleep 2 && echo "Async command completed"' } ) ;
50+ const execution = await devbox . cmd . execAsync ( 'sleep 2 && echo "Async command completed"' ) ;
5151 expect ( execution ) . toBeDefined ( ) ;
5252 expect ( execution . executionId ) . toBeTruthy ( ) ;
5353
@@ -298,8 +298,7 @@ describe('smoketest: object-oriented devbox', () => {
298298 test ( 'exec with stdout callback' , async ( ) => {
299299 const stdoutLines : string [ ] = [ ] ;
300300
301- const result = await devbox . cmd . exec ( {
302- command : 'echo "line1" && echo "line2" && echo "line3"' ,
301+ const result = await devbox . cmd . exec ( 'echo "line1" && echo "line2" && echo "line3"' , {
303302 stdout : ( line ) => {
304303 stdoutLines . push ( line ) ;
305304 } ,
@@ -319,8 +318,7 @@ describe('smoketest: object-oriented devbox', () => {
319318 test ( 'exec with stderr callback' , async ( ) => {
320319 const stderrLines : string [ ] = [ ] ;
321320
322- const result = await devbox . cmd . exec ( {
323- command : 'echo "error1" >&2 && echo "error2" >&2' ,
321+ const result = await devbox . cmd . exec ( 'echo "error1" >&2 && echo "error2" >&2' , {
324322 stderr : ( line ) => {
325323 stderrLines . push ( line ) ;
326324 } ,
@@ -339,8 +337,7 @@ describe('smoketest: object-oriented devbox', () => {
339337 test ( 'exec with output callback (both stdout and stderr)' , async ( ) => {
340338 const allLines : string [ ] = [ ] ;
341339
342- const result = await devbox . cmd . exec ( {
343- command : 'echo "stdout1" && echo "stderr1" >&2 && echo "stdout2"' ,
340+ const result = await devbox . cmd . exec ( 'echo "stdout1" && echo "stderr1" >&2 && echo "stdout2"' , {
344341 output : ( line ) => {
345342 allLines . push ( line ) ;
346343 } ,
@@ -360,8 +357,7 @@ describe('smoketest: object-oriented devbox', () => {
360357 const stderrLines : string [ ] = [ ] ;
361358 const outputLines : string [ ] = [ ] ;
362359
363- const result = await devbox . cmd . exec ( {
364- command : 'echo "out1" && echo "err1" >&2 && echo "out2"' ,
360+ const result = await devbox . cmd . exec ( 'echo "out1" && echo "err1" >&2 && echo "out2"' , {
365361 stdout : ( line ) => stdoutLines . push ( line ) ,
366362 stderr : ( line ) => stderrLines . push ( line ) ,
367363 output : ( line ) => outputLines . push ( line ) ,
@@ -387,9 +383,7 @@ describe('smoketest: object-oriented devbox', () => {
387383 } ) ;
388384
389385 test ( 'exec WITHOUT callbacks (preserve existing behavior)' , async ( ) => {
390- const result = await devbox . cmd . exec ( {
391- command : 'echo "test output"' ,
392- } ) ;
386+ const result = await devbox . cmd . exec ( 'echo "test output"' ) ;
393387
394388 expect ( result . success ) . toBe ( true ) ;
395389 expect ( result . exitCode ) . toBe ( 0 ) ;
@@ -402,8 +396,7 @@ describe('smoketest: object-oriented devbox', () => {
402396 let receivedBeforeCompletion = false ;
403397
404398 // Start async execution with streaming
405- const execution = await devbox . cmd . execAsync ( {
406- command : 'echo "immediate" && sleep 2 && echo "delayed"' ,
399+ const execution = await devbox . cmd . execAsync ( 'echo "immediate" && sleep 2 && echo "delayed"' , {
407400 stdout : ( line ) => {
408401 stdoutLines . push ( line ) ;
409402 if ( line . includes ( 'immediate' ) ) {
@@ -434,8 +427,7 @@ describe('smoketest: object-oriented devbox', () => {
434427 test ( 'execAsync with stderr callback' , async ( ) => {
435428 const stderrLines : string [ ] = [ ] ;
436429
437- const execution = await devbox . cmd . execAsync ( {
438- command : 'echo "error output" >&2' ,
430+ const execution = await devbox . cmd . execAsync ( 'echo "error output" >&2' , {
439431 stderr : ( line ) => {
440432 stderrLines . push ( line ) ;
441433 } ,
@@ -455,8 +447,7 @@ describe('smoketest: object-oriented devbox', () => {
455447 const stdoutLines : string [ ] = [ ] ;
456448 const stderrLines : string [ ] = [ ] ;
457449
458- const result = await devbox . cmd . exec ( {
459- command : 'echo "to stdout" && echo "to stderr" >&2 && echo "more stdout"' ,
450+ const result = await devbox . cmd . exec ( 'echo "to stdout" && echo "to stderr" >&2 && echo "more stdout"' , {
460451 stdout : ( line ) => stdoutLines . push ( line ) ,
461452 stderr : ( line ) => stderrLines . push ( line ) ,
462453 } ) ;
@@ -480,8 +471,7 @@ describe('smoketest: object-oriented devbox', () => {
480471 test ( 'exec with long output - verify all lines received' , async ( ) => {
481472 const stdoutLines : string [ ] = [ ] ;
482473
483- const result = await devbox . cmd . exec ( {
484- command : 'for i in {1..1000}; do echo "line $i"; done' ,
474+ const result = await devbox . cmd . exec ( 'for i in {1..1000}; do echo "line $i"; done' , {
485475 stdout : ( line ) => stdoutLines . push ( line ) ,
486476 } ) ;
487477
@@ -511,16 +501,14 @@ describe('smoketest: object-oriented devbox', () => {
511501 let taskBCount = 0 ;
512502
513503 // Start both executions at the same time (don't await)
514- const executionA = devbox . cmd . execAsync ( {
515- command : 'echo "A1" && sleep 0.5 && echo "A2" && sleep 0.5 && echo "A3"' ,
504+ const executionA = devbox . cmd . execAsync ( 'echo "A1" && sleep 0.5 && echo "A2" && sleep 0.5 && echo "A3"' , {
516505 stdout : ( line ) => {
517506 taskALogs . push ( line ) ;
518507 taskACount ++ ;
519508 } ,
520509 } ) ;
521510
522- const executionB = devbox . cmd . execAsync ( {
523- command : 'sleep 0.3 && echo "B1" && sleep 0.5 && echo "B2" && sleep 0.5 && echo "B3"' ,
511+ const executionB = devbox . cmd . execAsync ( 'sleep 0.3 && echo "B1" && sleep 0.5 && echo "B2" && sleep 0.5 && echo "B3"' , {
524512 stdout : ( line ) => {
525513 taskBLogs . push ( line ) ;
526514 taskBCount ++ ;
0 commit comments