Skip to content

Commit

Permalink
chore(cli): update to arduino/arduino-cli#2253
Browse files Browse the repository at this point in the history
 - update firmware uploader to `2.3.0`,
 - new gRPC API

Signed-off-by: Akos Kitta <[email protected]>
  • Loading branch information
Akos Kitta committed Aug 2, 2023
1 parent e77b924 commit 0f9bf5a
Show file tree
Hide file tree
Showing 15 changed files with 1,459 additions and 155 deletions.
8 changes: 6 additions & 2 deletions arduino-ide-extension/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -171,10 +171,14 @@
],
"arduino": {
"cli": {
"version": "0.33.1"
"version": {
"owner": "cmaglie",
"repo": "arduino-cli",
"commitish": "board_port_after_upload"
}
},
"fwuploader": {
"version": "2.2.2"
"version": "2.3.0"
},
"clangd": {
"version": "14.0.0"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ interface IArduinoCoreServiceService extends grpc.ServiceDefinition<grpc.Untyped
newSketch: IArduinoCoreServiceService_INewSketch;
loadSketch: IArduinoCoreServiceService_ILoadSketch;
archiveSketch: IArduinoCoreServiceService_IArchiveSketch;
setSketchDefaults: IArduinoCoreServiceService_ISetSketchDefaults;
boardDetails: IArduinoCoreServiceService_IBoardDetails;
boardList: IArduinoCoreServiceService_IBoardList;
boardListAll: IArduinoCoreServiceService_IBoardListAll;
Expand Down Expand Up @@ -138,6 +139,15 @@ interface IArduinoCoreServiceService_IArchiveSketch extends grpc.MethodDefinitio
responseSerialize: grpc.serialize<cc_arduino_cli_commands_v1_commands_pb.ArchiveSketchResponse>;
responseDeserialize: grpc.deserialize<cc_arduino_cli_commands_v1_commands_pb.ArchiveSketchResponse>;
}
interface IArduinoCoreServiceService_ISetSketchDefaults extends grpc.MethodDefinition<cc_arduino_cli_commands_v1_commands_pb.SetSketchDefaultsRequest, cc_arduino_cli_commands_v1_commands_pb.SetSketchDefaultsResponse> {
path: "/cc.arduino.cli.commands.v1.ArduinoCoreService/SetSketchDefaults";
requestStream: false;
responseStream: false;
requestSerialize: grpc.serialize<cc_arduino_cli_commands_v1_commands_pb.SetSketchDefaultsRequest>;
requestDeserialize: grpc.deserialize<cc_arduino_cli_commands_v1_commands_pb.SetSketchDefaultsRequest>;
responseSerialize: grpc.serialize<cc_arduino_cli_commands_v1_commands_pb.SetSketchDefaultsResponse>;
responseDeserialize: grpc.deserialize<cc_arduino_cli_commands_v1_commands_pb.SetSketchDefaultsResponse>;
}
interface IArduinoCoreServiceService_IBoardDetails extends grpc.MethodDefinition<cc_arduino_cli_commands_v1_board_pb.BoardDetailsRequest, cc_arduino_cli_commands_v1_board_pb.BoardDetailsResponse> {
path: "/cc.arduino.cli.commands.v1.ArduinoCoreService/BoardDetails";
requestStream: false;
Expand Down Expand Up @@ -412,6 +422,7 @@ export interface IArduinoCoreServiceServer {
newSketch: grpc.handleUnaryCall<cc_arduino_cli_commands_v1_commands_pb.NewSketchRequest, cc_arduino_cli_commands_v1_commands_pb.NewSketchResponse>;
loadSketch: grpc.handleUnaryCall<cc_arduino_cli_commands_v1_commands_pb.LoadSketchRequest, cc_arduino_cli_commands_v1_commands_pb.LoadSketchResponse>;
archiveSketch: grpc.handleUnaryCall<cc_arduino_cli_commands_v1_commands_pb.ArchiveSketchRequest, cc_arduino_cli_commands_v1_commands_pb.ArchiveSketchResponse>;
setSketchDefaults: grpc.handleUnaryCall<cc_arduino_cli_commands_v1_commands_pb.SetSketchDefaultsRequest, cc_arduino_cli_commands_v1_commands_pb.SetSketchDefaultsResponse>;
boardDetails: grpc.handleUnaryCall<cc_arduino_cli_commands_v1_board_pb.BoardDetailsRequest, cc_arduino_cli_commands_v1_board_pb.BoardDetailsResponse>;
boardList: grpc.handleUnaryCall<cc_arduino_cli_commands_v1_board_pb.BoardListRequest, cc_arduino_cli_commands_v1_board_pb.BoardListResponse>;
boardListAll: grpc.handleUnaryCall<cc_arduino_cli_commands_v1_board_pb.BoardListAllRequest, cc_arduino_cli_commands_v1_board_pb.BoardListAllResponse>;
Expand Down Expand Up @@ -468,6 +479,9 @@ export interface IArduinoCoreServiceClient {
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;
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;
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;
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;
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;
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;
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;
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;
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;
Expand Down Expand Up @@ -568,6 +582,9 @@ export class ArduinoCoreServiceClient extends grpc.Client implements IArduinoCor
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;
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;
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;
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;
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;
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;
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;
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;
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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -709,6 +709,28 @@ function deserialize_cc_arduino_cli_commands_v1_PlatformUpgradeResponse(buffer_a
return cc_arduino_cli_commands_v1_core_pb.PlatformUpgradeResponse.deserializeBinary(new Uint8Array(buffer_arg));
}

function serialize_cc_arduino_cli_commands_v1_SetSketchDefaultsRequest(arg) {
if (!(arg instanceof cc_arduino_cli_commands_v1_commands_pb.SetSketchDefaultsRequest)) {
throw new Error('Expected argument of type cc.arduino.cli.commands.v1.SetSketchDefaultsRequest');
}
return Buffer.from(arg.serializeBinary());
}

function deserialize_cc_arduino_cli_commands_v1_SetSketchDefaultsRequest(buffer_arg) {
return cc_arduino_cli_commands_v1_commands_pb.SetSketchDefaultsRequest.deserializeBinary(new Uint8Array(buffer_arg));
}

function serialize_cc_arduino_cli_commands_v1_SetSketchDefaultsResponse(arg) {
if (!(arg instanceof cc_arduino_cli_commands_v1_commands_pb.SetSketchDefaultsResponse)) {
throw new Error('Expected argument of type cc.arduino.cli.commands.v1.SetSketchDefaultsResponse');
}
return Buffer.from(arg.serializeBinary());
}

function deserialize_cc_arduino_cli_commands_v1_SetSketchDefaultsResponse(buffer_arg) {
return cc_arduino_cli_commands_v1_commands_pb.SetSketchDefaultsResponse.deserializeBinary(new Uint8Array(buffer_arg));
}

function serialize_cc_arduino_cli_commands_v1_SupportedUserFieldsRequest(arg) {
if (!(arg instanceof cc_arduino_cli_commands_v1_upload_pb.SupportedUserFieldsRequest)) {
throw new Error('Expected argument of type cc.arduino.cli.commands.v1.SupportedUserFieldsRequest');
Expand Down Expand Up @@ -975,6 +997,20 @@ archiveSketch: {
responseSerialize: serialize_cc_arduino_cli_commands_v1_ArchiveSketchResponse,
responseDeserialize: deserialize_cc_arduino_cli_commands_v1_ArchiveSketchResponse,
},
// Sets the sketch default FQBN and Port Address/Protocol in
// the sketch project file (sketch.yaml). These metadata can be retrieved
// using LoadSketch.
setSketchDefaults: {
path: '/cc.arduino.cli.commands.v1.ArduinoCoreService/SetSketchDefaults',
requestStream: false,
responseStream: false,
requestType: cc_arduino_cli_commands_v1_commands_pb.SetSketchDefaultsRequest,
responseType: cc_arduino_cli_commands_v1_commands_pb.SetSketchDefaultsResponse,
requestSerialize: serialize_cc_arduino_cli_commands_v1_SetSketchDefaultsRequest,
requestDeserialize: deserialize_cc_arduino_cli_commands_v1_SetSketchDefaultsRequest,
responseSerialize: serialize_cc_arduino_cli_commands_v1_SetSketchDefaultsResponse,
responseDeserialize: deserialize_cc_arduino_cli_commands_v1_SetSketchDefaultsResponse,
},
// BOARD COMMANDS
// --------------
//
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -377,12 +377,6 @@ export namespace VersionResponse {
}

export class NewSketchRequest extends jspb.Message {

hasInstance(): boolean;
clearInstance(): void;
getInstance(): cc_arduino_cli_commands_v1_common_pb.Instance | undefined;
setInstance(value?: cc_arduino_cli_commands_v1_common_pb.Instance): NewSketchRequest;

getSketchName(): string;
setSketchName(value: string): NewSketchRequest;

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

export namespace NewSketchRequest {
export type AsObject = {
instance?: cc_arduino_cli_commands_v1_common_pb.Instance.AsObject,
sketchName: string,
sketchDir: string,
overwrite: boolean,
Expand Down Expand Up @@ -434,12 +427,6 @@ export namespace NewSketchResponse {
}

export class LoadSketchRequest extends jspb.Message {

hasInstance(): boolean;
clearInstance(): void;
getInstance(): cc_arduino_cli_commands_v1_common_pb.Instance | undefined;
setInstance(value?: cc_arduino_cli_commands_v1_common_pb.Instance): LoadSketchRequest;

getSketchPath(): string;
setSketchPath(value: string): LoadSketchRequest;

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

export namespace LoadSketchRequest {
export type AsObject = {
instance?: cc_arduino_cli_commands_v1_common_pb.Instance.AsObject,
sketchPath: string,
}
}
Expand All @@ -483,6 +469,15 @@ export class LoadSketchResponse extends jspb.Message {
setRootFolderFilesList(value: Array<string>): LoadSketchResponse;
addRootFolderFiles(value: string, index?: number): string;

getDefaultFqbn(): string;
setDefaultFqbn(value: string): LoadSketchResponse;

getDefaultPort(): string;
setDefaultPort(value: string): LoadSketchResponse;

getDefaultProtocol(): string;
setDefaultProtocol(value: string): LoadSketchResponse;


serializeBinary(): Uint8Array;
toObject(includeInstance?: boolean): LoadSketchResponse.AsObject;
Expand All @@ -501,6 +496,9 @@ export namespace LoadSketchResponse {
otherSketchFilesList: Array<string>,
additionalFilesList: Array<string>,
rootFolderFilesList: Array<string>,
defaultFqbn: string,
defaultPort: string,
defaultProtocol: string,
}
}

Expand Down Expand Up @@ -554,6 +552,68 @@ export namespace ArchiveSketchResponse {
}
}

export class SetSketchDefaultsRequest extends jspb.Message {
getSketchPath(): string;
setSketchPath(value: string): SetSketchDefaultsRequest;

getDefaultFqbn(): string;
setDefaultFqbn(value: string): SetSketchDefaultsRequest;

getDefaultPortAddress(): string;
setDefaultPortAddress(value: string): SetSketchDefaultsRequest;

getDefaultPortProtocol(): string;
setDefaultPortProtocol(value: string): SetSketchDefaultsRequest;


serializeBinary(): Uint8Array;
toObject(includeInstance?: boolean): SetSketchDefaultsRequest.AsObject;
static toObject(includeInstance: boolean, msg: SetSketchDefaultsRequest): SetSketchDefaultsRequest.AsObject;
static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};
static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};
static serializeBinaryToWriter(message: SetSketchDefaultsRequest, writer: jspb.BinaryWriter): void;
static deserializeBinary(bytes: Uint8Array): SetSketchDefaultsRequest;
static deserializeBinaryFromReader(message: SetSketchDefaultsRequest, reader: jspb.BinaryReader): SetSketchDefaultsRequest;
}

export namespace SetSketchDefaultsRequest {
export type AsObject = {
sketchPath: string,
defaultFqbn: string,
defaultPortAddress: string,
defaultPortProtocol: string,
}
}

export class SetSketchDefaultsResponse extends jspb.Message {
getDefaultFqbn(): string;
setDefaultFqbn(value: string): SetSketchDefaultsResponse;

getDefaultPortAddress(): string;
setDefaultPortAddress(value: string): SetSketchDefaultsResponse;

getDefaultPortProtocol(): string;
setDefaultPortProtocol(value: string): SetSketchDefaultsResponse;


serializeBinary(): Uint8Array;
toObject(includeInstance?: boolean): SetSketchDefaultsResponse.AsObject;
static toObject(includeInstance: boolean, msg: SetSketchDefaultsResponse): SetSketchDefaultsResponse.AsObject;
static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};
static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};
static serializeBinaryToWriter(message: SetSketchDefaultsResponse, writer: jspb.BinaryWriter): void;
static deserializeBinary(bytes: Uint8Array): SetSketchDefaultsResponse;
static deserializeBinaryFromReader(message: SetSketchDefaultsResponse, reader: jspb.BinaryReader): SetSketchDefaultsResponse;
}

export namespace SetSketchDefaultsResponse {
export type AsObject = {
defaultFqbn: string,
defaultPortAddress: string,
defaultPortProtocol: string,
}
}

export enum FailedInstanceInitReason {
FAILED_INSTANCE_INIT_REASON_UNSPECIFIED = 0,
FAILED_INSTANCE_INIT_REASON_INVALID_INDEX_URL = 1,
Expand Down
Loading

0 comments on commit 0f9bf5a

Please sign in to comment.