From 7b364ebe60634bea5d839fb7cb6dedb016021ca6 Mon Sep 17 00:00:00 2001 From: Akos Kitta Date: Mon, 2 Nov 2020 17:07:54 +0100 Subject: [PATCH] Use the CLI API from the `20201104` nightly. Signed-off-by: Akos Kitta --- arduino-ide-extension/package.json | 2 +- .../node/cli-protocol/commands/board_pb.d.ts | 8 + .../node/cli-protocol/commands/board_pb.js | 64 +- .../commands/commands_grpc_pb.d.ts | 34 +- .../cli-protocol/commands/commands_grpc_pb.js | 73 +- .../cli-protocol/commands/commands_pb.d.ts | 50 ++ .../node/cli-protocol/commands/commands_pb.js | 367 +++++++++- .../cli-protocol/commands/compile_pb.d.ts | 16 +- .../node/cli-protocol/commands/compile_pb.js | 122 ++-- .../node/cli-protocol/commands/lib_pb.d.ts | 6 + .../src/node/cli-protocol/commands/lib_pb.js | 35 +- .../node/cli-protocol/commands/upload_pb.d.ts | 85 +++ .../node/cli-protocol/commands/upload_pb.js | 643 ++++++++++++++++++ .../cli-protocol/debug/debug_grpc_pb.d.ts | 19 +- .../node/cli-protocol/debug/debug_grpc_pb.js | 33 + .../src/node/cli-protocol/debug/debug_pb.d.ts | 61 +- .../src/node/cli-protocol/debug/debug_pb.js | 430 +++++++++++- .../cli-protocol/monitor/monitor_grpc_pb.d.ts | 2 +- .../settings/settings_grpc_pb.d.ts | 2 +- 19 files changed, 1937 insertions(+), 115 deletions(-) diff --git a/arduino-ide-extension/package.json b/arduino-ide-extension/package.json index ec2ccb19..23e50be4 100644 --- a/arduino-ide-extension/package.json +++ b/arduino-ide-extension/package.json @@ -120,7 +120,7 @@ ], "arduino": { "cli": { - "version": "20201102" + "version": "20201104" } } } diff --git a/arduino-ide-extension/src/node/cli-protocol/commands/board_pb.d.ts b/arduino-ide-extension/src/node/cli-protocol/commands/board_pb.d.ts index 3e0b6f70..1520e724 100644 --- a/arduino-ide-extension/src/node/cli-protocol/commands/board_pb.d.ts +++ b/arduino-ide-extension/src/node/cli-protocol/commands/board_pb.d.ts @@ -563,6 +563,9 @@ export class BoardListAllReq extends jspb.Message { setSearchArgsList(value: Array): BoardListAllReq; addSearchArgs(value: string, index?: number): string; + getIncludeHiddenBoards(): boolean; + setIncludeHiddenBoards(value: boolean): BoardListAllReq; + serializeBinary(): Uint8Array; toObject(includeInstance?: boolean): BoardListAllReq.AsObject; @@ -578,6 +581,7 @@ export namespace BoardListAllReq { export type AsObject = { instance?: commands_common_pb.Instance.AsObject, searchArgsList: Array, + includeHiddenBoards: boolean, } } @@ -611,6 +615,9 @@ export class BoardListItem extends jspb.Message { getFqbn(): string; setFqbn(value: string): BoardListItem; + getIsHidden(): boolean; + setIsHidden(value: boolean): BoardListItem; + serializeBinary(): Uint8Array; toObject(includeInstance?: boolean): BoardListItem.AsObject; @@ -626,5 +633,6 @@ export namespace BoardListItem { export type AsObject = { name: string, fqbn: string, + isHidden: boolean, } } diff --git a/arduino-ide-extension/src/node/cli-protocol/commands/board_pb.js b/arduino-ide-extension/src/node/cli-protocol/commands/board_pb.js index 4c2b1c99..066598e1 100644 --- a/arduino-ide-extension/src/node/cli-protocol/commands/board_pb.js +++ b/arduino-ide-extension/src/node/cli-protocol/commands/board_pb.js @@ -4199,7 +4199,8 @@ proto.cc.arduino.cli.commands.BoardListAllReq.prototype.toObject = function(opt_ proto.cc.arduino.cli.commands.BoardListAllReq.toObject = function(includeInstance, msg) { var f, obj = { instance: (f = msg.getInstance()) && commands_common_pb.Instance.toObject(includeInstance, f), - searchArgsList: (f = jspb.Message.getRepeatedField(msg, 2)) == null ? undefined : f + searchArgsList: (f = jspb.Message.getRepeatedField(msg, 2)) == null ? undefined : f, + includeHiddenBoards: jspb.Message.getBooleanFieldWithDefault(msg, 3, false) }; if (includeInstance) { @@ -4245,6 +4246,10 @@ proto.cc.arduino.cli.commands.BoardListAllReq.deserializeBinaryFromReader = func var value = /** @type {string} */ (reader.readString()); msg.addSearchArgs(value); break; + case 3: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setIncludeHiddenBoards(value); + break; default: reader.skipField(); break; @@ -4289,6 +4294,13 @@ proto.cc.arduino.cli.commands.BoardListAllReq.serializeBinaryToWriter = function f ); } + f = message.getIncludeHiddenBoards(); + if (f) { + writer.writeBool( + 3, + f + ); + } }; @@ -4366,6 +4378,24 @@ proto.cc.arduino.cli.commands.BoardListAllReq.prototype.clearSearchArgsList = fu }; +/** + * optional bool include_hidden_boards = 3; + * @return {boolean} + */ +proto.cc.arduino.cli.commands.BoardListAllReq.prototype.getIncludeHiddenBoards = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 3, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.cc.arduino.cli.commands.BoardListAllReq} returns this + */ +proto.cc.arduino.cli.commands.BoardListAllReq.prototype.setIncludeHiddenBoards = function(value) { + return jspb.Message.setProto3BooleanField(this, 3, value); +}; + + /** * List of repeated fields within this message type. @@ -4559,7 +4589,8 @@ proto.cc.arduino.cli.commands.BoardListItem.prototype.toObject = function(opt_in proto.cc.arduino.cli.commands.BoardListItem.toObject = function(includeInstance, msg) { var f, obj = { name: jspb.Message.getFieldWithDefault(msg, 1, ""), - fqbn: jspb.Message.getFieldWithDefault(msg, 2, "") + fqbn: jspb.Message.getFieldWithDefault(msg, 2, ""), + isHidden: jspb.Message.getBooleanFieldWithDefault(msg, 3, false) }; if (includeInstance) { @@ -4604,6 +4635,10 @@ proto.cc.arduino.cli.commands.BoardListItem.deserializeBinaryFromReader = functi var value = /** @type {string} */ (reader.readString()); msg.setFqbn(value); break; + case 3: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setIsHidden(value); + break; default: reader.skipField(); break; @@ -4647,6 +4682,13 @@ proto.cc.arduino.cli.commands.BoardListItem.serializeBinaryToWriter = function(m f ); } + f = message.getIsHidden(); + if (f) { + writer.writeBool( + 3, + f + ); + } }; @@ -4686,4 +4728,22 @@ proto.cc.arduino.cli.commands.BoardListItem.prototype.setFqbn = function(value) }; +/** + * optional bool is_hidden = 3; + * @return {boolean} + */ +proto.cc.arduino.cli.commands.BoardListItem.prototype.getIsHidden = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 3, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.cc.arduino.cli.commands.BoardListItem} returns this + */ +proto.cc.arduino.cli.commands.BoardListItem.prototype.setIsHidden = function(value) { + return jspb.Message.setProto3BooleanField(this, 3, value); +}; + + goog.object.extend(exports, proto.cc.arduino.cli.commands); diff --git a/arduino-ide-extension/src/node/cli-protocol/commands/commands_grpc_pb.d.ts b/arduino-ide-extension/src/node/cli-protocol/commands/commands_grpc_pb.d.ts index ddd2502b..be5c7737 100644 --- a/arduino-ide-extension/src/node/cli-protocol/commands/commands_grpc_pb.d.ts +++ b/arduino-ide-extension/src/node/cli-protocol/commands/commands_grpc_pb.d.ts @@ -25,6 +25,7 @@ interface IArduinoCoreService extends grpc.ServiceDefinition; responseDeserialize: grpc.deserialize; } +interface IArduinoCoreService_IArchiveSketch extends grpc.MethodDefinition { + path: string; // "/cc.arduino.cli.commands.ArduinoCore/ArchiveSketch" + requestStream: false; + responseStream: false; + requestSerialize: grpc.serialize; + requestDeserialize: grpc.deserialize; + responseSerialize: grpc.serialize; + responseDeserialize: grpc.deserialize; +} interface IArduinoCoreService_IBoardDetails extends grpc.MethodDefinition { path: string; // "/cc.arduino.cli.commands.ArduinoCore/BoardDetails" requestStream: false; @@ -228,6 +239,15 @@ interface IArduinoCoreService_IUpload extends grpc.MethodDefinition; responseDeserialize: grpc.deserialize; } +interface IArduinoCoreService_IUploadUsingProgrammer extends grpc.MethodDefinition { + path: string; // "/cc.arduino.cli.commands.ArduinoCore/UploadUsingProgrammer" + requestStream: false; + responseStream: true; + requestSerialize: grpc.serialize; + requestDeserialize: grpc.deserialize; + responseSerialize: grpc.serialize; + responseDeserialize: grpc.deserialize; +} interface IArduinoCoreService_IListProgrammersAvailableForUpload extends grpc.MethodDefinition { path: string; // "/cc.arduino.cli.commands.ArduinoCore/ListProgrammersAvailableForUpload" requestStream: false; @@ -341,6 +361,7 @@ export interface IArduinoCoreServer { upgrade: grpc.handleServerStreamingCall; version: grpc.handleUnaryCall; loadSketch: grpc.handleUnaryCall; + archiveSketch: grpc.handleUnaryCall; boardDetails: grpc.handleUnaryCall; boardAttach: grpc.handleServerStreamingCall; boardList: grpc.handleUnaryCall; @@ -351,6 +372,7 @@ export interface IArduinoCoreServer { platformUninstall: grpc.handleServerStreamingCall; platformUpgrade: grpc.handleServerStreamingCall; upload: grpc.handleServerStreamingCall; + uploadUsingProgrammer: grpc.handleServerStreamingCall; listProgrammersAvailableForUpload: grpc.handleUnaryCall; burnBootloader: grpc.handleServerStreamingCall; platformSearch: grpc.handleUnaryCall; @@ -390,6 +412,9 @@ export interface IArduinoCoreClient { loadSketch(request: commands_commands_pb.LoadSketchReq, callback: (error: grpc.ServiceError | null, response: commands_commands_pb.LoadSketchResp) => void): grpc.ClientUnaryCall; loadSketch(request: commands_commands_pb.LoadSketchReq, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: commands_commands_pb.LoadSketchResp) => void): grpc.ClientUnaryCall; loadSketch(request: commands_commands_pb.LoadSketchReq, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: commands_commands_pb.LoadSketchResp) => void): grpc.ClientUnaryCall; + archiveSketch(request: commands_commands_pb.ArchiveSketchReq, callback: (error: grpc.ServiceError | null, response: commands_commands_pb.ArchiveSketchResp) => void): grpc.ClientUnaryCall; + archiveSketch(request: commands_commands_pb.ArchiveSketchReq, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: commands_commands_pb.ArchiveSketchResp) => void): grpc.ClientUnaryCall; + archiveSketch(request: commands_commands_pb.ArchiveSketchReq, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: commands_commands_pb.ArchiveSketchResp) => void): grpc.ClientUnaryCall; boardDetails(request: commands_board_pb.BoardDetailsReq, callback: (error: grpc.ServiceError | null, response: commands_board_pb.BoardDetailsResp) => void): grpc.ClientUnaryCall; boardDetails(request: commands_board_pb.BoardDetailsReq, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: commands_board_pb.BoardDetailsResp) => void): grpc.ClientUnaryCall; boardDetails(request: commands_board_pb.BoardDetailsReq, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: commands_board_pb.BoardDetailsResp) => void): grpc.ClientUnaryCall; @@ -413,6 +438,8 @@ export interface IArduinoCoreClient { platformUpgrade(request: commands_core_pb.PlatformUpgradeReq, metadata?: grpc.Metadata, options?: Partial): grpc.ClientReadableStream; upload(request: commands_upload_pb.UploadReq, options?: Partial): grpc.ClientReadableStream; upload(request: commands_upload_pb.UploadReq, metadata?: grpc.Metadata, options?: Partial): grpc.ClientReadableStream; + uploadUsingProgrammer(request: commands_upload_pb.UploadUsingProgrammerReq, options?: Partial): grpc.ClientReadableStream; + uploadUsingProgrammer(request: commands_upload_pb.UploadUsingProgrammerReq, metadata?: grpc.Metadata, options?: Partial): grpc.ClientReadableStream; listProgrammersAvailableForUpload(request: commands_upload_pb.ListProgrammersAvailableForUploadReq, callback: (error: grpc.ServiceError | null, response: commands_upload_pb.ListProgrammersAvailableForUploadResp) => void): grpc.ClientUnaryCall; listProgrammersAvailableForUpload(request: commands_upload_pb.ListProgrammersAvailableForUploadReq, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: commands_upload_pb.ListProgrammersAvailableForUploadResp) => void): grpc.ClientUnaryCall; listProgrammersAvailableForUpload(request: commands_upload_pb.ListProgrammersAvailableForUploadReq, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: commands_upload_pb.ListProgrammersAvailableForUploadResp) => void): grpc.ClientUnaryCall; @@ -444,7 +471,7 @@ export interface IArduinoCoreClient { } export class ArduinoCoreClient extends grpc.Client implements IArduinoCoreClient { - constructor(address: string, credentials: grpc.ChannelCredentials, options?: object); + constructor(address: string, credentials: grpc.ChannelCredentials, options?: Partial); public init(request: commands_commands_pb.InitReq, options?: Partial): grpc.ClientReadableStream; public init(request: commands_commands_pb.InitReq, metadata?: grpc.Metadata, options?: Partial): grpc.ClientReadableStream; public destroy(request: commands_commands_pb.DestroyReq, callback: (error: grpc.ServiceError | null, response: commands_commands_pb.DestroyResp) => void): grpc.ClientUnaryCall; @@ -470,6 +497,9 @@ export class ArduinoCoreClient extends grpc.Client implements IArduinoCoreClient public loadSketch(request: commands_commands_pb.LoadSketchReq, callback: (error: grpc.ServiceError | null, response: commands_commands_pb.LoadSketchResp) => void): grpc.ClientUnaryCall; public loadSketch(request: commands_commands_pb.LoadSketchReq, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: commands_commands_pb.LoadSketchResp) => void): grpc.ClientUnaryCall; public loadSketch(request: commands_commands_pb.LoadSketchReq, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: commands_commands_pb.LoadSketchResp) => void): grpc.ClientUnaryCall; + public archiveSketch(request: commands_commands_pb.ArchiveSketchReq, callback: (error: grpc.ServiceError | null, response: commands_commands_pb.ArchiveSketchResp) => void): grpc.ClientUnaryCall; + public archiveSketch(request: commands_commands_pb.ArchiveSketchReq, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: commands_commands_pb.ArchiveSketchResp) => void): grpc.ClientUnaryCall; + public archiveSketch(request: commands_commands_pb.ArchiveSketchReq, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: commands_commands_pb.ArchiveSketchResp) => void): grpc.ClientUnaryCall; public boardDetails(request: commands_board_pb.BoardDetailsReq, callback: (error: grpc.ServiceError | null, response: commands_board_pb.BoardDetailsResp) => void): grpc.ClientUnaryCall; public boardDetails(request: commands_board_pb.BoardDetailsReq, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: commands_board_pb.BoardDetailsResp) => void): grpc.ClientUnaryCall; public boardDetails(request: commands_board_pb.BoardDetailsReq, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: commands_board_pb.BoardDetailsResp) => void): grpc.ClientUnaryCall; @@ -493,6 +523,8 @@ export class ArduinoCoreClient extends grpc.Client implements IArduinoCoreClient public platformUpgrade(request: commands_core_pb.PlatformUpgradeReq, metadata?: grpc.Metadata, options?: Partial): grpc.ClientReadableStream; public upload(request: commands_upload_pb.UploadReq, options?: Partial): grpc.ClientReadableStream; public upload(request: commands_upload_pb.UploadReq, metadata?: grpc.Metadata, options?: Partial): grpc.ClientReadableStream; + public uploadUsingProgrammer(request: commands_upload_pb.UploadUsingProgrammerReq, options?: Partial): grpc.ClientReadableStream; + public uploadUsingProgrammer(request: commands_upload_pb.UploadUsingProgrammerReq, metadata?: grpc.Metadata, options?: Partial): grpc.ClientReadableStream; public listProgrammersAvailableForUpload(request: commands_upload_pb.ListProgrammersAvailableForUploadReq, callback: (error: grpc.ServiceError | null, response: commands_upload_pb.ListProgrammersAvailableForUploadResp) => void): grpc.ClientUnaryCall; public listProgrammersAvailableForUpload(request: commands_upload_pb.ListProgrammersAvailableForUploadReq, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: commands_upload_pb.ListProgrammersAvailableForUploadResp) => void): grpc.ClientUnaryCall; public listProgrammersAvailableForUpload(request: commands_upload_pb.ListProgrammersAvailableForUploadReq, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: commands_upload_pb.ListProgrammersAvailableForUploadResp) => void): grpc.ClientUnaryCall; diff --git a/arduino-ide-extension/src/node/cli-protocol/commands/commands_grpc_pb.js b/arduino-ide-extension/src/node/cli-protocol/commands/commands_grpc_pb.js index 6f46c8b6..0f30175c 100644 --- a/arduino-ide-extension/src/node/cli-protocol/commands/commands_grpc_pb.js +++ b/arduino-ide-extension/src/node/cli-protocol/commands/commands_grpc_pb.js @@ -25,6 +25,28 @@ var commands_core_pb = require('../commands/core_pb.js'); var commands_upload_pb = require('../commands/upload_pb.js'); var commands_lib_pb = require('../commands/lib_pb.js'); +function serialize_cc_arduino_cli_commands_ArchiveSketchReq(arg) { + if (!(arg instanceof commands_commands_pb.ArchiveSketchReq)) { + throw new Error('Expected argument of type cc.arduino.cli.commands.ArchiveSketchReq'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_cc_arduino_cli_commands_ArchiveSketchReq(buffer_arg) { + return commands_commands_pb.ArchiveSketchReq.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_cc_arduino_cli_commands_ArchiveSketchResp(arg) { + if (!(arg instanceof commands_commands_pb.ArchiveSketchResp)) { + throw new Error('Expected argument of type cc.arduino.cli.commands.ArchiveSketchResp'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_cc_arduino_cli_commands_ArchiveSketchResp(buffer_arg) { + return commands_commands_pb.ArchiveSketchResp.deserializeBinary(new Uint8Array(buffer_arg)); +} + function serialize_cc_arduino_cli_commands_BoardAttachReq(arg) { if (!(arg instanceof commands_board_pb.BoardAttachReq)) { throw new Error('Expected argument of type cc.arduino.cli.commands.BoardAttachReq'); @@ -685,6 +707,28 @@ function deserialize_cc_arduino_cli_commands_UploadResp(buffer_arg) { return commands_upload_pb.UploadResp.deserializeBinary(new Uint8Array(buffer_arg)); } +function serialize_cc_arduino_cli_commands_UploadUsingProgrammerReq(arg) { + if (!(arg instanceof commands_upload_pb.UploadUsingProgrammerReq)) { + throw new Error('Expected argument of type cc.arduino.cli.commands.UploadUsingProgrammerReq'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_cc_arduino_cli_commands_UploadUsingProgrammerReq(buffer_arg) { + return commands_upload_pb.UploadUsingProgrammerReq.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_cc_arduino_cli_commands_UploadUsingProgrammerResp(arg) { + if (!(arg instanceof commands_upload_pb.UploadUsingProgrammerResp)) { + throw new Error('Expected argument of type cc.arduino.cli.commands.UploadUsingProgrammerResp'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_cc_arduino_cli_commands_UploadUsingProgrammerResp(buffer_arg) { + return commands_upload_pb.UploadUsingProgrammerResp.deserializeBinary(new Uint8Array(buffer_arg)); +} + function serialize_cc_arduino_cli_commands_VersionReq(arg) { if (!(arg instanceof commands_commands_pb.VersionReq)) { throw new Error('Expected argument of type cc.arduino.cli.commands.VersionReq'); @@ -830,6 +874,18 @@ loadSketch: { responseSerialize: serialize_cc_arduino_cli_commands_LoadSketchResp, responseDeserialize: deserialize_cc_arduino_cli_commands_LoadSketchResp, }, + // Creates a zip file containing all files of specified Sketch +archiveSketch: { + path: '/cc.arduino.cli.commands.ArduinoCore/ArchiveSketch', + requestStream: false, + responseStream: false, + requestType: commands_commands_pb.ArchiveSketchReq, + responseType: commands_commands_pb.ArchiveSketchResp, + requestSerialize: serialize_cc_arduino_cli_commands_ArchiveSketchReq, + requestDeserialize: deserialize_cc_arduino_cli_commands_ArchiveSketchReq, + responseSerialize: serialize_cc_arduino_cli_commands_ArchiveSketchResp, + responseDeserialize: deserialize_cc_arduino_cli_commands_ArchiveSketchResp, + }, // BOARD COMMANDS // -------------- // @@ -944,7 +1000,7 @@ platformUpgrade: { responseSerialize: serialize_cc_arduino_cli_commands_PlatformUpgradeResp, responseDeserialize: deserialize_cc_arduino_cli_commands_PlatformUpgradeResp, }, - // Upload a compiled sketch to an Arduino board. + // Upload a compiled sketch to a board. upload: { path: '/cc.arduino.cli.commands.ArduinoCore/Upload', requestStream: false, @@ -956,7 +1012,20 @@ upload: { responseSerialize: serialize_cc_arduino_cli_commands_UploadResp, responseDeserialize: deserialize_cc_arduino_cli_commands_UploadResp, }, - listProgrammersAvailableForUpload: { + // Upload a compiled sketch to a board using a programmer. +uploadUsingProgrammer: { + path: '/cc.arduino.cli.commands.ArduinoCore/UploadUsingProgrammer', + requestStream: false, + responseStream: true, + requestType: commands_upload_pb.UploadUsingProgrammerReq, + responseType: commands_upload_pb.UploadUsingProgrammerResp, + requestSerialize: serialize_cc_arduino_cli_commands_UploadUsingProgrammerReq, + requestDeserialize: deserialize_cc_arduino_cli_commands_UploadUsingProgrammerReq, + responseSerialize: serialize_cc_arduino_cli_commands_UploadUsingProgrammerResp, + responseDeserialize: deserialize_cc_arduino_cli_commands_UploadUsingProgrammerResp, + }, + // List programmers available for a board. +listProgrammersAvailableForUpload: { path: '/cc.arduino.cli.commands.ArduinoCore/ListProgrammersAvailableForUpload', requestStream: false, responseStream: false, diff --git a/arduino-ide-extension/src/node/cli-protocol/commands/commands_pb.d.ts b/arduino-ide-extension/src/node/cli-protocol/commands/commands_pb.d.ts index d88be6da..f4ee431f 100644 --- a/arduino-ide-extension/src/node/cli-protocol/commands/commands_pb.d.ts +++ b/arduino-ide-extension/src/node/cli-protocol/commands/commands_pb.d.ts @@ -377,6 +377,9 @@ export class UpgradeReq extends jspb.Message { getInstance(): commands_common_pb.Instance | undefined; setInstance(value?: commands_common_pb.Instance): UpgradeReq; + getSkippostinstall(): boolean; + setSkippostinstall(value: boolean): UpgradeReq; + serializeBinary(): Uint8Array; toObject(includeInstance?: boolean): UpgradeReq.AsObject; @@ -391,6 +394,7 @@ export class UpgradeReq extends jspb.Message { export namespace UpgradeReq { export type AsObject = { instance?: commands_common_pb.Instance.AsObject, + skippostinstall: boolean, } } @@ -527,3 +531,49 @@ export namespace LoadSketchResp { additionalFilesList: Array, } } + +export class ArchiveSketchReq extends jspb.Message { + getSketchPath(): string; + setSketchPath(value: string): ArchiveSketchReq; + + getArchivePath(): string; + setArchivePath(value: string): ArchiveSketchReq; + + getIncludeBuildDir(): boolean; + setIncludeBuildDir(value: boolean): ArchiveSketchReq; + + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): ArchiveSketchReq.AsObject; + static toObject(includeInstance: boolean, msg: ArchiveSketchReq): ArchiveSketchReq.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: ArchiveSketchReq, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): ArchiveSketchReq; + static deserializeBinaryFromReader(message: ArchiveSketchReq, reader: jspb.BinaryReader): ArchiveSketchReq; +} + +export namespace ArchiveSketchReq { + export type AsObject = { + sketchPath: string, + archivePath: string, + includeBuildDir: boolean, + } +} + +export class ArchiveSketchResp extends jspb.Message { + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): ArchiveSketchResp.AsObject; + static toObject(includeInstance: boolean, msg: ArchiveSketchResp): ArchiveSketchResp.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: ArchiveSketchResp, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): ArchiveSketchResp; + static deserializeBinaryFromReader(message: ArchiveSketchResp, reader: jspb.BinaryReader): ArchiveSketchResp; +} + +export namespace ArchiveSketchResp { + export type AsObject = { + } +} diff --git a/arduino-ide-extension/src/node/cli-protocol/commands/commands_pb.js b/arduino-ide-extension/src/node/cli-protocol/commands/commands_pb.js index 8a141d0e..21e5486a 100644 --- a/arduino-ide-extension/src/node/cli-protocol/commands/commands_pb.js +++ b/arduino-ide-extension/src/node/cli-protocol/commands/commands_pb.js @@ -24,6 +24,8 @@ var commands_upload_pb = require('../commands/upload_pb.js'); goog.object.extend(proto, commands_upload_pb); var commands_lib_pb = require('../commands/lib_pb.js'); goog.object.extend(proto, commands_lib_pb); +goog.exportSymbol('proto.cc.arduino.cli.commands.ArchiveSketchReq', null, global); +goog.exportSymbol('proto.cc.arduino.cli.commands.ArchiveSketchResp', null, global); goog.exportSymbol('proto.cc.arduino.cli.commands.DestroyReq', null, global); goog.exportSymbol('proto.cc.arduino.cli.commands.DestroyResp', null, global); goog.exportSymbol('proto.cc.arduino.cli.commands.InitReq', null, global); @@ -464,6 +466,48 @@ if (goog.DEBUG && !COMPILED) { */ proto.cc.arduino.cli.commands.LoadSketchResp.displayName = 'proto.cc.arduino.cli.commands.LoadSketchResp'; } +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.cc.arduino.cli.commands.ArchiveSketchReq = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cc.arduino.cli.commands.ArchiveSketchReq, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cc.arduino.cli.commands.ArchiveSketchReq.displayName = 'proto.cc.arduino.cli.commands.ArchiveSketchReq'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.cc.arduino.cli.commands.ArchiveSketchResp = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cc.arduino.cli.commands.ArchiveSketchResp, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cc.arduino.cli.commands.ArchiveSketchResp.displayName = 'proto.cc.arduino.cli.commands.ArchiveSketchResp'; +} @@ -2824,7 +2868,8 @@ proto.cc.arduino.cli.commands.UpgradeReq.prototype.toObject = function(opt_inclu */ proto.cc.arduino.cli.commands.UpgradeReq.toObject = function(includeInstance, msg) { var f, obj = { - instance: (f = msg.getInstance()) && commands_common_pb.Instance.toObject(includeInstance, f) + instance: (f = msg.getInstance()) && commands_common_pb.Instance.toObject(includeInstance, f), + skippostinstall: jspb.Message.getBooleanFieldWithDefault(msg, 2, false) }; if (includeInstance) { @@ -2866,6 +2911,10 @@ proto.cc.arduino.cli.commands.UpgradeReq.deserializeBinaryFromReader = function( reader.readMessage(value,commands_common_pb.Instance.deserializeBinaryFromReader); msg.setInstance(value); break; + case 2: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setSkippostinstall(value); + break; default: reader.skipField(); break; @@ -2903,6 +2952,13 @@ proto.cc.arduino.cli.commands.UpgradeReq.serializeBinaryToWriter = function(mess commands_common_pb.Instance.serializeBinaryToWriter ); } + f = message.getSkippostinstall(); + if (f) { + writer.writeBool( + 2, + f + ); + } }; @@ -2943,6 +2999,24 @@ proto.cc.arduino.cli.commands.UpgradeReq.prototype.hasInstance = function() { }; +/** + * optional bool skipPostInstall = 2; + * @return {boolean} + */ +proto.cc.arduino.cli.commands.UpgradeReq.prototype.getSkippostinstall = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 2, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.cc.arduino.cli.commands.UpgradeReq} returns this + */ +proto.cc.arduino.cli.commands.UpgradeReq.prototype.setSkippostinstall = function(value) { + return jspb.Message.setProto3BooleanField(this, 2, value); +}; + + @@ -3822,4 +3896,295 @@ proto.cc.arduino.cli.commands.LoadSketchResp.prototype.clearAdditionalFilesList }; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.cc.arduino.cli.commands.ArchiveSketchReq.prototype.toObject = function(opt_includeInstance) { + return proto.cc.arduino.cli.commands.ArchiveSketchReq.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.cc.arduino.cli.commands.ArchiveSketchReq} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cc.arduino.cli.commands.ArchiveSketchReq.toObject = function(includeInstance, msg) { + var f, obj = { + sketchPath: jspb.Message.getFieldWithDefault(msg, 1, ""), + archivePath: jspb.Message.getFieldWithDefault(msg, 2, ""), + includeBuildDir: jspb.Message.getBooleanFieldWithDefault(msg, 3, false) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.cc.arduino.cli.commands.ArchiveSketchReq} + */ +proto.cc.arduino.cli.commands.ArchiveSketchReq.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cc.arduino.cli.commands.ArchiveSketchReq; + return proto.cc.arduino.cli.commands.ArchiveSketchReq.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cc.arduino.cli.commands.ArchiveSketchReq} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cc.arduino.cli.commands.ArchiveSketchReq} + */ +proto.cc.arduino.cli.commands.ArchiveSketchReq.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setSketchPath(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setArchivePath(value); + break; + case 3: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setIncludeBuildDir(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cc.arduino.cli.commands.ArchiveSketchReq.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cc.arduino.cli.commands.ArchiveSketchReq.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.cc.arduino.cli.commands.ArchiveSketchReq} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cc.arduino.cli.commands.ArchiveSketchReq.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getSketchPath(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getArchivePath(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getIncludeBuildDir(); + if (f) { + writer.writeBool( + 3, + f + ); + } +}; + + +/** + * optional string sketch_path = 1; + * @return {string} + */ +proto.cc.arduino.cli.commands.ArchiveSketchReq.prototype.getSketchPath = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cc.arduino.cli.commands.ArchiveSketchReq} returns this + */ +proto.cc.arduino.cli.commands.ArchiveSketchReq.prototype.setSketchPath = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string archive_path = 2; + * @return {string} + */ +proto.cc.arduino.cli.commands.ArchiveSketchReq.prototype.getArchivePath = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cc.arduino.cli.commands.ArchiveSketchReq} returns this + */ +proto.cc.arduino.cli.commands.ArchiveSketchReq.prototype.setArchivePath = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional bool include_build_dir = 3; + * @return {boolean} + */ +proto.cc.arduino.cli.commands.ArchiveSketchReq.prototype.getIncludeBuildDir = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 3, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.cc.arduino.cli.commands.ArchiveSketchReq} returns this + */ +proto.cc.arduino.cli.commands.ArchiveSketchReq.prototype.setIncludeBuildDir = function(value) { + return jspb.Message.setProto3BooleanField(this, 3, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.cc.arduino.cli.commands.ArchiveSketchResp.prototype.toObject = function(opt_includeInstance) { + return proto.cc.arduino.cli.commands.ArchiveSketchResp.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.cc.arduino.cli.commands.ArchiveSketchResp} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cc.arduino.cli.commands.ArchiveSketchResp.toObject = function(includeInstance, msg) { + var f, obj = { + + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.cc.arduino.cli.commands.ArchiveSketchResp} + */ +proto.cc.arduino.cli.commands.ArchiveSketchResp.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cc.arduino.cli.commands.ArchiveSketchResp; + return proto.cc.arduino.cli.commands.ArchiveSketchResp.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cc.arduino.cli.commands.ArchiveSketchResp} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cc.arduino.cli.commands.ArchiveSketchResp} + */ +proto.cc.arduino.cli.commands.ArchiveSketchResp.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cc.arduino.cli.commands.ArchiveSketchResp.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cc.arduino.cli.commands.ArchiveSketchResp.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.cc.arduino.cli.commands.ArchiveSketchResp} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cc.arduino.cli.commands.ArchiveSketchResp.serializeBinaryToWriter = function(message, writer) { + var f = undefined; +}; + + goog.object.extend(exports, proto.cc.arduino.cli.commands); diff --git a/arduino-ide-extension/src/node/cli-protocol/commands/compile_pb.d.ts b/arduino-ide-extension/src/node/cli-protocol/commands/compile_pb.d.ts index 3c15a582..d87ef9ce 100644 --- a/arduino-ide-extension/src/node/cli-protocol/commands/compile_pb.d.ts +++ b/arduino-ide-extension/src/node/cli-protocol/commands/compile_pb.d.ts @@ -49,9 +49,6 @@ export class CompileReq extends jspb.Message { getVidpid(): string; setVidpid(value: string): CompileReq; - getExportfile(): string; - setExportfile(value: string): CompileReq; - getJobs(): number; setJobs(value: number): CompileReq; @@ -63,12 +60,15 @@ export class CompileReq extends jspb.Message { getOptimizefordebug(): boolean; setOptimizefordebug(value: boolean): CompileReq; - getDryrun(): boolean; - setDryrun(value: boolean): CompileReq; - getExportDir(): string; setExportDir(value: string): CompileReq; + getClean(): boolean; + setClean(value: boolean): CompileReq; + + getExportBinaries(): boolean; + setExportBinaries(value: boolean): CompileReq; + serializeBinary(): Uint8Array; toObject(includeInstance?: boolean): CompileReq.AsObject; @@ -94,12 +94,12 @@ export namespace CompileReq { verbose: boolean, quiet: boolean, vidpid: string, - exportfile: string, jobs: number, librariesList: Array, optimizefordebug: boolean, - dryrun: boolean, exportDir: string, + clean: boolean, + exportBinaries: boolean, } } diff --git a/arduino-ide-extension/src/node/cli-protocol/commands/compile_pb.js b/arduino-ide-extension/src/node/cli-protocol/commands/compile_pb.js index ae4aa947..d5a2b8ee 100644 --- a/arduino-ide-extension/src/node/cli-protocol/commands/compile_pb.js +++ b/arduino-ide-extension/src/node/cli-protocol/commands/compile_pb.js @@ -109,12 +109,12 @@ proto.cc.arduino.cli.commands.CompileReq.toObject = function(includeInstance, ms verbose: jspb.Message.getBooleanFieldWithDefault(msg, 10, false), quiet: jspb.Message.getBooleanFieldWithDefault(msg, 11, false), vidpid: jspb.Message.getFieldWithDefault(msg, 12, ""), - exportfile: jspb.Message.getFieldWithDefault(msg, 13, ""), jobs: jspb.Message.getFieldWithDefault(msg, 14, 0), librariesList: (f = jspb.Message.getRepeatedField(msg, 15)) == null ? undefined : f, optimizefordebug: jspb.Message.getBooleanFieldWithDefault(msg, 16, false), - dryrun: jspb.Message.getBooleanFieldWithDefault(msg, 17, false), - exportDir: jspb.Message.getFieldWithDefault(msg, 18, "") + exportDir: jspb.Message.getFieldWithDefault(msg, 18, ""), + clean: jspb.Message.getBooleanFieldWithDefault(msg, 19, false), + exportBinaries: jspb.Message.getBooleanFieldWithDefault(msg, 20, false) }; if (includeInstance) { @@ -200,10 +200,6 @@ proto.cc.arduino.cli.commands.CompileReq.deserializeBinaryFromReader = function( var value = /** @type {string} */ (reader.readString()); msg.setVidpid(value); break; - case 13: - var value = /** @type {string} */ (reader.readString()); - msg.setExportfile(value); - break; case 14: var value = /** @type {number} */ (reader.readInt32()); msg.setJobs(value); @@ -216,14 +212,18 @@ proto.cc.arduino.cli.commands.CompileReq.deserializeBinaryFromReader = function( var value = /** @type {boolean} */ (reader.readBool()); msg.setOptimizefordebug(value); break; - case 17: - var value = /** @type {boolean} */ (reader.readBool()); - msg.setDryrun(value); - break; case 18: var value = /** @type {string} */ (reader.readString()); msg.setExportDir(value); break; + case 19: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setClean(value); + break; + case 20: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setExportBinaries(value); + break; default: reader.skipField(); break; @@ -338,13 +338,6 @@ proto.cc.arduino.cli.commands.CompileReq.serializeBinaryToWriter = function(mess f ); } - f = message.getExportfile(); - if (f.length > 0) { - writer.writeString( - 13, - f - ); - } f = message.getJobs(); if (f !== 0) { writer.writeInt32( @@ -366,13 +359,6 @@ proto.cc.arduino.cli.commands.CompileReq.serializeBinaryToWriter = function(mess f ); } - f = message.getDryrun(); - if (f) { - writer.writeBool( - 17, - f - ); - } f = message.getExportDir(); if (f.length > 0) { writer.writeString( @@ -380,6 +366,20 @@ proto.cc.arduino.cli.commands.CompileReq.serializeBinaryToWriter = function(mess f ); } + f = message.getClean(); + if (f) { + writer.writeBool( + 19, + f + ); + } + f = message.getExportBinaries(); + if (f) { + writer.writeBool( + 20, + f + ); + } }; @@ -637,24 +637,6 @@ proto.cc.arduino.cli.commands.CompileReq.prototype.setVidpid = function(value) { }; -/** - * optional string exportFile = 13; - * @return {string} - */ -proto.cc.arduino.cli.commands.CompileReq.prototype.getExportfile = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 13, "")); -}; - - -/** - * @param {string} value - * @return {!proto.cc.arduino.cli.commands.CompileReq} returns this - */ -proto.cc.arduino.cli.commands.CompileReq.prototype.setExportfile = function(value) { - return jspb.Message.setProto3StringField(this, 13, value); -}; - - /** * optional int32 jobs = 14; * @return {number} @@ -728,24 +710,6 @@ proto.cc.arduino.cli.commands.CompileReq.prototype.setOptimizefordebug = functio }; -/** - * optional bool dryRun = 17; - * @return {boolean} - */ -proto.cc.arduino.cli.commands.CompileReq.prototype.getDryrun = function() { - return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 17, false)); -}; - - -/** - * @param {boolean} value - * @return {!proto.cc.arduino.cli.commands.CompileReq} returns this - */ -proto.cc.arduino.cli.commands.CompileReq.prototype.setDryrun = function(value) { - return jspb.Message.setProto3BooleanField(this, 17, value); -}; - - /** * optional string export_dir = 18; * @return {string} @@ -764,6 +728,42 @@ proto.cc.arduino.cli.commands.CompileReq.prototype.setExportDir = function(value }; +/** + * optional bool clean = 19; + * @return {boolean} + */ +proto.cc.arduino.cli.commands.CompileReq.prototype.getClean = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 19, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.cc.arduino.cli.commands.CompileReq} returns this + */ +proto.cc.arduino.cli.commands.CompileReq.prototype.setClean = function(value) { + return jspb.Message.setProto3BooleanField(this, 19, value); +}; + + +/** + * optional bool export_binaries = 20; + * @return {boolean} + */ +proto.cc.arduino.cli.commands.CompileReq.prototype.getExportBinaries = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 20, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.cc.arduino.cli.commands.CompileReq} returns this + */ +proto.cc.arduino.cli.commands.CompileReq.prototype.setExportBinaries = function(value) { + return jspb.Message.setProto3BooleanField(this, 20, value); +}; + + diff --git a/arduino-ide-extension/src/node/cli-protocol/commands/lib_pb.d.ts b/arduino-ide-extension/src/node/cli-protocol/commands/lib_pb.d.ts index f1960aa9..bd22edb0 100644 --- a/arduino-ide-extension/src/node/cli-protocol/commands/lib_pb.d.ts +++ b/arduino-ide-extension/src/node/cli-protocol/commands/lib_pb.d.ts @@ -732,6 +732,10 @@ export class Library extends jspb.Message { addProvidesIncludes(value: string, index?: number): string; + getCompatibleWithMap(): jspb.Map; + clearCompatibleWithMap(): void; + + serializeBinary(): Uint8Array; toObject(includeInstance?: boolean): Library.AsObject; static toObject(includeInstance: boolean, msg: Library): Library.AsObject; @@ -770,6 +774,8 @@ export namespace Library { layout: LibraryLayout, examplesList: Array, providesIncludesList: Array, + + compatibleWithMap: Array<[string, boolean]>, } } diff --git a/arduino-ide-extension/src/node/cli-protocol/commands/lib_pb.js b/arduino-ide-extension/src/node/cli-protocol/commands/lib_pb.js index 38689df6..4deb1999 100644 --- a/arduino-ide-extension/src/node/cli-protocol/commands/lib_pb.js +++ b/arduino-ide-extension/src/node/cli-protocol/commands/lib_pb.js @@ -4819,7 +4819,8 @@ proto.cc.arduino.cli.commands.Library.toObject = function(includeInstance, msg) location: jspb.Message.getFieldWithDefault(msg, 24, 0), layout: jspb.Message.getFieldWithDefault(msg, 25, 0), examplesList: (f = jspb.Message.getRepeatedField(msg, 26)) == null ? undefined : f, - providesIncludesList: (f = jspb.Message.getRepeatedField(msg, 27)) == null ? undefined : f + providesIncludesList: (f = jspb.Message.getRepeatedField(msg, 27)) == null ? undefined : f, + compatibleWithMap: (f = msg.getCompatibleWithMap()) ? f.toObject(includeInstance, undefined) : [] }; if (includeInstance) { @@ -4958,6 +4959,12 @@ proto.cc.arduino.cli.commands.Library.deserializeBinaryFromReader = function(msg var value = /** @type {string} */ (reader.readString()); msg.addProvidesIncludes(value); break; + case 28: + var value = msg.getCompatibleWithMap(); + reader.readMessage(value, function(message, reader) { + jspb.Map.deserializeBinary(message, reader, jspb.BinaryReader.prototype.readString, jspb.BinaryReader.prototype.readBool, null, "", false); + }); + break; default: reader.skipField(); break; @@ -5159,6 +5166,10 @@ proto.cc.arduino.cli.commands.Library.serializeBinaryToWriter = function(message f ); } + f = message.getCompatibleWithMap(true); + if (f && f.getLength() > 0) { + f.serializeBinary(28, writer, jspb.BinaryWriter.prototype.writeString, jspb.BinaryWriter.prototype.writeBool); + } }; @@ -5692,6 +5703,28 @@ proto.cc.arduino.cli.commands.Library.prototype.clearProvidesIncludesList = func }; +/** + * map compatible_with = 28; + * @param {boolean=} opt_noLazyCreate Do not create the map if + * empty, instead returning `undefined` + * @return {!jspb.Map} + */ +proto.cc.arduino.cli.commands.Library.prototype.getCompatibleWithMap = function(opt_noLazyCreate) { + return /** @type {!jspb.Map} */ ( + jspb.Message.getMapField(this, 28, opt_noLazyCreate, + null)); +}; + + +/** + * Clears values from the map. The map will be non-null. + * @return {!proto.cc.arduino.cli.commands.Library} returns this + */ +proto.cc.arduino.cli.commands.Library.prototype.clearCompatibleWithMap = function() { + this.getCompatibleWithMap().clear(); + return this;}; + + /** * @enum {number} */ diff --git a/arduino-ide-extension/src/node/cli-protocol/commands/upload_pb.d.ts b/arduino-ide-extension/src/node/cli-protocol/commands/upload_pb.d.ts index 548b2826..50200cd3 100644 --- a/arduino-ide-extension/src/node/cli-protocol/commands/upload_pb.d.ts +++ b/arduino-ide-extension/src/node/cli-protocol/commands/upload_pb.d.ts @@ -92,6 +92,91 @@ export namespace UploadResp { } } +export class UploadUsingProgrammerReq extends jspb.Message { + + hasInstance(): boolean; + clearInstance(): void; + getInstance(): commands_common_pb.Instance | undefined; + setInstance(value?: commands_common_pb.Instance): UploadUsingProgrammerReq; + + getFqbn(): string; + setFqbn(value: string): UploadUsingProgrammerReq; + + getSketchPath(): string; + setSketchPath(value: string): UploadUsingProgrammerReq; + + getPort(): string; + setPort(value: string): UploadUsingProgrammerReq; + + getVerbose(): boolean; + setVerbose(value: boolean): UploadUsingProgrammerReq; + + getVerify(): boolean; + setVerify(value: boolean): UploadUsingProgrammerReq; + + getImportFile(): string; + setImportFile(value: string): UploadUsingProgrammerReq; + + getImportDir(): string; + setImportDir(value: string): UploadUsingProgrammerReq; + + getProgrammer(): string; + setProgrammer(value: string): UploadUsingProgrammerReq; + + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): UploadUsingProgrammerReq.AsObject; + static toObject(includeInstance: boolean, msg: UploadUsingProgrammerReq): UploadUsingProgrammerReq.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: UploadUsingProgrammerReq, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): UploadUsingProgrammerReq; + static deserializeBinaryFromReader(message: UploadUsingProgrammerReq, reader: jspb.BinaryReader): UploadUsingProgrammerReq; +} + +export namespace UploadUsingProgrammerReq { + export type AsObject = { + instance?: commands_common_pb.Instance.AsObject, + fqbn: string, + sketchPath: string, + port: string, + verbose: boolean, + verify: boolean, + importFile: string, + importDir: string, + programmer: string, + } +} + +export class UploadUsingProgrammerResp extends jspb.Message { + getOutStream(): Uint8Array | string; + getOutStream_asU8(): Uint8Array; + getOutStream_asB64(): string; + setOutStream(value: Uint8Array | string): UploadUsingProgrammerResp; + + getErrStream(): Uint8Array | string; + getErrStream_asU8(): Uint8Array; + getErrStream_asB64(): string; + setErrStream(value: Uint8Array | string): UploadUsingProgrammerResp; + + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): UploadUsingProgrammerResp.AsObject; + static toObject(includeInstance: boolean, msg: UploadUsingProgrammerResp): UploadUsingProgrammerResp.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: UploadUsingProgrammerResp, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): UploadUsingProgrammerResp; + static deserializeBinaryFromReader(message: UploadUsingProgrammerResp, reader: jspb.BinaryReader): UploadUsingProgrammerResp; +} + +export namespace UploadUsingProgrammerResp { + export type AsObject = { + outStream: Uint8Array | string, + errStream: Uint8Array | string, + } +} + export class BurnBootloaderReq extends jspb.Message { hasInstance(): boolean; diff --git a/arduino-ide-extension/src/node/cli-protocol/commands/upload_pb.js b/arduino-ide-extension/src/node/cli-protocol/commands/upload_pb.js index c5767ae9..cb641121 100644 --- a/arduino-ide-extension/src/node/cli-protocol/commands/upload_pb.js +++ b/arduino-ide-extension/src/node/cli-protocol/commands/upload_pb.js @@ -20,6 +20,8 @@ goog.exportSymbol('proto.cc.arduino.cli.commands.ListProgrammersAvailableForUplo goog.exportSymbol('proto.cc.arduino.cli.commands.ListProgrammersAvailableForUploadResp', null, global); goog.exportSymbol('proto.cc.arduino.cli.commands.UploadReq', null, global); goog.exportSymbol('proto.cc.arduino.cli.commands.UploadResp', null, global); +goog.exportSymbol('proto.cc.arduino.cli.commands.UploadUsingProgrammerReq', null, global); +goog.exportSymbol('proto.cc.arduino.cli.commands.UploadUsingProgrammerResp', null, global); /** * Generated by JsPbCodeGenerator. * @param {Array=} opt_data Optional initial data array, typically from a @@ -62,6 +64,48 @@ if (goog.DEBUG && !COMPILED) { */ proto.cc.arduino.cli.commands.UploadResp.displayName = 'proto.cc.arduino.cli.commands.UploadResp'; } +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.cc.arduino.cli.commands.UploadUsingProgrammerReq = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cc.arduino.cli.commands.UploadUsingProgrammerReq, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cc.arduino.cli.commands.UploadUsingProgrammerReq.displayName = 'proto.cc.arduino.cli.commands.UploadUsingProgrammerReq'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.cc.arduino.cli.commands.UploadUsingProgrammerResp = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cc.arduino.cli.commands.UploadUsingProgrammerResp, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cc.arduino.cli.commands.UploadUsingProgrammerResp.displayName = 'proto.cc.arduino.cli.commands.UploadUsingProgrammerResp'; +} /** * Generated by JsPbCodeGenerator. * @param {Array=} opt_data Optional initial data array, typically from a @@ -748,6 +792,605 @@ proto.cc.arduino.cli.commands.UploadResp.prototype.setErrStream = function(value +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.cc.arduino.cli.commands.UploadUsingProgrammerReq.prototype.toObject = function(opt_includeInstance) { + return proto.cc.arduino.cli.commands.UploadUsingProgrammerReq.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.cc.arduino.cli.commands.UploadUsingProgrammerReq} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cc.arduino.cli.commands.UploadUsingProgrammerReq.toObject = function(includeInstance, msg) { + var f, obj = { + instance: (f = msg.getInstance()) && commands_common_pb.Instance.toObject(includeInstance, f), + fqbn: jspb.Message.getFieldWithDefault(msg, 2, ""), + sketchPath: jspb.Message.getFieldWithDefault(msg, 3, ""), + port: jspb.Message.getFieldWithDefault(msg, 4, ""), + verbose: jspb.Message.getBooleanFieldWithDefault(msg, 5, false), + verify: jspb.Message.getBooleanFieldWithDefault(msg, 6, false), + importFile: jspb.Message.getFieldWithDefault(msg, 7, ""), + importDir: jspb.Message.getFieldWithDefault(msg, 8, ""), + programmer: jspb.Message.getFieldWithDefault(msg, 9, "") + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.cc.arduino.cli.commands.UploadUsingProgrammerReq} + */ +proto.cc.arduino.cli.commands.UploadUsingProgrammerReq.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cc.arduino.cli.commands.UploadUsingProgrammerReq; + return proto.cc.arduino.cli.commands.UploadUsingProgrammerReq.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cc.arduino.cli.commands.UploadUsingProgrammerReq} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cc.arduino.cli.commands.UploadUsingProgrammerReq} + */ +proto.cc.arduino.cli.commands.UploadUsingProgrammerReq.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new commands_common_pb.Instance; + reader.readMessage(value,commands_common_pb.Instance.deserializeBinaryFromReader); + msg.setInstance(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setFqbn(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.setSketchPath(value); + break; + case 4: + var value = /** @type {string} */ (reader.readString()); + msg.setPort(value); + break; + case 5: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setVerbose(value); + break; + case 6: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setVerify(value); + break; + case 7: + var value = /** @type {string} */ (reader.readString()); + msg.setImportFile(value); + break; + case 8: + var value = /** @type {string} */ (reader.readString()); + msg.setImportDir(value); + break; + case 9: + var value = /** @type {string} */ (reader.readString()); + msg.setProgrammer(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cc.arduino.cli.commands.UploadUsingProgrammerReq.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cc.arduino.cli.commands.UploadUsingProgrammerReq.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.cc.arduino.cli.commands.UploadUsingProgrammerReq} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cc.arduino.cli.commands.UploadUsingProgrammerReq.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getInstance(); + if (f != null) { + writer.writeMessage( + 1, + f, + commands_common_pb.Instance.serializeBinaryToWriter + ); + } + f = message.getFqbn(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getSketchPath(); + if (f.length > 0) { + writer.writeString( + 3, + f + ); + } + f = message.getPort(); + if (f.length > 0) { + writer.writeString( + 4, + f + ); + } + f = message.getVerbose(); + if (f) { + writer.writeBool( + 5, + f + ); + } + f = message.getVerify(); + if (f) { + writer.writeBool( + 6, + f + ); + } + f = message.getImportFile(); + if (f.length > 0) { + writer.writeString( + 7, + f + ); + } + f = message.getImportDir(); + if (f.length > 0) { + writer.writeString( + 8, + f + ); + } + f = message.getProgrammer(); + if (f.length > 0) { + writer.writeString( + 9, + f + ); + } +}; + + +/** + * optional Instance instance = 1; + * @return {?proto.cc.arduino.cli.commands.Instance} + */ +proto.cc.arduino.cli.commands.UploadUsingProgrammerReq.prototype.getInstance = function() { + return /** @type{?proto.cc.arduino.cli.commands.Instance} */ ( + jspb.Message.getWrapperField(this, commands_common_pb.Instance, 1)); +}; + + +/** + * @param {?proto.cc.arduino.cli.commands.Instance|undefined} value + * @return {!proto.cc.arduino.cli.commands.UploadUsingProgrammerReq} returns this +*/ +proto.cc.arduino.cli.commands.UploadUsingProgrammerReq.prototype.setInstance = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cc.arduino.cli.commands.UploadUsingProgrammerReq} returns this + */ +proto.cc.arduino.cli.commands.UploadUsingProgrammerReq.prototype.clearInstance = function() { + return this.setInstance(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cc.arduino.cli.commands.UploadUsingProgrammerReq.prototype.hasInstance = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional string fqbn = 2; + * @return {string} + */ +proto.cc.arduino.cli.commands.UploadUsingProgrammerReq.prototype.getFqbn = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cc.arduino.cli.commands.UploadUsingProgrammerReq} returns this + */ +proto.cc.arduino.cli.commands.UploadUsingProgrammerReq.prototype.setFqbn = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional string sketch_path = 3; + * @return {string} + */ +proto.cc.arduino.cli.commands.UploadUsingProgrammerReq.prototype.getSketchPath = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cc.arduino.cli.commands.UploadUsingProgrammerReq} returns this + */ +proto.cc.arduino.cli.commands.UploadUsingProgrammerReq.prototype.setSketchPath = function(value) { + return jspb.Message.setProto3StringField(this, 3, value); +}; + + +/** + * optional string port = 4; + * @return {string} + */ +proto.cc.arduino.cli.commands.UploadUsingProgrammerReq.prototype.getPort = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cc.arduino.cli.commands.UploadUsingProgrammerReq} returns this + */ +proto.cc.arduino.cli.commands.UploadUsingProgrammerReq.prototype.setPort = function(value) { + return jspb.Message.setProto3StringField(this, 4, value); +}; + + +/** + * optional bool verbose = 5; + * @return {boolean} + */ +proto.cc.arduino.cli.commands.UploadUsingProgrammerReq.prototype.getVerbose = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 5, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.cc.arduino.cli.commands.UploadUsingProgrammerReq} returns this + */ +proto.cc.arduino.cli.commands.UploadUsingProgrammerReq.prototype.setVerbose = function(value) { + return jspb.Message.setProto3BooleanField(this, 5, value); +}; + + +/** + * optional bool verify = 6; + * @return {boolean} + */ +proto.cc.arduino.cli.commands.UploadUsingProgrammerReq.prototype.getVerify = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 6, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.cc.arduino.cli.commands.UploadUsingProgrammerReq} returns this + */ +proto.cc.arduino.cli.commands.UploadUsingProgrammerReq.prototype.setVerify = function(value) { + return jspb.Message.setProto3BooleanField(this, 6, value); +}; + + +/** + * optional string import_file = 7; + * @return {string} + */ +proto.cc.arduino.cli.commands.UploadUsingProgrammerReq.prototype.getImportFile = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 7, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cc.arduino.cli.commands.UploadUsingProgrammerReq} returns this + */ +proto.cc.arduino.cli.commands.UploadUsingProgrammerReq.prototype.setImportFile = function(value) { + return jspb.Message.setProto3StringField(this, 7, value); +}; + + +/** + * optional string import_dir = 8; + * @return {string} + */ +proto.cc.arduino.cli.commands.UploadUsingProgrammerReq.prototype.getImportDir = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 8, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cc.arduino.cli.commands.UploadUsingProgrammerReq} returns this + */ +proto.cc.arduino.cli.commands.UploadUsingProgrammerReq.prototype.setImportDir = function(value) { + return jspb.Message.setProto3StringField(this, 8, value); +}; + + +/** + * optional string programmer = 9; + * @return {string} + */ +proto.cc.arduino.cli.commands.UploadUsingProgrammerReq.prototype.getProgrammer = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 9, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cc.arduino.cli.commands.UploadUsingProgrammerReq} returns this + */ +proto.cc.arduino.cli.commands.UploadUsingProgrammerReq.prototype.setProgrammer = function(value) { + return jspb.Message.setProto3StringField(this, 9, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.cc.arduino.cli.commands.UploadUsingProgrammerResp.prototype.toObject = function(opt_includeInstance) { + return proto.cc.arduino.cli.commands.UploadUsingProgrammerResp.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.cc.arduino.cli.commands.UploadUsingProgrammerResp} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cc.arduino.cli.commands.UploadUsingProgrammerResp.toObject = function(includeInstance, msg) { + var f, obj = { + outStream: msg.getOutStream_asB64(), + errStream: msg.getErrStream_asB64() + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.cc.arduino.cli.commands.UploadUsingProgrammerResp} + */ +proto.cc.arduino.cli.commands.UploadUsingProgrammerResp.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cc.arduino.cli.commands.UploadUsingProgrammerResp; + return proto.cc.arduino.cli.commands.UploadUsingProgrammerResp.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cc.arduino.cli.commands.UploadUsingProgrammerResp} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cc.arduino.cli.commands.UploadUsingProgrammerResp} + */ +proto.cc.arduino.cli.commands.UploadUsingProgrammerResp.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setOutStream(value); + break; + case 2: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setErrStream(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cc.arduino.cli.commands.UploadUsingProgrammerResp.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cc.arduino.cli.commands.UploadUsingProgrammerResp.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.cc.arduino.cli.commands.UploadUsingProgrammerResp} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cc.arduino.cli.commands.UploadUsingProgrammerResp.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getOutStream_asU8(); + if (f.length > 0) { + writer.writeBytes( + 1, + f + ); + } + f = message.getErrStream_asU8(); + if (f.length > 0) { + writer.writeBytes( + 2, + f + ); + } +}; + + +/** + * optional bytes out_stream = 1; + * @return {!(string|Uint8Array)} + */ +proto.cc.arduino.cli.commands.UploadUsingProgrammerResp.prototype.getOutStream = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * optional bytes out_stream = 1; + * This is a type-conversion wrapper around `getOutStream()` + * @return {string} + */ +proto.cc.arduino.cli.commands.UploadUsingProgrammerResp.prototype.getOutStream_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getOutStream())); +}; + + +/** + * optional bytes out_stream = 1; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getOutStream()` + * @return {!Uint8Array} + */ +proto.cc.arduino.cli.commands.UploadUsingProgrammerResp.prototype.getOutStream_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getOutStream())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.cc.arduino.cli.commands.UploadUsingProgrammerResp} returns this + */ +proto.cc.arduino.cli.commands.UploadUsingProgrammerResp.prototype.setOutStream = function(value) { + return jspb.Message.setProto3BytesField(this, 1, value); +}; + + +/** + * optional bytes err_stream = 2; + * @return {!(string|Uint8Array)} + */ +proto.cc.arduino.cli.commands.UploadUsingProgrammerResp.prototype.getErrStream = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * optional bytes err_stream = 2; + * This is a type-conversion wrapper around `getErrStream()` + * @return {string} + */ +proto.cc.arduino.cli.commands.UploadUsingProgrammerResp.prototype.getErrStream_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getErrStream())); +}; + + +/** + * optional bytes err_stream = 2; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getErrStream()` + * @return {!Uint8Array} + */ +proto.cc.arduino.cli.commands.UploadUsingProgrammerResp.prototype.getErrStream_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getErrStream())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.cc.arduino.cli.commands.UploadUsingProgrammerResp} returns this + */ +proto.cc.arduino.cli.commands.UploadUsingProgrammerResp.prototype.setErrStream = function(value) { + return jspb.Message.setProto3BytesField(this, 2, value); +}; + + + + + if (jspb.Message.GENERATE_TO_OBJECT) { /** * Creates an object representation of this proto. diff --git a/arduino-ide-extension/src/node/cli-protocol/debug/debug_grpc_pb.d.ts b/arduino-ide-extension/src/node/cli-protocol/debug/debug_grpc_pb.d.ts index 6104b75f..8828a6d6 100644 --- a/arduino-ide-extension/src/node/cli-protocol/debug/debug_grpc_pb.d.ts +++ b/arduino-ide-extension/src/node/cli-protocol/debug/debug_grpc_pb.d.ts @@ -11,6 +11,7 @@ import * as commands_common_pb from "../commands/common_pb"; interface IDebugService extends grpc.ServiceDefinition { debug: IDebugService_IDebug; + getDebugConfig: IDebugService_IGetDebugConfig; } interface IDebugService_IDebug extends grpc.MethodDefinition { @@ -22,21 +23,37 @@ interface IDebugService_IDebug extends grpc.MethodDefinition; responseDeserialize: grpc.deserialize; } +interface IDebugService_IGetDebugConfig extends grpc.MethodDefinition { + path: string; // "/cc.arduino.cli.debug.Debug/GetDebugConfig" + requestStream: false; + responseStream: false; + requestSerialize: grpc.serialize; + requestDeserialize: grpc.deserialize; + responseSerialize: grpc.serialize; + responseDeserialize: grpc.deserialize; +} export const DebugService: IDebugService; export interface IDebugServer { debug: grpc.handleBidiStreamingCall; + getDebugConfig: grpc.handleUnaryCall; } export interface IDebugClient { debug(): grpc.ClientDuplexStream; debug(options: Partial): grpc.ClientDuplexStream; debug(metadata: grpc.Metadata, options?: Partial): grpc.ClientDuplexStream; + getDebugConfig(request: debug_debug_pb.DebugConfigReq, callback: (error: grpc.ServiceError | null, response: debug_debug_pb.GetDebugConfigResp) => void): grpc.ClientUnaryCall; + getDebugConfig(request: debug_debug_pb.DebugConfigReq, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: debug_debug_pb.GetDebugConfigResp) => void): grpc.ClientUnaryCall; + getDebugConfig(request: debug_debug_pb.DebugConfigReq, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: debug_debug_pb.GetDebugConfigResp) => void): grpc.ClientUnaryCall; } export class DebugClient extends grpc.Client implements IDebugClient { - constructor(address: string, credentials: grpc.ChannelCredentials, options?: object); + constructor(address: string, credentials: grpc.ChannelCredentials, options?: Partial); public debug(options?: Partial): grpc.ClientDuplexStream; public debug(metadata?: grpc.Metadata, options?: Partial): grpc.ClientDuplexStream; + public getDebugConfig(request: debug_debug_pb.DebugConfigReq, callback: (error: grpc.ServiceError | null, response: debug_debug_pb.GetDebugConfigResp) => void): grpc.ClientUnaryCall; + public getDebugConfig(request: debug_debug_pb.DebugConfigReq, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: debug_debug_pb.GetDebugConfigResp) => void): grpc.ClientUnaryCall; + public getDebugConfig(request: debug_debug_pb.DebugConfigReq, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: debug_debug_pb.GetDebugConfigResp) => void): grpc.ClientUnaryCall; } diff --git a/arduino-ide-extension/src/node/cli-protocol/debug/debug_grpc_pb.js b/arduino-ide-extension/src/node/cli-protocol/debug/debug_grpc_pb.js index 85621d86..03298fca 100644 --- a/arduino-ide-extension/src/node/cli-protocol/debug/debug_grpc_pb.js +++ b/arduino-ide-extension/src/node/cli-protocol/debug/debug_grpc_pb.js @@ -20,6 +20,17 @@ var debug_debug_pb = require('../debug/debug_pb.js'); var commands_common_pb = require('../commands/common_pb.js'); +function serialize_cc_arduino_cli_debug_DebugConfigReq(arg) { + if (!(arg instanceof debug_debug_pb.DebugConfigReq)) { + throw new Error('Expected argument of type cc.arduino.cli.debug.DebugConfigReq'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_cc_arduino_cli_debug_DebugConfigReq(buffer_arg) { + return debug_debug_pb.DebugConfigReq.deserializeBinary(new Uint8Array(buffer_arg)); +} + function serialize_cc_arduino_cli_debug_DebugReq(arg) { if (!(arg instanceof debug_debug_pb.DebugReq)) { throw new Error('Expected argument of type cc.arduino.cli.debug.DebugReq'); @@ -42,6 +53,17 @@ function deserialize_cc_arduino_cli_debug_DebugResp(buffer_arg) { return debug_debug_pb.DebugResp.deserializeBinary(new Uint8Array(buffer_arg)); } +function serialize_cc_arduino_cli_debug_GetDebugConfigResp(arg) { + if (!(arg instanceof debug_debug_pb.GetDebugConfigResp)) { + throw new Error('Expected argument of type cc.arduino.cli.debug.GetDebugConfigResp'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_cc_arduino_cli_debug_GetDebugConfigResp(buffer_arg) { + return debug_debug_pb.GetDebugConfigResp.deserializeBinary(new Uint8Array(buffer_arg)); +} + // Service that abstract a debug Session usage var DebugService = exports['cc.arduino.cli.debug.Debug'] = { @@ -57,5 +79,16 @@ debug: { responseSerialize: serialize_cc_arduino_cli_debug_DebugResp, responseDeserialize: deserialize_cc_arduino_cli_debug_DebugResp, }, + getDebugConfig: { + path: '/cc.arduino.cli.debug.Debug/GetDebugConfig', + requestStream: false, + responseStream: false, + requestType: debug_debug_pb.DebugConfigReq, + responseType: debug_debug_pb.GetDebugConfigResp, + requestSerialize: serialize_cc_arduino_cli_debug_DebugConfigReq, + requestDeserialize: deserialize_cc_arduino_cli_debug_DebugConfigReq, + responseSerialize: serialize_cc_arduino_cli_debug_GetDebugConfigResp, + responseDeserialize: deserialize_cc_arduino_cli_debug_GetDebugConfigResp, + }, }; diff --git a/arduino-ide-extension/src/node/cli-protocol/debug/debug_pb.d.ts b/arduino-ide-extension/src/node/cli-protocol/debug/debug_pb.d.ts index 135faa27..529f0cd2 100644 --- a/arduino-ide-extension/src/node/cli-protocol/debug/debug_pb.d.ts +++ b/arduino-ide-extension/src/node/cli-protocol/debug/debug_pb.d.ts @@ -60,12 +60,12 @@ export class DebugConfigReq extends jspb.Message { getInterpreter(): string; setInterpreter(value: string): DebugConfigReq; - getImportFile(): string; - setImportFile(value: string): DebugConfigReq; - getImportDir(): string; setImportDir(value: string): DebugConfigReq; + getProgrammer(): string; + setProgrammer(value: string): DebugConfigReq; + serializeBinary(): Uint8Array; toObject(includeInstance?: boolean): DebugConfigReq.AsObject; @@ -84,8 +84,8 @@ export namespace DebugConfigReq { sketchPath: string, port: string, interpreter: string, - importFile: string, importDir: string, + programmer: string, } } @@ -115,3 +115,56 @@ export namespace DebugResp { error: string, } } + +export class GetDebugConfigResp extends jspb.Message { + getExecutable(): string; + setExecutable(value: string): GetDebugConfigResp; + + getToolchain(): string; + setToolchain(value: string): GetDebugConfigResp; + + getToolchainPath(): string; + setToolchainPath(value: string): GetDebugConfigResp; + + getToolchainPrefix(): string; + setToolchainPrefix(value: string): GetDebugConfigResp; + + getServer(): string; + setServer(value: string): GetDebugConfigResp; + + getServerPath(): string; + setServerPath(value: string): GetDebugConfigResp; + + + getToolchainConfigurationMap(): jspb.Map; + clearToolchainConfigurationMap(): void; + + + getServerConfigurationMap(): jspb.Map; + clearServerConfigurationMap(): void; + + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): GetDebugConfigResp.AsObject; + static toObject(includeInstance: boolean, msg: GetDebugConfigResp): GetDebugConfigResp.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: GetDebugConfigResp, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): GetDebugConfigResp; + static deserializeBinaryFromReader(message: GetDebugConfigResp, reader: jspb.BinaryReader): GetDebugConfigResp; +} + +export namespace GetDebugConfigResp { + export type AsObject = { + executable: string, + toolchain: string, + toolchainPath: string, + toolchainPrefix: string, + server: string, + serverPath: string, + + toolchainConfigurationMap: Array<[string, string]>, + + serverConfigurationMap: Array<[string, string]>, + } +} diff --git a/arduino-ide-extension/src/node/cli-protocol/debug/debug_pb.js b/arduino-ide-extension/src/node/cli-protocol/debug/debug_pb.js index 43d405e4..24e2f5b0 100644 --- a/arduino-ide-extension/src/node/cli-protocol/debug/debug_pb.js +++ b/arduino-ide-extension/src/node/cli-protocol/debug/debug_pb.js @@ -17,6 +17,7 @@ goog.object.extend(proto, commands_common_pb); goog.exportSymbol('proto.cc.arduino.cli.debug.DebugConfigReq', null, global); goog.exportSymbol('proto.cc.arduino.cli.debug.DebugReq', null, global); goog.exportSymbol('proto.cc.arduino.cli.debug.DebugResp', null, global); +goog.exportSymbol('proto.cc.arduino.cli.debug.GetDebugConfigResp', null, global); /** * Generated by JsPbCodeGenerator. * @param {Array=} opt_data Optional initial data array, typically from a @@ -80,6 +81,27 @@ if (goog.DEBUG && !COMPILED) { */ proto.cc.arduino.cli.debug.DebugResp.displayName = 'proto.cc.arduino.cli.debug.DebugResp'; } +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.cc.arduino.cli.debug.GetDebugConfigResp = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cc.arduino.cli.debug.GetDebugConfigResp, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cc.arduino.cli.debug.GetDebugConfigResp.displayName = 'proto.cc.arduino.cli.debug.GetDebugConfigResp'; +} @@ -352,8 +374,8 @@ proto.cc.arduino.cli.debug.DebugConfigReq.toObject = function(includeInstance, m sketchPath: jspb.Message.getFieldWithDefault(msg, 3, ""), port: jspb.Message.getFieldWithDefault(msg, 4, ""), interpreter: jspb.Message.getFieldWithDefault(msg, 5, ""), - importFile: jspb.Message.getFieldWithDefault(msg, 7, ""), - importDir: jspb.Message.getFieldWithDefault(msg, 8, "") + importDir: jspb.Message.getFieldWithDefault(msg, 8, ""), + programmer: jspb.Message.getFieldWithDefault(msg, 9, "") }; if (includeInstance) { @@ -411,14 +433,14 @@ proto.cc.arduino.cli.debug.DebugConfigReq.deserializeBinaryFromReader = function var value = /** @type {string} */ (reader.readString()); msg.setInterpreter(value); break; - case 7: - var value = /** @type {string} */ (reader.readString()); - msg.setImportFile(value); - break; case 8: var value = /** @type {string} */ (reader.readString()); msg.setImportDir(value); break; + case 9: + var value = /** @type {string} */ (reader.readString()); + msg.setProgrammer(value); + break; default: reader.skipField(); break; @@ -484,13 +506,6 @@ proto.cc.arduino.cli.debug.DebugConfigReq.serializeBinaryToWriter = function(mes f ); } - f = message.getImportFile(); - if (f.length > 0) { - writer.writeString( - 7, - f - ); - } f = message.getImportDir(); if (f.length > 0) { writer.writeString( @@ -498,6 +513,13 @@ proto.cc.arduino.cli.debug.DebugConfigReq.serializeBinaryToWriter = function(mes f ); } + f = message.getProgrammer(); + if (f.length > 0) { + writer.writeString( + 9, + f + ); + } }; @@ -610,24 +632,6 @@ proto.cc.arduino.cli.debug.DebugConfigReq.prototype.setInterpreter = function(va }; -/** - * optional string import_file = 7; - * @return {string} - */ -proto.cc.arduino.cli.debug.DebugConfigReq.prototype.getImportFile = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 7, "")); -}; - - -/** - * @param {string} value - * @return {!proto.cc.arduino.cli.debug.DebugConfigReq} returns this - */ -proto.cc.arduino.cli.debug.DebugConfigReq.prototype.setImportFile = function(value) { - return jspb.Message.setProto3StringField(this, 7, value); -}; - - /** * optional string import_dir = 8; * @return {string} @@ -646,6 +650,24 @@ proto.cc.arduino.cli.debug.DebugConfigReq.prototype.setImportDir = function(valu }; +/** + * optional string programmer = 9; + * @return {string} + */ +proto.cc.arduino.cli.debug.DebugConfigReq.prototype.getProgrammer = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 9, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cc.arduino.cli.debug.DebugConfigReq} returns this + */ +proto.cc.arduino.cli.debug.DebugConfigReq.prototype.setProgrammer = function(value) { + return jspb.Message.setProto3StringField(this, 9, value); +}; + + @@ -830,4 +852,350 @@ proto.cc.arduino.cli.debug.DebugResp.prototype.setError = function(value) { }; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.cc.arduino.cli.debug.GetDebugConfigResp.prototype.toObject = function(opt_includeInstance) { + return proto.cc.arduino.cli.debug.GetDebugConfigResp.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.cc.arduino.cli.debug.GetDebugConfigResp} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cc.arduino.cli.debug.GetDebugConfigResp.toObject = function(includeInstance, msg) { + var f, obj = { + executable: jspb.Message.getFieldWithDefault(msg, 1, ""), + toolchain: jspb.Message.getFieldWithDefault(msg, 2, ""), + toolchainPath: jspb.Message.getFieldWithDefault(msg, 3, ""), + toolchainPrefix: jspb.Message.getFieldWithDefault(msg, 4, ""), + server: jspb.Message.getFieldWithDefault(msg, 5, ""), + serverPath: jspb.Message.getFieldWithDefault(msg, 6, ""), + toolchainConfigurationMap: (f = msg.getToolchainConfigurationMap()) ? f.toObject(includeInstance, undefined) : [], + serverConfigurationMap: (f = msg.getServerConfigurationMap()) ? f.toObject(includeInstance, undefined) : [] + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.cc.arduino.cli.debug.GetDebugConfigResp} + */ +proto.cc.arduino.cli.debug.GetDebugConfigResp.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cc.arduino.cli.debug.GetDebugConfigResp; + return proto.cc.arduino.cli.debug.GetDebugConfigResp.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cc.arduino.cli.debug.GetDebugConfigResp} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cc.arduino.cli.debug.GetDebugConfigResp} + */ +proto.cc.arduino.cli.debug.GetDebugConfigResp.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setExecutable(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setToolchain(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.setToolchainPath(value); + break; + case 4: + var value = /** @type {string} */ (reader.readString()); + msg.setToolchainPrefix(value); + break; + case 5: + var value = /** @type {string} */ (reader.readString()); + msg.setServer(value); + break; + case 6: + var value = /** @type {string} */ (reader.readString()); + msg.setServerPath(value); + break; + case 7: + var value = msg.getToolchainConfigurationMap(); + reader.readMessage(value, function(message, reader) { + jspb.Map.deserializeBinary(message, reader, jspb.BinaryReader.prototype.readString, jspb.BinaryReader.prototype.readString, null, "", ""); + }); + break; + case 8: + var value = msg.getServerConfigurationMap(); + reader.readMessage(value, function(message, reader) { + jspb.Map.deserializeBinary(message, reader, jspb.BinaryReader.prototype.readString, jspb.BinaryReader.prototype.readString, null, "", ""); + }); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cc.arduino.cli.debug.GetDebugConfigResp.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cc.arduino.cli.debug.GetDebugConfigResp.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.cc.arduino.cli.debug.GetDebugConfigResp} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cc.arduino.cli.debug.GetDebugConfigResp.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getExecutable(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getToolchain(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getToolchainPath(); + if (f.length > 0) { + writer.writeString( + 3, + f + ); + } + f = message.getToolchainPrefix(); + if (f.length > 0) { + writer.writeString( + 4, + f + ); + } + f = message.getServer(); + if (f.length > 0) { + writer.writeString( + 5, + f + ); + } + f = message.getServerPath(); + if (f.length > 0) { + writer.writeString( + 6, + f + ); + } + f = message.getToolchainConfigurationMap(true); + if (f && f.getLength() > 0) { + f.serializeBinary(7, writer, jspb.BinaryWriter.prototype.writeString, jspb.BinaryWriter.prototype.writeString); + } + f = message.getServerConfigurationMap(true); + if (f && f.getLength() > 0) { + f.serializeBinary(8, writer, jspb.BinaryWriter.prototype.writeString, jspb.BinaryWriter.prototype.writeString); + } +}; + + +/** + * optional string executable = 1; + * @return {string} + */ +proto.cc.arduino.cli.debug.GetDebugConfigResp.prototype.getExecutable = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cc.arduino.cli.debug.GetDebugConfigResp} returns this + */ +proto.cc.arduino.cli.debug.GetDebugConfigResp.prototype.setExecutable = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string toolchain = 2; + * @return {string} + */ +proto.cc.arduino.cli.debug.GetDebugConfigResp.prototype.getToolchain = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cc.arduino.cli.debug.GetDebugConfigResp} returns this + */ +proto.cc.arduino.cli.debug.GetDebugConfigResp.prototype.setToolchain = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional string toolchain_path = 3; + * @return {string} + */ +proto.cc.arduino.cli.debug.GetDebugConfigResp.prototype.getToolchainPath = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cc.arduino.cli.debug.GetDebugConfigResp} returns this + */ +proto.cc.arduino.cli.debug.GetDebugConfigResp.prototype.setToolchainPath = function(value) { + return jspb.Message.setProto3StringField(this, 3, value); +}; + + +/** + * optional string toolchain_prefix = 4; + * @return {string} + */ +proto.cc.arduino.cli.debug.GetDebugConfigResp.prototype.getToolchainPrefix = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cc.arduino.cli.debug.GetDebugConfigResp} returns this + */ +proto.cc.arduino.cli.debug.GetDebugConfigResp.prototype.setToolchainPrefix = function(value) { + return jspb.Message.setProto3StringField(this, 4, value); +}; + + +/** + * optional string server = 5; + * @return {string} + */ +proto.cc.arduino.cli.debug.GetDebugConfigResp.prototype.getServer = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 5, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cc.arduino.cli.debug.GetDebugConfigResp} returns this + */ +proto.cc.arduino.cli.debug.GetDebugConfigResp.prototype.setServer = function(value) { + return jspb.Message.setProto3StringField(this, 5, value); +}; + + +/** + * optional string server_path = 6; + * @return {string} + */ +proto.cc.arduino.cli.debug.GetDebugConfigResp.prototype.getServerPath = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 6, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cc.arduino.cli.debug.GetDebugConfigResp} returns this + */ +proto.cc.arduino.cli.debug.GetDebugConfigResp.prototype.setServerPath = function(value) { + return jspb.Message.setProto3StringField(this, 6, value); +}; + + +/** + * map toolchain_configuration = 7; + * @param {boolean=} opt_noLazyCreate Do not create the map if + * empty, instead returning `undefined` + * @return {!jspb.Map} + */ +proto.cc.arduino.cli.debug.GetDebugConfigResp.prototype.getToolchainConfigurationMap = function(opt_noLazyCreate) { + return /** @type {!jspb.Map} */ ( + jspb.Message.getMapField(this, 7, opt_noLazyCreate, + null)); +}; + + +/** + * Clears values from the map. The map will be non-null. + * @return {!proto.cc.arduino.cli.debug.GetDebugConfigResp} returns this + */ +proto.cc.arduino.cli.debug.GetDebugConfigResp.prototype.clearToolchainConfigurationMap = function() { + this.getToolchainConfigurationMap().clear(); + return this;}; + + +/** + * map server_configuration = 8; + * @param {boolean=} opt_noLazyCreate Do not create the map if + * empty, instead returning `undefined` + * @return {!jspb.Map} + */ +proto.cc.arduino.cli.debug.GetDebugConfigResp.prototype.getServerConfigurationMap = function(opt_noLazyCreate) { + return /** @type {!jspb.Map} */ ( + jspb.Message.getMapField(this, 8, opt_noLazyCreate, + null)); +}; + + +/** + * Clears values from the map. The map will be non-null. + * @return {!proto.cc.arduino.cli.debug.GetDebugConfigResp} returns this + */ +proto.cc.arduino.cli.debug.GetDebugConfigResp.prototype.clearServerConfigurationMap = function() { + this.getServerConfigurationMap().clear(); + return this;}; + + goog.object.extend(exports, proto.cc.arduino.cli.debug); diff --git a/arduino-ide-extension/src/node/cli-protocol/monitor/monitor_grpc_pb.d.ts b/arduino-ide-extension/src/node/cli-protocol/monitor/monitor_grpc_pb.d.ts index 983fb933..334b5795 100644 --- a/arduino-ide-extension/src/node/cli-protocol/monitor/monitor_grpc_pb.d.ts +++ b/arduino-ide-extension/src/node/cli-protocol/monitor/monitor_grpc_pb.d.ts @@ -36,7 +36,7 @@ export interface IMonitorClient { } export class MonitorClient extends grpc.Client implements IMonitorClient { - constructor(address: string, credentials: grpc.ChannelCredentials, options?: object); + constructor(address: string, credentials: grpc.ChannelCredentials, options?: Partial); public streamingOpen(options?: Partial): grpc.ClientDuplexStream; public streamingOpen(metadata?: grpc.Metadata, options?: Partial): grpc.ClientDuplexStream; } diff --git a/arduino-ide-extension/src/node/cli-protocol/settings/settings_grpc_pb.d.ts b/arduino-ide-extension/src/node/cli-protocol/settings/settings_grpc_pb.d.ts index e94bf648..4b9dff52 100644 --- a/arduino-ide-extension/src/node/cli-protocol/settings/settings_grpc_pb.d.ts +++ b/arduino-ide-extension/src/node/cli-protocol/settings/settings_grpc_pb.d.ts @@ -77,7 +77,7 @@ export interface ISettingsClient { } export class SettingsClient extends grpc.Client implements ISettingsClient { - constructor(address: string, credentials: grpc.ChannelCredentials, options?: object); + constructor(address: string, credentials: grpc.ChannelCredentials, options?: Partial); public getAll(request: settings_settings_pb.GetAllRequest, callback: (error: grpc.ServiceError | null, response: settings_settings_pb.RawData) => void): grpc.ClientUnaryCall; public getAll(request: settings_settings_pb.GetAllRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: settings_settings_pb.RawData) => void): grpc.ClientUnaryCall; public getAll(request: settings_settings_pb.GetAllRequest, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: settings_settings_pb.RawData) => void): grpc.ClientUnaryCall;