@@ -24,7 +24,7 @@ export class CoreServiceImpl implements CoreService {
24
24
protected readonly notificationService : NotificationServiceServer ;
25
25
26
26
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' } ) ;
28
28
const { sketchUri, fqbn } = options ;
29
29
const sketchFilePath = FileUri . fsPath ( sketchUri ) ;
30
30
const sketchpath = dirname ( sketchFilePath ) ;
@@ -48,15 +48,15 @@ export class CoreServiceImpl implements CoreService {
48
48
try {
49
49
await new Promise < void > ( ( resolve , reject ) => {
50
50
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 ( ) } ) ;
53
53
} ) ;
54
54
result . on ( 'error' , error => reject ( error ) ) ;
55
55
result . on ( 'end' , ( ) => resolve ( ) ) ;
56
56
} ) ;
57
- this . outputService . append ( { name : 'compile' , chunk : '\n--------------------------\nCompilation complete.\n' } ) ;
57
+ this . outputService . append ( { chunk : '\n--------------------------\nCompilation complete.\n' } ) ;
58
58
} 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' } ) ;
60
60
throw e ;
61
61
}
62
62
}
@@ -77,7 +77,7 @@ export class CoreServiceImpl implements CoreService {
77
77
78
78
await this . compile ( Object . assign ( options , { exportBinaries : false } ) ) ;
79
79
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' } ) ;
81
81
const { sketchUri, fqbn, port, programmer } = options ;
82
82
const sketchFilePath = FileUri . fsPath ( sketchUri ) ;
83
83
const sketchpath = dirname ( sketchFilePath ) ;
@@ -104,15 +104,15 @@ export class CoreServiceImpl implements CoreService {
104
104
try {
105
105
await new Promise < void > ( ( resolve , reject ) => {
106
106
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 ( ) } ) ;
109
109
} ) ;
110
110
result . on ( 'error' , error => reject ( error ) ) ;
111
111
result . on ( 'end' , ( ) => resolve ( ) ) ;
112
112
} ) ;
113
- this . outputService . append ( { name : 'upload' , chunk : '\n--------------------------\n' + firstToLowerCase ( task ) + ' complete.\n' } ) ;
113
+ this . outputService . append ( { chunk : '\n--------------------------\n' + firstToLowerCase ( task ) + ' complete.\n' } ) ;
114
114
} 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' } ) ;
116
116
throw e ;
117
117
}
118
118
}
@@ -138,14 +138,14 @@ export class CoreServiceImpl implements CoreService {
138
138
try {
139
139
await new Promise < void > ( ( resolve , reject ) => {
140
140
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 ( ) } ) ;
143
143
} ) ;
144
144
result . on ( 'error' , error => reject ( error ) ) ;
145
145
result . on ( 'end' , ( ) => resolve ( ) ) ;
146
146
} ) ;
147
147
} 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' } ) ;
149
149
throw e ;
150
150
}
151
151
}
0 commit comments