@@ -24,7 +24,7 @@ export class CoreServiceImpl implements CoreService {
2424 protected readonly notificationService : NotificationServiceServer ;
2525
2626 async compile ( options : CoreService . Compile . Options & { exportBinaries : boolean } ) : Promise < void > {
27- this . outputService . append ( { name : 'compile' , chunk : 'Compile...\n' + JSON . stringify ( options , null , 2 ) + '\n--------------------------\n' } ) ;
27+ this . outputService . append ( { chunk : 'Compile...\n' + JSON . stringify ( options , null , 2 ) + '\n--------------------------\n' } ) ;
2828 const { sketchUri, fqbn } = options ;
2929 const sketchFilePath = FileUri . fsPath ( sketchUri ) ;
3030 const sketchpath = dirname ( sketchFilePath ) ;
@@ -48,15 +48,15 @@ export class CoreServiceImpl implements CoreService {
4848 try {
4949 await new Promise < void > ( ( resolve , reject ) => {
5050 result . on ( 'data' , ( cr : CompileResp ) => {
51- this . outputService . append ( { name : 'compile' , chunk : Buffer . from ( cr . getOutStream_asU8 ( ) ) . toString ( ) } ) ;
52- this . outputService . append ( { name : 'compile' , chunk : Buffer . from ( cr . getErrStream_asU8 ( ) ) . toString ( ) } ) ;
51+ this . outputService . append ( { chunk : Buffer . from ( cr . getOutStream_asU8 ( ) ) . toString ( ) } ) ;
52+ this . outputService . append ( { chunk : Buffer . from ( cr . getErrStream_asU8 ( ) ) . toString ( ) } ) ;
5353 } ) ;
5454 result . on ( 'error' , error => reject ( error ) ) ;
5555 result . on ( 'end' , ( ) => resolve ( ) ) ;
5656 } ) ;
57- this . outputService . append ( { name : 'compile' , chunk : '\n--------------------------\nCompilation complete.\n' } ) ;
57+ this . outputService . append ( { chunk : '\n--------------------------\nCompilation complete.\n' } ) ;
5858 } catch ( e ) {
59- this . outputService . append ( { name : 'compile' , chunk : `Compilation error: ${ e } \n` , severity : 'error' } ) ;
59+ this . outputService . append ( { chunk : `Compilation error: ${ e } \n` , severity : 'error' } ) ;
6060 throw e ;
6161 }
6262 }
@@ -77,7 +77,7 @@ export class CoreServiceImpl implements CoreService {
7777
7878 await this . compile ( Object . assign ( options , { exportBinaries : false } ) ) ;
7979 const chunk = firstToUpperCase ( task ) + '...\n' ;
80- this . outputService . append ( { name : 'upload' , chunk : chunk + JSON . stringify ( options , null , 2 ) + '\n--------------------------\n' } ) ;
80+ this . outputService . append ( { chunk : chunk + JSON . stringify ( options , null , 2 ) + '\n--------------------------\n' } ) ;
8181 const { sketchUri, fqbn, port, programmer } = options ;
8282 const sketchFilePath = FileUri . fsPath ( sketchUri ) ;
8383 const sketchpath = dirname ( sketchFilePath ) ;
@@ -104,15 +104,15 @@ export class CoreServiceImpl implements CoreService {
104104 try {
105105 await new Promise < void > ( ( resolve , reject ) => {
106106 result . on ( 'data' , ( resp : UploadResp ) => {
107- this . outputService . append ( { name : task , chunk : Buffer . from ( resp . getOutStream_asU8 ( ) ) . toString ( ) } ) ;
108- this . outputService . append ( { name : task , chunk : Buffer . from ( resp . getErrStream_asU8 ( ) ) . toString ( ) } ) ;
107+ this . outputService . append ( { chunk : Buffer . from ( resp . getOutStream_asU8 ( ) ) . toString ( ) } ) ;
108+ this . outputService . append ( { chunk : Buffer . from ( resp . getErrStream_asU8 ( ) ) . toString ( ) } ) ;
109109 } ) ;
110110 result . on ( 'error' , error => reject ( error ) ) ;
111111 result . on ( 'end' , ( ) => resolve ( ) ) ;
112112 } ) ;
113- this . outputService . append ( { name : 'upload' , chunk : '\n--------------------------\n' + firstToLowerCase ( task ) + ' complete.\n' } ) ;
113+ this . outputService . append ( { chunk : '\n--------------------------\n' + firstToLowerCase ( task ) + ' complete.\n' } ) ;
114114 } catch ( e ) {
115- this . outputService . append ( { name : 'upload' , chunk : `${ firstToUpperCase ( task ) } error: ${ e } \n` , severity : 'error' } ) ;
115+ this . outputService . append ( { chunk : `${ firstToUpperCase ( task ) } error: ${ e } \n` , severity : 'error' } ) ;
116116 throw e ;
117117 }
118118 }
@@ -138,14 +138,14 @@ export class CoreServiceImpl implements CoreService {
138138 try {
139139 await new Promise < void > ( ( resolve , reject ) => {
140140 result . on ( 'data' , ( resp : BurnBootloaderResp ) => {
141- this . outputService . append ( { name : 'bootloader' , chunk : Buffer . from ( resp . getOutStream_asU8 ( ) ) . toString ( ) } ) ;
142- this . outputService . append ( { name : 'bootloader' , chunk : Buffer . from ( resp . getErrStream_asU8 ( ) ) . toString ( ) } ) ;
141+ this . outputService . append ( { chunk : Buffer . from ( resp . getOutStream_asU8 ( ) ) . toString ( ) } ) ;
142+ this . outputService . append ( { chunk : Buffer . from ( resp . getErrStream_asU8 ( ) ) . toString ( ) } ) ;
143143 } ) ;
144144 result . on ( 'error' , error => reject ( error ) ) ;
145145 result . on ( 'end' , ( ) => resolve ( ) ) ;
146146 } ) ;
147147 } catch ( e ) {
148- this . outputService . append ( { name : 'bootloader' , chunk : `Error while burning the bootloader: ${ e } \n` , severity : 'error' } ) ;
148+ this . outputService . append ( { chunk : `Error while burning the bootloader: ${ e } \n` , severity : 'error' } ) ;
149149 throw e ;
150150 }
151151 }
0 commit comments