Skip to content

Commit 0f9bf5a

Browse files
author
Akos Kitta
committed
chore(cli): update to arduino/arduino-cli#2253
- update firmware uploader to `2.3.0`, - new gRPC API Signed-off-by: Akos Kitta <[email protected]>
1 parent e77b924 commit 0f9bf5a

15 files changed

+1459
-155
lines changed

Diff for: arduino-ide-extension/package.json

+6-2
Original file line numberDiff line numberDiff line change
@@ -171,10 +171,14 @@
171171
],
172172
"arduino": {
173173
"cli": {
174-
"version": "0.33.1"
174+
"version": {
175+
"owner": "cmaglie",
176+
"repo": "arduino-cli",
177+
"commitish": "board_port_after_upload"
178+
}
175179
},
176180
"fwuploader": {
177-
"version": "2.2.2"
181+
"version": "2.3.0"
178182
},
179183
"clangd": {
180184
"version": "14.0.0"

Diff for: arduino-ide-extension/src/node/cli-protocol/cc/arduino/cli/commands/v1/commands_grpc_pb.d.ts

+17
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ interface IArduinoCoreServiceService extends grpc.ServiceDefinition<grpc.Untyped
2626
newSketch: IArduinoCoreServiceService_INewSketch;
2727
loadSketch: IArduinoCoreServiceService_ILoadSketch;
2828
archiveSketch: IArduinoCoreServiceService_IArchiveSketch;
29+
setSketchDefaults: IArduinoCoreServiceService_ISetSketchDefaults;
2930
boardDetails: IArduinoCoreServiceService_IBoardDetails;
3031
boardList: IArduinoCoreServiceService_IBoardList;
3132
boardListAll: IArduinoCoreServiceService_IBoardListAll;
@@ -138,6 +139,15 @@ interface IArduinoCoreServiceService_IArchiveSketch extends grpc.MethodDefinitio
138139
responseSerialize: grpc.serialize<cc_arduino_cli_commands_v1_commands_pb.ArchiveSketchResponse>;
139140
responseDeserialize: grpc.deserialize<cc_arduino_cli_commands_v1_commands_pb.ArchiveSketchResponse>;
140141
}
142+
interface IArduinoCoreServiceService_ISetSketchDefaults extends grpc.MethodDefinition<cc_arduino_cli_commands_v1_commands_pb.SetSketchDefaultsRequest, cc_arduino_cli_commands_v1_commands_pb.SetSketchDefaultsResponse> {
143+
path: "/cc.arduino.cli.commands.v1.ArduinoCoreService/SetSketchDefaults";
144+
requestStream: false;
145+
responseStream: false;
146+
requestSerialize: grpc.serialize<cc_arduino_cli_commands_v1_commands_pb.SetSketchDefaultsRequest>;
147+
requestDeserialize: grpc.deserialize<cc_arduino_cli_commands_v1_commands_pb.SetSketchDefaultsRequest>;
148+
responseSerialize: grpc.serialize<cc_arduino_cli_commands_v1_commands_pb.SetSketchDefaultsResponse>;
149+
responseDeserialize: grpc.deserialize<cc_arduino_cli_commands_v1_commands_pb.SetSketchDefaultsResponse>;
150+
}
141151
interface IArduinoCoreServiceService_IBoardDetails extends grpc.MethodDefinition<cc_arduino_cli_commands_v1_board_pb.BoardDetailsRequest, cc_arduino_cli_commands_v1_board_pb.BoardDetailsResponse> {
142152
path: "/cc.arduino.cli.commands.v1.ArduinoCoreService/BoardDetails";
143153
requestStream: false;
@@ -412,6 +422,7 @@ export interface IArduinoCoreServiceServer {
412422
newSketch: grpc.handleUnaryCall<cc_arduino_cli_commands_v1_commands_pb.NewSketchRequest, cc_arduino_cli_commands_v1_commands_pb.NewSketchResponse>;
413423
loadSketch: grpc.handleUnaryCall<cc_arduino_cli_commands_v1_commands_pb.LoadSketchRequest, cc_arduino_cli_commands_v1_commands_pb.LoadSketchResponse>;
414424
archiveSketch: grpc.handleUnaryCall<cc_arduino_cli_commands_v1_commands_pb.ArchiveSketchRequest, cc_arduino_cli_commands_v1_commands_pb.ArchiveSketchResponse>;
425+
setSketchDefaults: grpc.handleUnaryCall<cc_arduino_cli_commands_v1_commands_pb.SetSketchDefaultsRequest, cc_arduino_cli_commands_v1_commands_pb.SetSketchDefaultsResponse>;
415426
boardDetails: grpc.handleUnaryCall<cc_arduino_cli_commands_v1_board_pb.BoardDetailsRequest, cc_arduino_cli_commands_v1_board_pb.BoardDetailsResponse>;
416427
boardList: grpc.handleUnaryCall<cc_arduino_cli_commands_v1_board_pb.BoardListRequest, cc_arduino_cli_commands_v1_board_pb.BoardListResponse>;
417428
boardListAll: grpc.handleUnaryCall<cc_arduino_cli_commands_v1_board_pb.BoardListAllRequest, cc_arduino_cli_commands_v1_board_pb.BoardListAllResponse>;
@@ -468,6 +479,9 @@ export interface IArduinoCoreServiceClient {
468479
archiveSketch(request: cc_arduino_cli_commands_v1_commands_pb.ArchiveSketchRequest, callback: (error: grpc.ServiceError | null, response: cc_arduino_cli_commands_v1_commands_pb.ArchiveSketchResponse) => void): grpc.ClientUnaryCall;
469480
archiveSketch(request: cc_arduino_cli_commands_v1_commands_pb.ArchiveSketchRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: cc_arduino_cli_commands_v1_commands_pb.ArchiveSketchResponse) => void): grpc.ClientUnaryCall;
470481
archiveSketch(request: cc_arduino_cli_commands_v1_commands_pb.ArchiveSketchRequest, metadata: grpc.Metadata, options: Partial<grpc.CallOptions>, callback: (error: grpc.ServiceError | null, response: cc_arduino_cli_commands_v1_commands_pb.ArchiveSketchResponse) => void): grpc.ClientUnaryCall;
482+
setSketchDefaults(request: cc_arduino_cli_commands_v1_commands_pb.SetSketchDefaultsRequest, callback: (error: grpc.ServiceError | null, response: cc_arduino_cli_commands_v1_commands_pb.SetSketchDefaultsResponse) => void): grpc.ClientUnaryCall;
483+
setSketchDefaults(request: cc_arduino_cli_commands_v1_commands_pb.SetSketchDefaultsRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: cc_arduino_cli_commands_v1_commands_pb.SetSketchDefaultsResponse) => void): grpc.ClientUnaryCall;
484+
setSketchDefaults(request: cc_arduino_cli_commands_v1_commands_pb.SetSketchDefaultsRequest, metadata: grpc.Metadata, options: Partial<grpc.CallOptions>, callback: (error: grpc.ServiceError | null, response: cc_arduino_cli_commands_v1_commands_pb.SetSketchDefaultsResponse) => void): grpc.ClientUnaryCall;
471485
boardDetails(request: cc_arduino_cli_commands_v1_board_pb.BoardDetailsRequest, callback: (error: grpc.ServiceError | null, response: cc_arduino_cli_commands_v1_board_pb.BoardDetailsResponse) => void): grpc.ClientUnaryCall;
472486
boardDetails(request: cc_arduino_cli_commands_v1_board_pb.BoardDetailsRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: cc_arduino_cli_commands_v1_board_pb.BoardDetailsResponse) => void): grpc.ClientUnaryCall;
473487
boardDetails(request: cc_arduino_cli_commands_v1_board_pb.BoardDetailsRequest, metadata: grpc.Metadata, options: Partial<grpc.CallOptions>, callback: (error: grpc.ServiceError | null, response: cc_arduino_cli_commands_v1_board_pb.BoardDetailsResponse) => void): grpc.ClientUnaryCall;
@@ -568,6 +582,9 @@ export class ArduinoCoreServiceClient extends grpc.Client implements IArduinoCor
568582
public archiveSketch(request: cc_arduino_cli_commands_v1_commands_pb.ArchiveSketchRequest, callback: (error: grpc.ServiceError | null, response: cc_arduino_cli_commands_v1_commands_pb.ArchiveSketchResponse) => void): grpc.ClientUnaryCall;
569583
public archiveSketch(request: cc_arduino_cli_commands_v1_commands_pb.ArchiveSketchRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: cc_arduino_cli_commands_v1_commands_pb.ArchiveSketchResponse) => void): grpc.ClientUnaryCall;
570584
public archiveSketch(request: cc_arduino_cli_commands_v1_commands_pb.ArchiveSketchRequest, metadata: grpc.Metadata, options: Partial<grpc.CallOptions>, callback: (error: grpc.ServiceError | null, response: cc_arduino_cli_commands_v1_commands_pb.ArchiveSketchResponse) => void): grpc.ClientUnaryCall;
585+
public setSketchDefaults(request: cc_arduino_cli_commands_v1_commands_pb.SetSketchDefaultsRequest, callback: (error: grpc.ServiceError | null, response: cc_arduino_cli_commands_v1_commands_pb.SetSketchDefaultsResponse) => void): grpc.ClientUnaryCall;
586+
public setSketchDefaults(request: cc_arduino_cli_commands_v1_commands_pb.SetSketchDefaultsRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: cc_arduino_cli_commands_v1_commands_pb.SetSketchDefaultsResponse) => void): grpc.ClientUnaryCall;
587+
public setSketchDefaults(request: cc_arduino_cli_commands_v1_commands_pb.SetSketchDefaultsRequest, metadata: grpc.Metadata, options: Partial<grpc.CallOptions>, callback: (error: grpc.ServiceError | null, response: cc_arduino_cli_commands_v1_commands_pb.SetSketchDefaultsResponse) => void): grpc.ClientUnaryCall;
571588
public boardDetails(request: cc_arduino_cli_commands_v1_board_pb.BoardDetailsRequest, callback: (error: grpc.ServiceError | null, response: cc_arduino_cli_commands_v1_board_pb.BoardDetailsResponse) => void): grpc.ClientUnaryCall;
572589
public boardDetails(request: cc_arduino_cli_commands_v1_board_pb.BoardDetailsRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: cc_arduino_cli_commands_v1_board_pb.BoardDetailsResponse) => void): grpc.ClientUnaryCall;
573590
public boardDetails(request: cc_arduino_cli_commands_v1_board_pb.BoardDetailsRequest, metadata: grpc.Metadata, options: Partial<grpc.CallOptions>, callback: (error: grpc.ServiceError | null, response: cc_arduino_cli_commands_v1_board_pb.BoardDetailsResponse) => void): grpc.ClientUnaryCall;

