From c024a8d3d1d855dfbbab4df5b47be33f632edc2e Mon Sep 17 00:00:00 2001 From: Akos Kitta Date: Wed, 2 Dec 2020 09:03:04 +0100 Subject: [PATCH] ATL-750: Handle board name change after install. Signed-off-by: Akos Kitta --- .vscode/launch.json | 2 + arduino-ide-extension/package.json | 2 +- .../browser/arduino-frontend-contribution.tsx | 4 +- .../boards/boards-config-dialog-widget.tsx | 12 +- .../browser/boards/boards-config-dialog.ts | 14 +- .../src/browser/boards/boards-config.tsx | 35 +- .../src/browser/boards/boards-data-store.ts | 7 +- .../browser/boards/boards-service-provider.ts | 29 +- .../src/common/protocol/boards-service.ts | 23 +- .../src/node/boards-service-impl.ts | 6 +- .../node/cli-protocol/commands/board_pb.d.ts | 12 + .../node/cli-protocol/commands/board_pb.js | 96 ++++- .../commands/commands_grpc_pb.d.ts | 72 ++-- .../node/cli-protocol/commands/commands_pb.js | 2 + .../node/cli-protocol/commands/common_pb.js | 2 + .../cli-protocol/commands/compile_pb.d.ts | 46 +++ .../node/cli-protocol/commands/compile_pb.js | 363 +++++++++++++++++- .../src/node/cli-protocol/commands/core_pb.js | 2 + .../src/node/cli-protocol/commands/lib_pb.js | 2 + .../node/cli-protocol/commands/upload_pb.js | 2 + .../cli-protocol/debug/debug_grpc_pb.d.ts | 4 +- .../src/node/cli-protocol/debug/debug_pb.js | 2 + .../cli-protocol/monitor/monitor_grpc_pb.d.ts | 2 +- .../node/cli-protocol/monitor/monitor_pb.js | 2 + .../settings/settings_grpc_pb.d.ts | 8 +- .../node/cli-protocol/settings/settings_pb.js | 2 + 26 files changed, 674 insertions(+), 79 deletions(-) diff --git a/.vscode/launch.json b/.vscode/launch.json index a7bc3b0e..3854ce41 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -34,6 +34,7 @@ "args": [ "--log-level=debug", "--hostname=localhost", + "--no-cluster", "--remote-debugging-port=9222", "--no-app-auto-install", "--plugins=local-dir:plugins" @@ -60,6 +61,7 @@ "args": [ "--hostname=0.0.0.0", "--port=3000", + "--no-cluster", "--no-app-auto-install", "--plugins=local-dir:plugins" ], diff --git a/arduino-ide-extension/package.json b/arduino-ide-extension/package.json index 7f21a3e8..986b384d 100644 --- a/arduino-ide-extension/package.json +++ b/arduino-ide-extension/package.json @@ -120,7 +120,7 @@ ], "arduino": { "cli": { - "version": "20201112" + "version": "20201201" } } } diff --git a/arduino-ide-extension/src/browser/arduino-frontend-contribution.tsx b/arduino-ide-extension/src/browser/arduino-frontend-contribution.tsx index f57c26a0..a45f4703 100644 --- a/arduino-ide-extension/src/browser/arduino-frontend-contribution.tsx +++ b/arduino-ide-extension/src/browser/arduino-frontend-contribution.tsx @@ -272,8 +272,8 @@ export class ArduinoFrontendContribution implements FrontendApplicationContribut } }); registry.registerCommand(ArduinoCommands.OPEN_BOARDS_DIALOG, { - execute: async () => { - const boardsConfig = await this.boardsConfigDialog.open(); + execute: async (query?: string | undefined) => { + const boardsConfig = await this.boardsConfigDialog.open(query); if (boardsConfig) { this.boardsServiceClientImpl.boardsConfig = boardsConfig; } diff --git a/arduino-ide-extension/src/browser/boards/boards-config-dialog-widget.tsx b/arduino-ide-extension/src/browser/boards/boards-config-dialog-widget.tsx index 94ae04da..921d6efe 100644 --- a/arduino-ide-extension/src/browser/boards/boards-config-dialog-widget.tsx +++ b/arduino-ide-extension/src/browser/boards/boards-config-dialog-widget.tsx @@ -19,6 +19,7 @@ export class BoardsConfigDialogWidget extends ReactWidget { @inject(NotificationCenter) protected readonly notificationCenter: NotificationCenter; + protected readonly onFilterTextDidChangeEmitter = new Emitter(); protected readonly onBoardConfigChangedEmitter = new Emitter(); readonly onBoardConfigChanged = this.onBoardConfigChangedEmitter.event; @@ -27,6 +28,14 @@ export class BoardsConfigDialogWidget extends ReactWidget { constructor() { super(); this.id = 'select-board-dialog'; + this.toDispose.pushAll([ + this.onBoardConfigChangedEmitter, + this.onFilterTextDidChangeEmitter + ]); + } + + search(query: string): void { + this.onFilterTextDidChangeEmitter.fire(query); } protected fireConfigChanged = (config: BoardsConfig.Config) => { @@ -43,7 +52,8 @@ export class BoardsConfigDialogWidget extends ReactWidget { boardsServiceProvider={this.boardsServiceClient} notificationCenter={this.notificationCenter} onConfigChange={this.fireConfigChanged} - onFocusNodeSet={this.setFocusNode} /> + onFocusNodeSet={this.setFocusNode} + onFilteredTextDidChangeEvent={this.onFilterTextDidChangeEmitter.event} /> ; } diff --git a/arduino-ide-extension/src/browser/boards/boards-config-dialog.ts b/arduino-ide-extension/src/browser/boards/boards-config-dialog.ts index 0b218c6c..7eb01139 100644 --- a/arduino-ide-extension/src/browser/boards/boards-config-dialog.ts +++ b/arduino-ide-extension/src/browser/boards/boards-config-dialog.ts @@ -1,10 +1,10 @@ import { injectable, inject, postConstruct } from 'inversify'; import { Message } from '@phosphor/messaging'; import { AbstractDialog, DialogProps, Widget, DialogError } from '@theia/core/lib/browser'; -import { BoardsService } from '../../common/protocol/boards-service'; import { BoardsConfig } from './boards-config'; -import { BoardsConfigDialogWidget } from './boards-config-dialog-widget'; +import { BoardsService } from '../../common/protocol/boards-service'; import { BoardsServiceProvider } from './boards-service-provider'; +import { BoardsConfigDialogWidget } from './boards-config-dialog-widget'; @injectable() export class BoardsConfigDialogProps extends DialogProps { @@ -42,6 +42,16 @@ export class BoardsConfigDialog extends AbstractDialog { })); } + /** + * Pass in an empty string if you want to reset the search term. Using `undefined` has no effect. + */ + async open(query: string | undefined = undefined): Promise { + if (typeof query === 'string') { + this.widget.search(query); + } + return super.open(); + } + protected createDescription(): HTMLElement { const head = document.createElement('div'); head.classList.add('head'); diff --git a/arduino-ide-extension/src/browser/boards/boards-config.tsx b/arduino-ide-extension/src/browser/boards/boards-config.tsx index e01d2604..f48fd311 100644 --- a/arduino-ide-extension/src/browser/boards/boards-config.tsx +++ b/arduino-ide-extension/src/browser/boards/boards-config.tsx @@ -1,10 +1,11 @@ import * as React from 'react'; +import { Event } from '@theia/core/lib/common/event'; import { notEmpty } from '@theia/core/lib/common/objects'; +import { MaybePromise } from '@theia/core/lib/common/types'; import { DisposableCollection } from '@theia/core/lib/common/disposable'; -import { Board, Port, AttachedBoardsChangeEvent } from '../../common/protocol/boards-service'; -import { BoardsServiceProvider } from './boards-service-provider'; +import { Board, Port, AttachedBoardsChangeEvent, BoardWithPackage } from '../../common/protocol/boards-service'; import { NotificationCenter } from '../notification-center'; -import { MaybePromise } from '@theia/core'; +import { BoardsServiceProvider } from './boards-service-provider'; export namespace BoardsConfig { @@ -18,10 +19,11 @@ export namespace BoardsConfig { readonly notificationCenter: NotificationCenter; readonly onConfigChange: (config: Config) => void; readonly onFocusNodeSet: (element: HTMLElement | undefined) => void; + readonly onFilteredTextDidChangeEvent: Event; } export interface State extends Config { - searchResults: Array; + searchResults: Array; knownPorts: Port[]; showAllPorts: boolean; query: string; @@ -91,7 +93,8 @@ export class BoardsConfig extends React.Component this.updateBoards(this.state.query)), this.props.notificationCenter.onIndexUpdated(() => this.updateBoards(this.state.query)), this.props.notificationCenter.onDaemonStarted(() => this.updateBoards(this.state.query)), - this.props.notificationCenter.onDaemonStopped(() => this.setState({ searchResults: [] })) + this.props.notificationCenter.onDaemonStopped(() => this.setState({ searchResults: [] })), + this.props.onFilteredTextDidChangeEvent(query => this.setState({ query }, () => this.updateBoards(this.state.query))) ]); } @@ -105,10 +108,9 @@ export class BoardsConfig extends React.Component | string = '') => { - const query = (typeof eventOrQuery === 'string' + const query = typeof eventOrQuery === 'string' ? eventOrQuery - : eventOrQuery.target.value.toLowerCase() - ).trim(); + : eventOrQuery.target.value.toLowerCase(); this.setState({ query }); this.queryBoards({ query }).then(searchResults => this.setState({ searchResults })); } @@ -124,7 +126,7 @@ export class BoardsConfig extends React.Component> => { + protected queryBoards = (options: { query?: string } = {}): Promise> => { return this.props.boardsServiceProvider.searchBoards(options); } @@ -145,7 +147,7 @@ export class BoardsConfig extends React.Component this.fireConfigChanged()); } - protected selectBoard = (selectedBoard: Board & { packageName: string } | undefined) => { + protected selectBoard = (selectedBoard: BoardWithPackage | undefined) => { this.setState({ selectedBoard }, () => this.fireConfigChanged()); } @@ -175,7 +177,7 @@ export class BoardsConfig extends React.Component(); @@ -189,11 +191,18 @@ export class BoardsConfig extends React.Component
- +
- {Array.from(distinctBoards.values()).map(board => + {Array.from(distinctBoards.values()).map(board => key={`${board.name}-${board.packageName}`} item={board} label={board.name} diff --git a/arduino-ide-extension/src/browser/boards/boards-data-store.ts b/arduino-ide-extension/src/browser/boards/boards-data-store.ts index 27bbdc81..e83e47b2 100644 --- a/arduino-ide-extension/src/browser/boards/boards-data-store.ts +++ b/arduino-ide-extension/src/browser/boards/boards-data-store.ts @@ -83,7 +83,7 @@ export class BoardsDataStore implements FrontendApplicationContribution { } const key = this.getStorageKey(fqbn, version); let data = await this.storageService.getData(key, undefined); - if (data) { + if (BoardsDataStore.Data.is(data)) { return data; } @@ -202,5 +202,10 @@ export namespace BoardsDataStore { configOptions: [], programmers: [] }; + export function is(arg: any): arg is Data { + return !!arg + && 'configOptions' in arg && Array.isArray(arg['configOptions']) + && 'programmers' in arg && Array.isArray(arg['programmers']) + } } } diff --git a/arduino-ide-extension/src/browser/boards/boards-service-provider.ts b/arduino-ide-extension/src/browser/boards/boards-service-provider.ts index c2185582..6d47c4b1 100644 --- a/arduino-ide-extension/src/browser/boards/boards-service-provider.ts +++ b/arduino-ide-extension/src/browser/boards/boards-service-provider.ts @@ -10,15 +10,18 @@ import { Board, BoardsService, BoardsPackage, - AttachedBoardsChangeEvent + AttachedBoardsChangeEvent, + BoardWithPackage } from '../../common/protocol'; import { BoardsConfig } from './boards-config'; import { naturalCompare } from '../../common/utils'; import { compareAnything } from '../theia/monaco/comparers'; import { NotificationCenter } from '../notification-center'; +import { CommandService } from '@theia/core'; +import { ArduinoCommands } from '../arduino-commands'; interface BoardMatch { - readonly board: Board & Readonly<{ packageName: string }>; + readonly board: BoardWithPackage; readonly matches: monaco.filters.IMatch[] | undefined; } @@ -37,6 +40,9 @@ export class BoardsServiceProvider implements FrontendApplicationContribution { @inject(BoardsService) protected boardsService: BoardsService; + @inject(CommandService) + protected commandService: CommandService; + @inject(NotificationCenter) protected notificationCenter: NotificationCenter; @@ -107,6 +113,19 @@ export class BoardsServiceProvider implements FrontendApplicationContribution { }; return; } + // The board name can change after install. + // This logic handles it "gracefully" by unselecting the board, so that we can avoid no FQBN is set error. + // https://github.com/arduino/arduino-cli/issues/620 + // https://github.com/arduino/arduino-pro-ide/issues/374 + if (BoardWithPackage.is(selectedBoard) && selectedBoard.packageId === event.item.id && !installedBoard) { + this.messageService.warn(`Could not find previously selected board '${selectedBoard.name}' in installed platform '${event.item.name}'. Please manually reselect the board you want to use. Do you want to reselect it now?`, 'Reselect later', 'Yes').then(async answer => { + if (answer === 'Yes') { + this.commandService.executeCommand(ArduinoCommands.OPEN_BOARDS_DIALOG.id, selectedBoard.name); + } + }); + this.boardsConfig = {} + return; + } // Trigger a board re-set. See: https://github.com/arduino/arduino-cli/issues/954 // E.g: install `adafruit:avr`, then select `adafruit:avr:adafruit32u4` board, and finally install the required `arduino:avr` this.boardsConfig = this.boardsConfig; @@ -173,15 +192,15 @@ export class BoardsServiceProvider implements FrontendApplicationContribution { } } - async searchBoards({ query, cores }: { query?: string, cores?: string[] }): Promise> { + async searchBoards({ query, cores }: { query?: string, cores?: string[] }): Promise> { const boards = await this.boardsService.allBoards({}); const coresFilter = !!cores && cores.length - ? ((toFilter: { packageName: string }) => cores.some(core => core === toFilter.packageName)) + ? ((toFilter: BoardWithPackage) => cores.some(core => core === toFilter.packageName || core === toFilter.packageId)) : () => true; if (!query) { return boards.filter(coresFilter).sort(Board.compare); } - const toMatch = ((toFilter: Board & { packageName: string }) => (({ board: toFilter, matches: monaco.filters.matchesFuzzy(query, toFilter.name, true) }))); + const toMatch = ((toFilter: BoardWithPackage) => (({ board: toFilter, matches: monaco.filters.matchesFuzzy(query, toFilter.name, true) }))); const compareEntries = (left: BoardMatch, right: BoardMatch, lookFor: string) => { const leftMatches = left.matches || []; const rightMatches = right.matches || []; diff --git a/arduino-ide-extension/src/common/protocol/boards-service.ts b/arduino-ide-extension/src/common/protocol/boards-service.ts index bdc3a976..0d93d95d 100644 --- a/arduino-ide-extension/src/common/protocol/boards-service.ts +++ b/arduino-ide-extension/src/common/protocol/boards-service.ts @@ -104,7 +104,7 @@ export interface BoardsService extends Installable, Searchable; // The CLI cannot do fuzzy search. This method provides all boards and we do the fuzzy search (with monaco) on the frontend. // https://github.com/arduino/arduino-cli/issues/629 - allBoards(options: {}): Promise>; + allBoards(options: {}): Promise>; } export interface Port { @@ -255,6 +255,18 @@ export interface Board { readonly port?: Port; } +export interface BoardWithPackage extends Board { + readonly packageName: string; + readonly packageId: string; +} +export namespace BoardWithPackage { + + export function is(board: Board & Partial<{ packageName: string, packageId: string }>): board is BoardWithPackage { + return !!board.packageId && !!board.packageName; + } + +} + export interface BoardDetails { readonly fqbn: string; readonly requiredTools: Tool[]; @@ -381,10 +393,10 @@ export namespace Board { return `${board.name}${fqbn}`; } - export type Detailed = Board & Readonly<{ selected: boolean, missing: boolean, packageName: string, details?: string }>; + export type Detailed = Board & Readonly<{ selected: boolean, missing: boolean, packageName: string, packageId: string, details?: string }>; export function decorateBoards( selectedBoard: Board | undefined, - boards: Array): Array { + boards: Array): Array { // Board names are not unique. We show the corresponding core name as a detail. // https://github.com/arduino/arduino-cli/pull/294#issuecomment-513764948 const distinctBoardNames = new Map(); @@ -394,12 +406,15 @@ export namespace Board { } // Due to the non-unique board names, we have to check the package name as well. - const selected = (board: Board & { packageName: string }) => { + const selected = (board: BoardWithPackage) => { if (!!selectedBoard) { if (Board.equals(board, selectedBoard)) { if ('packageName' in selectedBoard) { return board.packageName === (selectedBoard as any).packageName; } + if ('packageId' in selectedBoard) { + return board.packageId === (selectedBoard as any).packageId; + } return true; } } diff --git a/arduino-ide-extension/src/node/boards-service-impl.ts b/arduino-ide-extension/src/node/boards-service-impl.ts index 1c763e25..387f3fd5 100644 --- a/arduino-ide-extension/src/node/boards-service-impl.ts +++ b/arduino-ide-extension/src/node/boards-service-impl.ts @@ -3,7 +3,7 @@ import { ILogger } from '@theia/core/lib/common/logger'; import { BoardsService, Installable, - BoardsPackage, Board, Port, BoardDetails, Tool, ConfigOption, ConfigValue, Programmer, OutputService, NotificationServiceServer, AvailablePorts + BoardsPackage, Board, Port, BoardDetails, Tool, ConfigOption, ConfigValue, Programmer, OutputService, NotificationServiceServer, AvailablePorts, BoardWithPackage } from '../common/protocol'; import { PlatformSearchReq, PlatformSearchResp, PlatformInstallReq, PlatformInstallResp, PlatformListReq, @@ -155,9 +155,9 @@ export class BoardsServiceImpl implements BoardsService { return packages.find(({ boards }) => boards.some(({ fqbn }) => fqbn === expectedFqbn)); } - async allBoards(options: {}): Promise> { + async allBoards(options: {}): Promise> { const results = await this.search(options); - return results.map(item => item.boards.map(board => ({ ...board, packageName: item.name }))) + return results.map(item => item.boards.map(board => ({ ...board, packageName: item.name, packageId: item.id }))) .reduce((acc, curr) => acc.concat(curr), []); } 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 f3d4e0f7..7674f754 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 @@ -89,6 +89,9 @@ export class BoardDetailsResp extends jspb.Message { setProgrammersList(value: Array): BoardDetailsResp; addProgrammers(value?: commands_common_pb.Programmer, index?: number): commands_common_pb.Programmer; + getDebuggingSupported(): boolean; + setDebuggingSupported(value: boolean): BoardDetailsResp; + serializeBinary(): Uint8Array; toObject(includeInstance?: boolean): BoardDetailsResp.AsObject; @@ -115,6 +118,7 @@ export namespace BoardDetailsResp { configOptionsList: Array, identificationPrefList: Array, programmersList: Array, + debuggingSupported: boolean, } } @@ -678,6 +682,12 @@ export class BoardListItem extends jspb.Message { getIsHidden(): boolean; setIsHidden(value: boolean): BoardListItem; + getVid(): string; + setVid(value: string): BoardListItem; + + getPid(): string; + setPid(value: string): BoardListItem; + serializeBinary(): Uint8Array; toObject(includeInstance?: boolean): BoardListItem.AsObject; @@ -694,5 +704,7 @@ export namespace BoardListItem { name: string, fqbn: string, isHidden: boolean, + vid: string, + pid: string, } } 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 443f008a..628aeba3 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 @@ -7,6 +7,8 @@ * @public */ // GENERATED CODE -- DO NOT EDIT! +/* eslint-disable */ +// @ts-nocheck var jspb = require('google-protobuf'); var goog = jspb; @@ -712,7 +714,8 @@ proto.cc.arduino.cli.commands.BoardDetailsResp.toObject = function(includeInstan identificationPrefList: jspb.Message.toObjectList(msg.getIdentificationPrefList(), proto.cc.arduino.cli.commands.IdentificationPref.toObject, includeInstance), programmersList: jspb.Message.toObjectList(msg.getProgrammersList(), - commands_common_pb.Programmer.toObject, includeInstance) + commands_common_pb.Programmer.toObject, includeInstance), + debuggingSupported: jspb.Message.getBooleanFieldWithDefault(msg, 14, false) }; if (includeInstance) { @@ -807,6 +810,10 @@ proto.cc.arduino.cli.commands.BoardDetailsResp.deserializeBinaryFromReader = fun reader.readMessage(value,commands_common_pb.Programmer.deserializeBinaryFromReader); msg.addProgrammers(value); break; + case 14: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setDebuggingSupported(value); + break; default: reader.skipField(); break; @@ -933,6 +940,13 @@ proto.cc.arduino.cli.commands.BoardDetailsResp.serializeBinaryToWriter = functio commands_common_pb.Programmer.serializeBinaryToWriter ); } + f = message.getDebuggingSupported(); + if (f) { + writer.writeBool( + 14, + f + ); + } }; @@ -1288,6 +1302,24 @@ proto.cc.arduino.cli.commands.BoardDetailsResp.prototype.clearProgrammersList = }; +/** + * optional bool debugging_supported = 14; + * @return {boolean} + */ +proto.cc.arduino.cli.commands.BoardDetailsResp.prototype.getDebuggingSupported = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 14, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.cc.arduino.cli.commands.BoardDetailsResp} returns this + */ +proto.cc.arduino.cli.commands.BoardDetailsResp.prototype.setDebuggingSupported = function(value) { + return jspb.Message.setProto3BooleanField(this, 14, value); +}; + + @@ -5026,7 +5058,9 @@ proto.cc.arduino.cli.commands.BoardListItem.toObject = function(includeInstance, var f, obj = { name: jspb.Message.getFieldWithDefault(msg, 1, ""), fqbn: jspb.Message.getFieldWithDefault(msg, 2, ""), - isHidden: jspb.Message.getBooleanFieldWithDefault(msg, 3, false) + isHidden: jspb.Message.getBooleanFieldWithDefault(msg, 3, false), + vid: jspb.Message.getFieldWithDefault(msg, 4, ""), + pid: jspb.Message.getFieldWithDefault(msg, 5, "") }; if (includeInstance) { @@ -5075,6 +5109,14 @@ proto.cc.arduino.cli.commands.BoardListItem.deserializeBinaryFromReader = functi var value = /** @type {boolean} */ (reader.readBool()); msg.setIsHidden(value); break; + case 4: + var value = /** @type {string} */ (reader.readString()); + msg.setVid(value); + break; + case 5: + var value = /** @type {string} */ (reader.readString()); + msg.setPid(value); + break; default: reader.skipField(); break; @@ -5125,6 +5167,20 @@ proto.cc.arduino.cli.commands.BoardListItem.serializeBinaryToWriter = function(m f ); } + f = message.getVid(); + if (f.length > 0) { + writer.writeString( + 4, + f + ); + } + f = message.getPid(); + if (f.length > 0) { + writer.writeString( + 5, + f + ); + } }; @@ -5182,4 +5238,40 @@ proto.cc.arduino.cli.commands.BoardListItem.prototype.setIsHidden = function(val }; +/** + * optional string VID = 4; + * @return {string} + */ +proto.cc.arduino.cli.commands.BoardListItem.prototype.getVid = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cc.arduino.cli.commands.BoardListItem} returns this + */ +proto.cc.arduino.cli.commands.BoardListItem.prototype.setVid = function(value) { + return jspb.Message.setProto3StringField(this, 4, value); +}; + + +/** + * optional string PID = 5; + * @return {string} + */ +proto.cc.arduino.cli.commands.BoardListItem.prototype.getPid = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 5, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cc.arduino.cli.commands.BoardListItem} returns this + */ +proto.cc.arduino.cli.commands.BoardListItem.prototype.setPid = function(value) { + return jspb.Message.setProto3StringField(this, 5, 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 d92cab4f..ff621647 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 @@ -54,7 +54,7 @@ interface IArduinoCoreService extends grpc.ServiceDefinition { - path: string; // "/cc.arduino.cli.commands.ArduinoCore/Init" + path: "/cc.arduino.cli.commands.ArduinoCore/Init"; requestStream: false; responseStream: true; requestSerialize: grpc.serialize; @@ -63,7 +63,7 @@ interface IArduinoCoreService_IInit extends grpc.MethodDefinition; } interface IArduinoCoreService_IDestroy extends grpc.MethodDefinition { - path: string; // "/cc.arduino.cli.commands.ArduinoCore/Destroy" + path: "/cc.arduino.cli.commands.ArduinoCore/Destroy"; requestStream: false; responseStream: false; requestSerialize: grpc.serialize; @@ -72,7 +72,7 @@ interface IArduinoCoreService_IDestroy extends grpc.MethodDefinition; } interface IArduinoCoreService_IRescan extends grpc.MethodDefinition { - path: string; // "/cc.arduino.cli.commands.ArduinoCore/Rescan" + path: "/cc.arduino.cli.commands.ArduinoCore/Rescan"; requestStream: false; responseStream: false; requestSerialize: grpc.serialize; @@ -81,7 +81,7 @@ interface IArduinoCoreService_IRescan extends grpc.MethodDefinition; } interface IArduinoCoreService_IUpdateIndex extends grpc.MethodDefinition { - path: string; // "/cc.arduino.cli.commands.ArduinoCore/UpdateIndex" + path: "/cc.arduino.cli.commands.ArduinoCore/UpdateIndex"; requestStream: false; responseStream: true; requestSerialize: grpc.serialize; @@ -90,7 +90,7 @@ interface IArduinoCoreService_IUpdateIndex extends grpc.MethodDefinition; } interface IArduinoCoreService_IUpdateLibrariesIndex extends grpc.MethodDefinition { - path: string; // "/cc.arduino.cli.commands.ArduinoCore/UpdateLibrariesIndex" + path: "/cc.arduino.cli.commands.ArduinoCore/UpdateLibrariesIndex"; requestStream: false; responseStream: true; requestSerialize: grpc.serialize; @@ -99,7 +99,7 @@ interface IArduinoCoreService_IUpdateLibrariesIndex extends grpc.MethodDefinitio responseDeserialize: grpc.deserialize; } interface IArduinoCoreService_IUpdateCoreLibrariesIndex extends grpc.MethodDefinition { - path: string; // "/cc.arduino.cli.commands.ArduinoCore/UpdateCoreLibrariesIndex" + path: "/cc.arduino.cli.commands.ArduinoCore/UpdateCoreLibrariesIndex"; requestStream: false; responseStream: true; requestSerialize: grpc.serialize; @@ -108,7 +108,7 @@ interface IArduinoCoreService_IUpdateCoreLibrariesIndex extends grpc.MethodDefin responseDeserialize: grpc.deserialize; } interface IArduinoCoreService_IOutdated extends grpc.MethodDefinition { - path: string; // "/cc.arduino.cli.commands.ArduinoCore/Outdated" + path: "/cc.arduino.cli.commands.ArduinoCore/Outdated"; requestStream: false; responseStream: false; requestSerialize: grpc.serialize; @@ -117,7 +117,7 @@ interface IArduinoCoreService_IOutdated extends grpc.MethodDefinition; } interface IArduinoCoreService_IUpgrade extends grpc.MethodDefinition { - path: string; // "/cc.arduino.cli.commands.ArduinoCore/Upgrade" + path: "/cc.arduino.cli.commands.ArduinoCore/Upgrade"; requestStream: false; responseStream: true; requestSerialize: grpc.serialize; @@ -126,7 +126,7 @@ interface IArduinoCoreService_IUpgrade extends grpc.MethodDefinition; } interface IArduinoCoreService_IVersion extends grpc.MethodDefinition { - path: string; // "/cc.arduino.cli.commands.ArduinoCore/Version" + path: "/cc.arduino.cli.commands.ArduinoCore/Version"; requestStream: false; responseStream: false; requestSerialize: grpc.serialize; @@ -135,7 +135,7 @@ interface IArduinoCoreService_IVersion extends grpc.MethodDefinition; } interface IArduinoCoreService_ILoadSketch extends grpc.MethodDefinition { - path: string; // "/cc.arduino.cli.commands.ArduinoCore/LoadSketch" + path: "/cc.arduino.cli.commands.ArduinoCore/LoadSketch"; requestStream: false; responseStream: false; requestSerialize: grpc.serialize; @@ -144,7 +144,7 @@ interface IArduinoCoreService_ILoadSketch extends grpc.MethodDefinition; } interface IArduinoCoreService_IArchiveSketch extends grpc.MethodDefinition { - path: string; // "/cc.arduino.cli.commands.ArduinoCore/ArchiveSketch" + path: "/cc.arduino.cli.commands.ArduinoCore/ArchiveSketch"; requestStream: false; responseStream: false; requestSerialize: grpc.serialize; @@ -153,7 +153,7 @@ interface IArduinoCoreService_IArchiveSketch extends grpc.MethodDefinition; } interface IArduinoCoreService_IBoardDetails extends grpc.MethodDefinition { - path: string; // "/cc.arduino.cli.commands.ArduinoCore/BoardDetails" + path: "/cc.arduino.cli.commands.ArduinoCore/BoardDetails"; requestStream: false; responseStream: false; requestSerialize: grpc.serialize; @@ -162,7 +162,7 @@ interface IArduinoCoreService_IBoardDetails extends grpc.MethodDefinition; } interface IArduinoCoreService_IBoardAttach extends grpc.MethodDefinition { - path: string; // "/cc.arduino.cli.commands.ArduinoCore/BoardAttach" + path: "/cc.arduino.cli.commands.ArduinoCore/BoardAttach"; requestStream: false; responseStream: true; requestSerialize: grpc.serialize; @@ -171,7 +171,7 @@ interface IArduinoCoreService_IBoardAttach extends grpc.MethodDefinition; } interface IArduinoCoreService_IBoardList extends grpc.MethodDefinition { - path: string; // "/cc.arduino.cli.commands.ArduinoCore/BoardList" + path: "/cc.arduino.cli.commands.ArduinoCore/BoardList"; requestStream: false; responseStream: false; requestSerialize: grpc.serialize; @@ -180,7 +180,7 @@ interface IArduinoCoreService_IBoardList extends grpc.MethodDefinition; } interface IArduinoCoreService_IBoardListAll extends grpc.MethodDefinition { - path: string; // "/cc.arduino.cli.commands.ArduinoCore/BoardListAll" + path: "/cc.arduino.cli.commands.ArduinoCore/BoardListAll"; requestStream: false; responseStream: false; requestSerialize: grpc.serialize; @@ -189,7 +189,7 @@ interface IArduinoCoreService_IBoardListAll extends grpc.MethodDefinition; } interface IArduinoCoreService_IBoardListWatch extends grpc.MethodDefinition { - path: string; // "/cc.arduino.cli.commands.ArduinoCore/BoardListWatch" + path: "/cc.arduino.cli.commands.ArduinoCore/BoardListWatch"; requestStream: true; responseStream: true; requestSerialize: grpc.serialize; @@ -198,7 +198,7 @@ interface IArduinoCoreService_IBoardListWatch extends grpc.MethodDefinition; } interface IArduinoCoreService_ICompile extends grpc.MethodDefinition { - path: string; // "/cc.arduino.cli.commands.ArduinoCore/Compile" + path: "/cc.arduino.cli.commands.ArduinoCore/Compile"; requestStream: false; responseStream: true; requestSerialize: grpc.serialize; @@ -207,7 +207,7 @@ interface IArduinoCoreService_ICompile extends grpc.MethodDefinition; } interface IArduinoCoreService_IPlatformInstall extends grpc.MethodDefinition { - path: string; // "/cc.arduino.cli.commands.ArduinoCore/PlatformInstall" + path: "/cc.arduino.cli.commands.ArduinoCore/PlatformInstall"; requestStream: false; responseStream: true; requestSerialize: grpc.serialize; @@ -216,7 +216,7 @@ interface IArduinoCoreService_IPlatformInstall extends grpc.MethodDefinition; } interface IArduinoCoreService_IPlatformDownload extends grpc.MethodDefinition { - path: string; // "/cc.arduino.cli.commands.ArduinoCore/PlatformDownload" + path: "/cc.arduino.cli.commands.ArduinoCore/PlatformDownload"; requestStream: false; responseStream: true; requestSerialize: grpc.serialize; @@ -225,7 +225,7 @@ interface IArduinoCoreService_IPlatformDownload extends grpc.MethodDefinition; } interface IArduinoCoreService_IPlatformUninstall extends grpc.MethodDefinition { - path: string; // "/cc.arduino.cli.commands.ArduinoCore/PlatformUninstall" + path: "/cc.arduino.cli.commands.ArduinoCore/PlatformUninstall"; requestStream: false; responseStream: true; requestSerialize: grpc.serialize; @@ -234,7 +234,7 @@ interface IArduinoCoreService_IPlatformUninstall extends grpc.MethodDefinition; } interface IArduinoCoreService_IPlatformUpgrade extends grpc.MethodDefinition { - path: string; // "/cc.arduino.cli.commands.ArduinoCore/PlatformUpgrade" + path: "/cc.arduino.cli.commands.ArduinoCore/PlatformUpgrade"; requestStream: false; responseStream: true; requestSerialize: grpc.serialize; @@ -243,7 +243,7 @@ interface IArduinoCoreService_IPlatformUpgrade extends grpc.MethodDefinition; } interface IArduinoCoreService_IUpload extends grpc.MethodDefinition { - path: string; // "/cc.arduino.cli.commands.ArduinoCore/Upload" + path: "/cc.arduino.cli.commands.ArduinoCore/Upload"; requestStream: false; responseStream: true; requestSerialize: grpc.serialize; @@ -252,7 +252,7 @@ interface IArduinoCoreService_IUpload extends grpc.MethodDefinition; } interface IArduinoCoreService_IUploadUsingProgrammer extends grpc.MethodDefinition { - path: string; // "/cc.arduino.cli.commands.ArduinoCore/UploadUsingProgrammer" + path: "/cc.arduino.cli.commands.ArduinoCore/UploadUsingProgrammer"; requestStream: false; responseStream: true; requestSerialize: grpc.serialize; @@ -261,7 +261,7 @@ interface IArduinoCoreService_IUploadUsingProgrammer extends grpc.MethodDefiniti responseDeserialize: grpc.deserialize; } interface IArduinoCoreService_IListProgrammersAvailableForUpload extends grpc.MethodDefinition { - path: string; // "/cc.arduino.cli.commands.ArduinoCore/ListProgrammersAvailableForUpload" + path: "/cc.arduino.cli.commands.ArduinoCore/ListProgrammersAvailableForUpload"; requestStream: false; responseStream: false; requestSerialize: grpc.serialize; @@ -270,7 +270,7 @@ interface IArduinoCoreService_IListProgrammersAvailableForUpload extends grpc.Me responseDeserialize: grpc.deserialize; } interface IArduinoCoreService_IBurnBootloader extends grpc.MethodDefinition { - path: string; // "/cc.arduino.cli.commands.ArduinoCore/BurnBootloader" + path: "/cc.arduino.cli.commands.ArduinoCore/BurnBootloader"; requestStream: false; responseStream: true; requestSerialize: grpc.serialize; @@ -279,7 +279,7 @@ interface IArduinoCoreService_IBurnBootloader extends grpc.MethodDefinition; } interface IArduinoCoreService_IPlatformSearch extends grpc.MethodDefinition { - path: string; // "/cc.arduino.cli.commands.ArduinoCore/PlatformSearch" + path: "/cc.arduino.cli.commands.ArduinoCore/PlatformSearch"; requestStream: false; responseStream: false; requestSerialize: grpc.serialize; @@ -288,7 +288,7 @@ interface IArduinoCoreService_IPlatformSearch extends grpc.MethodDefinition; } interface IArduinoCoreService_IPlatformList extends grpc.MethodDefinition { - path: string; // "/cc.arduino.cli.commands.ArduinoCore/PlatformList" + path: "/cc.arduino.cli.commands.ArduinoCore/PlatformList"; requestStream: false; responseStream: false; requestSerialize: grpc.serialize; @@ -297,7 +297,7 @@ interface IArduinoCoreService_IPlatformList extends grpc.MethodDefinition; } interface IArduinoCoreService_ILibraryDownload extends grpc.MethodDefinition { - path: string; // "/cc.arduino.cli.commands.ArduinoCore/LibraryDownload" + path: "/cc.arduino.cli.commands.ArduinoCore/LibraryDownload"; requestStream: false; responseStream: true; requestSerialize: grpc.serialize; @@ -306,7 +306,7 @@ interface IArduinoCoreService_ILibraryDownload extends grpc.MethodDefinition; } interface IArduinoCoreService_ILibraryInstall extends grpc.MethodDefinition { - path: string; // "/cc.arduino.cli.commands.ArduinoCore/LibraryInstall" + path: "/cc.arduino.cli.commands.ArduinoCore/LibraryInstall"; requestStream: false; responseStream: true; requestSerialize: grpc.serialize; @@ -315,7 +315,7 @@ interface IArduinoCoreService_ILibraryInstall extends grpc.MethodDefinition; } interface IArduinoCoreService_IZipLibraryInstall extends grpc.MethodDefinition { - path: string; // "/cc.arduino.cli.commands.ArduinoCore/ZipLibraryInstall" + path: "/cc.arduino.cli.commands.ArduinoCore/ZipLibraryInstall"; requestStream: false; responseStream: true; requestSerialize: grpc.serialize; @@ -324,7 +324,7 @@ interface IArduinoCoreService_IZipLibraryInstall extends grpc.MethodDefinition; } interface IArduinoCoreService_IGitLibraryInstall extends grpc.MethodDefinition { - path: string; // "/cc.arduino.cli.commands.ArduinoCore/GitLibraryInstall" + path: "/cc.arduino.cli.commands.ArduinoCore/GitLibraryInstall"; requestStream: false; responseStream: true; requestSerialize: grpc.serialize; @@ -333,7 +333,7 @@ interface IArduinoCoreService_IGitLibraryInstall extends grpc.MethodDefinition; } interface IArduinoCoreService_ILibraryUninstall extends grpc.MethodDefinition { - path: string; // "/cc.arduino.cli.commands.ArduinoCore/LibraryUninstall" + path: "/cc.arduino.cli.commands.ArduinoCore/LibraryUninstall"; requestStream: false; responseStream: true; requestSerialize: grpc.serialize; @@ -342,7 +342,7 @@ interface IArduinoCoreService_ILibraryUninstall extends grpc.MethodDefinition; } interface IArduinoCoreService_ILibraryUpgradeAll extends grpc.MethodDefinition { - path: string; // "/cc.arduino.cli.commands.ArduinoCore/LibraryUpgradeAll" + path: "/cc.arduino.cli.commands.ArduinoCore/LibraryUpgradeAll"; requestStream: false; responseStream: true; requestSerialize: grpc.serialize; @@ -351,7 +351,7 @@ interface IArduinoCoreService_ILibraryUpgradeAll extends grpc.MethodDefinition; } interface IArduinoCoreService_ILibraryResolveDependencies extends grpc.MethodDefinition { - path: string; // "/cc.arduino.cli.commands.ArduinoCore/LibraryResolveDependencies" + path: "/cc.arduino.cli.commands.ArduinoCore/LibraryResolveDependencies"; requestStream: false; responseStream: false; requestSerialize: grpc.serialize; @@ -360,7 +360,7 @@ interface IArduinoCoreService_ILibraryResolveDependencies extends grpc.MethodDef responseDeserialize: grpc.deserialize; } interface IArduinoCoreService_ILibrarySearch extends grpc.MethodDefinition { - path: string; // "/cc.arduino.cli.commands.ArduinoCore/LibrarySearch" + path: "/cc.arduino.cli.commands.ArduinoCore/LibrarySearch"; requestStream: false; responseStream: false; requestSerialize: grpc.serialize; @@ -369,7 +369,7 @@ interface IArduinoCoreService_ILibrarySearch extends grpc.MethodDefinition; } interface IArduinoCoreService_ILibraryList extends grpc.MethodDefinition { - path: string; // "/cc.arduino.cli.commands.ArduinoCore/LibraryList" + path: "/cc.arduino.cli.commands.ArduinoCore/LibraryList"; requestStream: false; responseStream: false; requestSerialize: grpc.serialize; 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 21e5486a..9e0baec0 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 @@ -7,6 +7,8 @@ * @public */ // GENERATED CODE -- DO NOT EDIT! +/* eslint-disable */ +// @ts-nocheck var jspb = require('google-protobuf'); var goog = jspb; diff --git a/arduino-ide-extension/src/node/cli-protocol/commands/common_pb.js b/arduino-ide-extension/src/node/cli-protocol/commands/common_pb.js index 10bab9eb..82f44943 100644 --- a/arduino-ide-extension/src/node/cli-protocol/commands/common_pb.js +++ b/arduino-ide-extension/src/node/cli-protocol/commands/common_pb.js @@ -7,6 +7,8 @@ * @public */ // GENERATED CODE -- DO NOT EDIT! +/* eslint-disable */ +// @ts-nocheck var jspb = require('google-protobuf'); var goog = jspb; 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 d87ef9ce..35b9b479 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 @@ -6,6 +6,7 @@ import * as jspb from "google-protobuf"; import * as commands_common_pb from "../commands/common_pb"; +import * as commands_lib_pb from "../commands/lib_pb"; export class CompileReq extends jspb.Message { @@ -114,6 +115,19 @@ export class CompileResp extends jspb.Message { getErrStream_asB64(): string; setErrStream(value: Uint8Array | string): CompileResp; + getBuildPath(): string; + setBuildPath(value: string): CompileResp; + + clearUsedLibrariesList(): void; + getUsedLibrariesList(): Array; + setUsedLibrariesList(value: Array): CompileResp; + addUsedLibraries(value?: commands_lib_pb.Library, index?: number): commands_lib_pb.Library; + + clearExecutableSectionsSizeList(): void; + getExecutableSectionsSizeList(): Array; + setExecutableSectionsSizeList(value: Array): CompileResp; + addExecutableSectionsSize(value?: ExecutableSectionSize, index?: number): ExecutableSectionSize; + serializeBinary(): Uint8Array; toObject(includeInstance?: boolean): CompileResp.AsObject; @@ -129,5 +143,37 @@ export namespace CompileResp { export type AsObject = { outStream: Uint8Array | string, errStream: Uint8Array | string, + buildPath: string, + usedLibrariesList: Array, + executableSectionsSizeList: Array, + } +} + +export class ExecutableSectionSize extends jspb.Message { + getName(): string; + setName(value: string): ExecutableSectionSize; + + getSize(): number; + setSize(value: number): ExecutableSectionSize; + + getMaxsize(): number; + setMaxsize(value: number): ExecutableSectionSize; + + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): ExecutableSectionSize.AsObject; + static toObject(includeInstance: boolean, msg: ExecutableSectionSize): ExecutableSectionSize.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: ExecutableSectionSize, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): ExecutableSectionSize; + static deserializeBinaryFromReader(message: ExecutableSectionSize, reader: jspb.BinaryReader): ExecutableSectionSize; +} + +export namespace ExecutableSectionSize { + export type AsObject = { + name: string, + size: number, + maxsize: number, } } 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 d5a2b8ee..10267d01 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 @@ -7,6 +7,8 @@ * @public */ // GENERATED CODE -- DO NOT EDIT! +/* eslint-disable */ +// @ts-nocheck var jspb = require('google-protobuf'); var goog = jspb; @@ -14,8 +16,11 @@ var global = Function('return this')(); var commands_common_pb = require('../commands/common_pb.js'); goog.object.extend(proto, commands_common_pb); +var commands_lib_pb = require('../commands/lib_pb.js'); +goog.object.extend(proto, commands_lib_pb); goog.exportSymbol('proto.cc.arduino.cli.commands.CompileReq', null, global); goog.exportSymbol('proto.cc.arduino.cli.commands.CompileResp', null, global); +goog.exportSymbol('proto.cc.arduino.cli.commands.ExecutableSectionSize', null, global); /** * Generated by JsPbCodeGenerator. * @param {Array=} opt_data Optional initial data array, typically from a @@ -48,7 +53,7 @@ if (goog.DEBUG && !COMPILED) { * @constructor */ proto.cc.arduino.cli.commands.CompileResp = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); + jspb.Message.initialize(this, opt_data, 0, -1, proto.cc.arduino.cli.commands.CompileResp.repeatedFields_, null); }; goog.inherits(proto.cc.arduino.cli.commands.CompileResp, jspb.Message); if (goog.DEBUG && !COMPILED) { @@ -58,6 +63,27 @@ if (goog.DEBUG && !COMPILED) { */ proto.cc.arduino.cli.commands.CompileResp.displayName = 'proto.cc.arduino.cli.commands.CompileResp'; } +/** + * 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.ExecutableSectionSize = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cc.arduino.cli.commands.ExecutableSectionSize, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cc.arduino.cli.commands.ExecutableSectionSize.displayName = 'proto.cc.arduino.cli.commands.ExecutableSectionSize'; +} /** * List of repeated fields within this message type. @@ -765,6 +791,13 @@ proto.cc.arduino.cli.commands.CompileReq.prototype.setExportBinaries = function( +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.cc.arduino.cli.commands.CompileResp.repeatedFields_ = [4,5]; + if (jspb.Message.GENERATE_TO_OBJECT) { @@ -797,7 +830,12 @@ proto.cc.arduino.cli.commands.CompileResp.prototype.toObject = function(opt_incl proto.cc.arduino.cli.commands.CompileResp.toObject = function(includeInstance, msg) { var f, obj = { outStream: msg.getOutStream_asB64(), - errStream: msg.getErrStream_asB64() + errStream: msg.getErrStream_asB64(), + buildPath: jspb.Message.getFieldWithDefault(msg, 3, ""), + usedLibrariesList: jspb.Message.toObjectList(msg.getUsedLibrariesList(), + commands_lib_pb.Library.toObject, includeInstance), + executableSectionsSizeList: jspb.Message.toObjectList(msg.getExecutableSectionsSizeList(), + proto.cc.arduino.cli.commands.ExecutableSectionSize.toObject, includeInstance) }; if (includeInstance) { @@ -842,6 +880,20 @@ proto.cc.arduino.cli.commands.CompileResp.deserializeBinaryFromReader = function var value = /** @type {!Uint8Array} */ (reader.readBytes()); msg.setErrStream(value); break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.setBuildPath(value); + break; + case 4: + var value = new commands_lib_pb.Library; + reader.readMessage(value,commands_lib_pb.Library.deserializeBinaryFromReader); + msg.addUsedLibraries(value); + break; + case 5: + var value = new proto.cc.arduino.cli.commands.ExecutableSectionSize; + reader.readMessage(value,proto.cc.arduino.cli.commands.ExecutableSectionSize.deserializeBinaryFromReader); + msg.addExecutableSectionsSize(value); + break; default: reader.skipField(); break; @@ -885,6 +937,29 @@ proto.cc.arduino.cli.commands.CompileResp.serializeBinaryToWriter = function(mes f ); } + f = message.getBuildPath(); + if (f.length > 0) { + writer.writeString( + 3, + f + ); + } + f = message.getUsedLibrariesList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 4, + f, + commands_lib_pb.Library.serializeBinaryToWriter + ); + } + f = message.getExecutableSectionsSizeList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 5, + f, + proto.cc.arduino.cli.commands.ExecutableSectionSize.serializeBinaryToWriter + ); + } }; @@ -972,4 +1047,288 @@ proto.cc.arduino.cli.commands.CompileResp.prototype.setErrStream = function(valu }; +/** + * optional string build_path = 3; + * @return {string} + */ +proto.cc.arduino.cli.commands.CompileResp.prototype.getBuildPath = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cc.arduino.cli.commands.CompileResp} returns this + */ +proto.cc.arduino.cli.commands.CompileResp.prototype.setBuildPath = function(value) { + return jspb.Message.setProto3StringField(this, 3, value); +}; + + +/** + * repeated Library used_libraries = 4; + * @return {!Array} + */ +proto.cc.arduino.cli.commands.CompileResp.prototype.getUsedLibrariesList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, commands_lib_pb.Library, 4)); +}; + + +/** + * @param {!Array} value + * @return {!proto.cc.arduino.cli.commands.CompileResp} returns this +*/ +proto.cc.arduino.cli.commands.CompileResp.prototype.setUsedLibrariesList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 4, value); +}; + + +/** + * @param {!proto.cc.arduino.cli.commands.Library=} opt_value + * @param {number=} opt_index + * @return {!proto.cc.arduino.cli.commands.Library} + */ +proto.cc.arduino.cli.commands.CompileResp.prototype.addUsedLibraries = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 4, opt_value, proto.cc.arduino.cli.commands.Library, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.cc.arduino.cli.commands.CompileResp} returns this + */ +proto.cc.arduino.cli.commands.CompileResp.prototype.clearUsedLibrariesList = function() { + return this.setUsedLibrariesList([]); +}; + + +/** + * repeated ExecutableSectionSize executable_sections_size = 5; + * @return {!Array} + */ +proto.cc.arduino.cli.commands.CompileResp.prototype.getExecutableSectionsSizeList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.cc.arduino.cli.commands.ExecutableSectionSize, 5)); +}; + + +/** + * @param {!Array} value + * @return {!proto.cc.arduino.cli.commands.CompileResp} returns this +*/ +proto.cc.arduino.cli.commands.CompileResp.prototype.setExecutableSectionsSizeList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 5, value); +}; + + +/** + * @param {!proto.cc.arduino.cli.commands.ExecutableSectionSize=} opt_value + * @param {number=} opt_index + * @return {!proto.cc.arduino.cli.commands.ExecutableSectionSize} + */ +proto.cc.arduino.cli.commands.CompileResp.prototype.addExecutableSectionsSize = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 5, opt_value, proto.cc.arduino.cli.commands.ExecutableSectionSize, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.cc.arduino.cli.commands.CompileResp} returns this + */ +proto.cc.arduino.cli.commands.CompileResp.prototype.clearExecutableSectionsSizeList = function() { + return this.setExecutableSectionsSizeList([]); +}; + + + + + +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.ExecutableSectionSize.prototype.toObject = function(opt_includeInstance) { + return proto.cc.arduino.cli.commands.ExecutableSectionSize.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.ExecutableSectionSize} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cc.arduino.cli.commands.ExecutableSectionSize.toObject = function(includeInstance, msg) { + var f, obj = { + name: jspb.Message.getFieldWithDefault(msg, 1, ""), + size: jspb.Message.getFieldWithDefault(msg, 2, 0), + maxsize: jspb.Message.getFieldWithDefault(msg, 3, 0) + }; + + 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.ExecutableSectionSize} + */ +proto.cc.arduino.cli.commands.ExecutableSectionSize.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cc.arduino.cli.commands.ExecutableSectionSize; + return proto.cc.arduino.cli.commands.ExecutableSectionSize.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.ExecutableSectionSize} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cc.arduino.cli.commands.ExecutableSectionSize} + */ +proto.cc.arduino.cli.commands.ExecutableSectionSize.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.setName(value); + break; + case 2: + var value = /** @type {number} */ (reader.readInt64()); + msg.setSize(value); + break; + case 3: + var value = /** @type {number} */ (reader.readInt64()); + msg.setMaxsize(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.ExecutableSectionSize.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cc.arduino.cli.commands.ExecutableSectionSize.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.ExecutableSectionSize} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cc.arduino.cli.commands.ExecutableSectionSize.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getName(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getSize(); + if (f !== 0) { + writer.writeInt64( + 2, + f + ); + } + f = message.getMaxsize(); + if (f !== 0) { + writer.writeInt64( + 3, + f + ); + } +}; + + +/** + * optional string name = 1; + * @return {string} + */ +proto.cc.arduino.cli.commands.ExecutableSectionSize.prototype.getName = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cc.arduino.cli.commands.ExecutableSectionSize} returns this + */ +proto.cc.arduino.cli.commands.ExecutableSectionSize.prototype.setName = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional int64 size = 2; + * @return {number} + */ +proto.cc.arduino.cli.commands.ExecutableSectionSize.prototype.getSize = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.cc.arduino.cli.commands.ExecutableSectionSize} returns this + */ +proto.cc.arduino.cli.commands.ExecutableSectionSize.prototype.setSize = function(value) { + return jspb.Message.setProto3IntField(this, 2, value); +}; + + +/** + * optional int64 maxSize = 3; + * @return {number} + */ +proto.cc.arduino.cli.commands.ExecutableSectionSize.prototype.getMaxsize = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.cc.arduino.cli.commands.ExecutableSectionSize} returns this + */ +proto.cc.arduino.cli.commands.ExecutableSectionSize.prototype.setMaxsize = function(value) { + return jspb.Message.setProto3IntField(this, 3, value); +}; + + goog.object.extend(exports, proto.cc.arduino.cli.commands); diff --git a/arduino-ide-extension/src/node/cli-protocol/commands/core_pb.js b/arduino-ide-extension/src/node/cli-protocol/commands/core_pb.js index 54eaa277..6c11725a 100644 --- a/arduino-ide-extension/src/node/cli-protocol/commands/core_pb.js +++ b/arduino-ide-extension/src/node/cli-protocol/commands/core_pb.js @@ -7,6 +7,8 @@ * @public */ // GENERATED CODE -- DO NOT EDIT! +/* eslint-disable */ +// @ts-nocheck var jspb = require('google-protobuf'); var goog = jspb; 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 0853f48a..707e4dc4 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 @@ -7,6 +7,8 @@ * @public */ // GENERATED CODE -- DO NOT EDIT! +/* eslint-disable */ +// @ts-nocheck var jspb = require('google-protobuf'); var goog = jspb; 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 cb641121..cc95d5c5 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 @@ -7,6 +7,8 @@ * @public */ // GENERATED CODE -- DO NOT EDIT! +/* eslint-disable */ +// @ts-nocheck var jspb = require('google-protobuf'); var goog = jspb; 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 8828a6d6..43f6f25f 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 @@ -15,7 +15,7 @@ interface IDebugService extends grpc.ServiceDefinition { - path: string; // "/cc.arduino.cli.debug.Debug/Debug" + path: "/cc.arduino.cli.debug.Debug/Debug"; requestStream: true; responseStream: true; requestSerialize: grpc.serialize; @@ -24,7 +24,7 @@ interface IDebugService_IDebug extends grpc.MethodDefinition; } interface IDebugService_IGetDebugConfig extends grpc.MethodDefinition { - path: string; // "/cc.arduino.cli.debug.Debug/GetDebugConfig" + path: "/cc.arduino.cli.debug.Debug/GetDebugConfig"; requestStream: false; responseStream: false; requestSerialize: grpc.serialize; 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 24e2f5b0..6a87cd1d 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 @@ -7,6 +7,8 @@ * @public */ // GENERATED CODE -- DO NOT EDIT! +/* eslint-disable */ +// @ts-nocheck var jspb = require('google-protobuf'); var goog = jspb; 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 334b5795..062b421b 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 @@ -14,7 +14,7 @@ interface IMonitorService extends grpc.ServiceDefinition { - path: string; // "/cc.arduino.cli.monitor.Monitor/StreamingOpen" + path: "/cc.arduino.cli.monitor.Monitor/StreamingOpen"; requestStream: true; responseStream: true; requestSerialize: grpc.serialize; diff --git a/arduino-ide-extension/src/node/cli-protocol/monitor/monitor_pb.js b/arduino-ide-extension/src/node/cli-protocol/monitor/monitor_pb.js index b9636c3a..7514bfe1 100644 --- a/arduino-ide-extension/src/node/cli-protocol/monitor/monitor_pb.js +++ b/arduino-ide-extension/src/node/cli-protocol/monitor/monitor_pb.js @@ -7,6 +7,8 @@ * @public */ // GENERATED CODE -- DO NOT EDIT! +/* eslint-disable */ +// @ts-nocheck var jspb = require('google-protobuf'); var goog = jspb; 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 4b9dff52..9cb3f686 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 @@ -16,7 +16,7 @@ interface ISettingsService extends grpc.ServiceDefinition { - path: string; // "/cc.arduino.cli.settings.Settings/GetAll" + path: "/cc.arduino.cli.settings.Settings/GetAll"; requestStream: false; responseStream: false; requestSerialize: grpc.serialize; @@ -25,7 +25,7 @@ interface ISettingsService_IGetAll extends grpc.MethodDefinition; } interface ISettingsService_IMerge extends grpc.MethodDefinition { - path: string; // "/cc.arduino.cli.settings.Settings/Merge" + path: "/cc.arduino.cli.settings.Settings/Merge"; requestStream: false; responseStream: false; requestSerialize: grpc.serialize; @@ -34,7 +34,7 @@ interface ISettingsService_IMerge extends grpc.MethodDefinition; } interface ISettingsService_IGetValue extends grpc.MethodDefinition { - path: string; // "/cc.arduino.cli.settings.Settings/GetValue" + path: "/cc.arduino.cli.settings.Settings/GetValue"; requestStream: false; responseStream: false; requestSerialize: grpc.serialize; @@ -43,7 +43,7 @@ interface ISettingsService_IGetValue extends grpc.MethodDefinition; } interface ISettingsService_ISetValue extends grpc.MethodDefinition { - path: string; // "/cc.arduino.cli.settings.Settings/SetValue" + path: "/cc.arduino.cli.settings.Settings/SetValue"; requestStream: false; responseStream: false; requestSerialize: grpc.serialize; diff --git a/arduino-ide-extension/src/node/cli-protocol/settings/settings_pb.js b/arduino-ide-extension/src/node/cli-protocol/settings/settings_pb.js index 1d7ec299..12903e5f 100644 --- a/arduino-ide-extension/src/node/cli-protocol/settings/settings_pb.js +++ b/arduino-ide-extension/src/node/cli-protocol/settings/settings_pb.js @@ -7,6 +7,8 @@ * @public */ // GENERATED CODE -- DO NOT EDIT! +/* eslint-disable */ +// @ts-nocheck var jspb = require('google-protobuf'); var goog = jspb;