mirror of
https://github.com/arduino/arduino-ide.git
synced 2025-11-09 18:38:33 +00:00
Support of the CLI config.
Signed-off-by: Akos Kitta <kittaakos@typefox.io>
This commit is contained in:
12
.gitignore
vendored
12
.gitignore
vendored
@@ -8,10 +8,12 @@ build/
|
|||||||
src-gen/
|
src-gen/
|
||||||
*webpack.config.js
|
*webpack.config.js
|
||||||
.DS_Store
|
.DS_Store
|
||||||
/workspace/static
|
|
||||||
.DS_Store
|
|
||||||
# switching from `electron` to `browser` in dev mode.
|
# switching from `electron` to `browser` in dev mode.
|
||||||
.browser_modules
|
.browser_modules
|
||||||
# LS logs
|
yarn*.log
|
||||||
inols*.log
|
# For the VS Code extensions used by Theia.
|
||||||
yarn-error.log
|
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
|
||||||
|
|||||||
31
.vscode/launch.json
vendored
31
.vscode/launch.json
vendored
@@ -36,7 +36,8 @@
|
|||||||
"--hostname=localhost",
|
"--hostname=localhost",
|
||||||
"--no-cluster",
|
"--no-cluster",
|
||||||
"--remote-debugging-port=9222",
|
"--remote-debugging-port=9222",
|
||||||
"--no-app-auto-install"
|
"--no-app-auto-install",
|
||||||
|
"--plugins=local-dir:plugins"
|
||||||
],
|
],
|
||||||
"env": {
|
"env": {
|
||||||
"NODE_ENV": "development"
|
"NODE_ENV": "development"
|
||||||
@@ -61,7 +62,8 @@
|
|||||||
"--hostname=0.0.0.0",
|
"--hostname=0.0.0.0",
|
||||||
"--port=3000",
|
"--port=3000",
|
||||||
"--no-cluster",
|
"--no-cluster",
|
||||||
"--no-app-auto-install"
|
"--no-app-auto-install",
|
||||||
|
"--plugins=local-dir:plugins"
|
||||||
],
|
],
|
||||||
"windows": {
|
"windows": {
|
||||||
"env": {
|
"env": {
|
||||||
@@ -81,31 +83,6 @@
|
|||||||
"smartStep": true,
|
"smartStep": true,
|
||||||
"internalConsoleOptions": "openOnSessionStart",
|
"internalConsoleOptions": "openOnSessionStart",
|
||||||
"outputCapture": "std"
|
"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"
|
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|||||||
44
.vscode/tasks.json
vendored
44
.vscode/tasks.json
vendored
@@ -4,7 +4,7 @@
|
|||||||
"version": "2.0.0",
|
"version": "2.0.0",
|
||||||
"tasks": [
|
"tasks": [
|
||||||
{
|
{
|
||||||
"label": "Arduino Editor - Start Browser Example",
|
"label": "Arduino Pro IDE - Start Browser App",
|
||||||
"type": "shell",
|
"type": "shell",
|
||||||
"command": "yarn --cwd ./browser-app start",
|
"command": "yarn --cwd ./browser-app start",
|
||||||
"group": "build",
|
"group": "build",
|
||||||
@@ -15,7 +15,7 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"label": "Arduino Editor - Watch Theia Extension",
|
"label": "Arduino Pro IDE - Watch IDE Extension",
|
||||||
"type": "shell",
|
"type": "shell",
|
||||||
"command": "yarn --cwd ./arduino-ide-extension watch",
|
"command": "yarn --cwd ./arduino-ide-extension watch",
|
||||||
"group": "build",
|
"group": "build",
|
||||||
@@ -26,7 +26,18 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"label": "Arduino Editor - Watch Browser Example",
|
"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",
|
"type": "shell",
|
||||||
"command": "yarn --cwd ./browser-app watch",
|
"command": "yarn --cwd ./browser-app watch",
|
||||||
"group": "build",
|
"group": "build",
|
||||||
@@ -37,11 +48,32 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"label": "Arduino Editor - Watch All",
|
"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",
|
"type": "shell",
|
||||||
"dependsOn": [
|
"dependsOn": [
|
||||||
"Arduino Editor - Watch Theia Extension",
|
"Arduino Pro IDE - Watch IDE Extension",
|
||||||
"Arduino Editor - Watch Browser Example"
|
"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"
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|||||||
@@ -20,16 +20,9 @@
|
|||||||
"build": "tsc && yarn lint",
|
"build": "tsc && yarn lint",
|
||||||
"watch": "tsc -w"
|
"watch": "tsc -w"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
|
||||||
"rimraf": "^2.6.1",
|
|
||||||
"tslint": "^5.5.0",
|
|
||||||
"typescript": "3.5.1"
|
|
||||||
},
|
|
||||||
"files": [
|
"files": [
|
||||||
"lib",
|
"lib",
|
||||||
"src",
|
"src"
|
||||||
"build",
|
|
||||||
"data"
|
|
||||||
],
|
],
|
||||||
"theiaExtensions": [
|
"theiaExtensions": [
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ import { injectable, inject } from 'inversify';
|
|||||||
import { DebugAdapterContribution, DebugAdapterExecutable } from '@theia/debug/lib/common/debug-model';
|
import { DebugAdapterContribution, DebugAdapterExecutable } from '@theia/debug/lib/common/debug-model';
|
||||||
import { DebugConfiguration } from '@theia/debug/lib/common/debug-configuration';
|
import { DebugConfiguration } from '@theia/debug/lib/common/debug-configuration';
|
||||||
import { IJSONSchema } from '@theia/core/lib/common/json-schema';
|
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()
|
@injectable()
|
||||||
export class ArduinoDebugAdapterContribution implements DebugAdapterContribution {
|
export class ArduinoDebugAdapterContribution implements DebugAdapterContribution {
|
||||||
@@ -12,7 +12,7 @@ export class ArduinoDebugAdapterContribution implements DebugAdapterContribution
|
|||||||
readonly label = 'Arduino';
|
readonly label = 'Arduino';
|
||||||
readonly languages = ['c', 'cpp', 'ino'];
|
readonly languages = ['c', 'cpp', 'ino'];
|
||||||
|
|
||||||
@inject(ArduinoCli) arduinoCli: ArduinoCli;
|
@inject(ArduinoDaemonImpl) daemon: ArduinoDaemonImpl;
|
||||||
|
|
||||||
getSchemaAttributes(): IJSONSchema[] {
|
getSchemaAttributes(): IJSONSchema[] {
|
||||||
return [
|
return [
|
||||||
@@ -66,7 +66,7 @@ export class ArduinoDebugAdapterContribution implements DebugAdapterContribution
|
|||||||
const startFunction = config.pauseAtMain ? 'main' : 'setup';
|
const startFunction = config.pauseAtMain ? 'main' : 'setup';
|
||||||
const res: ActualDebugConfig = {
|
const res: ActualDebugConfig = {
|
||||||
...config,
|
...config,
|
||||||
arduinoCli: await this.arduinoCli.getExecPath(),
|
arduinoCli: await this.daemon.getExecPath(),
|
||||||
fqbn: '${fqbn}',
|
fqbn: '${fqbn}',
|
||||||
uploadPort: '${port}',
|
uploadPort: '${port}',
|
||||||
initCommands: [
|
initCommands: [
|
||||||
|
|||||||
114
arduino-ide-extension/data/cli/schema/arduino-cli.schema.json
Normal file
114
arduino-ide-extension/data/cli/schema/arduino-cli.schema.json
Normal file
@@ -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
|
||||||
|
}
|
||||||
@@ -6,8 +6,20 @@
|
|||||||
"engines": {
|
"engines": {
|
||||||
"node": ">=10.10.0"
|
"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": {
|
"dependencies": {
|
||||||
"@grpc/grpc-js": "^0.6.12",
|
"@grpc/grpc-js": "^0.6.18",
|
||||||
"@theia/application-package": "next",
|
"@theia/application-package": "next",
|
||||||
"@theia/core": "next",
|
"@theia/core": "next",
|
||||||
"@theia/cpp": "next",
|
"@theia/cpp": "next",
|
||||||
@@ -23,13 +35,22 @@
|
|||||||
"@theia/terminal": "next",
|
"@theia/terminal": "next",
|
||||||
"@theia/workspace": "next",
|
"@theia/workspace": "next",
|
||||||
"@types/dateformat": "^3.0.1",
|
"@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/google-protobuf": "^3.7.1",
|
||||||
|
"@types/lodash.debounce": "^4.0.6",
|
||||||
"@types/ps-tree": "^1.1.0",
|
"@types/ps-tree": "^1.1.0",
|
||||||
"@types/react-select": "^3.0.0",
|
"@types/react-select": "^3.0.0",
|
||||||
"@types/which": "^1.3.1",
|
"@types/which": "^1.3.1",
|
||||||
|
"ajv": "^6.5.3",
|
||||||
"css-element-queries": "^1.2.0",
|
"css-element-queries": "^1.2.0",
|
||||||
"dateformat": "^3.0.3",
|
"dateformat": "^3.0.3",
|
||||||
|
"deepmerge": "^4.2.2",
|
||||||
|
"glob": "^7.1.6",
|
||||||
"google-protobuf": "^3.11.0",
|
"google-protobuf": "^3.11.0",
|
||||||
|
"lodash.debounce": "^4.0.8",
|
||||||
|
"js-yaml": "^3.13.1",
|
||||||
"p-queue": "^5.0.0",
|
"p-queue": "^5.0.0",
|
||||||
"ps-tree": "^1.2.0",
|
"ps-tree": "^1.2.0",
|
||||||
"react-select": "^3.0.4",
|
"react-select": "^3.0.4",
|
||||||
@@ -39,31 +60,11 @@
|
|||||||
"upath": "^1.1.2",
|
"upath": "^1.1.2",
|
||||||
"which": "^1.3.1"
|
"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": {
|
"devDependencies": {
|
||||||
"@types/chai": "^4.2.7",
|
"@types/chai": "^4.2.7",
|
||||||
"@types/chai-string": "^1.4.2",
|
"@types/chai-string": "^1.4.2",
|
||||||
"@types/mocha": "^5.2.7",
|
"@types/mocha": "^5.2.7",
|
||||||
|
"@types/temp": "^0.8.34",
|
||||||
"chai": "^4.2.0",
|
"chai": "^4.2.0",
|
||||||
"chai-string": "^1.5.0",
|
"chai-string": "^1.5.0",
|
||||||
"decompress": "^4.2.0",
|
"decompress": "^4.2.0",
|
||||||
@@ -75,14 +76,23 @@
|
|||||||
"mocha": "^7.0.0",
|
"mocha": "^7.0.0",
|
||||||
"moment": "^2.24.0",
|
"moment": "^2.24.0",
|
||||||
"ncp": "^2.0.0",
|
"ncp": "^2.0.0",
|
||||||
"rimraf": "^2.6.1",
|
"protoc": "1.0.4",
|
||||||
"shelljs": "^0.8.3",
|
"shelljs": "^0.8.3",
|
||||||
|
"temp": "^0.9.1",
|
||||||
"ts-node": "^8.6.2",
|
"ts-node": "^8.6.2",
|
||||||
"tslint": "^5.5.0",
|
|
||||||
"typescript": "3.5.3",
|
|
||||||
"uuid": "^3.2.1",
|
"uuid": "^3.2.1",
|
||||||
"yargs": "^11.1.0"
|
"yargs": "^11.1.0"
|
||||||
},
|
},
|
||||||
|
"mocha": {
|
||||||
|
"require": [
|
||||||
|
"ts-node/register",
|
||||||
|
"reflect-metadata/Reflect"
|
||||||
|
],
|
||||||
|
"reporter": "spec",
|
||||||
|
"colors": true,
|
||||||
|
"watch-extensions": "ts,tsx",
|
||||||
|
"timeout": 10000
|
||||||
|
},
|
||||||
"files": [
|
"files": [
|
||||||
"lib",
|
"lib",
|
||||||
"src",
|
"src",
|
||||||
|
|||||||
@@ -2,30 +2,15 @@
|
|||||||
|
|
||||||
(async () => {
|
(async () => {
|
||||||
|
|
||||||
const DEFAULT_VERSION = 'nightly'; // '0.3.7-alpha.preview';
|
|
||||||
|
|
||||||
const os = require('os');
|
const os = require('os');
|
||||||
const path = require('path');
|
const path = require('path');
|
||||||
|
const glob = require('glob');
|
||||||
const { v4 } = require('uuid');
|
const { v4 } = require('uuid');
|
||||||
const shell = require('shelljs');
|
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')}`;
|
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`);
|
const repository = path.join(os.tmpdir(), `${v4()}-arduino-cli`);
|
||||||
if (shell.mkdir('-p', repository).code !== 0) {
|
if (shell.mkdir('-p', repository).code !== 0) {
|
||||||
shell.exit(1);
|
shell.exit(1);
|
||||||
@@ -34,11 +19,22 @@
|
|||||||
if (shell.exec(`git clone https://github.com/arduino/arduino-cli.git ${repository}`).code !== 0) {
|
if (shell.exec(`git clone https://github.com/arduino/arduino-cli.git ${repository}`).code !== 0) {
|
||||||
shell.exit(1);
|
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.exit(1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
shell.echo('Generating TS/JS API from:');
|
shell.echo('Generating TS/JS API from:');
|
||||||
if (shell.exec(`git -C ${repository} rev-parse --abbrev-ref HEAD`).code !== 0) {
|
if (shell.exec(`git -C ${repository} rev-parse --abbrev-ref HEAD`).code !== 0) {
|
||||||
shell.exit(1);
|
shell.exit(1);
|
||||||
@@ -55,22 +51,38 @@
|
|||||||
|
|
||||||
const rpc = path.join(repository, 'rpc');
|
const rpc = path.join(repository, 'rpc');
|
||||||
const out = path.join(__dirname, '..', 'src', 'node', 'cli-protocol');
|
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.
|
// Generate JS code from the `.proto` files.
|
||||||
if (shell.exec(`grpc_tools_node_protoc \
|
if (shell.exec(`grpc_tools_node_protoc \
|
||||||
--js_out=import_style=commonjs,binary:${out} \
|
--js_out=import_style=commonjs,binary:${out} \
|
||||||
--grpc_out=${out} \
|
--grpc_out=${out} \
|
||||||
--plugin=protoc-gen-grpc=${plugin} \
|
--plugin=protoc-gen-grpc=${plugin} \
|
||||||
-I ${rpc} \
|
-I ${rpc} \
|
||||||
${path.join(rpc, '/**/*.proto')}`).code !== 0) {
|
${protos.join(' ')}`).code !== 0) {
|
||||||
shell.exit(1);
|
shell.exit(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Generate the `.d.ts` files for JS.
|
// Generate the `.d.ts` files for JS.
|
||||||
if (shell.exec(`protoc \
|
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} \
|
--ts_out=${out} \
|
||||||
-I ${rpc} \
|
-I ${rpc} \
|
||||||
${path.join(rpc, '/**/*.proto')}`).code !== 0) {
|
${protos.join(' ')}`).code !== 0) {
|
||||||
shell.exit(1);
|
shell.exit(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -2,6 +2,8 @@ import { Command } from '@theia/core/lib/common/command';
|
|||||||
|
|
||||||
export namespace ArduinoCommands {
|
export namespace ArduinoCommands {
|
||||||
|
|
||||||
|
const category = 'Arduino';
|
||||||
|
|
||||||
export const VERIFY: Command = {
|
export const VERIFY: Command = {
|
||||||
id: 'arduino-verify',
|
id: 'arduino-verify',
|
||||||
label: 'Verify Sketch'
|
label: 'Verify Sketch'
|
||||||
@@ -24,8 +26,9 @@ export namespace ArduinoCommands {
|
|||||||
|
|
||||||
export const SHOW_OPEN_CONTEXT_MENU: Command = {
|
export const SHOW_OPEN_CONTEXT_MENU: Command = {
|
||||||
id: 'arduino-show-open-context-menu',
|
id: 'arduino-show-open-context-menu',
|
||||||
label: 'Open Sketch'
|
label: 'Open Sketch',
|
||||||
}
|
category
|
||||||
|
};
|
||||||
|
|
||||||
export const OPEN_FILE_NAVIGATOR: Command = {
|
export const OPEN_FILE_NAVIGATOR: Command = {
|
||||||
id: 'arduino-open-file-navigator'
|
id: 'arduino-open-file-navigator'
|
||||||
@@ -40,19 +43,26 @@ export namespace ArduinoCommands {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export const NEW_SKETCH: Command = {
|
export const NEW_SKETCH: Command = {
|
||||||
id: "arduino-new-sketch",
|
id: 'arduino-new-sketch',
|
||||||
label: 'New Sketch',
|
label: 'New Sketch',
|
||||||
category: 'File'
|
category
|
||||||
}
|
}
|
||||||
|
|
||||||
export const OPEN_BOARDS_DIALOG: Command = {
|
export const OPEN_BOARDS_DIALOG: Command = {
|
||||||
id: "arduino-open-boards-dialog"
|
id: 'arduino-open-boards-dialog'
|
||||||
}
|
}
|
||||||
|
|
||||||
export const TOGGLE_ADVANCED_MODE: Command = {
|
export const TOGGLE_ADVANCED_MODE: Command = {
|
||||||
id: "arduino-toggle-advanced-mode"
|
id: 'arduino-toggle-advanced-mode'
|
||||||
}
|
}
|
||||||
export const TOGGLE_ADVANCED_MODE_TOOLBAR: Command = {
|
export const TOGGLE_ADVANCED_MODE_TOOLBAR: Command = {
|
||||||
id: "arduino-toggle-advanced-mode-toolbar"
|
id: "arduino-toggle-advanced-mode-toolbar"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export const OPEN_CLI_CONFIG: Command = {
|
||||||
|
id: 'arduino-open-cli-config',
|
||||||
|
label: 'Open CLI Configuration',
|
||||||
|
category
|
||||||
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -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<void>();
|
||||||
|
protected readonly onStoppedEmitter = new Emitter<void>();
|
||||||
|
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<void> {
|
||||||
|
return this.onStartedEmitter.event;
|
||||||
|
}
|
||||||
|
|
||||||
|
get onDaemonStopped(): Event<void> {
|
||||||
|
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);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -8,7 +8,6 @@ import { TabBarToolbarContribution, TabBarToolbarRegistry } from '@theia/core/li
|
|||||||
import { BoardsService } from '../common/protocol/boards-service';
|
import { BoardsService } from '../common/protocol/boards-service';
|
||||||
import { ArduinoCommands } from './arduino-commands';
|
import { ArduinoCommands } from './arduino-commands';
|
||||||
import { CoreService } from '../common/protocol/core-service';
|
import { CoreService } from '../common/protocol/core-service';
|
||||||
import { WorkspaceServiceExt } from './workspace-service-ext';
|
|
||||||
import { BoardsServiceClientImpl } from './boards/boards-service-client-impl';
|
import { BoardsServiceClientImpl } from './boards/boards-service-client-impl';
|
||||||
import { WorkspaceRootUriAwareCommandHandler, WorkspaceCommands } from '@theia/workspace/lib/browser/workspace-commands';
|
import { WorkspaceRootUriAwareCommandHandler, WorkspaceCommands } from '@theia/workspace/lib/browser/workspace-commands';
|
||||||
import { SelectionService, MenuContribution, MenuModelRegistry, MAIN_MENU_BAR, MenuPath } from '@theia/core';
|
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 { EditorManager, EditorMainMenu } from '@theia/editor/lib/browser';
|
||||||
import {
|
import {
|
||||||
ContextMenuRenderer, Widget, StatusBar, StatusBarAlignment, FrontendApplicationContribution,
|
ContextMenuRenderer, Widget, StatusBar, StatusBarAlignment, FrontendApplicationContribution,
|
||||||
FrontendApplication, KeybindingContribution, KeybindingRegistry
|
FrontendApplication, KeybindingContribution, KeybindingRegistry, OpenerService, open
|
||||||
} from '@theia/core/lib/browser';
|
} from '@theia/core/lib/browser';
|
||||||
import { OpenFileDialogProps, FileDialogService } from '@theia/filesystem/lib/browser/file-dialog';
|
import { OpenFileDialogProps, FileDialogService } from '@theia/filesystem/lib/browser/file-dialog';
|
||||||
import { FileSystem, FileStat } from '@theia/filesystem/lib/common';
|
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 { EditorMode } from './editor-mode';
|
||||||
import { ColorContribution } from '@theia/core/lib/browser/color-application-contribution';
|
import { ColorContribution } from '@theia/core/lib/browser/color-application-contribution';
|
||||||
import { ColorRegistry } from '@theia/core/lib/browser/color-registry';
|
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 namespace ArduinoMenus {
|
||||||
export const SKETCH = [...MAIN_MENU_BAR, '3_sketch'];
|
export const SKETCH = [...MAIN_MENU_BAR, '3_sketch'];
|
||||||
@@ -70,9 +71,6 @@ export class ArduinoFrontendContribution implements FrontendApplicationContribut
|
|||||||
@inject(CoreService)
|
@inject(CoreService)
|
||||||
protected readonly coreService: CoreService;
|
protected readonly coreService: CoreService;
|
||||||
|
|
||||||
@inject(WorkspaceServiceExt)
|
|
||||||
protected readonly workspaceServiceExt: WorkspaceServiceExt;
|
|
||||||
|
|
||||||
@inject(ToolOutputServiceClient)
|
@inject(ToolOutputServiceClient)
|
||||||
protected readonly toolOutputServiceClient: ToolOutputServiceClient;
|
protected readonly toolOutputServiceClient: ToolOutputServiceClient;
|
||||||
|
|
||||||
@@ -136,14 +134,20 @@ export class ArduinoFrontendContribution implements FrontendApplicationContribut
|
|||||||
@inject(EditorMode)
|
@inject(EditorMode)
|
||||||
protected readonly editorMode: 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 application: FrontendApplication;
|
||||||
protected wsSketchCount: number = 0; // TODO: this does not belong here, does it?
|
protected wsSketchCount: number = 0; // TODO: this does not belong here, does it?
|
||||||
|
|
||||||
@postConstruct()
|
@postConstruct()
|
||||||
protected async init(): Promise<void> {
|
protected async init(): Promise<void> {
|
||||||
// This is a hack. Otherwise, the backend services won't bind.
|
|
||||||
await this.workspaceServiceExt.roots();
|
|
||||||
|
|
||||||
const updateStatusBar = (config: BoardsConfig.Config) => {
|
const updateStatusBar = (config: BoardsConfig.Config) => {
|
||||||
this.statusBar.setElement('arduino-selected-board', {
|
this.statusBar.setElement('arduino-selected-board', {
|
||||||
alignment: StatusBarAlignment.RIGHT,
|
alignment: StatusBarAlignment.RIGHT,
|
||||||
@@ -305,13 +309,11 @@ export class ArduinoFrontendContribution implements FrontendApplicationContribut
|
|||||||
});
|
});
|
||||||
|
|
||||||
registry.registerCommand(ArduinoCommands.OPEN_FILE_NAVIGATOR, {
|
registry.registerCommand(ArduinoCommands.OPEN_FILE_NAVIGATOR, {
|
||||||
isEnabled: () => true,
|
|
||||||
execute: () => this.doOpenFile()
|
execute: () => this.doOpenFile()
|
||||||
});
|
});
|
||||||
|
|
||||||
registry.registerCommand(ArduinoCommands.OPEN_SKETCH, {
|
registry.registerCommand(ArduinoCommands.OPEN_SKETCH, {
|
||||||
isEnabled: () => true,
|
execute: async (sketch: Sketch) => {
|
||||||
execute: (sketch: Sketch) => {
|
|
||||||
this.workspaceService.open(new URI(sketch.uri));
|
this.workspaceService.open(new URI(sketch.uri));
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@@ -340,7 +342,6 @@ export class ArduinoFrontendContribution implements FrontendApplicationContribut
|
|||||||
}));
|
}));
|
||||||
|
|
||||||
registry.registerCommand(ArduinoCommands.OPEN_BOARDS_DIALOG, {
|
registry.registerCommand(ArduinoCommands.OPEN_BOARDS_DIALOG, {
|
||||||
isEnabled: () => true,
|
|
||||||
execute: async () => {
|
execute: async () => {
|
||||||
const boardsConfig = await this.boardsConfigDialog.open();
|
const boardsConfig = await this.boardsConfigDialog.open();
|
||||||
if (boardsConfig) {
|
if (boardsConfig) {
|
||||||
@@ -358,6 +359,10 @@ export class ArduinoFrontendContribution implements FrontendApplicationContribut
|
|||||||
isToggled: () => this.editorMode.proMode,
|
isToggled: () => this.editorMode.proMode,
|
||||||
execute: () => this.editorMode.toggleProMode()
|
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() {
|
protected async verify() {
|
||||||
@@ -495,6 +500,10 @@ export class ArduinoFrontendContribution implements FrontendApplicationContribut
|
|||||||
registry.registerMenuAction([...CommonMenus.FILE, '0_new_sketch'], {
|
registry.registerMenuAction([...CommonMenus.FILE, '0_new_sketch'], {
|
||||||
commandId: ArduinoCommands.NEW_SKETCH.id
|
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 {
|
protected getMenuId(menuPath: string[]): string {
|
||||||
|
|||||||
@@ -15,11 +15,9 @@ import { ArduinoLanguageGrammarContribution } from './language/arduino-language-
|
|||||||
import { LibraryService, LibraryServicePath } from '../common/protocol/library-service';
|
import { LibraryService, LibraryServicePath } from '../common/protocol/library-service';
|
||||||
import { BoardsService, BoardsServicePath, BoardsServiceClient } from '../common/protocol/boards-service';
|
import { BoardsService, BoardsServicePath, BoardsServiceClient } from '../common/protocol/boards-service';
|
||||||
import { SketchesService, SketchesServicePath } from '../common/protocol/sketches-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 { BoardsListWidget } from './boards/boards-list-widget';
|
||||||
import { BoardsListWidgetFrontendContribution } from './boards/boards-widget-frontend-contribution';
|
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 { ToolOutputServiceClient } from '../common/protocol/tool-output-service';
|
||||||
import { ToolOutputService } from '../common/protocol/tool-output-service';
|
import { ToolOutputService } from '../common/protocol/tool-output-service';
|
||||||
import { ToolOutputServiceClientImpl } from './tool-output/client-service-impl';
|
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 { LibraryListWidgetFrontendContribution } from './library/library-widget-frontend-contribution';
|
||||||
import { MonitorServiceClientImpl } from './monitor/monitor-service-client-impl';
|
import { MonitorServiceClientImpl } from './monitor/monitor-service-client-impl';
|
||||||
import { MonitorServicePath, MonitorService, MonitorServiceClient } from '../common/protocol/monitor-service';
|
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 { MonitorWidget } from './monitor/monitor-widget';
|
||||||
import { MonitorViewContribution } from './monitor/monitor-view-contribution';
|
import { MonitorViewContribution } from './monitor/monitor-view-contribution';
|
||||||
import { MonitorConnection } from './monitor/monitor-connection';
|
import { MonitorConnection } from './monitor/monitor-connection';
|
||||||
import { MonitorModel } from './monitor/monitor-model';
|
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 { TabBarDecoratorService } from '@theia/core/lib/browser/shell/tab-bar-decorator';
|
||||||
import { ArduinoTabBarDecoratorService } from './shell/arduino-tab-bar-decorator';
|
import { ArduinoTabBarDecoratorService } from './shell/arduino-tab-bar-decorator';
|
||||||
import { ProblemManager } from '@theia/markers/lib/browser';
|
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 { ListItemRenderer } from './components/component-list/list-item-renderer';
|
||||||
import { ColorContribution } from '@theia/core/lib/browser/color-application-contribution';
|
import { ColorContribution } from '@theia/core/lib/browser/color-application-contribution';
|
||||||
import { MonacoThemingService } from '@theia/monaco/lib/browser/monaco-theming-service';
|
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');
|
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();
|
bind(SketchesService).toDynamicValue(context => WebSocketConnectionProvider.createProxy(context.container, SketchesServicePath)).inSingletonScope();
|
||||||
|
|
||||||
// Config service
|
// 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
|
// Boards service
|
||||||
bind(BoardsService).toDynamicValue(context => {
|
bind(BoardsService).toDynamicValue(context => {
|
||||||
@@ -136,7 +150,7 @@ export default new ContainerModule((bind: interfaces.Bind, unbind: interfaces.Un
|
|||||||
return client;
|
return client;
|
||||||
}).inSingletonScope();
|
}).inSingletonScope();
|
||||||
|
|
||||||
// boards auto-installer
|
// Boards auto-installer
|
||||||
bind(BoardsAutoInstaller).toSelf().inSingletonScope();
|
bind(BoardsAutoInstaller).toSelf().inSingletonScope();
|
||||||
bind(FrontendApplicationContribution).toService(BoardsAutoInstaller);
|
bind(FrontendApplicationContribution).toService(BoardsAutoInstaller);
|
||||||
|
|
||||||
@@ -157,9 +171,18 @@ export default new ContainerModule((bind: interfaces.Bind, unbind: interfaces.Un
|
|||||||
})
|
})
|
||||||
|
|
||||||
// Core service
|
// Core service
|
||||||
bind(CoreService)
|
bind(CoreService).toDynamicValue(context => {
|
||||||
.toDynamicValue(context => WebSocketConnectionProvider.createProxy(context.container, CoreServicePath))
|
const connection = context.container.get(WebSocketConnectionProvider);
|
||||||
.inSingletonScope();
|
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
|
// Tool output service client
|
||||||
bind(ToolOutputServiceClientImpl).toSelf().inSingletonScope();
|
bind(ToolOutputServiceClientImpl).toSelf().inSingletonScope();
|
||||||
@@ -169,18 +192,7 @@ export default new ContainerModule((bind: interfaces.Bind, unbind: interfaces.Un
|
|||||||
return client;
|
return client;
|
||||||
}).inSingletonScope();
|
}).inSingletonScope();
|
||||||
|
|
||||||
// The workspace service extension
|
// Serial monitor
|
||||||
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
|
|
||||||
bind(MonitorModel).toSelf().inSingletonScope();
|
bind(MonitorModel).toSelf().inSingletonScope();
|
||||||
bind(FrontendApplicationContribution).toService(MonitorModel);
|
bind(FrontendApplicationContribution).toService(MonitorModel);
|
||||||
bind(MonitorWidget).toSelf();
|
bind(MonitorWidget).toSelf();
|
||||||
@@ -190,14 +202,14 @@ export default new ContainerModule((bind: interfaces.Bind, unbind: interfaces.Un
|
|||||||
id: MonitorWidget.ID,
|
id: MonitorWidget.ID,
|
||||||
createWidget: () => context.container.get(MonitorWidget)
|
createWidget: () => context.container.get(MonitorWidget)
|
||||||
}));
|
}));
|
||||||
// Frontend binding for the monitor service
|
// Frontend binding for the serial monitor service
|
||||||
bind(MonitorService).toDynamicValue(context => {
|
bind(MonitorService).toDynamicValue(context => {
|
||||||
const connection = context.container.get(WebSocketConnectionProvider);
|
const connection = context.container.get(WebSocketConnectionProvider);
|
||||||
const client = context.container.get(MonitorServiceClientImpl);
|
const client = context.container.get(MonitorServiceClientImpl);
|
||||||
return connection.createProxy(MonitorServicePath, client);
|
return connection.createProxy(MonitorServicePath, client);
|
||||||
}).inSingletonScope();
|
}).inSingletonScope();
|
||||||
bind(MonitorConnection).toSelf().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(MonitorServiceClientImpl).toSelf().inSingletonScope();
|
||||||
bind(MonitorServiceClient).toDynamicValue(context => {
|
bind(MonitorServiceClient).toDynamicValue(context => {
|
||||||
const client = context.container.get(MonitorServiceClientImpl);
|
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`.
|
// Customizing default Theia layout based on the editor mode: `pro-mode` or `classic`.
|
||||||
bind(EditorMode).toSelf().inSingletonScope();
|
bind(EditorMode).toSelf().inSingletonScope();
|
||||||
bind(FrontendApplicationContribution).toService(EditorMode);
|
bind(FrontendApplicationContribution).toService(EditorMode);
|
||||||
|
|
||||||
|
// Layout and shell customizations.
|
||||||
rebind(OutlineViewContribution).to(ArduinoOutlineViewContribution).inSingletonScope();
|
rebind(OutlineViewContribution).to(ArduinoOutlineViewContribution).inSingletonScope();
|
||||||
rebind(ProblemContribution).to(ArduinoProblemContribution).inSingletonScope();
|
rebind(ProblemContribution).to(ArduinoProblemContribution).inSingletonScope();
|
||||||
rebind(FileNavigatorContribution).to(ArduinoNavigatorContribution).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(SearchInWorkspaceFrontendContribution).to(ArduinoSearchInWorkspaceContribution).inSingletonScope();
|
||||||
rebind(FrontendApplication).to(ArduinoFrontendApplication).inSingletonScope();
|
rebind(FrontendApplication).to(ArduinoFrontendApplication).inSingletonScope();
|
||||||
|
|
||||||
// Monaco customizations
|
// Show a disconnected status bar, when the daemon is not available
|
||||||
bind(ArduinoMonacoEditorProvider).toSelf().inSingletonScope();
|
bind(ArduinoApplicationConnectionStatusContribution).toSelf().inSingletonScope();
|
||||||
rebind(MonacoEditorProvider).toService(ArduinoMonacoEditorProvider);
|
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
|
// Decorator customizations
|
||||||
bind(ArduinoTabBarDecoratorService).toSelf().inSingletonScope();
|
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
|
// Customized layout restorer that can restore the state in async way: https://github.com/eclipse-theia/theia/issues/6579
|
||||||
bind(ArduinoShellLayoutRestorer).toSelf().inSingletonScope();
|
bind(ArduinoShellLayoutRestorer).toSelf().inSingletonScope();
|
||||||
rebind(ShellLayoutRestorer).toService(ArduinoShellLayoutRestorer);
|
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();
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -5,6 +5,8 @@ import { ReactWidget, Message } from '@theia/core/lib/browser';
|
|||||||
import { BoardsService } from '../../common/protocol/boards-service';
|
import { BoardsService } from '../../common/protocol/boards-service';
|
||||||
import { BoardsConfig } from './boards-config';
|
import { BoardsConfig } from './boards-config';
|
||||||
import { BoardsServiceClientImpl } from './boards-service-client-impl';
|
import { BoardsServiceClientImpl } from './boards-service-client-impl';
|
||||||
|
import { CoreServiceClientImpl } from '../core-service-client-impl';
|
||||||
|
import { ArduinoDaemonClientImpl } from '../arduino-daemon-client-impl';
|
||||||
|
|
||||||
@injectable()
|
@injectable()
|
||||||
export class BoardsConfigDialogWidget extends ReactWidget {
|
export class BoardsConfigDialogWidget extends ReactWidget {
|
||||||
@@ -15,6 +17,12 @@ export class BoardsConfigDialogWidget extends ReactWidget {
|
|||||||
@inject(BoardsServiceClientImpl)
|
@inject(BoardsServiceClientImpl)
|
||||||
protected readonly boardsServiceClient: BoardsServiceClientImpl;
|
protected readonly boardsServiceClient: BoardsServiceClientImpl;
|
||||||
|
|
||||||
|
@inject(CoreServiceClientImpl)
|
||||||
|
protected readonly coreServiceClient: CoreServiceClientImpl;
|
||||||
|
|
||||||
|
@inject(ArduinoDaemonClientImpl)
|
||||||
|
protected readonly daemonClient: ArduinoDaemonClientImpl;
|
||||||
|
|
||||||
protected readonly onBoardConfigChangedEmitter = new Emitter<BoardsConfig.Config>();
|
protected readonly onBoardConfigChangedEmitter = new Emitter<BoardsConfig.Config>();
|
||||||
readonly onBoardConfigChanged = this.onBoardConfigChangedEmitter.event;
|
readonly onBoardConfigChanged = this.onBoardConfigChangedEmitter.event;
|
||||||
|
|
||||||
@@ -38,6 +46,8 @@ export class BoardsConfigDialogWidget extends ReactWidget {
|
|||||||
<BoardsConfig
|
<BoardsConfig
|
||||||
boardsService={this.boardsService}
|
boardsService={this.boardsService}
|
||||||
boardsServiceClient={this.boardsServiceClient}
|
boardsServiceClient={this.boardsServiceClient}
|
||||||
|
coreServiceClient={this.coreServiceClient}
|
||||||
|
daemonClient={this.daemonClient}
|
||||||
onConfigChange={this.fireConfigChanged}
|
onConfigChange={this.fireConfigChanged}
|
||||||
onFocusNodeSet={this.setFocusNode} />
|
onFocusNodeSet={this.setFocusNode} />
|
||||||
</div>;
|
</div>;
|
||||||
@@ -51,5 +61,4 @@ export class BoardsConfigDialogWidget extends ReactWidget {
|
|||||||
(this.focusNode || this.node).focus();
|
(this.focusNode || this.node).focus();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,6 +2,8 @@ import * as React from 'react';
|
|||||||
import { DisposableCollection } from '@theia/core';
|
import { DisposableCollection } from '@theia/core';
|
||||||
import { BoardsService, Board, Port, AttachedSerialBoard, AttachedBoardsChangeEvent } from '../../common/protocol/boards-service';
|
import { BoardsService, Board, Port, AttachedSerialBoard, AttachedBoardsChangeEvent } from '../../common/protocol/boards-service';
|
||||||
import { BoardsServiceClientImpl } from './boards-service-client-impl';
|
import { BoardsServiceClientImpl } from './boards-service-client-impl';
|
||||||
|
import { CoreServiceClientImpl } from '../core-service-client-impl';
|
||||||
|
import { ArduinoDaemonClientImpl } from '../arduino-daemon-client-impl';
|
||||||
|
|
||||||
export namespace BoardsConfig {
|
export namespace BoardsConfig {
|
||||||
|
|
||||||
@@ -13,6 +15,8 @@ export namespace BoardsConfig {
|
|||||||
export interface Props {
|
export interface Props {
|
||||||
readonly boardsService: BoardsService;
|
readonly boardsService: BoardsService;
|
||||||
readonly boardsServiceClient: BoardsServiceClientImpl;
|
readonly boardsServiceClient: BoardsServiceClientImpl;
|
||||||
|
readonly coreServiceClient: CoreServiceClientImpl;
|
||||||
|
readonly daemonClient: ArduinoDaemonClientImpl;
|
||||||
readonly onConfigChange: (config: Config) => void;
|
readonly onConfigChange: (config: Config) => void;
|
||||||
readonly onFocusNodeSet: (element: HTMLElement | undefined) => void;
|
readonly onFocusNodeSet: (element: HTMLElement | undefined) => void;
|
||||||
}
|
}
|
||||||
@@ -21,6 +25,7 @@ export namespace BoardsConfig {
|
|||||||
searchResults: Array<Board & { packageName: string }>;
|
searchResults: Array<Board & { packageName: string }>;
|
||||||
knownPorts: Port[];
|
knownPorts: Port[];
|
||||||
showAllPorts: boolean;
|
showAllPorts: boolean;
|
||||||
|
query: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -70,6 +75,7 @@ export class BoardsConfig extends React.Component<BoardsConfig.Props, BoardsConf
|
|||||||
searchResults: [],
|
searchResults: [],
|
||||||
knownPorts: [],
|
knownPorts: [],
|
||||||
showAllPorts: false,
|
showAllPorts: false,
|
||||||
|
query: '',
|
||||||
...boardsConfig
|
...boardsConfig
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -77,12 +83,15 @@ export class BoardsConfig extends React.Component<BoardsConfig.Props, BoardsConf
|
|||||||
componentDidMount() {
|
componentDidMount() {
|
||||||
this.updateBoards();
|
this.updateBoards();
|
||||||
this.props.boardsService.getAvailablePorts().then(({ ports }) => this.updatePorts(ports));
|
this.props.boardsService.getAvailablePorts().then(({ ports }) => this.updatePorts(ports));
|
||||||
const { boardsServiceClient: client } = this.props;
|
const { boardsServiceClient, coreServiceClient, daemonClient } = this.props;
|
||||||
this.toDispose.pushAll([
|
this.toDispose.pushAll([
|
||||||
client.onBoardsChanged(event => this.updatePorts(event.newState.ports, AttachedBoardsChangeEvent.diff(event).detached.ports)),
|
boardsServiceClient.onBoardsChanged(event => this.updatePorts(event.newState.ports, AttachedBoardsChangeEvent.diff(event).detached.ports)),
|
||||||
client.onBoardsConfigChanged(({ selectedBoard, selectedPort }) => {
|
boardsServiceClient.onBoardsConfigChanged(({ selectedBoard, selectedPort }) => {
|
||||||
this.setState({ selectedBoard, selectedPort }, () => this.fireConfigChanged());
|
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<BoardsConfig.Props, BoardsConf
|
|||||||
? eventOrQuery
|
? eventOrQuery
|
||||||
: eventOrQuery.target.value.toLowerCase()
|
: eventOrQuery.target.value.toLowerCase()
|
||||||
).trim();
|
).trim();
|
||||||
|
this.setState({ query });
|
||||||
this.queryBoards({ query }).then(({ searchResults }) => this.setState({ searchResults }));
|
this.queryBoards({ query }).then(({ searchResults }) => this.setState({ searchResults }));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -65,7 +65,7 @@ export class FilterableListContainer<T extends ArduinoComponent> extends React.C
|
|||||||
/>
|
/>
|
||||||
}
|
}
|
||||||
|
|
||||||
protected handleFilterTextChange = (filterText: string) => {
|
protected handleFilterTextChange = (filterText: string = this.state.filterText) => {
|
||||||
this.setState({ filterText });
|
this.setState({ filterText });
|
||||||
this.search(filterText);
|
this.search(filterText);
|
||||||
}
|
}
|
||||||
@@ -132,7 +132,7 @@ export namespace FilterableListContainer {
|
|||||||
readonly itemRenderer: ListItemRenderer<T>;
|
readonly itemRenderer: ListItemRenderer<T>;
|
||||||
readonly resolveContainer: (element: HTMLElement) => void;
|
readonly resolveContainer: (element: HTMLElement) => void;
|
||||||
readonly resolveFocus: (element: HTMLElement | undefined) => void;
|
readonly resolveFocus: (element: HTMLElement | undefined) => void;
|
||||||
readonly filterTextChangeEvent: Event<string>;
|
readonly filterTextChangeEvent: Event<string | undefined>;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface State<T> {
|
export interface State<T> {
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import * as React from 'react';
|
import * as React from 'react';
|
||||||
import { injectable, postConstruct } from 'inversify';
|
import { injectable, postConstruct, inject } from 'inversify';
|
||||||
import { Message } from '@phosphor/messaging';
|
import { Message } from '@phosphor/messaging';
|
||||||
import { Deferred } from '@theia/core/lib/common/promise-util';
|
import { Deferred } from '@theia/core/lib/common/promise-util';
|
||||||
import { Emitter } from '@theia/core/lib/common/event';
|
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 { ArduinoComponent } from '../../../common/protocol/arduino-component';
|
||||||
import { FilterableListContainer } from './filterable-list-container';
|
import { FilterableListContainer } from './filterable-list-container';
|
||||||
import { ListItemRenderer } from './list-item-renderer';
|
import { ListItemRenderer } from './list-item-renderer';
|
||||||
|
import { CoreServiceClientImpl } from '../../core-service-client-impl';
|
||||||
|
import { ArduinoDaemonClientImpl } from '../../arduino-daemon-client-impl';
|
||||||
|
|
||||||
@injectable()
|
@injectable()
|
||||||
export abstract class ListWidget<T extends ArduinoComponent> extends ReactWidget {
|
export abstract class ListWidget<T extends ArduinoComponent> 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.
|
* Do not touch or use it. It is for setting the focus on the `input` after the widget activation.
|
||||||
*/
|
*/
|
||||||
protected focusNode: HTMLElement | undefined;
|
protected focusNode: HTMLElement | undefined;
|
||||||
protected readonly deferredContainer = new Deferred<HTMLElement>();
|
protected readonly deferredContainer = new Deferred<HTMLElement>();
|
||||||
protected readonly filterTextChangeEmitter = new Emitter<string>();
|
protected readonly filterTextChangeEmitter = new Emitter<string | undefined>();
|
||||||
|
|
||||||
constructor(protected options: ListWidget.Options<T>) {
|
constructor(protected options: ListWidget.Options<T>) {
|
||||||
super();
|
super();
|
||||||
@@ -40,6 +48,11 @@ export abstract class ListWidget<T extends ArduinoComponent> extends ReactWidget
|
|||||||
@postConstruct()
|
@postConstruct()
|
||||||
protected init(): void {
|
protected init(): void {
|
||||||
this.update();
|
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<HTMLElement> {
|
protected getScrollContainer(): MaybePromise<HTMLElement> {
|
||||||
@@ -72,7 +85,11 @@ export abstract class ListWidget<T extends ArduinoComponent> extends ReactWidget
|
|||||||
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));
|
this.deferredContainer.promise.then(() => this.filterTextChangeEmitter.fire(filterText));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -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<Config>();
|
||||||
|
protected invalidConfigPopup: Promise<void | 'No' | 'Yes' | undefined> | 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<Config> {
|
||||||
|
return this.onConfigChangedEmitter.event;
|
||||||
|
}
|
||||||
|
|
||||||
|
protected info(message: string): void {
|
||||||
|
this.messageService.info(message, { timeout: 3000 });
|
||||||
|
this.logger.info(message);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -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<void>();
|
||||||
|
|
||||||
|
notifyIndexUpdated(): void {
|
||||||
|
this.info('Index has been updated.');
|
||||||
|
this.onIndexUpdatedEmitter.fire();
|
||||||
|
}
|
||||||
|
|
||||||
|
get onIndexUpdated(): Event<void> {
|
||||||
|
return this.onIndexUpdatedEmitter.event;
|
||||||
|
}
|
||||||
|
|
||||||
|
protected info(message: string): void {
|
||||||
|
this.messageService.info(message, { timeout: 3000 });
|
||||||
|
this.logger.info(message);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -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')));
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -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<EditorWidget> {
|
||||||
|
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<boolean> {
|
||||||
|
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)
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -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<MonacoEditorModel> {
|
|
||||||
// `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;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
@@ -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<string[]> {
|
|
||||||
const stats = await this.delegate.roots;
|
|
||||||
return stats.map(stat => stat.uri);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
@@ -1,5 +0,0 @@
|
|||||||
export const WorkspaceServiceExtPath = '/services/workspace-service-ext';
|
|
||||||
export const WorkspaceServiceExt = Symbol('WorkspaceServiceExt');
|
|
||||||
export interface WorkspaceServiceExt {
|
|
||||||
roots(): Promise<string[]>;
|
|
||||||
}
|
|
||||||
13
arduino-ide-extension/src/common/protocol/arduino-daemon.ts
Normal file
13
arduino-ide-extension/src/common/protocol/arduino-daemon.ts
Normal file
@@ -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<ArduinoDaemonClient> {
|
||||||
|
isRunning(): Promise<boolean>;
|
||||||
|
}
|
||||||
@@ -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 ConfigServicePath = '/services/config-service';
|
||||||
export const ConfigService = Symbol('ConfigService');
|
export const ConfigService = Symbol('ConfigService');
|
||||||
|
export interface ConfigService extends JsonRpcServer<ConfigServiceClient> {
|
||||||
export interface ConfigService {
|
|
||||||
getVersion(): Promise<string>;
|
getVersion(): Promise<string>;
|
||||||
getConfiguration(): Promise<Config>;
|
getConfiguration(): Promise<Config>;
|
||||||
|
getCliConfigFileUri(): Promise<string>;
|
||||||
|
getConfigurationFileSchemaUri(): Promise<string>;
|
||||||
isInDataDir(uri: string): Promise<boolean>;
|
isInDataDir(uri: string): Promise<boolean>;
|
||||||
isInSketchDir(uri: string): Promise<boolean>;
|
isInSketchDir(uri: string): Promise<boolean>;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface Config {
|
export interface Config {
|
||||||
sketchDirUri: string;
|
readonly sketchDirUri: string;
|
||||||
dataDirUri: string;
|
readonly dataDirUri: string;
|
||||||
|
readonly downloadsDirUri: string;
|
||||||
|
readonly additionalUrls: string[];
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -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 CoreServicePath = '/services/core-service';
|
||||||
export const CoreService = Symbol('CoreService');
|
export const CoreService = Symbol('CoreService');
|
||||||
export interface CoreService {
|
export interface CoreService extends JsonRpcServer<CoreServiceClient> {
|
||||||
compile(options: CoreService.Compile.Options): Promise<void>;
|
compile(options: CoreService.Compile.Options): Promise<void>;
|
||||||
upload(options: CoreService.Upload.Options): Promise<void>;
|
upload(options: CoreService.Upload.Options): Promise<void>;
|
||||||
}
|
}
|
||||||
|
|||||||
11
arduino-ide-extension/src/common/protocol/index.ts
Normal file
11
arduino-ide-extension/src/common/protocol/index.ts
Normal file
@@ -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';
|
||||||
@@ -2,7 +2,7 @@ import * as fs from 'fs';
|
|||||||
import * as os from 'os';
|
import * as os from 'os';
|
||||||
import { join } from 'path';
|
import { join } from 'path';
|
||||||
import { ContainerModule } from 'inversify';
|
import { ContainerModule } from 'inversify';
|
||||||
import { ArduinoDaemon } from './arduino-daemon';
|
import { ArduinoDaemonImpl } from './arduino-daemon-impl';
|
||||||
import { ILogger } from '@theia/core/lib/common/logger';
|
import { ILogger } from '@theia/core/lib/common/logger';
|
||||||
import { BackendApplicationContribution } from '@theia/core/lib/node/backend-application';
|
import { BackendApplicationContribution } from '@theia/core/lib/node/backend-application';
|
||||||
import { LanguageServerContribution } from '@theia/languages/lib/node';
|
import { LanguageServerContribution } from '@theia/languages/lib/node';
|
||||||
@@ -12,11 +12,9 @@ import { BoardsService, BoardsServicePath, BoardsServiceClient } from '../common
|
|||||||
import { LibraryServiceImpl } from './library-service-impl';
|
import { LibraryServiceImpl } from './library-service-impl';
|
||||||
import { BoardsServiceImpl } from './boards-service-impl';
|
import { BoardsServiceImpl } from './boards-service-impl';
|
||||||
import { CoreServiceImpl } from './core-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 { ConnectionContainerModule } from '@theia/core/lib/node/messaging/connection-container-module';
|
||||||
import { WorkspaceServiceExtPath, WorkspaceServiceExt } from '../browser/workspace-service-ext';
|
import { CoreClientProvider } from './core-client-provider';
|
||||||
import { CoreClientProviderImpl } from './core-client-provider-impl';
|
|
||||||
import { CoreClientProviderPath, CoreClientProvider } from './core-client-provider';
|
|
||||||
import { ToolOutputService, ToolOutputServiceClient, ToolOutputServiceServer } from '../common/protocol/tool-output-service';
|
import { ToolOutputService, ToolOutputServiceClient, ToolOutputServiceServer } from '../common/protocol/tool-output-service';
|
||||||
import { ConnectionHandler, JsonRpcConnectionHandler } from '@theia/core';
|
import { ConnectionHandler, JsonRpcConnectionHandler } from '@theia/core';
|
||||||
import { ToolOutputServiceServerImpl } from './tool-output-service-impl';
|
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 { WorkspaceServer } from '@theia/workspace/lib/common';
|
||||||
import { SketchesServiceImpl } from './sketches-service-impl';
|
import { SketchesServiceImpl } from './sketches-service-impl';
|
||||||
import { SketchesService, SketchesServicePath } from '../common/protocol/sketches-service';
|
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 { MonitorServiceImpl } from './monitor/monitor-service-impl';
|
||||||
import { MonitorService, MonitorServicePath, MonitorServiceClient } from '../common/protocol/monitor-service';
|
import { MonitorService, MonitorServicePath, MonitorServiceClient } from '../common/protocol/monitor-service';
|
||||||
import { MonitorClientProvider } from './monitor/monitor-client-provider';
|
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 { 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) => {
|
export default new ContainerModule((bind, unbind, isBound, rebind) => {
|
||||||
// Theia backend CLI contribution.
|
rebind(EnvVariablesServer).to(ArduinoEnvVariablesServer).inSingletonScope();
|
||||||
bind(ArduinoCliContribution).toSelf().inSingletonScope();
|
bind(ConfigFileValidator).toSelf().inSingletonScope();
|
||||||
bind(CliContribution).toService(ArduinoCliContribution);
|
// XXX: The config service must start earlier than the daemon, hence the binding order does matter.
|
||||||
|
// Shared config service
|
||||||
// Provides the path of the Arduino CLI.
|
bind(ConfigServiceImpl).toSelf().inSingletonScope();
|
||||||
bind(ArduinoCli).toSelf().inSingletonScope();
|
bind(ConfigService).toService(ConfigServiceImpl);
|
||||||
|
bind(BackendApplicationContribution).toService(ConfigServiceImpl);
|
||||||
|
bind(ConnectionHandler).toDynamicValue(context =>
|
||||||
|
new JsonRpcConnectionHandler<ConfigServiceClient>(ConfigServicePath, client => {
|
||||||
|
const server = context.container.get<ConfigServiceImpl>(ConfigServiceImpl);
|
||||||
|
server.setClient(client);
|
||||||
|
client.onDidCloseConnection(() => server.disposeClient(client));
|
||||||
|
return server;
|
||||||
|
})
|
||||||
|
).inSingletonScope();
|
||||||
|
|
||||||
// Shared daemon
|
// Shared daemon
|
||||||
bind(ArduinoDaemon).toSelf().inSingletonScope();
|
bind(ArduinoDaemonImpl).toSelf().inSingletonScope();
|
||||||
bind(BackendApplicationContribution).toService(ArduinoDaemon);
|
bind(ArduinoDaemon).toService(ArduinoDaemonImpl);
|
||||||
|
bind(BackendApplicationContribution).toService(ArduinoDaemonImpl);
|
||||||
|
bind(ConnectionHandler).toDynamicValue(context =>
|
||||||
|
new JsonRpcConnectionHandler<ArduinoDaemonClient>(ArduinoDaemonPath, async client => {
|
||||||
|
const server = context.container.get<ArduinoDaemonImpl>(ArduinoDaemonImpl);
|
||||||
|
server.setClient(client);
|
||||||
|
client.onDidCloseConnection(() => server.disposeClient(client));
|
||||||
|
return server;
|
||||||
|
})
|
||||||
|
).inSingletonScope();
|
||||||
|
|
||||||
// Language server
|
// Language server
|
||||||
bind(ArduinoLanguageServerContribution).toSelf().inSingletonScope();
|
bind(ArduinoLanguageServerContribution).toSelf().inSingletonScope();
|
||||||
@@ -65,14 +84,6 @@ export default new ContainerModule((bind, unbind, isBound, rebind) => {
|
|||||||
});
|
});
|
||||||
bind(ConnectionContainerModule).toConstantValue(sketchesServiceConnectionModule);
|
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
|
// Boards service
|
||||||
const boardsServiceConnectionModule = ConnectionContainerModule.create(({ bind, bindBackendService }) => {
|
const boardsServiceConnectionModule = ConnectionContainerModule.create(({ bind, bindBackendService }) => {
|
||||||
bind(BoardsServiceImpl).toSelf().inSingletonScope();
|
bind(BoardsServiceImpl).toSelf().inSingletonScope();
|
||||||
@@ -85,26 +96,25 @@ export default new ContainerModule((bind, unbind, isBound, rebind) => {
|
|||||||
});
|
});
|
||||||
bind(ConnectionContainerModule).toConstantValue(boardsServiceConnectionModule);
|
bind(ConnectionContainerModule).toConstantValue(boardsServiceConnectionModule);
|
||||||
|
|
||||||
// Arduino core client provider per Theia connection.
|
// Shared Arduino core client provider service for the backend.
|
||||||
const coreClientProviderConnectionModule = ConnectionContainerModule.create(({ bind, bindBackendService }) => {
|
bind(CoreClientProvider).toSelf().inSingletonScope();
|
||||||
bind(CoreClientProviderImpl).toSelf().inSingletonScope();
|
|
||||||
bind(CoreClientProvider).toService(CoreClientProviderImpl);
|
|
||||||
bindBackendService(CoreClientProviderPath, CoreClientProvider);
|
|
||||||
});
|
|
||||||
bind(ConnectionContainerModule).toConstantValue(coreClientProviderConnectionModule);
|
|
||||||
|
|
||||||
// Core service -> `verify` and `upload`. One per Theia connection.
|
// Core service -> `verify` and `upload`. One per Theia connection.
|
||||||
const connectionConnectionModule = ConnectionContainerModule.create(({ bind, bindBackendService }) => {
|
const connectionConnectionModule = ConnectionContainerModule.create(({ bind, bindBackendService }) => {
|
||||||
bind(CoreServiceImpl).toSelf().inSingletonScope();
|
bind(CoreServiceImpl).toSelf().inSingletonScope();
|
||||||
bind(CoreService).toService(CoreServiceImpl);
|
bind(CoreService).toService(CoreServiceImpl);
|
||||||
bindBackendService(BoardsServicePath, BoardsService);
|
bindBackendService(BoardsServicePath, BoardsService);
|
||||||
bindBackendService(CoreClientProviderPath, CoreClientProvider);
|
bindBackendService<CoreService, CoreServiceClient>(CoreServicePath, CoreService, (service, client) => {
|
||||||
bindBackendService(CoreServicePath, CoreService);
|
service.setClient(client);
|
||||||
|
client.onDidCloseConnection(() => service.dispose());
|
||||||
|
return service;
|
||||||
|
});
|
||||||
});
|
});
|
||||||
bind(ConnectionContainerModule).toConstantValue(connectionConnectionModule);
|
bind(ConnectionContainerModule).toConstantValue(connectionConnectionModule);
|
||||||
|
|
||||||
// Tool output service -> feedback from the daemon, compile and flash
|
// 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 =>
|
bind(ConnectionHandler).toDynamicValue(context =>
|
||||||
new JsonRpcConnectionHandler<ToolOutputServiceClient>(ToolOutputService.SERVICE_PATH, client => {
|
new JsonRpcConnectionHandler<ToolOutputServiceClient>(ToolOutputService.SERVICE_PATH, client => {
|
||||||
const server = context.container.get<ToolOutputServiceServer>(ToolOutputServiceServer);
|
const server = context.container.get<ToolOutputServiceServer>(ToolOutputServiceServer);
|
||||||
@@ -114,13 +124,6 @@ export default new ContainerModule((bind, unbind, isBound, rebind) => {
|
|||||||
})
|
})
|
||||||
).inSingletonScope();
|
).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
|
// Logger for the Arduino daemon
|
||||||
bind(ILogger).toDynamicValue(ctx => {
|
bind(ILogger).toDynamicValue(ctx => {
|
||||||
const parentLogger = ctx.container.get<ILogger>(ILogger);
|
const parentLogger = ctx.container.get<ILogger>(ILogger);
|
||||||
@@ -133,6 +136,12 @@ export default new ContainerModule((bind, unbind, isBound, rebind) => {
|
|||||||
return parentLogger.child('discovery');
|
return parentLogger.child('discovery');
|
||||||
}).inSingletonScope().whenTargetNamed('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>(ILogger);
|
||||||
|
return parentLogger.child('config');
|
||||||
|
}).inSingletonScope().whenTargetNamed('config');
|
||||||
|
|
||||||
// Default workspace server extension to initialize and use a fallback workspace.
|
// Default workspace server extension to initialize and use a fallback workspace.
|
||||||
// If nothing was set previously.
|
// If nothing was set previously.
|
||||||
bind(DefaultWorkspaceServerExt).toSelf().inSingletonScope();
|
bind(DefaultWorkspaceServerExt).toSelf().inSingletonScope();
|
||||||
@@ -173,4 +182,7 @@ export default new ContainerModule((bind, unbind, isBound, rebind) => {
|
|||||||
process.env.CPP_CLANGD_COMMAND = clangdCommand;
|
process.env.CPP_CLANGD_COMMAND = clangdCommand;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bind(ArduinoHostedPluginReader).toSelf().inSingletonScope();
|
||||||
|
rebind(HostedPluginReader).toService(ArduinoHostedPluginReader);
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -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;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
@@ -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<string> {
|
|
||||||
if (this.execPath) {
|
|
||||||
return this.execPath;
|
|
||||||
}
|
|
||||||
const path = await getExecPath('arduino-cli', this.logger, 'version');
|
|
||||||
this.execPath = path;
|
|
||||||
return path;
|
|
||||||
}
|
|
||||||
|
|
||||||
async getVersion(): Promise<string> {
|
|
||||||
const execPath = await this.getExecPath();
|
|
||||||
return spawnCommand(`"${execPath}"`, ['version'], this.logger);
|
|
||||||
}
|
|
||||||
|
|
||||||
async getDefaultConfig(): Promise<Config> {
|
|
||||||
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()
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
267
arduino-ide-extension/src/node/arduino-daemon-impl.ts
Normal file
267
arduino-ide-extension/src/node/arduino-daemon-impl.ts
Normal file
@@ -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<ArduinoDaemonClient> = [];
|
||||||
|
protected readonly toDispose = new DisposableCollection();
|
||||||
|
protected readonly onDaemonStartedEmitter = new Emitter<void>();
|
||||||
|
protected readonly onDaemonStoppedEmitter = new Emitter<void>();
|
||||||
|
|
||||||
|
protected _running = false;
|
||||||
|
protected _ready = new Deferred<void>();
|
||||||
|
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<boolean> {
|
||||||
|
return Promise.resolve(this._running);
|
||||||
|
}
|
||||||
|
|
||||||
|
async startDaemon(): Promise<void> {
|
||||||
|
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<void> {
|
||||||
|
this.toDispose.dispose();
|
||||||
|
}
|
||||||
|
|
||||||
|
get onDaemonStarted(): Event<void> {
|
||||||
|
return this.onDaemonStartedEmitter.event;
|
||||||
|
}
|
||||||
|
|
||||||
|
get onDaemonStopped(): Event<void> {
|
||||||
|
return this.onDaemonStoppedEmitter.event;
|
||||||
|
}
|
||||||
|
|
||||||
|
get ready(): Promise<void> {
|
||||||
|
return this._ready.promise;
|
||||||
|
}
|
||||||
|
|
||||||
|
async getExecPath(): Promise<string> {
|
||||||
|
if (this._execPath) {
|
||||||
|
return this._execPath;
|
||||||
|
}
|
||||||
|
this._execPath = await getExecPath('arduino-cli', this.onError.bind(this), 'version');
|
||||||
|
return this._execPath;
|
||||||
|
}
|
||||||
|
|
||||||
|
async getVersion(): Promise<string> {
|
||||||
|
const execPath = await this.getExecPath();
|
||||||
|
return spawnCommand(`"${execPath}"`, ['version'], this.onError.bind(this));
|
||||||
|
}
|
||||||
|
|
||||||
|
protected async getSpawnArgs(): Promise<string[]> {
|
||||||
|
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<ChildProcess> {
|
||||||
|
const [cliPath, args] = await Promise.all([this.getExecPath(), this.getSpawnArgs()]);
|
||||||
|
const ready = new Deferred<ChildProcess>();
|
||||||
|
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<void>();
|
||||||
|
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;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -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<boolean>();
|
|
||||||
|
|
||||||
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'));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
@@ -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();
|
||||||
|
|
||||||
|
}
|
||||||
47
arduino-ide-extension/src/node/arduino-plugin-reader.ts
Normal file
47
arduino-ide-extension/src/node/arduino-plugin-reader.ts
Normal file
@@ -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<void> {
|
||||||
|
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;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -1,4 +1,3 @@
|
|||||||
import * as PQueue from 'p-queue';
|
|
||||||
import { injectable, inject, postConstruct, named } from 'inversify';
|
import { injectable, inject, postConstruct, named } from 'inversify';
|
||||||
import { ILogger } from '@theia/core/lib/common/logger';
|
import { ILogger } from '@theia/core/lib/common/logger';
|
||||||
import { Deferred } from '@theia/core/lib/common/promise-util';
|
import { Deferred } from '@theia/core/lib/common/promise-util';
|
||||||
@@ -42,13 +41,13 @@ export class BoardsServiceImpl implements BoardsService {
|
|||||||
protected availablePorts: { ports: Port[] } = { ports: [] };
|
protected availablePorts: { ports: Port[] } = { ports: [] };
|
||||||
protected started = new Deferred<void>();
|
protected started = new Deferred<void>();
|
||||||
protected client: BoardsServiceClient | undefined;
|
protected client: BoardsServiceClient | undefined;
|
||||||
protected readonly queue = new PQueue({ autoStart: true, concurrency: 1 });
|
|
||||||
|
|
||||||
@postConstruct()
|
@postConstruct()
|
||||||
protected async init(): Promise<void> {
|
protected async init(): Promise<void> {
|
||||||
this.discoveryTimer = setInterval(() => {
|
this.discoveryTimer = setInterval(() => {
|
||||||
this.discoveryLogger.trace('Discovering attached boards and available ports...');
|
this.discoveryLogger.trace('Discovering attached boards and available ports...');
|
||||||
this.doGetAttachedBoardsAndAvailablePorts().then(({ boards, ports }) => {
|
this.doGetAttachedBoardsAndAvailablePorts()
|
||||||
|
.then(({ boards, ports }) => {
|
||||||
const update = (oldBoards: Board[], newBoards: Board[], oldPorts: Port[], newPorts: Port[], message: string) => {
|
const update = (oldBoards: Board[], newBoards: Board[], oldPorts: Port[], newPorts: Port[], message: string) => {
|
||||||
this.attachedBoards = { boards: newBoards };
|
this.attachedBoards = { boards: newBoards };
|
||||||
this.availablePorts = { ports: newPorts };
|
this.availablePorts = { ports: newPorts };
|
||||||
@@ -99,6 +98,9 @@ export class BoardsServiceImpl implements BoardsService {
|
|||||||
this.discoveryLogger.trace('No new boards were discovered.');
|
this.discoveryLogger.trace('No new boards were discovered.');
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
})
|
||||||
|
.catch(error => {
|
||||||
|
this.logger.error('Unexpected error when polling boards and ports.', error);
|
||||||
});
|
});
|
||||||
}, 1000);
|
}, 1000);
|
||||||
}
|
}
|
||||||
@@ -109,8 +111,6 @@ export class BoardsServiceImpl implements BoardsService {
|
|||||||
|
|
||||||
dispose(): void {
|
dispose(): void {
|
||||||
this.logger.info('>>> Disposing boards service...');
|
this.logger.info('>>> Disposing boards service...');
|
||||||
this.queue.pause();
|
|
||||||
this.queue.clear();
|
|
||||||
if (this.discoveryTimer !== undefined) {
|
if (this.discoveryTimer !== undefined) {
|
||||||
clearInterval(this.discoveryTimer);
|
clearInterval(this.discoveryTimer);
|
||||||
}
|
}
|
||||||
@@ -129,20 +129,30 @@ export class BoardsServiceImpl implements BoardsService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private async doGetAttachedBoardsAndAvailablePorts(): Promise<{ boards: Board[], ports: Port[] }> {
|
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 boards: Board[] = [];
|
||||||
const ports: Port[] = [];
|
const ports: Port[] = [];
|
||||||
|
|
||||||
|
const coreClient = await this.coreClientProvider.client();
|
||||||
if (!coreClient) {
|
if (!coreClient) {
|
||||||
resolve({ boards, ports });
|
return { boards, ports };
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
const { client, instance } = coreClient;
|
const { client, instance } = coreClient;
|
||||||
const req = new BoardListReq();
|
const req = new BoardListReq();
|
||||||
req.setInstance(instance);
|
req.setInstance(instance);
|
||||||
const resp = await new Promise<BoardListResp>((resolve, reject) => client.boardList(req, (err, resp) => (!!err ? reject : resolve)(!!err ? err : resp)));
|
const resp = await new Promise<BoardListResp | undefined>(resolve => {
|
||||||
|
client.boardList(req, (err, resp) => {
|
||||||
|
if (err) {
|
||||||
|
this.logger.error(err);
|
||||||
|
resolve(undefined);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
resolve(resp);
|
||||||
|
});
|
||||||
|
});
|
||||||
|
if (!resp) {
|
||||||
|
return { boards, ports };
|
||||||
|
}
|
||||||
const portsList = resp.getPortsList();
|
const portsList = resp.getPortsList();
|
||||||
// TODO: remove unknown board mocking!
|
// TODO: remove unknown board mocking!
|
||||||
// You also have to manually import `DetectedPort`.
|
// You also have to manually import `DetectedPort`.
|
||||||
@@ -206,13 +216,11 @@ export class BoardsServiceImpl implements BoardsService {
|
|||||||
// <AttachedSerialBoard>{ name: 'Arduino/Genuino Uno', fqbn: 'arduino:avr:uno', port: '/dev/cu.usbmodem14201' },
|
// <AttachedSerialBoard>{ name: 'Arduino/Genuino Uno', fqbn: 'arduino:avr:uno', port: '/dev/cu.usbmodem14201' },
|
||||||
// <AttachedSerialBoard>{ name: 'Arduino/Genuino Uno', fqbn: 'arduino:avr:uno', port: '/dev/cu.usbmodem142xx' },
|
// <AttachedSerialBoard>{ name: 'Arduino/Genuino Uno', fqbn: 'arduino:avr:uno', port: '/dev/cu.usbmodem142xx' },
|
||||||
// ]);
|
// ]);
|
||||||
resolve({ boards, ports });
|
return { boards, ports };
|
||||||
})
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
async detail(options: { id: string }): Promise<{ item?: BoardDetails }> {
|
async detail(options: { id: string }): Promise<{ item?: BoardDetails }> {
|
||||||
const coreClient = await this.coreClientProvider.getClient();
|
const coreClient = await this.coreClientProvider.client();
|
||||||
if (!coreClient) {
|
if (!coreClient) {
|
||||||
return {};
|
return {};
|
||||||
}
|
}
|
||||||
@@ -239,7 +247,7 @@ export class BoardsServiceImpl implements BoardsService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
async search(options: { query?: string }): Promise<{ items: BoardPackage[] }> {
|
async search(options: { query?: string }): Promise<{ items: BoardPackage[] }> {
|
||||||
const coreClient = await this.coreClientProvider.getClient();
|
const coreClient = await this.coreClientProvider.client();
|
||||||
if (!coreClient) {
|
if (!coreClient) {
|
||||||
return { items: [] };
|
return { items: [] };
|
||||||
}
|
}
|
||||||
@@ -324,7 +332,7 @@ export class BoardsServiceImpl implements BoardsService {
|
|||||||
async install(options: { item: BoardPackage, version?: Installable.Version }): Promise<void> {
|
async install(options: { item: BoardPackage, version?: Installable.Version }): Promise<void> {
|
||||||
const pkg = options.item;
|
const pkg = options.item;
|
||||||
const version = !!options.version ? options.version : pkg.availableVersions[0];
|
const version = !!options.version ? options.version : pkg.availableVersions[0];
|
||||||
const coreClient = await this.coreClientProvider.getClient();
|
const coreClient = await this.coreClientProvider.client();
|
||||||
if (!coreClient) {
|
if (!coreClient) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -358,7 +366,7 @@ export class BoardsServiceImpl implements BoardsService {
|
|||||||
|
|
||||||
async uninstall(options: { item: BoardPackage }): Promise<void> {
|
async uninstall(options: { item: BoardPackage }): Promise<void> {
|
||||||
const pkg = options.item;
|
const pkg = options.item;
|
||||||
const coreClient = await this.coreClientProvider.getClient();
|
const coreClient = await this.coreClientProvider.client();
|
||||||
if (!coreClient) {
|
if (!coreClient) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|||||||
122
arduino-ide-extension/src/node/cli-config.ts
Normal file
122
arduino-ide-extension/src/node/cli-config.ts
Normal file
@@ -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<string>;
|
||||||
|
}
|
||||||
|
export namespace BoardManager {
|
||||||
|
export function sameAs(left: RecursivePartial<BoardManager> | undefined, right: RecursivePartial<BoardManager> | 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<Daemon> | undefined): daemon is Daemon {
|
||||||
|
return !!daemon && !!daemon.port;
|
||||||
|
}
|
||||||
|
export function sameAs(left: RecursivePartial<Daemon> | undefined, right: RecursivePartial<Daemon> | 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<Directories> | undefined): directories is Directories {
|
||||||
|
return !!directories
|
||||||
|
&& !!directories.data
|
||||||
|
&& !!directories.downloads
|
||||||
|
&& !!directories.user;
|
||||||
|
}
|
||||||
|
export function sameAs(left: RecursivePartial<Directories> | undefined, right: RecursivePartial<Directories> | 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<Logging> | undefined, right: RecursivePartial<Logging> | 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<BoardManager>;
|
||||||
|
directories?: RecursivePartial<Directories>;
|
||||||
|
logging?: RecursivePartial<Logging>;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Bare minimum required CLI config.
|
||||||
|
export interface DefaultCliConfig extends CliConfig {
|
||||||
|
directories: Directories;
|
||||||
|
daemon: Daemon;
|
||||||
|
}
|
||||||
|
export namespace DefaultCliConfig {
|
||||||
|
export function is(config: RecursivePartial<DefaultCliConfig> | 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);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1 +0,0 @@
|
|||||||
// GENERATED CODE -- NO SERVICES IN PROTO
|
|
||||||
@@ -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<jspb.Message>};
|
|
||||||
static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};
|
|
||||||
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<ConfigOption>;
|
|
||||||
setConfigOptionsList(value: Array<ConfigOption>): void;
|
|
||||||
addConfigOptions(value?: ConfigOption, index?: number): ConfigOption;
|
|
||||||
|
|
||||||
clearRequiredToolsList(): void;
|
|
||||||
getRequiredToolsList(): Array<RequiredTool>;
|
|
||||||
setRequiredToolsList(value: Array<RequiredTool>): 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<jspb.Message>};
|
|
||||||
static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};
|
|
||||||
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<ConfigOption.AsObject>,
|
|
||||||
requiredToolsList: Array<RequiredTool.AsObject>,
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
export class ConfigOption extends jspb.Message {
|
|
||||||
getOption(): string;
|
|
||||||
setOption(value: string): void;
|
|
||||||
|
|
||||||
getOptionLabel(): string;
|
|
||||||
setOptionLabel(value: string): void;
|
|
||||||
|
|
||||||
clearValuesList(): void;
|
|
||||||
getValuesList(): Array<ConfigValue>;
|
|
||||||
setValuesList(value: Array<ConfigValue>): 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<jspb.Message>};
|
|
||||||
static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};
|
|
||||||
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<ConfigValue.AsObject>,
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
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<jspb.Message>};
|
|
||||||
static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};
|
|
||||||
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<jspb.Message>};
|
|
||||||
static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};
|
|
||||||
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<jspb.Message>};
|
|
||||||
static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};
|
|
||||||
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<jspb.Message>};
|
|
||||||
static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};
|
|
||||||
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<jspb.Message>};
|
|
||||||
static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};
|
|
||||||
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<DetectedPort>;
|
|
||||||
setPortsList(value: Array<DetectedPort>): 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<jspb.Message>};
|
|
||||||
static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};
|
|
||||||
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<DetectedPort.AsObject>,
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
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<BoardListItem>;
|
|
||||||
setBoardsList(value: Array<BoardListItem>): 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<jspb.Message>};
|
|
||||||
static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};
|
|
||||||
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<BoardListItem.AsObject>,
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
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<string>;
|
|
||||||
setSearchArgsList(value: Array<string>): 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<jspb.Message>};
|
|
||||||
static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};
|
|
||||||
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<string>,
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
export class BoardListAllResp extends jspb.Message {
|
|
||||||
clearBoardsList(): void;
|
|
||||||
getBoardsList(): Array<BoardListItem>;
|
|
||||||
setBoardsList(value: Array<BoardListItem>): 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<jspb.Message>};
|
|
||||||
static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};
|
|
||||||
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<BoardListItem.AsObject>,
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
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<jspb.Message>};
|
|
||||||
static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};
|
|
||||||
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,
|
|
||||||
}
|
|
||||||
}
|
|
||||||
File diff suppressed because it is too large
Load Diff
@@ -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<grpc.UntypedServiceImplementation> {
|
|
||||||
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<commands_commands_pb.InitReq, commands_commands_pb.InitResp> {
|
|
||||||
path: string; // "/cc.arduino.cli.commands.ArduinoCore/Init"
|
|
||||||
requestStream: boolean; // false
|
|
||||||
responseStream: boolean; // true
|
|
||||||
requestSerialize: grpc.serialize<commands_commands_pb.InitReq>;
|
|
||||||
requestDeserialize: grpc.deserialize<commands_commands_pb.InitReq>;
|
|
||||||
responseSerialize: grpc.serialize<commands_commands_pb.InitResp>;
|
|
||||||
responseDeserialize: grpc.deserialize<commands_commands_pb.InitResp>;
|
|
||||||
}
|
|
||||||
interface IArduinoCoreService_IDestroy extends grpc.MethodDefinition<commands_commands_pb.DestroyReq, commands_commands_pb.DestroyResp> {
|
|
||||||
path: string; // "/cc.arduino.cli.commands.ArduinoCore/Destroy"
|
|
||||||
requestStream: boolean; // false
|
|
||||||
responseStream: boolean; // false
|
|
||||||
requestSerialize: grpc.serialize<commands_commands_pb.DestroyReq>;
|
|
||||||
requestDeserialize: grpc.deserialize<commands_commands_pb.DestroyReq>;
|
|
||||||
responseSerialize: grpc.serialize<commands_commands_pb.DestroyResp>;
|
|
||||||
responseDeserialize: grpc.deserialize<commands_commands_pb.DestroyResp>;
|
|
||||||
}
|
|
||||||
interface IArduinoCoreService_IRescan extends grpc.MethodDefinition<commands_commands_pb.RescanReq, commands_commands_pb.RescanResp> {
|
|
||||||
path: string; // "/cc.arduino.cli.commands.ArduinoCore/Rescan"
|
|
||||||
requestStream: boolean; // false
|
|
||||||
responseStream: boolean; // false
|
|
||||||
requestSerialize: grpc.serialize<commands_commands_pb.RescanReq>;
|
|
||||||
requestDeserialize: grpc.deserialize<commands_commands_pb.RescanReq>;
|
|
||||||
responseSerialize: grpc.serialize<commands_commands_pb.RescanResp>;
|
|
||||||
responseDeserialize: grpc.deserialize<commands_commands_pb.RescanResp>;
|
|
||||||
}
|
|
||||||
interface IArduinoCoreService_IUpdateIndex extends grpc.MethodDefinition<commands_commands_pb.UpdateIndexReq, commands_commands_pb.UpdateIndexResp> {
|
|
||||||
path: string; // "/cc.arduino.cli.commands.ArduinoCore/UpdateIndex"
|
|
||||||
requestStream: boolean; // false
|
|
||||||
responseStream: boolean; // true
|
|
||||||
requestSerialize: grpc.serialize<commands_commands_pb.UpdateIndexReq>;
|
|
||||||
requestDeserialize: grpc.deserialize<commands_commands_pb.UpdateIndexReq>;
|
|
||||||
responseSerialize: grpc.serialize<commands_commands_pb.UpdateIndexResp>;
|
|
||||||
responseDeserialize: grpc.deserialize<commands_commands_pb.UpdateIndexResp>;
|
|
||||||
}
|
|
||||||
interface IArduinoCoreService_IUpdateLibrariesIndex extends grpc.MethodDefinition<commands_commands_pb.UpdateLibrariesIndexReq, commands_commands_pb.UpdateLibrariesIndexResp> {
|
|
||||||
path: string; // "/cc.arduino.cli.commands.ArduinoCore/UpdateLibrariesIndex"
|
|
||||||
requestStream: boolean; // false
|
|
||||||
responseStream: boolean; // true
|
|
||||||
requestSerialize: grpc.serialize<commands_commands_pb.UpdateLibrariesIndexReq>;
|
|
||||||
requestDeserialize: grpc.deserialize<commands_commands_pb.UpdateLibrariesIndexReq>;
|
|
||||||
responseSerialize: grpc.serialize<commands_commands_pb.UpdateLibrariesIndexResp>;
|
|
||||||
responseDeserialize: grpc.deserialize<commands_commands_pb.UpdateLibrariesIndexResp>;
|
|
||||||
}
|
|
||||||
interface IArduinoCoreService_IVersion extends grpc.MethodDefinition<commands_commands_pb.VersionReq, commands_commands_pb.VersionResp> {
|
|
||||||
path: string; // "/cc.arduino.cli.commands.ArduinoCore/Version"
|
|
||||||
requestStream: boolean; // false
|
|
||||||
responseStream: boolean; // false
|
|
||||||
requestSerialize: grpc.serialize<commands_commands_pb.VersionReq>;
|
|
||||||
requestDeserialize: grpc.deserialize<commands_commands_pb.VersionReq>;
|
|
||||||
responseSerialize: grpc.serialize<commands_commands_pb.VersionResp>;
|
|
||||||
responseDeserialize: grpc.deserialize<commands_commands_pb.VersionResp>;
|
|
||||||
}
|
|
||||||
interface IArduinoCoreService_IBoardDetails extends grpc.MethodDefinition<commands_board_pb.BoardDetailsReq, commands_board_pb.BoardDetailsResp> {
|
|
||||||
path: string; // "/cc.arduino.cli.commands.ArduinoCore/BoardDetails"
|
|
||||||
requestStream: boolean; // false
|
|
||||||
responseStream: boolean; // false
|
|
||||||
requestSerialize: grpc.serialize<commands_board_pb.BoardDetailsReq>;
|
|
||||||
requestDeserialize: grpc.deserialize<commands_board_pb.BoardDetailsReq>;
|
|
||||||
responseSerialize: grpc.serialize<commands_board_pb.BoardDetailsResp>;
|
|
||||||
responseDeserialize: grpc.deserialize<commands_board_pb.BoardDetailsResp>;
|
|
||||||
}
|
|
||||||
interface IArduinoCoreService_IBoardAttach extends grpc.MethodDefinition<commands_board_pb.BoardAttachReq, commands_board_pb.BoardAttachResp> {
|
|
||||||
path: string; // "/cc.arduino.cli.commands.ArduinoCore/BoardAttach"
|
|
||||||
requestStream: boolean; // false
|
|
||||||
responseStream: boolean; // true
|
|
||||||
requestSerialize: grpc.serialize<commands_board_pb.BoardAttachReq>;
|
|
||||||
requestDeserialize: grpc.deserialize<commands_board_pb.BoardAttachReq>;
|
|
||||||
responseSerialize: grpc.serialize<commands_board_pb.BoardAttachResp>;
|
|
||||||
responseDeserialize: grpc.deserialize<commands_board_pb.BoardAttachResp>;
|
|
||||||
}
|
|
||||||
interface IArduinoCoreService_IBoardList extends grpc.MethodDefinition<commands_board_pb.BoardListReq, commands_board_pb.BoardListResp> {
|
|
||||||
path: string; // "/cc.arduino.cli.commands.ArduinoCore/BoardList"
|
|
||||||
requestStream: boolean; // false
|
|
||||||
responseStream: boolean; // false
|
|
||||||
requestSerialize: grpc.serialize<commands_board_pb.BoardListReq>;
|
|
||||||
requestDeserialize: grpc.deserialize<commands_board_pb.BoardListReq>;
|
|
||||||
responseSerialize: grpc.serialize<commands_board_pb.BoardListResp>;
|
|
||||||
responseDeserialize: grpc.deserialize<commands_board_pb.BoardListResp>;
|
|
||||||
}
|
|
||||||
interface IArduinoCoreService_IBoardListAll extends grpc.MethodDefinition<commands_board_pb.BoardListAllReq, commands_board_pb.BoardListAllResp> {
|
|
||||||
path: string; // "/cc.arduino.cli.commands.ArduinoCore/BoardListAll"
|
|
||||||
requestStream: boolean; // false
|
|
||||||
responseStream: boolean; // false
|
|
||||||
requestSerialize: grpc.serialize<commands_board_pb.BoardListAllReq>;
|
|
||||||
requestDeserialize: grpc.deserialize<commands_board_pb.BoardListAllReq>;
|
|
||||||
responseSerialize: grpc.serialize<commands_board_pb.BoardListAllResp>;
|
|
||||||
responseDeserialize: grpc.deserialize<commands_board_pb.BoardListAllResp>;
|
|
||||||
}
|
|
||||||
interface IArduinoCoreService_ICompile extends grpc.MethodDefinition<commands_compile_pb.CompileReq, commands_compile_pb.CompileResp> {
|
|
||||||
path: string; // "/cc.arduino.cli.commands.ArduinoCore/Compile"
|
|
||||||
requestStream: boolean; // false
|
|
||||||
responseStream: boolean; // true
|
|
||||||
requestSerialize: grpc.serialize<commands_compile_pb.CompileReq>;
|
|
||||||
requestDeserialize: grpc.deserialize<commands_compile_pb.CompileReq>;
|
|
||||||
responseSerialize: grpc.serialize<commands_compile_pb.CompileResp>;
|
|
||||||
responseDeserialize: grpc.deserialize<commands_compile_pb.CompileResp>;
|
|
||||||
}
|
|
||||||
interface IArduinoCoreService_IPlatformInstall extends grpc.MethodDefinition<commands_core_pb.PlatformInstallReq, commands_core_pb.PlatformInstallResp> {
|
|
||||||
path: string; // "/cc.arduino.cli.commands.ArduinoCore/PlatformInstall"
|
|
||||||
requestStream: boolean; // false
|
|
||||||
responseStream: boolean; // true
|
|
||||||
requestSerialize: grpc.serialize<commands_core_pb.PlatformInstallReq>;
|
|
||||||
requestDeserialize: grpc.deserialize<commands_core_pb.PlatformInstallReq>;
|
|
||||||
responseSerialize: grpc.serialize<commands_core_pb.PlatformInstallResp>;
|
|
||||||
responseDeserialize: grpc.deserialize<commands_core_pb.PlatformInstallResp>;
|
|
||||||
}
|
|
||||||
interface IArduinoCoreService_IPlatformDownload extends grpc.MethodDefinition<commands_core_pb.PlatformDownloadReq, commands_core_pb.PlatformDownloadResp> {
|
|
||||||
path: string; // "/cc.arduino.cli.commands.ArduinoCore/PlatformDownload"
|
|
||||||
requestStream: boolean; // false
|
|
||||||
responseStream: boolean; // true
|
|
||||||
requestSerialize: grpc.serialize<commands_core_pb.PlatformDownloadReq>;
|
|
||||||
requestDeserialize: grpc.deserialize<commands_core_pb.PlatformDownloadReq>;
|
|
||||||
responseSerialize: grpc.serialize<commands_core_pb.PlatformDownloadResp>;
|
|
||||||
responseDeserialize: grpc.deserialize<commands_core_pb.PlatformDownloadResp>;
|
|
||||||
}
|
|
||||||
interface IArduinoCoreService_IPlatformUninstall extends grpc.MethodDefinition<commands_core_pb.PlatformUninstallReq, commands_core_pb.PlatformUninstallResp> {
|
|
||||||
path: string; // "/cc.arduino.cli.commands.ArduinoCore/PlatformUninstall"
|
|
||||||
requestStream: boolean; // false
|
|
||||||
responseStream: boolean; // true
|
|
||||||
requestSerialize: grpc.serialize<commands_core_pb.PlatformUninstallReq>;
|
|
||||||
requestDeserialize: grpc.deserialize<commands_core_pb.PlatformUninstallReq>;
|
|
||||||
responseSerialize: grpc.serialize<commands_core_pb.PlatformUninstallResp>;
|
|
||||||
responseDeserialize: grpc.deserialize<commands_core_pb.PlatformUninstallResp>;
|
|
||||||
}
|
|
||||||
interface IArduinoCoreService_IPlatformUpgrade extends grpc.MethodDefinition<commands_core_pb.PlatformUpgradeReq, commands_core_pb.PlatformUpgradeResp> {
|
|
||||||
path: string; // "/cc.arduino.cli.commands.ArduinoCore/PlatformUpgrade"
|
|
||||||
requestStream: boolean; // false
|
|
||||||
responseStream: boolean; // true
|
|
||||||
requestSerialize: grpc.serialize<commands_core_pb.PlatformUpgradeReq>;
|
|
||||||
requestDeserialize: grpc.deserialize<commands_core_pb.PlatformUpgradeReq>;
|
|
||||||
responseSerialize: grpc.serialize<commands_core_pb.PlatformUpgradeResp>;
|
|
||||||
responseDeserialize: grpc.deserialize<commands_core_pb.PlatformUpgradeResp>;
|
|
||||||
}
|
|
||||||
interface IArduinoCoreService_IUpload extends grpc.MethodDefinition<commands_upload_pb.UploadReq, commands_upload_pb.UploadResp> {
|
|
||||||
path: string; // "/cc.arduino.cli.commands.ArduinoCore/Upload"
|
|
||||||
requestStream: boolean; // false
|
|
||||||
responseStream: boolean; // true
|
|
||||||
requestSerialize: grpc.serialize<commands_upload_pb.UploadReq>;
|
|
||||||
requestDeserialize: grpc.deserialize<commands_upload_pb.UploadReq>;
|
|
||||||
responseSerialize: grpc.serialize<commands_upload_pb.UploadResp>;
|
|
||||||
responseDeserialize: grpc.deserialize<commands_upload_pb.UploadResp>;
|
|
||||||
}
|
|
||||||
interface IArduinoCoreService_IPlatformSearch extends grpc.MethodDefinition<commands_core_pb.PlatformSearchReq, commands_core_pb.PlatformSearchResp> {
|
|
||||||
path: string; // "/cc.arduino.cli.commands.ArduinoCore/PlatformSearch"
|
|
||||||
requestStream: boolean; // false
|
|
||||||
responseStream: boolean; // false
|
|
||||||
requestSerialize: grpc.serialize<commands_core_pb.PlatformSearchReq>;
|
|
||||||
requestDeserialize: grpc.deserialize<commands_core_pb.PlatformSearchReq>;
|
|
||||||
responseSerialize: grpc.serialize<commands_core_pb.PlatformSearchResp>;
|
|
||||||
responseDeserialize: grpc.deserialize<commands_core_pb.PlatformSearchResp>;
|
|
||||||
}
|
|
||||||
interface IArduinoCoreService_IPlatformList extends grpc.MethodDefinition<commands_core_pb.PlatformListReq, commands_core_pb.PlatformListResp> {
|
|
||||||
path: string; // "/cc.arduino.cli.commands.ArduinoCore/PlatformList"
|
|
||||||
requestStream: boolean; // false
|
|
||||||
responseStream: boolean; // false
|
|
||||||
requestSerialize: grpc.serialize<commands_core_pb.PlatformListReq>;
|
|
||||||
requestDeserialize: grpc.deserialize<commands_core_pb.PlatformListReq>;
|
|
||||||
responseSerialize: grpc.serialize<commands_core_pb.PlatformListResp>;
|
|
||||||
responseDeserialize: grpc.deserialize<commands_core_pb.PlatformListResp>;
|
|
||||||
}
|
|
||||||
interface IArduinoCoreService_ILibraryDownload extends grpc.MethodDefinition<commands_lib_pb.LibraryDownloadReq, commands_lib_pb.LibraryDownloadResp> {
|
|
||||||
path: string; // "/cc.arduino.cli.commands.ArduinoCore/LibraryDownload"
|
|
||||||
requestStream: boolean; // false
|
|
||||||
responseStream: boolean; // true
|
|
||||||
requestSerialize: grpc.serialize<commands_lib_pb.LibraryDownloadReq>;
|
|
||||||
requestDeserialize: grpc.deserialize<commands_lib_pb.LibraryDownloadReq>;
|
|
||||||
responseSerialize: grpc.serialize<commands_lib_pb.LibraryDownloadResp>;
|
|
||||||
responseDeserialize: grpc.deserialize<commands_lib_pb.LibraryDownloadResp>;
|
|
||||||
}
|
|
||||||
interface IArduinoCoreService_ILibraryInstall extends grpc.MethodDefinition<commands_lib_pb.LibraryInstallReq, commands_lib_pb.LibraryInstallResp> {
|
|
||||||
path: string; // "/cc.arduino.cli.commands.ArduinoCore/LibraryInstall"
|
|
||||||
requestStream: boolean; // false
|
|
||||||
responseStream: boolean; // true
|
|
||||||
requestSerialize: grpc.serialize<commands_lib_pb.LibraryInstallReq>;
|
|
||||||
requestDeserialize: grpc.deserialize<commands_lib_pb.LibraryInstallReq>;
|
|
||||||
responseSerialize: grpc.serialize<commands_lib_pb.LibraryInstallResp>;
|
|
||||||
responseDeserialize: grpc.deserialize<commands_lib_pb.LibraryInstallResp>;
|
|
||||||
}
|
|
||||||
interface IArduinoCoreService_ILibraryUninstall extends grpc.MethodDefinition<commands_lib_pb.LibraryUninstallReq, commands_lib_pb.LibraryUninstallResp> {
|
|
||||||
path: string; // "/cc.arduino.cli.commands.ArduinoCore/LibraryUninstall"
|
|
||||||
requestStream: boolean; // false
|
|
||||||
responseStream: boolean; // true
|
|
||||||
requestSerialize: grpc.serialize<commands_lib_pb.LibraryUninstallReq>;
|
|
||||||
requestDeserialize: grpc.deserialize<commands_lib_pb.LibraryUninstallReq>;
|
|
||||||
responseSerialize: grpc.serialize<commands_lib_pb.LibraryUninstallResp>;
|
|
||||||
responseDeserialize: grpc.deserialize<commands_lib_pb.LibraryUninstallResp>;
|
|
||||||
}
|
|
||||||
interface IArduinoCoreService_ILibraryUpgradeAll extends grpc.MethodDefinition<commands_lib_pb.LibraryUpgradeAllReq, commands_lib_pb.LibraryUpgradeAllResp> {
|
|
||||||
path: string; // "/cc.arduino.cli.commands.ArduinoCore/LibraryUpgradeAll"
|
|
||||||
requestStream: boolean; // false
|
|
||||||
responseStream: boolean; // true
|
|
||||||
requestSerialize: grpc.serialize<commands_lib_pb.LibraryUpgradeAllReq>;
|
|
||||||
requestDeserialize: grpc.deserialize<commands_lib_pb.LibraryUpgradeAllReq>;
|
|
||||||
responseSerialize: grpc.serialize<commands_lib_pb.LibraryUpgradeAllResp>;
|
|
||||||
responseDeserialize: grpc.deserialize<commands_lib_pb.LibraryUpgradeAllResp>;
|
|
||||||
}
|
|
||||||
interface IArduinoCoreService_ILibraryResolveDependencies extends grpc.MethodDefinition<commands_lib_pb.LibraryResolveDependenciesReq, commands_lib_pb.LibraryResolveDependenciesResp> {
|
|
||||||
path: string; // "/cc.arduino.cli.commands.ArduinoCore/LibraryResolveDependencies"
|
|
||||||
requestStream: boolean; // false
|
|
||||||
responseStream: boolean; // false
|
|
||||||
requestSerialize: grpc.serialize<commands_lib_pb.LibraryResolveDependenciesReq>;
|
|
||||||
requestDeserialize: grpc.deserialize<commands_lib_pb.LibraryResolveDependenciesReq>;
|
|
||||||
responseSerialize: grpc.serialize<commands_lib_pb.LibraryResolveDependenciesResp>;
|
|
||||||
responseDeserialize: grpc.deserialize<commands_lib_pb.LibraryResolveDependenciesResp>;
|
|
||||||
}
|
|
||||||
interface IArduinoCoreService_ILibrarySearch extends grpc.MethodDefinition<commands_lib_pb.LibrarySearchReq, commands_lib_pb.LibrarySearchResp> {
|
|
||||||
path: string; // "/cc.arduino.cli.commands.ArduinoCore/LibrarySearch"
|
|
||||||
requestStream: boolean; // false
|
|
||||||
responseStream: boolean; // false
|
|
||||||
requestSerialize: grpc.serialize<commands_lib_pb.LibrarySearchReq>;
|
|
||||||
requestDeserialize: grpc.deserialize<commands_lib_pb.LibrarySearchReq>;
|
|
||||||
responseSerialize: grpc.serialize<commands_lib_pb.LibrarySearchResp>;
|
|
||||||
responseDeserialize: grpc.deserialize<commands_lib_pb.LibrarySearchResp>;
|
|
||||||
}
|
|
||||||
interface IArduinoCoreService_ILibraryList extends grpc.MethodDefinition<commands_lib_pb.LibraryListReq, commands_lib_pb.LibraryListResp> {
|
|
||||||
path: string; // "/cc.arduino.cli.commands.ArduinoCore/LibraryList"
|
|
||||||
requestStream: boolean; // false
|
|
||||||
responseStream: boolean; // false
|
|
||||||
requestSerialize: grpc.serialize<commands_lib_pb.LibraryListReq>;
|
|
||||||
requestDeserialize: grpc.deserialize<commands_lib_pb.LibraryListReq>;
|
|
||||||
responseSerialize: grpc.serialize<commands_lib_pb.LibraryListResp>;
|
|
||||||
responseDeserialize: grpc.deserialize<commands_lib_pb.LibraryListResp>;
|
|
||||||
}
|
|
||||||
|
|
||||||
export const ArduinoCoreService: IArduinoCoreService;
|
|
||||||
|
|
||||||
export interface IArduinoCoreServer {
|
|
||||||
init: grpc.handleServerStreamingCall<commands_commands_pb.InitReq, commands_commands_pb.InitResp>;
|
|
||||||
destroy: grpc.handleUnaryCall<commands_commands_pb.DestroyReq, commands_commands_pb.DestroyResp>;
|
|
||||||
rescan: grpc.handleUnaryCall<commands_commands_pb.RescanReq, commands_commands_pb.RescanResp>;
|
|
||||||
updateIndex: grpc.handleServerStreamingCall<commands_commands_pb.UpdateIndexReq, commands_commands_pb.UpdateIndexResp>;
|
|
||||||
updateLibrariesIndex: grpc.handleServerStreamingCall<commands_commands_pb.UpdateLibrariesIndexReq, commands_commands_pb.UpdateLibrariesIndexResp>;
|
|
||||||
version: grpc.handleUnaryCall<commands_commands_pb.VersionReq, commands_commands_pb.VersionResp>;
|
|
||||||
boardDetails: grpc.handleUnaryCall<commands_board_pb.BoardDetailsReq, commands_board_pb.BoardDetailsResp>;
|
|
||||||
boardAttach: grpc.handleServerStreamingCall<commands_board_pb.BoardAttachReq, commands_board_pb.BoardAttachResp>;
|
|
||||||
boardList: grpc.handleUnaryCall<commands_board_pb.BoardListReq, commands_board_pb.BoardListResp>;
|
|
||||||
boardListAll: grpc.handleUnaryCall<commands_board_pb.BoardListAllReq, commands_board_pb.BoardListAllResp>;
|
|
||||||
compile: grpc.handleServerStreamingCall<commands_compile_pb.CompileReq, commands_compile_pb.CompileResp>;
|
|
||||||
platformInstall: grpc.handleServerStreamingCall<commands_core_pb.PlatformInstallReq, commands_core_pb.PlatformInstallResp>;
|
|
||||||
platformDownload: grpc.handleServerStreamingCall<commands_core_pb.PlatformDownloadReq, commands_core_pb.PlatformDownloadResp>;
|
|
||||||
platformUninstall: grpc.handleServerStreamingCall<commands_core_pb.PlatformUninstallReq, commands_core_pb.PlatformUninstallResp>;
|
|
||||||
platformUpgrade: grpc.handleServerStreamingCall<commands_core_pb.PlatformUpgradeReq, commands_core_pb.PlatformUpgradeResp>;
|
|
||||||
upload: grpc.handleServerStreamingCall<commands_upload_pb.UploadReq, commands_upload_pb.UploadResp>;
|
|
||||||
platformSearch: grpc.handleUnaryCall<commands_core_pb.PlatformSearchReq, commands_core_pb.PlatformSearchResp>;
|
|
||||||
platformList: grpc.handleUnaryCall<commands_core_pb.PlatformListReq, commands_core_pb.PlatformListResp>;
|
|
||||||
libraryDownload: grpc.handleServerStreamingCall<commands_lib_pb.LibraryDownloadReq, commands_lib_pb.LibraryDownloadResp>;
|
|
||||||
libraryInstall: grpc.handleServerStreamingCall<commands_lib_pb.LibraryInstallReq, commands_lib_pb.LibraryInstallResp>;
|
|
||||||
libraryUninstall: grpc.handleServerStreamingCall<commands_lib_pb.LibraryUninstallReq, commands_lib_pb.LibraryUninstallResp>;
|
|
||||||
libraryUpgradeAll: grpc.handleServerStreamingCall<commands_lib_pb.LibraryUpgradeAllReq, commands_lib_pb.LibraryUpgradeAllResp>;
|
|
||||||
libraryResolveDependencies: grpc.handleUnaryCall<commands_lib_pb.LibraryResolveDependenciesReq, commands_lib_pb.LibraryResolveDependenciesResp>;
|
|
||||||
librarySearch: grpc.handleUnaryCall<commands_lib_pb.LibrarySearchReq, commands_lib_pb.LibrarySearchResp>;
|
|
||||||
libraryList: grpc.handleUnaryCall<commands_lib_pb.LibraryListReq, commands_lib_pb.LibraryListResp>;
|
|
||||||
}
|
|
||||||
|
|
||||||
export interface IArduinoCoreClient {
|
|
||||||
init(request: commands_commands_pb.InitReq, options?: Partial<grpc.CallOptions>): grpc.ClientReadableStream<commands_commands_pb.InitResp>;
|
|
||||||
init(request: commands_commands_pb.InitReq, metadata?: grpc.Metadata, options?: Partial<grpc.CallOptions>): grpc.ClientReadableStream<commands_commands_pb.InitResp>;
|
|
||||||
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<grpc.CallOptions>, 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<grpc.CallOptions>, callback: (error: grpc.ServiceError | null, response: commands_commands_pb.RescanResp) => void): grpc.ClientUnaryCall;
|
|
||||||
updateIndex(request: commands_commands_pb.UpdateIndexReq, options?: Partial<grpc.CallOptions>): grpc.ClientReadableStream<commands_commands_pb.UpdateIndexResp>;
|
|
||||||
updateIndex(request: commands_commands_pb.UpdateIndexReq, metadata?: grpc.Metadata, options?: Partial<grpc.CallOptions>): grpc.ClientReadableStream<commands_commands_pb.UpdateIndexResp>;
|
|
||||||
updateLibrariesIndex(request: commands_commands_pb.UpdateLibrariesIndexReq, options?: Partial<grpc.CallOptions>): grpc.ClientReadableStream<commands_commands_pb.UpdateLibrariesIndexResp>;
|
|
||||||
updateLibrariesIndex(request: commands_commands_pb.UpdateLibrariesIndexReq, metadata?: grpc.Metadata, options?: Partial<grpc.CallOptions>): grpc.ClientReadableStream<commands_commands_pb.UpdateLibrariesIndexResp>;
|
|
||||||
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<grpc.CallOptions>, 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<grpc.CallOptions>, callback: (error: grpc.ServiceError | null, response: commands_board_pb.BoardDetailsResp) => void): grpc.ClientUnaryCall;
|
|
||||||
boardAttach(request: commands_board_pb.BoardAttachReq, options?: Partial<grpc.CallOptions>): grpc.ClientReadableStream<commands_board_pb.BoardAttachResp>;
|
|
||||||
boardAttach(request: commands_board_pb.BoardAttachReq, metadata?: grpc.Metadata, options?: Partial<grpc.CallOptions>): grpc.ClientReadableStream<commands_board_pb.BoardAttachResp>;
|
|
||||||
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<grpc.CallOptions>, 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<grpc.CallOptions>, callback: (error: grpc.ServiceError | null, response: commands_board_pb.BoardListAllResp) => void): grpc.ClientUnaryCall;
|
|
||||||
compile(request: commands_compile_pb.CompileReq, options?: Partial<grpc.CallOptions>): grpc.ClientReadableStream<commands_compile_pb.CompileResp>;
|
|
||||||
compile(request: commands_compile_pb.CompileReq, metadata?: grpc.Metadata, options?: Partial<grpc.CallOptions>): grpc.ClientReadableStream<commands_compile_pb.CompileResp>;
|
|
||||||
platformInstall(request: commands_core_pb.PlatformInstallReq, options?: Partial<grpc.CallOptions>): grpc.ClientReadableStream<commands_core_pb.PlatformInstallResp>;
|
|
||||||
platformInstall(request: commands_core_pb.PlatformInstallReq, metadata?: grpc.Metadata, options?: Partial<grpc.CallOptions>): grpc.ClientReadableStream<commands_core_pb.PlatformInstallResp>;
|
|
||||||
platformDownload(request: commands_core_pb.PlatformDownloadReq, options?: Partial<grpc.CallOptions>): grpc.ClientReadableStream<commands_core_pb.PlatformDownloadResp>;
|
|
||||||
platformDownload(request: commands_core_pb.PlatformDownloadReq, metadata?: grpc.Metadata, options?: Partial<grpc.CallOptions>): grpc.ClientReadableStream<commands_core_pb.PlatformDownloadResp>;
|
|
||||||
platformUninstall(request: commands_core_pb.PlatformUninstallReq, options?: Partial<grpc.CallOptions>): grpc.ClientReadableStream<commands_core_pb.PlatformUninstallResp>;
|
|
||||||
platformUninstall(request: commands_core_pb.PlatformUninstallReq, metadata?: grpc.Metadata, options?: Partial<grpc.CallOptions>): grpc.ClientReadableStream<commands_core_pb.PlatformUninstallResp>;
|
|
||||||
platformUpgrade(request: commands_core_pb.PlatformUpgradeReq, options?: Partial<grpc.CallOptions>): grpc.ClientReadableStream<commands_core_pb.PlatformUpgradeResp>;
|
|
||||||
platformUpgrade(request: commands_core_pb.PlatformUpgradeReq, metadata?: grpc.Metadata, options?: Partial<grpc.CallOptions>): grpc.ClientReadableStream<commands_core_pb.PlatformUpgradeResp>;
|
|
||||||
upload(request: commands_upload_pb.UploadReq, options?: Partial<grpc.CallOptions>): grpc.ClientReadableStream<commands_upload_pb.UploadResp>;
|
|
||||||
upload(request: commands_upload_pb.UploadReq, metadata?: grpc.Metadata, options?: Partial<grpc.CallOptions>): grpc.ClientReadableStream<commands_upload_pb.UploadResp>;
|
|
||||||
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<grpc.CallOptions>, 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<grpc.CallOptions>, callback: (error: grpc.ServiceError | null, response: commands_core_pb.PlatformListResp) => void): grpc.ClientUnaryCall;
|
|
||||||
libraryDownload(request: commands_lib_pb.LibraryDownloadReq, options?: Partial<grpc.CallOptions>): grpc.ClientReadableStream<commands_lib_pb.LibraryDownloadResp>;
|
|
||||||
libraryDownload(request: commands_lib_pb.LibraryDownloadReq, metadata?: grpc.Metadata, options?: Partial<grpc.CallOptions>): grpc.ClientReadableStream<commands_lib_pb.LibraryDownloadResp>;
|
|
||||||
libraryInstall(request: commands_lib_pb.LibraryInstallReq, options?: Partial<grpc.CallOptions>): grpc.ClientReadableStream<commands_lib_pb.LibraryInstallResp>;
|
|
||||||
libraryInstall(request: commands_lib_pb.LibraryInstallReq, metadata?: grpc.Metadata, options?: Partial<grpc.CallOptions>): grpc.ClientReadableStream<commands_lib_pb.LibraryInstallResp>;
|
|
||||||
libraryUninstall(request: commands_lib_pb.LibraryUninstallReq, options?: Partial<grpc.CallOptions>): grpc.ClientReadableStream<commands_lib_pb.LibraryUninstallResp>;
|
|
||||||
libraryUninstall(request: commands_lib_pb.LibraryUninstallReq, metadata?: grpc.Metadata, options?: Partial<grpc.CallOptions>): grpc.ClientReadableStream<commands_lib_pb.LibraryUninstallResp>;
|
|
||||||
libraryUpgradeAll(request: commands_lib_pb.LibraryUpgradeAllReq, options?: Partial<grpc.CallOptions>): grpc.ClientReadableStream<commands_lib_pb.LibraryUpgradeAllResp>;
|
|
||||||
libraryUpgradeAll(request: commands_lib_pb.LibraryUpgradeAllReq, metadata?: grpc.Metadata, options?: Partial<grpc.CallOptions>): grpc.ClientReadableStream<commands_lib_pb.LibraryUpgradeAllResp>;
|
|
||||||
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<grpc.CallOptions>, 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<grpc.CallOptions>, 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<grpc.CallOptions>, 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.CallOptions>): grpc.ClientReadableStream<commands_commands_pb.InitResp>;
|
|
||||||
public init(request: commands_commands_pb.InitReq, metadata?: grpc.Metadata, options?: Partial<grpc.CallOptions>): grpc.ClientReadableStream<commands_commands_pb.InitResp>;
|
|
||||||
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<grpc.CallOptions>, 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<grpc.CallOptions>, callback: (error: grpc.ServiceError | null, response: commands_commands_pb.RescanResp) => void): grpc.ClientUnaryCall;
|
|
||||||
public updateIndex(request: commands_commands_pb.UpdateIndexReq, options?: Partial<grpc.CallOptions>): grpc.ClientReadableStream<commands_commands_pb.UpdateIndexResp>;
|
|
||||||
public updateIndex(request: commands_commands_pb.UpdateIndexReq, metadata?: grpc.Metadata, options?: Partial<grpc.CallOptions>): grpc.ClientReadableStream<commands_commands_pb.UpdateIndexResp>;
|
|
||||||
public updateLibrariesIndex(request: commands_commands_pb.UpdateLibrariesIndexReq, options?: Partial<grpc.CallOptions>): grpc.ClientReadableStream<commands_commands_pb.UpdateLibrariesIndexResp>;
|
|
||||||
public updateLibrariesIndex(request: commands_commands_pb.UpdateLibrariesIndexReq, metadata?: grpc.Metadata, options?: Partial<grpc.CallOptions>): grpc.ClientReadableStream<commands_commands_pb.UpdateLibrariesIndexResp>;
|
|
||||||
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<grpc.CallOptions>, 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<grpc.CallOptions>, callback: (error: grpc.ServiceError | null, response: commands_board_pb.BoardDetailsResp) => void): grpc.ClientUnaryCall;
|
|
||||||
public boardAttach(request: commands_board_pb.BoardAttachReq, options?: Partial<grpc.CallOptions>): grpc.ClientReadableStream<commands_board_pb.BoardAttachResp>;
|
|
||||||
public boardAttach(request: commands_board_pb.BoardAttachReq, metadata?: grpc.Metadata, options?: Partial<grpc.CallOptions>): grpc.ClientReadableStream<commands_board_pb.BoardAttachResp>;
|
|
||||||
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<grpc.CallOptions>, 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<grpc.CallOptions>, callback: (error: grpc.ServiceError | null, response: commands_board_pb.BoardListAllResp) => void): grpc.ClientUnaryCall;
|
|
||||||
public compile(request: commands_compile_pb.CompileReq, options?: Partial<grpc.CallOptions>): grpc.ClientReadableStream<commands_compile_pb.CompileResp>;
|
|
||||||
public compile(request: commands_compile_pb.CompileReq, metadata?: grpc.Metadata, options?: Partial<grpc.CallOptions>): grpc.ClientReadableStream<commands_compile_pb.CompileResp>;
|
|
||||||
public platformInstall(request: commands_core_pb.PlatformInstallReq, options?: Partial<grpc.CallOptions>): grpc.ClientReadableStream<commands_core_pb.PlatformInstallResp>;
|
|
||||||
public platformInstall(request: commands_core_pb.PlatformInstallReq, metadata?: grpc.Metadata, options?: Partial<grpc.CallOptions>): grpc.ClientReadableStream<commands_core_pb.PlatformInstallResp>;
|
|
||||||
public platformDownload(request: commands_core_pb.PlatformDownloadReq, options?: Partial<grpc.CallOptions>): grpc.ClientReadableStream<commands_core_pb.PlatformDownloadResp>;
|
|
||||||
public platformDownload(request: commands_core_pb.PlatformDownloadReq, metadata?: grpc.Metadata, options?: Partial<grpc.CallOptions>): grpc.ClientReadableStream<commands_core_pb.PlatformDownloadResp>;
|
|
||||||
public platformUninstall(request: commands_core_pb.PlatformUninstallReq, options?: Partial<grpc.CallOptions>): grpc.ClientReadableStream<commands_core_pb.PlatformUninstallResp>;
|
|
||||||
public platformUninstall(request: commands_core_pb.PlatformUninstallReq, metadata?: grpc.Metadata, options?: Partial<grpc.CallOptions>): grpc.ClientReadableStream<commands_core_pb.PlatformUninstallResp>;
|
|
||||||
public platformUpgrade(request: commands_core_pb.PlatformUpgradeReq, options?: Partial<grpc.CallOptions>): grpc.ClientReadableStream<commands_core_pb.PlatformUpgradeResp>;
|
|
||||||
public platformUpgrade(request: commands_core_pb.PlatformUpgradeReq, metadata?: grpc.Metadata, options?: Partial<grpc.CallOptions>): grpc.ClientReadableStream<commands_core_pb.PlatformUpgradeResp>;
|
|
||||||
public upload(request: commands_upload_pb.UploadReq, options?: Partial<grpc.CallOptions>): grpc.ClientReadableStream<commands_upload_pb.UploadResp>;
|
|
||||||
public upload(request: commands_upload_pb.UploadReq, metadata?: grpc.Metadata, options?: Partial<grpc.CallOptions>): grpc.ClientReadableStream<commands_upload_pb.UploadResp>;
|
|
||||||
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<grpc.CallOptions>, 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<grpc.CallOptions>, callback: (error: grpc.ServiceError | null, response: commands_core_pb.PlatformListResp) => void): grpc.ClientUnaryCall;
|
|
||||||
public libraryDownload(request: commands_lib_pb.LibraryDownloadReq, options?: Partial<grpc.CallOptions>): grpc.ClientReadableStream<commands_lib_pb.LibraryDownloadResp>;
|
|
||||||
public libraryDownload(request: commands_lib_pb.LibraryDownloadReq, metadata?: grpc.Metadata, options?: Partial<grpc.CallOptions>): grpc.ClientReadableStream<commands_lib_pb.LibraryDownloadResp>;
|
|
||||||
public libraryInstall(request: commands_lib_pb.LibraryInstallReq, options?: Partial<grpc.CallOptions>): grpc.ClientReadableStream<commands_lib_pb.LibraryInstallResp>;
|
|
||||||
public libraryInstall(request: commands_lib_pb.LibraryInstallReq, metadata?: grpc.Metadata, options?: Partial<grpc.CallOptions>): grpc.ClientReadableStream<commands_lib_pb.LibraryInstallResp>;
|
|
||||||
public libraryUninstall(request: commands_lib_pb.LibraryUninstallReq, options?: Partial<grpc.CallOptions>): grpc.ClientReadableStream<commands_lib_pb.LibraryUninstallResp>;
|
|
||||||
public libraryUninstall(request: commands_lib_pb.LibraryUninstallReq, metadata?: grpc.Metadata, options?: Partial<grpc.CallOptions>): grpc.ClientReadableStream<commands_lib_pb.LibraryUninstallResp>;
|
|
||||||
public libraryUpgradeAll(request: commands_lib_pb.LibraryUpgradeAllReq, options?: Partial<grpc.CallOptions>): grpc.ClientReadableStream<commands_lib_pb.LibraryUpgradeAllResp>;
|
|
||||||
public libraryUpgradeAll(request: commands_lib_pb.LibraryUpgradeAllReq, metadata?: grpc.Metadata, options?: Partial<grpc.CallOptions>): grpc.ClientReadableStream<commands_lib_pb.LibraryUpgradeAllResp>;
|
|
||||||
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<grpc.CallOptions>, 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<grpc.CallOptions>, 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<grpc.CallOptions>, callback: (error: grpc.ServiceError | null, response: commands_lib_pb.LibraryListResp) => void): grpc.ClientUnaryCall;
|
|
||||||
}
|
|
||||||
@@ -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
|
|
||||||
// -------------------
|
|
||||||
@@ -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<jspb.Message>};
|
|
||||||
static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};
|
|
||||||
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<string>;
|
|
||||||
setPlatformsIndexErrorsList(value: Array<string>): 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<jspb.Message>};
|
|
||||||
static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};
|
|
||||||
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<string>,
|
|
||||||
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<jspb.Message>};
|
|
||||||
static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};
|
|
||||||
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<jspb.Message>};
|
|
||||||
static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};
|
|
||||||
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<jspb.Message>};
|
|
||||||
static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};
|
|
||||||
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<string>;
|
|
||||||
setPlatformsIndexErrorsList(value: Array<string>): 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<jspb.Message>};
|
|
||||||
static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};
|
|
||||||
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<string>,
|
|
||||||
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<jspb.Message>};
|
|
||||||
static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};
|
|
||||||
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<jspb.Message>};
|
|
||||||
static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};
|
|
||||||
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<jspb.Message>};
|
|
||||||
static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};
|
|
||||||
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<jspb.Message>};
|
|
||||||
static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};
|
|
||||||
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<jspb.Message>};
|
|
||||||
static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};
|
|
||||||
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<jspb.Message>};
|
|
||||||
static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};
|
|
||||||
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,
|
|
||||||
}
|
|
||||||
}
|
|
||||||
File diff suppressed because it is too large
Load Diff
@@ -1 +0,0 @@
|
|||||||
// GENERATED CODE -- NO SERVICES IN PROTO
|
|
||||||
@@ -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<jspb.Message>};
|
|
||||||
static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};
|
|
||||||
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<jspb.Message>};
|
|
||||||
static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};
|
|
||||||
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<jspb.Message>};
|
|
||||||
static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};
|
|
||||||
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,
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -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_<name>, 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_<name>, 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_<name>, 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);
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
// GENERATED CODE -- NO SERVICES IN PROTO
|
|
||||||
@@ -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<string>;
|
|
||||||
setBuildpropertiesList(value: Array<string>): 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<string>;
|
|
||||||
setLibrariesList(value: Array<string>): 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<jspb.Message>};
|
|
||||||
static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};
|
|
||||||
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<string>,
|
|
||||||
warnings: string,
|
|
||||||
verbose: boolean,
|
|
||||||
quiet: boolean,
|
|
||||||
vidpid: string,
|
|
||||||
exportfile: string,
|
|
||||||
jobs: number,
|
|
||||||
librariesList: Array<string>,
|
|
||||||
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<jspb.Message>};
|
|
||||||
static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};
|
|
||||||
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,
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -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<number>}
|
|
||||||
* @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_<name>, 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<string>}
|
|
||||||
*/
|
|
||||||
proto.cc.arduino.cli.commands.CompileReq.prototype.getBuildpropertiesList = function() {
|
|
||||||
return /** @type {!Array<string>} */ (jspb.Message.getRepeatedField(this, 8));
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
/** @param {!Array<string>} 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<string>}
|
|
||||||
*/
|
|
||||||
proto.cc.arduino.cli.commands.CompileReq.prototype.getLibrariesList = function() {
|
|
||||||
return /** @type {!Array<string>} */ (jspb.Message.getRepeatedField(this, 15));
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
/** @param {!Array<string>} 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_<name>, 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);
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
// GENERATED CODE -- NO SERVICES IN PROTO
|
|
||||||
@@ -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<jspb.Message>};
|
|
||||||
static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};
|
|
||||||
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<jspb.Message>};
|
|
||||||
static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};
|
|
||||||
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<jspb.Message>};
|
|
||||||
static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};
|
|
||||||
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<jspb.Message>};
|
|
||||||
static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};
|
|
||||||
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<jspb.Message>};
|
|
||||||
static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};
|
|
||||||
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<jspb.Message>};
|
|
||||||
static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};
|
|
||||||
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<jspb.Message>};
|
|
||||||
static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};
|
|
||||||
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<jspb.Message>};
|
|
||||||
static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};
|
|
||||||
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<jspb.Message>};
|
|
||||||
static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};
|
|
||||||
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<Platform>;
|
|
||||||
setSearchOutputList(value: Array<Platform>): 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<jspb.Message>};
|
|
||||||
static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};
|
|
||||||
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<Platform.AsObject>,
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
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<jspb.Message>};
|
|
||||||
static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};
|
|
||||||
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<Platform>;
|
|
||||||
setInstalledPlatformList(value: Array<Platform>): 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<jspb.Message>};
|
|
||||||
static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};
|
|
||||||
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<Platform.AsObject>,
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
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<Board>;
|
|
||||||
setBoardsList(value: Array<Board>): 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<jspb.Message>};
|
|
||||||
static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};
|
|
||||||
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<Board.AsObject>,
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
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<jspb.Message>};
|
|
||||||
static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};
|
|
||||||
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,
|
|
||||||
}
|
|
||||||
}
|
|
||||||
File diff suppressed because it is too large
Load Diff
@@ -1 +0,0 @@
|
|||||||
// GENERATED CODE -- NO SERVICES IN PROTO
|
|
||||||
@@ -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<jspb.Message>};
|
|
||||||
static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};
|
|
||||||
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<jspb.Message>};
|
|
||||||
static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};
|
|
||||||
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<jspb.Message>};
|
|
||||||
static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};
|
|
||||||
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<jspb.Message>};
|
|
||||||
static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};
|
|
||||||
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<jspb.Message>};
|
|
||||||
static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};
|
|
||||||
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<jspb.Message>};
|
|
||||||
static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};
|
|
||||||
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<jspb.Message>};
|
|
||||||
static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};
|
|
||||||
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<jspb.Message>};
|
|
||||||
static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};
|
|
||||||
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<jspb.Message>};
|
|
||||||
static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};
|
|
||||||
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<LibraryDependencyStatus>;
|
|
||||||
setDependenciesList(value: Array<LibraryDependencyStatus>): 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<jspb.Message>};
|
|
||||||
static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};
|
|
||||||
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<LibraryDependencyStatus.AsObject>,
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
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<jspb.Message>};
|
|
||||||
static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};
|
|
||||||
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<jspb.Message>};
|
|
||||||
static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};
|
|
||||||
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<SearchedLibrary>;
|
|
||||||
setLibrariesList(value: Array<SearchedLibrary>): 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<jspb.Message>};
|
|
||||||
static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};
|
|
||||||
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<SearchedLibrary.AsObject>,
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
export class SearchedLibrary extends jspb.Message {
|
|
||||||
getName(): string;
|
|
||||||
setName(value: string): void;
|
|
||||||
|
|
||||||
|
|
||||||
getReleasesMap(): jspb.Map<string, LibraryRelease>;
|
|
||||||
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<jspb.Message>};
|
|
||||||
static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};
|
|
||||||
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<string>;
|
|
||||||
setArchitecturesList(value: Array<string>): void;
|
|
||||||
addArchitectures(value: string, index?: number): string;
|
|
||||||
|
|
||||||
clearTypesList(): void;
|
|
||||||
getTypesList(): Array<string>;
|
|
||||||
setTypesList(value: Array<string>): 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<jspb.Message>};
|
|
||||||
static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};
|
|
||||||
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<string>,
|
|
||||||
typesList: Array<string>,
|
|
||||||
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<jspb.Message>};
|
|
||||||
static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};
|
|
||||||
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<jspb.Message>};
|
|
||||||
static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};
|
|
||||||
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<InstalledLibrary>;
|
|
||||||
setInstalledLibraryList(value: Array<InstalledLibrary>): 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<jspb.Message>};
|
|
||||||
static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};
|
|
||||||
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<InstalledLibrary.AsObject>,
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
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<jspb.Message>};
|
|
||||||
static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};
|
|
||||||
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<string>;
|
|
||||||
setArchitecturesList(value: Array<string>): void;
|
|
||||||
addArchitectures(value: string, index?: number): string;
|
|
||||||
|
|
||||||
clearTypesList(): void;
|
|
||||||
getTypesList(): Array<string>;
|
|
||||||
setTypesList(value: Array<string>): 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<string, string>;
|
|
||||||
clearPropertiesMap(): void;
|
|
||||||
|
|
||||||
|
|
||||||
serializeBinary(): Uint8Array;
|
|
||||||
toObject(includeInstance?: boolean): Library.AsObject;
|
|
||||||
static toObject(includeInstance: boolean, msg: Library): Library.AsObject;
|
|
||||||
static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};
|
|
||||||
static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};
|
|
||||||
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<string>,
|
|
||||||
typesList: Array<string>,
|
|
||||||
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,
|
|
||||||
}
|
|
||||||
File diff suppressed because it is too large
Load Diff
@@ -1 +0,0 @@
|
|||||||
// GENERATED CODE -- NO SERVICES IN PROTO
|
|
||||||
@@ -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<jspb.Message>};
|
|
||||||
static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};
|
|
||||||
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<jspb.Message>};
|
|
||||||
static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};
|
|
||||||
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,
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -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_<name>, 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_<name>, 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);
|
|
||||||
@@ -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<grpc.UntypedServiceImplementation> {
|
|
||||||
debug: IDebugService_IDebug;
|
|
||||||
}
|
|
||||||
|
|
||||||
interface IDebugService_IDebug extends grpc.MethodDefinition<debug_debug_pb.DebugReq, debug_debug_pb.DebugResp> {
|
|
||||||
path: string; // "/cc.arduino.cli.debug.Debug/Debug"
|
|
||||||
requestStream: boolean; // true
|
|
||||||
responseStream: boolean; // true
|
|
||||||
requestSerialize: grpc.serialize<debug_debug_pb.DebugReq>;
|
|
||||||
requestDeserialize: grpc.deserialize<debug_debug_pb.DebugReq>;
|
|
||||||
responseSerialize: grpc.serialize<debug_debug_pb.DebugResp>;
|
|
||||||
responseDeserialize: grpc.deserialize<debug_debug_pb.DebugResp>;
|
|
||||||
}
|
|
||||||
|
|
||||||
export const DebugService: IDebugService;
|
|
||||||
|
|
||||||
export interface IDebugServer {
|
|
||||||
debug: grpc.handleBidiStreamingCall<debug_debug_pb.DebugReq, debug_debug_pb.DebugResp>;
|
|
||||||
}
|
|
||||||
|
|
||||||
export interface IDebugClient {
|
|
||||||
debug(): grpc.ClientDuplexStream<debug_debug_pb.DebugReq, debug_debug_pb.DebugResp>;
|
|
||||||
debug(options: Partial<grpc.CallOptions>): grpc.ClientDuplexStream<debug_debug_pb.DebugReq, debug_debug_pb.DebugResp>;
|
|
||||||
debug(metadata: grpc.Metadata, options?: Partial<grpc.CallOptions>): grpc.ClientDuplexStream<debug_debug_pb.DebugReq, debug_debug_pb.DebugResp>;
|
|
||||||
}
|
|
||||||
|
|
||||||
export class DebugClient extends grpc.Client implements IDebugClient {
|
|
||||||
constructor(address: string, credentials: grpc.ChannelCredentials, options?: object);
|
|
||||||
public debug(options?: Partial<grpc.CallOptions>): grpc.ClientDuplexStream<debug_debug_pb.DebugReq, debug_debug_pb.DebugResp>;
|
|
||||||
public debug(metadata?: grpc.Metadata, options?: Partial<grpc.CallOptions>): grpc.ClientDuplexStream<debug_debug_pb.DebugReq, debug_debug_pb.DebugResp>;
|
|
||||||
}
|
|
||||||
@@ -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);
|
|
||||||
@@ -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<jspb.Message>};
|
|
||||||
static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};
|
|
||||||
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<jspb.Message>};
|
|
||||||
static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};
|
|
||||||
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<jspb.Message>};
|
|
||||||
static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};
|
|
||||||
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<jspb.Message>};
|
|
||||||
static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};
|
|
||||||
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,
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -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_<name>, 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_<name>, 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_<name>, 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_<name>, 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);
|
|
||||||
@@ -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<grpc.UntypedServiceImplementation> {
|
|
||||||
streamingOpen: IMonitorService_IStreamingOpen;
|
|
||||||
}
|
|
||||||
|
|
||||||
interface IMonitorService_IStreamingOpen extends grpc.MethodDefinition<monitor_monitor_pb.StreamingOpenReq, monitor_monitor_pb.StreamingOpenResp> {
|
|
||||||
path: string; // "/cc.arduino.cli.monitor.Monitor/StreamingOpen"
|
|
||||||
requestStream: boolean; // true
|
|
||||||
responseStream: boolean; // true
|
|
||||||
requestSerialize: grpc.serialize<monitor_monitor_pb.StreamingOpenReq>;
|
|
||||||
requestDeserialize: grpc.deserialize<monitor_monitor_pb.StreamingOpenReq>;
|
|
||||||
responseSerialize: grpc.serialize<monitor_monitor_pb.StreamingOpenResp>;
|
|
||||||
responseDeserialize: grpc.deserialize<monitor_monitor_pb.StreamingOpenResp>;
|
|
||||||
}
|
|
||||||
|
|
||||||
export const MonitorService: IMonitorService;
|
|
||||||
|
|
||||||
export interface IMonitorServer {
|
|
||||||
streamingOpen: grpc.handleBidiStreamingCall<monitor_monitor_pb.StreamingOpenReq, monitor_monitor_pb.StreamingOpenResp>;
|
|
||||||
}
|
|
||||||
|
|
||||||
export interface IMonitorClient {
|
|
||||||
streamingOpen(): grpc.ClientDuplexStream<monitor_monitor_pb.StreamingOpenReq, monitor_monitor_pb.StreamingOpenResp>;
|
|
||||||
streamingOpen(options: Partial<grpc.CallOptions>): grpc.ClientDuplexStream<monitor_monitor_pb.StreamingOpenReq, monitor_monitor_pb.StreamingOpenResp>;
|
|
||||||
streamingOpen(metadata: grpc.Metadata, options?: Partial<grpc.CallOptions>): grpc.ClientDuplexStream<monitor_monitor_pb.StreamingOpenReq, monitor_monitor_pb.StreamingOpenResp>;
|
|
||||||
}
|
|
||||||
|
|
||||||
export class MonitorClient extends grpc.Client implements IMonitorClient {
|
|
||||||
constructor(address: string, credentials: grpc.ChannelCredentials, options?: object);
|
|
||||||
public streamingOpen(options?: Partial<grpc.CallOptions>): grpc.ClientDuplexStream<monitor_monitor_pb.StreamingOpenReq, monitor_monitor_pb.StreamingOpenResp>;
|
|
||||||
public streamingOpen(metadata?: grpc.Metadata, options?: Partial<grpc.CallOptions>): grpc.ClientDuplexStream<monitor_monitor_pb.StreamingOpenReq, monitor_monitor_pb.StreamingOpenResp>;
|
|
||||||
}
|
|
||||||
@@ -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);
|
|
||||||
@@ -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<jspb.Message>};
|
|
||||||
static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};
|
|
||||||
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<jspb.Message>};
|
|
||||||
static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};
|
|
||||||
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<jspb.Message>};
|
|
||||||
static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};
|
|
||||||
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,
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -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<!Array<number>>}
|
|
||||||
* @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_<name>, 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_<name>, 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_<name>, 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);
|
|
||||||
@@ -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<grpc.UntypedServiceImplementation> {
|
|
||||||
getAll: ISettingsService_IGetAll;
|
|
||||||
merge: ISettingsService_IMerge;
|
|
||||||
getValue: ISettingsService_IGetValue;
|
|
||||||
setValue: ISettingsService_ISetValue;
|
|
||||||
}
|
|
||||||
|
|
||||||
interface ISettingsService_IGetAll extends grpc.MethodDefinition<settings_settings_pb.GetAllRequest, settings_settings_pb.RawData> {
|
|
||||||
path: string; // "/cc.arduino.cli.settings.Settings/GetAll"
|
|
||||||
requestStream: boolean; // false
|
|
||||||
responseStream: boolean; // false
|
|
||||||
requestSerialize: grpc.serialize<settings_settings_pb.GetAllRequest>;
|
|
||||||
requestDeserialize: grpc.deserialize<settings_settings_pb.GetAllRequest>;
|
|
||||||
responseSerialize: grpc.serialize<settings_settings_pb.RawData>;
|
|
||||||
responseDeserialize: grpc.deserialize<settings_settings_pb.RawData>;
|
|
||||||
}
|
|
||||||
interface ISettingsService_IMerge extends grpc.MethodDefinition<settings_settings_pb.RawData, settings_settings_pb.MergeResponse> {
|
|
||||||
path: string; // "/cc.arduino.cli.settings.Settings/Merge"
|
|
||||||
requestStream: boolean; // false
|
|
||||||
responseStream: boolean; // false
|
|
||||||
requestSerialize: grpc.serialize<settings_settings_pb.RawData>;
|
|
||||||
requestDeserialize: grpc.deserialize<settings_settings_pb.RawData>;
|
|
||||||
responseSerialize: grpc.serialize<settings_settings_pb.MergeResponse>;
|
|
||||||
responseDeserialize: grpc.deserialize<settings_settings_pb.MergeResponse>;
|
|
||||||
}
|
|
||||||
interface ISettingsService_IGetValue extends grpc.MethodDefinition<settings_settings_pb.GetValueRequest, settings_settings_pb.Value> {
|
|
||||||
path: string; // "/cc.arduino.cli.settings.Settings/GetValue"
|
|
||||||
requestStream: boolean; // false
|
|
||||||
responseStream: boolean; // false
|
|
||||||
requestSerialize: grpc.serialize<settings_settings_pb.GetValueRequest>;
|
|
||||||
requestDeserialize: grpc.deserialize<settings_settings_pb.GetValueRequest>;
|
|
||||||
responseSerialize: grpc.serialize<settings_settings_pb.Value>;
|
|
||||||
responseDeserialize: grpc.deserialize<settings_settings_pb.Value>;
|
|
||||||
}
|
|
||||||
interface ISettingsService_ISetValue extends grpc.MethodDefinition<settings_settings_pb.Value, settings_settings_pb.SetValueResponse> {
|
|
||||||
path: string; // "/cc.arduino.cli.settings.Settings/SetValue"
|
|
||||||
requestStream: boolean; // false
|
|
||||||
responseStream: boolean; // false
|
|
||||||
requestSerialize: grpc.serialize<settings_settings_pb.Value>;
|
|
||||||
requestDeserialize: grpc.deserialize<settings_settings_pb.Value>;
|
|
||||||
responseSerialize: grpc.serialize<settings_settings_pb.SetValueResponse>;
|
|
||||||
responseDeserialize: grpc.deserialize<settings_settings_pb.SetValueResponse>;
|
|
||||||
}
|
|
||||||
|
|
||||||
export const SettingsService: ISettingsService;
|
|
||||||
|
|
||||||
export interface ISettingsServer {
|
|
||||||
getAll: grpc.handleUnaryCall<settings_settings_pb.GetAllRequest, settings_settings_pb.RawData>;
|
|
||||||
merge: grpc.handleUnaryCall<settings_settings_pb.RawData, settings_settings_pb.MergeResponse>;
|
|
||||||
getValue: grpc.handleUnaryCall<settings_settings_pb.GetValueRequest, settings_settings_pb.Value>;
|
|
||||||
setValue: grpc.handleUnaryCall<settings_settings_pb.Value, settings_settings_pb.SetValueResponse>;
|
|
||||||
}
|
|
||||||
|
|
||||||
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<grpc.CallOptions>, 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<grpc.CallOptions>, 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<grpc.CallOptions>, 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<grpc.CallOptions>, 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<grpc.CallOptions>, 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<grpc.CallOptions>, 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<grpc.CallOptions>, 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<grpc.CallOptions>, callback: (error: grpc.ServiceError | null, response: settings_settings_pb.SetValueResponse) => void): grpc.ClientUnaryCall;
|
|
||||||
}
|
|
||||||
@@ -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);
|
|
||||||
@@ -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<jspb.Message>};
|
|
||||||
static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};
|
|
||||||
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<jspb.Message>};
|
|
||||||
static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};
|
|
||||||
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<jspb.Message>};
|
|
||||||
static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};
|
|
||||||
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<jspb.Message>};
|
|
||||||
static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};
|
|
||||||
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<jspb.Message>};
|
|
||||||
static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};
|
|
||||||
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<jspb.Message>};
|
|
||||||
static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};
|
|
||||||
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 = {
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -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_<name>, 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_<name>, 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_<name>, 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_<name>, 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_<name>, 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_<name>, 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);
|
|
||||||
55
arduino-ide-extension/src/node/config-file-validator.ts
Normal file
55
arduino-ide-extension/src/node/config-file-validator.ts
Normal file
@@ -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<boolean> {
|
||||||
|
return this.doValidate(typeof pathOrObject === 'string' ? fs.readFileSync(pathOrObject) : pathOrObject);
|
||||||
|
}
|
||||||
|
|
||||||
|
protected async doValidate(object: object): Promise<boolean> {
|
||||||
|
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<boolean> {
|
||||||
|
try {
|
||||||
|
if (!path.trim()) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
const exists = await fs.exists(path);
|
||||||
|
if (!exists) {
|
||||||
|
await fs.mkdirp(path);
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
} catch {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -1,49 +1,263 @@
|
|||||||
import * as fs from './fs-extra';
|
import * as path from 'path';
|
||||||
import { injectable, inject, postConstruct } from 'inversify';
|
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 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 { 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 { Deferred } from '@theia/core/lib/common/promise-util';
|
||||||
import { ConfigService, Config } from '../common/protocol/config-service';
|
import { EnvVariablesServer } from '@theia/core/lib/common/env-variables';
|
||||||
import { ArduinoCli } from './arduino-cli';
|
|
||||||
|
const debounce = require('lodash.debounce');
|
||||||
|
|
||||||
@injectable()
|
@injectable()
|
||||||
export class ConfigServiceImpl implements ConfigService {
|
export class ConfigServiceImpl implements BackendApplicationContribution, ConfigService {
|
||||||
|
|
||||||
@inject(ArduinoCli)
|
@inject(ILogger)
|
||||||
protected readonly cli: ArduinoCli;
|
@named('config')
|
||||||
protected readonly config: Deferred<Config> = new Deferred();
|
protected readonly logger: ILogger;
|
||||||
|
|
||||||
@postConstruct()
|
@inject(EnvVariablesServer)
|
||||||
protected async init(): Promise<void> {
|
protected readonly envVariablesServer: EnvVariablesServer;
|
||||||
try {
|
|
||||||
const config = await this.cli.getDefaultConfig();
|
@inject(ConfigFileValidator)
|
||||||
const { dataDirUri, sketchDirUri } = config;
|
protected readonly validator: ConfigFileValidator;
|
||||||
for (const uri of [dataDirUri, sketchDirUri]) {
|
|
||||||
const path = FileUri.fsPath(uri);
|
@inject(ArduinoDaemonImpl)
|
||||||
if (!fs.existsSync(path)) {
|
protected readonly daemon: ArduinoDaemonImpl;
|
||||||
await fs.mkdirp(path);
|
|
||||||
|
protected updating = false;
|
||||||
|
protected config: Config;
|
||||||
|
protected cliConfig: DefaultCliConfig | undefined;
|
||||||
|
protected clients: Array<ConfigServiceClient> = [];
|
||||||
|
protected ready = new Deferred<void>();
|
||||||
|
protected readonly configChangeEmitter = new Emitter<Config>();
|
||||||
|
|
||||||
|
async onStart(): Promise<void> {
|
||||||
|
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();
|
||||||
}
|
}
|
||||||
}
|
} else {
|
||||||
this.config.resolve(config);
|
this.fireInvalidConfig();
|
||||||
} catch (err) {
|
|
||||||
this.config.reject(err);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
getConfiguration(): Promise<Config> {
|
async getCliConfigFileUri(): Promise<string> {
|
||||||
return this.config.promise;
|
const configDirUri = await this.envVariablesServer.getConfigDirUri();
|
||||||
|
return new URI(configDirUri).resolve(CLI_CONFIG).toString();
|
||||||
}
|
}
|
||||||
|
|
||||||
getVersion(): Promise<string> {
|
async getConfigurationFileSchemaUri(): Promise<string> {
|
||||||
return this.cli.getVersion();
|
return FileUri.create(CLI_CONFIG_SCHEMA_PATH).toString();
|
||||||
}
|
}
|
||||||
|
|
||||||
isInDataDir(uri: string): Promise<boolean> {
|
async getConfiguration(): Promise<Config> {
|
||||||
|
await this.ready.promise;
|
||||||
|
return this.config;
|
||||||
|
}
|
||||||
|
|
||||||
|
get cliConfiguration(): DefaultCliConfig | undefined {
|
||||||
|
return this.cliConfig;
|
||||||
|
}
|
||||||
|
|
||||||
|
get onConfigChange(): Event<Config> {
|
||||||
|
return this.configChangeEmitter.event;
|
||||||
|
}
|
||||||
|
|
||||||
|
async getVersion(): Promise<string> {
|
||||||
|
return this.daemon.getVersion();
|
||||||
|
}
|
||||||
|
|
||||||
|
async isInDataDir(uri: string): Promise<boolean> {
|
||||||
return this.getConfiguration().then(({ dataDirUri }) => new URI(dataDirUri).isEqualOrParent(new URI(uri)));
|
return this.getConfiguration().then(({ dataDirUri }) => new URI(dataDirUri).isEqualOrParent(new URI(uri)));
|
||||||
}
|
}
|
||||||
|
|
||||||
isInSketchDir(uri: string): Promise<boolean> {
|
async isInSketchDir(uri: string): Promise<boolean> {
|
||||||
return this.getConfiguration().then(({ sketchDirUri }) => new URI(sketchDirUri).isEqualOrParent(new URI(uri)));
|
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<DefaultCliConfig | undefined> {
|
||||||
|
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<DefaultCliConfig> {
|
||||||
|
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<void> {
|
||||||
|
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<void> {
|
||||||
|
const cliPath = await this.daemon.getExecPath();
|
||||||
|
await spawnCommand(`"${cliPath}"`, ['config', 'init', '--dest-dir', `"${fsPathToDir}"`]);
|
||||||
|
}
|
||||||
|
|
||||||
|
protected async mapCliConfigToAppConfig(cliConfig: DefaultCliConfig): Promise<Config> {
|
||||||
|
const { directories } = cliConfig;
|
||||||
|
const { data, user, downloads } = directories;
|
||||||
|
const additionalUrls: Array<string> = [];
|
||||||
|
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<void> {
|
||||||
|
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<void>(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<void> {
|
||||||
|
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<void> {
|
||||||
|
const client = new SettingsClient(`localhost:${port}`, grpc.credentials.createInsecure());
|
||||||
|
const data = new RawData();
|
||||||
|
data.setJsondata(JSON.stringify(config, null, 2));
|
||||||
|
return new Promise<void>((resolve, reject) => {
|
||||||
|
client.merge(data, error => {
|
||||||
|
if (error) {
|
||||||
|
reject(error);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
client.close();
|
||||||
|
resolve();
|
||||||
|
})
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -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<string, Client>();
|
|
||||||
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<Client | undefined> {
|
|
||||||
return this.clientRequestQueue.add(() => new Promise<Client | undefined>(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<Client | undefined> {
|
|
||||||
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<InitResp>(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<void> {
|
|
||||||
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<void>((resolve, reject) => {
|
|
||||||
resp.on('error', reject);
|
|
||||||
resp.on('end', resolve);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
protected async updateIndex(client: ArduinoCoreClient, instance: Instance): Promise<void> {
|
|
||||||
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<void>((resolve, reject) => {
|
|
||||||
updateResp.on('error', reject);
|
|
||||||
updateResp.on('end', resolve);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
@@ -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 { 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';
|
||||||
|
|
||||||
export const CoreClientProviderPath = '/services/core-client-provider';
|
@injectable()
|
||||||
export const CoreClientProvider = Symbol('CoreClientProvider');
|
export class CoreClientProvider extends GrpcClientProvider<CoreClientProvider.Client> {
|
||||||
export interface CoreClientProvider {
|
|
||||||
getClient(workspaceRootOrResourceUri?: string): Promise<Client | undefined>;
|
@inject(ToolOutputServiceServer)
|
||||||
|
protected readonly toolOutputService: ToolOutputServiceServer;
|
||||||
|
|
||||||
|
protected readonly onIndexUpdatedEmitter = new Emitter<void>();
|
||||||
|
|
||||||
|
get onIndexUpdated(): Event<void> {
|
||||||
|
return this.onIndexUpdatedEmitter.event;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
close(client: CoreClientProvider.Client): void {
|
||||||
|
client.client.close();
|
||||||
|
}
|
||||||
|
|
||||||
|
protected async reconcileClient(port: string | undefined): Promise<void> {
|
||||||
|
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<CoreClientProvider.Client> {
|
||||||
|
const client = new ArduinoCoreClient(`localhost:${port}`, grpc.credentials.createInsecure());
|
||||||
|
const initReq = new InitReq();
|
||||||
|
initReq.setLibraryManagerOnly(false);
|
||||||
|
const initResp = await new Promise<InitResp>(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<void> {
|
||||||
|
// 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<void> {
|
||||||
|
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<void>((resolve, reject) => {
|
||||||
|
resp.on('error', reject);
|
||||||
|
resp.on('end', resolve);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
protected async updateIndex({ client, instance }: CoreClientProvider.Client): Promise<void> {
|
||||||
|
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<void>((resolve, reject) => {
|
||||||
|
updateResp.on('error', reject);
|
||||||
|
updateResp.on('end', resolve);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
export namespace CoreClientProvider {
|
||||||
export interface Client {
|
export interface Client {
|
||||||
readonly client: ArduinoCoreClient;
|
readonly client: ArduinoCoreClient;
|
||||||
readonly instance: Instance;
|
readonly instance: Instance;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
import { inject, injectable } from 'inversify';
|
import { inject, injectable, postConstruct } from 'inversify';
|
||||||
import { FileSystem } from '@theia/filesystem/lib/common/filesystem';
|
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 { CompileReq, CompileResp } from './cli-protocol/commands/compile_pb';
|
||||||
import { BoardsService } from '../common/protocol/boards-service';
|
import { BoardsService } from '../common/protocol/boards-service';
|
||||||
import { CoreClientProvider } from './core-client-provider';
|
import { CoreClientProvider } from './core-client-provider';
|
||||||
@@ -23,6 +23,17 @@ export class CoreServiceImpl implements CoreService {
|
|||||||
@inject(ToolOutputServiceServer)
|
@inject(ToolOutputServiceServer)
|
||||||
protected readonly toolOutputService: 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<void> {
|
async compile(options: CoreService.Compile.Options): Promise<void> {
|
||||||
console.log('compile', options);
|
console.log('compile', options);
|
||||||
const { uri } = options;
|
const { uri } = options;
|
||||||
@@ -32,7 +43,7 @@ export class CoreServiceImpl implements CoreService {
|
|||||||
}
|
}
|
||||||
const sketchpath = path.dirname(sketchFilePath);
|
const sketchpath = path.dirname(sketchFilePath);
|
||||||
|
|
||||||
const coreClient = await this.coreClientProvider.getClient(uri);
|
const coreClient = await this.coreClientProvider.client();
|
||||||
if (!coreClient) {
|
if (!coreClient) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -91,7 +102,7 @@ export class CoreServiceImpl implements CoreService {
|
|||||||
throw new Error(`selected board (${currentBoard.name}) has no FQBN`);
|
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) {
|
if (!coreClient) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -120,4 +131,12 @@ export class CoreServiceImpl implements CoreService {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
setClient(client: CoreServiceClient | undefined): void {
|
||||||
|
this.client = client;
|
||||||
|
}
|
||||||
|
|
||||||
|
dispose(): void {
|
||||||
|
this.client = undefined;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,11 +1,10 @@
|
|||||||
import * as os from 'os';
|
import * as os from 'os';
|
||||||
import * as which from 'which';
|
import * as which from 'which';
|
||||||
import * as semver from 'semver';
|
import * as semver from 'semver';
|
||||||
import { spawn } from 'child_process';
|
|
||||||
import { join } from 'path';
|
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<string> {
|
export async function getExecPath(commandName: string, onError: (error: Error) => void = (error) => console.log(error), versionArg?: string, inBinDir?: boolean): Promise<string> {
|
||||||
const execName = `${commandName}${os.platform() === 'win32' ? '.exe' : ''}`;
|
const execName = `${commandName}${os.platform() === 'win32' ? '.exe' : ''}`;
|
||||||
const relativePath = ['..', '..', 'build'];
|
const relativePath = ['..', '..', 'build'];
|
||||||
if (inBinDir) {
|
if (inBinDir) {
|
||||||
@@ -16,13 +15,13 @@ export async function getExecPath(commandName: string, logger: ILogger, versionA
|
|||||||
return buildCommand;
|
return buildCommand;
|
||||||
}
|
}
|
||||||
const versionRegexp = /\d+\.\d+\.\d+/;
|
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 buildShortVersion = (buildVersion.match(versionRegexp) || [])[0];
|
||||||
const pathCommand = await new Promise<string | undefined>(resolve => which(execName, (error, path) => resolve(error ? undefined : path)));
|
const pathCommand = await new Promise<string | undefined>(resolve => which(execName, (error, path) => resolve(error ? undefined : path)));
|
||||||
if (!pathCommand) {
|
if (!pathCommand) {
|
||||||
return buildCommand;
|
return buildCommand;
|
||||||
}
|
}
|
||||||
const pathVersion = await spawnCommand(`"${pathCommand}"`, [versionArg], logger);
|
const pathVersion = await spawnCommand(`"${pathCommand}"`, [versionArg], onError);
|
||||||
const pathShortVersion = (pathVersion.match(versionRegexp) || [])[0];
|
const pathShortVersion = (pathVersion.match(versionRegexp) || [])[0];
|
||||||
if (semver.gt(pathShortVersion, buildShortVersion)) {
|
if (semver.gt(pathShortVersion, buildShortVersion)) {
|
||||||
return pathCommand;
|
return pathCommand;
|
||||||
@@ -30,7 +29,7 @@ export async function getExecPath(commandName: string, logger: ILogger, versionA
|
|||||||
return buildCommand;
|
return buildCommand;
|
||||||
}
|
}
|
||||||
|
|
||||||
export function spawnCommand(command: string, args: string[], logger?: ILogger): Promise<string> {
|
export function spawnCommand(command: string, args: string[], onError: (error: Error) => void = (error) => console.log(error)): Promise<string> {
|
||||||
return new Promise<string>((resolve, reject) => {
|
return new Promise<string>((resolve, reject) => {
|
||||||
const cp = spawn(command, args, { windowsHide: true, shell: true });
|
const cp = spawn(command, args, { windowsHide: true, shell: true });
|
||||||
const outBuffers: Buffer[] = [];
|
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.stdout.on('data', (b: Buffer) => outBuffers.push(b));
|
||||||
cp.stderr.on('data', (b: Buffer) => errBuffers.push(b));
|
cp.stderr.on('data', (b: Buffer) => errBuffers.push(b));
|
||||||
cp.on('error', error => {
|
cp.on('error', error => {
|
||||||
if (logger) {
|
onError(error);
|
||||||
logger.error(`Error executing ${command} ${args.join(' ')}`, error);
|
|
||||||
}
|
|
||||||
reject(error);
|
reject(error);
|
||||||
});
|
});
|
||||||
cp.on('exit', (code, signal) => {
|
cp.on('exit', (code, signal) => {
|
||||||
@@ -51,24 +48,21 @@ export function spawnCommand(command: string, args: string[], logger?: ILogger):
|
|||||||
}
|
}
|
||||||
if (errBuffers.length > 0) {
|
if (errBuffers.length > 0) {
|
||||||
const message = Buffer.concat(errBuffers).toString('utf8').trim();
|
const message = Buffer.concat(errBuffers).toString('utf8').trim();
|
||||||
if (logger) {
|
const error = new Error(`Error executing ${command} ${args.join(' ')}: ${message}`);
|
||||||
logger.error(`Error executing ${command} ${args.join(' ')}: ${message}`);
|
onError(error)
|
||||||
}
|
reject(error);
|
||||||
reject(new Error(`Process failed with error: ${message}`));
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (signal) {
|
if (signal) {
|
||||||
if (logger) {
|
const error = new Error(`Process exited with signal: ${signal}`);
|
||||||
logger.error(`Unexpected signal '${signal}' when executing ${command} ${args.join(' ')}`);
|
onError(error);
|
||||||
}
|
reject(error);
|
||||||
reject(new Error(`Process exited with signal: ${signal}`));
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (code) {
|
if (code) {
|
||||||
if (logger) {
|
const error = new Error(`Process exited with exit code: ${code}`);
|
||||||
logger.error(`Unexpected exit code '${code}' when executing ${command} ${args.join(' ')}`);
|
onError(error);
|
||||||
}
|
reject(error);
|
||||||
reject(new Error(`Process exited with exit code: ${code}`));
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -6,12 +6,17 @@ export const lstatSync = fs.lstatSync;
|
|||||||
export const readdirSync = fs.readdirSync;
|
export const readdirSync = fs.readdirSync;
|
||||||
export const statSync = fs.statSync;
|
export const statSync = fs.statSync;
|
||||||
export const writeFileSync = fs.writeFileSync;
|
export const writeFileSync = fs.writeFileSync;
|
||||||
|
export const readFileSync = fs.readFileSync;
|
||||||
|
|
||||||
export const exists = promisify(fs.exists);
|
export const exists = promisify(fs.exists);
|
||||||
export const lstat = promisify(fs.lstat);
|
export const lstat = promisify(fs.lstat);
|
||||||
export const readdir = promisify(fs.readdir);
|
export const readdir = promisify(fs.readdir);
|
||||||
export const stat = promisify(fs.stat);
|
export const stat = promisify(fs.stat);
|
||||||
export const writeFile = promisify(fs.writeFile);
|
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<void> {
|
export function mkdirp(path: string, timeout: number = 3000): Promise<void> {
|
||||||
return new Promise((resolve, reject) => {
|
return new Promise((resolve, reject) => {
|
||||||
|
|||||||
71
arduino-ide-extension/src/node/grpc-client-provider.ts
Normal file
71
arduino-ide-extension/src/node/grpc-client-provider.ts
Normal file
@@ -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<C> {
|
||||||
|
|
||||||
|
@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<C | undefined> {
|
||||||
|
try {
|
||||||
|
await this.daemon.ready;
|
||||||
|
return this._client;
|
||||||
|
} catch (error) {
|
||||||
|
return undefined;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
protected async reconcileClient(port: string | number | undefined): Promise<void> {
|
||||||
|
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<C>;
|
||||||
|
|
||||||
|
protected abstract close(client: C): void;
|
||||||
|
|
||||||
|
}
|
||||||
@@ -27,9 +27,11 @@ export class ArduinoLanguageServerContribution extends BaseLanguageServerContrib
|
|||||||
protected logger: ILogger;
|
protected logger: ILogger;
|
||||||
|
|
||||||
async start(clientConnection: IConnection, options: LanguageServerStartOptions): Promise<void> {
|
async start(clientConnection: IConnection, options: LanguageServerStartOptions): Promise<void> {
|
||||||
const languageServer = await getExecPath('arduino-language-server', this.logger);
|
const [languageServer, clangd, cli] = await Promise.all([
|
||||||
const clangd = await getExecPath('clangd', this.logger, '--version', os.platform() !== 'win32');
|
getExecPath('arduino-language-server', this.onError.bind(this)),
|
||||||
const cli = await getExecPath('arduino-cli', this.logger, 'version');
|
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
|
// Add '-log' argument to enable logging to files
|
||||||
const args: string[] = ['-clangd', clangd, '-cli', cli];
|
const args: string[] = ['-clangd', clangd, '-cli', cli];
|
||||||
if (options.parameters && options.parameters.selectedBoard) {
|
if (options.parameters && options.parameters.selectedBoard) {
|
||||||
@@ -46,4 +48,8 @@ export class ArduinoLanguageServerContribution extends BaseLanguageServerContrib
|
|||||||
this.forward(clientConnection, serverConnection);
|
this.forward(clientConnection, serverConnection);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
protected onError(error: Error): void {
|
||||||
|
this.logger.error(error);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -26,7 +26,7 @@ export class LibraryServiceImpl implements LibraryService {
|
|||||||
protected readonly toolOutputService: ToolOutputServiceServer;
|
protected readonly toolOutputService: ToolOutputServiceServer;
|
||||||
|
|
||||||
async search(options: { query?: string }): Promise<{ items: Library[] }> {
|
async search(options: { query?: string }): Promise<{ items: Library[] }> {
|
||||||
const coreClient = await this.coreClientProvider.getClient();
|
const coreClient = await this.coreClientProvider.client();
|
||||||
if (!coreClient) {
|
if (!coreClient) {
|
||||||
return { items: [] };
|
return { items: [] };
|
||||||
}
|
}
|
||||||
@@ -74,7 +74,7 @@ export class LibraryServiceImpl implements LibraryService {
|
|||||||
async install(options: { item: Library, version?: Installable.Version }): Promise<void> {
|
async install(options: { item: Library, version?: Installable.Version }): Promise<void> {
|
||||||
const library = options.item;
|
const library = options.item;
|
||||||
const version = !!options.version ? options.version : library.availableVersions[0];
|
const version = !!options.version ? options.version : library.availableVersions[0];
|
||||||
const coreClient = await this.coreClientProvider.getClient();
|
const coreClient = await this.coreClientProvider.client();
|
||||||
if (!coreClient) {
|
if (!coreClient) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -100,7 +100,7 @@ export class LibraryServiceImpl implements LibraryService {
|
|||||||
|
|
||||||
async uninstall(options: { item: Library }): Promise<void> {
|
async uninstall(options: { item: Library }): Promise<void> {
|
||||||
const library = options.item;
|
const library = options.item;
|
||||||
const coreClient = await this.coreClientProvider.getClient();
|
const coreClient = await this.coreClientProvider.client();
|
||||||
if (!coreClient) {
|
if (!coreClient) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,20 +1,17 @@
|
|||||||
import * as grpc from '@grpc/grpc-js';
|
import * as grpc from '@grpc/grpc-js';
|
||||||
import { injectable, postConstruct } from 'inversify';
|
import { injectable } from 'inversify';
|
||||||
import { Deferred } from '@theia/core/lib/common/promise-util';
|
|
||||||
import { MonitorClient } from '../cli-protocol/monitor/monitor_grpc_pb';
|
import { MonitorClient } from '../cli-protocol/monitor/monitor_grpc_pb';
|
||||||
|
import { GrpcClientProvider } from '../grpc-client-provider';
|
||||||
|
|
||||||
@injectable()
|
@injectable()
|
||||||
export class MonitorClientProvider {
|
export class MonitorClientProvider extends GrpcClientProvider<MonitorClient> {
|
||||||
|
|
||||||
readonly deferred = new Deferred<MonitorClient>();
|
createClient(port: string | number): MonitorClient {
|
||||||
|
return new MonitorClient(`localhost:${port}`, grpc.credentials.createInsecure());
|
||||||
@postConstruct()
|
|
||||||
protected init(): void {
|
|
||||||
this.deferred.resolve(new MonitorClient('localhost:50051', grpc.credentials.createInsecure()));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
get client(): Promise<MonitorClient> {
|
close(client: MonitorClient): void {
|
||||||
return this.deferred.promise;
|
client.close();
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -65,7 +65,10 @@ export class MonitorServiceImpl implements MonitorService {
|
|||||||
if (this.connection) {
|
if (this.connection) {
|
||||||
return Status.ALREADY_CONNECTED;
|
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();
|
const duplex = client.streamingOpen();
|
||||||
this.connection = { duplex, config };
|
this.connection = { duplex, config };
|
||||||
|
|
||||||
|
|||||||
134
arduino-ide-extension/src/test/node/arduino-daemon-impl.test.ts
Normal file
134
arduino-ide-extension/src/test/node/arduino-daemon-impl.test.ts
Normal file
@@ -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<ChildProcess> {
|
||||||
|
return super.spawnDaemonProcess();
|
||||||
|
}
|
||||||
|
|
||||||
|
protected async getSpawnArgs(): Promise<string[]> {
|
||||||
|
const cliConfigPath = await this.initCliConfig();
|
||||||
|
return ['daemon', '--config-file', cliConfigPath, '-v', '--log-format', this.logFormat];
|
||||||
|
}
|
||||||
|
|
||||||
|
private async initCliConfig(): Promise<string> {
|
||||||
|
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<net.Server>(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<net.Server>(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);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
});
|
||||||
44
arduino-ide-extension/src/test/node/cli-config.test.ts
Normal file
44
arduino-ide-extension/src/test/node/cli-config.test.ts
Normal file
@@ -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'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
});
|
||||||
@@ -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<boolean> {
|
||||||
|
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<any> {
|
||||||
|
return new Promise<any>(resolve => {
|
||||||
|
new ArduinoDaemonImpl().getExecPath()
|
||||||
|
.then(execPath => spawnCommand(execPath, ['config', 'dump']))
|
||||||
|
.then(content => safeLoad(content))
|
||||||
|
.then(config => resolve(config));
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
})
|
||||||
31
arduino-ide-extension/src/test/node/exec-util.test.ts
Normal file
31
arduino-ide-extension/src/test/node/exec-util.test.ts
Normal file
@@ -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);
|
||||||
|
}
|
||||||
|
|
||||||
|
});
|
||||||
@@ -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');
|
|
||||||
});
|
|
||||||
});
|
|
||||||
@@ -1,89 +0,0 @@
|
|||||||
import { ILogger, Loggable, LogLevel } from '@theia/core';
|
|
||||||
|
|
||||||
export class NullLogger implements ILogger {
|
|
||||||
logLevel = 0;
|
|
||||||
|
|
||||||
setLogLevel(logLevel: number): Promise<void> {
|
|
||||||
this.logLevel = logLevel;
|
|
||||||
return Promise.resolve();
|
|
||||||
}
|
|
||||||
getLogLevel(): Promise<number> {
|
|
||||||
return Promise.resolve(this.logLevel);
|
|
||||||
}
|
|
||||||
isEnabled(logLevel: number): Promise<boolean> {
|
|
||||||
return Promise.resolve(logLevel >= this.logLevel);
|
|
||||||
}
|
|
||||||
ifEnabled(logLevel: number): Promise<void> {
|
|
||||||
if (logLevel >= this.logLevel)
|
|
||||||
return Promise.resolve();
|
|
||||||
else
|
|
||||||
return Promise.reject();
|
|
||||||
}
|
|
||||||
log(logLevel: any, loggable: any, ...rest: any[]) {
|
|
||||||
return Promise.resolve();
|
|
||||||
}
|
|
||||||
|
|
||||||
isTrace(): Promise<boolean> {
|
|
||||||
return this.isEnabled(LogLevel.TRACE);
|
|
||||||
}
|
|
||||||
ifTrace(): Promise<void> {
|
|
||||||
return this.ifEnabled(LogLevel.TRACE);
|
|
||||||
}
|
|
||||||
trace(arg: any | Loggable, ...params: any[]): Promise<void> {
|
|
||||||
return this.log(LogLevel.TRACE, arg, ...params);
|
|
||||||
}
|
|
||||||
|
|
||||||
isDebug(): Promise<boolean> {
|
|
||||||
return this.isEnabled(LogLevel.DEBUG);
|
|
||||||
}
|
|
||||||
ifDebug(): Promise<void> {
|
|
||||||
return this.ifEnabled(LogLevel.DEBUG);
|
|
||||||
}
|
|
||||||
debug(arg: any | Loggable, ...params: any[]): Promise<void> {
|
|
||||||
return this.log(LogLevel.DEBUG, arg, ...params);
|
|
||||||
}
|
|
||||||
|
|
||||||
isInfo(): Promise<boolean> {
|
|
||||||
return this.isEnabled(LogLevel.INFO);
|
|
||||||
}
|
|
||||||
ifInfo(): Promise<void> {
|
|
||||||
return this.ifEnabled(LogLevel.INFO);
|
|
||||||
}
|
|
||||||
info(arg: any | Loggable, ...params: any[]): Promise<void> {
|
|
||||||
return this.log(LogLevel.INFO, arg, ...params);
|
|
||||||
}
|
|
||||||
|
|
||||||
isWarn(): Promise<boolean> {
|
|
||||||
return this.isEnabled(LogLevel.WARN);
|
|
||||||
}
|
|
||||||
ifWarn(): Promise<void> {
|
|
||||||
return this.ifEnabled(LogLevel.WARN);
|
|
||||||
}
|
|
||||||
warn(arg: any | Loggable, ...params: any[]): Promise<void> {
|
|
||||||
return this.log(LogLevel.WARN, arg, ...params);
|
|
||||||
}
|
|
||||||
|
|
||||||
isError(): Promise<boolean> {
|
|
||||||
return this.isEnabled(LogLevel.ERROR);
|
|
||||||
}
|
|
||||||
ifError(): Promise<void> {
|
|
||||||
return this.ifEnabled(LogLevel.ERROR);
|
|
||||||
}
|
|
||||||
error(arg: any | Loggable, ...params: any[]): Promise<void> {
|
|
||||||
return this.log(LogLevel.ERROR, arg, ...params);
|
|
||||||
}
|
|
||||||
|
|
||||||
isFatal(): Promise<boolean> {
|
|
||||||
return this.isEnabled(LogLevel.FATAL);
|
|
||||||
}
|
|
||||||
ifFatal(): Promise<void> {
|
|
||||||
return this.ifEnabled(LogLevel.FATAL);
|
|
||||||
}
|
|
||||||
fatal(arg: any | Loggable, ...params: any[]): Promise<void> {
|
|
||||||
return this.log(LogLevel.FATAL, arg, ...params);
|
|
||||||
}
|
|
||||||
|
|
||||||
child(name: string): ILogger {
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -14,11 +14,12 @@
|
|||||||
"@theia/messages": "next",
|
"@theia/messages": "next",
|
||||||
"@theia/monaco": "next",
|
"@theia/monaco": "next",
|
||||||
"@theia/navigator": "next",
|
"@theia/navigator": "next",
|
||||||
|
"@theia/plugin-ext": "next",
|
||||||
|
"@theia/plugin-ext-vscode": "next",
|
||||||
"@theia/preferences": "next",
|
"@theia/preferences": "next",
|
||||||
"@theia/process": "next",
|
"@theia/process": "next",
|
||||||
"@theia/terminal": "next",
|
"@theia/terminal": "next",
|
||||||
"@theia/workspace": "next",
|
"@theia/workspace": "next",
|
||||||
"@theia/textmate-grammars": "next",
|
|
||||||
"arduino-ide-extension": "0.0.5",
|
"arduino-ide-extension": "0.0.5",
|
||||||
"arduino-debugger-extension": "0.0.5"
|
"arduino-debugger-extension": "0.0.5"
|
||||||
},
|
},
|
||||||
@@ -27,7 +28,7 @@
|
|||||||
},
|
},
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"prepare": "theia build --mode development",
|
"prepare": "theia build --mode development",
|
||||||
"start": "theia start --plugins=local-dir:../",
|
"start": "theia start --plugins=local-dir:../plugins",
|
||||||
"watch": "theia build --watch --mode development"
|
"watch": "theia build --watch --mode development"
|
||||||
},
|
},
|
||||||
"theia": {
|
"theia": {
|
||||||
|
|||||||
@@ -15,11 +15,12 @@
|
|||||||
"@theia/messages": "next",
|
"@theia/messages": "next",
|
||||||
"@theia/monaco": "next",
|
"@theia/monaco": "next",
|
||||||
"@theia/navigator": "next",
|
"@theia/navigator": "next",
|
||||||
|
"@theia/plugin-ext": "next",
|
||||||
|
"@theia/plugin-ext-vscode": "next",
|
||||||
"@theia/preferences": "next",
|
"@theia/preferences": "next",
|
||||||
"@theia/process": "next",
|
"@theia/process": "next",
|
||||||
"@theia/terminal": "next",
|
"@theia/terminal": "next",
|
||||||
"@theia/workspace": "next",
|
"@theia/workspace": "next",
|
||||||
"@theia/textmate-grammars": "next",
|
|
||||||
"arduino-ide-extension": "0.0.5",
|
"arduino-ide-extension": "0.0.5",
|
||||||
"arduino-debugger-extension": "0.0.5"
|
"arduino-debugger-extension": "0.0.5"
|
||||||
},
|
},
|
||||||
@@ -28,7 +29,7 @@
|
|||||||
},
|
},
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"prepare": "theia build --mode development",
|
"prepare": "theia build --mode development",
|
||||||
"start": "theia start",
|
"start": "theia start --plugins=local-dir:../plugins",
|
||||||
"watch": "theia build --watch --mode development"
|
"watch": "theia build --watch --mode development"
|
||||||
},
|
},
|
||||||
"theia": {
|
"theia": {
|
||||||
|
|||||||
10
electron/build/scripts/arduino-pro-ide-electron-main.js
Normal file
10
electron/build/scripts/arduino-pro-ide-electron-main.js
Normal file
@@ -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');
|
||||||
@@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"name": "arduino-pro-ide",
|
"name": "arduino-pro-ide",
|
||||||
"description": "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",
|
"author": "Arduino SA",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"arduino-ide-extension": "file:../working-copy/arduino-ide-extension",
|
"arduino-ide-extension": "file:../working-copy/arduino-ide-extension",
|
||||||
@@ -11,13 +11,15 @@
|
|||||||
"**/fs-extra": "^4.0.3"
|
"**/fs-extra": "^4.0.3"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
|
"@theia/cli": "next",
|
||||||
"electron-builder": "^21.2.0"
|
"electron-builder": "^21.2.0"
|
||||||
},
|
},
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"build": "theia build --mode development",
|
"build": "yarn download:plugins && theia build --mode development",
|
||||||
"build:release": "theia build --mode development",
|
"build:release": "yarn download:plugins && theia build --mode development",
|
||||||
"package": "electron-builder --publish=never",
|
"package": "electron-builder --publish=never",
|
||||||
"package:preview": "electron-builder --dir"
|
"package:preview": "electron-builder --dir",
|
||||||
|
"download:plugins": "theia download:plugins"
|
||||||
},
|
},
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">=10.10.0"
|
"node": ">=10.10.0"
|
||||||
@@ -45,8 +47,9 @@
|
|||||||
"buildResources": "resources"
|
"buildResources": "resources"
|
||||||
},
|
},
|
||||||
"files": [
|
"files": [
|
||||||
"src-gen/**/*",
|
"src-gen",
|
||||||
"lib/**/*",
|
"lib",
|
||||||
|
"scripts",
|
||||||
"!node_modules/**/*.{ts,map}",
|
"!node_modules/**/*.{ts,map}",
|
||||||
"!node_modules/**/*.spec.js",
|
"!node_modules/**/*.spec.js",
|
||||||
"!node_modules/@theia/**/test/*",
|
"!node_modules/@theia/**/test/*",
|
||||||
@@ -56,6 +59,12 @@
|
|||||||
"!node_modules/oniguruma/*",
|
"!node_modules/oniguruma/*",
|
||||||
"!node_modules/onigasm/*"
|
"!node_modules/onigasm/*"
|
||||||
],
|
],
|
||||||
|
"extraResources": [
|
||||||
|
{
|
||||||
|
"from": "plugins",
|
||||||
|
"to": "app/plugins"
|
||||||
|
}
|
||||||
|
],
|
||||||
"win": {
|
"win": {
|
||||||
"target": [
|
"target": [
|
||||||
"zip"
|
"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"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
19
package.json
19
package.json
@@ -2,26 +2,35 @@
|
|||||||
"name": "arduino-editor",
|
"name": "arduino-editor",
|
||||||
"version": "0.0.5",
|
"version": "0.0.5",
|
||||||
"description": "Arduino Pro IDE",
|
"description": "Arduino Pro IDE",
|
||||||
"main": "index.js",
|
|
||||||
"repository": "https://github.com/bcmi-labs/arduino-editor.git",
|
"repository": "https://github.com/bcmi-labs/arduino-editor.git",
|
||||||
"author": "Arduino SA",
|
"author": "Arduino SA",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"private": true,
|
"private": true,
|
||||||
"devDependencies": {
|
"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": {
|
"scripts": {
|
||||||
"prepare": "lerna run prepare",
|
"prepare": "lerna run prepare && yarn test && yarn download:plugins",
|
||||||
"rebuild:browser": "theia rebuild:browser",
|
"rebuild:browser": "theia rebuild:browser",
|
||||||
"rebuild:electron": "theia rebuild:electron",
|
"rebuild:electron": "theia rebuild:electron",
|
||||||
"start": "yarn --cwd ./browser-app start",
|
"start": "yarn --cwd ./browser-app start",
|
||||||
"watch": "lerna run watch --parallel",
|
"watch": "lerna run watch --parallel",
|
||||||
"test": "lerna run test"
|
"test": "lerna run test",
|
||||||
|
"download:plugins": "theia download:plugins"
|
||||||
},
|
},
|
||||||
"workspaces": [
|
"workspaces": [
|
||||||
"arduino-ide-extension",
|
"arduino-ide-extension",
|
||||||
"arduino-debugger-extension",
|
"arduino-debugger-extension",
|
||||||
"electron-app",
|
"electron-app",
|
||||||
"browser-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"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user