File tree Expand file tree Collapse file tree
utils/misc/nodejs-terminal/v2.0 Expand file tree Collapse file tree Original file line number Diff line number Diff line change 433433 } //more
434434
435435
436- //:
437-
438-
439- ui . info = function ( ) {
440-
441- var str = 'none' ;
442- var src = blank ;
443-
444- if ( cur . file ) {
445- str = cur . file . name ;
446- src = cur . file . icon ;
447- }
448- $ ( '#hdr #filename' ) . textContent = str ;
449- $ ( '#file-info #icon' ) . src = src ;
450-
451- var str = '' ;
452- if ( cur . blob ) {
453- str = hs ( cur . blob . size ) ;
454- }
455- $ ( '#hdr #size' ) . textContent = str ;
456-
457- } //info
458-
459-
460- //:
461-
462-
463436 install [ 'https-server' ] = async function ( ) {
464437
465438 log . green ( 'installing https-server' ) ;
466439
467- debugger ;
468- var process = await shell . _process . bind ( shell . _process ) ;
469-
470- var cwd = await process . cwd ( ) ;
471- console . log ( cwd ) ;
472-
473440 var mod = await import ( 'https://code.ext-code.com/nodejs/servers/https-server/create-archive.m.js' ) ;
474441
475442
497464
498465 } //for
499466
500- await webcontainer . spawn ( 'npm' , [ 'i' ] , { cwd} ) ;
501467
502468 log . green ( 'done.' ) ;
503469
504470 } //https-server
505471
472+
473+ //:
474+
475+
476+ ui . info = function ( ) {
477+
478+ var str = 'none' ;
479+ var src = blank ;
480+
481+ if ( cur . file ) {
482+ str = cur . file . name ;
483+ src = cur . file . icon ;
484+ }
485+ $ ( '#hdr #filename' ) . textContent = str ;
486+ $ ( '#file-info #icon' ) . src = src ;
487+
488+ var str = '' ;
489+ if ( cur . blob ) {
490+ str = hs ( cur . blob . size ) ;
491+ }
492+ $ ( '#hdr #size' ) . textContent = str ;
493+
494+ } //info
495+
496+
506497 //:
507498
508499
715706 await webcontainer . mount ( files ) ;
716707 term . write ( 'spawn jsh ...\r\n' )
717708 shell = await webcontainer . spawn ( 'jsh' ) ;
718- console . dir ( shell . _process , { depth : 10 } ) ;
719-
709+
710+
720711 var output = new WritableStream ( { write ( data ) { term . write ( data ) } } ) ;
721712 shell . output . pipeTo ( output ) ;
722713
726717 //term.resize();
727718 term . focus ( ) ;
728719
729- console . log ( await webcontainer . fs . readdir ( '/' ) ) ;
730-
731720 } ) ( ) ;
732721
733722
You can’t perform that action at this time.
0 commit comments