@@ -35,7 +35,7 @@ export class CoreServiceImpl implements CoreService {
35
35
}
36
36
37
37
async compile ( options : CoreService . Compile . Options ) : Promise < void > {
38
- console . log ( 'compile' , options ) ;
38
+ this . toolOutputService . publishNewOutput ( 'compile' , 'Compiling...\n' + JSON . stringify ( options , null , 2 ) + '\n' ) ;
39
39
const { sketchUri, fqbn } = options ;
40
40
const sketchFilePath = await this . fileSystem . getFsPath ( sketchUri ) ;
41
41
if ( ! sketchFilePath ) {
@@ -67,21 +67,21 @@ export class CoreServiceImpl implements CoreService {
67
67
await new Promise < void > ( ( resolve , reject ) => {
68
68
result . on ( 'data' , ( cr : CompileResp ) => {
69
69
this . toolOutputService . publishNewOutput ( "compile" , Buffer . from ( cr . getOutStream_asU8 ( ) ) . toString ( ) ) ;
70
- this . toolOutputService . publishNewOutput ( "compile error " , Buffer . from ( cr . getErrStream_asU8 ( ) ) . toString ( ) ) ;
70
+ this . toolOutputService . publishNewOutput ( "compile" , Buffer . from ( cr . getErrStream_asU8 ( ) ) . toString ( ) ) ;
71
71
} ) ;
72
72
result . on ( 'error' , error => reject ( error ) ) ;
73
73
result . on ( 'end' , ( ) => resolve ( ) ) ;
74
74
} ) ;
75
- this . toolOutputService . publishNewOutput ( "compile" , "Compilation complete\n" ) ;
75
+ this . toolOutputService . publishNewOutput ( "compile" , "Compilation complete. \n" ) ;
76
76
} catch ( e ) {
77
- this . toolOutputService . publishNewOutput ( "compile error " , `Compilation error: ${ e } \n` ) ;
77
+ this . toolOutputService . publishNewOutput ( "compile" , `Compilation error: ${ e } \n` ) ;
78
78
throw e ;
79
79
}
80
80
}
81
81
82
82
async upload ( options : CoreService . Upload . Options ) : Promise < void > {
83
83
await this . compile ( options ) ;
84
- console . log ( 'upload' , options ) ;
84
+ this . toolOutputService . publishNewOutput ( 'upload' , 'Uploading...\n' + JSON . stringify ( options , null , 2 ) + '\n' ) ;
85
85
const { sketchUri, fqbn } = options ;
86
86
const sketchFilePath = await this . fileSystem . getFsPath ( sketchUri ) ;
87
87
if ( ! sketchFilePath ) {
@@ -111,14 +111,14 @@ export class CoreServiceImpl implements CoreService {
111
111
await new Promise < void > ( ( resolve , reject ) => {
112
112
result . on ( 'data' , ( cr : UploadResp ) => {
113
113
this . toolOutputService . publishNewOutput ( "upload" , Buffer . from ( cr . getOutStream_asU8 ( ) ) . toString ( ) ) ;
114
- this . toolOutputService . publishNewOutput ( "upload error " , Buffer . from ( cr . getErrStream_asU8 ( ) ) . toString ( ) ) ;
114
+ this . toolOutputService . publishNewOutput ( "upload" , Buffer . from ( cr . getErrStream_asU8 ( ) ) . toString ( ) ) ;
115
115
} ) ;
116
116
result . on ( 'error' , error => reject ( error ) ) ;
117
117
result . on ( 'end' , ( ) => resolve ( ) ) ;
118
118
} ) ;
119
- this . toolOutputService . publishNewOutput ( "upload" , "Upload complete\n" ) ;
119
+ this . toolOutputService . publishNewOutput ( "upload" , "Upload complete. \n" ) ;
120
120
} catch ( e ) {
121
- this . toolOutputService . publishNewOutput ( "upload error " , `Upload error: ${ e } \n` ) ;
121
+ this . toolOutputService . publishNewOutput ( "upload" , `Upload error: ${ e } \n` ) ;
122
122
throw e ;
123
123
}
124
124
}
0 commit comments