Diff for: arduino-ide-extension/src/node/cli-protocol/cc/arduino/cli/commands/v1/commands_grpc_pb.js

+36
Original file line numberDiff line numberDiff line change
@@ -709,6 +709,28 @@ function deserialize_cc_arduino_cli_commands_v1_PlatformUpgradeResponse(buffer_a
709709
return cc_arduino_cli_commands_v1_core_pb.PlatformUpgradeResponse.deserializeBinary(new Uint8Array(buffer_arg));
710710
}
711711

712+
function serialize_cc_arduino_cli_commands_v1_SetSketchDefaultsRequest(arg) {
713+
if (!(arg instanceof cc_arduino_cli_commands_v1_commands_pb.SetSketchDefaultsRequest)) {
714+
throw new Error('Expected argument of type cc.arduino.cli.commands.v1.SetSketchDefaultsRequest');
715+
}
716+
return Buffer.from(arg.serializeBinary());
717+
}
718+
719+
function deserialize_cc_arduino_cli_commands_v1_SetSketchDefaultsRequest(buffer_arg) {
720+
return cc_arduino_cli_commands_v1_commands_pb.SetSketchDefaultsRequest.deserializeBinary(new Uint8Array(buffer_arg));
721+
}
722+
723+
function serialize_cc_arduino_cli_commands_v1_SetSketchDefaultsResponse(arg) {
724+
if (!(arg instanceof cc_arduino_cli_commands_v1_commands_pb.SetSketchDefaultsResponse)) {
725+
throw new Error('Expected argument of type cc.arduino.cli.commands.v1.SetSketchDefaultsResponse');
726+
}
727+
return Buffer.from(arg.serializeBinary());
728+
}
729+
730+
function deserialize_cc_arduino_cli_commands_v1_SetSketchDefaultsResponse(buffer_arg) {
731+
return cc_arduino_cli_commands_v1_commands_pb.SetSketchDefaultsResponse.deserializeBinary(new Uint8Array(buffer_arg));
732+
}
733+
712734
function serialize_cc_arduino_cli_commands_v1_SupportedUserFieldsRequest(arg) {
713735
if (!(arg instanceof cc_arduino_cli_commands_v1_upload_pb.SupportedUserFieldsRequest)) {
714736
throw new Error('Expected argument of type cc.arduino.cli.commands.v1.SupportedUserFieldsRequest');
@@ -975,6 +997,20 @@ archiveSketch: {
975997
responseSerialize: serialize_cc_arduino_cli_commands_v1_ArchiveSketchResponse,
976998
responseDeserialize: deserialize_cc_arduino_cli_commands_v1_ArchiveSketchResponse,
977999
},
1000+
// Sets the sketch default FQBN and Port Address/Protocol in
1001+
// the sketch project file (sketch.yaml). These metadata can be retrieved
1002+
// using LoadSketch.
1003+
setSketchDefaults: {
1004+
path: '/cc.arduino.cli.commands.v1.ArduinoCoreService/SetSketchDefaults',
1005+
requestStream: false,
1006+
responseStream: false,
1007+
requestType: cc_arduino_cli_commands_v1_commands_pb.SetSketchDefaultsRequest,
1008+
responseType: cc_arduino_cli_commands_v1_commands_pb.SetSketchDefaultsResponse,
1009+
requestSerialize: serialize_cc_arduino_cli_commands_v1_SetSketchDefaultsRequest,
1010+
requestDeserialize: deserialize_cc_arduino_cli_commands_v1_SetSketchDefaultsRequest,
1011+
responseSerialize: serialize_cc_arduino_cli_commands_v1_SetSketchDefaultsResponse,
1012+
responseDeserialize: deserialize_cc_arduino_cli_commands_v1_SetSketchDefaultsResponse,
1013+
},
9781014
// BOARD COMMANDS
9791015
// --------------
9801016
//

Diff for: arduino-ide-extension/src/node/cli-protocol/cc/arduino/cli/commands/v1/commands_pb.d.ts

+74-14
Original file line numberDiff line numberDiff line change
@@ -377,12 +377,6 @@ export namespace VersionResponse {
377377
}
378378

379379
export class NewSketchRequest extends jspb.Message {
380-
381-
hasInstance(): boolean;
382-
clearInstance(): void;
383-
getInstance(): cc_arduino_cli_commands_v1_common_pb.Instance | undefined;
384-
setInstance(value?: cc_arduino_cli_commands_v1_common_pb.Instance): NewSketchRequest;
385-
386380
getSketchName(): string;
387381
setSketchName(value: string): NewSketchRequest;
388382

@@ -405,7 +399,6 @@ export class NewSketchRequest extends jspb.Message {
405399

406400
export namespace NewSketchRequest {
407401
export type AsObject = {
408-
instance?: cc_arduino_cli_commands_v1_common_pb.Instance.AsObject,
409402
sketchName: string,
410403
sketchDir: string,
411404
overwrite: boolean,
@@ -434,12 +427,6 @@ export namespace NewSketchResponse {
434427
}
435428

436429
export class LoadSketchRequest extends jspb.Message {
437-
438-
hasInstance(): boolean;
439-
clearInstance(): void;
440-
getInstance(): cc_arduino_cli_commands_v1_common_pb.Instance | undefined;
441-
setInstance(value?: cc_arduino_cli_commands_v1_common_pb.Instance): LoadSketchRequest;
442-
443430
getSketchPath(): string;
444431
setSketchPath(value: string): LoadSketchRequest;
445432

@@ -456,7 +443,6 @@ export class LoadSketchRequest extends jspb.Message {
456443

457444
export namespace LoadSketchRequest {
458445
export type AsObject = {
459-
instance?: cc_arduino_cli_commands_v1_common_pb.Instance.AsObject,
460446
sketchPath: string,
461447
}
462448
}
@@ -483,6 +469,15 @@ export class LoadSketchResponse extends jspb.Message {
483469
setRootFolderFilesList(value: Array<string>): LoadSketchResponse;
484470
addRootFolderFiles(value: string, index?: number): string;
485471

472+
getDefaultFqbn(): string;
473+
setDefaultFqbn(value: string): LoadSketchResponse;
474+
475+
getDefaultPort(): string;
476+
setDefaultPort(value: string): LoadSketchResponse;
477+
478+
getDefaultProtocol(): string;
479+
setDefaultProtocol(value: string): LoadSketchResponse;
480+
486481

487482
serializeBinary(): Uint8Array;
488483
toObject(includeInstance?: boolean): LoadSketchResponse.AsObject;
@@ -501,6 +496,9 @@ export namespace LoadSketchResponse {
501496
otherSketchFilesList: Array<string>,
502497
additionalFilesList: Array<string>,
503498
rootFolderFilesList: Array<string>,
499+
defaultFqbn: string,
500+
defaultPort: string,
501+
defaultProtocol: string,
504502
}
505503
}
506504

@@ -554,6 +552,68 @@ export namespace ArchiveSketchResponse {
554552
}
555553
}
556554

555+
export class SetSketchDefaultsRequest extends jspb.Message {
556+
getSketchPath(): string;
557+
setSketchPath(value: string): SetSketchDefaultsRequest;
558+
559+
getDefaultFqbn(): string;
560+
setDefaultFqbn(value: string): SetSketchDefaultsRequest;
561+
562+
getDefaultPortAddress(): string;
563+
setDefaultPortAddress(value: string): SetSketchDefaultsRequest;
564+
565+
getDefaultPortProtocol(): string;
566+
setDefaultPortProtocol(value: string): SetSketchDefaultsRequest;
567+
568+
569+
serializeBinary(): Uint8Array;
570+
toObject(includeInstance?: boolean): SetSketchDefaultsRequest.AsObject;
571+
static toObject(includeInstance: boolean, msg: SetSketchDefaultsRequest): SetSketchDefaultsRequest.AsObject;
572+
static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};
573+
static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};
574+
static serializeBinaryToWriter(message: SetSketchDefaultsRequest, writer: jspb.BinaryWriter): void;
575+
static deserializeBinary(bytes: Uint8Array): SetSketchDefaultsRequest;
576+
static deserializeBinaryFromReader(message: SetSketchDefaultsRequest, reader: jspb.BinaryReader): SetSketchDefaultsRequest;
577+
}
578+
579+
export namespace SetSketchDefaultsRequest {
580+
export type AsObject = {
581+
sketchPath: string,
582+
defaultFqbn: string,
583+
defaultPortAddress: string,
584+
defaultPortProtocol: string,
585+
}
586+
}
587+
588+
export class SetSketchDefaultsResponse extends jspb.Message {
589+
getDefaultFqbn(): string;
590+
setDefaultFqbn(value: string): SetSketchDefaultsResponse;
591+
592+
getDefaultPortAddress(): string;
593+
setDefaultPortAddress(value: string): SetSketchDefaultsResponse;
594+
595+
getDefaultPortProtocol(): string;
596+
setDefaultPortProtocol(value: string): SetSketchDefaultsResponse;
597+
598+
599+
serializeBinary(): Uint8Array;
600+
toObject(includeInstance?: boolean): SetSketchDefaultsResponse.AsObject;
601+
static toObject(includeInstance: boolean, msg: SetSketchDefaultsResponse): SetSketchDefaultsResponse.AsObject;
602+
static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};
603+
static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};
604+
static serializeBinaryToWriter(message: SetSketchDefaultsResponse, writer: jspb.BinaryWriter): void;
605+
static deserializeBinary(bytes: Uint8Array): SetSketchDefaultsResponse;
606+
static deserializeBinaryFromReader(message: SetSketchDefaultsResponse, reader: jspb.BinaryReader): SetSketchDefaultsResponse;
607+
}
608+
609+
export namespace SetSketchDefaultsResponse {
610+
export type AsObject = {
611+
defaultFqbn: string,
612+
defaultPortAddress: string,
613+
defaultPortProtocol: string,
614+
}
615+
}
616+
557617
export enum FailedInstanceInitReason {
558618
FAILED_INSTANCE_INIT_REASON_UNSPECIFIED = 0,
559619
FAILED_INSTANCE_INIT_REASON_INVALID_INDEX_URL = 1,

0 commit comments

Comments
 (0)