@@ -163,9 +163,13 @@ export class CoreServiceImpl extends CoreClientAware implements CoreService {
163
163
return request ;
164
164
}
165
165
166
- upload ( options : CoreService . Upload . Options ) : Promise < void > {
166
+ upload (
167
+ options : CoreService . Upload . Options ,
168
+ additionalCompileOptions : Partial < CoreService . Compile . Options >
169
+ ) : Promise < void > {
167
170
return this . doUpload (
168
171
options ,
172
+ additionalCompileOptions ,
169
173
( ) => new UploadRequest ( ) ,
170
174
( client , req ) => client . upload ( req ) ,
171
175
( message : string , locations : CoreError . ErrorLocation [ ] ) =>
@@ -175,10 +179,12 @@ export class CoreServiceImpl extends CoreClientAware implements CoreService {
175
179
}
176
180
177
181
async uploadUsingProgrammer (
178
- options : CoreService . Upload . Options
182
+ options : CoreService . Upload . Options ,
183
+ additionalCompileOptions : Partial < CoreService . Compile . Options >
179
184
) : Promise < void > {
180
185
return this . doUpload (
181
186
options ,
187
+ additionalCompileOptions ,
182
188
( ) => new UploadUsingProgrammerRequest ( ) ,
183
189
( client , req ) => client . uploadUsingProgrammer ( req ) ,
184
190
( message : string , locations : CoreError . ErrorLocation [ ] ) =>
@@ -189,6 +195,7 @@ export class CoreServiceImpl extends CoreClientAware implements CoreService {
189
195
190
196
protected async doUpload (
191
197
options : CoreService . Upload . Options ,
198
+ additionalCompileOptions : Partial < CoreService . Compile . Options > ,
192
199
requestFactory : ( ) => UploadRequest | UploadUsingProgrammerRequest ,
193
200
responseHandler : (
194
201
client : ArduinoCoreServiceClient ,
@@ -200,7 +207,11 @@ export class CoreServiceImpl extends CoreClientAware implements CoreService {
200
207
) => ApplicationError < number , CoreError . ErrorLocation [ ] > ,
201
208
task : string
202
209
) : Promise < void > {
203
- await this . compile ( Object . assign ( options , { exportBinaries : false } ) ) ;
210
+ await this . compile ( {
211
+ ...options ,
212
+ ...additionalCompileOptions ,
213
+ exportBinaries : false ,
214
+ } ) ;
204
215
205
216
const coreClient = await this . coreClient ;
206
217
const { client, instance } = coreClient ;
0 commit comments