@@ -54,8 +54,8 @@ export class CoreServiceImpl implements CoreService {
54
54
try {
55
55
await new Promise < void > ( ( resolve , reject ) => {
56
56
result . on ( 'data' , ( cr : CompileResp ) => {
57
- this . toolOutputService . publishNewOutput ( "compile" , new Buffer ( cr . getOutStream_asU8 ( ) ) . toString ( ) ) ;
58
- this . toolOutputService . publishNewOutput ( "compile error" , new Buffer ( cr . getErrStream_asU8 ( ) ) . toString ( ) ) ;
57
+ this . toolOutputService . publishNewOutput ( "compile" , Buffer . from ( cr . getOutStream_asU8 ( ) ) . toString ( ) ) ;
58
+ this . toolOutputService . publishNewOutput ( "compile error" , Buffer . from ( cr . getErrStream_asU8 ( ) ) . toString ( ) ) ;
59
59
} ) ;
60
60
result . on ( 'error' , error => reject ( error ) ) ;
61
61
result . on ( 'end' , ( ) => resolve ( ) ) ;
@@ -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' , ( cr : UploadResp ) => {
107
- this . toolOutputService . publishNewOutput ( "upload" , new Buffer ( cr . getOutStream_asU8 ( ) ) . toString ( ) ) ;
108
- this . toolOutputService . publishNewOutput ( "upload error" , new Buffer ( cr . getErrStream_asU8 ( ) ) . toString ( ) ) ;
107
+ this . toolOutputService . publishNewOutput ( "upload" , Buffer . from ( cr . getOutStream_asU8 ( ) ) . toString ( ) ) ;
108
+ this . toolOutputService . publishNewOutput ( "upload error" , Buffer . from ( cr . getErrStream_asU8 ( ) ) . toString ( ) ) ;
109
109
} ) ;
110
110
result . on ( 'error' , error => reject ( error ) ) ;
111
111
result . on ( 'end' , ( ) => resolve ( ) ) ;
112
112
} ) ;
113
113
this . toolOutputService . publishNewOutput ( "upload" , "Upload complete\n" ) ;
114
114
} catch ( e ) {
115
- this . toolOutputService . publishNewOutput ( "upload error" , `Uplaod error: ${ e } \n` ) ;
115
+ this . toolOutputService . publishNewOutput ( "upload error" , `Upload error: ${ e } \n` ) ;
116
116
throw e ;
117
117
}
118
118
}
0 commit comments