From 807b2ad42477305eb53503e46b83b9c622426de6 Mon Sep 17 00:00:00 2001 From: Akos Kitta Date: Fri, 31 Jan 2020 14:50:21 +0100 Subject: [PATCH] Support of the CLI config. Signed-off-by: Akos Kitta --- .gitignore | 12 +- .vscode/launch.json | 31 +- .vscode/tasks.json | 126 +- arduino-debugger-extension/package.json | 9 +- .../arduino-debug-adapter-contribution.ts | 6 +- .../data/cli/schema/arduino-cli.schema.json | 114 + arduino-ide-extension/package.json | 60 +- .../scripts/generate-protocol.js | 60 +- .../src/browser/arduino-commands.ts | 22 +- .../src/browser/arduino-daemon-client-impl.ts | 53 + .../browser/arduino-frontend-contribution.tsx | 33 +- .../src/browser/arduino-frontend-module.ts | 89 +- .../boards/boards-config-dialog-widget.tsx | 11 +- .../src/browser/boards/boards-config.tsx | 18 +- .../filterable-list-container.tsx | 4 +- .../components/component-list/list-widget.tsx | 25 +- .../src/browser/config-service-client-impl.ts | 52 + .../src/browser/core-service-client-impl.ts | 36 + .../arduino-connection-status-service.ts | 51 + .../browser/editor/arduino-editor-manager.ts | 37 + .../editor/arduino-monaco-editor-provider.ts | 34 - .../src/browser/workspace-service-ext-impl.ts | 19 - .../src/browser/workspace-service-ext.ts | 5 - .../src/common/protocol/arduino-daemon.ts | 13 + .../src/common/protocol/config-service.ts | 19 +- .../src/common/protocol/core-service.ts | 10 +- .../src/common/protocol/index.ts | 11 + .../src/node/arduino-backend-module.ts | 96 +- .../src/node/arduino-cli-contribution.ts | 27 - arduino-ide-extension/src/node/arduino-cli.ts | 49 - .../src/node/arduino-daemon-impl.ts | 267 + .../src/node/arduino-daemon.ts | 83 - .../src/node/arduino-env-variables-server.ts | 12 + .../src/node/arduino-plugin-reader.ts | 47 + .../src/node/boards-service-impl.ts | 276 +- arduino-ide-extension/src/node/cli-config.ts | 122 + .../cli-protocol/commands/board_grpc_pb.js | 1 - .../node/cli-protocol/commands/board_pb.d.ts | 378 -- .../node/cli-protocol/commands/board_pb.js | 2591 --------- .../commands/commands_grpc_pb.d.ts | 427 -- .../cli-protocol/commands/commands_grpc_pb.js | 870 --- .../cli-protocol/commands/commands_pb.d.ts | 308 -- .../node/cli-protocol/commands/commands_pb.js | 2022 ------- .../cli-protocol/commands/common_grpc_pb.js | 1 - .../node/cli-protocol/commands/common_pb.d.ts | 94 - .../node/cli-protocol/commands/common_pb.js | 609 --- .../cli-protocol/commands/compile_grpc_pb.js | 1 - .../cli-protocol/commands/compile_pb.d.ts | 125 - .../node/cli-protocol/commands/compile_pb.js | 844 --- .../cli-protocol/commands/core_grpc_pb.js | 1 - .../node/cli-protocol/commands/core_pb.d.ts | 436 -- .../src/node/cli-protocol/commands/core_pb.js | 2925 ---------- .../node/cli-protocol/commands/lib_grpc_pb.js | 1 - .../node/cli-protocol/commands/lib_pb.d.ts | 721 --- .../src/node/cli-protocol/commands/lib_pb.js | 4778 ----------------- .../cli-protocol/commands/upload_grpc_pb.js | 1 - .../node/cli-protocol/commands/upload_pb.d.ts | 85 - .../node/cli-protocol/commands/upload_pb.js | 560 -- .../cli-protocol/debug/debug_grpc_pb.d.ts | 40 - .../node/cli-protocol/debug/debug_grpc_pb.js | 61 - .../src/node/cli-protocol/debug/debug_pb.d.ts | 129 - .../src/node/cli-protocol/debug/debug_pb.js | 859 --- .../cli-protocol/monitor/monitor_grpc_pb.d.ts | 41 - .../cli-protocol/monitor/monitor_grpc_pb.js | 62 - .../node/cli-protocol/monitor/monitor_pb.d.ts | 113 - .../node/cli-protocol/monitor/monitor_pb.js | 656 --- .../settings/settings_grpc_pb.d.ts | 92 - .../cli-protocol/settings/settings_grpc_pb.js | 137 - .../cli-protocol/settings/settings_pb.d.ts | 125 - .../node/cli-protocol/settings/settings_pb.js | 821 --- .../src/node/config-file-validator.ts | 55 + .../src/node/config-service-impl.ts | 268 +- .../src/node/core-client-provider-impl.ts | 230 - .../src/node/core-client-provider.ts | 171 +- .../src/node/core-service-impl.ts | 27 +- arduino-ide-extension/src/node/daemon-log.ts | 2 +- arduino-ide-extension/src/node/exec-util.ts | 36 +- arduino-ide-extension/src/node/fs-extra.ts | 5 + .../src/node/grpc-client-provider.ts | 71 + .../arduino-language-server-contribution.ts | 12 +- .../src/node/library-service-impl.ts | 6 +- .../node/monitor/monitor-client-provider.ts | 17 +- .../src/node/monitor/monitor-service-impl.ts | 5 +- .../src/test/node/arduino-daemon-impl.test.ts | 134 + .../src/test/node/cli-config.test.ts | 44 + .../test/node/config-file-validator.test.ts | 78 + .../src/test/node/exec-util.test.ts | 31 + .../test/node/exec-util.test.ts | 32 - arduino-ide-extension/test/node/logger.ts | 89 - browser-app/package.json | 5 +- electron-app/package.json | 5 +- .../scripts/arduino-pro-ide-electron-main.js | 10 + electron/build/template-package.json | 25 +- package.json | 19 +- yarn.lock | 1143 ++-- 95 files changed, 2944 insertions(+), 22430 deletions(-) create mode 100644 arduino-ide-extension/data/cli/schema/arduino-cli.schema.json create mode 100644 arduino-ide-extension/src/browser/arduino-daemon-client-impl.ts create mode 100644 arduino-ide-extension/src/browser/config-service-client-impl.ts create mode 100644 arduino-ide-extension/src/browser/core-service-client-impl.ts create mode 100644 arduino-ide-extension/src/browser/customization/arduino-connection-status-service.ts create mode 100644 arduino-ide-extension/src/browser/editor/arduino-editor-manager.ts delete mode 100644 arduino-ide-extension/src/browser/editor/arduino-monaco-editor-provider.ts delete mode 100644 arduino-ide-extension/src/browser/workspace-service-ext-impl.ts delete mode 100644 arduino-ide-extension/src/browser/workspace-service-ext.ts create mode 100644 arduino-ide-extension/src/common/protocol/arduino-daemon.ts create mode 100644 arduino-ide-extension/src/common/protocol/index.ts delete mode 100644 arduino-ide-extension/src/node/arduino-cli-contribution.ts delete mode 100644 arduino-ide-extension/src/node/arduino-cli.ts create mode 100644 arduino-ide-extension/src/node/arduino-daemon-impl.ts delete mode 100644 arduino-ide-extension/src/node/arduino-daemon.ts create mode 100644 arduino-ide-extension/src/node/arduino-env-variables-server.ts create mode 100644 arduino-ide-extension/src/node/arduino-plugin-reader.ts create mode 100644 arduino-ide-extension/src/node/cli-config.ts delete mode 100644 arduino-ide-extension/src/node/cli-protocol/commands/board_grpc_pb.js delete mode 100644 arduino-ide-extension/src/node/cli-protocol/commands/board_pb.d.ts delete mode 100644 arduino-ide-extension/src/node/cli-protocol/commands/board_pb.js delete mode 100644 arduino-ide-extension/src/node/cli-protocol/commands/commands_grpc_pb.d.ts delete mode 100644 arduino-ide-extension/src/node/cli-protocol/commands/commands_grpc_pb.js delete mode 100644 arduino-ide-extension/src/node/cli-protocol/commands/commands_pb.d.ts delete mode 100644 arduino-ide-extension/src/node/cli-protocol/commands/commands_pb.js delete mode 100644 arduino-ide-extension/src/node/cli-protocol/commands/common_grpc_pb.js delete mode 100644 arduino-ide-extension/src/node/cli-protocol/commands/common_pb.d.ts delete mode 100644 arduino-ide-extension/src/node/cli-protocol/commands/common_pb.js delete mode 100644 arduino-ide-extension/src/node/cli-protocol/commands/compile_grpc_pb.js delete mode 100644 arduino-ide-extension/src/node/cli-protocol/commands/compile_pb.d.ts delete mode 100644 arduino-ide-extension/src/node/cli-protocol/commands/compile_pb.js delete mode 100644 arduino-ide-extension/src/node/cli-protocol/commands/core_grpc_pb.js delete mode 100644 arduino-ide-extension/src/node/cli-protocol/commands/core_pb.d.ts delete mode 100644 arduino-ide-extension/src/node/cli-protocol/commands/core_pb.js delete mode 100644 arduino-ide-extension/src/node/cli-protocol/commands/lib_grpc_pb.js delete mode 100644 arduino-ide-extension/src/node/cli-protocol/commands/lib_pb.d.ts delete mode 100644 arduino-ide-extension/src/node/cli-protocol/commands/lib_pb.js delete mode 100644 arduino-ide-extension/src/node/cli-protocol/commands/upload_grpc_pb.js delete mode 100644 arduino-ide-extension/src/node/cli-protocol/commands/upload_pb.d.ts delete mode 100644 arduino-ide-extension/src/node/cli-protocol/commands/upload_pb.js delete mode 100644 arduino-ide-extension/src/node/cli-protocol/debug/debug_grpc_pb.d.ts delete mode 100644 arduino-ide-extension/src/node/cli-protocol/debug/debug_grpc_pb.js delete mode 100644 arduino-ide-extension/src/node/cli-protocol/debug/debug_pb.d.ts delete mode 100644 arduino-ide-extension/src/node/cli-protocol/debug/debug_pb.js delete mode 100644 arduino-ide-extension/src/node/cli-protocol/monitor/monitor_grpc_pb.d.ts delete mode 100644 arduino-ide-extension/src/node/cli-protocol/monitor/monitor_grpc_pb.js delete mode 100644 arduino-ide-extension/src/node/cli-protocol/monitor/monitor_pb.d.ts delete mode 100644 arduino-ide-extension/src/node/cli-protocol/monitor/monitor_pb.js delete mode 100644 arduino-ide-extension/src/node/cli-protocol/settings/settings_grpc_pb.d.ts delete mode 100644 arduino-ide-extension/src/node/cli-protocol/settings/settings_grpc_pb.js delete mode 100644 arduino-ide-extension/src/node/cli-protocol/settings/settings_pb.d.ts delete mode 100644 arduino-ide-extension/src/node/cli-protocol/settings/settings_pb.js create mode 100644 arduino-ide-extension/src/node/config-file-validator.ts delete mode 100644 arduino-ide-extension/src/node/core-client-provider-impl.ts create mode 100644 arduino-ide-extension/src/node/grpc-client-provider.ts create mode 100644 arduino-ide-extension/src/test/node/arduino-daemon-impl.test.ts create mode 100644 arduino-ide-extension/src/test/node/cli-config.test.ts create mode 100644 arduino-ide-extension/src/test/node/config-file-validator.test.ts create mode 100644 arduino-ide-extension/src/test/node/exec-util.test.ts delete mode 100644 arduino-ide-extension/test/node/exec-util.test.ts delete mode 100644 arduino-ide-extension/test/node/logger.ts create mode 100644 electron/build/scripts/arduino-pro-ide-electron-main.js diff --git a/.gitignore b/.gitignore index e622e8e7..7318d50a 100644 --- a/.gitignore +++ b/.gitignore @@ -8,10 +8,12 @@ build/ src-gen/ *webpack.config.js .DS_Store -/workspace/static -.DS_Store # switching from `electron` to `browser` in dev mode. .browser_modules -# LS logs -inols*.log -yarn-error.log +yarn*.log +# For the VS Code extensions used by Theia. +plugins +# generated JS/TS for the gRPC API +arduino-ide-extension/src/node/cli-protocol +# the config files for the CLI +arduino-ide-extension/data/cli/config diff --git a/.vscode/launch.json b/.vscode/launch.json index 28b2c89a..95b600ad 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -36,7 +36,8 @@ "--hostname=localhost", "--no-cluster", "--remote-debugging-port=9222", - "--no-app-auto-install" + "--no-app-auto-install", + "--plugins=local-dir:plugins" ], "env": { "NODE_ENV": "development" @@ -61,7 +62,8 @@ "--hostname=0.0.0.0", "--port=3000", "--no-cluster", - "--no-app-auto-install" + "--no-app-auto-install", + "--plugins=local-dir:plugins" ], "windows": { "env": { @@ -81,31 +83,6 @@ "smartStep": true, "internalConsoleOptions": "openOnSessionStart", "outputCapture": "std" - }, - { - "type": "node", - "request": "launch", - "name": "App (Browser - Debug CLI daemon)", - "program": "${workspaceRoot}/browser-app/src-gen/backend/main.js", - "args": [ - "--hostname=0.0.0.0", - "--port=3000", - "--no-cluster", - "--no-app-auto-install", - "--debug-cli=true" - ], - "env": { - "NODE_ENV": "development" - }, - "sourceMaps": true, - "outFiles": [ - "${workspaceRoot}/browser-app/src-gen/backend/*.js", - "${workspaceRoot}/browser-app/lib/**/*.js", - "${workspaceRoot}/arduino-ide-extension/lib/**/*.js" - ], - "smartStep": true, - "internalConsoleOptions": "openOnSessionStart", - "outputCapture": "std" } ] } diff --git a/.vscode/tasks.json b/.vscode/tasks.json index 80a54749..6e6db053 100644 --- a/.vscode/tasks.json +++ b/.vscode/tasks.json @@ -1,48 +1,80 @@ { - // See https://go.microsoft.com/fwlink/?LinkId=733558 - // for the documentation about the tasks.json format - "version": "2.0.0", - "tasks": [ - { - "label": "Arduino Editor - Start Browser Example", - "type": "shell", - "command": "yarn --cwd ./browser-app start", - "group": "build", - "presentation": { - "reveal": "always", - "panel": "new", - "clear": true - } - }, - { - "label": "Arduino Editor - Watch Theia Extension", - "type": "shell", - "command": "yarn --cwd ./arduino-ide-extension watch", - "group": "build", - "presentation": { - "reveal": "always", - "panel": "new", - "clear": false - } - }, - { - "label": "Arduino Editor - Watch Browser Example", - "type": "shell", - "command": "yarn --cwd ./browser-app watch", - "group": "build", - "presentation": { - "reveal": "always", - "panel": "new", - "clear": false - } - }, - { - "label": "Arduino Editor - Watch All", - "type": "shell", - "dependsOn": [ - "Arduino Editor - Watch Theia Extension", - "Arduino Editor - Watch Browser Example" - ] - } - ] -} \ No newline at end of file + // See https://go.microsoft.com/fwlink/?LinkId=733558 + // for the documentation about the tasks.json format + "version": "2.0.0", + "tasks": [ + { + "label": "Arduino Pro IDE - Start Browser App", + "type": "shell", + "command": "yarn --cwd ./browser-app start", + "group": "build", + "presentation": { + "reveal": "always", + "panel": "new", + "clear": true + } + }, + { + "label": "Arduino Pro IDE - Watch IDE Extension", + "type": "shell", + "command": "yarn --cwd ./arduino-ide-extension watch", + "group": "build", + "presentation": { + "reveal": "always", + "panel": "new", + "clear": false + } + }, + { + "label": "Arduino Pro IDE - Watch Debugger Extension", + "type": "shell", + "command": "yarn --cwd ./arduino-debugger-extension watch", + "group": "build", + "presentation": { + "reveal": "always", + "panel": "new", + "clear": false + } + }, + { + "label": "Arduino Pro IDE - Watch Browser App", + "type": "shell", + "command": "yarn --cwd ./browser-app watch", + "group": "build", + "presentation": { + "reveal": "always", + "panel": "new", + "clear": false + } + }, + { + "label": "Arduino Pro IDE - Watch Electron App", + "type": "shell", + "command": "yarn --cwd ./electron-app watch", + "group": "build", + "presentation": { + "reveal": "always", + "panel": "new", + "clear": false + } + }, + { + "label": "Arduino Pro IDE - Watch All [Browser]", + "type": "shell", + "dependsOn": [ + "Arduino Pro IDE - Watch IDE Extension", + "Arduino Pro IDE - Watch Debugger Extension", + "Arduino Pro IDE - Watch Browser App" + ] + }, + { + "label": "Arduino Pro IDE - Watch All [Electron]", + "type": "shell", + "dependsOn": [ + "Arduino Pro IDE - Watch IDE Extension", + "Arduino Pro IDE - Watch Debugger Extension", + "Arduino Pro IDE - Watch Electron App" + ] + } + ] +} diff --git a/arduino-debugger-extension/package.json b/arduino-debugger-extension/package.json index da7a78dc..6da8edb8 100644 --- a/arduino-debugger-extension/package.json +++ b/arduino-debugger-extension/package.json @@ -20,16 +20,9 @@ "build": "tsc && yarn lint", "watch": "tsc -w" }, - "devDependencies": { - "rimraf": "^2.6.1", - "tslint": "^5.5.0", - "typescript": "3.5.1" - }, "files": [ "lib", - "src", - "build", - "data" + "src" ], "theiaExtensions": [ { diff --git a/arduino-debugger-extension/src/node/arduino-debug-adapter-contribution.ts b/arduino-debugger-extension/src/node/arduino-debug-adapter-contribution.ts index 9f6ee487..164b4be4 100644 --- a/arduino-debugger-extension/src/node/arduino-debug-adapter-contribution.ts +++ b/arduino-debugger-extension/src/node/arduino-debug-adapter-contribution.ts @@ -3,7 +3,7 @@ import { injectable, inject } from 'inversify'; import { DebugAdapterContribution, DebugAdapterExecutable } from '@theia/debug/lib/common/debug-model'; import { DebugConfiguration } from '@theia/debug/lib/common/debug-configuration'; import { IJSONSchema } from '@theia/core/lib/common/json-schema'; -import { ArduinoCli } from 'arduino-ide-extension/lib/node/arduino-cli'; +import { ArduinoDaemonImpl } from 'arduino-ide-extension/lib/node/arduino-daemon-impl'; @injectable() export class ArduinoDebugAdapterContribution implements DebugAdapterContribution { @@ -12,7 +12,7 @@ export class ArduinoDebugAdapterContribution implements DebugAdapterContribution readonly label = 'Arduino'; readonly languages = ['c', 'cpp', 'ino']; - @inject(ArduinoCli) arduinoCli: ArduinoCli; + @inject(ArduinoDaemonImpl) daemon: ArduinoDaemonImpl; getSchemaAttributes(): IJSONSchema[] { return [ @@ -66,7 +66,7 @@ export class ArduinoDebugAdapterContribution implements DebugAdapterContribution const startFunction = config.pauseAtMain ? 'main' : 'setup'; const res: ActualDebugConfig = { ...config, - arduinoCli: await this.arduinoCli.getExecPath(), + arduinoCli: await this.daemon.getExecPath(), fqbn: '${fqbn}', uploadPort: '${port}', initCommands: [ diff --git a/arduino-ide-extension/data/cli/schema/arduino-cli.schema.json b/arduino-ide-extension/data/cli/schema/arduino-cli.schema.json new file mode 100644 index 00000000..d391fc8d --- /dev/null +++ b/arduino-ide-extension/data/cli/schema/arduino-cli.schema.json @@ -0,0 +1,114 @@ +{ + "$id": "http://arduino.cc/arduino-cli.json", + "$schema": "http://json-schema.org/draft-07/schema#", + "type": "object", + "title": "Arduino CLI Configuration", + "properties": { + "board_manager": { + "type": "object", + "description": "Board Manager Configuration", + "properties": { + "additional_urls": { + "type": "array", + "description": "If your board requires 3rd party core packages to work, you can list the URLs to additional package indexes in the Arduino CLI configuration file.", + "items": { + "type": "string", + "description": "URL pointing to the 3rd party core package index JSON.", + "pattern": "^(.*)$" + }, + "additionalProperties": false + } + }, + "additionalProperties": false + }, + "daemon": { + "type": "object", + "description": "CLI Daemon Configuration", + "properties": { + "port": { + "type": [ + "string", + "number" + ], + "description": "The CLI daemon port where the gRPC clients can connect to.", + "pattern": "^([0-9]{1,4}|[1-5][0-9]{4}|6[0-4][0-9]{3}|65[0-4][0-9]{2}|655[0-2][0-9]|6553[0-5])$", + "additionalProperties": false + } + }, + "additionalProperties": false + }, + "directories": { + "type": "object", + "description": "Directories Configuration", + "properties": { + "data": { + "type": "string", + "description": "Path to the the data folder where core packages will be stored.", + "pattern": "^(.*)$" + }, + "downloads": { + "type": "string", + "description": "Path to the staging folder.", + "pattern": "^(.*)$" + }, + "user": { + "type": "string", + "description": "Path to the sketchbooks.", + "pattern": "^(.*)$" + } + }, + "additionalProperties": false + }, + "logging": { + "type": "object", + "description": "Logging Configuration", + "properties": { + "file": { + "type": "string", + "description": "Path to the file where logs will be written.", + "pattern": "^(.*)$" + }, + "format": { + "type": "string", + "description": "The output format for the logs, can be 'text' or 'json'", + "enum": [ + "text", + "json" + ] + }, + "level": { + "type": "string", + "description": "Messages with this level and above will be logged.", + "enum": [ + "trace", + "debug", + "info", + "warning", + "error", + "fatal", + "panic" + ] + } + }, + "additionalProperties": false + }, + "telemetry": { + "type": "object", + "description": "Telemetry Configuration", + "properties": { + "addr": { + "type": "string", + "description": "Address to the telemetry endpoint. Must be a full address with host, address, and port. For instance, ':9090' represents 'localhost:9090'", + "pattern": "^(.*)$" + }, + "enabled": { + "type": "boolean", + "description": "Whether the telemetry is enabled or not." + }, + "additionalProperties": false + }, + "additionalProperties": false + } + }, + "additionalProperties": false +} diff --git a/arduino-ide-extension/package.json b/arduino-ide-extension/package.json index 6450ba8f..309ae64e 100644 --- a/arduino-ide-extension/package.json +++ b/arduino-ide-extension/package.json @@ -6,8 +6,20 @@ "engines": { "node": ">=10.10.0" }, + "scripts": { + "prepare": "yarn download-cli && yarn generate-protocol && yarn download-ls && yarn run clean && yarn run build", + "clean": "rimraf lib", + "download-cli": "node ./scripts/download-cli.js", + "download-ls": "node ./scripts/download-ls.js", + "generate-protocol": "node ./scripts/generate-protocol.js", + "lint": "tslint -c ./tslint.json --project ./tsconfig.json", + "build": "tsc && ncp ./src/node/cli-protocol/ ./lib/node/cli-protocol/ && yarn lint", + "watch": "tsc -w", + "test": "mocha \"./src/test/**/*.test.ts\"", + "test:watch": "mocha --watch --watch-files src \"./src/test/**/*.test.ts\"" + }, "dependencies": { - "@grpc/grpc-js": "^0.6.12", + "@grpc/grpc-js": "^0.6.18", "@theia/application-package": "next", "@theia/core": "next", "@theia/cpp": "next", @@ -23,13 +35,22 @@ "@theia/terminal": "next", "@theia/workspace": "next", "@types/dateformat": "^3.0.1", + "@types/deepmerge": "^2.2.0", + "@types/js-yaml": "^3.12.2", + "@types/glob": "^5.0.35", "@types/google-protobuf": "^3.7.1", + "@types/lodash.debounce": "^4.0.6", "@types/ps-tree": "^1.1.0", "@types/react-select": "^3.0.0", "@types/which": "^1.3.1", + "ajv": "^6.5.3", "css-element-queries": "^1.2.0", "dateformat": "^3.0.3", + "deepmerge": "^4.2.2", + "glob": "^7.1.6", "google-protobuf": "^3.11.0", + "lodash.debounce": "^4.0.8", + "js-yaml": "^3.13.1", "p-queue": "^5.0.0", "ps-tree": "^1.2.0", "react-select": "^3.0.4", @@ -39,31 +60,11 @@ "upath": "^1.1.2", "which": "^1.3.1" }, - "scripts": { - "prepare": "yarn download-cli && yarn download-ls && yarn run clean && yarn run build", - "clean": "rimraf lib", - "download-cli": "node ./scripts/download-cli.js", - "download-ls": "node ./scripts/download-ls.js", - "generate-protocol": "node ./scripts/generate-protocol.js", - "lint": "tslint -c ./tslint.json --project ./tsconfig.json", - "build": "tsc && ncp ./src/node/cli-protocol/ ./lib/node/cli-protocol/ && yarn lint", - "watch": "tsc -w", - "test": "mocha \"./test/**/*.test.ts\"" - }, - "mocha": { - "require": [ - "ts-node/register", - "reflect-metadata/Reflect" - ], - "reporter": "spec", - "colors": true, - "watch-extensions": "ts,tsx", - "timeout": 10000 - }, "devDependencies": { "@types/chai": "^4.2.7", "@types/chai-string": "^1.4.2", "@types/mocha": "^5.2.7", + "@types/temp": "^0.8.34", "chai": "^4.2.0", "chai-string": "^1.5.0", "decompress": "^4.2.0", @@ -75,14 +76,23 @@ "mocha": "^7.0.0", "moment": "^2.24.0", "ncp": "^2.0.0", - "rimraf": "^2.6.1", + "protoc": "1.0.4", "shelljs": "^0.8.3", + "temp": "^0.9.1", "ts-node": "^8.6.2", - "tslint": "^5.5.0", - "typescript": "3.5.3", "uuid": "^3.2.1", "yargs": "^11.1.0" }, + "mocha": { + "require": [ + "ts-node/register", + "reflect-metadata/Reflect" + ], + "reporter": "spec", + "colors": true, + "watch-extensions": "ts,tsx", + "timeout": 10000 + }, "files": [ "lib", "src", diff --git a/arduino-ide-extension/scripts/generate-protocol.js b/arduino-ide-extension/scripts/generate-protocol.js index 82aa0415..548ff2de 100644 --- a/arduino-ide-extension/scripts/generate-protocol.js +++ b/arduino-ide-extension/scripts/generate-protocol.js @@ -2,30 +2,15 @@ (async () => { - const DEFAULT_VERSION = 'nightly'; // '0.3.7-alpha.preview'; - const os = require('os'); const path = require('path'); + const glob = require('glob'); const { v4 } = require('uuid'); const shell = require('shelljs'); + const protoc = path.dirname(require('protoc/protoc')); + shell.env.PATH = `${shell.env.PATH}${path.delimiter}${protoc}`; shell.env.PATH = `${shell.env.PATH}${path.delimiter}${path.join(__dirname, '..', 'node_modules', '.bin')}`; - const yargs = require('yargs') - .option('cli-version', { - alias: 'cv', - default: DEFAULT_VERSION, - choices: [ - // 'latest', // TODO: How do we get the source for `latest`. Currently, `latest` is the `0.3.7-alpha.preview`. - 'nightly' - ], - describe: `The version of the 'arduino-cli' to download. Specify either an existing version or use 'nightly'. Defaults to ${DEFAULT_VERSION}.` - }) - .version(false).parse(); - const version = yargs['cli-version']; - if (version !== 'nightly') { - shell.echo(`Only 'nightly' version is supported.`); - shell.exit(1); - } const repository = path.join(os.tmpdir(), `${v4()}-arduino-cli`); if (shell.mkdir('-p', repository).code !== 0) { shell.exit(1); @@ -34,11 +19,22 @@ if (shell.exec(`git clone https://github.com/arduino/arduino-cli.git ${repository}`).code !== 0) { shell.exit(1); } - if (version !== 'nightly') { - if (shell.exec(`git -C ${repository} checkout tags/${version} -b ${version}`).code !== 0) { + + const { platform } = process; + const build = path.join(__dirname, '..', 'build'); + const cli = path.join(build, `arduino-cli${platform === 'win32' ? '.exe' : ''}`); + const rawVersion = shell.exec(`${cli} version`).trim(); + if (!rawVersion) { + shell.echo(`Could not retrieve the CLI version from ${cli}.`); + shell.exit(1); + } + const version = rawVersion.substring(rawVersion.lastIndexOf('Commit:') + 'Commit:'.length).trim(); + if (version) { + if (shell.exec(`git -C ${repository} checkout ${version} -b ${version}`).code !== 0) { shell.exit(1); } } + shell.echo('Generating TS/JS API from:'); if (shell.exec(`git -C ${repository} rev-parse --abbrev-ref HEAD`).code !== 0) { shell.exit(1); @@ -55,22 +51,38 @@ const rpc = path.join(repository, 'rpc'); const out = path.join(__dirname, '..', 'src', 'node', 'cli-protocol'); + shell.mkdir('-p', out); + + const protos = await new Promise(resolve => + glob('**/*.proto', { cwd: rpc }, (error, matches) => { + if (error) { + shell.echo(error.stack); + resolve([]); + return; + } + resolve(matches.map(filename => path.join(rpc, filename))); + })); + if (!protos || protos.length === 0) { + shell.echo(`Could not find any .proto files under ${rpc}.`); + shell.exit(1); + } + // Generate JS code from the `.proto` files. if (shell.exec(`grpc_tools_node_protoc \ --js_out=import_style=commonjs,binary:${out} \ --grpc_out=${out} \ --plugin=protoc-gen-grpc=${plugin} \ -I ${rpc} \ -${path.join(rpc, '/**/*.proto')}`).code !== 0) { +${protos.join(' ')}`).code !== 0) { shell.exit(1); } // Generate the `.d.ts` files for JS. if (shell.exec(`protoc \ ---plugin=protoc-gen-ts=${path.resolve(__dirname, '..', 'node_modules', '.bin', 'protoc-gen-ts')} \ +--plugin=protoc-gen-ts=${path.resolve(__dirname, '..', 'node_modules', '.bin', `protoc-gen-ts${platform === 'win32' ? '.cmd' : ''}`)} \ --ts_out=${out} \ -I ${rpc} \ -${path.join(rpc, '/**/*.proto')}`).code !== 0) { +${protos.join(' ')}`).code !== 0) { shell.exit(1); } @@ -78,4 +90,4 @@ ${path.join(rpc, '/**/*.proto')}`).code !== 0) { patch([out]) shell.echo('Done.'); -})(); \ No newline at end of file +})(); diff --git a/arduino-ide-extension/src/browser/arduino-commands.ts b/arduino-ide-extension/src/browser/arduino-commands.ts index 94376fe5..95853ae1 100644 --- a/arduino-ide-extension/src/browser/arduino-commands.ts +++ b/arduino-ide-extension/src/browser/arduino-commands.ts @@ -2,6 +2,8 @@ import { Command } from '@theia/core/lib/common/command'; export namespace ArduinoCommands { + const category = 'Arduino'; + export const VERIFY: Command = { id: 'arduino-verify', label: 'Verify Sketch' @@ -24,8 +26,9 @@ export namespace ArduinoCommands { export const SHOW_OPEN_CONTEXT_MENU: Command = { id: 'arduino-show-open-context-menu', - label: 'Open Sketch' - } + label: 'Open Sketch', + category + }; export const OPEN_FILE_NAVIGATOR: Command = { id: 'arduino-open-file-navigator' @@ -40,19 +43,26 @@ export namespace ArduinoCommands { } export const NEW_SKETCH: Command = { - id: "arduino-new-sketch", + id: 'arduino-new-sketch', label: 'New Sketch', - category: 'File' + category } export const OPEN_BOARDS_DIALOG: Command = { - id: "arduino-open-boards-dialog" + id: 'arduino-open-boards-dialog' } export const TOGGLE_ADVANCED_MODE: Command = { - id: "arduino-toggle-advanced-mode" + id: 'arduino-toggle-advanced-mode' } export const TOGGLE_ADVANCED_MODE_TOOLBAR: Command = { id: "arduino-toggle-advanced-mode-toolbar" } + + export const OPEN_CLI_CONFIG: Command = { + id: 'arduino-open-cli-config', + label: 'Open CLI Configuration', + category + }; + } diff --git a/arduino-ide-extension/src/browser/arduino-daemon-client-impl.ts b/arduino-ide-extension/src/browser/arduino-daemon-client-impl.ts new file mode 100644 index 00000000..697b1238 --- /dev/null +++ b/arduino-ide-extension/src/browser/arduino-daemon-client-impl.ts @@ -0,0 +1,53 @@ +import { injectable, inject } from 'inversify'; +import { ILogger } from '@theia/core/lib/common/logger'; +import { Event, Emitter } from '@theia/core/lib/common/event'; +import { MessageService } from '@theia/core/lib/common/message-service'; +import { ArduinoDaemonClient } from '../common/protocol/arduino-daemon'; + +@injectable() +export class ArduinoDaemonClientImpl implements ArduinoDaemonClient { + + @inject(ILogger) + protected readonly logger: ILogger; + + @inject(MessageService) + protected readonly messageService: MessageService; + + protected readonly onStartedEmitter = new Emitter(); + protected readonly onStoppedEmitter = new Emitter(); + protected _isRunning = false; + + notifyStopped(): void { + if (this._isRunning) { + this._isRunning = false; + this.onStoppedEmitter.fire(); + this.info('The CLI daemon process has stopped.'); + } + } + + notifyStarted(): void { + if (!this._isRunning) { + this._isRunning = true; + this.onStartedEmitter.fire(); + this.info('The CLI daemon process has started.'); + } + } + + get onDaemonStarted(): Event { + return this.onStartedEmitter.event; + } + + get onDaemonStopped(): Event { + return this.onStoppedEmitter.event; + } + + get isRunning(): boolean { + return this._isRunning; + } + + protected info(message: string): void { + this.messageService.info(message, { timeout: 3000 }); + this.logger.info(message); + } + +} diff --git a/arduino-ide-extension/src/browser/arduino-frontend-contribution.tsx b/arduino-ide-extension/src/browser/arduino-frontend-contribution.tsx index 897a1b1c..26bf0fe6 100644 --- a/arduino-ide-extension/src/browser/arduino-frontend-contribution.tsx +++ b/arduino-ide-extension/src/browser/arduino-frontend-contribution.tsx @@ -8,7 +8,6 @@ import { TabBarToolbarContribution, TabBarToolbarRegistry } from '@theia/core/li import { BoardsService } from '../common/protocol/boards-service'; import { ArduinoCommands } from './arduino-commands'; import { CoreService } from '../common/protocol/core-service'; -import { WorkspaceServiceExt } from './workspace-service-ext'; import { BoardsServiceClientImpl } from './boards/boards-service-client-impl'; import { WorkspaceRootUriAwareCommandHandler, WorkspaceCommands } from '@theia/workspace/lib/browser/workspace-commands'; import { SelectionService, MenuContribution, MenuModelRegistry, MAIN_MENU_BAR, MenuPath } from '@theia/core'; @@ -16,7 +15,7 @@ import { ArduinoToolbar } from './toolbar/arduino-toolbar'; import { EditorManager, EditorMainMenu } from '@theia/editor/lib/browser'; import { ContextMenuRenderer, Widget, StatusBar, StatusBarAlignment, FrontendApplicationContribution, - FrontendApplication, KeybindingContribution, KeybindingRegistry + FrontendApplication, KeybindingContribution, KeybindingRegistry, OpenerService, open } from '@theia/core/lib/browser'; import { OpenFileDialogProps, FileDialogService } from '@theia/filesystem/lib/browser/file-dialog'; import { FileSystem, FileStat } from '@theia/filesystem/lib/common'; @@ -44,6 +43,8 @@ import { FileNavigatorCommands } from '@theia/navigator/lib/browser/navigator-co import { EditorMode } from './editor-mode'; import { ColorContribution } from '@theia/core/lib/browser/color-application-contribution'; import { ColorRegistry } from '@theia/core/lib/browser/color-registry'; +import { ArduinoDaemon } from '../common/protocol/arduino-daemon'; +import { ConfigService } from '../common/protocol/config-service'; export namespace ArduinoMenus { export const SKETCH = [...MAIN_MENU_BAR, '3_sketch']; @@ -70,9 +71,6 @@ export class ArduinoFrontendContribution implements FrontendApplicationContribut @inject(CoreService) protected readonly coreService: CoreService; - @inject(WorkspaceServiceExt) - protected readonly workspaceServiceExt: WorkspaceServiceExt; - @inject(ToolOutputServiceClient) protected readonly toolOutputServiceClient: ToolOutputServiceClient; @@ -136,14 +134,20 @@ export class ArduinoFrontendContribution implements FrontendApplicationContribut @inject(EditorMode) protected readonly editorMode: EditorMode; + @inject(ArduinoDaemon) + protected readonly daemon: ArduinoDaemon; + + @inject(OpenerService) + protected readonly openerService: OpenerService; + + @inject(ConfigService) + protected readonly configService: ConfigService; + protected application: FrontendApplication; protected wsSketchCount: number = 0; // TODO: this does not belong here, does it? @postConstruct() protected async init(): Promise { - // This is a hack. Otherwise, the backend services won't bind. - await this.workspaceServiceExt.roots(); - const updateStatusBar = (config: BoardsConfig.Config) => { this.statusBar.setElement('arduino-selected-board', { alignment: StatusBarAlignment.RIGHT, @@ -305,13 +309,11 @@ export class ArduinoFrontendContribution implements FrontendApplicationContribut }); registry.registerCommand(ArduinoCommands.OPEN_FILE_NAVIGATOR, { - isEnabled: () => true, execute: () => this.doOpenFile() }); registry.registerCommand(ArduinoCommands.OPEN_SKETCH, { - isEnabled: () => true, - execute: (sketch: Sketch) => { + execute: async (sketch: Sketch) => { this.workspaceService.open(new URI(sketch.uri)); } }); @@ -340,7 +342,6 @@ export class ArduinoFrontendContribution implements FrontendApplicationContribut })); registry.registerCommand(ArduinoCommands.OPEN_BOARDS_DIALOG, { - isEnabled: () => true, execute: async () => { const boardsConfig = await this.boardsConfigDialog.open(); if (boardsConfig) { @@ -358,6 +359,10 @@ export class ArduinoFrontendContribution implements FrontendApplicationContribut isToggled: () => this.editorMode.proMode, execute: () => this.editorMode.toggleProMode() }); + + registry.registerCommand(ArduinoCommands.OPEN_CLI_CONFIG, { + execute: () => this.configService.getCliConfigFileUri().then(uri => open(this.openerService, new URI(uri))) + }); } protected async verify() { @@ -495,6 +500,10 @@ export class ArduinoFrontendContribution implements FrontendApplicationContribut registry.registerMenuAction([...CommonMenus.FILE, '0_new_sketch'], { commandId: ArduinoCommands.NEW_SKETCH.id }); + + registry.registerMenuAction([...CommonMenus.FILE_SETTINGS_SUBMENU, '3_settings_cli'], { + commandId: ArduinoCommands.OPEN_CLI_CONFIG.id + }); } protected getMenuId(menuPath: string[]): string { diff --git a/arduino-ide-extension/src/browser/arduino-frontend-module.ts b/arduino-ide-extension/src/browser/arduino-frontend-module.ts index a6b2dc72..98ce3f19 100644 --- a/arduino-ide-extension/src/browser/arduino-frontend-module.ts +++ b/arduino-ide-extension/src/browser/arduino-frontend-module.ts @@ -15,11 +15,9 @@ import { ArduinoLanguageGrammarContribution } from './language/arduino-language- import { LibraryService, LibraryServicePath } from '../common/protocol/library-service'; import { BoardsService, BoardsServicePath, BoardsServiceClient } from '../common/protocol/boards-service'; import { SketchesService, SketchesServicePath } from '../common/protocol/sketches-service'; -import { CoreService, CoreServicePath } from '../common/protocol/core-service'; +import { CoreService, CoreServicePath, CoreServiceClient } from '../common/protocol/core-service'; import { BoardsListWidget } from './boards/boards-list-widget'; import { BoardsListWidgetFrontendContribution } from './boards/boards-widget-frontend-contribution'; -import { WorkspaceServiceExt, WorkspaceServiceExtPath } from './workspace-service-ext'; -import { WorkspaceServiceExtImpl } from './workspace-service-ext-impl'; import { ToolOutputServiceClient } from '../common/protocol/tool-output-service'; import { ToolOutputService } from '../common/protocol/tool-output-service'; import { ToolOutputServiceClientImpl } from './tool-output/client-service-impl'; @@ -52,13 +50,11 @@ import { ArduinoSearchInWorkspaceContribution } from './customization/arduino-se import { LibraryListWidgetFrontendContribution } from './library/library-widget-frontend-contribution'; import { MonitorServiceClientImpl } from './monitor/monitor-service-client-impl'; import { MonitorServicePath, MonitorService, MonitorServiceClient } from '../common/protocol/monitor-service'; -import { ConfigService, ConfigServicePath } from '../common/protocol/config-service'; +import { ConfigService, ConfigServicePath, ConfigServiceClient } from '../common/protocol/config-service'; import { MonitorWidget } from './monitor/monitor-widget'; import { MonitorViewContribution } from './monitor/monitor-view-contribution'; import { MonitorConnection } from './monitor/monitor-connection'; import { MonitorModel } from './monitor/monitor-model'; -import { MonacoEditorProvider } from '@theia/monaco/lib/browser/monaco-editor-provider'; -import { ArduinoMonacoEditorProvider } from './editor/arduino-monaco-editor-provider'; import { TabBarDecoratorService } from '@theia/core/lib/browser/shell/tab-bar-decorator'; import { ArduinoTabBarDecoratorService } from './shell/arduino-tab-bar-decorator'; import { ProblemManager } from '@theia/markers/lib/browser'; @@ -71,6 +67,14 @@ import { EditorMode } from './editor-mode'; import { ListItemRenderer } from './components/component-list/list-item-renderer'; import { ColorContribution } from '@theia/core/lib/browser/color-application-contribution'; import { MonacoThemingService } from '@theia/monaco/lib/browser/monaco-theming-service'; +import { ArduinoDaemonClientImpl } from './arduino-daemon-client-impl'; +import { ArduinoDaemonClient, ArduinoDaemonPath, ArduinoDaemon } from '../common/protocol/arduino-daemon'; +import { EditorManager } from '@theia/editor/lib/browser'; +import { ArduinoEditorManager } from './editor/arduino-editor-manager'; +import { ArduinoFrontendConnectionStatusService, ArduinoApplicationConnectionStatusContribution } from './customization/arduino-connection-status-service'; +import { FrontendConnectionStatusService, ApplicationConnectionStatusContribution } from '@theia/core/lib/browser/connection-status-service'; +import { ConfigServiceClientImpl } from './config-service-client-impl'; +import { CoreServiceClientImpl } from './core-service-client-impl'; const ElementQueries = require('css-element-queries/src/ElementQueries'); @@ -119,7 +123,17 @@ export default new ContainerModule((bind: interfaces.Bind, unbind: interfaces.Un bind(SketchesService).toDynamicValue(context => WebSocketConnectionProvider.createProxy(context.container, SketchesServicePath)).inSingletonScope(); // Config service - bind(ConfigService).toDynamicValue(context => WebSocketConnectionProvider.createProxy(context.container, ConfigServicePath)).inSingletonScope(); + bind(ConfigService).toDynamicValue(context => { + const connection = context.container.get(WebSocketConnectionProvider); + const client = context.container.get(ConfigServiceClientImpl); + return connection.createProxy(ConfigServicePath, client); + }).inSingletonScope(); + bind(ConfigServiceClientImpl).toSelf().inSingletonScope(); + bind(ConfigServiceClient).toDynamicValue(context => { + const client = context.container.get(ConfigServiceClientImpl); + WebSocketConnectionProvider.createProxy(context.container, ConfigServicePath, client); + return client; + }).inSingletonScope(); // Boards service bind(BoardsService).toDynamicValue(context => { @@ -136,7 +150,7 @@ export default new ContainerModule((bind: interfaces.Bind, unbind: interfaces.Un return client; }).inSingletonScope(); - // boards auto-installer + // Boards auto-installer bind(BoardsAutoInstaller).toSelf().inSingletonScope(); bind(FrontendApplicationContribution).toService(BoardsAutoInstaller); @@ -157,9 +171,18 @@ export default new ContainerModule((bind: interfaces.Bind, unbind: interfaces.Un }) // Core service - bind(CoreService) - .toDynamicValue(context => WebSocketConnectionProvider.createProxy(context.container, CoreServicePath)) - .inSingletonScope(); + bind(CoreService).toDynamicValue(context => { + const connection = context.container.get(WebSocketConnectionProvider); + const client = context.container.get(CoreServiceClientImpl); + return connection.createProxy(CoreServicePath, client); + }).inSingletonScope(); + // Core service client to receive and delegate notifications when the index or the library index has been updated. + bind(CoreServiceClientImpl).toSelf().inSingletonScope(); + bind(CoreServiceClient).toDynamicValue(context => { + const client = context.container.get(CoreServiceClientImpl); + WebSocketConnectionProvider.createProxy(context.container, CoreServicePath, client); + return client; + }).inSingletonScope(); // Tool output service client bind(ToolOutputServiceClientImpl).toSelf().inSingletonScope(); @@ -169,18 +192,7 @@ export default new ContainerModule((bind: interfaces.Bind, unbind: interfaces.Un return client; }).inSingletonScope(); - // The workspace service extension - bind(WorkspaceServiceExt).to(WorkspaceServiceExtImpl).inSingletonScope().onActivation(({ container }, workspaceServiceExt: WorkspaceServiceExt) => { - WebSocketConnectionProvider.createProxy(container, WorkspaceServiceExtPath, workspaceServiceExt); - // Eagerly active the core, library, and boards services. - container.get(CoreService); - container.get(LibraryService); - container.get(BoardsService); - container.get(SketchesService); - return workspaceServiceExt; - }); - - // Serial Monitor + // Serial monitor bind(MonitorModel).toSelf().inSingletonScope(); bind(FrontendApplicationContribution).toService(MonitorModel); bind(MonitorWidget).toSelf(); @@ -190,14 +202,14 @@ export default new ContainerModule((bind: interfaces.Bind, unbind: interfaces.Un id: MonitorWidget.ID, createWidget: () => context.container.get(MonitorWidget) })); - // Frontend binding for the monitor service + // Frontend binding for the serial monitor service bind(MonitorService).toDynamicValue(context => { const connection = context.container.get(WebSocketConnectionProvider); const client = context.container.get(MonitorServiceClientImpl); return connection.createProxy(MonitorServicePath, client); }).inSingletonScope(); bind(MonitorConnection).toSelf().inSingletonScope(); - // Monitor service client to receive and delegate notifications from the backend. + // Serial monitor service client to receive and delegate notifications from the backend. bind(MonitorServiceClientImpl).toSelf().inSingletonScope(); bind(MonitorServiceClient).toDynamicValue(context => { const client = context.container.get(MonitorServiceClientImpl); @@ -211,6 +223,8 @@ export default new ContainerModule((bind: interfaces.Bind, unbind: interfaces.Un // Customizing default Theia layout based on the editor mode: `pro-mode` or `classic`. bind(EditorMode).toSelf().inSingletonScope(); bind(FrontendApplicationContribution).toService(EditorMode); + + // Layout and shell customizations. rebind(OutlineViewContribution).to(ArduinoOutlineViewContribution).inSingletonScope(); rebind(ProblemContribution).to(ArduinoProblemContribution).inSingletonScope(); rebind(FileNavigatorContribution).to(ArduinoNavigatorContribution).inSingletonScope(); @@ -222,9 +236,15 @@ export default new ContainerModule((bind: interfaces.Bind, unbind: interfaces.Un rebind(SearchInWorkspaceFrontendContribution).to(ArduinoSearchInWorkspaceContribution).inSingletonScope(); rebind(FrontendApplication).to(ArduinoFrontendApplication).inSingletonScope(); - // Monaco customizations - bind(ArduinoMonacoEditorProvider).toSelf().inSingletonScope(); - rebind(MonacoEditorProvider).toService(ArduinoMonacoEditorProvider); + // Show a disconnected status bar, when the daemon is not available + bind(ArduinoApplicationConnectionStatusContribution).toSelf().inSingletonScope(); + rebind(ApplicationConnectionStatusContribution).toService(ArduinoApplicationConnectionStatusContribution); + bind(ArduinoFrontendConnectionStatusService).toSelf().inSingletonScope(); + rebind(FrontendConnectionStatusService).toService(ArduinoFrontendConnectionStatusService); + + // Editor customizations. Sets the editor to `readOnly` if under the data dir. + bind(ArduinoEditorManager).toSelf().inSingletonScope(); + rebind(EditorManager).toService(ArduinoEditorManager); // Decorator customizations bind(ArduinoTabBarDecoratorService).toSelf().inSingletonScope(); @@ -241,4 +261,17 @@ export default new ContainerModule((bind: interfaces.Bind, unbind: interfaces.Un // Customized layout restorer that can restore the state in async way: https://github.com/eclipse-theia/theia/issues/6579 bind(ArduinoShellLayoutRestorer).toSelf().inSingletonScope(); rebind(ShellLayoutRestorer).toService(ArduinoShellLayoutRestorer); + + // Arduino daemon client. Receives notifications from the backend if the CLI daemon process has been restarted. + bind(ArduinoDaemon).toDynamicValue(context => { + const connection = context.container.get(WebSocketConnectionProvider); + const client = context.container.get(ArduinoDaemonClientImpl); + return connection.createProxy(ArduinoDaemonPath, client); + }).inSingletonScope(); + bind(ArduinoDaemonClientImpl).toSelf().inSingletonScope(); + bind(ArduinoDaemonClient).toDynamicValue(context => { + const client = context.container.get(ArduinoDaemonClientImpl); + WebSocketConnectionProvider.createProxy(context.container, ArduinoDaemonPath, client); + return client; + }).inSingletonScope(); }); 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 70ff3133..b08157b3 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 @@ -5,6 +5,8 @@ import { ReactWidget, Message } from '@theia/core/lib/browser'; import { BoardsService } from '../../common/protocol/boards-service'; import { BoardsConfig } from './boards-config'; import { BoardsServiceClientImpl } from './boards-service-client-impl'; +import { CoreServiceClientImpl } from '../core-service-client-impl'; +import { ArduinoDaemonClientImpl } from '../arduino-daemon-client-impl'; @injectable() export class BoardsConfigDialogWidget extends ReactWidget { @@ -15,6 +17,12 @@ export class BoardsConfigDialogWidget extends ReactWidget { @inject(BoardsServiceClientImpl) protected readonly boardsServiceClient: BoardsServiceClientImpl; + @inject(CoreServiceClientImpl) + protected readonly coreServiceClient: CoreServiceClientImpl; + + @inject(ArduinoDaemonClientImpl) + protected readonly daemonClient: ArduinoDaemonClientImpl; + protected readonly onBoardConfigChangedEmitter = new Emitter(); readonly onBoardConfigChanged = this.onBoardConfigChangedEmitter.event; @@ -38,6 +46,8 @@ export class BoardsConfigDialogWidget extends ReactWidget { ; @@ -51,5 +61,4 @@ export class BoardsConfigDialogWidget extends ReactWidget { (this.focusNode || this.node).focus(); } - } diff --git a/arduino-ide-extension/src/browser/boards/boards-config.tsx b/arduino-ide-extension/src/browser/boards/boards-config.tsx index ec5e375a..04adbe98 100644 --- a/arduino-ide-extension/src/browser/boards/boards-config.tsx +++ b/arduino-ide-extension/src/browser/boards/boards-config.tsx @@ -2,6 +2,8 @@ import * as React from 'react'; import { DisposableCollection } from '@theia/core'; import { BoardsService, Board, Port, AttachedSerialBoard, AttachedBoardsChangeEvent } from '../../common/protocol/boards-service'; import { BoardsServiceClientImpl } from './boards-service-client-impl'; +import { CoreServiceClientImpl } from '../core-service-client-impl'; +import { ArduinoDaemonClientImpl } from '../arduino-daemon-client-impl'; export namespace BoardsConfig { @@ -13,6 +15,8 @@ export namespace BoardsConfig { export interface Props { readonly boardsService: BoardsService; readonly boardsServiceClient: BoardsServiceClientImpl; + readonly coreServiceClient: CoreServiceClientImpl; + readonly daemonClient: ArduinoDaemonClientImpl; readonly onConfigChange: (config: Config) => void; readonly onFocusNodeSet: (element: HTMLElement | undefined) => void; } @@ -21,6 +25,7 @@ export namespace BoardsConfig { searchResults: Array; knownPorts: Port[]; showAllPorts: boolean; + query: string; } } @@ -70,6 +75,7 @@ export class BoardsConfig extends React.Component this.updatePorts(ports)); - const { boardsServiceClient: client } = this.props; + const { boardsServiceClient, coreServiceClient, daemonClient } = this.props; this.toDispose.pushAll([ - client.onBoardsChanged(event => this.updatePorts(event.newState.ports, AttachedBoardsChangeEvent.diff(event).detached.ports)), - client.onBoardsConfigChanged(({ selectedBoard, selectedPort }) => { + boardsServiceClient.onBoardsChanged(event => this.updatePorts(event.newState.ports, AttachedBoardsChangeEvent.diff(event).detached.ports)), + boardsServiceClient.onBoardsConfigChanged(({ selectedBoard, selectedPort }) => { this.setState({ selectedBoard, selectedPort }, () => this.fireConfigChanged()); - }) + }), + coreServiceClient.onIndexUpdated(() => this.updateBoards(this.state.query)), + daemonClient.onDaemonStarted(() => this.updateBoards(this.state.query)), + daemonClient.onDaemonStopped(() => this.setState({ searchResults: [] })) ]); } @@ -100,6 +109,7 @@ export class BoardsConfig extends React.Component this.setState({ searchResults })); } diff --git a/arduino-ide-extension/src/browser/components/component-list/filterable-list-container.tsx b/arduino-ide-extension/src/browser/components/component-list/filterable-list-container.tsx index 4c717149..c3de4ad8 100644 --- a/arduino-ide-extension/src/browser/components/component-list/filterable-list-container.tsx +++ b/arduino-ide-extension/src/browser/components/component-list/filterable-list-container.tsx @@ -65,7 +65,7 @@ export class FilterableListContainer extends React.C /> } - protected handleFilterTextChange = (filterText: string) => { + protected handleFilterTextChange = (filterText: string = this.state.filterText) => { this.setState({ filterText }); this.search(filterText); } @@ -132,7 +132,7 @@ export namespace FilterableListContainer { readonly itemRenderer: ListItemRenderer; readonly resolveContainer: (element: HTMLElement) => void; readonly resolveFocus: (element: HTMLElement | undefined) => void; - readonly filterTextChangeEvent: Event; + readonly filterTextChangeEvent: Event; } export interface State { diff --git a/arduino-ide-extension/src/browser/components/component-list/list-widget.tsx b/arduino-ide-extension/src/browser/components/component-list/list-widget.tsx index 0a55edf2..d2bc7a08 100644 --- a/arduino-ide-extension/src/browser/components/component-list/list-widget.tsx +++ b/arduino-ide-extension/src/browser/components/component-list/list-widget.tsx @@ -1,5 +1,5 @@ import * as React from 'react'; -import { injectable, postConstruct } from 'inversify'; +import { injectable, postConstruct, inject } from 'inversify'; import { Message } from '@phosphor/messaging'; import { Deferred } from '@theia/core/lib/common/promise-util'; import { Emitter } from '@theia/core/lib/common/event'; @@ -10,16 +10,24 @@ import { Searchable } from '../../../common/protocol/searchable'; import { ArduinoComponent } from '../../../common/protocol/arduino-component'; import { FilterableListContainer } from './filterable-list-container'; import { ListItemRenderer } from './list-item-renderer'; +import { CoreServiceClientImpl } from '../../core-service-client-impl'; +import { ArduinoDaemonClientImpl } from '../../arduino-daemon-client-impl'; @injectable() export abstract class ListWidget extends ReactWidget { + @inject(CoreServiceClientImpl) + protected readonly coreServiceClient: CoreServiceClientImpl; + + @inject(ArduinoDaemonClientImpl) + protected readonly daemonClient: ArduinoDaemonClientImpl; + /** * Do not touch or use it. It is for setting the focus on the `input` after the widget activation. */ protected focusNode: HTMLElement | undefined; protected readonly deferredContainer = new Deferred(); - protected readonly filterTextChangeEmitter = new Emitter(); + protected readonly filterTextChangeEmitter = new Emitter(); constructor(protected options: ListWidget.Options) { super(); @@ -40,6 +48,11 @@ export abstract class ListWidget extends ReactWidget @postConstruct() protected init(): void { this.update(); + this.toDispose.pushAll([ + this.coreServiceClient.onIndexUpdated(() => this.refresh(undefined)), + this.daemonClient.onDaemonStarted(() => this.refresh(undefined)), + this.daemonClient.onDaemonStopped(() => this.refresh(undefined)) + ]); } protected getScrollContainer(): MaybePromise { @@ -69,10 +82,14 @@ export abstract class ListWidget extends ReactWidget installable={this.options.installable} itemLabel={this.options.itemLabel} itemRenderer={this.options.itemRenderer} - filterTextChangeEvent={this.filterTextChangeEmitter.event}/>; + filterTextChangeEvent={this.filterTextChangeEmitter.event} />; } - refresh(filterText: string): void { + /** + * If `filterText` is defined, sets the filter text to the argument. + * If it is `undefined`, updates the view state by re-running the search with the current `filterText` term. + */ + refresh(filterText: string | undefined): void { this.deferredContainer.promise.then(() => this.filterTextChangeEmitter.fire(filterText)); } diff --git a/arduino-ide-extension/src/browser/config-service-client-impl.ts b/arduino-ide-extension/src/browser/config-service-client-impl.ts new file mode 100644 index 00000000..e8ca9cf9 --- /dev/null +++ b/arduino-ide-extension/src/browser/config-service-client-impl.ts @@ -0,0 +1,52 @@ +import { injectable, inject } from 'inversify'; +import { ILogger } from '@theia/core/lib/common/logger'; +import { Event, Emitter } from '@theia/core/lib/common/event'; +import { CommandService } from '@theia/core/lib/common/command'; +import { MessageService } from '@theia/core/lib/common/message-service'; +import { ConfigServiceClient, Config } from '../common/protocol'; +import { ArduinoCommands } from './arduino-commands'; + +@injectable() +export class ConfigServiceClientImpl implements ConfigServiceClient { + + @inject(CommandService) + protected readonly commandService: CommandService; + + @inject(ILogger) + protected readonly logger: ILogger; + + @inject(MessageService) + protected readonly messageService: MessageService; + + protected readonly onConfigChangedEmitter = new Emitter(); + protected invalidConfigPopup: Promise | undefined; + + notifyConfigChanged(config: Config): void { + this.invalidConfigPopup = undefined; + this.info(`The CLI configuration has been successfully reloaded.`); + this.onConfigChangedEmitter.fire(config); + } + + notifyInvalidConfig(): void { + if (!this.invalidConfigPopup) { + this.invalidConfigPopup = this.messageService.error(`Your CLI configuration is invalid. Do you want to correct it now?`, 'No', 'Yes') + .then(answer => { + if (answer === 'Yes') { + this.commandService.executeCommand(ArduinoCommands.OPEN_CLI_CONFIG.id) + } + this.invalidConfigPopup = undefined; + }) + + } + } + + get onConfigChanged(): Event { + return this.onConfigChangedEmitter.event; + } + + protected info(message: string): void { + this.messageService.info(message, { timeout: 3000 }); + this.logger.info(message); + } + +} diff --git a/arduino-ide-extension/src/browser/core-service-client-impl.ts b/arduino-ide-extension/src/browser/core-service-client-impl.ts new file mode 100644 index 00000000..9f2f3690 --- /dev/null +++ b/arduino-ide-extension/src/browser/core-service-client-impl.ts @@ -0,0 +1,36 @@ +import { injectable, inject } from 'inversify'; +import { Emitter, Event } from '@theia/core/lib/common/event'; +import { ILogger } from '@theia/core/lib/common/logger'; +import { MessageService } from '@theia/core/lib/common/message-service'; +import { LocalStorageService } from '@theia/core/lib/browser/storage-service'; +import { CoreServiceClient } from '../common/protocol'; + +@injectable() +export class CoreServiceClientImpl implements CoreServiceClient { + + @inject(ILogger) + protected logger: ILogger; + + @inject(MessageService) + protected messageService: MessageService; + + @inject(LocalStorageService) + protected storageService: LocalStorageService; + + protected readonly onIndexUpdatedEmitter = new Emitter(); + + notifyIndexUpdated(): void { + this.info('Index has been updated.'); + this.onIndexUpdatedEmitter.fire(); + } + + get onIndexUpdated(): Event { + return this.onIndexUpdatedEmitter.event; + } + + protected info(message: string): void { + this.messageService.info(message, { timeout: 3000 }); + this.logger.info(message); + } + +} diff --git a/arduino-ide-extension/src/browser/customization/arduino-connection-status-service.ts b/arduino-ide-extension/src/browser/customization/arduino-connection-status-service.ts new file mode 100644 index 00000000..addff7d7 --- /dev/null +++ b/arduino-ide-extension/src/browser/customization/arduino-connection-status-service.ts @@ -0,0 +1,51 @@ +import { inject, injectable, postConstruct } from 'inversify'; +import { Disposable } from '@theia/core/lib/common/disposable'; +import { StatusBarAlignment } from '@theia/core/lib/browser/status-bar/status-bar'; +import { FrontendConnectionStatusService, ApplicationConnectionStatusContribution, ConnectionStatus } from '@theia/core/lib/browser/connection-status-service'; +import { ArduinoDaemonClientImpl } from '../arduino-daemon-client-impl'; + +@injectable() +export class ArduinoFrontendConnectionStatusService extends FrontendConnectionStatusService { + + @inject(ArduinoDaemonClientImpl) + protected readonly daemonClient: ArduinoDaemonClientImpl; + + @postConstruct() + protected init(): void { + this.schedulePing(); + this.wsConnectionProvider.onIncomingMessageActivity(() => { + // natural activity + this.updateStatus(this.daemonClient.isRunning); + this.schedulePing(); + }); + } + +} + +@injectable() +export class ArduinoApplicationConnectionStatusContribution extends ApplicationConnectionStatusContribution { + + @inject(ArduinoDaemonClientImpl) + protected readonly daemonClient: ArduinoDaemonClientImpl; + + protected onStateChange(state: ConnectionStatus): void { + if (!this.daemonClient.isRunning && state === ConnectionStatus.ONLINE) { + return; + } + super.onStateChange(state); + } + + protected handleOffline(): void { + const { isRunning } = this.daemonClient; + this.statusBar.setElement('connection-status', { + alignment: StatusBarAlignment.LEFT, + text: isRunning ? 'Offline' : '$(bolt) CLI Daemon Offline', + tooltip: isRunning ? 'Cannot connect to the backend.' : 'Cannot connect to the CLI daemon.', + priority: 5000 + }); + this.toDisposeOnOnline.push(Disposable.create(() => this.statusBar.removeElement('connection-status'))); + document.body.classList.add('theia-mod-offline'); + this.toDisposeOnOnline.push(Disposable.create(() => document.body.classList.remove('theia-mod-offline'))); + } + +} diff --git a/arduino-ide-extension/src/browser/editor/arduino-editor-manager.ts b/arduino-ide-extension/src/browser/editor/arduino-editor-manager.ts new file mode 100644 index 00000000..30c33932 --- /dev/null +++ b/arduino-ide-extension/src/browser/editor/arduino-editor-manager.ts @@ -0,0 +1,37 @@ +import { inject, injectable } from 'inversify'; +import URI from '@theia/core/lib/common/uri'; +import { EditorManager, EditorOpenerOptions } from '@theia/editor/lib/browser/editor-manager'; +import { ConfigService } from '../../common/protocol/config-service'; +import { EditorWidget } from '@theia/editor/lib/browser'; +import { MonacoEditor } from '@theia/monaco/lib/browser/monaco-editor'; + +@injectable() +export class ArduinoEditorManager extends EditorManager { + + @inject(ConfigService) + protected readonly configService: ConfigService; + + async open(uri: URI, options?: EditorOpenerOptions): Promise { + const [widget, readOnly] = await Promise.all([super.open(uri, options), this.isReadOnly(uri)]); + if (readOnly) { + const { editor } = widget; + if (editor instanceof MonacoEditor) { + const codeEditor = editor.getControl(); + codeEditor.updateOptions({ readOnly }); + } + } + return widget; + } + + protected async isReadOnly(uri: URI): Promise { + const [config, configFileUri] = await Promise.all([ + this.configService.getConfiguration(), + this.configService.getCliConfigFileUri() + ]); + if (new URI(configFileUri).toString(true) === uri.toString(true)) { + return false; + } + return new URI(config.dataDirUri).isEqualOrParent(uri) + } + +} diff --git a/arduino-ide-extension/src/browser/editor/arduino-monaco-editor-provider.ts b/arduino-ide-extension/src/browser/editor/arduino-monaco-editor-provider.ts deleted file mode 100644 index ff170637..00000000 --- a/arduino-ide-extension/src/browser/editor/arduino-monaco-editor-provider.ts +++ /dev/null @@ -1,34 +0,0 @@ -import { inject, injectable } from 'inversify'; -import URI from '@theia/core/lib/common/uri'; -import { DisposableCollection } from '@theia/core/lib/common/disposable'; -import { MonacoEditor } from '@theia/monaco/lib/browser/monaco-editor'; -import { MonacoEditorModel } from '@theia/monaco/lib/browser/monaco-editor-model'; -import { MonacoEditorProvider } from '@theia/monaco/lib/browser/monaco-editor-provider'; -import { ConfigService } from '../../common/protocol/config-service'; - -@injectable() -export class ArduinoMonacoEditorProvider extends MonacoEditorProvider { - - @inject(ConfigService) - protected readonly configService: ConfigService; - protected dataDirUri: string | undefined; - - protected async getModel(uri: URI, toDispose: DisposableCollection): Promise { - // `createMonacoEditorOptions` is not `async` so we ask the `dataDirUri` here. - // https://github.com/eclipse-theia/theia/issues/6234 - const { dataDirUri } = await this.configService.getConfiguration() - this.dataDirUri = dataDirUri; - return super.getModel(uri, toDispose); - } - - protected createMonacoEditorOptions(model: MonacoEditorModel): MonacoEditor.IOptions { - const options = this.createOptions(this.preferencePrefixes, model.uri, model.languageId); - options.model = model.textEditorModel; - options.readOnly = model.readOnly; - if (this.dataDirUri) { - options.readOnly = new URI(this.dataDirUri).isEqualOrParent(new URI(model.uri)); - } - return options; - } - -} \ No newline at end of file diff --git a/arduino-ide-extension/src/browser/workspace-service-ext-impl.ts b/arduino-ide-extension/src/browser/workspace-service-ext-impl.ts deleted file mode 100644 index 444317c0..00000000 --- a/arduino-ide-extension/src/browser/workspace-service-ext-impl.ts +++ /dev/null @@ -1,19 +0,0 @@ -import { inject, injectable } from 'inversify'; -import { WorkspaceService } from '@theia/workspace/lib/browser/workspace-service'; -import { WorkspaceServiceExt } from './workspace-service-ext'; - -/** - * This is a workaround to be able to inject the workspace service to the backend with its service path. - */ -@injectable() -export class WorkspaceServiceExtImpl implements WorkspaceServiceExt { - - @inject(WorkspaceService) - protected readonly delegate: WorkspaceService; - - async roots(): Promise { - const stats = await this.delegate.roots; - return stats.map(stat => stat.uri); - } - -} \ No newline at end of file diff --git a/arduino-ide-extension/src/browser/workspace-service-ext.ts b/arduino-ide-extension/src/browser/workspace-service-ext.ts deleted file mode 100644 index 8d77fbac..00000000 --- a/arduino-ide-extension/src/browser/workspace-service-ext.ts +++ /dev/null @@ -1,5 +0,0 @@ -export const WorkspaceServiceExtPath = '/services/workspace-service-ext'; -export const WorkspaceServiceExt = Symbol('WorkspaceServiceExt'); -export interface WorkspaceServiceExt { - roots(): Promise; -} diff --git a/arduino-ide-extension/src/common/protocol/arduino-daemon.ts b/arduino-ide-extension/src/common/protocol/arduino-daemon.ts new file mode 100644 index 00000000..c1a5d63e --- /dev/null +++ b/arduino-ide-extension/src/common/protocol/arduino-daemon.ts @@ -0,0 +1,13 @@ +import { JsonRpcServer } from '@theia/core/lib/common/messaging/proxy-factory'; + +export const ArduinoDaemonClient = Symbol('ArduinoDaemonClient'); +export interface ArduinoDaemonClient { + notifyStarted(): void; + notifyStopped(): void; +} + +export const ArduinoDaemonPath = '/services/arduino-daemon'; +export const ArduinoDaemon = Symbol('ArduinoDaemon'); +export interface ArduinoDaemon extends JsonRpcServer { + isRunning(): Promise; +} diff --git a/arduino-ide-extension/src/common/protocol/config-service.ts b/arduino-ide-extension/src/common/protocol/config-service.ts index 10cc977d..65d84eab 100644 --- a/arduino-ide-extension/src/common/protocol/config-service.ts +++ b/arduino-ide-extension/src/common/protocol/config-service.ts @@ -1,14 +1,25 @@ +import { JsonRpcServer } from '@theia/core/lib/common/messaging/proxy-factory'; + +export const ConfigServiceClient = Symbol('ConfigServiceClient'); +export interface ConfigServiceClient { + notifyConfigChanged(config: Config): void; + notifyInvalidConfig(): void; +} + export const ConfigServicePath = '/services/config-service'; export const ConfigService = Symbol('ConfigService'); - -export interface ConfigService { +export interface ConfigService extends JsonRpcServer { getVersion(): Promise; getConfiguration(): Promise; + getCliConfigFileUri(): Promise; + getConfigurationFileSchemaUri(): Promise; isInDataDir(uri: string): Promise; isInSketchDir(uri: string): Promise; } export interface Config { - sketchDirUri: string; - dataDirUri: string; + readonly sketchDirUri: string; + readonly dataDirUri: string; + readonly downloadsDirUri: string; + readonly additionalUrls: string[]; } diff --git a/arduino-ide-extension/src/common/protocol/core-service.ts b/arduino-ide-extension/src/common/protocol/core-service.ts index 9b6b2b90..5b7fa496 100644 --- a/arduino-ide-extension/src/common/protocol/core-service.ts +++ b/arduino-ide-extension/src/common/protocol/core-service.ts @@ -1,8 +1,14 @@ -import { Board } from "./boards-service"; +import { JsonRpcServer } from '@theia/core/lib/common/messaging/proxy-factory'; +import { Board } from './boards-service'; + +export const CoreServiceClient = Symbol('CoreServiceClient'); +export interface CoreServiceClient { + notifyIndexUpdated(): void; +} export const CoreServicePath = '/services/core-service'; export const CoreService = Symbol('CoreService'); -export interface CoreService { +export interface CoreService extends JsonRpcServer { compile(options: CoreService.Compile.Options): Promise; upload(options: CoreService.Upload.Options): Promise; } diff --git a/arduino-ide-extension/src/common/protocol/index.ts b/arduino-ide-extension/src/common/protocol/index.ts new file mode 100644 index 00000000..83c20492 --- /dev/null +++ b/arduino-ide-extension/src/common/protocol/index.ts @@ -0,0 +1,11 @@ +export * from './arduino-component'; +export * from './arduino-daemon'; +export * from './boards-service'; +export * from './config-service'; +export * from './core-service'; +export * from './installable'; +export * from './library-service'; +export * from './monitor-service'; +export * from './searchable'; +export * from './sketches-service'; +export * from './tool-output-service'; diff --git a/arduino-ide-extension/src/node/arduino-backend-module.ts b/arduino-ide-extension/src/node/arduino-backend-module.ts index 66f7a5e5..c5f8b651 100644 --- a/arduino-ide-extension/src/node/arduino-backend-module.ts +++ b/arduino-ide-extension/src/node/arduino-backend-module.ts @@ -2,7 +2,7 @@ import * as fs from 'fs'; import * as os from 'os'; import { join } from 'path'; import { ContainerModule } from 'inversify'; -import { ArduinoDaemon } from './arduino-daemon'; +import { ArduinoDaemonImpl } from './arduino-daemon-impl'; import { ILogger } from '@theia/core/lib/common/logger'; import { BackendApplicationContribution } from '@theia/core/lib/node/backend-application'; import { LanguageServerContribution } from '@theia/languages/lib/node'; @@ -12,11 +12,9 @@ import { BoardsService, BoardsServicePath, BoardsServiceClient } from '../common import { LibraryServiceImpl } from './library-service-impl'; import { BoardsServiceImpl } from './boards-service-impl'; import { CoreServiceImpl } from './core-service-impl'; -import { CoreService, CoreServicePath } from '../common/protocol/core-service'; +import { CoreService, CoreServicePath, CoreServiceClient } from '../common/protocol/core-service'; import { ConnectionContainerModule } from '@theia/core/lib/node/messaging/connection-container-module'; -import { WorkspaceServiceExtPath, WorkspaceServiceExt } from '../browser/workspace-service-ext'; -import { CoreClientProviderImpl } from './core-client-provider-impl'; -import { CoreClientProviderPath, CoreClientProvider } from './core-client-provider'; +import { CoreClientProvider } from './core-client-provider'; import { ToolOutputService, ToolOutputServiceClient, ToolOutputServiceServer } from '../common/protocol/tool-output-service'; import { ConnectionHandler, JsonRpcConnectionHandler } from '@theia/core'; import { ToolOutputServiceServerImpl } from './tool-output-service-impl'; @@ -24,26 +22,47 @@ import { DefaultWorkspaceServerExt } from './default-workspace-server-ext'; import { WorkspaceServer } from '@theia/workspace/lib/common'; import { SketchesServiceImpl } from './sketches-service-impl'; import { SketchesService, SketchesServicePath } from '../common/protocol/sketches-service'; -import { ConfigService, ConfigServicePath } from '../common/protocol/config-service'; +import { ConfigService, ConfigServicePath, ConfigServiceClient } from '../common/protocol/config-service'; +import { ArduinoDaemon, ArduinoDaemonPath, ArduinoDaemonClient } from '../common/protocol/arduino-daemon'; import { MonitorServiceImpl } from './monitor/monitor-service-impl'; import { MonitorService, MonitorServicePath, MonitorServiceClient } from '../common/protocol/monitor-service'; import { MonitorClientProvider } from './monitor/monitor-client-provider'; -import { ArduinoCli } from './arduino-cli'; -import { ArduinoCliContribution } from './arduino-cli-contribution'; -import { CliContribution } from '@theia/core/lib/node'; import { ConfigServiceImpl } from './config-service-impl'; +import { ArduinoHostedPluginReader } from './arduino-plugin-reader'; +import { HostedPluginReader } from '@theia/plugin-ext/lib/hosted/node/plugin-reader'; +import { ConfigFileValidator } from './config-file-validator'; +import { EnvVariablesServer } from '@theia/core/lib/common/env-variables'; +import { ArduinoEnvVariablesServer } from './arduino-env-variables-server'; export default new ContainerModule((bind, unbind, isBound, rebind) => { - // Theia backend CLI contribution. - bind(ArduinoCliContribution).toSelf().inSingletonScope(); - bind(CliContribution).toService(ArduinoCliContribution); - - // Provides the path of the Arduino CLI. - bind(ArduinoCli).toSelf().inSingletonScope(); + rebind(EnvVariablesServer).to(ArduinoEnvVariablesServer).inSingletonScope(); + bind(ConfigFileValidator).toSelf().inSingletonScope(); + // XXX: The config service must start earlier than the daemon, hence the binding order does matter. + // Shared config service + bind(ConfigServiceImpl).toSelf().inSingletonScope(); + bind(ConfigService).toService(ConfigServiceImpl); + bind(BackendApplicationContribution).toService(ConfigServiceImpl); + bind(ConnectionHandler).toDynamicValue(context => + new JsonRpcConnectionHandler(ConfigServicePath, client => { + const server = context.container.get(ConfigServiceImpl); + server.setClient(client); + client.onDidCloseConnection(() => server.disposeClient(client)); + return server; + }) + ).inSingletonScope(); // Shared daemon - bind(ArduinoDaemon).toSelf().inSingletonScope(); - bind(BackendApplicationContribution).toService(ArduinoDaemon); + bind(ArduinoDaemonImpl).toSelf().inSingletonScope(); + bind(ArduinoDaemon).toService(ArduinoDaemonImpl); + bind(BackendApplicationContribution).toService(ArduinoDaemonImpl); + bind(ConnectionHandler).toDynamicValue(context => + new JsonRpcConnectionHandler(ArduinoDaemonPath, async client => { + const server = context.container.get(ArduinoDaemonImpl); + server.setClient(client); + client.onDidCloseConnection(() => server.disposeClient(client)); + return server; + }) + ).inSingletonScope(); // Language server bind(ArduinoLanguageServerContribution).toSelf().inSingletonScope(); @@ -65,14 +84,6 @@ export default new ContainerModule((bind, unbind, isBound, rebind) => { }); bind(ConnectionContainerModule).toConstantValue(sketchesServiceConnectionModule); - // Config service - bind(ConfigServiceImpl).toSelf().inSingletonScope(); - bind(ConfigService).toService(ConfigServiceImpl); - const configServiceConnectionModule = ConnectionContainerModule.create(({ bind, bindBackendService }) => { - bindBackendService(ConfigServicePath, ConfigService); - }); - bind(ConnectionContainerModule).toConstantValue(configServiceConnectionModule); - // Boards service const boardsServiceConnectionModule = ConnectionContainerModule.create(({ bind, bindBackendService }) => { bind(BoardsServiceImpl).toSelf().inSingletonScope(); @@ -85,26 +96,25 @@ export default new ContainerModule((bind, unbind, isBound, rebind) => { }); bind(ConnectionContainerModule).toConstantValue(boardsServiceConnectionModule); - // Arduino core client provider per Theia connection. - const coreClientProviderConnectionModule = ConnectionContainerModule.create(({ bind, bindBackendService }) => { - bind(CoreClientProviderImpl).toSelf().inSingletonScope(); - bind(CoreClientProvider).toService(CoreClientProviderImpl); - bindBackendService(CoreClientProviderPath, CoreClientProvider); - }); - bind(ConnectionContainerModule).toConstantValue(coreClientProviderConnectionModule); + // Shared Arduino core client provider service for the backend. + bind(CoreClientProvider).toSelf().inSingletonScope(); // Core service -> `verify` and `upload`. One per Theia connection. const connectionConnectionModule = ConnectionContainerModule.create(({ bind, bindBackendService }) => { bind(CoreServiceImpl).toSelf().inSingletonScope(); bind(CoreService).toService(CoreServiceImpl); bindBackendService(BoardsServicePath, BoardsService); - bindBackendService(CoreClientProviderPath, CoreClientProvider); - bindBackendService(CoreServicePath, CoreService); + bindBackendService(CoreServicePath, CoreService, (service, client) => { + service.setClient(client); + client.onDidCloseConnection(() => service.dispose()); + return service; + }); }); bind(ConnectionContainerModule).toConstantValue(connectionConnectionModule); // Tool output service -> feedback from the daemon, compile and flash - bind(ToolOutputServiceServer).to(ToolOutputServiceServerImpl).inSingletonScope(); + bind(ToolOutputServiceServerImpl).toSelf().inSingletonScope(); + bind(ToolOutputServiceServer).toService(ToolOutputServiceServerImpl); bind(ConnectionHandler).toDynamicValue(context => new JsonRpcConnectionHandler(ToolOutputService.SERVICE_PATH, client => { const server = context.container.get(ToolOutputServiceServer); @@ -114,13 +124,6 @@ export default new ContainerModule((bind, unbind, isBound, rebind) => { }) ).inSingletonScope(); - // Bind the workspace service extension to the backend per Theia connection. - // So that we can access the workspace roots of the frontend. - const workspaceServiceExtConnectionModule = ConnectionContainerModule.create(({ bindFrontendService }) => { - bindFrontendService(WorkspaceServiceExtPath, WorkspaceServiceExt); - }); - bind(ConnectionContainerModule).toConstantValue(workspaceServiceExtConnectionModule); - // Logger for the Arduino daemon bind(ILogger).toDynamicValue(ctx => { const parentLogger = ctx.container.get(ILogger); @@ -133,6 +136,12 @@ export default new ContainerModule((bind, unbind, isBound, rebind) => { return parentLogger.child('discovery'); }).inSingletonScope().whenTargetNamed('discovery'); + // Logger for the CLI config service. From the CLI config (FS path aware), we make a URI-aware app config. + bind(ILogger).toDynamicValue(ctx => { + const parentLogger = ctx.container.get(ILogger); + return parentLogger.child('config'); + }).inSingletonScope().whenTargetNamed('config'); + // Default workspace server extension to initialize and use a fallback workspace. // If nothing was set previously. bind(DefaultWorkspaceServerExt).toSelf().inSingletonScope(); @@ -173,4 +182,7 @@ export default new ContainerModule((bind, unbind, isBound, rebind) => { process.env.CPP_CLANGD_COMMAND = clangdCommand; } } + + bind(ArduinoHostedPluginReader).toSelf().inSingletonScope(); + rebind(HostedPluginReader).toService(ArduinoHostedPluginReader); }); diff --git a/arduino-ide-extension/src/node/arduino-cli-contribution.ts b/arduino-ide-extension/src/node/arduino-cli-contribution.ts deleted file mode 100644 index 148b92b5..00000000 --- a/arduino-ide-extension/src/node/arduino-cli-contribution.ts +++ /dev/null @@ -1,27 +0,0 @@ -import { injectable } from 'inversify'; -import { Argv, Arguments } from 'yargs'; -import { CliContribution } from '@theia/core/lib/node'; - -@injectable() -export class ArduinoCliContribution implements CliContribution { - - protected _debugCli = false - - configure(conf: Argv): void { - conf.option('debug-cli', { - description: 'Can be specified if the CLI daemon process was started externally.', - type: 'boolean', - default: false, - nargs: 1 - }); - } - - setArguments(args: Arguments): void { - this._debugCli = args['debug-cli']; - } - - get debugCli(): boolean { - return this._debugCli; - } - -} diff --git a/arduino-ide-extension/src/node/arduino-cli.ts b/arduino-ide-extension/src/node/arduino-cli.ts deleted file mode 100644 index 8b67e44c..00000000 --- a/arduino-ide-extension/src/node/arduino-cli.ts +++ /dev/null @@ -1,49 +0,0 @@ -import { injectable, inject } from 'inversify'; -import { ILogger } from '@theia/core'; -import { FileUri } from '@theia/core/lib/node/file-uri'; -import { Config } from '../common/protocol/config-service'; -import { spawnCommand, getExecPath } from './exec-util'; - -@injectable() -export class ArduinoCli { - - @inject(ILogger) - protected logger: ILogger; - - private execPath: string | undefined; - - async getExecPath(): Promise { - if (this.execPath) { - return this.execPath; - } - const path = await getExecPath('arduino-cli', this.logger, 'version'); - this.execPath = path; - return path; - } - - async getVersion(): Promise { - const execPath = await this.getExecPath(); - return spawnCommand(`"${execPath}"`, ['version'], this.logger); - } - - async getDefaultConfig(): Promise { - const execPath = await this.getExecPath(); - const result = await spawnCommand(`"${execPath}"`, ['config', 'dump', '--format', 'json'], this.logger); - const { directories } = JSON.parse(result); - if (!directories) { - throw new Error(`Could not parse config. 'directories' was missing from: ${result}`); - } - const { user, data } = directories; - if (!user) { - throw new Error(`Could not parse config. 'user' was missing from: ${result}`); - } - if (!data) { - throw new Error(`Could not parse config. 'data' was missing from: ${result}`); - } - return { - sketchDirUri: FileUri.create(user).toString(), - dataDirUri: FileUri.create(data).toString() - }; - } - -} diff --git a/arduino-ide-extension/src/node/arduino-daemon-impl.ts b/arduino-ide-extension/src/node/arduino-daemon-impl.ts new file mode 100644 index 00000000..791a2ec5 --- /dev/null +++ b/arduino-ide-extension/src/node/arduino-daemon-impl.ts @@ -0,0 +1,267 @@ +import { join } from 'path'; +import { inject, injectable, named } from 'inversify'; +import { spawn, ChildProcess } from 'child_process'; +import { FileUri } from '@theia/core/lib/node/file-uri'; +import { ILogger } from '@theia/core/lib/common/logger'; +import { Deferred } from '@theia/core/lib/common/promise-util'; +import { Disposable, DisposableCollection } from '@theia/core/lib/common/disposable'; +import { Event, Emitter } from '@theia/core/lib/common/event'; +import { environment } from '@theia/application-package/lib/environment'; +import { EnvVariablesServer } from '@theia/core/lib/common/env-variables'; +import { BackendApplicationContribution } from '@theia/core/lib/node/backend-application'; +import { ArduinoDaemon, ArduinoDaemonClient, ToolOutputServiceServer } from '../common/protocol'; +import { DaemonLog } from './daemon-log'; +import { CLI_CONFIG } from './cli-config'; +import { getExecPath, spawnCommand } from './exec-util'; + +@injectable() +export class ArduinoDaemonImpl implements ArduinoDaemon, BackendApplicationContribution { + + @inject(ILogger) + @named('daemon') + protected readonly logger: ILogger + + @inject(ToolOutputServiceServer) + protected readonly toolOutputService: ToolOutputServiceServer; + + @inject(EnvVariablesServer) + protected readonly envVariablesServer: EnvVariablesServer; + + protected readonly clients: Array = []; + protected readonly toDispose = new DisposableCollection(); + protected readonly onDaemonStartedEmitter = new Emitter(); + protected readonly onDaemonStoppedEmitter = new Emitter(); + + protected _running = false; + protected _ready = new Deferred(); + protected _execPath: string | undefined; + + // Backend application lifecycle. + + onStart(): void { + this.startDaemon(); + } + + onStop(): void { + this.dispose(); + } + + // JSON-RPC proxy + + setClient(client: ArduinoDaemonClient | undefined): void { + if (client) { + if (this._running) { + client.notifyStarted() + } else { + client.notifyStopped(); + } + this.clients.push(client); + } + } + + dispose(): void { + this.toDispose.dispose(); + this.clients.length = 0; + } + + disposeClient(client: ArduinoDaemonClient): void { + const index = this.clients.indexOf(client); + if (index === -1) { + this.logger.warn('Could not dispose client. It was not registered or was already disposed.'); + } else { + this.clients.splice(index, 1); + } + } + + // Daemon API + + async isRunning(): Promise { + return Promise.resolve(this._running); + } + + async startDaemon(): Promise { + try { + this.toDispose.dispose(); // This will `kill` the previously started daemon process, if any. + const cliPath = await this.getExecPath(); + this.onData(`Starting daemon from ${cliPath}...`); + const daemon = await this.spawnDaemonProcess(); + // Watchdog process for terminating the daemon process when the backend app terminates. + spawn(process.execPath, [join(__dirname, 'daemon-watcher.js'), String(process.pid), String(daemon.pid)], { + env: environment.electron.runAsNodeEnv(), + detached: true, + stdio: 'ignore', + windowsHide: true + }).unref(); + + this.toDispose.pushAll([ + Disposable.create(() => daemon.kill()), + Disposable.create(() => this.fireDaemonStopped()), + ]); + this.fireDaemonStarted(); + this.onData('Daemon is running.'); + } catch (err) { + this.onData('Failed to start the daemon.'); + this.onError(err); + let i = 5; // TODO: make this better + while (i) { + this.onData(`Restarting daemon in ${i} seconds...`); + await new Promise(resolve => setTimeout(resolve, 1000)); + i--; + } + this.onData('Restarting daemon now...'); + return this.startDaemon(); + } + } + + async stopDaemon(): Promise { + this.toDispose.dispose(); + } + + get onDaemonStarted(): Event { + return this.onDaemonStartedEmitter.event; + } + + get onDaemonStopped(): Event { + return this.onDaemonStoppedEmitter.event; + } + + get ready(): Promise { + return this._ready.promise; + } + + async getExecPath(): Promise { + if (this._execPath) { + return this._execPath; + } + this._execPath = await getExecPath('arduino-cli', this.onError.bind(this), 'version'); + return this._execPath; + } + + async getVersion(): Promise { + const execPath = await this.getExecPath(); + return spawnCommand(`"${execPath}"`, ['version'], this.onError.bind(this)); + } + + protected async getSpawnArgs(): Promise { + const configDirUri = await this.envVariablesServer.getConfigDirUri(); + const cliConfigPath = join(FileUri.fsPath(configDirUri), CLI_CONFIG); + return ['daemon', '--config-file', `"${cliConfigPath}"`, '-v', '--log-format', 'json']; + } + + protected async spawnDaemonProcess(): Promise { + const [cliPath, args] = await Promise.all([this.getExecPath(), this.getSpawnArgs()]); + const ready = new Deferred(); + const options = { shell: true }; + const daemon = spawn(`"${cliPath}"`, args, options); + + // If the process exists right after the daemon gRPC server has started (due to an invalid port, unknown address, TCP port in use, etc.) + // we have no idea about the root cause unless we sniff into the first data package and dispatch the logic on that. Note, we get a exit code 1. + let grpcServerIsReady = false; + + daemon.stdout.on('data', data => { + const message = data.toString(); + this.onData(message); + if (!grpcServerIsReady) { + const error = DaemonError.parse(message); + if (error) { + ready.reject(error); + } + if (message.includes('Daemon is listening on TCP port')) { + grpcServerIsReady = true; + ready.resolve(daemon); + } + } + }); + daemon.stderr.on('data', data => { + const message = data.toString(); + this.onData(data.toString()); + const error = DaemonError.parse(message); + ready.reject(error ? error : new Error(data.toString().trim())); + }); + daemon.on('exit', (code, signal) => { + if (code === 0 || signal === 'SIGINT' || signal === 'SIGKILL') { + this.onData('Daemon has stopped.'); + } else { + this.onData(`Daemon exited with ${typeof code === 'undefined' ? `signal '${signal}'` : `exit code: ${code}`}.`, { useOutput: false }); + } + }); + daemon.on('error', error => { + this.onError(error); + ready.reject(error); + }); + return ready.promise; + } + + protected fireDaemonStarted(): void { + this._running = true; + this._ready.resolve(); + this.onDaemonStartedEmitter.fire(); + for (const client of this.clients) { + client.notifyStarted(); + } + } + + protected fireDaemonStopped(): void { + if (!this._running) { + return; + } + this._running = false; + this._ready.reject(); // Reject all pending. + this._ready = new Deferred(); + this.onDaemonStoppedEmitter.fire(); + for (const client of this.clients) { + client.notifyStopped(); + } + } + + protected onData(message: string, options: { useOutput: boolean } = { useOutput: true }): void { + if (options.useOutput) { + this.toolOutputService.publishNewOutput('daemon', DaemonLog.toPrettyString(message)); + } + DaemonLog.log(this.logger, message); + } + + protected onError(error: any): void { + this.logger.error(error); + } + +} + +export class DaemonError extends Error { + + constructor(message: string, public readonly code: number, public readonly details?: string) { + super(message); + Object.setPrototypeOf(this, DaemonError.prototype); + } + +} + +export namespace DaemonError { + + export const ADDRESS_IN_USE = 0; + export const UNKNOWN_ADDRESS = 2; + export const INVALID_PORT = 4; + export const UNKNOWN = 8; + + export function parse(log: string): DaemonError | undefined { + const raw = log.toLocaleLowerCase(); + if (raw.includes('failed to listen')) { + if (raw.includes('address already in use') || (raw.includes('bind')) && raw.includes('only one usage of each socket address')) { + return new DaemonError('Failed to listen on TCP port. Address already in use.', DaemonError.ADDRESS_IN_USE); + } + if (raw.includes('is unknown name') || (raw.includes('tcp/') && (raw.includes('is an invalid port')))) { + return new DaemonError('Failed to listen on TCP port. Unknown address.', DaemonError.UNKNOWN_ADDRESS); + } + if (raw.includes('is an invalid port')) { + return new DaemonError('Failed to listen on TCP port. Invalid port.', DaemonError.INVALID_PORT); + } + } + // Based on the CLI logging: `failed to serve`, and any other FATAL errors. + // https://github.com/arduino/arduino-cli/blob/11abbee8a9f027d087d4230f266a87217677d423/cli/daemon/daemon.go#L89-L94 + if (raw.includes('failed to serve') && (raw.includes('"fatal"') || raw.includes('fata'))) { + return new DaemonError('Unexpected CLI start error.', DaemonError.UNKNOWN, log); + } + return undefined; + } + +} diff --git a/arduino-ide-extension/src/node/arduino-daemon.ts b/arduino-ide-extension/src/node/arduino-daemon.ts deleted file mode 100644 index fc843562..00000000 --- a/arduino-ide-extension/src/node/arduino-daemon.ts +++ /dev/null @@ -1,83 +0,0 @@ -import { join } from 'path'; -import { exec, spawn, SpawnOptions } from 'child_process'; -import { inject, injectable, named } from 'inversify'; -import { ILogger } from '@theia/core/lib/common/logger'; -import { BackendApplicationContribution } from '@theia/core/lib/node'; -import { Deferred } from '@theia/core/lib/common/promise-util'; -import { environment } from '@theia/application-package/lib/environment'; -import { DaemonLog } from './daemon-log'; -import { ToolOutputServiceServer } from '../common/protocol/tool-output-service'; -import { ArduinoCliContribution } from './arduino-cli-contribution'; -import { ArduinoCli } from './arduino-cli'; - -@injectable() -export class ArduinoDaemon implements BackendApplicationContribution { - - @inject(ILogger) - @named('daemon') - protected readonly logger: ILogger - - @inject(ArduinoCli) - protected readonly cli: ArduinoCli; - - @inject(ArduinoCliContribution) - protected readonly cliContribution: ArduinoCliContribution; - - @inject(ToolOutputServiceServer) - protected readonly toolOutputService: ToolOutputServiceServer; - - protected isReady = new Deferred(); - - async onStart() { - try { - if (!this.cliContribution.debugCli) { - const executable = await this.cli.getExecPath(); - const version = await this.cli.getVersion(); - this.logger.info(`>>> Starting ${version.toLocaleLowerCase()} daemon from ${executable}...`); - const daemon = exec(`"${executable}" daemon -v --log-level info --format json --log-format json`, - { encoding: 'utf8', maxBuffer: 1024 * 1024 }, (err, stdout, stderr) => { - if (err || stderr) { - console.log(err || new Error(stderr)); - return; - } - console.log(stdout); - }); - const options: SpawnOptions = { - env: environment.electron.runAsNodeEnv(), - detached: true, - stdio: 'ignore' - } - const command = process.execPath; - const cp = spawn(command, [join(__dirname, 'daemon-watcher.js'), String(process.pid), String(daemon.pid)], options); - cp.unref(); - - if (daemon.stdout) { - daemon.stdout.on('data', data => { - this.toolOutputService.publishNewOutput('daemon', DaemonLog.toPrettyString(data.toString())); - DaemonLog.log(this.logger, data.toString()); - }); - } - if (daemon.stderr) { - daemon.stderr.on('data', data => { - this.toolOutputService.publishNewOutput('daemon error', DaemonLog.toPrettyString(data.toString())); - DaemonLog.log(this.logger, data.toString()); - }); - } - if (daemon.stderr) { - daemon.on('exit', (code, signal) => DaemonLog.log(this.logger, `Daemon exited with code: ${code}. Signal was: ${signal}.`)); - } - } - - await new Promise(resolve => setTimeout(resolve, 2000)); - this.isReady.resolve(); - if (!this.cliContribution.debugCli) { - this.logger.info(`<<< The 'arduino-cli' daemon is up and running.`); - } else { - this.logger.info(`Assuming the 'arduino-cli' already runs in debug mode.`); - } - } catch (error) { - this.isReady.reject(error || new Error('failed to start arduino-cli')); - } - } - -} diff --git a/arduino-ide-extension/src/node/arduino-env-variables-server.ts b/arduino-ide-extension/src/node/arduino-env-variables-server.ts new file mode 100644 index 00000000..34f2a264 --- /dev/null +++ b/arduino-ide-extension/src/node/arduino-env-variables-server.ts @@ -0,0 +1,12 @@ +import { join } from 'path'; +import { homedir } from 'os'; +import { injectable } from 'inversify'; +import { EnvVariablesServerImpl } from '@theia/core/lib/node/env-variables/env-variables-server'; +import { FileUri } from '@theia/core/lib/node/file-uri'; + +@injectable() +export class ArduinoEnvVariablesServer extends EnvVariablesServerImpl { + + protected readonly configDirUri = FileUri.create(join(homedir(), '.arduinoProIDE')).toString(); + +} diff --git a/arduino-ide-extension/src/node/arduino-plugin-reader.ts b/arduino-ide-extension/src/node/arduino-plugin-reader.ts new file mode 100644 index 00000000..7a0f995d --- /dev/null +++ b/arduino-ide-extension/src/node/arduino-plugin-reader.ts @@ -0,0 +1,47 @@ +import { injectable, inject } from 'inversify'; +import { HostedPluginReader } from '@theia/plugin-ext/lib/hosted/node/plugin-reader'; +import { PluginPackage, PluginContribution } from '@theia/plugin-ext/lib/common/plugin-protocol'; +import { CLI_CONFIG } from './cli-config'; +import { ConfigServiceImpl } from './config-service-impl'; + +@injectable() +export class ArduinoHostedPluginReader extends HostedPluginReader { + + @inject(ConfigServiceImpl) + protected readonly configService: ConfigServiceImpl; + protected cliConfigSchemaUri: string; + + async onStart(): Promise { + this.cliConfigSchemaUri = await this.configService.getConfigurationFileSchemaUri(); + } + + readContribution(plugin: PluginPackage): PluginContribution | undefined { + const scanner = this.scanner.getScanner(plugin); + const contribution = scanner.getContribution(plugin); + if (!contribution) { + return contribution; + } + if (plugin.name === 'vscode-yaml' && plugin.publisher === 'redhat' && contribution.configuration) { + // Use the schema for the Arduino CLI. + const { configuration } = contribution; + for (const config of configuration) { + if (typeof config.properties['yaml.schemas'] === 'undefined') { + config.properties['yaml.schemas'] = {}; + } + config.properties['yaml.schemas'].default = { + [this.cliConfigSchemaUri]: [CLI_CONFIG] + }; + } + } else if (plugin.name === 'cpp' && plugin.publisher === 'vscode' && contribution.languages) { + // Do not associate `.ino` files with the VS Code built-in extension for C++. + // https://github.com/eclipse-theia/theia/issues/7533#issuecomment-611055328 + for (const language of contribution.languages) { + if (language.extensions) { + language.extensions = language.extensions.filter(ext => ext !== '.ino'); + } + } + } + return contribution; + } + +} diff --git a/arduino-ide-extension/src/node/boards-service-impl.ts b/arduino-ide-extension/src/node/boards-service-impl.ts index e668d13f..925ff293 100644 --- a/arduino-ide-extension/src/node/boards-service-impl.ts +++ b/arduino-ide-extension/src/node/boards-service-impl.ts @@ -1,4 +1,3 @@ -import * as PQueue from 'p-queue'; import { injectable, inject, postConstruct, named } from 'inversify'; import { ILogger } from '@theia/core/lib/common/logger'; import { Deferred } from '@theia/core/lib/common/promise-util'; @@ -42,64 +41,67 @@ export class BoardsServiceImpl implements BoardsService { protected availablePorts: { ports: Port[] } = { ports: [] }; protected started = new Deferred(); protected client: BoardsServiceClient | undefined; - protected readonly queue = new PQueue({ autoStart: true, concurrency: 1 }); @postConstruct() protected async init(): Promise { this.discoveryTimer = setInterval(() => { this.discoveryLogger.trace('Discovering attached boards and available ports...'); - this.doGetAttachedBoardsAndAvailablePorts().then(({ boards, ports }) => { - const update = (oldBoards: Board[], newBoards: Board[], oldPorts: Port[], newPorts: Port[], message: string) => { - this.attachedBoards = { boards: newBoards }; - this.availablePorts = { ports: newPorts }; - this.discoveryLogger.info(`${message} - Discovered boards: ${JSON.stringify(newBoards)} and available ports: ${JSON.stringify(newPorts)}`); - if (this.client) { - this.client.notifyAttachedBoardsChanged({ - oldState: { - boards: oldBoards, - ports: oldPorts - }, - newState: { - boards: newBoards, - ports: newPorts + this.doGetAttachedBoardsAndAvailablePorts() + .then(({ boards, ports }) => { + const update = (oldBoards: Board[], newBoards: Board[], oldPorts: Port[], newPorts: Port[], message: string) => { + this.attachedBoards = { boards: newBoards }; + this.availablePorts = { ports: newPorts }; + this.discoveryLogger.info(`${message} - Discovered boards: ${JSON.stringify(newBoards)} and available ports: ${JSON.stringify(newPorts)}`); + if (this.client) { + this.client.notifyAttachedBoardsChanged({ + oldState: { + boards: oldBoards, + ports: oldPorts + }, + newState: { + boards: newBoards, + ports: newPorts + } + }); + } + } + const sortedBoards = boards.sort(Board.compare); + const sortedPorts = ports.sort(Port.compare); + this.discoveryLogger.trace(`Discovery done. Boards: ${JSON.stringify(sortedBoards)}. Ports: ${sortedPorts}`); + if (!this.discoveryInitialized) { + update([], sortedBoards, [], sortedPorts, 'Initialized attached boards and available ports.'); + this.discoveryInitialized = true; + this.started.resolve(); + } else { + Promise.all([ + this.getAttachedBoards(), + this.getAvailablePorts() + ]).then(([{ boards: currentBoards }, { ports: currentPorts }]) => { + this.discoveryLogger.trace(`Updating discovered boards... ${JSON.stringify(currentBoards)}`); + if (currentBoards.length !== sortedBoards.length || currentPorts.length !== sortedPorts.length) { + update(currentBoards, sortedBoards, currentPorts, sortedPorts, 'Updated discovered boards and available ports.'); + return; } + // `currentBoards` is already sorted. + for (let i = 0; i < sortedBoards.length; i++) { + if (Board.compare(sortedBoards[i], currentBoards[i]) !== 0) { + update(currentBoards, sortedBoards, currentPorts, sortedPorts, 'Updated discovered boards.'); + return; + } + } + for (let i = 0; i < sortedPorts.length; i++) { + if (Port.compare(sortedPorts[i], currentPorts[i]) !== 0) { + update(currentBoards, sortedBoards, currentPorts, sortedPorts, 'Updated discovered boards.'); + return; + } + } + this.discoveryLogger.trace('No new boards were discovered.'); }); } - } - const sortedBoards = boards.sort(Board.compare); - const sortedPorts = ports.sort(Port.compare); - this.discoveryLogger.trace(`Discovery done. Boards: ${JSON.stringify(sortedBoards)}. Ports: ${sortedPorts}`); - if (!this.discoveryInitialized) { - update([], sortedBoards, [], sortedPorts, 'Initialized attached boards and available ports.'); - this.discoveryInitialized = true; - this.started.resolve(); - } else { - Promise.all([ - this.getAttachedBoards(), - this.getAvailablePorts() - ]).then(([{ boards: currentBoards }, { ports: currentPorts }]) => { - this.discoveryLogger.trace(`Updating discovered boards... ${JSON.stringify(currentBoards)}`); - if (currentBoards.length !== sortedBoards.length || currentPorts.length !== sortedPorts.length) { - update(currentBoards, sortedBoards, currentPorts, sortedPorts, 'Updated discovered boards and available ports.'); - return; - } - // `currentBoards` is already sorted. - for (let i = 0; i < sortedBoards.length; i++) { - if (Board.compare(sortedBoards[i], currentBoards[i]) !== 0) { - update(currentBoards, sortedBoards, currentPorts, sortedPorts, 'Updated discovered boards.'); - return; - } - } - for (let i = 0; i < sortedPorts.length; i++) { - if (Port.compare(sortedPorts[i], currentPorts[i]) !== 0) { - update(currentBoards, sortedBoards, currentPorts, sortedPorts, 'Updated discovered boards.'); - return; - } - } - this.discoveryLogger.trace('No new boards were discovered.'); - }); - } - }); + }) + .catch(error => { + this.logger.error('Unexpected error when polling boards and ports.', error); + }); }, 1000); } @@ -109,8 +111,6 @@ export class BoardsServiceImpl implements BoardsService { dispose(): void { this.logger.info('>>> Disposing boards service...'); - this.queue.pause(); - this.queue.clear(); if (this.discoveryTimer !== undefined) { clearInterval(this.discoveryTimer); } @@ -129,90 +129,98 @@ export class BoardsServiceImpl implements BoardsService { } private async doGetAttachedBoardsAndAvailablePorts(): Promise<{ boards: Board[], ports: Port[] }> { - return this.queue.add(() => { - return new Promise<{ boards: Board[], ports: Port[] }>(async resolve => { - const coreClient = await this.coreClientProvider.getClient(); - const boards: Board[] = []; - const ports: Port[] = []; - if (!coreClient) { - resolve({ boards, ports }); + const boards: Board[] = []; + const ports: Port[] = []; + + const coreClient = await this.coreClientProvider.client(); + if (!coreClient) { + return { boards, ports }; + } + + const { client, instance } = coreClient; + const req = new BoardListReq(); + req.setInstance(instance); + const resp = await new Promise(resolve => { + client.boardList(req, (err, resp) => { + if (err) { + this.logger.error(err); + resolve(undefined); return; } - - const { client, instance } = coreClient; - const req = new BoardListReq(); - req.setInstance(instance); - const resp = await new Promise((resolve, reject) => client.boardList(req, (err, resp) => (!!err ? reject : resolve)(!!err ? err : resp))); - const portsList = resp.getPortsList(); - // TODO: remove unknown board mocking! - // You also have to manually import `DetectedPort`. - // const unknownPortList = new DetectedPort(); - // unknownPortList.setAddress(platform() === 'win32' ? 'COM3' : platform() === 'darwin' ? '/dev/cu.usbmodem94401' : '/dev/ttyACM0'); - // unknownPortList.setProtocol('serial'); - // unknownPortList.setProtocolLabel('Serial Port (USB)'); - // portsList.push(unknownPortList); - - for (const portList of portsList) { - const protocol = Port.Protocol.toProtocol(portList.getProtocol()); - const address = portList.getAddress(); - // Available ports can exist with unknown attached boards. - // The `BoardListResp` looks like this for a known attached board: - // [ - // { - // "address": "COM10", - // "protocol": "serial", - // "protocol_label": "Serial Port (USB)", - // "boards": [ - // { - // "name": "Arduino MKR1000", - // "FQBN": "arduino:samd:mkr1000" - // } - // ] - // } - // ] - // And the `BoardListResp` looks like this for an unknown board: - // [ - // { - // "address": "COM9", - // "protocol": "serial", - // "protocol_label": "Serial Port (USB)", - // } - // ] - ports.push({ protocol, address }); - for (const board of portList.getBoardsList()) { - const name = board.getName() || 'unknown'; - const fqbn = board.getFqbn(); - const port = address; - if (protocol === 'serial') { - boards.push({ - name, - fqbn, - port - }); - } else if (protocol === 'network') { // We assume, it is a `network` board. - boards.push({ - name, - fqbn, - address, - port - }); - } else { - console.warn(`Unknown protocol for port: ${address}.`); - } - } - } - // TODO: remove mock board! - // boards.push(...[ - // { name: 'Arduino/Genuino Uno', fqbn: 'arduino:avr:uno', port: '/dev/cu.usbmodem14201' }, - // { name: 'Arduino/Genuino Uno', fqbn: 'arduino:avr:uno', port: '/dev/cu.usbmodem142xx' }, - // ]); - resolve({ boards, ports }); - }) + resolve(resp); + }); }); + if (!resp) { + return { boards, ports }; + } + const portsList = resp.getPortsList(); + // TODO: remove unknown board mocking! + // You also have to manually import `DetectedPort`. + // const unknownPortList = new DetectedPort(); + // unknownPortList.setAddress(platform() === 'win32' ? 'COM3' : platform() === 'darwin' ? '/dev/cu.usbmodem94401' : '/dev/ttyACM0'); + // unknownPortList.setProtocol('serial'); + // unknownPortList.setProtocolLabel('Serial Port (USB)'); + // portsList.push(unknownPortList); + + for (const portList of portsList) { + const protocol = Port.Protocol.toProtocol(portList.getProtocol()); + const address = portList.getAddress(); + // Available ports can exist with unknown attached boards. + // The `BoardListResp` looks like this for a known attached board: + // [ + // { + // "address": "COM10", + // "protocol": "serial", + // "protocol_label": "Serial Port (USB)", + // "boards": [ + // { + // "name": "Arduino MKR1000", + // "FQBN": "arduino:samd:mkr1000" + // } + // ] + // } + // ] + // And the `BoardListResp` looks like this for an unknown board: + // [ + // { + // "address": "COM9", + // "protocol": "serial", + // "protocol_label": "Serial Port (USB)", + // } + // ] + ports.push({ protocol, address }); + for (const board of portList.getBoardsList()) { + const name = board.getName() || 'unknown'; + const fqbn = board.getFqbn(); + const port = address; + if (protocol === 'serial') { + boards.push({ + name, + fqbn, + port + }); + } else if (protocol === 'network') { // We assume, it is a `network` board. + boards.push({ + name, + fqbn, + address, + port + }); + } else { + console.warn(`Unknown protocol for port: ${address}.`); + } + } + } + // TODO: remove mock board! + // boards.push(...[ + // { name: 'Arduino/Genuino Uno', fqbn: 'arduino:avr:uno', port: '/dev/cu.usbmodem14201' }, + // { name: 'Arduino/Genuino Uno', fqbn: 'arduino:avr:uno', port: '/dev/cu.usbmodem142xx' }, + // ]); + return { boards, ports }; } async detail(options: { id: string }): Promise<{ item?: BoardDetails }> { - const coreClient = await this.coreClientProvider.getClient(); + const coreClient = await this.coreClientProvider.client(); if (!coreClient) { return {}; } @@ -239,7 +247,7 @@ export class BoardsServiceImpl implements BoardsService { } async search(options: { query?: string }): Promise<{ items: BoardPackage[] }> { - const coreClient = await this.coreClientProvider.getClient(); + const coreClient = await this.coreClientProvider.client(); if (!coreClient) { return { items: [] }; } @@ -324,7 +332,7 @@ export class BoardsServiceImpl implements BoardsService { async install(options: { item: BoardPackage, version?: Installable.Version }): Promise { const pkg = options.item; const version = !!options.version ? options.version : pkg.availableVersions[0]; - const coreClient = await this.coreClientProvider.getClient(); + const coreClient = await this.coreClientProvider.client(); if (!coreClient) { return; } @@ -358,7 +366,7 @@ export class BoardsServiceImpl implements BoardsService { async uninstall(options: { item: BoardPackage }): Promise { const pkg = options.item; - const coreClient = await this.coreClientProvider.getClient(); + const coreClient = await this.coreClientProvider.client(); if (!coreClient) { return; } diff --git a/arduino-ide-extension/src/node/cli-config.ts b/arduino-ide-extension/src/node/cli-config.ts new file mode 100644 index 00000000..692871e7 --- /dev/null +++ b/arduino-ide-extension/src/node/cli-config.ts @@ -0,0 +1,122 @@ +import { join } from 'path'; +import { RecursivePartial } from '@theia/core/lib/common/types'; + +export const CLI_CONFIG = 'arduino-cli.yaml'; +export const CLI_CONFIG_SCHEMA = 'arduino-cli.schema.json'; +export const CLI_CONFIG_SCHEMA_PATH = join(__dirname, '..', '..', 'data', 'cli', 'schema', CLI_CONFIG_SCHEMA); + +export interface BoardManager { + readonly additional_urls: Array; +} +export namespace BoardManager { + export function sameAs(left: RecursivePartial | undefined, right: RecursivePartial | undefined): boolean { + const leftOrDefault = left || {}; + const rightOrDefault = right || {}; + const leftUrls = Array.from(new Set(leftOrDefault.additional_urls || [])); + const rightUrls = Array.from(new Set(rightOrDefault.additional_urls || [])); + if (leftUrls.length !== rightUrls.length) { + return false; + } + return leftUrls.every(url => rightUrls.indexOf(url) !== -1); + } +} + +export interface Daemon { + readonly port: string | number; +} +export namespace Daemon { + export function is(daemon: RecursivePartial | undefined): daemon is Daemon { + return !!daemon && !!daemon.port; + } + export function sameAs(left: RecursivePartial | undefined, right: RecursivePartial | undefined): boolean { + if (left === undefined) { + return right === undefined; + } + if (right === undefined) { + return left === undefined; + } + return String(left.port) === String(right.port); + } +} + +export interface Directories { + readonly data: string; + readonly downloads: string; + readonly user: string; +} +export namespace Directories { + export function is(directories: RecursivePartial | undefined): directories is Directories { + return !!directories + && !!directories.data + && !!directories.downloads + && !!directories.user; + } + export function sameAs(left: RecursivePartial | undefined, right: RecursivePartial | undefined): boolean { + if (left === undefined) { + return right === undefined; + } + if (right === undefined) { + return left === undefined; + } + return left.data === right.data + && left.downloads === right.downloads + && left.user === right.user; + } +} + +export interface Logging { + file: string; + format: Logging.Format; + level: Logging.Level; +} +export namespace Logging { + + export type Format = 'text' | 'json'; + export type Level = 'trace' | 'debug' | 'info' | 'warning' | 'error' | 'fatal' | 'panic'; + + export function sameAs(left: RecursivePartial | undefined, right: RecursivePartial | undefined): boolean { + if (left === undefined) { + return right === undefined; + } + if (right === undefined) { + return left === undefined; + } + if (left.file !== right.file) { + return false; + } + if (left.format !== right.format) { + return false; + } + if (left.level !== right.level) { + return false; + } + return true; + } + +} + +// Arduino CLI config scheme +export interface CliConfig { + board_manager?: RecursivePartial; + directories?: RecursivePartial; + logging?: RecursivePartial; +} + +// Bare minimum required CLI config. +export interface DefaultCliConfig extends CliConfig { + directories: Directories; + daemon: Daemon; +} +export namespace DefaultCliConfig { + export function is(config: RecursivePartial | undefined): config is DefaultCliConfig { + return !!config + && Directories.is(config.directories) + && Daemon.is(config.daemon); + } + export function sameAs(left: DefaultCliConfig, right: DefaultCliConfig): boolean { + return Directories.sameAs(left.directories, right.directories) + && Daemon.sameAs(left.daemon, right.daemon) + && BoardManager.sameAs(left.board_manager, right.board_manager) + && Logging.sameAs(left.logging, right.logging); + } +} diff --git a/arduino-ide-extension/src/node/cli-protocol/commands/board_grpc_pb.js b/arduino-ide-extension/src/node/cli-protocol/commands/board_grpc_pb.js deleted file mode 100644 index 97b3a246..00000000 --- a/arduino-ide-extension/src/node/cli-protocol/commands/board_grpc_pb.js +++ /dev/null @@ -1 +0,0 @@ -// GENERATED CODE -- NO SERVICES IN PROTO \ No newline at end of file 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 deleted file mode 100644 index 36ca1c93..00000000 --- a/arduino-ide-extension/src/node/cli-protocol/commands/board_pb.d.ts +++ /dev/null @@ -1,378 +0,0 @@ -// package: cc.arduino.cli.commands -// file: commands/board.proto - -/* tslint:disable */ -/* eslint-disable */ - -import * as jspb from "google-protobuf"; -import * as commands_common_pb from "../commands/common_pb"; - -export class BoardDetailsReq extends jspb.Message { - - hasInstance(): boolean; - clearInstance(): void; - getInstance(): commands_common_pb.Instance | undefined; - setInstance(value?: commands_common_pb.Instance): void; - - getFqbn(): string; - setFqbn(value: string): void; - - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): BoardDetailsReq.AsObject; - static toObject(includeInstance: boolean, msg: BoardDetailsReq): BoardDetailsReq.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: BoardDetailsReq, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): BoardDetailsReq; - static deserializeBinaryFromReader(message: BoardDetailsReq, reader: jspb.BinaryReader): BoardDetailsReq; -} - -export namespace BoardDetailsReq { - export type AsObject = { - instance?: commands_common_pb.Instance.AsObject, - fqbn: string, - } -} - -export class BoardDetailsResp extends jspb.Message { - getName(): string; - setName(value: string): void; - - clearConfigOptionsList(): void; - getConfigOptionsList(): Array; - setConfigOptionsList(value: Array): void; - addConfigOptions(value?: ConfigOption, index?: number): ConfigOption; - - clearRequiredToolsList(): void; - getRequiredToolsList(): Array; - setRequiredToolsList(value: Array): void; - addRequiredTools(value?: RequiredTool, index?: number): RequiredTool; - - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): BoardDetailsResp.AsObject; - static toObject(includeInstance: boolean, msg: BoardDetailsResp): BoardDetailsResp.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: BoardDetailsResp, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): BoardDetailsResp; - static deserializeBinaryFromReader(message: BoardDetailsResp, reader: jspb.BinaryReader): BoardDetailsResp; -} - -export namespace BoardDetailsResp { - export type AsObject = { - name: string, - configOptionsList: Array, - requiredToolsList: Array, - } -} - -export class ConfigOption extends jspb.Message { - getOption(): string; - setOption(value: string): void; - - getOptionLabel(): string; - setOptionLabel(value: string): void; - - clearValuesList(): void; - getValuesList(): Array; - setValuesList(value: Array): void; - addValues(value?: ConfigValue, index?: number): ConfigValue; - - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): ConfigOption.AsObject; - static toObject(includeInstance: boolean, msg: ConfigOption): ConfigOption.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: ConfigOption, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): ConfigOption; - static deserializeBinaryFromReader(message: ConfigOption, reader: jspb.BinaryReader): ConfigOption; -} - -export namespace ConfigOption { - export type AsObject = { - option: string, - optionLabel: string, - valuesList: Array, - } -} - -export class ConfigValue extends jspb.Message { - getValue(): string; - setValue(value: string): void; - - getValueLabel(): string; - setValueLabel(value: string): void; - - getSelected(): boolean; - setSelected(value: boolean): void; - - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): ConfigValue.AsObject; - static toObject(includeInstance: boolean, msg: ConfigValue): ConfigValue.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: ConfigValue, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): ConfigValue; - static deserializeBinaryFromReader(message: ConfigValue, reader: jspb.BinaryReader): ConfigValue; -} - -export namespace ConfigValue { - export type AsObject = { - value: string, - valueLabel: string, - selected: boolean, - } -} - -export class RequiredTool extends jspb.Message { - getName(): string; - setName(value: string): void; - - getVersion(): string; - setVersion(value: string): void; - - getPackager(): string; - setPackager(value: string): void; - - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): RequiredTool.AsObject; - static toObject(includeInstance: boolean, msg: RequiredTool): RequiredTool.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: RequiredTool, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): RequiredTool; - static deserializeBinaryFromReader(message: RequiredTool, reader: jspb.BinaryReader): RequiredTool; -} - -export namespace RequiredTool { - export type AsObject = { - name: string, - version: string, - packager: string, - } -} - -export class BoardAttachReq extends jspb.Message { - - hasInstance(): boolean; - clearInstance(): void; - getInstance(): commands_common_pb.Instance | undefined; - setInstance(value?: commands_common_pb.Instance): void; - - getBoardUri(): string; - setBoardUri(value: string): void; - - getSketchPath(): string; - setSketchPath(value: string): void; - - getSearchTimeout(): string; - setSearchTimeout(value: string): void; - - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): BoardAttachReq.AsObject; - static toObject(includeInstance: boolean, msg: BoardAttachReq): BoardAttachReq.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: BoardAttachReq, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): BoardAttachReq; - static deserializeBinaryFromReader(message: BoardAttachReq, reader: jspb.BinaryReader): BoardAttachReq; -} - -export namespace BoardAttachReq { - export type AsObject = { - instance?: commands_common_pb.Instance.AsObject, - boardUri: string, - sketchPath: string, - searchTimeout: string, - } -} - -export class BoardAttachResp extends jspb.Message { - - hasTaskProgress(): boolean; - clearTaskProgress(): void; - getTaskProgress(): commands_common_pb.TaskProgress | undefined; - setTaskProgress(value?: commands_common_pb.TaskProgress): void; - - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): BoardAttachResp.AsObject; - static toObject(includeInstance: boolean, msg: BoardAttachResp): BoardAttachResp.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: BoardAttachResp, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): BoardAttachResp; - static deserializeBinaryFromReader(message: BoardAttachResp, reader: jspb.BinaryReader): BoardAttachResp; -} - -export namespace BoardAttachResp { - export type AsObject = { - taskProgress?: commands_common_pb.TaskProgress.AsObject, - } -} - -export class BoardListReq extends jspb.Message { - - hasInstance(): boolean; - clearInstance(): void; - getInstance(): commands_common_pb.Instance | undefined; - setInstance(value?: commands_common_pb.Instance): void; - - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): BoardListReq.AsObject; - static toObject(includeInstance: boolean, msg: BoardListReq): BoardListReq.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: BoardListReq, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): BoardListReq; - static deserializeBinaryFromReader(message: BoardListReq, reader: jspb.BinaryReader): BoardListReq; -} - -export namespace BoardListReq { - export type AsObject = { - instance?: commands_common_pb.Instance.AsObject, - } -} - -export class BoardListResp extends jspb.Message { - clearPortsList(): void; - getPortsList(): Array; - setPortsList(value: Array): void; - addPorts(value?: DetectedPort, index?: number): DetectedPort; - - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): BoardListResp.AsObject; - static toObject(includeInstance: boolean, msg: BoardListResp): BoardListResp.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: BoardListResp, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): BoardListResp; - static deserializeBinaryFromReader(message: BoardListResp, reader: jspb.BinaryReader): BoardListResp; -} - -export namespace BoardListResp { - export type AsObject = { - portsList: Array, - } -} - -export class DetectedPort extends jspb.Message { - getAddress(): string; - setAddress(value: string): void; - - getProtocol(): string; - setProtocol(value: string): void; - - getProtocolLabel(): string; - setProtocolLabel(value: string): void; - - clearBoardsList(): void; - getBoardsList(): Array; - setBoardsList(value: Array): void; - addBoards(value?: BoardListItem, index?: number): BoardListItem; - - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): DetectedPort.AsObject; - static toObject(includeInstance: boolean, msg: DetectedPort): DetectedPort.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: DetectedPort, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): DetectedPort; - static deserializeBinaryFromReader(message: DetectedPort, reader: jspb.BinaryReader): DetectedPort; -} - -export namespace DetectedPort { - export type AsObject = { - address: string, - protocol: string, - protocolLabel: string, - boardsList: Array, - } -} - -export class BoardListAllReq extends jspb.Message { - - hasInstance(): boolean; - clearInstance(): void; - getInstance(): commands_common_pb.Instance | undefined; - setInstance(value?: commands_common_pb.Instance): void; - - clearSearchArgsList(): void; - getSearchArgsList(): Array; - setSearchArgsList(value: Array): void; - addSearchArgs(value: string, index?: number): string; - - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): BoardListAllReq.AsObject; - static toObject(includeInstance: boolean, msg: BoardListAllReq): BoardListAllReq.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: BoardListAllReq, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): BoardListAllReq; - static deserializeBinaryFromReader(message: BoardListAllReq, reader: jspb.BinaryReader): BoardListAllReq; -} - -export namespace BoardListAllReq { - export type AsObject = { - instance?: commands_common_pb.Instance.AsObject, - searchArgsList: Array, - } -} - -export class BoardListAllResp extends jspb.Message { - clearBoardsList(): void; - getBoardsList(): Array; - setBoardsList(value: Array): void; - addBoards(value?: BoardListItem, index?: number): BoardListItem; - - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): BoardListAllResp.AsObject; - static toObject(includeInstance: boolean, msg: BoardListAllResp): BoardListAllResp.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: BoardListAllResp, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): BoardListAllResp; - static deserializeBinaryFromReader(message: BoardListAllResp, reader: jspb.BinaryReader): BoardListAllResp; -} - -export namespace BoardListAllResp { - export type AsObject = { - boardsList: Array, - } -} - -export class BoardListItem extends jspb.Message { - getName(): string; - setName(value: string): void; - - getFqbn(): string; - setFqbn(value: string): void; - - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): BoardListItem.AsObject; - static toObject(includeInstance: boolean, msg: BoardListItem): BoardListItem.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: BoardListItem, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): BoardListItem; - static deserializeBinaryFromReader(message: BoardListItem, reader: jspb.BinaryReader): BoardListItem; -} - -export namespace BoardListItem { - export type AsObject = { - name: string, - fqbn: 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 deleted file mode 100644 index c88f9431..00000000 --- a/arduino-ide-extension/src/node/cli-protocol/commands/board_pb.js +++ /dev/null @@ -1,2591 +0,0 @@ -/** - * @fileoverview - * @enhanceable - * @suppress {messageConventions} JS Compiler reports an error if a variable or - * field starts with 'MSG_' and isn't a translatable message. - * @public - */ -// GENERATED CODE -- DO NOT EDIT! - -var jspb = require('google-protobuf'); -var goog = jspb; -var global = Function('return this')(); - -var commands_common_pb = require('../commands/common_pb.js'); -goog.object.extend(proto, commands_common_pb); -goog.exportSymbol('proto.cc.arduino.cli.commands.BoardAttachReq', null, global); -goog.exportSymbol('proto.cc.arduino.cli.commands.BoardAttachResp', null, global); -goog.exportSymbol('proto.cc.arduino.cli.commands.BoardDetailsReq', null, global); -goog.exportSymbol('proto.cc.arduino.cli.commands.BoardDetailsResp', null, global); -goog.exportSymbol('proto.cc.arduino.cli.commands.BoardListAllReq', null, global); -goog.exportSymbol('proto.cc.arduino.cli.commands.BoardListAllResp', null, global); -goog.exportSymbol('proto.cc.arduino.cli.commands.BoardListItem', null, global); -goog.exportSymbol('proto.cc.arduino.cli.commands.BoardListReq', null, global); -goog.exportSymbol('proto.cc.arduino.cli.commands.BoardListResp', null, global); -goog.exportSymbol('proto.cc.arduino.cli.commands.ConfigOption', null, global); -goog.exportSymbol('proto.cc.arduino.cli.commands.ConfigValue', null, global); -goog.exportSymbol('proto.cc.arduino.cli.commands.DetectedPort', null, global); -goog.exportSymbol('proto.cc.arduino.cli.commands.RequiredTool', null, global); - -/** - * 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.BoardDetailsReq = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.cc.arduino.cli.commands.BoardDetailsReq, jspb.Message); -if (goog.DEBUG && !COMPILED) { - proto.cc.arduino.cli.commands.BoardDetailsReq.displayName = 'proto.cc.arduino.cli.commands.BoardDetailsReq'; -} - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto suitable for use in Soy templates. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration - * @return {!Object} - */ -proto.cc.arduino.cli.commands.BoardDetailsReq.prototype.toObject = function(opt_includeInstance) { - return proto.cc.arduino.cli.commands.BoardDetailsReq.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.cc.arduino.cli.commands.BoardDetailsReq} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.cc.arduino.cli.commands.BoardDetailsReq.toObject = function(includeInstance, msg) { - var f, obj = { - instance: (f = msg.getInstance()) && commands_common_pb.Instance.toObject(includeInstance, f), - fqbn: jspb.Message.getFieldWithDefault(msg, 2, "") - }; - - 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.BoardDetailsReq} - */ -proto.cc.arduino.cli.commands.BoardDetailsReq.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.cc.arduino.cli.commands.BoardDetailsReq; - return proto.cc.arduino.cli.commands.BoardDetailsReq.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.BoardDetailsReq} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.cc.arduino.cli.commands.BoardDetailsReq} - */ -proto.cc.arduino.cli.commands.BoardDetailsReq.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; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.cc.arduino.cli.commands.BoardDetailsReq.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.cc.arduino.cli.commands.BoardDetailsReq.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.BoardDetailsReq} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.cc.arduino.cli.commands.BoardDetailsReq.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 - ); - } -}; - - -/** - * optional Instance instance = 1; - * @return {?proto.cc.arduino.cli.commands.Instance} - */ -proto.cc.arduino.cli.commands.BoardDetailsReq.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 */ -proto.cc.arduino.cli.commands.BoardDetailsReq.prototype.setInstance = function(value) { - jspb.Message.setWrapperField(this, 1, value); -}; - - -proto.cc.arduino.cli.commands.BoardDetailsReq.prototype.clearInstance = function() { - this.setInstance(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.cc.arduino.cli.commands.BoardDetailsReq.prototype.hasInstance = function() { - return jspb.Message.getField(this, 1) != null; -}; - - -/** - * optional string fqbn = 2; - * @return {string} - */ -proto.cc.arduino.cli.commands.BoardDetailsReq.prototype.getFqbn = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); -}; - - -/** @param {string} value */ -proto.cc.arduino.cli.commands.BoardDetailsReq.prototype.setFqbn = function(value) { - jspb.Message.setProto3StringField(this, 2, value); -}; - - - -/** - * 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.BoardDetailsResp = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.cc.arduino.cli.commands.BoardDetailsResp.repeatedFields_, null); -}; -goog.inherits(proto.cc.arduino.cli.commands.BoardDetailsResp, jspb.Message); -if (goog.DEBUG && !COMPILED) { - proto.cc.arduino.cli.commands.BoardDetailsResp.displayName = 'proto.cc.arduino.cli.commands.BoardDetailsResp'; -} -/** - * List of repeated fields within this message type. - * @private {!Array} - * @const - */ -proto.cc.arduino.cli.commands.BoardDetailsResp.repeatedFields_ = [3,4]; - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto suitable for use in Soy templates. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration - * @return {!Object} - */ -proto.cc.arduino.cli.commands.BoardDetailsResp.prototype.toObject = function(opt_includeInstance) { - return proto.cc.arduino.cli.commands.BoardDetailsResp.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.cc.arduino.cli.commands.BoardDetailsResp} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.cc.arduino.cli.commands.BoardDetailsResp.toObject = function(includeInstance, msg) { - var f, obj = { - name: jspb.Message.getFieldWithDefault(msg, 2, ""), - configOptionsList: jspb.Message.toObjectList(msg.getConfigOptionsList(), - proto.cc.arduino.cli.commands.ConfigOption.toObject, includeInstance), - requiredToolsList: jspb.Message.toObjectList(msg.getRequiredToolsList(), - proto.cc.arduino.cli.commands.RequiredTool.toObject, includeInstance) - }; - - 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.BoardDetailsResp} - */ -proto.cc.arduino.cli.commands.BoardDetailsResp.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.cc.arduino.cli.commands.BoardDetailsResp; - return proto.cc.arduino.cli.commands.BoardDetailsResp.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.BoardDetailsResp} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.cc.arduino.cli.commands.BoardDetailsResp} - */ -proto.cc.arduino.cli.commands.BoardDetailsResp.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 2: - var value = /** @type {string} */ (reader.readString()); - msg.setName(value); - break; - case 3: - var value = new proto.cc.arduino.cli.commands.ConfigOption; - reader.readMessage(value,proto.cc.arduino.cli.commands.ConfigOption.deserializeBinaryFromReader); - msg.addConfigOptions(value); - break; - case 4: - var value = new proto.cc.arduino.cli.commands.RequiredTool; - reader.readMessage(value,proto.cc.arduino.cli.commands.RequiredTool.deserializeBinaryFromReader); - msg.addRequiredTools(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.BoardDetailsResp.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.cc.arduino.cli.commands.BoardDetailsResp.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.BoardDetailsResp} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.cc.arduino.cli.commands.BoardDetailsResp.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getName(); - if (f.length > 0) { - writer.writeString( - 2, - f - ); - } - f = message.getConfigOptionsList(); - if (f.length > 0) { - writer.writeRepeatedMessage( - 3, - f, - proto.cc.arduino.cli.commands.ConfigOption.serializeBinaryToWriter - ); - } - f = message.getRequiredToolsList(); - if (f.length > 0) { - writer.writeRepeatedMessage( - 4, - f, - proto.cc.arduino.cli.commands.RequiredTool.serializeBinaryToWriter - ); - } -}; - - -/** - * optional string name = 2; - * @return {string} - */ -proto.cc.arduino.cli.commands.BoardDetailsResp.prototype.getName = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); -}; - - -/** @param {string} value */ -proto.cc.arduino.cli.commands.BoardDetailsResp.prototype.setName = function(value) { - jspb.Message.setProto3StringField(this, 2, value); -}; - - -/** - * repeated ConfigOption config_options = 3; - * @return {!Array} - */ -proto.cc.arduino.cli.commands.BoardDetailsResp.prototype.getConfigOptionsList = function() { - return /** @type{!Array} */ ( - jspb.Message.getRepeatedWrapperField(this, proto.cc.arduino.cli.commands.ConfigOption, 3)); -}; - - -/** @param {!Array} value */ -proto.cc.arduino.cli.commands.BoardDetailsResp.prototype.setConfigOptionsList = function(value) { - jspb.Message.setRepeatedWrapperField(this, 3, value); -}; - - -/** - * @param {!proto.cc.arduino.cli.commands.ConfigOption=} opt_value - * @param {number=} opt_index - * @return {!proto.cc.arduino.cli.commands.ConfigOption} - */ -proto.cc.arduino.cli.commands.BoardDetailsResp.prototype.addConfigOptions = function(opt_value, opt_index) { - return jspb.Message.addToRepeatedWrapperField(this, 3, opt_value, proto.cc.arduino.cli.commands.ConfigOption, opt_index); -}; - - -proto.cc.arduino.cli.commands.BoardDetailsResp.prototype.clearConfigOptionsList = function() { - this.setConfigOptionsList([]); -}; - - -/** - * repeated RequiredTool required_tools = 4; - * @return {!Array} - */ -proto.cc.arduino.cli.commands.BoardDetailsResp.prototype.getRequiredToolsList = function() { - return /** @type{!Array} */ ( - jspb.Message.getRepeatedWrapperField(this, proto.cc.arduino.cli.commands.RequiredTool, 4)); -}; - - -/** @param {!Array} value */ -proto.cc.arduino.cli.commands.BoardDetailsResp.prototype.setRequiredToolsList = function(value) { - jspb.Message.setRepeatedWrapperField(this, 4, value); -}; - - -/** - * @param {!proto.cc.arduino.cli.commands.RequiredTool=} opt_value - * @param {number=} opt_index - * @return {!proto.cc.arduino.cli.commands.RequiredTool} - */ -proto.cc.arduino.cli.commands.BoardDetailsResp.prototype.addRequiredTools = function(opt_value, opt_index) { - return jspb.Message.addToRepeatedWrapperField(this, 4, opt_value, proto.cc.arduino.cli.commands.RequiredTool, opt_index); -}; - - -proto.cc.arduino.cli.commands.BoardDetailsResp.prototype.clearRequiredToolsList = function() { - this.setRequiredToolsList([]); -}; - - - -/** - * 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.ConfigOption = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.cc.arduino.cli.commands.ConfigOption.repeatedFields_, null); -}; -goog.inherits(proto.cc.arduino.cli.commands.ConfigOption, jspb.Message); -if (goog.DEBUG && !COMPILED) { - proto.cc.arduino.cli.commands.ConfigOption.displayName = 'proto.cc.arduino.cli.commands.ConfigOption'; -} -/** - * List of repeated fields within this message type. - * @private {!Array} - * @const - */ -proto.cc.arduino.cli.commands.ConfigOption.repeatedFields_ = [3]; - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto suitable for use in Soy templates. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration - * @return {!Object} - */ -proto.cc.arduino.cli.commands.ConfigOption.prototype.toObject = function(opt_includeInstance) { - return proto.cc.arduino.cli.commands.ConfigOption.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.cc.arduino.cli.commands.ConfigOption} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.cc.arduino.cli.commands.ConfigOption.toObject = function(includeInstance, msg) { - var f, obj = { - option: jspb.Message.getFieldWithDefault(msg, 1, ""), - optionLabel: jspb.Message.getFieldWithDefault(msg, 2, ""), - valuesList: jspb.Message.toObjectList(msg.getValuesList(), - proto.cc.arduino.cli.commands.ConfigValue.toObject, includeInstance) - }; - - 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.ConfigOption} - */ -proto.cc.arduino.cli.commands.ConfigOption.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.cc.arduino.cli.commands.ConfigOption; - return proto.cc.arduino.cli.commands.ConfigOption.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.ConfigOption} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.cc.arduino.cli.commands.ConfigOption} - */ -proto.cc.arduino.cli.commands.ConfigOption.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.setOption(value); - break; - case 2: - var value = /** @type {string} */ (reader.readString()); - msg.setOptionLabel(value); - break; - case 3: - var value = new proto.cc.arduino.cli.commands.ConfigValue; - reader.readMessage(value,proto.cc.arduino.cli.commands.ConfigValue.deserializeBinaryFromReader); - msg.addValues(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.ConfigOption.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.cc.arduino.cli.commands.ConfigOption.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.ConfigOption} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.cc.arduino.cli.commands.ConfigOption.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getOption(); - if (f.length > 0) { - writer.writeString( - 1, - f - ); - } - f = message.getOptionLabel(); - if (f.length > 0) { - writer.writeString( - 2, - f - ); - } - f = message.getValuesList(); - if (f.length > 0) { - writer.writeRepeatedMessage( - 3, - f, - proto.cc.arduino.cli.commands.ConfigValue.serializeBinaryToWriter - ); - } -}; - - -/** - * optional string option = 1; - * @return {string} - */ -proto.cc.arduino.cli.commands.ConfigOption.prototype.getOption = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** @param {string} value */ -proto.cc.arduino.cli.commands.ConfigOption.prototype.setOption = function(value) { - jspb.Message.setProto3StringField(this, 1, value); -}; - - -/** - * optional string option_label = 2; - * @return {string} - */ -proto.cc.arduino.cli.commands.ConfigOption.prototype.getOptionLabel = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); -}; - - -/** @param {string} value */ -proto.cc.arduino.cli.commands.ConfigOption.prototype.setOptionLabel = function(value) { - jspb.Message.setProto3StringField(this, 2, value); -}; - - -/** - * repeated ConfigValue values = 3; - * @return {!Array} - */ -proto.cc.arduino.cli.commands.ConfigOption.prototype.getValuesList = function() { - return /** @type{!Array} */ ( - jspb.Message.getRepeatedWrapperField(this, proto.cc.arduino.cli.commands.ConfigValue, 3)); -}; - - -/** @param {!Array} value */ -proto.cc.arduino.cli.commands.ConfigOption.prototype.setValuesList = function(value) { - jspb.Message.setRepeatedWrapperField(this, 3, value); -}; - - -/** - * @param {!proto.cc.arduino.cli.commands.ConfigValue=} opt_value - * @param {number=} opt_index - * @return {!proto.cc.arduino.cli.commands.ConfigValue} - */ -proto.cc.arduino.cli.commands.ConfigOption.prototype.addValues = function(opt_value, opt_index) { - return jspb.Message.addToRepeatedWrapperField(this, 3, opt_value, proto.cc.arduino.cli.commands.ConfigValue, opt_index); -}; - - -proto.cc.arduino.cli.commands.ConfigOption.prototype.clearValuesList = function() { - this.setValuesList([]); -}; - - - -/** - * 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.ConfigValue = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.cc.arduino.cli.commands.ConfigValue, jspb.Message); -if (goog.DEBUG && !COMPILED) { - proto.cc.arduino.cli.commands.ConfigValue.displayName = 'proto.cc.arduino.cli.commands.ConfigValue'; -} - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto suitable for use in Soy templates. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration - * @return {!Object} - */ -proto.cc.arduino.cli.commands.ConfigValue.prototype.toObject = function(opt_includeInstance) { - return proto.cc.arduino.cli.commands.ConfigValue.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.cc.arduino.cli.commands.ConfigValue} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.cc.arduino.cli.commands.ConfigValue.toObject = function(includeInstance, msg) { - var f, obj = { - value: jspb.Message.getFieldWithDefault(msg, 1, ""), - valueLabel: jspb.Message.getFieldWithDefault(msg, 2, ""), - selected: jspb.Message.getFieldWithDefault(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.ConfigValue} - */ -proto.cc.arduino.cli.commands.ConfigValue.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.cc.arduino.cli.commands.ConfigValue; - return proto.cc.arduino.cli.commands.ConfigValue.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.ConfigValue} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.cc.arduino.cli.commands.ConfigValue} - */ -proto.cc.arduino.cli.commands.ConfigValue.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.setValue(value); - break; - case 2: - var value = /** @type {string} */ (reader.readString()); - msg.setValueLabel(value); - break; - case 3: - var value = /** @type {boolean} */ (reader.readBool()); - msg.setSelected(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.ConfigValue.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.cc.arduino.cli.commands.ConfigValue.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.ConfigValue} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.cc.arduino.cli.commands.ConfigValue.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getValue(); - if (f.length > 0) { - writer.writeString( - 1, - f - ); - } - f = message.getValueLabel(); - if (f.length > 0) { - writer.writeString( - 2, - f - ); - } - f = message.getSelected(); - if (f) { - writer.writeBool( - 3, - f - ); - } -}; - - -/** - * optional string value = 1; - * @return {string} - */ -proto.cc.arduino.cli.commands.ConfigValue.prototype.getValue = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** @param {string} value */ -proto.cc.arduino.cli.commands.ConfigValue.prototype.setValue = function(value) { - jspb.Message.setProto3StringField(this, 1, value); -}; - - -/** - * optional string value_label = 2; - * @return {string} - */ -proto.cc.arduino.cli.commands.ConfigValue.prototype.getValueLabel = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); -}; - - -/** @param {string} value */ -proto.cc.arduino.cli.commands.ConfigValue.prototype.setValueLabel = function(value) { - jspb.Message.setProto3StringField(this, 2, value); -}; - - -/** - * optional bool selected = 3; - * Note that Boolean fields may be set to 0/1 when serialized from a Java server. - * You should avoid comparisons like {@code val === true/false} in those cases. - * @return {boolean} - */ -proto.cc.arduino.cli.commands.ConfigValue.prototype.getSelected = function() { - return /** @type {boolean} */ (jspb.Message.getFieldWithDefault(this, 3, false)); -}; - - -/** @param {boolean} value */ -proto.cc.arduino.cli.commands.ConfigValue.prototype.setSelected = function(value) { - jspb.Message.setProto3BooleanField(this, 3, value); -}; - - - -/** - * 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.RequiredTool = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.cc.arduino.cli.commands.RequiredTool, jspb.Message); -if (goog.DEBUG && !COMPILED) { - proto.cc.arduino.cli.commands.RequiredTool.displayName = 'proto.cc.arduino.cli.commands.RequiredTool'; -} - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto suitable for use in Soy templates. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration - * @return {!Object} - */ -proto.cc.arduino.cli.commands.RequiredTool.prototype.toObject = function(opt_includeInstance) { - return proto.cc.arduino.cli.commands.RequiredTool.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.cc.arduino.cli.commands.RequiredTool} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.cc.arduino.cli.commands.RequiredTool.toObject = function(includeInstance, msg) { - var f, obj = { - name: jspb.Message.getFieldWithDefault(msg, 1, ""), - version: jspb.Message.getFieldWithDefault(msg, 2, ""), - packager: jspb.Message.getFieldWithDefault(msg, 3, "") - }; - - 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.RequiredTool} - */ -proto.cc.arduino.cli.commands.RequiredTool.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.cc.arduino.cli.commands.RequiredTool; - return proto.cc.arduino.cli.commands.RequiredTool.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.RequiredTool} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.cc.arduino.cli.commands.RequiredTool} - */ -proto.cc.arduino.cli.commands.RequiredTool.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 {string} */ (reader.readString()); - msg.setVersion(value); - break; - case 3: - var value = /** @type {string} */ (reader.readString()); - msg.setPackager(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.RequiredTool.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.cc.arduino.cli.commands.RequiredTool.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.RequiredTool} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.cc.arduino.cli.commands.RequiredTool.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getName(); - if (f.length > 0) { - writer.writeString( - 1, - f - ); - } - f = message.getVersion(); - if (f.length > 0) { - writer.writeString( - 2, - f - ); - } - f = message.getPackager(); - if (f.length > 0) { - writer.writeString( - 3, - f - ); - } -}; - - -/** - * optional string name = 1; - * @return {string} - */ -proto.cc.arduino.cli.commands.RequiredTool.prototype.getName = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** @param {string} value */ -proto.cc.arduino.cli.commands.RequiredTool.prototype.setName = function(value) { - jspb.Message.setProto3StringField(this, 1, value); -}; - - -/** - * optional string version = 2; - * @return {string} - */ -proto.cc.arduino.cli.commands.RequiredTool.prototype.getVersion = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); -}; - - -/** @param {string} value */ -proto.cc.arduino.cli.commands.RequiredTool.prototype.setVersion = function(value) { - jspb.Message.setProto3StringField(this, 2, value); -}; - - -/** - * optional string packager = 3; - * @return {string} - */ -proto.cc.arduino.cli.commands.RequiredTool.prototype.getPackager = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); -}; - - -/** @param {string} value */ -proto.cc.arduino.cli.commands.RequiredTool.prototype.setPackager = function(value) { - jspb.Message.setProto3StringField(this, 3, value); -}; - - - -/** - * 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.BoardAttachReq = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.cc.arduino.cli.commands.BoardAttachReq, jspb.Message); -if (goog.DEBUG && !COMPILED) { - proto.cc.arduino.cli.commands.BoardAttachReq.displayName = 'proto.cc.arduino.cli.commands.BoardAttachReq'; -} - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto suitable for use in Soy templates. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration - * @return {!Object} - */ -proto.cc.arduino.cli.commands.BoardAttachReq.prototype.toObject = function(opt_includeInstance) { - return proto.cc.arduino.cli.commands.BoardAttachReq.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.cc.arduino.cli.commands.BoardAttachReq} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.cc.arduino.cli.commands.BoardAttachReq.toObject = function(includeInstance, msg) { - var f, obj = { - instance: (f = msg.getInstance()) && commands_common_pb.Instance.toObject(includeInstance, f), - boardUri: jspb.Message.getFieldWithDefault(msg, 2, ""), - sketchPath: jspb.Message.getFieldWithDefault(msg, 3, ""), - searchTimeout: jspb.Message.getFieldWithDefault(msg, 4, "") - }; - - 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.BoardAttachReq} - */ -proto.cc.arduino.cli.commands.BoardAttachReq.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.cc.arduino.cli.commands.BoardAttachReq; - return proto.cc.arduino.cli.commands.BoardAttachReq.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.BoardAttachReq} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.cc.arduino.cli.commands.BoardAttachReq} - */ -proto.cc.arduino.cli.commands.BoardAttachReq.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.setBoardUri(value); - break; - case 3: - var value = /** @type {string} */ (reader.readString()); - msg.setSketchPath(value); - break; - case 4: - var value = /** @type {string} */ (reader.readString()); - msg.setSearchTimeout(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.BoardAttachReq.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.cc.arduino.cli.commands.BoardAttachReq.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.BoardAttachReq} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.cc.arduino.cli.commands.BoardAttachReq.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getInstance(); - if (f != null) { - writer.writeMessage( - 1, - f, - commands_common_pb.Instance.serializeBinaryToWriter - ); - } - f = message.getBoardUri(); - if (f.length > 0) { - writer.writeString( - 2, - f - ); - } - f = message.getSketchPath(); - if (f.length > 0) { - writer.writeString( - 3, - f - ); - } - f = message.getSearchTimeout(); - if (f.length > 0) { - writer.writeString( - 4, - f - ); - } -}; - - -/** - * optional Instance instance = 1; - * @return {?proto.cc.arduino.cli.commands.Instance} - */ -proto.cc.arduino.cli.commands.BoardAttachReq.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 */ -proto.cc.arduino.cli.commands.BoardAttachReq.prototype.setInstance = function(value) { - jspb.Message.setWrapperField(this, 1, value); -}; - - -proto.cc.arduino.cli.commands.BoardAttachReq.prototype.clearInstance = function() { - this.setInstance(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.cc.arduino.cli.commands.BoardAttachReq.prototype.hasInstance = function() { - return jspb.Message.getField(this, 1) != null; -}; - - -/** - * optional string board_uri = 2; - * @return {string} - */ -proto.cc.arduino.cli.commands.BoardAttachReq.prototype.getBoardUri = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); -}; - - -/** @param {string} value */ -proto.cc.arduino.cli.commands.BoardAttachReq.prototype.setBoardUri = function(value) { - jspb.Message.setProto3StringField(this, 2, value); -}; - - -/** - * optional string sketch_path = 3; - * @return {string} - */ -proto.cc.arduino.cli.commands.BoardAttachReq.prototype.getSketchPath = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); -}; - - -/** @param {string} value */ -proto.cc.arduino.cli.commands.BoardAttachReq.prototype.setSketchPath = function(value) { - jspb.Message.setProto3StringField(this, 3, value); -}; - - -/** - * optional string search_timeout = 4; - * @return {string} - */ -proto.cc.arduino.cli.commands.BoardAttachReq.prototype.getSearchTimeout = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "")); -}; - - -/** @param {string} value */ -proto.cc.arduino.cli.commands.BoardAttachReq.prototype.setSearchTimeout = function(value) { - jspb.Message.setProto3StringField(this, 4, value); -}; - - - -/** - * 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.BoardAttachResp = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.cc.arduino.cli.commands.BoardAttachResp, jspb.Message); -if (goog.DEBUG && !COMPILED) { - proto.cc.arduino.cli.commands.BoardAttachResp.displayName = 'proto.cc.arduino.cli.commands.BoardAttachResp'; -} - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto suitable for use in Soy templates. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration - * @return {!Object} - */ -proto.cc.arduino.cli.commands.BoardAttachResp.prototype.toObject = function(opt_includeInstance) { - return proto.cc.arduino.cli.commands.BoardAttachResp.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.cc.arduino.cli.commands.BoardAttachResp} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.cc.arduino.cli.commands.BoardAttachResp.toObject = function(includeInstance, msg) { - var f, obj = { - taskProgress: (f = msg.getTaskProgress()) && commands_common_pb.TaskProgress.toObject(includeInstance, f) - }; - - 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.BoardAttachResp} - */ -proto.cc.arduino.cli.commands.BoardAttachResp.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.cc.arduino.cli.commands.BoardAttachResp; - return proto.cc.arduino.cli.commands.BoardAttachResp.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.BoardAttachResp} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.cc.arduino.cli.commands.BoardAttachResp} - */ -proto.cc.arduino.cli.commands.BoardAttachResp.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.TaskProgress; - reader.readMessage(value,commands_common_pb.TaskProgress.deserializeBinaryFromReader); - msg.setTaskProgress(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.BoardAttachResp.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.cc.arduino.cli.commands.BoardAttachResp.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.BoardAttachResp} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.cc.arduino.cli.commands.BoardAttachResp.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getTaskProgress(); - if (f != null) { - writer.writeMessage( - 1, - f, - commands_common_pb.TaskProgress.serializeBinaryToWriter - ); - } -}; - - -/** - * optional TaskProgress task_progress = 1; - * @return {?proto.cc.arduino.cli.commands.TaskProgress} - */ -proto.cc.arduino.cli.commands.BoardAttachResp.prototype.getTaskProgress = function() { - return /** @type{?proto.cc.arduino.cli.commands.TaskProgress} */ ( - jspb.Message.getWrapperField(this, commands_common_pb.TaskProgress, 1)); -}; - - -/** @param {?proto.cc.arduino.cli.commands.TaskProgress|undefined} value */ -proto.cc.arduino.cli.commands.BoardAttachResp.prototype.setTaskProgress = function(value) { - jspb.Message.setWrapperField(this, 1, value); -}; - - -proto.cc.arduino.cli.commands.BoardAttachResp.prototype.clearTaskProgress = function() { - this.setTaskProgress(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.cc.arduino.cli.commands.BoardAttachResp.prototype.hasTaskProgress = function() { - return jspb.Message.getField(this, 1) != null; -}; - - - -/** - * 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.BoardListReq = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.cc.arduino.cli.commands.BoardListReq, jspb.Message); -if (goog.DEBUG && !COMPILED) { - proto.cc.arduino.cli.commands.BoardListReq.displayName = 'proto.cc.arduino.cli.commands.BoardListReq'; -} - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto suitable for use in Soy templates. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration - * @return {!Object} - */ -proto.cc.arduino.cli.commands.BoardListReq.prototype.toObject = function(opt_includeInstance) { - return proto.cc.arduino.cli.commands.BoardListReq.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.cc.arduino.cli.commands.BoardListReq} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.cc.arduino.cli.commands.BoardListReq.toObject = function(includeInstance, msg) { - var f, obj = { - instance: (f = msg.getInstance()) && commands_common_pb.Instance.toObject(includeInstance, f) - }; - - 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.BoardListReq} - */ -proto.cc.arduino.cli.commands.BoardListReq.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.cc.arduino.cli.commands.BoardListReq; - return proto.cc.arduino.cli.commands.BoardListReq.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.BoardListReq} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.cc.arduino.cli.commands.BoardListReq} - */ -proto.cc.arduino.cli.commands.BoardListReq.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; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.cc.arduino.cli.commands.BoardListReq.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.cc.arduino.cli.commands.BoardListReq.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.BoardListReq} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.cc.arduino.cli.commands.BoardListReq.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getInstance(); - if (f != null) { - writer.writeMessage( - 1, - f, - commands_common_pb.Instance.serializeBinaryToWriter - ); - } -}; - - -/** - * optional Instance instance = 1; - * @return {?proto.cc.arduino.cli.commands.Instance} - */ -proto.cc.arduino.cli.commands.BoardListReq.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 */ -proto.cc.arduino.cli.commands.BoardListReq.prototype.setInstance = function(value) { - jspb.Message.setWrapperField(this, 1, value); -}; - - -proto.cc.arduino.cli.commands.BoardListReq.prototype.clearInstance = function() { - this.setInstance(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.cc.arduino.cli.commands.BoardListReq.prototype.hasInstance = function() { - return jspb.Message.getField(this, 1) != null; -}; - - - -/** - * 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.BoardListResp = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.cc.arduino.cli.commands.BoardListResp.repeatedFields_, null); -}; -goog.inherits(proto.cc.arduino.cli.commands.BoardListResp, jspb.Message); -if (goog.DEBUG && !COMPILED) { - proto.cc.arduino.cli.commands.BoardListResp.displayName = 'proto.cc.arduino.cli.commands.BoardListResp'; -} -/** - * List of repeated fields within this message type. - * @private {!Array} - * @const - */ -proto.cc.arduino.cli.commands.BoardListResp.repeatedFields_ = [1]; - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto suitable for use in Soy templates. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration - * @return {!Object} - */ -proto.cc.arduino.cli.commands.BoardListResp.prototype.toObject = function(opt_includeInstance) { - return proto.cc.arduino.cli.commands.BoardListResp.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.cc.arduino.cli.commands.BoardListResp} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.cc.arduino.cli.commands.BoardListResp.toObject = function(includeInstance, msg) { - var f, obj = { - portsList: jspb.Message.toObjectList(msg.getPortsList(), - proto.cc.arduino.cli.commands.DetectedPort.toObject, includeInstance) - }; - - 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.BoardListResp} - */ -proto.cc.arduino.cli.commands.BoardListResp.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.cc.arduino.cli.commands.BoardListResp; - return proto.cc.arduino.cli.commands.BoardListResp.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.BoardListResp} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.cc.arduino.cli.commands.BoardListResp} - */ -proto.cc.arduino.cli.commands.BoardListResp.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = new proto.cc.arduino.cli.commands.DetectedPort; - reader.readMessage(value,proto.cc.arduino.cli.commands.DetectedPort.deserializeBinaryFromReader); - msg.addPorts(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.BoardListResp.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.cc.arduino.cli.commands.BoardListResp.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.BoardListResp} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.cc.arduino.cli.commands.BoardListResp.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getPortsList(); - if (f.length > 0) { - writer.writeRepeatedMessage( - 1, - f, - proto.cc.arduino.cli.commands.DetectedPort.serializeBinaryToWriter - ); - } -}; - - -/** - * repeated DetectedPort ports = 1; - * @return {!Array} - */ -proto.cc.arduino.cli.commands.BoardListResp.prototype.getPortsList = function() { - return /** @type{!Array} */ ( - jspb.Message.getRepeatedWrapperField(this, proto.cc.arduino.cli.commands.DetectedPort, 1)); -}; - - -/** @param {!Array} value */ -proto.cc.arduino.cli.commands.BoardListResp.prototype.setPortsList = function(value) { - jspb.Message.setRepeatedWrapperField(this, 1, value); -}; - - -/** - * @param {!proto.cc.arduino.cli.commands.DetectedPort=} opt_value - * @param {number=} opt_index - * @return {!proto.cc.arduino.cli.commands.DetectedPort} - */ -proto.cc.arduino.cli.commands.BoardListResp.prototype.addPorts = function(opt_value, opt_index) { - return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.cc.arduino.cli.commands.DetectedPort, opt_index); -}; - - -proto.cc.arduino.cli.commands.BoardListResp.prototype.clearPortsList = function() { - this.setPortsList([]); -}; - - - -/** - * 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.DetectedPort = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.cc.arduino.cli.commands.DetectedPort.repeatedFields_, null); -}; -goog.inherits(proto.cc.arduino.cli.commands.DetectedPort, jspb.Message); -if (goog.DEBUG && !COMPILED) { - proto.cc.arduino.cli.commands.DetectedPort.displayName = 'proto.cc.arduino.cli.commands.DetectedPort'; -} -/** - * List of repeated fields within this message type. - * @private {!Array} - * @const - */ -proto.cc.arduino.cli.commands.DetectedPort.repeatedFields_ = [4]; - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto suitable for use in Soy templates. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration - * @return {!Object} - */ -proto.cc.arduino.cli.commands.DetectedPort.prototype.toObject = function(opt_includeInstance) { - return proto.cc.arduino.cli.commands.DetectedPort.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.cc.arduino.cli.commands.DetectedPort} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.cc.arduino.cli.commands.DetectedPort.toObject = function(includeInstance, msg) { - var f, obj = { - address: jspb.Message.getFieldWithDefault(msg, 1, ""), - protocol: jspb.Message.getFieldWithDefault(msg, 2, ""), - protocolLabel: jspb.Message.getFieldWithDefault(msg, 3, ""), - boardsList: jspb.Message.toObjectList(msg.getBoardsList(), - proto.cc.arduino.cli.commands.BoardListItem.toObject, includeInstance) - }; - - 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.DetectedPort} - */ -proto.cc.arduino.cli.commands.DetectedPort.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.cc.arduino.cli.commands.DetectedPort; - return proto.cc.arduino.cli.commands.DetectedPort.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.DetectedPort} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.cc.arduino.cli.commands.DetectedPort} - */ -proto.cc.arduino.cli.commands.DetectedPort.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.setAddress(value); - break; - case 2: - var value = /** @type {string} */ (reader.readString()); - msg.setProtocol(value); - break; - case 3: - var value = /** @type {string} */ (reader.readString()); - msg.setProtocolLabel(value); - break; - case 4: - var value = new proto.cc.arduino.cli.commands.BoardListItem; - reader.readMessage(value,proto.cc.arduino.cli.commands.BoardListItem.deserializeBinaryFromReader); - msg.addBoards(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.DetectedPort.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.cc.arduino.cli.commands.DetectedPort.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.DetectedPort} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.cc.arduino.cli.commands.DetectedPort.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getAddress(); - if (f.length > 0) { - writer.writeString( - 1, - f - ); - } - f = message.getProtocol(); - if (f.length > 0) { - writer.writeString( - 2, - f - ); - } - f = message.getProtocolLabel(); - if (f.length > 0) { - writer.writeString( - 3, - f - ); - } - f = message.getBoardsList(); - if (f.length > 0) { - writer.writeRepeatedMessage( - 4, - f, - proto.cc.arduino.cli.commands.BoardListItem.serializeBinaryToWriter - ); - } -}; - - -/** - * optional string address = 1; - * @return {string} - */ -proto.cc.arduino.cli.commands.DetectedPort.prototype.getAddress = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** @param {string} value */ -proto.cc.arduino.cli.commands.DetectedPort.prototype.setAddress = function(value) { - jspb.Message.setProto3StringField(this, 1, value); -}; - - -/** - * optional string protocol = 2; - * @return {string} - */ -proto.cc.arduino.cli.commands.DetectedPort.prototype.getProtocol = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); -}; - - -/** @param {string} value */ -proto.cc.arduino.cli.commands.DetectedPort.prototype.setProtocol = function(value) { - jspb.Message.setProto3StringField(this, 2, value); -}; - - -/** - * optional string protocol_label = 3; - * @return {string} - */ -proto.cc.arduino.cli.commands.DetectedPort.prototype.getProtocolLabel = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); -}; - - -/** @param {string} value */ -proto.cc.arduino.cli.commands.DetectedPort.prototype.setProtocolLabel = function(value) { - jspb.Message.setProto3StringField(this, 3, value); -}; - - -/** - * repeated BoardListItem boards = 4; - * @return {!Array} - */ -proto.cc.arduino.cli.commands.DetectedPort.prototype.getBoardsList = function() { - return /** @type{!Array} */ ( - jspb.Message.getRepeatedWrapperField(this, proto.cc.arduino.cli.commands.BoardListItem, 4)); -}; - - -/** @param {!Array} value */ -proto.cc.arduino.cli.commands.DetectedPort.prototype.setBoardsList = function(value) { - jspb.Message.setRepeatedWrapperField(this, 4, value); -}; - - -/** - * @param {!proto.cc.arduino.cli.commands.BoardListItem=} opt_value - * @param {number=} opt_index - * @return {!proto.cc.arduino.cli.commands.BoardListItem} - */ -proto.cc.arduino.cli.commands.DetectedPort.prototype.addBoards = function(opt_value, opt_index) { - return jspb.Message.addToRepeatedWrapperField(this, 4, opt_value, proto.cc.arduino.cli.commands.BoardListItem, opt_index); -}; - - -proto.cc.arduino.cli.commands.DetectedPort.prototype.clearBoardsList = function() { - this.setBoardsList([]); -}; - - - -/** - * 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.BoardListAllReq = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.cc.arduino.cli.commands.BoardListAllReq.repeatedFields_, null); -}; -goog.inherits(proto.cc.arduino.cli.commands.BoardListAllReq, jspb.Message); -if (goog.DEBUG && !COMPILED) { - proto.cc.arduino.cli.commands.BoardListAllReq.displayName = 'proto.cc.arduino.cli.commands.BoardListAllReq'; -} -/** - * List of repeated fields within this message type. - * @private {!Array} - * @const - */ -proto.cc.arduino.cli.commands.BoardListAllReq.repeatedFields_ = [2]; - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto suitable for use in Soy templates. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration - * @return {!Object} - */ -proto.cc.arduino.cli.commands.BoardListAllReq.prototype.toObject = function(opt_includeInstance) { - return proto.cc.arduino.cli.commands.BoardListAllReq.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.cc.arduino.cli.commands.BoardListAllReq} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -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: jspb.Message.getRepeatedField(msg, 2) - }; - - 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.BoardListAllReq} - */ -proto.cc.arduino.cli.commands.BoardListAllReq.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.cc.arduino.cli.commands.BoardListAllReq; - return proto.cc.arduino.cli.commands.BoardListAllReq.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.BoardListAllReq} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.cc.arduino.cli.commands.BoardListAllReq} - */ -proto.cc.arduino.cli.commands.BoardListAllReq.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.addSearchArgs(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.BoardListAllReq.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.cc.arduino.cli.commands.BoardListAllReq.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.BoardListAllReq} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.cc.arduino.cli.commands.BoardListAllReq.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getInstance(); - if (f != null) { - writer.writeMessage( - 1, - f, - commands_common_pb.Instance.serializeBinaryToWriter - ); - } - f = message.getSearchArgsList(); - if (f.length > 0) { - writer.writeRepeatedString( - 2, - f - ); - } -}; - - -/** - * optional Instance instance = 1; - * @return {?proto.cc.arduino.cli.commands.Instance} - */ -proto.cc.arduino.cli.commands.BoardListAllReq.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 */ -proto.cc.arduino.cli.commands.BoardListAllReq.prototype.setInstance = function(value) { - jspb.Message.setWrapperField(this, 1, value); -}; - - -proto.cc.arduino.cli.commands.BoardListAllReq.prototype.clearInstance = function() { - this.setInstance(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.cc.arduino.cli.commands.BoardListAllReq.prototype.hasInstance = function() { - return jspb.Message.getField(this, 1) != null; -}; - - -/** - * repeated string search_args = 2; - * @return {!Array} - */ -proto.cc.arduino.cli.commands.BoardListAllReq.prototype.getSearchArgsList = function() { - return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 2)); -}; - - -/** @param {!Array} value */ -proto.cc.arduino.cli.commands.BoardListAllReq.prototype.setSearchArgsList = function(value) { - jspb.Message.setField(this, 2, value || []); -}; - - -/** - * @param {string} value - * @param {number=} opt_index - */ -proto.cc.arduino.cli.commands.BoardListAllReq.prototype.addSearchArgs = function(value, opt_index) { - jspb.Message.addToRepeatedField(this, 2, value, opt_index); -}; - - -proto.cc.arduino.cli.commands.BoardListAllReq.prototype.clearSearchArgsList = function() { - this.setSearchArgsList([]); -}; - - - -/** - * 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.BoardListAllResp = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.cc.arduino.cli.commands.BoardListAllResp.repeatedFields_, null); -}; -goog.inherits(proto.cc.arduino.cli.commands.BoardListAllResp, jspb.Message); -if (goog.DEBUG && !COMPILED) { - proto.cc.arduino.cli.commands.BoardListAllResp.displayName = 'proto.cc.arduino.cli.commands.BoardListAllResp'; -} -/** - * List of repeated fields within this message type. - * @private {!Array} - * @const - */ -proto.cc.arduino.cli.commands.BoardListAllResp.repeatedFields_ = [1]; - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto suitable for use in Soy templates. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration - * @return {!Object} - */ -proto.cc.arduino.cli.commands.BoardListAllResp.prototype.toObject = function(opt_includeInstance) { - return proto.cc.arduino.cli.commands.BoardListAllResp.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.cc.arduino.cli.commands.BoardListAllResp} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.cc.arduino.cli.commands.BoardListAllResp.toObject = function(includeInstance, msg) { - var f, obj = { - boardsList: jspb.Message.toObjectList(msg.getBoardsList(), - proto.cc.arduino.cli.commands.BoardListItem.toObject, includeInstance) - }; - - 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.BoardListAllResp} - */ -proto.cc.arduino.cli.commands.BoardListAllResp.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.cc.arduino.cli.commands.BoardListAllResp; - return proto.cc.arduino.cli.commands.BoardListAllResp.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.BoardListAllResp} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.cc.arduino.cli.commands.BoardListAllResp} - */ -proto.cc.arduino.cli.commands.BoardListAllResp.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = new proto.cc.arduino.cli.commands.BoardListItem; - reader.readMessage(value,proto.cc.arduino.cli.commands.BoardListItem.deserializeBinaryFromReader); - msg.addBoards(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.BoardListAllResp.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.cc.arduino.cli.commands.BoardListAllResp.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.BoardListAllResp} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.cc.arduino.cli.commands.BoardListAllResp.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getBoardsList(); - if (f.length > 0) { - writer.writeRepeatedMessage( - 1, - f, - proto.cc.arduino.cli.commands.BoardListItem.serializeBinaryToWriter - ); - } -}; - - -/** - * repeated BoardListItem boards = 1; - * @return {!Array} - */ -proto.cc.arduino.cli.commands.BoardListAllResp.prototype.getBoardsList = function() { - return /** @type{!Array} */ ( - jspb.Message.getRepeatedWrapperField(this, proto.cc.arduino.cli.commands.BoardListItem, 1)); -}; - - -/** @param {!Array} value */ -proto.cc.arduino.cli.commands.BoardListAllResp.prototype.setBoardsList = function(value) { - jspb.Message.setRepeatedWrapperField(this, 1, value); -}; - - -/** - * @param {!proto.cc.arduino.cli.commands.BoardListItem=} opt_value - * @param {number=} opt_index - * @return {!proto.cc.arduino.cli.commands.BoardListItem} - */ -proto.cc.arduino.cli.commands.BoardListAllResp.prototype.addBoards = function(opt_value, opt_index) { - return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.cc.arduino.cli.commands.BoardListItem, opt_index); -}; - - -proto.cc.arduino.cli.commands.BoardListAllResp.prototype.clearBoardsList = function() { - this.setBoardsList([]); -}; - - - -/** - * 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.BoardListItem = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.cc.arduino.cli.commands.BoardListItem, jspb.Message); -if (goog.DEBUG && !COMPILED) { - proto.cc.arduino.cli.commands.BoardListItem.displayName = 'proto.cc.arduino.cli.commands.BoardListItem'; -} - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto suitable for use in Soy templates. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration - * @return {!Object} - */ -proto.cc.arduino.cli.commands.BoardListItem.prototype.toObject = function(opt_includeInstance) { - return proto.cc.arduino.cli.commands.BoardListItem.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.cc.arduino.cli.commands.BoardListItem} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -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, "") - }; - - 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.BoardListItem} - */ -proto.cc.arduino.cli.commands.BoardListItem.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.cc.arduino.cli.commands.BoardListItem; - return proto.cc.arduino.cli.commands.BoardListItem.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.BoardListItem} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.cc.arduino.cli.commands.BoardListItem} - */ -proto.cc.arduino.cli.commands.BoardListItem.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 {string} */ (reader.readString()); - msg.setFqbn(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.BoardListItem.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.cc.arduino.cli.commands.BoardListItem.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.BoardListItem} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.cc.arduino.cli.commands.BoardListItem.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getName(); - if (f.length > 0) { - writer.writeString( - 1, - f - ); - } - f = message.getFqbn(); - if (f.length > 0) { - writer.writeString( - 2, - f - ); - } -}; - - -/** - * optional string name = 1; - * @return {string} - */ -proto.cc.arduino.cli.commands.BoardListItem.prototype.getName = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** @param {string} value */ -proto.cc.arduino.cli.commands.BoardListItem.prototype.setName = function(value) { - jspb.Message.setProto3StringField(this, 1, value); -}; - - -/** - * optional string FQBN = 2; - * @return {string} - */ -proto.cc.arduino.cli.commands.BoardListItem.prototype.getFqbn = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); -}; - - -/** @param {string} value */ -proto.cc.arduino.cli.commands.BoardListItem.prototype.setFqbn = function(value) { - jspb.Message.setProto3StringField(this, 2, 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 deleted file mode 100644 index 915e7aef..00000000 --- a/arduino-ide-extension/src/node/cli-protocol/commands/commands_grpc_pb.d.ts +++ /dev/null @@ -1,427 +0,0 @@ -// package: cc.arduino.cli.commands -// file: commands/commands.proto - -/* tslint:disable */ -/* eslint-disable */ - -import * as grpc from "@grpc/grpc-js"; -import * as commands_commands_pb from "../commands/commands_pb"; -import * as commands_common_pb from "../commands/common_pb"; -import * as commands_board_pb from "../commands/board_pb"; -import * as commands_compile_pb from "../commands/compile_pb"; -import * as commands_core_pb from "../commands/core_pb"; -import * as commands_upload_pb from "../commands/upload_pb"; -import * as commands_lib_pb from "../commands/lib_pb"; - -interface IArduinoCoreService extends grpc.ServiceDefinition { - init: IArduinoCoreService_IInit; - destroy: IArduinoCoreService_IDestroy; - rescan: IArduinoCoreService_IRescan; - updateIndex: IArduinoCoreService_IUpdateIndex; - updateLibrariesIndex: IArduinoCoreService_IUpdateLibrariesIndex; - version: IArduinoCoreService_IVersion; - boardDetails: IArduinoCoreService_IBoardDetails; - boardAttach: IArduinoCoreService_IBoardAttach; - boardList: IArduinoCoreService_IBoardList; - boardListAll: IArduinoCoreService_IBoardListAll; - compile: IArduinoCoreService_ICompile; - platformInstall: IArduinoCoreService_IPlatformInstall; - platformDownload: IArduinoCoreService_IPlatformDownload; - platformUninstall: IArduinoCoreService_IPlatformUninstall; - platformUpgrade: IArduinoCoreService_IPlatformUpgrade; - upload: IArduinoCoreService_IUpload; - platformSearch: IArduinoCoreService_IPlatformSearch; - platformList: IArduinoCoreService_IPlatformList; - libraryDownload: IArduinoCoreService_ILibraryDownload; - libraryInstall: IArduinoCoreService_ILibraryInstall; - libraryUninstall: IArduinoCoreService_ILibraryUninstall; - libraryUpgradeAll: IArduinoCoreService_ILibraryUpgradeAll; - libraryResolveDependencies: IArduinoCoreService_ILibraryResolveDependencies; - librarySearch: IArduinoCoreService_ILibrarySearch; - libraryList: IArduinoCoreService_ILibraryList; -} - -interface IArduinoCoreService_IInit extends grpc.MethodDefinition { - path: string; // "/cc.arduino.cli.commands.ArduinoCore/Init" - requestStream: boolean; // false - responseStream: boolean; // true - requestSerialize: grpc.serialize; - requestDeserialize: grpc.deserialize; - responseSerialize: grpc.serialize; - responseDeserialize: grpc.deserialize; -} -interface IArduinoCoreService_IDestroy extends grpc.MethodDefinition { - path: string; // "/cc.arduino.cli.commands.ArduinoCore/Destroy" - requestStream: boolean; // false - responseStream: boolean; // false - requestSerialize: grpc.serialize; - requestDeserialize: grpc.deserialize; - responseSerialize: grpc.serialize; - responseDeserialize: grpc.deserialize; -} -interface IArduinoCoreService_IRescan extends grpc.MethodDefinition { - path: string; // "/cc.arduino.cli.commands.ArduinoCore/Rescan" - requestStream: boolean; // false - responseStream: boolean; // false - requestSerialize: grpc.serialize; - requestDeserialize: grpc.deserialize; - responseSerialize: grpc.serialize; - responseDeserialize: grpc.deserialize; -} -interface IArduinoCoreService_IUpdateIndex extends grpc.MethodDefinition { - path: string; // "/cc.arduino.cli.commands.ArduinoCore/UpdateIndex" - requestStream: boolean; // false - responseStream: boolean; // true - requestSerialize: grpc.serialize; - requestDeserialize: grpc.deserialize; - responseSerialize: grpc.serialize; - responseDeserialize: grpc.deserialize; -} -interface IArduinoCoreService_IUpdateLibrariesIndex extends grpc.MethodDefinition { - path: string; // "/cc.arduino.cli.commands.ArduinoCore/UpdateLibrariesIndex" - requestStream: boolean; // false - responseStream: boolean; // true - requestSerialize: grpc.serialize; - requestDeserialize: grpc.deserialize; - responseSerialize: grpc.serialize; - responseDeserialize: grpc.deserialize; -} -interface IArduinoCoreService_IVersion extends grpc.MethodDefinition { - path: string; // "/cc.arduino.cli.commands.ArduinoCore/Version" - requestStream: boolean; // false - responseStream: boolean; // 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: boolean; // false - responseStream: boolean; // false - requestSerialize: grpc.serialize; - requestDeserialize: grpc.deserialize; - responseSerialize: grpc.serialize; - responseDeserialize: grpc.deserialize; -} -interface IArduinoCoreService_IBoardAttach extends grpc.MethodDefinition { - path: string; // "/cc.arduino.cli.commands.ArduinoCore/BoardAttach" - requestStream: boolean; // false - responseStream: boolean; // true - requestSerialize: grpc.serialize; - requestDeserialize: grpc.deserialize; - responseSerialize: grpc.serialize; - responseDeserialize: grpc.deserialize; -} -interface IArduinoCoreService_IBoardList extends grpc.MethodDefinition { - path: string; // "/cc.arduino.cli.commands.ArduinoCore/BoardList" - requestStream: boolean; // false - responseStream: boolean; // false - requestSerialize: grpc.serialize; - requestDeserialize: grpc.deserialize; - responseSerialize: grpc.serialize; - responseDeserialize: grpc.deserialize; -} -interface IArduinoCoreService_IBoardListAll extends grpc.MethodDefinition { - path: string; // "/cc.arduino.cli.commands.ArduinoCore/BoardListAll" - requestStream: boolean; // false - responseStream: boolean; // false - requestSerialize: grpc.serialize; - requestDeserialize: grpc.deserialize; - responseSerialize: grpc.serialize; - responseDeserialize: grpc.deserialize; -} -interface IArduinoCoreService_ICompile extends grpc.MethodDefinition { - path: string; // "/cc.arduino.cli.commands.ArduinoCore/Compile" - requestStream: boolean; // false - responseStream: boolean; // true - requestSerialize: grpc.serialize; - requestDeserialize: grpc.deserialize; - responseSerialize: grpc.serialize; - responseDeserialize: grpc.deserialize; -} -interface IArduinoCoreService_IPlatformInstall extends grpc.MethodDefinition { - path: string; // "/cc.arduino.cli.commands.ArduinoCore/PlatformInstall" - requestStream: boolean; // false - responseStream: boolean; // true - requestSerialize: grpc.serialize; - requestDeserialize: grpc.deserialize; - responseSerialize: grpc.serialize; - responseDeserialize: grpc.deserialize; -} -interface IArduinoCoreService_IPlatformDownload extends grpc.MethodDefinition { - path: string; // "/cc.arduino.cli.commands.ArduinoCore/PlatformDownload" - requestStream: boolean; // false - responseStream: boolean; // true - requestSerialize: grpc.serialize; - requestDeserialize: grpc.deserialize; - responseSerialize: grpc.serialize; - responseDeserialize: grpc.deserialize; -} -interface IArduinoCoreService_IPlatformUninstall extends grpc.MethodDefinition { - path: string; // "/cc.arduino.cli.commands.ArduinoCore/PlatformUninstall" - requestStream: boolean; // false - responseStream: boolean; // true - requestSerialize: grpc.serialize; - requestDeserialize: grpc.deserialize; - responseSerialize: grpc.serialize; - responseDeserialize: grpc.deserialize; -} -interface IArduinoCoreService_IPlatformUpgrade extends grpc.MethodDefinition { - path: string; // "/cc.arduino.cli.commands.ArduinoCore/PlatformUpgrade" - requestStream: boolean; // false - responseStream: boolean; // true - requestSerialize: grpc.serialize; - requestDeserialize: grpc.deserialize; - responseSerialize: grpc.serialize; - responseDeserialize: grpc.deserialize; -} -interface IArduinoCoreService_IUpload extends grpc.MethodDefinition { - path: string; // "/cc.arduino.cli.commands.ArduinoCore/Upload" - requestStream: boolean; // false - responseStream: boolean; // true - requestSerialize: grpc.serialize; - requestDeserialize: grpc.deserialize; - responseSerialize: grpc.serialize; - responseDeserialize: grpc.deserialize; -} -interface IArduinoCoreService_IPlatformSearch extends grpc.MethodDefinition { - path: string; // "/cc.arduino.cli.commands.ArduinoCore/PlatformSearch" - requestStream: boolean; // false - responseStream: boolean; // false - requestSerialize: grpc.serialize; - requestDeserialize: grpc.deserialize; - responseSerialize: grpc.serialize; - responseDeserialize: grpc.deserialize; -} -interface IArduinoCoreService_IPlatformList extends grpc.MethodDefinition { - path: string; // "/cc.arduino.cli.commands.ArduinoCore/PlatformList" - requestStream: boolean; // false - responseStream: boolean; // false - requestSerialize: grpc.serialize; - requestDeserialize: grpc.deserialize; - responseSerialize: grpc.serialize; - responseDeserialize: grpc.deserialize; -} -interface IArduinoCoreService_ILibraryDownload extends grpc.MethodDefinition { - path: string; // "/cc.arduino.cli.commands.ArduinoCore/LibraryDownload" - requestStream: boolean; // false - responseStream: boolean; // true - requestSerialize: grpc.serialize; - requestDeserialize: grpc.deserialize; - responseSerialize: grpc.serialize; - responseDeserialize: grpc.deserialize; -} -interface IArduinoCoreService_ILibraryInstall extends grpc.MethodDefinition { - path: string; // "/cc.arduino.cli.commands.ArduinoCore/LibraryInstall" - requestStream: boolean; // false - responseStream: boolean; // true - requestSerialize: grpc.serialize; - requestDeserialize: grpc.deserialize; - responseSerialize: grpc.serialize; - responseDeserialize: grpc.deserialize; -} -interface IArduinoCoreService_ILibraryUninstall extends grpc.MethodDefinition { - path: string; // "/cc.arduino.cli.commands.ArduinoCore/LibraryUninstall" - requestStream: boolean; // false - responseStream: boolean; // true - requestSerialize: grpc.serialize; - requestDeserialize: grpc.deserialize; - responseSerialize: grpc.serialize; - responseDeserialize: grpc.deserialize; -} -interface IArduinoCoreService_ILibraryUpgradeAll extends grpc.MethodDefinition { - path: string; // "/cc.arduino.cli.commands.ArduinoCore/LibraryUpgradeAll" - requestStream: boolean; // false - responseStream: boolean; // true - requestSerialize: grpc.serialize; - requestDeserialize: grpc.deserialize; - responseSerialize: grpc.serialize; - responseDeserialize: grpc.deserialize; -} -interface IArduinoCoreService_ILibraryResolveDependencies extends grpc.MethodDefinition { - path: string; // "/cc.arduino.cli.commands.ArduinoCore/LibraryResolveDependencies" - requestStream: boolean; // false - responseStream: boolean; // false - requestSerialize: grpc.serialize; - requestDeserialize: grpc.deserialize; - responseSerialize: grpc.serialize; - responseDeserialize: grpc.deserialize; -} -interface IArduinoCoreService_ILibrarySearch extends grpc.MethodDefinition { - path: string; // "/cc.arduino.cli.commands.ArduinoCore/LibrarySearch" - requestStream: boolean; // false - responseStream: boolean; // false - requestSerialize: grpc.serialize; - requestDeserialize: grpc.deserialize; - responseSerialize: grpc.serialize; - responseDeserialize: grpc.deserialize; -} -interface IArduinoCoreService_ILibraryList extends grpc.MethodDefinition { - path: string; // "/cc.arduino.cli.commands.ArduinoCore/LibraryList" - requestStream: boolean; // false - responseStream: boolean; // false - requestSerialize: grpc.serialize; - requestDeserialize: grpc.deserialize; - responseSerialize: grpc.serialize; - responseDeserialize: grpc.deserialize; -} - -export const ArduinoCoreService: IArduinoCoreService; - -export interface IArduinoCoreServer { - init: grpc.handleServerStreamingCall; - destroy: grpc.handleUnaryCall; - rescan: grpc.handleUnaryCall; - updateIndex: grpc.handleServerStreamingCall; - updateLibrariesIndex: grpc.handleServerStreamingCall; - version: grpc.handleUnaryCall; - boardDetails: grpc.handleUnaryCall; - boardAttach: grpc.handleServerStreamingCall; - boardList: grpc.handleUnaryCall; - boardListAll: grpc.handleUnaryCall; - compile: grpc.handleServerStreamingCall; - platformInstall: grpc.handleServerStreamingCall; - platformDownload: grpc.handleServerStreamingCall; - platformUninstall: grpc.handleServerStreamingCall; - platformUpgrade: grpc.handleServerStreamingCall; - upload: grpc.handleServerStreamingCall; - platformSearch: grpc.handleUnaryCall; - platformList: grpc.handleUnaryCall; - libraryDownload: grpc.handleServerStreamingCall; - libraryInstall: grpc.handleServerStreamingCall; - libraryUninstall: grpc.handleServerStreamingCall; - libraryUpgradeAll: grpc.handleServerStreamingCall; - libraryResolveDependencies: grpc.handleUnaryCall; - librarySearch: grpc.handleUnaryCall; - libraryList: grpc.handleUnaryCall; -} - -export interface IArduinoCoreClient { - init(request: commands_commands_pb.InitReq, options?: Partial): grpc.ClientReadableStream; - init(request: commands_commands_pb.InitReq, metadata?: grpc.Metadata, options?: Partial): grpc.ClientReadableStream; - destroy(request: commands_commands_pb.DestroyReq, callback: (error: grpc.ServiceError | null, response: commands_commands_pb.DestroyResp) => void): grpc.ClientUnaryCall; - destroy(request: commands_commands_pb.DestroyReq, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: commands_commands_pb.DestroyResp) => void): grpc.ClientUnaryCall; - destroy(request: commands_commands_pb.DestroyReq, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: commands_commands_pb.DestroyResp) => void): grpc.ClientUnaryCall; - rescan(request: commands_commands_pb.RescanReq, callback: (error: grpc.ServiceError | null, response: commands_commands_pb.RescanResp) => void): grpc.ClientUnaryCall; - rescan(request: commands_commands_pb.RescanReq, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: commands_commands_pb.RescanResp) => void): grpc.ClientUnaryCall; - rescan(request: commands_commands_pb.RescanReq, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: commands_commands_pb.RescanResp) => void): grpc.ClientUnaryCall; - updateIndex(request: commands_commands_pb.UpdateIndexReq, options?: Partial): grpc.ClientReadableStream; - updateIndex(request: commands_commands_pb.UpdateIndexReq, metadata?: grpc.Metadata, options?: Partial): grpc.ClientReadableStream; - updateLibrariesIndex(request: commands_commands_pb.UpdateLibrariesIndexReq, options?: Partial): grpc.ClientReadableStream; - updateLibrariesIndex(request: commands_commands_pb.UpdateLibrariesIndexReq, metadata?: grpc.Metadata, options?: Partial): grpc.ClientReadableStream; - version(request: commands_commands_pb.VersionReq, callback: (error: grpc.ServiceError | null, response: commands_commands_pb.VersionResp) => void): grpc.ClientUnaryCall; - version(request: commands_commands_pb.VersionReq, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: commands_commands_pb.VersionResp) => void): grpc.ClientUnaryCall; - version(request: commands_commands_pb.VersionReq, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: commands_commands_pb.VersionResp) => 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; - boardAttach(request: commands_board_pb.BoardAttachReq, options?: Partial): grpc.ClientReadableStream; - boardAttach(request: commands_board_pb.BoardAttachReq, metadata?: grpc.Metadata, options?: Partial): grpc.ClientReadableStream; - boardList(request: commands_board_pb.BoardListReq, callback: (error: grpc.ServiceError | null, response: commands_board_pb.BoardListResp) => void): grpc.ClientUnaryCall; - boardList(request: commands_board_pb.BoardListReq, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: commands_board_pb.BoardListResp) => void): grpc.ClientUnaryCall; - boardList(request: commands_board_pb.BoardListReq, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: commands_board_pb.BoardListResp) => void): grpc.ClientUnaryCall; - boardListAll(request: commands_board_pb.BoardListAllReq, callback: (error: grpc.ServiceError | null, response: commands_board_pb.BoardListAllResp) => void): grpc.ClientUnaryCall; - boardListAll(request: commands_board_pb.BoardListAllReq, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: commands_board_pb.BoardListAllResp) => void): grpc.ClientUnaryCall; - boardListAll(request: commands_board_pb.BoardListAllReq, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: commands_board_pb.BoardListAllResp) => void): grpc.ClientUnaryCall; - compile(request: commands_compile_pb.CompileReq, options?: Partial): grpc.ClientReadableStream; - compile(request: commands_compile_pb.CompileReq, metadata?: grpc.Metadata, options?: Partial): grpc.ClientReadableStream; - platformInstall(request: commands_core_pb.PlatformInstallReq, options?: Partial): grpc.ClientReadableStream; - platformInstall(request: commands_core_pb.PlatformInstallReq, metadata?: grpc.Metadata, options?: Partial): grpc.ClientReadableStream; - platformDownload(request: commands_core_pb.PlatformDownloadReq, options?: Partial): grpc.ClientReadableStream; - platformDownload(request: commands_core_pb.PlatformDownloadReq, metadata?: grpc.Metadata, options?: Partial): grpc.ClientReadableStream; - platformUninstall(request: commands_core_pb.PlatformUninstallReq, options?: Partial): grpc.ClientReadableStream; - platformUninstall(request: commands_core_pb.PlatformUninstallReq, metadata?: grpc.Metadata, options?: Partial): grpc.ClientReadableStream; - platformUpgrade(request: commands_core_pb.PlatformUpgradeReq, options?: Partial): grpc.ClientReadableStream; - 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; - platformSearch(request: commands_core_pb.PlatformSearchReq, callback: (error: grpc.ServiceError | null, response: commands_core_pb.PlatformSearchResp) => void): grpc.ClientUnaryCall; - platformSearch(request: commands_core_pb.PlatformSearchReq, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: commands_core_pb.PlatformSearchResp) => void): grpc.ClientUnaryCall; - platformSearch(request: commands_core_pb.PlatformSearchReq, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: commands_core_pb.PlatformSearchResp) => void): grpc.ClientUnaryCall; - platformList(request: commands_core_pb.PlatformListReq, callback: (error: grpc.ServiceError | null, response: commands_core_pb.PlatformListResp) => void): grpc.ClientUnaryCall; - platformList(request: commands_core_pb.PlatformListReq, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: commands_core_pb.PlatformListResp) => void): grpc.ClientUnaryCall; - platformList(request: commands_core_pb.PlatformListReq, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: commands_core_pb.PlatformListResp) => void): grpc.ClientUnaryCall; - libraryDownload(request: commands_lib_pb.LibraryDownloadReq, options?: Partial): grpc.ClientReadableStream; - libraryDownload(request: commands_lib_pb.LibraryDownloadReq, metadata?: grpc.Metadata, options?: Partial): grpc.ClientReadableStream; - libraryInstall(request: commands_lib_pb.LibraryInstallReq, options?: Partial): grpc.ClientReadableStream; - libraryInstall(request: commands_lib_pb.LibraryInstallReq, metadata?: grpc.Metadata, options?: Partial): grpc.ClientReadableStream; - libraryUninstall(request: commands_lib_pb.LibraryUninstallReq, options?: Partial): grpc.ClientReadableStream; - libraryUninstall(request: commands_lib_pb.LibraryUninstallReq, metadata?: grpc.Metadata, options?: Partial): grpc.ClientReadableStream; - libraryUpgradeAll(request: commands_lib_pb.LibraryUpgradeAllReq, options?: Partial): grpc.ClientReadableStream; - libraryUpgradeAll(request: commands_lib_pb.LibraryUpgradeAllReq, metadata?: grpc.Metadata, options?: Partial): grpc.ClientReadableStream; - libraryResolveDependencies(request: commands_lib_pb.LibraryResolveDependenciesReq, callback: (error: grpc.ServiceError | null, response: commands_lib_pb.LibraryResolveDependenciesResp) => void): grpc.ClientUnaryCall; - libraryResolveDependencies(request: commands_lib_pb.LibraryResolveDependenciesReq, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: commands_lib_pb.LibraryResolveDependenciesResp) => void): grpc.ClientUnaryCall; - libraryResolveDependencies(request: commands_lib_pb.LibraryResolveDependenciesReq, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: commands_lib_pb.LibraryResolveDependenciesResp) => void): grpc.ClientUnaryCall; - librarySearch(request: commands_lib_pb.LibrarySearchReq, callback: (error: grpc.ServiceError | null, response: commands_lib_pb.LibrarySearchResp) => void): grpc.ClientUnaryCall; - librarySearch(request: commands_lib_pb.LibrarySearchReq, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: commands_lib_pb.LibrarySearchResp) => void): grpc.ClientUnaryCall; - librarySearch(request: commands_lib_pb.LibrarySearchReq, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: commands_lib_pb.LibrarySearchResp) => void): grpc.ClientUnaryCall; - libraryList(request: commands_lib_pb.LibraryListReq, callback: (error: grpc.ServiceError | null, response: commands_lib_pb.LibraryListResp) => void): grpc.ClientUnaryCall; - libraryList(request: commands_lib_pb.LibraryListReq, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: commands_lib_pb.LibraryListResp) => void): grpc.ClientUnaryCall; - libraryList(request: commands_lib_pb.LibraryListReq, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: commands_lib_pb.LibraryListResp) => void): grpc.ClientUnaryCall; -} - -export class ArduinoCoreClient extends grpc.Client implements IArduinoCoreClient { - constructor(address: string, credentials: grpc.ChannelCredentials, options?: object); - 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; - public destroy(request: commands_commands_pb.DestroyReq, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: commands_commands_pb.DestroyResp) => void): grpc.ClientUnaryCall; - public destroy(request: commands_commands_pb.DestroyReq, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: commands_commands_pb.DestroyResp) => void): grpc.ClientUnaryCall; - public rescan(request: commands_commands_pb.RescanReq, callback: (error: grpc.ServiceError | null, response: commands_commands_pb.RescanResp) => void): grpc.ClientUnaryCall; - public rescan(request: commands_commands_pb.RescanReq, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: commands_commands_pb.RescanResp) => void): grpc.ClientUnaryCall; - public rescan(request: commands_commands_pb.RescanReq, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: commands_commands_pb.RescanResp) => void): grpc.ClientUnaryCall; - public updateIndex(request: commands_commands_pb.UpdateIndexReq, options?: Partial): grpc.ClientReadableStream; - public updateIndex(request: commands_commands_pb.UpdateIndexReq, metadata?: grpc.Metadata, options?: Partial): grpc.ClientReadableStream; - public updateLibrariesIndex(request: commands_commands_pb.UpdateLibrariesIndexReq, options?: Partial): grpc.ClientReadableStream; - public updateLibrariesIndex(request: commands_commands_pb.UpdateLibrariesIndexReq, metadata?: grpc.Metadata, options?: Partial): grpc.ClientReadableStream; - public version(request: commands_commands_pb.VersionReq, callback: (error: grpc.ServiceError | null, response: commands_commands_pb.VersionResp) => void): grpc.ClientUnaryCall; - public version(request: commands_commands_pb.VersionReq, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: commands_commands_pb.VersionResp) => void): grpc.ClientUnaryCall; - public version(request: commands_commands_pb.VersionReq, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: commands_commands_pb.VersionResp) => 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; - public boardAttach(request: commands_board_pb.BoardAttachReq, options?: Partial): grpc.ClientReadableStream; - public boardAttach(request: commands_board_pb.BoardAttachReq, metadata?: grpc.Metadata, options?: Partial): grpc.ClientReadableStream; - public boardList(request: commands_board_pb.BoardListReq, callback: (error: grpc.ServiceError | null, response: commands_board_pb.BoardListResp) => void): grpc.ClientUnaryCall; - public boardList(request: commands_board_pb.BoardListReq, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: commands_board_pb.BoardListResp) => void): grpc.ClientUnaryCall; - public boardList(request: commands_board_pb.BoardListReq, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: commands_board_pb.BoardListResp) => void): grpc.ClientUnaryCall; - public boardListAll(request: commands_board_pb.BoardListAllReq, callback: (error: grpc.ServiceError | null, response: commands_board_pb.BoardListAllResp) => void): grpc.ClientUnaryCall; - public boardListAll(request: commands_board_pb.BoardListAllReq, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: commands_board_pb.BoardListAllResp) => void): grpc.ClientUnaryCall; - public boardListAll(request: commands_board_pb.BoardListAllReq, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: commands_board_pb.BoardListAllResp) => void): grpc.ClientUnaryCall; - public compile(request: commands_compile_pb.CompileReq, options?: Partial): grpc.ClientReadableStream; - public compile(request: commands_compile_pb.CompileReq, metadata?: grpc.Metadata, options?: Partial): grpc.ClientReadableStream; - public platformInstall(request: commands_core_pb.PlatformInstallReq, options?: Partial): grpc.ClientReadableStream; - public platformInstall(request: commands_core_pb.PlatformInstallReq, metadata?: grpc.Metadata, options?: Partial): grpc.ClientReadableStream; - public platformDownload(request: commands_core_pb.PlatformDownloadReq, options?: Partial): grpc.ClientReadableStream; - public platformDownload(request: commands_core_pb.PlatformDownloadReq, metadata?: grpc.Metadata, options?: Partial): grpc.ClientReadableStream; - public platformUninstall(request: commands_core_pb.PlatformUninstallReq, options?: Partial): grpc.ClientReadableStream; - public platformUninstall(request: commands_core_pb.PlatformUninstallReq, metadata?: grpc.Metadata, options?: Partial): grpc.ClientReadableStream; - public platformUpgrade(request: commands_core_pb.PlatformUpgradeReq, options?: Partial): grpc.ClientReadableStream; - 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 platformSearch(request: commands_core_pb.PlatformSearchReq, callback: (error: grpc.ServiceError | null, response: commands_core_pb.PlatformSearchResp) => void): grpc.ClientUnaryCall; - public platformSearch(request: commands_core_pb.PlatformSearchReq, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: commands_core_pb.PlatformSearchResp) => void): grpc.ClientUnaryCall; - public platformSearch(request: commands_core_pb.PlatformSearchReq, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: commands_core_pb.PlatformSearchResp) => void): grpc.ClientUnaryCall; - public platformList(request: commands_core_pb.PlatformListReq, callback: (error: grpc.ServiceError | null, response: commands_core_pb.PlatformListResp) => void): grpc.ClientUnaryCall; - public platformList(request: commands_core_pb.PlatformListReq, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: commands_core_pb.PlatformListResp) => void): grpc.ClientUnaryCall; - public platformList(request: commands_core_pb.PlatformListReq, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: commands_core_pb.PlatformListResp) => void): grpc.ClientUnaryCall; - public libraryDownload(request: commands_lib_pb.LibraryDownloadReq, options?: Partial): grpc.ClientReadableStream; - public libraryDownload(request: commands_lib_pb.LibraryDownloadReq, metadata?: grpc.Metadata, options?: Partial): grpc.ClientReadableStream; - public libraryInstall(request: commands_lib_pb.LibraryInstallReq, options?: Partial): grpc.ClientReadableStream; - public libraryInstall(request: commands_lib_pb.LibraryInstallReq, metadata?: grpc.Metadata, options?: Partial): grpc.ClientReadableStream; - public libraryUninstall(request: commands_lib_pb.LibraryUninstallReq, options?: Partial): grpc.ClientReadableStream; - public libraryUninstall(request: commands_lib_pb.LibraryUninstallReq, metadata?: grpc.Metadata, options?: Partial): grpc.ClientReadableStream; - public libraryUpgradeAll(request: commands_lib_pb.LibraryUpgradeAllReq, options?: Partial): grpc.ClientReadableStream; - public libraryUpgradeAll(request: commands_lib_pb.LibraryUpgradeAllReq, metadata?: grpc.Metadata, options?: Partial): grpc.ClientReadableStream; - public libraryResolveDependencies(request: commands_lib_pb.LibraryResolveDependenciesReq, callback: (error: grpc.ServiceError | null, response: commands_lib_pb.LibraryResolveDependenciesResp) => void): grpc.ClientUnaryCall; - public libraryResolveDependencies(request: commands_lib_pb.LibraryResolveDependenciesReq, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: commands_lib_pb.LibraryResolveDependenciesResp) => void): grpc.ClientUnaryCall; - public libraryResolveDependencies(request: commands_lib_pb.LibraryResolveDependenciesReq, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: commands_lib_pb.LibraryResolveDependenciesResp) => void): grpc.ClientUnaryCall; - public librarySearch(request: commands_lib_pb.LibrarySearchReq, callback: (error: grpc.ServiceError | null, response: commands_lib_pb.LibrarySearchResp) => void): grpc.ClientUnaryCall; - public librarySearch(request: commands_lib_pb.LibrarySearchReq, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: commands_lib_pb.LibrarySearchResp) => void): grpc.ClientUnaryCall; - public librarySearch(request: commands_lib_pb.LibrarySearchReq, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: commands_lib_pb.LibrarySearchResp) => void): grpc.ClientUnaryCall; - public libraryList(request: commands_lib_pb.LibraryListReq, callback: (error: grpc.ServiceError | null, response: commands_lib_pb.LibraryListResp) => void): grpc.ClientUnaryCall; - public libraryList(request: commands_lib_pb.LibraryListReq, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: commands_lib_pb.LibraryListResp) => void): grpc.ClientUnaryCall; - public libraryList(request: commands_lib_pb.LibraryListReq, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: commands_lib_pb.LibraryListResp) => 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 deleted file mode 100644 index 615964a5..00000000 --- a/arduino-ide-extension/src/node/cli-protocol/commands/commands_grpc_pb.js +++ /dev/null @@ -1,870 +0,0 @@ -// GENERATED CODE -- DO NOT EDIT! - -// Original file comments: -// This file is part of arduino-cli. -// -// Copyright 2020 ARDUINO SA (http://www.arduino.cc/) -// -// This software is released under the GNU General Public License version 3, -// which covers the main part of arduino-cli. -// The terms of this license can be found at: -// https://www.gnu.org/licenses/gpl-3.0.en.html -// -// You can be released from the requirements of the above licenses by purchasing -// a commercial license. Buying such a license is mandatory if you want to -// modify or otherwise use the software for commercial activities involving the -// Arduino software without disclosing the source code of your own applications. -// To purchase a commercial license, send an email to license@arduino.cc. -// -'use strict'; -var grpc = require('@grpc/grpc-js'); -var commands_commands_pb = require('../commands/commands_pb.js'); -var commands_common_pb = require('../commands/common_pb.js'); -var commands_board_pb = require('../commands/board_pb.js'); -var commands_compile_pb = require('../commands/compile_pb.js'); -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_BoardAttachReq(arg) { - if (!(arg instanceof commands_board_pb.BoardAttachReq)) { - throw new Error('Expected argument of type cc.arduino.cli.commands.BoardAttachReq'); - } - return Buffer.from(arg.serializeBinary()); -} - -function deserialize_cc_arduino_cli_commands_BoardAttachReq(buffer_arg) { - return commands_board_pb.BoardAttachReq.deserializeBinary(new Uint8Array(buffer_arg)); -} - -function serialize_cc_arduino_cli_commands_BoardAttachResp(arg) { - if (!(arg instanceof commands_board_pb.BoardAttachResp)) { - throw new Error('Expected argument of type cc.arduino.cli.commands.BoardAttachResp'); - } - return Buffer.from(arg.serializeBinary()); -} - -function deserialize_cc_arduino_cli_commands_BoardAttachResp(buffer_arg) { - return commands_board_pb.BoardAttachResp.deserializeBinary(new Uint8Array(buffer_arg)); -} - -function serialize_cc_arduino_cli_commands_BoardDetailsReq(arg) { - if (!(arg instanceof commands_board_pb.BoardDetailsReq)) { - throw new Error('Expected argument of type cc.arduino.cli.commands.BoardDetailsReq'); - } - return Buffer.from(arg.serializeBinary()); -} - -function deserialize_cc_arduino_cli_commands_BoardDetailsReq(buffer_arg) { - return commands_board_pb.BoardDetailsReq.deserializeBinary(new Uint8Array(buffer_arg)); -} - -function serialize_cc_arduino_cli_commands_BoardDetailsResp(arg) { - if (!(arg instanceof commands_board_pb.BoardDetailsResp)) { - throw new Error('Expected argument of type cc.arduino.cli.commands.BoardDetailsResp'); - } - return Buffer.from(arg.serializeBinary()); -} - -function deserialize_cc_arduino_cli_commands_BoardDetailsResp(buffer_arg) { - return commands_board_pb.BoardDetailsResp.deserializeBinary(new Uint8Array(buffer_arg)); -} - -function serialize_cc_arduino_cli_commands_BoardListAllReq(arg) { - if (!(arg instanceof commands_board_pb.BoardListAllReq)) { - throw new Error('Expected argument of type cc.arduino.cli.commands.BoardListAllReq'); - } - return Buffer.from(arg.serializeBinary()); -} - -function deserialize_cc_arduino_cli_commands_BoardListAllReq(buffer_arg) { - return commands_board_pb.BoardListAllReq.deserializeBinary(new Uint8Array(buffer_arg)); -} - -function serialize_cc_arduino_cli_commands_BoardListAllResp(arg) { - if (!(arg instanceof commands_board_pb.BoardListAllResp)) { - throw new Error('Expected argument of type cc.arduino.cli.commands.BoardListAllResp'); - } - return Buffer.from(arg.serializeBinary()); -} - -function deserialize_cc_arduino_cli_commands_BoardListAllResp(buffer_arg) { - return commands_board_pb.BoardListAllResp.deserializeBinary(new Uint8Array(buffer_arg)); -} - -function serialize_cc_arduino_cli_commands_BoardListReq(arg) { - if (!(arg instanceof commands_board_pb.BoardListReq)) { - throw new Error('Expected argument of type cc.arduino.cli.commands.BoardListReq'); - } - return Buffer.from(arg.serializeBinary()); -} - -function deserialize_cc_arduino_cli_commands_BoardListReq(buffer_arg) { - return commands_board_pb.BoardListReq.deserializeBinary(new Uint8Array(buffer_arg)); -} - -function serialize_cc_arduino_cli_commands_BoardListResp(arg) { - if (!(arg instanceof commands_board_pb.BoardListResp)) { - throw new Error('Expected argument of type cc.arduino.cli.commands.BoardListResp'); - } - return Buffer.from(arg.serializeBinary()); -} - -function deserialize_cc_arduino_cli_commands_BoardListResp(buffer_arg) { - return commands_board_pb.BoardListResp.deserializeBinary(new Uint8Array(buffer_arg)); -} - -function serialize_cc_arduino_cli_commands_CompileReq(arg) { - if (!(arg instanceof commands_compile_pb.CompileReq)) { - throw new Error('Expected argument of type cc.arduino.cli.commands.CompileReq'); - } - return Buffer.from(arg.serializeBinary()); -} - -function deserialize_cc_arduino_cli_commands_CompileReq(buffer_arg) { - return commands_compile_pb.CompileReq.deserializeBinary(new Uint8Array(buffer_arg)); -} - -function serialize_cc_arduino_cli_commands_CompileResp(arg) { - if (!(arg instanceof commands_compile_pb.CompileResp)) { - throw new Error('Expected argument of type cc.arduino.cli.commands.CompileResp'); - } - return Buffer.from(arg.serializeBinary()); -} - -function deserialize_cc_arduino_cli_commands_CompileResp(buffer_arg) { - return commands_compile_pb.CompileResp.deserializeBinary(new Uint8Array(buffer_arg)); -} - -function serialize_cc_arduino_cli_commands_DestroyReq(arg) { - if (!(arg instanceof commands_commands_pb.DestroyReq)) { - throw new Error('Expected argument of type cc.arduino.cli.commands.DestroyReq'); - } - return Buffer.from(arg.serializeBinary()); -} - -function deserialize_cc_arduino_cli_commands_DestroyReq(buffer_arg) { - return commands_commands_pb.DestroyReq.deserializeBinary(new Uint8Array(buffer_arg)); -} - -function serialize_cc_arduino_cli_commands_DestroyResp(arg) { - if (!(arg instanceof commands_commands_pb.DestroyResp)) { - throw new Error('Expected argument of type cc.arduino.cli.commands.DestroyResp'); - } - return Buffer.from(arg.serializeBinary()); -} - -function deserialize_cc_arduino_cli_commands_DestroyResp(buffer_arg) { - return commands_commands_pb.DestroyResp.deserializeBinary(new Uint8Array(buffer_arg)); -} - -function serialize_cc_arduino_cli_commands_InitReq(arg) { - if (!(arg instanceof commands_commands_pb.InitReq)) { - throw new Error('Expected argument of type cc.arduino.cli.commands.InitReq'); - } - return Buffer.from(arg.serializeBinary()); -} - -function deserialize_cc_arduino_cli_commands_InitReq(buffer_arg) { - return commands_commands_pb.InitReq.deserializeBinary(new Uint8Array(buffer_arg)); -} - -function serialize_cc_arduino_cli_commands_InitResp(arg) { - if (!(arg instanceof commands_commands_pb.InitResp)) { - throw new Error('Expected argument of type cc.arduino.cli.commands.InitResp'); - } - return Buffer.from(arg.serializeBinary()); -} - -function deserialize_cc_arduino_cli_commands_InitResp(buffer_arg) { - return commands_commands_pb.InitResp.deserializeBinary(new Uint8Array(buffer_arg)); -} - -function serialize_cc_arduino_cli_commands_LibraryDownloadReq(arg) { - if (!(arg instanceof commands_lib_pb.LibraryDownloadReq)) { - throw new Error('Expected argument of type cc.arduino.cli.commands.LibraryDownloadReq'); - } - return Buffer.from(arg.serializeBinary()); -} - -function deserialize_cc_arduino_cli_commands_LibraryDownloadReq(buffer_arg) { - return commands_lib_pb.LibraryDownloadReq.deserializeBinary(new Uint8Array(buffer_arg)); -} - -function serialize_cc_arduino_cli_commands_LibraryDownloadResp(arg) { - if (!(arg instanceof commands_lib_pb.LibraryDownloadResp)) { - throw new Error('Expected argument of type cc.arduino.cli.commands.LibraryDownloadResp'); - } - return Buffer.from(arg.serializeBinary()); -} - -function deserialize_cc_arduino_cli_commands_LibraryDownloadResp(buffer_arg) { - return commands_lib_pb.LibraryDownloadResp.deserializeBinary(new Uint8Array(buffer_arg)); -} - -function serialize_cc_arduino_cli_commands_LibraryInstallReq(arg) { - if (!(arg instanceof commands_lib_pb.LibraryInstallReq)) { - throw new Error('Expected argument of type cc.arduino.cli.commands.LibraryInstallReq'); - } - return Buffer.from(arg.serializeBinary()); -} - -function deserialize_cc_arduino_cli_commands_LibraryInstallReq(buffer_arg) { - return commands_lib_pb.LibraryInstallReq.deserializeBinary(new Uint8Array(buffer_arg)); -} - -function serialize_cc_arduino_cli_commands_LibraryInstallResp(arg) { - if (!(arg instanceof commands_lib_pb.LibraryInstallResp)) { - throw new Error('Expected argument of type cc.arduino.cli.commands.LibraryInstallResp'); - } - return Buffer.from(arg.serializeBinary()); -} - -function deserialize_cc_arduino_cli_commands_LibraryInstallResp(buffer_arg) { - return commands_lib_pb.LibraryInstallResp.deserializeBinary(new Uint8Array(buffer_arg)); -} - -function serialize_cc_arduino_cli_commands_LibraryListReq(arg) { - if (!(arg instanceof commands_lib_pb.LibraryListReq)) { - throw new Error('Expected argument of type cc.arduino.cli.commands.LibraryListReq'); - } - return Buffer.from(arg.serializeBinary()); -} - -function deserialize_cc_arduino_cli_commands_LibraryListReq(buffer_arg) { - return commands_lib_pb.LibraryListReq.deserializeBinary(new Uint8Array(buffer_arg)); -} - -function serialize_cc_arduino_cli_commands_LibraryListResp(arg) { - if (!(arg instanceof commands_lib_pb.LibraryListResp)) { - throw new Error('Expected argument of type cc.arduino.cli.commands.LibraryListResp'); - } - return Buffer.from(arg.serializeBinary()); -} - -function deserialize_cc_arduino_cli_commands_LibraryListResp(buffer_arg) { - return commands_lib_pb.LibraryListResp.deserializeBinary(new Uint8Array(buffer_arg)); -} - -function serialize_cc_arduino_cli_commands_LibraryResolveDependenciesReq(arg) { - if (!(arg instanceof commands_lib_pb.LibraryResolveDependenciesReq)) { - throw new Error('Expected argument of type cc.arduino.cli.commands.LibraryResolveDependenciesReq'); - } - return Buffer.from(arg.serializeBinary()); -} - -function deserialize_cc_arduino_cli_commands_LibraryResolveDependenciesReq(buffer_arg) { - return commands_lib_pb.LibraryResolveDependenciesReq.deserializeBinary(new Uint8Array(buffer_arg)); -} - -function serialize_cc_arduino_cli_commands_LibraryResolveDependenciesResp(arg) { - if (!(arg instanceof commands_lib_pb.LibraryResolveDependenciesResp)) { - throw new Error('Expected argument of type cc.arduino.cli.commands.LibraryResolveDependenciesResp'); - } - return Buffer.from(arg.serializeBinary()); -} - -function deserialize_cc_arduino_cli_commands_LibraryResolveDependenciesResp(buffer_arg) { - return commands_lib_pb.LibraryResolveDependenciesResp.deserializeBinary(new Uint8Array(buffer_arg)); -} - -function serialize_cc_arduino_cli_commands_LibrarySearchReq(arg) { - if (!(arg instanceof commands_lib_pb.LibrarySearchReq)) { - throw new Error('Expected argument of type cc.arduino.cli.commands.LibrarySearchReq'); - } - return Buffer.from(arg.serializeBinary()); -} - -function deserialize_cc_arduino_cli_commands_LibrarySearchReq(buffer_arg) { - return commands_lib_pb.LibrarySearchReq.deserializeBinary(new Uint8Array(buffer_arg)); -} - -function serialize_cc_arduino_cli_commands_LibrarySearchResp(arg) { - if (!(arg instanceof commands_lib_pb.LibrarySearchResp)) { - throw new Error('Expected argument of type cc.arduino.cli.commands.LibrarySearchResp'); - } - return Buffer.from(arg.serializeBinary()); -} - -function deserialize_cc_arduino_cli_commands_LibrarySearchResp(buffer_arg) { - return commands_lib_pb.LibrarySearchResp.deserializeBinary(new Uint8Array(buffer_arg)); -} - -function serialize_cc_arduino_cli_commands_LibraryUninstallReq(arg) { - if (!(arg instanceof commands_lib_pb.LibraryUninstallReq)) { - throw new Error('Expected argument of type cc.arduino.cli.commands.LibraryUninstallReq'); - } - return Buffer.from(arg.serializeBinary()); -} - -function deserialize_cc_arduino_cli_commands_LibraryUninstallReq(buffer_arg) { - return commands_lib_pb.LibraryUninstallReq.deserializeBinary(new Uint8Array(buffer_arg)); -} - -function serialize_cc_arduino_cli_commands_LibraryUninstallResp(arg) { - if (!(arg instanceof commands_lib_pb.LibraryUninstallResp)) { - throw new Error('Expected argument of type cc.arduino.cli.commands.LibraryUninstallResp'); - } - return Buffer.from(arg.serializeBinary()); -} - -function deserialize_cc_arduino_cli_commands_LibraryUninstallResp(buffer_arg) { - return commands_lib_pb.LibraryUninstallResp.deserializeBinary(new Uint8Array(buffer_arg)); -} - -function serialize_cc_arduino_cli_commands_LibraryUpgradeAllReq(arg) { - if (!(arg instanceof commands_lib_pb.LibraryUpgradeAllReq)) { - throw new Error('Expected argument of type cc.arduino.cli.commands.LibraryUpgradeAllReq'); - } - return Buffer.from(arg.serializeBinary()); -} - -function deserialize_cc_arduino_cli_commands_LibraryUpgradeAllReq(buffer_arg) { - return commands_lib_pb.LibraryUpgradeAllReq.deserializeBinary(new Uint8Array(buffer_arg)); -} - -function serialize_cc_arduino_cli_commands_LibraryUpgradeAllResp(arg) { - if (!(arg instanceof commands_lib_pb.LibraryUpgradeAllResp)) { - throw new Error('Expected argument of type cc.arduino.cli.commands.LibraryUpgradeAllResp'); - } - return Buffer.from(arg.serializeBinary()); -} - -function deserialize_cc_arduino_cli_commands_LibraryUpgradeAllResp(buffer_arg) { - return commands_lib_pb.LibraryUpgradeAllResp.deserializeBinary(new Uint8Array(buffer_arg)); -} - -function serialize_cc_arduino_cli_commands_PlatformDownloadReq(arg) { - if (!(arg instanceof commands_core_pb.PlatformDownloadReq)) { - throw new Error('Expected argument of type cc.arduino.cli.commands.PlatformDownloadReq'); - } - return Buffer.from(arg.serializeBinary()); -} - -function deserialize_cc_arduino_cli_commands_PlatformDownloadReq(buffer_arg) { - return commands_core_pb.PlatformDownloadReq.deserializeBinary(new Uint8Array(buffer_arg)); -} - -function serialize_cc_arduino_cli_commands_PlatformDownloadResp(arg) { - if (!(arg instanceof commands_core_pb.PlatformDownloadResp)) { - throw new Error('Expected argument of type cc.arduino.cli.commands.PlatformDownloadResp'); - } - return Buffer.from(arg.serializeBinary()); -} - -function deserialize_cc_arduino_cli_commands_PlatformDownloadResp(buffer_arg) { - return commands_core_pb.PlatformDownloadResp.deserializeBinary(new Uint8Array(buffer_arg)); -} - -function serialize_cc_arduino_cli_commands_PlatformInstallReq(arg) { - if (!(arg instanceof commands_core_pb.PlatformInstallReq)) { - throw new Error('Expected argument of type cc.arduino.cli.commands.PlatformInstallReq'); - } - return Buffer.from(arg.serializeBinary()); -} - -function deserialize_cc_arduino_cli_commands_PlatformInstallReq(buffer_arg) { - return commands_core_pb.PlatformInstallReq.deserializeBinary(new Uint8Array(buffer_arg)); -} - -function serialize_cc_arduino_cli_commands_PlatformInstallResp(arg) { - if (!(arg instanceof commands_core_pb.PlatformInstallResp)) { - throw new Error('Expected argument of type cc.arduino.cli.commands.PlatformInstallResp'); - } - return Buffer.from(arg.serializeBinary()); -} - -function deserialize_cc_arduino_cli_commands_PlatformInstallResp(buffer_arg) { - return commands_core_pb.PlatformInstallResp.deserializeBinary(new Uint8Array(buffer_arg)); -} - -function serialize_cc_arduino_cli_commands_PlatformListReq(arg) { - if (!(arg instanceof commands_core_pb.PlatformListReq)) { - throw new Error('Expected argument of type cc.arduino.cli.commands.PlatformListReq'); - } - return Buffer.from(arg.serializeBinary()); -} - -function deserialize_cc_arduino_cli_commands_PlatformListReq(buffer_arg) { - return commands_core_pb.PlatformListReq.deserializeBinary(new Uint8Array(buffer_arg)); -} - -function serialize_cc_arduino_cli_commands_PlatformListResp(arg) { - if (!(arg instanceof commands_core_pb.PlatformListResp)) { - throw new Error('Expected argument of type cc.arduino.cli.commands.PlatformListResp'); - } - return Buffer.from(arg.serializeBinary()); -} - -function deserialize_cc_arduino_cli_commands_PlatformListResp(buffer_arg) { - return commands_core_pb.PlatformListResp.deserializeBinary(new Uint8Array(buffer_arg)); -} - -function serialize_cc_arduino_cli_commands_PlatformSearchReq(arg) { - if (!(arg instanceof commands_core_pb.PlatformSearchReq)) { - throw new Error('Expected argument of type cc.arduino.cli.commands.PlatformSearchReq'); - } - return Buffer.from(arg.serializeBinary()); -} - -function deserialize_cc_arduino_cli_commands_PlatformSearchReq(buffer_arg) { - return commands_core_pb.PlatformSearchReq.deserializeBinary(new Uint8Array(buffer_arg)); -} - -function serialize_cc_arduino_cli_commands_PlatformSearchResp(arg) { - if (!(arg instanceof commands_core_pb.PlatformSearchResp)) { - throw new Error('Expected argument of type cc.arduino.cli.commands.PlatformSearchResp'); - } - return Buffer.from(arg.serializeBinary()); -} - -function deserialize_cc_arduino_cli_commands_PlatformSearchResp(buffer_arg) { - return commands_core_pb.PlatformSearchResp.deserializeBinary(new Uint8Array(buffer_arg)); -} - -function serialize_cc_arduino_cli_commands_PlatformUninstallReq(arg) { - if (!(arg instanceof commands_core_pb.PlatformUninstallReq)) { - throw new Error('Expected argument of type cc.arduino.cli.commands.PlatformUninstallReq'); - } - return Buffer.from(arg.serializeBinary()); -} - -function deserialize_cc_arduino_cli_commands_PlatformUninstallReq(buffer_arg) { - return commands_core_pb.PlatformUninstallReq.deserializeBinary(new Uint8Array(buffer_arg)); -} - -function serialize_cc_arduino_cli_commands_PlatformUninstallResp(arg) { - if (!(arg instanceof commands_core_pb.PlatformUninstallResp)) { - throw new Error('Expected argument of type cc.arduino.cli.commands.PlatformUninstallResp'); - } - return Buffer.from(arg.serializeBinary()); -} - -function deserialize_cc_arduino_cli_commands_PlatformUninstallResp(buffer_arg) { - return commands_core_pb.PlatformUninstallResp.deserializeBinary(new Uint8Array(buffer_arg)); -} - -function serialize_cc_arduino_cli_commands_PlatformUpgradeReq(arg) { - if (!(arg instanceof commands_core_pb.PlatformUpgradeReq)) { - throw new Error('Expected argument of type cc.arduino.cli.commands.PlatformUpgradeReq'); - } - return Buffer.from(arg.serializeBinary()); -} - -function deserialize_cc_arduino_cli_commands_PlatformUpgradeReq(buffer_arg) { - return commands_core_pb.PlatformUpgradeReq.deserializeBinary(new Uint8Array(buffer_arg)); -} - -function serialize_cc_arduino_cli_commands_PlatformUpgradeResp(arg) { - if (!(arg instanceof commands_core_pb.PlatformUpgradeResp)) { - throw new Error('Expected argument of type cc.arduino.cli.commands.PlatformUpgradeResp'); - } - return Buffer.from(arg.serializeBinary()); -} - -function deserialize_cc_arduino_cli_commands_PlatformUpgradeResp(buffer_arg) { - return commands_core_pb.PlatformUpgradeResp.deserializeBinary(new Uint8Array(buffer_arg)); -} - -function serialize_cc_arduino_cli_commands_RescanReq(arg) { - if (!(arg instanceof commands_commands_pb.RescanReq)) { - throw new Error('Expected argument of type cc.arduino.cli.commands.RescanReq'); - } - return Buffer.from(arg.serializeBinary()); -} - -function deserialize_cc_arduino_cli_commands_RescanReq(buffer_arg) { - return commands_commands_pb.RescanReq.deserializeBinary(new Uint8Array(buffer_arg)); -} - -function serialize_cc_arduino_cli_commands_RescanResp(arg) { - if (!(arg instanceof commands_commands_pb.RescanResp)) { - throw new Error('Expected argument of type cc.arduino.cli.commands.RescanResp'); - } - return Buffer.from(arg.serializeBinary()); -} - -function deserialize_cc_arduino_cli_commands_RescanResp(buffer_arg) { - return commands_commands_pb.RescanResp.deserializeBinary(new Uint8Array(buffer_arg)); -} - -function serialize_cc_arduino_cli_commands_UpdateIndexReq(arg) { - if (!(arg instanceof commands_commands_pb.UpdateIndexReq)) { - throw new Error('Expected argument of type cc.arduino.cli.commands.UpdateIndexReq'); - } - return Buffer.from(arg.serializeBinary()); -} - -function deserialize_cc_arduino_cli_commands_UpdateIndexReq(buffer_arg) { - return commands_commands_pb.UpdateIndexReq.deserializeBinary(new Uint8Array(buffer_arg)); -} - -function serialize_cc_arduino_cli_commands_UpdateIndexResp(arg) { - if (!(arg instanceof commands_commands_pb.UpdateIndexResp)) { - throw new Error('Expected argument of type cc.arduino.cli.commands.UpdateIndexResp'); - } - return Buffer.from(arg.serializeBinary()); -} - -function deserialize_cc_arduino_cli_commands_UpdateIndexResp(buffer_arg) { - return commands_commands_pb.UpdateIndexResp.deserializeBinary(new Uint8Array(buffer_arg)); -} - -function serialize_cc_arduino_cli_commands_UpdateLibrariesIndexReq(arg) { - if (!(arg instanceof commands_commands_pb.UpdateLibrariesIndexReq)) { - throw new Error('Expected argument of type cc.arduino.cli.commands.UpdateLibrariesIndexReq'); - } - return Buffer.from(arg.serializeBinary()); -} - -function deserialize_cc_arduino_cli_commands_UpdateLibrariesIndexReq(buffer_arg) { - return commands_commands_pb.UpdateLibrariesIndexReq.deserializeBinary(new Uint8Array(buffer_arg)); -} - -function serialize_cc_arduino_cli_commands_UpdateLibrariesIndexResp(arg) { - if (!(arg instanceof commands_commands_pb.UpdateLibrariesIndexResp)) { - throw new Error('Expected argument of type cc.arduino.cli.commands.UpdateLibrariesIndexResp'); - } - return Buffer.from(arg.serializeBinary()); -} - -function deserialize_cc_arduino_cli_commands_UpdateLibrariesIndexResp(buffer_arg) { - return commands_commands_pb.UpdateLibrariesIndexResp.deserializeBinary(new Uint8Array(buffer_arg)); -} - -function serialize_cc_arduino_cli_commands_UploadReq(arg) { - if (!(arg instanceof commands_upload_pb.UploadReq)) { - throw new Error('Expected argument of type cc.arduino.cli.commands.UploadReq'); - } - return Buffer.from(arg.serializeBinary()); -} - -function deserialize_cc_arduino_cli_commands_UploadReq(buffer_arg) { - return commands_upload_pb.UploadReq.deserializeBinary(new Uint8Array(buffer_arg)); -} - -function serialize_cc_arduino_cli_commands_UploadResp(arg) { - if (!(arg instanceof commands_upload_pb.UploadResp)) { - throw new Error('Expected argument of type cc.arduino.cli.commands.UploadResp'); - } - return Buffer.from(arg.serializeBinary()); -} - -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_VersionReq(arg) { - if (!(arg instanceof commands_commands_pb.VersionReq)) { - throw new Error('Expected argument of type cc.arduino.cli.commands.VersionReq'); - } - return Buffer.from(arg.serializeBinary()); -} - -function deserialize_cc_arduino_cli_commands_VersionReq(buffer_arg) { - return commands_commands_pb.VersionReq.deserializeBinary(new Uint8Array(buffer_arg)); -} - -function serialize_cc_arduino_cli_commands_VersionResp(arg) { - if (!(arg instanceof commands_commands_pb.VersionResp)) { - throw new Error('Expected argument of type cc.arduino.cli.commands.VersionResp'); - } - return Buffer.from(arg.serializeBinary()); -} - -function deserialize_cc_arduino_cli_commands_VersionResp(buffer_arg) { - return commands_commands_pb.VersionResp.deserializeBinary(new Uint8Array(buffer_arg)); -} - - -// The main Arduino Platform Service -var ArduinoCoreService = exports.ArduinoCoreService = { - // Start a new instance of the Arduino Core Service -init: { - path: '/cc.arduino.cli.commands.ArduinoCore/Init', - requestStream: false, - responseStream: true, - requestType: commands_commands_pb.InitReq, - responseType: commands_commands_pb.InitResp, - requestSerialize: serialize_cc_arduino_cli_commands_InitReq, - requestDeserialize: deserialize_cc_arduino_cli_commands_InitReq, - responseSerialize: serialize_cc_arduino_cli_commands_InitResp, - responseDeserialize: deserialize_cc_arduino_cli_commands_InitResp, - }, - // Destroy an instance of the Arduino Core Service -destroy: { - path: '/cc.arduino.cli.commands.ArduinoCore/Destroy', - requestStream: false, - responseStream: false, - requestType: commands_commands_pb.DestroyReq, - responseType: commands_commands_pb.DestroyResp, - requestSerialize: serialize_cc_arduino_cli_commands_DestroyReq, - requestDeserialize: deserialize_cc_arduino_cli_commands_DestroyReq, - responseSerialize: serialize_cc_arduino_cli_commands_DestroyResp, - responseDeserialize: deserialize_cc_arduino_cli_commands_DestroyResp, - }, - // Rescan instance of the Arduino Core Service -rescan: { - path: '/cc.arduino.cli.commands.ArduinoCore/Rescan', - requestStream: false, - responseStream: false, - requestType: commands_commands_pb.RescanReq, - responseType: commands_commands_pb.RescanResp, - requestSerialize: serialize_cc_arduino_cli_commands_RescanReq, - requestDeserialize: deserialize_cc_arduino_cli_commands_RescanReq, - responseSerialize: serialize_cc_arduino_cli_commands_RescanResp, - responseDeserialize: deserialize_cc_arduino_cli_commands_RescanResp, - }, - // Update package index of the Arduino Core Service -updateIndex: { - path: '/cc.arduino.cli.commands.ArduinoCore/UpdateIndex', - requestStream: false, - responseStream: true, - requestType: commands_commands_pb.UpdateIndexReq, - responseType: commands_commands_pb.UpdateIndexResp, - requestSerialize: serialize_cc_arduino_cli_commands_UpdateIndexReq, - requestDeserialize: deserialize_cc_arduino_cli_commands_UpdateIndexReq, - responseSerialize: serialize_cc_arduino_cli_commands_UpdateIndexResp, - responseDeserialize: deserialize_cc_arduino_cli_commands_UpdateIndexResp, - }, - // Update libraries index -updateLibrariesIndex: { - path: '/cc.arduino.cli.commands.ArduinoCore/UpdateLibrariesIndex', - requestStream: false, - responseStream: true, - requestType: commands_commands_pb.UpdateLibrariesIndexReq, - responseType: commands_commands_pb.UpdateLibrariesIndexResp, - requestSerialize: serialize_cc_arduino_cli_commands_UpdateLibrariesIndexReq, - requestDeserialize: deserialize_cc_arduino_cli_commands_UpdateLibrariesIndexReq, - responseSerialize: serialize_cc_arduino_cli_commands_UpdateLibrariesIndexResp, - responseDeserialize: deserialize_cc_arduino_cli_commands_UpdateLibrariesIndexResp, - }, - version: { - path: '/cc.arduino.cli.commands.ArduinoCore/Version', - requestStream: false, - responseStream: false, - requestType: commands_commands_pb.VersionReq, - responseType: commands_commands_pb.VersionResp, - requestSerialize: serialize_cc_arduino_cli_commands_VersionReq, - requestDeserialize: deserialize_cc_arduino_cli_commands_VersionReq, - responseSerialize: serialize_cc_arduino_cli_commands_VersionResp, - responseDeserialize: deserialize_cc_arduino_cli_commands_VersionResp, - }, - // BOARD COMMANDS -// -------------- -// -// Requests details about a board -boardDetails: { - path: '/cc.arduino.cli.commands.ArduinoCore/BoardDetails', - requestStream: false, - responseStream: false, - requestType: commands_board_pb.BoardDetailsReq, - responseType: commands_board_pb.BoardDetailsResp, - requestSerialize: serialize_cc_arduino_cli_commands_BoardDetailsReq, - requestDeserialize: deserialize_cc_arduino_cli_commands_BoardDetailsReq, - responseSerialize: serialize_cc_arduino_cli_commands_BoardDetailsResp, - responseDeserialize: deserialize_cc_arduino_cli_commands_BoardDetailsResp, - }, - boardAttach: { - path: '/cc.arduino.cli.commands.ArduinoCore/BoardAttach', - requestStream: false, - responseStream: true, - requestType: commands_board_pb.BoardAttachReq, - responseType: commands_board_pb.BoardAttachResp, - requestSerialize: serialize_cc_arduino_cli_commands_BoardAttachReq, - requestDeserialize: deserialize_cc_arduino_cli_commands_BoardAttachReq, - responseSerialize: serialize_cc_arduino_cli_commands_BoardAttachResp, - responseDeserialize: deserialize_cc_arduino_cli_commands_BoardAttachResp, - }, - boardList: { - path: '/cc.arduino.cli.commands.ArduinoCore/BoardList', - requestStream: false, - responseStream: false, - requestType: commands_board_pb.BoardListReq, - responseType: commands_board_pb.BoardListResp, - requestSerialize: serialize_cc_arduino_cli_commands_BoardListReq, - requestDeserialize: deserialize_cc_arduino_cli_commands_BoardListReq, - responseSerialize: serialize_cc_arduino_cli_commands_BoardListResp, - responseDeserialize: deserialize_cc_arduino_cli_commands_BoardListResp, - }, - boardListAll: { - path: '/cc.arduino.cli.commands.ArduinoCore/BoardListAll', - requestStream: false, - responseStream: false, - requestType: commands_board_pb.BoardListAllReq, - responseType: commands_board_pb.BoardListAllResp, - requestSerialize: serialize_cc_arduino_cli_commands_BoardListAllReq, - requestDeserialize: deserialize_cc_arduino_cli_commands_BoardListAllReq, - responseSerialize: serialize_cc_arduino_cli_commands_BoardListAllResp, - responseDeserialize: deserialize_cc_arduino_cli_commands_BoardListAllResp, - }, - compile: { - path: '/cc.arduino.cli.commands.ArduinoCore/Compile', - requestStream: false, - responseStream: true, - requestType: commands_compile_pb.CompileReq, - responseType: commands_compile_pb.CompileResp, - requestSerialize: serialize_cc_arduino_cli_commands_CompileReq, - requestDeserialize: deserialize_cc_arduino_cli_commands_CompileReq, - responseSerialize: serialize_cc_arduino_cli_commands_CompileResp, - responseDeserialize: deserialize_cc_arduino_cli_commands_CompileResp, - }, - platformInstall: { - path: '/cc.arduino.cli.commands.ArduinoCore/PlatformInstall', - requestStream: false, - responseStream: true, - requestType: commands_core_pb.PlatformInstallReq, - responseType: commands_core_pb.PlatformInstallResp, - requestSerialize: serialize_cc_arduino_cli_commands_PlatformInstallReq, - requestDeserialize: deserialize_cc_arduino_cli_commands_PlatformInstallReq, - responseSerialize: serialize_cc_arduino_cli_commands_PlatformInstallResp, - responseDeserialize: deserialize_cc_arduino_cli_commands_PlatformInstallResp, - }, - platformDownload: { - path: '/cc.arduino.cli.commands.ArduinoCore/PlatformDownload', - requestStream: false, - responseStream: true, - requestType: commands_core_pb.PlatformDownloadReq, - responseType: commands_core_pb.PlatformDownloadResp, - requestSerialize: serialize_cc_arduino_cli_commands_PlatformDownloadReq, - requestDeserialize: deserialize_cc_arduino_cli_commands_PlatformDownloadReq, - responseSerialize: serialize_cc_arduino_cli_commands_PlatformDownloadResp, - responseDeserialize: deserialize_cc_arduino_cli_commands_PlatformDownloadResp, - }, - platformUninstall: { - path: '/cc.arduino.cli.commands.ArduinoCore/PlatformUninstall', - requestStream: false, - responseStream: true, - requestType: commands_core_pb.PlatformUninstallReq, - responseType: commands_core_pb.PlatformUninstallResp, - requestSerialize: serialize_cc_arduino_cli_commands_PlatformUninstallReq, - requestDeserialize: deserialize_cc_arduino_cli_commands_PlatformUninstallReq, - responseSerialize: serialize_cc_arduino_cli_commands_PlatformUninstallResp, - responseDeserialize: deserialize_cc_arduino_cli_commands_PlatformUninstallResp, - }, - platformUpgrade: { - path: '/cc.arduino.cli.commands.ArduinoCore/PlatformUpgrade', - requestStream: false, - responseStream: true, - requestType: commands_core_pb.PlatformUpgradeReq, - responseType: commands_core_pb.PlatformUpgradeResp, - requestSerialize: serialize_cc_arduino_cli_commands_PlatformUpgradeReq, - requestDeserialize: deserialize_cc_arduino_cli_commands_PlatformUpgradeReq, - responseSerialize: serialize_cc_arduino_cli_commands_PlatformUpgradeResp, - responseDeserialize: deserialize_cc_arduino_cli_commands_PlatformUpgradeResp, - }, - upload: { - path: '/cc.arduino.cli.commands.ArduinoCore/Upload', - requestStream: false, - responseStream: true, - requestType: commands_upload_pb.UploadReq, - responseType: commands_upload_pb.UploadResp, - requestSerialize: serialize_cc_arduino_cli_commands_UploadReq, - requestDeserialize: deserialize_cc_arduino_cli_commands_UploadReq, - responseSerialize: serialize_cc_arduino_cli_commands_UploadResp, - responseDeserialize: deserialize_cc_arduino_cli_commands_UploadResp, - }, - platformSearch: { - path: '/cc.arduino.cli.commands.ArduinoCore/PlatformSearch', - requestStream: false, - responseStream: false, - requestType: commands_core_pb.PlatformSearchReq, - responseType: commands_core_pb.PlatformSearchResp, - requestSerialize: serialize_cc_arduino_cli_commands_PlatformSearchReq, - requestDeserialize: deserialize_cc_arduino_cli_commands_PlatformSearchReq, - responseSerialize: serialize_cc_arduino_cli_commands_PlatformSearchResp, - responseDeserialize: deserialize_cc_arduino_cli_commands_PlatformSearchResp, - }, - platformList: { - path: '/cc.arduino.cli.commands.ArduinoCore/PlatformList', - requestStream: false, - responseStream: false, - requestType: commands_core_pb.PlatformListReq, - responseType: commands_core_pb.PlatformListResp, - requestSerialize: serialize_cc_arduino_cli_commands_PlatformListReq, - requestDeserialize: deserialize_cc_arduino_cli_commands_PlatformListReq, - responseSerialize: serialize_cc_arduino_cli_commands_PlatformListResp, - responseDeserialize: deserialize_cc_arduino_cli_commands_PlatformListResp, - }, - libraryDownload: { - path: '/cc.arduino.cli.commands.ArduinoCore/LibraryDownload', - requestStream: false, - responseStream: true, - requestType: commands_lib_pb.LibraryDownloadReq, - responseType: commands_lib_pb.LibraryDownloadResp, - requestSerialize: serialize_cc_arduino_cli_commands_LibraryDownloadReq, - requestDeserialize: deserialize_cc_arduino_cli_commands_LibraryDownloadReq, - responseSerialize: serialize_cc_arduino_cli_commands_LibraryDownloadResp, - responseDeserialize: deserialize_cc_arduino_cli_commands_LibraryDownloadResp, - }, - libraryInstall: { - path: '/cc.arduino.cli.commands.ArduinoCore/LibraryInstall', - requestStream: false, - responseStream: true, - requestType: commands_lib_pb.LibraryInstallReq, - responseType: commands_lib_pb.LibraryInstallResp, - requestSerialize: serialize_cc_arduino_cli_commands_LibraryInstallReq, - requestDeserialize: deserialize_cc_arduino_cli_commands_LibraryInstallReq, - responseSerialize: serialize_cc_arduino_cli_commands_LibraryInstallResp, - responseDeserialize: deserialize_cc_arduino_cli_commands_LibraryInstallResp, - }, - libraryUninstall: { - path: '/cc.arduino.cli.commands.ArduinoCore/LibraryUninstall', - requestStream: false, - responseStream: true, - requestType: commands_lib_pb.LibraryUninstallReq, - responseType: commands_lib_pb.LibraryUninstallResp, - requestSerialize: serialize_cc_arduino_cli_commands_LibraryUninstallReq, - requestDeserialize: deserialize_cc_arduino_cli_commands_LibraryUninstallReq, - responseSerialize: serialize_cc_arduino_cli_commands_LibraryUninstallResp, - responseDeserialize: deserialize_cc_arduino_cli_commands_LibraryUninstallResp, - }, - libraryUpgradeAll: { - path: '/cc.arduino.cli.commands.ArduinoCore/LibraryUpgradeAll', - requestStream: false, - responseStream: true, - requestType: commands_lib_pb.LibraryUpgradeAllReq, - responseType: commands_lib_pb.LibraryUpgradeAllResp, - requestSerialize: serialize_cc_arduino_cli_commands_LibraryUpgradeAllReq, - requestDeserialize: deserialize_cc_arduino_cli_commands_LibraryUpgradeAllReq, - responseSerialize: serialize_cc_arduino_cli_commands_LibraryUpgradeAllResp, - responseDeserialize: deserialize_cc_arduino_cli_commands_LibraryUpgradeAllResp, - }, - libraryResolveDependencies: { - path: '/cc.arduino.cli.commands.ArduinoCore/LibraryResolveDependencies', - requestStream: false, - responseStream: false, - requestType: commands_lib_pb.LibraryResolveDependenciesReq, - responseType: commands_lib_pb.LibraryResolveDependenciesResp, - requestSerialize: serialize_cc_arduino_cli_commands_LibraryResolveDependenciesReq, - requestDeserialize: deserialize_cc_arduino_cli_commands_LibraryResolveDependenciesReq, - responseSerialize: serialize_cc_arduino_cli_commands_LibraryResolveDependenciesResp, - responseDeserialize: deserialize_cc_arduino_cli_commands_LibraryResolveDependenciesResp, - }, - librarySearch: { - path: '/cc.arduino.cli.commands.ArduinoCore/LibrarySearch', - requestStream: false, - responseStream: false, - requestType: commands_lib_pb.LibrarySearchReq, - responseType: commands_lib_pb.LibrarySearchResp, - requestSerialize: serialize_cc_arduino_cli_commands_LibrarySearchReq, - requestDeserialize: deserialize_cc_arduino_cli_commands_LibrarySearchReq, - responseSerialize: serialize_cc_arduino_cli_commands_LibrarySearchResp, - responseDeserialize: deserialize_cc_arduino_cli_commands_LibrarySearchResp, - }, - libraryList: { - path: '/cc.arduino.cli.commands.ArduinoCore/LibraryList', - requestStream: false, - responseStream: false, - requestType: commands_lib_pb.LibraryListReq, - responseType: commands_lib_pb.LibraryListResp, - requestSerialize: serialize_cc_arduino_cli_commands_LibraryListReq, - requestDeserialize: deserialize_cc_arduino_cli_commands_LibraryListReq, - responseSerialize: serialize_cc_arduino_cli_commands_LibraryListResp, - responseDeserialize: deserialize_cc_arduino_cli_commands_LibraryListResp, - }, -}; - -exports.ArduinoCoreClient = grpc.makeGenericClientConstructor(ArduinoCoreService); -// BOOTSTRAP COMMANDS -// ------------------- 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 deleted file mode 100644 index c414a765..00000000 --- a/arduino-ide-extension/src/node/cli-protocol/commands/commands_pb.d.ts +++ /dev/null @@ -1,308 +0,0 @@ -// package: cc.arduino.cli.commands -// file: commands/commands.proto - -/* tslint:disable */ -/* eslint-disable */ - -import * as jspb from "google-protobuf"; -import * as commands_common_pb from "../commands/common_pb"; -import * as commands_board_pb from "../commands/board_pb"; -import * as commands_compile_pb from "../commands/compile_pb"; -import * as commands_core_pb from "../commands/core_pb"; -import * as commands_upload_pb from "../commands/upload_pb"; -import * as commands_lib_pb from "../commands/lib_pb"; - -export class InitReq extends jspb.Message { - getLibraryManagerOnly(): boolean; - setLibraryManagerOnly(value: boolean): void; - - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): InitReq.AsObject; - static toObject(includeInstance: boolean, msg: InitReq): InitReq.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: InitReq, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): InitReq; - static deserializeBinaryFromReader(message: InitReq, reader: jspb.BinaryReader): InitReq; -} - -export namespace InitReq { - export type AsObject = { - libraryManagerOnly: boolean, - } -} - -export class InitResp extends jspb.Message { - - hasInstance(): boolean; - clearInstance(): void; - getInstance(): commands_common_pb.Instance | undefined; - setInstance(value?: commands_common_pb.Instance): void; - - clearPlatformsIndexErrorsList(): void; - getPlatformsIndexErrorsList(): Array; - setPlatformsIndexErrorsList(value: Array): void; - addPlatformsIndexErrors(value: string, index?: number): string; - - getLibrariesIndexError(): string; - setLibrariesIndexError(value: string): void; - - - hasDownloadProgress(): boolean; - clearDownloadProgress(): void; - getDownloadProgress(): commands_common_pb.DownloadProgress | undefined; - setDownloadProgress(value?: commands_common_pb.DownloadProgress): void; - - - hasTaskProgress(): boolean; - clearTaskProgress(): void; - getTaskProgress(): commands_common_pb.TaskProgress | undefined; - setTaskProgress(value?: commands_common_pb.TaskProgress): void; - - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): InitResp.AsObject; - static toObject(includeInstance: boolean, msg: InitResp): InitResp.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: InitResp, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): InitResp; - static deserializeBinaryFromReader(message: InitResp, reader: jspb.BinaryReader): InitResp; -} - -export namespace InitResp { - export type AsObject = { - instance?: commands_common_pb.Instance.AsObject, - platformsIndexErrorsList: Array, - librariesIndexError: string, - downloadProgress?: commands_common_pb.DownloadProgress.AsObject, - taskProgress?: commands_common_pb.TaskProgress.AsObject, - } -} - -export class DestroyReq extends jspb.Message { - - hasInstance(): boolean; - clearInstance(): void; - getInstance(): commands_common_pb.Instance | undefined; - setInstance(value?: commands_common_pb.Instance): void; - - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): DestroyReq.AsObject; - static toObject(includeInstance: boolean, msg: DestroyReq): DestroyReq.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: DestroyReq, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): DestroyReq; - static deserializeBinaryFromReader(message: DestroyReq, reader: jspb.BinaryReader): DestroyReq; -} - -export namespace DestroyReq { - export type AsObject = { - instance?: commands_common_pb.Instance.AsObject, - } -} - -export class DestroyResp extends jspb.Message { - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): DestroyResp.AsObject; - static toObject(includeInstance: boolean, msg: DestroyResp): DestroyResp.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: DestroyResp, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): DestroyResp; - static deserializeBinaryFromReader(message: DestroyResp, reader: jspb.BinaryReader): DestroyResp; -} - -export namespace DestroyResp { - export type AsObject = { - } -} - -export class RescanReq extends jspb.Message { - - hasInstance(): boolean; - clearInstance(): void; - getInstance(): commands_common_pb.Instance | undefined; - setInstance(value?: commands_common_pb.Instance): void; - - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): RescanReq.AsObject; - static toObject(includeInstance: boolean, msg: RescanReq): RescanReq.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: RescanReq, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): RescanReq; - static deserializeBinaryFromReader(message: RescanReq, reader: jspb.BinaryReader): RescanReq; -} - -export namespace RescanReq { - export type AsObject = { - instance?: commands_common_pb.Instance.AsObject, - } -} - -export class RescanResp extends jspb.Message { - clearPlatformsIndexErrorsList(): void; - getPlatformsIndexErrorsList(): Array; - setPlatformsIndexErrorsList(value: Array): void; - addPlatformsIndexErrors(value: string, index?: number): string; - - getLibrariesIndexError(): string; - setLibrariesIndexError(value: string): void; - - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): RescanResp.AsObject; - static toObject(includeInstance: boolean, msg: RescanResp): RescanResp.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: RescanResp, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): RescanResp; - static deserializeBinaryFromReader(message: RescanResp, reader: jspb.BinaryReader): RescanResp; -} - -export namespace RescanResp { - export type AsObject = { - platformsIndexErrorsList: Array, - librariesIndexError: string, - } -} - -export class UpdateIndexReq extends jspb.Message { - - hasInstance(): boolean; - clearInstance(): void; - getInstance(): commands_common_pb.Instance | undefined; - setInstance(value?: commands_common_pb.Instance): void; - - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): UpdateIndexReq.AsObject; - static toObject(includeInstance: boolean, msg: UpdateIndexReq): UpdateIndexReq.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: UpdateIndexReq, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): UpdateIndexReq; - static deserializeBinaryFromReader(message: UpdateIndexReq, reader: jspb.BinaryReader): UpdateIndexReq; -} - -export namespace UpdateIndexReq { - export type AsObject = { - instance?: commands_common_pb.Instance.AsObject, - } -} - -export class UpdateIndexResp extends jspb.Message { - - hasDownloadProgress(): boolean; - clearDownloadProgress(): void; - getDownloadProgress(): commands_common_pb.DownloadProgress | undefined; - setDownloadProgress(value?: commands_common_pb.DownloadProgress): void; - - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): UpdateIndexResp.AsObject; - static toObject(includeInstance: boolean, msg: UpdateIndexResp): UpdateIndexResp.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: UpdateIndexResp, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): UpdateIndexResp; - static deserializeBinaryFromReader(message: UpdateIndexResp, reader: jspb.BinaryReader): UpdateIndexResp; -} - -export namespace UpdateIndexResp { - export type AsObject = { - downloadProgress?: commands_common_pb.DownloadProgress.AsObject, - } -} - -export class UpdateLibrariesIndexReq extends jspb.Message { - - hasInstance(): boolean; - clearInstance(): void; - getInstance(): commands_common_pb.Instance | undefined; - setInstance(value?: commands_common_pb.Instance): void; - - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): UpdateLibrariesIndexReq.AsObject; - static toObject(includeInstance: boolean, msg: UpdateLibrariesIndexReq): UpdateLibrariesIndexReq.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: UpdateLibrariesIndexReq, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): UpdateLibrariesIndexReq; - static deserializeBinaryFromReader(message: UpdateLibrariesIndexReq, reader: jspb.BinaryReader): UpdateLibrariesIndexReq; -} - -export namespace UpdateLibrariesIndexReq { - export type AsObject = { - instance?: commands_common_pb.Instance.AsObject, - } -} - -export class UpdateLibrariesIndexResp extends jspb.Message { - - hasDownloadProgress(): boolean; - clearDownloadProgress(): void; - getDownloadProgress(): commands_common_pb.DownloadProgress | undefined; - setDownloadProgress(value?: commands_common_pb.DownloadProgress): void; - - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): UpdateLibrariesIndexResp.AsObject; - static toObject(includeInstance: boolean, msg: UpdateLibrariesIndexResp): UpdateLibrariesIndexResp.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: UpdateLibrariesIndexResp, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): UpdateLibrariesIndexResp; - static deserializeBinaryFromReader(message: UpdateLibrariesIndexResp, reader: jspb.BinaryReader): UpdateLibrariesIndexResp; -} - -export namespace UpdateLibrariesIndexResp { - export type AsObject = { - downloadProgress?: commands_common_pb.DownloadProgress.AsObject, - } -} - -export class VersionReq extends jspb.Message { - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): VersionReq.AsObject; - static toObject(includeInstance: boolean, msg: VersionReq): VersionReq.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: VersionReq, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): VersionReq; - static deserializeBinaryFromReader(message: VersionReq, reader: jspb.BinaryReader): VersionReq; -} - -export namespace VersionReq { - export type AsObject = { - } -} - -export class VersionResp extends jspb.Message { - getVersion(): string; - setVersion(value: string): void; - - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): VersionResp.AsObject; - static toObject(includeInstance: boolean, msg: VersionResp): VersionResp.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: VersionResp, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): VersionResp; - static deserializeBinaryFromReader(message: VersionResp, reader: jspb.BinaryReader): VersionResp; -} - -export namespace VersionResp { - export type AsObject = { - version: string, - } -} 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 deleted file mode 100644 index 16849da5..00000000 --- a/arduino-ide-extension/src/node/cli-protocol/commands/commands_pb.js +++ /dev/null @@ -1,2022 +0,0 @@ -/** - * @fileoverview - * @enhanceable - * @suppress {messageConventions} JS Compiler reports an error if a variable or - * field starts with 'MSG_' and isn't a translatable message. - * @public - */ -// GENERATED CODE -- DO NOT EDIT! - -var jspb = require('google-protobuf'); -var goog = jspb; -var global = Function('return this')(); - -var commands_common_pb = require('../commands/common_pb.js'); -goog.object.extend(proto, commands_common_pb); -var commands_board_pb = require('../commands/board_pb.js'); -goog.object.extend(proto, commands_board_pb); -var commands_compile_pb = require('../commands/compile_pb.js'); -goog.object.extend(proto, commands_compile_pb); -var commands_core_pb = require('../commands/core_pb.js'); -goog.object.extend(proto, commands_core_pb); -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.DestroyReq', null, global); -goog.exportSymbol('proto.cc.arduino.cli.commands.DestroyResp', null, global); -goog.exportSymbol('proto.cc.arduino.cli.commands.InitReq', null, global); -goog.exportSymbol('proto.cc.arduino.cli.commands.InitResp', null, global); -goog.exportSymbol('proto.cc.arduino.cli.commands.RescanReq', null, global); -goog.exportSymbol('proto.cc.arduino.cli.commands.RescanResp', null, global); -goog.exportSymbol('proto.cc.arduino.cli.commands.UpdateIndexReq', null, global); -goog.exportSymbol('proto.cc.arduino.cli.commands.UpdateIndexResp', null, global); -goog.exportSymbol('proto.cc.arduino.cli.commands.UpdateLibrariesIndexReq', null, global); -goog.exportSymbol('proto.cc.arduino.cli.commands.UpdateLibrariesIndexResp', null, global); -goog.exportSymbol('proto.cc.arduino.cli.commands.VersionReq', null, global); -goog.exportSymbol('proto.cc.arduino.cli.commands.VersionResp', null, global); - -/** - * 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.InitReq = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.cc.arduino.cli.commands.InitReq, jspb.Message); -if (goog.DEBUG && !COMPILED) { - proto.cc.arduino.cli.commands.InitReq.displayName = 'proto.cc.arduino.cli.commands.InitReq'; -} - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto suitable for use in Soy templates. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration - * @return {!Object} - */ -proto.cc.arduino.cli.commands.InitReq.prototype.toObject = function(opt_includeInstance) { - return proto.cc.arduino.cli.commands.InitReq.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.cc.arduino.cli.commands.InitReq} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.cc.arduino.cli.commands.InitReq.toObject = function(includeInstance, msg) { - var f, obj = { - libraryManagerOnly: jspb.Message.getFieldWithDefault(msg, 2, 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.InitReq} - */ -proto.cc.arduino.cli.commands.InitReq.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.cc.arduino.cli.commands.InitReq; - return proto.cc.arduino.cli.commands.InitReq.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.InitReq} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.cc.arduino.cli.commands.InitReq} - */ -proto.cc.arduino.cli.commands.InitReq.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 2: - var value = /** @type {boolean} */ (reader.readBool()); - msg.setLibraryManagerOnly(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.InitReq.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.cc.arduino.cli.commands.InitReq.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.InitReq} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.cc.arduino.cli.commands.InitReq.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getLibraryManagerOnly(); - if (f) { - writer.writeBool( - 2, - f - ); - } -}; - - -/** - * optional bool library_manager_only = 2; - * Note that Boolean fields may be set to 0/1 when serialized from a Java server. - * You should avoid comparisons like {@code val === true/false} in those cases. - * @return {boolean} - */ -proto.cc.arduino.cli.commands.InitReq.prototype.getLibraryManagerOnly = function() { - return /** @type {boolean} */ (jspb.Message.getFieldWithDefault(this, 2, false)); -}; - - -/** @param {boolean} value */ -proto.cc.arduino.cli.commands.InitReq.prototype.setLibraryManagerOnly = function(value) { - jspb.Message.setProto3BooleanField(this, 2, value); -}; - - - -/** - * 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.InitResp = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.cc.arduino.cli.commands.InitResp.repeatedFields_, null); -}; -goog.inherits(proto.cc.arduino.cli.commands.InitResp, jspb.Message); -if (goog.DEBUG && !COMPILED) { - proto.cc.arduino.cli.commands.InitResp.displayName = 'proto.cc.arduino.cli.commands.InitResp'; -} -/** - * List of repeated fields within this message type. - * @private {!Array} - * @const - */ -proto.cc.arduino.cli.commands.InitResp.repeatedFields_ = [2]; - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto suitable for use in Soy templates. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration - * @return {!Object} - */ -proto.cc.arduino.cli.commands.InitResp.prototype.toObject = function(opt_includeInstance) { - return proto.cc.arduino.cli.commands.InitResp.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.cc.arduino.cli.commands.InitResp} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.cc.arduino.cli.commands.InitResp.toObject = function(includeInstance, msg) { - var f, obj = { - instance: (f = msg.getInstance()) && commands_common_pb.Instance.toObject(includeInstance, f), - platformsIndexErrorsList: jspb.Message.getRepeatedField(msg, 2), - librariesIndexError: jspb.Message.getFieldWithDefault(msg, 3, ""), - downloadProgress: (f = msg.getDownloadProgress()) && commands_common_pb.DownloadProgress.toObject(includeInstance, f), - taskProgress: (f = msg.getTaskProgress()) && commands_common_pb.TaskProgress.toObject(includeInstance, f) - }; - - 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.InitResp} - */ -proto.cc.arduino.cli.commands.InitResp.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.cc.arduino.cli.commands.InitResp; - return proto.cc.arduino.cli.commands.InitResp.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.InitResp} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.cc.arduino.cli.commands.InitResp} - */ -proto.cc.arduino.cli.commands.InitResp.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.addPlatformsIndexErrors(value); - break; - case 3: - var value = /** @type {string} */ (reader.readString()); - msg.setLibrariesIndexError(value); - break; - case 4: - var value = new commands_common_pb.DownloadProgress; - reader.readMessage(value,commands_common_pb.DownloadProgress.deserializeBinaryFromReader); - msg.setDownloadProgress(value); - break; - case 5: - var value = new commands_common_pb.TaskProgress; - reader.readMessage(value,commands_common_pb.TaskProgress.deserializeBinaryFromReader); - msg.setTaskProgress(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.InitResp.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.cc.arduino.cli.commands.InitResp.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.InitResp} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.cc.arduino.cli.commands.InitResp.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getInstance(); - if (f != null) { - writer.writeMessage( - 1, - f, - commands_common_pb.Instance.serializeBinaryToWriter - ); - } - f = message.getPlatformsIndexErrorsList(); - if (f.length > 0) { - writer.writeRepeatedString( - 2, - f - ); - } - f = message.getLibrariesIndexError(); - if (f.length > 0) { - writer.writeString( - 3, - f - ); - } - f = message.getDownloadProgress(); - if (f != null) { - writer.writeMessage( - 4, - f, - commands_common_pb.DownloadProgress.serializeBinaryToWriter - ); - } - f = message.getTaskProgress(); - if (f != null) { - writer.writeMessage( - 5, - f, - commands_common_pb.TaskProgress.serializeBinaryToWriter - ); - } -}; - - -/** - * optional Instance instance = 1; - * @return {?proto.cc.arduino.cli.commands.Instance} - */ -proto.cc.arduino.cli.commands.InitResp.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 */ -proto.cc.arduino.cli.commands.InitResp.prototype.setInstance = function(value) { - jspb.Message.setWrapperField(this, 1, value); -}; - - -proto.cc.arduino.cli.commands.InitResp.prototype.clearInstance = function() { - this.setInstance(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.cc.arduino.cli.commands.InitResp.prototype.hasInstance = function() { - return jspb.Message.getField(this, 1) != null; -}; - - -/** - * repeated string platforms_index_errors = 2; - * @return {!Array} - */ -proto.cc.arduino.cli.commands.InitResp.prototype.getPlatformsIndexErrorsList = function() { - return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 2)); -}; - - -/** @param {!Array} value */ -proto.cc.arduino.cli.commands.InitResp.prototype.setPlatformsIndexErrorsList = function(value) { - jspb.Message.setField(this, 2, value || []); -}; - - -/** - * @param {string} value - * @param {number=} opt_index - */ -proto.cc.arduino.cli.commands.InitResp.prototype.addPlatformsIndexErrors = function(value, opt_index) { - jspb.Message.addToRepeatedField(this, 2, value, opt_index); -}; - - -proto.cc.arduino.cli.commands.InitResp.prototype.clearPlatformsIndexErrorsList = function() { - this.setPlatformsIndexErrorsList([]); -}; - - -/** - * optional string libraries_index_error = 3; - * @return {string} - */ -proto.cc.arduino.cli.commands.InitResp.prototype.getLibrariesIndexError = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); -}; - - -/** @param {string} value */ -proto.cc.arduino.cli.commands.InitResp.prototype.setLibrariesIndexError = function(value) { - jspb.Message.setProto3StringField(this, 3, value); -}; - - -/** - * optional DownloadProgress download_progress = 4; - * @return {?proto.cc.arduino.cli.commands.DownloadProgress} - */ -proto.cc.arduino.cli.commands.InitResp.prototype.getDownloadProgress = function() { - return /** @type{?proto.cc.arduino.cli.commands.DownloadProgress} */ ( - jspb.Message.getWrapperField(this, commands_common_pb.DownloadProgress, 4)); -}; - - -/** @param {?proto.cc.arduino.cli.commands.DownloadProgress|undefined} value */ -proto.cc.arduino.cli.commands.InitResp.prototype.setDownloadProgress = function(value) { - jspb.Message.setWrapperField(this, 4, value); -}; - - -proto.cc.arduino.cli.commands.InitResp.prototype.clearDownloadProgress = function() { - this.setDownloadProgress(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.cc.arduino.cli.commands.InitResp.prototype.hasDownloadProgress = function() { - return jspb.Message.getField(this, 4) != null; -}; - - -/** - * optional TaskProgress task_progress = 5; - * @return {?proto.cc.arduino.cli.commands.TaskProgress} - */ -proto.cc.arduino.cli.commands.InitResp.prototype.getTaskProgress = function() { - return /** @type{?proto.cc.arduino.cli.commands.TaskProgress} */ ( - jspb.Message.getWrapperField(this, commands_common_pb.TaskProgress, 5)); -}; - - -/** @param {?proto.cc.arduino.cli.commands.TaskProgress|undefined} value */ -proto.cc.arduino.cli.commands.InitResp.prototype.setTaskProgress = function(value) { - jspb.Message.setWrapperField(this, 5, value); -}; - - -proto.cc.arduino.cli.commands.InitResp.prototype.clearTaskProgress = function() { - this.setTaskProgress(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.cc.arduino.cli.commands.InitResp.prototype.hasTaskProgress = function() { - return jspb.Message.getField(this, 5) != null; -}; - - - -/** - * 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.DestroyReq = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.cc.arduino.cli.commands.DestroyReq, jspb.Message); -if (goog.DEBUG && !COMPILED) { - proto.cc.arduino.cli.commands.DestroyReq.displayName = 'proto.cc.arduino.cli.commands.DestroyReq'; -} - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto suitable for use in Soy templates. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration - * @return {!Object} - */ -proto.cc.arduino.cli.commands.DestroyReq.prototype.toObject = function(opt_includeInstance) { - return proto.cc.arduino.cli.commands.DestroyReq.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.cc.arduino.cli.commands.DestroyReq} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.cc.arduino.cli.commands.DestroyReq.toObject = function(includeInstance, msg) { - var f, obj = { - instance: (f = msg.getInstance()) && commands_common_pb.Instance.toObject(includeInstance, f) - }; - - 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.DestroyReq} - */ -proto.cc.arduino.cli.commands.DestroyReq.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.cc.arduino.cli.commands.DestroyReq; - return proto.cc.arduino.cli.commands.DestroyReq.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.DestroyReq} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.cc.arduino.cli.commands.DestroyReq} - */ -proto.cc.arduino.cli.commands.DestroyReq.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; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.cc.arduino.cli.commands.DestroyReq.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.cc.arduino.cli.commands.DestroyReq.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.DestroyReq} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.cc.arduino.cli.commands.DestroyReq.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getInstance(); - if (f != null) { - writer.writeMessage( - 1, - f, - commands_common_pb.Instance.serializeBinaryToWriter - ); - } -}; - - -/** - * optional Instance instance = 1; - * @return {?proto.cc.arduino.cli.commands.Instance} - */ -proto.cc.arduino.cli.commands.DestroyReq.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 */ -proto.cc.arduino.cli.commands.DestroyReq.prototype.setInstance = function(value) { - jspb.Message.setWrapperField(this, 1, value); -}; - - -proto.cc.arduino.cli.commands.DestroyReq.prototype.clearInstance = function() { - this.setInstance(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.cc.arduino.cli.commands.DestroyReq.prototype.hasInstance = function() { - return jspb.Message.getField(this, 1) != null; -}; - - - -/** - * 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.DestroyResp = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.cc.arduino.cli.commands.DestroyResp, jspb.Message); -if (goog.DEBUG && !COMPILED) { - proto.cc.arduino.cli.commands.DestroyResp.displayName = 'proto.cc.arduino.cli.commands.DestroyResp'; -} - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto suitable for use in Soy templates. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration - * @return {!Object} - */ -proto.cc.arduino.cli.commands.DestroyResp.prototype.toObject = function(opt_includeInstance) { - return proto.cc.arduino.cli.commands.DestroyResp.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.cc.arduino.cli.commands.DestroyResp} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.cc.arduino.cli.commands.DestroyResp.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.DestroyResp} - */ -proto.cc.arduino.cli.commands.DestroyResp.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.cc.arduino.cli.commands.DestroyResp; - return proto.cc.arduino.cli.commands.DestroyResp.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.DestroyResp} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.cc.arduino.cli.commands.DestroyResp} - */ -proto.cc.arduino.cli.commands.DestroyResp.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.DestroyResp.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.cc.arduino.cli.commands.DestroyResp.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.DestroyResp} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.cc.arduino.cli.commands.DestroyResp.serializeBinaryToWriter = function(message, writer) { - var f = undefined; -}; - - - -/** - * 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.RescanReq = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.cc.arduino.cli.commands.RescanReq, jspb.Message); -if (goog.DEBUG && !COMPILED) { - proto.cc.arduino.cli.commands.RescanReq.displayName = 'proto.cc.arduino.cli.commands.RescanReq'; -} - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto suitable for use in Soy templates. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration - * @return {!Object} - */ -proto.cc.arduino.cli.commands.RescanReq.prototype.toObject = function(opt_includeInstance) { - return proto.cc.arduino.cli.commands.RescanReq.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.cc.arduino.cli.commands.RescanReq} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.cc.arduino.cli.commands.RescanReq.toObject = function(includeInstance, msg) { - var f, obj = { - instance: (f = msg.getInstance()) && commands_common_pb.Instance.toObject(includeInstance, f) - }; - - 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.RescanReq} - */ -proto.cc.arduino.cli.commands.RescanReq.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.cc.arduino.cli.commands.RescanReq; - return proto.cc.arduino.cli.commands.RescanReq.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.RescanReq} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.cc.arduino.cli.commands.RescanReq} - */ -proto.cc.arduino.cli.commands.RescanReq.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; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.cc.arduino.cli.commands.RescanReq.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.cc.arduino.cli.commands.RescanReq.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.RescanReq} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.cc.arduino.cli.commands.RescanReq.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getInstance(); - if (f != null) { - writer.writeMessage( - 1, - f, - commands_common_pb.Instance.serializeBinaryToWriter - ); - } -}; - - -/** - * optional Instance instance = 1; - * @return {?proto.cc.arduino.cli.commands.Instance} - */ -proto.cc.arduino.cli.commands.RescanReq.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 */ -proto.cc.arduino.cli.commands.RescanReq.prototype.setInstance = function(value) { - jspb.Message.setWrapperField(this, 1, value); -}; - - -proto.cc.arduino.cli.commands.RescanReq.prototype.clearInstance = function() { - this.setInstance(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.cc.arduino.cli.commands.RescanReq.prototype.hasInstance = function() { - return jspb.Message.getField(this, 1) != null; -}; - - - -/** - * 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.RescanResp = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.cc.arduino.cli.commands.RescanResp.repeatedFields_, null); -}; -goog.inherits(proto.cc.arduino.cli.commands.RescanResp, jspb.Message); -if (goog.DEBUG && !COMPILED) { - proto.cc.arduino.cli.commands.RescanResp.displayName = 'proto.cc.arduino.cli.commands.RescanResp'; -} -/** - * List of repeated fields within this message type. - * @private {!Array} - * @const - */ -proto.cc.arduino.cli.commands.RescanResp.repeatedFields_ = [1]; - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto suitable for use in Soy templates. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration - * @return {!Object} - */ -proto.cc.arduino.cli.commands.RescanResp.prototype.toObject = function(opt_includeInstance) { - return proto.cc.arduino.cli.commands.RescanResp.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.cc.arduino.cli.commands.RescanResp} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.cc.arduino.cli.commands.RescanResp.toObject = function(includeInstance, msg) { - var f, obj = { - platformsIndexErrorsList: jspb.Message.getRepeatedField(msg, 1), - librariesIndexError: jspb.Message.getFieldWithDefault(msg, 2, "") - }; - - 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.RescanResp} - */ -proto.cc.arduino.cli.commands.RescanResp.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.cc.arduino.cli.commands.RescanResp; - return proto.cc.arduino.cli.commands.RescanResp.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.RescanResp} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.cc.arduino.cli.commands.RescanResp} - */ -proto.cc.arduino.cli.commands.RescanResp.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.addPlatformsIndexErrors(value); - break; - case 2: - var value = /** @type {string} */ (reader.readString()); - msg.setLibrariesIndexError(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.RescanResp.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.cc.arduino.cli.commands.RescanResp.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.RescanResp} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.cc.arduino.cli.commands.RescanResp.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getPlatformsIndexErrorsList(); - if (f.length > 0) { - writer.writeRepeatedString( - 1, - f - ); - } - f = message.getLibrariesIndexError(); - if (f.length > 0) { - writer.writeString( - 2, - f - ); - } -}; - - -/** - * repeated string platforms_index_errors = 1; - * @return {!Array} - */ -proto.cc.arduino.cli.commands.RescanResp.prototype.getPlatformsIndexErrorsList = function() { - return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 1)); -}; - - -/** @param {!Array} value */ -proto.cc.arduino.cli.commands.RescanResp.prototype.setPlatformsIndexErrorsList = function(value) { - jspb.Message.setField(this, 1, value || []); -}; - - -/** - * @param {string} value - * @param {number=} opt_index - */ -proto.cc.arduino.cli.commands.RescanResp.prototype.addPlatformsIndexErrors = function(value, opt_index) { - jspb.Message.addToRepeatedField(this, 1, value, opt_index); -}; - - -proto.cc.arduino.cli.commands.RescanResp.prototype.clearPlatformsIndexErrorsList = function() { - this.setPlatformsIndexErrorsList([]); -}; - - -/** - * optional string libraries_index_error = 2; - * @return {string} - */ -proto.cc.arduino.cli.commands.RescanResp.prototype.getLibrariesIndexError = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); -}; - - -/** @param {string} value */ -proto.cc.arduino.cli.commands.RescanResp.prototype.setLibrariesIndexError = function(value) { - jspb.Message.setProto3StringField(this, 2, value); -}; - - - -/** - * 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.UpdateIndexReq = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.cc.arduino.cli.commands.UpdateIndexReq, jspb.Message); -if (goog.DEBUG && !COMPILED) { - proto.cc.arduino.cli.commands.UpdateIndexReq.displayName = 'proto.cc.arduino.cli.commands.UpdateIndexReq'; -} - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto suitable for use in Soy templates. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration - * @return {!Object} - */ -proto.cc.arduino.cli.commands.UpdateIndexReq.prototype.toObject = function(opt_includeInstance) { - return proto.cc.arduino.cli.commands.UpdateIndexReq.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.cc.arduino.cli.commands.UpdateIndexReq} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.cc.arduino.cli.commands.UpdateIndexReq.toObject = function(includeInstance, msg) { - var f, obj = { - instance: (f = msg.getInstance()) && commands_common_pb.Instance.toObject(includeInstance, f) - }; - - 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.UpdateIndexReq} - */ -proto.cc.arduino.cli.commands.UpdateIndexReq.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.cc.arduino.cli.commands.UpdateIndexReq; - return proto.cc.arduino.cli.commands.UpdateIndexReq.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.UpdateIndexReq} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.cc.arduino.cli.commands.UpdateIndexReq} - */ -proto.cc.arduino.cli.commands.UpdateIndexReq.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; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.cc.arduino.cli.commands.UpdateIndexReq.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.cc.arduino.cli.commands.UpdateIndexReq.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.UpdateIndexReq} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.cc.arduino.cli.commands.UpdateIndexReq.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getInstance(); - if (f != null) { - writer.writeMessage( - 1, - f, - commands_common_pb.Instance.serializeBinaryToWriter - ); - } -}; - - -/** - * optional Instance instance = 1; - * @return {?proto.cc.arduino.cli.commands.Instance} - */ -proto.cc.arduino.cli.commands.UpdateIndexReq.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 */ -proto.cc.arduino.cli.commands.UpdateIndexReq.prototype.setInstance = function(value) { - jspb.Message.setWrapperField(this, 1, value); -}; - - -proto.cc.arduino.cli.commands.UpdateIndexReq.prototype.clearInstance = function() { - this.setInstance(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.cc.arduino.cli.commands.UpdateIndexReq.prototype.hasInstance = function() { - return jspb.Message.getField(this, 1) != null; -}; - - - -/** - * 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.UpdateIndexResp = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.cc.arduino.cli.commands.UpdateIndexResp, jspb.Message); -if (goog.DEBUG && !COMPILED) { - proto.cc.arduino.cli.commands.UpdateIndexResp.displayName = 'proto.cc.arduino.cli.commands.UpdateIndexResp'; -} - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto suitable for use in Soy templates. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration - * @return {!Object} - */ -proto.cc.arduino.cli.commands.UpdateIndexResp.prototype.toObject = function(opt_includeInstance) { - return proto.cc.arduino.cli.commands.UpdateIndexResp.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.cc.arduino.cli.commands.UpdateIndexResp} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.cc.arduino.cli.commands.UpdateIndexResp.toObject = function(includeInstance, msg) { - var f, obj = { - downloadProgress: (f = msg.getDownloadProgress()) && commands_common_pb.DownloadProgress.toObject(includeInstance, f) - }; - - 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.UpdateIndexResp} - */ -proto.cc.arduino.cli.commands.UpdateIndexResp.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.cc.arduino.cli.commands.UpdateIndexResp; - return proto.cc.arduino.cli.commands.UpdateIndexResp.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.UpdateIndexResp} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.cc.arduino.cli.commands.UpdateIndexResp} - */ -proto.cc.arduino.cli.commands.UpdateIndexResp.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.DownloadProgress; - reader.readMessage(value,commands_common_pb.DownloadProgress.deserializeBinaryFromReader); - msg.setDownloadProgress(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.UpdateIndexResp.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.cc.arduino.cli.commands.UpdateIndexResp.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.UpdateIndexResp} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.cc.arduino.cli.commands.UpdateIndexResp.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getDownloadProgress(); - if (f != null) { - writer.writeMessage( - 1, - f, - commands_common_pb.DownloadProgress.serializeBinaryToWriter - ); - } -}; - - -/** - * optional DownloadProgress download_progress = 1; - * @return {?proto.cc.arduino.cli.commands.DownloadProgress} - */ -proto.cc.arduino.cli.commands.UpdateIndexResp.prototype.getDownloadProgress = function() { - return /** @type{?proto.cc.arduino.cli.commands.DownloadProgress} */ ( - jspb.Message.getWrapperField(this, commands_common_pb.DownloadProgress, 1)); -}; - - -/** @param {?proto.cc.arduino.cli.commands.DownloadProgress|undefined} value */ -proto.cc.arduino.cli.commands.UpdateIndexResp.prototype.setDownloadProgress = function(value) { - jspb.Message.setWrapperField(this, 1, value); -}; - - -proto.cc.arduino.cli.commands.UpdateIndexResp.prototype.clearDownloadProgress = function() { - this.setDownloadProgress(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.cc.arduino.cli.commands.UpdateIndexResp.prototype.hasDownloadProgress = function() { - return jspb.Message.getField(this, 1) != null; -}; - - - -/** - * 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.UpdateLibrariesIndexReq = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.cc.arduino.cli.commands.UpdateLibrariesIndexReq, jspb.Message); -if (goog.DEBUG && !COMPILED) { - proto.cc.arduino.cli.commands.UpdateLibrariesIndexReq.displayName = 'proto.cc.arduino.cli.commands.UpdateLibrariesIndexReq'; -} - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto suitable for use in Soy templates. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration - * @return {!Object} - */ -proto.cc.arduino.cli.commands.UpdateLibrariesIndexReq.prototype.toObject = function(opt_includeInstance) { - return proto.cc.arduino.cli.commands.UpdateLibrariesIndexReq.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.cc.arduino.cli.commands.UpdateLibrariesIndexReq} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.cc.arduino.cli.commands.UpdateLibrariesIndexReq.toObject = function(includeInstance, msg) { - var f, obj = { - instance: (f = msg.getInstance()) && commands_common_pb.Instance.toObject(includeInstance, f) - }; - - 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.UpdateLibrariesIndexReq} - */ -proto.cc.arduino.cli.commands.UpdateLibrariesIndexReq.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.cc.arduino.cli.commands.UpdateLibrariesIndexReq; - return proto.cc.arduino.cli.commands.UpdateLibrariesIndexReq.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.UpdateLibrariesIndexReq} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.cc.arduino.cli.commands.UpdateLibrariesIndexReq} - */ -proto.cc.arduino.cli.commands.UpdateLibrariesIndexReq.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; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.cc.arduino.cli.commands.UpdateLibrariesIndexReq.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.cc.arduino.cli.commands.UpdateLibrariesIndexReq.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.UpdateLibrariesIndexReq} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.cc.arduino.cli.commands.UpdateLibrariesIndexReq.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getInstance(); - if (f != null) { - writer.writeMessage( - 1, - f, - commands_common_pb.Instance.serializeBinaryToWriter - ); - } -}; - - -/** - * optional Instance instance = 1; - * @return {?proto.cc.arduino.cli.commands.Instance} - */ -proto.cc.arduino.cli.commands.UpdateLibrariesIndexReq.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 */ -proto.cc.arduino.cli.commands.UpdateLibrariesIndexReq.prototype.setInstance = function(value) { - jspb.Message.setWrapperField(this, 1, value); -}; - - -proto.cc.arduino.cli.commands.UpdateLibrariesIndexReq.prototype.clearInstance = function() { - this.setInstance(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.cc.arduino.cli.commands.UpdateLibrariesIndexReq.prototype.hasInstance = function() { - return jspb.Message.getField(this, 1) != null; -}; - - - -/** - * 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.UpdateLibrariesIndexResp = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.cc.arduino.cli.commands.UpdateLibrariesIndexResp, jspb.Message); -if (goog.DEBUG && !COMPILED) { - proto.cc.arduino.cli.commands.UpdateLibrariesIndexResp.displayName = 'proto.cc.arduino.cli.commands.UpdateLibrariesIndexResp'; -} - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto suitable for use in Soy templates. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration - * @return {!Object} - */ -proto.cc.arduino.cli.commands.UpdateLibrariesIndexResp.prototype.toObject = function(opt_includeInstance) { - return proto.cc.arduino.cli.commands.UpdateLibrariesIndexResp.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.cc.arduino.cli.commands.UpdateLibrariesIndexResp} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.cc.arduino.cli.commands.UpdateLibrariesIndexResp.toObject = function(includeInstance, msg) { - var f, obj = { - downloadProgress: (f = msg.getDownloadProgress()) && commands_common_pb.DownloadProgress.toObject(includeInstance, f) - }; - - 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.UpdateLibrariesIndexResp} - */ -proto.cc.arduino.cli.commands.UpdateLibrariesIndexResp.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.cc.arduino.cli.commands.UpdateLibrariesIndexResp; - return proto.cc.arduino.cli.commands.UpdateLibrariesIndexResp.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.UpdateLibrariesIndexResp} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.cc.arduino.cli.commands.UpdateLibrariesIndexResp} - */ -proto.cc.arduino.cli.commands.UpdateLibrariesIndexResp.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.DownloadProgress; - reader.readMessage(value,commands_common_pb.DownloadProgress.deserializeBinaryFromReader); - msg.setDownloadProgress(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.UpdateLibrariesIndexResp.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.cc.arduino.cli.commands.UpdateLibrariesIndexResp.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.UpdateLibrariesIndexResp} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.cc.arduino.cli.commands.UpdateLibrariesIndexResp.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getDownloadProgress(); - if (f != null) { - writer.writeMessage( - 1, - f, - commands_common_pb.DownloadProgress.serializeBinaryToWriter - ); - } -}; - - -/** - * optional DownloadProgress download_progress = 1; - * @return {?proto.cc.arduino.cli.commands.DownloadProgress} - */ -proto.cc.arduino.cli.commands.UpdateLibrariesIndexResp.prototype.getDownloadProgress = function() { - return /** @type{?proto.cc.arduino.cli.commands.DownloadProgress} */ ( - jspb.Message.getWrapperField(this, commands_common_pb.DownloadProgress, 1)); -}; - - -/** @param {?proto.cc.arduino.cli.commands.DownloadProgress|undefined} value */ -proto.cc.arduino.cli.commands.UpdateLibrariesIndexResp.prototype.setDownloadProgress = function(value) { - jspb.Message.setWrapperField(this, 1, value); -}; - - -proto.cc.arduino.cli.commands.UpdateLibrariesIndexResp.prototype.clearDownloadProgress = function() { - this.setDownloadProgress(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.cc.arduino.cli.commands.UpdateLibrariesIndexResp.prototype.hasDownloadProgress = function() { - return jspb.Message.getField(this, 1) != null; -}; - - - -/** - * 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.VersionReq = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.cc.arduino.cli.commands.VersionReq, jspb.Message); -if (goog.DEBUG && !COMPILED) { - proto.cc.arduino.cli.commands.VersionReq.displayName = 'proto.cc.arduino.cli.commands.VersionReq'; -} - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto suitable for use in Soy templates. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration - * @return {!Object} - */ -proto.cc.arduino.cli.commands.VersionReq.prototype.toObject = function(opt_includeInstance) { - return proto.cc.arduino.cli.commands.VersionReq.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.cc.arduino.cli.commands.VersionReq} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.cc.arduino.cli.commands.VersionReq.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.VersionReq} - */ -proto.cc.arduino.cli.commands.VersionReq.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.cc.arduino.cli.commands.VersionReq; - return proto.cc.arduino.cli.commands.VersionReq.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.VersionReq} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.cc.arduino.cli.commands.VersionReq} - */ -proto.cc.arduino.cli.commands.VersionReq.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.VersionReq.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.cc.arduino.cli.commands.VersionReq.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.VersionReq} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.cc.arduino.cli.commands.VersionReq.serializeBinaryToWriter = function(message, writer) { - var f = undefined; -}; - - - -/** - * 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.VersionResp = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.cc.arduino.cli.commands.VersionResp, jspb.Message); -if (goog.DEBUG && !COMPILED) { - proto.cc.arduino.cli.commands.VersionResp.displayName = 'proto.cc.arduino.cli.commands.VersionResp'; -} - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto suitable for use in Soy templates. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration - * @return {!Object} - */ -proto.cc.arduino.cli.commands.VersionResp.prototype.toObject = function(opt_includeInstance) { - return proto.cc.arduino.cli.commands.VersionResp.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.cc.arduino.cli.commands.VersionResp} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.cc.arduino.cli.commands.VersionResp.toObject = function(includeInstance, msg) { - var f, obj = { - version: jspb.Message.getFieldWithDefault(msg, 1, "") - }; - - 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.VersionResp} - */ -proto.cc.arduino.cli.commands.VersionResp.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.cc.arduino.cli.commands.VersionResp; - return proto.cc.arduino.cli.commands.VersionResp.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.VersionResp} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.cc.arduino.cli.commands.VersionResp} - */ -proto.cc.arduino.cli.commands.VersionResp.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.setVersion(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.VersionResp.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.cc.arduino.cli.commands.VersionResp.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.VersionResp} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.cc.arduino.cli.commands.VersionResp.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getVersion(); - if (f.length > 0) { - writer.writeString( - 1, - f - ); - } -}; - - -/** - * optional string version = 1; - * @return {string} - */ -proto.cc.arduino.cli.commands.VersionResp.prototype.getVersion = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** @param {string} value */ -proto.cc.arduino.cli.commands.VersionResp.prototype.setVersion = function(value) { - jspb.Message.setProto3StringField(this, 1, value); -}; - - -goog.object.extend(exports, proto.cc.arduino.cli.commands); diff --git a/arduino-ide-extension/src/node/cli-protocol/commands/common_grpc_pb.js b/arduino-ide-extension/src/node/cli-protocol/commands/common_grpc_pb.js deleted file mode 100644 index 97b3a246..00000000 --- a/arduino-ide-extension/src/node/cli-protocol/commands/common_grpc_pb.js +++ /dev/null @@ -1 +0,0 @@ -// GENERATED CODE -- NO SERVICES IN PROTO \ No newline at end of file diff --git a/arduino-ide-extension/src/node/cli-protocol/commands/common_pb.d.ts b/arduino-ide-extension/src/node/cli-protocol/commands/common_pb.d.ts deleted file mode 100644 index 3dd0a50c..00000000 --- a/arduino-ide-extension/src/node/cli-protocol/commands/common_pb.d.ts +++ /dev/null @@ -1,94 +0,0 @@ -// package: cc.arduino.cli.commands -// file: commands/common.proto - -/* tslint:disable */ -/* eslint-disable */ - -import * as jspb from "google-protobuf"; - -export class Instance extends jspb.Message { - getId(): number; - setId(value: number): void; - - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): Instance.AsObject; - static toObject(includeInstance: boolean, msg: Instance): Instance.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: Instance, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): Instance; - static deserializeBinaryFromReader(message: Instance, reader: jspb.BinaryReader): Instance; -} - -export namespace Instance { - export type AsObject = { - id: number, - } -} - -export class DownloadProgress extends jspb.Message { - getUrl(): string; - setUrl(value: string): void; - - getFile(): string; - setFile(value: string): void; - - getTotalSize(): number; - setTotalSize(value: number): void; - - getDownloaded(): number; - setDownloaded(value: number): void; - - getCompleted(): boolean; - setCompleted(value: boolean): void; - - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): DownloadProgress.AsObject; - static toObject(includeInstance: boolean, msg: DownloadProgress): DownloadProgress.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: DownloadProgress, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): DownloadProgress; - static deserializeBinaryFromReader(message: DownloadProgress, reader: jspb.BinaryReader): DownloadProgress; -} - -export namespace DownloadProgress { - export type AsObject = { - url: string, - file: string, - totalSize: number, - downloaded: number, - completed: boolean, - } -} - -export class TaskProgress extends jspb.Message { - getName(): string; - setName(value: string): void; - - getMessage(): string; - setMessage(value: string): void; - - getCompleted(): boolean; - setCompleted(value: boolean): void; - - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): TaskProgress.AsObject; - static toObject(includeInstance: boolean, msg: TaskProgress): TaskProgress.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: TaskProgress, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): TaskProgress; - static deserializeBinaryFromReader(message: TaskProgress, reader: jspb.BinaryReader): TaskProgress; -} - -export namespace TaskProgress { - export type AsObject = { - name: string, - message: string, - completed: boolean, - } -} 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 deleted file mode 100644 index 0e3dcd97..00000000 --- a/arduino-ide-extension/src/node/cli-protocol/commands/common_pb.js +++ /dev/null @@ -1,609 +0,0 @@ -/** - * @fileoverview - * @enhanceable - * @suppress {messageConventions} JS Compiler reports an error if a variable or - * field starts with 'MSG_' and isn't a translatable message. - * @public - */ -// GENERATED CODE -- DO NOT EDIT! - -var jspb = require('google-protobuf'); -var goog = jspb; -var global = Function('return this')(); - -goog.exportSymbol('proto.cc.arduino.cli.commands.DownloadProgress', null, global); -goog.exportSymbol('proto.cc.arduino.cli.commands.Instance', null, global); -goog.exportSymbol('proto.cc.arduino.cli.commands.TaskProgress', null, global); - -/** - * 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.Instance = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.cc.arduino.cli.commands.Instance, jspb.Message); -if (goog.DEBUG && !COMPILED) { - proto.cc.arduino.cli.commands.Instance.displayName = 'proto.cc.arduino.cli.commands.Instance'; -} - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto suitable for use in Soy templates. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration - * @return {!Object} - */ -proto.cc.arduino.cli.commands.Instance.prototype.toObject = function(opt_includeInstance) { - return proto.cc.arduino.cli.commands.Instance.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.cc.arduino.cli.commands.Instance} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.cc.arduino.cli.commands.Instance.toObject = function(includeInstance, msg) { - var f, obj = { - id: jspb.Message.getFieldWithDefault(msg, 1, 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.Instance} - */ -proto.cc.arduino.cli.commands.Instance.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.cc.arduino.cli.commands.Instance; - return proto.cc.arduino.cli.commands.Instance.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.Instance} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.cc.arduino.cli.commands.Instance} - */ -proto.cc.arduino.cli.commands.Instance.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {number} */ (reader.readInt32()); - msg.setId(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.Instance.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.cc.arduino.cli.commands.Instance.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.Instance} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.cc.arduino.cli.commands.Instance.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getId(); - if (f !== 0) { - writer.writeInt32( - 1, - f - ); - } -}; - - -/** - * optional int32 id = 1; - * @return {number} - */ -proto.cc.arduino.cli.commands.Instance.prototype.getId = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); -}; - - -/** @param {number} value */ -proto.cc.arduino.cli.commands.Instance.prototype.setId = function(value) { - jspb.Message.setProto3IntField(this, 1, value); -}; - - - -/** - * 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.DownloadProgress = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.cc.arduino.cli.commands.DownloadProgress, jspb.Message); -if (goog.DEBUG && !COMPILED) { - proto.cc.arduino.cli.commands.DownloadProgress.displayName = 'proto.cc.arduino.cli.commands.DownloadProgress'; -} - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto suitable for use in Soy templates. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration - * @return {!Object} - */ -proto.cc.arduino.cli.commands.DownloadProgress.prototype.toObject = function(opt_includeInstance) { - return proto.cc.arduino.cli.commands.DownloadProgress.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.cc.arduino.cli.commands.DownloadProgress} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.cc.arduino.cli.commands.DownloadProgress.toObject = function(includeInstance, msg) { - var f, obj = { - url: jspb.Message.getFieldWithDefault(msg, 1, ""), - file: jspb.Message.getFieldWithDefault(msg, 2, ""), - totalSize: jspb.Message.getFieldWithDefault(msg, 3, 0), - downloaded: jspb.Message.getFieldWithDefault(msg, 4, 0), - completed: jspb.Message.getFieldWithDefault(msg, 5, 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.DownloadProgress} - */ -proto.cc.arduino.cli.commands.DownloadProgress.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.cc.arduino.cli.commands.DownloadProgress; - return proto.cc.arduino.cli.commands.DownloadProgress.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.DownloadProgress} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.cc.arduino.cli.commands.DownloadProgress} - */ -proto.cc.arduino.cli.commands.DownloadProgress.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.setUrl(value); - break; - case 2: - var value = /** @type {string} */ (reader.readString()); - msg.setFile(value); - break; - case 3: - var value = /** @type {number} */ (reader.readInt64()); - msg.setTotalSize(value); - break; - case 4: - var value = /** @type {number} */ (reader.readInt64()); - msg.setDownloaded(value); - break; - case 5: - var value = /** @type {boolean} */ (reader.readBool()); - msg.setCompleted(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.DownloadProgress.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.cc.arduino.cli.commands.DownloadProgress.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.DownloadProgress} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.cc.arduino.cli.commands.DownloadProgress.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getUrl(); - if (f.length > 0) { - writer.writeString( - 1, - f - ); - } - f = message.getFile(); - if (f.length > 0) { - writer.writeString( - 2, - f - ); - } - f = message.getTotalSize(); - if (f !== 0) { - writer.writeInt64( - 3, - f - ); - } - f = message.getDownloaded(); - if (f !== 0) { - writer.writeInt64( - 4, - f - ); - } - f = message.getCompleted(); - if (f) { - writer.writeBool( - 5, - f - ); - } -}; - - -/** - * optional string url = 1; - * @return {string} - */ -proto.cc.arduino.cli.commands.DownloadProgress.prototype.getUrl = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** @param {string} value */ -proto.cc.arduino.cli.commands.DownloadProgress.prototype.setUrl = function(value) { - jspb.Message.setProto3StringField(this, 1, value); -}; - - -/** - * optional string file = 2; - * @return {string} - */ -proto.cc.arduino.cli.commands.DownloadProgress.prototype.getFile = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); -}; - - -/** @param {string} value */ -proto.cc.arduino.cli.commands.DownloadProgress.prototype.setFile = function(value) { - jspb.Message.setProto3StringField(this, 2, value); -}; - - -/** - * optional int64 total_size = 3; - * @return {number} - */ -proto.cc.arduino.cli.commands.DownloadProgress.prototype.getTotalSize = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); -}; - - -/** @param {number} value */ -proto.cc.arduino.cli.commands.DownloadProgress.prototype.setTotalSize = function(value) { - jspb.Message.setProto3IntField(this, 3, value); -}; - - -/** - * optional int64 downloaded = 4; - * @return {number} - */ -proto.cc.arduino.cli.commands.DownloadProgress.prototype.getDownloaded = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); -}; - - -/** @param {number} value */ -proto.cc.arduino.cli.commands.DownloadProgress.prototype.setDownloaded = function(value) { - jspb.Message.setProto3IntField(this, 4, value); -}; - - -/** - * optional bool completed = 5; - * Note that Boolean fields may be set to 0/1 when serialized from a Java server. - * You should avoid comparisons like {@code val === true/false} in those cases. - * @return {boolean} - */ -proto.cc.arduino.cli.commands.DownloadProgress.prototype.getCompleted = function() { - return /** @type {boolean} */ (jspb.Message.getFieldWithDefault(this, 5, false)); -}; - - -/** @param {boolean} value */ -proto.cc.arduino.cli.commands.DownloadProgress.prototype.setCompleted = function(value) { - jspb.Message.setProto3BooleanField(this, 5, value); -}; - - - -/** - * 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.TaskProgress = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.cc.arduino.cli.commands.TaskProgress, jspb.Message); -if (goog.DEBUG && !COMPILED) { - proto.cc.arduino.cli.commands.TaskProgress.displayName = 'proto.cc.arduino.cli.commands.TaskProgress'; -} - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto suitable for use in Soy templates. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration - * @return {!Object} - */ -proto.cc.arduino.cli.commands.TaskProgress.prototype.toObject = function(opt_includeInstance) { - return proto.cc.arduino.cli.commands.TaskProgress.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.cc.arduino.cli.commands.TaskProgress} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.cc.arduino.cli.commands.TaskProgress.toObject = function(includeInstance, msg) { - var f, obj = { - name: jspb.Message.getFieldWithDefault(msg, 1, ""), - message: jspb.Message.getFieldWithDefault(msg, 2, ""), - completed: jspb.Message.getFieldWithDefault(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.TaskProgress} - */ -proto.cc.arduino.cli.commands.TaskProgress.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.cc.arduino.cli.commands.TaskProgress; - return proto.cc.arduino.cli.commands.TaskProgress.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.TaskProgress} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.cc.arduino.cli.commands.TaskProgress} - */ -proto.cc.arduino.cli.commands.TaskProgress.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 {string} */ (reader.readString()); - msg.setMessage(value); - break; - case 3: - var value = /** @type {boolean} */ (reader.readBool()); - msg.setCompleted(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.TaskProgress.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.cc.arduino.cli.commands.TaskProgress.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.TaskProgress} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.cc.arduino.cli.commands.TaskProgress.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getName(); - if (f.length > 0) { - writer.writeString( - 1, - f - ); - } - f = message.getMessage(); - if (f.length > 0) { - writer.writeString( - 2, - f - ); - } - f = message.getCompleted(); - if (f) { - writer.writeBool( - 3, - f - ); - } -}; - - -/** - * optional string name = 1; - * @return {string} - */ -proto.cc.arduino.cli.commands.TaskProgress.prototype.getName = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** @param {string} value */ -proto.cc.arduino.cli.commands.TaskProgress.prototype.setName = function(value) { - jspb.Message.setProto3StringField(this, 1, value); -}; - - -/** - * optional string message = 2; - * @return {string} - */ -proto.cc.arduino.cli.commands.TaskProgress.prototype.getMessage = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); -}; - - -/** @param {string} value */ -proto.cc.arduino.cli.commands.TaskProgress.prototype.setMessage = function(value) { - jspb.Message.setProto3StringField(this, 2, value); -}; - - -/** - * optional bool completed = 3; - * Note that Boolean fields may be set to 0/1 when serialized from a Java server. - * You should avoid comparisons like {@code val === true/false} in those cases. - * @return {boolean} - */ -proto.cc.arduino.cli.commands.TaskProgress.prototype.getCompleted = function() { - return /** @type {boolean} */ (jspb.Message.getFieldWithDefault(this, 3, false)); -}; - - -/** @param {boolean} value */ -proto.cc.arduino.cli.commands.TaskProgress.prototype.setCompleted = function(value) { - 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/compile_grpc_pb.js b/arduino-ide-extension/src/node/cli-protocol/commands/compile_grpc_pb.js deleted file mode 100644 index 97b3a246..00000000 --- a/arduino-ide-extension/src/node/cli-protocol/commands/compile_grpc_pb.js +++ /dev/null @@ -1 +0,0 @@ -// GENERATED CODE -- NO SERVICES IN PROTO \ No newline at end of file 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 deleted file mode 100644 index 6c1c79d5..00000000 --- a/arduino-ide-extension/src/node/cli-protocol/commands/compile_pb.d.ts +++ /dev/null @@ -1,125 +0,0 @@ -// package: cc.arduino.cli.commands -// file: commands/compile.proto - -/* tslint:disable */ -/* eslint-disable */ - -import * as jspb from "google-protobuf"; -import * as commands_common_pb from "../commands/common_pb"; - -export class CompileReq extends jspb.Message { - - hasInstance(): boolean; - clearInstance(): void; - getInstance(): commands_common_pb.Instance | undefined; - setInstance(value?: commands_common_pb.Instance): void; - - getFqbn(): string; - setFqbn(value: string): void; - - getSketchpath(): string; - setSketchpath(value: string): void; - - getShowproperties(): boolean; - setShowproperties(value: boolean): void; - - getPreprocess(): boolean; - setPreprocess(value: boolean): void; - - getBuildcachepath(): string; - setBuildcachepath(value: string): void; - - getBuildpath(): string; - setBuildpath(value: string): void; - - clearBuildpropertiesList(): void; - getBuildpropertiesList(): Array; - setBuildpropertiesList(value: Array): void; - addBuildproperties(value: string, index?: number): string; - - getWarnings(): string; - setWarnings(value: string): void; - - getVerbose(): boolean; - setVerbose(value: boolean): void; - - getQuiet(): boolean; - setQuiet(value: boolean): void; - - getVidpid(): string; - setVidpid(value: string): void; - - getExportfile(): string; - setExportfile(value: string): void; - - getJobs(): number; - setJobs(value: number): void; - - clearLibrariesList(): void; - getLibrariesList(): Array; - setLibrariesList(value: Array): void; - addLibraries(value: string, index?: number): string; - - getOptimizefordebug(): boolean; - setOptimizefordebug(value: boolean): void; - - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): CompileReq.AsObject; - static toObject(includeInstance: boolean, msg: CompileReq): CompileReq.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: CompileReq, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): CompileReq; - static deserializeBinaryFromReader(message: CompileReq, reader: jspb.BinaryReader): CompileReq; -} - -export namespace CompileReq { - export type AsObject = { - instance?: commands_common_pb.Instance.AsObject, - fqbn: string, - sketchpath: string, - showproperties: boolean, - preprocess: boolean, - buildcachepath: string, - buildpath: string, - buildpropertiesList: Array, - warnings: string, - verbose: boolean, - quiet: boolean, - vidpid: string, - exportfile: string, - jobs: number, - librariesList: Array, - optimizefordebug: boolean, - } -} - -export class CompileResp extends jspb.Message { - getOutStream(): Uint8Array | string; - getOutStream_asU8(): Uint8Array; - getOutStream_asB64(): string; - setOutStream(value: Uint8Array | string): void; - - getErrStream(): Uint8Array | string; - getErrStream_asU8(): Uint8Array; - getErrStream_asB64(): string; - setErrStream(value: Uint8Array | string): void; - - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): CompileResp.AsObject; - static toObject(includeInstance: boolean, msg: CompileResp): CompileResp.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: CompileResp, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): CompileResp; - static deserializeBinaryFromReader(message: CompileResp, reader: jspb.BinaryReader): CompileResp; -} - -export namespace CompileResp { - export type AsObject = { - outStream: Uint8Array | string, - errStream: Uint8Array | string, - } -} 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 deleted file mode 100644 index 6563fd7d..00000000 --- a/arduino-ide-extension/src/node/cli-protocol/commands/compile_pb.js +++ /dev/null @@ -1,844 +0,0 @@ -/** - * @fileoverview - * @enhanceable - * @suppress {messageConventions} JS Compiler reports an error if a variable or - * field starts with 'MSG_' and isn't a translatable message. - * @public - */ -// GENERATED CODE -- DO NOT EDIT! - -var jspb = require('google-protobuf'); -var goog = jspb; -var global = Function('return this')(); - -var commands_common_pb = require('../commands/common_pb.js'); -goog.object.extend(proto, commands_common_pb); -goog.exportSymbol('proto.cc.arduino.cli.commands.CompileReq', null, global); -goog.exportSymbol('proto.cc.arduino.cli.commands.CompileResp', null, global); - -/** - * 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.CompileReq = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.cc.arduino.cli.commands.CompileReq.repeatedFields_, null); -}; -goog.inherits(proto.cc.arduino.cli.commands.CompileReq, jspb.Message); -if (goog.DEBUG && !COMPILED) { - proto.cc.arduino.cli.commands.CompileReq.displayName = 'proto.cc.arduino.cli.commands.CompileReq'; -} -/** - * List of repeated fields within this message type. - * @private {!Array} - * @const - */ -proto.cc.arduino.cli.commands.CompileReq.repeatedFields_ = [8,15]; - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto suitable for use in Soy templates. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration - * @return {!Object} - */ -proto.cc.arduino.cli.commands.CompileReq.prototype.toObject = function(opt_includeInstance) { - return proto.cc.arduino.cli.commands.CompileReq.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.cc.arduino.cli.commands.CompileReq} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.cc.arduino.cli.commands.CompileReq.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, ""), - showproperties: jspb.Message.getFieldWithDefault(msg, 4, false), - preprocess: jspb.Message.getFieldWithDefault(msg, 5, false), - buildcachepath: jspb.Message.getFieldWithDefault(msg, 6, ""), - buildpath: jspb.Message.getFieldWithDefault(msg, 7, ""), - buildpropertiesList: jspb.Message.getRepeatedField(msg, 8), - warnings: jspb.Message.getFieldWithDefault(msg, 9, ""), - verbose: jspb.Message.getFieldWithDefault(msg, 10, false), - quiet: jspb.Message.getFieldWithDefault(msg, 11, false), - vidpid: jspb.Message.getFieldWithDefault(msg, 12, ""), - exportfile: jspb.Message.getFieldWithDefault(msg, 13, ""), - jobs: jspb.Message.getFieldWithDefault(msg, 14, 0), - librariesList: jspb.Message.getRepeatedField(msg, 15), - optimizefordebug: jspb.Message.getFieldWithDefault(msg, 16, 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.CompileReq} - */ -proto.cc.arduino.cli.commands.CompileReq.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.cc.arduino.cli.commands.CompileReq; - return proto.cc.arduino.cli.commands.CompileReq.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.CompileReq} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.cc.arduino.cli.commands.CompileReq} - */ -proto.cc.arduino.cli.commands.CompileReq.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 {boolean} */ (reader.readBool()); - msg.setShowproperties(value); - break; - case 5: - var value = /** @type {boolean} */ (reader.readBool()); - msg.setPreprocess(value); - break; - case 6: - var value = /** @type {string} */ (reader.readString()); - msg.setBuildcachepath(value); - break; - case 7: - var value = /** @type {string} */ (reader.readString()); - msg.setBuildpath(value); - break; - case 8: - var value = /** @type {string} */ (reader.readString()); - msg.addBuildproperties(value); - break; - case 9: - var value = /** @type {string} */ (reader.readString()); - msg.setWarnings(value); - break; - case 10: - var value = /** @type {boolean} */ (reader.readBool()); - msg.setVerbose(value); - break; - case 11: - var value = /** @type {boolean} */ (reader.readBool()); - msg.setQuiet(value); - break; - case 12: - 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); - break; - case 15: - var value = /** @type {string} */ (reader.readString()); - msg.addLibraries(value); - break; - case 16: - var value = /** @type {boolean} */ (reader.readBool()); - msg.setOptimizefordebug(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.CompileReq.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.cc.arduino.cli.commands.CompileReq.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.CompileReq} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.cc.arduino.cli.commands.CompileReq.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.getShowproperties(); - if (f) { - writer.writeBool( - 4, - f - ); - } - f = message.getPreprocess(); - if (f) { - writer.writeBool( - 5, - f - ); - } - f = message.getBuildcachepath(); - if (f.length > 0) { - writer.writeString( - 6, - f - ); - } - f = message.getBuildpath(); - if (f.length > 0) { - writer.writeString( - 7, - f - ); - } - f = message.getBuildpropertiesList(); - if (f.length > 0) { - writer.writeRepeatedString( - 8, - f - ); - } - f = message.getWarnings(); - if (f.length > 0) { - writer.writeString( - 9, - f - ); - } - f = message.getVerbose(); - if (f) { - writer.writeBool( - 10, - f - ); - } - f = message.getQuiet(); - if (f) { - writer.writeBool( - 11, - f - ); - } - f = message.getVidpid(); - if (f.length > 0) { - writer.writeString( - 12, - f - ); - } - f = message.getExportfile(); - if (f.length > 0) { - writer.writeString( - 13, - f - ); - } - f = message.getJobs(); - if (f !== 0) { - writer.writeInt32( - 14, - f - ); - } - f = message.getLibrariesList(); - if (f.length > 0) { - writer.writeRepeatedString( - 15, - f - ); - } - f = message.getOptimizefordebug(); - if (f) { - writer.writeBool( - 16, - f - ); - } -}; - - -/** - * optional Instance instance = 1; - * @return {?proto.cc.arduino.cli.commands.Instance} - */ -proto.cc.arduino.cli.commands.CompileReq.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 */ -proto.cc.arduino.cli.commands.CompileReq.prototype.setInstance = function(value) { - jspb.Message.setWrapperField(this, 1, value); -}; - - -proto.cc.arduino.cli.commands.CompileReq.prototype.clearInstance = function() { - this.setInstance(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.cc.arduino.cli.commands.CompileReq.prototype.hasInstance = function() { - return jspb.Message.getField(this, 1) != null; -}; - - -/** - * optional string fqbn = 2; - * @return {string} - */ -proto.cc.arduino.cli.commands.CompileReq.prototype.getFqbn = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); -}; - - -/** @param {string} value */ -proto.cc.arduino.cli.commands.CompileReq.prototype.setFqbn = function(value) { - jspb.Message.setProto3StringField(this, 2, value); -}; - - -/** - * optional string sketchPath = 3; - * @return {string} - */ -proto.cc.arduino.cli.commands.CompileReq.prototype.getSketchpath = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); -}; - - -/** @param {string} value */ -proto.cc.arduino.cli.commands.CompileReq.prototype.setSketchpath = function(value) { - jspb.Message.setProto3StringField(this, 3, value); -}; - - -/** - * optional bool showProperties = 4; - * Note that Boolean fields may be set to 0/1 when serialized from a Java server. - * You should avoid comparisons like {@code val === true/false} in those cases. - * @return {boolean} - */ -proto.cc.arduino.cli.commands.CompileReq.prototype.getShowproperties = function() { - return /** @type {boolean} */ (jspb.Message.getFieldWithDefault(this, 4, false)); -}; - - -/** @param {boolean} value */ -proto.cc.arduino.cli.commands.CompileReq.prototype.setShowproperties = function(value) { - jspb.Message.setProto3BooleanField(this, 4, value); -}; - - -/** - * optional bool preprocess = 5; - * Note that Boolean fields may be set to 0/1 when serialized from a Java server. - * You should avoid comparisons like {@code val === true/false} in those cases. - * @return {boolean} - */ -proto.cc.arduino.cli.commands.CompileReq.prototype.getPreprocess = function() { - return /** @type {boolean} */ (jspb.Message.getFieldWithDefault(this, 5, false)); -}; - - -/** @param {boolean} value */ -proto.cc.arduino.cli.commands.CompileReq.prototype.setPreprocess = function(value) { - jspb.Message.setProto3BooleanField(this, 5, value); -}; - - -/** - * optional string buildCachePath = 6; - * @return {string} - */ -proto.cc.arduino.cli.commands.CompileReq.prototype.getBuildcachepath = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 6, "")); -}; - - -/** @param {string} value */ -proto.cc.arduino.cli.commands.CompileReq.prototype.setBuildcachepath = function(value) { - jspb.Message.setProto3StringField(this, 6, value); -}; - - -/** - * optional string buildPath = 7; - * @return {string} - */ -proto.cc.arduino.cli.commands.CompileReq.prototype.getBuildpath = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 7, "")); -}; - - -/** @param {string} value */ -proto.cc.arduino.cli.commands.CompileReq.prototype.setBuildpath = function(value) { - jspb.Message.setProto3StringField(this, 7, value); -}; - - -/** - * repeated string buildProperties = 8; - * @return {!Array} - */ -proto.cc.arduino.cli.commands.CompileReq.prototype.getBuildpropertiesList = function() { - return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 8)); -}; - - -/** @param {!Array} value */ -proto.cc.arduino.cli.commands.CompileReq.prototype.setBuildpropertiesList = function(value) { - jspb.Message.setField(this, 8, value || []); -}; - - -/** - * @param {string} value - * @param {number=} opt_index - */ -proto.cc.arduino.cli.commands.CompileReq.prototype.addBuildproperties = function(value, opt_index) { - jspb.Message.addToRepeatedField(this, 8, value, opt_index); -}; - - -proto.cc.arduino.cli.commands.CompileReq.prototype.clearBuildpropertiesList = function() { - this.setBuildpropertiesList([]); -}; - - -/** - * optional string warnings = 9; - * @return {string} - */ -proto.cc.arduino.cli.commands.CompileReq.prototype.getWarnings = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 9, "")); -}; - - -/** @param {string} value */ -proto.cc.arduino.cli.commands.CompileReq.prototype.setWarnings = function(value) { - jspb.Message.setProto3StringField(this, 9, value); -}; - - -/** - * optional bool verbose = 10; - * Note that Boolean fields may be set to 0/1 when serialized from a Java server. - * You should avoid comparisons like {@code val === true/false} in those cases. - * @return {boolean} - */ -proto.cc.arduino.cli.commands.CompileReq.prototype.getVerbose = function() { - return /** @type {boolean} */ (jspb.Message.getFieldWithDefault(this, 10, false)); -}; - - -/** @param {boolean} value */ -proto.cc.arduino.cli.commands.CompileReq.prototype.setVerbose = function(value) { - jspb.Message.setProto3BooleanField(this, 10, value); -}; - - -/** - * optional bool quiet = 11; - * Note that Boolean fields may be set to 0/1 when serialized from a Java server. - * You should avoid comparisons like {@code val === true/false} in those cases. - * @return {boolean} - */ -proto.cc.arduino.cli.commands.CompileReq.prototype.getQuiet = function() { - return /** @type {boolean} */ (jspb.Message.getFieldWithDefault(this, 11, false)); -}; - - -/** @param {boolean} value */ -proto.cc.arduino.cli.commands.CompileReq.prototype.setQuiet = function(value) { - jspb.Message.setProto3BooleanField(this, 11, value); -}; - - -/** - * optional string vidPid = 12; - * @return {string} - */ -proto.cc.arduino.cli.commands.CompileReq.prototype.getVidpid = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 12, "")); -}; - - -/** @param {string} value */ -proto.cc.arduino.cli.commands.CompileReq.prototype.setVidpid = function(value) { - jspb.Message.setProto3StringField(this, 12, 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 */ -proto.cc.arduino.cli.commands.CompileReq.prototype.setExportfile = function(value) { - jspb.Message.setProto3StringField(this, 13, value); -}; - - -/** - * optional int32 jobs = 14; - * @return {number} - */ -proto.cc.arduino.cli.commands.CompileReq.prototype.getJobs = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 14, 0)); -}; - - -/** @param {number} value */ -proto.cc.arduino.cli.commands.CompileReq.prototype.setJobs = function(value) { - jspb.Message.setProto3IntField(this, 14, value); -}; - - -/** - * repeated string libraries = 15; - * @return {!Array} - */ -proto.cc.arduino.cli.commands.CompileReq.prototype.getLibrariesList = function() { - return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 15)); -}; - - -/** @param {!Array} value */ -proto.cc.arduino.cli.commands.CompileReq.prototype.setLibrariesList = function(value) { - jspb.Message.setField(this, 15, value || []); -}; - - -/** - * @param {string} value - * @param {number=} opt_index - */ -proto.cc.arduino.cli.commands.CompileReq.prototype.addLibraries = function(value, opt_index) { - jspb.Message.addToRepeatedField(this, 15, value, opt_index); -}; - - -proto.cc.arduino.cli.commands.CompileReq.prototype.clearLibrariesList = function() { - this.setLibrariesList([]); -}; - - -/** - * optional bool optimizeForDebug = 16; - * Note that Boolean fields may be set to 0/1 when serialized from a Java server. - * You should avoid comparisons like {@code val === true/false} in those cases. - * @return {boolean} - */ -proto.cc.arduino.cli.commands.CompileReq.prototype.getOptimizefordebug = function() { - return /** @type {boolean} */ (jspb.Message.getFieldWithDefault(this, 16, false)); -}; - - -/** @param {boolean} value */ -proto.cc.arduino.cli.commands.CompileReq.prototype.setOptimizefordebug = function(value) { - jspb.Message.setProto3BooleanField(this, 16, value); -}; - - - -/** - * 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.CompileResp = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.cc.arduino.cli.commands.CompileResp, jspb.Message); -if (goog.DEBUG && !COMPILED) { - proto.cc.arduino.cli.commands.CompileResp.displayName = 'proto.cc.arduino.cli.commands.CompileResp'; -} - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto suitable for use in Soy templates. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration - * @return {!Object} - */ -proto.cc.arduino.cli.commands.CompileResp.prototype.toObject = function(opt_includeInstance) { - return proto.cc.arduino.cli.commands.CompileResp.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.cc.arduino.cli.commands.CompileResp} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.cc.arduino.cli.commands.CompileResp.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.CompileResp} - */ -proto.cc.arduino.cli.commands.CompileResp.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.cc.arduino.cli.commands.CompileResp; - return proto.cc.arduino.cli.commands.CompileResp.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.CompileResp} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.cc.arduino.cli.commands.CompileResp} - */ -proto.cc.arduino.cli.commands.CompileResp.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.CompileResp.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.cc.arduino.cli.commands.CompileResp.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.CompileResp} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.cc.arduino.cli.commands.CompileResp.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.CompileResp.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.CompileResp.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.CompileResp.prototype.getOutStream_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getOutStream())); -}; - - -/** @param {!(string|Uint8Array)} value */ -proto.cc.arduino.cli.commands.CompileResp.prototype.setOutStream = function(value) { - jspb.Message.setProto3BytesField(this, 1, value); -}; - - -/** - * optional bytes err_stream = 2; - * @return {!(string|Uint8Array)} - */ -proto.cc.arduino.cli.commands.CompileResp.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.CompileResp.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.CompileResp.prototype.getErrStream_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getErrStream())); -}; - - -/** @param {!(string|Uint8Array)} value */ -proto.cc.arduino.cli.commands.CompileResp.prototype.setErrStream = function(value) { - jspb.Message.setProto3BytesField(this, 2, value); -}; - - -goog.object.extend(exports, proto.cc.arduino.cli.commands); diff --git a/arduino-ide-extension/src/node/cli-protocol/commands/core_grpc_pb.js b/arduino-ide-extension/src/node/cli-protocol/commands/core_grpc_pb.js deleted file mode 100644 index 97b3a246..00000000 --- a/arduino-ide-extension/src/node/cli-protocol/commands/core_grpc_pb.js +++ /dev/null @@ -1 +0,0 @@ -// GENERATED CODE -- NO SERVICES IN PROTO \ No newline at end of file diff --git a/arduino-ide-extension/src/node/cli-protocol/commands/core_pb.d.ts b/arduino-ide-extension/src/node/cli-protocol/commands/core_pb.d.ts deleted file mode 100644 index 60eb973b..00000000 --- a/arduino-ide-extension/src/node/cli-protocol/commands/core_pb.d.ts +++ /dev/null @@ -1,436 +0,0 @@ -// package: cc.arduino.cli.commands -// file: commands/core.proto - -/* tslint:disable */ -/* eslint-disable */ - -import * as jspb from "google-protobuf"; -import * as commands_common_pb from "../commands/common_pb"; - -export class PlatformInstallReq extends jspb.Message { - - hasInstance(): boolean; - clearInstance(): void; - getInstance(): commands_common_pb.Instance | undefined; - setInstance(value?: commands_common_pb.Instance): void; - - getPlatformPackage(): string; - setPlatformPackage(value: string): void; - - getArchitecture(): string; - setArchitecture(value: string): void; - - getVersion(): string; - setVersion(value: string): void; - - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): PlatformInstallReq.AsObject; - static toObject(includeInstance: boolean, msg: PlatformInstallReq): PlatformInstallReq.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: PlatformInstallReq, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): PlatformInstallReq; - static deserializeBinaryFromReader(message: PlatformInstallReq, reader: jspb.BinaryReader): PlatformInstallReq; -} - -export namespace PlatformInstallReq { - export type AsObject = { - instance?: commands_common_pb.Instance.AsObject, - platformPackage: string, - architecture: string, - version: string, - } -} - -export class PlatformInstallResp extends jspb.Message { - - hasProgress(): boolean; - clearProgress(): void; - getProgress(): commands_common_pb.DownloadProgress | undefined; - setProgress(value?: commands_common_pb.DownloadProgress): void; - - - hasTaskProgress(): boolean; - clearTaskProgress(): void; - getTaskProgress(): commands_common_pb.TaskProgress | undefined; - setTaskProgress(value?: commands_common_pb.TaskProgress): void; - - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): PlatformInstallResp.AsObject; - static toObject(includeInstance: boolean, msg: PlatformInstallResp): PlatformInstallResp.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: PlatformInstallResp, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): PlatformInstallResp; - static deserializeBinaryFromReader(message: PlatformInstallResp, reader: jspb.BinaryReader): PlatformInstallResp; -} - -export namespace PlatformInstallResp { - export type AsObject = { - progress?: commands_common_pb.DownloadProgress.AsObject, - taskProgress?: commands_common_pb.TaskProgress.AsObject, - } -} - -export class PlatformDownloadReq extends jspb.Message { - - hasInstance(): boolean; - clearInstance(): void; - getInstance(): commands_common_pb.Instance | undefined; - setInstance(value?: commands_common_pb.Instance): void; - - getPlatformPackage(): string; - setPlatformPackage(value: string): void; - - getArchitecture(): string; - setArchitecture(value: string): void; - - getVersion(): string; - setVersion(value: string): void; - - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): PlatformDownloadReq.AsObject; - static toObject(includeInstance: boolean, msg: PlatformDownloadReq): PlatformDownloadReq.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: PlatformDownloadReq, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): PlatformDownloadReq; - static deserializeBinaryFromReader(message: PlatformDownloadReq, reader: jspb.BinaryReader): PlatformDownloadReq; -} - -export namespace PlatformDownloadReq { - export type AsObject = { - instance?: commands_common_pb.Instance.AsObject, - platformPackage: string, - architecture: string, - version: string, - } -} - -export class PlatformDownloadResp extends jspb.Message { - - hasProgress(): boolean; - clearProgress(): void; - getProgress(): commands_common_pb.DownloadProgress | undefined; - setProgress(value?: commands_common_pb.DownloadProgress): void; - - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): PlatformDownloadResp.AsObject; - static toObject(includeInstance: boolean, msg: PlatformDownloadResp): PlatformDownloadResp.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: PlatformDownloadResp, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): PlatformDownloadResp; - static deserializeBinaryFromReader(message: PlatformDownloadResp, reader: jspb.BinaryReader): PlatformDownloadResp; -} - -export namespace PlatformDownloadResp { - export type AsObject = { - progress?: commands_common_pb.DownloadProgress.AsObject, - } -} - -export class PlatformUninstallReq extends jspb.Message { - - hasInstance(): boolean; - clearInstance(): void; - getInstance(): commands_common_pb.Instance | undefined; - setInstance(value?: commands_common_pb.Instance): void; - - getPlatformPackage(): string; - setPlatformPackage(value: string): void; - - getArchitecture(): string; - setArchitecture(value: string): void; - - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): PlatformUninstallReq.AsObject; - static toObject(includeInstance: boolean, msg: PlatformUninstallReq): PlatformUninstallReq.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: PlatformUninstallReq, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): PlatformUninstallReq; - static deserializeBinaryFromReader(message: PlatformUninstallReq, reader: jspb.BinaryReader): PlatformUninstallReq; -} - -export namespace PlatformUninstallReq { - export type AsObject = { - instance?: commands_common_pb.Instance.AsObject, - platformPackage: string, - architecture: string, - } -} - -export class PlatformUninstallResp extends jspb.Message { - - hasTaskProgress(): boolean; - clearTaskProgress(): void; - getTaskProgress(): commands_common_pb.TaskProgress | undefined; - setTaskProgress(value?: commands_common_pb.TaskProgress): void; - - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): PlatformUninstallResp.AsObject; - static toObject(includeInstance: boolean, msg: PlatformUninstallResp): PlatformUninstallResp.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: PlatformUninstallResp, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): PlatformUninstallResp; - static deserializeBinaryFromReader(message: PlatformUninstallResp, reader: jspb.BinaryReader): PlatformUninstallResp; -} - -export namespace PlatformUninstallResp { - export type AsObject = { - taskProgress?: commands_common_pb.TaskProgress.AsObject, - } -} - -export class PlatformUpgradeReq extends jspb.Message { - - hasInstance(): boolean; - clearInstance(): void; - getInstance(): commands_common_pb.Instance | undefined; - setInstance(value?: commands_common_pb.Instance): void; - - getPlatformPackage(): string; - setPlatformPackage(value: string): void; - - getArchitecture(): string; - setArchitecture(value: string): void; - - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): PlatformUpgradeReq.AsObject; - static toObject(includeInstance: boolean, msg: PlatformUpgradeReq): PlatformUpgradeReq.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: PlatformUpgradeReq, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): PlatformUpgradeReq; - static deserializeBinaryFromReader(message: PlatformUpgradeReq, reader: jspb.BinaryReader): PlatformUpgradeReq; -} - -export namespace PlatformUpgradeReq { - export type AsObject = { - instance?: commands_common_pb.Instance.AsObject, - platformPackage: string, - architecture: string, - } -} - -export class PlatformUpgradeResp extends jspb.Message { - - hasProgress(): boolean; - clearProgress(): void; - getProgress(): commands_common_pb.DownloadProgress | undefined; - setProgress(value?: commands_common_pb.DownloadProgress): void; - - - hasTaskProgress(): boolean; - clearTaskProgress(): void; - getTaskProgress(): commands_common_pb.TaskProgress | undefined; - setTaskProgress(value?: commands_common_pb.TaskProgress): void; - - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): PlatformUpgradeResp.AsObject; - static toObject(includeInstance: boolean, msg: PlatformUpgradeResp): PlatformUpgradeResp.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: PlatformUpgradeResp, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): PlatformUpgradeResp; - static deserializeBinaryFromReader(message: PlatformUpgradeResp, reader: jspb.BinaryReader): PlatformUpgradeResp; -} - -export namespace PlatformUpgradeResp { - export type AsObject = { - progress?: commands_common_pb.DownloadProgress.AsObject, - taskProgress?: commands_common_pb.TaskProgress.AsObject, - } -} - -export class PlatformSearchReq extends jspb.Message { - - hasInstance(): boolean; - clearInstance(): void; - getInstance(): commands_common_pb.Instance | undefined; - setInstance(value?: commands_common_pb.Instance): void; - - getSearchArgs(): string; - setSearchArgs(value: string): void; - - getAllVersions(): boolean; - setAllVersions(value: boolean): void; - - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): PlatformSearchReq.AsObject; - static toObject(includeInstance: boolean, msg: PlatformSearchReq): PlatformSearchReq.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: PlatformSearchReq, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): PlatformSearchReq; - static deserializeBinaryFromReader(message: PlatformSearchReq, reader: jspb.BinaryReader): PlatformSearchReq; -} - -export namespace PlatformSearchReq { - export type AsObject = { - instance?: commands_common_pb.Instance.AsObject, - searchArgs: string, - allVersions: boolean, - } -} - -export class PlatformSearchResp extends jspb.Message { - clearSearchOutputList(): void; - getSearchOutputList(): Array; - setSearchOutputList(value: Array): void; - addSearchOutput(value?: Platform, index?: number): Platform; - - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): PlatformSearchResp.AsObject; - static toObject(includeInstance: boolean, msg: PlatformSearchResp): PlatformSearchResp.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: PlatformSearchResp, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): PlatformSearchResp; - static deserializeBinaryFromReader(message: PlatformSearchResp, reader: jspb.BinaryReader): PlatformSearchResp; -} - -export namespace PlatformSearchResp { - export type AsObject = { - searchOutputList: Array, - } -} - -export class PlatformListReq extends jspb.Message { - - hasInstance(): boolean; - clearInstance(): void; - getInstance(): commands_common_pb.Instance | undefined; - setInstance(value?: commands_common_pb.Instance): void; - - getUpdatableOnly(): boolean; - setUpdatableOnly(value: boolean): void; - - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): PlatformListReq.AsObject; - static toObject(includeInstance: boolean, msg: PlatformListReq): PlatformListReq.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: PlatformListReq, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): PlatformListReq; - static deserializeBinaryFromReader(message: PlatformListReq, reader: jspb.BinaryReader): PlatformListReq; -} - -export namespace PlatformListReq { - export type AsObject = { - instance?: commands_common_pb.Instance.AsObject, - updatableOnly: boolean, - } -} - -export class PlatformListResp extends jspb.Message { - clearInstalledPlatformList(): void; - getInstalledPlatformList(): Array; - setInstalledPlatformList(value: Array): void; - addInstalledPlatform(value?: Platform, index?: number): Platform; - - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): PlatformListResp.AsObject; - static toObject(includeInstance: boolean, msg: PlatformListResp): PlatformListResp.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: PlatformListResp, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): PlatformListResp; - static deserializeBinaryFromReader(message: PlatformListResp, reader: jspb.BinaryReader): PlatformListResp; -} - -export namespace PlatformListResp { - export type AsObject = { - installedPlatformList: Array, - } -} - -export class Platform extends jspb.Message { - getId(): string; - setId(value: string): void; - - getInstalled(): string; - setInstalled(value: string): void; - - getLatest(): string; - setLatest(value: string): void; - - getName(): string; - setName(value: string): void; - - getMaintainer(): string; - setMaintainer(value: string): void; - - getWebsite(): string; - setWebsite(value: string): void; - - getEmail(): string; - setEmail(value: string): void; - - clearBoardsList(): void; - getBoardsList(): Array; - setBoardsList(value: Array): void; - addBoards(value?: Board, index?: number): Board; - - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): Platform.AsObject; - static toObject(includeInstance: boolean, msg: Platform): Platform.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: Platform, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): Platform; - static deserializeBinaryFromReader(message: Platform, reader: jspb.BinaryReader): Platform; -} - -export namespace Platform { - export type AsObject = { - id: string, - installed: string, - latest: string, - name: string, - maintainer: string, - website: string, - email: string, - boardsList: Array, - } -} - -export class Board extends jspb.Message { - getName(): string; - setName(value: string): void; - - getFqbn(): string; - setFqbn(value: string): void; - - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): Board.AsObject; - static toObject(includeInstance: boolean, msg: Board): Board.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: Board, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): Board; - static deserializeBinaryFromReader(message: Board, reader: jspb.BinaryReader): Board; -} - -export namespace Board { - export type AsObject = { - name: string, - fqbn: string, - } -} 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 deleted file mode 100644 index 24f93c12..00000000 --- a/arduino-ide-extension/src/node/cli-protocol/commands/core_pb.js +++ /dev/null @@ -1,2925 +0,0 @@ -/** - * @fileoverview - * @enhanceable - * @suppress {messageConventions} JS Compiler reports an error if a variable or - * field starts with 'MSG_' and isn't a translatable message. - * @public - */ -// GENERATED CODE -- DO NOT EDIT! - -var jspb = require('google-protobuf'); -var goog = jspb; -var global = Function('return this')(); - -var commands_common_pb = require('../commands/common_pb.js'); -goog.object.extend(proto, commands_common_pb); -goog.exportSymbol('proto.cc.arduino.cli.commands.Board', null, global); -goog.exportSymbol('proto.cc.arduino.cli.commands.Platform', null, global); -goog.exportSymbol('proto.cc.arduino.cli.commands.PlatformDownloadReq', null, global); -goog.exportSymbol('proto.cc.arduino.cli.commands.PlatformDownloadResp', null, global); -goog.exportSymbol('proto.cc.arduino.cli.commands.PlatformInstallReq', null, global); -goog.exportSymbol('proto.cc.arduino.cli.commands.PlatformInstallResp', null, global); -goog.exportSymbol('proto.cc.arduino.cli.commands.PlatformListReq', null, global); -goog.exportSymbol('proto.cc.arduino.cli.commands.PlatformListResp', null, global); -goog.exportSymbol('proto.cc.arduino.cli.commands.PlatformSearchReq', null, global); -goog.exportSymbol('proto.cc.arduino.cli.commands.PlatformSearchResp', null, global); -goog.exportSymbol('proto.cc.arduino.cli.commands.PlatformUninstallReq', null, global); -goog.exportSymbol('proto.cc.arduino.cli.commands.PlatformUninstallResp', null, global); -goog.exportSymbol('proto.cc.arduino.cli.commands.PlatformUpgradeReq', null, global); -goog.exportSymbol('proto.cc.arduino.cli.commands.PlatformUpgradeResp', null, global); - -/** - * 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.PlatformInstallReq = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.cc.arduino.cli.commands.PlatformInstallReq, jspb.Message); -if (goog.DEBUG && !COMPILED) { - proto.cc.arduino.cli.commands.PlatformInstallReq.displayName = 'proto.cc.arduino.cli.commands.PlatformInstallReq'; -} - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto suitable for use in Soy templates. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration - * @return {!Object} - */ -proto.cc.arduino.cli.commands.PlatformInstallReq.prototype.toObject = function(opt_includeInstance) { - return proto.cc.arduino.cli.commands.PlatformInstallReq.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.cc.arduino.cli.commands.PlatformInstallReq} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.cc.arduino.cli.commands.PlatformInstallReq.toObject = function(includeInstance, msg) { - var f, obj = { - instance: (f = msg.getInstance()) && commands_common_pb.Instance.toObject(includeInstance, f), - platformPackage: jspb.Message.getFieldWithDefault(msg, 2, ""), - architecture: jspb.Message.getFieldWithDefault(msg, 3, ""), - version: jspb.Message.getFieldWithDefault(msg, 4, "") - }; - - 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.PlatformInstallReq} - */ -proto.cc.arduino.cli.commands.PlatformInstallReq.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.cc.arduino.cli.commands.PlatformInstallReq; - return proto.cc.arduino.cli.commands.PlatformInstallReq.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.PlatformInstallReq} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.cc.arduino.cli.commands.PlatformInstallReq} - */ -proto.cc.arduino.cli.commands.PlatformInstallReq.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.setPlatformPackage(value); - break; - case 3: - var value = /** @type {string} */ (reader.readString()); - msg.setArchitecture(value); - break; - case 4: - var value = /** @type {string} */ (reader.readString()); - msg.setVersion(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.PlatformInstallReq.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.cc.arduino.cli.commands.PlatformInstallReq.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.PlatformInstallReq} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.cc.arduino.cli.commands.PlatformInstallReq.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getInstance(); - if (f != null) { - writer.writeMessage( - 1, - f, - commands_common_pb.Instance.serializeBinaryToWriter - ); - } - f = message.getPlatformPackage(); - if (f.length > 0) { - writer.writeString( - 2, - f - ); - } - f = message.getArchitecture(); - if (f.length > 0) { - writer.writeString( - 3, - f - ); - } - f = message.getVersion(); - if (f.length > 0) { - writer.writeString( - 4, - f - ); - } -}; - - -/** - * optional Instance instance = 1; - * @return {?proto.cc.arduino.cli.commands.Instance} - */ -proto.cc.arduino.cli.commands.PlatformInstallReq.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 */ -proto.cc.arduino.cli.commands.PlatformInstallReq.prototype.setInstance = function(value) { - jspb.Message.setWrapperField(this, 1, value); -}; - - -proto.cc.arduino.cli.commands.PlatformInstallReq.prototype.clearInstance = function() { - this.setInstance(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.cc.arduino.cli.commands.PlatformInstallReq.prototype.hasInstance = function() { - return jspb.Message.getField(this, 1) != null; -}; - - -/** - * optional string platform_package = 2; - * @return {string} - */ -proto.cc.arduino.cli.commands.PlatformInstallReq.prototype.getPlatformPackage = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); -}; - - -/** @param {string} value */ -proto.cc.arduino.cli.commands.PlatformInstallReq.prototype.setPlatformPackage = function(value) { - jspb.Message.setProto3StringField(this, 2, value); -}; - - -/** - * optional string architecture = 3; - * @return {string} - */ -proto.cc.arduino.cli.commands.PlatformInstallReq.prototype.getArchitecture = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); -}; - - -/** @param {string} value */ -proto.cc.arduino.cli.commands.PlatformInstallReq.prototype.setArchitecture = function(value) { - jspb.Message.setProto3StringField(this, 3, value); -}; - - -/** - * optional string version = 4; - * @return {string} - */ -proto.cc.arduino.cli.commands.PlatformInstallReq.prototype.getVersion = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "")); -}; - - -/** @param {string} value */ -proto.cc.arduino.cli.commands.PlatformInstallReq.prototype.setVersion = function(value) { - jspb.Message.setProto3StringField(this, 4, value); -}; - - - -/** - * 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.PlatformInstallResp = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.cc.arduino.cli.commands.PlatformInstallResp, jspb.Message); -if (goog.DEBUG && !COMPILED) { - proto.cc.arduino.cli.commands.PlatformInstallResp.displayName = 'proto.cc.arduino.cli.commands.PlatformInstallResp'; -} - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto suitable for use in Soy templates. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration - * @return {!Object} - */ -proto.cc.arduino.cli.commands.PlatformInstallResp.prototype.toObject = function(opt_includeInstance) { - return proto.cc.arduino.cli.commands.PlatformInstallResp.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.cc.arduino.cli.commands.PlatformInstallResp} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.cc.arduino.cli.commands.PlatformInstallResp.toObject = function(includeInstance, msg) { - var f, obj = { - progress: (f = msg.getProgress()) && commands_common_pb.DownloadProgress.toObject(includeInstance, f), - taskProgress: (f = msg.getTaskProgress()) && commands_common_pb.TaskProgress.toObject(includeInstance, f) - }; - - 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.PlatformInstallResp} - */ -proto.cc.arduino.cli.commands.PlatformInstallResp.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.cc.arduino.cli.commands.PlatformInstallResp; - return proto.cc.arduino.cli.commands.PlatformInstallResp.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.PlatformInstallResp} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.cc.arduino.cli.commands.PlatformInstallResp} - */ -proto.cc.arduino.cli.commands.PlatformInstallResp.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.DownloadProgress; - reader.readMessage(value,commands_common_pb.DownloadProgress.deserializeBinaryFromReader); - msg.setProgress(value); - break; - case 2: - var value = new commands_common_pb.TaskProgress; - reader.readMessage(value,commands_common_pb.TaskProgress.deserializeBinaryFromReader); - msg.setTaskProgress(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.PlatformInstallResp.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.cc.arduino.cli.commands.PlatformInstallResp.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.PlatformInstallResp} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.cc.arduino.cli.commands.PlatformInstallResp.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getProgress(); - if (f != null) { - writer.writeMessage( - 1, - f, - commands_common_pb.DownloadProgress.serializeBinaryToWriter - ); - } - f = message.getTaskProgress(); - if (f != null) { - writer.writeMessage( - 2, - f, - commands_common_pb.TaskProgress.serializeBinaryToWriter - ); - } -}; - - -/** - * optional DownloadProgress progress = 1; - * @return {?proto.cc.arduino.cli.commands.DownloadProgress} - */ -proto.cc.arduino.cli.commands.PlatformInstallResp.prototype.getProgress = function() { - return /** @type{?proto.cc.arduino.cli.commands.DownloadProgress} */ ( - jspb.Message.getWrapperField(this, commands_common_pb.DownloadProgress, 1)); -}; - - -/** @param {?proto.cc.arduino.cli.commands.DownloadProgress|undefined} value */ -proto.cc.arduino.cli.commands.PlatformInstallResp.prototype.setProgress = function(value) { - jspb.Message.setWrapperField(this, 1, value); -}; - - -proto.cc.arduino.cli.commands.PlatformInstallResp.prototype.clearProgress = function() { - this.setProgress(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.cc.arduino.cli.commands.PlatformInstallResp.prototype.hasProgress = function() { - return jspb.Message.getField(this, 1) != null; -}; - - -/** - * optional TaskProgress task_progress = 2; - * @return {?proto.cc.arduino.cli.commands.TaskProgress} - */ -proto.cc.arduino.cli.commands.PlatformInstallResp.prototype.getTaskProgress = function() { - return /** @type{?proto.cc.arduino.cli.commands.TaskProgress} */ ( - jspb.Message.getWrapperField(this, commands_common_pb.TaskProgress, 2)); -}; - - -/** @param {?proto.cc.arduino.cli.commands.TaskProgress|undefined} value */ -proto.cc.arduino.cli.commands.PlatformInstallResp.prototype.setTaskProgress = function(value) { - jspb.Message.setWrapperField(this, 2, value); -}; - - -proto.cc.arduino.cli.commands.PlatformInstallResp.prototype.clearTaskProgress = function() { - this.setTaskProgress(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.cc.arduino.cli.commands.PlatformInstallResp.prototype.hasTaskProgress = function() { - return jspb.Message.getField(this, 2) != null; -}; - - - -/** - * 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.PlatformDownloadReq = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.cc.arduino.cli.commands.PlatformDownloadReq, jspb.Message); -if (goog.DEBUG && !COMPILED) { - proto.cc.arduino.cli.commands.PlatformDownloadReq.displayName = 'proto.cc.arduino.cli.commands.PlatformDownloadReq'; -} - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto suitable for use in Soy templates. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration - * @return {!Object} - */ -proto.cc.arduino.cli.commands.PlatformDownloadReq.prototype.toObject = function(opt_includeInstance) { - return proto.cc.arduino.cli.commands.PlatformDownloadReq.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.cc.arduino.cli.commands.PlatformDownloadReq} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.cc.arduino.cli.commands.PlatformDownloadReq.toObject = function(includeInstance, msg) { - var f, obj = { - instance: (f = msg.getInstance()) && commands_common_pb.Instance.toObject(includeInstance, f), - platformPackage: jspb.Message.getFieldWithDefault(msg, 2, ""), - architecture: jspb.Message.getFieldWithDefault(msg, 3, ""), - version: jspb.Message.getFieldWithDefault(msg, 4, "") - }; - - 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.PlatformDownloadReq} - */ -proto.cc.arduino.cli.commands.PlatformDownloadReq.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.cc.arduino.cli.commands.PlatformDownloadReq; - return proto.cc.arduino.cli.commands.PlatformDownloadReq.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.PlatformDownloadReq} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.cc.arduino.cli.commands.PlatformDownloadReq} - */ -proto.cc.arduino.cli.commands.PlatformDownloadReq.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.setPlatformPackage(value); - break; - case 3: - var value = /** @type {string} */ (reader.readString()); - msg.setArchitecture(value); - break; - case 4: - var value = /** @type {string} */ (reader.readString()); - msg.setVersion(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.PlatformDownloadReq.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.cc.arduino.cli.commands.PlatformDownloadReq.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.PlatformDownloadReq} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.cc.arduino.cli.commands.PlatformDownloadReq.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getInstance(); - if (f != null) { - writer.writeMessage( - 1, - f, - commands_common_pb.Instance.serializeBinaryToWriter - ); - } - f = message.getPlatformPackage(); - if (f.length > 0) { - writer.writeString( - 2, - f - ); - } - f = message.getArchitecture(); - if (f.length > 0) { - writer.writeString( - 3, - f - ); - } - f = message.getVersion(); - if (f.length > 0) { - writer.writeString( - 4, - f - ); - } -}; - - -/** - * optional Instance instance = 1; - * @return {?proto.cc.arduino.cli.commands.Instance} - */ -proto.cc.arduino.cli.commands.PlatformDownloadReq.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 */ -proto.cc.arduino.cli.commands.PlatformDownloadReq.prototype.setInstance = function(value) { - jspb.Message.setWrapperField(this, 1, value); -}; - - -proto.cc.arduino.cli.commands.PlatformDownloadReq.prototype.clearInstance = function() { - this.setInstance(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.cc.arduino.cli.commands.PlatformDownloadReq.prototype.hasInstance = function() { - return jspb.Message.getField(this, 1) != null; -}; - - -/** - * optional string platform_package = 2; - * @return {string} - */ -proto.cc.arduino.cli.commands.PlatformDownloadReq.prototype.getPlatformPackage = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); -}; - - -/** @param {string} value */ -proto.cc.arduino.cli.commands.PlatformDownloadReq.prototype.setPlatformPackage = function(value) { - jspb.Message.setProto3StringField(this, 2, value); -}; - - -/** - * optional string architecture = 3; - * @return {string} - */ -proto.cc.arduino.cli.commands.PlatformDownloadReq.prototype.getArchitecture = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); -}; - - -/** @param {string} value */ -proto.cc.arduino.cli.commands.PlatformDownloadReq.prototype.setArchitecture = function(value) { - jspb.Message.setProto3StringField(this, 3, value); -}; - - -/** - * optional string version = 4; - * @return {string} - */ -proto.cc.arduino.cli.commands.PlatformDownloadReq.prototype.getVersion = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "")); -}; - - -/** @param {string} value */ -proto.cc.arduino.cli.commands.PlatformDownloadReq.prototype.setVersion = function(value) { - jspb.Message.setProto3StringField(this, 4, value); -}; - - - -/** - * 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.PlatformDownloadResp = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.cc.arduino.cli.commands.PlatformDownloadResp, jspb.Message); -if (goog.DEBUG && !COMPILED) { - proto.cc.arduino.cli.commands.PlatformDownloadResp.displayName = 'proto.cc.arduino.cli.commands.PlatformDownloadResp'; -} - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto suitable for use in Soy templates. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration - * @return {!Object} - */ -proto.cc.arduino.cli.commands.PlatformDownloadResp.prototype.toObject = function(opt_includeInstance) { - return proto.cc.arduino.cli.commands.PlatformDownloadResp.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.cc.arduino.cli.commands.PlatformDownloadResp} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.cc.arduino.cli.commands.PlatformDownloadResp.toObject = function(includeInstance, msg) { - var f, obj = { - progress: (f = msg.getProgress()) && commands_common_pb.DownloadProgress.toObject(includeInstance, f) - }; - - 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.PlatformDownloadResp} - */ -proto.cc.arduino.cli.commands.PlatformDownloadResp.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.cc.arduino.cli.commands.PlatformDownloadResp; - return proto.cc.arduino.cli.commands.PlatformDownloadResp.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.PlatformDownloadResp} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.cc.arduino.cli.commands.PlatformDownloadResp} - */ -proto.cc.arduino.cli.commands.PlatformDownloadResp.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.DownloadProgress; - reader.readMessage(value,commands_common_pb.DownloadProgress.deserializeBinaryFromReader); - msg.setProgress(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.PlatformDownloadResp.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.cc.arduino.cli.commands.PlatformDownloadResp.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.PlatformDownloadResp} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.cc.arduino.cli.commands.PlatformDownloadResp.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getProgress(); - if (f != null) { - writer.writeMessage( - 1, - f, - commands_common_pb.DownloadProgress.serializeBinaryToWriter - ); - } -}; - - -/** - * optional DownloadProgress progress = 1; - * @return {?proto.cc.arduino.cli.commands.DownloadProgress} - */ -proto.cc.arduino.cli.commands.PlatformDownloadResp.prototype.getProgress = function() { - return /** @type{?proto.cc.arduino.cli.commands.DownloadProgress} */ ( - jspb.Message.getWrapperField(this, commands_common_pb.DownloadProgress, 1)); -}; - - -/** @param {?proto.cc.arduino.cli.commands.DownloadProgress|undefined} value */ -proto.cc.arduino.cli.commands.PlatformDownloadResp.prototype.setProgress = function(value) { - jspb.Message.setWrapperField(this, 1, value); -}; - - -proto.cc.arduino.cli.commands.PlatformDownloadResp.prototype.clearProgress = function() { - this.setProgress(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.cc.arduino.cli.commands.PlatformDownloadResp.prototype.hasProgress = function() { - return jspb.Message.getField(this, 1) != null; -}; - - - -/** - * 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.PlatformUninstallReq = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.cc.arduino.cli.commands.PlatformUninstallReq, jspb.Message); -if (goog.DEBUG && !COMPILED) { - proto.cc.arduino.cli.commands.PlatformUninstallReq.displayName = 'proto.cc.arduino.cli.commands.PlatformUninstallReq'; -} - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto suitable for use in Soy templates. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration - * @return {!Object} - */ -proto.cc.arduino.cli.commands.PlatformUninstallReq.prototype.toObject = function(opt_includeInstance) { - return proto.cc.arduino.cli.commands.PlatformUninstallReq.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.cc.arduino.cli.commands.PlatformUninstallReq} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.cc.arduino.cli.commands.PlatformUninstallReq.toObject = function(includeInstance, msg) { - var f, obj = { - instance: (f = msg.getInstance()) && commands_common_pb.Instance.toObject(includeInstance, f), - platformPackage: jspb.Message.getFieldWithDefault(msg, 2, ""), - architecture: jspb.Message.getFieldWithDefault(msg, 3, "") - }; - - 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.PlatformUninstallReq} - */ -proto.cc.arduino.cli.commands.PlatformUninstallReq.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.cc.arduino.cli.commands.PlatformUninstallReq; - return proto.cc.arduino.cli.commands.PlatformUninstallReq.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.PlatformUninstallReq} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.cc.arduino.cli.commands.PlatformUninstallReq} - */ -proto.cc.arduino.cli.commands.PlatformUninstallReq.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.setPlatformPackage(value); - break; - case 3: - var value = /** @type {string} */ (reader.readString()); - msg.setArchitecture(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.PlatformUninstallReq.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.cc.arduino.cli.commands.PlatformUninstallReq.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.PlatformUninstallReq} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.cc.arduino.cli.commands.PlatformUninstallReq.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getInstance(); - if (f != null) { - writer.writeMessage( - 1, - f, - commands_common_pb.Instance.serializeBinaryToWriter - ); - } - f = message.getPlatformPackage(); - if (f.length > 0) { - writer.writeString( - 2, - f - ); - } - f = message.getArchitecture(); - if (f.length > 0) { - writer.writeString( - 3, - f - ); - } -}; - - -/** - * optional Instance instance = 1; - * @return {?proto.cc.arduino.cli.commands.Instance} - */ -proto.cc.arduino.cli.commands.PlatformUninstallReq.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 */ -proto.cc.arduino.cli.commands.PlatformUninstallReq.prototype.setInstance = function(value) { - jspb.Message.setWrapperField(this, 1, value); -}; - - -proto.cc.arduino.cli.commands.PlatformUninstallReq.prototype.clearInstance = function() { - this.setInstance(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.cc.arduino.cli.commands.PlatformUninstallReq.prototype.hasInstance = function() { - return jspb.Message.getField(this, 1) != null; -}; - - -/** - * optional string platform_package = 2; - * @return {string} - */ -proto.cc.arduino.cli.commands.PlatformUninstallReq.prototype.getPlatformPackage = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); -}; - - -/** @param {string} value */ -proto.cc.arduino.cli.commands.PlatformUninstallReq.prototype.setPlatformPackage = function(value) { - jspb.Message.setProto3StringField(this, 2, value); -}; - - -/** - * optional string architecture = 3; - * @return {string} - */ -proto.cc.arduino.cli.commands.PlatformUninstallReq.prototype.getArchitecture = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); -}; - - -/** @param {string} value */ -proto.cc.arduino.cli.commands.PlatformUninstallReq.prototype.setArchitecture = function(value) { - jspb.Message.setProto3StringField(this, 3, value); -}; - - - -/** - * 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.PlatformUninstallResp = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.cc.arduino.cli.commands.PlatformUninstallResp, jspb.Message); -if (goog.DEBUG && !COMPILED) { - proto.cc.arduino.cli.commands.PlatformUninstallResp.displayName = 'proto.cc.arduino.cli.commands.PlatformUninstallResp'; -} - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto suitable for use in Soy templates. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration - * @return {!Object} - */ -proto.cc.arduino.cli.commands.PlatformUninstallResp.prototype.toObject = function(opt_includeInstance) { - return proto.cc.arduino.cli.commands.PlatformUninstallResp.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.cc.arduino.cli.commands.PlatformUninstallResp} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.cc.arduino.cli.commands.PlatformUninstallResp.toObject = function(includeInstance, msg) { - var f, obj = { - taskProgress: (f = msg.getTaskProgress()) && commands_common_pb.TaskProgress.toObject(includeInstance, f) - }; - - 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.PlatformUninstallResp} - */ -proto.cc.arduino.cli.commands.PlatformUninstallResp.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.cc.arduino.cli.commands.PlatformUninstallResp; - return proto.cc.arduino.cli.commands.PlatformUninstallResp.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.PlatformUninstallResp} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.cc.arduino.cli.commands.PlatformUninstallResp} - */ -proto.cc.arduino.cli.commands.PlatformUninstallResp.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.TaskProgress; - reader.readMessage(value,commands_common_pb.TaskProgress.deserializeBinaryFromReader); - msg.setTaskProgress(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.PlatformUninstallResp.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.cc.arduino.cli.commands.PlatformUninstallResp.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.PlatformUninstallResp} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.cc.arduino.cli.commands.PlatformUninstallResp.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getTaskProgress(); - if (f != null) { - writer.writeMessage( - 1, - f, - commands_common_pb.TaskProgress.serializeBinaryToWriter - ); - } -}; - - -/** - * optional TaskProgress task_progress = 1; - * @return {?proto.cc.arduino.cli.commands.TaskProgress} - */ -proto.cc.arduino.cli.commands.PlatformUninstallResp.prototype.getTaskProgress = function() { - return /** @type{?proto.cc.arduino.cli.commands.TaskProgress} */ ( - jspb.Message.getWrapperField(this, commands_common_pb.TaskProgress, 1)); -}; - - -/** @param {?proto.cc.arduino.cli.commands.TaskProgress|undefined} value */ -proto.cc.arduino.cli.commands.PlatformUninstallResp.prototype.setTaskProgress = function(value) { - jspb.Message.setWrapperField(this, 1, value); -}; - - -proto.cc.arduino.cli.commands.PlatformUninstallResp.prototype.clearTaskProgress = function() { - this.setTaskProgress(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.cc.arduino.cli.commands.PlatformUninstallResp.prototype.hasTaskProgress = function() { - return jspb.Message.getField(this, 1) != null; -}; - - - -/** - * 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.PlatformUpgradeReq = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.cc.arduino.cli.commands.PlatformUpgradeReq, jspb.Message); -if (goog.DEBUG && !COMPILED) { - proto.cc.arduino.cli.commands.PlatformUpgradeReq.displayName = 'proto.cc.arduino.cli.commands.PlatformUpgradeReq'; -} - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto suitable for use in Soy templates. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration - * @return {!Object} - */ -proto.cc.arduino.cli.commands.PlatformUpgradeReq.prototype.toObject = function(opt_includeInstance) { - return proto.cc.arduino.cli.commands.PlatformUpgradeReq.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.cc.arduino.cli.commands.PlatformUpgradeReq} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.cc.arduino.cli.commands.PlatformUpgradeReq.toObject = function(includeInstance, msg) { - var f, obj = { - instance: (f = msg.getInstance()) && commands_common_pb.Instance.toObject(includeInstance, f), - platformPackage: jspb.Message.getFieldWithDefault(msg, 2, ""), - architecture: jspb.Message.getFieldWithDefault(msg, 3, "") - }; - - 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.PlatformUpgradeReq} - */ -proto.cc.arduino.cli.commands.PlatformUpgradeReq.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.cc.arduino.cli.commands.PlatformUpgradeReq; - return proto.cc.arduino.cli.commands.PlatformUpgradeReq.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.PlatformUpgradeReq} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.cc.arduino.cli.commands.PlatformUpgradeReq} - */ -proto.cc.arduino.cli.commands.PlatformUpgradeReq.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.setPlatformPackage(value); - break; - case 3: - var value = /** @type {string} */ (reader.readString()); - msg.setArchitecture(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.PlatformUpgradeReq.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.cc.arduino.cli.commands.PlatformUpgradeReq.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.PlatformUpgradeReq} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.cc.arduino.cli.commands.PlatformUpgradeReq.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getInstance(); - if (f != null) { - writer.writeMessage( - 1, - f, - commands_common_pb.Instance.serializeBinaryToWriter - ); - } - f = message.getPlatformPackage(); - if (f.length > 0) { - writer.writeString( - 2, - f - ); - } - f = message.getArchitecture(); - if (f.length > 0) { - writer.writeString( - 3, - f - ); - } -}; - - -/** - * optional Instance instance = 1; - * @return {?proto.cc.arduino.cli.commands.Instance} - */ -proto.cc.arduino.cli.commands.PlatformUpgradeReq.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 */ -proto.cc.arduino.cli.commands.PlatformUpgradeReq.prototype.setInstance = function(value) { - jspb.Message.setWrapperField(this, 1, value); -}; - - -proto.cc.arduino.cli.commands.PlatformUpgradeReq.prototype.clearInstance = function() { - this.setInstance(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.cc.arduino.cli.commands.PlatformUpgradeReq.prototype.hasInstance = function() { - return jspb.Message.getField(this, 1) != null; -}; - - -/** - * optional string platform_package = 2; - * @return {string} - */ -proto.cc.arduino.cli.commands.PlatformUpgradeReq.prototype.getPlatformPackage = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); -}; - - -/** @param {string} value */ -proto.cc.arduino.cli.commands.PlatformUpgradeReq.prototype.setPlatformPackage = function(value) { - jspb.Message.setProto3StringField(this, 2, value); -}; - - -/** - * optional string architecture = 3; - * @return {string} - */ -proto.cc.arduino.cli.commands.PlatformUpgradeReq.prototype.getArchitecture = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); -}; - - -/** @param {string} value */ -proto.cc.arduino.cli.commands.PlatformUpgradeReq.prototype.setArchitecture = function(value) { - jspb.Message.setProto3StringField(this, 3, value); -}; - - - -/** - * 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.PlatformUpgradeResp = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.cc.arduino.cli.commands.PlatformUpgradeResp, jspb.Message); -if (goog.DEBUG && !COMPILED) { - proto.cc.arduino.cli.commands.PlatformUpgradeResp.displayName = 'proto.cc.arduino.cli.commands.PlatformUpgradeResp'; -} - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto suitable for use in Soy templates. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration - * @return {!Object} - */ -proto.cc.arduino.cli.commands.PlatformUpgradeResp.prototype.toObject = function(opt_includeInstance) { - return proto.cc.arduino.cli.commands.PlatformUpgradeResp.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.cc.arduino.cli.commands.PlatformUpgradeResp} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.cc.arduino.cli.commands.PlatformUpgradeResp.toObject = function(includeInstance, msg) { - var f, obj = { - progress: (f = msg.getProgress()) && commands_common_pb.DownloadProgress.toObject(includeInstance, f), - taskProgress: (f = msg.getTaskProgress()) && commands_common_pb.TaskProgress.toObject(includeInstance, f) - }; - - 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.PlatformUpgradeResp} - */ -proto.cc.arduino.cli.commands.PlatformUpgradeResp.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.cc.arduino.cli.commands.PlatformUpgradeResp; - return proto.cc.arduino.cli.commands.PlatformUpgradeResp.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.PlatformUpgradeResp} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.cc.arduino.cli.commands.PlatformUpgradeResp} - */ -proto.cc.arduino.cli.commands.PlatformUpgradeResp.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.DownloadProgress; - reader.readMessage(value,commands_common_pb.DownloadProgress.deserializeBinaryFromReader); - msg.setProgress(value); - break; - case 2: - var value = new commands_common_pb.TaskProgress; - reader.readMessage(value,commands_common_pb.TaskProgress.deserializeBinaryFromReader); - msg.setTaskProgress(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.PlatformUpgradeResp.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.cc.arduino.cli.commands.PlatformUpgradeResp.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.PlatformUpgradeResp} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.cc.arduino.cli.commands.PlatformUpgradeResp.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getProgress(); - if (f != null) { - writer.writeMessage( - 1, - f, - commands_common_pb.DownloadProgress.serializeBinaryToWriter - ); - } - f = message.getTaskProgress(); - if (f != null) { - writer.writeMessage( - 2, - f, - commands_common_pb.TaskProgress.serializeBinaryToWriter - ); - } -}; - - -/** - * optional DownloadProgress progress = 1; - * @return {?proto.cc.arduino.cli.commands.DownloadProgress} - */ -proto.cc.arduino.cli.commands.PlatformUpgradeResp.prototype.getProgress = function() { - return /** @type{?proto.cc.arduino.cli.commands.DownloadProgress} */ ( - jspb.Message.getWrapperField(this, commands_common_pb.DownloadProgress, 1)); -}; - - -/** @param {?proto.cc.arduino.cli.commands.DownloadProgress|undefined} value */ -proto.cc.arduino.cli.commands.PlatformUpgradeResp.prototype.setProgress = function(value) { - jspb.Message.setWrapperField(this, 1, value); -}; - - -proto.cc.arduino.cli.commands.PlatformUpgradeResp.prototype.clearProgress = function() { - this.setProgress(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.cc.arduino.cli.commands.PlatformUpgradeResp.prototype.hasProgress = function() { - return jspb.Message.getField(this, 1) != null; -}; - - -/** - * optional TaskProgress task_progress = 2; - * @return {?proto.cc.arduino.cli.commands.TaskProgress} - */ -proto.cc.arduino.cli.commands.PlatformUpgradeResp.prototype.getTaskProgress = function() { - return /** @type{?proto.cc.arduino.cli.commands.TaskProgress} */ ( - jspb.Message.getWrapperField(this, commands_common_pb.TaskProgress, 2)); -}; - - -/** @param {?proto.cc.arduino.cli.commands.TaskProgress|undefined} value */ -proto.cc.arduino.cli.commands.PlatformUpgradeResp.prototype.setTaskProgress = function(value) { - jspb.Message.setWrapperField(this, 2, value); -}; - - -proto.cc.arduino.cli.commands.PlatformUpgradeResp.prototype.clearTaskProgress = function() { - this.setTaskProgress(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.cc.arduino.cli.commands.PlatformUpgradeResp.prototype.hasTaskProgress = function() { - return jspb.Message.getField(this, 2) != null; -}; - - - -/** - * 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.PlatformSearchReq = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.cc.arduino.cli.commands.PlatformSearchReq, jspb.Message); -if (goog.DEBUG && !COMPILED) { - proto.cc.arduino.cli.commands.PlatformSearchReq.displayName = 'proto.cc.arduino.cli.commands.PlatformSearchReq'; -} - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto suitable for use in Soy templates. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration - * @return {!Object} - */ -proto.cc.arduino.cli.commands.PlatformSearchReq.prototype.toObject = function(opt_includeInstance) { - return proto.cc.arduino.cli.commands.PlatformSearchReq.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.cc.arduino.cli.commands.PlatformSearchReq} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.cc.arduino.cli.commands.PlatformSearchReq.toObject = function(includeInstance, msg) { - var f, obj = { - instance: (f = msg.getInstance()) && commands_common_pb.Instance.toObject(includeInstance, f), - searchArgs: jspb.Message.getFieldWithDefault(msg, 2, ""), - allVersions: jspb.Message.getFieldWithDefault(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.PlatformSearchReq} - */ -proto.cc.arduino.cli.commands.PlatformSearchReq.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.cc.arduino.cli.commands.PlatformSearchReq; - return proto.cc.arduino.cli.commands.PlatformSearchReq.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.PlatformSearchReq} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.cc.arduino.cli.commands.PlatformSearchReq} - */ -proto.cc.arduino.cli.commands.PlatformSearchReq.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.setSearchArgs(value); - break; - case 3: - var value = /** @type {boolean} */ (reader.readBool()); - msg.setAllVersions(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.PlatformSearchReq.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.cc.arduino.cli.commands.PlatformSearchReq.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.PlatformSearchReq} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.cc.arduino.cli.commands.PlatformSearchReq.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getInstance(); - if (f != null) { - writer.writeMessage( - 1, - f, - commands_common_pb.Instance.serializeBinaryToWriter - ); - } - f = message.getSearchArgs(); - if (f.length > 0) { - writer.writeString( - 2, - f - ); - } - f = message.getAllVersions(); - if (f) { - writer.writeBool( - 3, - f - ); - } -}; - - -/** - * optional Instance instance = 1; - * @return {?proto.cc.arduino.cli.commands.Instance} - */ -proto.cc.arduino.cli.commands.PlatformSearchReq.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 */ -proto.cc.arduino.cli.commands.PlatformSearchReq.prototype.setInstance = function(value) { - jspb.Message.setWrapperField(this, 1, value); -}; - - -proto.cc.arduino.cli.commands.PlatformSearchReq.prototype.clearInstance = function() { - this.setInstance(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.cc.arduino.cli.commands.PlatformSearchReq.prototype.hasInstance = function() { - return jspb.Message.getField(this, 1) != null; -}; - - -/** - * optional string search_args = 2; - * @return {string} - */ -proto.cc.arduino.cli.commands.PlatformSearchReq.prototype.getSearchArgs = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); -}; - - -/** @param {string} value */ -proto.cc.arduino.cli.commands.PlatformSearchReq.prototype.setSearchArgs = function(value) { - jspb.Message.setProto3StringField(this, 2, value); -}; - - -/** - * optional bool all_versions = 3; - * Note that Boolean fields may be set to 0/1 when serialized from a Java server. - * You should avoid comparisons like {@code val === true/false} in those cases. - * @return {boolean} - */ -proto.cc.arduino.cli.commands.PlatformSearchReq.prototype.getAllVersions = function() { - return /** @type {boolean} */ (jspb.Message.getFieldWithDefault(this, 3, false)); -}; - - -/** @param {boolean} value */ -proto.cc.arduino.cli.commands.PlatformSearchReq.prototype.setAllVersions = function(value) { - jspb.Message.setProto3BooleanField(this, 3, value); -}; - - - -/** - * 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.PlatformSearchResp = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.cc.arduino.cli.commands.PlatformSearchResp.repeatedFields_, null); -}; -goog.inherits(proto.cc.arduino.cli.commands.PlatformSearchResp, jspb.Message); -if (goog.DEBUG && !COMPILED) { - proto.cc.arduino.cli.commands.PlatformSearchResp.displayName = 'proto.cc.arduino.cli.commands.PlatformSearchResp'; -} -/** - * List of repeated fields within this message type. - * @private {!Array} - * @const - */ -proto.cc.arduino.cli.commands.PlatformSearchResp.repeatedFields_ = [1]; - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto suitable for use in Soy templates. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration - * @return {!Object} - */ -proto.cc.arduino.cli.commands.PlatformSearchResp.prototype.toObject = function(opt_includeInstance) { - return proto.cc.arduino.cli.commands.PlatformSearchResp.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.cc.arduino.cli.commands.PlatformSearchResp} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.cc.arduino.cli.commands.PlatformSearchResp.toObject = function(includeInstance, msg) { - var f, obj = { - searchOutputList: jspb.Message.toObjectList(msg.getSearchOutputList(), - proto.cc.arduino.cli.commands.Platform.toObject, includeInstance) - }; - - 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.PlatformSearchResp} - */ -proto.cc.arduino.cli.commands.PlatformSearchResp.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.cc.arduino.cli.commands.PlatformSearchResp; - return proto.cc.arduino.cli.commands.PlatformSearchResp.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.PlatformSearchResp} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.cc.arduino.cli.commands.PlatformSearchResp} - */ -proto.cc.arduino.cli.commands.PlatformSearchResp.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = new proto.cc.arduino.cli.commands.Platform; - reader.readMessage(value,proto.cc.arduino.cli.commands.Platform.deserializeBinaryFromReader); - msg.addSearchOutput(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.PlatformSearchResp.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.cc.arduino.cli.commands.PlatformSearchResp.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.PlatformSearchResp} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.cc.arduino.cli.commands.PlatformSearchResp.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getSearchOutputList(); - if (f.length > 0) { - writer.writeRepeatedMessage( - 1, - f, - proto.cc.arduino.cli.commands.Platform.serializeBinaryToWriter - ); - } -}; - - -/** - * repeated Platform search_output = 1; - * @return {!Array} - */ -proto.cc.arduino.cli.commands.PlatformSearchResp.prototype.getSearchOutputList = function() { - return /** @type{!Array} */ ( - jspb.Message.getRepeatedWrapperField(this, proto.cc.arduino.cli.commands.Platform, 1)); -}; - - -/** @param {!Array} value */ -proto.cc.arduino.cli.commands.PlatformSearchResp.prototype.setSearchOutputList = function(value) { - jspb.Message.setRepeatedWrapperField(this, 1, value); -}; - - -/** - * @param {!proto.cc.arduino.cli.commands.Platform=} opt_value - * @param {number=} opt_index - * @return {!proto.cc.arduino.cli.commands.Platform} - */ -proto.cc.arduino.cli.commands.PlatformSearchResp.prototype.addSearchOutput = function(opt_value, opt_index) { - return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.cc.arduino.cli.commands.Platform, opt_index); -}; - - -proto.cc.arduino.cli.commands.PlatformSearchResp.prototype.clearSearchOutputList = function() { - this.setSearchOutputList([]); -}; - - - -/** - * 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.PlatformListReq = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.cc.arduino.cli.commands.PlatformListReq, jspb.Message); -if (goog.DEBUG && !COMPILED) { - proto.cc.arduino.cli.commands.PlatformListReq.displayName = 'proto.cc.arduino.cli.commands.PlatformListReq'; -} - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto suitable for use in Soy templates. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration - * @return {!Object} - */ -proto.cc.arduino.cli.commands.PlatformListReq.prototype.toObject = function(opt_includeInstance) { - return proto.cc.arduino.cli.commands.PlatformListReq.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.cc.arduino.cli.commands.PlatformListReq} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.cc.arduino.cli.commands.PlatformListReq.toObject = function(includeInstance, msg) { - var f, obj = { - instance: (f = msg.getInstance()) && commands_common_pb.Instance.toObject(includeInstance, f), - updatableOnly: jspb.Message.getFieldWithDefault(msg, 2, 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.PlatformListReq} - */ -proto.cc.arduino.cli.commands.PlatformListReq.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.cc.arduino.cli.commands.PlatformListReq; - return proto.cc.arduino.cli.commands.PlatformListReq.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.PlatformListReq} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.cc.arduino.cli.commands.PlatformListReq} - */ -proto.cc.arduino.cli.commands.PlatformListReq.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 {boolean} */ (reader.readBool()); - msg.setUpdatableOnly(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.PlatformListReq.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.cc.arduino.cli.commands.PlatformListReq.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.PlatformListReq} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.cc.arduino.cli.commands.PlatformListReq.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getInstance(); - if (f != null) { - writer.writeMessage( - 1, - f, - commands_common_pb.Instance.serializeBinaryToWriter - ); - } - f = message.getUpdatableOnly(); - if (f) { - writer.writeBool( - 2, - f - ); - } -}; - - -/** - * optional Instance instance = 1; - * @return {?proto.cc.arduino.cli.commands.Instance} - */ -proto.cc.arduino.cli.commands.PlatformListReq.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 */ -proto.cc.arduino.cli.commands.PlatformListReq.prototype.setInstance = function(value) { - jspb.Message.setWrapperField(this, 1, value); -}; - - -proto.cc.arduino.cli.commands.PlatformListReq.prototype.clearInstance = function() { - this.setInstance(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.cc.arduino.cli.commands.PlatformListReq.prototype.hasInstance = function() { - return jspb.Message.getField(this, 1) != null; -}; - - -/** - * optional bool updatable_only = 2; - * Note that Boolean fields may be set to 0/1 when serialized from a Java server. - * You should avoid comparisons like {@code val === true/false} in those cases. - * @return {boolean} - */ -proto.cc.arduino.cli.commands.PlatformListReq.prototype.getUpdatableOnly = function() { - return /** @type {boolean} */ (jspb.Message.getFieldWithDefault(this, 2, false)); -}; - - -/** @param {boolean} value */ -proto.cc.arduino.cli.commands.PlatformListReq.prototype.setUpdatableOnly = function(value) { - jspb.Message.setProto3BooleanField(this, 2, value); -}; - - - -/** - * 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.PlatformListResp = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.cc.arduino.cli.commands.PlatformListResp.repeatedFields_, null); -}; -goog.inherits(proto.cc.arduino.cli.commands.PlatformListResp, jspb.Message); -if (goog.DEBUG && !COMPILED) { - proto.cc.arduino.cli.commands.PlatformListResp.displayName = 'proto.cc.arduino.cli.commands.PlatformListResp'; -} -/** - * List of repeated fields within this message type. - * @private {!Array} - * @const - */ -proto.cc.arduino.cli.commands.PlatformListResp.repeatedFields_ = [1]; - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto suitable for use in Soy templates. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration - * @return {!Object} - */ -proto.cc.arduino.cli.commands.PlatformListResp.prototype.toObject = function(opt_includeInstance) { - return proto.cc.arduino.cli.commands.PlatformListResp.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.cc.arduino.cli.commands.PlatformListResp} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.cc.arduino.cli.commands.PlatformListResp.toObject = function(includeInstance, msg) { - var f, obj = { - installedPlatformList: jspb.Message.toObjectList(msg.getInstalledPlatformList(), - proto.cc.arduino.cli.commands.Platform.toObject, includeInstance) - }; - - 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.PlatformListResp} - */ -proto.cc.arduino.cli.commands.PlatformListResp.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.cc.arduino.cli.commands.PlatformListResp; - return proto.cc.arduino.cli.commands.PlatformListResp.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.PlatformListResp} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.cc.arduino.cli.commands.PlatformListResp} - */ -proto.cc.arduino.cli.commands.PlatformListResp.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = new proto.cc.arduino.cli.commands.Platform; - reader.readMessage(value,proto.cc.arduino.cli.commands.Platform.deserializeBinaryFromReader); - msg.addInstalledPlatform(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.PlatformListResp.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.cc.arduino.cli.commands.PlatformListResp.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.PlatformListResp} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.cc.arduino.cli.commands.PlatformListResp.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getInstalledPlatformList(); - if (f.length > 0) { - writer.writeRepeatedMessage( - 1, - f, - proto.cc.arduino.cli.commands.Platform.serializeBinaryToWriter - ); - } -}; - - -/** - * repeated Platform installed_platform = 1; - * @return {!Array} - */ -proto.cc.arduino.cli.commands.PlatformListResp.prototype.getInstalledPlatformList = function() { - return /** @type{!Array} */ ( - jspb.Message.getRepeatedWrapperField(this, proto.cc.arduino.cli.commands.Platform, 1)); -}; - - -/** @param {!Array} value */ -proto.cc.arduino.cli.commands.PlatformListResp.prototype.setInstalledPlatformList = function(value) { - jspb.Message.setRepeatedWrapperField(this, 1, value); -}; - - -/** - * @param {!proto.cc.arduino.cli.commands.Platform=} opt_value - * @param {number=} opt_index - * @return {!proto.cc.arduino.cli.commands.Platform} - */ -proto.cc.arduino.cli.commands.PlatformListResp.prototype.addInstalledPlatform = function(opt_value, opt_index) { - return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.cc.arduino.cli.commands.Platform, opt_index); -}; - - -proto.cc.arduino.cli.commands.PlatformListResp.prototype.clearInstalledPlatformList = function() { - this.setInstalledPlatformList([]); -}; - - - -/** - * 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.Platform = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.cc.arduino.cli.commands.Platform.repeatedFields_, null); -}; -goog.inherits(proto.cc.arduino.cli.commands.Platform, jspb.Message); -if (goog.DEBUG && !COMPILED) { - proto.cc.arduino.cli.commands.Platform.displayName = 'proto.cc.arduino.cli.commands.Platform'; -} -/** - * List of repeated fields within this message type. - * @private {!Array} - * @const - */ -proto.cc.arduino.cli.commands.Platform.repeatedFields_ = [8]; - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto suitable for use in Soy templates. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration - * @return {!Object} - */ -proto.cc.arduino.cli.commands.Platform.prototype.toObject = function(opt_includeInstance) { - return proto.cc.arduino.cli.commands.Platform.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.cc.arduino.cli.commands.Platform} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.cc.arduino.cli.commands.Platform.toObject = function(includeInstance, msg) { - var f, obj = { - id: jspb.Message.getFieldWithDefault(msg, 1, ""), - installed: jspb.Message.getFieldWithDefault(msg, 2, ""), - latest: jspb.Message.getFieldWithDefault(msg, 3, ""), - name: jspb.Message.getFieldWithDefault(msg, 4, ""), - maintainer: jspb.Message.getFieldWithDefault(msg, 5, ""), - website: jspb.Message.getFieldWithDefault(msg, 6, ""), - email: jspb.Message.getFieldWithDefault(msg, 7, ""), - boardsList: jspb.Message.toObjectList(msg.getBoardsList(), - proto.cc.arduino.cli.commands.Board.toObject, includeInstance) - }; - - 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.Platform} - */ -proto.cc.arduino.cli.commands.Platform.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.cc.arduino.cli.commands.Platform; - return proto.cc.arduino.cli.commands.Platform.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.Platform} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.cc.arduino.cli.commands.Platform} - */ -proto.cc.arduino.cli.commands.Platform.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.setId(value); - break; - case 2: - var value = /** @type {string} */ (reader.readString()); - msg.setInstalled(value); - break; - case 3: - var value = /** @type {string} */ (reader.readString()); - msg.setLatest(value); - break; - case 4: - var value = /** @type {string} */ (reader.readString()); - msg.setName(value); - break; - case 5: - var value = /** @type {string} */ (reader.readString()); - msg.setMaintainer(value); - break; - case 6: - var value = /** @type {string} */ (reader.readString()); - msg.setWebsite(value); - break; - case 7: - var value = /** @type {string} */ (reader.readString()); - msg.setEmail(value); - break; - case 8: - var value = new proto.cc.arduino.cli.commands.Board; - reader.readMessage(value,proto.cc.arduino.cli.commands.Board.deserializeBinaryFromReader); - msg.addBoards(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.Platform.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.cc.arduino.cli.commands.Platform.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.Platform} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.cc.arduino.cli.commands.Platform.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getId(); - if (f.length > 0) { - writer.writeString( - 1, - f - ); - } - f = message.getInstalled(); - if (f.length > 0) { - writer.writeString( - 2, - f - ); - } - f = message.getLatest(); - if (f.length > 0) { - writer.writeString( - 3, - f - ); - } - f = message.getName(); - if (f.length > 0) { - writer.writeString( - 4, - f - ); - } - f = message.getMaintainer(); - if (f.length > 0) { - writer.writeString( - 5, - f - ); - } - f = message.getWebsite(); - if (f.length > 0) { - writer.writeString( - 6, - f - ); - } - f = message.getEmail(); - if (f.length > 0) { - writer.writeString( - 7, - f - ); - } - f = message.getBoardsList(); - if (f.length > 0) { - writer.writeRepeatedMessage( - 8, - f, - proto.cc.arduino.cli.commands.Board.serializeBinaryToWriter - ); - } -}; - - -/** - * optional string ID = 1; - * @return {string} - */ -proto.cc.arduino.cli.commands.Platform.prototype.getId = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** @param {string} value */ -proto.cc.arduino.cli.commands.Platform.prototype.setId = function(value) { - jspb.Message.setProto3StringField(this, 1, value); -}; - - -/** - * optional string Installed = 2; - * @return {string} - */ -proto.cc.arduino.cli.commands.Platform.prototype.getInstalled = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); -}; - - -/** @param {string} value */ -proto.cc.arduino.cli.commands.Platform.prototype.setInstalled = function(value) { - jspb.Message.setProto3StringField(this, 2, value); -}; - - -/** - * optional string Latest = 3; - * @return {string} - */ -proto.cc.arduino.cli.commands.Platform.prototype.getLatest = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); -}; - - -/** @param {string} value */ -proto.cc.arduino.cli.commands.Platform.prototype.setLatest = function(value) { - jspb.Message.setProto3StringField(this, 3, value); -}; - - -/** - * optional string Name = 4; - * @return {string} - */ -proto.cc.arduino.cli.commands.Platform.prototype.getName = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "")); -}; - - -/** @param {string} value */ -proto.cc.arduino.cli.commands.Platform.prototype.setName = function(value) { - jspb.Message.setProto3StringField(this, 4, value); -}; - - -/** - * optional string Maintainer = 5; - * @return {string} - */ -proto.cc.arduino.cli.commands.Platform.prototype.getMaintainer = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 5, "")); -}; - - -/** @param {string} value */ -proto.cc.arduino.cli.commands.Platform.prototype.setMaintainer = function(value) { - jspb.Message.setProto3StringField(this, 5, value); -}; - - -/** - * optional string Website = 6; - * @return {string} - */ -proto.cc.arduino.cli.commands.Platform.prototype.getWebsite = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 6, "")); -}; - - -/** @param {string} value */ -proto.cc.arduino.cli.commands.Platform.prototype.setWebsite = function(value) { - jspb.Message.setProto3StringField(this, 6, value); -}; - - -/** - * optional string Email = 7; - * @return {string} - */ -proto.cc.arduino.cli.commands.Platform.prototype.getEmail = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 7, "")); -}; - - -/** @param {string} value */ -proto.cc.arduino.cli.commands.Platform.prototype.setEmail = function(value) { - jspb.Message.setProto3StringField(this, 7, value); -}; - - -/** - * repeated Board Boards = 8; - * @return {!Array} - */ -proto.cc.arduino.cli.commands.Platform.prototype.getBoardsList = function() { - return /** @type{!Array} */ ( - jspb.Message.getRepeatedWrapperField(this, proto.cc.arduino.cli.commands.Board, 8)); -}; - - -/** @param {!Array} value */ -proto.cc.arduino.cli.commands.Platform.prototype.setBoardsList = function(value) { - jspb.Message.setRepeatedWrapperField(this, 8, value); -}; - - -/** - * @param {!proto.cc.arduino.cli.commands.Board=} opt_value - * @param {number=} opt_index - * @return {!proto.cc.arduino.cli.commands.Board} - */ -proto.cc.arduino.cli.commands.Platform.prototype.addBoards = function(opt_value, opt_index) { - return jspb.Message.addToRepeatedWrapperField(this, 8, opt_value, proto.cc.arduino.cli.commands.Board, opt_index); -}; - - -proto.cc.arduino.cli.commands.Platform.prototype.clearBoardsList = function() { - this.setBoardsList([]); -}; - - - -/** - * 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.Board = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.cc.arduino.cli.commands.Board, jspb.Message); -if (goog.DEBUG && !COMPILED) { - proto.cc.arduino.cli.commands.Board.displayName = 'proto.cc.arduino.cli.commands.Board'; -} - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto suitable for use in Soy templates. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration - * @return {!Object} - */ -proto.cc.arduino.cli.commands.Board.prototype.toObject = function(opt_includeInstance) { - return proto.cc.arduino.cli.commands.Board.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.cc.arduino.cli.commands.Board} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.cc.arduino.cli.commands.Board.toObject = function(includeInstance, msg) { - var f, obj = { - name: jspb.Message.getFieldWithDefault(msg, 1, ""), - fqbn: jspb.Message.getFieldWithDefault(msg, 2, "") - }; - - 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.Board} - */ -proto.cc.arduino.cli.commands.Board.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.cc.arduino.cli.commands.Board; - return proto.cc.arduino.cli.commands.Board.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.Board} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.cc.arduino.cli.commands.Board} - */ -proto.cc.arduino.cli.commands.Board.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 {string} */ (reader.readString()); - msg.setFqbn(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.Board.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.cc.arduino.cli.commands.Board.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.Board} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.cc.arduino.cli.commands.Board.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getName(); - if (f.length > 0) { - writer.writeString( - 1, - f - ); - } - f = message.getFqbn(); - if (f.length > 0) { - writer.writeString( - 2, - f - ); - } -}; - - -/** - * optional string name = 1; - * @return {string} - */ -proto.cc.arduino.cli.commands.Board.prototype.getName = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** @param {string} value */ -proto.cc.arduino.cli.commands.Board.prototype.setName = function(value) { - jspb.Message.setProto3StringField(this, 1, value); -}; - - -/** - * optional string fqbn = 2; - * @return {string} - */ -proto.cc.arduino.cli.commands.Board.prototype.getFqbn = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); -}; - - -/** @param {string} value */ -proto.cc.arduino.cli.commands.Board.prototype.setFqbn = function(value) { - jspb.Message.setProto3StringField(this, 2, value); -}; - - -goog.object.extend(exports, proto.cc.arduino.cli.commands); diff --git a/arduino-ide-extension/src/node/cli-protocol/commands/lib_grpc_pb.js b/arduino-ide-extension/src/node/cli-protocol/commands/lib_grpc_pb.js deleted file mode 100644 index 97b3a246..00000000 --- a/arduino-ide-extension/src/node/cli-protocol/commands/lib_grpc_pb.js +++ /dev/null @@ -1 +0,0 @@ -// GENERATED CODE -- NO SERVICES IN PROTO \ No newline at end of file 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 deleted file mode 100644 index 39690be5..00000000 --- a/arduino-ide-extension/src/node/cli-protocol/commands/lib_pb.d.ts +++ /dev/null @@ -1,721 +0,0 @@ -// package: cc.arduino.cli.commands -// file: commands/lib.proto - -/* tslint:disable */ -/* eslint-disable */ - -import * as jspb from "google-protobuf"; -import * as commands_common_pb from "../commands/common_pb"; - -export class LibraryDownloadReq extends jspb.Message { - - hasInstance(): boolean; - clearInstance(): void; - getInstance(): commands_common_pb.Instance | undefined; - setInstance(value?: commands_common_pb.Instance): void; - - getName(): string; - setName(value: string): void; - - getVersion(): string; - setVersion(value: string): void; - - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): LibraryDownloadReq.AsObject; - static toObject(includeInstance: boolean, msg: LibraryDownloadReq): LibraryDownloadReq.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: LibraryDownloadReq, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): LibraryDownloadReq; - static deserializeBinaryFromReader(message: LibraryDownloadReq, reader: jspb.BinaryReader): LibraryDownloadReq; -} - -export namespace LibraryDownloadReq { - export type AsObject = { - instance?: commands_common_pb.Instance.AsObject, - name: string, - version: string, - } -} - -export class LibraryDownloadResp extends jspb.Message { - - hasProgress(): boolean; - clearProgress(): void; - getProgress(): commands_common_pb.DownloadProgress | undefined; - setProgress(value?: commands_common_pb.DownloadProgress): void; - - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): LibraryDownloadResp.AsObject; - static toObject(includeInstance: boolean, msg: LibraryDownloadResp): LibraryDownloadResp.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: LibraryDownloadResp, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): LibraryDownloadResp; - static deserializeBinaryFromReader(message: LibraryDownloadResp, reader: jspb.BinaryReader): LibraryDownloadResp; -} - -export namespace LibraryDownloadResp { - export type AsObject = { - progress?: commands_common_pb.DownloadProgress.AsObject, - } -} - -export class LibraryInstallReq extends jspb.Message { - - hasInstance(): boolean; - clearInstance(): void; - getInstance(): commands_common_pb.Instance | undefined; - setInstance(value?: commands_common_pb.Instance): void; - - getName(): string; - setName(value: string): void; - - getVersion(): string; - setVersion(value: string): void; - - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): LibraryInstallReq.AsObject; - static toObject(includeInstance: boolean, msg: LibraryInstallReq): LibraryInstallReq.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: LibraryInstallReq, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): LibraryInstallReq; - static deserializeBinaryFromReader(message: LibraryInstallReq, reader: jspb.BinaryReader): LibraryInstallReq; -} - -export namespace LibraryInstallReq { - export type AsObject = { - instance?: commands_common_pb.Instance.AsObject, - name: string, - version: string, - } -} - -export class LibraryInstallResp extends jspb.Message { - - hasProgress(): boolean; - clearProgress(): void; - getProgress(): commands_common_pb.DownloadProgress | undefined; - setProgress(value?: commands_common_pb.DownloadProgress): void; - - - hasTaskProgress(): boolean; - clearTaskProgress(): void; - getTaskProgress(): commands_common_pb.TaskProgress | undefined; - setTaskProgress(value?: commands_common_pb.TaskProgress): void; - - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): LibraryInstallResp.AsObject; - static toObject(includeInstance: boolean, msg: LibraryInstallResp): LibraryInstallResp.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: LibraryInstallResp, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): LibraryInstallResp; - static deserializeBinaryFromReader(message: LibraryInstallResp, reader: jspb.BinaryReader): LibraryInstallResp; -} - -export namespace LibraryInstallResp { - export type AsObject = { - progress?: commands_common_pb.DownloadProgress.AsObject, - taskProgress?: commands_common_pb.TaskProgress.AsObject, - } -} - -export class LibraryUninstallReq extends jspb.Message { - - hasInstance(): boolean; - clearInstance(): void; - getInstance(): commands_common_pb.Instance | undefined; - setInstance(value?: commands_common_pb.Instance): void; - - getName(): string; - setName(value: string): void; - - getVersion(): string; - setVersion(value: string): void; - - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): LibraryUninstallReq.AsObject; - static toObject(includeInstance: boolean, msg: LibraryUninstallReq): LibraryUninstallReq.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: LibraryUninstallReq, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): LibraryUninstallReq; - static deserializeBinaryFromReader(message: LibraryUninstallReq, reader: jspb.BinaryReader): LibraryUninstallReq; -} - -export namespace LibraryUninstallReq { - export type AsObject = { - instance?: commands_common_pb.Instance.AsObject, - name: string, - version: string, - } -} - -export class LibraryUninstallResp extends jspb.Message { - - hasTaskProgress(): boolean; - clearTaskProgress(): void; - getTaskProgress(): commands_common_pb.TaskProgress | undefined; - setTaskProgress(value?: commands_common_pb.TaskProgress): void; - - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): LibraryUninstallResp.AsObject; - static toObject(includeInstance: boolean, msg: LibraryUninstallResp): LibraryUninstallResp.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: LibraryUninstallResp, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): LibraryUninstallResp; - static deserializeBinaryFromReader(message: LibraryUninstallResp, reader: jspb.BinaryReader): LibraryUninstallResp; -} - -export namespace LibraryUninstallResp { - export type AsObject = { - taskProgress?: commands_common_pb.TaskProgress.AsObject, - } -} - -export class LibraryUpgradeAllReq extends jspb.Message { - - hasInstance(): boolean; - clearInstance(): void; - getInstance(): commands_common_pb.Instance | undefined; - setInstance(value?: commands_common_pb.Instance): void; - - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): LibraryUpgradeAllReq.AsObject; - static toObject(includeInstance: boolean, msg: LibraryUpgradeAllReq): LibraryUpgradeAllReq.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: LibraryUpgradeAllReq, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): LibraryUpgradeAllReq; - static deserializeBinaryFromReader(message: LibraryUpgradeAllReq, reader: jspb.BinaryReader): LibraryUpgradeAllReq; -} - -export namespace LibraryUpgradeAllReq { - export type AsObject = { - instance?: commands_common_pb.Instance.AsObject, - } -} - -export class LibraryUpgradeAllResp extends jspb.Message { - - hasProgress(): boolean; - clearProgress(): void; - getProgress(): commands_common_pb.DownloadProgress | undefined; - setProgress(value?: commands_common_pb.DownloadProgress): void; - - - hasTaskProgress(): boolean; - clearTaskProgress(): void; - getTaskProgress(): commands_common_pb.TaskProgress | undefined; - setTaskProgress(value?: commands_common_pb.TaskProgress): void; - - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): LibraryUpgradeAllResp.AsObject; - static toObject(includeInstance: boolean, msg: LibraryUpgradeAllResp): LibraryUpgradeAllResp.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: LibraryUpgradeAllResp, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): LibraryUpgradeAllResp; - static deserializeBinaryFromReader(message: LibraryUpgradeAllResp, reader: jspb.BinaryReader): LibraryUpgradeAllResp; -} - -export namespace LibraryUpgradeAllResp { - export type AsObject = { - progress?: commands_common_pb.DownloadProgress.AsObject, - taskProgress?: commands_common_pb.TaskProgress.AsObject, - } -} - -export class LibraryResolveDependenciesReq extends jspb.Message { - - hasInstance(): boolean; - clearInstance(): void; - getInstance(): commands_common_pb.Instance | undefined; - setInstance(value?: commands_common_pb.Instance): void; - - getName(): string; - setName(value: string): void; - - getVersion(): string; - setVersion(value: string): void; - - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): LibraryResolveDependenciesReq.AsObject; - static toObject(includeInstance: boolean, msg: LibraryResolveDependenciesReq): LibraryResolveDependenciesReq.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: LibraryResolveDependenciesReq, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): LibraryResolveDependenciesReq; - static deserializeBinaryFromReader(message: LibraryResolveDependenciesReq, reader: jspb.BinaryReader): LibraryResolveDependenciesReq; -} - -export namespace LibraryResolveDependenciesReq { - export type AsObject = { - instance?: commands_common_pb.Instance.AsObject, - name: string, - version: string, - } -} - -export class LibraryResolveDependenciesResp extends jspb.Message { - clearDependenciesList(): void; - getDependenciesList(): Array; - setDependenciesList(value: Array): void; - addDependencies(value?: LibraryDependencyStatus, index?: number): LibraryDependencyStatus; - - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): LibraryResolveDependenciesResp.AsObject; - static toObject(includeInstance: boolean, msg: LibraryResolveDependenciesResp): LibraryResolveDependenciesResp.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: LibraryResolveDependenciesResp, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): LibraryResolveDependenciesResp; - static deserializeBinaryFromReader(message: LibraryResolveDependenciesResp, reader: jspb.BinaryReader): LibraryResolveDependenciesResp; -} - -export namespace LibraryResolveDependenciesResp { - export type AsObject = { - dependenciesList: Array, - } -} - -export class LibraryDependencyStatus extends jspb.Message { - getName(): string; - setName(value: string): void; - - getVersionrequired(): string; - setVersionrequired(value: string): void; - - getVersioninstalled(): string; - setVersioninstalled(value: string): void; - - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): LibraryDependencyStatus.AsObject; - static toObject(includeInstance: boolean, msg: LibraryDependencyStatus): LibraryDependencyStatus.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: LibraryDependencyStatus, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): LibraryDependencyStatus; - static deserializeBinaryFromReader(message: LibraryDependencyStatus, reader: jspb.BinaryReader): LibraryDependencyStatus; -} - -export namespace LibraryDependencyStatus { - export type AsObject = { - name: string, - versionrequired: string, - versioninstalled: string, - } -} - -export class LibrarySearchReq extends jspb.Message { - - hasInstance(): boolean; - clearInstance(): void; - getInstance(): commands_common_pb.Instance | undefined; - setInstance(value?: commands_common_pb.Instance): void; - - getQuery(): string; - setQuery(value: string): void; - - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): LibrarySearchReq.AsObject; - static toObject(includeInstance: boolean, msg: LibrarySearchReq): LibrarySearchReq.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: LibrarySearchReq, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): LibrarySearchReq; - static deserializeBinaryFromReader(message: LibrarySearchReq, reader: jspb.BinaryReader): LibrarySearchReq; -} - -export namespace LibrarySearchReq { - export type AsObject = { - instance?: commands_common_pb.Instance.AsObject, - query: string, - } -} - -export class LibrarySearchResp extends jspb.Message { - clearLibrariesList(): void; - getLibrariesList(): Array; - setLibrariesList(value: Array): void; - addLibraries(value?: SearchedLibrary, index?: number): SearchedLibrary; - - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): LibrarySearchResp.AsObject; - static toObject(includeInstance: boolean, msg: LibrarySearchResp): LibrarySearchResp.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: LibrarySearchResp, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): LibrarySearchResp; - static deserializeBinaryFromReader(message: LibrarySearchResp, reader: jspb.BinaryReader): LibrarySearchResp; -} - -export namespace LibrarySearchResp { - export type AsObject = { - librariesList: Array, - } -} - -export class SearchedLibrary extends jspb.Message { - getName(): string; - setName(value: string): void; - - - getReleasesMap(): jspb.Map; - clearReleasesMap(): void; - - - hasLatest(): boolean; - clearLatest(): void; - getLatest(): LibraryRelease | undefined; - setLatest(value?: LibraryRelease): void; - - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): SearchedLibrary.AsObject; - static toObject(includeInstance: boolean, msg: SearchedLibrary): SearchedLibrary.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: SearchedLibrary, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): SearchedLibrary; - static deserializeBinaryFromReader(message: SearchedLibrary, reader: jspb.BinaryReader): SearchedLibrary; -} - -export namespace SearchedLibrary { - export type AsObject = { - name: string, - - releasesMap: Array<[string, LibraryRelease.AsObject]>, - latest?: LibraryRelease.AsObject, - } -} - -export class LibraryRelease extends jspb.Message { - getAuthor(): string; - setAuthor(value: string): void; - - getVersion(): string; - setVersion(value: string): void; - - getMaintainer(): string; - setMaintainer(value: string): void; - - getSentence(): string; - setSentence(value: string): void; - - getParagraph(): string; - setParagraph(value: string): void; - - getWebsite(): string; - setWebsite(value: string): void; - - getCategory(): string; - setCategory(value: string): void; - - clearArchitecturesList(): void; - getArchitecturesList(): Array; - setArchitecturesList(value: Array): void; - addArchitectures(value: string, index?: number): string; - - clearTypesList(): void; - getTypesList(): Array; - setTypesList(value: Array): void; - addTypes(value: string, index?: number): string; - - - hasResources(): boolean; - clearResources(): void; - getResources(): DownloadResource | undefined; - setResources(value?: DownloadResource): void; - - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): LibraryRelease.AsObject; - static toObject(includeInstance: boolean, msg: LibraryRelease): LibraryRelease.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: LibraryRelease, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): LibraryRelease; - static deserializeBinaryFromReader(message: LibraryRelease, reader: jspb.BinaryReader): LibraryRelease; -} - -export namespace LibraryRelease { - export type AsObject = { - author: string, - version: string, - maintainer: string, - sentence: string, - paragraph: string, - website: string, - category: string, - architecturesList: Array, - typesList: Array, - resources?: DownloadResource.AsObject, - } -} - -export class DownloadResource extends jspb.Message { - getUrl(): string; - setUrl(value: string): void; - - getArchivefilename(): string; - setArchivefilename(value: string): void; - - getChecksum(): string; - setChecksum(value: string): void; - - getSize(): number; - setSize(value: number): void; - - getCachepath(): string; - setCachepath(value: string): void; - - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): DownloadResource.AsObject; - static toObject(includeInstance: boolean, msg: DownloadResource): DownloadResource.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: DownloadResource, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): DownloadResource; - static deserializeBinaryFromReader(message: DownloadResource, reader: jspb.BinaryReader): DownloadResource; -} - -export namespace DownloadResource { - export type AsObject = { - url: string, - archivefilename: string, - checksum: string, - size: number, - cachepath: string, - } -} - -export class LibraryListReq extends jspb.Message { - - hasInstance(): boolean; - clearInstance(): void; - getInstance(): commands_common_pb.Instance | undefined; - setInstance(value?: commands_common_pb.Instance): void; - - getAll(): boolean; - setAll(value: boolean): void; - - getUpdatable(): boolean; - setUpdatable(value: boolean): void; - - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): LibraryListReq.AsObject; - static toObject(includeInstance: boolean, msg: LibraryListReq): LibraryListReq.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: LibraryListReq, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): LibraryListReq; - static deserializeBinaryFromReader(message: LibraryListReq, reader: jspb.BinaryReader): LibraryListReq; -} - -export namespace LibraryListReq { - export type AsObject = { - instance?: commands_common_pb.Instance.AsObject, - all: boolean, - updatable: boolean, - } -} - -export class LibraryListResp extends jspb.Message { - clearInstalledLibraryList(): void; - getInstalledLibraryList(): Array; - setInstalledLibraryList(value: Array): void; - addInstalledLibrary(value?: InstalledLibrary, index?: number): InstalledLibrary; - - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): LibraryListResp.AsObject; - static toObject(includeInstance: boolean, msg: LibraryListResp): LibraryListResp.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: LibraryListResp, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): LibraryListResp; - static deserializeBinaryFromReader(message: LibraryListResp, reader: jspb.BinaryReader): LibraryListResp; -} - -export namespace LibraryListResp { - export type AsObject = { - installedLibraryList: Array, - } -} - -export class InstalledLibrary extends jspb.Message { - - hasLibrary(): boolean; - clearLibrary(): void; - getLibrary(): Library | undefined; - setLibrary(value?: Library): void; - - - hasRelease(): boolean; - clearRelease(): void; - getRelease(): LibraryRelease | undefined; - setRelease(value?: LibraryRelease): void; - - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): InstalledLibrary.AsObject; - static toObject(includeInstance: boolean, msg: InstalledLibrary): InstalledLibrary.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: InstalledLibrary, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): InstalledLibrary; - static deserializeBinaryFromReader(message: InstalledLibrary, reader: jspb.BinaryReader): InstalledLibrary; -} - -export namespace InstalledLibrary { - export type AsObject = { - library?: Library.AsObject, - release?: LibraryRelease.AsObject, - } -} - -export class Library extends jspb.Message { - getName(): string; - setName(value: string): void; - - getAuthor(): string; - setAuthor(value: string): void; - - getMaintainer(): string; - setMaintainer(value: string): void; - - getSentence(): string; - setSentence(value: string): void; - - getParagraph(): string; - setParagraph(value: string): void; - - getWebsite(): string; - setWebsite(value: string): void; - - getCategory(): string; - setCategory(value: string): void; - - clearArchitecturesList(): void; - getArchitecturesList(): Array; - setArchitecturesList(value: Array): void; - addArchitectures(value: string, index?: number): string; - - clearTypesList(): void; - getTypesList(): Array; - setTypesList(value: Array): void; - addTypes(value: string, index?: number): string; - - getInstallDir(): string; - setInstallDir(value: string): void; - - getSourceDir(): string; - setSourceDir(value: string): void; - - getUtilityDir(): string; - setUtilityDir(value: string): void; - - getLocation(): string; - setLocation(value: string): void; - - getContainerPlatform(): string; - setContainerPlatform(value: string): void; - - getLayout(): string; - setLayout(value: string): void; - - getRealName(): string; - setRealName(value: string): void; - - getDotALinkage(): boolean; - setDotALinkage(value: boolean): void; - - getPrecompiled(): boolean; - setPrecompiled(value: boolean): void; - - getLdFlags(): string; - setLdFlags(value: string): void; - - getIsLegacy(): boolean; - setIsLegacy(value: boolean): void; - - getVersion(): string; - setVersion(value: string): void; - - getLicense(): string; - setLicense(value: string): void; - - - getPropertiesMap(): jspb.Map; - clearPropertiesMap(): void; - - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): Library.AsObject; - static toObject(includeInstance: boolean, msg: Library): Library.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: Library, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): Library; - static deserializeBinaryFromReader(message: Library, reader: jspb.BinaryReader): Library; -} - -export namespace Library { - export type AsObject = { - name: string, - author: string, - maintainer: string, - sentence: string, - paragraph: string, - website: string, - category: string, - architecturesList: Array, - typesList: Array, - installDir: string, - sourceDir: string, - utilityDir: string, - location: string, - containerPlatform: string, - layout: string, - realName: string, - dotALinkage: boolean, - precompiled: boolean, - ldFlags: string, - isLegacy: boolean, - version: string, - license: string, - - propertiesMap: Array<[string, string]>, - } -} - -export enum LibraryLayout { - FLAT_LAYOUT = 0, - RECURSIVE_LAYOUT = 1, -} - -export enum LibraryLocation { - IDE_BUILTIN = 0, - PLATFORM_BUILTIN = 1, - REFERENCED_PLATFORM_BUILTIN = 2, - SKETCHBOOK = 3, -} 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 deleted file mode 100644 index d0cc5dee..00000000 --- a/arduino-ide-extension/src/node/cli-protocol/commands/lib_pb.js +++ /dev/null @@ -1,4778 +0,0 @@ -/** - * @fileoverview - * @enhanceable - * @suppress {messageConventions} JS Compiler reports an error if a variable or - * field starts with 'MSG_' and isn't a translatable message. - * @public - */ -// GENERATED CODE -- DO NOT EDIT! - -var jspb = require('google-protobuf'); -var goog = jspb; -var global = Function('return this')(); - -var commands_common_pb = require('../commands/common_pb.js'); -goog.object.extend(proto, commands_common_pb); -goog.exportSymbol('proto.cc.arduino.cli.commands.DownloadResource', null, global); -goog.exportSymbol('proto.cc.arduino.cli.commands.InstalledLibrary', null, global); -goog.exportSymbol('proto.cc.arduino.cli.commands.Library', null, global); -goog.exportSymbol('proto.cc.arduino.cli.commands.LibraryDependencyStatus', null, global); -goog.exportSymbol('proto.cc.arduino.cli.commands.LibraryDownloadReq', null, global); -goog.exportSymbol('proto.cc.arduino.cli.commands.LibraryDownloadResp', null, global); -goog.exportSymbol('proto.cc.arduino.cli.commands.LibraryInstallReq', null, global); -goog.exportSymbol('proto.cc.arduino.cli.commands.LibraryInstallResp', null, global); -goog.exportSymbol('proto.cc.arduino.cli.commands.LibraryLayout', null, global); -goog.exportSymbol('proto.cc.arduino.cli.commands.LibraryListReq', null, global); -goog.exportSymbol('proto.cc.arduino.cli.commands.LibraryListResp', null, global); -goog.exportSymbol('proto.cc.arduino.cli.commands.LibraryLocation', null, global); -goog.exportSymbol('proto.cc.arduino.cli.commands.LibraryRelease', null, global); -goog.exportSymbol('proto.cc.arduino.cli.commands.LibraryResolveDependenciesReq', null, global); -goog.exportSymbol('proto.cc.arduino.cli.commands.LibraryResolveDependenciesResp', null, global); -goog.exportSymbol('proto.cc.arduino.cli.commands.LibrarySearchReq', null, global); -goog.exportSymbol('proto.cc.arduino.cli.commands.LibrarySearchResp', null, global); -goog.exportSymbol('proto.cc.arduino.cli.commands.LibraryUninstallReq', null, global); -goog.exportSymbol('proto.cc.arduino.cli.commands.LibraryUninstallResp', null, global); -goog.exportSymbol('proto.cc.arduino.cli.commands.LibraryUpgradeAllReq', null, global); -goog.exportSymbol('proto.cc.arduino.cli.commands.LibraryUpgradeAllResp', null, global); -goog.exportSymbol('proto.cc.arduino.cli.commands.SearchedLibrary', null, global); - -/** - * 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.LibraryDownloadReq = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.cc.arduino.cli.commands.LibraryDownloadReq, jspb.Message); -if (goog.DEBUG && !COMPILED) { - proto.cc.arduino.cli.commands.LibraryDownloadReq.displayName = 'proto.cc.arduino.cli.commands.LibraryDownloadReq'; -} - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto suitable for use in Soy templates. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration - * @return {!Object} - */ -proto.cc.arduino.cli.commands.LibraryDownloadReq.prototype.toObject = function(opt_includeInstance) { - return proto.cc.arduino.cli.commands.LibraryDownloadReq.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.cc.arduino.cli.commands.LibraryDownloadReq} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.cc.arduino.cli.commands.LibraryDownloadReq.toObject = function(includeInstance, msg) { - var f, obj = { - instance: (f = msg.getInstance()) && commands_common_pb.Instance.toObject(includeInstance, f), - name: jspb.Message.getFieldWithDefault(msg, 2, ""), - version: jspb.Message.getFieldWithDefault(msg, 3, "") - }; - - 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.LibraryDownloadReq} - */ -proto.cc.arduino.cli.commands.LibraryDownloadReq.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.cc.arduino.cli.commands.LibraryDownloadReq; - return proto.cc.arduino.cli.commands.LibraryDownloadReq.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.LibraryDownloadReq} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.cc.arduino.cli.commands.LibraryDownloadReq} - */ -proto.cc.arduino.cli.commands.LibraryDownloadReq.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.setName(value); - break; - case 3: - var value = /** @type {string} */ (reader.readString()); - msg.setVersion(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.LibraryDownloadReq.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.cc.arduino.cli.commands.LibraryDownloadReq.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.LibraryDownloadReq} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.cc.arduino.cli.commands.LibraryDownloadReq.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getInstance(); - if (f != null) { - writer.writeMessage( - 1, - f, - commands_common_pb.Instance.serializeBinaryToWriter - ); - } - f = message.getName(); - if (f.length > 0) { - writer.writeString( - 2, - f - ); - } - f = message.getVersion(); - if (f.length > 0) { - writer.writeString( - 3, - f - ); - } -}; - - -/** - * optional Instance instance = 1; - * @return {?proto.cc.arduino.cli.commands.Instance} - */ -proto.cc.arduino.cli.commands.LibraryDownloadReq.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 */ -proto.cc.arduino.cli.commands.LibraryDownloadReq.prototype.setInstance = function(value) { - jspb.Message.setWrapperField(this, 1, value); -}; - - -proto.cc.arduino.cli.commands.LibraryDownloadReq.prototype.clearInstance = function() { - this.setInstance(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.cc.arduino.cli.commands.LibraryDownloadReq.prototype.hasInstance = function() { - return jspb.Message.getField(this, 1) != null; -}; - - -/** - * optional string name = 2; - * @return {string} - */ -proto.cc.arduino.cli.commands.LibraryDownloadReq.prototype.getName = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); -}; - - -/** @param {string} value */ -proto.cc.arduino.cli.commands.LibraryDownloadReq.prototype.setName = function(value) { - jspb.Message.setProto3StringField(this, 2, value); -}; - - -/** - * optional string version = 3; - * @return {string} - */ -proto.cc.arduino.cli.commands.LibraryDownloadReq.prototype.getVersion = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); -}; - - -/** @param {string} value */ -proto.cc.arduino.cli.commands.LibraryDownloadReq.prototype.setVersion = function(value) { - jspb.Message.setProto3StringField(this, 3, value); -}; - - - -/** - * 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.LibraryDownloadResp = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.cc.arduino.cli.commands.LibraryDownloadResp, jspb.Message); -if (goog.DEBUG && !COMPILED) { - proto.cc.arduino.cli.commands.LibraryDownloadResp.displayName = 'proto.cc.arduino.cli.commands.LibraryDownloadResp'; -} - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto suitable for use in Soy templates. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration - * @return {!Object} - */ -proto.cc.arduino.cli.commands.LibraryDownloadResp.prototype.toObject = function(opt_includeInstance) { - return proto.cc.arduino.cli.commands.LibraryDownloadResp.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.cc.arduino.cli.commands.LibraryDownloadResp} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.cc.arduino.cli.commands.LibraryDownloadResp.toObject = function(includeInstance, msg) { - var f, obj = { - progress: (f = msg.getProgress()) && commands_common_pb.DownloadProgress.toObject(includeInstance, f) - }; - - 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.LibraryDownloadResp} - */ -proto.cc.arduino.cli.commands.LibraryDownloadResp.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.cc.arduino.cli.commands.LibraryDownloadResp; - return proto.cc.arduino.cli.commands.LibraryDownloadResp.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.LibraryDownloadResp} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.cc.arduino.cli.commands.LibraryDownloadResp} - */ -proto.cc.arduino.cli.commands.LibraryDownloadResp.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.DownloadProgress; - reader.readMessage(value,commands_common_pb.DownloadProgress.deserializeBinaryFromReader); - msg.setProgress(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.LibraryDownloadResp.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.cc.arduino.cli.commands.LibraryDownloadResp.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.LibraryDownloadResp} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.cc.arduino.cli.commands.LibraryDownloadResp.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getProgress(); - if (f != null) { - writer.writeMessage( - 1, - f, - commands_common_pb.DownloadProgress.serializeBinaryToWriter - ); - } -}; - - -/** - * optional DownloadProgress progress = 1; - * @return {?proto.cc.arduino.cli.commands.DownloadProgress} - */ -proto.cc.arduino.cli.commands.LibraryDownloadResp.prototype.getProgress = function() { - return /** @type{?proto.cc.arduino.cli.commands.DownloadProgress} */ ( - jspb.Message.getWrapperField(this, commands_common_pb.DownloadProgress, 1)); -}; - - -/** @param {?proto.cc.arduino.cli.commands.DownloadProgress|undefined} value */ -proto.cc.arduino.cli.commands.LibraryDownloadResp.prototype.setProgress = function(value) { - jspb.Message.setWrapperField(this, 1, value); -}; - - -proto.cc.arduino.cli.commands.LibraryDownloadResp.prototype.clearProgress = function() { - this.setProgress(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.cc.arduino.cli.commands.LibraryDownloadResp.prototype.hasProgress = function() { - return jspb.Message.getField(this, 1) != null; -}; - - - -/** - * 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.LibraryInstallReq = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.cc.arduino.cli.commands.LibraryInstallReq, jspb.Message); -if (goog.DEBUG && !COMPILED) { - proto.cc.arduino.cli.commands.LibraryInstallReq.displayName = 'proto.cc.arduino.cli.commands.LibraryInstallReq'; -} - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto suitable for use in Soy templates. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration - * @return {!Object} - */ -proto.cc.arduino.cli.commands.LibraryInstallReq.prototype.toObject = function(opt_includeInstance) { - return proto.cc.arduino.cli.commands.LibraryInstallReq.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.cc.arduino.cli.commands.LibraryInstallReq} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.cc.arduino.cli.commands.LibraryInstallReq.toObject = function(includeInstance, msg) { - var f, obj = { - instance: (f = msg.getInstance()) && commands_common_pb.Instance.toObject(includeInstance, f), - name: jspb.Message.getFieldWithDefault(msg, 2, ""), - version: jspb.Message.getFieldWithDefault(msg, 3, "") - }; - - 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.LibraryInstallReq} - */ -proto.cc.arduino.cli.commands.LibraryInstallReq.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.cc.arduino.cli.commands.LibraryInstallReq; - return proto.cc.arduino.cli.commands.LibraryInstallReq.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.LibraryInstallReq} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.cc.arduino.cli.commands.LibraryInstallReq} - */ -proto.cc.arduino.cli.commands.LibraryInstallReq.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.setName(value); - break; - case 3: - var value = /** @type {string} */ (reader.readString()); - msg.setVersion(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.LibraryInstallReq.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.cc.arduino.cli.commands.LibraryInstallReq.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.LibraryInstallReq} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.cc.arduino.cli.commands.LibraryInstallReq.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getInstance(); - if (f != null) { - writer.writeMessage( - 1, - f, - commands_common_pb.Instance.serializeBinaryToWriter - ); - } - f = message.getName(); - if (f.length > 0) { - writer.writeString( - 2, - f - ); - } - f = message.getVersion(); - if (f.length > 0) { - writer.writeString( - 3, - f - ); - } -}; - - -/** - * optional Instance instance = 1; - * @return {?proto.cc.arduino.cli.commands.Instance} - */ -proto.cc.arduino.cli.commands.LibraryInstallReq.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 */ -proto.cc.arduino.cli.commands.LibraryInstallReq.prototype.setInstance = function(value) { - jspb.Message.setWrapperField(this, 1, value); -}; - - -proto.cc.arduino.cli.commands.LibraryInstallReq.prototype.clearInstance = function() { - this.setInstance(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.cc.arduino.cli.commands.LibraryInstallReq.prototype.hasInstance = function() { - return jspb.Message.getField(this, 1) != null; -}; - - -/** - * optional string name = 2; - * @return {string} - */ -proto.cc.arduino.cli.commands.LibraryInstallReq.prototype.getName = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); -}; - - -/** @param {string} value */ -proto.cc.arduino.cli.commands.LibraryInstallReq.prototype.setName = function(value) { - jspb.Message.setProto3StringField(this, 2, value); -}; - - -/** - * optional string version = 3; - * @return {string} - */ -proto.cc.arduino.cli.commands.LibraryInstallReq.prototype.getVersion = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); -}; - - -/** @param {string} value */ -proto.cc.arduino.cli.commands.LibraryInstallReq.prototype.setVersion = function(value) { - jspb.Message.setProto3StringField(this, 3, value); -}; - - - -/** - * 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.LibraryInstallResp = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.cc.arduino.cli.commands.LibraryInstallResp, jspb.Message); -if (goog.DEBUG && !COMPILED) { - proto.cc.arduino.cli.commands.LibraryInstallResp.displayName = 'proto.cc.arduino.cli.commands.LibraryInstallResp'; -} - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto suitable for use in Soy templates. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration - * @return {!Object} - */ -proto.cc.arduino.cli.commands.LibraryInstallResp.prototype.toObject = function(opt_includeInstance) { - return proto.cc.arduino.cli.commands.LibraryInstallResp.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.cc.arduino.cli.commands.LibraryInstallResp} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.cc.arduino.cli.commands.LibraryInstallResp.toObject = function(includeInstance, msg) { - var f, obj = { - progress: (f = msg.getProgress()) && commands_common_pb.DownloadProgress.toObject(includeInstance, f), - taskProgress: (f = msg.getTaskProgress()) && commands_common_pb.TaskProgress.toObject(includeInstance, f) - }; - - 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.LibraryInstallResp} - */ -proto.cc.arduino.cli.commands.LibraryInstallResp.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.cc.arduino.cli.commands.LibraryInstallResp; - return proto.cc.arduino.cli.commands.LibraryInstallResp.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.LibraryInstallResp} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.cc.arduino.cli.commands.LibraryInstallResp} - */ -proto.cc.arduino.cli.commands.LibraryInstallResp.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.DownloadProgress; - reader.readMessage(value,commands_common_pb.DownloadProgress.deserializeBinaryFromReader); - msg.setProgress(value); - break; - case 2: - var value = new commands_common_pb.TaskProgress; - reader.readMessage(value,commands_common_pb.TaskProgress.deserializeBinaryFromReader); - msg.setTaskProgress(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.LibraryInstallResp.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.cc.arduino.cli.commands.LibraryInstallResp.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.LibraryInstallResp} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.cc.arduino.cli.commands.LibraryInstallResp.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getProgress(); - if (f != null) { - writer.writeMessage( - 1, - f, - commands_common_pb.DownloadProgress.serializeBinaryToWriter - ); - } - f = message.getTaskProgress(); - if (f != null) { - writer.writeMessage( - 2, - f, - commands_common_pb.TaskProgress.serializeBinaryToWriter - ); - } -}; - - -/** - * optional DownloadProgress progress = 1; - * @return {?proto.cc.arduino.cli.commands.DownloadProgress} - */ -proto.cc.arduino.cli.commands.LibraryInstallResp.prototype.getProgress = function() { - return /** @type{?proto.cc.arduino.cli.commands.DownloadProgress} */ ( - jspb.Message.getWrapperField(this, commands_common_pb.DownloadProgress, 1)); -}; - - -/** @param {?proto.cc.arduino.cli.commands.DownloadProgress|undefined} value */ -proto.cc.arduino.cli.commands.LibraryInstallResp.prototype.setProgress = function(value) { - jspb.Message.setWrapperField(this, 1, value); -}; - - -proto.cc.arduino.cli.commands.LibraryInstallResp.prototype.clearProgress = function() { - this.setProgress(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.cc.arduino.cli.commands.LibraryInstallResp.prototype.hasProgress = function() { - return jspb.Message.getField(this, 1) != null; -}; - - -/** - * optional TaskProgress task_progress = 2; - * @return {?proto.cc.arduino.cli.commands.TaskProgress} - */ -proto.cc.arduino.cli.commands.LibraryInstallResp.prototype.getTaskProgress = function() { - return /** @type{?proto.cc.arduino.cli.commands.TaskProgress} */ ( - jspb.Message.getWrapperField(this, commands_common_pb.TaskProgress, 2)); -}; - - -/** @param {?proto.cc.arduino.cli.commands.TaskProgress|undefined} value */ -proto.cc.arduino.cli.commands.LibraryInstallResp.prototype.setTaskProgress = function(value) { - jspb.Message.setWrapperField(this, 2, value); -}; - - -proto.cc.arduino.cli.commands.LibraryInstallResp.prototype.clearTaskProgress = function() { - this.setTaskProgress(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.cc.arduino.cli.commands.LibraryInstallResp.prototype.hasTaskProgress = function() { - return jspb.Message.getField(this, 2) != null; -}; - - - -/** - * 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.LibraryUninstallReq = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.cc.arduino.cli.commands.LibraryUninstallReq, jspb.Message); -if (goog.DEBUG && !COMPILED) { - proto.cc.arduino.cli.commands.LibraryUninstallReq.displayName = 'proto.cc.arduino.cli.commands.LibraryUninstallReq'; -} - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto suitable for use in Soy templates. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration - * @return {!Object} - */ -proto.cc.arduino.cli.commands.LibraryUninstallReq.prototype.toObject = function(opt_includeInstance) { - return proto.cc.arduino.cli.commands.LibraryUninstallReq.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.cc.arduino.cli.commands.LibraryUninstallReq} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.cc.arduino.cli.commands.LibraryUninstallReq.toObject = function(includeInstance, msg) { - var f, obj = { - instance: (f = msg.getInstance()) && commands_common_pb.Instance.toObject(includeInstance, f), - name: jspb.Message.getFieldWithDefault(msg, 2, ""), - version: jspb.Message.getFieldWithDefault(msg, 3, "") - }; - - 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.LibraryUninstallReq} - */ -proto.cc.arduino.cli.commands.LibraryUninstallReq.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.cc.arduino.cli.commands.LibraryUninstallReq; - return proto.cc.arduino.cli.commands.LibraryUninstallReq.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.LibraryUninstallReq} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.cc.arduino.cli.commands.LibraryUninstallReq} - */ -proto.cc.arduino.cli.commands.LibraryUninstallReq.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.setName(value); - break; - case 3: - var value = /** @type {string} */ (reader.readString()); - msg.setVersion(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.LibraryUninstallReq.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.cc.arduino.cli.commands.LibraryUninstallReq.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.LibraryUninstallReq} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.cc.arduino.cli.commands.LibraryUninstallReq.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getInstance(); - if (f != null) { - writer.writeMessage( - 1, - f, - commands_common_pb.Instance.serializeBinaryToWriter - ); - } - f = message.getName(); - if (f.length > 0) { - writer.writeString( - 2, - f - ); - } - f = message.getVersion(); - if (f.length > 0) { - writer.writeString( - 3, - f - ); - } -}; - - -/** - * optional Instance instance = 1; - * @return {?proto.cc.arduino.cli.commands.Instance} - */ -proto.cc.arduino.cli.commands.LibraryUninstallReq.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 */ -proto.cc.arduino.cli.commands.LibraryUninstallReq.prototype.setInstance = function(value) { - jspb.Message.setWrapperField(this, 1, value); -}; - - -proto.cc.arduino.cli.commands.LibraryUninstallReq.prototype.clearInstance = function() { - this.setInstance(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.cc.arduino.cli.commands.LibraryUninstallReq.prototype.hasInstance = function() { - return jspb.Message.getField(this, 1) != null; -}; - - -/** - * optional string name = 2; - * @return {string} - */ -proto.cc.arduino.cli.commands.LibraryUninstallReq.prototype.getName = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); -}; - - -/** @param {string} value */ -proto.cc.arduino.cli.commands.LibraryUninstallReq.prototype.setName = function(value) { - jspb.Message.setProto3StringField(this, 2, value); -}; - - -/** - * optional string version = 3; - * @return {string} - */ -proto.cc.arduino.cli.commands.LibraryUninstallReq.prototype.getVersion = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); -}; - - -/** @param {string} value */ -proto.cc.arduino.cli.commands.LibraryUninstallReq.prototype.setVersion = function(value) { - jspb.Message.setProto3StringField(this, 3, value); -}; - - - -/** - * 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.LibraryUninstallResp = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.cc.arduino.cli.commands.LibraryUninstallResp, jspb.Message); -if (goog.DEBUG && !COMPILED) { - proto.cc.arduino.cli.commands.LibraryUninstallResp.displayName = 'proto.cc.arduino.cli.commands.LibraryUninstallResp'; -} - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto suitable for use in Soy templates. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration - * @return {!Object} - */ -proto.cc.arduino.cli.commands.LibraryUninstallResp.prototype.toObject = function(opt_includeInstance) { - return proto.cc.arduino.cli.commands.LibraryUninstallResp.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.cc.arduino.cli.commands.LibraryUninstallResp} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.cc.arduino.cli.commands.LibraryUninstallResp.toObject = function(includeInstance, msg) { - var f, obj = { - taskProgress: (f = msg.getTaskProgress()) && commands_common_pb.TaskProgress.toObject(includeInstance, f) - }; - - 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.LibraryUninstallResp} - */ -proto.cc.arduino.cli.commands.LibraryUninstallResp.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.cc.arduino.cli.commands.LibraryUninstallResp; - return proto.cc.arduino.cli.commands.LibraryUninstallResp.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.LibraryUninstallResp} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.cc.arduino.cli.commands.LibraryUninstallResp} - */ -proto.cc.arduino.cli.commands.LibraryUninstallResp.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.TaskProgress; - reader.readMessage(value,commands_common_pb.TaskProgress.deserializeBinaryFromReader); - msg.setTaskProgress(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.LibraryUninstallResp.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.cc.arduino.cli.commands.LibraryUninstallResp.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.LibraryUninstallResp} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.cc.arduino.cli.commands.LibraryUninstallResp.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getTaskProgress(); - if (f != null) { - writer.writeMessage( - 1, - f, - commands_common_pb.TaskProgress.serializeBinaryToWriter - ); - } -}; - - -/** - * optional TaskProgress task_progress = 1; - * @return {?proto.cc.arduino.cli.commands.TaskProgress} - */ -proto.cc.arduino.cli.commands.LibraryUninstallResp.prototype.getTaskProgress = function() { - return /** @type{?proto.cc.arduino.cli.commands.TaskProgress} */ ( - jspb.Message.getWrapperField(this, commands_common_pb.TaskProgress, 1)); -}; - - -/** @param {?proto.cc.arduino.cli.commands.TaskProgress|undefined} value */ -proto.cc.arduino.cli.commands.LibraryUninstallResp.prototype.setTaskProgress = function(value) { - jspb.Message.setWrapperField(this, 1, value); -}; - - -proto.cc.arduino.cli.commands.LibraryUninstallResp.prototype.clearTaskProgress = function() { - this.setTaskProgress(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.cc.arduino.cli.commands.LibraryUninstallResp.prototype.hasTaskProgress = function() { - return jspb.Message.getField(this, 1) != null; -}; - - - -/** - * 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.LibraryUpgradeAllReq = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.cc.arduino.cli.commands.LibraryUpgradeAllReq, jspb.Message); -if (goog.DEBUG && !COMPILED) { - proto.cc.arduino.cli.commands.LibraryUpgradeAllReq.displayName = 'proto.cc.arduino.cli.commands.LibraryUpgradeAllReq'; -} - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto suitable for use in Soy templates. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration - * @return {!Object} - */ -proto.cc.arduino.cli.commands.LibraryUpgradeAllReq.prototype.toObject = function(opt_includeInstance) { - return proto.cc.arduino.cli.commands.LibraryUpgradeAllReq.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.cc.arduino.cli.commands.LibraryUpgradeAllReq} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.cc.arduino.cli.commands.LibraryUpgradeAllReq.toObject = function(includeInstance, msg) { - var f, obj = { - instance: (f = msg.getInstance()) && commands_common_pb.Instance.toObject(includeInstance, f) - }; - - 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.LibraryUpgradeAllReq} - */ -proto.cc.arduino.cli.commands.LibraryUpgradeAllReq.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.cc.arduino.cli.commands.LibraryUpgradeAllReq; - return proto.cc.arduino.cli.commands.LibraryUpgradeAllReq.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.LibraryUpgradeAllReq} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.cc.arduino.cli.commands.LibraryUpgradeAllReq} - */ -proto.cc.arduino.cli.commands.LibraryUpgradeAllReq.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; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.cc.arduino.cli.commands.LibraryUpgradeAllReq.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.cc.arduino.cli.commands.LibraryUpgradeAllReq.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.LibraryUpgradeAllReq} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.cc.arduino.cli.commands.LibraryUpgradeAllReq.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getInstance(); - if (f != null) { - writer.writeMessage( - 1, - f, - commands_common_pb.Instance.serializeBinaryToWriter - ); - } -}; - - -/** - * optional Instance instance = 1; - * @return {?proto.cc.arduino.cli.commands.Instance} - */ -proto.cc.arduino.cli.commands.LibraryUpgradeAllReq.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 */ -proto.cc.arduino.cli.commands.LibraryUpgradeAllReq.prototype.setInstance = function(value) { - jspb.Message.setWrapperField(this, 1, value); -}; - - -proto.cc.arduino.cli.commands.LibraryUpgradeAllReq.prototype.clearInstance = function() { - this.setInstance(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.cc.arduino.cli.commands.LibraryUpgradeAllReq.prototype.hasInstance = function() { - return jspb.Message.getField(this, 1) != null; -}; - - - -/** - * 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.LibraryUpgradeAllResp = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.cc.arduino.cli.commands.LibraryUpgradeAllResp, jspb.Message); -if (goog.DEBUG && !COMPILED) { - proto.cc.arduino.cli.commands.LibraryUpgradeAllResp.displayName = 'proto.cc.arduino.cli.commands.LibraryUpgradeAllResp'; -} - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto suitable for use in Soy templates. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration - * @return {!Object} - */ -proto.cc.arduino.cli.commands.LibraryUpgradeAllResp.prototype.toObject = function(opt_includeInstance) { - return proto.cc.arduino.cli.commands.LibraryUpgradeAllResp.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.cc.arduino.cli.commands.LibraryUpgradeAllResp} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.cc.arduino.cli.commands.LibraryUpgradeAllResp.toObject = function(includeInstance, msg) { - var f, obj = { - progress: (f = msg.getProgress()) && commands_common_pb.DownloadProgress.toObject(includeInstance, f), - taskProgress: (f = msg.getTaskProgress()) && commands_common_pb.TaskProgress.toObject(includeInstance, f) - }; - - 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.LibraryUpgradeAllResp} - */ -proto.cc.arduino.cli.commands.LibraryUpgradeAllResp.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.cc.arduino.cli.commands.LibraryUpgradeAllResp; - return proto.cc.arduino.cli.commands.LibraryUpgradeAllResp.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.LibraryUpgradeAllResp} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.cc.arduino.cli.commands.LibraryUpgradeAllResp} - */ -proto.cc.arduino.cli.commands.LibraryUpgradeAllResp.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.DownloadProgress; - reader.readMessage(value,commands_common_pb.DownloadProgress.deserializeBinaryFromReader); - msg.setProgress(value); - break; - case 2: - var value = new commands_common_pb.TaskProgress; - reader.readMessage(value,commands_common_pb.TaskProgress.deserializeBinaryFromReader); - msg.setTaskProgress(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.LibraryUpgradeAllResp.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.cc.arduino.cli.commands.LibraryUpgradeAllResp.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.LibraryUpgradeAllResp} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.cc.arduino.cli.commands.LibraryUpgradeAllResp.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getProgress(); - if (f != null) { - writer.writeMessage( - 1, - f, - commands_common_pb.DownloadProgress.serializeBinaryToWriter - ); - } - f = message.getTaskProgress(); - if (f != null) { - writer.writeMessage( - 2, - f, - commands_common_pb.TaskProgress.serializeBinaryToWriter - ); - } -}; - - -/** - * optional DownloadProgress progress = 1; - * @return {?proto.cc.arduino.cli.commands.DownloadProgress} - */ -proto.cc.arduino.cli.commands.LibraryUpgradeAllResp.prototype.getProgress = function() { - return /** @type{?proto.cc.arduino.cli.commands.DownloadProgress} */ ( - jspb.Message.getWrapperField(this, commands_common_pb.DownloadProgress, 1)); -}; - - -/** @param {?proto.cc.arduino.cli.commands.DownloadProgress|undefined} value */ -proto.cc.arduino.cli.commands.LibraryUpgradeAllResp.prototype.setProgress = function(value) { - jspb.Message.setWrapperField(this, 1, value); -}; - - -proto.cc.arduino.cli.commands.LibraryUpgradeAllResp.prototype.clearProgress = function() { - this.setProgress(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.cc.arduino.cli.commands.LibraryUpgradeAllResp.prototype.hasProgress = function() { - return jspb.Message.getField(this, 1) != null; -}; - - -/** - * optional TaskProgress task_progress = 2; - * @return {?proto.cc.arduino.cli.commands.TaskProgress} - */ -proto.cc.arduino.cli.commands.LibraryUpgradeAllResp.prototype.getTaskProgress = function() { - return /** @type{?proto.cc.arduino.cli.commands.TaskProgress} */ ( - jspb.Message.getWrapperField(this, commands_common_pb.TaskProgress, 2)); -}; - - -/** @param {?proto.cc.arduino.cli.commands.TaskProgress|undefined} value */ -proto.cc.arduino.cli.commands.LibraryUpgradeAllResp.prototype.setTaskProgress = function(value) { - jspb.Message.setWrapperField(this, 2, value); -}; - - -proto.cc.arduino.cli.commands.LibraryUpgradeAllResp.prototype.clearTaskProgress = function() { - this.setTaskProgress(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.cc.arduino.cli.commands.LibraryUpgradeAllResp.prototype.hasTaskProgress = function() { - return jspb.Message.getField(this, 2) != null; -}; - - - -/** - * 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.LibraryResolveDependenciesReq = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.cc.arduino.cli.commands.LibraryResolveDependenciesReq, jspb.Message); -if (goog.DEBUG && !COMPILED) { - proto.cc.arduino.cli.commands.LibraryResolveDependenciesReq.displayName = 'proto.cc.arduino.cli.commands.LibraryResolveDependenciesReq'; -} - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto suitable for use in Soy templates. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration - * @return {!Object} - */ -proto.cc.arduino.cli.commands.LibraryResolveDependenciesReq.prototype.toObject = function(opt_includeInstance) { - return proto.cc.arduino.cli.commands.LibraryResolveDependenciesReq.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.cc.arduino.cli.commands.LibraryResolveDependenciesReq} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.cc.arduino.cli.commands.LibraryResolveDependenciesReq.toObject = function(includeInstance, msg) { - var f, obj = { - instance: (f = msg.getInstance()) && commands_common_pb.Instance.toObject(includeInstance, f), - name: jspb.Message.getFieldWithDefault(msg, 2, ""), - version: jspb.Message.getFieldWithDefault(msg, 3, "") - }; - - 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.LibraryResolveDependenciesReq} - */ -proto.cc.arduino.cli.commands.LibraryResolveDependenciesReq.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.cc.arduino.cli.commands.LibraryResolveDependenciesReq; - return proto.cc.arduino.cli.commands.LibraryResolveDependenciesReq.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.LibraryResolveDependenciesReq} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.cc.arduino.cli.commands.LibraryResolveDependenciesReq} - */ -proto.cc.arduino.cli.commands.LibraryResolveDependenciesReq.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.setName(value); - break; - case 3: - var value = /** @type {string} */ (reader.readString()); - msg.setVersion(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.LibraryResolveDependenciesReq.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.cc.arduino.cli.commands.LibraryResolveDependenciesReq.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.LibraryResolveDependenciesReq} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.cc.arduino.cli.commands.LibraryResolveDependenciesReq.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getInstance(); - if (f != null) { - writer.writeMessage( - 1, - f, - commands_common_pb.Instance.serializeBinaryToWriter - ); - } - f = message.getName(); - if (f.length > 0) { - writer.writeString( - 2, - f - ); - } - f = message.getVersion(); - if (f.length > 0) { - writer.writeString( - 3, - f - ); - } -}; - - -/** - * optional Instance instance = 1; - * @return {?proto.cc.arduino.cli.commands.Instance} - */ -proto.cc.arduino.cli.commands.LibraryResolveDependenciesReq.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 */ -proto.cc.arduino.cli.commands.LibraryResolveDependenciesReq.prototype.setInstance = function(value) { - jspb.Message.setWrapperField(this, 1, value); -}; - - -proto.cc.arduino.cli.commands.LibraryResolveDependenciesReq.prototype.clearInstance = function() { - this.setInstance(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.cc.arduino.cli.commands.LibraryResolveDependenciesReq.prototype.hasInstance = function() { - return jspb.Message.getField(this, 1) != null; -}; - - -/** - * optional string name = 2; - * @return {string} - */ -proto.cc.arduino.cli.commands.LibraryResolveDependenciesReq.prototype.getName = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); -}; - - -/** @param {string} value */ -proto.cc.arduino.cli.commands.LibraryResolveDependenciesReq.prototype.setName = function(value) { - jspb.Message.setProto3StringField(this, 2, value); -}; - - -/** - * optional string version = 3; - * @return {string} - */ -proto.cc.arduino.cli.commands.LibraryResolveDependenciesReq.prototype.getVersion = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); -}; - - -/** @param {string} value */ -proto.cc.arduino.cli.commands.LibraryResolveDependenciesReq.prototype.setVersion = function(value) { - jspb.Message.setProto3StringField(this, 3, value); -}; - - - -/** - * 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.LibraryResolveDependenciesResp = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.cc.arduino.cli.commands.LibraryResolveDependenciesResp.repeatedFields_, null); -}; -goog.inherits(proto.cc.arduino.cli.commands.LibraryResolveDependenciesResp, jspb.Message); -if (goog.DEBUG && !COMPILED) { - proto.cc.arduino.cli.commands.LibraryResolveDependenciesResp.displayName = 'proto.cc.arduino.cli.commands.LibraryResolveDependenciesResp'; -} -/** - * List of repeated fields within this message type. - * @private {!Array} - * @const - */ -proto.cc.arduino.cli.commands.LibraryResolveDependenciesResp.repeatedFields_ = [1]; - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto suitable for use in Soy templates. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration - * @return {!Object} - */ -proto.cc.arduino.cli.commands.LibraryResolveDependenciesResp.prototype.toObject = function(opt_includeInstance) { - return proto.cc.arduino.cli.commands.LibraryResolveDependenciesResp.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.cc.arduino.cli.commands.LibraryResolveDependenciesResp} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.cc.arduino.cli.commands.LibraryResolveDependenciesResp.toObject = function(includeInstance, msg) { - var f, obj = { - dependenciesList: jspb.Message.toObjectList(msg.getDependenciesList(), - proto.cc.arduino.cli.commands.LibraryDependencyStatus.toObject, includeInstance) - }; - - 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.LibraryResolveDependenciesResp} - */ -proto.cc.arduino.cli.commands.LibraryResolveDependenciesResp.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.cc.arduino.cli.commands.LibraryResolveDependenciesResp; - return proto.cc.arduino.cli.commands.LibraryResolveDependenciesResp.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.LibraryResolveDependenciesResp} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.cc.arduino.cli.commands.LibraryResolveDependenciesResp} - */ -proto.cc.arduino.cli.commands.LibraryResolveDependenciesResp.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = new proto.cc.arduino.cli.commands.LibraryDependencyStatus; - reader.readMessage(value,proto.cc.arduino.cli.commands.LibraryDependencyStatus.deserializeBinaryFromReader); - msg.addDependencies(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.LibraryResolveDependenciesResp.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.cc.arduino.cli.commands.LibraryResolveDependenciesResp.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.LibraryResolveDependenciesResp} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.cc.arduino.cli.commands.LibraryResolveDependenciesResp.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getDependenciesList(); - if (f.length > 0) { - writer.writeRepeatedMessage( - 1, - f, - proto.cc.arduino.cli.commands.LibraryDependencyStatus.serializeBinaryToWriter - ); - } -}; - - -/** - * repeated LibraryDependencyStatus dependencies = 1; - * @return {!Array} - */ -proto.cc.arduino.cli.commands.LibraryResolveDependenciesResp.prototype.getDependenciesList = function() { - return /** @type{!Array} */ ( - jspb.Message.getRepeatedWrapperField(this, proto.cc.arduino.cli.commands.LibraryDependencyStatus, 1)); -}; - - -/** @param {!Array} value */ -proto.cc.arduino.cli.commands.LibraryResolveDependenciesResp.prototype.setDependenciesList = function(value) { - jspb.Message.setRepeatedWrapperField(this, 1, value); -}; - - -/** - * @param {!proto.cc.arduino.cli.commands.LibraryDependencyStatus=} opt_value - * @param {number=} opt_index - * @return {!proto.cc.arduino.cli.commands.LibraryDependencyStatus} - */ -proto.cc.arduino.cli.commands.LibraryResolveDependenciesResp.prototype.addDependencies = function(opt_value, opt_index) { - return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.cc.arduino.cli.commands.LibraryDependencyStatus, opt_index); -}; - - -proto.cc.arduino.cli.commands.LibraryResolveDependenciesResp.prototype.clearDependenciesList = function() { - this.setDependenciesList([]); -}; - - - -/** - * 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.LibraryDependencyStatus = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.cc.arduino.cli.commands.LibraryDependencyStatus, jspb.Message); -if (goog.DEBUG && !COMPILED) { - proto.cc.arduino.cli.commands.LibraryDependencyStatus.displayName = 'proto.cc.arduino.cli.commands.LibraryDependencyStatus'; -} - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto suitable for use in Soy templates. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration - * @return {!Object} - */ -proto.cc.arduino.cli.commands.LibraryDependencyStatus.prototype.toObject = function(opt_includeInstance) { - return proto.cc.arduino.cli.commands.LibraryDependencyStatus.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.cc.arduino.cli.commands.LibraryDependencyStatus} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.cc.arduino.cli.commands.LibraryDependencyStatus.toObject = function(includeInstance, msg) { - var f, obj = { - name: jspb.Message.getFieldWithDefault(msg, 1, ""), - versionrequired: jspb.Message.getFieldWithDefault(msg, 2, ""), - versioninstalled: jspb.Message.getFieldWithDefault(msg, 3, "") - }; - - 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.LibraryDependencyStatus} - */ -proto.cc.arduino.cli.commands.LibraryDependencyStatus.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.cc.arduino.cli.commands.LibraryDependencyStatus; - return proto.cc.arduino.cli.commands.LibraryDependencyStatus.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.LibraryDependencyStatus} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.cc.arduino.cli.commands.LibraryDependencyStatus} - */ -proto.cc.arduino.cli.commands.LibraryDependencyStatus.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 {string} */ (reader.readString()); - msg.setVersionrequired(value); - break; - case 3: - var value = /** @type {string} */ (reader.readString()); - msg.setVersioninstalled(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.LibraryDependencyStatus.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.cc.arduino.cli.commands.LibraryDependencyStatus.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.LibraryDependencyStatus} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.cc.arduino.cli.commands.LibraryDependencyStatus.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getName(); - if (f.length > 0) { - writer.writeString( - 1, - f - ); - } - f = message.getVersionrequired(); - if (f.length > 0) { - writer.writeString( - 2, - f - ); - } - f = message.getVersioninstalled(); - if (f.length > 0) { - writer.writeString( - 3, - f - ); - } -}; - - -/** - * optional string name = 1; - * @return {string} - */ -proto.cc.arduino.cli.commands.LibraryDependencyStatus.prototype.getName = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** @param {string} value */ -proto.cc.arduino.cli.commands.LibraryDependencyStatus.prototype.setName = function(value) { - jspb.Message.setProto3StringField(this, 1, value); -}; - - -/** - * optional string versionRequired = 2; - * @return {string} - */ -proto.cc.arduino.cli.commands.LibraryDependencyStatus.prototype.getVersionrequired = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); -}; - - -/** @param {string} value */ -proto.cc.arduino.cli.commands.LibraryDependencyStatus.prototype.setVersionrequired = function(value) { - jspb.Message.setProto3StringField(this, 2, value); -}; - - -/** - * optional string versionInstalled = 3; - * @return {string} - */ -proto.cc.arduino.cli.commands.LibraryDependencyStatus.prototype.getVersioninstalled = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); -}; - - -/** @param {string} value */ -proto.cc.arduino.cli.commands.LibraryDependencyStatus.prototype.setVersioninstalled = function(value) { - jspb.Message.setProto3StringField(this, 3, value); -}; - - - -/** - * 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.LibrarySearchReq = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.cc.arduino.cli.commands.LibrarySearchReq, jspb.Message); -if (goog.DEBUG && !COMPILED) { - proto.cc.arduino.cli.commands.LibrarySearchReq.displayName = 'proto.cc.arduino.cli.commands.LibrarySearchReq'; -} - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto suitable for use in Soy templates. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration - * @return {!Object} - */ -proto.cc.arduino.cli.commands.LibrarySearchReq.prototype.toObject = function(opt_includeInstance) { - return proto.cc.arduino.cli.commands.LibrarySearchReq.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.cc.arduino.cli.commands.LibrarySearchReq} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.cc.arduino.cli.commands.LibrarySearchReq.toObject = function(includeInstance, msg) { - var f, obj = { - instance: (f = msg.getInstance()) && commands_common_pb.Instance.toObject(includeInstance, f), - query: jspb.Message.getFieldWithDefault(msg, 2, "") - }; - - 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.LibrarySearchReq} - */ -proto.cc.arduino.cli.commands.LibrarySearchReq.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.cc.arduino.cli.commands.LibrarySearchReq; - return proto.cc.arduino.cli.commands.LibrarySearchReq.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.LibrarySearchReq} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.cc.arduino.cli.commands.LibrarySearchReq} - */ -proto.cc.arduino.cli.commands.LibrarySearchReq.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.setQuery(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.LibrarySearchReq.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.cc.arduino.cli.commands.LibrarySearchReq.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.LibrarySearchReq} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.cc.arduino.cli.commands.LibrarySearchReq.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getInstance(); - if (f != null) { - writer.writeMessage( - 1, - f, - commands_common_pb.Instance.serializeBinaryToWriter - ); - } - f = message.getQuery(); - if (f.length > 0) { - writer.writeString( - 2, - f - ); - } -}; - - -/** - * optional Instance instance = 1; - * @return {?proto.cc.arduino.cli.commands.Instance} - */ -proto.cc.arduino.cli.commands.LibrarySearchReq.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 */ -proto.cc.arduino.cli.commands.LibrarySearchReq.prototype.setInstance = function(value) { - jspb.Message.setWrapperField(this, 1, value); -}; - - -proto.cc.arduino.cli.commands.LibrarySearchReq.prototype.clearInstance = function() { - this.setInstance(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.cc.arduino.cli.commands.LibrarySearchReq.prototype.hasInstance = function() { - return jspb.Message.getField(this, 1) != null; -}; - - -/** - * optional string query = 2; - * @return {string} - */ -proto.cc.arduino.cli.commands.LibrarySearchReq.prototype.getQuery = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); -}; - - -/** @param {string} value */ -proto.cc.arduino.cli.commands.LibrarySearchReq.prototype.setQuery = function(value) { - jspb.Message.setProto3StringField(this, 2, value); -}; - - - -/** - * 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.LibrarySearchResp = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.cc.arduino.cli.commands.LibrarySearchResp.repeatedFields_, null); -}; -goog.inherits(proto.cc.arduino.cli.commands.LibrarySearchResp, jspb.Message); -if (goog.DEBUG && !COMPILED) { - proto.cc.arduino.cli.commands.LibrarySearchResp.displayName = 'proto.cc.arduino.cli.commands.LibrarySearchResp'; -} -/** - * List of repeated fields within this message type. - * @private {!Array} - * @const - */ -proto.cc.arduino.cli.commands.LibrarySearchResp.repeatedFields_ = [1]; - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto suitable for use in Soy templates. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration - * @return {!Object} - */ -proto.cc.arduino.cli.commands.LibrarySearchResp.prototype.toObject = function(opt_includeInstance) { - return proto.cc.arduino.cli.commands.LibrarySearchResp.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.cc.arduino.cli.commands.LibrarySearchResp} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.cc.arduino.cli.commands.LibrarySearchResp.toObject = function(includeInstance, msg) { - var f, obj = { - librariesList: jspb.Message.toObjectList(msg.getLibrariesList(), - proto.cc.arduino.cli.commands.SearchedLibrary.toObject, includeInstance) - }; - - 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.LibrarySearchResp} - */ -proto.cc.arduino.cli.commands.LibrarySearchResp.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.cc.arduino.cli.commands.LibrarySearchResp; - return proto.cc.arduino.cli.commands.LibrarySearchResp.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.LibrarySearchResp} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.cc.arduino.cli.commands.LibrarySearchResp} - */ -proto.cc.arduino.cli.commands.LibrarySearchResp.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = new proto.cc.arduino.cli.commands.SearchedLibrary; - reader.readMessage(value,proto.cc.arduino.cli.commands.SearchedLibrary.deserializeBinaryFromReader); - msg.addLibraries(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.LibrarySearchResp.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.cc.arduino.cli.commands.LibrarySearchResp.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.LibrarySearchResp} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.cc.arduino.cli.commands.LibrarySearchResp.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getLibrariesList(); - if (f.length > 0) { - writer.writeRepeatedMessage( - 1, - f, - proto.cc.arduino.cli.commands.SearchedLibrary.serializeBinaryToWriter - ); - } -}; - - -/** - * repeated SearchedLibrary libraries = 1; - * @return {!Array} - */ -proto.cc.arduino.cli.commands.LibrarySearchResp.prototype.getLibrariesList = function() { - return /** @type{!Array} */ ( - jspb.Message.getRepeatedWrapperField(this, proto.cc.arduino.cli.commands.SearchedLibrary, 1)); -}; - - -/** @param {!Array} value */ -proto.cc.arduino.cli.commands.LibrarySearchResp.prototype.setLibrariesList = function(value) { - jspb.Message.setRepeatedWrapperField(this, 1, value); -}; - - -/** - * @param {!proto.cc.arduino.cli.commands.SearchedLibrary=} opt_value - * @param {number=} opt_index - * @return {!proto.cc.arduino.cli.commands.SearchedLibrary} - */ -proto.cc.arduino.cli.commands.LibrarySearchResp.prototype.addLibraries = function(opt_value, opt_index) { - return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.cc.arduino.cli.commands.SearchedLibrary, opt_index); -}; - - -proto.cc.arduino.cli.commands.LibrarySearchResp.prototype.clearLibrariesList = function() { - this.setLibrariesList([]); -}; - - - -/** - * 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.SearchedLibrary = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.cc.arduino.cli.commands.SearchedLibrary, jspb.Message); -if (goog.DEBUG && !COMPILED) { - proto.cc.arduino.cli.commands.SearchedLibrary.displayName = 'proto.cc.arduino.cli.commands.SearchedLibrary'; -} - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto suitable for use in Soy templates. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration - * @return {!Object} - */ -proto.cc.arduino.cli.commands.SearchedLibrary.prototype.toObject = function(opt_includeInstance) { - return proto.cc.arduino.cli.commands.SearchedLibrary.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.cc.arduino.cli.commands.SearchedLibrary} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.cc.arduino.cli.commands.SearchedLibrary.toObject = function(includeInstance, msg) { - var f, obj = { - name: jspb.Message.getFieldWithDefault(msg, 1, ""), - releasesMap: (f = msg.getReleasesMap()) ? f.toObject(includeInstance, proto.cc.arduino.cli.commands.LibraryRelease.toObject) : [], - latest: (f = msg.getLatest()) && proto.cc.arduino.cli.commands.LibraryRelease.toObject(includeInstance, f) - }; - - 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.SearchedLibrary} - */ -proto.cc.arduino.cli.commands.SearchedLibrary.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.cc.arduino.cli.commands.SearchedLibrary; - return proto.cc.arduino.cli.commands.SearchedLibrary.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.SearchedLibrary} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.cc.arduino.cli.commands.SearchedLibrary} - */ -proto.cc.arduino.cli.commands.SearchedLibrary.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 = msg.getReleasesMap(); - reader.readMessage(value, function(message, reader) { - jspb.Map.deserializeBinary(message, reader, jspb.BinaryReader.prototype.readString, jspb.BinaryReader.prototype.readMessage, proto.cc.arduino.cli.commands.LibraryRelease.deserializeBinaryFromReader, ""); - }); - break; - case 3: - var value = new proto.cc.arduino.cli.commands.LibraryRelease; - reader.readMessage(value,proto.cc.arduino.cli.commands.LibraryRelease.deserializeBinaryFromReader); - msg.setLatest(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.SearchedLibrary.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.cc.arduino.cli.commands.SearchedLibrary.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.SearchedLibrary} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.cc.arduino.cli.commands.SearchedLibrary.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getName(); - if (f.length > 0) { - writer.writeString( - 1, - f - ); - } - f = message.getReleasesMap(true); - if (f && f.getLength() > 0) { - f.serializeBinary(2, writer, jspb.BinaryWriter.prototype.writeString, jspb.BinaryWriter.prototype.writeMessage, proto.cc.arduino.cli.commands.LibraryRelease.serializeBinaryToWriter); - } - f = message.getLatest(); - if (f != null) { - writer.writeMessage( - 3, - f, - proto.cc.arduino.cli.commands.LibraryRelease.serializeBinaryToWriter - ); - } -}; - - -/** - * optional string name = 1; - * @return {string} - */ -proto.cc.arduino.cli.commands.SearchedLibrary.prototype.getName = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** @param {string} value */ -proto.cc.arduino.cli.commands.SearchedLibrary.prototype.setName = function(value) { - jspb.Message.setProto3StringField(this, 1, value); -}; - - -/** - * map releases = 2; - * @param {boolean=} opt_noLazyCreate Do not create the map if - * empty, instead returning `undefined` - * @return {!jspb.Map} - */ -proto.cc.arduino.cli.commands.SearchedLibrary.prototype.getReleasesMap = function(opt_noLazyCreate) { - return /** @type {!jspb.Map} */ ( - jspb.Message.getMapField(this, 2, opt_noLazyCreate, - proto.cc.arduino.cli.commands.LibraryRelease)); -}; - - -proto.cc.arduino.cli.commands.SearchedLibrary.prototype.clearReleasesMap = function() { - this.getReleasesMap().clear(); -}; - - -/** - * optional LibraryRelease latest = 3; - * @return {?proto.cc.arduino.cli.commands.LibraryRelease} - */ -proto.cc.arduino.cli.commands.SearchedLibrary.prototype.getLatest = function() { - return /** @type{?proto.cc.arduino.cli.commands.LibraryRelease} */ ( - jspb.Message.getWrapperField(this, proto.cc.arduino.cli.commands.LibraryRelease, 3)); -}; - - -/** @param {?proto.cc.arduino.cli.commands.LibraryRelease|undefined} value */ -proto.cc.arduino.cli.commands.SearchedLibrary.prototype.setLatest = function(value) { - jspb.Message.setWrapperField(this, 3, value); -}; - - -proto.cc.arduino.cli.commands.SearchedLibrary.prototype.clearLatest = function() { - this.setLatest(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.cc.arduino.cli.commands.SearchedLibrary.prototype.hasLatest = function() { - return jspb.Message.getField(this, 3) != null; -}; - - - -/** - * 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.LibraryRelease = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.cc.arduino.cli.commands.LibraryRelease.repeatedFields_, null); -}; -goog.inherits(proto.cc.arduino.cli.commands.LibraryRelease, jspb.Message); -if (goog.DEBUG && !COMPILED) { - proto.cc.arduino.cli.commands.LibraryRelease.displayName = 'proto.cc.arduino.cli.commands.LibraryRelease'; -} -/** - * List of repeated fields within this message type. - * @private {!Array} - * @const - */ -proto.cc.arduino.cli.commands.LibraryRelease.repeatedFields_ = [8,9]; - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto suitable for use in Soy templates. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration - * @return {!Object} - */ -proto.cc.arduino.cli.commands.LibraryRelease.prototype.toObject = function(opt_includeInstance) { - return proto.cc.arduino.cli.commands.LibraryRelease.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.cc.arduino.cli.commands.LibraryRelease} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.cc.arduino.cli.commands.LibraryRelease.toObject = function(includeInstance, msg) { - var f, obj = { - author: jspb.Message.getFieldWithDefault(msg, 1, ""), - version: jspb.Message.getFieldWithDefault(msg, 2, ""), - maintainer: jspb.Message.getFieldWithDefault(msg, 3, ""), - sentence: jspb.Message.getFieldWithDefault(msg, 4, ""), - paragraph: jspb.Message.getFieldWithDefault(msg, 5, ""), - website: jspb.Message.getFieldWithDefault(msg, 6, ""), - category: jspb.Message.getFieldWithDefault(msg, 7, ""), - architecturesList: jspb.Message.getRepeatedField(msg, 8), - typesList: jspb.Message.getRepeatedField(msg, 9), - resources: (f = msg.getResources()) && proto.cc.arduino.cli.commands.DownloadResource.toObject(includeInstance, f) - }; - - 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.LibraryRelease} - */ -proto.cc.arduino.cli.commands.LibraryRelease.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.cc.arduino.cli.commands.LibraryRelease; - return proto.cc.arduino.cli.commands.LibraryRelease.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.LibraryRelease} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.cc.arduino.cli.commands.LibraryRelease} - */ -proto.cc.arduino.cli.commands.LibraryRelease.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.setAuthor(value); - break; - case 2: - var value = /** @type {string} */ (reader.readString()); - msg.setVersion(value); - break; - case 3: - var value = /** @type {string} */ (reader.readString()); - msg.setMaintainer(value); - break; - case 4: - var value = /** @type {string} */ (reader.readString()); - msg.setSentence(value); - break; - case 5: - var value = /** @type {string} */ (reader.readString()); - msg.setParagraph(value); - break; - case 6: - var value = /** @type {string} */ (reader.readString()); - msg.setWebsite(value); - break; - case 7: - var value = /** @type {string} */ (reader.readString()); - msg.setCategory(value); - break; - case 8: - var value = /** @type {string} */ (reader.readString()); - msg.addArchitectures(value); - break; - case 9: - var value = /** @type {string} */ (reader.readString()); - msg.addTypes(value); - break; - case 10: - var value = new proto.cc.arduino.cli.commands.DownloadResource; - reader.readMessage(value,proto.cc.arduino.cli.commands.DownloadResource.deserializeBinaryFromReader); - msg.setResources(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.LibraryRelease.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.cc.arduino.cli.commands.LibraryRelease.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.LibraryRelease} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.cc.arduino.cli.commands.LibraryRelease.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getAuthor(); - if (f.length > 0) { - writer.writeString( - 1, - f - ); - } - f = message.getVersion(); - if (f.length > 0) { - writer.writeString( - 2, - f - ); - } - f = message.getMaintainer(); - if (f.length > 0) { - writer.writeString( - 3, - f - ); - } - f = message.getSentence(); - if (f.length > 0) { - writer.writeString( - 4, - f - ); - } - f = message.getParagraph(); - if (f.length > 0) { - writer.writeString( - 5, - f - ); - } - f = message.getWebsite(); - if (f.length > 0) { - writer.writeString( - 6, - f - ); - } - f = message.getCategory(); - if (f.length > 0) { - writer.writeString( - 7, - f - ); - } - f = message.getArchitecturesList(); - if (f.length > 0) { - writer.writeRepeatedString( - 8, - f - ); - } - f = message.getTypesList(); - if (f.length > 0) { - writer.writeRepeatedString( - 9, - f - ); - } - f = message.getResources(); - if (f != null) { - writer.writeMessage( - 10, - f, - proto.cc.arduino.cli.commands.DownloadResource.serializeBinaryToWriter - ); - } -}; - - -/** - * optional string author = 1; - * @return {string} - */ -proto.cc.arduino.cli.commands.LibraryRelease.prototype.getAuthor = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** @param {string} value */ -proto.cc.arduino.cli.commands.LibraryRelease.prototype.setAuthor = function(value) { - jspb.Message.setProto3StringField(this, 1, value); -}; - - -/** - * optional string version = 2; - * @return {string} - */ -proto.cc.arduino.cli.commands.LibraryRelease.prototype.getVersion = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); -}; - - -/** @param {string} value */ -proto.cc.arduino.cli.commands.LibraryRelease.prototype.setVersion = function(value) { - jspb.Message.setProto3StringField(this, 2, value); -}; - - -/** - * optional string maintainer = 3; - * @return {string} - */ -proto.cc.arduino.cli.commands.LibraryRelease.prototype.getMaintainer = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); -}; - - -/** @param {string} value */ -proto.cc.arduino.cli.commands.LibraryRelease.prototype.setMaintainer = function(value) { - jspb.Message.setProto3StringField(this, 3, value); -}; - - -/** - * optional string sentence = 4; - * @return {string} - */ -proto.cc.arduino.cli.commands.LibraryRelease.prototype.getSentence = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "")); -}; - - -/** @param {string} value */ -proto.cc.arduino.cli.commands.LibraryRelease.prototype.setSentence = function(value) { - jspb.Message.setProto3StringField(this, 4, value); -}; - - -/** - * optional string paragraph = 5; - * @return {string} - */ -proto.cc.arduino.cli.commands.LibraryRelease.prototype.getParagraph = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 5, "")); -}; - - -/** @param {string} value */ -proto.cc.arduino.cli.commands.LibraryRelease.prototype.setParagraph = function(value) { - jspb.Message.setProto3StringField(this, 5, value); -}; - - -/** - * optional string website = 6; - * @return {string} - */ -proto.cc.arduino.cli.commands.LibraryRelease.prototype.getWebsite = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 6, "")); -}; - - -/** @param {string} value */ -proto.cc.arduino.cli.commands.LibraryRelease.prototype.setWebsite = function(value) { - jspb.Message.setProto3StringField(this, 6, value); -}; - - -/** - * optional string category = 7; - * @return {string} - */ -proto.cc.arduino.cli.commands.LibraryRelease.prototype.getCategory = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 7, "")); -}; - - -/** @param {string} value */ -proto.cc.arduino.cli.commands.LibraryRelease.prototype.setCategory = function(value) { - jspb.Message.setProto3StringField(this, 7, value); -}; - - -/** - * repeated string architectures = 8; - * @return {!Array} - */ -proto.cc.arduino.cli.commands.LibraryRelease.prototype.getArchitecturesList = function() { - return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 8)); -}; - - -/** @param {!Array} value */ -proto.cc.arduino.cli.commands.LibraryRelease.prototype.setArchitecturesList = function(value) { - jspb.Message.setField(this, 8, value || []); -}; - - -/** - * @param {string} value - * @param {number=} opt_index - */ -proto.cc.arduino.cli.commands.LibraryRelease.prototype.addArchitectures = function(value, opt_index) { - jspb.Message.addToRepeatedField(this, 8, value, opt_index); -}; - - -proto.cc.arduino.cli.commands.LibraryRelease.prototype.clearArchitecturesList = function() { - this.setArchitecturesList([]); -}; - - -/** - * repeated string types = 9; - * @return {!Array} - */ -proto.cc.arduino.cli.commands.LibraryRelease.prototype.getTypesList = function() { - return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 9)); -}; - - -/** @param {!Array} value */ -proto.cc.arduino.cli.commands.LibraryRelease.prototype.setTypesList = function(value) { - jspb.Message.setField(this, 9, value || []); -}; - - -/** - * @param {string} value - * @param {number=} opt_index - */ -proto.cc.arduino.cli.commands.LibraryRelease.prototype.addTypes = function(value, opt_index) { - jspb.Message.addToRepeatedField(this, 9, value, opt_index); -}; - - -proto.cc.arduino.cli.commands.LibraryRelease.prototype.clearTypesList = function() { - this.setTypesList([]); -}; - - -/** - * optional DownloadResource resources = 10; - * @return {?proto.cc.arduino.cli.commands.DownloadResource} - */ -proto.cc.arduino.cli.commands.LibraryRelease.prototype.getResources = function() { - return /** @type{?proto.cc.arduino.cli.commands.DownloadResource} */ ( - jspb.Message.getWrapperField(this, proto.cc.arduino.cli.commands.DownloadResource, 10)); -}; - - -/** @param {?proto.cc.arduino.cli.commands.DownloadResource|undefined} value */ -proto.cc.arduino.cli.commands.LibraryRelease.prototype.setResources = function(value) { - jspb.Message.setWrapperField(this, 10, value); -}; - - -proto.cc.arduino.cli.commands.LibraryRelease.prototype.clearResources = function() { - this.setResources(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.cc.arduino.cli.commands.LibraryRelease.prototype.hasResources = function() { - return jspb.Message.getField(this, 10) != null; -}; - - - -/** - * 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.DownloadResource = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.cc.arduino.cli.commands.DownloadResource, jspb.Message); -if (goog.DEBUG && !COMPILED) { - proto.cc.arduino.cli.commands.DownloadResource.displayName = 'proto.cc.arduino.cli.commands.DownloadResource'; -} - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto suitable for use in Soy templates. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration - * @return {!Object} - */ -proto.cc.arduino.cli.commands.DownloadResource.prototype.toObject = function(opt_includeInstance) { - return proto.cc.arduino.cli.commands.DownloadResource.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.cc.arduino.cli.commands.DownloadResource} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.cc.arduino.cli.commands.DownloadResource.toObject = function(includeInstance, msg) { - var f, obj = { - url: jspb.Message.getFieldWithDefault(msg, 1, ""), - archivefilename: jspb.Message.getFieldWithDefault(msg, 2, ""), - checksum: jspb.Message.getFieldWithDefault(msg, 3, ""), - size: jspb.Message.getFieldWithDefault(msg, 4, 0), - cachepath: jspb.Message.getFieldWithDefault(msg, 5, "") - }; - - 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.DownloadResource} - */ -proto.cc.arduino.cli.commands.DownloadResource.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.cc.arduino.cli.commands.DownloadResource; - return proto.cc.arduino.cli.commands.DownloadResource.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.DownloadResource} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.cc.arduino.cli.commands.DownloadResource} - */ -proto.cc.arduino.cli.commands.DownloadResource.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.setUrl(value); - break; - case 2: - var value = /** @type {string} */ (reader.readString()); - msg.setArchivefilename(value); - break; - case 3: - var value = /** @type {string} */ (reader.readString()); - msg.setChecksum(value); - break; - case 4: - var value = /** @type {number} */ (reader.readInt64()); - msg.setSize(value); - break; - case 5: - var value = /** @type {string} */ (reader.readString()); - msg.setCachepath(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.DownloadResource.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.cc.arduino.cli.commands.DownloadResource.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.DownloadResource} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.cc.arduino.cli.commands.DownloadResource.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getUrl(); - if (f.length > 0) { - writer.writeString( - 1, - f - ); - } - f = message.getArchivefilename(); - if (f.length > 0) { - writer.writeString( - 2, - f - ); - } - f = message.getChecksum(); - if (f.length > 0) { - writer.writeString( - 3, - f - ); - } - f = message.getSize(); - if (f !== 0) { - writer.writeInt64( - 4, - f - ); - } - f = message.getCachepath(); - if (f.length > 0) { - writer.writeString( - 5, - f - ); - } -}; - - -/** - * optional string url = 1; - * @return {string} - */ -proto.cc.arduino.cli.commands.DownloadResource.prototype.getUrl = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** @param {string} value */ -proto.cc.arduino.cli.commands.DownloadResource.prototype.setUrl = function(value) { - jspb.Message.setProto3StringField(this, 1, value); -}; - - -/** - * optional string archivefilename = 2; - * @return {string} - */ -proto.cc.arduino.cli.commands.DownloadResource.prototype.getArchivefilename = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); -}; - - -/** @param {string} value */ -proto.cc.arduino.cli.commands.DownloadResource.prototype.setArchivefilename = function(value) { - jspb.Message.setProto3StringField(this, 2, value); -}; - - -/** - * optional string checksum = 3; - * @return {string} - */ -proto.cc.arduino.cli.commands.DownloadResource.prototype.getChecksum = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); -}; - - -/** @param {string} value */ -proto.cc.arduino.cli.commands.DownloadResource.prototype.setChecksum = function(value) { - jspb.Message.setProto3StringField(this, 3, value); -}; - - -/** - * optional int64 size = 4; - * @return {number} - */ -proto.cc.arduino.cli.commands.DownloadResource.prototype.getSize = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); -}; - - -/** @param {number} value */ -proto.cc.arduino.cli.commands.DownloadResource.prototype.setSize = function(value) { - jspb.Message.setProto3IntField(this, 4, value); -}; - - -/** - * optional string cachepath = 5; - * @return {string} - */ -proto.cc.arduino.cli.commands.DownloadResource.prototype.getCachepath = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 5, "")); -}; - - -/** @param {string} value */ -proto.cc.arduino.cli.commands.DownloadResource.prototype.setCachepath = function(value) { - jspb.Message.setProto3StringField(this, 5, value); -}; - - - -/** - * 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.LibraryListReq = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.cc.arduino.cli.commands.LibraryListReq, jspb.Message); -if (goog.DEBUG && !COMPILED) { - proto.cc.arduino.cli.commands.LibraryListReq.displayName = 'proto.cc.arduino.cli.commands.LibraryListReq'; -} - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto suitable for use in Soy templates. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration - * @return {!Object} - */ -proto.cc.arduino.cli.commands.LibraryListReq.prototype.toObject = function(opt_includeInstance) { - return proto.cc.arduino.cli.commands.LibraryListReq.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.cc.arduino.cli.commands.LibraryListReq} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.cc.arduino.cli.commands.LibraryListReq.toObject = function(includeInstance, msg) { - var f, obj = { - instance: (f = msg.getInstance()) && commands_common_pb.Instance.toObject(includeInstance, f), - all: jspb.Message.getFieldWithDefault(msg, 2, false), - updatable: jspb.Message.getFieldWithDefault(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.LibraryListReq} - */ -proto.cc.arduino.cli.commands.LibraryListReq.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.cc.arduino.cli.commands.LibraryListReq; - return proto.cc.arduino.cli.commands.LibraryListReq.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.LibraryListReq} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.cc.arduino.cli.commands.LibraryListReq} - */ -proto.cc.arduino.cli.commands.LibraryListReq.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 {boolean} */ (reader.readBool()); - msg.setAll(value); - break; - case 3: - var value = /** @type {boolean} */ (reader.readBool()); - msg.setUpdatable(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.LibraryListReq.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.cc.arduino.cli.commands.LibraryListReq.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.LibraryListReq} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.cc.arduino.cli.commands.LibraryListReq.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getInstance(); - if (f != null) { - writer.writeMessage( - 1, - f, - commands_common_pb.Instance.serializeBinaryToWriter - ); - } - f = message.getAll(); - if (f) { - writer.writeBool( - 2, - f - ); - } - f = message.getUpdatable(); - if (f) { - writer.writeBool( - 3, - f - ); - } -}; - - -/** - * optional Instance instance = 1; - * @return {?proto.cc.arduino.cli.commands.Instance} - */ -proto.cc.arduino.cli.commands.LibraryListReq.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 */ -proto.cc.arduino.cli.commands.LibraryListReq.prototype.setInstance = function(value) { - jspb.Message.setWrapperField(this, 1, value); -}; - - -proto.cc.arduino.cli.commands.LibraryListReq.prototype.clearInstance = function() { - this.setInstance(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.cc.arduino.cli.commands.LibraryListReq.prototype.hasInstance = function() { - return jspb.Message.getField(this, 1) != null; -}; - - -/** - * optional bool all = 2; - * Note that Boolean fields may be set to 0/1 when serialized from a Java server. - * You should avoid comparisons like {@code val === true/false} in those cases. - * @return {boolean} - */ -proto.cc.arduino.cli.commands.LibraryListReq.prototype.getAll = function() { - return /** @type {boolean} */ (jspb.Message.getFieldWithDefault(this, 2, false)); -}; - - -/** @param {boolean} value */ -proto.cc.arduino.cli.commands.LibraryListReq.prototype.setAll = function(value) { - jspb.Message.setProto3BooleanField(this, 2, value); -}; - - -/** - * optional bool updatable = 3; - * Note that Boolean fields may be set to 0/1 when serialized from a Java server. - * You should avoid comparisons like {@code val === true/false} in those cases. - * @return {boolean} - */ -proto.cc.arduino.cli.commands.LibraryListReq.prototype.getUpdatable = function() { - return /** @type {boolean} */ (jspb.Message.getFieldWithDefault(this, 3, false)); -}; - - -/** @param {boolean} value */ -proto.cc.arduino.cli.commands.LibraryListReq.prototype.setUpdatable = function(value) { - jspb.Message.setProto3BooleanField(this, 3, value); -}; - - - -/** - * 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.LibraryListResp = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.cc.arduino.cli.commands.LibraryListResp.repeatedFields_, null); -}; -goog.inherits(proto.cc.arduino.cli.commands.LibraryListResp, jspb.Message); -if (goog.DEBUG && !COMPILED) { - proto.cc.arduino.cli.commands.LibraryListResp.displayName = 'proto.cc.arduino.cli.commands.LibraryListResp'; -} -/** - * List of repeated fields within this message type. - * @private {!Array} - * @const - */ -proto.cc.arduino.cli.commands.LibraryListResp.repeatedFields_ = [1]; - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto suitable for use in Soy templates. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration - * @return {!Object} - */ -proto.cc.arduino.cli.commands.LibraryListResp.prototype.toObject = function(opt_includeInstance) { - return proto.cc.arduino.cli.commands.LibraryListResp.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.cc.arduino.cli.commands.LibraryListResp} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.cc.arduino.cli.commands.LibraryListResp.toObject = function(includeInstance, msg) { - var f, obj = { - installedLibraryList: jspb.Message.toObjectList(msg.getInstalledLibraryList(), - proto.cc.arduino.cli.commands.InstalledLibrary.toObject, includeInstance) - }; - - 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.LibraryListResp} - */ -proto.cc.arduino.cli.commands.LibraryListResp.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.cc.arduino.cli.commands.LibraryListResp; - return proto.cc.arduino.cli.commands.LibraryListResp.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.LibraryListResp} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.cc.arduino.cli.commands.LibraryListResp} - */ -proto.cc.arduino.cli.commands.LibraryListResp.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = new proto.cc.arduino.cli.commands.InstalledLibrary; - reader.readMessage(value,proto.cc.arduino.cli.commands.InstalledLibrary.deserializeBinaryFromReader); - msg.addInstalledLibrary(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.LibraryListResp.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.cc.arduino.cli.commands.LibraryListResp.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.LibraryListResp} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.cc.arduino.cli.commands.LibraryListResp.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getInstalledLibraryList(); - if (f.length > 0) { - writer.writeRepeatedMessage( - 1, - f, - proto.cc.arduino.cli.commands.InstalledLibrary.serializeBinaryToWriter - ); - } -}; - - -/** - * repeated InstalledLibrary installed_library = 1; - * @return {!Array} - */ -proto.cc.arduino.cli.commands.LibraryListResp.prototype.getInstalledLibraryList = function() { - return /** @type{!Array} */ ( - jspb.Message.getRepeatedWrapperField(this, proto.cc.arduino.cli.commands.InstalledLibrary, 1)); -}; - - -/** @param {!Array} value */ -proto.cc.arduino.cli.commands.LibraryListResp.prototype.setInstalledLibraryList = function(value) { - jspb.Message.setRepeatedWrapperField(this, 1, value); -}; - - -/** - * @param {!proto.cc.arduino.cli.commands.InstalledLibrary=} opt_value - * @param {number=} opt_index - * @return {!proto.cc.arduino.cli.commands.InstalledLibrary} - */ -proto.cc.arduino.cli.commands.LibraryListResp.prototype.addInstalledLibrary = function(opt_value, opt_index) { - return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.cc.arduino.cli.commands.InstalledLibrary, opt_index); -}; - - -proto.cc.arduino.cli.commands.LibraryListResp.prototype.clearInstalledLibraryList = function() { - this.setInstalledLibraryList([]); -}; - - - -/** - * 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.InstalledLibrary = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.cc.arduino.cli.commands.InstalledLibrary, jspb.Message); -if (goog.DEBUG && !COMPILED) { - proto.cc.arduino.cli.commands.InstalledLibrary.displayName = 'proto.cc.arduino.cli.commands.InstalledLibrary'; -} - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto suitable for use in Soy templates. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration - * @return {!Object} - */ -proto.cc.arduino.cli.commands.InstalledLibrary.prototype.toObject = function(opt_includeInstance) { - return proto.cc.arduino.cli.commands.InstalledLibrary.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.cc.arduino.cli.commands.InstalledLibrary} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.cc.arduino.cli.commands.InstalledLibrary.toObject = function(includeInstance, msg) { - var f, obj = { - library: (f = msg.getLibrary()) && proto.cc.arduino.cli.commands.Library.toObject(includeInstance, f), - release: (f = msg.getRelease()) && proto.cc.arduino.cli.commands.LibraryRelease.toObject(includeInstance, f) - }; - - 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.InstalledLibrary} - */ -proto.cc.arduino.cli.commands.InstalledLibrary.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.cc.arduino.cli.commands.InstalledLibrary; - return proto.cc.arduino.cli.commands.InstalledLibrary.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.InstalledLibrary} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.cc.arduino.cli.commands.InstalledLibrary} - */ -proto.cc.arduino.cli.commands.InstalledLibrary.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = new proto.cc.arduino.cli.commands.Library; - reader.readMessage(value,proto.cc.arduino.cli.commands.Library.deserializeBinaryFromReader); - msg.setLibrary(value); - break; - case 2: - var value = new proto.cc.arduino.cli.commands.LibraryRelease; - reader.readMessage(value,proto.cc.arduino.cli.commands.LibraryRelease.deserializeBinaryFromReader); - msg.setRelease(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.InstalledLibrary.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.cc.arduino.cli.commands.InstalledLibrary.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.InstalledLibrary} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.cc.arduino.cli.commands.InstalledLibrary.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getLibrary(); - if (f != null) { - writer.writeMessage( - 1, - f, - proto.cc.arduino.cli.commands.Library.serializeBinaryToWriter - ); - } - f = message.getRelease(); - if (f != null) { - writer.writeMessage( - 2, - f, - proto.cc.arduino.cli.commands.LibraryRelease.serializeBinaryToWriter - ); - } -}; - - -/** - * optional Library library = 1; - * @return {?proto.cc.arduino.cli.commands.Library} - */ -proto.cc.arduino.cli.commands.InstalledLibrary.prototype.getLibrary = function() { - return /** @type{?proto.cc.arduino.cli.commands.Library} */ ( - jspb.Message.getWrapperField(this, proto.cc.arduino.cli.commands.Library, 1)); -}; - - -/** @param {?proto.cc.arduino.cli.commands.Library|undefined} value */ -proto.cc.arduino.cli.commands.InstalledLibrary.prototype.setLibrary = function(value) { - jspb.Message.setWrapperField(this, 1, value); -}; - - -proto.cc.arduino.cli.commands.InstalledLibrary.prototype.clearLibrary = function() { - this.setLibrary(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.cc.arduino.cli.commands.InstalledLibrary.prototype.hasLibrary = function() { - return jspb.Message.getField(this, 1) != null; -}; - - -/** - * optional LibraryRelease release = 2; - * @return {?proto.cc.arduino.cli.commands.LibraryRelease} - */ -proto.cc.arduino.cli.commands.InstalledLibrary.prototype.getRelease = function() { - return /** @type{?proto.cc.arduino.cli.commands.LibraryRelease} */ ( - jspb.Message.getWrapperField(this, proto.cc.arduino.cli.commands.LibraryRelease, 2)); -}; - - -/** @param {?proto.cc.arduino.cli.commands.LibraryRelease|undefined} value */ -proto.cc.arduino.cli.commands.InstalledLibrary.prototype.setRelease = function(value) { - jspb.Message.setWrapperField(this, 2, value); -}; - - -proto.cc.arduino.cli.commands.InstalledLibrary.prototype.clearRelease = function() { - this.setRelease(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.cc.arduino.cli.commands.InstalledLibrary.prototype.hasRelease = function() { - return jspb.Message.getField(this, 2) != null; -}; - - - -/** - * 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.Library = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.cc.arduino.cli.commands.Library.repeatedFields_, null); -}; -goog.inherits(proto.cc.arduino.cli.commands.Library, jspb.Message); -if (goog.DEBUG && !COMPILED) { - proto.cc.arduino.cli.commands.Library.displayName = 'proto.cc.arduino.cli.commands.Library'; -} -/** - * List of repeated fields within this message type. - * @private {!Array} - * @const - */ -proto.cc.arduino.cli.commands.Library.repeatedFields_ = [8,9]; - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto suitable for use in Soy templates. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration - * @return {!Object} - */ -proto.cc.arduino.cli.commands.Library.prototype.toObject = function(opt_includeInstance) { - return proto.cc.arduino.cli.commands.Library.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.cc.arduino.cli.commands.Library} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.cc.arduino.cli.commands.Library.toObject = function(includeInstance, msg) { - var f, obj = { - name: jspb.Message.getFieldWithDefault(msg, 1, ""), - author: jspb.Message.getFieldWithDefault(msg, 2, ""), - maintainer: jspb.Message.getFieldWithDefault(msg, 3, ""), - sentence: jspb.Message.getFieldWithDefault(msg, 4, ""), - paragraph: jspb.Message.getFieldWithDefault(msg, 5, ""), - website: jspb.Message.getFieldWithDefault(msg, 6, ""), - category: jspb.Message.getFieldWithDefault(msg, 7, ""), - architecturesList: jspb.Message.getRepeatedField(msg, 8), - typesList: jspb.Message.getRepeatedField(msg, 9), - installDir: jspb.Message.getFieldWithDefault(msg, 10, ""), - sourceDir: jspb.Message.getFieldWithDefault(msg, 11, ""), - utilityDir: jspb.Message.getFieldWithDefault(msg, 12, ""), - location: jspb.Message.getFieldWithDefault(msg, 13, ""), - containerPlatform: jspb.Message.getFieldWithDefault(msg, 14, ""), - layout: jspb.Message.getFieldWithDefault(msg, 15, ""), - realName: jspb.Message.getFieldWithDefault(msg, 16, ""), - dotALinkage: jspb.Message.getFieldWithDefault(msg, 17, false), - precompiled: jspb.Message.getFieldWithDefault(msg, 18, false), - ldFlags: jspb.Message.getFieldWithDefault(msg, 19, ""), - isLegacy: jspb.Message.getFieldWithDefault(msg, 20, false), - version: jspb.Message.getFieldWithDefault(msg, 21, ""), - license: jspb.Message.getFieldWithDefault(msg, 22, ""), - propertiesMap: (f = msg.getPropertiesMap()) ? 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.commands.Library} - */ -proto.cc.arduino.cli.commands.Library.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.cc.arduino.cli.commands.Library; - return proto.cc.arduino.cli.commands.Library.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.Library} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.cc.arduino.cli.commands.Library} - */ -proto.cc.arduino.cli.commands.Library.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 {string} */ (reader.readString()); - msg.setAuthor(value); - break; - case 3: - var value = /** @type {string} */ (reader.readString()); - msg.setMaintainer(value); - break; - case 4: - var value = /** @type {string} */ (reader.readString()); - msg.setSentence(value); - break; - case 5: - var value = /** @type {string} */ (reader.readString()); - msg.setParagraph(value); - break; - case 6: - var value = /** @type {string} */ (reader.readString()); - msg.setWebsite(value); - break; - case 7: - var value = /** @type {string} */ (reader.readString()); - msg.setCategory(value); - break; - case 8: - var value = /** @type {string} */ (reader.readString()); - msg.addArchitectures(value); - break; - case 9: - var value = /** @type {string} */ (reader.readString()); - msg.addTypes(value); - break; - case 10: - var value = /** @type {string} */ (reader.readString()); - msg.setInstallDir(value); - break; - case 11: - var value = /** @type {string} */ (reader.readString()); - msg.setSourceDir(value); - break; - case 12: - var value = /** @type {string} */ (reader.readString()); - msg.setUtilityDir(value); - break; - case 13: - var value = /** @type {string} */ (reader.readString()); - msg.setLocation(value); - break; - case 14: - var value = /** @type {string} */ (reader.readString()); - msg.setContainerPlatform(value); - break; - case 15: - var value = /** @type {string} */ (reader.readString()); - msg.setLayout(value); - break; - case 16: - var value = /** @type {string} */ (reader.readString()); - msg.setRealName(value); - break; - case 17: - var value = /** @type {boolean} */ (reader.readBool()); - msg.setDotALinkage(value); - break; - case 18: - var value = /** @type {boolean} */ (reader.readBool()); - msg.setPrecompiled(value); - break; - case 19: - var value = /** @type {string} */ (reader.readString()); - msg.setLdFlags(value); - break; - case 20: - var value = /** @type {boolean} */ (reader.readBool()); - msg.setIsLegacy(value); - break; - case 21: - var value = /** @type {string} */ (reader.readString()); - msg.setVersion(value); - break; - case 22: - var value = /** @type {string} */ (reader.readString()); - msg.setLicense(value); - break; - case 23: - var value = msg.getPropertiesMap(); - 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.commands.Library.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.cc.arduino.cli.commands.Library.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.Library} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.cc.arduino.cli.commands.Library.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getName(); - if (f.length > 0) { - writer.writeString( - 1, - f - ); - } - f = message.getAuthor(); - if (f.length > 0) { - writer.writeString( - 2, - f - ); - } - f = message.getMaintainer(); - if (f.length > 0) { - writer.writeString( - 3, - f - ); - } - f = message.getSentence(); - if (f.length > 0) { - writer.writeString( - 4, - f - ); - } - f = message.getParagraph(); - if (f.length > 0) { - writer.writeString( - 5, - f - ); - } - f = message.getWebsite(); - if (f.length > 0) { - writer.writeString( - 6, - f - ); - } - f = message.getCategory(); - if (f.length > 0) { - writer.writeString( - 7, - f - ); - } - f = message.getArchitecturesList(); - if (f.length > 0) { - writer.writeRepeatedString( - 8, - f - ); - } - f = message.getTypesList(); - if (f.length > 0) { - writer.writeRepeatedString( - 9, - f - ); - } - f = message.getInstallDir(); - if (f.length > 0) { - writer.writeString( - 10, - f - ); - } - f = message.getSourceDir(); - if (f.length > 0) { - writer.writeString( - 11, - f - ); - } - f = message.getUtilityDir(); - if (f.length > 0) { - writer.writeString( - 12, - f - ); - } - f = message.getLocation(); - if (f.length > 0) { - writer.writeString( - 13, - f - ); - } - f = message.getContainerPlatform(); - if (f.length > 0) { - writer.writeString( - 14, - f - ); - } - f = message.getLayout(); - if (f.length > 0) { - writer.writeString( - 15, - f - ); - } - f = message.getRealName(); - if (f.length > 0) { - writer.writeString( - 16, - f - ); - } - f = message.getDotALinkage(); - if (f) { - writer.writeBool( - 17, - f - ); - } - f = message.getPrecompiled(); - if (f) { - writer.writeBool( - 18, - f - ); - } - f = message.getLdFlags(); - if (f.length > 0) { - writer.writeString( - 19, - f - ); - } - f = message.getIsLegacy(); - if (f) { - writer.writeBool( - 20, - f - ); - } - f = message.getVersion(); - if (f.length > 0) { - writer.writeString( - 21, - f - ); - } - f = message.getLicense(); - if (f.length > 0) { - writer.writeString( - 22, - f - ); - } - f = message.getPropertiesMap(true); - if (f && f.getLength() > 0) { - f.serializeBinary(23, writer, jspb.BinaryWriter.prototype.writeString, jspb.BinaryWriter.prototype.writeString); - } -}; - - -/** - * optional string name = 1; - * @return {string} - */ -proto.cc.arduino.cli.commands.Library.prototype.getName = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** @param {string} value */ -proto.cc.arduino.cli.commands.Library.prototype.setName = function(value) { - jspb.Message.setProto3StringField(this, 1, value); -}; - - -/** - * optional string author = 2; - * @return {string} - */ -proto.cc.arduino.cli.commands.Library.prototype.getAuthor = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); -}; - - -/** @param {string} value */ -proto.cc.arduino.cli.commands.Library.prototype.setAuthor = function(value) { - jspb.Message.setProto3StringField(this, 2, value); -}; - - -/** - * optional string maintainer = 3; - * @return {string} - */ -proto.cc.arduino.cli.commands.Library.prototype.getMaintainer = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); -}; - - -/** @param {string} value */ -proto.cc.arduino.cli.commands.Library.prototype.setMaintainer = function(value) { - jspb.Message.setProto3StringField(this, 3, value); -}; - - -/** - * optional string sentence = 4; - * @return {string} - */ -proto.cc.arduino.cli.commands.Library.prototype.getSentence = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "")); -}; - - -/** @param {string} value */ -proto.cc.arduino.cli.commands.Library.prototype.setSentence = function(value) { - jspb.Message.setProto3StringField(this, 4, value); -}; - - -/** - * optional string paragraph = 5; - * @return {string} - */ -proto.cc.arduino.cli.commands.Library.prototype.getParagraph = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 5, "")); -}; - - -/** @param {string} value */ -proto.cc.arduino.cli.commands.Library.prototype.setParagraph = function(value) { - jspb.Message.setProto3StringField(this, 5, value); -}; - - -/** - * optional string website = 6; - * @return {string} - */ -proto.cc.arduino.cli.commands.Library.prototype.getWebsite = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 6, "")); -}; - - -/** @param {string} value */ -proto.cc.arduino.cli.commands.Library.prototype.setWebsite = function(value) { - jspb.Message.setProto3StringField(this, 6, value); -}; - - -/** - * optional string category = 7; - * @return {string} - */ -proto.cc.arduino.cli.commands.Library.prototype.getCategory = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 7, "")); -}; - - -/** @param {string} value */ -proto.cc.arduino.cli.commands.Library.prototype.setCategory = function(value) { - jspb.Message.setProto3StringField(this, 7, value); -}; - - -/** - * repeated string architectures = 8; - * @return {!Array} - */ -proto.cc.arduino.cli.commands.Library.prototype.getArchitecturesList = function() { - return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 8)); -}; - - -/** @param {!Array} value */ -proto.cc.arduino.cli.commands.Library.prototype.setArchitecturesList = function(value) { - jspb.Message.setField(this, 8, value || []); -}; - - -/** - * @param {string} value - * @param {number=} opt_index - */ -proto.cc.arduino.cli.commands.Library.prototype.addArchitectures = function(value, opt_index) { - jspb.Message.addToRepeatedField(this, 8, value, opt_index); -}; - - -proto.cc.arduino.cli.commands.Library.prototype.clearArchitecturesList = function() { - this.setArchitecturesList([]); -}; - - -/** - * repeated string types = 9; - * @return {!Array} - */ -proto.cc.arduino.cli.commands.Library.prototype.getTypesList = function() { - return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 9)); -}; - - -/** @param {!Array} value */ -proto.cc.arduino.cli.commands.Library.prototype.setTypesList = function(value) { - jspb.Message.setField(this, 9, value || []); -}; - - -/** - * @param {string} value - * @param {number=} opt_index - */ -proto.cc.arduino.cli.commands.Library.prototype.addTypes = function(value, opt_index) { - jspb.Message.addToRepeatedField(this, 9, value, opt_index); -}; - - -proto.cc.arduino.cli.commands.Library.prototype.clearTypesList = function() { - this.setTypesList([]); -}; - - -/** - * optional string install_dir = 10; - * @return {string} - */ -proto.cc.arduino.cli.commands.Library.prototype.getInstallDir = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 10, "")); -}; - - -/** @param {string} value */ -proto.cc.arduino.cli.commands.Library.prototype.setInstallDir = function(value) { - jspb.Message.setProto3StringField(this, 10, value); -}; - - -/** - * optional string source_dir = 11; - * @return {string} - */ -proto.cc.arduino.cli.commands.Library.prototype.getSourceDir = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 11, "")); -}; - - -/** @param {string} value */ -proto.cc.arduino.cli.commands.Library.prototype.setSourceDir = function(value) { - jspb.Message.setProto3StringField(this, 11, value); -}; - - -/** - * optional string utility_dir = 12; - * @return {string} - */ -proto.cc.arduino.cli.commands.Library.prototype.getUtilityDir = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 12, "")); -}; - - -/** @param {string} value */ -proto.cc.arduino.cli.commands.Library.prototype.setUtilityDir = function(value) { - jspb.Message.setProto3StringField(this, 12, value); -}; - - -/** - * optional string location = 13; - * @return {string} - */ -proto.cc.arduino.cli.commands.Library.prototype.getLocation = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 13, "")); -}; - - -/** @param {string} value */ -proto.cc.arduino.cli.commands.Library.prototype.setLocation = function(value) { - jspb.Message.setProto3StringField(this, 13, value); -}; - - -/** - * optional string container_platform = 14; - * @return {string} - */ -proto.cc.arduino.cli.commands.Library.prototype.getContainerPlatform = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 14, "")); -}; - - -/** @param {string} value */ -proto.cc.arduino.cli.commands.Library.prototype.setContainerPlatform = function(value) { - jspb.Message.setProto3StringField(this, 14, value); -}; - - -/** - * optional string layout = 15; - * @return {string} - */ -proto.cc.arduino.cli.commands.Library.prototype.getLayout = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 15, "")); -}; - - -/** @param {string} value */ -proto.cc.arduino.cli.commands.Library.prototype.setLayout = function(value) { - jspb.Message.setProto3StringField(this, 15, value); -}; - - -/** - * optional string real_name = 16; - * @return {string} - */ -proto.cc.arduino.cli.commands.Library.prototype.getRealName = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 16, "")); -}; - - -/** @param {string} value */ -proto.cc.arduino.cli.commands.Library.prototype.setRealName = function(value) { - jspb.Message.setProto3StringField(this, 16, value); -}; - - -/** - * optional bool dot_a_linkage = 17; - * Note that Boolean fields may be set to 0/1 when serialized from a Java server. - * You should avoid comparisons like {@code val === true/false} in those cases. - * @return {boolean} - */ -proto.cc.arduino.cli.commands.Library.prototype.getDotALinkage = function() { - return /** @type {boolean} */ (jspb.Message.getFieldWithDefault(this, 17, false)); -}; - - -/** @param {boolean} value */ -proto.cc.arduino.cli.commands.Library.prototype.setDotALinkage = function(value) { - jspb.Message.setProto3BooleanField(this, 17, value); -}; - - -/** - * optional bool precompiled = 18; - * Note that Boolean fields may be set to 0/1 when serialized from a Java server. - * You should avoid comparisons like {@code val === true/false} in those cases. - * @return {boolean} - */ -proto.cc.arduino.cli.commands.Library.prototype.getPrecompiled = function() { - return /** @type {boolean} */ (jspb.Message.getFieldWithDefault(this, 18, false)); -}; - - -/** @param {boolean} value */ -proto.cc.arduino.cli.commands.Library.prototype.setPrecompiled = function(value) { - jspb.Message.setProto3BooleanField(this, 18, value); -}; - - -/** - * optional string ld_flags = 19; - * @return {string} - */ -proto.cc.arduino.cli.commands.Library.prototype.getLdFlags = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 19, "")); -}; - - -/** @param {string} value */ -proto.cc.arduino.cli.commands.Library.prototype.setLdFlags = function(value) { - jspb.Message.setProto3StringField(this, 19, value); -}; - - -/** - * optional bool is_legacy = 20; - * Note that Boolean fields may be set to 0/1 when serialized from a Java server. - * You should avoid comparisons like {@code val === true/false} in those cases. - * @return {boolean} - */ -proto.cc.arduino.cli.commands.Library.prototype.getIsLegacy = function() { - return /** @type {boolean} */ (jspb.Message.getFieldWithDefault(this, 20, false)); -}; - - -/** @param {boolean} value */ -proto.cc.arduino.cli.commands.Library.prototype.setIsLegacy = function(value) { - jspb.Message.setProto3BooleanField(this, 20, value); -}; - - -/** - * optional string version = 21; - * @return {string} - */ -proto.cc.arduino.cli.commands.Library.prototype.getVersion = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 21, "")); -}; - - -/** @param {string} value */ -proto.cc.arduino.cli.commands.Library.prototype.setVersion = function(value) { - jspb.Message.setProto3StringField(this, 21, value); -}; - - -/** - * optional string license = 22; - * @return {string} - */ -proto.cc.arduino.cli.commands.Library.prototype.getLicense = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 22, "")); -}; - - -/** @param {string} value */ -proto.cc.arduino.cli.commands.Library.prototype.setLicense = function(value) { - jspb.Message.setProto3StringField(this, 22, value); -}; - - -/** - * map properties = 23; - * @param {boolean=} opt_noLazyCreate Do not create the map if - * empty, instead returning `undefined` - * @return {!jspb.Map} - */ -proto.cc.arduino.cli.commands.Library.prototype.getPropertiesMap = function(opt_noLazyCreate) { - return /** @type {!jspb.Map} */ ( - jspb.Message.getMapField(this, 23, opt_noLazyCreate, - null)); -}; - - -proto.cc.arduino.cli.commands.Library.prototype.clearPropertiesMap = function() { - this.getPropertiesMap().clear(); -}; - - -/** - * @enum {number} - */ -proto.cc.arduino.cli.commands.LibraryLayout = { - FLAT_LAYOUT: 0, - RECURSIVE_LAYOUT: 1 -}; - -/** - * @enum {number} - */ -proto.cc.arduino.cli.commands.LibraryLocation = { - IDE_BUILTIN: 0, - PLATFORM_BUILTIN: 1, - REFERENCED_PLATFORM_BUILTIN: 2, - SKETCHBOOK: 3 -}; - -goog.object.extend(exports, proto.cc.arduino.cli.commands); diff --git a/arduino-ide-extension/src/node/cli-protocol/commands/upload_grpc_pb.js b/arduino-ide-extension/src/node/cli-protocol/commands/upload_grpc_pb.js deleted file mode 100644 index 97b3a246..00000000 --- a/arduino-ide-extension/src/node/cli-protocol/commands/upload_grpc_pb.js +++ /dev/null @@ -1 +0,0 @@ -// GENERATED CODE -- NO SERVICES IN PROTO \ No newline at end of file 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 deleted file mode 100644 index 07241de7..00000000 --- a/arduino-ide-extension/src/node/cli-protocol/commands/upload_pb.d.ts +++ /dev/null @@ -1,85 +0,0 @@ -// package: cc.arduino.cli.commands -// file: commands/upload.proto - -/* tslint:disable */ -/* eslint-disable */ - -import * as jspb from "google-protobuf"; -import * as commands_common_pb from "../commands/common_pb"; - -export class UploadReq extends jspb.Message { - - hasInstance(): boolean; - clearInstance(): void; - getInstance(): commands_common_pb.Instance | undefined; - setInstance(value?: commands_common_pb.Instance): void; - - getFqbn(): string; - setFqbn(value: string): void; - - getSketchPath(): string; - setSketchPath(value: string): void; - - getPort(): string; - setPort(value: string): void; - - getVerbose(): boolean; - setVerbose(value: boolean): void; - - getVerify(): boolean; - setVerify(value: boolean): void; - - getImportFile(): string; - setImportFile(value: string): void; - - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): UploadReq.AsObject; - static toObject(includeInstance: boolean, msg: UploadReq): UploadReq.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: UploadReq, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): UploadReq; - static deserializeBinaryFromReader(message: UploadReq, reader: jspb.BinaryReader): UploadReq; -} - -export namespace UploadReq { - export type AsObject = { - instance?: commands_common_pb.Instance.AsObject, - fqbn: string, - sketchPath: string, - port: string, - verbose: boolean, - verify: boolean, - importFile: string, - } -} - -export class UploadResp extends jspb.Message { - getOutStream(): Uint8Array | string; - getOutStream_asU8(): Uint8Array; - getOutStream_asB64(): string; - setOutStream(value: Uint8Array | string): void; - - getErrStream(): Uint8Array | string; - getErrStream_asU8(): Uint8Array; - getErrStream_asB64(): string; - setErrStream(value: Uint8Array | string): void; - - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): UploadResp.AsObject; - static toObject(includeInstance: boolean, msg: UploadResp): UploadResp.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: UploadResp, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): UploadResp; - static deserializeBinaryFromReader(message: UploadResp, reader: jspb.BinaryReader): UploadResp; -} - -export namespace UploadResp { - export type AsObject = { - outStream: Uint8Array | string, - errStream: Uint8Array | string, - } -} 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 deleted file mode 100644 index 5e8dcd86..00000000 --- a/arduino-ide-extension/src/node/cli-protocol/commands/upload_pb.js +++ /dev/null @@ -1,560 +0,0 @@ -/** - * @fileoverview - * @enhanceable - * @suppress {messageConventions} JS Compiler reports an error if a variable or - * field starts with 'MSG_' and isn't a translatable message. - * @public - */ -// GENERATED CODE -- DO NOT EDIT! - -var jspb = require('google-protobuf'); -var goog = jspb; -var global = Function('return this')(); - -var commands_common_pb = require('../commands/common_pb.js'); -goog.object.extend(proto, commands_common_pb); -goog.exportSymbol('proto.cc.arduino.cli.commands.UploadReq', null, global); -goog.exportSymbol('proto.cc.arduino.cli.commands.UploadResp', null, global); - -/** - * 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.UploadReq = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.cc.arduino.cli.commands.UploadReq, jspb.Message); -if (goog.DEBUG && !COMPILED) { - proto.cc.arduino.cli.commands.UploadReq.displayName = 'proto.cc.arduino.cli.commands.UploadReq'; -} - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto suitable for use in Soy templates. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration - * @return {!Object} - */ -proto.cc.arduino.cli.commands.UploadReq.prototype.toObject = function(opt_includeInstance) { - return proto.cc.arduino.cli.commands.UploadReq.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.cc.arduino.cli.commands.UploadReq} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.cc.arduino.cli.commands.UploadReq.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.getFieldWithDefault(msg, 5, false), - verify: jspb.Message.getFieldWithDefault(msg, 6, false), - importFile: jspb.Message.getFieldWithDefault(msg, 7, "") - }; - - 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.UploadReq} - */ -proto.cc.arduino.cli.commands.UploadReq.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.cc.arduino.cli.commands.UploadReq; - return proto.cc.arduino.cli.commands.UploadReq.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.UploadReq} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.cc.arduino.cli.commands.UploadReq} - */ -proto.cc.arduino.cli.commands.UploadReq.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; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.cc.arduino.cli.commands.UploadReq.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.cc.arduino.cli.commands.UploadReq.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.UploadReq} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.cc.arduino.cli.commands.UploadReq.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 - ); - } -}; - - -/** - * optional Instance instance = 1; - * @return {?proto.cc.arduino.cli.commands.Instance} - */ -proto.cc.arduino.cli.commands.UploadReq.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 */ -proto.cc.arduino.cli.commands.UploadReq.prototype.setInstance = function(value) { - jspb.Message.setWrapperField(this, 1, value); -}; - - -proto.cc.arduino.cli.commands.UploadReq.prototype.clearInstance = function() { - this.setInstance(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.cc.arduino.cli.commands.UploadReq.prototype.hasInstance = function() { - return jspb.Message.getField(this, 1) != null; -}; - - -/** - * optional string fqbn = 2; - * @return {string} - */ -proto.cc.arduino.cli.commands.UploadReq.prototype.getFqbn = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); -}; - - -/** @param {string} value */ -proto.cc.arduino.cli.commands.UploadReq.prototype.setFqbn = function(value) { - jspb.Message.setProto3StringField(this, 2, value); -}; - - -/** - * optional string sketch_path = 3; - * @return {string} - */ -proto.cc.arduino.cli.commands.UploadReq.prototype.getSketchPath = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); -}; - - -/** @param {string} value */ -proto.cc.arduino.cli.commands.UploadReq.prototype.setSketchPath = function(value) { - jspb.Message.setProto3StringField(this, 3, value); -}; - - -/** - * optional string port = 4; - * @return {string} - */ -proto.cc.arduino.cli.commands.UploadReq.prototype.getPort = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "")); -}; - - -/** @param {string} value */ -proto.cc.arduino.cli.commands.UploadReq.prototype.setPort = function(value) { - jspb.Message.setProto3StringField(this, 4, value); -}; - - -/** - * optional bool verbose = 5; - * Note that Boolean fields may be set to 0/1 when serialized from a Java server. - * You should avoid comparisons like {@code val === true/false} in those cases. - * @return {boolean} - */ -proto.cc.arduino.cli.commands.UploadReq.prototype.getVerbose = function() { - return /** @type {boolean} */ (jspb.Message.getFieldWithDefault(this, 5, false)); -}; - - -/** @param {boolean} value */ -proto.cc.arduino.cli.commands.UploadReq.prototype.setVerbose = function(value) { - jspb.Message.setProto3BooleanField(this, 5, value); -}; - - -/** - * optional bool verify = 6; - * Note that Boolean fields may be set to 0/1 when serialized from a Java server. - * You should avoid comparisons like {@code val === true/false} in those cases. - * @return {boolean} - */ -proto.cc.arduino.cli.commands.UploadReq.prototype.getVerify = function() { - return /** @type {boolean} */ (jspb.Message.getFieldWithDefault(this, 6, false)); -}; - - -/** @param {boolean} value */ -proto.cc.arduino.cli.commands.UploadReq.prototype.setVerify = function(value) { - jspb.Message.setProto3BooleanField(this, 6, value); -}; - - -/** - * optional string import_file = 7; - * @return {string} - */ -proto.cc.arduino.cli.commands.UploadReq.prototype.getImportFile = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 7, "")); -}; - - -/** @param {string} value */ -proto.cc.arduino.cli.commands.UploadReq.prototype.setImportFile = function(value) { - jspb.Message.setProto3StringField(this, 7, value); -}; - - - -/** - * 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.UploadResp = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.cc.arduino.cli.commands.UploadResp, jspb.Message); -if (goog.DEBUG && !COMPILED) { - proto.cc.arduino.cli.commands.UploadResp.displayName = 'proto.cc.arduino.cli.commands.UploadResp'; -} - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto suitable for use in Soy templates. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration - * @return {!Object} - */ -proto.cc.arduino.cli.commands.UploadResp.prototype.toObject = function(opt_includeInstance) { - return proto.cc.arduino.cli.commands.UploadResp.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.cc.arduino.cli.commands.UploadResp} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.cc.arduino.cli.commands.UploadResp.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.UploadResp} - */ -proto.cc.arduino.cli.commands.UploadResp.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.cc.arduino.cli.commands.UploadResp; - return proto.cc.arduino.cli.commands.UploadResp.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.UploadResp} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.cc.arduino.cli.commands.UploadResp} - */ -proto.cc.arduino.cli.commands.UploadResp.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.UploadResp.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.cc.arduino.cli.commands.UploadResp.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.UploadResp} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.cc.arduino.cli.commands.UploadResp.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.UploadResp.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.UploadResp.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.UploadResp.prototype.getOutStream_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getOutStream())); -}; - - -/** @param {!(string|Uint8Array)} value */ -proto.cc.arduino.cli.commands.UploadResp.prototype.setOutStream = function(value) { - jspb.Message.setProto3BytesField(this, 1, value); -}; - - -/** - * optional bytes err_stream = 2; - * @return {!(string|Uint8Array)} - */ -proto.cc.arduino.cli.commands.UploadResp.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.UploadResp.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.UploadResp.prototype.getErrStream_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getErrStream())); -}; - - -/** @param {!(string|Uint8Array)} value */ -proto.cc.arduino.cli.commands.UploadResp.prototype.setErrStream = function(value) { - jspb.Message.setProto3BytesField(this, 2, value); -}; - - -goog.object.extend(exports, proto.cc.arduino.cli.commands); 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 deleted file mode 100644 index 8df745f1..00000000 --- a/arduino-ide-extension/src/node/cli-protocol/debug/debug_grpc_pb.d.ts +++ /dev/null @@ -1,40 +0,0 @@ -// package: cc.arduino.cli.debug -// file: debug/debug.proto - -/* tslint:disable */ -/* eslint-disable */ - -import * as grpc from "@grpc/grpc-js"; -import * as debug_debug_pb from "../debug/debug_pb"; - -interface IDebugService extends grpc.ServiceDefinition { - debug: IDebugService_IDebug; -} - -interface IDebugService_IDebug extends grpc.MethodDefinition { - path: string; // "/cc.arduino.cli.debug.Debug/Debug" - requestStream: boolean; // true - responseStream: boolean; // true - requestSerialize: grpc.serialize; - requestDeserialize: grpc.deserialize; - responseSerialize: grpc.serialize; - responseDeserialize: grpc.deserialize; -} - -export const DebugService: IDebugService; - -export interface IDebugServer { - debug: grpc.handleBidiStreamingCall; -} - -export interface IDebugClient { - debug(): grpc.ClientDuplexStream; - debug(options: Partial): grpc.ClientDuplexStream; - debug(metadata: grpc.Metadata, options?: Partial): grpc.ClientDuplexStream; -} - -export class DebugClient extends grpc.Client implements IDebugClient { - constructor(address: string, credentials: grpc.ChannelCredentials, options?: object); - public debug(options?: Partial): grpc.ClientDuplexStream; - public debug(metadata?: grpc.Metadata, options?: Partial): grpc.ClientDuplexStream; -} 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 deleted file mode 100644 index 9dd14a05..00000000 --- a/arduino-ide-extension/src/node/cli-protocol/debug/debug_grpc_pb.js +++ /dev/null @@ -1,61 +0,0 @@ -// GENERATED CODE -- DO NOT EDIT! - -// Original file comments: -// This file is part of arduino-cli. -// -// Copyright 2020 ARDUINO SA (http://www.arduino.cc/) -// -// This software is released under the GNU General Public License version 3, -// which covers the main part of arduino-cli. -// The terms of this license can be found at: -// https://www.gnu.org/licenses/gpl-3.0.en.html -// -// You can be released from the requirements of the above licenses by purchasing -// a commercial license. Buying such a license is mandatory if you want to -// modify or otherwise use the software for commercial activities involving the -// Arduino software without disclosing the source code of your own applications. -// To purchase a commercial license, send an email to license@arduino.cc. -// -'use strict'; -var grpc = require('@grpc/grpc-js'); -var debug_debug_pb = require('../debug/debug_pb.js'); - -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'); - } - return Buffer.from(arg.serializeBinary()); -} - -function deserialize_cc_arduino_cli_debug_DebugReq(buffer_arg) { - return debug_debug_pb.DebugReq.deserializeBinary(new Uint8Array(buffer_arg)); -} - -function serialize_cc_arduino_cli_debug_DebugResp(arg) { - if (!(arg instanceof debug_debug_pb.DebugResp)) { - throw new Error('Expected argument of type cc.arduino.cli.debug.DebugResp'); - } - return Buffer.from(arg.serializeBinary()); -} - -function deserialize_cc_arduino_cli_debug_DebugResp(buffer_arg) { - return debug_debug_pb.DebugResp.deserializeBinary(new Uint8Array(buffer_arg)); -} - - -// Service that abstract a debug Session usage -var DebugService = exports.DebugService = { - debug: { - path: '/cc.arduino.cli.debug.Debug/Debug', - requestStream: true, - responseStream: true, - requestType: debug_debug_pb.DebugReq, - responseType: debug_debug_pb.DebugResp, - requestSerialize: serialize_cc_arduino_cli_debug_DebugReq, - requestDeserialize: deserialize_cc_arduino_cli_debug_DebugReq, - responseSerialize: serialize_cc_arduino_cli_debug_DebugResp, - responseDeserialize: deserialize_cc_arduino_cli_debug_DebugResp, - }, -}; - -exports.DebugClient = grpc.makeGenericClientConstructor(DebugService); 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 deleted file mode 100644 index 98e4aaf1..00000000 --- a/arduino-ide-extension/src/node/cli-protocol/debug/debug_pb.d.ts +++ /dev/null @@ -1,129 +0,0 @@ -// package: cc.arduino.cli.debug -// file: debug/debug.proto - -/* tslint:disable */ -/* eslint-disable */ - -import * as jspb from "google-protobuf"; - -export class DebugReq extends jspb.Message { - - hasDebugreq(): boolean; - clearDebugreq(): void; - getDebugreq(): DebugConfigReq | undefined; - setDebugreq(value?: DebugConfigReq): void; - - getData(): Uint8Array | string; - getData_asU8(): Uint8Array; - getData_asB64(): string; - setData(value: Uint8Array | string): void; - - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): DebugReq.AsObject; - static toObject(includeInstance: boolean, msg: DebugReq): DebugReq.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: DebugReq, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): DebugReq; - static deserializeBinaryFromReader(message: DebugReq, reader: jspb.BinaryReader): DebugReq; -} - -export namespace DebugReq { - export type AsObject = { - debugreq?: DebugConfigReq.AsObject, - data: Uint8Array | string, - } -} - -export class DebugConfigReq extends jspb.Message { - - hasInstance(): boolean; - clearInstance(): void; - getInstance(): Instance | undefined; - setInstance(value?: Instance): void; - - getFqbn(): string; - setFqbn(value: string): void; - - getSketchPath(): string; - setSketchPath(value: string): void; - - getPort(): string; - setPort(value: string): void; - - getVerbose(): boolean; - setVerbose(value: boolean): void; - - getImportFile(): string; - setImportFile(value: string): void; - - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): DebugConfigReq.AsObject; - static toObject(includeInstance: boolean, msg: DebugConfigReq): DebugConfigReq.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: DebugConfigReq, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): DebugConfigReq; - static deserializeBinaryFromReader(message: DebugConfigReq, reader: jspb.BinaryReader): DebugConfigReq; -} - -export namespace DebugConfigReq { - export type AsObject = { - instance?: Instance.AsObject, - fqbn: string, - sketchPath: string, - port: string, - verbose: boolean, - importFile: string, - } -} - -export class DebugResp extends jspb.Message { - getData(): Uint8Array | string; - getData_asU8(): Uint8Array; - getData_asB64(): string; - setData(value: Uint8Array | string): void; - - getError(): string; - setError(value: string): void; - - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): DebugResp.AsObject; - static toObject(includeInstance: boolean, msg: DebugResp): DebugResp.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: DebugResp, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): DebugResp; - static deserializeBinaryFromReader(message: DebugResp, reader: jspb.BinaryReader): DebugResp; -} - -export namespace DebugResp { - export type AsObject = { - data: Uint8Array | string, - error: string, - } -} - -export class Instance extends jspb.Message { - getId(): number; - setId(value: number): void; - - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): Instance.AsObject; - static toObject(includeInstance: boolean, msg: Instance): Instance.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: Instance, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): Instance; - static deserializeBinaryFromReader(message: Instance, reader: jspb.BinaryReader): Instance; -} - -export namespace Instance { - export type AsObject = { - id: number, - } -} 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 deleted file mode 100644 index c2b7d41d..00000000 --- a/arduino-ide-extension/src/node/cli-protocol/debug/debug_pb.js +++ /dev/null @@ -1,859 +0,0 @@ -/** - * @fileoverview - * @enhanceable - * @suppress {messageConventions} JS Compiler reports an error if a variable or - * field starts with 'MSG_' and isn't a translatable message. - * @public - */ -// GENERATED CODE -- DO NOT EDIT! - -var jspb = require('google-protobuf'); -var goog = jspb; -var global = Function('return this')(); - -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.Instance', null, global); - -/** - * 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.DebugReq = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.cc.arduino.cli.debug.DebugReq, jspb.Message); -if (goog.DEBUG && !COMPILED) { - proto.cc.arduino.cli.debug.DebugReq.displayName = 'proto.cc.arduino.cli.debug.DebugReq'; -} - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto suitable for use in Soy templates. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration - * @return {!Object} - */ -proto.cc.arduino.cli.debug.DebugReq.prototype.toObject = function(opt_includeInstance) { - return proto.cc.arduino.cli.debug.DebugReq.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.cc.arduino.cli.debug.DebugReq} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.cc.arduino.cli.debug.DebugReq.toObject = function(includeInstance, msg) { - var f, obj = { - debugreq: (f = msg.getDebugreq()) && proto.cc.arduino.cli.debug.DebugConfigReq.toObject(includeInstance, f), - data: msg.getData_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.debug.DebugReq} - */ -proto.cc.arduino.cli.debug.DebugReq.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.cc.arduino.cli.debug.DebugReq; - return proto.cc.arduino.cli.debug.DebugReq.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.DebugReq} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.cc.arduino.cli.debug.DebugReq} - */ -proto.cc.arduino.cli.debug.DebugReq.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = new proto.cc.arduino.cli.debug.DebugConfigReq; - reader.readMessage(value,proto.cc.arduino.cli.debug.DebugConfigReq.deserializeBinaryFromReader); - msg.setDebugreq(value); - break; - case 2: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setData(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.cc.arduino.cli.debug.DebugReq.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.cc.arduino.cli.debug.DebugReq.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.DebugReq} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.cc.arduino.cli.debug.DebugReq.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getDebugreq(); - if (f != null) { - writer.writeMessage( - 1, - f, - proto.cc.arduino.cli.debug.DebugConfigReq.serializeBinaryToWriter - ); - } - f = message.getData_asU8(); - if (f.length > 0) { - writer.writeBytes( - 2, - f - ); - } -}; - - -/** - * optional DebugConfigReq debugReq = 1; - * @return {?proto.cc.arduino.cli.debug.DebugConfigReq} - */ -proto.cc.arduino.cli.debug.DebugReq.prototype.getDebugreq = function() { - return /** @type{?proto.cc.arduino.cli.debug.DebugConfigReq} */ ( - jspb.Message.getWrapperField(this, proto.cc.arduino.cli.debug.DebugConfigReq, 1)); -}; - - -/** @param {?proto.cc.arduino.cli.debug.DebugConfigReq|undefined} value */ -proto.cc.arduino.cli.debug.DebugReq.prototype.setDebugreq = function(value) { - jspb.Message.setWrapperField(this, 1, value); -}; - - -proto.cc.arduino.cli.debug.DebugReq.prototype.clearDebugreq = function() { - this.setDebugreq(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.cc.arduino.cli.debug.DebugReq.prototype.hasDebugreq = function() { - return jspb.Message.getField(this, 1) != null; -}; - - -/** - * optional bytes data = 2; - * @return {!(string|Uint8Array)} - */ -proto.cc.arduino.cli.debug.DebugReq.prototype.getData = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 2, "")); -}; - - -/** - * optional bytes data = 2; - * This is a type-conversion wrapper around `getData()` - * @return {string} - */ -proto.cc.arduino.cli.debug.DebugReq.prototype.getData_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getData())); -}; - - -/** - * optional bytes data = 2; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getData()` - * @return {!Uint8Array} - */ -proto.cc.arduino.cli.debug.DebugReq.prototype.getData_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getData())); -}; - - -/** @param {!(string|Uint8Array)} value */ -proto.cc.arduino.cli.debug.DebugReq.prototype.setData = function(value) { - jspb.Message.setProto3BytesField(this, 2, value); -}; - - - -/** - * 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.DebugConfigReq = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.cc.arduino.cli.debug.DebugConfigReq, jspb.Message); -if (goog.DEBUG && !COMPILED) { - proto.cc.arduino.cli.debug.DebugConfigReq.displayName = 'proto.cc.arduino.cli.debug.DebugConfigReq'; -} - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto suitable for use in Soy templates. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration - * @return {!Object} - */ -proto.cc.arduino.cli.debug.DebugConfigReq.prototype.toObject = function(opt_includeInstance) { - return proto.cc.arduino.cli.debug.DebugConfigReq.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.cc.arduino.cli.debug.DebugConfigReq} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.cc.arduino.cli.debug.DebugConfigReq.toObject = function(includeInstance, msg) { - var f, obj = { - instance: (f = msg.getInstance()) && proto.cc.arduino.cli.debug.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.getFieldWithDefault(msg, 5, false), - importFile: jspb.Message.getFieldWithDefault(msg, 7, "") - }; - - 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.DebugConfigReq} - */ -proto.cc.arduino.cli.debug.DebugConfigReq.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.cc.arduino.cli.debug.DebugConfigReq; - return proto.cc.arduino.cli.debug.DebugConfigReq.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.DebugConfigReq} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.cc.arduino.cli.debug.DebugConfigReq} - */ -proto.cc.arduino.cli.debug.DebugConfigReq.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = new proto.cc.arduino.cli.debug.Instance; - reader.readMessage(value,proto.cc.arduino.cli.debug.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 7: - var value = /** @type {string} */ (reader.readString()); - msg.setImportFile(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.cc.arduino.cli.debug.DebugConfigReq.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.cc.arduino.cli.debug.DebugConfigReq.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.DebugConfigReq} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.cc.arduino.cli.debug.DebugConfigReq.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getInstance(); - if (f != null) { - writer.writeMessage( - 1, - f, - proto.cc.arduino.cli.debug.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.getImportFile(); - if (f.length > 0) { - writer.writeString( - 7, - f - ); - } -}; - - -/** - * optional Instance instance = 1; - * @return {?proto.cc.arduino.cli.debug.Instance} - */ -proto.cc.arduino.cli.debug.DebugConfigReq.prototype.getInstance = function() { - return /** @type{?proto.cc.arduino.cli.debug.Instance} */ ( - jspb.Message.getWrapperField(this, proto.cc.arduino.cli.debug.Instance, 1)); -}; - - -/** @param {?proto.cc.arduino.cli.debug.Instance|undefined} value */ -proto.cc.arduino.cli.debug.DebugConfigReq.prototype.setInstance = function(value) { - jspb.Message.setWrapperField(this, 1, value); -}; - - -proto.cc.arduino.cli.debug.DebugConfigReq.prototype.clearInstance = function() { - this.setInstance(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.cc.arduino.cli.debug.DebugConfigReq.prototype.hasInstance = function() { - return jspb.Message.getField(this, 1) != null; -}; - - -/** - * optional string fqbn = 2; - * @return {string} - */ -proto.cc.arduino.cli.debug.DebugConfigReq.prototype.getFqbn = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); -}; - - -/** @param {string} value */ -proto.cc.arduino.cli.debug.DebugConfigReq.prototype.setFqbn = function(value) { - jspb.Message.setProto3StringField(this, 2, value); -}; - - -/** - * optional string sketch_path = 3; - * @return {string} - */ -proto.cc.arduino.cli.debug.DebugConfigReq.prototype.getSketchPath = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); -}; - - -/** @param {string} value */ -proto.cc.arduino.cli.debug.DebugConfigReq.prototype.setSketchPath = function(value) { - jspb.Message.setProto3StringField(this, 3, value); -}; - - -/** - * optional string port = 4; - * @return {string} - */ -proto.cc.arduino.cli.debug.DebugConfigReq.prototype.getPort = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "")); -}; - - -/** @param {string} value */ -proto.cc.arduino.cli.debug.DebugConfigReq.prototype.setPort = function(value) { - jspb.Message.setProto3StringField(this, 4, value); -}; - - -/** - * optional bool verbose = 5; - * Note that Boolean fields may be set to 0/1 when serialized from a Java server. - * You should avoid comparisons like {@code val === true/false} in those cases. - * @return {boolean} - */ -proto.cc.arduino.cli.debug.DebugConfigReq.prototype.getVerbose = function() { - return /** @type {boolean} */ (jspb.Message.getFieldWithDefault(this, 5, false)); -}; - - -/** @param {boolean} value */ -proto.cc.arduino.cli.debug.DebugConfigReq.prototype.setVerbose = function(value) { - jspb.Message.setProto3BooleanField(this, 5, value); -}; - - -/** - * 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 */ -proto.cc.arduino.cli.debug.DebugConfigReq.prototype.setImportFile = function(value) { - jspb.Message.setProto3StringField(this, 7, value); -}; - - - -/** - * 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.DebugResp = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.cc.arduino.cli.debug.DebugResp, jspb.Message); -if (goog.DEBUG && !COMPILED) { - proto.cc.arduino.cli.debug.DebugResp.displayName = 'proto.cc.arduino.cli.debug.DebugResp'; -} - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto suitable for use in Soy templates. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration - * @return {!Object} - */ -proto.cc.arduino.cli.debug.DebugResp.prototype.toObject = function(opt_includeInstance) { - return proto.cc.arduino.cli.debug.DebugResp.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.cc.arduino.cli.debug.DebugResp} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.cc.arduino.cli.debug.DebugResp.toObject = function(includeInstance, msg) { - var f, obj = { - data: msg.getData_asB64(), - error: jspb.Message.getFieldWithDefault(msg, 2, "") - }; - - 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.DebugResp} - */ -proto.cc.arduino.cli.debug.DebugResp.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.cc.arduino.cli.debug.DebugResp; - return proto.cc.arduino.cli.debug.DebugResp.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.DebugResp} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.cc.arduino.cli.debug.DebugResp} - */ -proto.cc.arduino.cli.debug.DebugResp.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.setData(value); - break; - case 2: - var value = /** @type {string} */ (reader.readString()); - msg.setError(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.cc.arduino.cli.debug.DebugResp.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.cc.arduino.cli.debug.DebugResp.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.DebugResp} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.cc.arduino.cli.debug.DebugResp.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getData_asU8(); - if (f.length > 0) { - writer.writeBytes( - 1, - f - ); - } - f = message.getError(); - if (f.length > 0) { - writer.writeString( - 2, - f - ); - } -}; - - -/** - * optional bytes data = 1; - * @return {!(string|Uint8Array)} - */ -proto.cc.arduino.cli.debug.DebugResp.prototype.getData = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * optional bytes data = 1; - * This is a type-conversion wrapper around `getData()` - * @return {string} - */ -proto.cc.arduino.cli.debug.DebugResp.prototype.getData_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getData())); -}; - - -/** - * optional bytes data = 1; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getData()` - * @return {!Uint8Array} - */ -proto.cc.arduino.cli.debug.DebugResp.prototype.getData_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getData())); -}; - - -/** @param {!(string|Uint8Array)} value */ -proto.cc.arduino.cli.debug.DebugResp.prototype.setData = function(value) { - jspb.Message.setProto3BytesField(this, 1, value); -}; - - -/** - * optional string error = 2; - * @return {string} - */ -proto.cc.arduino.cli.debug.DebugResp.prototype.getError = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); -}; - - -/** @param {string} value */ -proto.cc.arduino.cli.debug.DebugResp.prototype.setError = function(value) { - jspb.Message.setProto3StringField(this, 2, value); -}; - - - -/** - * 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.Instance = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.cc.arduino.cli.debug.Instance, jspb.Message); -if (goog.DEBUG && !COMPILED) { - proto.cc.arduino.cli.debug.Instance.displayName = 'proto.cc.arduino.cli.debug.Instance'; -} - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto suitable for use in Soy templates. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration - * @return {!Object} - */ -proto.cc.arduino.cli.debug.Instance.prototype.toObject = function(opt_includeInstance) { - return proto.cc.arduino.cli.debug.Instance.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.cc.arduino.cli.debug.Instance} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.cc.arduino.cli.debug.Instance.toObject = function(includeInstance, msg) { - var f, obj = { - id: jspb.Message.getFieldWithDefault(msg, 1, 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.debug.Instance} - */ -proto.cc.arduino.cli.debug.Instance.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.cc.arduino.cli.debug.Instance; - return proto.cc.arduino.cli.debug.Instance.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.Instance} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.cc.arduino.cli.debug.Instance} - */ -proto.cc.arduino.cli.debug.Instance.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {number} */ (reader.readInt32()); - msg.setId(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.cc.arduino.cli.debug.Instance.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.cc.arduino.cli.debug.Instance.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.Instance} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.cc.arduino.cli.debug.Instance.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getId(); - if (f !== 0) { - writer.writeInt32( - 1, - f - ); - } -}; - - -/** - * optional int32 id = 1; - * @return {number} - */ -proto.cc.arduino.cli.debug.Instance.prototype.getId = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); -}; - - -/** @param {number} value */ -proto.cc.arduino.cli.debug.Instance.prototype.setId = function(value) { - jspb.Message.setProto3IntField(this, 1, value); -}; - - -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 deleted file mode 100644 index ae5bb0e8..00000000 --- a/arduino-ide-extension/src/node/cli-protocol/monitor/monitor_grpc_pb.d.ts +++ /dev/null @@ -1,41 +0,0 @@ -// package: cc.arduino.cli.monitor -// file: monitor/monitor.proto - -/* tslint:disable */ -/* eslint-disable */ - -import * as grpc from "@grpc/grpc-js"; -import * as monitor_monitor_pb from "../monitor/monitor_pb"; -import * as google_protobuf_struct_pb from "google-protobuf/google/protobuf/struct_pb"; - -interface IMonitorService extends grpc.ServiceDefinition { - streamingOpen: IMonitorService_IStreamingOpen; -} - -interface IMonitorService_IStreamingOpen extends grpc.MethodDefinition { - path: string; // "/cc.arduino.cli.monitor.Monitor/StreamingOpen" - requestStream: boolean; // true - responseStream: boolean; // true - requestSerialize: grpc.serialize; - requestDeserialize: grpc.deserialize; - responseSerialize: grpc.serialize; - responseDeserialize: grpc.deserialize; -} - -export const MonitorService: IMonitorService; - -export interface IMonitorServer { - streamingOpen: grpc.handleBidiStreamingCall; -} - -export interface IMonitorClient { - streamingOpen(): grpc.ClientDuplexStream; - streamingOpen(options: Partial): grpc.ClientDuplexStream; - streamingOpen(metadata: grpc.Metadata, options?: Partial): grpc.ClientDuplexStream; -} - -export class MonitorClient extends grpc.Client implements IMonitorClient { - constructor(address: string, credentials: grpc.ChannelCredentials, options?: object); - 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/monitor/monitor_grpc_pb.js b/arduino-ide-extension/src/node/cli-protocol/monitor/monitor_grpc_pb.js deleted file mode 100644 index c9821121..00000000 --- a/arduino-ide-extension/src/node/cli-protocol/monitor/monitor_grpc_pb.js +++ /dev/null @@ -1,62 +0,0 @@ -// GENERATED CODE -- DO NOT EDIT! - -// Original file comments: -// This file is part of arduino-cli. -// -// Copyright 2020 ARDUINO SA (http://www.arduino.cc/) -// -// This software is released under the GNU General Public License version 3, -// which covers the main part of arduino-cli. -// The terms of this license can be found at: -// https://www.gnu.org/licenses/gpl-3.0.en.html -// -// You can be released from the requirements of the above licenses by purchasing -// a commercial license. Buying such a license is mandatory if you want to -// modify or otherwise use the software for commercial activities involving the -// Arduino software without disclosing the source code of your own applications. -// To purchase a commercial license, send an email to license@arduino.cc. -// -'use strict'; -var grpc = require('@grpc/grpc-js'); -var monitor_monitor_pb = require('../monitor/monitor_pb.js'); -var google_protobuf_struct_pb = require('google-protobuf/google/protobuf/struct_pb.js'); - -function serialize_cc_arduino_cli_monitor_StreamingOpenReq(arg) { - if (!(arg instanceof monitor_monitor_pb.StreamingOpenReq)) { - throw new Error('Expected argument of type cc.arduino.cli.monitor.StreamingOpenReq'); - } - return Buffer.from(arg.serializeBinary()); -} - -function deserialize_cc_arduino_cli_monitor_StreamingOpenReq(buffer_arg) { - return monitor_monitor_pb.StreamingOpenReq.deserializeBinary(new Uint8Array(buffer_arg)); -} - -function serialize_cc_arduino_cli_monitor_StreamingOpenResp(arg) { - if (!(arg instanceof monitor_monitor_pb.StreamingOpenResp)) { - throw new Error('Expected argument of type cc.arduino.cli.monitor.StreamingOpenResp'); - } - return Buffer.from(arg.serializeBinary()); -} - -function deserialize_cc_arduino_cli_monitor_StreamingOpenResp(buffer_arg) { - return monitor_monitor_pb.StreamingOpenResp.deserializeBinary(new Uint8Array(buffer_arg)); -} - - -// Service that abstract a Monitor usage -var MonitorService = exports.MonitorService = { - streamingOpen: { - path: '/cc.arduino.cli.monitor.Monitor/StreamingOpen', - requestStream: true, - responseStream: true, - requestType: monitor_monitor_pb.StreamingOpenReq, - responseType: monitor_monitor_pb.StreamingOpenResp, - requestSerialize: serialize_cc_arduino_cli_monitor_StreamingOpenReq, - requestDeserialize: deserialize_cc_arduino_cli_monitor_StreamingOpenReq, - responseSerialize: serialize_cc_arduino_cli_monitor_StreamingOpenResp, - responseDeserialize: deserialize_cc_arduino_cli_monitor_StreamingOpenResp, - }, -}; - -exports.MonitorClient = grpc.makeGenericClientConstructor(MonitorService); diff --git a/arduino-ide-extension/src/node/cli-protocol/monitor/monitor_pb.d.ts b/arduino-ide-extension/src/node/cli-protocol/monitor/monitor_pb.d.ts deleted file mode 100644 index beb2fcd1..00000000 --- a/arduino-ide-extension/src/node/cli-protocol/monitor/monitor_pb.d.ts +++ /dev/null @@ -1,113 +0,0 @@ -// package: cc.arduino.cli.monitor -// file: monitor/monitor.proto - -/* tslint:disable */ -/* eslint-disable */ - -import * as jspb from "google-protobuf"; -import * as google_protobuf_struct_pb from "google-protobuf/google/protobuf/struct_pb"; - -export class StreamingOpenReq extends jspb.Message { - - hasMonitorconfig(): boolean; - clearMonitorconfig(): void; - getMonitorconfig(): MonitorConfig | undefined; - setMonitorconfig(value?: MonitorConfig): void; - - - hasData(): boolean; - clearData(): void; - getData(): Uint8Array | string; - getData_asU8(): Uint8Array; - getData_asB64(): string; - setData(value: Uint8Array | string): void; - - - getContentCase(): StreamingOpenReq.ContentCase; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): StreamingOpenReq.AsObject; - static toObject(includeInstance: boolean, msg: StreamingOpenReq): StreamingOpenReq.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: StreamingOpenReq, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): StreamingOpenReq; - static deserializeBinaryFromReader(message: StreamingOpenReq, reader: jspb.BinaryReader): StreamingOpenReq; -} - -export namespace StreamingOpenReq { - export type AsObject = { - monitorconfig?: MonitorConfig.AsObject, - data: Uint8Array | string, - } - - export enum ContentCase { - CONTENT_NOT_SET = 0, - - MONITORCONFIG = 1, - - DATA = 2, - - } - -} - -export class MonitorConfig extends jspb.Message { - getTarget(): string; - setTarget(value: string): void; - - getType(): MonitorConfig.TargetType; - setType(value: MonitorConfig.TargetType): void; - - - hasAdditionalconfig(): boolean; - clearAdditionalconfig(): void; - getAdditionalconfig(): google_protobuf_struct_pb.Struct | undefined; - setAdditionalconfig(value?: google_protobuf_struct_pb.Struct): void; - - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): MonitorConfig.AsObject; - static toObject(includeInstance: boolean, msg: MonitorConfig): MonitorConfig.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: MonitorConfig, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): MonitorConfig; - static deserializeBinaryFromReader(message: MonitorConfig, reader: jspb.BinaryReader): MonitorConfig; -} - -export namespace MonitorConfig { - export type AsObject = { - target: string, - type: MonitorConfig.TargetType, - additionalconfig?: google_protobuf_struct_pb.Struct.AsObject, - } - - export enum TargetType { - SERIAL = 0, - } - -} - -export class StreamingOpenResp extends jspb.Message { - getData(): Uint8Array | string; - getData_asU8(): Uint8Array; - getData_asB64(): string; - setData(value: Uint8Array | string): void; - - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): StreamingOpenResp.AsObject; - static toObject(includeInstance: boolean, msg: StreamingOpenResp): StreamingOpenResp.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: StreamingOpenResp, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): StreamingOpenResp; - static deserializeBinaryFromReader(message: StreamingOpenResp, reader: jspb.BinaryReader): StreamingOpenResp; -} - -export namespace StreamingOpenResp { - export type AsObject = { - data: Uint8Array | string, - } -} 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 deleted file mode 100644 index ed4e368b..00000000 --- a/arduino-ide-extension/src/node/cli-protocol/monitor/monitor_pb.js +++ /dev/null @@ -1,656 +0,0 @@ -/** - * @fileoverview - * @enhanceable - * @suppress {messageConventions} JS Compiler reports an error if a variable or - * field starts with 'MSG_' and isn't a translatable message. - * @public - */ -// GENERATED CODE -- DO NOT EDIT! - -var jspb = require('google-protobuf'); -var goog = jspb; -var global = Function('return this')(); - -var google_protobuf_struct_pb = require('google-protobuf/google/protobuf/struct_pb.js'); -goog.object.extend(proto, google_protobuf_struct_pb); -goog.exportSymbol('proto.cc.arduino.cli.monitor.MonitorConfig', null, global); -goog.exportSymbol('proto.cc.arduino.cli.monitor.MonitorConfig.TargetType', null, global); -goog.exportSymbol('proto.cc.arduino.cli.monitor.StreamingOpenReq', null, global); -goog.exportSymbol('proto.cc.arduino.cli.monitor.StreamingOpenResp', null, global); - -/** - * 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.monitor.StreamingOpenReq = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, proto.cc.arduino.cli.monitor.StreamingOpenReq.oneofGroups_); -}; -goog.inherits(proto.cc.arduino.cli.monitor.StreamingOpenReq, jspb.Message); -if (goog.DEBUG && !COMPILED) { - proto.cc.arduino.cli.monitor.StreamingOpenReq.displayName = 'proto.cc.arduino.cli.monitor.StreamingOpenReq'; -} -/** - * Oneof group definitions for this message. Each group defines the field - * numbers belonging to that group. When of these fields' value is set, all - * other fields in the group are cleared. During deserialization, if multiple - * fields are encountered for a group, only the last value seen will be kept. - * @private {!Array>} - * @const - */ -proto.cc.arduino.cli.monitor.StreamingOpenReq.oneofGroups_ = [[1,2]]; - -/** - * @enum {number} - */ -proto.cc.arduino.cli.monitor.StreamingOpenReq.ContentCase = { - CONTENT_NOT_SET: 0, - MONITORCONFIG: 1, - DATA: 2 -}; - -/** - * @return {proto.cc.arduino.cli.monitor.StreamingOpenReq.ContentCase} - */ -proto.cc.arduino.cli.monitor.StreamingOpenReq.prototype.getContentCase = function() { - return /** @type {proto.cc.arduino.cli.monitor.StreamingOpenReq.ContentCase} */(jspb.Message.computeOneofCase(this, proto.cc.arduino.cli.monitor.StreamingOpenReq.oneofGroups_[0])); -}; - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto suitable for use in Soy templates. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration - * @return {!Object} - */ -proto.cc.arduino.cli.monitor.StreamingOpenReq.prototype.toObject = function(opt_includeInstance) { - return proto.cc.arduino.cli.monitor.StreamingOpenReq.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.cc.arduino.cli.monitor.StreamingOpenReq} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.cc.arduino.cli.monitor.StreamingOpenReq.toObject = function(includeInstance, msg) { - var f, obj = { - monitorconfig: (f = msg.getMonitorconfig()) && proto.cc.arduino.cli.monitor.MonitorConfig.toObject(includeInstance, f), - data: msg.getData_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.monitor.StreamingOpenReq} - */ -proto.cc.arduino.cli.monitor.StreamingOpenReq.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.cc.arduino.cli.monitor.StreamingOpenReq; - return proto.cc.arduino.cli.monitor.StreamingOpenReq.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.cc.arduino.cli.monitor.StreamingOpenReq} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.cc.arduino.cli.monitor.StreamingOpenReq} - */ -proto.cc.arduino.cli.monitor.StreamingOpenReq.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = new proto.cc.arduino.cli.monitor.MonitorConfig; - reader.readMessage(value,proto.cc.arduino.cli.monitor.MonitorConfig.deserializeBinaryFromReader); - msg.setMonitorconfig(value); - break; - case 2: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setData(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.cc.arduino.cli.monitor.StreamingOpenReq.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.cc.arduino.cli.monitor.StreamingOpenReq.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.monitor.StreamingOpenReq} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.cc.arduino.cli.monitor.StreamingOpenReq.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getMonitorconfig(); - if (f != null) { - writer.writeMessage( - 1, - f, - proto.cc.arduino.cli.monitor.MonitorConfig.serializeBinaryToWriter - ); - } - f = /** @type {!(string|Uint8Array)} */ (jspb.Message.getField(message, 2)); - if (f != null) { - writer.writeBytes( - 2, - f - ); - } -}; - - -/** - * optional MonitorConfig monitorConfig = 1; - * @return {?proto.cc.arduino.cli.monitor.MonitorConfig} - */ -proto.cc.arduino.cli.monitor.StreamingOpenReq.prototype.getMonitorconfig = function() { - return /** @type{?proto.cc.arduino.cli.monitor.MonitorConfig} */ ( - jspb.Message.getWrapperField(this, proto.cc.arduino.cli.monitor.MonitorConfig, 1)); -}; - - -/** @param {?proto.cc.arduino.cli.monitor.MonitorConfig|undefined} value */ -proto.cc.arduino.cli.monitor.StreamingOpenReq.prototype.setMonitorconfig = function(value) { - jspb.Message.setOneofWrapperField(this, 1, proto.cc.arduino.cli.monitor.StreamingOpenReq.oneofGroups_[0], value); -}; - - -proto.cc.arduino.cli.monitor.StreamingOpenReq.prototype.clearMonitorconfig = function() { - this.setMonitorconfig(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.cc.arduino.cli.monitor.StreamingOpenReq.prototype.hasMonitorconfig = function() { - return jspb.Message.getField(this, 1) != null; -}; - - -/** - * optional bytes data = 2; - * @return {!(string|Uint8Array)} - */ -proto.cc.arduino.cli.monitor.StreamingOpenReq.prototype.getData = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 2, "")); -}; - - -/** - * optional bytes data = 2; - * This is a type-conversion wrapper around `getData()` - * @return {string} - */ -proto.cc.arduino.cli.monitor.StreamingOpenReq.prototype.getData_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getData())); -}; - - -/** - * optional bytes data = 2; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getData()` - * @return {!Uint8Array} - */ -proto.cc.arduino.cli.monitor.StreamingOpenReq.prototype.getData_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getData())); -}; - - -/** @param {!(string|Uint8Array)} value */ -proto.cc.arduino.cli.monitor.StreamingOpenReq.prototype.setData = function(value) { - jspb.Message.setOneofField(this, 2, proto.cc.arduino.cli.monitor.StreamingOpenReq.oneofGroups_[0], value); -}; - - -proto.cc.arduino.cli.monitor.StreamingOpenReq.prototype.clearData = function() { - jspb.Message.setOneofField(this, 2, proto.cc.arduino.cli.monitor.StreamingOpenReq.oneofGroups_[0], undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.cc.arduino.cli.monitor.StreamingOpenReq.prototype.hasData = function() { - return jspb.Message.getField(this, 2) != null; -}; - - - -/** - * 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.monitor.MonitorConfig = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.cc.arduino.cli.monitor.MonitorConfig, jspb.Message); -if (goog.DEBUG && !COMPILED) { - proto.cc.arduino.cli.monitor.MonitorConfig.displayName = 'proto.cc.arduino.cli.monitor.MonitorConfig'; -} - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto suitable for use in Soy templates. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration - * @return {!Object} - */ -proto.cc.arduino.cli.monitor.MonitorConfig.prototype.toObject = function(opt_includeInstance) { - return proto.cc.arduino.cli.monitor.MonitorConfig.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.cc.arduino.cli.monitor.MonitorConfig} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.cc.arduino.cli.monitor.MonitorConfig.toObject = function(includeInstance, msg) { - var f, obj = { - target: jspb.Message.getFieldWithDefault(msg, 1, ""), - type: jspb.Message.getFieldWithDefault(msg, 2, 0), - additionalconfig: (f = msg.getAdditionalconfig()) && google_protobuf_struct_pb.Struct.toObject(includeInstance, f) - }; - - 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.monitor.MonitorConfig} - */ -proto.cc.arduino.cli.monitor.MonitorConfig.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.cc.arduino.cli.monitor.MonitorConfig; - return proto.cc.arduino.cli.monitor.MonitorConfig.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.cc.arduino.cli.monitor.MonitorConfig} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.cc.arduino.cli.monitor.MonitorConfig} - */ -proto.cc.arduino.cli.monitor.MonitorConfig.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.setTarget(value); - break; - case 2: - var value = /** @type {!proto.cc.arduino.cli.monitor.MonitorConfig.TargetType} */ (reader.readEnum()); - msg.setType(value); - break; - case 3: - var value = new google_protobuf_struct_pb.Struct; - reader.readMessage(value,google_protobuf_struct_pb.Struct.deserializeBinaryFromReader); - msg.setAdditionalconfig(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.cc.arduino.cli.monitor.MonitorConfig.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.cc.arduino.cli.monitor.MonitorConfig.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.monitor.MonitorConfig} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.cc.arduino.cli.monitor.MonitorConfig.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getTarget(); - if (f.length > 0) { - writer.writeString( - 1, - f - ); - } - f = message.getType(); - if (f !== 0.0) { - writer.writeEnum( - 2, - f - ); - } - f = message.getAdditionalconfig(); - if (f != null) { - writer.writeMessage( - 3, - f, - google_protobuf_struct_pb.Struct.serializeBinaryToWriter - ); - } -}; - - -/** - * @enum {number} - */ -proto.cc.arduino.cli.monitor.MonitorConfig.TargetType = { - SERIAL: 0 -}; - -/** - * optional string target = 1; - * @return {string} - */ -proto.cc.arduino.cli.monitor.MonitorConfig.prototype.getTarget = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** @param {string} value */ -proto.cc.arduino.cli.monitor.MonitorConfig.prototype.setTarget = function(value) { - jspb.Message.setProto3StringField(this, 1, value); -}; - - -/** - * optional TargetType type = 2; - * @return {!proto.cc.arduino.cli.monitor.MonitorConfig.TargetType} - */ -proto.cc.arduino.cli.monitor.MonitorConfig.prototype.getType = function() { - return /** @type {!proto.cc.arduino.cli.monitor.MonitorConfig.TargetType} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); -}; - - -/** @param {!proto.cc.arduino.cli.monitor.MonitorConfig.TargetType} value */ -proto.cc.arduino.cli.monitor.MonitorConfig.prototype.setType = function(value) { - jspb.Message.setProto3EnumField(this, 2, value); -}; - - -/** - * optional google.protobuf.Struct additionalConfig = 3; - * @return {?proto.google.protobuf.Struct} - */ -proto.cc.arduino.cli.monitor.MonitorConfig.prototype.getAdditionalconfig = function() { - return /** @type{?proto.google.protobuf.Struct} */ ( - jspb.Message.getWrapperField(this, google_protobuf_struct_pb.Struct, 3)); -}; - - -/** @param {?proto.google.protobuf.Struct|undefined} value */ -proto.cc.arduino.cli.monitor.MonitorConfig.prototype.setAdditionalconfig = function(value) { - jspb.Message.setWrapperField(this, 3, value); -}; - - -proto.cc.arduino.cli.monitor.MonitorConfig.prototype.clearAdditionalconfig = function() { - this.setAdditionalconfig(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.cc.arduino.cli.monitor.MonitorConfig.prototype.hasAdditionalconfig = function() { - return jspb.Message.getField(this, 3) != null; -}; - - - -/** - * 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.monitor.StreamingOpenResp = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.cc.arduino.cli.monitor.StreamingOpenResp, jspb.Message); -if (goog.DEBUG && !COMPILED) { - proto.cc.arduino.cli.monitor.StreamingOpenResp.displayName = 'proto.cc.arduino.cli.monitor.StreamingOpenResp'; -} - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto suitable for use in Soy templates. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration - * @return {!Object} - */ -proto.cc.arduino.cli.monitor.StreamingOpenResp.prototype.toObject = function(opt_includeInstance) { - return proto.cc.arduino.cli.monitor.StreamingOpenResp.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.cc.arduino.cli.monitor.StreamingOpenResp} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.cc.arduino.cli.monitor.StreamingOpenResp.toObject = function(includeInstance, msg) { - var f, obj = { - data: msg.getData_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.monitor.StreamingOpenResp} - */ -proto.cc.arduino.cli.monitor.StreamingOpenResp.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.cc.arduino.cli.monitor.StreamingOpenResp; - return proto.cc.arduino.cli.monitor.StreamingOpenResp.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.cc.arduino.cli.monitor.StreamingOpenResp} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.cc.arduino.cli.monitor.StreamingOpenResp} - */ -proto.cc.arduino.cli.monitor.StreamingOpenResp.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.setData(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.cc.arduino.cli.monitor.StreamingOpenResp.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.cc.arduino.cli.monitor.StreamingOpenResp.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.monitor.StreamingOpenResp} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.cc.arduino.cli.monitor.StreamingOpenResp.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getData_asU8(); - if (f.length > 0) { - writer.writeBytes( - 1, - f - ); - } -}; - - -/** - * optional bytes data = 1; - * @return {!(string|Uint8Array)} - */ -proto.cc.arduino.cli.monitor.StreamingOpenResp.prototype.getData = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * optional bytes data = 1; - * This is a type-conversion wrapper around `getData()` - * @return {string} - */ -proto.cc.arduino.cli.monitor.StreamingOpenResp.prototype.getData_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getData())); -}; - - -/** - * optional bytes data = 1; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getData()` - * @return {!Uint8Array} - */ -proto.cc.arduino.cli.monitor.StreamingOpenResp.prototype.getData_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getData())); -}; - - -/** @param {!(string|Uint8Array)} value */ -proto.cc.arduino.cli.monitor.StreamingOpenResp.prototype.setData = function(value) { - jspb.Message.setProto3BytesField(this, 1, value); -}; - - -goog.object.extend(exports, proto.cc.arduino.cli.monitor); 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 deleted file mode 100644 index 0c251539..00000000 --- a/arduino-ide-extension/src/node/cli-protocol/settings/settings_grpc_pb.d.ts +++ /dev/null @@ -1,92 +0,0 @@ -// package: cc.arduino.cli.settings -// file: settings/settings.proto - -/* tslint:disable */ -/* eslint-disable */ - -import * as grpc from "@grpc/grpc-js"; -import * as settings_settings_pb from "../settings/settings_pb"; - -interface ISettingsService extends grpc.ServiceDefinition { - getAll: ISettingsService_IGetAll; - merge: ISettingsService_IMerge; - getValue: ISettingsService_IGetValue; - setValue: ISettingsService_ISetValue; -} - -interface ISettingsService_IGetAll extends grpc.MethodDefinition { - path: string; // "/cc.arduino.cli.settings.Settings/GetAll" - requestStream: boolean; // false - responseStream: boolean; // false - requestSerialize: grpc.serialize; - requestDeserialize: grpc.deserialize; - responseSerialize: grpc.serialize; - responseDeserialize: grpc.deserialize; -} -interface ISettingsService_IMerge extends grpc.MethodDefinition { - path: string; // "/cc.arduino.cli.settings.Settings/Merge" - requestStream: boolean; // false - responseStream: boolean; // false - requestSerialize: grpc.serialize; - requestDeserialize: grpc.deserialize; - responseSerialize: grpc.serialize; - responseDeserialize: grpc.deserialize; -} -interface ISettingsService_IGetValue extends grpc.MethodDefinition { - path: string; // "/cc.arduino.cli.settings.Settings/GetValue" - requestStream: boolean; // false - responseStream: boolean; // false - requestSerialize: grpc.serialize; - requestDeserialize: grpc.deserialize; - responseSerialize: grpc.serialize; - responseDeserialize: grpc.deserialize; -} -interface ISettingsService_ISetValue extends grpc.MethodDefinition { - path: string; // "/cc.arduino.cli.settings.Settings/SetValue" - requestStream: boolean; // false - responseStream: boolean; // false - requestSerialize: grpc.serialize; - requestDeserialize: grpc.deserialize; - responseSerialize: grpc.serialize; - responseDeserialize: grpc.deserialize; -} - -export const SettingsService: ISettingsService; - -export interface ISettingsServer { - getAll: grpc.handleUnaryCall; - merge: grpc.handleUnaryCall; - getValue: grpc.handleUnaryCall; - setValue: grpc.handleUnaryCall; -} - -export interface ISettingsClient { - getAll(request: settings_settings_pb.GetAllRequest, callback: (error: grpc.ServiceError | null, response: settings_settings_pb.RawData) => void): grpc.ClientUnaryCall; - getAll(request: settings_settings_pb.GetAllRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: settings_settings_pb.RawData) => void): grpc.ClientUnaryCall; - getAll(request: settings_settings_pb.GetAllRequest, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: settings_settings_pb.RawData) => void): grpc.ClientUnaryCall; - merge(request: settings_settings_pb.RawData, callback: (error: grpc.ServiceError | null, response: settings_settings_pb.MergeResponse) => void): grpc.ClientUnaryCall; - merge(request: settings_settings_pb.RawData, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: settings_settings_pb.MergeResponse) => void): grpc.ClientUnaryCall; - merge(request: settings_settings_pb.RawData, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: settings_settings_pb.MergeResponse) => void): grpc.ClientUnaryCall; - getValue(request: settings_settings_pb.GetValueRequest, callback: (error: grpc.ServiceError | null, response: settings_settings_pb.Value) => void): grpc.ClientUnaryCall; - getValue(request: settings_settings_pb.GetValueRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: settings_settings_pb.Value) => void): grpc.ClientUnaryCall; - getValue(request: settings_settings_pb.GetValueRequest, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: settings_settings_pb.Value) => void): grpc.ClientUnaryCall; - setValue(request: settings_settings_pb.Value, callback: (error: grpc.ServiceError | null, response: settings_settings_pb.SetValueResponse) => void): grpc.ClientUnaryCall; - setValue(request: settings_settings_pb.Value, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: settings_settings_pb.SetValueResponse) => void): grpc.ClientUnaryCall; - setValue(request: settings_settings_pb.Value, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: settings_settings_pb.SetValueResponse) => void): grpc.ClientUnaryCall; -} - -export class SettingsClient extends grpc.Client implements ISettingsClient { - constructor(address: string, credentials: grpc.ChannelCredentials, options?: object); - 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; - public merge(request: settings_settings_pb.RawData, callback: (error: grpc.ServiceError | null, response: settings_settings_pb.MergeResponse) => void): grpc.ClientUnaryCall; - public merge(request: settings_settings_pb.RawData, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: settings_settings_pb.MergeResponse) => void): grpc.ClientUnaryCall; - public merge(request: settings_settings_pb.RawData, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: settings_settings_pb.MergeResponse) => void): grpc.ClientUnaryCall; - public getValue(request: settings_settings_pb.GetValueRequest, callback: (error: grpc.ServiceError | null, response: settings_settings_pb.Value) => void): grpc.ClientUnaryCall; - public getValue(request: settings_settings_pb.GetValueRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: settings_settings_pb.Value) => void): grpc.ClientUnaryCall; - public getValue(request: settings_settings_pb.GetValueRequest, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: settings_settings_pb.Value) => void): grpc.ClientUnaryCall; - public setValue(request: settings_settings_pb.Value, callback: (error: grpc.ServiceError | null, response: settings_settings_pb.SetValueResponse) => void): grpc.ClientUnaryCall; - public setValue(request: settings_settings_pb.Value, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: settings_settings_pb.SetValueResponse) => void): grpc.ClientUnaryCall; - public setValue(request: settings_settings_pb.Value, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: settings_settings_pb.SetValueResponse) => void): grpc.ClientUnaryCall; -} diff --git a/arduino-ide-extension/src/node/cli-protocol/settings/settings_grpc_pb.js b/arduino-ide-extension/src/node/cli-protocol/settings/settings_grpc_pb.js deleted file mode 100644 index 0e42e729..00000000 --- a/arduino-ide-extension/src/node/cli-protocol/settings/settings_grpc_pb.js +++ /dev/null @@ -1,137 +0,0 @@ -// GENERATED CODE -- DO NOT EDIT! - -// Original file comments: -// This file is part of arduino-cli. -// -// Copyright 2020 ARDUINO SA (http://www.arduino.cc/) -// -// This software is released under the GNU General Public License version 3, -// which covers the main part of arduino-cli. -// The terms of this license can be found at: -// https://www.gnu.org/licenses/gpl-3.0.en.html -// -// You can be released from the requirements of the above licenses by purchasing -// a commercial license. Buying such a license is mandatory if you want to -// modify or otherwise use the software for commercial activities involving the -// Arduino software without disclosing the source code of your own applications. -// To purchase a commercial license, send an email to license@arduino.cc. -// -'use strict'; -var grpc = require('@grpc/grpc-js'); -var settings_settings_pb = require('../settings/settings_pb.js'); - -function serialize_cc_arduino_cli_settings_GetAllRequest(arg) { - if (!(arg instanceof settings_settings_pb.GetAllRequest)) { - throw new Error('Expected argument of type cc.arduino.cli.settings.GetAllRequest'); - } - return Buffer.from(arg.serializeBinary()); -} - -function deserialize_cc_arduino_cli_settings_GetAllRequest(buffer_arg) { - return settings_settings_pb.GetAllRequest.deserializeBinary(new Uint8Array(buffer_arg)); -} - -function serialize_cc_arduino_cli_settings_GetValueRequest(arg) { - if (!(arg instanceof settings_settings_pb.GetValueRequest)) { - throw new Error('Expected argument of type cc.arduino.cli.settings.GetValueRequest'); - } - return Buffer.from(arg.serializeBinary()); -} - -function deserialize_cc_arduino_cli_settings_GetValueRequest(buffer_arg) { - return settings_settings_pb.GetValueRequest.deserializeBinary(new Uint8Array(buffer_arg)); -} - -function serialize_cc_arduino_cli_settings_MergeResponse(arg) { - if (!(arg instanceof settings_settings_pb.MergeResponse)) { - throw new Error('Expected argument of type cc.arduino.cli.settings.MergeResponse'); - } - return Buffer.from(arg.serializeBinary()); -} - -function deserialize_cc_arduino_cli_settings_MergeResponse(buffer_arg) { - return settings_settings_pb.MergeResponse.deserializeBinary(new Uint8Array(buffer_arg)); -} - -function serialize_cc_arduino_cli_settings_RawData(arg) { - if (!(arg instanceof settings_settings_pb.RawData)) { - throw new Error('Expected argument of type cc.arduino.cli.settings.RawData'); - } - return Buffer.from(arg.serializeBinary()); -} - -function deserialize_cc_arduino_cli_settings_RawData(buffer_arg) { - return settings_settings_pb.RawData.deserializeBinary(new Uint8Array(buffer_arg)); -} - -function serialize_cc_arduino_cli_settings_SetValueResponse(arg) { - if (!(arg instanceof settings_settings_pb.SetValueResponse)) { - throw new Error('Expected argument of type cc.arduino.cli.settings.SetValueResponse'); - } - return Buffer.from(arg.serializeBinary()); -} - -function deserialize_cc_arduino_cli_settings_SetValueResponse(buffer_arg) { - return settings_settings_pb.SetValueResponse.deserializeBinary(new Uint8Array(buffer_arg)); -} - -function serialize_cc_arduino_cli_settings_Value(arg) { - if (!(arg instanceof settings_settings_pb.Value)) { - throw new Error('Expected argument of type cc.arduino.cli.settings.Value'); - } - return Buffer.from(arg.serializeBinary()); -} - -function deserialize_cc_arduino_cli_settings_Value(buffer_arg) { - return settings_settings_pb.Value.deserializeBinary(new Uint8Array(buffer_arg)); -} - - -var SettingsService = exports.SettingsService = { - getAll: { - path: '/cc.arduino.cli.settings.Settings/GetAll', - requestStream: false, - responseStream: false, - requestType: settings_settings_pb.GetAllRequest, - responseType: settings_settings_pb.RawData, - requestSerialize: serialize_cc_arduino_cli_settings_GetAllRequest, - requestDeserialize: deserialize_cc_arduino_cli_settings_GetAllRequest, - responseSerialize: serialize_cc_arduino_cli_settings_RawData, - responseDeserialize: deserialize_cc_arduino_cli_settings_RawData, - }, - merge: { - path: '/cc.arduino.cli.settings.Settings/Merge', - requestStream: false, - responseStream: false, - requestType: settings_settings_pb.RawData, - responseType: settings_settings_pb.MergeResponse, - requestSerialize: serialize_cc_arduino_cli_settings_RawData, - requestDeserialize: deserialize_cc_arduino_cli_settings_RawData, - responseSerialize: serialize_cc_arduino_cli_settings_MergeResponse, - responseDeserialize: deserialize_cc_arduino_cli_settings_MergeResponse, - }, - getValue: { - path: '/cc.arduino.cli.settings.Settings/GetValue', - requestStream: false, - responseStream: false, - requestType: settings_settings_pb.GetValueRequest, - responseType: settings_settings_pb.Value, - requestSerialize: serialize_cc_arduino_cli_settings_GetValueRequest, - requestDeserialize: deserialize_cc_arduino_cli_settings_GetValueRequest, - responseSerialize: serialize_cc_arduino_cli_settings_Value, - responseDeserialize: deserialize_cc_arduino_cli_settings_Value, - }, - setValue: { - path: '/cc.arduino.cli.settings.Settings/SetValue', - requestStream: false, - responseStream: false, - requestType: settings_settings_pb.Value, - responseType: settings_settings_pb.SetValueResponse, - requestSerialize: serialize_cc_arduino_cli_settings_Value, - requestDeserialize: deserialize_cc_arduino_cli_settings_Value, - responseSerialize: serialize_cc_arduino_cli_settings_SetValueResponse, - responseDeserialize: deserialize_cc_arduino_cli_settings_SetValueResponse, - }, -}; - -exports.SettingsClient = grpc.makeGenericClientConstructor(SettingsService); diff --git a/arduino-ide-extension/src/node/cli-protocol/settings/settings_pb.d.ts b/arduino-ide-extension/src/node/cli-protocol/settings/settings_pb.d.ts deleted file mode 100644 index e5278795..00000000 --- a/arduino-ide-extension/src/node/cli-protocol/settings/settings_pb.d.ts +++ /dev/null @@ -1,125 +0,0 @@ -// package: cc.arduino.cli.settings -// file: settings/settings.proto - -/* tslint:disable */ -/* eslint-disable */ - -import * as jspb from "google-protobuf"; - -export class RawData extends jspb.Message { - getJsondata(): string; - setJsondata(value: string): void; - - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): RawData.AsObject; - static toObject(includeInstance: boolean, msg: RawData): RawData.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: RawData, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): RawData; - static deserializeBinaryFromReader(message: RawData, reader: jspb.BinaryReader): RawData; -} - -export namespace RawData { - export type AsObject = { - jsondata: string, - } -} - -export class Value extends jspb.Message { - getKey(): string; - setKey(value: string): void; - - getJsondata(): string; - setJsondata(value: string): void; - - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): Value.AsObject; - static toObject(includeInstance: boolean, msg: Value): Value.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: Value, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): Value; - static deserializeBinaryFromReader(message: Value, reader: jspb.BinaryReader): Value; -} - -export namespace Value { - export type AsObject = { - key: string, - jsondata: string, - } -} - -export class GetAllRequest extends jspb.Message { - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): GetAllRequest.AsObject; - static toObject(includeInstance: boolean, msg: GetAllRequest): GetAllRequest.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: GetAllRequest, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): GetAllRequest; - static deserializeBinaryFromReader(message: GetAllRequest, reader: jspb.BinaryReader): GetAllRequest; -} - -export namespace GetAllRequest { - export type AsObject = { - } -} - -export class GetValueRequest extends jspb.Message { - getKey(): string; - setKey(value: string): void; - - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): GetValueRequest.AsObject; - static toObject(includeInstance: boolean, msg: GetValueRequest): GetValueRequest.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: GetValueRequest, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): GetValueRequest; - static deserializeBinaryFromReader(message: GetValueRequest, reader: jspb.BinaryReader): GetValueRequest; -} - -export namespace GetValueRequest { - export type AsObject = { - key: string, - } -} - -export class MergeResponse extends jspb.Message { - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): MergeResponse.AsObject; - static toObject(includeInstance: boolean, msg: MergeResponse): MergeResponse.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: MergeResponse, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): MergeResponse; - static deserializeBinaryFromReader(message: MergeResponse, reader: jspb.BinaryReader): MergeResponse; -} - -export namespace MergeResponse { - export type AsObject = { - } -} - -export class SetValueResponse extends jspb.Message { - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): SetValueResponse.AsObject; - static toObject(includeInstance: boolean, msg: SetValueResponse): SetValueResponse.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: SetValueResponse, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): SetValueResponse; - static deserializeBinaryFromReader(message: SetValueResponse, reader: jspb.BinaryReader): SetValueResponse; -} - -export namespace SetValueResponse { - export type AsObject = { - } -} 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 deleted file mode 100644 index dd356474..00000000 --- a/arduino-ide-extension/src/node/cli-protocol/settings/settings_pb.js +++ /dev/null @@ -1,821 +0,0 @@ -/** - * @fileoverview - * @enhanceable - * @suppress {messageConventions} JS Compiler reports an error if a variable or - * field starts with 'MSG_' and isn't a translatable message. - * @public - */ -// GENERATED CODE -- DO NOT EDIT! - -var jspb = require('google-protobuf'); -var goog = jspb; -var global = Function('return this')(); - -goog.exportSymbol('proto.cc.arduino.cli.settings.GetAllRequest', null, global); -goog.exportSymbol('proto.cc.arduino.cli.settings.GetValueRequest', null, global); -goog.exportSymbol('proto.cc.arduino.cli.settings.MergeResponse', null, global); -goog.exportSymbol('proto.cc.arduino.cli.settings.RawData', null, global); -goog.exportSymbol('proto.cc.arduino.cli.settings.SetValueResponse', null, global); -goog.exportSymbol('proto.cc.arduino.cli.settings.Value', null, global); - -/** - * 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.settings.RawData = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.cc.arduino.cli.settings.RawData, jspb.Message); -if (goog.DEBUG && !COMPILED) { - proto.cc.arduino.cli.settings.RawData.displayName = 'proto.cc.arduino.cli.settings.RawData'; -} - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto suitable for use in Soy templates. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration - * @return {!Object} - */ -proto.cc.arduino.cli.settings.RawData.prototype.toObject = function(opt_includeInstance) { - return proto.cc.arduino.cli.settings.RawData.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.cc.arduino.cli.settings.RawData} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.cc.arduino.cli.settings.RawData.toObject = function(includeInstance, msg) { - var f, obj = { - jsondata: jspb.Message.getFieldWithDefault(msg, 1, "") - }; - - 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.settings.RawData} - */ -proto.cc.arduino.cli.settings.RawData.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.cc.arduino.cli.settings.RawData; - return proto.cc.arduino.cli.settings.RawData.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.cc.arduino.cli.settings.RawData} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.cc.arduino.cli.settings.RawData} - */ -proto.cc.arduino.cli.settings.RawData.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.setJsondata(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.cc.arduino.cli.settings.RawData.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.cc.arduino.cli.settings.RawData.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.settings.RawData} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.cc.arduino.cli.settings.RawData.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getJsondata(); - if (f.length > 0) { - writer.writeString( - 1, - f - ); - } -}; - - -/** - * optional string jsonData = 1; - * @return {string} - */ -proto.cc.arduino.cli.settings.RawData.prototype.getJsondata = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** @param {string} value */ -proto.cc.arduino.cli.settings.RawData.prototype.setJsondata = function(value) { - jspb.Message.setProto3StringField(this, 1, value); -}; - - - -/** - * 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.settings.Value = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.cc.arduino.cli.settings.Value, jspb.Message); -if (goog.DEBUG && !COMPILED) { - proto.cc.arduino.cli.settings.Value.displayName = 'proto.cc.arduino.cli.settings.Value'; -} - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto suitable for use in Soy templates. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration - * @return {!Object} - */ -proto.cc.arduino.cli.settings.Value.prototype.toObject = function(opt_includeInstance) { - return proto.cc.arduino.cli.settings.Value.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.cc.arduino.cli.settings.Value} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.cc.arduino.cli.settings.Value.toObject = function(includeInstance, msg) { - var f, obj = { - key: jspb.Message.getFieldWithDefault(msg, 1, ""), - jsondata: jspb.Message.getFieldWithDefault(msg, 2, "") - }; - - 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.settings.Value} - */ -proto.cc.arduino.cli.settings.Value.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.cc.arduino.cli.settings.Value; - return proto.cc.arduino.cli.settings.Value.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.cc.arduino.cli.settings.Value} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.cc.arduino.cli.settings.Value} - */ -proto.cc.arduino.cli.settings.Value.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.setKey(value); - break; - case 2: - var value = /** @type {string} */ (reader.readString()); - msg.setJsondata(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.cc.arduino.cli.settings.Value.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.cc.arduino.cli.settings.Value.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.settings.Value} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.cc.arduino.cli.settings.Value.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getKey(); - if (f.length > 0) { - writer.writeString( - 1, - f - ); - } - f = message.getJsondata(); - if (f.length > 0) { - writer.writeString( - 2, - f - ); - } -}; - - -/** - * optional string key = 1; - * @return {string} - */ -proto.cc.arduino.cli.settings.Value.prototype.getKey = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** @param {string} value */ -proto.cc.arduino.cli.settings.Value.prototype.setKey = function(value) { - jspb.Message.setProto3StringField(this, 1, value); -}; - - -/** - * optional string jsonData = 2; - * @return {string} - */ -proto.cc.arduino.cli.settings.Value.prototype.getJsondata = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); -}; - - -/** @param {string} value */ -proto.cc.arduino.cli.settings.Value.prototype.setJsondata = function(value) { - jspb.Message.setProto3StringField(this, 2, value); -}; - - - -/** - * 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.settings.GetAllRequest = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.cc.arduino.cli.settings.GetAllRequest, jspb.Message); -if (goog.DEBUG && !COMPILED) { - proto.cc.arduino.cli.settings.GetAllRequest.displayName = 'proto.cc.arduino.cli.settings.GetAllRequest'; -} - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto suitable for use in Soy templates. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration - * @return {!Object} - */ -proto.cc.arduino.cli.settings.GetAllRequest.prototype.toObject = function(opt_includeInstance) { - return proto.cc.arduino.cli.settings.GetAllRequest.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.cc.arduino.cli.settings.GetAllRequest} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.cc.arduino.cli.settings.GetAllRequest.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.settings.GetAllRequest} - */ -proto.cc.arduino.cli.settings.GetAllRequest.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.cc.arduino.cli.settings.GetAllRequest; - return proto.cc.arduino.cli.settings.GetAllRequest.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.cc.arduino.cli.settings.GetAllRequest} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.cc.arduino.cli.settings.GetAllRequest} - */ -proto.cc.arduino.cli.settings.GetAllRequest.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.settings.GetAllRequest.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.cc.arduino.cli.settings.GetAllRequest.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.settings.GetAllRequest} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.cc.arduino.cli.settings.GetAllRequest.serializeBinaryToWriter = function(message, writer) { - var f = undefined; -}; - - - -/** - * 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.settings.GetValueRequest = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.cc.arduino.cli.settings.GetValueRequest, jspb.Message); -if (goog.DEBUG && !COMPILED) { - proto.cc.arduino.cli.settings.GetValueRequest.displayName = 'proto.cc.arduino.cli.settings.GetValueRequest'; -} - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto suitable for use in Soy templates. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration - * @return {!Object} - */ -proto.cc.arduino.cli.settings.GetValueRequest.prototype.toObject = function(opt_includeInstance) { - return proto.cc.arduino.cli.settings.GetValueRequest.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.cc.arduino.cli.settings.GetValueRequest} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.cc.arduino.cli.settings.GetValueRequest.toObject = function(includeInstance, msg) { - var f, obj = { - key: jspb.Message.getFieldWithDefault(msg, 1, "") - }; - - 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.settings.GetValueRequest} - */ -proto.cc.arduino.cli.settings.GetValueRequest.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.cc.arduino.cli.settings.GetValueRequest; - return proto.cc.arduino.cli.settings.GetValueRequest.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.cc.arduino.cli.settings.GetValueRequest} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.cc.arduino.cli.settings.GetValueRequest} - */ -proto.cc.arduino.cli.settings.GetValueRequest.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.setKey(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.cc.arduino.cli.settings.GetValueRequest.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.cc.arduino.cli.settings.GetValueRequest.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.settings.GetValueRequest} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.cc.arduino.cli.settings.GetValueRequest.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getKey(); - if (f.length > 0) { - writer.writeString( - 1, - f - ); - } -}; - - -/** - * optional string key = 1; - * @return {string} - */ -proto.cc.arduino.cli.settings.GetValueRequest.prototype.getKey = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** @param {string} value */ -proto.cc.arduino.cli.settings.GetValueRequest.prototype.setKey = function(value) { - jspb.Message.setProto3StringField(this, 1, value); -}; - - - -/** - * 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.settings.MergeResponse = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.cc.arduino.cli.settings.MergeResponse, jspb.Message); -if (goog.DEBUG && !COMPILED) { - proto.cc.arduino.cli.settings.MergeResponse.displayName = 'proto.cc.arduino.cli.settings.MergeResponse'; -} - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto suitable for use in Soy templates. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration - * @return {!Object} - */ -proto.cc.arduino.cli.settings.MergeResponse.prototype.toObject = function(opt_includeInstance) { - return proto.cc.arduino.cli.settings.MergeResponse.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.cc.arduino.cli.settings.MergeResponse} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.cc.arduino.cli.settings.MergeResponse.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.settings.MergeResponse} - */ -proto.cc.arduino.cli.settings.MergeResponse.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.cc.arduino.cli.settings.MergeResponse; - return proto.cc.arduino.cli.settings.MergeResponse.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.cc.arduino.cli.settings.MergeResponse} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.cc.arduino.cli.settings.MergeResponse} - */ -proto.cc.arduino.cli.settings.MergeResponse.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.settings.MergeResponse.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.cc.arduino.cli.settings.MergeResponse.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.settings.MergeResponse} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.cc.arduino.cli.settings.MergeResponse.serializeBinaryToWriter = function(message, writer) { - var f = undefined; -}; - - - -/** - * 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.settings.SetValueResponse = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.cc.arduino.cli.settings.SetValueResponse, jspb.Message); -if (goog.DEBUG && !COMPILED) { - proto.cc.arduino.cli.settings.SetValueResponse.displayName = 'proto.cc.arduino.cli.settings.SetValueResponse'; -} - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto suitable for use in Soy templates. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration - * @return {!Object} - */ -proto.cc.arduino.cli.settings.SetValueResponse.prototype.toObject = function(opt_includeInstance) { - return proto.cc.arduino.cli.settings.SetValueResponse.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.cc.arduino.cli.settings.SetValueResponse} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.cc.arduino.cli.settings.SetValueResponse.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.settings.SetValueResponse} - */ -proto.cc.arduino.cli.settings.SetValueResponse.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.cc.arduino.cli.settings.SetValueResponse; - return proto.cc.arduino.cli.settings.SetValueResponse.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.cc.arduino.cli.settings.SetValueResponse} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.cc.arduino.cli.settings.SetValueResponse} - */ -proto.cc.arduino.cli.settings.SetValueResponse.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.settings.SetValueResponse.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.cc.arduino.cli.settings.SetValueResponse.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.settings.SetValueResponse} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.cc.arduino.cli.settings.SetValueResponse.serializeBinaryToWriter = function(message, writer) { - var f = undefined; -}; - - -goog.object.extend(exports, proto.cc.arduino.cli.settings); diff --git a/arduino-ide-extension/src/node/config-file-validator.ts b/arduino-ide-extension/src/node/config-file-validator.ts new file mode 100644 index 00000000..5020c681 --- /dev/null +++ b/arduino-ide-extension/src/node/config-file-validator.ts @@ -0,0 +1,55 @@ +import * as Ajv from 'ajv'; +import * as fs from './fs-extra'; +import { injectable } from 'inversify'; +import { CLI_CONFIG_SCHEMA_PATH, DefaultCliConfig } from './cli-config'; + +@injectable() +export class ConfigFileValidator { + + protected readonly function = new Ajv().compile(JSON.parse(fs.readFileSync(CLI_CONFIG_SCHEMA_PATH, 'utf8'))); + + async validate(pathOrObject: string | object): Promise { + return this.doValidate(typeof pathOrObject === 'string' ? fs.readFileSync(pathOrObject) : pathOrObject); + } + + protected async doValidate(object: object): Promise { + const valid = this.function(object); + if (!valid) { + return false; + } + if (!DefaultCliConfig.is(object)) { + return false; + } + + const { directories: { data, downloads, user } } = object; + for (const path of [data, downloads, user]) { + const validPath = await this.isValidPath(path); + if (!validPath) { + return false; + } + } + + + const port = typeof object.daemon.port === 'string' ? Number.parseInt(object.daemon.port, 10) : object.daemon.port; + if (Number.isNaN(port) || port <= 0) { + return false; + } + return true; + } + + protected async isValidPath(path: string): Promise { + try { + if (!path.trim()) { + return false; + } + const exists = await fs.exists(path); + if (!exists) { + await fs.mkdirp(path); + } + return true; + } catch { + return false; + } + } + +} diff --git a/arduino-ide-extension/src/node/config-service-impl.ts b/arduino-ide-extension/src/node/config-service-impl.ts index 66a88008..a09b350e 100644 --- a/arduino-ide-extension/src/node/config-service-impl.ts +++ b/arduino-ide-extension/src/node/config-service-impl.ts @@ -1,49 +1,263 @@ -import * as fs from './fs-extra'; -import { injectable, inject, postConstruct } from 'inversify'; +import * as path from 'path'; +import * as yaml from 'js-yaml'; +import * as grpc from '@grpc/grpc-js'; +import * as deepmerge from 'deepmerge'; +import { injectable, inject, named } from 'inversify'; import URI from '@theia/core/lib/common/uri'; +import { ILogger } from '@theia/core/lib/common/logger'; import { FileUri } from '@theia/core/lib/node/file-uri'; +import { Event, Emitter } from '@theia/core/lib/common/event'; +import { BackendApplicationContribution } from '@theia/core/lib/node/backend-application'; +import { ConfigService, Config, ConfigServiceClient } from '../common/protocol'; +import * as fs from './fs-extra'; +import { spawnCommand } from './exec-util'; +import { RawData } from './cli-protocol/settings/settings_pb'; +import { SettingsClient } from './cli-protocol/settings/settings_grpc_pb'; +import { ConfigFileValidator } from './config-file-validator'; +import { ArduinoDaemonImpl } from './arduino-daemon-impl'; +import { DefaultCliConfig, CLI_CONFIG_SCHEMA_PATH, CLI_CONFIG } from './cli-config'; import { Deferred } from '@theia/core/lib/common/promise-util'; -import { ConfigService, Config } from '../common/protocol/config-service'; -import { ArduinoCli } from './arduino-cli'; +import { EnvVariablesServer } from '@theia/core/lib/common/env-variables'; + +const debounce = require('lodash.debounce'); @injectable() -export class ConfigServiceImpl implements ConfigService { +export class ConfigServiceImpl implements BackendApplicationContribution, ConfigService { - @inject(ArduinoCli) - protected readonly cli: ArduinoCli; - protected readonly config: Deferred = new Deferred(); + @inject(ILogger) + @named('config') + protected readonly logger: ILogger; - @postConstruct() - protected async init(): Promise { - try { - const config = await this.cli.getDefaultConfig(); - const { dataDirUri, sketchDirUri } = config; - for (const uri of [dataDirUri, sketchDirUri]) { - const path = FileUri.fsPath(uri); - if (!fs.existsSync(path)) { - await fs.mkdirp(path); - } + @inject(EnvVariablesServer) + protected readonly envVariablesServer: EnvVariablesServer; + + @inject(ConfigFileValidator) + protected readonly validator: ConfigFileValidator; + + @inject(ArduinoDaemonImpl) + protected readonly daemon: ArduinoDaemonImpl; + + protected updating = false; + protected config: Config; + protected cliConfig: DefaultCliConfig | undefined; + protected clients: Array = []; + protected ready = new Deferred(); + protected readonly configChangeEmitter = new Emitter(); + + async onStart(): Promise { + await this.ensureCliConfigExists(); + await this.watchCliConfig(); + this.cliConfig = await this.loadCliConfig(); + if (this.cliConfig) { + const config = await this.mapCliConfigToAppConfig(this.cliConfig); + if (config) { + this.config = config; + this.ready.resolve(); } - this.config.resolve(config); - } catch (err) { - this.config.reject(err); + } else { + this.fireInvalidConfig(); } } - getConfiguration(): Promise { - return this.config.promise; + async getCliConfigFileUri(): Promise { + const configDirUri = await this.envVariablesServer.getConfigDirUri(); + return new URI(configDirUri).resolve(CLI_CONFIG).toString(); } - getVersion(): Promise { - return this.cli.getVersion(); + async getConfigurationFileSchemaUri(): Promise { + return FileUri.create(CLI_CONFIG_SCHEMA_PATH).toString(); } - isInDataDir(uri: string): Promise { + async getConfiguration(): Promise { + await this.ready.promise; + return this.config; + } + + get cliConfiguration(): DefaultCliConfig | undefined { + return this.cliConfig; + } + + get onConfigChange(): Event { + return this.configChangeEmitter.event; + } + + async getVersion(): Promise { + return this.daemon.getVersion(); + } + + async isInDataDir(uri: string): Promise { return this.getConfiguration().then(({ dataDirUri }) => new URI(dataDirUri).isEqualOrParent(new URI(uri))); } - isInSketchDir(uri: string): Promise { + async isInSketchDir(uri: string): Promise { return this.getConfiguration().then(({ sketchDirUri }) => new URI(sketchDirUri).isEqualOrParent(new URI(uri))); } + setClient(client: ConfigServiceClient | undefined): void { + if (client) { + this.clients.push(client); + } + } + + dispose(): void { + this.clients.length = 0; + } + + disposeClient(client: ConfigServiceClient): void { + const index = this.clients.indexOf(client); + if (index === -1) { + this.logger.warn('Could not dispose client. It was not registered or was already disposed.'); + } else { + this.clients.splice(index, 1); + } + } + + protected async loadCliConfig(): Promise { + const cliConfigFileUri = await this.getCliConfigFileUri(); + const cliConfigPath = FileUri.fsPath(cliConfigFileUri); + try { + const content = await fs.readFile(cliConfigPath, { encoding: 'utf8' }); + const model = yaml.safeLoad(content) || {}; + // The CLI can run with partial (missing `port`, `directories`), the app cannot, we merge the default with the user's config. + const fallbackModel = await this.getFallbackCliConfig(); + return deepmerge(fallbackModel, model) as DefaultCliConfig; + } catch (error) { + this.logger.error(`Error occurred when loading CLI config from ${cliConfigPath}.`, error); + } + return undefined; + } + + protected async getFallbackCliConfig(): Promise { + const cliPath = await this.daemon.getExecPath(); + const rawYaml = await spawnCommand(`"${cliPath}"`, ['config', 'dump']); + const model = yaml.safeLoad(rawYaml.trim()); + return model as DefaultCliConfig; + } + + protected async ensureCliConfigExists(): Promise { + const cliConfigFileUri = await this.getCliConfigFileUri(); + const cliConfigPath = FileUri.fsPath(cliConfigFileUri); + let exists = await fs.exists(cliConfigPath); + if (!exists) { + await this.initCliConfigTo(path.dirname(cliConfigPath)); + exists = await fs.exists(cliConfigPath); + if (!exists) { + throw new Error(`Could not initialize the default CLI configuration file at ${cliConfigPath}.`); + } + } + } + + protected async initCliConfigTo(fsPathToDir: string): Promise { + const cliPath = await this.daemon.getExecPath(); + await spawnCommand(`"${cliPath}"`, ['config', 'init', '--dest-dir', `"${fsPathToDir}"`]); + } + + protected async mapCliConfigToAppConfig(cliConfig: DefaultCliConfig): Promise { + const { directories } = cliConfig; + const { data, user, downloads } = directories; + const additionalUrls: Array = []; + if (cliConfig.board_manager && cliConfig.board_manager.additional_urls) { + additionalUrls.push(...Array.from(new Set(cliConfig.board_manager.additional_urls))); + } + return { + dataDirUri: FileUri.create(data).toString(), + sketchDirUri: FileUri.create(user).toString(), + downloadsDirUri: FileUri.create(downloads).toString(), + additionalUrls, + }; + } + + protected async watchCliConfig(): Promise { + const configDirUri = await this.getCliConfigFileUri(); + const cliConfigPath = FileUri.fsPath(configDirUri); + const listener = debounce(async () => { + if (this.updating) { + return; + } else { + this.updating = true; + } + + const cliConfig = await this.loadCliConfig(); + // Could not parse the YAML content. + if (!cliConfig) { + this.updating = false; + this.fireInvalidConfig(); + return; + } + const valid = await this.validator.validate(cliConfig); + if (!valid) { + this.updating = false; + this.fireInvalidConfig(); + return; + } + const shouldUpdate = !this.cliConfig || !DefaultCliConfig.sameAs(this.cliConfig, cliConfig); + if (!shouldUpdate) { + this.fireConfigChanged(this.config); + this.updating = false; + return; + } + // We use the gRPC `Settings` API iff the `daemon.port` has not changed. + // Otherwise, we restart the daemon. + const canUpdateSettings = this.cliConfig && this.cliConfig.daemon.port === cliConfig.daemon.port; + try { + const config = await this.mapCliConfigToAppConfig(cliConfig); + const update = new Promise(resolve => { + if (canUpdateSettings) { + return this.updateDaemon(cliConfig.daemon.port, cliConfig).then(resolve); + } + return this.daemon.stopDaemon() + .then(() => this.daemon.startDaemon()) + .then(resolve); + }) + update.then(() => { + this.cliConfig = cliConfig; + this.config = config; + this.configChangeEmitter.fire(this.config); + for (const client of this.clients) { + client.notifyConfigChanged(this.config); + } + }).finally(() => this.updating = false); + } catch (err) { + this.logger.error('Failed to update the daemon with the current CLI configuration.', err); + } + }, 200); + fs.watchFile(cliConfigPath, listener); + this.logger.info(`Started watching the Arduino CLI configuration: '${cliConfigPath}'.`); + } + + protected fireConfigChanged(config: Config): void { + for (const client of this.clients) { + client.notifyConfigChanged(config); + } + } + + protected fireInvalidConfig(): void { + for (const client of this.clients) { + client.notifyInvalidConfig(); + } + } + + protected async unwatchCliConfig(): Promise { + const cliConfigFileUri = await this.getCliConfigFileUri(); + const cliConfigPath = FileUri.fsPath(cliConfigFileUri); + fs.unwatchFile(cliConfigPath); + this.logger.info(`Stopped watching the Arduino CLI configuration: '${cliConfigPath}'.`); + } + + protected async updateDaemon(port: string | number, config: DefaultCliConfig): Promise { + const client = new SettingsClient(`localhost:${port}`, grpc.credentials.createInsecure()); + const data = new RawData(); + data.setJsondata(JSON.stringify(config, null, 2)); + return new Promise((resolve, reject) => { + client.merge(data, error => { + if (error) { + reject(error); + return; + } + client.close(); + resolve(); + }) + }); + } + } diff --git a/arduino-ide-extension/src/node/core-client-provider-impl.ts b/arduino-ide-extension/src/node/core-client-provider-impl.ts deleted file mode 100644 index a56ec2b7..00000000 --- a/arduino-ide-extension/src/node/core-client-provider-impl.ts +++ /dev/null @@ -1,230 +0,0 @@ -import * as fs from 'fs'; -import * as path from 'path'; -import * as grpc from '@grpc/grpc-js'; -import * as PQueue from 'p-queue'; -import { inject, injectable } from 'inversify'; -import URI from '@theia/core/lib/common/uri'; -import { FileSystem } from '@theia/filesystem/lib/common'; -import { WorkspaceServiceExt } from '../browser/workspace-service-ext'; -import { ToolOutputServiceServer } from '../common/protocol/tool-output-service'; -import { ArduinoCoreClient } from './cli-protocol/commands/commands_grpc_pb'; -import { - InitResp, - InitReq, - UpdateIndexReq, - UpdateIndexResp, - UpdateLibrariesIndexReq, - UpdateLibrariesIndexResp -} from './cli-protocol/commands/commands_pb'; -import { ArduinoCli } from './arduino-cli'; -import { Instance } from './cli-protocol/commands/common_pb'; -import { CoreClientProvider, Client } from './core-client-provider'; -import { FileUri } from '@theia/core/lib/node'; - -@injectable() -export class CoreClientProviderImpl implements CoreClientProvider { - - protected clients = new Map(); - protected readonly clientRequestQueue = new PQueue({ autoStart: true, concurrency: 1 }); - - @inject(FileSystem) - protected readonly fileSystem: FileSystem; - - @inject(WorkspaceServiceExt) - protected readonly workspaceServiceExt: WorkspaceServiceExt; - - @inject(ToolOutputServiceServer) - protected readonly toolOutputService: ToolOutputServiceServer; - - @inject(ArduinoCli) - protected readonly cli: ArduinoCli; - - async getClient(workspaceRootOrResourceUri?: string): Promise { - return this.clientRequestQueue.add(() => new Promise(async resolve => { - let roots = undefined; - try { - roots = await this.workspaceServiceExt.roots(); - } catch (e) { - if (e instanceof Error && e.message === 'Connection got disposed.') { - console.info('The frontend has already disconnected.'); - // Ignore it for now: https://github.com/eclipse-theia/theia/issues/6499 - // Client has disconnected, and the server still runs the serial board poll. - // The poll requires the client's workspace roots, but the client has disconnected :/ - } else { - throw e; - } - } - if (!roots) { - resolve(undefined); - return - } - - if (!workspaceRootOrResourceUri) { - resolve(this.getOrCreateClient(roots[0])); - return; - } - const root = roots - .sort((left, right) => right.length - left.length) // Longest "paths" first - .map(uri => new URI(uri)) - .find(uri => uri.isEqualOrParent(new URI(workspaceRootOrResourceUri))); - if (!root) { - console.warn(`Could not retrieve the container workspace root for URI: ${workspaceRootOrResourceUri}.`); - console.warn(`Falling back to ${roots[0]}`); - resolve(this.getOrCreateClient(roots[0])); - return; - } - resolve(this.getOrCreateClient(root.toString())); - })); - } - - protected async getOrCreateClient(rootUri: string | undefined): Promise { - if (!rootUri) { - return undefined; - } - const existing = this.clients.get(rootUri); - if (existing) { - console.debug(`Reusing existing client for ${rootUri}.`); - return existing; - } - - console.info(` >>> Creating and caching a new client for ${rootUri}...`); - const client = new ArduinoCoreClient('localhost:50051', grpc.credentials.createInsecure()); - - const rootPath = await this.fileSystem.getFsPath(rootUri); - if (!rootPath) { - throw new Error(`Could not resolve filesystem path of URI: ${rootUri}.`); - } - - const { dataDirUri, sketchDirUri } = await this.cli.getDefaultConfig(); - const dataDirPath = FileUri.fsPath(dataDirUri); - const sketchDirPath = FileUri.fsPath(sketchDirUri); - - if (!fs.existsSync(dataDirPath)) { - fs.mkdirSync(dataDirPath); - } - - if (!fs.existsSync(sketchDirPath)) { - fs.mkdirSync(sketchDirPath); - } - - const downloadDir = path.join(dataDirPath, 'staging'); - if (!fs.existsSync(downloadDir)) { - fs.mkdirSync(downloadDir); - } - - const initReq = new InitReq(); - initReq.setLibraryManagerOnly(false); - const initResp = await new Promise(resolve => { - let resp: InitResp | undefined = undefined; - const stream = client.init(initReq); - stream.on('data', (data: InitResp) => resp = data); - stream.on('end', () => resolve(resp)); - }); - - const instance = initResp.getInstance(); - if (!instance) { - throw new Error(`Could not retrieve instance from the initialize response.`); - } - - // in a separate promise, try and update the index - let indexUpdateSucceeded = true; - for (let i = 0; i < 10; i++) { - try { - await this.updateIndex(client, instance); - indexUpdateSucceeded = true; - break; - } catch (e) { - this.toolOutputService.publishNewOutput("daemon", `Error while updating index in attempt ${i}: ${e}`); - } - } - if (!indexUpdateSucceeded) { - this.toolOutputService.publishNewOutput("daemon", `Was unable to update the index. Please restart to try again.`); - } - - let libIndexUpdateSucceeded = true; - for (let i = 0; i < 10; i++) { - try { - await this.updateLibraryIndex(client, instance); - libIndexUpdateSucceeded = true; - break; - } catch (e) { - this.toolOutputService.publishNewOutput("daemon", `Error while updating library index in attempt ${i}: ${e}`); - } - } - if (!libIndexUpdateSucceeded) { - this.toolOutputService.publishNewOutput("daemon", `Was unable to update the library index. Please restart to try again.`); - } - - const result = { - client, - instance - } - this.clients.set(rootUri, result); - console.info(` <<< New client has been successfully created and cached for ${rootUri}.`); - return result; - } - - protected async updateLibraryIndex(client: ArduinoCoreClient, instance: Instance): Promise { - const req = new UpdateLibrariesIndexReq(); - req.setInstance(instance); - const resp = client.updateLibrariesIndex(req); - let file: string | undefined; - resp.on('data', (data: UpdateLibrariesIndexResp) => { - const progress = data.getDownloadProgress(); - if (progress) { - if (!file && progress.getFile()) { - file = `${progress.getFile()}`; - } - if (progress.getCompleted()) { - if (file) { - if (/\s/.test(file)) { - this.toolOutputService.publishNewOutput("daemon", `${file} completed.\n`); - } else { - this.toolOutputService.publishNewOutput("daemon", `Download of '${file}' completed.\n'`); - } - } else { - this.toolOutputService.publishNewOutput("daemon", `The library index has been successfully updated.\n'`); - } - file = undefined; - } - } - }); - await new Promise((resolve, reject) => { - resp.on('error', reject); - resp.on('end', resolve); - }); - } - - - protected async updateIndex(client: ArduinoCoreClient, instance: Instance): Promise { - const updateReq = new UpdateIndexReq(); - updateReq.setInstance(instance); - const updateResp = client.updateIndex(updateReq); - let file: string | undefined; - updateResp.on('data', (o: UpdateIndexResp) => { - const progress = o.getDownloadProgress(); - if (progress) { - if (!file && progress.getFile()) { - file = `${progress.getFile()}`; - } - if (progress.getCompleted()) { - if (file) { - if (/\s/.test(file)) { - this.toolOutputService.publishNewOutput("daemon", `${file} completed.\n`); - } else { - this.toolOutputService.publishNewOutput("daemon", `Download of '${file}' completed.\n'`); - } - } else { - this.toolOutputService.publishNewOutput("daemon", `The index has been successfully updated.\n'`); - } - file = undefined; - } - } - }); - await new Promise((resolve, reject) => { - updateResp.on('error', reject); - updateResp.on('end', resolve); - }); - } - -} diff --git a/arduino-ide-extension/src/node/core-client-provider.ts b/arduino-ide-extension/src/node/core-client-provider.ts index 32ac5be0..fec738c7 100644 --- a/arduino-ide-extension/src/node/core-client-provider.ts +++ b/arduino-ide-extension/src/node/core-client-provider.ts @@ -1,13 +1,164 @@ -import { Instance } from './cli-protocol/commands/common_pb'; +import * as grpc from '@grpc/grpc-js'; +import { inject, injectable } from 'inversify'; +import { ToolOutputServiceServer } from '../common/protocol'; +import { GrpcClientProvider } from './grpc-client-provider'; import { ArduinoCoreClient } from './cli-protocol/commands/commands_grpc_pb'; +import { Instance } from './cli-protocol/commands/common_pb'; +import { InitReq, InitResp, UpdateIndexReq, UpdateIndexResp, UpdateLibrariesIndexResp, UpdateLibrariesIndexReq } from './cli-protocol/commands/commands_pb'; +import { Event, Emitter } from '@theia/core/lib/common/event'; + +@injectable() +export class CoreClientProvider extends GrpcClientProvider { + + @inject(ToolOutputServiceServer) + protected readonly toolOutputService: ToolOutputServiceServer; + + protected readonly onIndexUpdatedEmitter = new Emitter(); + + get onIndexUpdated(): Event { + return this.onIndexUpdatedEmitter.event; + } + + close(client: CoreClientProvider.Client): void { + client.client.close(); + } + + protected async reconcileClient(port: string | undefined): Promise { + if (port && port === this._port) { + // No need to create a new gRPC client, but we have to update the indexes. + if (this._client) { + this.updateIndexes(this._client); + } + } else { + return super.reconcileClient(port); + } + } + + protected async createClient(port: string | number): Promise { + const client = new ArduinoCoreClient(`localhost:${port}`, grpc.credentials.createInsecure()); + const initReq = new InitReq(); + initReq.setLibraryManagerOnly(false); + const initResp = await new Promise(resolve => { + let resp: InitResp | undefined = undefined; + const stream = client.init(initReq); + stream.on('data', (data: InitResp) => resp = data); + stream.on('end', () => resolve(resp)); + stream.on('error', err => { + console.log('init error', err) + }); + }); + + const instance = initResp.getInstance(); + if (!instance) { + throw new Error(`Could not retrieve instance from the initialize response.`); + } + + await this.updateIndexes({ instance, client }); + + return { instance, client }; + } + + protected async updateIndexes({ client, instance }: CoreClientProvider.Client): Promise { + // in a separate promise, try and update the index + let indexUpdateSucceeded = true; + for (let i = 0; i < 10; i++) { + try { + await this.updateIndex({ client, instance }); + indexUpdateSucceeded = true; + break; + } catch (e) { + this.toolOutputService.publishNewOutput("daemon", `Error while updating index in attempt ${i}: ${e}`); + } + } + if (!indexUpdateSucceeded) { + this.toolOutputService.publishNewOutput("daemon", `Was unable to update the index. Please restart to try again.`); + } + + let libIndexUpdateSucceeded = true; + for (let i = 0; i < 10; i++) { + try { + await this.updateLibraryIndex({ client, instance }); + libIndexUpdateSucceeded = true; + break; + } catch (e) { + this.toolOutputService.publishNewOutput("daemon", `Error while updating library index in attempt ${i}: ${e}`); + } + } + if (!libIndexUpdateSucceeded) { + this.toolOutputService.publishNewOutput("daemon", `Was unable to update the library index. Please restart to try again.`); + } + + if (indexUpdateSucceeded && libIndexUpdateSucceeded) { + this.onIndexUpdatedEmitter.fire(); + } + } + + protected async updateLibraryIndex({ client, instance }: CoreClientProvider.Client): Promise { + const req = new UpdateLibrariesIndexReq(); + req.setInstance(instance); + const resp = client.updateLibrariesIndex(req); + let file: string | undefined; + resp.on('data', (data: UpdateLibrariesIndexResp) => { + const progress = data.getDownloadProgress(); + if (progress) { + if (!file && progress.getFile()) { + file = `${progress.getFile()}`; + } + if (progress.getCompleted()) { + if (file) { + if (/\s/.test(file)) { + this.toolOutputService.publishNewOutput("daemon", `${file} completed.\n`); + } else { + this.toolOutputService.publishNewOutput("daemon", `Download of '${file}' completed.\n'`); + } + } else { + this.toolOutputService.publishNewOutput("daemon", `The library index has been successfully updated.\n'`); + } + file = undefined; + } + } + }); + await new Promise((resolve, reject) => { + resp.on('error', reject); + resp.on('end', resolve); + }); + } + + protected async updateIndex({ client, instance }: CoreClientProvider.Client): Promise { + const updateReq = new UpdateIndexReq(); + updateReq.setInstance(instance); + const updateResp = client.updateIndex(updateReq); + let file: string | undefined; + updateResp.on('data', (o: UpdateIndexResp) => { + const progress = o.getDownloadProgress(); + if (progress) { + if (!file && progress.getFile()) { + file = `${progress.getFile()}`; + } + if (progress.getCompleted()) { + if (file) { + if (/\s/.test(file)) { + this.toolOutputService.publishNewOutput("daemon", `${file} completed.\n`); + } else { + this.toolOutputService.publishNewOutput("daemon", `Download of '${file}' completed.\n'`); + } + } else { + this.toolOutputService.publishNewOutput("daemon", `The index has been successfully updated.\n'`); + } + file = undefined; + } + } + }); + await new Promise((resolve, reject) => { + updateResp.on('error', reject); + updateResp.on('end', resolve); + }); + } -export const CoreClientProviderPath = '/services/core-client-provider'; -export const CoreClientProvider = Symbol('CoreClientProvider'); -export interface CoreClientProvider { - getClient(workspaceRootOrResourceUri?: string): Promise; } - -export interface Client { - readonly client: ArduinoCoreClient; - readonly instance: Instance; -} \ No newline at end of file +export namespace CoreClientProvider { + export interface Client { + readonly client: ArduinoCoreClient; + readonly instance: Instance; + } +} diff --git a/arduino-ide-extension/src/node/core-service-impl.ts b/arduino-ide-extension/src/node/core-service-impl.ts index 24862806..3ae9eca5 100644 --- a/arduino-ide-extension/src/node/core-service-impl.ts +++ b/arduino-ide-extension/src/node/core-service-impl.ts @@ -1,6 +1,6 @@ -import { inject, injectable } from 'inversify'; +import { inject, injectable, postConstruct } from 'inversify'; import { FileSystem } from '@theia/filesystem/lib/common/filesystem'; -import { CoreService } from '../common/protocol/core-service'; +import { CoreService, CoreServiceClient } from '../common/protocol/core-service'; import { CompileReq, CompileResp } from './cli-protocol/commands/compile_pb'; import { BoardsService } from '../common/protocol/boards-service'; import { CoreClientProvider } from './core-client-provider'; @@ -23,6 +23,17 @@ export class CoreServiceImpl implements CoreService { @inject(ToolOutputServiceServer) protected readonly toolOutputService: ToolOutputServiceServer; + protected client: CoreServiceClient | undefined; + + @postConstruct() + protected init(): void { + this.coreClientProvider.onIndexUpdated(() => { + if (this.client) { + this.client.notifyIndexUpdated(); + } + }) + } + async compile(options: CoreService.Compile.Options): Promise { console.log('compile', options); const { uri } = options; @@ -32,7 +43,7 @@ export class CoreServiceImpl implements CoreService { } const sketchpath = path.dirname(sketchFilePath); - const coreClient = await this.coreClientProvider.getClient(uri); + const coreClient = await this.coreClientProvider.client(); if (!coreClient) { return; } @@ -91,7 +102,7 @@ export class CoreServiceImpl implements CoreService { throw new Error(`selected board (${currentBoard.name}) has no FQBN`); } - const coreClient = await this.coreClientProvider.getClient(uri); + const coreClient = await this.coreClientProvider.client(); if (!coreClient) { return; } @@ -120,4 +131,12 @@ export class CoreServiceImpl implements CoreService { } } + setClient(client: CoreServiceClient | undefined): void { + this.client = client; + } + + dispose(): void { + this.client = undefined; + } + } diff --git a/arduino-ide-extension/src/node/daemon-log.ts b/arduino-ide-extension/src/node/daemon-log.ts index 872058a6..affb780c 100644 --- a/arduino-ide-extension/src/node/daemon-log.ts +++ b/arduino-ide-extension/src/node/daemon-log.ts @@ -132,4 +132,4 @@ export namespace DaemonLog { return `${key.toLowerCase()}: ${value}`; } -} \ No newline at end of file +} diff --git a/arduino-ide-extension/src/node/exec-util.ts b/arduino-ide-extension/src/node/exec-util.ts index 6c1368fe..2c718530 100644 --- a/arduino-ide-extension/src/node/exec-util.ts +++ b/arduino-ide-extension/src/node/exec-util.ts @@ -1,11 +1,10 @@ import * as os from 'os'; import * as which from 'which'; import * as semver from 'semver'; -import { spawn } from 'child_process'; import { join } from 'path'; -import { ILogger } from '@theia/core'; +import { spawn } from 'child_process'; -export async function getExecPath(commandName: string, logger: ILogger, versionArg?: string, inBinDir?: boolean): Promise { +export async function getExecPath(commandName: string, onError: (error: Error) => void = (error) => console.log(error), versionArg?: string, inBinDir?: boolean): Promise { const execName = `${commandName}${os.platform() === 'win32' ? '.exe' : ''}`; const relativePath = ['..', '..', 'build']; if (inBinDir) { @@ -16,13 +15,13 @@ export async function getExecPath(commandName: string, logger: ILogger, versionA return buildCommand; } const versionRegexp = /\d+\.\d+\.\d+/; - const buildVersion = await spawnCommand(`"${buildCommand}"`, [versionArg], logger); + const buildVersion = await spawnCommand(`"${buildCommand}"`, [versionArg], onError); const buildShortVersion = (buildVersion.match(versionRegexp) || [])[0]; const pathCommand = await new Promise(resolve => which(execName, (error, path) => resolve(error ? undefined : path))); if (!pathCommand) { return buildCommand; } - const pathVersion = await spawnCommand(`"${pathCommand}"`, [versionArg], logger); + const pathVersion = await spawnCommand(`"${pathCommand}"`, [versionArg], onError); const pathShortVersion = (pathVersion.match(versionRegexp) || [])[0]; if (semver.gt(pathShortVersion, buildShortVersion)) { return pathCommand; @@ -30,7 +29,7 @@ export async function getExecPath(commandName: string, logger: ILogger, versionA return buildCommand; } -export function spawnCommand(command: string, args: string[], logger?: ILogger): Promise { +export function spawnCommand(command: string, args: string[], onError: (error: Error) => void = (error) => console.log(error)): Promise { return new Promise((resolve, reject) => { const cp = spawn(command, args, { windowsHide: true, shell: true }); const outBuffers: Buffer[] = []; @@ -38,9 +37,7 @@ export function spawnCommand(command: string, args: string[], logger?: ILogger): cp.stdout.on('data', (b: Buffer) => outBuffers.push(b)); cp.stderr.on('data', (b: Buffer) => errBuffers.push(b)); cp.on('error', error => { - if (logger) { - logger.error(`Error executing ${command} ${args.join(' ')}`, error); - } + onError(error); reject(error); }); cp.on('exit', (code, signal) => { @@ -51,24 +48,21 @@ export function spawnCommand(command: string, args: string[], logger?: ILogger): } if (errBuffers.length > 0) { const message = Buffer.concat(errBuffers).toString('utf8').trim(); - if (logger) { - logger.error(`Error executing ${command} ${args.join(' ')}: ${message}`); - } - reject(new Error(`Process failed with error: ${message}`)); + const error = new Error(`Error executing ${command} ${args.join(' ')}: ${message}`); + onError(error) + reject(error); return; } if (signal) { - if (logger) { - logger.error(`Unexpected signal '${signal}' when executing ${command} ${args.join(' ')}`); - } - reject(new Error(`Process exited with signal: ${signal}`)); + const error = new Error(`Process exited with signal: ${signal}`); + onError(error); + reject(error); return; } if (code) { - if (logger) { - logger.error(`Unexpected exit code '${code}' when executing ${command} ${args.join(' ')}`); - } - reject(new Error(`Process exited with exit code: ${code}`)); + const error = new Error(`Process exited with exit code: ${code}`); + onError(error); + reject(error); return; } }); diff --git a/arduino-ide-extension/src/node/fs-extra.ts b/arduino-ide-extension/src/node/fs-extra.ts index 690602df..187fec59 100644 --- a/arduino-ide-extension/src/node/fs-extra.ts +++ b/arduino-ide-extension/src/node/fs-extra.ts @@ -6,12 +6,17 @@ export const lstatSync = fs.lstatSync; export const readdirSync = fs.readdirSync; export const statSync = fs.statSync; export const writeFileSync = fs.writeFileSync; +export const readFileSync = fs.readFileSync; export const exists = promisify(fs.exists); export const lstat = promisify(fs.lstat); export const readdir = promisify(fs.readdir); export const stat = promisify(fs.stat); export const writeFile = promisify(fs.writeFile); +export const readFile = promisify(fs.readFile); + +export const watchFile = fs.watchFile; +export const unwatchFile = fs.unwatchFile; export function mkdirp(path: string, timeout: number = 3000): Promise { return new Promise((resolve, reject) => { diff --git a/arduino-ide-extension/src/node/grpc-client-provider.ts b/arduino-ide-extension/src/node/grpc-client-provider.ts new file mode 100644 index 00000000..aaa5c566 --- /dev/null +++ b/arduino-ide-extension/src/node/grpc-client-provider.ts @@ -0,0 +1,71 @@ +import { inject, injectable, postConstruct } from 'inversify'; +import { ILogger } from '@theia/core/lib/common/logger'; +import { MaybePromise } from '@theia/core/lib/common/types'; +import { ConfigServiceImpl } from './config-service-impl'; +import { ArduinoDaemonImpl } from './arduino-daemon-impl'; + +@injectable() +export abstract class GrpcClientProvider { + + @inject(ILogger) + protected readonly logger: ILogger; + + @inject(ArduinoDaemonImpl) + protected readonly daemon: ArduinoDaemonImpl; + + @inject(ConfigServiceImpl) + protected readonly configService: ConfigServiceImpl; + + protected _port: string | number | undefined; + protected _client: C | undefined; + + @postConstruct() + protected init(): void { + const updateClient = () => { + const cliConfig = this.configService.cliConfiguration; + this.reconcileClient(cliConfig ? cliConfig.daemon.port : undefined); + } + this.configService.onConfigChange(updateClient); + this.daemon.ready.then(updateClient); + this.daemon.onDaemonStopped(() => { + if (this._client) { + this.close(this._client); + } + this._client = undefined; + this._port = undefined; + }) + } + + async client(): Promise { + try { + await this.daemon.ready; + return this._client; + } catch (error) { + return undefined; + } + } + + protected async reconcileClient(port: string | number | undefined): Promise { + if (this._port === port) { + return; // Nothing to do. + } + this._port = port; + if (this._client) { + this.close(this._client); + this._client = undefined; + } + if (this._port) { + try { + const client = await this.createClient(this._port); + this._client = client; + } catch (error) { + this.logger.error('Could create client for gRPC.', error) + } + } + } + + protected abstract createClient(port: string | number): MaybePromise; + + protected abstract close(client: C): void; + +} diff --git a/arduino-ide-extension/src/node/language/arduino-language-server-contribution.ts b/arduino-ide-extension/src/node/language/arduino-language-server-contribution.ts index d3db36e7..8377acf9 100644 --- a/arduino-ide-extension/src/node/language/arduino-language-server-contribution.ts +++ b/arduino-ide-extension/src/node/language/arduino-language-server-contribution.ts @@ -27,9 +27,11 @@ export class ArduinoLanguageServerContribution extends BaseLanguageServerContrib protected logger: ILogger; async start(clientConnection: IConnection, options: LanguageServerStartOptions): Promise { - const languageServer = await getExecPath('arduino-language-server', this.logger); - const clangd = await getExecPath('clangd', this.logger, '--version', os.platform() !== 'win32'); - const cli = await getExecPath('arduino-cli', this.logger, 'version'); + const [languageServer, clangd, cli] = await Promise.all([ + getExecPath('arduino-language-server', this.onError.bind(this)), + getExecPath('clangd', this.onError.bind(this), '--version', os.platform() !== 'win32'), + getExecPath('arduino-cli', this.onError.bind(this), 'version') + ]); // Add '-log' argument to enable logging to files const args: string[] = ['-clangd', clangd, '-cli', cli]; if (options.parameters && options.parameters.selectedBoard) { @@ -46,4 +48,8 @@ export class ArduinoLanguageServerContribution extends BaseLanguageServerContrib this.forward(clientConnection, serverConnection); } + protected onError(error: Error): void { + this.logger.error(error); + } + } diff --git a/arduino-ide-extension/src/node/library-service-impl.ts b/arduino-ide-extension/src/node/library-service-impl.ts index 0d5f8065..24afa302 100644 --- a/arduino-ide-extension/src/node/library-service-impl.ts +++ b/arduino-ide-extension/src/node/library-service-impl.ts @@ -26,7 +26,7 @@ export class LibraryServiceImpl implements LibraryService { protected readonly toolOutputService: ToolOutputServiceServer; async search(options: { query?: string }): Promise<{ items: Library[] }> { - const coreClient = await this.coreClientProvider.getClient(); + const coreClient = await this.coreClientProvider.client(); if (!coreClient) { return { items: [] }; } @@ -74,7 +74,7 @@ export class LibraryServiceImpl implements LibraryService { async install(options: { item: Library, version?: Installable.Version }): Promise { const library = options.item; const version = !!options.version ? options.version : library.availableVersions[0]; - const coreClient = await this.coreClientProvider.getClient(); + const coreClient = await this.coreClientProvider.client(); if (!coreClient) { return; } @@ -100,7 +100,7 @@ export class LibraryServiceImpl implements LibraryService { async uninstall(options: { item: Library }): Promise { const library = options.item; - const coreClient = await this.coreClientProvider.getClient(); + const coreClient = await this.coreClientProvider.client(); if (!coreClient) { return; } diff --git a/arduino-ide-extension/src/node/monitor/monitor-client-provider.ts b/arduino-ide-extension/src/node/monitor/monitor-client-provider.ts index 609f0df9..dc35a2ae 100644 --- a/arduino-ide-extension/src/node/monitor/monitor-client-provider.ts +++ b/arduino-ide-extension/src/node/monitor/monitor-client-provider.ts @@ -1,20 +1,17 @@ import * as grpc from '@grpc/grpc-js'; -import { injectable, postConstruct } from 'inversify'; -import { Deferred } from '@theia/core/lib/common/promise-util'; +import { injectable } from 'inversify'; import { MonitorClient } from '../cli-protocol/monitor/monitor_grpc_pb'; +import { GrpcClientProvider } from '../grpc-client-provider'; @injectable() -export class MonitorClientProvider { +export class MonitorClientProvider extends GrpcClientProvider { - readonly deferred = new Deferred(); - - @postConstruct() - protected init(): void { - this.deferred.resolve(new MonitorClient('localhost:50051', grpc.credentials.createInsecure())); + createClient(port: string | number): MonitorClient { + return new MonitorClient(`localhost:${port}`, grpc.credentials.createInsecure()); } - get client(): Promise { - return this.deferred.promise; + close(client: MonitorClient): void { + client.close(); } } diff --git a/arduino-ide-extension/src/node/monitor/monitor-service-impl.ts b/arduino-ide-extension/src/node/monitor/monitor-service-impl.ts index dd1aaca0..659040fb 100644 --- a/arduino-ide-extension/src/node/monitor/monitor-service-impl.ts +++ b/arduino-ide-extension/src/node/monitor/monitor-service-impl.ts @@ -65,7 +65,10 @@ export class MonitorServiceImpl implements MonitorService { if (this.connection) { return Status.ALREADY_CONNECTED; } - const client = await this.monitorClientProvider.client; + const client = await this.monitorClientProvider.client(); + if (!client) { + return Status.NOT_CONNECTED; + } const duplex = client.streamingOpen(); this.connection = { duplex, config }; diff --git a/arduino-ide-extension/src/test/node/arduino-daemon-impl.test.ts b/arduino-ide-extension/src/test/node/arduino-daemon-impl.test.ts new file mode 100644 index 00000000..344b5a6d --- /dev/null +++ b/arduino-ide-extension/src/test/node/arduino-daemon-impl.test.ts @@ -0,0 +1,134 @@ +import * as fs from 'fs'; +import * as net from 'net'; +import * as path from 'path'; +import * as temp from 'temp'; +import { fail } from 'assert'; +import { expect } from 'chai' +import { ChildProcess } from 'child_process'; +import { safeLoad, safeDump } from 'js-yaml'; +import { DaemonError, ArduinoDaemonImpl } from '../../node/arduino-daemon-impl'; +import { spawnCommand } from '../../node/exec-util'; +import { CLI_CONFIG } from '../../node/cli-config'; + +const track = temp.track(); + +class SilentArduinoDaemonImpl extends ArduinoDaemonImpl { + + constructor(private port: string | number, private logFormat: 'text' | 'json') { + super(); + } + + onData(data: string): void { + // NOOP + } + + async spawnDaemonProcess(): Promise { + return super.spawnDaemonProcess(); + } + + protected async getSpawnArgs(): Promise { + const cliConfigPath = await this.initCliConfig(); + return ['daemon', '--config-file', cliConfigPath, '-v', '--log-format', this.logFormat]; + } + + private async initCliConfig(): Promise { + const cliPath = await this.getExecPath(); + const destDir = track.mkdirSync(); + await spawnCommand(`"${cliPath}"`, ['config', 'init', '--dest-dir', destDir]); + const content = fs.readFileSync(path.join(destDir, CLI_CONFIG), { encoding: 'utf8' }); + const cliConfig = safeLoad(content); + cliConfig.daemon.port = String(this.port); + const modifiedContent = safeDump(cliConfig); + fs.writeFileSync(path.join(destDir, CLI_CONFIG), modifiedContent, { encoding: 'utf8' }); + return path.join(destDir, CLI_CONFIG); + } + +} + +describe('arduino-daemon-impl', () => { + + after(() => { + track.cleanupSync(); + }) + + it('should parse an error - address already in use error [json]', async () => { + let server: net.Server | undefined = undefined; + try { + server = await new Promise(resolve => { + const server = net.createServer(); + server.listen(() => resolve(server)); + }); + const address = server.address() as net.AddressInfo; + await new SilentArduinoDaemonImpl(address.port, 'json').spawnDaemonProcess(); + fail('Expected a failure.') + } catch (e) { + expect(e).to.be.instanceOf(DaemonError); + expect(e.code).to.be.equal(DaemonError.ADDRESS_IN_USE); + } finally { + if (server) { + server.close(); + } + } + }); + + it('should parse an error - address already in use error [text]', async () => { + let server: net.Server | undefined = undefined; + try { + server = await new Promise(resolve => { + const server = net.createServer(); + server.listen(() => resolve(server)); + }); + const address = server.address() as net.AddressInfo; + await new SilentArduinoDaemonImpl(address.port, 'text').spawnDaemonProcess(); + fail('Expected a failure.') + } catch (e) { + expect(e).to.be.instanceOf(DaemonError); + expect(e.code).to.be.equal(DaemonError.ADDRESS_IN_USE); + } finally { + if (server) { + server.close(); + } + } + }); + + it('should parse an error - unknown address [json]', async () => { + try { + await new SilentArduinoDaemonImpl('foo', 'json').spawnDaemonProcess(); + fail('Expected a failure.') + } catch (e) { + expect(e).to.be.instanceOf(DaemonError); + expect(e.code).to.be.equal(DaemonError.UNKNOWN_ADDRESS); + } + }); + + it('should parse an error - unknown address [text]', async () => { + try { + await new SilentArduinoDaemonImpl('foo', 'text').spawnDaemonProcess(); + fail('Expected a failure.') + } catch (e) { + expect(e).to.be.instanceOf(DaemonError); + expect(e.code).to.be.equal(DaemonError.UNKNOWN_ADDRESS); + } + }); + + it('should parse an error - invalid port [json]', async () => { + try { + await new SilentArduinoDaemonImpl(-1, 'json').spawnDaemonProcess(); + fail('Expected a failure.') + } catch (e) { + expect(e).to.be.instanceOf(DaemonError); + expect(e.code).to.be.equal(DaemonError.INVALID_PORT); + } + }); + + it('should parse an error - invalid port [text]', async () => { + try { + await new SilentArduinoDaemonImpl(-1, 'text').spawnDaemonProcess(); + fail('Expected a failure.') + } catch (e) { + expect(e).to.be.instanceOf(DaemonError); + expect(e.code).to.be.equal(DaemonError.INVALID_PORT); + } + }); + +}); diff --git a/arduino-ide-extension/src/test/node/cli-config.test.ts b/arduino-ide-extension/src/test/node/cli-config.test.ts new file mode 100644 index 00000000..c3350a70 --- /dev/null +++ b/arduino-ide-extension/src/test/node/cli-config.test.ts @@ -0,0 +1,44 @@ +import { expect } from 'chai'; +import { DefaultCliConfig } from '../../node/cli-config'; + +describe('cli-config', () => { + + type ConfigProvider = DefaultCliConfig | { (): DefaultCliConfig } + + ([ + [defaultConfig, defaultConfig, true], + [() => { + const conf = defaultConfig(); + delete conf.board_manager + return conf + }, defaultConfig, true], + [() => { + const conf = defaultConfig(); + (conf.daemon as any).port = String(conf.daemon.port); + return conf + }, defaultConfig, true], + ] as [ConfigProvider, ConfigProvider, boolean][]).forEach(([leftInput, rightInput, expectation]) => { + const left = typeof leftInput === 'function' ? leftInput() : leftInput; + const right = typeof rightInput === 'function' ? rightInput() : rightInput; + it(`${JSON.stringify(left)} should ${expectation ? '' : 'not '}be the same as ${JSON.stringify(right)}`, () => { + expect(DefaultCliConfig.sameAs(left, right)).to.be.equal(expectation); + }); + }); + + function defaultConfig(): DefaultCliConfig { + return { + board_manager: { + additional_urls: [] + }, + daemon: { + port: 5000 + }, + directories: { + data: 'data', + downloads: 'downloads', + user: 'user' + } + } + } + +}); diff --git a/arduino-ide-extension/src/test/node/config-file-validator.test.ts b/arduino-ide-extension/src/test/node/config-file-validator.test.ts new file mode 100644 index 00000000..daf09554 --- /dev/null +++ b/arduino-ide-extension/src/test/node/config-file-validator.test.ts @@ -0,0 +1,78 @@ +import { expect } from 'chai' +import { safeLoad } from 'js-yaml'; +import { ArduinoDaemonImpl } from '../../node/arduino-daemon-impl'; +import { ConfigFileValidator } from '../../node/config-file-validator'; +import { spawnCommand } from '../../node/exec-util'; + +class MockConfigFileValidator extends ConfigFileValidator { + + protected async isValidPath(path: string): Promise { + if (path.endsWith('!invalid')) { + return false; + } + return super.isValidPath(path); + } + +} + +describe('config-file-validator', () => { + + const testMe = new MockConfigFileValidator(); + + it('valid - default', async () => { + const config = await defaultConfig(); + const result = await testMe.validate(config); + // tslint:disable-next-line:no-unused-expression + expect(result).to.be.true; + }); + + it("valid - no 'board_manager'", async () => { + const config = await defaultConfig(); + delete config.board_manager; + const result = await testMe.validate(config); + // tslint:disable-next-line:no-unused-expression + expect(result).to.be.true; + }); + + it("valid - no 'board_manager.additional_urls'", async () => { + const config = await defaultConfig(); + delete config.board_manager.additional_urls; + const result = await testMe.validate(config); + // tslint:disable-next-line:no-unused-expression + expect(result).to.be.true; + }); + + it("invalid - no 'directories.data'", async () => { + const config = await defaultConfig(); + delete config.directories.data; + const result = await testMe.validate(config); + // tslint:disable-next-line:no-unused-expression + expect(result).to.be.false; + }); + + it("invalid - 'directories.data' is a empty string", async () => { + const config = await defaultConfig(); + config.directories.data = ''; + const result = await testMe.validate(config); + // tslint:disable-next-line:no-unused-expression + expect(result).to.be.false; + }); + + it("invalid - 'directories.data' is contains invalid chars", async () => { + const config = await defaultConfig(); + config.directories.data = '!invalid'; + const result = await testMe.validate(config); + // tslint:disable-next-line:no-unused-expression + expect(result).to.be.false; + }); + + async function defaultConfig(): Promise { + return new Promise(resolve => { + new ArduinoDaemonImpl().getExecPath() + .then(execPath => spawnCommand(execPath, ['config', 'dump'])) + .then(content => safeLoad(content)) + .then(config => resolve(config)); + }); + } + +}) diff --git a/arduino-ide-extension/src/test/node/exec-util.test.ts b/arduino-ide-extension/src/test/node/exec-util.test.ts new file mode 100644 index 00000000..37c9455c --- /dev/null +++ b/arduino-ide-extension/src/test/node/exec-util.test.ts @@ -0,0 +1,31 @@ +import * as os from 'os'; +import { expect, use } from 'chai'; +import { getExecPath } from '../../node/exec-util' + +use(require('chai-string')); + +describe('getExecPath', () => { + + it('should resolve arduino-cli', async () => { + const actual = await getExecPath('arduino-cli', onError, 'version'); + const expected = os.platform() === 'win32' ? '\\arduino-cli.exe' : '/arduino-cli'; + expect(actual).to.endsWith(expected); + }); + + it('should resolve arduino-language-server', async () => { + const actual = await getExecPath('arduino-language-server'); + const expected = os.platform() === 'win32' ? '\\arduino-language-server.exe' : '/arduino-language-server'; + expect(actual).to.endsWith(expected); + }); + + it('should resolve clangd', async () => { + const actual = await getExecPath('clangd', onError, '--version', os.platform() !== 'win32'); + const expected = os.platform() === 'win32' ? '\\clangd.exe' : '/clangd'; + expect(actual).to.endsWith(expected); + }); + + function onError(error: Error): void { + console.error(error); + } + +}); diff --git a/arduino-ide-extension/test/node/exec-util.test.ts b/arduino-ide-extension/test/node/exec-util.test.ts deleted file mode 100644 index 99c86f22..00000000 --- a/arduino-ide-extension/test/node/exec-util.test.ts +++ /dev/null @@ -1,32 +0,0 @@ -import * as os from 'os'; -import { expect, use } from 'chai'; -import { NullLogger } from './logger'; -import { getExecPath } from '../../lib/node/exec-util' - -use(require('chai-string')); - -describe('getExecPath', () => { - it('should resolve arduino-cli', async () => { - const path = await getExecPath('arduino-cli', new NullLogger(), 'version'); - if (os.platform() === 'win32') - expect(path).to.endsWith('\\arduino-cli.exe'); - else - expect(path).to.endsWith('/arduino-cli'); - }); - - it('should resolve arduino-language-server', async () => { - const path = await getExecPath('arduino-language-server', new NullLogger()); - if (os.platform() === 'win32') - expect(path).to.endsWith('\\arduino-language-server.exe'); - else - expect(path).to.endsWith('/arduino-language-server'); - }); - - it('should resolve clangd', async () => { - const path = await getExecPath('clangd', new NullLogger(), '--version', os.platform() !== 'win32'); - if (os.platform() === 'win32') - expect(path).to.endsWith('\\clangd.exe'); - else - expect(path).to.endsWith('/clangd'); - }); -}); diff --git a/arduino-ide-extension/test/node/logger.ts b/arduino-ide-extension/test/node/logger.ts deleted file mode 100644 index 888f914b..00000000 --- a/arduino-ide-extension/test/node/logger.ts +++ /dev/null @@ -1,89 +0,0 @@ -import { ILogger, Loggable, LogLevel } from '@theia/core'; - -export class NullLogger implements ILogger { - logLevel = 0; - - setLogLevel(logLevel: number): Promise { - this.logLevel = logLevel; - return Promise.resolve(); - } - getLogLevel(): Promise { - return Promise.resolve(this.logLevel); - } - isEnabled(logLevel: number): Promise { - return Promise.resolve(logLevel >= this.logLevel); - } - ifEnabled(logLevel: number): Promise { - if (logLevel >= this.logLevel) - return Promise.resolve(); - else - return Promise.reject(); - } - log(logLevel: any, loggable: any, ...rest: any[]) { - return Promise.resolve(); - } - - isTrace(): Promise { - return this.isEnabled(LogLevel.TRACE); - } - ifTrace(): Promise { - return this.ifEnabled(LogLevel.TRACE); - } - trace(arg: any | Loggable, ...params: any[]): Promise { - return this.log(LogLevel.TRACE, arg, ...params); - } - - isDebug(): Promise { - return this.isEnabled(LogLevel.DEBUG); - } - ifDebug(): Promise { - return this.ifEnabled(LogLevel.DEBUG); - } - debug(arg: any | Loggable, ...params: any[]): Promise { - return this.log(LogLevel.DEBUG, arg, ...params); - } - - isInfo(): Promise { - return this.isEnabled(LogLevel.INFO); - } - ifInfo(): Promise { - return this.ifEnabled(LogLevel.INFO); - } - info(arg: any | Loggable, ...params: any[]): Promise { - return this.log(LogLevel.INFO, arg, ...params); - } - - isWarn(): Promise { - return this.isEnabled(LogLevel.WARN); - } - ifWarn(): Promise { - return this.ifEnabled(LogLevel.WARN); - } - warn(arg: any | Loggable, ...params: any[]): Promise { - return this.log(LogLevel.WARN, arg, ...params); - } - - isError(): Promise { - return this.isEnabled(LogLevel.ERROR); - } - ifError(): Promise { - return this.ifEnabled(LogLevel.ERROR); - } - error(arg: any | Loggable, ...params: any[]): Promise { - return this.log(LogLevel.ERROR, arg, ...params); - } - - isFatal(): Promise { - return this.isEnabled(LogLevel.FATAL); - } - ifFatal(): Promise { - return this.ifEnabled(LogLevel.FATAL); - } - fatal(arg: any | Loggable, ...params: any[]): Promise { - return this.log(LogLevel.FATAL, arg, ...params); - } - - child(name: string): ILogger { - return this; - } -} diff --git a/browser-app/package.json b/browser-app/package.json index ad5c50dc..ee0c44f6 100644 --- a/browser-app/package.json +++ b/browser-app/package.json @@ -14,11 +14,12 @@ "@theia/messages": "next", "@theia/monaco": "next", "@theia/navigator": "next", + "@theia/plugin-ext": "next", + "@theia/plugin-ext-vscode": "next", "@theia/preferences": "next", "@theia/process": "next", "@theia/terminal": "next", "@theia/workspace": "next", - "@theia/textmate-grammars": "next", "arduino-ide-extension": "0.0.5", "arduino-debugger-extension": "0.0.5" }, @@ -27,7 +28,7 @@ }, "scripts": { "prepare": "theia build --mode development", - "start": "theia start --plugins=local-dir:../", + "start": "theia start --plugins=local-dir:../plugins", "watch": "theia build --watch --mode development" }, "theia": { diff --git a/electron-app/package.json b/electron-app/package.json index eb1d9f00..31583f24 100644 --- a/electron-app/package.json +++ b/electron-app/package.json @@ -15,11 +15,12 @@ "@theia/messages": "next", "@theia/monaco": "next", "@theia/navigator": "next", + "@theia/plugin-ext": "next", + "@theia/plugin-ext-vscode": "next", "@theia/preferences": "next", "@theia/process": "next", "@theia/terminal": "next", "@theia/workspace": "next", - "@theia/textmate-grammars": "next", "arduino-ide-extension": "0.0.5", "arduino-debugger-extension": "0.0.5" }, @@ -28,7 +29,7 @@ }, "scripts": { "prepare": "theia build --mode development", - "start": "theia start", + "start": "theia start --plugins=local-dir:../plugins", "watch": "theia build --watch --mode development" }, "theia": { diff --git a/electron/build/scripts/arduino-pro-ide-electron-main.js b/electron/build/scripts/arduino-pro-ide-electron-main.js new file mode 100644 index 00000000..6b345968 --- /dev/null +++ b/electron/build/scripts/arduino-pro-ide-electron-main.js @@ -0,0 +1,10 @@ +const os = require('os'); +const path = require('path'); + +process.env.THEIA_DEFAULT_PLUGINS = `local-dir:${path.resolve(__dirname, '..', 'plugins')}`; +process.env.THEIA_PLUGINS = [ + process.env.THEIA_PLUGINS, + `local-dir:${path.resolve(os.homedir(), '.arduinoProIDE', 'plugins')}` +].filter(Boolean).join(','); + +require('../src-gen/frontend/electron-main.js'); diff --git a/electron/build/template-package.json b/electron/build/template-package.json index 03a7ddf1..cfc6c68d 100644 --- a/electron/build/template-package.json +++ b/electron/build/template-package.json @@ -1,7 +1,7 @@ { "name": "arduino-pro-ide", "description": "Arduino Pro IDE", - "main": "src-gen/frontend/electron-main.js", + "main": "scripts/arduino-pro-ide-electron-main.js", "author": "Arduino SA", "dependencies": { "arduino-ide-extension": "file:../working-copy/arduino-ide-extension", @@ -11,13 +11,15 @@ "**/fs-extra": "^4.0.3" }, "devDependencies": { + "@theia/cli": "next", "electron-builder": "^21.2.0" }, "scripts": { - "build": "theia build --mode development", - "build:release": "theia build --mode development", + "build": "yarn download:plugins && theia build --mode development", + "build:release": "yarn download:plugins && theia build --mode development", "package": "electron-builder --publish=never", - "package:preview": "electron-builder --dir" + "package:preview": "electron-builder --dir", + "download:plugins": "theia download:plugins" }, "engines": { "node": ">=10.10.0" @@ -45,8 +47,9 @@ "buildResources": "resources" }, "files": [ - "src-gen/**/*", - "lib/**/*", + "src-gen", + "lib", + "scripts", "!node_modules/**/*.{ts,map}", "!node_modules/**/*.spec.js", "!node_modules/@theia/**/test/*", @@ -56,6 +59,12 @@ "!node_modules/oniguruma/*", "!node_modules/onigasm/*" ], + "extraResources": [ + { + "from": "plugins", + "to": "app/plugins" + } + ], "win": { "target": [ "zip" @@ -92,5 +101,9 @@ } ] } + }, + "theiaPluginsDir": "plugins", + "theiaPlugins": { + "vscode-yaml": "https://github.com/redhat-developer/vscode-yaml/releases/download/0.7.2/redhat.vscode-yaml-0.7.2.vsix" } } diff --git a/package.json b/package.json index a10bc552..ee32588f 100644 --- a/package.json +++ b/package.json @@ -2,26 +2,35 @@ "name": "arduino-editor", "version": "0.0.5", "description": "Arduino Pro IDE", - "main": "index.js", "repository": "https://github.com/bcmi-labs/arduino-editor.git", "author": "Arduino SA", "license": "MIT", "private": true, "devDependencies": { - "lerna": "^3.13.3" + "@theia/cli": "next", + "lerna": "^3.13.3", + "rimraf": "^2.6.1", + "tslint": "^5.5.0", + "typescript": "3.5.1" }, "scripts": { - "prepare": "lerna run prepare", + "prepare": "lerna run prepare && yarn test && yarn download:plugins", "rebuild:browser": "theia rebuild:browser", "rebuild:electron": "theia rebuild:electron", "start": "yarn --cwd ./browser-app start", "watch": "lerna run watch --parallel", - "test": "lerna run test" + "test": "lerna run test", + "download:plugins": "theia download:plugins" }, "workspaces": [ "arduino-ide-extension", "arduino-debugger-extension", "electron-app", "browser-app" - ] + ], + "theiaPluginsDir": "plugins", + "theiaPlugins": { + "vscode-yaml": "https://open-vsx.org/api/redhat/vscode-yaml/0.7.2/file/redhat.vscode-yaml-0.7.2.vsix", + "vscode-builtin-cpp": "http://open-vsx.org/api/vscode/cpp/1.39.1/file/vscode.cpp-1.39.1.vsix" + } } diff --git a/yarn.lock b/yarn.lock index ad260e98..6c438218 100644 --- a/yarn.lock +++ b/yarn.lock @@ -9,27 +9,27 @@ dependencies: "@babel/highlight" "^7.8.3" -"@babel/compat-data@^7.8.4": - version "7.8.5" - resolved "https://registry.yarnpkg.com/@babel/compat-data/-/compat-data-7.8.5.tgz#d28ce872778c23551cbb9432fc68d28495b613b9" - integrity sha512-jWYUqQX/ObOhG1UiEkbH5SANsE/8oKXiQWjj7p7xgj9Zmnt//aUvyz4dBkK0HNsS8/cbyC5NmmH87VekW+mXFg== +"@babel/compat-data@^7.8.6": + version "7.8.6" + resolved "https://registry.yarnpkg.com/@babel/compat-data/-/compat-data-7.8.6.tgz#7eeaa0dfa17e50c7d9c0832515eee09b56f04e35" + integrity sha512-CurCIKPTkS25Mb8mz267vU95vy+TyUpnctEX2lV33xWNmHAfjruztgiPBbXZRh3xZZy1CYvGx6XfxyTVS+sk7Q== dependencies: browserslist "^4.8.5" invariant "^2.2.4" semver "^5.5.0" "@babel/core@^7.5.5": - version "7.8.4" - resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.8.4.tgz#d496799e5c12195b3602d0fddd77294e3e38e80e" - integrity sha512-0LiLrB2PwrVI+a2/IEskBopDYSd8BCb3rOvH7D5tzoWd696TBEduBvuLVm4Nx6rltrLZqvI3MCalB2K2aVzQjA== + version "7.8.6" + resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.8.6.tgz#27d7df9258a45c2e686b6f18b6c659e563aa4636" + integrity sha512-Sheg7yEJD51YHAvLEV/7Uvw95AeWqYPL3Vk3zGujJKIhJ+8oLw2ALaf3hbucILhKsgSoADOvtKRJuNVdcJkOrg== dependencies: "@babel/code-frame" "^7.8.3" - "@babel/generator" "^7.8.4" + "@babel/generator" "^7.8.6" "@babel/helpers" "^7.8.4" - "@babel/parser" "^7.8.4" - "@babel/template" "^7.8.3" - "@babel/traverse" "^7.8.4" - "@babel/types" "^7.8.3" + "@babel/parser" "^7.8.6" + "@babel/template" "^7.8.6" + "@babel/traverse" "^7.8.6" + "@babel/types" "^7.8.6" convert-source-map "^1.7.0" debug "^4.1.0" gensync "^1.0.0-beta.1" @@ -39,12 +39,12 @@ semver "^5.4.1" source-map "^0.5.0" -"@babel/generator@^7.8.4": - version "7.8.4" - resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.8.4.tgz#35bbc74486956fe4251829f9f6c48330e8d0985e" - integrity sha512-PwhclGdRpNAf3IxZb0YVuITPZmmrXz9zf6fH8lT4XbrmfQKr6ryBzhv593P5C6poJRciFCL/eHGW2NuGrgEyxA== +"@babel/generator@^7.8.6": + version "7.8.6" + resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.8.6.tgz#57adf96d370c9a63c241cd719f9111468578537a" + integrity sha512-4bpOR5ZBz+wWcMeVtcf7FbjcFzCp+817z2/gHNncIRcM9MmKzUhtWCYAq27RAfUrAFwb+OCG1s9WEaVxfi6cjg== dependencies: - "@babel/types" "^7.8.3" + "@babel/types" "^7.8.6" jsesc "^2.5.1" lodash "^4.17.13" source-map "^0.5.0" @@ -73,22 +73,23 @@ "@babel/traverse" "^7.8.3" "@babel/types" "^7.8.3" -"@babel/helper-compilation-targets@^7.8.4": - version "7.8.4" - resolved "https://registry.yarnpkg.com/@babel/helper-compilation-targets/-/helper-compilation-targets-7.8.4.tgz#03d7ecd454b7ebe19a254f76617e61770aed2c88" - integrity sha512-3k3BsKMvPp5bjxgMdrFyq0UaEO48HciVrOVF0+lon8pp95cyJ2ujAh0TrBHNMnJGT2rr0iKOJPFFbSqjDyf/Pg== +"@babel/helper-compilation-targets@^7.8.6": + version "7.8.6" + resolved "https://registry.yarnpkg.com/@babel/helper-compilation-targets/-/helper-compilation-targets-7.8.6.tgz#015b85db69e3a34240d5c2b761fc53eb9695f09c" + integrity sha512-UrJdk27hKVJSnibFcUWYLkCL0ZywTUoot8yii1lsHJcvwrypagmYKjHLMWivQPm4s6GdyygCL8fiH5EYLxhQwQ== dependencies: - "@babel/compat-data" "^7.8.4" + "@babel/compat-data" "^7.8.6" browserslist "^4.8.5" invariant "^2.2.4" levenary "^1.1.1" semver "^5.5.0" "@babel/helper-create-regexp-features-plugin@^7.8.3": - version "7.8.3" - resolved "https://registry.yarnpkg.com/@babel/helper-create-regexp-features-plugin/-/helper-create-regexp-features-plugin-7.8.3.tgz#c774268c95ec07ee92476a3862b75cc2839beb79" - integrity sha512-Gcsm1OHCUr9o9TcJln57xhWHtdXbA2pgQ58S0Lxlks0WMGNXuki4+GLfX0p+L2ZkINUGZvfkz8rzoqJQSthI+Q== + version "7.8.6" + resolved "https://registry.yarnpkg.com/@babel/helper-create-regexp-features-plugin/-/helper-create-regexp-features-plugin-7.8.6.tgz#7fa040c97fb8aebe1247a5c645330c32d083066b" + integrity sha512-bPyujWfsHhV/ztUkwGHz/RPV1T1TDEsSZDsN42JPehndA+p1KKTh3npvTadux0ZhCrytx9tvjpWNowKby3tM6A== dependencies: + "@babel/helper-annotate-as-pure" "^7.8.3" "@babel/helper-regex" "^7.8.3" regexpu-core "^4.6.0" @@ -147,15 +148,16 @@ "@babel/types" "^7.8.3" "@babel/helper-module-transforms@^7.8.3": - version "7.8.3" - resolved "https://registry.yarnpkg.com/@babel/helper-module-transforms/-/helper-module-transforms-7.8.3.tgz#d305e35d02bee720fbc2c3c3623aa0c316c01590" - integrity sha512-C7NG6B7vfBa/pwCOshpMbOYUmrYQDfCpVL/JCRu0ek8B5p8kue1+BCXpg2vOYs7w5ACB9GTOBYQ5U6NwrMg+3Q== + version "7.8.6" + resolved "https://registry.yarnpkg.com/@babel/helper-module-transforms/-/helper-module-transforms-7.8.6.tgz#6a13b5eecadc35692047073a64e42977b97654a4" + integrity sha512-RDnGJSR5EFBJjG3deY0NiL0K9TO8SXxS9n/MPsbPK/s9LbQymuLNtlzvDiNS7IpecuL45cMeLVkA+HfmlrnkRg== dependencies: "@babel/helper-module-imports" "^7.8.3" + "@babel/helper-replace-supers" "^7.8.6" "@babel/helper-simple-access" "^7.8.3" "@babel/helper-split-export-declaration" "^7.8.3" - "@babel/template" "^7.8.3" - "@babel/types" "^7.8.3" + "@babel/template" "^7.8.6" + "@babel/types" "^7.8.6" lodash "^4.17.13" "@babel/helper-optimise-call-expression@^7.8.3": @@ -188,15 +190,15 @@ "@babel/traverse" "^7.8.3" "@babel/types" "^7.8.3" -"@babel/helper-replace-supers@^7.8.3": - version "7.8.3" - resolved "https://registry.yarnpkg.com/@babel/helper-replace-supers/-/helper-replace-supers-7.8.3.tgz#91192d25f6abbcd41da8a989d4492574fb1530bc" - integrity sha512-xOUssL6ho41U81etpLoT2RTdvdus4VfHamCuAm4AHxGr+0it5fnwoVdwUJ7GFEqCsQYzJUhcbsN9wB9apcYKFA== +"@babel/helper-replace-supers@^7.8.3", "@babel/helper-replace-supers@^7.8.6": + version "7.8.6" + resolved "https://registry.yarnpkg.com/@babel/helper-replace-supers/-/helper-replace-supers-7.8.6.tgz#5ada744fd5ad73203bf1d67459a27dcba67effc8" + integrity sha512-PeMArdA4Sv/Wf4zXwBKPqVj7n9UF/xg6slNRtZW84FM7JpE1CbG8B612FyM4cxrf4fMAMGO0kR7voy1ForHHFA== dependencies: "@babel/helper-member-expression-to-functions" "^7.8.3" "@babel/helper-optimise-call-expression" "^7.8.3" - "@babel/traverse" "^7.8.3" - "@babel/types" "^7.8.3" + "@babel/traverse" "^7.8.6" + "@babel/types" "^7.8.6" "@babel/helper-simple-access@^7.8.3": version "7.8.3" @@ -241,10 +243,10 @@ esutils "^2.0.2" js-tokens "^4.0.0" -"@babel/parser@^7.8.3", "@babel/parser@^7.8.4": - version "7.8.4" - resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.8.4.tgz#d1dbe64691d60358a974295fa53da074dd2ce8e8" - integrity sha512-0fKu/QqildpXmPVaRBoXOlyBb3MC+J0A66x97qEfLOMkn3u6nfY5esWogQwi/K0BjASYy4DbnsEWnpNL6qT5Mw== +"@babel/parser@^7.8.6": + version "7.8.6" + resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.8.6.tgz#ba5c9910cddb77685a008e3c587af8d27b67962c" + integrity sha512-trGNYSfwq5s0SgM1BMEB8hX3NDmO7EP2wsDGDexiaKMB92BaRpS+qZfpkMqUBhcsOTBwNy9B/jieo4ad/t/z2g== "@babel/plugin-proposal-async-generator-functions@^7.8.3": version "7.8.3" @@ -398,17 +400,17 @@ "@babel/helper-plugin-utils" "^7.8.3" lodash "^4.17.13" -"@babel/plugin-transform-classes@^7.5.5", "@babel/plugin-transform-classes@^7.8.3": - version "7.8.3" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-classes/-/plugin-transform-classes-7.8.3.tgz#46fd7a9d2bb9ea89ce88720477979fe0d71b21b8" - integrity sha512-SjT0cwFJ+7Rbr1vQsvphAHwUHvSUPmMjMU/0P59G8U2HLFqSa082JO7zkbDNWs9kH/IUqpHI6xWNesGf8haF1w== +"@babel/plugin-transform-classes@^7.5.5", "@babel/plugin-transform-classes@^7.8.6": + version "7.8.6" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-classes/-/plugin-transform-classes-7.8.6.tgz#77534447a477cbe5995ae4aee3e39fbc8090c46d" + integrity sha512-k9r8qRay/R6v5aWZkrEclEhKO6mc1CCQr2dLsVHBmOQiMpN6I2bpjX3vgnldUWeEI1GHVNByULVxZ4BdP4Hmdg== dependencies: "@babel/helper-annotate-as-pure" "^7.8.3" "@babel/helper-define-map" "^7.8.3" "@babel/helper-function-name" "^7.8.3" "@babel/helper-optimise-call-expression" "^7.8.3" "@babel/helper-plugin-utils" "^7.8.3" - "@babel/helper-replace-supers" "^7.8.3" + "@babel/helper-replace-supers" "^7.8.6" "@babel/helper-split-export-declaration" "^7.8.3" globals "^11.1.0" @@ -449,10 +451,10 @@ "@babel/helper-builder-binary-assignment-operator-visitor" "^7.8.3" "@babel/helper-plugin-utils" "^7.8.3" -"@babel/plugin-transform-for-of@^7.8.4": - version "7.8.4" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-for-of/-/plugin-transform-for-of-7.8.4.tgz#6fe8eae5d6875086ee185dd0b098a8513783b47d" - integrity sha512-iAXNlOWvcYUYoV8YIxwS7TxGRJcxyl8eQCfT+A5j8sKUzRFvJdcyjp97jL2IghWSRDaL2PU2O2tX8Cu9dTBq5A== +"@babel/plugin-transform-for-of@^7.8.6": + version "7.8.6" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-for-of/-/plugin-transform-for-of-7.8.6.tgz#a051bd1b402c61af97a27ff51b468321c7c2a085" + integrity sha512-M0pw4/1/KI5WAxPsdcUL/w2LJ7o89YHN3yLkzNjg7Yl15GlVGgzHyCU+FMeAxevHGsLVmUqbirlUIKTafPmzdw== dependencies: "@babel/helper-plugin-utils" "^7.8.3" @@ -623,12 +625,12 @@ "@babel/helper-plugin-utils" "^7.8.3" "@babel/preset-env@^7.5.5": - version "7.8.4" - resolved "https://registry.yarnpkg.com/@babel/preset-env/-/preset-env-7.8.4.tgz#9dac6df5f423015d3d49b6e9e5fa3413e4a72c4e" - integrity sha512-HihCgpr45AnSOHRbS5cWNTINs0TwaR8BS8xIIH+QwiW8cKL0llV91njQMpeMReEPVs+1Ao0x3RLEBLtt1hOq4w== + version "7.8.6" + resolved "https://registry.yarnpkg.com/@babel/preset-env/-/preset-env-7.8.6.tgz#2a0773b08589ecba4995fc71b1965e4f531af40b" + integrity sha512-M5u8llV9DIVXBFB/ArIpqJuvXpO+ymxcJ6e8ZAmzeK3sQeBNOD1y+rHvHCGG4TlEmsNpIrdecsHGHT8ZCoOSJg== dependencies: - "@babel/compat-data" "^7.8.4" - "@babel/helper-compilation-targets" "^7.8.4" + "@babel/compat-data" "^7.8.6" + "@babel/helper-compilation-targets" "^7.8.6" "@babel/helper-module-imports" "^7.8.3" "@babel/helper-plugin-utils" "^7.8.3" "@babel/plugin-proposal-async-generator-functions" "^7.8.3" @@ -651,13 +653,13 @@ "@babel/plugin-transform-async-to-generator" "^7.8.3" "@babel/plugin-transform-block-scoped-functions" "^7.8.3" "@babel/plugin-transform-block-scoping" "^7.8.3" - "@babel/plugin-transform-classes" "^7.8.3" + "@babel/plugin-transform-classes" "^7.8.6" "@babel/plugin-transform-computed-properties" "^7.8.3" "@babel/plugin-transform-destructuring" "^7.8.3" "@babel/plugin-transform-dotall-regex" "^7.8.3" "@babel/plugin-transform-duplicate-keys" "^7.8.3" "@babel/plugin-transform-exponentiation-operator" "^7.8.3" - "@babel/plugin-transform-for-of" "^7.8.4" + "@babel/plugin-transform-for-of" "^7.8.6" "@babel/plugin-transform-function-name" "^7.8.3" "@babel/plugin-transform-literals" "^7.8.3" "@babel/plugin-transform-member-expression-literals" "^7.8.3" @@ -678,7 +680,7 @@ "@babel/plugin-transform-template-literals" "^7.8.3" "@babel/plugin-transform-typeof-symbol" "^7.8.4" "@babel/plugin-transform-unicode-regex" "^7.8.3" - "@babel/types" "^7.8.3" + "@babel/types" "^7.8.6" browserslist "^4.8.5" core-js-compat "^3.6.2" invariant "^2.2.2" @@ -692,34 +694,34 @@ dependencies: regenerator-runtime "^0.13.2" -"@babel/template@^7.8.3": - version "7.8.3" - resolved "https://registry.yarnpkg.com/@babel/template/-/template-7.8.3.tgz#e02ad04fe262a657809327f578056ca15fd4d1b8" - integrity sha512-04m87AcQgAFdvuoyiQ2kgELr2tV8B4fP/xJAVUL3Yb3bkNdMedD3d0rlSQr3PegP0cms3eHjl1F7PWlvWbU8FQ== +"@babel/template@^7.8.3", "@babel/template@^7.8.6": + version "7.8.6" + resolved "https://registry.yarnpkg.com/@babel/template/-/template-7.8.6.tgz#86b22af15f828dfb086474f964dcc3e39c43ce2b" + integrity sha512-zbMsPMy/v0PWFZEhQJ66bqjhH+z0JgMoBWuikXybgG3Gkd/3t5oQ1Rw2WQhnSrsOmsKXnZOx15tkC4qON/+JPg== dependencies: "@babel/code-frame" "^7.8.3" - "@babel/parser" "^7.8.3" - "@babel/types" "^7.8.3" + "@babel/parser" "^7.8.6" + "@babel/types" "^7.8.6" -"@babel/traverse@^7.8.3", "@babel/traverse@^7.8.4": - version "7.8.4" - resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.8.4.tgz#f0845822365f9d5b0e312ed3959d3f827f869e3c" - integrity sha512-NGLJPZwnVEyBPLI+bl9y9aSnxMhsKz42so7ApAv9D+b4vAFPpY013FTS9LdKxcABoIYFU52HcYga1pPlx454mg== +"@babel/traverse@^7.8.3", "@babel/traverse@^7.8.4", "@babel/traverse@^7.8.6": + version "7.8.6" + resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.8.6.tgz#acfe0c64e1cd991b3e32eae813a6eb564954b5ff" + integrity sha512-2B8l0db/DPi8iinITKuo7cbPznLCEk0kCxDoB9/N6gGNg/gxOXiR/IcymAFPiBwk5w6TtQ27w4wpElgp9btR9A== dependencies: "@babel/code-frame" "^7.8.3" - "@babel/generator" "^7.8.4" + "@babel/generator" "^7.8.6" "@babel/helper-function-name" "^7.8.3" "@babel/helper-split-export-declaration" "^7.8.3" - "@babel/parser" "^7.8.4" - "@babel/types" "^7.8.3" + "@babel/parser" "^7.8.6" + "@babel/types" "^7.8.6" debug "^4.1.0" globals "^11.1.0" lodash "^4.17.13" -"@babel/types@^7.8.3": - version "7.8.3" - resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.8.3.tgz#5a383dffa5416db1b73dedffd311ffd0788fb31c" - integrity sha512-jBD+G8+LWpMBBWvVcdr4QysjUE4mU/syrhN17o1u3gx0/WzJB1kwiVZAXRtWbsIPOwW8pF/YJV5+nmetPzepXg== +"@babel/types@^7.8.3", "@babel/types@^7.8.6": + version "7.8.6" + resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.8.6.tgz#629ecc33c2557fcde7126e58053127afdb3e6d01" + integrity sha512-wqz7pgWMIrht3gquyEFPVXeXCti72Rm8ep9b5tQKz9Yg9LzJA3HxosF1SB3Kc81KD1A3XBkkVYtJvCKS2Z/QrA== dependencies: esutils "^2.0.2" lodash "^4.17.13" @@ -736,9 +738,9 @@ "@emotion/weak-memoize" "0.2.5" "@emotion/core@^10.0.9": - version "10.0.27" - resolved "https://registry.yarnpkg.com/@emotion/core/-/core-10.0.27.tgz#7c3f78be681ab2273f3bf11ca3e2edc4a9dd1fdc" - integrity sha512-XbD5R36pVbohQMnKfajHv43g8EbN4NHdF6Zh9zg/C0nr0jqwOw3gYnC07Xj3yG43OYSRyrGsoQ5qPwc8ycvLZw== + version "10.0.28" + resolved "https://registry.yarnpkg.com/@emotion/core/-/core-10.0.28.tgz#bb65af7262a234593a9e952c041d0f1c9b9bef3d" + integrity sha512-pH8UueKYO5jgg0Iq+AmCLxBsvuGtvlmiDCOuv8fGNYn3cowFpLN98L8zO56U0H1PjDIyAlXymgL3Wu7u7v6hbA== dependencies: "@babel/runtime" "^7.5.5" "@emotion/cache" "^10.0.27" @@ -876,10 +878,10 @@ unique-filename "^1.1.1" which "^1.3.1" -"@grpc/grpc-js@^0.6.12": - version "0.6.16" - resolved "https://registry.yarnpkg.com/@grpc/grpc-js/-/grpc-js-0.6.16.tgz#74dda9eb3deba9f3d8741e91b21faa1d8405fdd3" - integrity sha512-TckwrK2duWTeqE/fYQ5JaLMDwqLuun0B/yswf8Bb9Pb7vb5xGd3iulmcnnaA2RDVd/abQTHnkSAjfRibYU24eQ== +"@grpc/grpc-js@^0.6.18": + version "0.6.18" + resolved "https://registry.yarnpkg.com/@grpc/grpc-js/-/grpc-js-0.6.18.tgz#ba3b3dfef869533161d192a385412a4abd0db127" + integrity sha512-uAzv/tM8qpbf1vpx1xPMfcUMzbfdqJtdCYAqY/LsLeQQlnTb4vApylojr+wlCyr7bZeg3AFfHvtihnNOQQt/nA== dependencies: semver "^6.2.0" @@ -1589,13 +1591,13 @@ "@octokit/types" "^2.0.0" "@octokit/endpoint@^5.5.0": - version "5.5.2" - resolved "https://registry.yarnpkg.com/@octokit/endpoint/-/endpoint-5.5.2.tgz#ed19d01fe85ac58bc2b774661658f9e5429b8164" - integrity sha512-ICDcRA0C2vtTZZGud1nXRrBLXZqFayodXAKZfo3dkdcLNqcHsgaz3YSTupbURusYeucSVRjjG+RTcQhx6HPPcg== + version "5.5.3" + resolved "https://registry.yarnpkg.com/@octokit/endpoint/-/endpoint-5.5.3.tgz#0397d1baaca687a4c8454ba424a627699d97c978" + integrity sha512-EzKwkwcxeegYYah5ukEeAI/gYRLv2Y9U5PpIsseGSFDk+G3RbipQGBs8GuYS1TLCtQaqoO66+aQGtITPalxsNQ== dependencies: "@octokit/types" "^2.0.0" is-plain-object "^3.0.0" - universal-user-agent "^4.0.0" + universal-user-agent "^5.0.0" "@octokit/plugin-enterprise-rest@^3.6.1": version "3.6.2" @@ -1632,9 +1634,9 @@ once "^1.4.0" "@octokit/request@^5.2.0": - version "5.3.1" - resolved "https://registry.yarnpkg.com/@octokit/request/-/request-5.3.1.tgz#3a1ace45e6f88b1be4749c5da963b3a3b4a2f120" - integrity sha512-5/X0AL1ZgoU32fAepTfEoggFinO3rxsMLtzhlUX+RctLrusn/CApJuGFCd0v7GMFhF+8UiCsTTfsu7Fh1HnEJg== + version "5.3.2" + resolved "https://registry.yarnpkg.com/@octokit/request/-/request-5.3.2.tgz#1ca8b90a407772a1ee1ab758e7e0aced213b9883" + integrity sha512-7NPJpg19wVQy1cs2xqXjjRq/RmtSomja/VSWnptfYwuBxLdbYh2UjhGi0Wx7B1v5Iw5GKhfFDQL7jM7SSp7K2g== dependencies: "@octokit/endpoint" "^5.5.0" "@octokit/request-error" "^1.0.1" @@ -1643,7 +1645,7 @@ is-plain-object "^3.0.0" node-fetch "^2.3.0" once "^1.4.0" - universal-user-agent "^4.0.0" + universal-user-agent "^5.0.0" "@octokit/rest@^16.28.4": version "16.43.1" @@ -1668,9 +1670,9 @@ universal-user-agent "^4.0.0" "@octokit/types@^2.0.0", "@octokit/types@^2.0.1": - version "2.1.1" - resolved "https://registry.yarnpkg.com/@octokit/types/-/types-2.1.1.tgz#77e80d1b663c5f1f829e5377b728fa3c4fe5a97d" - integrity sha512-89LOYH+d/vsbDX785NOfLxTW88GjNd0lWRz1DVPVsZgg9Yett5O+3MOvwo7iHgvUwbFz0mf/yPIjBkUbs4kxoQ== + version "2.3.1" + resolved "https://registry.yarnpkg.com/@octokit/types/-/types-2.3.1.tgz#40cd61c125a6161cfb3bfabc75805ac7a54213b4" + integrity sha512-rvJP1Y9A/+Cky2C3var1vsw3Lf5Rjn/0sojNl2AjCX+WbpIHYccaJ46abrZoIxMYnOToul6S9tPytUVkFI7CXQ== dependencies: "@types/node" ">= 8" @@ -1797,16 +1799,16 @@ resolved "https://registry.yarnpkg.com/@sindresorhus/is/-/is-0.7.0.tgz#9a06f4f137ee84d7df0460c1fdb1135ffa6c50fd" integrity sha512-ONhaKPIufzzrlNbqtWFFd+jlnemX6lJAgq9ZeiZtS7I1PIf/la7CW4m83rTXRnVnsMbW2k56pGYu7AUFJD9Pow== -"@theia/application-manager@0.16.0-next.46a2d510": - version "0.16.0-next.46a2d510" - resolved "https://registry.yarnpkg.com/@theia/application-manager/-/application-manager-0.16.0-next.46a2d510.tgz#0b57ae18bb389703f205b1ce298ff85ea42e93fb" - integrity sha512-E3kUWPMVO28GZ5grGkwu6+l76E968yB9TWqo9ekixszjLganoQhn8vcLeMM1UCiyb0BYxz99aAcVYzhaag21ZA== +"@theia/application-manager@0.17.0-next.c965552a": + version "0.17.0-next.c965552a" + resolved "https://registry.yarnpkg.com/@theia/application-manager/-/application-manager-0.17.0-next.c965552a.tgz#e0a889731ad069645f7fe1955695eb83e3fc8974" + integrity sha512-7mnb1lJIw9PBlgcF+BjifgI2+hy5/GTk54/WdbmqZj0qyQcgYi3ZuqBcLOoy1msUc6qX5KhiMBldsA5nEbC2cQ== dependencies: "@babel/core" "^7.5.5" "@babel/plugin-transform-classes" "^7.5.5" "@babel/plugin-transform-runtime" "^7.5.5" "@babel/preset-env" "^7.5.5" - "@theia/application-package" "0.16.0-next.46a2d510" + "@theia/application-package" "0.17.0-next.c965552a" "@theia/compression-webpack-plugin" "^3.0.0" "@types/fs-extra" "^4.0.2" "@types/webpack" "^4.41.2" @@ -1829,10 +1831,10 @@ webpack-cli "2.0.12" worker-loader "^1.1.1" -"@theia/application-package@0.16.0-next.46a2d510", "@theia/application-package@next": - version "0.16.0-next.46a2d510" - resolved "https://registry.yarnpkg.com/@theia/application-package/-/application-package-0.16.0-next.46a2d510.tgz#4037dfc24923e5fe001a9a0b3b4bb92bb2bd93ab" - integrity sha512-jnhOuuTMfr2f5lY2BMAri8qs5mVN1KCGeyJ6LhUlaluISZrU+bvrenadgboiumHqOtmktgq+ZgI+zygTvsVoVw== +"@theia/application-package@0.17.0-next.c965552a", "@theia/application-package@next": + version "0.17.0-next.c965552a" + resolved "https://registry.yarnpkg.com/@theia/application-package/-/application-package-0.17.0-next.c965552a.tgz#b7f53f32176a0a6a90ac86db46539e43c1c3d28f" + integrity sha512-rRhXttJxAyPWtw6bG9zKUmcrrddGoQ92P1QLp55sd0WE7VsrKliMrsODvmtKUHQyZogUMUwkQFC5EDnGNeEhMQ== dependencies: "@types/fs-extra" "^4.0.2" "@types/request" "^2.0.3" @@ -1845,13 +1847,24 @@ semver "^5.4.1" write-json-file "^2.2.0" -"@theia/cli@next": - version "0.16.0-next.46a2d510" - resolved "https://registry.yarnpkg.com/@theia/cli/-/cli-0.16.0-next.46a2d510.tgz#0b412e6019879381c879acd5455073c7bacd0608" - integrity sha512-hQEFu8PfkluKYCgdfruYS53L55+j2eM3OupOiB3uKUansuZ/t6VlLoROmbtamun0Ut0RlnZFqhVkPW/TpknHDA== +"@theia/callhierarchy@0.17.0-next.c965552a": + version "0.17.0-next.c965552a" + resolved "https://registry.yarnpkg.com/@theia/callhierarchy/-/callhierarchy-0.17.0-next.c965552a.tgz#dd4fa10ff56d31b310ed3d774632a0346f237d02" + integrity sha512-AQ4xW+byLbhhIFZClu17UT+k54UjXRlkMd+WYN+h+ArHzUmsBL+Jt0TnSTg7V/T68ROlKburopZpiwy2OLu9Tw== dependencies: - "@theia/application-manager" "0.16.0-next.46a2d510" - "@theia/application-package" "0.16.0-next.46a2d510" + "@theia/core" "0.17.0-next.c965552a" + "@theia/editor" "0.17.0-next.c965552a" + "@theia/languages" "0.17.0-next.c965552a" + "@theia/monaco" "0.17.0-next.c965552a" + ts-md5 "^1.2.2" + +"@theia/cli@next": + version "0.17.0-next.c965552a" + resolved "https://registry.yarnpkg.com/@theia/cli/-/cli-0.17.0-next.c965552a.tgz#cf77310005d724a7e97c7490b1ea387b2d0d5d65" + integrity sha512-DHqkAd+3VY9RBgOG6DrdFgCyTeZxYZNSVikTctQvPIh16JNfNip93Gf5FJdBzKQ65vrxuqQYwN6tVi0nGRedYQ== + dependencies: + "@theia/application-manager" "0.17.0-next.c965552a" + "@theia/application-package" "0.17.0-next.c965552a" "@types/chai" "^4.2.7" "@types/mkdirp" "^0.5.2" "@types/mocha" "^5.2.7" @@ -1880,25 +1893,26 @@ serialize-javascript "^1.4.0" webpack-sources "^1.0.1" -"@theia/console@0.16.0-next.46a2d510": - version "0.16.0-next.46a2d510" - resolved "https://registry.yarnpkg.com/@theia/console/-/console-0.16.0-next.46a2d510.tgz#ba5926258cf58b4fbe64460239f4af38a98ff883" - integrity sha512-yJk6+H6xzNO+fmJuz7k47cMjZsA2b4wgEp9FVaHCkn3fmTjMo/Qv3PCH78S8bSMQcKmfqFDCACj/X96cTmMAfg== +"@theia/console@0.17.0-next.c965552a": + version "0.17.0-next.c965552a" + resolved "https://registry.yarnpkg.com/@theia/console/-/console-0.17.0-next.c965552a.tgz#90e26dc01d1641508c1a84a49113a65e1c7bce51" + integrity sha512-J7U5Wa5BMcvgMAacXzIOx46Wvy4WHAjnYTU5sJw6a7xuByTlBLjyerDWDCh7mjLc7zVtKLXGrODr6tJQ06Qfbg== dependencies: - "@theia/core" "0.16.0-next.46a2d510" - "@theia/monaco" "0.16.0-next.46a2d510" + "@theia/core" "0.17.0-next.c965552a" + "@theia/monaco" "0.17.0-next.c965552a" anser "^1.4.7" -"@theia/core@0.16.0-next.46a2d510", "@theia/core@next": - version "0.16.0-next.46a2d510" - resolved "https://registry.yarnpkg.com/@theia/core/-/core-0.16.0-next.46a2d510.tgz#2ff298bf34721a2dc7a3ae1c261f0f01b2d6b0be" - integrity sha512-nkmqq+Egx5gVeSVOM3NxVhdbjuX/3xdUpende5hwlPBrS/BSds2dmTEUFUH0fJ6ryLx9aBiaoHpgSf8RPw7oJg== +"@theia/core@0.17.0-next.c965552a", "@theia/core@next": + version "0.17.0-next.c965552a" + resolved "https://registry.yarnpkg.com/@theia/core/-/core-0.17.0-next.c965552a.tgz#86b1d1aaa004ec223e1d5e96f3745f63305fd942" + integrity sha512-D1FgNDtJtutMESu7qr7bOUjbEKiIRePK/X6C9oNRDNP1g4VWn/xMxFcyoXR72itkkWUmDeu2P4XartCYLZ9zDQ== dependencies: "@babel/runtime" "^7.5.5" "@phosphor/widgets" "^1.9.3" "@primer/octicons-react" "^9.0.0" - "@theia/application-package" "0.16.0-next.46a2d510" + "@theia/application-package" "0.17.0-next.c965552a" "@types/body-parser" "^1.16.4" + "@types/cookie" "^0.3.3" "@types/express" "^4.16.0" "@types/fs-extra" "^4.0.2" "@types/lodash.debounce" "4.0.3" @@ -1911,6 +1925,7 @@ "@types/yargs" "^11.1.0" ajv "^6.5.3" body-parser "^1.17.2" + cookie "^0.4.0" es6-promise "^4.2.4" express "^4.16.3" file-icons-js "^1.0.3" @@ -1951,27 +1966,27 @@ "@theia/workspace" next string-argv "^0.1.1" -"@theia/debug@next": - version "0.16.0-next.46a2d510" - resolved "https://registry.yarnpkg.com/@theia/debug/-/debug-0.16.0-next.46a2d510.tgz#702b7c9a44cab46f368fbafe2776c5ec703f97fb" - integrity sha512-iUvNV3UGFGBFEE0lpBlcLQoklr86Az2G36ORpVw9VPWTHkm21RKdmwY2M0rF1+JnaENz0iFJEVayD2rzNQGTdA== +"@theia/debug@0.17.0-next.c965552a", "@theia/debug@next": + version "0.17.0-next.c965552a" + resolved "https://registry.yarnpkg.com/@theia/debug/-/debug-0.17.0-next.c965552a.tgz#b63ed546455c328ec664d66989e1c89e1cfca27b" + integrity sha512-CCaGZ9T7hCzbT6FW2qwZn7JorBp/F2vjr5ARxUrfSbTZpEbkqayRppcso2Bn2nVeeUyzn1FAlF9JGbQQ+Fd1yw== dependencies: - "@theia/application-package" "0.16.0-next.46a2d510" - "@theia/console" "0.16.0-next.46a2d510" - "@theia/core" "0.16.0-next.46a2d510" - "@theia/editor" "0.16.0-next.46a2d510" - "@theia/filesystem" "0.16.0-next.46a2d510" - "@theia/languages" "0.16.0-next.46a2d510" - "@theia/markers" "0.16.0-next.46a2d510" - "@theia/monaco" "0.16.0-next.46a2d510" - "@theia/output" "0.16.0-next.46a2d510" - "@theia/preferences" "0.16.0-next.46a2d510" - "@theia/process" "0.16.0-next.46a2d510" - "@theia/task" "0.16.0-next.46a2d510" - "@theia/terminal" "0.16.0-next.46a2d510" - "@theia/userstorage" "0.16.0-next.46a2d510" - "@theia/variable-resolver" "0.16.0-next.46a2d510" - "@theia/workspace" "0.16.0-next.46a2d510" + "@theia/application-package" "0.17.0-next.c965552a" + "@theia/console" "0.17.0-next.c965552a" + "@theia/core" "0.17.0-next.c965552a" + "@theia/editor" "0.17.0-next.c965552a" + "@theia/filesystem" "0.17.0-next.c965552a" + "@theia/languages" "0.17.0-next.c965552a" + "@theia/markers" "0.17.0-next.c965552a" + "@theia/monaco" "0.17.0-next.c965552a" + "@theia/output" "0.17.0-next.c965552a" + "@theia/preferences" "0.17.0-next.c965552a" + "@theia/process" "0.17.0-next.c965552a" + "@theia/task" "0.17.0-next.c965552a" + "@theia/terminal" "0.17.0-next.c965552a" + "@theia/userstorage" "0.17.0-next.c965552a" + "@theia/variable-resolver" "0.17.0-next.c965552a" + "@theia/workspace" "0.17.0-next.c965552a" "@types/p-debounce" "^1.0.1" jsonc-parser "^2.0.2" mkdirp "^0.5.0" @@ -1981,21 +1996,21 @@ unzip-stream "^0.3.0" vscode-debugprotocol "^1.32.0" -"@theia/editor@0.16.0-next.46a2d510", "@theia/editor@next": - version "0.16.0-next.46a2d510" - resolved "https://registry.yarnpkg.com/@theia/editor/-/editor-0.16.0-next.46a2d510.tgz#8c49de165b37d64f480626c07bced71572f86182" - integrity sha512-279pJVRGp6tC4psI6ghBa5EiScjWw/2v0zt1UrC2Jz6yEDW24EZTUjKdqOartFbDOg/ZbsyDVG1SXgbjl0s29A== +"@theia/editor@0.17.0-next.c965552a", "@theia/editor@next": + version "0.17.0-next.c965552a" + resolved "https://registry.yarnpkg.com/@theia/editor/-/editor-0.17.0-next.c965552a.tgz#a027f98fce8612d50c2d2efa8c8f6f3b3791309f" + integrity sha512-MNe4ohCqoLtW/Xu1xnllFEKU8SmVPU9MMZlt9CinxSTszk5xzUnBVyGcYnDXpKRkGe/y4s2wndTog1M0rbYEjA== dependencies: - "@theia/core" "0.16.0-next.46a2d510" - "@theia/languages" "0.16.0-next.46a2d510" - "@theia/variable-resolver" "0.16.0-next.46a2d510" + "@theia/core" "0.17.0-next.c965552a" + "@theia/languages" "0.17.0-next.c965552a" + "@theia/variable-resolver" "0.17.0-next.c965552a" "@types/base64-arraybuffer" "0.1.0" base64-arraybuffer "^0.1.5" "@theia/electron@next": - version "0.16.0-next.46a2d510" - resolved "https://registry.yarnpkg.com/@theia/electron/-/electron-0.16.0-next.46a2d510.tgz#fd7fd81ed81afbf720d3f02ae0d6d61b26d66f25" - integrity sha512-4bHVRaGfD2JsnWylKiQjSFkUCV0RQF0RlP6VRV+oaloP/zHm55864Ojc/Vit3wM9g6GQLw3hkmXc29f1hi3ERg== + version "0.17.0-next.c965552a" + resolved "https://registry.yarnpkg.com/@theia/electron/-/electron-0.17.0-next.c965552a.tgz#0a0ee5903c22155e6deae7754dc7691f95ba5c32" + integrity sha512-8+SLJOtmTri3FPWQk21z71FIGN3rq8vgTrXjlbZPUtiqQQ7TJgYocrPF2tJbXmIRRicRX01gZp723JQ/FVIgrg== dependencies: electron "^4.2.11" electron-download "^4.1.1" @@ -2006,26 +2021,26 @@ unzipper "^0.9.11" yargs "^11.1.0" -"@theia/file-search@next": - version "0.16.0-next.46a2d510" - resolved "https://registry.yarnpkg.com/@theia/file-search/-/file-search-0.16.0-next.46a2d510.tgz#29fe6ab3636dad7bee42812a732951dc5aa50402" - integrity sha512-r+OBa9EmkOZTMR05CRUCTlqS+h1LWUmvIT7VhLV0T0fDX72yqQhQ4xJ3EFAMzbYw2vV6QUJqx5324Rcqj11gew== +"@theia/file-search@0.17.0-next.c965552a", "@theia/file-search@next": + version "0.17.0-next.c965552a" + resolved "https://registry.yarnpkg.com/@theia/file-search/-/file-search-0.17.0-next.c965552a.tgz#2a429337a207c64071b2456d198c4a0f12c5a43d" + integrity sha512-pCg+RUmROp2IAM5Z/1oR9pms50xgut1qQ7UsPXnZTQME4ErOeb7NUl0HPfkb1fcAAAYtoVoxIC9B+wIjyrUuLw== dependencies: - "@theia/core" "0.16.0-next.46a2d510" - "@theia/editor" "0.16.0-next.46a2d510" - "@theia/filesystem" "0.16.0-next.46a2d510" - "@theia/process" "0.16.0-next.46a2d510" - "@theia/workspace" "0.16.0-next.46a2d510" + "@theia/core" "0.17.0-next.c965552a" + "@theia/editor" "0.17.0-next.c965552a" + "@theia/filesystem" "0.17.0-next.c965552a" + "@theia/process" "0.17.0-next.c965552a" + "@theia/workspace" "0.17.0-next.c965552a" fuzzy "^0.1.3" vscode-ripgrep "^1.2.4" -"@theia/filesystem@0.16.0-next.46a2d510", "@theia/filesystem@next": - version "0.16.0-next.46a2d510" - resolved "https://registry.yarnpkg.com/@theia/filesystem/-/filesystem-0.16.0-next.46a2d510.tgz#0cb3b7eea68a520034ab14caa91496b58f428fe3" - integrity sha512-Q0CAAml5SbjwzZ9vJGCdOpvTXsZLdgr984Z5XjNUnSQ+RFIcedTXjrb3KKtEVAOjyQsjDtg+QHm5gYOxshpmjA== +"@theia/filesystem@0.17.0-next.c965552a", "@theia/filesystem@next": + version "0.17.0-next.c965552a" + resolved "https://registry.yarnpkg.com/@theia/filesystem/-/filesystem-0.17.0-next.c965552a.tgz#94c9ef357c6aedd8a00d2de014980c6ada873ad8" + integrity sha512-b7Dyt/I5aFCiC5sYaVj2LwarRX1pGUVmVcRJuon53MzXImmVTKSi5LrJOQKmhtJTh4NKcO/Xz+BclAQi7kA2Wg== dependencies: - "@theia/application-package" "0.16.0-next.46a2d510" - "@theia/core" "0.16.0-next.46a2d510" + "@theia/application-package" "0.17.0-next.c965552a" + "@theia/core" "0.17.0-next.c965552a" "@types/body-parser" "^1.17.0" "@types/rimraf" "^2.0.2" "@types/tar-fs" "^1.16.1" @@ -2046,17 +2061,17 @@ zip-dir "^1.0.2" "@theia/git@next": - version "0.16.0-next.46a2d510" - resolved "https://registry.yarnpkg.com/@theia/git/-/git-0.16.0-next.46a2d510.tgz#417eb5c5def7b849dc1d048b58c0f9c3ae8481de" - integrity sha512-oyubEcjEGx+Z7Yq73bNdLrolaUeV5mqUfL80qKda2X9w7enh8+eeiejpRyw8gXe/nq38N33vY6qzlQ2Dqg5RSw== + version "0.17.0-next.c965552a" + resolved "https://registry.yarnpkg.com/@theia/git/-/git-0.17.0-next.c965552a.tgz#a591dae52d0b7ce1ab890e2e13729b89baeaef2a" + integrity sha512-SrjxBuCHi1kb7//EpcGyBlT1vZSvtixwg4brFoyzjIxCGCtMVc80X0pA09ZiE0eXmwMjpIRmBwsU4pH0TKPFEg== dependencies: - "@theia/core" "0.16.0-next.46a2d510" - "@theia/editor" "0.16.0-next.46a2d510" - "@theia/filesystem" "0.16.0-next.46a2d510" - "@theia/languages" "0.16.0-next.46a2d510" - "@theia/navigator" "0.16.0-next.46a2d510" - "@theia/scm" "0.16.0-next.46a2d510" - "@theia/workspace" "0.16.0-next.46a2d510" + "@theia/core" "0.17.0-next.c965552a" + "@theia/editor" "0.17.0-next.c965552a" + "@theia/filesystem" "0.17.0-next.c965552a" + "@theia/languages" "0.17.0-next.c965552a" + "@theia/navigator" "0.17.0-next.c965552a" + "@theia/scm" "0.17.0-next.c965552a" + "@theia/workspace" "0.17.0-next.c965552a" "@types/diff" "^3.2.2" "@types/p-queue" "^2.3.1" diff "^3.4.0" @@ -2068,54 +2083,54 @@ p-queue "^2.4.2" ts-md5 "^1.2.2" -"@theia/languages@0.16.0-next.46a2d510", "@theia/languages@next": - version "0.16.0-next.46a2d510" - resolved "https://registry.yarnpkg.com/@theia/languages/-/languages-0.16.0-next.46a2d510.tgz#6ec2e258bd4533115f2f1fe3e406f0d7510c638e" - integrity sha512-yaBTou1OsVVgilroYxyV8nsquF3/IZmTyVdYVrTSySbpKKK68Y5G6Z33QDtQygWDVADHE81+djg6cNsWtMdSdw== +"@theia/languages@0.17.0-next.c965552a", "@theia/languages@next": + version "0.17.0-next.c965552a" + resolved "https://registry.yarnpkg.com/@theia/languages/-/languages-0.17.0-next.c965552a.tgz#4d49a348341fff02432cf5165f54a9d3f964dd5e" + integrity sha512-sPQUdx3OkgXB/HdSiTP17KPFT7kakM910b3n79CefGF/suCTzQfRBMhAB+Vxe3JXhlNZHIX7AYWnmMKBoKTFsg== dependencies: - "@theia/application-package" "0.16.0-next.46a2d510" - "@theia/core" "0.16.0-next.46a2d510" - "@theia/output" "0.16.0-next.46a2d510" - "@theia/process" "0.16.0-next.46a2d510" - "@theia/workspace" "0.16.0-next.46a2d510" + "@theia/application-package" "0.17.0-next.c965552a" + "@theia/core" "0.17.0-next.c965552a" + "@theia/output" "0.17.0-next.c965552a" + "@theia/process" "0.17.0-next.c965552a" + "@theia/workspace" "0.17.0-next.c965552a" "@typefox/monaco-editor-core" "^0.18.0-next" "@types/uuid" "^3.4.3" monaco-languageclient "^0.10.2" uuid "^3.2.1" -"@theia/markers@0.16.0-next.46a2d510", "@theia/markers@next": - version "0.16.0-next.46a2d510" - resolved "https://registry.yarnpkg.com/@theia/markers/-/markers-0.16.0-next.46a2d510.tgz#bcd29595b473ccb2eecd6f2dab63ce4ed0ddc0bf" - integrity sha512-cqTIwbY3lei+S3QdKYQmoR5zu5ZokCC7VsHsrdDYkuWwO6Pey0/h4gv3ovUvYcX+lU5FSKbS8LJNOyKSUKxtVw== +"@theia/markers@0.17.0-next.c965552a", "@theia/markers@next": + version "0.17.0-next.c965552a" + resolved "https://registry.yarnpkg.com/@theia/markers/-/markers-0.17.0-next.c965552a.tgz#02d6aef26bb86aa7393052a5410f77ffabb1455b" + integrity sha512-tidnHAhh9fTRmHdD3JQItjs4WJUbon0ynvXTFUjz+URm0ps0B8pcrbTUEnutvMCSvVp6rPUE7bV6n0Dn9ejxTw== dependencies: - "@theia/core" "0.16.0-next.46a2d510" - "@theia/filesystem" "0.16.0-next.46a2d510" - "@theia/navigator" "0.16.0-next.46a2d510" - "@theia/workspace" "0.16.0-next.46a2d510" + "@theia/core" "0.17.0-next.c965552a" + "@theia/filesystem" "0.17.0-next.c965552a" + "@theia/navigator" "0.17.0-next.c965552a" + "@theia/workspace" "0.17.0-next.c965552a" -"@theia/messages@next": - version "0.16.0-next.46a2d510" - resolved "https://registry.yarnpkg.com/@theia/messages/-/messages-0.16.0-next.46a2d510.tgz#1ff720e160070c9d3ede14349297b01ec2ad124c" - integrity sha512-sCSS5y+qIuCMHGcDUe5r8025a2FlSSQ/11RRuM4G//dN1rcxNDblKaSJ65mieHrwi1qvU/xYzdjKz55Tw5r0Kg== +"@theia/messages@0.17.0-next.c965552a", "@theia/messages@next": + version "0.17.0-next.c965552a" + resolved "https://registry.yarnpkg.com/@theia/messages/-/messages-0.17.0-next.c965552a.tgz#df6da49a7138cc1336b91525f7d8c506a6bfae0e" + integrity sha512-btm9WRyOdwC86IE4Ej2ULta2/X0jxy+4Shz8KeG/TIsZa7xAFVr3/3CZUbVCoteQgRXnQPmniCAJW8TGTa2z7g== dependencies: - "@theia/core" "0.16.0-next.46a2d510" + "@theia/core" "0.17.0-next.c965552a" lodash.throttle "^4.1.1" markdown-it "^8.4.0" react-perfect-scrollbar "^1.5.3" ts-md5 "^1.2.2" -"@theia/monaco@0.16.0-next.46a2d510", "@theia/monaco@next": - version "0.16.0-next.46a2d510" - resolved "https://registry.yarnpkg.com/@theia/monaco/-/monaco-0.16.0-next.46a2d510.tgz#82fbec75dbe77028fad2651d690afb0c027204f3" - integrity sha512-lI3grLnLJk8vlC1qpcKX7xD8GKcSSRFHaUKVyHS7HsSaGjFp85tGKCdZIQIb2cX650AmKuKve1u2YA7MBEuFaA== +"@theia/monaco@0.17.0-next.c965552a", "@theia/monaco@next": + version "0.17.0-next.c965552a" + resolved "https://registry.yarnpkg.com/@theia/monaco/-/monaco-0.17.0-next.c965552a.tgz#8a316c8b2ad615975becfbcc4be4f1fbbe6241b7" + integrity sha512-ybxM/OUaZ+bSATomDoBVOU++lwoDI6phrgTRdTgD0/IwCelu4ZBRMw/0Kf0toPaJbIrzrKvi2tCmQQW/h0j8IA== dependencies: - "@theia/core" "0.16.0-next.46a2d510" - "@theia/editor" "0.16.0-next.46a2d510" - "@theia/filesystem" "0.16.0-next.46a2d510" - "@theia/languages" "0.16.0-next.46a2d510" - "@theia/markers" "0.16.0-next.46a2d510" - "@theia/outline-view" "0.16.0-next.46a2d510" - "@theia/workspace" "0.16.0-next.46a2d510" + "@theia/core" "0.17.0-next.c965552a" + "@theia/editor" "0.17.0-next.c965552a" + "@theia/filesystem" "0.17.0-next.c965552a" + "@theia/languages" "0.17.0-next.c965552a" + "@theia/markers" "0.17.0-next.c965552a" + "@theia/outline-view" "0.17.0-next.c965552a" + "@theia/workspace" "0.17.0-next.c965552a" deepmerge "2.0.1" fast-plist "^0.1.2" idb "^4.0.5" @@ -2125,14 +2140,14 @@ onigasm "2.2.1" vscode-textmate "^4.0.1" -"@theia/navigator@0.16.0-next.46a2d510", "@theia/navigator@next": - version "0.16.0-next.46a2d510" - resolved "https://registry.yarnpkg.com/@theia/navigator/-/navigator-0.16.0-next.46a2d510.tgz#589c002a9ce9448103dc60589a607cf1b62e6045" - integrity sha512-3BY2RM8WYYdWSJ6RdyeXWiVg7HAJuBJksBH0IQP6eRH1r7ri+eEXMtb6ALi8cTuKO1m+/WIZr0FYK4m2fIIcEg== +"@theia/navigator@0.17.0-next.c965552a", "@theia/navigator@next": + version "0.17.0-next.c965552a" + resolved "https://registry.yarnpkg.com/@theia/navigator/-/navigator-0.17.0-next.c965552a.tgz#5fbe9241fe160993316268887ced7fc56042109c" + integrity sha512-jIhLPIfyyqr480+HcO675O32yM6XXUbxO/6BsawYmMHOxUpRU5md8LcddwCUrX2wPStQcVHxy634sdYQHFPTgA== dependencies: - "@theia/core" "0.16.0-next.46a2d510" - "@theia/filesystem" "0.16.0-next.46a2d510" - "@theia/workspace" "0.16.0-next.46a2d510" + "@theia/core" "0.17.0-next.c965552a" + "@theia/filesystem" "0.17.0-next.c965552a" + "@theia/workspace" "0.17.0-next.c965552a" fuzzy "^0.1.3" minimatch "^3.0.4" @@ -2143,51 +2158,112 @@ dependencies: nan "2.10.0" -"@theia/outline-view@0.16.0-next.46a2d510", "@theia/outline-view@next": - version "0.16.0-next.46a2d510" - resolved "https://registry.yarnpkg.com/@theia/outline-view/-/outline-view-0.16.0-next.46a2d510.tgz#97dd066e0bf9044c9395086329571609a681f99a" - integrity sha512-b1Yd4w7gQ8dWcq4cdUGarYiclMEd7zCB6FsRbtsUftr8zqSeF4he8+Cb0XveGwINqVTf2/kjnKeMSsgDFTdTvA== +"@theia/outline-view@0.17.0-next.c965552a", "@theia/outline-view@next": + version "0.17.0-next.c965552a" + resolved "https://registry.yarnpkg.com/@theia/outline-view/-/outline-view-0.17.0-next.c965552a.tgz#8bbe99426fa6baa4e540acd938bac1167785bceb" + integrity sha512-cZzbaqsrt2ImXhLRpqXixZJ+8qSFHrjSDR3KVOBQHkvpC9TFsbTfvRmEao3Mysw/EB/QaGVswm92bhNybDLIPg== dependencies: - "@theia/core" "0.16.0-next.46a2d510" + "@theia/core" "0.17.0-next.c965552a" -"@theia/output@0.16.0-next.46a2d510": - version "0.16.0-next.46a2d510" - resolved "https://registry.yarnpkg.com/@theia/output/-/output-0.16.0-next.46a2d510.tgz#6595fa7f20850ab30bf6004c3381cdf8d32d8c10" - integrity sha512-mI8Vp8lQJmId0meVpy/MNm1kOiSw5M42zynIILwSdoH6FvLFzrcPugJYFKp4LEIXIL2OX8z/mPhnu2xwjMcv+Q== +"@theia/output@0.17.0-next.c965552a": + version "0.17.0-next.c965552a" + resolved "https://registry.yarnpkg.com/@theia/output/-/output-0.17.0-next.c965552a.tgz#22905afc938324ac71f57dfd7d68c31c25f18957" + integrity sha512-FocNO/uqis6L1HLO18qxo5Ewqulhi5o6Xl8yC39L4fHVfpyzn90Ei5UnfNL1x9aIwqRN8Zf1dxfUjY7HCmMXrw== dependencies: - "@theia/core" "0.16.0-next.46a2d510" + "@theia/core" "0.17.0-next.c965552a" -"@theia/preferences@0.16.0-next.46a2d510", "@theia/preferences@next": - version "0.16.0-next.46a2d510" - resolved "https://registry.yarnpkg.com/@theia/preferences/-/preferences-0.16.0-next.46a2d510.tgz#c4e08b1588d2fc445cdd25e6582dd10f60d79192" - integrity sha512-VPRxjQ73zYoUcqEI7Dt8r8KUaFMvwGN9UnmoHNOSbHINR+X6KE5zrIw0EN8sSieyQTKlCXl5g7rB/zDZQg7KeQ== +"@theia/plugin-ext-vscode@next": + version "0.17.0-next.c965552a" + resolved "https://registry.yarnpkg.com/@theia/plugin-ext-vscode/-/plugin-ext-vscode-0.17.0-next.c965552a.tgz#14e05785efa255ebaa0f38ad869e81148538445a" + integrity sha512-cQrf01QMMj+tFKP+RdLnl0N9ObRzit1ovULC0Bv0J3SL/C3DFlYcEKNcc3p2Q7z8Lf/zRjY35ixSX6AKtV7uEg== dependencies: - "@theia/core" "0.16.0-next.46a2d510" - "@theia/editor" "0.16.0-next.46a2d510" - "@theia/filesystem" "0.16.0-next.46a2d510" - "@theia/monaco" "0.16.0-next.46a2d510" - "@theia/userstorage" "0.16.0-next.46a2d510" - "@theia/workspace" "0.16.0-next.46a2d510" + "@theia/core" "0.17.0-next.c965552a" + "@theia/editor" "0.17.0-next.c965552a" + "@theia/monaco" "0.17.0-next.c965552a" + "@theia/plugin" "0.17.0-next.c965552a" + "@theia/plugin-ext" "0.17.0-next.c965552a" + "@theia/workspace" "0.17.0-next.c965552a" + "@types/request" "^2.0.3" + request "^2.82.0" + +"@theia/plugin-ext@0.17.0-next.c965552a", "@theia/plugin-ext@next": + version "0.17.0-next.c965552a" + resolved "https://registry.yarnpkg.com/@theia/plugin-ext/-/plugin-ext-0.17.0-next.c965552a.tgz#bb35a78681cc812613a6ee6e6b707345dc62d3f5" + integrity sha512-7/d2hhj5pEZZLoo1rNK9bh0Wf7aWfl6PA8t6Km4+gUmm/szBCOzUpG9DXMcF1va82PrzTOzowHVjWOKE3LlqLw== + dependencies: + "@theia/callhierarchy" "0.17.0-next.c965552a" + "@theia/core" "0.17.0-next.c965552a" + "@theia/debug" "0.17.0-next.c965552a" + "@theia/editor" "0.17.0-next.c965552a" + "@theia/file-search" "0.17.0-next.c965552a" + "@theia/filesystem" "0.17.0-next.c965552a" + "@theia/languages" "0.17.0-next.c965552a" + "@theia/markers" "0.17.0-next.c965552a" + "@theia/messages" "0.17.0-next.c965552a" + "@theia/monaco" "0.17.0-next.c965552a" + "@theia/navigator" "0.17.0-next.c965552a" + "@theia/output" "0.17.0-next.c965552a" + "@theia/plugin" "0.17.0-next.c965552a" + "@theia/preferences" "0.17.0-next.c965552a" + "@theia/scm" "0.17.0-next.c965552a" + "@theia/search-in-workspace" "0.17.0-next.c965552a" + "@theia/task" "0.17.0-next.c965552a" + "@theia/terminal" "0.17.0-next.c965552a" + "@theia/workspace" "0.17.0-next.c965552a" + "@types/connect" "^3.4.32" + "@types/mime" "^2.0.1" + "@types/serve-static" "^1.13.3" + connect "^3.7.0" + decompress "^4.2.0" + escape-html "^1.0.3" + jsonc-parser "^2.0.2" + lodash.clonedeep "^4.5.0" + macaddress "^0.2.9" + mime "^2.4.4" + ps-tree "^1.2.0" + request "^2.82.0" + serve-static "^1.14.1" + uuid "^3.2.1" + vhost "^3.0.2" + vscode-debugprotocol "^1.32.0" + vscode-textmate "^4.0.1" + +"@theia/plugin@0.17.0-next.c965552a": + version "0.17.0-next.c965552a" + resolved "https://registry.yarnpkg.com/@theia/plugin/-/plugin-0.17.0-next.c965552a.tgz#b8ecefeee1e95845ab9cd31e47493f4a11c12a05" + integrity sha512-alPJwaWHLFCxQ0NS5cjGZmqyNWSlrFHWjC5/M+oHML+whGpGfWSPa8A6ZPKVaZZ84BTKssx6+hSaELRI99NkMg== + +"@theia/preferences@0.17.0-next.c965552a", "@theia/preferences@next": + version "0.17.0-next.c965552a" + resolved "https://registry.yarnpkg.com/@theia/preferences/-/preferences-0.17.0-next.c965552a.tgz#2436b6b25b5224208b242c784a4d41ed8498858a" + integrity sha512-SZc2fpfCBg5KUDQO6lLkIjpmAvNaBMhUrcBQj2X2K1BWGRhDpvgQVOS1iu+Pzz1L0b6pKi+ZK6RMJA1TJobz4A== + dependencies: + "@theia/core" "0.17.0-next.c965552a" + "@theia/editor" "0.17.0-next.c965552a" + "@theia/filesystem" "0.17.0-next.c965552a" + "@theia/monaco" "0.17.0-next.c965552a" + "@theia/userstorage" "0.17.0-next.c965552a" + "@theia/workspace" "0.17.0-next.c965552a" jsonc-parser "^2.0.2" -"@theia/process@0.16.0-next.46a2d510", "@theia/process@next": - version "0.16.0-next.46a2d510" - resolved "https://registry.yarnpkg.com/@theia/process/-/process-0.16.0-next.46a2d510.tgz#466839f5dfed9a698e193cfcf345ccdf8973039d" - integrity sha512-1IFACJTmwkezYC5E7PikMflULLtF9Lxv1Y8oXZQFRlIIy/DrA8oIaqFH7RBTTXT0XLhkeRm4uUonQX918LWRGA== +"@theia/process@0.17.0-next.c965552a", "@theia/process@next": + version "0.17.0-next.c965552a" + resolved "https://registry.yarnpkg.com/@theia/process/-/process-0.17.0-next.c965552a.tgz#9fafd8a0abc3616e85244bddde88f6aa49575421" + integrity sha512-50rejixnoSnmr3GObsxsOhyCN2YPpn9MfHPn9FXDwuwXCFxD+sODda3sorAHHxaEx0vojdVLnDqm/EBVLLPeOg== dependencies: - "@theia/core" "0.16.0-next.46a2d510" + "@theia/core" "0.17.0-next.c965552a" "@theia/node-pty" "0.7.8-theia004" string-argv "^0.1.1" -"@theia/scm@0.16.0-next.46a2d510": - version "0.16.0-next.46a2d510" - resolved "https://registry.yarnpkg.com/@theia/scm/-/scm-0.16.0-next.46a2d510.tgz#35dbc1bd28f2e88f8182f3eb502e2180318b53dd" - integrity sha512-hIpt4v7n4FQB0gigTsCpJw5SfgODmBH2F/smQCBmcsuDjnivAZVJ2DC02oaW4YiHyjEKZFSdnsqdMfFYHivLWw== +"@theia/scm@0.17.0-next.c965552a": + version "0.17.0-next.c965552a" + resolved "https://registry.yarnpkg.com/@theia/scm/-/scm-0.17.0-next.c965552a.tgz#b4e6b6f73bf7754987b36cea930ee3dc2a52d5af" + integrity sha512-RpgfG7q5Gfbe0yaOGss0F52G32pLGFrdJ/vDYWn2M7Qtb++bEBeMCMyy+SA+zgrzbu1Gn2kJvKu6MFBziS74zQ== dependencies: - "@theia/core" "0.16.0-next.46a2d510" - "@theia/editor" "0.16.0-next.46a2d510" - "@theia/filesystem" "0.16.0-next.46a2d510" - "@theia/navigator" "0.16.0-next.46a2d510" + "@theia/core" "0.17.0-next.c965552a" + "@theia/editor" "0.17.0-next.c965552a" + "@theia/filesystem" "0.17.0-next.c965552a" + "@theia/navigator" "0.17.0-next.c965552a" "@types/diff" "^3.2.2" "@types/p-debounce" "^1.0.1" diff "^3.4.0" @@ -2195,82 +2271,74 @@ react-autosize-textarea "^7.0.0" ts-md5 "^1.2.2" -"@theia/search-in-workspace@next": - version "0.16.0-next.46a2d510" - resolved "https://registry.yarnpkg.com/@theia/search-in-workspace/-/search-in-workspace-0.16.0-next.46a2d510.tgz#ecb104d6bded534db3963b302f5ba8b3d4e5aad5" - integrity sha512-2pkbXzE2178akqJ+mnZ33sU/SHlGKUbqIxWa0bZcalUpoInyjzYsQHSCZ/X70kr81ujlwQvBXTrU0YCVTAP3yg== +"@theia/search-in-workspace@0.17.0-next.c965552a", "@theia/search-in-workspace@next": + version "0.17.0-next.c965552a" + resolved "https://registry.yarnpkg.com/@theia/search-in-workspace/-/search-in-workspace-0.17.0-next.c965552a.tgz#c90c6a695d7a443e72b470d51106272d958edf89" + integrity sha512-38TuDlggF4nn+rY92VzuXUhCvlyJxcYhy6FEMYmQEUxeDmHcOwOHiJfs0uMRlfPoEaA84vKqgECstK840rBrSA== dependencies: - "@theia/core" "0.16.0-next.46a2d510" - "@theia/editor" "0.16.0-next.46a2d510" - "@theia/filesystem" "0.16.0-next.46a2d510" - "@theia/navigator" "0.16.0-next.46a2d510" - "@theia/process" "0.16.0-next.46a2d510" - "@theia/workspace" "0.16.0-next.46a2d510" + "@theia/core" "0.17.0-next.c965552a" + "@theia/editor" "0.17.0-next.c965552a" + "@theia/filesystem" "0.17.0-next.c965552a" + "@theia/navigator" "0.17.0-next.c965552a" + "@theia/process" "0.17.0-next.c965552a" + "@theia/workspace" "0.17.0-next.c965552a" vscode-ripgrep "^1.2.4" -"@theia/task@0.16.0-next.46a2d510", "@theia/task@next": - version "0.16.0-next.46a2d510" - resolved "https://registry.yarnpkg.com/@theia/task/-/task-0.16.0-next.46a2d510.tgz#004ca4f4256351c63602332798dd6d98e3c387cf" - integrity sha512-390Meof3StbHNBNfQY8f/opNBj/IZN8z/ZjhRNf/0vtu1b6aZGMo1z/9e8eLcCwDyAdFvSCHRk1bny+rhB4//w== +"@theia/task@0.17.0-next.c965552a", "@theia/task@next": + version "0.17.0-next.c965552a" + resolved "https://registry.yarnpkg.com/@theia/task/-/task-0.17.0-next.c965552a.tgz#826fcd51460f76e95bb73c842bacc02481a0f51b" + integrity sha512-nEpv5zmAHLPabXMojBlVu2BBsgBbWH0/+fY3aWu9irqtagfdP1dGs1zGYuMhvv9gVjdDiccMGojJ+yvlV2xEHg== dependencies: - "@theia/core" "0.16.0-next.46a2d510" - "@theia/editor" "0.16.0-next.46a2d510" - "@theia/filesystem" "0.16.0-next.46a2d510" - "@theia/markers" "0.16.0-next.46a2d510" - "@theia/monaco" "0.16.0-next.46a2d510" - "@theia/preferences" "0.16.0-next.46a2d510" - "@theia/process" "0.16.0-next.46a2d510" - "@theia/terminal" "0.16.0-next.46a2d510" - "@theia/variable-resolver" "0.16.0-next.46a2d510" - "@theia/workspace" "0.16.0-next.46a2d510" + "@theia/core" "0.17.0-next.c965552a" + "@theia/editor" "0.17.0-next.c965552a" + "@theia/filesystem" "0.17.0-next.c965552a" + "@theia/markers" "0.17.0-next.c965552a" + "@theia/monaco" "0.17.0-next.c965552a" + "@theia/preferences" "0.17.0-next.c965552a" + "@theia/process" "0.17.0-next.c965552a" + "@theia/terminal" "0.17.0-next.c965552a" + "@theia/variable-resolver" "0.17.0-next.c965552a" + "@theia/workspace" "0.17.0-next.c965552a" ajv "^6.5.3" jsonc-parser "^2.0.2" p-debounce "^2.1.0" vscode-uri "^1.0.8" -"@theia/terminal@0.16.0-next.46a2d510", "@theia/terminal@next": - version "0.16.0-next.46a2d510" - resolved "https://registry.yarnpkg.com/@theia/terminal/-/terminal-0.16.0-next.46a2d510.tgz#855eaef12d1ddf4d61b5a75b3eb3d4b5a1b87d44" - integrity sha512-h2L2N3A8IddjFf795puqfov8Bo5toxwNpJxTM9vbFTxS+61Xg1SvxQrJIsFL0IB2fGMjonYd6RC5KhV5yRFlIw== +"@theia/terminal@0.17.0-next.c965552a", "@theia/terminal@next": + version "0.17.0-next.c965552a" + resolved "https://registry.yarnpkg.com/@theia/terminal/-/terminal-0.17.0-next.c965552a.tgz#f092667838deac1697be09993ce8eaf048973277" + integrity sha512-YbMCnNHPZGe9urYhRZU2WOxRxhSZitsqkXzXzGHViJD0WId7NylVY3BLmEvY++mbA0Zgz5Shc1pU7Jysvkk6dA== dependencies: - "@theia/core" "0.16.0-next.46a2d510" - "@theia/editor" "0.16.0-next.46a2d510" - "@theia/filesystem" "0.16.0-next.46a2d510" - "@theia/process" "0.16.0-next.46a2d510" - "@theia/workspace" "0.16.0-next.46a2d510" + "@theia/core" "0.17.0-next.c965552a" + "@theia/editor" "0.17.0-next.c965552a" + "@theia/filesystem" "0.17.0-next.c965552a" + "@theia/process" "0.17.0-next.c965552a" + "@theia/workspace" "0.17.0-next.c965552a" xterm "3.13.0" -"@theia/textmate-grammars@next": - version "0.16.0-next.46a2d510" - resolved "https://registry.yarnpkg.com/@theia/textmate-grammars/-/textmate-grammars-0.16.0-next.46a2d510.tgz#853cdf3aa99f8443e626e65aa3d72ffdcda2bae1" - integrity sha512-f7rsL9aQD2OvZNaBwMu1sD2jctQawQNLe9l6+nuaoH8bR+mnIbusG8BaKeATD4rU53EKRwVxXQa3oD+r+3YSDA== +"@theia/userstorage@0.17.0-next.c965552a": + version "0.17.0-next.c965552a" + resolved "https://registry.yarnpkg.com/@theia/userstorage/-/userstorage-0.17.0-next.c965552a.tgz#cd8b9123a53fca494c4e4d585bed8a2b3b25a6c8" + integrity sha512-X3n9omgMl9eEMxwgrImZ2r/LMEJGs0M0/AulZOdvhr5G0cUDqAJAiqsc+EAnJbHfmufloTgC6e+syWQGF/ocCg== dependencies: - "@theia/monaco" "0.16.0-next.46a2d510" - vscode-textmate "^4.0.1" + "@theia/core" "0.17.0-next.c965552a" + "@theia/filesystem" "0.17.0-next.c965552a" -"@theia/userstorage@0.16.0-next.46a2d510": - version "0.16.0-next.46a2d510" - resolved "https://registry.yarnpkg.com/@theia/userstorage/-/userstorage-0.16.0-next.46a2d510.tgz#165746832a0e6b047b27258861b9ae727d4f3a23" - integrity sha512-ZYQs3nxWm8Tv3S6V0mmVunXfTWReBNUH1IzQpzwe5Sh7yJNg/UcNEPSgCjgjPrG9kbpmp4xnztmwMuWPnM4gTg== +"@theia/variable-resolver@0.17.0-next.c965552a", "@theia/variable-resolver@next": + version "0.17.0-next.c965552a" + resolved "https://registry.yarnpkg.com/@theia/variable-resolver/-/variable-resolver-0.17.0-next.c965552a.tgz#5e0f4153a096229fe454a8a0ba4e47c236995057" + integrity sha512-GvU69JbuRkHAEGkQ4+j0QXACbDu6mbkzDJx2AdGUa0feqGslIzEB+LC50b/PSGL8E4NILm7cWriu+G0M59PlEg== dependencies: - "@theia/core" "0.16.0-next.46a2d510" - "@theia/filesystem" "0.16.0-next.46a2d510" + "@theia/core" "0.17.0-next.c965552a" -"@theia/variable-resolver@0.16.0-next.46a2d510", "@theia/variable-resolver@next": - version "0.16.0-next.46a2d510" - resolved "https://registry.yarnpkg.com/@theia/variable-resolver/-/variable-resolver-0.16.0-next.46a2d510.tgz#2b3f81d419d513e2b69139e407a51444ff176373" - integrity sha512-a7lRTP8MqIvkkYL+qpuCoQkAg8rc78GRY78K2yImIVj1gd4G70QWI3j9yfyMxyxVKZcg5iFOMryStvuMf8YgeQ== +"@theia/workspace@0.17.0-next.c965552a", "@theia/workspace@next": + version "0.17.0-next.c965552a" + resolved "https://registry.yarnpkg.com/@theia/workspace/-/workspace-0.17.0-next.c965552a.tgz#01b21a24956560fe99a3f660bd0866ea8dca6678" + integrity sha512-qaYCb9b+yfL/ivAeLHZI2RCplIAFM4eIoA643durhvx4OfLheKz51z58tgKg/LOeWVIlZwUGWbxBP9+q8m4VSg== dependencies: - "@theia/core" "0.16.0-next.46a2d510" - -"@theia/workspace@0.16.0-next.46a2d510", "@theia/workspace@next": - version "0.16.0-next.46a2d510" - resolved "https://registry.yarnpkg.com/@theia/workspace/-/workspace-0.16.0-next.46a2d510.tgz#ea455eb505ab38476c3cff3384960960211b272e" - integrity sha512-UBO77QeAKJAc8New9pmNGKDeiNS4Ni9wwAldzoYa6+IUiAd6ZElwy2WMBFlCMEgjERuBpmhkXQ6pvXI9KD7rzw== - dependencies: - "@theia/core" "0.16.0-next.46a2d510" - "@theia/filesystem" "0.16.0-next.46a2d510" - "@theia/variable-resolver" "0.16.0-next.46a2d510" + "@theia/core" "0.17.0-next.c965552a" + "@theia/filesystem" "0.17.0-next.c965552a" + "@theia/variable-resolver" "0.17.0-next.c965552a" ajv "^6.5.3" jsonc-parser "^2.0.2" moment "^2.21.0" @@ -2316,18 +2384,30 @@ resolved "https://registry.yarnpkg.com/@types/chai/-/chai-4.2.9.tgz#194332625ed2ae914aef00b8d5ca3b77e7924cc6" integrity sha512-NeXgZj+MFL4izGqA4sapdYzkzQG+MtGra9vhQ58dnmDY++VgJaRUws+aLVV5zRJCYJl/8s9IjMmhiUw1WsKSmw== -"@types/connect@*": +"@types/connect@*", "@types/connect@^3.4.32": version "3.4.33" resolved "https://registry.yarnpkg.com/@types/connect/-/connect-3.4.33.tgz#31610c901eca573b8713c3330abc6e6b9f588546" integrity sha512-2+FrkXY4zllzTNfJth7jOqEHC+enpLeGslEhpnTAkg21GkRrWV4SsAtqchtT4YS9/nODBU2/ZfsBY2X4J/dX7A== dependencies: "@types/node" "*" +"@types/cookie@^0.3.3": + version "0.3.3" + resolved "https://registry.yarnpkg.com/@types/cookie/-/cookie-0.3.3.tgz#85bc74ba782fb7aa3a514d11767832b0e3bc6803" + integrity sha512-LKVP3cgXBT9RYj+t+9FDKwS5tdI+rPBXaNSkma7hvqy35lc7mAokC2zsqWJH0LaqIt3B962nuYI77hsJoT1gow== + "@types/dateformat@^3.0.1": version "3.0.1" resolved "https://registry.yarnpkg.com/@types/dateformat/-/dateformat-3.0.1.tgz#98d747a2e5e9a56070c6bf14e27bff56204e34cc" integrity sha512-KlPPdikagvL6ELjWsljbyDIPzNCeliYkqRpI+zea99vBBbCIA5JNshZAwQKTON139c87y9qvTFVgkFd14rtS4g== +"@types/deepmerge@^2.2.0": + version "2.2.0" + resolved "https://registry.yarnpkg.com/@types/deepmerge/-/deepmerge-2.2.0.tgz#6f63896c217f3164782f52d858d9f3a927139f64" + integrity sha512-FEQYDHh6+Q+QXKSrIY46m+/lAmAj/bk4KpLaam+hArmzaVpMBHLcfwOH2Q2UOkWM7XsdY9PmZpGyPAjh/JRGhQ== + dependencies: + deepmerge "*" + "@types/diff@^3.2.2": version "3.5.3" resolved "https://registry.yarnpkg.com/@types/diff/-/diff-3.5.3.tgz#7c6c3721ba454d838790100faf7957116ee7deab" @@ -2371,11 +2451,25 @@ "@types/minimatch" "*" "@types/node" "*" +"@types/glob@^5.0.35": + version "5.0.36" + resolved "https://registry.yarnpkg.com/@types/glob/-/glob-5.0.36.tgz#0c80a9c8664fc7d19781de229f287077fd622cb2" + integrity sha512-KEzSKuP2+3oOjYYjujue6Z3Yqis5HKA1BsIC+jZ1v3lrRNdsqyNNtX0rQf6LSuI4DJJ2z5UV//zBZCcvM0xikg== + dependencies: + "@types/events" "*" + "@types/minimatch" "*" + "@types/node" "*" + "@types/google-protobuf@^3.7.1": version "3.7.2" resolved "https://registry.yarnpkg.com/@types/google-protobuf/-/google-protobuf-3.7.2.tgz#cd8a360c193ce4d672575a20a79f49ba036d38d2" integrity sha512-ifFemzjNchFBCtHS6bZNhSZCBu7tbtOe0e8qY0z2J4HtFXmPJjm6fXSaQsTG7yhShBEZtt2oP/bkwu5k+emlkQ== +"@types/js-yaml@^3.12.2": + version "3.12.2" + resolved "https://registry.yarnpkg.com/@types/js-yaml/-/js-yaml-3.12.2.tgz#a35a1809c33a68200fb6403d1ad708363c56470a" + integrity sha512-0CFu/g4mDSNkodVwWijdlr8jH7RoplRWNgovjFLEZeT+QEbbZXjBmCe3HwaWheAlCbHwomTwzZoSedeOycABug== + "@types/lodash.debounce@4.0.3": version "4.0.3" resolved "https://registry.yarnpkg.com/@types/lodash.debounce/-/lodash.debounce-4.0.3.tgz#d712aee9e6136be77f70523ed9f0fc049a6cf15a" @@ -2383,6 +2477,13 @@ dependencies: "@types/lodash" "*" +"@types/lodash.debounce@^4.0.6": + version "4.0.6" + resolved "https://registry.yarnpkg.com/@types/lodash.debounce/-/lodash.debounce-4.0.6.tgz#c5a2326cd3efc46566c47e4c0aa248dc0ee57d60" + integrity sha512-4WTmnnhCfDvvuLMaF3KV4Qfki93KebocUF45msxhYyjMttZDQYzHkO639ohhk8+oco2cluAFL3t5+Jn4mleylQ== + dependencies: + "@types/lodash" "*" + "@types/lodash.throttle@^4.1.3": version "4.1.6" resolved "https://registry.yarnpkg.com/@types/lodash.throttle/-/lodash.throttle-4.1.6.tgz#f5ba2c22244ee42ff6c2c49e614401a870c1009c" @@ -2400,7 +2501,7 @@ resolved "https://registry.yarnpkg.com/@types/mime-types/-/mime-types-2.1.0.tgz#9ca52cda363f699c69466c2a6ccdaad913ea7a73" integrity sha1-nKUs2jY/aZxpRmwqbM2q2RPqenM= -"@types/mime@*": +"@types/mime@*", "@types/mime@^2.0.1": version "2.0.1" resolved "https://registry.yarnpkg.com/@types/mime/-/mime-2.0.1.tgz#dc488842312a7f075149312905b5e3c0b054c79d" integrity sha512-FwI9gX75FgVBJ7ywgnq/P7tw+/o1GUbtP0KzbtusLigAOgIgNISRK0ZPl4qertvXSIE8YbsVJueQ90cDt9YYyw== @@ -2430,14 +2531,14 @@ integrity sha512-NYrtPht0wGzhwe9+/idPaBB+TqkY9AhTvOLMkThm0IoEfLaiVQZwBwyJ5puCkO3AUCWrmcoePjp2mbFocKy4SQ== "@types/node@*", "@types/node@>= 8": - version "13.7.1" - resolved "https://registry.yarnpkg.com/@types/node/-/node-13.7.1.tgz#238eb34a66431b71d2aaddeaa7db166f25971a0d" - integrity sha512-Zq8gcQGmn4txQEJeiXo/KiLpon8TzAl0kmKH4zdWctPj05nWwp1ClMdAVEloqrQKfaC48PNLdgN/aVaLqUrluA== + version "13.7.6" + resolved "https://registry.yarnpkg.com/@types/node/-/node-13.7.6.tgz#cb734a7c191472ae6a2b3a502b4dfffcea974113" + integrity sha512-eyK7MWD0R1HqVTp+PtwRgFeIsemzuj4gBFSQxfPHY5iMjS7474e5wq+VFgTcdpyHeNxyKSaetYAjdMLJlKoWqA== "@types/node@^10.12.18", "@types/node@^10.14.22": - version "10.17.15" - resolved "https://registry.yarnpkg.com/@types/node/-/node-10.17.15.tgz#bfff4e23e9e70be6eec450419d51e18de1daf8e7" - integrity sha512-daFGV9GSs6USfPgxceDA8nlSe48XrVCJfDeYm7eokxq/ye7iuOH87hKXgMtEAVLFapkczbZsx868PMDT1Y0a6A== + version "10.17.16" + resolved "https://registry.yarnpkg.com/@types/node/-/node-10.17.16.tgz#ee96ddac1a38d98d2c8a71c7df0cdad5758e8993" + integrity sha512-A4283YSA1OmnIivcpy/4nN86YlnKRiQp8PYwI2KdPCONEBN093QTb0gCtERtkLyVNGKKIGazTZ2nAmVzQU51zA== "@types/p-debounce@^1.0.1": version "1.0.1" @@ -2467,9 +2568,9 @@ integrity sha512-rm5GU5sefQpg2d/DQ+fMDZnl9aPiJjJ9FYA12isIocNTZqu9VDZRgCRBx3oYFEdmDpmPmY4hxxmY/+1a84Rtzg== "@types/puppeteer@^2.0.0": - version "2.0.0" - resolved "https://registry.yarnpkg.com/@types/puppeteer/-/puppeteer-2.0.0.tgz#82c04f93367e2d3396e371a71be1167332148838" - integrity sha512-QPHXIcaPcijMbvizoM7PRL97Rm+aM8J2DmgTz2tt79b15PqbyeaCppYonvPLHQ/Q5ea92BUHDpv4bsqtiTy8kQ== + version "2.0.1" + resolved "https://registry.yarnpkg.com/@types/puppeteer/-/puppeteer-2.0.1.tgz#83a1d7f0a1c2e0edbbb488b4d8fb54b14ec9d455" + integrity sha512-G8vEyU83Bios+dzs+DZGpAirDmMqRhfFBJCkFrg+A5+6n5EPPHxwBLImJto3qjh0mrBXbLBCyuahhhtTrAfR5g== dependencies: "@types/node" "*" @@ -2495,9 +2596,9 @@ "@types/react-transition-group" "*" "@types/react-transition-group@*": - version "4.2.3" - resolved "https://registry.yarnpkg.com/@types/react-transition-group/-/react-transition-group-4.2.3.tgz#4924133f7268694058e415bf7aea2d4c21131470" - integrity sha512-Hk8jiuT7iLOHrcjKP/ZVSyCNXK73wJAUz60xm0mVhiRujrdiI++j4duLiL282VGxwAgxetHQFfqA29LgEeSkFA== + version "4.2.4" + resolved "https://registry.yarnpkg.com/@types/react-transition-group/-/react-transition-group-4.2.4.tgz#c7416225987ccdb719262766c1483da8f826838d" + integrity sha512-8DMUaDqh0S70TjkqU0DxOu80tFUiiaS9rxkWip/nb7gtvAsbqOXm02UCmR8zdcjWujgeYPiPNTVpVpKzUDotwA== dependencies: "@types/react" "*" @@ -2510,9 +2611,9 @@ "@types/react" "*" "@types/react@*", "@types/react@^16.4.1": - version "16.9.19" - resolved "https://registry.yarnpkg.com/@types/react/-/react-16.9.19.tgz#c842aa83ea490007d29938146ff2e4d9e4360c40" - integrity sha512-LJV97//H+zqKWMms0kvxaKYJDG05U2TtQB3chRLF8MPNs+MQh/H1aGlyDUxjaHvu08EAGerdX2z4LTBc7ns77A== + version "16.9.23" + resolved "https://registry.yarnpkg.com/@types/react/-/react-16.9.23.tgz#1a66c6d468ba11a8943ad958a8cb3e737568271c" + integrity sha512-SsGVT4E7L2wLN3tPYLiF20hmZTPGuzaayVunfgXzUn1x4uHVsKH6QDJQ/TdpHqwsTLd4CwrmQ2vOgxN7gE24gw== dependencies: "@types/prop-types" "*" csstype "^2.2.0" @@ -2528,9 +2629,9 @@ form-data "^2.5.0" "@types/requestretry@^1.12.3": - version "1.12.5" - resolved "https://registry.yarnpkg.com/@types/requestretry/-/requestretry-1.12.5.tgz#c8abf9eb173a9c61d7099ca378acca3e8a483007" - integrity sha512-iEs/MpRq8E+4V4wu9OseeHI0AtgLns4a+/jukKOjUJmVh36Ai+r4E5603pQwRx6mQrS0dhuq319crz8Q9lyBkA== + version "1.12.6" + resolved "https://registry.yarnpkg.com/@types/requestretry/-/requestretry-1.12.6.tgz#295bf2bc8e9e0408ff8196e7f6e5bd0db90d3ac5" + integrity sha512-d/n2yiYMmouflwA2sgLJVhNeO00zx7UeCLlTW1xUpnq84Gg4NnPbKyEObyOzfSo91v4OKWwHvoB32rPGIB/VpA== dependencies: "@types/node" "*" "@types/request" "*" @@ -2553,7 +2654,7 @@ resolved "https://registry.yarnpkg.com/@types/semver/-/semver-5.5.0.tgz#146c2a29ee7d3bae4bf2fcb274636e264c813c45" integrity sha512-41qEJgBH/TWgo5NFSvBCJ1qkoi3Q6ONSF2avrHq1LVEZfYpdHmj0y9SuTK+u9ZhG1sYQKBL1AWXKyLWP4RaUoQ== -"@types/serve-static@*": +"@types/serve-static@*", "@types/serve-static@^1.13.3": version "1.13.3" resolved "https://registry.yarnpkg.com/@types/serve-static/-/serve-static-1.13.3.tgz#eb7e1c41c4468272557e897e9171ded5e2ded9d1" integrity sha512-oprSwp094zOglVrXdlo/4bAHtKTAxX6VT8FOZlBKrmyLbNvE1zxZyJ6yikMVtHIvwP45+ZQGJn+FdXGKTozq0g== @@ -2594,6 +2695,13 @@ "@types/minipass" "*" "@types/node" "*" +"@types/temp@^0.8.34": + version "0.8.34" + resolved "https://registry.yarnpkg.com/@types/temp/-/temp-0.8.34.tgz#03e4b3cb67cbb48c425bbf54b12230fef85540ac" + integrity sha512-oLa9c5LHXgS6UimpEVp08De7QvZ+Dfu5bMQuWyMhf92Z26Q10ubEMOWy9OEfUdzW7Y/sDWVHmUaLFtmnX/2j0w== + dependencies: + "@types/node" "*" + "@types/touch@0.0.1": version "0.0.1" resolved "https://registry.yarnpkg.com/@types/touch/-/touch-0.0.1.tgz#10289d42e80530f3997f3413eab1ac6ef9027d0c" @@ -2612,9 +2720,9 @@ source-map "^0.6.1" "@types/uuid@^3.4.3": - version "3.4.7" - resolved "https://registry.yarnpkg.com/@types/uuid/-/uuid-3.4.7.tgz#51d42247473bc00e38cc8dfaf70d936842a36c03" - integrity sha512-C2j2FWgQkF1ru12SjZJyMaTPxs/f6n90+5G5qNakBxKXjTBc/YTSelHh4Pz1HUDwxFXD9WvpQhOGCDC+/Y4mIQ== + version "3.4.8" + resolved "https://registry.yarnpkg.com/@types/uuid/-/uuid-3.4.8.tgz#4ba887fcef88bd9a7515ca2de336d691e3e18318" + integrity sha512-zHWce3allXWSmRx6/AGXKCtSOA7JjeWd2L3t4aHfysNk8mouQnWCocveaT7a4IEIlPVHp81jzlnknqTgCjCLXA== "@types/webpack-sources@*": version "0.1.6" @@ -2626,9 +2734,9 @@ source-map "^0.6.1" "@types/webpack@^4.41.2": - version "4.41.6" - resolved "https://registry.yarnpkg.com/@types/webpack/-/webpack-4.41.6.tgz#c76afbdef59159d12e3e1332dc264b75574722a2" - integrity sha512-iWRpV5Ej+8uKrgxp6jXz3v7ZTjgtuMXY+rsxQjFNU0hYCnHkpA7vtiNffgxjuxX4feFHBbz0IF76OzX2OqDYPw== + version "4.41.7" + resolved "https://registry.yarnpkg.com/@types/webpack/-/webpack-4.41.7.tgz#22be27dbd4362b01c3954ca9b021dbc9328d9511" + integrity sha512-OQG9viYwO0V1NaNV7d0n79V+n6mjOV30CwgFPIfTzwmk8DHbt+C4f2aBGdCYbo3yFyYD6sjXfqqOjwkl1j+ulA== dependencies: "@types/anymatch" "*" "@types/node" "*" @@ -2888,9 +2996,9 @@ ajv-keywords@^3.1.0, ajv-keywords@^3.4.1: integrity sha512-RO1ibKvd27e6FEShVFfPALuHI3WjSVNeK5FIsmme/LYRNxjKuNj+Dt7bucLa6NdSv3JcVTyMlm9kGR84z1XpaQ== ajv@^6.1.0, ajv@^6.10.2, ajv@^6.5.3, ajv@^6.5.5: - version "6.11.0" - resolved "https://registry.yarnpkg.com/ajv/-/ajv-6.11.0.tgz#c3607cbc8ae392d8a5a536f25b21f8e5f3f87fe9" - integrity sha512-nCprB/0syFYy9fVYU1ox1l2KN8S9I+tziH8D4zdZuLT3N6RMlGSGt5FSTpAiHB/Whv8Qs1cWHma1aMKZyaHRKA== + version "6.12.0" + resolved "https://registry.yarnpkg.com/ajv/-/ajv-6.12.0.tgz#06d60b96d87b8454a5adaba86e7854da629db4b7" + integrity sha512-D6gFiFA0RRLyUbvijN74DWAjXSFxWKaWP7mldxkVhyhAV3+SWA9HEJPHQ2c9soIeTFJqcSdFDGFgdqs1iUU2Hw== dependencies: fast-deep-equal "^3.1.1" fast-json-stable-stringify "^2.0.0" @@ -3667,9 +3775,9 @@ babel-plugin-dynamic-import-node@^2.3.0: object.assign "^4.1.0" babel-plugin-emotion@^10.0.27: - version "10.0.27" - resolved "https://registry.yarnpkg.com/babel-plugin-emotion/-/babel-plugin-emotion-10.0.27.tgz#59001cf5de847c1d61f2079cd906a90a00d3184f" - integrity sha512-SUNYcT4FqhOqvwv0z1oeYhqgheU8qrceLojuHyX17ngo7WtWqN5I9l3IGHzf21Xraj465CVzF4IvOlAF+3ed0A== + version "10.0.28" + resolved "https://registry.yarnpkg.com/babel-plugin-emotion/-/babel-plugin-emotion-10.0.28.tgz#731133577795ea04e5b1d11aff247fa0ad3fd364" + integrity sha512-h25EMmPxYVNOgsEkGIjCv2Ok+HzW/e/b5lf2v2U17T9k6y6g0ku3TG9b+jy94ZrqMh+b/njRF4uOQrwVr28QfQ== dependencies: "@babel/helper-module-imports" "^7.0.0" "@emotion/hash" "0.7.4" @@ -4423,13 +4531,13 @@ browserslist@^1.3.6, browserslist@^1.5.2, browserslist@^1.7.6: electron-to-chromium "^1.2.7" browserslist@^4.8.3, browserslist@^4.8.5: - version "4.8.6" - resolved "https://registry.yarnpkg.com/browserslist/-/browserslist-4.8.6.tgz#96406f3f5f0755d272e27a66f4163ca821590a7e" - integrity sha512-ZHao85gf0eZ0ESxLfCp73GG9O/VTytYDIkIiZDlURppLTI9wErSM/5yAKEq6rcUdxBLjMELmrYUJGg5sxGKMHg== + version "4.9.0" + resolved "https://registry.yarnpkg.com/browserslist/-/browserslist-4.9.0.tgz#ff85c390889e0f754d7bd8ad13412575cdcf5dc7" + integrity sha512-seffIXhwgB84+OCeT/aMjpZnsAsYDiMSC+CEs3UkF8iU64BZGYcu+TZYs/IBpo4nRi0vJywUJWYdbTsOhFTweg== dependencies: - caniuse-lite "^1.0.30001023" - electron-to-chromium "^1.3.341" - node-releases "^1.1.47" + caniuse-lite "^1.0.30001030" + electron-to-chromium "^1.3.361" + node-releases "^1.1.50" btoa-lite@^1.0.0: version "1.0.0" @@ -4686,14 +4794,14 @@ caniuse-api@^1.5.2: lodash.uniq "^4.5.0" caniuse-db@^1.0.30000529, caniuse-db@^1.0.30000634, caniuse-db@^1.0.30000639: - version "1.0.30001027" - resolved "https://registry.yarnpkg.com/caniuse-db/-/caniuse-db-1.0.30001027.tgz#45dce6c61128324c4534e18ceff6e58e8de76694" - integrity sha512-Ublzr9IN2X91lTvJzehRUlK+hREae1Hi+0TIh7rH5fAcsuPWycwBAszhRGF22gf5xbDXXUdYQ6fSfPSQEqQhkw== + version "1.0.30001030" + resolved "https://registry.yarnpkg.com/caniuse-db/-/caniuse-db-1.0.30001030.tgz#0d832cbd1d8e6bdf6bd3f25d531b05c5787dbeb7" + integrity sha512-NegSvVCGfkDpHC3AosHhhn2CDVJoJXiH3LlMTKjc5GAwugaMHvsQLNItUD4RBOAvvOrw3Uz/XlYjT1ynW0rviA== -caniuse-lite@^1.0.30001023: - version "1.0.30001027" - resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001027.tgz#283e2ef17d94889cc216a22c6f85303d78ca852d" - integrity sha512-7xvKeErvXZFtUItTHgNtLgS9RJpVnwBlWX8jSo/BO8VsF6deszemZSkJJJA1KOKrXuzZH4WALpAJdq5EyfgMLg== +caniuse-lite@^1.0.30001030: + version "1.0.30001030" + resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001030.tgz#78076c4c6d67d3e41d6eb9399853fb27fe6e44ee" + integrity sha512-QGK0W4Ft/Ac+zTjEiRJfwDNATvS3fodDczBXrH42784kcfqcDKpEPfN08N0HQjrAp8He/Jw8QiSS9QRn7XAbUw== caseless@~0.12.0: version "0.12.0" @@ -5180,6 +5288,16 @@ config-chain@^1.1.11: ini "^1.3.4" proto-list "~1.2.1" +connect@^3.7.0: + version "3.7.0" + resolved "https://registry.yarnpkg.com/connect/-/connect-3.7.0.tgz#5d49348910caa5e07a01800b030d0c35f20484f8" + integrity sha512-ZqRXc+tZukToSNmh5C2iWMSoV3X1YUcPbqEM4DkEG5tNQXrQUZCNVGGv3IuicnkMtPfGf3Xtp8WCXs295iQ1pQ== + dependencies: + debug "2.6.9" + finalhandler "1.1.2" + parseurl "~1.3.3" + utils-merge "1.0.1" + console-browserify@^1.1.0: version "1.2.0" resolved "https://registry.yarnpkg.com/console-browserify/-/console-browserify-1.2.0.tgz#67063cef57ceb6cf4993a2ab3a55840ae8c49336" @@ -5302,7 +5420,7 @@ cookie-signature@1.0.6: resolved "https://registry.yarnpkg.com/cookie-signature/-/cookie-signature-1.0.6.tgz#e303a882b342cc3ee8ca513a79999734dab3ae2c" integrity sha1-4wOogrNCzD7oylE6eZmXNNqzriw= -cookie@0.4.0: +cookie@0.4.0, cookie@^0.4.0: version "0.4.0" resolved "https://registry.yarnpkg.com/cookie/-/cookie-0.4.0.tgz#beb437e7022b3b6d49019d088665303ebe9c14ba" integrity sha512-+Hp8fLp57wnUSt0tY0tHEXh4voZRDnoIrZPqlo3DPiI4y9lwg/jqx+1Om94/W6ZaPDOUbnjOt/99w66zk+l1Xg== @@ -5571,9 +5689,9 @@ csso@~2.3.1: source-map "^0.5.3" csstype@^2.2.0, csstype@^2.5.7, csstype@^2.6.7: - version "2.6.8" - resolved "https://registry.yarnpkg.com/csstype/-/csstype-2.6.8.tgz#0fb6fc2417ffd2816a418c9336da74d7f07db431" - integrity sha512-msVS9qTuMT5zwAGCVm4mxfrZ18BNc6Csd0oJAtiFMZ1FAx1CCvy2+5MDmYoix63LM/6NDbNtodCiGYGmFgO0dA== + version "2.6.9" + resolved "https://registry.yarnpkg.com/csstype/-/csstype-2.6.9.tgz#05141d0cd557a56b8891394c1911c40c8a98d098" + integrity sha512-xz39Sb4+OaTsULgUERcCk+TJj8ylkL4aSVDQiX/ksxbELSqwkgt4d4RD7fovIdgJGSuNYqwZEiVjYY5l0ask+Q== currently-unhandled@^0.4.1: version "0.4.1" @@ -5756,6 +5874,11 @@ deep-extend@^0.6.0: resolved "https://registry.yarnpkg.com/deep-extend/-/deep-extend-0.6.0.tgz#c4fa7c95404a17a9c3e8ca7e1537312b736330ac" integrity sha512-LOHxIOaPYdHlJRtCQfDIVZtfw/ufM8+rVj649RIHzcm/vGwQRXFt6OPqIFWsm2XEMrNIEtWR64sY1LEKD2vAOA== +deepmerge@*, deepmerge@^4.2.2: + version "4.2.2" + resolved "https://registry.yarnpkg.com/deepmerge/-/deepmerge-4.2.2.tgz#44d2ea3679b8f4d4ffba33f03d865fc1e7bf4955" + integrity sha512-FJ3UgI4gIl+PHZm53knsuSFpE+nESMr7M4v9QcgB7S63Kj/6WqMiFQJpBBYz1Pt+66bZpP3Q7Lye0Oo9MPKEdg== + deepmerge@2.0.1: version "2.0.1" resolved "https://registry.yarnpkg.com/deepmerge/-/deepmerge-2.0.1.tgz#25c1c24f110fb914f80001b925264dd77f3f4312" @@ -6086,10 +6209,10 @@ electron-store@^2.0.0: dependencies: conf "^2.0.0" -electron-to-chromium@^1.2.7, electron-to-chromium@^1.3.341: - version "1.3.349" - resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.3.349.tgz#663f26a69d348a462df47b4d7ab162a2f29bbcb7" - integrity sha512-uEb2zs6EJ6OZIqaMsCSliYVgzE/f7/s1fLWqtvRtHg/v5KBF2xds974fUnyatfxIDgkqzQVwFtam5KExqywx0Q== +electron-to-chromium@^1.2.7, electron-to-chromium@^1.3.361: + version "1.3.363" + resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.3.363.tgz#08756873e49446a92e0cee6c3cd9eb3c52043826" + integrity sha512-4w19wPBkeunBjOA53lNFT36IdOD3Tk1OoIDtTX+VToJUUDX42QfuhtsNKXv25wmSnoBOExM3kTbj7/WDNBwHuQ== electron@^4.2.11: version "4.2.12" @@ -6128,6 +6251,11 @@ emojis-list@^2.0.0: resolved "https://registry.yarnpkg.com/emojis-list/-/emojis-list-2.1.0.tgz#4daa4d9db00f9819880c79fa457ae5b09a1fd389" integrity sha1-TapNnbAPmBmIDHn6RXrlsJof04k= +emojis-list@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/emojis-list/-/emojis-list-3.0.0.tgz#5570662046ad29e2e916e71aae260abdff4f6a78" + integrity sha512-/kyM18EfinwXZbno9FyUGeFh87KC8HRQBQGildHZbEuRyWFOmv1U10o9BBp8XVZDVNNuQKyIGIu5ZYAAXJ0V2Q== + encodeurl@~1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/encodeurl/-/encodeurl-1.0.2.tgz#ad3ff4c86ec2d029322f5a02c3a9a606c95b3f59" @@ -6255,7 +6383,7 @@ es6-promisify@^5.0.0: dependencies: es6-promise "^4.0.3" -escape-html@~1.0.3: +escape-html@^1.0.3, escape-html@~1.0.3: version "1.0.3" resolved "https://registry.yarnpkg.com/escape-html/-/escape-html-1.0.3.tgz#0258eae4d3d0c0974de1c169188ef0051d1d1988" integrity sha1-Aljq5NPQwJdN4cFpGI7wBR0dGYg= @@ -6733,7 +6861,7 @@ fill-range@^7.0.1: dependencies: to-regex-range "^5.0.1" -finalhandler@~1.1.2: +finalhandler@1.1.2, finalhandler@~1.1.2: version "1.1.2" resolved "https://registry.yarnpkg.com/finalhandler/-/finalhandler-1.1.2.tgz#b7e7d000ffd11938d0fdb053506f6ebabe9f587d" integrity sha512-aAWcW57uxVNrQZqFXjITpW3sIUQmHGG3qSb9mUah9MgMC4NeWhNOlNjXEYq3HjRAvL6arUviZGGJsBg6z0zsWA== @@ -6765,12 +6893,12 @@ find-cache-dir@^2.0.0, find-cache-dir@^2.1.0: pkg-dir "^3.0.0" find-cache-dir@^3.0.0: - version "3.2.0" - resolved "https://registry.yarnpkg.com/find-cache-dir/-/find-cache-dir-3.2.0.tgz#e7fe44c1abc1299f516146e563108fd1006c1874" - integrity sha512-1JKclkYYsf1q9WIJKLZa9S9muC+08RIjzAlLrK4QcYLJMS6mk9yombQ9qf+zJ7H9LS800k0s44L4sDq9VYzqyg== + version "3.3.0" + resolved "https://registry.yarnpkg.com/find-cache-dir/-/find-cache-dir-3.3.0.tgz#4d74ed1fe9ef1731467ca24378e8f8f5c8b6ed11" + integrity sha512-PtXtQb7IrD8O+h6Cq1dbpJH5NzD8+9keN1zZ0YlpDzl1PwXEJEBj6u1Xa92t1Hwluoozd9TNKul5Hi2iqpsWwg== dependencies: commondir "^1.0.1" - make-dir "^3.0.0" + make-dir "^3.0.2" pkg-dir "^4.1.0" find-git-exec@^0.0.2: @@ -6851,9 +6979,9 @@ flatten@^1.0.2: integrity sha512-dVsPA/UwQ8+2uoFe5GHtiBMu48dWLTdsuEd7CKGlZlD78r1TTWBvDuFaFGKCo/ZfEr95Uk56vZoX86OsHkUeIg== flow-parser@^0.*: - version "0.118.0" - resolved "https://registry.yarnpkg.com/flow-parser/-/flow-parser-0.118.0.tgz#81671a7649789dccd932aa24f9e4727dc80afa00" - integrity sha512-PM3aKA5K3e5kK2hJPsSVdQD4/SVZUQni9qfB0+JHBCjqoAS5mSe3SlhLR9TlH3WDQccL0H2b6zpP8LjOzx9Wtg== + version "0.119.1" + resolved "https://registry.yarnpkg.com/flow-parser/-/flow-parser-0.119.1.tgz#c120c402e164c7e9379a8d84b2c838adaaa0e610" + integrity sha512-yFd4z6ZBXq//TJo/gtSzGKhz6wEVeI2m+6JB25JzXuRAOhM5Ze4xFkc3FSIStbYjrAx4H1IUiUTI/yy30oKp8A== flush-write-stream@^1.0.0: version "1.1.1" @@ -7294,7 +7422,7 @@ glob@^6.0.1: once "^1.3.0" path-is-absolute "^1.0.0" -glob@^7.0.0, glob@^7.0.3, glob@^7.0.5, glob@^7.1.1, glob@^7.1.2, glob@^7.1.3, glob@^7.1.4: +glob@^7.0.0, glob@^7.0.3, glob@^7.0.5, glob@^7.1.1, glob@^7.1.2, glob@^7.1.3, glob@^7.1.4, glob@^7.1.6: version "7.1.6" resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.6.tgz#141f33b81a7c2492e125594307480c46679278a6" integrity sha512-LwaxwyZ72Lk7vZINtNNrywX0ZuLyStrdDtabefZKAY5ZGJhVtgdznluResxNmPitE0SAO+O26sWTHeKSI2wMBA== @@ -7381,9 +7509,9 @@ google-protobuf@3.5.0: integrity sha1-uMxjx02DRXvYqakEUDyO+ya8ozk= google-protobuf@^3.11.0: - version "3.11.3" - resolved "https://registry.yarnpkg.com/google-protobuf/-/google-protobuf-3.11.3.tgz#660977f5de29cc8f647172a170602887102fa677" - integrity sha512-Sp8E+0AJLxmiPwAk9VH3MkYAmYYheNUhywIyXOS7wvRkqbIYcHtGzJzIYicNqYsqgKmY35F9hxRkI+ZTqTB4Tg== + version "3.11.4" + resolved "https://registry.yarnpkg.com/google-protobuf/-/google-protobuf-3.11.4.tgz#598ca405a3cfa917a2132994d008b5932ef42014" + integrity sha512-lL6b04rDirurUBOgsY2+LalI6Evq8eH5TcNzi7TYQ3BsIWelT0KSOQSBsXuavEkNf+odQU6c0lgz3UsZXeNX9Q== got@^7.0.0: version "7.1.0" @@ -7438,12 +7566,12 @@ graceful-fs@^4.1.10, graceful-fs@^4.1.11, graceful-fs@^4.1.15, graceful-fs@^4.1. resolved "https://registry.yarnpkg.com/graceful-readlink/-/graceful-readlink-1.0.1.tgz#4cafad76bc62f02fa039b2f94e9a3dd3a391a725" integrity sha1-TK+tdrxi8C+gObL5Tpo906ORpyU= -grouped-queue@^0.3.3: - version "0.3.3" - resolved "https://registry.yarnpkg.com/grouped-queue/-/grouped-queue-0.3.3.tgz#c167d2a5319c5a0e0964ef6a25b7c2df8996c85c" - integrity sha1-wWfSpTGcWg4JZO9qJbfC34mWyFw= +grouped-queue@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/grouped-queue/-/grouped-queue-1.0.0.tgz#5bdb97934a9a17b19626ff3cc23c103f2622ef49" + integrity sha512-XslfWrAGCYovQjveHODR0hllUrsn3UtvPFTkamHbgVHmkUA6eCIDmw3JDWVLJvuntTvYjwaPGamlyzK4/HAEOA== dependencies: - lodash "^4.17.2" + lodash "^4.17.15" growl@1.10.5: version "1.10.5" @@ -7721,9 +7849,9 @@ homedir-polyfill@^1.0.1: parse-passwd "^1.0.0" hosted-git-info@^2.1.4, hosted-git-info@^2.7.1: - version "2.8.5" - resolved "https://registry.yarnpkg.com/hosted-git-info/-/hosted-git-info-2.8.5.tgz#759cfcf2c4d156ade59b0b2dfabddc42a6b9c70c" - integrity sha512-kssjab8CvdXfcXMXVcvsXum4Hwdq9XGtRD3TteMEvEbq0LXyiNQr6AprqKqfeaDXze7SxWvRxdpwE6ku7ikLkg== + version "2.8.7" + resolved "https://registry.yarnpkg.com/hosted-git-info/-/hosted-git-info-2.8.7.tgz#4d2e0d5248e1cfabc984b0f6a6d75fe36e679511" + integrity sha512-ChkjQtKJ3GI6SsI4O5jwr8q8EPrWCnxuc4Tbx+vRI5x6mDOpjKKltNo1lRlszw3xwgTOSns1ZRBiMmmwpcvLxg== html-comment-regex@^1.1.0: version "1.1.2" @@ -8059,10 +8187,10 @@ ip@1.1.5: resolved "https://registry.yarnpkg.com/ip/-/ip-1.1.5.tgz#bdded70114290828c0a039e72ef25f5aaec4354a" integrity sha1-vd7XARQpCCjAoDnnLvJfWq7ENUo= -ipaddr.js@1.9.0: - version "1.9.0" - resolved "https://registry.yarnpkg.com/ipaddr.js/-/ipaddr.js-1.9.0.tgz#37df74e430a0e47550fe54a2defe30d8acd95f65" - integrity sha512-M4Sjn6N/+O6/IXSJseKqHoFc+5FdGJ22sXqnjTpdZweHK64MzEPAyQZyEU3R/KRv2GLoa7nNtg/C2Ev6m7z+eA== +ipaddr.js@1.9.1: + version "1.9.1" + resolved "https://registry.yarnpkg.com/ipaddr.js/-/ipaddr.js-1.9.1.tgz#bff38543eeb8984825079ff3a2a8e6cbd46781b3" + integrity sha512-0KI/607xoxSToH7GjN1FfSbLoU0+btTicjsQSWQlh/hZykN8KpmMf7uYwPW3R+akZ6R/w18ZlXSHBYXiYUPO3g== is-absolute-url@^2.0.0: version "2.1.0" @@ -8625,9 +8753,9 @@ json5@^2.1.0: minimist "^1.2.0" jsonc-parser@^2.0.2: - version "2.2.0" - resolved "https://registry.yarnpkg.com/jsonc-parser/-/jsonc-parser-2.2.0.tgz#f206f87f9d49d644b7502052c04e82dd6392e9ef" - integrity sha512-4fLQxW1j/5fWj6p78vAlAafoCKtuBm6ghv+Ij5W2DrDx0qE+ZdEl2c6Ko1mgJNF5ftX1iEWQQ4Ap7+3GlhjkOA== + version "2.2.1" + resolved "https://registry.yarnpkg.com/jsonc-parser/-/jsonc-parser-2.2.1.tgz#db73cd59d78cce28723199466b2a03d1be1df2bc" + integrity sha512-o6/yDBYccGvTz1+QFevz6l6OBZ2+fMVu2JZ9CIhzsYRX4mjaK5IyX9eldUdCmga16zlgQxyrj5pt9kzuj2C02w== jsonfile@^2.1.0: version "2.4.0" @@ -8901,12 +9029,12 @@ loader-utils@^0.2.5: object-assign "^4.0.1" loader-utils@^1.0.0, loader-utils@^1.0.2, loader-utils@^1.0.3, loader-utils@^1.1.0, loader-utils@^1.2.3: - version "1.2.3" - resolved "https://registry.yarnpkg.com/loader-utils/-/loader-utils-1.2.3.tgz#1ff5dc6911c9f0a062531a4c04b609406108c2c7" - integrity sha512-fkpz8ejdnEMG3s37wGL07iSBDg99O9D5yflE9RGNH3hRdx9SOwYfnGYdZOUIZitN8E+E2vkq3MUMYMvPYl5ZZA== + version "1.4.0" + resolved "https://registry.yarnpkg.com/loader-utils/-/loader-utils-1.4.0.tgz#c579b5e34cb34b1a74edc6c1fb36bfa371d5a613" + integrity sha512-qH0WSMBtn/oHuwjy/NucEgbx5dbxxnxup9s4PVXJUDHZBQY+s0NWA9rJf53RBnQZxfch7euUui7hpoAPvALZdA== dependencies: big.js "^5.2.2" - emojis-list "^2.0.0" + emojis-list "^3.0.0" json5 "^1.0.1" locate-path@^2.0.0: @@ -9017,7 +9145,7 @@ lodash.uniq@^4.5.0: resolved "https://registry.yarnpkg.com/lodash.uniq/-/lodash.uniq-4.5.0.tgz#d0225373aeb652adc1bc82e4945339a842754773" integrity sha1-0CJTc662Uq3BvILklFM5qEJ1R3M= -lodash@^4.13.1, lodash@^4.17.10, lodash@^4.17.12, lodash@^4.17.13, lodash@^4.17.14, lodash@^4.17.15, lodash@^4.17.2, lodash@^4.17.4, lodash@^4.17.5, lodash@^4.2.1, lodash@^4.3.0: +lodash@^4.13.1, lodash@^4.17.10, lodash@^4.17.12, lodash@^4.17.13, lodash@^4.17.14, lodash@^4.17.15, lodash@^4.17.4, lodash@^4.17.5, lodash@^4.2.1, lodash@^4.3.0: version "4.17.15" resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.15.tgz#b447f6670a0455bbfeedd11392eff330ea097548" integrity sha512-8xOcRHvCjnocdS5cpwXQXVzmmh5e5+saE2QGoeQmbKmRS6J3VQppPOIt0MnmE+4xlZoumy0GPG0D0MVIQbNA1A== @@ -9030,12 +9158,12 @@ log-ok@^0.1.1: ansi-green "^0.1.1" success-symbol "^0.1.0" -log-symbols@2.2.0, log-symbols@^2.2.0: - version "2.2.0" - resolved "https://registry.yarnpkg.com/log-symbols/-/log-symbols-2.2.0.tgz#5740e1c5d6f0dfda4ad9323b5332107ef6b4c40a" - integrity sha512-VeIAFslyIerEJLXHziedo2basKbMKtTw3vfn5IzG0XTjhAVEJyNHnL2p7vc+wBDSdQuUpNw3M2u6xb9QsAY5Eg== +log-symbols@3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/log-symbols/-/log-symbols-3.0.0.tgz#f3a08516a5dea893336a7dee14d18a1cfdab77c4" + integrity sha512-dSkNGuI7iG3mfvDzUuYZyvk5dD9ocYCYzNU6CYDE6+Xqd+gwme6Z00NS3dUh8mq/73HaEtT7m6W+yUPtU6BZnQ== dependencies: - chalk "^2.0.1" + chalk "^2.4.2" log-symbols@^1.0.2: version "1.0.2" @@ -9044,6 +9172,13 @@ log-symbols@^1.0.2: dependencies: chalk "^1.0.0" +log-symbols@^2.2.0: + version "2.2.0" + resolved "https://registry.yarnpkg.com/log-symbols/-/log-symbols-2.2.0.tgz#5740e1c5d6f0dfda4ad9323b5332107ef6b4c40a" + integrity sha512-VeIAFslyIerEJLXHziedo2basKbMKtTw3vfn5IzG0XTjhAVEJyNHnL2p7vc+wBDSdQuUpNw3M2u6xb9QsAY5Eg== + dependencies: + chalk "^2.0.1" + log-update@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/log-update/-/log-update-1.0.2.tgz#19929f64c4093d2d2e7075a1dad8af59c296b8d1" @@ -9113,6 +9248,11 @@ lru-cache@^5.1.1: dependencies: yallist "^3.0.2" +macaddress@^0.2.9: + version "0.2.9" + resolved "https://registry.yarnpkg.com/macaddress/-/macaddress-0.2.9.tgz#3579b8b9acd5b96b4553abf0f394185a86813cb3" + integrity sha512-k4F1JUof6cQXxNFzx3thLby4oJzXTXQueAOOts944Vqizn+Rjc2QNFenT9FJSLU1CH3PmrHRSyZs2E+Cqw+P2w== + macos-release@^2.2.0: version "2.3.0" resolved "https://registry.yarnpkg.com/macos-release/-/macos-release-2.3.0.tgz#eb1930b036c0800adebccd5f17bc4c12de8bb71f" @@ -9133,7 +9273,7 @@ make-dir@^2.0.0, make-dir@^2.1.0: pify "^4.0.1" semver "^5.6.0" -make-dir@^3.0.0: +make-dir@^3.0.2: version "3.0.2" resolved "https://registry.yarnpkg.com/make-dir/-/make-dir-3.0.2.tgz#04a1acbf22221e1d6ef43559f43e05a90dbb4392" integrity sha512-rYKABKutXa6vXTXhoV18cBE7PaewPXHe/Bdq4v+ZLMhxbWApkFFplT0LcbMW+6BbjnQXzZ/sAvSE/JdguApG5w== @@ -9141,9 +9281,9 @@ make-dir@^3.0.0: semver "^6.0.0" make-error@^1.1.1: - version "1.3.5" - resolved "https://registry.yarnpkg.com/make-error/-/make-error-1.3.5.tgz#efe4e81f6db28cadd605c70f29c831b58ef776c8" - integrity sha512-c3sIjNUow0+8swNwVpqoH4YCShKNFkMaw6oH1mNS2haDZQqkeZFlHS3dhoeEbKKmJB4vXpJucU6oH75aDYeE9g== + version "1.3.6" + resolved "https://registry.yarnpkg.com/make-error/-/make-error-1.3.6.tgz#2eb2e37ea9b67c4891f684a1394799af484cf7a2" + integrity sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw== make-fetch-happen@^5.0.0: version "5.0.2" @@ -9421,7 +9561,7 @@ mime@1.6.0, mime@^1.4.1: resolved "https://registry.yarnpkg.com/mime/-/mime-1.6.0.tgz#32cd9e5c64553bd58d19a568af452acff04981b1" integrity sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg== -mime@^2.0.3: +mime@^2.0.3, mime@^2.4.4: version "2.4.4" resolved "https://registry.yarnpkg.com/mime/-/mime-2.4.4.tgz#bd7b91135fc6b01cde3e9bae33d659b63d8857e5" integrity sha512-LRxmNwziLPT828z+4YkNzloCFC2YM4wrB99k+AV5ZbEyfGNWfG8SO1FUXLmLDBSo89NrJZ4DIWeLjy1CHGhMGA== @@ -9561,9 +9701,9 @@ mkdirp@0.5.1, "mkdirp@>=0.5 0", mkdirp@^0.5.0, mkdirp@^0.5.1, mkdirp@~0.5.1: minimist "0.0.8" mocha@^7.0.0: - version "7.0.1" - resolved "https://registry.yarnpkg.com/mocha/-/mocha-7.0.1.tgz#276186d35a4852f6249808c6dd4a1376cbf6c6ce" - integrity sha512-9eWmWTdHLXh72rGrdZjNbG3aa1/3NRPpul1z0D979QpEnFdCG0Q5tv834N+94QEN2cysfV72YocQ3fn87s70fg== + version "7.1.0" + resolved "https://registry.yarnpkg.com/mocha/-/mocha-7.1.0.tgz#c784f579ad0904d29229ad6cb1e2514e4db7d249" + integrity sha512-MymHK8UkU0K15Q/zX7uflZgVoRWiTjy0fXE/QjKts6mowUvGxOdPhZ2qj3b0iZdUrNZlW9LAIMFHB4IW+2b3EQ== dependencies: ansi-colors "3.2.3" browser-stdout "1.3.1" @@ -9576,7 +9716,7 @@ mocha@^7.0.0: growl "1.10.5" he "1.2.0" js-yaml "3.13.1" - log-symbols "2.2.0" + log-symbols "3.0.0" minimatch "3.0.4" mkdirp "0.5.1" ms "2.1.1" @@ -9766,9 +9906,9 @@ nice-try@^1.0.4: integrity sha512-1nh45deeb5olNY7eX82BkPO7SSxR5SSYJiPTrTdFUVYwAl8CKMA5N9PjTYkHiRjisVcxcQ1HXdLhx2qxxJzLNQ== node-abi@^2.11.0, node-abi@^2.2.0: - version "2.14.0" - resolved "https://registry.yarnpkg.com/node-abi/-/node-abi-2.14.0.tgz#24650e24e8ffad2b61352519263f0cf4e2ddbfe9" - integrity sha512-y54KGgEOHnRHlGQi7E5UiryRkH8bmksmQLj/9iLAjoje743YS+KaKB/sDYXgqtT0J16JT3c3AYJZNI98aU/kYg== + version "2.15.0" + resolved "https://registry.yarnpkg.com/node-abi/-/node-abi-2.15.0.tgz#51d55cc711bd9e4a24a572ace13b9231945ccb10" + integrity sha512-FeLpTS0F39U7hHZU1srAK4Vx+5AHNVOTP+hxBNQknR/54laTHSFIJkDWDqiquY1LeLUgTfPN7sLPhMubx0PLAg== dependencies: semver "^5.4.1" @@ -9901,13 +10041,18 @@ node-pre-gyp@^0.12.0: semver "^5.3.0" tar "^4" -node-releases@^1.1.47: - version "1.1.49" - resolved "https://registry.yarnpkg.com/node-releases/-/node-releases-1.1.49.tgz#67ba5a3fac2319262675ef864ed56798bb33b93e" - integrity sha512-xH8t0LS0disN0mtRCh+eByxFPie+msJUBL/lJDBuap53QGiYPa9joh83K4pCZgWJ+2L4b9h88vCVdXQ60NO2bg== +node-releases@^1.1.50: + version "1.1.50" + resolved "https://registry.yarnpkg.com/node-releases/-/node-releases-1.1.50.tgz#803c40d2c45db172d0410e4efec83aa8c6ad0592" + integrity sha512-lgAmPv9eYZ0bGwUYAKlr8MG6K4CvWliWqnkcT2P8mMAgVrH3lqfBPorFlxiG1pHQnqmavJZ9vbMXUTNyMLbrgQ== dependencies: semver "^6.3.0" +node-uuid@^1.4.8: + version "1.4.8" + resolved "https://registry.yarnpkg.com/node-uuid/-/node-uuid-1.4.8.tgz#b040eb0923968afabf8d32fb1f17f1167fdab907" + integrity sha1-sEDrCSOWivq/jTL7HxfxFn/auQc= + nomnom@^1.8.1: version "1.8.1" resolved "https://registry.yarnpkg.com/nomnom/-/nomnom-1.8.1.tgz#2151f722472ba79e50a76fc125bb8c8f2e4dc2a7" @@ -11166,6 +11311,19 @@ proto-list@~1.2.1: resolved "https://registry.yarnpkg.com/proto-list/-/proto-list-1.2.4.tgz#212d5bfe1318306a420f6402b8e26ff39647a849" integrity sha1-IS1b/hMYMGpCD2QCuOJv85ZHqEk= +protoc@1.0.4: + version "1.0.4" + resolved "https://registry.yarnpkg.com/protoc/-/protoc-1.0.4.tgz#fd0ba07132c459df80c6135889bd5cc92f0afec2" + integrity sha512-2crtOP6xhacdWBW+lkhQJmzwg2cPmqSsh51FOHQmgTd8dKksO9sFzlhzteh6x+qPTfPU7h6smC1eg5d9bqGpTQ== + dependencies: + glob "^7.1.6" + mkdirp "^0.5.1" + node-uuid "^1.4.8" + request "^2.88.0" + rimraf "^3.0.0" + unzipper "^0.10.5" + vinyl "^2.2.0" + protocols@^1.1.0, protocols@^1.4.0: version "1.4.7" resolved "https://registry.yarnpkg.com/protocols/-/protocols-1.4.7.tgz#95f788a4f0e979b291ffefcf5636ad113d037d32" @@ -11179,12 +11337,12 @@ protoduck@^5.0.1: genfun "^5.0.0" proxy-addr@~2.0.5: - version "2.0.5" - resolved "https://registry.yarnpkg.com/proxy-addr/-/proxy-addr-2.0.5.tgz#34cbd64a2d81f4b1fd21e76f9f06c8a45299ee34" - integrity sha512-t/7RxHXPH6cJtP0pRG6smSr9QJidhB+3kXu0KgXnbGYMgzEnUxRQ4/LDdfOwZEMyIh3/xHb8PX3t+lfL9z+YVQ== + version "2.0.6" + resolved "https://registry.yarnpkg.com/proxy-addr/-/proxy-addr-2.0.6.tgz#fdc2336505447d3f2f2c638ed272caf614bbb2bf" + integrity sha512-dh/frvCBVmSsDYzw6n926jv974gddhkFPfiN8hPOi30Wax25QZyZEGveluCgliBnqmuM+UJmBErbAUFIoDbjOw== dependencies: forwarded "~0.1.2" - ipaddr.js "1.9.0" + ipaddr.js "1.9.1" proxy-from-env@^1.0.0: version "1.0.0" @@ -11405,14 +11563,14 @@ react-autosize-textarea@^7.0.0: prop-types "^15.5.6" react-dom@^16.4.1: - version "16.12.0" - resolved "https://registry.yarnpkg.com/react-dom/-/react-dom-16.12.0.tgz#0da4b714b8d13c2038c9396b54a92baea633fe11" - integrity sha512-LMxFfAGrcS3kETtQaCkTKjMiifahaMySFDn71fZUNpPHZQEzmk/GiAeIT8JSOrHB23fnuCOMruL2a8NYlw+8Gw== + version "16.13.0" + resolved "https://registry.yarnpkg.com/react-dom/-/react-dom-16.13.0.tgz#cdde54b48eb9e8a0ca1b3dc9943d9bb409b81866" + integrity sha512-y09d2c4cG220DzdlFkPTnVvGTszVvNpC73v+AaLGLHbkpy3SSgvYq8x0rNwPJ/Rk/CicTNgk0hbHNw1gMEZAXg== dependencies: loose-envify "^1.1.0" object-assign "^4.1.1" prop-types "^15.6.2" - scheduler "^0.18.0" + scheduler "^0.19.0" react-input-autosize@^2.2.2: version "2.2.2" @@ -11422,9 +11580,9 @@ react-input-autosize@^2.2.2: prop-types "^15.5.8" react-is@^16.8.1: - version "16.12.0" - resolved "https://registry.yarnpkg.com/react-is/-/react-is-16.12.0.tgz#2cc0fe0fba742d97fd527c42a13bec4eeb06241c" - integrity sha512-rPCkf/mWBtKc97aLL9/txD8DZdemK0vkA3JMLShjlJB3Pj3s+lpf1KaBzMfQrAmhMQB0n1cU/SUGgKKBCe837Q== + version "16.13.0" + resolved "https://registry.yarnpkg.com/react-is/-/react-is-16.13.0.tgz#0f37c3613c34fe6b37cd7f763a0d6293ab15c527" + integrity sha512-GFMtL0vHkiBv9HluwNZTggSn/sCyEt9n02aM0dSAjGGyqyNlAyftYm4phPxdvCigG15JreC5biwxCgTAJZ7yAA== react-lifecycles-compat@^3.0.4: version "3.0.4" @@ -11476,9 +11634,9 @@ react-virtualized@^9.20.0: react-lifecycles-compat "^3.0.4" react@^16.4.1: - version "16.12.0" - resolved "https://registry.yarnpkg.com/react/-/react-16.12.0.tgz#0c0a9c6a142429e3614834d5a778e18aa78a0b83" - integrity sha512-fglqy3k5E+81pA8s+7K0/T3DBCF0ZDOher1elBFzF7O6arXJgzyu/FW+COxFvAWXJoJN9KIZbT2LXlukwphYTA== + version "16.13.0" + resolved "https://registry.yarnpkg.com/react/-/react-16.13.0.tgz#d046eabcdf64e457bbeed1e792e235e1b9934cf7" + integrity sha512-TSavZz2iSLkq5/oiE7gnFzmURKZMltmi193rm5HEoUDAXpzT9Kzw6oNZnGoai/4+fUnm7FqS5dwgUL34TujcWQ== dependencies: loose-envify "^1.1.0" object-assign "^4.1.1" @@ -11585,9 +11743,9 @@ readable-stream@1.0.x: string_decoder "~0.10.x" "readable-stream@2 || 3", readable-stream@^3.0.2: - version "3.5.0" - resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-3.5.0.tgz#465d70e6d1087f6162d079cd0b5db7fbebfd1606" - integrity sha512-gSz026xs2LfxBPudDuI41V1lka8cxg64E66SGe78zJlsUofOg/yqwezdIcdfwik6B4h8LFmWPA9ef9X3FiNFLA== + version "3.6.0" + resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-3.6.0.tgz#337bbda3adc0706bd3e024426a286d4b4b2c9198" + integrity sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA== dependencies: inherits "^2.0.3" string_decoder "^1.1.1" @@ -11810,9 +11968,9 @@ regjsparser@^0.1.4: jsesc "~0.5.0" regjsparser@^0.6.0: - version "0.6.2" - resolved "https://registry.yarnpkg.com/regjsparser/-/regjsparser-0.6.2.tgz#fd62c753991467d9d1ffe0a9f67f27a529024b96" - integrity sha512-E9ghzUtoLwDekPT0DYCp+c4h+bvuUpe6rRHCTYn6eGoqj1LgKXxT6I0Il4WbjhQkOghzi/V+y03bPKvbllL93Q== + version "0.6.3" + resolved "https://registry.yarnpkg.com/regjsparser/-/regjsparser-0.6.3.tgz#74192c5805d35e9f5ebe3c1fb5b40d40a8a38460" + integrity sha512-8uZvYbnfAtEm9Ab8NTb3hdLwL4g/LQzEYP7Xs27T96abJCCE2d6r3cPZPQEsLKy0vRSGVNG+/zVGtLr86HQduA== dependencies: jsesc "~0.5.0" @@ -11990,6 +12148,13 @@ rimraf@2, rimraf@^2.2.8, rimraf@^2.5.4, rimraf@^2.6.1, rimraf@^2.6.2, rimraf@^2. dependencies: glob "^7.1.3" +rimraf@^3.0.0: + version "3.0.2" + resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-3.0.2.tgz#f1a5402ba6220ad52cc1282bac1ae3aa49fd061a" + integrity sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA== + dependencies: + glob "^7.1.3" + rimraf@~2.4.0: version "2.4.5" resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-2.4.5.tgz#ee710ce5d93a8fdb856fb5ea8ff0e2d75934b2da" @@ -12025,9 +12190,9 @@ run-applescript@^3.0.0: execa "^0.10.0" run-async@^2.0.0, run-async@^2.2.0: - version "2.3.0" - resolved "https://registry.yarnpkg.com/run-async/-/run-async-2.3.0.tgz#0371ab4ae0bdd720d4166d7dfda64ff7a445a6c0" - integrity sha1-A3GrSuC91yDUFm19/aZP96RFpsA= + version "2.4.0" + resolved "https://registry.yarnpkg.com/run-async/-/run-async-2.4.0.tgz#e59054a5b86876cfae07f431d18cbaddc594f1e8" + integrity sha512-xJTbh/d7Lm7SBhc1tNvTpeCHaEzoyxPrqNlvSdMfBTYwaY++UJFyXUOxAtsRUXjlqOfj8luNaR9vjCh4KeV+pg== dependencies: is-promise "^2.1.0" @@ -12079,10 +12244,10 @@ sax@^1.2.4, sax@~1.2.1: resolved "https://registry.yarnpkg.com/sax/-/sax-1.2.4.tgz#2816234e2378bddc4e5354fab5caa895df7100d9" integrity sha512-NqVDv9TpANUjFm0N8uM5GxL36UgKi9/atZw+x7YFnQ8ckwFGKrl4xX4yWtrey3UJm5nP1kUbnYgLopqWNSRhWw== -scheduler@^0.18.0: - version "0.18.0" - resolved "https://registry.yarnpkg.com/scheduler/-/scheduler-0.18.0.tgz#5901ad6659bc1d8f3fdaf36eb7a67b0d6746b1c4" - integrity sha512-agTSHR1Nbfi6ulI0kYNK0203joW2Y5W4po4l+v03tOoiJKpTBbxpNhWDvqc/4IcOw+KLmSiQLTasZ4cab2/UWQ== +scheduler@^0.19.0: + version "0.19.0" + resolved "https://registry.yarnpkg.com/scheduler/-/scheduler-0.19.0.tgz#a715d56302de403df742f4a9be11975b32f5698d" + integrity sha512-xowbVaTPe9r7y7RUejcK73/j8tt2jfiyTednOvHbA8JoClvMYCp+r8QegLwK/n8zWQAtZb1fFnER4XLBZXrCxA== dependencies: loose-envify "^1.1.0" object-assign "^4.1.1" @@ -12170,7 +12335,7 @@ serialize-javascript@^2.1.2: resolved "https://registry.yarnpkg.com/serialize-javascript/-/serialize-javascript-2.1.2.tgz#ecec53b0e0317bdc95ef76ab7074b7384785fa61" integrity sha512-rs9OggEUF0V4jUSecXazOYsLfu7OGK2qIn3c7IPBiffz32XniEp/TX9Xmc9LQfK2nQ2QKHvZ2oygKUGU0lG4jQ== -serve-static@1.14.1: +serve-static@1.14.1, serve-static@^1.14.1: version "1.14.1" resolved "https://registry.yarnpkg.com/serve-static/-/serve-static-1.14.1.tgz#666e636dc4f010f7ef29970a88a674320898b2f9" integrity sha512-JMrvUwE54emCYWlTI+hGrGv5I8dEwmco/00EvkzIIsR7MqrHonbD9pO2MOfFnpFntl7ecpZs+3mW+XbQZu9QCg== @@ -12929,6 +13094,13 @@ temp@^0.8.1: dependencies: rimraf "~2.6.2" +temp@^0.9.1: + version "0.9.1" + resolved "https://registry.yarnpkg.com/temp/-/temp-0.9.1.tgz#2d666114fafa26966cd4065996d7ceedd4dd4697" + integrity sha512-WMuOgiua1xb5R56lE0eH6ivpVmg/lq2OHm4+LtT/xtEtPQ+sz6N3bBM6WZ5FvO1lO4IKIOb43qnhoc4qxP5OeA== + dependencies: + rimraf "~2.6.2" + terser-webpack-plugin@^1.4.3: version "1.4.3" resolved "https://registry.yarnpkg.com/terser-webpack-plugin/-/terser-webpack-plugin-1.4.3.tgz#5ecaf2dbdc5fb99745fd06791f46fc9ddb1c9a7c" @@ -12945,9 +13117,9 @@ terser-webpack-plugin@^1.4.3: worker-farm "^1.7.0" terser@^4.1.2: - version "4.6.3" - resolved "https://registry.yarnpkg.com/terser/-/terser-4.6.3.tgz#e33aa42461ced5238d352d2df2a67f21921f8d87" - integrity sha512-Lw+ieAXmY69d09IIc/yqeBqXpEQIpDGZqT34ui1QWXIUpR2RjbqEkT8X7Lgex19hslSqcWM5iMN2kM11eMsESQ== + version "4.6.4" + resolved "https://registry.yarnpkg.com/terser/-/terser-4.6.4.tgz#40a0b37afbe5b57e494536815efa68326840fc00" + integrity sha512-5fqgBPLgVHZ/fVvqRhhUp9YUiGXhFJ9ZkrZWD9vQtFBR4QIGTnbsb+/kKqSqfgp3WnBwGWAFnedGTtmX1YTn0w== dependencies: commander "^2.20.0" source-map "~0.6.1" @@ -13192,9 +13364,9 @@ ts-node@^8.6.2: yn "3.1.1" tslib@^1.10.0, tslib@^1.8.0, tslib@^1.8.1, tslib@^1.9.0: - version "1.10.0" - resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.10.0.tgz#c3c19f95973fb0a62973fb09d90d961ee43e5c8a" - integrity sha512-qOebF53frne81cf0S9B41ByenJ3/IuH8yJKngAX35CmiZySA0khhkovshKK+jGCaMnVomla7gVlIcc3EvKPbTQ== + version "1.11.1" + resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.11.1.tgz#eb15d128827fbee2841549e171f45ed338ac7e35" + integrity sha512-aZW88SY8kQbU7gpV19lN24LtXh/yD4ZZg6qieAJDDg+YBsJcSmLGK9QpnUjAKVG/xefmvJGd1WUmfpT/g6AJGA== tslint@^5.5.0: version "5.20.1" @@ -13274,20 +13446,15 @@ typescript@3.5.1: resolved "https://registry.yarnpkg.com/typescript/-/typescript-3.5.1.tgz#ba72a6a600b2158139c5dd8850f700e231464202" integrity sha512-64HkdiRv1yYZsSe4xC1WVgamNigVYjlssIoaH2HcZF0+ijsk5YK2g0G34w9wJkze8+5ow4STd22AynfO6ZYYLw== -typescript@3.5.3: - version "3.5.3" - resolved "https://registry.yarnpkg.com/typescript/-/typescript-3.5.3.tgz#c830f657f93f1ea846819e929092f5fe5983e977" - integrity sha512-ACzBtm/PhXBDId6a6sDJfroT2pOWt/oOnk4/dElG5G33ZL776N3Y6/6bKZJBFpd+b05F3Ct9qDjMeJmRWtE2/g== - uc.micro@^1.0.1, uc.micro@^1.0.5: version "1.0.6" resolved "https://registry.yarnpkg.com/uc.micro/-/uc.micro-1.0.6.tgz#9c411a802a409a91fc6cf74081baba34b24499ac" integrity sha512-8Y75pvTYkLJW2hWQHXxoqRgV7qb9B+9vFEtidML+7koHUFapnVJAZ6cKs+Qjz5Aw3aZWHMC6u0wJE3At+nSGwA== uglify-js@^3.1.4: - version "3.7.7" - resolved "https://registry.yarnpkg.com/uglify-js/-/uglify-js-3.7.7.tgz#21e52c7dccda80a53bf7cde69628a7e511aec9c9" - integrity sha512-FeSU+hi7ULYy6mn8PKio/tXsdSXN35lm4KgV2asx00kzrLU9Pi3oAslcJT70Jdj7PHX29gGUPOT6+lXGBbemhA== + version "3.8.0" + resolved "https://registry.yarnpkg.com/uglify-js/-/uglify-js-3.8.0.tgz#f3541ae97b2f048d7e7e3aa4f39fd8a1f5d7a805" + integrity sha512-ugNSTT8ierCsDHso2jkBHXYrU8Y5/fY2ZUprfrJUiD7YpuFvV4jODLFmb3h4btQjqr5Nh4TX4XtgDfCU1WdioQ== dependencies: commander "~2.20.3" source-map "~0.6.1" @@ -13382,9 +13549,16 @@ unique-slug@^2.0.0: imurmurhash "^0.1.4" universal-user-agent@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/universal-user-agent/-/universal-user-agent-4.0.0.tgz#27da2ec87e32769619f68a14996465ea1cb9df16" - integrity sha512-eM8knLpev67iBDizr/YtqkJsF3GK8gzDc6st/WKzrTuPtcsOKW/0IdL4cnMBsU69pOx0otavLWBDGTwg+dB0aA== + version "4.0.1" + resolved "https://registry.yarnpkg.com/universal-user-agent/-/universal-user-agent-4.0.1.tgz#fd8d6cb773a679a709e967ef8288a31fcc03e557" + integrity sha512-LnST3ebHwVL2aNe4mejI9IQh2HfZ1RLo8Io2HugSif8ekzD1TlWpHpColOB/eh8JHMLkGH3Akqf040I+4ylNxg== + dependencies: + os-name "^3.1.0" + +universal-user-agent@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/universal-user-agent/-/universal-user-agent-5.0.0.tgz#a3182aa758069bf0e79952570ca757de3579c1d9" + integrity sha512-B5TPtzZleXyPrUMKCpEHFmVhMN6EhmJYjG5PQna9s7mXeSqGTLap4OpqLl5FCEFUI3UBmllkETwKf/db66Y54Q== dependencies: os-name "^3.1.0" @@ -13419,6 +13593,22 @@ unzip-stream@^0.3.0: binary "^0.3.0" mkdirp "^0.5.1" +unzipper@^0.10.5: + version "0.10.10" + resolved "https://registry.yarnpkg.com/unzipper/-/unzipper-0.10.10.tgz#d82d41fbdfa1f0731123eb11c2cfc028b45d3d42" + integrity sha512-wEgtqtrnJ/9zIBsQb8UIxOhAH1eTHfi7D/xvmrUoMEePeI6u24nq1wigazbIFtHt6ANYXdEVTvc8XYNlTurs7A== + dependencies: + big-integer "^1.6.17" + binary "~0.3.0" + bluebird "~3.4.1" + buffer-indexof-polyfill "~1.0.0" + duplexer2 "~0.1.4" + fstream "^1.0.12" + graceful-fs "^4.2.2" + listenercount "~1.0.1" + readable-stream "~2.3.6" + setimmediate "~1.0.4" + unzipper@^0.9.11: version "0.9.15" resolved "https://registry.yarnpkg.com/unzipper/-/unzipper-0.9.15.tgz#97d99203dad17698ee39882483c14e4845c7549c" @@ -13586,6 +13776,11 @@ verror@1.10.0: core-util-is "1.0.2" extsprintf "^1.2.0" +vhost@^3.0.2: + version "3.0.2" + resolved "https://registry.yarnpkg.com/vhost/-/vhost-3.0.2.tgz#2fb1decd4c466aa88b0f9341af33dc1aff2478d5" + integrity sha1-L7HezUxGaqiLD5NBrzPcGv8keNU= + vinyl-file@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/vinyl-file/-/vinyl-file-2.0.0.tgz#a7ebf5ffbefda1b7d18d140fcb07b223efb6751a" @@ -13607,7 +13802,7 @@ vinyl@^1.1.0: clone-stats "^0.0.1" replace-ext "0.0.1" -vinyl@^2.0.1: +vinyl@^2.0.1, vinyl@^2.2.0: version "2.2.0" resolved "https://registry.yarnpkg.com/vinyl/-/vinyl-2.2.0.tgz#d85b07da96e458d25b2ffe19fece9f2caa13ed86" integrity sha512-MBH+yP0kC/GQ5GwBqrTPTzEfiiLjta7hTtvQtbxBgTeSXsmKQRQecjibMbxIXzVT3Y9KJK+drOz1/k+vsu8Nkg== @@ -13625,17 +13820,17 @@ vm-browserify@^1.0.1: integrity sha512-2ham8XPWTONajOR0ohOKOHXkm3+gaBmGut3SRuu75xLd/RRaY6vqgh8NBYYk7+RW3u5AtzPQZG8F10LHkl0lAQ== vscode-debugadapter@^1.26.0, vscode-debugadapter@^1.37.1: - version "1.38.0" - resolved "https://registry.yarnpkg.com/vscode-debugadapter/-/vscode-debugadapter-1.38.0.tgz#764a2cef6634cf17c35e1ca97fa1faa253ac87c1" - integrity sha512-rm4qmbqj8aAaE8sUt4hX2HZUi7Nmtmf10fiGPqbLZWSFPrBi6myxhrQ0HPeG6Xep5rEgrGzVwCJ/lSGPz2ja1A== + version "1.39.0" + resolved "https://registry.yarnpkg.com/vscode-debugadapter/-/vscode-debugadapter-1.39.0.tgz#8b2a1afb287e9be37e9fe88e2c05eb35f8724425" + integrity sha512-i8gU7H3N4EupmX4dMgh1DUS8PAy9AnB1je9QvZ4oWCbwrdREtOiB23cDGPRzyJDmcgoZLyikkrP05SyBCtRERA== dependencies: mkdirp "^0.5.1" - vscode-debugprotocol "1.38.0" + vscode-debugprotocol "1.39.0" -vscode-debugprotocol@1.38.0, vscode-debugprotocol@^1.26.0, vscode-debugprotocol@^1.32.0, vscode-debugprotocol@^1.37.0: - version "1.38.0" - resolved "https://registry.yarnpkg.com/vscode-debugprotocol/-/vscode-debugprotocol-1.38.0.tgz#7a9bcd457e6642f48fabef114c0fa1c25a2fb1e7" - integrity sha512-oam9iSjNfXSn71a8bmNsXv8k/rIKSOcllIPrFnNgxd1EMBpfnum+gb7lmRpcH0zSjGb+OH8Ncn8B5tv8srWbNQ== +vscode-debugprotocol@1.39.0, vscode-debugprotocol@^1.26.0, vscode-debugprotocol@^1.32.0, vscode-debugprotocol@^1.37.0: + version "1.39.0" + resolved "https://registry.yarnpkg.com/vscode-debugprotocol/-/vscode-debugprotocol-1.39.0.tgz#0c639178d0d5ea7de7903b6478b53d2bc0d77461" + integrity sha512-Wkvgtuz90vjtQBcvw9Z+BYa4dA6W+sHwHMpqvJVNmwWSuT3JZdl0XDhZNLqtMXkVF4okxtAe0MmbupPSt+gnAQ== vscode-jsonrpc@^4.1.0-next: version "4.1.0-next.3" @@ -13656,9 +13851,9 @@ vscode-languageclient@^5.3.0-next: vscode-languageserver-protocol "^3.15.0-next.8" vscode-languageserver-protocol@^3.15.0-next.8: - version "3.15.2" - resolved "https://registry.yarnpkg.com/vscode-languageserver-protocol/-/vscode-languageserver-protocol-3.15.2.tgz#e52c62923140b2655ad2472f6f29cfb83bacf5b8" - integrity sha512-GdL05JKOgZ76RDg3suiGCl9enESM7iQgGw4x93ibTh4sldvZmakHmTeZ4iUApPPGKf6O3OVBtrsksBXnHYaxNg== + version "3.15.3" + resolved "https://registry.yarnpkg.com/vscode-languageserver-protocol/-/vscode-languageserver-protocol-3.15.3.tgz#3fa9a0702d742cf7883cb6182a6212fcd0a1d8bb" + integrity sha512-zrMuwHOAQRhjDSnflWdJG+O2ztMWss8GqUUB8dXLR/FPenwkiBNkMIJJYfSN6sgskvsF0rHAoBowNQfbyZnnvw== dependencies: vscode-jsonrpc "^5.0.1" vscode-languageserver-types "3.15.1" @@ -14134,9 +14329,9 @@ year@^0.2.1: integrity sha1-QIOuUgoxiyPshgN/MADLiSvfm7A= yeoman-environment@^2.0.0, yeoman-environment@^2.0.5: - version "2.7.0" - resolved "https://registry.yarnpkg.com/yeoman-environment/-/yeoman-environment-2.7.0.tgz#d1b6679de883ce14a68b869c4b19d55a0d66f477" - integrity sha512-YNzSUWgJVSgnm0qgLON4Gb2nTm+kywBiWjK4MbvosjUP2YJJ30lNhEx7ukyzKRPUlsavd5IsuALtF6QaVrq81A== + version "2.8.0" + resolved "https://registry.yarnpkg.com/yeoman-environment/-/yeoman-environment-2.8.0.tgz#003f7d3f506e868b86dbc1c1265a963a236807fa" + integrity sha512-BbJeEna23Qx90fBiJt1awcZ9okfPY/rP3xZYsk1rD3x8LuQgpo4BfegPvQT1sqqh2+gYVZmYZMv5pS8+Muyr9Q== dependencies: chalk "^2.4.1" cross-spawn "^6.0.5" @@ -14144,7 +14339,7 @@ yeoman-environment@^2.0.0, yeoman-environment@^2.0.5: diff "^3.5.0" escape-string-regexp "^1.0.2" globby "^8.0.1" - grouped-queue "^0.3.3" + grouped-queue "^1.0.0" inquirer "^6.0.0" is-scoped "^1.0.0" lodash "^4.17.10"