Compare commits

...

59 Commits

Author SHA1 Message Date
Akos Kitta
83e966d208 Merge pull request #40 from bcmi-labs/arduino-cli
Switched to the official `arduino-cli`.
2019-07-25 09:57:13 +02:00
Luca Cipriani
5cc75118cd Merge pull request #30 from bcmi-labs/PROEDITOR-19
PROEDITOR-19: Open new sketches in new windows
2019-07-25 09:21:15 +02:00
Akos Kitta
19f058cb7f Run the Board.List requests sequentially.
Signed-off-by: Akos Kitta <kittaakos@typefox.io>
2019-07-25 08:50:05 +02:00
Akos Kitta
7494beca33 Switched to the official arduino-cli.
Signed-off-by: Akos Kitta <kittaakos@typefox.io>
2019-07-25 07:58:00 +02:00
Sven Efftinge
835107b5a6 [styling] use arduino theme background color from start 2019-07-24 15:00:01 +00:00
jbicker
4ced8237f7 Merge branch 'sketch-loader-bug-fix' 2019-07-24 16:50:52 +02:00
Jan Bicker
40eb74aeff Merge pull request #39 from bcmi-labs/sketch-loader-bug-fix-win
[win] Open sketch.
2019-07-24 07:48:50 -07:00
Jan Bicker
457b283ca5 Use theia main menu factory for electron again. 2019-07-24 07:47:02 -07:00
Akos Kitta
c0e279f3e8 [win] Open sketch.
Signed-off-by: Akos Kitta <kittaakos@typefox.io>
2019-07-23 21:35:06 +02:00
jbicker
75f7d3ca7c Fixed sketch service 2019-07-23 16:42:25 +02:00
Jan Bicker
cd8c138e1e Merge pull request #38 from bcmi-labs/status-bar-contribution
Added status bar contribution for line number and selected board.
2019-07-23 16:19:38 +02:00
jbicker
c0dea5c6b7 Added status bar contribution for line number and selected board.
Signed-off-by: jbicker <jan.bicker@typefox.io>
2019-07-23 15:39:38 +02:00
Akos Kitta
c45e85eb89 PROEDITOR-19: Open new sketches in new windows
- From now on, each new sketch has its own window.
 - Fixed the `Download (of)? X completed` logging during index update.
 - Validate the file before opening the sketch in new window.

Signed-off-by: Akos Kitta <kittaakos@typefox.io>
2019-07-23 08:25:49 +02:00
Akos Kitta
87cf5c6fd7 Merge pull request #34 from bcmi-labs/PROEDITOR-7
PROEDITOR-7: Cloned the Library Manager layout.
2019-07-22 16:46:18 +02:00
jbicker
0bfb4ba6ab Added noselect class to boards toolbar item
Signed-off-by: jbicker <jan.bicker@typefox.io>
2019-07-22 16:08:29 +02:00
Akos Kitta
8d838fcce4 PROEDITOR-7: Cloned the Library Manager layout.
To match with the official Arduino editor's UI.

Signed-off-by: Akos Kitta <kittaakos@typefox.io>
2019-07-22 15:52:08 +02:00
Luca Cipriani
cf44fe2ad0 Merge pull request #36 from bcmi-labs/board-select-dialog-ui-improvements
Improved layout of "Board Select" and "File Navigator" dialogs
2019-07-22 14:10:34 +02:00
jbicker
a6e1c4a93e Improved layout of "Board Select" and "File Navigator" dialogs
Signed-off-by: jbicker <jan.bicker@typefox.io>
2019-07-22 14:09:55 +02:00
Luca Cipriani
269f08b74d Merge pull request #37 from bcmi-labs/board-selector-toolbar-item
Board selector toolbar item
2019-07-22 14:03:13 +02:00
jbicker
4d2bd87f74 Implemented custom dropdown for board selection
Signed-off-by: jbicker <jan.bicker@typefox.io>
2019-07-22 11:06:54 +02:00
jbicker
c2fbccc9e8 App doesn't show "open..." anymore if there are no sketches in default sketch folder.
Opens file navigator directly instead.

Signed-off-by: jbicker <jan.bicker@typefox.io>
2019-07-18 13:49:28 +02:00
jbicker
6e0a0a19c5 Fixed Open Button
Signed-off-by: jbicker <jan.bicker@typefox.io>
2019-07-18 11:35:54 +02:00
jbicker
c88d8dd17b Small ui fix. Adapted css for browser menu active items.
Signed-off-by: jbicker <jan.bicker@typefox.io>
2019-07-18 10:08:49 +02:00
Jan Bicker
7dfb28975e Merge pull request #35 from bcmi-labs/ui-improvements
Ui improvements
2019-07-18 09:59:10 +02:00
jbicker
2d4c710b6a Syntax coloring
Signed-off-by: jbicker <jan.bicker@typefox.io>
2019-07-17 18:40:48 +02:00
jbicker
dfc2ef967a Colors adapted
Signed-off-by: jbicker <jan.bicker@typefox.io>
2019-07-15 15:56:45 +02:00
jbicker
e2d3c7c1bd Made buttons bigger
Signed-off-by: jbicker <jan.bicker@typefox.io>
2019-07-15 15:56:45 +02:00
Luca Cipriani
5a97a71d9b Merge pull request #32 from bcmi-labs/bring-back-menu
PROEDITOR-22: Brought back the menu.
2019-07-15 15:51:39 +02:00
jbicker
5e728523ef Changed layout of top panel in browser.
Signed-off-by: jbicker <jan.bicker@typefox.io>
2019-07-15 13:12:33 +02:00
jbicker
2a0273c771 Brought back the menu.
With a restricted set of items.

Signed-off-by: jbicker <jan.bicker@typefox.io>
2019-07-15 12:53:17 +02:00
Luca Cipriani
35086ca1a1 Merge pull request #31 from bcmi-labs/open-boards-dialog
PROEDITOR-9: Open boards dialog
2019-07-15 12:44:16 +02:00
jbicker
23446284b7 Toggle the selected board in dropdown
Signed-off-by: jbicker <jan.bicker@typefox.io>
2019-07-10 17:48:20 +02:00
jbicker
89fb2fddbd Cache attached boards
Signed-off-by: jbicker <jan.bicker@typefox.io>
2019-07-10 11:50:44 +02:00
jbicker
a039597d40 Select Board Dialog Style and Layout
Signed-off-by: jbicker <jan.bicker@typefox.io>
2019-07-09 18:31:08 +02:00
jbicker
4429094139 Styling of select board and port dialog
Signed-off-by: jbicker <jan.bicker@typefox.io>
2019-07-08 13:55:31 +02:00
jbicker
769689ff6d Added dialog implementation
Signed-off-by: jbicker <jan.bicker@typefox.io>
2019-07-08 11:58:59 +02:00
jbicker
4c66dec36e Added board select toolbar item
fill context menu with connected boards

Signed-off-by: jbicker <jan.bicker@typefox.io>
2019-06-26 14:08:45 +02:00
jbicker
ff336dccc5 Enhanced boards toolbar item.
Signed-off-by: jbicker <jan.bicker@typefox.io>
2019-06-26 09:03:26 +02:00
Jan Bicker
75ef8ea987 Merge pull request #27 from bcmi-labs/electron-4x-menu
Several UI enhancements
2019-06-26 09:02:14 +02:00
jbicker
1b90b7af29 Updated theia
Signed-off-by: jbicker <jan.bicker@typefox.io>
2019-06-26 08:43:38 +02:00
jbicker
c7c5ab57c2 Bugfix and yarn.lock update
Signed-off-by: jbicker <jan.bicker@typefox.io>
2019-06-25 17:37:58 +02:00
Akos Kitta
b7e17b5828 Updated to next (26c3273a) Theia.
Signed-off-by: Akos Kitta <kittaakos@typefox.io>
2019-06-25 08:47:58 +02:00
jbicker
6195da3858 Added boards toolbar item.
Signed-off-by: jbicker <jan.bicker@typefox.io>
2019-06-24 18:00:17 +02:00
jbicker
c54ae96a3c Overwritten EditorWidgetFactory, made editor widget not closable.
Signed-off-by: jbicker <jan.bicker@typefox.io>
2019-06-24 15:09:04 +02:00
jbicker
54d90d5413 Added save button and turned auto save on by default.
Signed-off-by: jbicker <jan.bicker@typefox.io>
2019-06-21 13:11:16 +02:00
jbicker
f4f7a9998e Small fixes
Signed-off-by: jbicker <jan.bicker@typefox.io>
2019-06-20 17:28:53 +02:00
jbicker
4096afde96 Open the sketch in a new window.
Signed-off-by: jbicker <jan.bicker@typefox.io>
2019-06-20 09:35:56 +02:00
jbicker
92afa48c05 Implemented possibility to open sketches via file navigator.
Signed-off-by: jbicker <jan.bicker@typefox.io>
2019-06-19 11:30:26 +02:00
jbicker
9d3cbf2ea0 Use service to load sketches
Signed-off-by: jbicker <jan.bicker@typefox.io>
2019-06-19 09:48:28 +02:00
jbicker
0c937212e2 Added Open Toolbutton
Signed-off-by: jbicker <jan.bicker@typefox.io>
2019-06-17 18:26:24 +02:00
Jan Bicker
7760915014 Merge pull request #23 from bcmi-labs/ui-changes
Ui changes
2019-06-17 09:36:26 +02:00
jbicker
f9746b350d Further customization of the statusbar
Signed-off-by: jbicker <jan.bicker@typefox.io>
2019-06-14 18:32:32 +02:00
jbicker
2066f20d78 Added the tooltip to the right of the toolbar
Signed-off-by: jbicker <jan.bicker@typefox.io>
2019-06-14 17:37:46 +02:00
jbicker
f5560626e5 Removed/hidden elements from bottom widget bar (Log output)
Signed-off-by: jbicker <jan.bicker@typefox.io>
2019-06-14 16:08:19 +02:00
jbicker
1f1861e1d8 Adapted design of toolbar.
Signed-off-by: jbicker <jan.bicker@typefox.io>
2019-06-14 15:39:03 +02:00
jbicker
6a956afbcd Added toolbar to top panel.
Signed-off-by: jbicker <jan.bicker@typefox.io>
2019-06-13 17:02:07 +02:00
jbicker
4c3becd3e8 Sidebar with Filenavigator, Librarylist and Boardlist does not get rendered initially anymore.
Signed-off-by: jbicker <jan.bicker@typefox.io>
2019-06-13 10:10:29 +02:00
jbicker
088951ae01 More color adapted
Signed-off-by: jbicker <jan.bicker@typefox.io>
2019-06-13 08:30:59 +02:00
jbicker
b7cf9e6755 Removed menu, changed colors
Signed-off-by: jbicker <jan.bicker@typefox.io>
2019-06-13 07:55:58 +02:00
101 changed files with 18457 additions and 12321 deletions

1
.gitignore vendored
View File

@@ -3,6 +3,7 @@ node_modules/
.node_modules/
lib/
build/
downloads/
!electron/build/
src-gen/
arduino-ide-*/webpack.config.js

6
.vscode/launch.json vendored
View File

@@ -4,6 +4,12 @@
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"type": "node",
"request": "launch",
"name": "Launch Node.js Program",
"program": "${file}"
},
{
"type": "node",
"request": "launch",

View File

@@ -31,7 +31,15 @@
"frontend": {
"config": {
"applicationName": "Arduino-PoC",
"defaultTheme": "arduino-theme"
"defaultTheme": "arduino-theme",
"preferences": {
"editor.autoSave": "on"
}
}
},
"generator": {
"config": {
"preloadTemplate": "<div class='theia-preload' style='background-color: rgb(237, 241, 242);'></div>"
}
}
}

View File

@@ -34,8 +34,16 @@
"frontend": {
"config": {
"applicationName": "Arduino-PoC",
"defaultTheme": "arduino-theme"
"defaultTheme": "arduino-theme",
"preferences": {
"editor.autoSave": "on"
}
}
}
},
"generator": {
"config": {
"preloadTemplate": "<div class='theia-preload' style='background-color: rgb(237, 241, 242);'></div>"
}
}
}

View File

@@ -8,6 +8,113 @@
"name": "Ino",
"scopeName": "source.ino",
"patterns": [
{
"include": "#special_block"
},
{
"include": "#strings"
},
{
"match": "\\b(friend|explicit|virtual|override|final|noexcept)\\b",
"name": "storage.modifier.cpp"
},
{
"match": "\\b(private:|protected:|public:)",
"name": "storage.modifier.cpp"
},
{
"match": "\\b(catch|operator|try|throw|using)\\b",
"name": "keyword.control.cpp"
},
{
"match": "\\bdelete\\b(\\s*\\[\\])?|\\bnew\\b(?!])",
"name": "keyword.control.cpp"
},
{
"match": "\\b(f|m)[A-Z]\\w*\\b",
"name": "variable.other.readwrite.member.cpp"
},
{
"match": "\\bthis\\b",
"name": "variable.language.this.cpp"
},
{
"match": "\\bnullptr\\b",
"name": "constant.language.cpp"
},
{
"match": "\\btemplate\\b\\s*",
"name": "storage.type.template.cpp"
},
{
"match": "\\b(const_cast|dynamic_cast|reinterpret_cast|static_cast)\\b\\s*",
"name": "keyword.operator.cast.cpp"
},
{
"match": "::",
"name": "punctuation.separator.namespace.access.cpp"
},
{
"match": "\\b(and|and_eq|bitand|bitor|compl|not|not_eq|or|or_eq|typeid|xor|xor_eq|alignof|alignas)\\b",
"name": "keyword.operator.cpp"
},
{
"match": "\\b(class|decltype|wchar_t|char16_t|char32_t)\\b",
"name": "storage.type.cpp"
},
{
"match": "\\b(constexpr|export|mutable|typename|thread_local)\\b",
"name": "storage.modifier.cpp"
},
{
"begin": "(?x)\n(?:\n ^ | # beginning of line\n (?:(?<!else|new|=)) # or word + space before name\n)\n((?:[A-Za-z_][A-Za-z0-9_]*::)*+~[A-Za-z_][A-Za-z0-9_]*) # actual name\n\\s*(\\() # opening bracket",
"beginCaptures": {
"1": {
"name": "entity.name.function.cpp"
},
"2": {
"name": "punctuation.definition.parameters.begin.c"
}
},
"end": "\\)",
"endCaptures": {
"0": {
"name": "punctuation.definition.parameters.end.c"
}
},
"name": "meta.function.destructor.cpp",
"patterns": [
{
"include": "$base"
}
]
},
{
"begin": "(?x)\n(?:\n ^ | # beginning of line\n (?:(?<!else|new|=)) # or word + space before name\n)\n((?:[A-Za-z_][A-Za-z0-9_]*::)*+~[A-Za-z_][A-Za-z0-9_]*) # actual name\n\\s*(\\() # opening bracket",
"beginCaptures": {
"1": {
"name": "entity.name.function.cpp"
},
"2": {
"name": "punctuation.definition.parameters.begin.c"
}
},
"end": "\\)",
"endCaptures": {
"0": {
"name": "punctuation.definition.parameters.end.c"
}
},
"name": "meta.function.destructor.prototype.cpp",
"patterns": [
{
"include": "$base"
}
]
},
{
"include": "source.c"
},
{
"include": "#preprocessor-rule-enabled"
},
@@ -321,6 +428,19 @@
"match": "((\\.)|(->))\\s*(([a-zA-Z_][a-zA-Z_0-9]*)\\b(?!\\s*\\())?"
},
"block": {
"begin": "\\{",
"beginCaptures": {
"0": {
"name": "punctuation.section.block.begin.bracket.curly.c"
}
},
"end": "\\}",
"endCaptures": {
"0": {
"name": "punctuation.section.block.end.bracket.curly.c"
}
},
"name": "meta.block.cpp",
"patterns": [
{
"begin": "{",
@@ -341,6 +461,9 @@
"include": "#block_innards"
}
]
},
{
"include": "$base"
}
]
},
@@ -706,6 +829,69 @@
"include": "#line_continuation_character"
}
]
},
{
"begin": "(u|u8|U|L)?\"",
"beginCaptures": {
"0": {
"name": "punctuation.definition.string.begin.cpp"
},
"1": {
"name": "meta.encoding.cpp"
}
},
"end": "\"",
"endCaptures": {
"0": {
"name": "punctuation.definition.string.end.cpp"
}
},
"name": "string.quoted.double.cpp",
"patterns": [
{
"match": "\\\\u\\h{4}|\\\\U\\h{8}",
"name": "constant.character.escape.cpp"
},
{
"match": "\\\\['\"?\\\\abfnrtv]",
"name": "constant.character.escape.cpp"
},
{
"match": "\\\\[0-7]{1,3}",
"name": "constant.character.escape.cpp"
},
{
"match": "\\\\x\\h+",
"name": "constant.character.escape.cpp"
},
{
"include": "source.c#string_placeholder"
}
]
},
{
"begin": "(u|u8|U|L)?R\"(?:([^ ()\\\\\\t]{0,16})|([^ ()\\\\\\t]*))\\(",
"beginCaptures": {
"0": {
"name": "punctuation.definition.string.begin.cpp"
},
"1": {
"name": "meta.encoding.cpp"
},
"3": {
"name": "invalid.illegal.delimiter-too-long.cpp"
}
},
"end": "\\)\\2(\\3)\"",
"endCaptures": {
"0": {
"name": "punctuation.definition.string.end.cpp"
},
"1": {
"name": "invalid.illegal.delimiter-too-long.cpp"
}
},
"name": "string.quoted.double.raw.cpp"
}
]
},
@@ -1954,6 +2140,233 @@
"include": "#block_innards"
}
]
},
"angle_brackets": {
"begin": "<",
"end": ">",
"name": "meta.angle-brackets.cpp",
"patterns": [
{
"include": "#angle_brackets"
},
{
"include": "$base"
}
]
},
"constructor": {
"patterns": [
{
"begin": "(?x)\n(?:^\\s*) # beginning of line\n((?!while|for|do|if|else|switch|catch|enumerate|r?iterate)[A-Za-z_][A-Za-z0-9_:]*) # actual name\n\\s*(\\() # opening bracket",
"beginCaptures": {
"1": {
"name": "entity.name.function.cpp"
},
"2": {
"name": "punctuation.definition.parameters.begin.c"
}
},
"end": "\\)",
"endCaptures": {
"0": {
"name": "punctuation.definition.parameters.end.c"
}
},
"name": "meta.function.constructor.cpp",
"patterns": [
{
"include": "$base"
}
]
},
{
"begin": "(?x)\n(:)\n(\n (?=\n \\s*[A-Za-z_][A-Za-z0-9_:]* # actual name\n \\s* (\\() # opening bracket\n )\n)",
"beginCaptures": {
"1": {
"name": "punctuation.definition.parameters.c"
}
},
"end": "(?=\\{)",
"name": "meta.function.constructor.initializer-list.cpp",
"patterns": [
{
"include": "$base"
}
]
}
]
},
"special_block": {
"patterns": [
{
"begin": "\\b(using)\\b\\s*(namespace)\\b\\s*((?:[_A-Za-z][_A-Za-z0-9]*\\b(::)?)*)",
"beginCaptures": {
"1": {
"name": "keyword.control.cpp"
},
"2": {
"name": "storage.type.cpp"
},
"3": {
"name": "entity.name.type.cpp"
}
},
"end": "(;)",
"name": "meta.using-namespace-declaration.cpp"
},
{
"begin": "\\b(namespace)\\b\\s*([_A-Za-z][_A-Za-z0-9]*\\b)?+",
"beginCaptures": {
"1": {
"name": "storage.type.cpp"
},
"2": {
"name": "entity.name.type.cpp"
}
},
"captures": {
"1": {
"name": "keyword.control.namespace.$2"
}
},
"end": "(?<=\\})|(?=(;|,|\\(|\\)|>|\\[|\\]|=))",
"name": "meta.namespace-block.cpp",
"patterns": [
{
"begin": "\\{",
"beginCaptures": {
"0": {
"name": "punctuation.definition.scope.cpp"
}
},
"end": "\\}",
"endCaptures": {
"0": {
"name": "punctuation.definition.scope.cpp"
}
},
"patterns": [
{
"include": "#special_block"
},
{
"include": "#constructor"
},
{
"include": "$base"
}
]
},
{
"include": "$base"
}
]
},
{
"begin": "\\b(class|struct)\\b\\s*([_A-Za-z][_A-Za-z0-9]*\\b)?+(\\s*:\\s*(public|protected|private)\\s*([_A-Za-z][_A-Za-z0-9]*\\b)((\\s*,\\s*(public|protected|private)\\s*[_A-Za-z][_A-Za-z0-9]*\\b)*))?",
"beginCaptures": {
"1": {
"name": "storage.type.cpp"
},
"2": {
"name": "entity.name.type.cpp"
},
"4": {
"name": "storage.type.modifier.cpp"
},
"5": {
"name": "entity.name.type.inherited.cpp"
},
"6": {
"patterns": [
{
"match": "(public|protected|private)",
"name": "storage.type.modifier.cpp"
},
{
"match": "[_A-Za-z][_A-Za-z0-9]*",
"name": "entity.name.type.inherited.cpp"
}
]
}
},
"end": "(?<=\\})|(?=(;|\\(|\\)|>|\\[|\\]|=))",
"name": "meta.class-struct-block.cpp",
"patterns": [
{
"include": "#angle_brackets"
},
{
"begin": "\\{",
"beginCaptures": {
"0": {
"name": "punctuation.section.block.begin.bracket.curly.cpp"
}
},
"end": "(\\})(\\s*\\n)?",
"endCaptures": {
"1": {
"name": "punctuation.section.block.end.bracket.curly.cpp"
},
"2": {
"name": "invalid.illegal.you-forgot-semicolon.cpp"
}
},
"patterns": [
{
"include": "#special_block"
},
{
"include": "#constructor"
},
{
"include": "$base"
}
]
},
{
"include": "$base"
}
]
},
{
"begin": "\\b(extern)(?=\\s*\")",
"beginCaptures": {
"1": {
"name": "storage.modifier.cpp"
}
},
"end": "(?<=\\})|(?=\\w)|(?=\\s*#\\s*endif\\b)",
"name": "meta.extern-block.cpp",
"patterns": [
{
"begin": "\\{",
"beginCaptures": {
"0": {
"name": "punctuation.section.block.begin.bracket.curly.c"
}
},
"end": "\\}|(?=\\s*#\\s*endif\\b)",
"endCaptures": {
"0": {
"name": "punctuation.section.block.end.bracket.curly.c"
}
},
"patterns": [
{
"include": "#special_block"
},
{
"include": "$base"
}
]
},
{
"include": "$base"
}
]
}
]
}
}
}

View File

@@ -16,23 +16,36 @@
"@theia/monaco": "next",
"@theia/outline-view": "next",
"@theia/workspace": "next",
"p-queue": "^5.0.0"
"@theia/navigator": "next",
"@theia/terminal": "next",
"@types/which": "^1.3.1",
"css-element-queries": "^1.2.0",
"p-queue": "^5.0.0",
"which": "^1.3.1"
},
"scripts": {
"generate-protoc": "./scripts/generate-protoc.sh && node ./scripts/patch-grpc-js.js",
"prepare": "yarn run clean && yarn run build",
"prepare": "yarn download-cli && yarn run clean && yarn run build",
"clean": "rimraf lib",
"download-cli": "node ./scripts/download-cli.js",
"generate-protocol": "node ./scripts/generate-protocol.js",
"lint": "tslint -c ./tslint.json --project ./tsconfig.json",
"build": "tsc && cp -rf src/node/cli-protocol lib/node && yarn lint",
"build": "tsc && ncp ./src/node/cli-protocol/ ./lib/node/cli-protocol/ && yarn lint",
"watch": "tsc -w"
},
"devDependencies": {
"@types/google-protobuf": "^3.2.7",
"decompress": "^4.2.0",
"decompress-tarbz2": "^4.1.1",
"decompress-unzip": "^4.0.1",
"download": "^7.1.0",
"grpc-tools": "^1.7.3",
"grpc_tools_node_protoc_ts": "^2.5.0",
"ncp": "^2.0.0",
"rimraf": "^2.6.1",
"shelljs": "^0.8.3",
"tslint": "^5.5.0",
"typescript": "2.9.1"
"typescript": "2.9.1",
"uuid": "^3.2.1",
"yargs": "^11.1.0"
},
"files": [
"lib",
@@ -44,6 +57,10 @@
{
"backend": "lib/node/arduino-backend-module",
"frontend": "lib/browser/arduino-frontend-module"
},
{
"frontend": "lib/browser/menu/browser-arduino-menu-module",
"frontendElectron": "lib/electron-browser/electron-arduino-menu-module"
}
]
}

View File

@@ -0,0 +1,117 @@
// @ts-check
// The links to the downloads as of today (11.08.) are the followings:
// - https://downloads.arduino.cc/arduino-cli/nightly/arduino-cli-nightly-latest-${FILE_NAME}
// - https://downloads.arduino.cc/arduino-cli/arduino-cli-latest-${FILE_NAME}
(async () => {
const DEFAULT_VERSION = 'nightly';
const os = require('os');
const fs = require('fs');
const path = require('path');
const shell = require('shelljs');
const download = require('download');
const decompress = require('decompress');
const unzip = require('decompress-unzip');
const untarbz = require('decompress-tarbz2');
process.on('unhandledRejection', (reason, _) => {
shell.echo(String(reason));
shell.exit(1);
throw reason;
});
process.on('uncaughtException', error => {
shell.echo(String(error));
shell.exit(1);
throw error;
});
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. Defaults to ${DEFAULT_VERSION}.`
})
.option('force-download', {
alias: 'fd',
default: false,
describe: `If set, this script force downloads the 'arduino-cli' even if it already exists on the file system.`
})
.version(false).parse();
const version = yargs['cli-version'];
const force = yargs['force-download'];
const { platform, arch } = process;
const build = path.join(__dirname, '..', 'build');
const downloads = path.join(__dirname, '..', 'downloads');
const cli = path.join(build, `arduino-cli${os.platform() === 'win32' ? '.exe' : ''}`);
if (fs.existsSync(cli) && !force) {
shell.echo(`The 'arduino-cli' already exists at ${cli}. Skipping download.`);
shell.exit(0);
}
if (!fs.existsSync(build)) {
if (shell.mkdir('-p', build).code !== 0) {
shell.echo('Could not create new directory.');
shell.exit(1);
}
}
if (shell.rm('-rf', cli, downloads).code !== 0) {
shell.exit(1);
}
const suffix = (() => {
switch (platform) {
case 'darwin': return 'macosx.zip';
case 'win32': return 'windows.zip';
case 'linux': {
switch (arch) {
case 'arm64': return 'linuxarm.tar.bz2';
case 'x32': return 'linux32.tar.bz2';
case 'x64': return 'linux64.tar.bz2';
default: return undefined;
}
}
default: return undefined;
}
})();
if (!suffix) {
shell.echo(`The CLI is not available for ${platform} ${arch}.`);
shell.exit(1);
}
const url = `https://downloads.arduino.cc/arduino-cli/${version === 'nightly' ? 'nightly/' : ''}arduino-cli-${version}-latest-${suffix}`;
shell.echo(`>>> Downloading 'arduino-cli' from '${url}'...`);
const data = await download(url);
shell.echo(`<<< Download succeeded.`);
shell.echo('>>> Decompressing CLI...');
const files = await decompress(data, downloads, {
plugins: [
unzip(),
untarbz()
]
});
shell.echo('<<< Decompressing succeeded.');
if (files.length !== 1) {
shell.echo('Error ocurred when decompressing the CLI.');
shell.exit(1);
}
if (shell.mv('-f', path.join(downloads, files[0].path), cli).code !== 0) {
shell.echo(`Could not move file to ${cli}.`);
shell.exit(1);
}
if (!fs.existsSync(cli)) {
shell.echo(`Could not find CLI at ${cli}.`);
shell.exit(1);
} else {
shell.echo('Done.');
}
})();

View File

@@ -1,43 +0,0 @@
#!/bin/bash
WORKDIR=/tmp/arduino-cli-protoc
echo "Working in $WORKDIR"
# this could be a Git submodule, but that feels to clunky for just building the protobuf stuff
mkdir -p $WORKDIR
pushd $WORKDIR
if [ ! -d arduino-cli ]; then
git clone https://github.com/typefox/arduino-cli
cd arduino-cli
git checkout daemon
cd -
mkdir -p go/src/github.com/arduino
ln -s $PWD/arduino-cli go/src/github.com/arduino
export GOPATH=$PWD/go
cd go/src/github.com/arduino/arduino-cli
GOOS=linux go build -o arduino-cli.linux
# GOOS=darwin go build -o arduino-cli.darwin
fi
popd
# make sure the output path exists
mkdir -p src/node/cli-protocol
export PATH=$PATH:$PWD/node_modules/.bin
# generate js codes via grpc-tools
grpc_tools_node_protoc \
--js_out=import_style=commonjs,binary:./src/node/cli-protocol \
--grpc_out=./src/node/cli-protocol \
--plugin=protoc-gen-grpc=`which grpc_tools_node_protoc_plugin` \
-I /usr/lib/protoc/include \
-I $WORKDIR/arduino-cli/rpc \
$WORKDIR/arduino-cli/rpc/*.proto
# generate d.ts codes
protoc \
--plugin=protoc-gen-ts=./node_modules/.bin/protoc-gen-ts \
--ts_out=./src/node/cli-protocol \
-I /usr/lib/protoc/include \
-I $WORKDIR/arduino-cli/rpc \
$WORKDIR/arduino-cli/rpc/*.proto

View File

@@ -0,0 +1,81 @@
// @ts-check
(async () => {
const DEFAULT_VERSION = 'nightly'; // '0.3.7-alpha.preview';
const os = require('os');
const path = require('path');
const { v4 } = require('uuid');
const shell = require('shelljs');
shell.env.PATH = `${shell.env.PATH}${path.delimiter}${path.join(__dirname, '..', 'node_modules', '.bin')}`;
const yargs = require('yargs')
.option('cli-version', {
alias: 'cv',
default: DEFAULT_VERSION,
choices: [
// 'latest', // TODO: How do we get the source for `latest`. Currently, `latest` is the `0.3.7-alpha.preview`.
'nightly'
],
describe: `The version of the 'arduino-cli' to download. Specify either an existing version or use 'nightly'. Defaults to ${DEFAULT_VERSION}.`
})
.version(false).parse();
const version = yargs['cli-version'];
if (version !== 'nightly') {
shell.echo(`Only 'nightly' version is supported.`);
shell.exit(1);
}
const repository = path.join(os.tmpdir(), `${v4()}-arduino-cli`);
if (shell.mkdir('-p', repository).code !== 0) {
shell.exit(1);
}
if (shell.exec(`git clone https://github.com/arduino/arduino-cli.git ${repository}`).code !== 0) {
shell.exit(1);
}
if (version !== 'nightly') {
if (shell.exec(`git -C ${repository} checkout tags/${version} -b ${version}`).code !== 0) {
shell.exit(1);
}
}
shell.echo('Generating TS/JS API from:');
if (shell.exec(`git -C ${repository} rev-parse --abbrev-ref HEAD`).code !== 0) {
shell.exit(1);
}
if (shell.exec(`git -C ${repository} rev-parse --short HEAD`).code !== 0) {
shell.exit(1);
}
const pluginExec = shell.which('grpc_tools_node_protoc_plugin');
if (!pluginExec || pluginExec.code !== 0) {
shell.exit(1);
}
const plugin = pluginExec.stdout.trim();
const rpc = path.join(repository, 'rpc');
const out = path.join(__dirname, '..', 'src', 'node', 'cli-protocol');
// Generate JS code from the `.proto` files.
if (shell.exec(`grpc_tools_node_protoc \
--js_out=import_style=commonjs,binary:${out} \
--grpc_out=${out} \
--plugin=protoc-gen-grpc=${plugin} \
-I ${rpc} \
${path.join(rpc, '/**/*.proto')}`).code !== 0) {
shell.exit(1);
}
// Generate the `.d.ts` files for JS.
if (shell.exec(`protoc \
--plugin=protoc-gen-ts=${path.resolve(__dirname, '..', 'node_modules', '.bin', 'protoc-gen-ts')} \
--ts_out=${out} \
-I ${rpc} \
${path.join(rpc, '/**/*.proto')}`).code !== 0) {
shell.exit(1);
}
const { patch } = require('./patch-grpc-js');
patch([out])
shell.echo('Done.');
})();

View File

@@ -1,25 +1,38 @@
// Use `@grpc/grpc-js` instead of `grpc` at runtime.
// https://github.com/grpc/grpc-node/issues/624
(() => {
const fs = require('fs');
const path = require('path');
const roots = ['src']; // XXX: patch the `lib` instead?
console.info("🔧 >>> Patching code. Switching from 'grpc' to '@grpc/grpc-js'...");
for (const root of roots) {
const cliProtocolPath = path.resolve(__dirname, '..', root, 'node', 'cli-protocol');
for (const fileName of fs.readdirSync(cliProtocolPath)) {
const filePath = path.resolve(cliProtocolPath, fileName);
let content = fs.readFileSync(filePath, { encoding: 'utf8' });
if (content.indexOf("require('grpc')") !== -1) {
console.info(`Updated require('grpc') to require('@grpc/grpc-js') in ${filePath}.`);
fs.writeFileSync(filePath, content.replace("require('grpc')", "require('@grpc/grpc-js')"));
}
content = fs.readFileSync(filePath, { encoding: 'utf8' });
if (content.indexOf('import * as grpc from "grpc"') !== -1) {
console.info(`Updated import * as grpc from "grpc" to import * as grpc from "@grpc/grpc-js" in ${filePath}.`);
fs.writeFileSync(filePath, content.replace('import * as grpc from "grpc"', 'import * as grpc from "@grpc/grpc-js"'));
}
}
}
// https://github.com/grpc/grpc-node/issues/931
const fs = require('fs');
const path = require('path');
module.exports.patch = function (roots = [path.join(__dirname, '..', 'src', 'node')]) {
console.info('🔧 <<< Patching code...');
patch(roots);
console.info('👌 <<< Done. The code has been patched.');
})();
};
function patch(paths) {
for (const p of paths) {
const exist = fs.existsSync(p);
if (exist) {
const stat = fs.statSync(p);
if (stat.isDirectory()) {
console.info(`🔧 >>> Scanning code in ${p}...`);
patch(fs.readdirSync(p).map(name => path.join(p, name)));
} else {
let content = fs.readFileSync(p, { encoding: 'utf8' });
if (content.indexOf("require('grpc')") !== -1) {
console.info(`Updated require('grpc') to require('@grpc/grpc-js') in ${p}.`);
fs.writeFileSync(p, content.replace("require('grpc')", "require('@grpc/grpc-js')"));
}
content = fs.readFileSync(p, { encoding: 'utf8' });
if (content.indexOf('import * as grpc from "grpc"') !== -1) {
console.info(`Updated import * as grpc from "grpc" to import * as grpc from "@grpc/grpc-js" in ${p}.`);
fs.writeFileSync(p, content.replace('import * as grpc from "grpc"', 'import * as grpc from "@grpc/grpc-js"'));
}
}
} else {
console.warn(`${p} does not exist. Skipping.`);
}
}
}

View File

@@ -12,6 +12,23 @@ export namespace ArduinoCommands {
label: 'Upload Sketch'
}
export const SHOW_OPEN_CONTEXT_MENU: Command = {
id: 'arduino-show-open-context-menu',
label: 'Open Sketch'
}
export const OPEN_FILE_NAVIGATOR: Command = {
id: 'arduino-open-file-navigator'
}
export const OPEN_SKETCH: Command = {
id: 'arduino-open-file'
}
export const SAVE_SKETCH: Command = {
id: 'arduino-save-file'
}
export const NEW_SKETCH: Command = {
id: "arduino-new-sketch",
label: 'New Sketch',
@@ -23,4 +40,12 @@ export namespace ArduinoCommands {
label: "Refresh attached boards"
}
export const SELECT_BOARD: Command = {
id: "arduino-select-board"
}
export const OPEN_BOARDS_DIALOG: Command = {
id: "arduino-open-boards-dialog"
}
}

View File

@@ -1,15 +1,25 @@
import { injectable } from "inversify";
import { MenuContribution, MenuModelRegistry } from "@theia/core";
import { injectable, inject } from "inversify";
import { MenuContribution, MenuModelRegistry, MenuPath } from "@theia/core";
import { CommonMenus } from "@theia/core/lib/browser";
import { ArduinoCommands } from "./arduino-commands";
export namespace ArduinoToolbarContextMenu {
export const OPEN_SKETCH_PATH: MenuPath = ['arduino-open-sketch-context-menu'];
export const OPEN_GROUP: MenuPath = [...OPEN_SKETCH_PATH, '1_open'];
export const WS_SKETCHES_GROUP: MenuPath = [...OPEN_SKETCH_PATH, '2_sketches'];
export const EXAMPLE_SKETCHES_GROUP: MenuPath = [...OPEN_SKETCH_PATH, '3_examples'];
}
@injectable()
export class ArduinoFileMenuContribution implements MenuContribution {
export class ArduinoToolbarMenuContribution implements MenuContribution {
constructor(
@inject(MenuModelRegistry) protected readonly menuRegistry: MenuModelRegistry) {
}
registerMenus(registry: MenuModelRegistry) {
registry.registerMenuAction([...CommonMenus.FILE, '0_new_sletch'], {
commandId: ArduinoCommands.NEW_SKETCH.id
})
}
}

View File

@@ -3,10 +3,9 @@ import { injectable, inject, postConstruct } from 'inversify';
import URI from '@theia/core/lib/common/uri';
import { EditorWidget } from '@theia/editor/lib/browser/editor-widget';
import { MessageService } from '@theia/core/lib/common/message-service';
import { CommandContribution, CommandRegistry } from '@theia/core/lib/common/command';
import { DefaultFrontendApplicationContribution } from '@theia/core/lib/browser/frontend-application';
import { CommandContribution, CommandRegistry, Command } from '@theia/core/lib/common/command';
import { TabBarToolbarContribution, TabBarToolbarRegistry } from '@theia/core/lib/browser/shell/tab-bar-toolbar';
import { BoardsService } from '../common/protocol/boards-service';
import { BoardsService, Board } from '../common/protocol/boards-service';
import { ArduinoCommands } from './arduino-commands';
import { ConnectedBoards } from './components/connected-boards';
import { CoreService } from '../common/protocol/core-service';
@@ -15,13 +14,34 @@ import { ToolOutputServiceClient } from '../common/protocol/tool-output-service'
import { QuickPickService } from '@theia/core/lib/common/quick-pick-service';
import { BoardsListWidgetFrontendContribution } from './boards/boards-widget-frontend-contribution';
import { BoardsNotificationService } from './boards-notification-service';
import { WorkspaceRootUriAwareCommandHandler } from '@theia/workspace/lib/browser/workspace-commands';
import { SelectionService } from '@theia/core';
import { WorkspaceRootUriAwareCommandHandler, WorkspaceCommands } from '@theia/workspace/lib/browser/workspace-commands';
import { SelectionService, MenuContribution, MenuModelRegistry, MAIN_MENU_BAR } from '@theia/core';
import { WorkspaceService } from '@theia/workspace/lib/browser/workspace-service';
import { SketchFactory } from './sketch-factory';
import { ArduinoToolbar } from './toolbar/arduino-toolbar';
import { EditorManager, EditorMainMenu } from '@theia/editor/lib/browser';
import { ContextMenuRenderer, OpenerService, Widget, StatusBar } from '@theia/core/lib/browser';
import { OpenFileDialogProps, FileDialogService } from '@theia/filesystem/lib/browser/file-dialog';
import { FileSystem, FileStat } from '@theia/filesystem/lib/common';
import { ArduinoToolbarContextMenu } from './arduino-file-menu';
import { Sketch, SketchesService } from '../common/protocol/sketches-service';
import { WindowService } from '@theia/core/lib/browser/window/window-service';
import { CommonCommands, CommonMenus } from '@theia/core/lib/browser/common-frontend-contribution';
import { FileSystemCommands } from '@theia/filesystem/lib/browser/filesystem-frontend-contribution';
import { FileDownloadCommands } from '@theia/filesystem/lib/browser/download/file-download-command-contribution';
import { MonacoMenus } from '@theia/monaco/lib/browser/monaco-menu';
import { TerminalMenus } from '@theia/terminal/lib/browser/terminal-frontend-contribution';
import { MaybePromise } from '@theia/core/lib/common/types';
import { SelectBoardDialog } from './boards/select-board-dialog';
import { BoardsToolBarItem } from './boards/boards-toolbar-item';
export namespace ArduinoMenus {
export const SKETCH = [...MAIN_MENU_BAR, '3_sketch'];
export const TOOLS = [...MAIN_MENU_BAR, '4_tools'];
}
@injectable()
export class ArduinoFrontendContribution extends DefaultFrontendApplicationContribution implements TabBarToolbarContribution, CommandContribution {
export class ArduinoFrontendContribution implements TabBarToolbarContribution, CommandContribution, MenuContribution {
@inject(MessageService)
protected readonly messageService: MessageService;
@@ -47,15 +67,55 @@ export class ArduinoFrontendContribution extends DefaultFrontendApplicationContr
@inject(BoardsNotificationService)
protected readonly boardsNotificationService: BoardsNotificationService;
@inject(WorkspaceService)
protected readonly workspaceService: WorkspaceService;
@inject(SelectionService)
protected readonly selectionService: SelectionService;
@inject(SketchFactory)
protected readonly sketchFactory: SketchFactory;
@inject(EditorManager)
protected readonly editorManager: EditorManager;
@inject(ContextMenuRenderer)
protected readonly contextMenuRenderer: ContextMenuRenderer;
@inject(FileDialogService)
protected readonly fileDialogService: FileDialogService;
@inject(FileSystem)
protected readonly fileSystem: FileSystem;
@inject(OpenerService)
protected readonly openerService: OpenerService;
@inject(WindowService)
protected readonly windowService: WindowService;
@inject(SketchesService)
protected readonly sketches: SketchesService;
@inject(SelectBoardDialog)
protected readonly selectBoardsDialog: SelectBoardDialog;
@inject(MenuModelRegistry)
protected readonly menuRegistry: MenuModelRegistry;
@inject(CommandRegistry)
protected readonly commands: CommandRegistry;
@inject(StatusBar)
protected readonly statusBar: StatusBar;
protected boardsToolbarItem: BoardsToolBarItem | null;
protected wsSketchCount: number = 0;
constructor(@inject(WorkspaceService) protected readonly workspaceService: WorkspaceService) {
this.workspaceService.onWorkspaceChanged(() => {
if (this.workspaceService.workspace) {
this.registerSketchesInMenu(this.menuRegistry);
}
})
}
@postConstruct()
protected async init(): Promise<void> {
@@ -68,33 +128,46 @@ export class ArduinoFrontendContribution extends DefaultFrontendApplicationContr
id: ArduinoCommands.VERIFY.id,
command: ArduinoCommands.VERIFY.id,
tooltip: 'Verify',
group: 'arduino',
text: '$(check)'
});
registry.registerItem({
id: ArduinoCommands.UPLOAD.id,
command: ArduinoCommands.UPLOAD.id,
tooltip: 'Upload',
group: 'arduino',
text: '$(arrow-right)'
});
registry.registerItem({
id: ArduinoCommands.SHOW_OPEN_CONTEXT_MENU.id,
command: ArduinoCommands.SHOW_OPEN_CONTEXT_MENU.id,
tooltip: 'Open',
text: '$(arrow-up)'
});
registry.registerItem({
id: ArduinoCommands.SAVE_SKETCH.id,
command: ArduinoCommands.SAVE_SKETCH.id,
tooltip: 'Save',
text: '$(arrow-down)'
});
registry.registerItem({
id: ConnectedBoards.TOOLBAR_ID,
render: () => <ConnectedBoards
boardsService={this.boardService}
render: () => <BoardsToolBarItem
key='boardsToolbarItem'
ref={ref => this.boardsToolbarItem = ref}
commands={this.commands}
statusBar={this.statusBar}
contextMenuRenderer={this.contextMenuRenderer}
boardsNotificationService={this.boardsNotificationService}
quickPickService={this.quickPickService}
onNoBoardsInstalled={this.onNoBoardsInstalled.bind(this)}
onUnknownBoard={this.onUnknownBoard.bind(this)} />,
isVisible: widget => this.isArduinoEditor(widget)
boardService={this.boardService} />,
isVisible: widget => this.isArduinoToolbar(widget)
})
}
registerCommands(registry: CommandRegistry): void {
registry.registerCommand(ArduinoCommands.VERIFY, {
isVisible: widget => this.isArduinoEditor(widget),
isEnabled: widget => this.isArduinoEditor(widget),
execute: async widget => {
isVisible: widget => this.isArduinoToolbar(widget),
isEnabled: widget => true,
execute: async () => {
const widget = this.getCurrentWidget();
if (widget instanceof EditorWidget) {
await widget.saveable.save();
}
@@ -112,9 +185,10 @@ export class ArduinoFrontendContribution extends DefaultFrontendApplicationContr
}
});
registry.registerCommand(ArduinoCommands.UPLOAD, {
isVisible: widget => this.isArduinoEditor(widget),
isEnabled: widget => this.isArduinoEditor(widget),
execute: async widget => {
isVisible: widget => this.isArduinoToolbar(widget),
isEnabled: widget => true,
execute: async () => {
const widget = this.getCurrentWidget();
if (widget instanceof EditorWidget) {
await widget.saveable.save();
}
@@ -131,6 +205,40 @@ export class ArduinoFrontendContribution extends DefaultFrontendApplicationContr
}
}
});
registry.registerCommand(ArduinoCommands.SHOW_OPEN_CONTEXT_MENU, {
isVisible: widget => this.isArduinoToolbar(widget),
isEnabled: widget => this.isArduinoToolbar(widget),
execute: async (widget: Widget, target: EventTarget) => {
if (this.wsSketchCount) {
const el = (target as HTMLElement).parentElement;
if (el) {
this.contextMenuRenderer.render(ArduinoToolbarContextMenu.OPEN_SKETCH_PATH, {
x: el.getBoundingClientRect().left,
y: el.getBoundingClientRect().top + el.offsetHeight
});
}
} else {
this.commands.executeCommand(ArduinoCommands.OPEN_FILE_NAVIGATOR.id);
}
}
});
registry.registerCommand(ArduinoCommands.OPEN_FILE_NAVIGATOR, {
isEnabled: () => true,
execute: () => this.doOpenFile()
})
registry.registerCommand(ArduinoCommands.OPEN_SKETCH, {
isEnabled: () => true,
execute: async (sketch: Sketch) => {
this.openSketchFilesInNewWindow(sketch.uri);
}
})
registry.registerCommand(ArduinoCommands.SAVE_SKETCH, {
isEnabled: widget => this.isArduinoToolbar(widget),
isVisible: widget => this.isArduinoToolbar(widget),
execute: async (sketch: Sketch) => {
registry.executeCommand(CommonCommands.SAVE_ALL.id);
}
})
registry.registerCommand(ArduinoCommands.NEW_SKETCH, new WorkspaceRootUriAwareCommandHandler(this.workspaceService, this.selectionService, {
execute: async uri => {
try {
@@ -148,31 +256,195 @@ export class ArduinoFrontendContribution extends DefaultFrontendApplicationContr
registry.registerCommand(ArduinoCommands.REFRESH_BOARDS, {
isEnabled: () => true,
execute: () => this.boardsNotificationService.notifyBoardsInstalled()
});
registry.registerCommand(ArduinoCommands.SELECT_BOARD, {
isEnabled: () => true,
execute: async (board: Board) => {
this.selectBoard(board);
}
})
registry.registerCommand(ArduinoCommands.OPEN_BOARDS_DIALOG, {
isEnabled: () => true,
execute: async () => {
const boardAndPort = await this.selectBoardsDialog.open();
if (boardAndPort && boardAndPort.board) {
this.selectBoard(boardAndPort.board);
}
}
})
}
private async onNoBoardsInstalled() {
const action = await this.messageService.info("You have no boards installed. Use the boards mangager to install one.", "Open Boards Manager");
if (!action) {
return;
protected async selectBoard(board: Board) {
await this.boardService.selectBoard(board);
if (this.boardsToolbarItem) {
this.boardsToolbarItem.setSelectedBoard(board);
}
}
this.boardsListWidgetFrontendContribution.openView({reveal: true});
registerMenus(registry: MenuModelRegistry) {
registry.unregisterMenuAction(FileSystemCommands.UPLOAD);
registry.unregisterMenuAction(FileDownloadCommands.DOWNLOAD);
registry.unregisterMenuAction(WorkspaceCommands.NEW_FILE);
registry.unregisterMenuAction(WorkspaceCommands.NEW_FOLDER);
registry.unregisterMenuAction(WorkspaceCommands.OPEN_FOLDER);
registry.unregisterMenuAction(WorkspaceCommands.OPEN_WORKSPACE);
registry.unregisterMenuAction(WorkspaceCommands.OPEN_RECENT_WORKSPACE);
registry.unregisterMenuAction(WorkspaceCommands.SAVE_WORKSPACE_AS);
registry.unregisterMenuAction(WorkspaceCommands.CLOSE);
registry.getMenu(MAIN_MENU_BAR).removeNode(this.getMenuId(MonacoMenus.SELECTION));
registry.getMenu(MAIN_MENU_BAR).removeNode(this.getMenuId(EditorMainMenu.GO));
registry.getMenu(MAIN_MENU_BAR).removeNode(this.getMenuId(TerminalMenus.TERMINAL));
registry.getMenu(MAIN_MENU_BAR).removeNode(this.getMenuId(CommonMenus.VIEW));
registry.getMenu(MAIN_MENU_BAR).removeNode(this.getMenuId(CommonMenus.HELP));
registry.registerSubmenu(ArduinoMenus.SKETCH, 'Sketch');
registry.registerMenuAction(ArduinoMenus.SKETCH, {
commandId: ArduinoCommands.VERIFY.id,
label: 'Verify/Compile',
order: '1'
});
registry.registerMenuAction(ArduinoMenus.SKETCH, {
commandId: ArduinoCommands.UPLOAD.id,
label: 'Upload',
order: '2'
});
registry.registerMenuAction(ArduinoToolbarContextMenu.OPEN_GROUP, {
commandId: ArduinoCommands.OPEN_FILE_NAVIGATOR.id,
label: 'Open...'
});
registry.registerSubmenu(ArduinoMenus.TOOLS, 'Tools');
}
private async onUnknownBoard() {
const action = await this.messageService.warn("There's a board connected for which you need to install software." +
" If this were not a PoC we would offer you the right package now.", "Open Boards Manager");
if (!action) {
return;
protected getMenuId(menuPath: string[]): string {
const index = menuPath.length - 1;
const menuId = menuPath[index];
return menuId;
}
this.boardsListWidgetFrontendContribution.openView({reveal: true});
protected registerSketchesInMenu(registry: MenuModelRegistry) {
this.getWorkspaceSketches().then(sketches => {
this.wsSketchCount = sketches.length;
sketches.forEach(sketch => {
const command: Command = {
id: 'openSketch' + sketch.name
}
this.commands.registerCommand(command, {
execute: () => this.commands.executeCommand(ArduinoCommands.OPEN_SKETCH.id, sketch)
});
registry.registerMenuAction(ArduinoToolbarContextMenu.WS_SKETCHES_GROUP, {
commandId: command.id,
label: sketch.name
});
})
})
}
private isArduinoEditor(maybeEditorWidget: any): boolean {
if (maybeEditorWidget instanceof EditorWidget) {
return maybeEditorWidget.editor.uri.toString().endsWith('.ino');
protected async getWorkspaceSketches(): Promise<Sketch[]> {
const sketches = this.sketches.getSketches(this.workspaceService.workspace);
return sketches;
}
protected async openSketchFilesInNewWindow(uri: string) {
const location = new URL(window.location.href);
location.searchParams.set('sketch', uri);
this.windowService.openNewWindow(location.toString());
}
async openSketchFiles(uri: string) {
const fileStat = await this.fileSystem.getFileStat(uri);
if (fileStat) {
const uris = await this.sketches.getSketchFiles(fileStat);
for (const uri of uris) {
this.editorManager.open(new URI(uri));
}
}
}
/**
* Opens a file after prompting the `Open File` dialog. Resolves to `undefined`, if
* - the workspace root is not set,
* - the file to open does not exist, or
* - it was not a file, but a directory.
*
* Otherwise, resolves to the URI of the file.
*/
protected async doOpenFile(): Promise<URI | undefined> {
const props: OpenFileDialogProps = {
title: WorkspaceCommands.OPEN_FILE.dialogLabel,
canSelectFolders: false,
canSelectFiles: true
};
const [rootStat] = await this.workspaceService.roots;
const destinationFileUri = await this.fileDialogService.showOpenDialog(props, rootStat);
if (destinationFileUri) {
const destinationFile = await this.fileSystem.getFileStat(destinationFileUri.toString());
if (destinationFile && !destinationFile.isDirectory) {
const message = await this.validate(destinationFile);
if (!message) {
await this.openSketchFilesInNewWindow(destinationFileUri.toString());
return destinationFileUri;
} else {
this.messageService.warn(message);
}
}
}
return undefined;
}
protected getCurrentWidget(): EditorWidget | undefined {
let widget = this.editorManager.currentEditor;
if (!widget) {
const visibleWidgets = this.editorManager.all.filter(w => w.isVisible);
if (visibleWidgets.length > 0) {
widget = visibleWidgets[0];
}
}
return widget;
}
/**
* Returns `undefined` if the `file` is valid. Otherwise, returns with the validation error message.
*/
protected validate(file: FileStat): MaybePromise<string | undefined> {
const uri = new URI(file.uri);
const path = uri.path;
const { name, ext, dir } = path;
if (ext !== '.ino') {
return "Only sketches with '.ino' extension can be opened.";
}
if (name !== dir.name) {
return `The file "${name}${ext}" needs to be inside a sketch folder named "${name}".`;
}
return undefined;
}
// private async onNoBoardsInstalled() {
// const action = await this.messageService.info("You have no boards installed. Use the boards manager to install one.", "Open Boards Manager");
// if (!action) {
// return;
// }
// this.boardsListWidgetFrontendContribution.openView({ reveal: true });
// }
// private async onUnknownBoard() {
// const action = await this.messageService.warn("There's a board connected for which you need to install software." +
// " If this were not a PoC we would offer you the right package now.", "Open Boards Manager");
// if (!action) {
// return;
// }
// this.boardsListWidgetFrontendContribution.openView({ reveal: true });
// }
private isArduinoToolbar(maybeToolbarWidget: any): boolean {
if (maybeToolbarWidget instanceof ArduinoToolbar) {
return true;
}
return false;
}

View File

@@ -5,13 +5,14 @@ import { CommandContribution } from '@theia/core/lib/common/command';
import { bindViewContribution } from '@theia/core/lib/browser/shell/view-contribution';
import { TabBarToolbarContribution } from '@theia/core/lib/browser/shell/tab-bar-toolbar';
import { WebSocketConnectionProvider } from '@theia/core/lib/browser/messaging/ws-connection-provider';
import { FrontendApplicationContribution } from '@theia/core/lib/browser/frontend-application'
import { FrontendApplicationContribution, FrontendApplication } from '@theia/core/lib/browser/frontend-application'
import { LanguageGrammarDefinitionContribution } from '@theia/monaco/lib/browser/textmate';
import { LibraryListWidget } from './library/library-list-widget';
import { ArduinoFrontendContribution } from './arduino-frontend-contribution';
import { ArduinoLanguageGrammarContribution } from './language/arduino-language-grammar-contribution';
import { LibraryService, LibraryServicePath } from '../common/protocol/library-service';
import { BoardsService, BoardsServicePath } from '../common/protocol/boards-service';
import { SketchesService, SketchesServicePath } from '../common/protocol/sketches-service';
import { LibraryListWidgetFrontendContribution } from './library/list-widget-frontend-contribution';
import { CoreService, CoreServicePath } from '../common/protocol/core-service';
import { BoardsListWidget } from './boards/boards-list-widget';
@@ -26,20 +27,45 @@ import { WorkspaceService } from '@theia/workspace/lib/browser/workspace-service
import { AWorkspaceService } from './arduino-workspace-service';
import { ThemeService } from '@theia/core/lib/browser/theming';
import { ArduinoTheme } from './arduino-theme';
import { ArduinoFileMenuContribution } from './arduino-file-menu';
import { ArduinoToolbarMenuContribution } from './arduino-file-menu';
import { MenuContribution } from '@theia/core';
import { SketchFactory } from './sketch-factory';
import { OutlineViewContribution } from '@theia/outline-view/lib/browser/outline-view-contribution';
import { SilentOutlineViewContribution } from './customization/silent-outline-contribution';
import { ProblemContribution } from '@theia/markers/lib/browser/problem/problem-contribution';
import { SilentProblemContribution } from './customization/silent-problem-contribution';
import { SilentNavigatorContribution } from './customization/silent-navigator-contribution';
import { FileNavigatorContribution } from '@theia/navigator/lib/browser/navigator-contribution';
import { ArduinoToolbarContribution } from './toolbar/arduino-toolbar-contribution';
import { OutputToolbarContribution } from '@theia/output/lib/browser/output-toolbar-contribution';
import { ArduinoOutputToolContribution } from './customization/silent-output-tool-contribution';
import { EditorContribution } from '@theia/editor/lib/browser/editor-contribution';
import { CustomEditorContribution } from './customization/custom-editor-contribution';
import { MonacoStatusBarContribution } from '@theia/monaco/lib/browser/monaco-status-bar-contribution';
import { SilentMonacoStatusBarContribution } from './customization/silent-monaco-status-bar-contribution';
import { ApplicationShell } from '@theia/core/lib/browser';
import { CustomApplicationShell } from './customization/custom-application-shell';
import { CustomFrontendApplication } from './customization/custom-frontend-application';
import { EditorWidgetFactory } from '@theia/editor/lib/browser/editor-widget-factory';
import { CustomEditorWidgetFactory } from './customization/custom-editor-widget-factory';
import { SelectBoardDialog, SelectBoardDialogProps } from './boards/select-board-dialog';
import { SelectBoardDialogWidget } from './boards/select-board-dialog-widget';
const ElementQueries = require('css-element-queries/src/ElementQueries');
export default new ContainerModule((bind: interfaces.Bind, unbind: interfaces.Unbind, isBound: interfaces.IsBound, rebind: interfaces.Rebind) => {
ElementQueries.listen();
ElementQueries.init();
// Commands and toolbar items
bind(ArduinoFrontendContribution).toSelf().inSingletonScope();
bind(CommandContribution).toService(ArduinoFrontendContribution);
bind(MenuContribution).toService(ArduinoFrontendContribution);
bind(TabBarToolbarContribution).toService(ArduinoFrontendContribution);
bind(MenuContribution).to(ArduinoFileMenuContribution).inSingletonScope();
bind(FrontendApplicationContribution).toService(ArduinoFrontendContribution);
bind(MenuContribution).to(ArduinoToolbarMenuContribution).inSingletonScope();
bind(ArduinoToolbarContribution).toSelf().inSingletonScope();
bind(FrontendApplicationContribution).toService(ArduinoToolbarContribution);
// `ino` TextMate grammar
bind(LanguageGrammarDefinitionContribution).to(ArduinoLanguageGrammarContribution).inSingletonScope();
@@ -56,6 +82,9 @@ export default new ContainerModule((bind: interfaces.Bind, unbind: interfaces.Un
}));
bind(FrontendApplicationContribution).toService(LibraryListWidgetFrontendContribution);
// Sketch list service
bind(SketchesService).toDynamicValue(context => WebSocketConnectionProvider.createProxy(context.container, SketchesServicePath)).inSingletonScope();
// Boards Notification service for updating boards list
// TODO (post-PoC): move this to boards service/backend
bind(BoardsNotificationService).toSelf().inSingletonScope();
@@ -72,6 +101,13 @@ export default new ContainerModule((bind: interfaces.Bind, unbind: interfaces.Un
}));
bind(FrontendApplicationContribution).toService(BoardsListWidgetFrontendContribution);
// Board select dialog
bind(SelectBoardDialogWidget).toSelf().inSingletonScope();
bind(SelectBoardDialog).toSelf().inSingletonScope();
bind(SelectBoardDialogProps).toConstantValue({
title: 'Select Board'
})
// Core service
bind(CoreService)
.toDynamicValue(context => WebSocketConnectionProvider.createProxy(context.container, CoreServicePath))
@@ -92,9 +128,11 @@ export default new ContainerModule((bind: interfaces.Bind, unbind: interfaces.Un
container.get(CoreService);
container.get(LibraryService);
container.get(BoardsService);
container.get(SketchesService);
return workspaceServiceExt;
});
bind(AWorkspaceService).toSelf().inSingletonScope();
rebind(WorkspaceService).to(AWorkspaceService).inSingletonScope();
bind(SketchFactory).toSelf().inSingletonScope();
@@ -106,4 +144,18 @@ export default new ContainerModule((bind: interfaces.Bind, unbind: interfaces.Un
bind(OutlineViewContribution).to(SilentOutlineViewContribution).inSingletonScope();
unbind(ProblemContribution);
bind(ProblemContribution).to(SilentProblemContribution).inSingletonScope();
unbind(FileNavigatorContribution);
bind(FileNavigatorContribution).to(SilentNavigatorContribution).inSingletonScope();
unbind(OutputToolbarContribution);
bind(OutputToolbarContribution).to(ArduinoOutputToolContribution).inSingletonScope();
unbind(EditorContribution);
bind(EditorContribution).to(CustomEditorContribution).inSingletonScope();
unbind(MonacoStatusBarContribution);
bind(MonacoStatusBarContribution).to(SilentMonacoStatusBarContribution).inSingletonScope();
unbind(ApplicationShell);
bind(ApplicationShell).to(CustomApplicationShell).inSingletonScope();
unbind(FrontendApplication);
bind(FrontendApplication).to(CustomFrontendApplication).inSingletonScope();
unbind(EditorWidgetFactory);
bind(EditorWidgetFactory).to(CustomEditorWidgetFactory).inSingletonScope();
});

View File

@@ -0,0 +1,243 @@
import * as React from 'react';
import { BoardsService, Board, AttachedSerialBoard } from '../../common/protocol/boards-service';
import { ContextMenuRenderer, StatusBar, StatusBarAlignment } from '@theia/core/lib/browser';
import { BoardsNotificationService } from '../boards-notification-service';
import { Command, CommandRegistry } from '@theia/core';
import { ArduinoCommands } from '../arduino-commands';
import ReactDOM = require('react-dom');
export interface BoardsDropdownItem {
label: string;
commandExecutor: () => void;
isSelected: () => boolean;
}
export interface BoardsDropDownListCoord {
top: number;
left: number;
width: number;
paddingTop: number;
}
export namespace BoardsDropdownItemComponent {
export interface Props {
label: string;
onClick: () => void;
isSelected: boolean;
}
}
export class BoardsDropdownItemComponent extends React.Component<BoardsDropdownItemComponent.Props> {
render() {
return <div className={`arduino-boards-dropdown-item ${this.props.isSelected ? 'selected' : ''}`} onClick={this.props.onClick}>
<div>{this.props.label}</div>
{this.props.isSelected ? <span className='fa fa-check'></span> : ''}
</div>;
}
}
export namespace BoardsDropDown {
export interface Props {
readonly coords: BoardsDropDownListCoord;
readonly isOpen: boolean;
readonly dropDownItems: BoardsDropdownItem[];
readonly openDialog: () => void;
}
}
export class BoardsDropDown extends React.Component<BoardsDropDown.Props> {
protected dropdownId: string = 'boards-dropdown-container';
protected dropdownElement: HTMLElement;
constructor(props: BoardsDropDown.Props) {
super(props);
let list = document.getElementById(this.dropdownId);
if (!list) {
list = document.createElement('div');
list.id = this.dropdownId;
document.body.appendChild(list);
this.dropdownElement = list;
}
}
render(): React.ReactNode {
return ReactDOM.createPortal(this.renderNode(), this.dropdownElement);
}
renderNode(): React.ReactNode {
if (this.props.isOpen) {
return <div className='arduino-boards-dropdown-list'
style={{
position: 'absolute',
top: this.props.coords.top,
left: this.props.coords.left,
width: this.props.coords.width,
paddingTop: this.props.coords.paddingTop
}}>
{
this.props.dropDownItems.map(item => {
return <React.Fragment key={item.label}>
<BoardsDropdownItemComponent isSelected={item.isSelected()} label={item.label} onClick={item.commandExecutor}></BoardsDropdownItemComponent>
</React.Fragment>;
})
}
<BoardsDropdownItemComponent isSelected={false} label={'Select Other Board & Port'} onClick={this.props.openDialog}></BoardsDropdownItemComponent>
</div>
} else {
return '';
}
}
}
export namespace BoardsToolBarItem {
export interface Props {
readonly contextMenuRenderer: ContextMenuRenderer;
readonly boardsNotificationService: BoardsNotificationService;
readonly boardService: BoardsService;
readonly commands: CommandRegistry;
readonly statusBar: StatusBar;
}
export interface State {
selectedBoard?: Board;
selectedIsAttached: boolean;
boardItems: BoardsDropdownItem[];
isOpen: boolean;
}
}
export class BoardsToolBarItem extends React.Component<BoardsToolBarItem.Props, BoardsToolBarItem.State> {
protected attachedBoards: Board[];
protected dropDownListCoord: BoardsDropDownListCoord;
constructor(props: BoardsToolBarItem.Props) {
super(props);
this.state = {
selectedBoard: undefined,
selectedIsAttached: true,
boardItems: [],
isOpen: false
};
document.addEventListener('click', () => {
this.setState({ isOpen: false });
});
}
componentDidMount() {
this.setAttachedBoards();
}
setSelectedBoard(board: Board) {
if (this.attachedBoards && this.attachedBoards.length) {
this.setState({ selectedIsAttached: !!this.attachedBoards.find(attachedBoard => attachedBoard.name === board.name) });
}
this.setState({ selectedBoard: board });
}
protected async setAttachedBoards() {
const { boards } = await this.props.boardService.getAttachedBoards();
this.attachedBoards = boards;
if (this.attachedBoards.length) {
await this.createBoardDropdownItems();
await this.props.boardService.selectBoard(this.attachedBoards[0]);
this.setSelectedBoard(this.attachedBoards[0]);
}
}
protected createBoardDropdownItems() {
const boardItems: BoardsDropdownItem[] = [];
this.attachedBoards.forEach(board => {
const { commands } = this.props;
const port = this.getPort(board);
const command: Command = {
id: 'selectBoard' + port
}
commands.registerCommand(command, {
execute: () => {
commands.executeCommand(ArduinoCommands.SELECT_BOARD.id, board);
this.setState({ isOpen: false, selectedBoard: board });
}
});
boardItems.push({
commandExecutor: () => commands.executeCommand(command.id),
label: board.name + ' at ' + port,
isSelected: () => this.doIsSelectedBoard(board)
});
});
this.setState({ boardItems });
}
protected doIsSelectedBoard = (board: Board) => this.isSelectedBoard(board);
protected isSelectedBoard(board: Board): boolean {
return AttachedSerialBoard.is(board) &&
!!this.state.selectedBoard &&
AttachedSerialBoard.is(this.state.selectedBoard) &&
board.port === this.state.selectedBoard.port &&
board.fqbn === this.state.selectedBoard.fqbn;
}
protected getPort(board: Board): string {
if (AttachedSerialBoard.is(board)) {
return board.port;
}
return '';
}
protected readonly doShowSelectBoardsMenu = (event: React.MouseEvent<HTMLElement>) => {
this.showSelectBoardsMenu(event);
event.stopPropagation();
event.nativeEvent.stopImmediatePropagation();
};
protected showSelectBoardsMenu(event: React.MouseEvent<HTMLElement>) {
const el = (event.currentTarget as HTMLElement);
if (el) {
this.dropDownListCoord = {
top: el.getBoundingClientRect().top,
left: el.getBoundingClientRect().left,
paddingTop: el.getBoundingClientRect().height,
width: el.getBoundingClientRect().width
}
this.setState({ isOpen: !this.state.isOpen });
}
}
render(): React.ReactNode {
const selectedBoard = this.state.selectedBoard;
const port = selectedBoard ? this.getPort(selectedBoard) : undefined;
const boardTxt = selectedBoard && `${selectedBoard.name}${port ? ' at ' + port : ''}` || '';
this.props.statusBar.setElement('arduino-selected-board', {
alignment: StatusBarAlignment.RIGHT,
text: boardTxt
});
return <React.Fragment>
<div className='arduino-boards-toolbar-item-container'>
<div className='arduino-boards-toolbar-item' title={boardTxt}>
<div className='inner-container' onClick={this.doShowSelectBoardsMenu}>
<span className={!selectedBoard || !this.state.selectedIsAttached ? 'fa fa-times notAttached' : ''}></span>
<div className='label noWrapInfo'>
<div className='noWrapInfo noselect'>
{selectedBoard ? boardTxt : 'no board selected'}
</div>
</div>
<span className='fa fa-caret-down caret'></span>
</div>
</div>
</div>
<BoardsDropDown
isOpen={this.state.isOpen}
coords={this.dropDownListCoord}
dropDownItems={this.state.boardItems}
openDialog={this.openDialog}>
</BoardsDropDown>
</React.Fragment>;
}
protected openDialog = () => {
this.props.commands.executeCommand(ArduinoCommands.OPEN_BOARDS_DIALOG.id);
this.setState({ isOpen: false });
};
}

View File

@@ -3,12 +3,14 @@ import { FrontendApplicationContribution } from '@theia/core/lib/browser/fronten
import { AbstractViewContribution } from '@theia/core/lib/browser/shell/view-contribution';
import { ListWidget } from './list-widget';
import { BoardsListWidget } from './boards-list-widget';
import { MenuModelRegistry } from '@theia/core';
import { ArduinoMenus } from '../arduino-frontend-contribution';
@injectable()
export abstract class ListWidgetFrontendContribution extends AbstractViewContribution<ListWidget> implements FrontendApplicationContribution {
async initializeLayout(): Promise<void> {
await this.openView();
// await this.openView();
}
}
@@ -16,6 +18,8 @@ export abstract class ListWidgetFrontendContribution extends AbstractViewContrib
@injectable()
export class BoardsListWidgetFrontendContribution extends ListWidgetFrontendContribution {
static readonly OPEN_MANAGER = `${BoardsListWidget.WIDGET_ID}:toggle`;
constructor() {
super({
widgetId: BoardsListWidget.WIDGET_ID,
@@ -24,9 +28,18 @@ export class BoardsListWidgetFrontendContribution extends ListWidgetFrontendCont
area: 'left',
rank: 600
},
toggleCommandId: `${BoardsListWidget.WIDGET_ID}:toggle`,
toggleCommandId: BoardsListWidgetFrontendContribution.OPEN_MANAGER,
toggleKeybinding: 'ctrlcmd+shift+b'
});
}
registerMenus(menus: MenuModelRegistry): void {
if (this.toggleCommand) {
menus.registerMenuAction(ArduinoMenus.TOOLS, {
commandId: this.toggleCommand.id,
label: 'Boards Manager...'
});
}
}
}

View File

@@ -6,6 +6,7 @@ import { WindowService } from '@theia/core/lib/browser/window/window-service';
import { FilterableListContainer } from '../components/component-list/filterable-list-container';
import { BoardsService, Board, BoardPackage } from '../../common/protocol/boards-service';
import { BoardsNotificationService } from '../boards-notification-service';
import { LibraryService } from '../../common/protocol/library-service';
@injectable()
export abstract class ListWidget extends ReactWidget {
@@ -55,7 +56,7 @@ export abstract class ListWidget extends ReactWidget {
getAttachedBoards: () => boardsServiceDelegate.getAttachedBoards(),
selectBoard: (board: Board) => boardsServiceDelegate.selectBoard(board),
getSelectBoard: () => boardsServiceDelegate.getSelectBoard(),
search: (options: { query?: string }) => boardsServiceDelegate.search(options),
search: (options: { query?: string, props?: LibraryService.Search.Props }) => boardsServiceDelegate.search(options),
install: async (item: BoardPackage) => {
await boardsServiceDelegate.install(item);
this.boardsNotificationService.notifyBoardsInstalled();

View File

@@ -0,0 +1,305 @@
import * as React from 'react';
import { ReactWidget } from '@theia/core/lib/browser';
import { injectable, inject } from 'inversify';
import { BoardsService, Board, BoardPackage, AttachedSerialBoard } from '../../common/protocol/boards-service';
import { BoardsNotificationService } from '../boards-notification-service';
import { Emitter, Event } from '@theia/core';
export interface BoardAndPortSelection {
board?: Board;
port?: string;
}
export namespace BoardAndPortSelectableItem {
export interface Props {
item: BoardAndPortSelection,
selected: boolean,
onSelect: (selection: BoardAndPortSelection) => void
}
}
export class BoardAndPortSelectableItem extends React.Component<BoardAndPortSelectableItem.Props> {
render(): React.ReactNode {
if (this.props.item.board || this.props.item.port) {
return <div onClick={this.select} className={`item ${this.props.selected ? 'selected' : ''}`}>
{this.props.item.board ? this.props.item.board.name : this.props.item.port}
{this.props.selected ? <i className='fa fa-check'></i> : ''}
</div>;
}
}
protected readonly select = (() => {
this.props.onSelect({ board: this.props.item.board, port: this.props.item.port })
}).bind(this);
}
export namespace BoardAndPortSelectionList {
export interface Props {
type: 'boards' | 'ports';
list: BoardAndPortSelection[];
onSelect: (selection: BoardAndPortSelection) => void;
}
export interface State {
selection: BoardAndPortSelection
}
}
export class BoardAndPortSelectionList extends React.Component<BoardAndPortSelectionList.Props, BoardAndPortSelectionList.State> {
constructor(props: BoardAndPortSelectionList.Props) {
super(props);
this.state = {
selection: {}
}
}
reset(): void {
this.setState({ selection: {} });
}
render(): React.ReactNode {
return <div className={`${this.props.type} list`}>
{this.props.list.map(item => <BoardAndPortSelectableItem
key={item.board ? item.board.name : item.port}
onSelect={this.doSelect}
item={item}
selected={this.isSelectedItem(item)}
/>)}
</div>
}
protected readonly doSelect = (boardAndPortSelection: BoardAndPortSelection) => {
this.setState({ selection: boardAndPortSelection });
this.props.onSelect(boardAndPortSelection);
}
protected readonly isSelectedItem = ((item: BoardAndPortSelection) => {
if (this.state.selection.board) {
return (this.state.selection.board === item.board);
} else if (this.state.selection.port) {
return (this.state.selection.port === item.port);
}
return false;
});
protected readonly isSelectedPort = ((port: string) => {
return (this.state.selection.port && this.state.selection.port === port) || false;
});
}
export namespace BoardAndPortSelectionComponent {
export interface Props {
boardsService: BoardsService;
onSelect: (selection: BoardAndPortSelection) => void;
}
export interface State {
boards: Board[];
ports: string[];
selection: BoardAndPortSelection;
}
}
export class BoardAndPortSelectionComponent extends React.Component<BoardAndPortSelectionComponent.Props, BoardAndPortSelectionComponent.State> {
protected allBoards: Board[] = [];
protected boardListComponent: BoardAndPortSelectionList | null;
protected portListComponent: BoardAndPortSelectionList | null;
constructor(props: BoardAndPortSelectionComponent.Props) {
super(props);
this.state = {
boards: [],
ports: [],
selection: {}
}
}
componentDidMount() {
this.searchAvailableBoards();
this.setPorts();
}
reset(): void {
if (this.boardListComponent) {
this.boardListComponent.reset();
}
if (this.portListComponent) {
this.portListComponent.reset();
}
this.setState({ selection: {} });
}
render(): React.ReactNode {
return <React.Fragment>
<div className='body'>
<div className='left container'>
<div className='content'>
<div className='title'>
BOARDS
</div>
<div className='search'>
<input type='search' placeholder='SEARCH BOARD' onChange={this.doFilter} />
<i className='fa fa-search'></i>
</div>
<BoardAndPortSelectionList
ref={ref => { this.boardListComponent = ref }}
type='boards'
onSelect={this.doSelect}
list={this.state.boards.map<BoardAndPortSelection>(board => ({ board }))} />
</div>
</div>
<div className='right container'>
<div className='content'>
<div className='title'>
PORTS
</div>
{
this.state.ports.length ?
<BoardAndPortSelectionList
ref={ref => { this.portListComponent = ref }}
type='ports'
onSelect={this.doSelect}
list={this.state.ports.map<BoardAndPortSelection>(port => ({ port }))} /> : 'loading ports...'
}
</div>
</div>
</div>
</React.Fragment>
}
protected sort(items: Board[]): Board[] {
return items.sort((a, b) => {
if (a.name < b.name) {
return -1;
} else if (a.name === b.name) {
return 0;
} else {
return 1;
}
});
}
protected readonly doSelect = (boardAndPortSelection: BoardAndPortSelection) => {
const selection = this.state.selection;
if (boardAndPortSelection.board) {
selection.board = boardAndPortSelection.board;
}
if (boardAndPortSelection.port) {
selection.port = boardAndPortSelection.port;
}
this.setState({ selection });
this.props.onSelect(this.state.selection);
}
protected readonly doFilter = (event: React.ChangeEvent<HTMLInputElement>) => {
const boards = this.allBoards.filter(board => board.name.toLowerCase().indexOf(event.target.value.toLowerCase()) >= 0);
this.setState({ boards })
}
protected async searchAvailableBoards() {
const boardPkg = await this.props.boardsService.search({});
const boards = [].concat.apply([], boardPkg.items.map<Board[]>(item => item.boards)) as Board[];
this.allBoards = this.sort(boards);
this.setState({ boards: this.allBoards });
}
protected async setPorts() {
const ports: string[] = [];
const { boards } = await this.props.boardsService.getAttachedBoards();
boards.forEach(board => {
if (AttachedSerialBoard.is(board)) {
ports.push(board.port);
}
});
this.setState({ ports });
}
}
@injectable()
export class SelectBoardDialogWidget extends ReactWidget {
@inject(BoardsService)
protected readonly boardsService: BoardsService;
@inject(BoardsNotificationService)
protected readonly boardsNotificationService: BoardsNotificationService;
protected readonly onChangedEmitter = new Emitter<BoardAndPortSelection>();
protected boardAndPortSelectionComponent: BoardAndPortSelectionComponent | null;
protected attachedBoards: Promise<{ boards: Board[] }>;
boardAndPort: BoardAndPortSelection = {};
constructor() {
super();
this.id = 'select-board-dialog';
this.toDispose.push(this.onChangedEmitter);
}
get onChanged(): Event<BoardAndPortSelection> {
return this.onChangedEmitter.event;
}
reset(): void {
if (this.boardAndPortSelectionComponent) {
this.boardAndPortSelectionComponent.reset();
}
this.boardAndPort = {};
}
setAttachedBoards(attachedBoards: Promise<{ boards: Board[] }>): void {
this.attachedBoards = attachedBoards;
}
protected fireChanged(boardAndPort: BoardAndPortSelection): void {
this.onChangedEmitter.fire(boardAndPort);
}
protected render(): React.ReactNode {
let content: React.ReactNode;
const boardsServiceDelegate = this.boardsService;
const attachedBoards = this.attachedBoards;
const boardsService: BoardsService = {
getAttachedBoards: () => attachedBoards,
selectBoard: (board: Board) => boardsServiceDelegate.selectBoard(board),
getSelectBoard: () => boardsServiceDelegate.getSelectBoard(),
search: (options: { query?: string }) => boardsServiceDelegate.search(options),
install: async (item: BoardPackage) => {
await boardsServiceDelegate.install(item);
this.boardsNotificationService.notifyBoardsInstalled();
}
}
content = <React.Fragment>
<div className='selectBoardContainer'>
<div className='head'>
<div className='title'>
Select Other Board &amp; Port
</div>
<div className='text'>
<p>Select both a BOARD and a PORT if you want to upload a sketch.</p>
<p>If you only select a BOARD you will be able just to compile,</p>
<p>but not to upload your sketch.</p>
</div>
</div>
<BoardAndPortSelectionComponent
ref={ref => this.boardAndPortSelectionComponent = ref}
boardsService={boardsService}
onSelect={this.onSelect} />
</div>
</React.Fragment>
return content;
}
protected readonly onSelect = (selection: BoardAndPortSelection) => { this.doOnSelect(selection) };
protected doOnSelect(selection: BoardAndPortSelection) {
this.boardAndPort = selection;
this.fireChanged(this.boardAndPort);
}
}

View File

@@ -0,0 +1,113 @@
import { AbstractDialog, DialogProps, Widget, Panel, DialogError } from '@theia/core/lib/browser';
import { injectable, inject } from 'inversify';
import { SelectBoardDialogWidget, BoardAndPortSelection } from './select-board-dialog-widget';
import { Message } from '@phosphor/messaging';
import { Disposable } from '@theia/core';
import { Board, BoardsService, AttachedSerialBoard } from '../../common/protocol/boards-service';
@injectable()
export class SelectBoardDialogProps extends DialogProps {
}
@injectable()
export class SelectBoardDialog extends AbstractDialog<BoardAndPortSelection> {
protected readonly dialogPanel: Panel;
protected attachedBoards: Board[];
constructor(
@inject(SelectBoardDialogProps) protected readonly props: SelectBoardDialogProps,
@inject(SelectBoardDialogWidget) protected readonly widget: SelectBoardDialogWidget,
@inject(BoardsService) protected readonly boardService: BoardsService
) {
super({ title: props.title });
this.dialogPanel = new Panel();
this.dialogPanel.addWidget(this.widget);
this.contentNode.classList.add('select-board-dialog');
this.toDispose.push(this.widget.onChanged(() => this.update()));
this.toDispose.push(this.dialogPanel);
this.attachedBoards = [];
this.init();
this.appendCloseButton('CANCEL');
this.appendAcceptButton('OK');
}
protected init() {
const boards = this.boardService.getAttachedBoards();
boards.then(b => this.attachedBoards = b.boards);
this.widget.setAttachedBoards(boards);
}
protected onAfterAttach(msg: Message): void {
Widget.attach(this.dialogPanel, this.contentNode);
this.toDisposeOnDetach.push(Disposable.create(() => {
Widget.detach(this.dialogPanel);
}))
super.onAfterAttach(msg);
this.update();
}
protected onUpdateRequest(msg: Message) {
super.onUpdateRequest(msg);
this.widget.update();
}
protected onActivateRequest(msg: Message): void {
this.widget.activate();
}
protected handleEnter(event: KeyboardEvent): boolean | void {
if (event.target instanceof HTMLTextAreaElement) {
return false;
}
}
protected isValid(value: BoardAndPortSelection): DialogError {
if (!value.board) {
if (value.port) {
return 'Please pick the Board connected to the Port you have selected';
}
return false;
}
return '';
}
get value(): BoardAndPortSelection {
const boardAndPortSelection = this.widget.boardAndPort;
if (this.attachedBoards.length) {
boardAndPortSelection.board = this.attachedBoards.find(b => {
const isAttachedBoard = !!boardAndPortSelection.board &&
b.name === boardAndPortSelection.board.name &&
b.fqbn === boardAndPortSelection.board.fqbn;
if (boardAndPortSelection.port) {
return isAttachedBoard &&
AttachedSerialBoard.is(b) &&
b.port === boardAndPortSelection.port;
} else {
return isAttachedBoard;
}
})
|| boardAndPortSelection.board;
}
return boardAndPortSelection;
}
close(): void {
this.widget.reset();
super.close();
}
onAfterDetach(msg: Message) {
this.widget.reset();
super.onAfterDetach(msg);
}
}

View File

@@ -4,7 +4,7 @@ import { ArduinoComponent } from '../../../common/protocol/arduino-component';
export class ComponentListItem extends React.Component<ComponentListItem.Props> {
private onClick = (event: React.SyntheticEvent<HTMLAnchorElement, Event>) => {
protected onClick = (event: React.SyntheticEvent<HTMLAnchorElement, Event>) => {
const { target } = event.nativeEvent;
if (target instanceof HTMLAnchorElement) {
this.props.windowService.openNewWindow(target.href);
@@ -12,7 +12,7 @@ export class ComponentListItem extends React.Component<ComponentListItem.Props>
}
}
private async install(item: ArduinoComponent) {
protected async install(item: ArduinoComponent): Promise<void> {
await this.props.install(item);
}

View File

@@ -5,12 +5,26 @@ import { ArduinoComponent } from '../../../common/protocol/arduino-component';
export class ComponentList extends React.Component<ComponentList.Props> {
protected container?: HTMLElement;
render(): React.ReactNode {
return <div>
{this.props.items.map(item => <ComponentListItem key={item.name} item={item} windowService={this.props.windowService} install={this.props.install} />)}
return <div
className={'items-container'}
ref={element => this.container = element || undefined}>
{this.props.items.map(item => this.createItem(item))}
</div>;
}
componentDidMount(): void {
if (this.container && this.props.resolveContainer) {
this.props.resolveContainer(this.container);
}
}
protected createItem(item: ArduinoComponent): React.ReactNode {
return <ComponentListItem key={item.name} item={item} windowService={this.props.windowService} install={this.props.install} />
}
}
export namespace ComponentList {
@@ -19,6 +33,7 @@ export namespace ComponentList {
readonly items: ArduinoComponent[];
readonly windowService: WindowService;
readonly install: (comp: ArduinoComponent) => Promise<void>;
readonly resolveContainer?: (element: HTMLElement) => void;
}
}

View File

@@ -1,7 +1,8 @@
import * as React from 'react';
import { WindowService } from '@theia/core/lib/browser/window/window-service';
import { ComponentList } from './component-list';
import { SearchBar } from './search-bar';
import { ComponentList } from './component-list';
import { LibraryService } from '../../../common/protocol/library-service';
import { ArduinoComponent } from '../../../common/protocol/arduino-component';
import { InstallationProgressDialog } from '../installation-progress-dialog';
@@ -21,21 +22,37 @@ export class FilterableListContainer extends React.Component<FilterableListConta
}
render(): React.ReactNode {
return <div className={FilterableListContainer.Styles.FILTERABLE_LIST_CONTAINER_CLASS}>
<SearchBar
filterText={this.state.filterText}
onFilterTextChanged={this.handleFilterTextChange}
/>
<ComponentList
items={this.state.items}
install={this.install.bind(this)}
windowService={this.props.windowService}
/>
return <div className={'filterable-list-container'}>
{this.renderSearchFilter()}
{this.renderSearchBar()}
{this.renderComponentList()}
</div>
}
protected renderSearchFilter(): React.ReactNode {
return undefined;
}
protected renderSearchBar(): React.ReactNode {
return <SearchBar
resolveFocus={this.props.resolveFocus}
filterText={this.state.filterText}
onFilterTextChanged={this.handleFilterTextChange}
/>
}
protected renderComponentList(): React.ReactNode {
return <ComponentList
items={this.state.items}
install={this.install.bind(this)}
windowService={this.props.windowService}
resolveContainer={this.props.resolveContainer}
/>
}
private handleFilterTextChange(filterText: string): void {
this.props.service.search({ query: filterText }).then(result => {
const { props } = this.state;
this.props.service.search({ query: filterText, props }).then(result => {
const { items } = result;
this.setState({
filterText,
@@ -45,15 +62,7 @@ export class FilterableListContainer extends React.Component<FilterableListConta
}
protected sort(items: ArduinoComponent[]): ArduinoComponent[] {
return items.sort((a, b) => {
if (a.name < b.name) {
return -1;
} else if (a.name === b.name) {
return 0;
} else {
return 1;
}
});
return items.sort((left, right) => left.name.localeCompare(right.name));
}
protected async install(comp: ArduinoComponent): Promise<void> {
@@ -61,7 +70,8 @@ export class FilterableListContainer extends React.Component<FilterableListConta
dialog.open();
try {
await this.props.service.install(comp);
const { items } = await this.props.service.search({ query: this.state.filterText });
const { props } = this.state;
const { items } = await this.props.service.search({ query: this.state.filterText, props });
this.setState({ items: this.sort(items) });
} finally {
dialog.close();
@@ -75,19 +85,18 @@ export namespace FilterableListContainer {
export interface Props {
readonly service: ComponentSource;
readonly windowService: WindowService;
readonly resolveContainer?: (element: HTMLElement) => void;
readonly resolveFocus?: (element: HTMLElement | undefined) => void;
}
export interface State {
filterText: string;
items: ArduinoComponent[];
}
export namespace Styles {
export const FILTERABLE_LIST_CONTAINER_CLASS = 'filterable-list-container';
props?: LibraryService.Search.Props;
}
export interface ComponentSource {
search(req: { query: string }): Promise<{ items: ArduinoComponent[] }>
search(req: { query: string, props?: LibraryService.Search.Props }): Promise<{ items: ArduinoComponent[] }>
install(board: ArduinoComponent): Promise<void>;
}

View File

@@ -9,15 +9,22 @@ export class SearchBar extends React.Component<SearchBar.Props> {
render(): React.ReactNode {
return <input
ref={this.setRef}
className={SearchBar.Styles.SEARCH_BAR_CLASS}
type='text'
placeholder='Search'
placeholder='Filter your search...'
size={1}
value={this.props.filterText}
onChange={this.handleFilterTextChange}
/>;
}
private setRef = (element: HTMLElement | null) => {
if (this.props.resolveFocus) {
this.props.resolveFocus(element || undefined);
}
}
private handleFilterTextChange(event: React.ChangeEvent<HTMLInputElement>): void {
this.props.onFilterTextChanged(event.target.value);
}
@@ -29,6 +36,7 @@ export namespace SearchBar {
export interface Props {
filterText: string;
onFilterTextChanged(filterText: string): void;
readonly resolveFocus?: (element: HTMLElement | undefined) => void;
}
export namespace Styles {

View File

@@ -3,6 +3,7 @@ import { BoardsService, Board } from '../../common/protocol/boards-service';
// import { SelectBoardDialog } from './select-board-dialog';
import { QuickPickService } from '@theia/core/lib/common/quick-pick-service';
import { BoardsNotificationService } from '../boards-notification-service';
import { ARDUINO_TOOLBAR_ITEM_CLASS } from '../toolbar/arduino-toolbar';
export class ConnectedBoards extends React.Component<ConnectedBoards.Props, ConnectedBoards.State> {
static TOOLBAR_ID: 'connected-boards-toolbar';
@@ -28,14 +29,14 @@ export class ConnectedBoards extends React.Component<ConnectedBoards.Props, Conn
content = [ <option key="loading" value="0">{label}</option> ];
}
return <div className={ConnectedBoards.Styles.CONNECTED_BOARDS_CLASS}>
<select disabled={!this.state.boards}
return <div key='arduino-connected-boards' className={`${ARDUINO_TOOLBAR_ITEM_CLASS} item ${ConnectedBoards.Styles.CONNECTED_BOARDS_CLASS}`}>
<select key='arduino-connected-boards-select' disabled={!this.state.boards}
onChange={this.onBoardSelect.bind(this)}
value={this.state.selection}>
<optgroup label="Attached boards">
<optgroup key='arduino-connected-boards-select-opt-group' label="Attached boards">
{ content }
</optgroup>
<optgroup label="_________">
<optgroup label="_________" key='arduino-connected-boards-select-opt-group2'>
{ !!this.state.otherBoard && <option value="selected-other" key="selected-other">{this.state.otherBoard.name} (not attached)</option> }
<option value="select-other" key="select-other">Select other Board</option>
</optgroup>

View File

@@ -0,0 +1,7 @@
import { ApplicationShell } from "@theia/core/lib/browser";
export class CustomApplicationShell extends ApplicationShell {
protected refreshBottomPanelToggleButton() {
}
}

View File

@@ -0,0 +1,44 @@
import { injectable } from "inversify";
import { CommonFrontendContribution, CommonMenus, CommonCommands } from "@theia/core/lib/browser";
import { MenuModelRegistry } from "@theia/core";
@injectable()
export class CustomCommonFrontendContribution extends CommonFrontendContribution {
registerMenus(registry: MenuModelRegistry): void {
registry.registerSubmenu(CommonMenus.FILE, 'File');
registry.registerSubmenu(CommonMenus.EDIT, 'Edit');
registry.registerSubmenu(CommonMenus.FILE_SETTINGS_SUBMENU, 'Settings');
registry.registerMenuAction(CommonMenus.EDIT_UNDO, {
commandId: CommonCommands.UNDO.id,
order: '0'
});
registry.registerMenuAction(CommonMenus.EDIT_UNDO, {
commandId: CommonCommands.REDO.id,
order: '1'
});
registry.registerMenuAction(CommonMenus.EDIT_FIND, {
commandId: CommonCommands.FIND.id,
order: '0'
});
registry.registerMenuAction(CommonMenus.EDIT_FIND, {
commandId: CommonCommands.REPLACE.id,
order: '1'
});
registry.registerMenuAction(CommonMenus.EDIT_CLIPBOARD, {
commandId: CommonCommands.CUT.id,
order: '0'
});
registry.registerMenuAction(CommonMenus.EDIT_CLIPBOARD, {
commandId: CommonCommands.COPY.id,
order: '1'
});
registry.registerMenuAction(CommonMenus.EDIT_CLIPBOARD, {
commandId: CommonCommands.PASTE.id,
order: '2'
});
}
}

View File

@@ -0,0 +1,21 @@
import {EditorContribution} from '@theia/editor/lib/browser/editor-contribution';
import { TextEditor } from '@theia/editor/lib/browser';
import { StatusBarAlignment } from '@theia/core/lib/browser';
export class CustomEditorContribution extends EditorContribution {
protected updateLanguageStatus(editor: TextEditor | undefined): void {
}
protected setCursorPositionStatus(editor: TextEditor | undefined): void {
if (!editor) {
this.statusBar.removeElement('editor-status-cursor-position');
return;
}
const { cursor } = editor;
this.statusBar.setElement('editor-status-cursor-position', {
text: `${cursor.line + 1}`,
alignment: StatusBarAlignment.LEFT,
priority: 100
});
}
}

View File

@@ -0,0 +1,22 @@
import { injectable } from "inversify";
import { EditorWidgetFactory } from "@theia/editor/lib/browser/editor-widget-factory";
import URI from "@theia/core/lib/common/uri";
import { EditorWidget } from "@theia/editor/lib/browser";
@injectable()
export class CustomEditorWidgetFactory extends EditorWidgetFactory {
protected async createEditor(uri: URI): Promise<EditorWidget> {
const icon = await this.labelProvider.getIcon(uri);
return this.editorProvider(uri).then(textEditor => {
const newEditor = new EditorWidget(textEditor, this.selectionService);
newEditor.id = this.id + ':' + uri.toString();
newEditor.title.closable = false;
newEditor.title.label = this.labelProvider.getName(uri);
newEditor.title.iconClass = icon + ' file-icon';
newEditor.title.caption = this.labelProvider.getLongName(uri);
return newEditor;
});
}
}

View File

@@ -0,0 +1,10 @@
import { injectable } from "inversify";
import { FileMenuContribution } from "@theia/workspace/lib/browser";
import { MenuModelRegistry } from "@theia/core";
@injectable()
export class CustomFileMenuContribution extends FileMenuContribution {
registerMenus(registry: MenuModelRegistry) {
}
}

View File

@@ -0,0 +1,18 @@
import { injectable, inject } from "inversify";
import { FrontendApplication } from "@theia/core/lib/browser";
import { ArduinoFrontendContribution } from "../arduino-frontend-contribution";
@injectable()
export class CustomFrontendApplication extends FrontendApplication {
@inject(ArduinoFrontendContribution)
protected readonly frontendContribution: ArduinoFrontendContribution;
protected async initializeLayout(): Promise<void> {
const location = new URL(window.location.href);
const sketchPath = location.searchParams.get('sketch');
if (sketchPath) {
this.frontendContribution.openSketchFiles(decodeURIComponent(sketchPath));
}
}
}

View File

@@ -0,0 +1,10 @@
import { injectable } from "inversify";
import { MonacoEditorMenuContribution } from "@theia/monaco/lib/browser/monaco-menu";
import { MenuModelRegistry } from "@theia/core";
@injectable()
export class CustomMonacoEditorMenuContribution extends MonacoEditorMenuContribution {
registerMenus(registry: MenuModelRegistry) {
}
}

View File

@@ -0,0 +1,11 @@
import {MonacoStatusBarContribution} from '@theia/monaco/lib/browser/monaco-status-bar-contribution';
export class SilentMonacoStatusBarContribution extends MonacoStatusBarContribution {
protected setConfigTabSizeWidget() {
}
protected setLineEndingWidget() {
}
}

View File

@@ -0,0 +1,10 @@
import { injectable } from "inversify";
import { FileNavigatorContribution } from "@theia/navigator/lib/browser/navigator-contribution";
import { FrontendApplication } from "@theia/core/lib/browser";
@injectable()
export class SilentNavigatorContribution extends FileNavigatorContribution {
async initializeLayout(app: FrontendApplication): Promise<void> {
// await this.openView();
}
}

View File

@@ -0,0 +1,10 @@
import { OutputToolbarContribution } from "@theia/output/lib/browser/output-toolbar-contribution";
import { TabBarToolbarRegistry } from "@theia/core/lib/browser/shell/tab-bar-toolbar";
import { injectable } from "inversify";
@injectable()
export class ArduinoOutputToolContribution extends OutputToolbarContribution {
async registerToolbarItems(toolbarRegistry: TabBarToolbarRegistry): Promise<void> {
// register nothing
}
}

View File

@@ -1,5 +1,6 @@
import { injectable } from 'inversify';
import { ProblemContribution } from '@theia/markers/lib/browser/problem/problem-contribution';
import { ProblemStat } from '@theia/markers/lib/browser/problem/problem-manager';
@injectable()
export class SilentProblemContribution extends ProblemContribution {
@@ -8,4 +9,7 @@ export class SilentProblemContribution extends ProblemContribution {
// await this.openView();
}
protected setStatusBarElement(problemStat: ProblemStat) {
}
}

View File

@@ -2,493 +2,89 @@
"tokenColors": [
{
"settings": {
"background": "#FFFFFF",
"foreground": "#000000"
"foreground": "#434f54"
}
},
{
"name": "Source",
"scope": "source",
"settings": {
"background": "#FFFFFF",
"fontStyle": ""
}
},
{
"name": "Comment",
"name": "Comments",
"scope": "comment",
"settings": {
"fontStyle": "italic",
"foreground": "#91a6a6"
"foreground": "#95a5a6cc"
}
},
{
"name": "Docblock",
"scope": "comment.block",
"settings": {
"fontStyle": "",
"foreground": "#91a6a6"
}
},
{
"name": "Docblock tag",
"scope": "keyword.other.phpdoc",
"settings": {
"fontStyle": "",
"foreground": "#91a6a6"
}
},
{
"name": "Core function",
"scope": "support.function",
"settings": {
"fontStyle": "",
"foreground": "#6f8100"
}
},
{
"name": "Keyword",
"name": "Keywords Attributes",
"scope": [
"keyword",
"storage"
"storage",
"support",
"string.quoted.single.c"
],
"settings": {
"fontStyle": "bold",
"foreground": "#000000"
"foreground": "#00979D"
}
},
{
"name": "Keyword operator",
"scope": "keyword.operator.assignment",
"settings": {
"fontStyle": "",
"foreground": "#000000"
}
},
{
"name": "keyword like new",
"scope": "keyword.other.special-method",
"settings": {
"fontStyle": ""
}
},
{
"name": "Function (definition)",
"name": "literal",
"scope": [
"meta.function.c",
"entity.name.function",
"keyword.other.name-of-parameter.objc",
"support.type.exception.python"
"meta.function-call.c"
],
"settings": {
"fontStyle": "bold",
"foreground": "#000000"
"foreground": "#D35400"
}
},
{
"name": "Class (definition)",
"scope": "entity.name",
"settings": {
"fontStyle": "bold",
"foreground": "#445588"
}
},
{
"name": "Number",
"scope": "constant.numeric",
"settings": {
"fontStyle": "",
"foreground": "#00b0b3"
}
},
{
"name": "Variable",
"name": "punctuation",
"scope": [
"variable.language",
"variable.other"
"punctuation.section",
"meta.function-call.c",
"meta.block.c",
"meta.function.c",
"entity.name.function.preprocessor.c",
"meta.preprocessor.macro.c"
],
"settings": {
"fontStyle": "",
"foreground": "#00b0b3"
"foreground": "#434f54"
}
},
{
"name": "Built-in constant",
"scope": "constant.language",
"settings": {
"fontStyle": "bold",
"foreground": "#000000"
}
},
{
"name": "Variable",
"scope": "variable.other.constant.ruby",
"settings": {
"foreground": "#0F8787"
}
},
{
"name": "Built-in constant",
"name": "strings",
"scope": [
"constant.language",
"support.function.construct"
"string.quoted.double"
],
"settings": {
"fontStyle": "bold",
"foreground": "#000000"
"foreground": "#005C5F"
}
},
{
"name": "String",
"scope": "string",
"settings": {
"background": "#EB104512",
"foreground": "#006062"
}
},
{
"name": "Inherited class",
"scope": "entity.other.inherited-class",
"settings": {
"fontStyle": "",
"foreground": "#0F8787"
}
},
{
"name": "Inherited class seperator",
"scope": "punctuation.separator.inheritance",
"settings": {
"fontStyle": "bold",
"foreground": "#000000"
}
},
{
"name": "punctuation block",
"scope": "punctuation.separator.variable",
"settings": {
"fontStyle": "bold",
"foreground": "#000000"
}
},
{
"name": "array brackets",
"scope": "punctuation.section.array",
"settings": {
"fontStyle": "bold",
"foreground": "#000000"
}
},
{
"name": "hash separator",
"scope": "punctuation.separator.key-value",
"settings": {
"fontStyle": "bold",
"foreground": "#000000"
}
},
{
"name": "() brackets",
"scope": "punctuation.section.function",
"settings": {
"fontStyle": "",
"foreground": "#000000"
}
},
{
"name": "Method call",
"scope": "meta.function-call",
"settings": {
"fontStyle": "",
"foreground": "#108888"
}
},
{
"name": "Method call",
"scope": "meta.function-call.python",
"settings": {
"fontStyle": "",
"foreground": "#000000"
}
},
{
"name": "hash brackets",
"scope": "punctuation.section.scope",
"settings": {
"fontStyle": "",
"foreground": "#000000"
}
},
{
"name": "Special ruby method",
"scope": "keyword.other.special-method.ruby",
"settings": {
"fontStyle": "bold"
}
},
{
"name": "symbol",
"scope": "constant.other.symbol",
"settings": {
"fontStyle": "",
"foreground": "#000000"
}
},
{
"name": "Support class",
"scope": "support.class.ruby",
"settings": {
"fontStyle": "",
"foreground": "#008080"
}
},
{
"name": "String.regexp",
"scope": "string.regexp",
"settings": {
"foreground": "#009926"
}
},
{
"name": "String embedded source",
"scope": "string.quoted source",
"settings": {
"foreground": "#000000"
}
},
{
"name": "doctype punctation",
"scope": "meta.tag.sgml.html",
"settings": {
"fontStyle": "bold",
"foreground": "#999999"
}
},
{
"name": "doctype declaration",
"scope": "entity.name.tag.doctype",
"settings": {
"fontStyle": "bold",
"foreground": "#999999"
}
},
{
"name": "doctype string",
"scope": "string.quoted.double.doctype",
"settings": {
"fontStyle": "bold",
"foreground": "#999999"
}
},
{
"name": "html tag punctuation",
"scope": "punctuation.definition.tag",
"settings": {
"fontStyle": "",
"foreground": "#121289"
}
},
{
"name": "html tag punctuation",
"scope": "entity.name.tag",
"settings": {
"fontStyle": "",
"foreground": "#121289"
}
},
{
"name": "html attribute",
"scope": "entity.other.attribute-name",
"settings": {
"fontStyle": "",
"foreground": "#0A8585"
}
},
{
"name": "html attribute punctation",
"scope": "entity.other.attribute-name",
"settings": {
"fontStyle": "",
"foreground": "#0A8585"
}
},
{
"name": "erb tags",
"scope": "punctuation.section.embedded.ruby",
"settings": {
"fontStyle": "bold",
"foreground": "#999999"
}
},
{
"name": "ruby string interpolation",
"scope": "source.ruby.embedded.source punctuation.section.embedded.ruby",
"settings": {
"foreground": "#CF1040"
}
},
{
"name": "css brackets",
"scope": "punctuation.section.property-list.css",
"settings": {
"fontStyle": ""
}
},
{
"name": "css property",
"scope": "support.type.property-name.css",
"settings": {
"fontStyle": "bold"
}
},
{
"name": "css property punctuation",
"scope": "punctuation.separator.key-value.css",
"settings": {
"fontStyle": "",
"foreground": "#000000"
}
},
{
"name": "css property value",
"name": "meta keywords",
"scope": [
"meta.property-value",
"constant.other.color"
"keyword.control",
"meta.preprocessor.c"
],
"settings": {
"fontStyle": "",
"foreground": "#00b0b3"
"foreground": "#728E00"
}
},
{
"name": "css ending",
"scope": "punctuation.terminator.rule.css",
"settings": {
"fontStyle": "",
"foreground": "#000000"
}
},
{
"name": "css font",
"scope": "support.constant.font-name",
"settings": {
"fontStyle": "",
"foreground": "#000000"
}
},
{
"name": "css keyword",
"scope": "keyword.other.unit",
"settings": {
"fontStyle": "",
"foreground": "#00b0b3"
}
},
{
"name": "pseudo class",
"scope": "entity.other.attribute-name.pseudo-class",
"settings": {
"fontStyle": "",
"foreground": "#000000"
}
},
{
"name": "css constant property value",
"scope": "support.constant.property-value",
"settings": {
"fontStyle": "bold",
"foreground": "#000000"
}
},
{
"name": "css attribute class",
"scope": "entity.other.attribute-name.class",
"settings": {
"fontStyle": "bold",
"foreground": "#445588"
}
},
{
"name": "css attribute id",
"scope": "entity.other.attribute-name.id",
"settings": {
"fontStyle": "bold",
"foreground": "#990000"
}
},
{
"name": "diff header from",
"scope": "meta.diff.header.from-file",
"settings": {
"background": "#FFDDDD",
"fontStyle": "",
"foreground": "#000000"
}
},
{
"name": "diff header to",
"scope": "meta.diff.header.to-file",
"settings": {
"fontStyle": "",
"foreground": "#000000"
}
},
{
"name": "diff inserted",
"scope": "markup.inserted.diff",
"settings": {
"fontStyle": ""
}
},
{
"name": "diff deleted",
"scope": "markup.deleted.diff",
"settings": {
"background": "#FFDDDD",
"fontStyle": "",
"foreground": "#000000"
}
},
{
"name": "Function Parameters",
"scope": "variable.parameter",
"settings": {
"fontStyle": "italic"
}
},
{
"name": "Library object",
"name": "numeric preprocessor",
"scope": [
"support.function",
"support.variable",
"support.constant",
"support.class",
"support.type"
"meta.preprocessor.macro.c",
"constant.numeric.preprocessor.c",
"meta.preprocessor.c"
],
"settings": {
"fontStyle": "bold",
"foreground": "#4183c4"
}
},
{
"name": "Function Meta Call Arguments",
"scope": "meta.function-call.arguments",
"settings": {
"fontStyle": "italic"
}
},
{
"name": "Function Call",
"scope": "meta.function-call",
"settings": {
"fontStyle": ""
"foreground": "#434f54"
}
}
],
"colors": {
"editor.background": "#FFFFFF",
"editorCursor.foreground": "#000000",
"editor.foreground": "#000000",
"editorCursor.foreground": "#434f54",
"editor.foreground": "#434f54",
"editorWhitespace.foreground": "#BFBFBF",
"editor.lineHighlightBackground": "#00000010",
"editor.lineHighlightBackground": "#434f5410",
"editor.selectionBackground": "#ffcb00"
},
"name": "Arduino"

View File

@@ -0,0 +1,869 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Generator: Adobe Illustrator 18.1.1, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
version="1.1"
id="Layer_1"
x="0px"
y="0px"
width="198px"
height="99px"
viewBox="0 0 198 99"
enable-background="new 0 0 198 99"
xml:space="preserve"
inkscape:version="0.91 r13725"
sodipodi:docname="buttons.svg"><metadata
id="metadata327"><rdf:RDF><cc:Work
rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" /><dc:title></dc:title></cc:Work></rdf:RDF></metadata><defs
id="defs325" /><sodipodi:namedview
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1"
objecttolerance="10"
gridtolerance="10"
guidetolerance="10"
inkscape:pageopacity="0"
inkscape:pageshadow="2"
inkscape:window-width="1215"
inkscape:window-height="1000"
id="namedview323"
showgrid="false"
showguides="true"
inkscape:guide-bbox="true"
inkscape:zoom="4"
inkscape:cx="45.252385"
inkscape:cy="36.224987"
inkscape:window-x="65"
inkscape:window-y="24"
inkscape:window-maximized="1"
inkscape:current-layer="Layer_1" /><g
id="g5"
transform="translate(-0.12000084,0)"><circle
cx="16.620001"
cy="16.608999"
r="12"
id="circle7"
style="fill:#ffcc00" /><polyline
stroke-miterlimit="10"
points="21.453,12.745 15.788,20.571 11.775,16.658 "
id="polyline9"
style="fill:none;stroke:#655100;stroke-width:2.30489993;stroke-miterlimit:10" /></g><g
id="g11"
transform="translate(-0.12000084,0)"><circle
cx="16.620001"
cy="49.465"
r="12"
id="circle13"
style="fill:#ffffff" /><polyline
stroke-miterlimit="10"
points="21.453,45.601 15.788,53.427 11.775,49.514 "
id="polyline15"
style="fill:none;stroke:#006468;stroke-width:2.30489993;stroke-miterlimit:10" /></g><g
id="g17"
transform="translate(-0.12000084,0)"><circle
cx="16.620001"
cy="82.476997"
r="12"
id="circle19"
style="fill:#4db7bb" /><polyline
stroke-miterlimit="10"
points="21.453,78.612 15.788,86.438 11.775,82.525 "
id="polyline21"
style="fill:none;stroke:#006468;stroke-width:2.30489993;stroke-miterlimit:10" /></g><g
id="g23"
transform="translate(-0.26100159,0)"><circle
cx="49.761002"
cy="16.608999"
r="12"
id="circle25"
style="fill:#ffcc00" /><polygon
points="45.412,15.313 49.307,15.313 49.307,11.53 54.701,16.875 49.331,22.245 49.331,18.563 45.412,18.539 "
id="polygon27"
style="fill:#655100" /></g><g
id="g29"
transform="translate(-0.26100159,0)"><circle
cx="49.761002"
cy="49.465"
r="12"
id="circle31"
style="fill:#ffffff" /><polygon
points="45.412,48.169 49.307,48.169 49.307,44.386 54.701,49.731 49.331,55.101 49.331,51.419 45.412,51.394 "
id="polygon33"
style="fill:#006468" /></g><g
id="g35"
transform="translate(-0.26100159,0)"><circle
cx="49.761002"
cy="82.476997"
r="12"
id="circle37"
style="fill:#4db7bb" /><polygon
points="45.412,81.18 49.307,81.18 49.307,77.397 54.701,82.743 49.331,88.113 49.331,84.43 45.412,84.406 "
id="polygon39"
style="fill:#006468" /></g><g
id="g41"
transform="translate(-0.54399872,0)"><rect
x="105.544"
y="6.1090002"
width="21"
height="21"
id="rect43"
style="fill:#ffcc00" /><polygon
points="114.44,19.083 114.44,15.116 110.586,15.116 116.032,9.621 121.502,15.091 117.751,15.091 117.726,19.083 "
id="polygon45"
style="fill:#655100" /><rect
x="110.511"
y="22.193001"
width="1"
height="1"
id="rect47"
style="fill:#655100" /><rect
x="112.518"
y="22.193001"
width="1"
height="1"
id="rect49"
style="fill:#655100" /><rect
x="114.517"
y="22.193001"
width="1"
height="1"
id="rect51"
style="fill:#655100" /><rect
x="116.525"
y="22.193001"
width="1"
height="1"
id="rect53"
style="fill:#655100" /><rect
x="118.524"
y="22.193001"
width="1"
height="1"
id="rect55"
style="fill:#655100" /><rect
x="120.531"
y="22.193001"
width="1"
height="1"
id="rect57"
style="fill:#655100" /></g><g
id="g59"
transform="translate(-0.68600464,0)"><rect
x="138.686"
y="6.1090002"
width="21"
height="21"
id="rect61"
style="fill:#ffcc00" /><polygon
points="150.79,9.621 150.79,13.588 154.644,13.588 149.198,19.083 143.728,13.612 147.479,13.613 147.504,9.621 "
id="polygon63"
style="fill:#655100" /><rect
x="143.65199"
y="22.193001"
width="1"
height="1"
id="rect65"
style="fill:#655100" /><rect
x="145.66"
y="22.193001"
width="1"
height="1"
id="rect67"
style="fill:#655100" /><rect
x="147.659"
y="22.193001"
width="1"
height="1"
id="rect69"
style="fill:#655100" /><rect
x="149.666"
y="22.193001"
width="1"
height="1"
id="rect71"
style="fill:#655100" /><rect
x="151.666"
y="22.193001"
width="1"
height="1"
id="rect73"
style="fill:#655100" /><rect
x="153.673"
y="22.193001"
width="1"
height="1"
id="rect75"
style="fill:#655100" /></g><g
id="g77"
transform="translate(-0.54399872,0)"><rect
x="105.544"
y="38.965"
width="21"
height="21"
id="rect79"
style="fill:#ffffff" /><polygon
points="114.44,51.939 114.44,47.971 110.586,47.971 116.032,42.476 121.502,47.947 117.751,47.947 117.726,51.939 "
id="polygon81"
style="fill:#006468" /><rect
x="110.511"
y="55.049"
width="1"
height="1"
id="rect83"
style="fill:#006468" /><rect
x="112.518"
y="55.049"
width="1"
height="1"
id="rect85"
style="fill:#006468" /><rect
x="114.517"
y="55.049"
width="1"
height="1"
id="rect87"
style="fill:#006468" /><rect
x="116.525"
y="55.049"
width="1"
height="1"
id="rect89"
style="fill:#006468" /><rect
x="118.524"
y="55.049"
width="1"
height="1"
id="rect91"
style="fill:#006468" /><rect
x="120.531"
y="55.049"
width="1"
height="1"
id="rect93"
style="fill:#006468" /></g><g
id="g95"
transform="translate(-0.68600464,0)"><rect
x="138.686"
y="38.965"
width="21"
height="21"
id="rect97"
style="fill:#ffffff" /><polygon
points="150.79,42.476 150.79,46.444 154.644,46.444 149.198,51.939 143.728,46.468 147.479,46.468 147.504,42.477 "
id="polygon99"
style="fill:#006468" /><rect
x="143.65199"
y="55.049"
width="1"
height="1"
id="rect101"
style="fill:#006468" /><rect
x="145.66"
y="55.049"
width="1"
height="1"
id="rect103"
style="fill:#006468" /><rect
x="147.659"
y="55.049"
width="1"
height="1"
id="rect105"
style="fill:#006468" /><rect
x="149.666"
y="55.049"
width="1"
height="1"
id="rect107"
style="fill:#006468" /><rect
x="151.666"
y="55.049"
width="1"
height="1"
id="rect109"
style="fill:#006468" /><rect
x="153.673"
y="55.049"
width="1"
height="1"
id="rect111"
style="fill:#006468" /></g><g
id="g113"
transform="translate(-0.54399872,0)"><rect
x="105.544"
y="71.976997"
width="21"
height="21"
id="rect115"
style="fill:#4db7bb" /><polygon
points="114.44,84.95 114.44,80.983 110.586,80.983 116.032,75.488 121.502,80.959 117.751,80.958 117.726,84.95 "
id="polygon117"
style="fill:#006468" /><rect
x="110.511"
y="88.060997"
width="1"
height="1"
id="rect119"
style="fill:#006468" /><rect
x="112.518"
y="88.060997"
width="1"
height="1"
id="rect121"
style="fill:#006468" /><rect
x="114.517"
y="88.060997"
width="1"
height="1"
id="rect123"
style="fill:#006468" /><rect
x="116.525"
y="88.060997"
width="1"
height="1"
id="rect125"
style="fill:#006468" /><rect
x="118.524"
y="88.060997"
width="1"
height="1"
id="rect127"
style="fill:#006468" /><rect
x="120.531"
y="88.060997"
width="1"
height="1"
id="rect129"
style="fill:#006468" /></g><g
id="g131"
transform="translate(-0.68600464,0)"><rect
x="138.686"
y="71.976997"
width="21"
height="21"
id="rect133"
style="fill:#4db7bb" /><polygon
points="150.79,75.488 150.79,79.455 154.644,79.455 149.198,84.95 143.728,79.48 147.479,79.48 147.504,75.488 "
id="polygon135"
style="fill:#006468" /><rect
x="143.65199"
y="88.060997"
width="1"
height="1"
id="rect137"
style="fill:#006468" /><rect
x="145.66"
y="88.060997"
width="1"
height="1"
id="rect139"
style="fill:#006468" /><rect
x="147.659"
y="88.060997"
width="1"
height="1"
id="rect141"
style="fill:#006468" /><rect
x="149.666"
y="88.060997"
width="1"
height="1"
id="rect143"
style="fill:#006468" /><rect
x="151.666"
y="88.060997"
width="1"
height="1"
id="rect145"
style="fill:#006468" /><rect
x="153.673"
y="88.060997"
width="1"
height="1"
id="rect147"
style="fill:#006468" /></g><g
id="g149"
transform="translate(-0.40299988,0)"><path
d="M 87.445,22.097"
id="path151"
inkscape:connector-curvature="0"
style="fill:#655100" /><rect
x="72.403"
y="6.1090002"
width="21"
height="21"
id="rect153"
style="fill:#ffcc00" /><polygon
points="83.44,10.094 84.441,10.094 88.421,14.079 88.421,15.057 87.445,15.057 83.44,15.057 "
id="polygon155"
style="fill:#655100" /><polygon
points="78.404,11.093 78.404,22.097 87.445,22.097 87.445,14.87 88.421,14.87 88.421,23.134 77.399,23.134 77.399,10.094 83.562,10.094 83.568,11.093 "
id="polygon157"
style="fill:#655100" /><rect
x="79.399002"
y="12.111"
width="0.995"
height="0.99599999"
id="rect159"
style="fill:#655100" /><rect
x="81.394997"
y="12.111"
width="0.995"
height="0.99599999"
id="rect161"
style="fill:#655100" /><rect
x="79.399002"
y="14.103"
width="0.995"
height="0.99599999"
id="rect163"
style="fill:#655100" /><rect
x="81.394997"
y="14.103"
width="0.995"
height="0.99599999"
id="rect165"
style="fill:#655100" /><rect
x="79.399002"
y="16.115999"
width="0.995"
height="0.99599999"
id="rect167"
style="fill:#655100" /><rect
x="81.394997"
y="16.115999"
width="0.995"
height="0.99599999"
id="rect169"
style="fill:#655100" /><rect
x="83.403"
y="16.115999"
width="0.995"
height="0.99599999"
id="rect171"
style="fill:#655100" /><rect
x="85.400002"
y="16.115999"
width="0.995"
height="0.99599999"
id="rect173"
style="fill:#655100" /><rect
x="79.399002"
y="18.118"
width="0.995"
height="0.99599999"
id="rect175"
style="fill:#655100" /><rect
x="81.394997"
y="18.118"
width="0.995"
height="0.99599999"
id="rect177"
style="fill:#655100" /><rect
x="79.399002"
y="20.132"
width="0.995"
height="0.99599999"
id="rect179"
style="fill:#655100" /><rect
x="81.394997"
y="20.132"
width="0.995"
height="0.99599999"
id="rect181"
style="fill:#655100" /><rect
x="83.403"
y="18.118"
width="0.995"
height="0.99599999"
id="rect183"
style="fill:#655100" /><rect
x="85.400002"
y="18.118"
width="0.995"
height="0.99599999"
id="rect185"
style="fill:#655100" /><rect
x="83.403"
y="20.132"
width="0.995"
height="0.99599999"
id="rect187"
style="fill:#655100" /><rect
x="85.400002"
y="20.132"
width="0.995"
height="0.99599999"
id="rect189"
style="fill:#655100" /></g><g
id="g191"
transform="translate(-0.40299988,0)"><path
d="M 87.445,54.953"
id="path193"
inkscape:connector-curvature="0"
style="fill:#006468" /><rect
x="72.403"
y="38.965"
width="21"
height="21"
id="rect195"
style="fill:#ffffff" /><polygon
points="83.44,42.95 84.441,42.95 88.421,46.935 88.421,47.912 87.445,47.912 83.44,47.912 "
id="polygon197"
style="fill:#006468" /><polygon
points="78.404,43.949 78.404,54.953 87.445,54.953 87.445,47.726 88.421,47.726 88.421,55.99 77.399,55.99 77.399,42.95 83.586,42.95 83.599,43.951 "
id="polygon199"
style="fill:#006468" /><rect
x="79.399002"
y="44.966999"
width="0.995"
height="0.99599999"
id="rect201"
style="fill:#006468" /><rect
x="81.394997"
y="44.966999"
width="0.995"
height="0.99599999"
id="rect203"
style="fill:#006468" /><rect
x="79.399002"
y="46.959"
width="0.995"
height="0.99599999"
id="rect205"
style="fill:#006468" /><rect
x="81.394997"
y="46.959"
width="0.995"
height="0.99599999"
id="rect207"
style="fill:#006468" /><rect
x="79.399002"
y="48.972"
width="0.995"
height="0.99599999"
id="rect209"
style="fill:#006468" /><rect
x="81.394997"
y="48.972"
width="0.995"
height="0.99599999"
id="rect211"
style="fill:#006468" /><rect
x="83.403"
y="48.972"
width="0.995"
height="0.99599999"
id="rect213"
style="fill:#006468" /><rect
x="85.400002"
y="48.972"
width="0.995"
height="0.99599999"
id="rect215"
style="fill:#006468" /><rect
x="79.399002"
y="50.973999"
width="0.995"
height="0.99599999"
id="rect217"
style="fill:#006468" /><rect
x="81.394997"
y="50.973999"
width="0.995"
height="0.99599999"
id="rect219"
style="fill:#006468" /><rect
x="79.399002"
y="52.987"
width="0.995"
height="0.99599999"
id="rect221"
style="fill:#006468" /><rect
x="81.394997"
y="52.987"
width="0.995"
height="0.99599999"
id="rect223"
style="fill:#006468" /><rect
x="83.403"
y="50.973999"
width="0.995"
height="0.99599999"
id="rect225"
style="fill:#006468" /><rect
x="85.400002"
y="50.973999"
width="0.995"
height="0.99599999"
id="rect227"
style="fill:#006468" /><rect
x="83.403"
y="52.987"
width="0.995"
height="0.99599999"
id="rect229"
style="fill:#006468" /><rect
x="85.400002"
y="52.987"
width="0.995"
height="0.99599999"
id="rect231"
style="fill:#006468" /></g><g
id="g233"
transform="translate(-0.40299988,0)"><path
d="M 87.445,87.965"
id="path235"
inkscape:connector-curvature="0"
style="fill:#006468" /><rect
x="72.403"
y="71.976997"
width="21"
height="21"
id="rect237"
style="fill:#4db7bb" /><polygon
points="83.44,75.961 84.441,75.961 88.421,79.946 88.421,80.924 87.445,80.924 83.44,80.924 "
id="polygon239"
style="fill:#006468" /><polygon
points="78.404,76.961 78.404,87.965 87.445,87.965 87.445,80.738 88.421,80.738 88.421,89.002 77.399,89.002 77.399,75.961 83.586,75.961 83.599,76.963 "
id="polygon241"
style="fill:#006468" /><rect
x="79.399002"
y="77.977997"
width="0.995"
height="0.99599999"
id="rect243"
style="fill:#006468" /><rect
x="81.394997"
y="77.977997"
width="0.995"
height="0.99599999"
id="rect245"
style="fill:#006468" /><rect
x="79.399002"
y="79.970001"
width="0.995"
height="0.99599999"
id="rect247"
style="fill:#006468" /><rect
x="81.394997"
y="79.970001"
width="0.995"
height="0.99599999"
id="rect249"
style="fill:#006468" /><rect
x="79.399002"
y="81.984001"
width="0.995"
height="0.99599999"
id="rect251"
style="fill:#006468" /><rect
x="81.394997"
y="81.984001"
width="0.995"
height="0.99599999"
id="rect253"
style="fill:#006468" /><rect
x="83.403"
y="81.984001"
width="0.995"
height="0.99599999"
id="rect255"
style="fill:#006468" /><rect
x="85.400002"
y="81.984001"
width="0.995"
height="0.99599999"
id="rect257"
style="fill:#006468" /><rect
x="79.399002"
y="83.986"
width="0.995"
height="0.99599999"
id="rect259"
style="fill:#006468" /><rect
x="81.394997"
y="83.986"
width="0.995"
height="0.99599999"
id="rect261"
style="fill:#006468" /><rect
x="79.399002"
y="85.999001"
width="0.995"
height="0.99599999"
id="rect263"
style="fill:#006468" /><rect
x="81.394997"
y="85.999001"
width="0.995"
height="0.99599999"
id="rect265"
style="fill:#006468" /><rect
x="83.403"
y="83.986"
width="0.995"
height="0.99599999"
id="rect267"
style="fill:#006468" /><rect
x="85.400002"
y="83.986"
width="0.995"
height="0.99599999"
id="rect269"
style="fill:#006468" /><rect
x="83.403"
y="85.999001"
width="0.995"
height="0.99599999"
id="rect271"
style="fill:#006468" /><rect
x="85.400002"
y="85.999001"
width="0.995"
height="0.99599999"
id="rect273"
style="fill:#006468" /></g><g
id="g275"
transform="translate(-0.82800293,0)"><rect
x="171.828"
y="6.1090002"
width="21"
height="21"
id="rect277"
style="fill:#ffcc00" /><rect
x="187.819"
y="16.101"
width="0.99900001"
height="0.99800003"
id="rect279"
style="fill:#655100" /><rect
x="189.825"
y="16.101"
width="0.99900001"
height="0.99800003"
id="rect281"
style="fill:#655100" /><rect
x="174.83299"
y="16.101"
width="0.99900001"
height="0.99800003"
id="rect283"
style="fill:#655100" /><circle
stroke-miterlimit="10"
cx="181.80299"
cy="16.101"
r="4.0900002"
id="circle285"
style="fill:none;stroke:#655100;stroke-width:1.95439994;stroke-miterlimit:10" /><rect
x="175.895"
y="18.427999"
transform="matrix(0.6915,0.7224,-0.7224,0.6915,69.5827,-121.6599)"
width="2.6800001"
height="4.4229999"
id="rect287"
style="fill:#655100" /><rect
x="180.789"
y="15.103"
width="2.0280001"
height="1.9960001"
id="rect289"
style="fill:#655100" /></g><g
id="g291"
transform="translate(-0.82800293,0)"><rect
x="171.828"
y="38.965"
width="21"
height="21"
id="rect293"
style="fill:#ffffff" /><rect
x="187.819"
y="48.957001"
width="0.99900001"
height="0.99800003"
id="rect295"
style="fill:#006468" /><rect
x="189.825"
y="48.957001"
width="0.99900001"
height="0.99800003"
id="rect297"
style="fill:#006468" /><rect
x="174.83299"
y="48.957001"
width="0.99900001"
height="0.99800003"
id="rect299"
style="fill:#006468" /><circle
stroke-miterlimit="10"
cx="181.80299"
cy="48.957001"
r="4.0900002"
id="circle301"
style="fill:none;stroke:#006468;stroke-width:1.95439994;stroke-miterlimit:10" /><rect
x="175.895"
y="51.284"
transform="matrix(0.6915,0.7224,-0.7224,0.6915,93.3163,-111.5246)"
width="2.6800001"
height="4.4229999"
id="rect303"
style="fill:#006468" /><rect
x="180.789"
y="47.959"
width="2.0280001"
height="1.9960001"
id="rect305"
style="fill:#006468" /></g><g
id="g307"
transform="translate(-0.82800293,0)"><rect
x="171.828"
y="71.976997"
width="21"
height="21"
id="rect309"
style="fill:#4db7bb" /><rect
x="187.819"
y="81.969002"
width="0.99900001"
height="0.99800003"
id="rect311"
style="fill:#006468" /><rect
x="189.825"
y="81.969002"
width="0.99900001"
height="0.99800003"
id="rect313"
style="fill:#006468" /><rect
x="174.83299"
y="81.969002"
width="0.99900001"
height="0.99800003"
id="rect315"
style="fill:#006468" /><circle
stroke-miterlimit="10"
cx="181.80299"
cy="81.969002"
r="4.0900002"
id="circle317"
style="fill:none;stroke:#006468;stroke-width:1.95439994;stroke-miterlimit:10" /><rect
x="175.895"
y="84.295998"
transform="matrix(0.6915,0.7224,-0.7224,0.6915,117.1625,-101.3412)"
width="2.6800001"
height="4.4229999"
id="rect319"
style="fill:#006468" /><rect
x="180.789"
y="80.970001"
width="2.0280001"
height="1.9960001"
id="rect321"
style="fill:#006468" /></g></svg>

After

Width:  |  Height:  |  Size: 23 KiB

View File

@@ -0,0 +1,50 @@
import * as React from 'react';
import { ComponentListItem } from '../components/component-list/component-list-item';
export class LibraryComponentListItem extends ComponentListItem {
render(): React.ReactNode {
const { item } = this.props;
const name = <span className={'name'}>{item.name}</span>;
const author = <span className={'author'}>by {item.author}</span>;
const installedVersion = !!item.installedVersion && <div className={'version-info'}>
<span className={'version'}>Version {item.installedVersion}</span>
<span className={'installed'}>INSTALLED</span>
</div>;
const summary = <div className={'summary'}>{item.summary}</div>;
const moreInfo = !!item.moreInfoLink && <a href={item.moreInfoLink} onClick={this.onClick}>More info</a>;
const install = this.props.install && item.installable && !item.installedVersion &&
<button className={'install'} onClick={this.install.bind(this, item)}>INSTALL</button>;
const versions = (() => {
const { availableVersions } = item;
if (availableVersions.length === 0) {
return undefined;
} else if (availableVersions.length === 1) {
return <label>{availableVersions[0]}</label>
} else {
return <select>{item.availableVersions.map(version => <option value={version} key={version}>{version}</option>)}</select>;
}
})();
return <div className={'component-list-item noselect'}>
<div className={'header'}>
<span>{name} {author}</span>
{installedVersion}
</div>
<div className={'content'}>
{summary}
</div>
<div className={'info'}>
{moreInfo}
</div>
<div className={'footer'}>
{install}
{versions}
</div>
</div>;
}
}

View File

@@ -0,0 +1,17 @@
import * as React from 'react';
import { ArduinoComponent } from '../../common/protocol/arduino-component';
import { ComponentList } from '../components/component-list/component-list';
import { LibraryComponentListItem } from './library-component-list-item';
export class LibraryComponentList extends ComponentList {
createItem(item: ArduinoComponent): React.ReactNode {
return <LibraryComponentListItem
key={item.name}
item={item}
windowService={this.props.windowService}
install={this.props.install}
/>
}
}

View File

@@ -0,0 +1,110 @@
import * as React from 'react';
import { FilterableListContainer } from '../components/component-list/filterable-list-container';
import { LibraryComponentList } from './library-component-list';
export class LibraryFilterableListContainer extends FilterableListContainer {
constructor(props: Readonly<FilterableListContainer.Props>) {
super(props);
this.state = {
filterText: '',
items: [],
props: {
topic: this.topics[0],
type: this.types[0]
}
};
}
protected renderSearchFilter(): React.ReactNode {
const types = this.types.map(type => <option value={type} key={type}>{type}</option>);
let type = this.types[0];
if (this.state.props) {
const currentType = this.types.find(t => t === this.state.props!.type) || this.types[0];
if (currentType) {
type = currentType;
}
}
const topics = this.topics.map(topic => <option value={topic} key={topic}>{topic}</option>);
let topic = this.topics[0];
if (this.state.props) {
const currentTopic = this.topics.find(t => t === this.state.props!.topic) || this.topics[0];
if (currentTopic) {
topic = currentTopic;
}
}
return <div className={'search-filters'}>
<div className={'filter'}>
<div className={'title'} style={{ minWidth: '32.088px' }}>Type</div> {/** TODO: do `minWidth` better! */}
<select
value={type}
onChange={this.onTypeChange}>
{types}
</select>
</div>
<div className={'filter'}>
<div className={'title'}>Topic</div>
<select
value={topic}
onChange={this.onTopicChange}>
{topics}
</select>
</div>
</div>
}
protected onTypeChange = (event: React.ChangeEvent<HTMLSelectElement>) => {
const type = event.target.value;
const props = { ...(this.state.props || {}), ...{ type } };
this.setState({
props
});
}
protected onTopicChange = (event: React.ChangeEvent<HTMLSelectElement>) => {
const topic = event.target.value;
const props = { ...(this.state.props || {}), ...{ topic } };
this.setState({
props
});
}
protected renderComponentList(): React.ReactNode {
return <LibraryComponentList
items={this.state.items}
install={this.install.bind(this)}
windowService={this.props.windowService}
resolveContainer={this.props.resolveContainer}
/>
}
private get topics(): string[] {
return [
'All',
'Communication',
'Data Processing',
'Data Storage',
'Device Control',
'Display',
'Other',
'Sensor',
'Signal Input/Output',
'Timing',
'Uncategorized'
];
}
private get types(): string[] {
return [
'All',
'Updatable',
'Installed',
'Arduino',
'Partner',
'Recommended',
'Contributed',
'Retired'
];
}
}

View File

@@ -1,16 +1,88 @@
import { ListWidget } from './list-widget';
import * as React from 'react';
import { inject, injectable, postConstruct } from 'inversify';
import { Message } from '@phosphor/messaging';
import { Deferred } from '@theia/core/lib/common/promise-util';
import { MaybePromise } from '@theia/core/lib/common/types';
import { ReactWidget } from '@theia/core/lib/browser/widgets/react-widget';
import { WindowService } from '@theia/core/lib/browser/window/window-service';
import { LibraryFilterableListContainer } from './library-filterable-list-container';
import { LibraryService } from '../../common/protocol/library-service';
export class LibraryListWidget extends ListWidget {
@injectable()
export class LibraryListWidget extends ReactWidget {
static WIDGET_ID = 'library-list-widget';
static WIDGET_LABEL = 'Library Manager';
protected widgetProps(): ListWidget.Props {
return {
id: LibraryListWidget.WIDGET_ID,
title: LibraryListWidget.WIDGET_LABEL,
iconClass: 'library-tab-icon'
@inject(LibraryService)
protected readonly libraryService: LibraryService;
@inject(WindowService)
protected readonly windowService: WindowService;
/**
* Do not touch or use it. It is for setting the focus on the `input` after the widget activation.
*/
protected focusNode: HTMLElement | undefined;
protected readonly deferredContainer = new Deferred<HTMLElement>();
constructor() {
super();
this.id = LibraryListWidget.WIDGET_ID
this.title.label = LibraryListWidget.WIDGET_LABEL;
this.title.caption = LibraryListWidget.WIDGET_LABEL
this.title.iconClass = 'library-tab-icon';
this.title.closable = true;
this.addClass('arduino-list-widget');
this.node.tabIndex = 0; // To be able to set the focus on the widget.
this.scrollOptions = {
suppressScrollX: true
}
}
@postConstruct()
protected init(): void {
this.update();
}
protected getScrollContainer(): MaybePromise<HTMLElement> {
return this.deferredContainer.promise;
}
protected onActivateRequest(msg: Message): void {
super.onActivateRequest(msg);
(this.focusNode || this.node).focus();
}
protected onUpdateRequest(msg: Message): void {
super.onUpdateRequest(msg);
this.render();
}
protected onFocusResolved = (element: HTMLElement | undefined) => {
this.focusNode = element;
}
render(): React.ReactNode {
return <LibraryFilterableListContainer
resolveContainer={this.deferredContainer.resolve}
resolveFocus={this.onFocusResolved}
service={this.libraryService}
windowService={this.windowService}
/>;
}
}
export namespace ListWidget {
/**
* Props for customizing the abstract list widget.
*/
export interface Props {
readonly id: string;
readonly title: string;
readonly iconClass: string;
}
}

View File

@@ -1,20 +1,12 @@
import { injectable } from 'inversify';
import { FrontendApplicationContribution } from '@theia/core/lib/browser/frontend-application';
import { AbstractViewContribution } from '@theia/core/lib/browser/shell/view-contribution';
import { ListWidget } from './list-widget';
import { MenuModelRegistry } from '@theia/core';
import { LibraryListWidget } from './library-list-widget';
import { ArduinoMenus } from '../arduino-frontend-contribution';
@injectable()
export abstract class ListWidgetFrontendContribution extends AbstractViewContribution<ListWidget> implements FrontendApplicationContribution {
async initializeLayout(): Promise<void> {
await this.openView();
}
}
@injectable()
export class LibraryListWidgetFrontendContribution extends ListWidgetFrontendContribution {
export class LibraryListWidgetFrontendContribution extends AbstractViewContribution<LibraryListWidget> implements FrontendApplicationContribution {
constructor() {
super({
@@ -29,4 +21,17 @@ export class LibraryListWidgetFrontendContribution extends ListWidgetFrontendCon
});
}
initializeLayout(): void {
// NOOP
}
registerMenus(menus: MenuModelRegistry): void {
if (this.toggleCommand) {
menus.registerMenuAction(ArduinoMenus.SKETCH, {
commandId: this.toggleCommand.id,
label: 'Manage Libraries...'
});
}
}
}

View File

@@ -1,72 +0,0 @@
import * as React from 'react';
import { inject, injectable, postConstruct } from 'inversify';
import { Message } from '@phosphor/messaging';
import { ReactWidget } from '@theia/core/lib/browser/widgets/react-widget';
import { WindowService } from '@theia/core/lib/browser/window/window-service';
import { FilterableListContainer } from '../components/component-list/filterable-list-container';
import { LibraryService } from '../../common/protocol/library-service';
@injectable()
export abstract class ListWidget extends ReactWidget {
@inject(LibraryService)
protected readonly libraryService: LibraryService;
@inject(WindowService)
protected readonly windowService: WindowService;
constructor() {
super();
const { id, title, iconClass } = this.widgetProps();
this.id = id;
this.title.label = title;
this.title.caption = title;
this.title.iconClass = iconClass;
this.title.closable = true;
this.addClass(ListWidget.Styles.LIST_WIDGET_CLASS);
this.node.tabIndex = 0; // To be able to set the focus on the widget.
}
protected abstract widgetProps(): ListWidget.Props;
@postConstruct()
protected init(): void {
this.update();
}
protected onActivateRequest(msg: Message): void {
super.onActivateRequest(msg);
this.node.focus();
this.render();
}
protected onUpdateRequest(msg: Message): void {
super.onUpdateRequest(msg);
this.render();
}
render(): React.ReactNode {
return <FilterableListContainer
service={this.libraryService}
windowService={this.windowService}
/>;
}
}
export namespace ListWidget {
/**
* Props for customizing the abstract list widget.
*/
export interface Props {
readonly id: string;
readonly title: string;
readonly iconClass: string;
}
export namespace Styles {
export const LIST_WIDGET_CLASS = 'arduino-list-widget'
}
}

View File

@@ -0,0 +1,11 @@
import { injectable } from "inversify";
import { BrowserMenuBarContribution } from "@theia/core/lib/browser/menu/browser-menu-plugin";
import { FrontendApplication } from "@theia/core/lib/browser";
@injectable()
export class ArduinoMenuContribution extends BrowserMenuBarContribution {
onStart(app: FrontendApplication): void {
const menu = this.factory.createMenuBar();
app.shell.addWidget(menu, { area: 'top' });
}
}

View File

@@ -0,0 +1,10 @@
import { BrowserMenuBarContribution } from '@theia/core/lib/browser/menu/browser-menu-plugin';
import { ArduinoMenuContribution } from './arduino-menu-contribution';
import { ContainerModule, interfaces } from 'inversify';
import '../../../src/browser/style/browser-menu.css'
export default new ContainerModule((bind: interfaces.Bind, unbind: interfaces.Unbind) => {
unbind(BrowserMenuBarContribution);
bind(BrowserMenuBarContribution).to(ArduinoMenuContribution).inSingletonScope();
})

View File

@@ -1,7 +1,7 @@
import { injectable, inject } from "inversify";
import URI from "@theia/core/lib/common/uri";
import { OpenerService } from "@theia/core/lib/browser";
import { FileSystem } from "@theia/filesystem/lib/common";
import { WindowService } from "@theia/core/lib/browser/window/window-service";
@injectable()
export class SketchFactory {
@@ -9,8 +9,8 @@ export class SketchFactory {
@inject(FileSystem)
protected readonly fileSystem: FileSystem;
@inject(OpenerService)
protected readonly openerService: OpenerService;
@inject(WindowService)
protected readonly windowService: WindowService;
public async createNewSketch(parent: URI): Promise<void> {
const monthNames = ["january", "february", "march", "april", "may", "june",
@@ -49,8 +49,9 @@ void loop() {
}
` });
const opener = await this.openerService.getOpener(sketchFile)
opener.open(sketchFile, { reveal: true });
const location = new URL(window.location.href);
location.searchParams.set('sketch', sketchFile.toString());
this.windowService.openNewWindow(location.toString());
} catch (e) {
throw new Error("Cannot create new sketch: " + e);
}

View File

@@ -18,8 +18,11 @@ is not optimized for dense, information rich UIs.
:root {
/* Custom Theme Colors */
--theia-arduino-light: rgb(0, 102, 105);
--theia-arduino-light1: rgb(0, 164, 167);
--theia-arduino-light: rgb(0, 102, 102);
--theia-arduino-light1: rgb(0, 153, 153);
--theia-arduino-light2: rgb(218, 226, 228);
--theia-arduino-light3: rgb(237, 241, 242);
--theia-arduino-terminal: rgb(0, 0, 0);
/* Borders: Width and color (bright to dark) */
--theia-border-width: 1px;
--theia-panel-border-width: 2px;
@@ -48,7 +51,7 @@ is not optimized for dense, information rich UIs.
/* Special font colors */
--theia-ui-icon-font-color: #ffffff;
--theia-ui-bar-font-color0: var(--theia-ui-font-color0);
--theia-ui-bar-font-color1: var(--theia-ui-font-color1);
--theia-ui-bar-font-color1: var(--theia-inverse-ui-font-color0); /* var(--theia-ui-font-color1); */
/* Use the inverse UI colors against the brand/accent/warn/error colors. */
--theia-inverse-ui-font-color0: rgba(255, 255, 255, 1.0);
--theia-inverse-ui-font-color2: rgba(255, 255, 255, 0.7);
@@ -74,9 +77,9 @@ is not optimized for dense, information rich UIs.
/* Main layout colors (bright to dark)
------------------------------------ */
--theia-layout-color0: #ffffff;
--theia-layout-color1: #f3f3f3;
--theia-layout-color1: var(--theia-arduino-light1);
--theia-layout-color2: #ececec;
--theia-layout-color3: #dcdcdc;
--theia-layout-color3: var(--theia-arduino-light);
--theia-layout-color4: #dcdcdc;
/* Brand colors */
--theia-brand-color0: var(--md-blue-700);
@@ -85,7 +88,7 @@ is not optimized for dense, information rich UIs.
--theia-brand-color3: var(--md-blue-100);
/* Secondary Brand colors */
--theia-secondary-brand-color0: var(--md-grey-700);
--theia-secondary-brand-color1: var(--md-grey-500);
--theia-secondary-brand-color1: #b5c8c9;
--theia-secondary-brand-color2: var(--md-grey-300);
--theia-secondary-brand-color3: var(--md-grey-100);
/* Accent colors (dark to bright): Use these to create contrast to layout colors. */
@@ -107,7 +110,7 @@ is not optimized for dense, information rich UIs.
--theia-warn-color3: var(--md-amber-200);
--theia-warn-font-color0: var(--md-grey-900);
--theia-error-color0: var(--md-red-400);
--theia-error-color1: var(--md-red-300);
--theia-error-color1: #da5b4a;
--theia-error-color2: var(--md-red-200);
--theia-error-color3: var(--md-red-100);
--theia-error-font-color0: var(--md-grey-300);
@@ -146,7 +149,7 @@ is not optimized for dense, information rich UIs.
/* Menu */
--theia-menu-color0: var(--theia-layout-color3);
--theia-menu-color1: var(--theia-layout-color0);
--theia-menu-color2: var(--theia-layout-color3);
--theia-menu-color2: #dae3e3;
/* Statusbar */
--theia-statusbar-color: var(--theia-arduino-light);
--theia-statusBar-font-color: var(--theia-inverse-ui-font-color0);
@@ -156,7 +159,7 @@ is not optimized for dense, information rich UIs.
--theia-ui-button-color-hover: var(--theia-arduino-light1);
--theia-ui-button-font-color: var(--theia-inverse-ui-font-color0);
--theia-ui-button-color-secondary: var(--theia-secondary-brand-color1);
--theia-ui-button-color-secondary-hover: var(--theia-secondary-brand-color0);
--theia-ui-button-color-secondary-hover: var(--theia-menu-color2);
--theia-ui-button-font-color-secondary: var(--theia-inverse-ui-font-color0);
--theia-ui-button-color-disabled: var(--theia-accent-color3);
--theia-ui-button-font-color-disabled: var(--theia-ui-font-color2);
@@ -168,8 +171,8 @@ is not optimized for dense, information rich UIs.
/* Dialogs */
--theia-ui-dialog-header-color: var(--theia-arduino-light);
--theia-ui-dialog-header-font-color: var(--theia-inverse-ui-font-color0);
--theia-ui-dialog-color: var(--theia-layout-color0);
--theia-ui-dialog-font-color: var(--theia-ui-font-color1);
--theia-ui-dialog-color: rgb(236, 241, 241);
--theia-ui-dialog-font-color: black;
/* Variables */
--theia-variable-name-color: #9B46B0;
--theia-variable-value-color: rgba(108, 108, 108, 0.8);

View File

@@ -0,0 +1,188 @@
div#select-board-dialog {
margin: 5px 20px 50px 20px;
}
div#select-board-dialog .selectBoardContainer .body {
display: flex;
overflow: hidden;
}
div#select-board-dialog .selectBoardContainer .head {
margin-bottom: 10px;
}
div#select-board-dialog .selectBoardContainer .head .title {
font-weight: 400;
letter-spacing: .02em;
font-size: 1.2em;
color: #00979d;
margin: 17px 0;
}
div#select-board-dialog .selectBoardContainer .head .text {
margin-bottom: 21px;
}
div#select-board-dialog .selectBoardContainer .body .list .item.selected {
background: var(--theia-ui-button-color-secondary-hover);
}
div#select-board-dialog .selectBoardContainer .body .list .item.selected i{
color: var(--theia-arduino-light);
}
#select-board-dialog .selectBoardContainer .body .search input,
#select-board-dialog .selectBoardContainer .body .boards.list,
#select-board-dialog .selectBoardContainer .body .search,
#select-board-dialog .selectBoardContainer .body .ports.list {
background: white;
}
#select-board-dialog .selectBoardContainer .body .search input {
border: none;
width: 100%;
height: auto;
max-height: 37px;
padding: 10px 8px;
margin: 0;
vertical-align: top;
display: flex;
color: var(--theia-content-font-color0);
}
#select-board-dialog .selectBoardContainer .body .search input:focus {
box-shadow: none;
}
#select-board-dialog .selectBoardContainer .body .container {
flex: 1;
}
#select-board-dialog .selectBoardContainer .body .left.container .content {
margin: 0 5px 0 0;
}
#select-board-dialog .selectBoardContainer .body .right.container .content {
margin: 0 0 0 5px;
}
#select-board-dialog .selectBoardContainer .body .container .content .title{
color: #7f8c8d;
margin-bottom: 10px;
}
#select-board-dialog .selectBoardContainer .body .list .item {
padding: 10px 5px 10px 20px;
display: flex;
justify-content: space-between;
}
#select-board-dialog .selectBoardContainer .body .list .item:hover {
background: var(--theia-ui-button-color-secondary-hover);
}
#select-board-dialog .selectBoardContainer .body .list {
max-height: 265px;
overflow-y: auto;
}
#select-board-dialog .selectBoardContainer .body .boards.list {
min-height: 265px;
}
#select-board-dialog .selectBoardContainer .body .search {
margin-bottom: 10px;
display: flex;
align-items: center;
padding-right: 5px;
}
.p-Widget.dialogOverlay .dialogContent.select-board-dialog {
width: 740px;
}
button.theia-button {
height: 31px;
}
button.theia-button.secondary {
background-color: #b5c8c9;
color: #000;
box-shadow: 0 4px #95a5a6;
}
button.theia-button.main {
color: #fff;
background-color: #00979c;
box-shadow: 0 4px #005c5f;
}
.dialogControl {
margin: 0 20px 30px 0;
}
.arduino-boards-toolbar-item-container {
margin-left: 3px;
}
.arduino-boards-toolbar-item-container .arduino-boards-toolbar-item .inner-container {
display: flex;
align-items: baseline;
width: 100%;
}
.arduino-boards-toolbar-item-container .arduino-boards-toolbar-item .inner-container .notAttached {
width: 10px;
height: 10px;
color: red;
margin: 0 5px;
}
.arduino-boards-toolbar-item-container {
display: flex;
align-items: center;
width: 220px;
}
.arduino-boards-toolbar-item .label {
height: 100%;
display: flex;
align-items: center;
margin: 0 5px;
width: 100%;
font-weight: bold;
}
.arduino-boards-toolbar-item .caret {
width: 10px;
margin-right: 5px;
}
.arduino-boards-toolbar-item {
background: white;
height: 22px;
display: flex;
width: 100%;
overflow: hidden;
}
.arduino-boards-dropdown-list {
background: #f7f7f7;
border: 3px solid var(--theia-border-color2);
margin: -3px;
}
.arduino-boards-dropdown-item {
font-size: var(--theia-ui-font-size1);
display: flex;
padding: 10px;
cursor: pointer;
}
.arduino-boards-dropdown-item .fa-check {
color: var(--theia-accent-color2);
}
.arduino-boards-dropdown-item.selected,
.arduino-boards-dropdown-item:hover {
background: var(--theia-ui-button-color-secondary-hover);
}

View File

@@ -0,0 +1,15 @@
#theia-top-panel {
min-height: 64px;
flex-direction: column;
}
.p-TabBar-toolbar {
justify-content: flex-end;
margin: 0;
padding-left: 10px;
width: 100%;
}
.p-MenuBar-item.p-mod-active {
color: var(--theia-ui-bar-font-color0);
}

View File

@@ -1,2 +1,3 @@
@import './list-widget.css';
@import './select-board-dialog.css';
@import './board-select-dialog.css';
@import './main.css';

View File

@@ -8,7 +8,12 @@
}
.arduino-list-widget .search-bar {
margin: 0 10px 0 15px;
margin: 0px 10px 10px 15px;
border-color: var(--theia-border-color3);
}
.arduino-list-widget .search-filters {
margin: 0px 10px 0px 15px;
border-color: var(--theia-border-color3);
}
@@ -16,10 +21,44 @@
border-color: var(--theia-accent-color3);
}
.arduino-list-widget .filterable-list-container .search-filters .filter {
margin: 0px 0px 10px 0px;
display: flex;
}
.arduino-list-widget .filterable-list-container .search-filters .filter .title {
margin: 0px 10px 0px 0px;
align-self: center;
text-transform: uppercase;
font-size: var(--theia-ui-font-size0);
}
.arduino-list-widget .filterable-list-container .search-filters .filter > select {
width: 100%;
}
.filterable-list-container {
display: flex;
flex-direction: column;
align-items: stretch;
height: 100%; /* This has top be 100% down to the `scrollContainer`. */
}
.filterable-list-container .items-container {
height: 100%; /* This has to be propagated down from the widget. */
position: relative; /* To fix the `top` of the vertical toolbar. */
}
.filterable-list-container .items-container > div:nth-child(odd) {
background-color: var(--theia-layout-color2);
}
.filterable-list-container .items-container > div:nth-child(even) {
background-color: var(--theia-layout-color0);
}
.filterable-list-container .items-container > div:hover {
background-color: var(--theia-layout-color1);
}
.component-list-item {
@@ -61,6 +100,10 @@
color: var(--theia-ui-font-color2);
}
.component-list-item:hover .header .author {
color: var(--theia-ui-font-color1);
}
.component-list-item .header .version {
color: var(--theia-ui-font-color2);
}
@@ -76,18 +119,35 @@
color: var(--theia-inverse-ui-font-color0);
}
.component-list-item .footer {
padding-top: 5px;
.component-list-item[min-width~="170px"] .footer {
padding: 5px 5px 0px 0px;
min-height: 26px; /* 21 + 5 from the footer margin top */
display: flex;
flex-direction: row-reverse;
}
.component-list-item .footer a {
.component-list-item .footer {
flex-direction: column-reverse;
}
.component-list-item .footer > * {
display: none
}
.component-list-item:hover .footer > * {
display: block;
margin: 5px 0px 0px 10px;
}
.component-list-item:hover .footer > label {
display: block;
align-self: center;
margin: 5px 0px 0px 10px;
}
.component-list-item .info a {
color: var(--theia-brand-color1);
text-decoration: none;
font-weight: 600;
}
.component-list-item .footer .install {
margin-left: auto;
}
.component-list-item a:hover {

View File

@@ -0,0 +1,102 @@
.p-TabBar[data-orientation='horizontal'].theia-app-bottom {
background: var(--theia-layout-color1);
}
.theia-output {
background: var(--theia-arduino-terminal);
}
#outputView {
color: var(--theia-ui-font-color3);
}
#arduino-verify.arduino-tool-icon:hover,
#arduino-save-file.arduino-tool-icon:hover,
#arduino-show-open-context-menu.arduino-tool-icon:hover,
#arduino-upload.arduino-tool-icon:hover {
background-position-y: 60px;
}
#arduino-verify.arduino-tool-icon,
#arduino-save-file.arduino-tool-icon,
#arduino-show-open-context-menu.arduino-tool-icon,
#arduino-upload.arduino-tool-icon {
height: 24px;
width: 24px;
}
#arduino-save-file {
background: url(../icons/buttons.svg);
background-size: 800%;
background-position-y: 28px;
background-position-x: 59px;
}
#arduino-verify {
background: url(../icons/buttons.svg);
background-size: 800%;
background-position-y: 28px;
background-position-x: 188px;
}
#arduino-upload {
background: url(../icons/buttons.svg);
background-size: 800%;
background-position-y: 28px;
background-position-x: 156px;
}
#arduino-show-open-context-menu {
background: url(../icons/buttons.svg);
background-size: 800%;
background-position-y: 28px;
background-position-x: 92px;
}
.p-TabBar-toolbar .item.arduino-tool-item {
margin-left: 3px;
}
.arduino-tool-item.item.connected-boards {
opacity: 1;
}
.arduino-tool-item.item.connected-boards select {
line-height: var(--theia-content-line-height);
font-size: var(--theia-ui-font-size1);
color: var(--theia-ui-font-color1);
-webkit-appearance: none;
-moz-appearance: none;
background-image: linear-gradient(45deg, transparent 50%, var(--theia-ui-font-color1) 50%), linear-gradient(135deg, var(--theia-ui-font-color1) 50%, transparent 50%);
background-position: calc(100% - 6px) 8px, calc(100% - 2px) 8px, 100% 0;
background-size: 4px 5px;
background-repeat: no-repeat;
padding-left: 3px;
padding-right: 15px;
}
.p-Widget.p-TabBar.theia-app-centers.theia-app-bottom .p-TabBar-content-container.ps {
display: none;
}
.arduino-toolbar-tooltip {
margin-left: 10px;
display: flex;
align-items: center;
color: var(--theia-ui-font-color3);
}
.monaco-editor .margin {
border-right: 2px solid var(--theia-border-color1);
box-sizing: border-box;
}
.noWrapInfo {
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.theia-sidepanel-toolbar .theia-sidepanel-title {
margin-left: 10px;
}

View File

@@ -1,13 +0,0 @@
.select-board-dialog {
width: 600px;
}
.select-board-dialog input {
width: calc(100% - 8px);
margin-bottom: 5px;
}
.select-board-dialog select {
width: 100%;
}

View File

@@ -0,0 +1,26 @@
import { FrontendApplicationContribution, FrontendApplication } from "@theia/core/lib/browser";
import { injectable, inject } from "inversify";
import { ArduinoToolbar } from "./arduino-toolbar";
import { TabBarToolbarRegistry } from "@theia/core/lib/browser/shell/tab-bar-toolbar";
import { CommandRegistry } from "@theia/core";
import { LabelParser } from "@theia/core/lib/browser/label-parser";
@injectable()
export class ArduinoToolbarContribution implements FrontendApplicationContribution {
protected toolbarWidget: ArduinoToolbar;
constructor(
@inject(TabBarToolbarRegistry) protected tabBarToolBarRegistry: TabBarToolbarRegistry,
@inject(CommandRegistry) protected commandRegistry: CommandRegistry,
@inject(LabelParser) protected labelParser: LabelParser) {
this.toolbarWidget = new ArduinoToolbar(tabBarToolBarRegistry, commandRegistry, labelParser);
}
onStart(app: FrontendApplication) {
app.shell.addWidget(this.toolbarWidget, {
area: 'top'
})
}
}

View File

@@ -0,0 +1,109 @@
import * as React from 'react';
import { TabBarToolbar, TabBarToolbarRegistry, TabBarToolbarItem, ReactTabBarToolbarItem } from '@theia/core/lib/browser/shell/tab-bar-toolbar';
import { CommandRegistry } from '@theia/core/lib/common/command';
import { ReactWidget } from '@theia/core/lib/browser';
import { LabelParser } from '@theia/core/lib/browser/label-parser';
export const ARDUINO_TOOLBAR_ITEM_CLASS = 'arduino-tool-item';
export namespace ArduinoToolbarComponent {
export interface Props {
items: (TabBarToolbarItem | ReactTabBarToolbarItem)[],
commands: CommandRegistry,
commandIsEnabled: (id: string) => boolean,
executeCommand: (e: React.MouseEvent<HTMLElement>) => void
}
export interface State {
tooltip: string
}
}
export class ArduinoToolbarComponent extends React.Component<ArduinoToolbarComponent.Props, ArduinoToolbarComponent.State> {
constructor(props: ArduinoToolbarComponent.Props) {
super(props);
this.state = { tooltip: '' };
}
protected renderItem = (item: TabBarToolbarItem) => {
let innerText = '';
const command = this.props.commands.getCommand(item.command);
const cls = `${ARDUINO_TOOLBAR_ITEM_CLASS} ${TabBarToolbar.Styles.TAB_BAR_TOOLBAR_ITEM} ${command && this.props.commandIsEnabled(command.id) ? ' enabled' : ''}`
return <div key={item.id}
className={cls} >
<div
key={item.id + '-icon'}
id={item.id}
className={`${item.id} arduino-tool-icon`}
onClick={this.props.executeCommand}
onMouseOver={() => this.setState({ tooltip: item.tooltip || '' })}
onMouseOut={() => this.setState({ tooltip: '' })}
title={item.tooltip}>
{innerText}
</div>
</div>
}
render(): React.ReactNode {
return <React.Fragment>
<div key='arduino-toolbar-tooltip' className={'arduino-toolbar-tooltip'}>{this.state.tooltip}</div>
{[...this.props.items].map(item => TabBarToolbarItem.is(item) ? this.renderItem(item) : item.render())}
</React.Fragment>;
}
}
export class ArduinoToolbar extends ReactWidget {
protected items = new Map<string, TabBarToolbarItem | ReactTabBarToolbarItem>();
constructor(
protected readonly tabBarToolbarRegistry: TabBarToolbarRegistry,
protected readonly commands: CommandRegistry,
protected readonly labelParser: LabelParser
) {
super();
this.id = 'arduino-toolbar';
this.addClass(TabBarToolbar.Styles.TAB_BAR_TOOLBAR);
this.init();
this.tabBarToolbarRegistry.onDidChange(() => this.updateToolbar());
}
protected updateItems(items: Array<TabBarToolbarItem | ReactTabBarToolbarItem>): void {
this.items.clear();
const revItems = items.reverse();
for (const item of revItems) {
this.items.set(item.id, item);
}
this.update();
}
protected updateToolbar(): void {
const items = this ? this.tabBarToolbarRegistry.visibleItems(this) : [];
this.updateItems(items);
}
protected init(): void {
this.node.classList.add('theia-arduino-toolbar');
this.update();
}
protected readonly doCommandIsEnabled = (id: string) => this.commandIsEnabled(id);
protected commandIsEnabled(command: string): boolean {
return this.commands.isEnabled(command, this);
}
protected render(): React.ReactNode {
return <ArduinoToolbarComponent
items={[...this.items.values()]}
commands={this.commands}
commandIsEnabled={this.doCommandIsEnabled}
executeCommand={this.executeCommand}
/>
}
protected executeCommand = (e: React.MouseEvent<HTMLElement>) => {
const item = this.items.get(e.currentTarget.id);
if (TabBarToolbarItem.is(item)) {
this.commands.executeCommand(item.command, this, e.target);
}
}
}

View File

@@ -4,8 +4,8 @@ export const BoardsServicePath = '/services/boards-service';
export const BoardsService = Symbol('BoardsService');
export interface BoardsService {
getAttachedBoards(): Promise<{ boards: Board[] }>;
selectBoard(board: Board): Promise<void>;
getSelectBoard(): Promise<Board | undefined>;
selectBoard(board: Board | AttachedSerialBoard | AttachedNetworkBoard): Promise<void>;
getSelectBoard(): Promise<Board | AttachedSerialBoard | AttachedNetworkBoard | undefined>;
search(options: { query?: string }): Promise<{ items: BoardPackage[] }>;
install(item: BoardPackage): Promise<void>;
@@ -23,31 +23,21 @@ export interface Board {
export interface AttachedSerialBoard extends Board {
port: string;
serialNumber: string;
productID: string;
vendorID: string;
}
export namespace AttachedSerialBoard {
export function is(b: Board): b is AttachedSerialBoard {
return 'port' in b
&& 'serialNumber' in b
&& 'productID' in b
&& 'vendorID' in b;
return 'port' in b;
}
}
export interface AttachedNetworkBoard extends Board {
info: string;
address: string;
port: number;
port: string;
}
export namespace AttachedNetworkBoard {
export function is(b: Board): b is AttachedNetworkBoard {
return 'name' in b
&& 'info' in b
&& 'address' in b
&& 'port' in b;
return 'address' in b && 'port' in b;
}
}

View File

@@ -3,10 +3,18 @@ import { ArduinoComponent } from "./arduino-component";
export const LibraryServicePath = '/services/library-service';
export const LibraryService = Symbol('LibraryService');
export interface LibraryService {
search(options: { query?: string }): Promise<{ items: Library[] }>;
search(options: { query?: string, props?: LibraryService.Search.Props }): Promise<{ items: Library[] }>;
install(library: Library): Promise<void>;
}
export namespace LibraryService {
export namespace Search {
export interface Props {
[key: string]: string | undefined;
}
}
}
export interface Library extends ArduinoComponent {
readonly builtIn?: boolean;
}

View File

@@ -0,0 +1,13 @@
import { FileStat } from "@theia/filesystem/lib/common";
export const SketchesServicePath = '/services/sketches-service';
export const SketchesService = Symbol('SketchesService');
export interface SketchesService {
getSketches(fileStat?: FileStat): Promise<Sketch[]>
getSketchFiles(fileStat: FileStat): Promise<string[]>
}
export interface Sketch {
name: string;
uri: string
}

View File

@@ -0,0 +1,27 @@
import * as electron from 'electron';
import { injectable } from "inversify";
import { ElectronMenuContribution } from "@theia/core/lib/electron-browser/menu/electron-menu-contribution";
import { FrontendApplication } from "@theia/core/lib/browser";
import { isOSX } from '@theia/core';
@injectable()
export class ElectronArduinoMenuContribution extends ElectronMenuContribution {
onStart(app: FrontendApplication): void {
const currentWindow = electron.remote.getCurrentWindow();
const createdMenuBar = this.factory.createMenuBar();
if (isOSX) {
electron.remote.Menu.setApplicationMenu(createdMenuBar);
currentWindow.on('focus', () =>
// OSX: Recreate the menus when changing windows.
// OSX only has one menu bar for all windows, so we need to swap
// between them as the user switch windows.
electron.remote.Menu.setApplicationMenu(this.factory.createMenuBar())
);
} else {
// Unix/Windows: Set the per-window menus
currentWindow.setMenu(createdMenuBar);
}
}
}

View File

@@ -0,0 +1,8 @@
import { ContainerModule } from "inversify";
import { ElectronMenuContribution } from "@theia/core/lib/electron-browser/menu/electron-menu-contribution"
import { ElectronArduinoMenuContribution } from "./electron-arduino-menu-contribution";
export default new ContainerModule((bind, unbind, isBound, rebind) => {
bind(ElectronArduinoMenuContribution).toSelf().inSingletonScope();
rebind(ElectronMenuContribution).to(ElectronArduinoMenuContribution);
})

View File

@@ -17,6 +17,8 @@ import { ConnectionHandler, JsonRpcConnectionHandler } from '@theia/core';
import { ToolOutputServiceServerImpl } from './tool-output-service-impl';
import { DefaultWorkspaceServerExt } from './default-workspace-server-ext';
import { WorkspaceServer } from '@theia/workspace/lib/common';
import { SketchesServiceImpl } from './sketches-service-impl';
import { SketchesService, SketchesServicePath } from '../common/protocol/sketches-service';
export default new ContainerModule((bind, unbind, isBound, rebind) => {
bind(ArduinoDaemon).toSelf().inSingletonScope();
@@ -30,6 +32,14 @@ export default new ContainerModule((bind, unbind, isBound, rebind) => {
});
bind(ConnectionContainerModule).toConstantValue(libraryServiceConnectionModule);
// Sketches service
const sketchesServiceConnectionModule = ConnectionContainerModule.create(({ bind, bindBackendService }) => {
bind(SketchesServiceImpl).toSelf().inSingletonScope();
bind(SketchesService).toService(SketchesServiceImpl);
bindBackendService(SketchesServicePath, SketchesService);
});
bind(ConnectionContainerModule).toConstantValue(sketchesServiceConnectionModule);
// Boards service
const boardsServiceConnectionModule = ConnectionContainerModule.create(({ bind, bindBackendService }) => {
bind(BoardsServiceImpl).toSelf().inSingletonScope();

View File

@@ -1,6 +1,8 @@
import * as which from 'which';
import * as os from 'os';
import { exec, ChildProcess } from 'child_process';
import { join, resolve } from 'path';
import { join, delimiter } from 'path';
import { exec } from 'child_process';
import { ChildProcess } from 'child_process';
import { inject, injectable, named } from 'inversify';
import { ILogger } from '@theia/core/lib/common/logger';
import { BackendApplicationContribution } from '@theia/core/lib/node';
@@ -8,11 +10,12 @@ import { Deferred } from '@theia/core/lib/common/promise-util';
import { DaemonLog } from './daemon-log';
import { ToolOutputServiceServer } from '../common/protocol/tool-output-service';
const EXECUTABLE_PATH = resolve(join(__dirname, '..', '..', 'build', `arduino-cli.${os.platform()}`))
@injectable()
export class ArduinoDaemon implements BackendApplicationContribution {
// Set this to `true` if you want to connect to a CLI running in debug mode.
static DEBUG_CLI = false;
@inject(ILogger)
@named('daemon')
protected readonly logger: ILogger
@@ -26,7 +29,19 @@ export class ArduinoDaemon implements BackendApplicationContribution {
async onStart() {
try {
const daemon = exec(`${EXECUTABLE_PATH} --debug daemon`, (err, stdout, stderr) => {
if (!ArduinoDaemon.DEBUG_CLI) {
const build = join(__dirname, '..', '..', 'build');
const executable = await new Promise<string>((resolve, reject) => {
which(`arduino-cli${os.platform() === 'win32' ? '.exe' : ''}`, { path: `${process.env.PATH}${delimiter}${build}` }, (err, path) => {
if (err) {
reject(err);
return;
}
resolve(path);
});
});
this.logger.info(`>>> Starting 'arduino-cli' daemon... [${executable}]`);
const daemon = exec(`${executable} --debug daemon`, (err, stdout, stderr) => {
if (err || stderr) {
console.log(err || new Error(stderr));
return;
@@ -49,9 +64,15 @@ export class ArduinoDaemon implements BackendApplicationContribution {
daemon.on('exit', (code, signal) => DaemonLog.log(this.logger, `Daemon exited with code: ${code}. Signal was: ${signal}.`));
}
this.process = daemon;
}
await new Promise((resolve, reject) => setTimeout(resolve, 2000));
await new Promise(resolve => setTimeout(resolve, 2000));
this.isReady.resolve();
if (!ArduinoDaemon.DEBUG_CLI) {
this.logger.info(`<<< The 'arduino-cli' daemon is up an 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'));
}

View File

@@ -1,8 +1,9 @@
import * as PQueue from 'p-queue';
import { injectable, inject } from 'inversify';
import { BoardsService, AttachedSerialBoard, AttachedNetworkBoard, BoardPackage, Board } from '../common/protocol/boards-service';
import { PlatformSearchReq, PlatformSearchResp, PlatformInstallReq, PlatformInstallResp, PlatformListReq, PlatformListResp } from './cli-protocol/core_pb';
import { BoardsService, AttachedSerialBoard, BoardPackage, Board, AttachedNetworkBoard } from '../common/protocol/boards-service';
import { PlatformSearchReq, PlatformSearchResp, PlatformInstallReq, PlatformInstallResp, PlatformListReq, PlatformListResp } from './cli-protocol/commands/core_pb';
import { CoreClientProvider } from './core-client-provider';
import { BoardListReq, BoardListResp } from './cli-protocol/board_pb';
import { BoardListReq, BoardListResp } from './cli-protocol/commands/board_pb';
import { ToolOutputServiceServer } from '../common/protocol/tool-output-service';
@injectable()
@@ -15,35 +16,48 @@ export class BoardsServiceImpl implements BoardsService {
protected readonly toolOutputService: ToolOutputServiceServer;
protected selectedBoard: Board | undefined;
protected readonly queue = new PQueue({ autoStart: true, concurrency: 1 });
public async getAttachedBoards(): Promise<{ boards: Board[] }> {
return this.queue.add(() => {
return new Promise<{ boards: Board[] }>(async resolve => {
const coreClient = await this.coreClientProvider.getClient();
const boards: Board[] = [];
if (!coreClient) {
return { boards: [] };
resolve({ boards });
return;
}
const { client, instance } = coreClient;
const { client, instance } = coreClient;
const req = new BoardListReq();
req.setInstance(instance);
const resp = await new Promise<BoardListResp>((resolve, reject) => client.boardList(req, (err, resp) => (!!err ? reject : resolve)(!!err ? err : resp)));
const serialBoards: Board[] = resp.getSerialList().map(b => <AttachedSerialBoard>{
name: b.getName() || "unknown",
fqbn: b.getFqbn(),
port: b.getPort(),
serialNumber: b.getSerialnumber(),
productID: b.getProductid(),
vendorID: b.getVendorid()
for (const portsList of resp.getPortsList()) {
const protocol = portsList.getProtocol();
const address = portsList.getAddress();
for (const board of portsList.getBoardsList()) {
const name = board.getName() || 'unknown';
const fqbn = board.getFqbn();
const port = address;
if (protocol === 'serial') {
boards.push(<AttachedSerialBoard>{
name,
fqbn,
port
});
const networkBoards: Board[] = resp.getNetworkList().map(b => <AttachedNetworkBoard>{
name: b.getName(),
fqbn: b.getFqbn(),
address: b.getAddress(),
info: b.getInfo(),
port: b.getPort(),
} else { // We assume, it is a `network` board.
boards.push(<AttachedNetworkBoard>{
name,
fqbn,
address,
port
});
}
}
}
resolve({boards});
})
});
return { boards: serialBoards.concat(networkBoards) };
}
async selectBoard(board: Board): Promise<void> {
@@ -75,7 +89,7 @@ export class BoardsServiceImpl implements BoardsService {
let items = resp.getSearchOutputList().map(item => {
let installedVersion: string | undefined;
const matchingPlatform = installedPlatforms.find(ip => ip.getId().startsWith(`${item.getId()}@`));
const matchingPlatform = installedPlatforms.find(ip => ip.getId().startsWith(`${item.getId()}`));
if (!!matchingPlatform) {
installedVersion = matchingPlatform.getInstalled();
}
@@ -83,8 +97,8 @@ export class BoardsServiceImpl implements BoardsService {
const result: BoardPackage = {
id: item.getId(),
name: item.getName(),
author: item.getAuthor(),
availableVersions: [ item.getVersion() ],
author: item.getMaintainer(),
availableVersions: [item.getInstalled()],
description: item.getBoardsList().map(b => b.getName()).join(", "),
installable: true,
summary: "Boards included in this package:",
@@ -104,7 +118,7 @@ export class BoardsServiceImpl implements BoardsService {
}
const { client, instance } = coreClient;
const [ platform, boardName ] = pkg.id.split(":");
const [platform, boardName] = pkg.id.split(":");
const req = new PlatformInstallReq();
req.setInstance(instance);

File diff suppressed because it is too large Load Diff

View File

@@ -1,17 +1,17 @@
// package: arduino
// file: board.proto
// package: cc.arduino.cli.commands
// file: commands/board.proto
/* tslint:disable */
import * as jspb from "google-protobuf";
import * as common_pb from "./common_pb";
import * as commands_common_pb from "../commands/common_pb";
export class BoardDetailsReq extends jspb.Message {
hasInstance(): boolean;
clearInstance(): void;
getInstance(): common_pb.Instance | undefined;
setInstance(value?: common_pb.Instance): void;
getInstance(): commands_common_pb.Instance | undefined;
setInstance(value?: commands_common_pb.Instance): void;
getFqbn(): string;
setFqbn(value: string): void;
@@ -29,7 +29,7 @@ export class BoardDetailsReq extends jspb.Message {
export namespace BoardDetailsReq {
export type AsObject = {
instance?: common_pb.Instance.AsObject,
instance?: commands_common_pb.Instance.AsObject,
fqbn: string,
}
}
@@ -156,12 +156,72 @@ export namespace RequiredTool {
}
}
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(): common_pb.Instance | undefined;
setInstance(value?: common_pb.Instance): void;
getInstance(): commands_common_pb.Instance | undefined;
setInstance(value?: commands_common_pb.Instance): void;
serializeBinary(): Uint8Array;
@@ -176,20 +236,15 @@ export class BoardListReq extends jspb.Message {
export namespace BoardListReq {
export type AsObject = {
instance?: common_pb.Instance.AsObject,
instance?: commands_common_pb.Instance.AsObject,
}
}
export class BoardListResp extends jspb.Message {
clearSerialList(): void;
getSerialList(): Array<AttachedSerialBoard>;
setSerialList(value: Array<AttachedSerialBoard>): void;
addSerial(value?: AttachedSerialBoard, index?: number): AttachedSerialBoard;
clearNetworkList(): void;
getNetworkList(): Array<AttachedNetworkBoard>;
setNetworkList(value: Array<AttachedNetworkBoard>): void;
addNetwork(value?: AttachedNetworkBoard, index?: number): AttachedNetworkBoard;
clearPortsList(): void;
getPortsList(): Array<DetectedPort>;
setPortsList(value: Array<DetectedPort>): void;
addPorts(value?: DetectedPort, index?: number): DetectedPort;
serializeBinary(): Uint8Array;
@@ -204,85 +259,119 @@ export class BoardListResp extends jspb.Message {
export namespace BoardListResp {
export type AsObject = {
serialList: Array<AttachedSerialBoard.AsObject>,
networkList: Array<AttachedNetworkBoard.AsObject>,
portsList: Array<DetectedPort.AsObject>,
}
}
export class AttachedNetworkBoard extends jspb.Message {
getName(): string;
setName(value: string): void;
getFqbn(): string;
setFqbn(value: string): void;
getInfo(): string;
setInfo(value: string): void;
export class DetectedPort extends jspb.Message {
getAddress(): string;
setAddress(value: string): void;
getPort(): number;
setPort(value: number): 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): AttachedNetworkBoard.AsObject;
static toObject(includeInstance: boolean, msg: AttachedNetworkBoard): AttachedNetworkBoard.AsObject;
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: AttachedNetworkBoard, writer: jspb.BinaryWriter): void;
static deserializeBinary(bytes: Uint8Array): AttachedNetworkBoard;
static deserializeBinaryFromReader(message: AttachedNetworkBoard, reader: jspb.BinaryReader): AttachedNetworkBoard;
static serializeBinaryToWriter(message: DetectedPort, writer: jspb.BinaryWriter): void;
static deserializeBinary(bytes: Uint8Array): DetectedPort;
static deserializeBinaryFromReader(message: DetectedPort, reader: jspb.BinaryReader): DetectedPort;
}
export namespace AttachedNetworkBoard {
export namespace DetectedPort {
export type AsObject = {
name: string,
fqbn: string,
info: string,
address: string,
port: number,
protocol: string,
protocolLabel: string,
boardsList: Array<BoardListItem.AsObject>,
}
}
export class AttachedSerialBoard extends jspb.Message {
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;
getPort(): string;
setPort(value: string): void;
getSerialnumber(): string;
setSerialnumber(value: string): void;
getProductid(): string;
setProductid(value: string): void;
getVendorid(): string;
setVendorid(value: string): void;
serializeBinary(): Uint8Array;
toObject(includeInstance?: boolean): AttachedSerialBoard.AsObject;
static toObject(includeInstance: boolean, msg: AttachedSerialBoard): AttachedSerialBoard.AsObject;
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: AttachedSerialBoard, writer: jspb.BinaryWriter): void;
static deserializeBinary(bytes: Uint8Array): AttachedSerialBoard;
static deserializeBinaryFromReader(message: AttachedSerialBoard, reader: jspb.BinaryReader): AttachedSerialBoard;
static serializeBinaryToWriter(message: BoardListItem, writer: jspb.BinaryWriter): void;
static deserializeBinary(bytes: Uint8Array): BoardListItem;
static deserializeBinaryFromReader(message: BoardListItem, reader: jspb.BinaryReader): BoardListItem;
}
export namespace AttachedSerialBoard {
export namespace BoardListItem {
export type AsObject = {
name: string,
fqbn: string,
port: string,
serialnumber: string,
productid: string,
vendorid: string,
}
}

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,409 @@
// package: cc.arduino.cli.commands
// file: commands/commands.proto
/* tslint: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;
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_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>;
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>;
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 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;
}

View File

@@ -0,0 +1,839 @@
// GENERATED CODE -- DO NOT EDIT!
// Original file comments:
//
// This file is part of arduino-cli.
//
// Copyright 2018 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_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,
},
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
// -------------------

View File

@@ -1,15 +1,15 @@
// package: arduino
// file: commands.proto
// package: cc.arduino.cli.commands
// file: commands/commands.proto
/* tslint:disable */
import * as jspb from "google-protobuf";
import * as common_pb from "./common_pb";
import * as board_pb from "./board_pb";
import * as compile_pb from "./compile_pb";
import * as core_pb from "./core_pb";
import * as upload_pb from "./upload_pb";
import * as lib_pb from "./lib_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";
export class Configuration extends jspb.Message {
getDatadir(): string;
@@ -78,8 +78,8 @@ export class InitResp extends jspb.Message {
hasInstance(): boolean;
clearInstance(): void;
getInstance(): common_pb.Instance | undefined;
setInstance(value?: common_pb.Instance): void;
getInstance(): commands_common_pb.Instance | undefined;
setInstance(value?: commands_common_pb.Instance): void;
clearPlatformsIndexErrorsList(): void;
getPlatformsIndexErrorsList(): Array<string>;
@@ -90,6 +90,18 @@ export class InitResp extends jspb.Message {
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;
@@ -102,9 +114,11 @@ export class InitResp extends jspb.Message {
export namespace InitResp {
export type AsObject = {
instance?: common_pb.Instance.AsObject,
instance?: commands_common_pb.Instance.AsObject,
platformsIndexErrorsList: Array<string>,
librariesIndexError: string,
downloadProgress?: commands_common_pb.DownloadProgress.AsObject,
taskProgress?: commands_common_pb.TaskProgress.AsObject,
}
}
@@ -112,8 +126,8 @@ export class DestroyReq extends jspb.Message {
hasInstance(): boolean;
clearInstance(): void;
getInstance(): common_pb.Instance | undefined;
setInstance(value?: common_pb.Instance): void;
getInstance(): commands_common_pb.Instance | undefined;
setInstance(value?: commands_common_pb.Instance): void;
serializeBinary(): Uint8Array;
@@ -128,7 +142,7 @@ export class DestroyReq extends jspb.Message {
export namespace DestroyReq {
export type AsObject = {
instance?: common_pb.Instance.AsObject,
instance?: commands_common_pb.Instance.AsObject,
}
}
@@ -153,8 +167,8 @@ export class RescanReq extends jspb.Message {
hasInstance(): boolean;
clearInstance(): void;
getInstance(): common_pb.Instance | undefined;
setInstance(value?: common_pb.Instance): void;
getInstance(): commands_common_pb.Instance | undefined;
setInstance(value?: commands_common_pb.Instance): void;
serializeBinary(): Uint8Array;
@@ -169,7 +183,7 @@ export class RescanReq extends jspb.Message {
export namespace RescanReq {
export type AsObject = {
instance?: common_pb.Instance.AsObject,
instance?: commands_common_pb.Instance.AsObject,
}
}
@@ -204,8 +218,8 @@ export class UpdateIndexReq extends jspb.Message {
hasInstance(): boolean;
clearInstance(): void;
getInstance(): common_pb.Instance | undefined;
setInstance(value?: common_pb.Instance): void;
getInstance(): commands_common_pb.Instance | undefined;
setInstance(value?: commands_common_pb.Instance): void;
serializeBinary(): Uint8Array;
@@ -220,7 +234,7 @@ export class UpdateIndexReq extends jspb.Message {
export namespace UpdateIndexReq {
export type AsObject = {
instance?: common_pb.Instance.AsObject,
instance?: commands_common_pb.Instance.AsObject,
}
}
@@ -228,8 +242,8 @@ export class UpdateIndexResp extends jspb.Message {
hasDownloadProgress(): boolean;
clearDownloadProgress(): void;
getDownloadProgress(): common_pb.DownloadProgress | undefined;
setDownloadProgress(value?: common_pb.DownloadProgress): void;
getDownloadProgress(): commands_common_pb.DownloadProgress | undefined;
setDownloadProgress(value?: commands_common_pb.DownloadProgress): void;
serializeBinary(): Uint8Array;
@@ -244,6 +258,92 @@ export class UpdateIndexResp extends jspb.Message {
export namespace UpdateIndexResp {
export type AsObject = {
downloadProgress?: common_pb.DownloadProgress.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

View File

@@ -1,5 +1,5 @@
// package: arduino
// file: common.proto
// package: cc.arduino.cli.commands
// file: commands/common.proto
/* tslint:disable */

View File

@@ -11,9 +11,9 @@ var jspb = require('google-protobuf');
var goog = jspb;
var global = Function('return this')();
goog.exportSymbol('proto.arduino.DownloadProgress', null, global);
goog.exportSymbol('proto.arduino.Instance', null, global);
goog.exportSymbol('proto.arduino.TaskProgress', null, global);
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.
@@ -25,12 +25,12 @@ goog.exportSymbol('proto.arduino.TaskProgress', null, global);
* @extends {jspb.Message}
* @constructor
*/
proto.arduino.Instance = function(opt_data) {
proto.cc.arduino.cli.commands.Instance = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(proto.arduino.Instance, jspb.Message);
goog.inherits(proto.cc.arduino.cli.commands.Instance, jspb.Message);
if (goog.DEBUG && !COMPILED) {
proto.arduino.Instance.displayName = 'proto.arduino.Instance';
proto.cc.arduino.cli.commands.Instance.displayName = 'proto.cc.arduino.cli.commands.Instance';
}
@@ -45,8 +45,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) {
* for transitional soy proto support: http://goto/soy-param-migration
* @return {!Object}
*/
proto.arduino.Instance.prototype.toObject = function(opt_includeInstance) {
return proto.arduino.Instance.toObject(opt_includeInstance, this);
proto.cc.arduino.cli.commands.Instance.prototype.toObject = function(opt_includeInstance) {
return proto.cc.arduino.cli.commands.Instance.toObject(opt_includeInstance, this);
};
@@ -55,11 +55,11 @@ proto.arduino.Instance.prototype.toObject = function(opt_includeInstance) {
* @param {boolean|undefined} includeInstance Whether to include the JSPB
* instance for transitional soy proto support:
* http://goto/soy-param-migration
* @param {!proto.arduino.Instance} msg The msg instance to transform.
* @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.arduino.Instance.toObject = function(includeInstance, msg) {
proto.cc.arduino.cli.commands.Instance.toObject = function(includeInstance, msg) {
var f, obj = {
id: jspb.Message.getFieldWithDefault(msg, 1, 0)
};
@@ -75,23 +75,23 @@ proto.arduino.Instance.toObject = function(includeInstance, msg) {
/**
* Deserializes binary data (in protobuf wire format).
* @param {jspb.ByteSource} bytes The bytes to deserialize.
* @return {!proto.arduino.Instance}
* @return {!proto.cc.arduino.cli.commands.Instance}
*/
proto.arduino.Instance.deserializeBinary = function(bytes) {
proto.cc.arduino.cli.commands.Instance.deserializeBinary = function(bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.arduino.Instance;
return proto.arduino.Instance.deserializeBinaryFromReader(msg, reader);
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.arduino.Instance} msg The message object to deserialize into.
* @param {!proto.cc.arduino.cli.commands.Instance} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.arduino.Instance}
* @return {!proto.cc.arduino.cli.commands.Instance}
*/
proto.arduino.Instance.deserializeBinaryFromReader = function(msg, reader) {
proto.cc.arduino.cli.commands.Instance.deserializeBinaryFromReader = function(msg, reader) {
while (reader.nextField()) {
if (reader.isEndGroup()) {
break;
@@ -115,9 +115,9 @@ proto.arduino.Instance.deserializeBinaryFromReader = function(msg, reader) {
* Serializes the message to binary data (in protobuf wire format).
* @return {!Uint8Array}
*/
proto.arduino.Instance.prototype.serializeBinary = function() {
proto.cc.arduino.cli.commands.Instance.prototype.serializeBinary = function() {
var writer = new jspb.BinaryWriter();
proto.arduino.Instance.serializeBinaryToWriter(this, writer);
proto.cc.arduino.cli.commands.Instance.serializeBinaryToWriter(this, writer);
return writer.getResultBuffer();
};
@@ -125,11 +125,11 @@ proto.arduino.Instance.prototype.serializeBinary = function() {
/**
* Serializes the given message to binary data (in protobuf wire
* format), writing to the given BinaryWriter.
* @param {!proto.arduino.Instance} message
* @param {!proto.cc.arduino.cli.commands.Instance} message
* @param {!jspb.BinaryWriter} writer
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.arduino.Instance.serializeBinaryToWriter = function(message, writer) {
proto.cc.arduino.cli.commands.Instance.serializeBinaryToWriter = function(message, writer) {
var f = undefined;
f = message.getId();
if (f !== 0) {
@@ -145,13 +145,13 @@ proto.arduino.Instance.serializeBinaryToWriter = function(message, writer) {
* optional int32 id = 1;
* @return {number}
*/
proto.arduino.Instance.prototype.getId = function() {
proto.cc.arduino.cli.commands.Instance.prototype.getId = function() {
return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0));
};
/** @param {number} value */
proto.arduino.Instance.prototype.setId = function(value) {
proto.cc.arduino.cli.commands.Instance.prototype.setId = function(value) {
jspb.Message.setProto3IntField(this, 1, value);
};
@@ -167,12 +167,12 @@ proto.arduino.Instance.prototype.setId = function(value) {
* @extends {jspb.Message}
* @constructor
*/
proto.arduino.DownloadProgress = function(opt_data) {
proto.cc.arduino.cli.commands.DownloadProgress = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(proto.arduino.DownloadProgress, jspb.Message);
goog.inherits(proto.cc.arduino.cli.commands.DownloadProgress, jspb.Message);
if (goog.DEBUG && !COMPILED) {
proto.arduino.DownloadProgress.displayName = 'proto.arduino.DownloadProgress';
proto.cc.arduino.cli.commands.DownloadProgress.displayName = 'proto.cc.arduino.cli.commands.DownloadProgress';
}
@@ -187,8 +187,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) {
* for transitional soy proto support: http://goto/soy-param-migration
* @return {!Object}
*/
proto.arduino.DownloadProgress.prototype.toObject = function(opt_includeInstance) {
return proto.arduino.DownloadProgress.toObject(opt_includeInstance, this);
proto.cc.arduino.cli.commands.DownloadProgress.prototype.toObject = function(opt_includeInstance) {
return proto.cc.arduino.cli.commands.DownloadProgress.toObject(opt_includeInstance, this);
};
@@ -197,11 +197,11 @@ proto.arduino.DownloadProgress.prototype.toObject = function(opt_includeInstance
* @param {boolean|undefined} includeInstance Whether to include the JSPB
* instance for transitional soy proto support:
* http://goto/soy-param-migration
* @param {!proto.arduino.DownloadProgress} msg The msg instance to transform.
* @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.arduino.DownloadProgress.toObject = function(includeInstance, msg) {
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, ""),
@@ -221,23 +221,23 @@ proto.arduino.DownloadProgress.toObject = function(includeInstance, msg) {
/**
* Deserializes binary data (in protobuf wire format).
* @param {jspb.ByteSource} bytes The bytes to deserialize.
* @return {!proto.arduino.DownloadProgress}
* @return {!proto.cc.arduino.cli.commands.DownloadProgress}
*/
proto.arduino.DownloadProgress.deserializeBinary = function(bytes) {
proto.cc.arduino.cli.commands.DownloadProgress.deserializeBinary = function(bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.arduino.DownloadProgress;
return proto.arduino.DownloadProgress.deserializeBinaryFromReader(msg, reader);
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.arduino.DownloadProgress} msg The message object to deserialize into.
* @param {!proto.cc.arduino.cli.commands.DownloadProgress} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.arduino.DownloadProgress}
* @return {!proto.cc.arduino.cli.commands.DownloadProgress}
*/
proto.arduino.DownloadProgress.deserializeBinaryFromReader = function(msg, reader) {
proto.cc.arduino.cli.commands.DownloadProgress.deserializeBinaryFromReader = function(msg, reader) {
while (reader.nextField()) {
if (reader.isEndGroup()) {
break;
@@ -277,9 +277,9 @@ proto.arduino.DownloadProgress.deserializeBinaryFromReader = function(msg, reade
* Serializes the message to binary data (in protobuf wire format).
* @return {!Uint8Array}
*/
proto.arduino.DownloadProgress.prototype.serializeBinary = function() {
proto.cc.arduino.cli.commands.DownloadProgress.prototype.serializeBinary = function() {
var writer = new jspb.BinaryWriter();
proto.arduino.DownloadProgress.serializeBinaryToWriter(this, writer);
proto.cc.arduino.cli.commands.DownloadProgress.serializeBinaryToWriter(this, writer);
return writer.getResultBuffer();
};
@@ -287,11 +287,11 @@ proto.arduino.DownloadProgress.prototype.serializeBinary = function() {
/**
* Serializes the given message to binary data (in protobuf wire
* format), writing to the given BinaryWriter.
* @param {!proto.arduino.DownloadProgress} message
* @param {!proto.cc.arduino.cli.commands.DownloadProgress} message
* @param {!jspb.BinaryWriter} writer
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.arduino.DownloadProgress.serializeBinaryToWriter = function(message, writer) {
proto.cc.arduino.cli.commands.DownloadProgress.serializeBinaryToWriter = function(message, writer) {
var f = undefined;
f = message.getUrl();
if (f.length > 0) {
@@ -335,13 +335,13 @@ proto.arduino.DownloadProgress.serializeBinaryToWriter = function(message, write
* optional string url = 1;
* @return {string}
*/
proto.arduino.DownloadProgress.prototype.getUrl = function() {
proto.cc.arduino.cli.commands.DownloadProgress.prototype.getUrl = function() {
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
};
/** @param {string} value */
proto.arduino.DownloadProgress.prototype.setUrl = function(value) {
proto.cc.arduino.cli.commands.DownloadProgress.prototype.setUrl = function(value) {
jspb.Message.setProto3StringField(this, 1, value);
};
@@ -350,13 +350,13 @@ proto.arduino.DownloadProgress.prototype.setUrl = function(value) {
* optional string file = 2;
* @return {string}
*/
proto.arduino.DownloadProgress.prototype.getFile = function() {
proto.cc.arduino.cli.commands.DownloadProgress.prototype.getFile = function() {
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
};
/** @param {string} value */
proto.arduino.DownloadProgress.prototype.setFile = function(value) {
proto.cc.arduino.cli.commands.DownloadProgress.prototype.setFile = function(value) {
jspb.Message.setProto3StringField(this, 2, value);
};
@@ -365,13 +365,13 @@ proto.arduino.DownloadProgress.prototype.setFile = function(value) {
* optional int64 total_size = 3;
* @return {number}
*/
proto.arduino.DownloadProgress.prototype.getTotalSize = function() {
proto.cc.arduino.cli.commands.DownloadProgress.prototype.getTotalSize = function() {
return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0));
};
/** @param {number} value */
proto.arduino.DownloadProgress.prototype.setTotalSize = function(value) {
proto.cc.arduino.cli.commands.DownloadProgress.prototype.setTotalSize = function(value) {
jspb.Message.setProto3IntField(this, 3, value);
};
@@ -380,13 +380,13 @@ proto.arduino.DownloadProgress.prototype.setTotalSize = function(value) {
* optional int64 downloaded = 4;
* @return {number}
*/
proto.arduino.DownloadProgress.prototype.getDownloaded = function() {
proto.cc.arduino.cli.commands.DownloadProgress.prototype.getDownloaded = function() {
return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0));
};
/** @param {number} value */
proto.arduino.DownloadProgress.prototype.setDownloaded = function(value) {
proto.cc.arduino.cli.commands.DownloadProgress.prototype.setDownloaded = function(value) {
jspb.Message.setProto3IntField(this, 4, value);
};
@@ -397,13 +397,13 @@ proto.arduino.DownloadProgress.prototype.setDownloaded = function(value) {
* You should avoid comparisons like {@code val === true/false} in those cases.
* @return {boolean}
*/
proto.arduino.DownloadProgress.prototype.getCompleted = function() {
proto.cc.arduino.cli.commands.DownloadProgress.prototype.getCompleted = function() {
return /** @type {boolean} */ (jspb.Message.getFieldWithDefault(this, 5, false));
};
/** @param {boolean} value */
proto.arduino.DownloadProgress.prototype.setCompleted = function(value) {
proto.cc.arduino.cli.commands.DownloadProgress.prototype.setCompleted = function(value) {
jspb.Message.setProto3BooleanField(this, 5, value);
};
@@ -419,12 +419,12 @@ proto.arduino.DownloadProgress.prototype.setCompleted = function(value) {
* @extends {jspb.Message}
* @constructor
*/
proto.arduino.TaskProgress = function(opt_data) {
proto.cc.arduino.cli.commands.TaskProgress = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(proto.arduino.TaskProgress, jspb.Message);
goog.inherits(proto.cc.arduino.cli.commands.TaskProgress, jspb.Message);
if (goog.DEBUG && !COMPILED) {
proto.arduino.TaskProgress.displayName = 'proto.arduino.TaskProgress';
proto.cc.arduino.cli.commands.TaskProgress.displayName = 'proto.cc.arduino.cli.commands.TaskProgress';
}
@@ -439,8 +439,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) {
* for transitional soy proto support: http://goto/soy-param-migration
* @return {!Object}
*/
proto.arduino.TaskProgress.prototype.toObject = function(opt_includeInstance) {
return proto.arduino.TaskProgress.toObject(opt_includeInstance, this);
proto.cc.arduino.cli.commands.TaskProgress.prototype.toObject = function(opt_includeInstance) {
return proto.cc.arduino.cli.commands.TaskProgress.toObject(opt_includeInstance, this);
};
@@ -449,11 +449,11 @@ proto.arduino.TaskProgress.prototype.toObject = function(opt_includeInstance) {
* @param {boolean|undefined} includeInstance Whether to include the JSPB
* instance for transitional soy proto support:
* http://goto/soy-param-migration
* @param {!proto.arduino.TaskProgress} msg The msg instance to transform.
* @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.arduino.TaskProgress.toObject = function(includeInstance, msg) {
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, ""),
@@ -471,23 +471,23 @@ proto.arduino.TaskProgress.toObject = function(includeInstance, msg) {
/**
* Deserializes binary data (in protobuf wire format).
* @param {jspb.ByteSource} bytes The bytes to deserialize.
* @return {!proto.arduino.TaskProgress}
* @return {!proto.cc.arduino.cli.commands.TaskProgress}
*/
proto.arduino.TaskProgress.deserializeBinary = function(bytes) {
proto.cc.arduino.cli.commands.TaskProgress.deserializeBinary = function(bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.arduino.TaskProgress;
return proto.arduino.TaskProgress.deserializeBinaryFromReader(msg, reader);
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.arduino.TaskProgress} msg The message object to deserialize into.
* @param {!proto.cc.arduino.cli.commands.TaskProgress} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.arduino.TaskProgress}
* @return {!proto.cc.arduino.cli.commands.TaskProgress}
*/
proto.arduino.TaskProgress.deserializeBinaryFromReader = function(msg, reader) {
proto.cc.arduino.cli.commands.TaskProgress.deserializeBinaryFromReader = function(msg, reader) {
while (reader.nextField()) {
if (reader.isEndGroup()) {
break;
@@ -519,9 +519,9 @@ proto.arduino.TaskProgress.deserializeBinaryFromReader = function(msg, reader) {
* Serializes the message to binary data (in protobuf wire format).
* @return {!Uint8Array}
*/
proto.arduino.TaskProgress.prototype.serializeBinary = function() {
proto.cc.arduino.cli.commands.TaskProgress.prototype.serializeBinary = function() {
var writer = new jspb.BinaryWriter();
proto.arduino.TaskProgress.serializeBinaryToWriter(this, writer);
proto.cc.arduino.cli.commands.TaskProgress.serializeBinaryToWriter(this, writer);
return writer.getResultBuffer();
};
@@ -529,11 +529,11 @@ proto.arduino.TaskProgress.prototype.serializeBinary = function() {
/**
* Serializes the given message to binary data (in protobuf wire
* format), writing to the given BinaryWriter.
* @param {!proto.arduino.TaskProgress} message
* @param {!proto.cc.arduino.cli.commands.TaskProgress} message
* @param {!jspb.BinaryWriter} writer
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.arduino.TaskProgress.serializeBinaryToWriter = function(message, writer) {
proto.cc.arduino.cli.commands.TaskProgress.serializeBinaryToWriter = function(message, writer) {
var f = undefined;
f = message.getName();
if (f.length > 0) {
@@ -563,13 +563,13 @@ proto.arduino.TaskProgress.serializeBinaryToWriter = function(message, writer) {
* optional string name = 1;
* @return {string}
*/
proto.arduino.TaskProgress.prototype.getName = function() {
proto.cc.arduino.cli.commands.TaskProgress.prototype.getName = function() {
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
};
/** @param {string} value */
proto.arduino.TaskProgress.prototype.setName = function(value) {
proto.cc.arduino.cli.commands.TaskProgress.prototype.setName = function(value) {
jspb.Message.setProto3StringField(this, 1, value);
};
@@ -578,13 +578,13 @@ proto.arduino.TaskProgress.prototype.setName = function(value) {
* optional string message = 2;
* @return {string}
*/
proto.arduino.TaskProgress.prototype.getMessage = function() {
proto.cc.arduino.cli.commands.TaskProgress.prototype.getMessage = function() {
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
};
/** @param {string} value */
proto.arduino.TaskProgress.prototype.setMessage = function(value) {
proto.cc.arduino.cli.commands.TaskProgress.prototype.setMessage = function(value) {
jspb.Message.setProto3StringField(this, 2, value);
};
@@ -595,15 +595,15 @@ proto.arduino.TaskProgress.prototype.setMessage = function(value) {
* You should avoid comparisons like {@code val === true/false} in those cases.
* @return {boolean}
*/
proto.arduino.TaskProgress.prototype.getCompleted = function() {
proto.cc.arduino.cli.commands.TaskProgress.prototype.getCompleted = function() {
return /** @type {boolean} */ (jspb.Message.getFieldWithDefault(this, 3, false));
};
/** @param {boolean} value */
proto.arduino.TaskProgress.prototype.setCompleted = function(value) {
proto.cc.arduino.cli.commands.TaskProgress.prototype.setCompleted = function(value) {
jspb.Message.setProto3BooleanField(this, 3, value);
};
goog.object.extend(exports, proto.arduino);
goog.object.extend(exports, proto.cc.arduino.cli.commands);

View File

@@ -1,17 +1,17 @@
// package: arduino
// file: compile.proto
// package: cc.arduino.cli.commands
// file: commands/compile.proto
/* tslint:disable */
import * as jspb from "google-protobuf";
import * as common_pb from "./common_pb";
import * as commands_common_pb from "../commands/common_pb";
export class CompileReq extends jspb.Message {
hasInstance(): boolean;
clearInstance(): void;
getInstance(): common_pb.Instance | undefined;
setInstance(value?: common_pb.Instance): void;
getInstance(): commands_common_pb.Instance | undefined;
setInstance(value?: commands_common_pb.Instance): void;
getFqbn(): string;
setFqbn(value: string): void;
@@ -64,7 +64,7 @@ export class CompileReq extends jspb.Message {
export namespace CompileReq {
export type AsObject = {
instance?: common_pb.Instance.AsObject,
instance?: commands_common_pb.Instance.AsObject,
fqbn: string,
sketchpath: string,
showproperties: boolean,
@@ -92,18 +92,6 @@ export class CompileResp extends jspb.Message {
setErrStream(value: Uint8Array | string): void;
hasDownloadProgress(): boolean;
clearDownloadProgress(): void;
getDownloadProgress(): common_pb.DownloadProgress | undefined;
setDownloadProgress(value?: common_pb.DownloadProgress): void;
hasTaskProgress(): boolean;
clearTaskProgress(): void;
getTaskProgress(): common_pb.TaskProgress | undefined;
setTaskProgress(value?: common_pb.TaskProgress): void;
serializeBinary(): Uint8Array;
toObject(includeInstance?: boolean): CompileResp.AsObject;
static toObject(includeInstance: boolean, msg: CompileResp): CompileResp.AsObject;
@@ -118,7 +106,5 @@ export namespace CompileResp {
export type AsObject = {
outStream: Uint8Array | string,
errStream: Uint8Array | string,
downloadProgress?: common_pb.DownloadProgress.AsObject,
taskProgress?: common_pb.TaskProgress.AsObject,
}
}

View File

@@ -11,10 +11,10 @@ var jspb = require('google-protobuf');
var goog = jspb;
var global = Function('return this')();
var common_pb = require('./common_pb.js');
goog.object.extend(proto, common_pb);
goog.exportSymbol('proto.arduino.CompileReq', null, global);
goog.exportSymbol('proto.arduino.CompileResp', null, global);
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.
@@ -26,19 +26,19 @@ goog.exportSymbol('proto.arduino.CompileResp', null, global);
* @extends {jspb.Message}
* @constructor
*/
proto.arduino.CompileReq = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, proto.arduino.CompileReq.repeatedFields_, null);
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.arduino.CompileReq, jspb.Message);
goog.inherits(proto.cc.arduino.cli.commands.CompileReq, jspb.Message);
if (goog.DEBUG && !COMPILED) {
proto.arduino.CompileReq.displayName = 'proto.arduino.CompileReq';
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.arduino.CompileReq.repeatedFields_ = [8];
proto.cc.arduino.cli.commands.CompileReq.repeatedFields_ = [8];
@@ -53,8 +53,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) {
* for transitional soy proto support: http://goto/soy-param-migration
* @return {!Object}
*/
proto.arduino.CompileReq.prototype.toObject = function(opt_includeInstance) {
return proto.arduino.CompileReq.toObject(opt_includeInstance, this);
proto.cc.arduino.cli.commands.CompileReq.prototype.toObject = function(opt_includeInstance) {
return proto.cc.arduino.cli.commands.CompileReq.toObject(opt_includeInstance, this);
};
@@ -63,13 +63,13 @@ proto.arduino.CompileReq.prototype.toObject = function(opt_includeInstance) {
* @param {boolean|undefined} includeInstance Whether to include the JSPB
* instance for transitional soy proto support:
* http://goto/soy-param-migration
* @param {!proto.arduino.CompileReq} msg The msg instance to transform.
* @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.arduino.CompileReq.toObject = function(includeInstance, msg) {
proto.cc.arduino.cli.commands.CompileReq.toObject = function(includeInstance, msg) {
var f, obj = {
instance: (f = msg.getInstance()) && common_pb.Instance.toObject(includeInstance, f),
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),
@@ -95,23 +95,23 @@ proto.arduino.CompileReq.toObject = function(includeInstance, msg) {
/**
* Deserializes binary data (in protobuf wire format).
* @param {jspb.ByteSource} bytes The bytes to deserialize.
* @return {!proto.arduino.CompileReq}
* @return {!proto.cc.arduino.cli.commands.CompileReq}
*/
proto.arduino.CompileReq.deserializeBinary = function(bytes) {
proto.cc.arduino.cli.commands.CompileReq.deserializeBinary = function(bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.arduino.CompileReq;
return proto.arduino.CompileReq.deserializeBinaryFromReader(msg, reader);
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.arduino.CompileReq} msg The message object to deserialize into.
* @param {!proto.cc.arduino.cli.commands.CompileReq} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.arduino.CompileReq}
* @return {!proto.cc.arduino.cli.commands.CompileReq}
*/
proto.arduino.CompileReq.deserializeBinaryFromReader = function(msg, reader) {
proto.cc.arduino.cli.commands.CompileReq.deserializeBinaryFromReader = function(msg, reader) {
while (reader.nextField()) {
if (reader.isEndGroup()) {
break;
@@ -119,8 +119,8 @@ proto.arduino.CompileReq.deserializeBinaryFromReader = function(msg, reader) {
var field = reader.getFieldNumber();
switch (field) {
case 1:
var value = new common_pb.Instance;
reader.readMessage(value,common_pb.Instance.deserializeBinaryFromReader);
var value = new commands_common_pb.Instance;
reader.readMessage(value,commands_common_pb.Instance.deserializeBinaryFromReader);
msg.setInstance(value);
break;
case 2:
@@ -184,9 +184,9 @@ proto.arduino.CompileReq.deserializeBinaryFromReader = function(msg, reader) {
* Serializes the message to binary data (in protobuf wire format).
* @return {!Uint8Array}
*/
proto.arduino.CompileReq.prototype.serializeBinary = function() {
proto.cc.arduino.cli.commands.CompileReq.prototype.serializeBinary = function() {
var writer = new jspb.BinaryWriter();
proto.arduino.CompileReq.serializeBinaryToWriter(this, writer);
proto.cc.arduino.cli.commands.CompileReq.serializeBinaryToWriter(this, writer);
return writer.getResultBuffer();
};
@@ -194,18 +194,18 @@ proto.arduino.CompileReq.prototype.serializeBinary = function() {
/**
* Serializes the given message to binary data (in protobuf wire
* format), writing to the given BinaryWriter.
* @param {!proto.arduino.CompileReq} message
* @param {!proto.cc.arduino.cli.commands.CompileReq} message
* @param {!jspb.BinaryWriter} writer
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.arduino.CompileReq.serializeBinaryToWriter = function(message, writer) {
proto.cc.arduino.cli.commands.CompileReq.serializeBinaryToWriter = function(message, writer) {
var f = undefined;
f = message.getInstance();
if (f != null) {
writer.writeMessage(
1,
f,
common_pb.Instance.serializeBinaryToWriter
commands_common_pb.Instance.serializeBinaryToWriter
);
}
f = message.getFqbn();
@@ -297,21 +297,21 @@ proto.arduino.CompileReq.serializeBinaryToWriter = function(message, writer) {
/**
* optional Instance instance = 1;
* @return {?proto.arduino.Instance}
* @return {?proto.cc.arduino.cli.commands.Instance}
*/
proto.arduino.CompileReq.prototype.getInstance = function() {
return /** @type{?proto.arduino.Instance} */ (
jspb.Message.getWrapperField(this, common_pb.Instance, 1));
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.arduino.Instance|undefined} value */
proto.arduino.CompileReq.prototype.setInstance = function(value) {
/** @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.arduino.CompileReq.prototype.clearInstance = function() {
proto.cc.arduino.cli.commands.CompileReq.prototype.clearInstance = function() {
this.setInstance(undefined);
};
@@ -320,7 +320,7 @@ proto.arduino.CompileReq.prototype.clearInstance = function() {
* Returns whether this field is set.
* @return {boolean}
*/
proto.arduino.CompileReq.prototype.hasInstance = function() {
proto.cc.arduino.cli.commands.CompileReq.prototype.hasInstance = function() {
return jspb.Message.getField(this, 1) != null;
};
@@ -329,13 +329,13 @@ proto.arduino.CompileReq.prototype.hasInstance = function() {
* optional string fqbn = 2;
* @return {string}
*/
proto.arduino.CompileReq.prototype.getFqbn = function() {
proto.cc.arduino.cli.commands.CompileReq.prototype.getFqbn = function() {
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
};
/** @param {string} value */
proto.arduino.CompileReq.prototype.setFqbn = function(value) {
proto.cc.arduino.cli.commands.CompileReq.prototype.setFqbn = function(value) {
jspb.Message.setProto3StringField(this, 2, value);
};
@@ -344,13 +344,13 @@ proto.arduino.CompileReq.prototype.setFqbn = function(value) {
* optional string sketchPath = 3;
* @return {string}
*/
proto.arduino.CompileReq.prototype.getSketchpath = function() {
proto.cc.arduino.cli.commands.CompileReq.prototype.getSketchpath = function() {
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, ""));
};
/** @param {string} value */
proto.arduino.CompileReq.prototype.setSketchpath = function(value) {
proto.cc.arduino.cli.commands.CompileReq.prototype.setSketchpath = function(value) {
jspb.Message.setProto3StringField(this, 3, value);
};
@@ -361,13 +361,13 @@ proto.arduino.CompileReq.prototype.setSketchpath = function(value) {
* You should avoid comparisons like {@code val === true/false} in those cases.
* @return {boolean}
*/
proto.arduino.CompileReq.prototype.getShowproperties = function() {
proto.cc.arduino.cli.commands.CompileReq.prototype.getShowproperties = function() {
return /** @type {boolean} */ (jspb.Message.getFieldWithDefault(this, 4, false));
};
/** @param {boolean} value */
proto.arduino.CompileReq.prototype.setShowproperties = function(value) {
proto.cc.arduino.cli.commands.CompileReq.prototype.setShowproperties = function(value) {
jspb.Message.setProto3BooleanField(this, 4, value);
};
@@ -378,13 +378,13 @@ proto.arduino.CompileReq.prototype.setShowproperties = function(value) {
* You should avoid comparisons like {@code val === true/false} in those cases.
* @return {boolean}
*/
proto.arduino.CompileReq.prototype.getPreprocess = function() {
proto.cc.arduino.cli.commands.CompileReq.prototype.getPreprocess = function() {
return /** @type {boolean} */ (jspb.Message.getFieldWithDefault(this, 5, false));
};
/** @param {boolean} value */
proto.arduino.CompileReq.prototype.setPreprocess = function(value) {
proto.cc.arduino.cli.commands.CompileReq.prototype.setPreprocess = function(value) {
jspb.Message.setProto3BooleanField(this, 5, value);
};
@@ -393,13 +393,13 @@ proto.arduino.CompileReq.prototype.setPreprocess = function(value) {
* optional string buildCachePath = 6;
* @return {string}
*/
proto.arduino.CompileReq.prototype.getBuildcachepath = function() {
proto.cc.arduino.cli.commands.CompileReq.prototype.getBuildcachepath = function() {
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 6, ""));
};
/** @param {string} value */
proto.arduino.CompileReq.prototype.setBuildcachepath = function(value) {
proto.cc.arduino.cli.commands.CompileReq.prototype.setBuildcachepath = function(value) {
jspb.Message.setProto3StringField(this, 6, value);
};
@@ -408,13 +408,13 @@ proto.arduino.CompileReq.prototype.setBuildcachepath = function(value) {
* optional string buildPath = 7;
* @return {string}
*/
proto.arduino.CompileReq.prototype.getBuildpath = function() {
proto.cc.arduino.cli.commands.CompileReq.prototype.getBuildpath = function() {
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 7, ""));
};
/** @param {string} value */
proto.arduino.CompileReq.prototype.setBuildpath = function(value) {
proto.cc.arduino.cli.commands.CompileReq.prototype.setBuildpath = function(value) {
jspb.Message.setProto3StringField(this, 7, value);
};
@@ -423,13 +423,13 @@ proto.arduino.CompileReq.prototype.setBuildpath = function(value) {
* repeated string buildProperties = 8;
* @return {!Array<string>}
*/
proto.arduino.CompileReq.prototype.getBuildpropertiesList = function() {
proto.cc.arduino.cli.commands.CompileReq.prototype.getBuildpropertiesList = function() {
return /** @type {!Array<string>} */ (jspb.Message.getRepeatedField(this, 8));
};
/** @param {!Array<string>} value */
proto.arduino.CompileReq.prototype.setBuildpropertiesList = function(value) {
proto.cc.arduino.cli.commands.CompileReq.prototype.setBuildpropertiesList = function(value) {
jspb.Message.setField(this, 8, value || []);
};
@@ -438,12 +438,12 @@ proto.arduino.CompileReq.prototype.setBuildpropertiesList = function(value) {
* @param {string} value
* @param {number=} opt_index
*/
proto.arduino.CompileReq.prototype.addBuildproperties = function(value, opt_index) {
proto.cc.arduino.cli.commands.CompileReq.prototype.addBuildproperties = function(value, opt_index) {
jspb.Message.addToRepeatedField(this, 8, value, opt_index);
};
proto.arduino.CompileReq.prototype.clearBuildpropertiesList = function() {
proto.cc.arduino.cli.commands.CompileReq.prototype.clearBuildpropertiesList = function() {
this.setBuildpropertiesList([]);
};
@@ -452,13 +452,13 @@ proto.arduino.CompileReq.prototype.clearBuildpropertiesList = function() {
* optional string warnings = 9;
* @return {string}
*/
proto.arduino.CompileReq.prototype.getWarnings = function() {
proto.cc.arduino.cli.commands.CompileReq.prototype.getWarnings = function() {
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 9, ""));
};
/** @param {string} value */
proto.arduino.CompileReq.prototype.setWarnings = function(value) {
proto.cc.arduino.cli.commands.CompileReq.prototype.setWarnings = function(value) {
jspb.Message.setProto3StringField(this, 9, value);
};
@@ -469,13 +469,13 @@ proto.arduino.CompileReq.prototype.setWarnings = function(value) {
* You should avoid comparisons like {@code val === true/false} in those cases.
* @return {boolean}
*/
proto.arduino.CompileReq.prototype.getVerbose = function() {
proto.cc.arduino.cli.commands.CompileReq.prototype.getVerbose = function() {
return /** @type {boolean} */ (jspb.Message.getFieldWithDefault(this, 10, false));
};
/** @param {boolean} value */
proto.arduino.CompileReq.prototype.setVerbose = function(value) {
proto.cc.arduino.cli.commands.CompileReq.prototype.setVerbose = function(value) {
jspb.Message.setProto3BooleanField(this, 10, value);
};
@@ -486,13 +486,13 @@ proto.arduino.CompileReq.prototype.setVerbose = function(value) {
* You should avoid comparisons like {@code val === true/false} in those cases.
* @return {boolean}
*/
proto.arduino.CompileReq.prototype.getQuiet = function() {
proto.cc.arduino.cli.commands.CompileReq.prototype.getQuiet = function() {
return /** @type {boolean} */ (jspb.Message.getFieldWithDefault(this, 11, false));
};
/** @param {boolean} value */
proto.arduino.CompileReq.prototype.setQuiet = function(value) {
proto.cc.arduino.cli.commands.CompileReq.prototype.setQuiet = function(value) {
jspb.Message.setProto3BooleanField(this, 11, value);
};
@@ -501,13 +501,13 @@ proto.arduino.CompileReq.prototype.setQuiet = function(value) {
* optional string vidPid = 12;
* @return {string}
*/
proto.arduino.CompileReq.prototype.getVidpid = function() {
proto.cc.arduino.cli.commands.CompileReq.prototype.getVidpid = function() {
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 12, ""));
};
/** @param {string} value */
proto.arduino.CompileReq.prototype.setVidpid = function(value) {
proto.cc.arduino.cli.commands.CompileReq.prototype.setVidpid = function(value) {
jspb.Message.setProto3StringField(this, 12, value);
};
@@ -516,13 +516,13 @@ proto.arduino.CompileReq.prototype.setVidpid = function(value) {
* optional string exportFile = 13;
* @return {string}
*/
proto.arduino.CompileReq.prototype.getExportfile = function() {
proto.cc.arduino.cli.commands.CompileReq.prototype.getExportfile = function() {
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 13, ""));
};
/** @param {string} value */
proto.arduino.CompileReq.prototype.setExportfile = function(value) {
proto.cc.arduino.cli.commands.CompileReq.prototype.setExportfile = function(value) {
jspb.Message.setProto3StringField(this, 13, value);
};
@@ -538,12 +538,12 @@ proto.arduino.CompileReq.prototype.setExportfile = function(value) {
* @extends {jspb.Message}
* @constructor
*/
proto.arduino.CompileResp = function(opt_data) {
proto.cc.arduino.cli.commands.CompileResp = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(proto.arduino.CompileResp, jspb.Message);
goog.inherits(proto.cc.arduino.cli.commands.CompileResp, jspb.Message);
if (goog.DEBUG && !COMPILED) {
proto.arduino.CompileResp.displayName = 'proto.arduino.CompileResp';
proto.cc.arduino.cli.commands.CompileResp.displayName = 'proto.cc.arduino.cli.commands.CompileResp';
}
@@ -558,8 +558,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) {
* for transitional soy proto support: http://goto/soy-param-migration
* @return {!Object}
*/
proto.arduino.CompileResp.prototype.toObject = function(opt_includeInstance) {
return proto.arduino.CompileResp.toObject(opt_includeInstance, this);
proto.cc.arduino.cli.commands.CompileResp.prototype.toObject = function(opt_includeInstance) {
return proto.cc.arduino.cli.commands.CompileResp.toObject(opt_includeInstance, this);
};
@@ -568,16 +568,14 @@ proto.arduino.CompileResp.prototype.toObject = function(opt_includeInstance) {
* @param {boolean|undefined} includeInstance Whether to include the JSPB
* instance for transitional soy proto support:
* http://goto/soy-param-migration
* @param {!proto.arduino.CompileResp} msg The msg instance to transform.
* @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.arduino.CompileResp.toObject = function(includeInstance, msg) {
proto.cc.arduino.cli.commands.CompileResp.toObject = function(includeInstance, msg) {
var f, obj = {
outStream: msg.getOutStream_asB64(),
errStream: msg.getErrStream_asB64(),
downloadProgress: (f = msg.getDownloadProgress()) && common_pb.DownloadProgress.toObject(includeInstance, f),
taskProgress: (f = msg.getTaskProgress()) && common_pb.TaskProgress.toObject(includeInstance, f)
errStream: msg.getErrStream_asB64()
};
if (includeInstance) {
@@ -591,23 +589,23 @@ proto.arduino.CompileResp.toObject = function(includeInstance, msg) {
/**
* Deserializes binary data (in protobuf wire format).
* @param {jspb.ByteSource} bytes The bytes to deserialize.
* @return {!proto.arduino.CompileResp}
* @return {!proto.cc.arduino.cli.commands.CompileResp}
*/
proto.arduino.CompileResp.deserializeBinary = function(bytes) {
proto.cc.arduino.cli.commands.CompileResp.deserializeBinary = function(bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.arduino.CompileResp;
return proto.arduino.CompileResp.deserializeBinaryFromReader(msg, reader);
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.arduino.CompileResp} msg The message object to deserialize into.
* @param {!proto.cc.arduino.cli.commands.CompileResp} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.arduino.CompileResp}
* @return {!proto.cc.arduino.cli.commands.CompileResp}
*/
proto.arduino.CompileResp.deserializeBinaryFromReader = function(msg, reader) {
proto.cc.arduino.cli.commands.CompileResp.deserializeBinaryFromReader = function(msg, reader) {
while (reader.nextField()) {
if (reader.isEndGroup()) {
break;
@@ -622,16 +620,6 @@ proto.arduino.CompileResp.deserializeBinaryFromReader = function(msg, reader) {
var value = /** @type {!Uint8Array} */ (reader.readBytes());
msg.setErrStream(value);
break;
case 3:
var value = new common_pb.DownloadProgress;
reader.readMessage(value,common_pb.DownloadProgress.deserializeBinaryFromReader);
msg.setDownloadProgress(value);
break;
case 4:
var value = new common_pb.TaskProgress;
reader.readMessage(value,common_pb.TaskProgress.deserializeBinaryFromReader);
msg.setTaskProgress(value);
break;
default:
reader.skipField();
break;
@@ -645,9 +633,9 @@ proto.arduino.CompileResp.deserializeBinaryFromReader = function(msg, reader) {
* Serializes the message to binary data (in protobuf wire format).
* @return {!Uint8Array}
*/
proto.arduino.CompileResp.prototype.serializeBinary = function() {
proto.cc.arduino.cli.commands.CompileResp.prototype.serializeBinary = function() {
var writer = new jspb.BinaryWriter();
proto.arduino.CompileResp.serializeBinaryToWriter(this, writer);
proto.cc.arduino.cli.commands.CompileResp.serializeBinaryToWriter(this, writer);
return writer.getResultBuffer();
};
@@ -655,11 +643,11 @@ proto.arduino.CompileResp.prototype.serializeBinary = function() {
/**
* Serializes the given message to binary data (in protobuf wire
* format), writing to the given BinaryWriter.
* @param {!proto.arduino.CompileResp} message
* @param {!proto.cc.arduino.cli.commands.CompileResp} message
* @param {!jspb.BinaryWriter} writer
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.arduino.CompileResp.serializeBinaryToWriter = function(message, writer) {
proto.cc.arduino.cli.commands.CompileResp.serializeBinaryToWriter = function(message, writer) {
var f = undefined;
f = message.getOutStream_asU8();
if (f.length > 0) {
@@ -675,22 +663,6 @@ proto.arduino.CompileResp.serializeBinaryToWriter = function(message, writer) {
f
);
}
f = message.getDownloadProgress();
if (f != null) {
writer.writeMessage(
3,
f,
common_pb.DownloadProgress.serializeBinaryToWriter
);
}
f = message.getTaskProgress();
if (f != null) {
writer.writeMessage(
4,
f,
common_pb.TaskProgress.serializeBinaryToWriter
);
}
};
@@ -698,7 +670,7 @@ proto.arduino.CompileResp.serializeBinaryToWriter = function(message, writer) {
* optional bytes out_stream = 1;
* @return {!(string|Uint8Array)}
*/
proto.arduino.CompileResp.prototype.getOutStream = function() {
proto.cc.arduino.cli.commands.CompileResp.prototype.getOutStream = function() {
return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
};
@@ -708,7 +680,7 @@ proto.arduino.CompileResp.prototype.getOutStream = function() {
* This is a type-conversion wrapper around `getOutStream()`
* @return {string}
*/
proto.arduino.CompileResp.prototype.getOutStream_asB64 = function() {
proto.cc.arduino.cli.commands.CompileResp.prototype.getOutStream_asB64 = function() {
return /** @type {string} */ (jspb.Message.bytesAsB64(
this.getOutStream()));
};
@@ -721,14 +693,14 @@ proto.arduino.CompileResp.prototype.getOutStream_asB64 = function() {
* This is a type-conversion wrapper around `getOutStream()`
* @return {!Uint8Array}
*/
proto.arduino.CompileResp.prototype.getOutStream_asU8 = function() {
proto.cc.arduino.cli.commands.CompileResp.prototype.getOutStream_asU8 = function() {
return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8(
this.getOutStream()));
};
/** @param {!(string|Uint8Array)} value */
proto.arduino.CompileResp.prototype.setOutStream = function(value) {
proto.cc.arduino.cli.commands.CompileResp.prototype.setOutStream = function(value) {
jspb.Message.setProto3BytesField(this, 1, value);
};
@@ -737,7 +709,7 @@ proto.arduino.CompileResp.prototype.setOutStream = function(value) {
* optional bytes err_stream = 2;
* @return {!(string|Uint8Array)}
*/
proto.arduino.CompileResp.prototype.getErrStream = function() {
proto.cc.arduino.cli.commands.CompileResp.prototype.getErrStream = function() {
return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
};
@@ -747,7 +719,7 @@ proto.arduino.CompileResp.prototype.getErrStream = function() {
* This is a type-conversion wrapper around `getErrStream()`
* @return {string}
*/
proto.arduino.CompileResp.prototype.getErrStream_asB64 = function() {
proto.cc.arduino.cli.commands.CompileResp.prototype.getErrStream_asB64 = function() {
return /** @type {string} */ (jspb.Message.bytesAsB64(
this.getErrStream()));
};
@@ -760,76 +732,16 @@ proto.arduino.CompileResp.prototype.getErrStream_asB64 = function() {
* This is a type-conversion wrapper around `getErrStream()`
* @return {!Uint8Array}
*/
proto.arduino.CompileResp.prototype.getErrStream_asU8 = function() {
proto.cc.arduino.cli.commands.CompileResp.prototype.getErrStream_asU8 = function() {
return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8(
this.getErrStream()));
};
/** @param {!(string|Uint8Array)} value */
proto.arduino.CompileResp.prototype.setErrStream = function(value) {
proto.cc.arduino.cli.commands.CompileResp.prototype.setErrStream = function(value) {
jspb.Message.setProto3BytesField(this, 2, value);
};
/**
* optional DownloadProgress download_progress = 3;
* @return {?proto.arduino.DownloadProgress}
*/
proto.arduino.CompileResp.prototype.getDownloadProgress = function() {
return /** @type{?proto.arduino.DownloadProgress} */ (
jspb.Message.getWrapperField(this, common_pb.DownloadProgress, 3));
};
/** @param {?proto.arduino.DownloadProgress|undefined} value */
proto.arduino.CompileResp.prototype.setDownloadProgress = function(value) {
jspb.Message.setWrapperField(this, 3, value);
};
proto.arduino.CompileResp.prototype.clearDownloadProgress = function() {
this.setDownloadProgress(undefined);
};
/**
* Returns whether this field is set.
* @return {boolean}
*/
proto.arduino.CompileResp.prototype.hasDownloadProgress = function() {
return jspb.Message.getField(this, 3) != null;
};
/**
* optional TaskProgress task_progress = 4;
* @return {?proto.arduino.TaskProgress}
*/
proto.arduino.CompileResp.prototype.getTaskProgress = function() {
return /** @type{?proto.arduino.TaskProgress} */ (
jspb.Message.getWrapperField(this, common_pb.TaskProgress, 4));
};
/** @param {?proto.arduino.TaskProgress|undefined} value */
proto.arduino.CompileResp.prototype.setTaskProgress = function(value) {
jspb.Message.setWrapperField(this, 4, value);
};
proto.arduino.CompileResp.prototype.clearTaskProgress = function() {
this.setTaskProgress(undefined);
};
/**
* Returns whether this field is set.
* @return {boolean}
*/
proto.arduino.CompileResp.prototype.hasTaskProgress = function() {
return jspb.Message.getField(this, 4) != null;
};
goog.object.extend(exports, proto.arduino);
goog.object.extend(exports, proto.cc.arduino.cli.commands);

View File

@@ -1,17 +1,17 @@
// package: arduino
// file: core.proto
// package: cc.arduino.cli.commands
// file: commands/core.proto
/* tslint:disable */
import * as jspb from "google-protobuf";
import * as common_pb from "./common_pb";
import * as commands_common_pb from "../commands/common_pb";
export class PlatformInstallReq extends jspb.Message {
hasInstance(): boolean;
clearInstance(): void;
getInstance(): common_pb.Instance | undefined;
setInstance(value?: common_pb.Instance): void;
getInstance(): commands_common_pb.Instance | undefined;
setInstance(value?: commands_common_pb.Instance): void;
getPlatformPackage(): string;
setPlatformPackage(value: string): void;
@@ -35,7 +35,7 @@ export class PlatformInstallReq extends jspb.Message {
export namespace PlatformInstallReq {
export type AsObject = {
instance?: common_pb.Instance.AsObject,
instance?: commands_common_pb.Instance.AsObject,
platformPackage: string,
architecture: string,
version: string,
@@ -46,14 +46,14 @@ export class PlatformInstallResp extends jspb.Message {
hasProgress(): boolean;
clearProgress(): void;
getProgress(): common_pb.DownloadProgress | undefined;
setProgress(value?: common_pb.DownloadProgress): void;
getProgress(): commands_common_pb.DownloadProgress | undefined;
setProgress(value?: commands_common_pb.DownloadProgress): void;
hasTaskProgress(): boolean;
clearTaskProgress(): void;
getTaskProgress(): common_pb.TaskProgress | undefined;
setTaskProgress(value?: common_pb.TaskProgress): void;
getTaskProgress(): commands_common_pb.TaskProgress | undefined;
setTaskProgress(value?: commands_common_pb.TaskProgress): void;
serializeBinary(): Uint8Array;
@@ -68,8 +68,8 @@ export class PlatformInstallResp extends jspb.Message {
export namespace PlatformInstallResp {
export type AsObject = {
progress?: common_pb.DownloadProgress.AsObject,
taskProgress?: common_pb.TaskProgress.AsObject,
progress?: commands_common_pb.DownloadProgress.AsObject,
taskProgress?: commands_common_pb.TaskProgress.AsObject,
}
}
@@ -77,8 +77,8 @@ export class PlatformDownloadReq extends jspb.Message {
hasInstance(): boolean;
clearInstance(): void;
getInstance(): common_pb.Instance | undefined;
setInstance(value?: common_pb.Instance): void;
getInstance(): commands_common_pb.Instance | undefined;
setInstance(value?: commands_common_pb.Instance): void;
getPlatformPackage(): string;
setPlatformPackage(value: string): void;
@@ -102,7 +102,7 @@ export class PlatformDownloadReq extends jspb.Message {
export namespace PlatformDownloadReq {
export type AsObject = {
instance?: common_pb.Instance.AsObject,
instance?: commands_common_pb.Instance.AsObject,
platformPackage: string,
architecture: string,
version: string,
@@ -113,8 +113,8 @@ export class PlatformDownloadResp extends jspb.Message {
hasProgress(): boolean;
clearProgress(): void;
getProgress(): common_pb.DownloadProgress | undefined;
setProgress(value?: common_pb.DownloadProgress): void;
getProgress(): commands_common_pb.DownloadProgress | undefined;
setProgress(value?: commands_common_pb.DownloadProgress): void;
serializeBinary(): Uint8Array;
@@ -129,7 +129,7 @@ export class PlatformDownloadResp extends jspb.Message {
export namespace PlatformDownloadResp {
export type AsObject = {
progress?: common_pb.DownloadProgress.AsObject,
progress?: commands_common_pb.DownloadProgress.AsObject,
}
}
@@ -137,8 +137,8 @@ export class PlatformUninstallReq extends jspb.Message {
hasInstance(): boolean;
clearInstance(): void;
getInstance(): common_pb.Instance | undefined;
setInstance(value?: common_pb.Instance): void;
getInstance(): commands_common_pb.Instance | undefined;
setInstance(value?: commands_common_pb.Instance): void;
getPlatformPackage(): string;
setPlatformPackage(value: string): void;
@@ -146,9 +146,6 @@ export class PlatformUninstallReq extends jspb.Message {
getArchitecture(): string;
setArchitecture(value: string): void;
getVersion(): string;
setVersion(value: string): void;
serializeBinary(): Uint8Array;
toObject(includeInstance?: boolean): PlatformUninstallReq.AsObject;
@@ -162,10 +159,9 @@ export class PlatformUninstallReq extends jspb.Message {
export namespace PlatformUninstallReq {
export type AsObject = {
instance?: common_pb.Instance.AsObject,
instance?: commands_common_pb.Instance.AsObject,
platformPackage: string,
architecture: string,
version: string,
}
}
@@ -173,8 +169,8 @@ export class PlatformUninstallResp extends jspb.Message {
hasTaskProgress(): boolean;
clearTaskProgress(): void;
getTaskProgress(): common_pb.TaskProgress | undefined;
setTaskProgress(value?: common_pb.TaskProgress): void;
getTaskProgress(): commands_common_pb.TaskProgress | undefined;
setTaskProgress(value?: commands_common_pb.TaskProgress): void;
serializeBinary(): Uint8Array;
@@ -189,7 +185,7 @@ export class PlatformUninstallResp extends jspb.Message {
export namespace PlatformUninstallResp {
export type AsObject = {
taskProgress?: common_pb.TaskProgress.AsObject,
taskProgress?: commands_common_pb.TaskProgress.AsObject,
}
}
@@ -197,8 +193,8 @@ export class PlatformUpgradeReq extends jspb.Message {
hasInstance(): boolean;
clearInstance(): void;
getInstance(): common_pb.Instance | undefined;
setInstance(value?: common_pb.Instance): void;
getInstance(): commands_common_pb.Instance | undefined;
setInstance(value?: commands_common_pb.Instance): void;
getPlatformPackage(): string;
setPlatformPackage(value: string): void;
@@ -219,7 +215,7 @@ export class PlatformUpgradeReq extends jspb.Message {
export namespace PlatformUpgradeReq {
export type AsObject = {
instance?: common_pb.Instance.AsObject,
instance?: commands_common_pb.Instance.AsObject,
platformPackage: string,
architecture: string,
}
@@ -229,14 +225,14 @@ export class PlatformUpgradeResp extends jspb.Message {
hasProgress(): boolean;
clearProgress(): void;
getProgress(): common_pb.DownloadProgress | undefined;
setProgress(value?: common_pb.DownloadProgress): void;
getProgress(): commands_common_pb.DownloadProgress | undefined;
setProgress(value?: commands_common_pb.DownloadProgress): void;
hasTaskProgress(): boolean;
clearTaskProgress(): void;
getTaskProgress(): common_pb.TaskProgress | undefined;
setTaskProgress(value?: common_pb.TaskProgress): void;
getTaskProgress(): commands_common_pb.TaskProgress | undefined;
setTaskProgress(value?: commands_common_pb.TaskProgress): void;
serializeBinary(): Uint8Array;
@@ -251,8 +247,8 @@ export class PlatformUpgradeResp extends jspb.Message {
export namespace PlatformUpgradeResp {
export type AsObject = {
progress?: common_pb.DownloadProgress.AsObject,
taskProgress?: common_pb.TaskProgress.AsObject,
progress?: commands_common_pb.DownloadProgress.AsObject,
taskProgress?: commands_common_pb.TaskProgress.AsObject,
}
}
@@ -260,8 +256,8 @@ export class PlatformSearchReq extends jspb.Message {
hasInstance(): boolean;
clearInstance(): void;
getInstance(): common_pb.Instance | undefined;
setInstance(value?: common_pb.Instance): void;
getInstance(): commands_common_pb.Instance | undefined;
setInstance(value?: commands_common_pb.Instance): void;
getSearchArgs(): string;
setSearchArgs(value: string): void;
@@ -279,16 +275,16 @@ export class PlatformSearchReq extends jspb.Message {
export namespace PlatformSearchReq {
export type AsObject = {
instance?: common_pb.Instance.AsObject,
instance?: commands_common_pb.Instance.AsObject,
searchArgs: string,
}
}
export class PlatformSearchResp extends jspb.Message {
clearSearchOutputList(): void;
getSearchOutputList(): Array<SearchOutput>;
setSearchOutputList(value: Array<SearchOutput>): void;
addSearchOutput(value?: SearchOutput, index?: number): SearchOutput;
getSearchOutputList(): Array<Platform>;
setSearchOutputList(value: Array<Platform>): void;
addSearchOutput(value?: Platform, index?: number): Platform;
serializeBinary(): Uint8Array;
@@ -303,71 +299,7 @@ export class PlatformSearchResp extends jspb.Message {
export namespace PlatformSearchResp {
export type AsObject = {
searchOutputList: Array<SearchOutput.AsObject>,
}
}
export class SearchOutput extends jspb.Message {
getId(): string;
setId(value: string): void;
getVersion(): string;
setVersion(value: string): void;
getName(): string;
setName(value: string): void;
getAuthor(): string;
setAuthor(value: string): void;
clearBoardsList(): void;
getBoardsList(): Array<SearchOutputBoard>;
setBoardsList(value: Array<SearchOutputBoard>): void;
addBoards(value?: SearchOutputBoard, index?: number): SearchOutputBoard;
serializeBinary(): Uint8Array;
toObject(includeInstance?: boolean): SearchOutput.AsObject;
static toObject(includeInstance: boolean, msg: SearchOutput): SearchOutput.AsObject;
static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};
static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};
static serializeBinaryToWriter(message: SearchOutput, writer: jspb.BinaryWriter): void;
static deserializeBinary(bytes: Uint8Array): SearchOutput;
static deserializeBinaryFromReader(message: SearchOutput, reader: jspb.BinaryReader): SearchOutput;
}
export namespace SearchOutput {
export type AsObject = {
id: string,
version: string,
name: string,
author: string,
boardsList: Array<SearchOutputBoard.AsObject>,
}
}
export class SearchOutputBoard extends jspb.Message {
getName(): string;
setName(value: string): void;
getFqbn(): string;
setFqbn(value: string): void;
serializeBinary(): Uint8Array;
toObject(includeInstance?: boolean): SearchOutputBoard.AsObject;
static toObject(includeInstance: boolean, msg: SearchOutputBoard): SearchOutputBoard.AsObject;
static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};
static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};
static serializeBinaryToWriter(message: SearchOutputBoard, writer: jspb.BinaryWriter): void;
static deserializeBinary(bytes: Uint8Array): SearchOutputBoard;
static deserializeBinaryFromReader(message: SearchOutputBoard, reader: jspb.BinaryReader): SearchOutputBoard;
}
export namespace SearchOutputBoard {
export type AsObject = {
name: string,
fqbn: string,
searchOutputList: Array<Platform.AsObject>,
}
}
@@ -375,8 +307,8 @@ export class PlatformListReq extends jspb.Message {
hasInstance(): boolean;
clearInstance(): void;
getInstance(): common_pb.Instance | undefined;
setInstance(value?: common_pb.Instance): void;
getInstance(): commands_common_pb.Instance | undefined;
setInstance(value?: commands_common_pb.Instance): void;
getUpdatableOnly(): boolean;
setUpdatableOnly(value: boolean): void;
@@ -394,16 +326,16 @@ export class PlatformListReq extends jspb.Message {
export namespace PlatformListReq {
export type AsObject = {
instance?: common_pb.Instance.AsObject,
instance?: commands_common_pb.Instance.AsObject,
updatableOnly: boolean,
}
}
export class PlatformListResp extends jspb.Message {
clearInstalledPlatformList(): void;
getInstalledPlatformList(): Array<InstalledPlatform>;
setInstalledPlatformList(value: Array<InstalledPlatform>): void;
addInstalledPlatform(value?: InstalledPlatform, index?: number): InstalledPlatform;
getInstalledPlatformList(): Array<Platform>;
setInstalledPlatformList(value: Array<Platform>): void;
addInstalledPlatform(value?: Platform, index?: number): Platform;
serializeBinary(): Uint8Array;
@@ -418,11 +350,11 @@ export class PlatformListResp extends jspb.Message {
export namespace PlatformListResp {
export type AsObject = {
installedPlatformList: Array<InstalledPlatform.AsObject>,
installedPlatformList: Array<Platform.AsObject>,
}
}
export class InstalledPlatform extends jspb.Message {
export class Platform extends jspb.Message {
getId(): string;
setId(value: string): void;
@@ -435,22 +367,65 @@ export class InstalledPlatform extends jspb.Message {
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): InstalledPlatform.AsObject;
static toObject(includeInstance: boolean, msg: InstalledPlatform): InstalledPlatform.AsObject;
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: InstalledPlatform, writer: jspb.BinaryWriter): void;
static deserializeBinary(bytes: Uint8Array): InstalledPlatform;
static deserializeBinaryFromReader(message: InstalledPlatform, reader: jspb.BinaryReader): InstalledPlatform;
static serializeBinaryToWriter(message: Platform, writer: jspb.BinaryWriter): void;
static deserializeBinary(bytes: Uint8Array): Platform;
static deserializeBinaryFromReader(message: Platform, reader: jspb.BinaryReader): Platform;
}
export namespace InstalledPlatform {
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,
}
}

View File

@@ -1,17 +1,17 @@
// package: arduino
// file: lib.proto
// package: cc.arduino.cli.commands
// file: commands/lib.proto
/* tslint:disable */
import * as jspb from "google-protobuf";
import * as common_pb from "./common_pb";
import * as commands_common_pb from "../commands/common_pb";
export class LibraryDownloadReq extends jspb.Message {
hasInstance(): boolean;
clearInstance(): void;
getInstance(): common_pb.Instance | undefined;
setInstance(value?: common_pb.Instance): void;
getInstance(): commands_common_pb.Instance | undefined;
setInstance(value?: commands_common_pb.Instance): void;
getName(): string;
setName(value: string): void;
@@ -32,7 +32,7 @@ export class LibraryDownloadReq extends jspb.Message {
export namespace LibraryDownloadReq {
export type AsObject = {
instance?: common_pb.Instance.AsObject,
instance?: commands_common_pb.Instance.AsObject,
name: string,
version: string,
}
@@ -42,8 +42,8 @@ export class LibraryDownloadResp extends jspb.Message {
hasProgress(): boolean;
clearProgress(): void;
getProgress(): common_pb.DownloadProgress | undefined;
setProgress(value?: common_pb.DownloadProgress): void;
getProgress(): commands_common_pb.DownloadProgress | undefined;
setProgress(value?: commands_common_pb.DownloadProgress): void;
serializeBinary(): Uint8Array;
@@ -58,7 +58,7 @@ export class LibraryDownloadResp extends jspb.Message {
export namespace LibraryDownloadResp {
export type AsObject = {
progress?: common_pb.DownloadProgress.AsObject,
progress?: commands_common_pb.DownloadProgress.AsObject,
}
}
@@ -66,8 +66,8 @@ export class LibraryInstallReq extends jspb.Message {
hasInstance(): boolean;
clearInstance(): void;
getInstance(): common_pb.Instance | undefined;
setInstance(value?: common_pb.Instance): void;
getInstance(): commands_common_pb.Instance | undefined;
setInstance(value?: commands_common_pb.Instance): void;
getName(): string;
setName(value: string): void;
@@ -88,7 +88,7 @@ export class LibraryInstallReq extends jspb.Message {
export namespace LibraryInstallReq {
export type AsObject = {
instance?: common_pb.Instance.AsObject,
instance?: commands_common_pb.Instance.AsObject,
name: string,
version: string,
}
@@ -98,14 +98,14 @@ export class LibraryInstallResp extends jspb.Message {
hasProgress(): boolean;
clearProgress(): void;
getProgress(): common_pb.DownloadProgress | undefined;
setProgress(value?: common_pb.DownloadProgress): void;
getProgress(): commands_common_pb.DownloadProgress | undefined;
setProgress(value?: commands_common_pb.DownloadProgress): void;
hasTaskProgress(): boolean;
clearTaskProgress(): void;
getTaskProgress(): common_pb.TaskProgress | undefined;
setTaskProgress(value?: common_pb.TaskProgress): void;
getTaskProgress(): commands_common_pb.TaskProgress | undefined;
setTaskProgress(value?: commands_common_pb.TaskProgress): void;
serializeBinary(): Uint8Array;
@@ -120,8 +120,8 @@ export class LibraryInstallResp extends jspb.Message {
export namespace LibraryInstallResp {
export type AsObject = {
progress?: common_pb.DownloadProgress.AsObject,
taskProgress?: common_pb.TaskProgress.AsObject,
progress?: commands_common_pb.DownloadProgress.AsObject,
taskProgress?: commands_common_pb.TaskProgress.AsObject,
}
}
@@ -129,8 +129,8 @@ export class LibraryUninstallReq extends jspb.Message {
hasInstance(): boolean;
clearInstance(): void;
getInstance(): common_pb.Instance | undefined;
setInstance(value?: common_pb.Instance): void;
getInstance(): commands_common_pb.Instance | undefined;
setInstance(value?: commands_common_pb.Instance): void;
getName(): string;
setName(value: string): void;
@@ -151,7 +151,7 @@ export class LibraryUninstallReq extends jspb.Message {
export namespace LibraryUninstallReq {
export type AsObject = {
instance?: common_pb.Instance.AsObject,
instance?: commands_common_pb.Instance.AsObject,
name: string,
version: string,
}
@@ -161,8 +161,8 @@ export class LibraryUninstallResp extends jspb.Message {
hasTaskProgress(): boolean;
clearTaskProgress(): void;
getTaskProgress(): common_pb.TaskProgress | undefined;
setTaskProgress(value?: common_pb.TaskProgress): void;
getTaskProgress(): commands_common_pb.TaskProgress | undefined;
setTaskProgress(value?: commands_common_pb.TaskProgress): void;
serializeBinary(): Uint8Array;
@@ -177,7 +177,7 @@ export class LibraryUninstallResp extends jspb.Message {
export namespace LibraryUninstallResp {
export type AsObject = {
taskProgress?: common_pb.TaskProgress.AsObject,
taskProgress?: commands_common_pb.TaskProgress.AsObject,
}
}
@@ -185,8 +185,8 @@ export class LibraryUpgradeAllReq extends jspb.Message {
hasInstance(): boolean;
clearInstance(): void;
getInstance(): common_pb.Instance | undefined;
setInstance(value?: common_pb.Instance): void;
getInstance(): commands_common_pb.Instance | undefined;
setInstance(value?: commands_common_pb.Instance): void;
serializeBinary(): Uint8Array;
@@ -201,7 +201,7 @@ export class LibraryUpgradeAllReq extends jspb.Message {
export namespace LibraryUpgradeAllReq {
export type AsObject = {
instance?: common_pb.Instance.AsObject,
instance?: commands_common_pb.Instance.AsObject,
}
}
@@ -209,14 +209,14 @@ export class LibraryUpgradeAllResp extends jspb.Message {
hasProgress(): boolean;
clearProgress(): void;
getProgress(): common_pb.DownloadProgress | undefined;
setProgress(value?: common_pb.DownloadProgress): void;
getProgress(): commands_common_pb.DownloadProgress | undefined;
setProgress(value?: commands_common_pb.DownloadProgress): void;
hasTaskProgress(): boolean;
clearTaskProgress(): void;
getTaskProgress(): common_pb.TaskProgress | undefined;
setTaskProgress(value?: common_pb.TaskProgress): void;
getTaskProgress(): commands_common_pb.TaskProgress | undefined;
setTaskProgress(value?: commands_common_pb.TaskProgress): void;
serializeBinary(): Uint8Array;
@@ -231,8 +231,8 @@ export class LibraryUpgradeAllResp extends jspb.Message {
export namespace LibraryUpgradeAllResp {
export type AsObject = {
progress?: common_pb.DownloadProgress.AsObject,
taskProgress?: common_pb.TaskProgress.AsObject,
progress?: commands_common_pb.DownloadProgress.AsObject,
taskProgress?: commands_common_pb.TaskProgress.AsObject,
}
}
@@ -240,11 +240,8 @@ export class LibrarySearchReq extends jspb.Message {
hasInstance(): boolean;
clearInstance(): void;
getInstance(): common_pb.Instance | undefined;
setInstance(value?: common_pb.Instance): void;
getNames(): boolean;
setNames(value: boolean): void;
getInstance(): commands_common_pb.Instance | undefined;
setInstance(value?: commands_common_pb.Instance): void;
getQuery(): string;
setQuery(value: string): void;
@@ -262,17 +259,16 @@ export class LibrarySearchReq extends jspb.Message {
export namespace LibrarySearchReq {
export type AsObject = {
instance?: common_pb.Instance.AsObject,
names: boolean,
instance?: commands_common_pb.Instance.AsObject,
query: string,
}
}
export class LibrarySearchResp extends jspb.Message {
clearSearchOutputList(): void;
getSearchOutputList(): Array<SearchLibraryOutput>;
setSearchOutputList(value: Array<SearchLibraryOutput>): void;
addSearchOutput(value?: SearchLibraryOutput, index?: number): SearchLibraryOutput;
clearLibrariesList(): void;
getLibrariesList(): Array<SearchedLibrary>;
setLibrariesList(value: Array<SearchedLibrary>): void;
addLibraries(value?: SearchedLibrary, index?: number): SearchedLibrary;
serializeBinary(): Uint8Array;
@@ -287,11 +283,11 @@ export class LibrarySearchResp extends jspb.Message {
export namespace LibrarySearchResp {
export type AsObject = {
searchOutputList: Array<SearchLibraryOutput.AsObject>,
librariesList: Array<SearchedLibrary.AsObject>,
}
}
export class SearchLibraryOutput extends jspb.Message {
export class SearchedLibrary extends jspb.Message {
getName(): string;
setName(value: string): void;
@@ -307,16 +303,16 @@ export class SearchLibraryOutput extends jspb.Message {
serializeBinary(): Uint8Array;
toObject(includeInstance?: boolean): SearchLibraryOutput.AsObject;
static toObject(includeInstance: boolean, msg: SearchLibraryOutput): SearchLibraryOutput.AsObject;
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: SearchLibraryOutput, writer: jspb.BinaryWriter): void;
static deserializeBinary(bytes: Uint8Array): SearchLibraryOutput;
static deserializeBinaryFromReader(message: SearchLibraryOutput, reader: jspb.BinaryReader): SearchLibraryOutput;
static serializeBinaryToWriter(message: SearchedLibrary, writer: jspb.BinaryWriter): void;
static deserializeBinary(bytes: Uint8Array): SearchedLibrary;
static deserializeBinaryFromReader(message: SearchedLibrary, reader: jspb.BinaryReader): SearchedLibrary;
}
export namespace SearchLibraryOutput {
export namespace SearchedLibrary {
export type AsObject = {
name: string,
@@ -325,81 +321,6 @@ export namespace SearchLibraryOutput {
}
}
export class LibraryListReq extends jspb.Message {
hasInstance(): boolean;
clearInstance(): void;
getInstance(): common_pb.Instance | undefined;
setInstance(value?: common_pb.Instance): 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?: common_pb.Instance.AsObject,
}
}
export class LibraryListResp extends jspb.Message {
clearLibrariesList(): void;
getLibrariesList(): Array<InstalledLibrary>;
setLibrariesList(value: Array<InstalledLibrary>): void;
addLibraries(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 = {
librariesList: Array<InstalledLibrary.AsObject>,
}
}
export class InstalledLibrary extends jspb.Message {
getName(): string;
setName(value: string): void;
hasInstalled(): boolean;
clearInstalled(): void;
getInstalled(): LibraryRelease | undefined;
setInstalled(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 = {
name: string,
installed?: LibraryRelease.AsObject,
}
}
export class LibraryRelease extends jspb.Message {
getAuthor(): string;
setAuthor(value: string): void;
@@ -500,3 +421,216 @@ export namespace DownloadResource {
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

View File

@@ -1,17 +1,17 @@
// package: arduino
// file: upload.proto
// package: cc.arduino.cli.commands
// file: commands/upload.proto
/* tslint:disable */
import * as jspb from "google-protobuf";
import * as common_pb from "./common_pb";
import * as commands_common_pb from "../commands/common_pb";
export class UploadReq extends jspb.Message {
hasInstance(): boolean;
clearInstance(): void;
getInstance(): common_pb.Instance | undefined;
setInstance(value?: common_pb.Instance): void;
getInstance(): commands_common_pb.Instance | undefined;
setInstance(value?: commands_common_pb.Instance): void;
getFqbn(): string;
setFqbn(value: string): void;
@@ -44,7 +44,7 @@ export class UploadReq extends jspb.Message {
export namespace UploadReq {
export type AsObject = {
instance?: common_pb.Instance.AsObject,
instance?: commands_common_pb.Instance.AsObject,
fqbn: string,
sketchPath: string,
port: string,

View File

@@ -11,10 +11,10 @@ var jspb = require('google-protobuf');
var goog = jspb;
var global = Function('return this')();
var common_pb = require('./common_pb.js');
goog.object.extend(proto, common_pb);
goog.exportSymbol('proto.arduino.UploadReq', null, global);
goog.exportSymbol('proto.arduino.UploadResp', null, global);
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.
@@ -26,12 +26,12 @@ goog.exportSymbol('proto.arduino.UploadResp', null, global);
* @extends {jspb.Message}
* @constructor
*/
proto.arduino.UploadReq = function(opt_data) {
proto.cc.arduino.cli.commands.UploadReq = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(proto.arduino.UploadReq, jspb.Message);
goog.inherits(proto.cc.arduino.cli.commands.UploadReq, jspb.Message);
if (goog.DEBUG && !COMPILED) {
proto.arduino.UploadReq.displayName = 'proto.arduino.UploadReq';
proto.cc.arduino.cli.commands.UploadReq.displayName = 'proto.cc.arduino.cli.commands.UploadReq';
}
@@ -46,8 +46,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) {
* for transitional soy proto support: http://goto/soy-param-migration
* @return {!Object}
*/
proto.arduino.UploadReq.prototype.toObject = function(opt_includeInstance) {
return proto.arduino.UploadReq.toObject(opt_includeInstance, this);
proto.cc.arduino.cli.commands.UploadReq.prototype.toObject = function(opt_includeInstance) {
return proto.cc.arduino.cli.commands.UploadReq.toObject(opt_includeInstance, this);
};
@@ -56,13 +56,13 @@ proto.arduino.UploadReq.prototype.toObject = function(opt_includeInstance) {
* @param {boolean|undefined} includeInstance Whether to include the JSPB
* instance for transitional soy proto support:
* http://goto/soy-param-migration
* @param {!proto.arduino.UploadReq} msg The msg instance to transform.
* @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.arduino.UploadReq.toObject = function(includeInstance, msg) {
proto.cc.arduino.cli.commands.UploadReq.toObject = function(includeInstance, msg) {
var f, obj = {
instance: (f = msg.getInstance()) && common_pb.Instance.toObject(includeInstance, f),
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, ""),
@@ -82,23 +82,23 @@ proto.arduino.UploadReq.toObject = function(includeInstance, msg) {
/**
* Deserializes binary data (in protobuf wire format).
* @param {jspb.ByteSource} bytes The bytes to deserialize.
* @return {!proto.arduino.UploadReq}
* @return {!proto.cc.arduino.cli.commands.UploadReq}
*/
proto.arduino.UploadReq.deserializeBinary = function(bytes) {
proto.cc.arduino.cli.commands.UploadReq.deserializeBinary = function(bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.arduino.UploadReq;
return proto.arduino.UploadReq.deserializeBinaryFromReader(msg, reader);
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.arduino.UploadReq} msg The message object to deserialize into.
* @param {!proto.cc.arduino.cli.commands.UploadReq} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.arduino.UploadReq}
* @return {!proto.cc.arduino.cli.commands.UploadReq}
*/
proto.arduino.UploadReq.deserializeBinaryFromReader = function(msg, reader) {
proto.cc.arduino.cli.commands.UploadReq.deserializeBinaryFromReader = function(msg, reader) {
while (reader.nextField()) {
if (reader.isEndGroup()) {
break;
@@ -106,8 +106,8 @@ proto.arduino.UploadReq.deserializeBinaryFromReader = function(msg, reader) {
var field = reader.getFieldNumber();
switch (field) {
case 1:
var value = new common_pb.Instance;
reader.readMessage(value,common_pb.Instance.deserializeBinaryFromReader);
var value = new commands_common_pb.Instance;
reader.readMessage(value,commands_common_pb.Instance.deserializeBinaryFromReader);
msg.setInstance(value);
break;
case 2:
@@ -147,9 +147,9 @@ proto.arduino.UploadReq.deserializeBinaryFromReader = function(msg, reader) {
* Serializes the message to binary data (in protobuf wire format).
* @return {!Uint8Array}
*/
proto.arduino.UploadReq.prototype.serializeBinary = function() {
proto.cc.arduino.cli.commands.UploadReq.prototype.serializeBinary = function() {
var writer = new jspb.BinaryWriter();
proto.arduino.UploadReq.serializeBinaryToWriter(this, writer);
proto.cc.arduino.cli.commands.UploadReq.serializeBinaryToWriter(this, writer);
return writer.getResultBuffer();
};
@@ -157,18 +157,18 @@ proto.arduino.UploadReq.prototype.serializeBinary = function() {
/**
* Serializes the given message to binary data (in protobuf wire
* format), writing to the given BinaryWriter.
* @param {!proto.arduino.UploadReq} message
* @param {!proto.cc.arduino.cli.commands.UploadReq} message
* @param {!jspb.BinaryWriter} writer
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.arduino.UploadReq.serializeBinaryToWriter = function(message, writer) {
proto.cc.arduino.cli.commands.UploadReq.serializeBinaryToWriter = function(message, writer) {
var f = undefined;
f = message.getInstance();
if (f != null) {
writer.writeMessage(
1,
f,
common_pb.Instance.serializeBinaryToWriter
commands_common_pb.Instance.serializeBinaryToWriter
);
}
f = message.getFqbn();
@@ -218,21 +218,21 @@ proto.arduino.UploadReq.serializeBinaryToWriter = function(message, writer) {
/**
* optional Instance instance = 1;
* @return {?proto.arduino.Instance}
* @return {?proto.cc.arduino.cli.commands.Instance}
*/
proto.arduino.UploadReq.prototype.getInstance = function() {
return /** @type{?proto.arduino.Instance} */ (
jspb.Message.getWrapperField(this, common_pb.Instance, 1));
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.arduino.Instance|undefined} value */
proto.arduino.UploadReq.prototype.setInstance = function(value) {
/** @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.arduino.UploadReq.prototype.clearInstance = function() {
proto.cc.arduino.cli.commands.UploadReq.prototype.clearInstance = function() {
this.setInstance(undefined);
};
@@ -241,7 +241,7 @@ proto.arduino.UploadReq.prototype.clearInstance = function() {
* Returns whether this field is set.
* @return {boolean}
*/
proto.arduino.UploadReq.prototype.hasInstance = function() {
proto.cc.arduino.cli.commands.UploadReq.prototype.hasInstance = function() {
return jspb.Message.getField(this, 1) != null;
};
@@ -250,13 +250,13 @@ proto.arduino.UploadReq.prototype.hasInstance = function() {
* optional string fqbn = 2;
* @return {string}
*/
proto.arduino.UploadReq.prototype.getFqbn = function() {
proto.cc.arduino.cli.commands.UploadReq.prototype.getFqbn = function() {
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
};
/** @param {string} value */
proto.arduino.UploadReq.prototype.setFqbn = function(value) {
proto.cc.arduino.cli.commands.UploadReq.prototype.setFqbn = function(value) {
jspb.Message.setProto3StringField(this, 2, value);
};
@@ -265,13 +265,13 @@ proto.arduino.UploadReq.prototype.setFqbn = function(value) {
* optional string sketch_path = 3;
* @return {string}
*/
proto.arduino.UploadReq.prototype.getSketchPath = function() {
proto.cc.arduino.cli.commands.UploadReq.prototype.getSketchPath = function() {
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, ""));
};
/** @param {string} value */
proto.arduino.UploadReq.prototype.setSketchPath = function(value) {
proto.cc.arduino.cli.commands.UploadReq.prototype.setSketchPath = function(value) {
jspb.Message.setProto3StringField(this, 3, value);
};
@@ -280,13 +280,13 @@ proto.arduino.UploadReq.prototype.setSketchPath = function(value) {
* optional string port = 4;
* @return {string}
*/
proto.arduino.UploadReq.prototype.getPort = function() {
proto.cc.arduino.cli.commands.UploadReq.prototype.getPort = function() {
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, ""));
};
/** @param {string} value */
proto.arduino.UploadReq.prototype.setPort = function(value) {
proto.cc.arduino.cli.commands.UploadReq.prototype.setPort = function(value) {
jspb.Message.setProto3StringField(this, 4, value);
};
@@ -297,13 +297,13 @@ proto.arduino.UploadReq.prototype.setPort = function(value) {
* You should avoid comparisons like {@code val === true/false} in those cases.
* @return {boolean}
*/
proto.arduino.UploadReq.prototype.getVerbose = function() {
proto.cc.arduino.cli.commands.UploadReq.prototype.getVerbose = function() {
return /** @type {boolean} */ (jspb.Message.getFieldWithDefault(this, 5, false));
};
/** @param {boolean} value */
proto.arduino.UploadReq.prototype.setVerbose = function(value) {
proto.cc.arduino.cli.commands.UploadReq.prototype.setVerbose = function(value) {
jspb.Message.setProto3BooleanField(this, 5, value);
};
@@ -314,13 +314,13 @@ proto.arduino.UploadReq.prototype.setVerbose = function(value) {
* You should avoid comparisons like {@code val === true/false} in those cases.
* @return {boolean}
*/
proto.arduino.UploadReq.prototype.getVerify = function() {
proto.cc.arduino.cli.commands.UploadReq.prototype.getVerify = function() {
return /** @type {boolean} */ (jspb.Message.getFieldWithDefault(this, 6, false));
};
/** @param {boolean} value */
proto.arduino.UploadReq.prototype.setVerify = function(value) {
proto.cc.arduino.cli.commands.UploadReq.prototype.setVerify = function(value) {
jspb.Message.setProto3BooleanField(this, 6, value);
};
@@ -329,13 +329,13 @@ proto.arduino.UploadReq.prototype.setVerify = function(value) {
* optional string import_file = 7;
* @return {string}
*/
proto.arduino.UploadReq.prototype.getImportFile = function() {
proto.cc.arduino.cli.commands.UploadReq.prototype.getImportFile = function() {
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 7, ""));
};
/** @param {string} value */
proto.arduino.UploadReq.prototype.setImportFile = function(value) {
proto.cc.arduino.cli.commands.UploadReq.prototype.setImportFile = function(value) {
jspb.Message.setProto3StringField(this, 7, value);
};
@@ -351,12 +351,12 @@ proto.arduino.UploadReq.prototype.setImportFile = function(value) {
* @extends {jspb.Message}
* @constructor
*/
proto.arduino.UploadResp = function(opt_data) {
proto.cc.arduino.cli.commands.UploadResp = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(proto.arduino.UploadResp, jspb.Message);
goog.inherits(proto.cc.arduino.cli.commands.UploadResp, jspb.Message);
if (goog.DEBUG && !COMPILED) {
proto.arduino.UploadResp.displayName = 'proto.arduino.UploadResp';
proto.cc.arduino.cli.commands.UploadResp.displayName = 'proto.cc.arduino.cli.commands.UploadResp';
}
@@ -371,8 +371,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) {
* for transitional soy proto support: http://goto/soy-param-migration
* @return {!Object}
*/
proto.arduino.UploadResp.prototype.toObject = function(opt_includeInstance) {
return proto.arduino.UploadResp.toObject(opt_includeInstance, this);
proto.cc.arduino.cli.commands.UploadResp.prototype.toObject = function(opt_includeInstance) {
return proto.cc.arduino.cli.commands.UploadResp.toObject(opt_includeInstance, this);
};
@@ -381,11 +381,11 @@ proto.arduino.UploadResp.prototype.toObject = function(opt_includeInstance) {
* @param {boolean|undefined} includeInstance Whether to include the JSPB
* instance for transitional soy proto support:
* http://goto/soy-param-migration
* @param {!proto.arduino.UploadResp} msg The msg instance to transform.
* @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.arduino.UploadResp.toObject = function(includeInstance, msg) {
proto.cc.arduino.cli.commands.UploadResp.toObject = function(includeInstance, msg) {
var f, obj = {
outStream: msg.getOutStream_asB64(),
errStream: msg.getErrStream_asB64()
@@ -402,23 +402,23 @@ proto.arduino.UploadResp.toObject = function(includeInstance, msg) {
/**
* Deserializes binary data (in protobuf wire format).
* @param {jspb.ByteSource} bytes The bytes to deserialize.
* @return {!proto.arduino.UploadResp}
* @return {!proto.cc.arduino.cli.commands.UploadResp}
*/
proto.arduino.UploadResp.deserializeBinary = function(bytes) {
proto.cc.arduino.cli.commands.UploadResp.deserializeBinary = function(bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.arduino.UploadResp;
return proto.arduino.UploadResp.deserializeBinaryFromReader(msg, reader);
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.arduino.UploadResp} msg The message object to deserialize into.
* @param {!proto.cc.arduino.cli.commands.UploadResp} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.arduino.UploadResp}
* @return {!proto.cc.arduino.cli.commands.UploadResp}
*/
proto.arduino.UploadResp.deserializeBinaryFromReader = function(msg, reader) {
proto.cc.arduino.cli.commands.UploadResp.deserializeBinaryFromReader = function(msg, reader) {
while (reader.nextField()) {
if (reader.isEndGroup()) {
break;
@@ -446,9 +446,9 @@ proto.arduino.UploadResp.deserializeBinaryFromReader = function(msg, reader) {
* Serializes the message to binary data (in protobuf wire format).
* @return {!Uint8Array}
*/
proto.arduino.UploadResp.prototype.serializeBinary = function() {
proto.cc.arduino.cli.commands.UploadResp.prototype.serializeBinary = function() {
var writer = new jspb.BinaryWriter();
proto.arduino.UploadResp.serializeBinaryToWriter(this, writer);
proto.cc.arduino.cli.commands.UploadResp.serializeBinaryToWriter(this, writer);
return writer.getResultBuffer();
};
@@ -456,11 +456,11 @@ proto.arduino.UploadResp.prototype.serializeBinary = function() {
/**
* Serializes the given message to binary data (in protobuf wire
* format), writing to the given BinaryWriter.
* @param {!proto.arduino.UploadResp} message
* @param {!proto.cc.arduino.cli.commands.UploadResp} message
* @param {!jspb.BinaryWriter} writer
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.arduino.UploadResp.serializeBinaryToWriter = function(message, writer) {
proto.cc.arduino.cli.commands.UploadResp.serializeBinaryToWriter = function(message, writer) {
var f = undefined;
f = message.getOutStream_asU8();
if (f.length > 0) {
@@ -483,7 +483,7 @@ proto.arduino.UploadResp.serializeBinaryToWriter = function(message, writer) {
* optional bytes out_stream = 1;
* @return {!(string|Uint8Array)}
*/
proto.arduino.UploadResp.prototype.getOutStream = function() {
proto.cc.arduino.cli.commands.UploadResp.prototype.getOutStream = function() {
return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
};
@@ -493,7 +493,7 @@ proto.arduino.UploadResp.prototype.getOutStream = function() {
* This is a type-conversion wrapper around `getOutStream()`
* @return {string}
*/
proto.arduino.UploadResp.prototype.getOutStream_asB64 = function() {
proto.cc.arduino.cli.commands.UploadResp.prototype.getOutStream_asB64 = function() {
return /** @type {string} */ (jspb.Message.bytesAsB64(
this.getOutStream()));
};
@@ -506,14 +506,14 @@ proto.arduino.UploadResp.prototype.getOutStream_asB64 = function() {
* This is a type-conversion wrapper around `getOutStream()`
* @return {!Uint8Array}
*/
proto.arduino.UploadResp.prototype.getOutStream_asU8 = function() {
proto.cc.arduino.cli.commands.UploadResp.prototype.getOutStream_asU8 = function() {
return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8(
this.getOutStream()));
};
/** @param {!(string|Uint8Array)} value */
proto.arduino.UploadResp.prototype.setOutStream = function(value) {
proto.cc.arduino.cli.commands.UploadResp.prototype.setOutStream = function(value) {
jspb.Message.setProto3BytesField(this, 1, value);
};
@@ -522,7 +522,7 @@ proto.arduino.UploadResp.prototype.setOutStream = function(value) {
* optional bytes err_stream = 2;
* @return {!(string|Uint8Array)}
*/
proto.arduino.UploadResp.prototype.getErrStream = function() {
proto.cc.arduino.cli.commands.UploadResp.prototype.getErrStream = function() {
return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
};
@@ -532,7 +532,7 @@ proto.arduino.UploadResp.prototype.getErrStream = function() {
* This is a type-conversion wrapper around `getErrStream()`
* @return {string}
*/
proto.arduino.UploadResp.prototype.getErrStream_asB64 = function() {
proto.cc.arduino.cli.commands.UploadResp.prototype.getErrStream_asB64 = function() {
return /** @type {string} */ (jspb.Message.bytesAsB64(
this.getErrStream()));
};
@@ -545,16 +545,16 @@ proto.arduino.UploadResp.prototype.getErrStream_asB64 = function() {
* This is a type-conversion wrapper around `getErrStream()`
* @return {!Uint8Array}
*/
proto.arduino.UploadResp.prototype.getErrStream_asU8 = function() {
proto.cc.arduino.cli.commands.UploadResp.prototype.getErrStream_asU8 = function() {
return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8(
this.getErrStream()));
};
/** @param {!(string|Uint8Array)} value */
proto.arduino.UploadResp.prototype.setErrStream = function(value) {
proto.cc.arduino.cli.commands.UploadResp.prototype.setErrStream = function(value) {
jspb.Message.setProto3BytesField(this, 2, value);
};
goog.object.extend(exports, proto.arduino);
goog.object.extend(exports, proto.cc.arduino.cli.commands);

View File

@@ -1,347 +0,0 @@
// package: arduino
// file: commands.proto
/* tslint:disable */
import * as grpc from "@grpc/grpc-js";
import * as commands_pb from "./commands_pb";
import * as common_pb from "./common_pb";
import * as board_pb from "./board_pb";
import * as compile_pb from "./compile_pb";
import * as core_pb from "./core_pb";
import * as upload_pb from "./upload_pb";
import * as lib_pb from "./lib_pb";
interface IArduinoCoreService extends grpc.ServiceDefinition<grpc.UntypedServiceImplementation> {
init: IArduinoCoreService_IInit;
destroy: IArduinoCoreService_IDestroy;
rescan: IArduinoCoreService_IRescan;
updateIndex: IArduinoCoreService_IUpdateIndex;
boardList: IArduinoCoreService_IBoardList;
boardDetails: IArduinoCoreService_IBoardDetails;
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;
librarySearch: IArduinoCoreService_ILibrarySearch;
libraryList: IArduinoCoreService_ILibraryList;
}
interface IArduinoCoreService_IInit extends grpc.MethodDefinition<commands_pb.InitReq, commands_pb.InitResp> {
path: string; // "/arduino.ArduinoCore/Init"
requestStream: boolean; // false
responseStream: boolean; // false
requestSerialize: grpc.serialize<commands_pb.InitReq>;
requestDeserialize: grpc.deserialize<commands_pb.InitReq>;
responseSerialize: grpc.serialize<commands_pb.InitResp>;
responseDeserialize: grpc.deserialize<commands_pb.InitResp>;
}
interface IArduinoCoreService_IDestroy extends grpc.MethodDefinition<commands_pb.DestroyReq, commands_pb.DestroyResp> {
path: string; // "/arduino.ArduinoCore/Destroy"
requestStream: boolean; // false
responseStream: boolean; // false
requestSerialize: grpc.serialize<commands_pb.DestroyReq>;
requestDeserialize: grpc.deserialize<commands_pb.DestroyReq>;
responseSerialize: grpc.serialize<commands_pb.DestroyResp>;
responseDeserialize: grpc.deserialize<commands_pb.DestroyResp>;
}
interface IArduinoCoreService_IRescan extends grpc.MethodDefinition<commands_pb.RescanReq, commands_pb.RescanResp> {
path: string; // "/arduino.ArduinoCore/Rescan"
requestStream: boolean; // false
responseStream: boolean; // false
requestSerialize: grpc.serialize<commands_pb.RescanReq>;
requestDeserialize: grpc.deserialize<commands_pb.RescanReq>;
responseSerialize: grpc.serialize<commands_pb.RescanResp>;
responseDeserialize: grpc.deserialize<commands_pb.RescanResp>;
}
interface IArduinoCoreService_IUpdateIndex extends grpc.MethodDefinition<commands_pb.UpdateIndexReq, commands_pb.UpdateIndexResp> {
path: string; // "/arduino.ArduinoCore/UpdateIndex"
requestStream: boolean; // false
responseStream: boolean; // true
requestSerialize: grpc.serialize<commands_pb.UpdateIndexReq>;
requestDeserialize: grpc.deserialize<commands_pb.UpdateIndexReq>;
responseSerialize: grpc.serialize<commands_pb.UpdateIndexResp>;
responseDeserialize: grpc.deserialize<commands_pb.UpdateIndexResp>;
}
interface IArduinoCoreService_IBoardList extends grpc.MethodDefinition<board_pb.BoardListReq, board_pb.BoardListResp> {
path: string; // "/arduino.ArduinoCore/BoardList"
requestStream: boolean; // false
responseStream: boolean; // false
requestSerialize: grpc.serialize<board_pb.BoardListReq>;
requestDeserialize: grpc.deserialize<board_pb.BoardListReq>;
responseSerialize: grpc.serialize<board_pb.BoardListResp>;
responseDeserialize: grpc.deserialize<board_pb.BoardListResp>;
}
interface IArduinoCoreService_IBoardDetails extends grpc.MethodDefinition<board_pb.BoardDetailsReq, board_pb.BoardDetailsResp> {
path: string; // "/arduino.ArduinoCore/BoardDetails"
requestStream: boolean; // false
responseStream: boolean; // false
requestSerialize: grpc.serialize<board_pb.BoardDetailsReq>;
requestDeserialize: grpc.deserialize<board_pb.BoardDetailsReq>;
responseSerialize: grpc.serialize<board_pb.BoardDetailsResp>;
responseDeserialize: grpc.deserialize<board_pb.BoardDetailsResp>;
}
interface IArduinoCoreService_ICompile extends grpc.MethodDefinition<compile_pb.CompileReq, compile_pb.CompileResp> {
path: string; // "/arduino.ArduinoCore/Compile"
requestStream: boolean; // false
responseStream: boolean; // true
requestSerialize: grpc.serialize<compile_pb.CompileReq>;
requestDeserialize: grpc.deserialize<compile_pb.CompileReq>;
responseSerialize: grpc.serialize<compile_pb.CompileResp>;
responseDeserialize: grpc.deserialize<compile_pb.CompileResp>;
}
interface IArduinoCoreService_IPlatformInstall extends grpc.MethodDefinition<core_pb.PlatformInstallReq, core_pb.PlatformInstallResp> {
path: string; // "/arduino.ArduinoCore/PlatformInstall"
requestStream: boolean; // false
responseStream: boolean; // true
requestSerialize: grpc.serialize<core_pb.PlatformInstallReq>;
requestDeserialize: grpc.deserialize<core_pb.PlatformInstallReq>;
responseSerialize: grpc.serialize<core_pb.PlatformInstallResp>;
responseDeserialize: grpc.deserialize<core_pb.PlatformInstallResp>;
}
interface IArduinoCoreService_IPlatformDownload extends grpc.MethodDefinition<core_pb.PlatformDownloadReq, core_pb.PlatformDownloadResp> {
path: string; // "/arduino.ArduinoCore/PlatformDownload"
requestStream: boolean; // false
responseStream: boolean; // true
requestSerialize: grpc.serialize<core_pb.PlatformDownloadReq>;
requestDeserialize: grpc.deserialize<core_pb.PlatformDownloadReq>;
responseSerialize: grpc.serialize<core_pb.PlatformDownloadResp>;
responseDeserialize: grpc.deserialize<core_pb.PlatformDownloadResp>;
}
interface IArduinoCoreService_IPlatformUninstall extends grpc.MethodDefinition<core_pb.PlatformUninstallReq, core_pb.PlatformUninstallResp> {
path: string; // "/arduino.ArduinoCore/PlatformUninstall"
requestStream: boolean; // false
responseStream: boolean; // true
requestSerialize: grpc.serialize<core_pb.PlatformUninstallReq>;
requestDeserialize: grpc.deserialize<core_pb.PlatformUninstallReq>;
responseSerialize: grpc.serialize<core_pb.PlatformUninstallResp>;
responseDeserialize: grpc.deserialize<core_pb.PlatformUninstallResp>;
}
interface IArduinoCoreService_IPlatformUpgrade extends grpc.MethodDefinition<core_pb.PlatformUpgradeReq, core_pb.PlatformUpgradeResp> {
path: string; // "/arduino.ArduinoCore/PlatformUpgrade"
requestStream: boolean; // false
responseStream: boolean; // true
requestSerialize: grpc.serialize<core_pb.PlatformUpgradeReq>;
requestDeserialize: grpc.deserialize<core_pb.PlatformUpgradeReq>;
responseSerialize: grpc.serialize<core_pb.PlatformUpgradeResp>;
responseDeserialize: grpc.deserialize<core_pb.PlatformUpgradeResp>;
}
interface IArduinoCoreService_IUpload extends grpc.MethodDefinition<upload_pb.UploadReq, upload_pb.UploadResp> {
path: string; // "/arduino.ArduinoCore/Upload"
requestStream: boolean; // false
responseStream: boolean; // true
requestSerialize: grpc.serialize<upload_pb.UploadReq>;
requestDeserialize: grpc.deserialize<upload_pb.UploadReq>;
responseSerialize: grpc.serialize<upload_pb.UploadResp>;
responseDeserialize: grpc.deserialize<upload_pb.UploadResp>;
}
interface IArduinoCoreService_IPlatformSearch extends grpc.MethodDefinition<core_pb.PlatformSearchReq, core_pb.PlatformSearchResp> {
path: string; // "/arduino.ArduinoCore/PlatformSearch"
requestStream: boolean; // false
responseStream: boolean; // false
requestSerialize: grpc.serialize<core_pb.PlatformSearchReq>;
requestDeserialize: grpc.deserialize<core_pb.PlatformSearchReq>;
responseSerialize: grpc.serialize<core_pb.PlatformSearchResp>;
responseDeserialize: grpc.deserialize<core_pb.PlatformSearchResp>;
}
interface IArduinoCoreService_IPlatformList extends grpc.MethodDefinition<core_pb.PlatformListReq, core_pb.PlatformListResp> {
path: string; // "/arduino.ArduinoCore/PlatformList"
requestStream: boolean; // false
responseStream: boolean; // false
requestSerialize: grpc.serialize<core_pb.PlatformListReq>;
requestDeserialize: grpc.deserialize<core_pb.PlatformListReq>;
responseSerialize: grpc.serialize<core_pb.PlatformListResp>;
responseDeserialize: grpc.deserialize<core_pb.PlatformListResp>;
}
interface IArduinoCoreService_ILibraryDownload extends grpc.MethodDefinition<lib_pb.LibraryDownloadReq, lib_pb.LibraryDownloadResp> {
path: string; // "/arduino.ArduinoCore/LibraryDownload"
requestStream: boolean; // false
responseStream: boolean; // true
requestSerialize: grpc.serialize<lib_pb.LibraryDownloadReq>;
requestDeserialize: grpc.deserialize<lib_pb.LibraryDownloadReq>;
responseSerialize: grpc.serialize<lib_pb.LibraryDownloadResp>;
responseDeserialize: grpc.deserialize<lib_pb.LibraryDownloadResp>;
}
interface IArduinoCoreService_ILibraryInstall extends grpc.MethodDefinition<lib_pb.LibraryInstallReq, lib_pb.LibraryInstallResp> {
path: string; // "/arduino.ArduinoCore/LibraryInstall"
requestStream: boolean; // false
responseStream: boolean; // true
requestSerialize: grpc.serialize<lib_pb.LibraryInstallReq>;
requestDeserialize: grpc.deserialize<lib_pb.LibraryInstallReq>;
responseSerialize: grpc.serialize<lib_pb.LibraryInstallResp>;
responseDeserialize: grpc.deserialize<lib_pb.LibraryInstallResp>;
}
interface IArduinoCoreService_ILibraryUninstall extends grpc.MethodDefinition<lib_pb.LibraryUninstallReq, lib_pb.LibraryUninstallResp> {
path: string; // "/arduino.ArduinoCore/LibraryUninstall"
requestStream: boolean; // false
responseStream: boolean; // true
requestSerialize: grpc.serialize<lib_pb.LibraryUninstallReq>;
requestDeserialize: grpc.deserialize<lib_pb.LibraryUninstallReq>;
responseSerialize: grpc.serialize<lib_pb.LibraryUninstallResp>;
responseDeserialize: grpc.deserialize<lib_pb.LibraryUninstallResp>;
}
interface IArduinoCoreService_ILibraryUpgradeAll extends grpc.MethodDefinition<lib_pb.LibraryUpgradeAllReq, lib_pb.LibraryUpgradeAllResp> {
path: string; // "/arduino.ArduinoCore/LibraryUpgradeAll"
requestStream: boolean; // false
responseStream: boolean; // true
requestSerialize: grpc.serialize<lib_pb.LibraryUpgradeAllReq>;
requestDeserialize: grpc.deserialize<lib_pb.LibraryUpgradeAllReq>;
responseSerialize: grpc.serialize<lib_pb.LibraryUpgradeAllResp>;
responseDeserialize: grpc.deserialize<lib_pb.LibraryUpgradeAllResp>;
}
interface IArduinoCoreService_ILibrarySearch extends grpc.MethodDefinition<lib_pb.LibrarySearchReq, lib_pb.LibrarySearchResp> {
path: string; // "/arduino.ArduinoCore/LibrarySearch"
requestStream: boolean; // false
responseStream: boolean; // false
requestSerialize: grpc.serialize<lib_pb.LibrarySearchReq>;
requestDeserialize: grpc.deserialize<lib_pb.LibrarySearchReq>;
responseSerialize: grpc.serialize<lib_pb.LibrarySearchResp>;
responseDeserialize: grpc.deserialize<lib_pb.LibrarySearchResp>;
}
interface IArduinoCoreService_ILibraryList extends grpc.MethodDefinition<lib_pb.LibraryListReq, lib_pb.LibraryListResp> {
path: string; // "/arduino.ArduinoCore/LibraryList"
requestStream: boolean; // false
responseStream: boolean; // false
requestSerialize: grpc.serialize<lib_pb.LibraryListReq>;
requestDeserialize: grpc.deserialize<lib_pb.LibraryListReq>;
responseSerialize: grpc.serialize<lib_pb.LibraryListResp>;
responseDeserialize: grpc.deserialize<lib_pb.LibraryListResp>;
}
export const ArduinoCoreService: IArduinoCoreService;
export interface IArduinoCoreServer {
init: grpc.handleUnaryCall<commands_pb.InitReq, commands_pb.InitResp>;
destroy: grpc.handleUnaryCall<commands_pb.DestroyReq, commands_pb.DestroyResp>;
rescan: grpc.handleUnaryCall<commands_pb.RescanReq, commands_pb.RescanResp>;
updateIndex: grpc.handleServerStreamingCall<commands_pb.UpdateIndexReq, commands_pb.UpdateIndexResp>;
boardList: grpc.handleUnaryCall<board_pb.BoardListReq, board_pb.BoardListResp>;
boardDetails: grpc.handleUnaryCall<board_pb.BoardDetailsReq, board_pb.BoardDetailsResp>;
compile: grpc.handleServerStreamingCall<compile_pb.CompileReq, compile_pb.CompileResp>;
platformInstall: grpc.handleServerStreamingCall<core_pb.PlatformInstallReq, core_pb.PlatformInstallResp>;
platformDownload: grpc.handleServerStreamingCall<core_pb.PlatformDownloadReq, core_pb.PlatformDownloadResp>;
platformUninstall: grpc.handleServerStreamingCall<core_pb.PlatformUninstallReq, core_pb.PlatformUninstallResp>;
platformUpgrade: grpc.handleServerStreamingCall<core_pb.PlatformUpgradeReq, core_pb.PlatformUpgradeResp>;
upload: grpc.handleServerStreamingCall<upload_pb.UploadReq, upload_pb.UploadResp>;
platformSearch: grpc.handleUnaryCall<core_pb.PlatformSearchReq, core_pb.PlatformSearchResp>;
platformList: grpc.handleUnaryCall<core_pb.PlatformListReq, core_pb.PlatformListResp>;
libraryDownload: grpc.handleServerStreamingCall<lib_pb.LibraryDownloadReq, lib_pb.LibraryDownloadResp>;
libraryInstall: grpc.handleServerStreamingCall<lib_pb.LibraryInstallReq, lib_pb.LibraryInstallResp>;
libraryUninstall: grpc.handleServerStreamingCall<lib_pb.LibraryUninstallReq, lib_pb.LibraryUninstallResp>;
libraryUpgradeAll: grpc.handleServerStreamingCall<lib_pb.LibraryUpgradeAllReq, lib_pb.LibraryUpgradeAllResp>;
librarySearch: grpc.handleUnaryCall<lib_pb.LibrarySearchReq, lib_pb.LibrarySearchResp>;
libraryList: grpc.handleUnaryCall<lib_pb.LibraryListReq, lib_pb.LibraryListResp>;
}
export interface IArduinoCoreClient {
init(request: commands_pb.InitReq, callback: (error: grpc.ServiceError | null, response: commands_pb.InitResp) => void): grpc.ClientUnaryCall;
init(request: commands_pb.InitReq, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: commands_pb.InitResp) => void): grpc.ClientUnaryCall;
init(request: commands_pb.InitReq, metadata: grpc.Metadata, options: Partial<grpc.CallOptions>, callback: (error: grpc.ServiceError | null, response: commands_pb.InitResp) => void): grpc.ClientUnaryCall;
destroy(request: commands_pb.DestroyReq, callback: (error: grpc.ServiceError | null, response: commands_pb.DestroyResp) => void): grpc.ClientUnaryCall;
destroy(request: commands_pb.DestroyReq, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: commands_pb.DestroyResp) => void): grpc.ClientUnaryCall;
destroy(request: commands_pb.DestroyReq, metadata: grpc.Metadata, options: Partial<grpc.CallOptions>, callback: (error: grpc.ServiceError | null, response: commands_pb.DestroyResp) => void): grpc.ClientUnaryCall;
rescan(request: commands_pb.RescanReq, callback: (error: grpc.ServiceError | null, response: commands_pb.RescanResp) => void): grpc.ClientUnaryCall;
rescan(request: commands_pb.RescanReq, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: commands_pb.RescanResp) => void): grpc.ClientUnaryCall;
rescan(request: commands_pb.RescanReq, metadata: grpc.Metadata, options: Partial<grpc.CallOptions>, callback: (error: grpc.ServiceError | null, response: commands_pb.RescanResp) => void): grpc.ClientUnaryCall;
updateIndex(request: commands_pb.UpdateIndexReq, options?: Partial<grpc.CallOptions>): grpc.ClientReadableStream<commands_pb.UpdateIndexResp>;
updateIndex(request: commands_pb.UpdateIndexReq, metadata?: grpc.Metadata, options?: Partial<grpc.CallOptions>): grpc.ClientReadableStream<commands_pb.UpdateIndexResp>;
boardList(request: board_pb.BoardListReq, callback: (error: grpc.ServiceError | null, response: board_pb.BoardListResp) => void): grpc.ClientUnaryCall;
boardList(request: board_pb.BoardListReq, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: board_pb.BoardListResp) => void): grpc.ClientUnaryCall;
boardList(request: board_pb.BoardListReq, metadata: grpc.Metadata, options: Partial<grpc.CallOptions>, callback: (error: grpc.ServiceError | null, response: board_pb.BoardListResp) => void): grpc.ClientUnaryCall;
boardDetails(request: board_pb.BoardDetailsReq, callback: (error: grpc.ServiceError | null, response: board_pb.BoardDetailsResp) => void): grpc.ClientUnaryCall;
boardDetails(request: board_pb.BoardDetailsReq, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: board_pb.BoardDetailsResp) => void): grpc.ClientUnaryCall;
boardDetails(request: board_pb.BoardDetailsReq, metadata: grpc.Metadata, options: Partial<grpc.CallOptions>, callback: (error: grpc.ServiceError | null, response: board_pb.BoardDetailsResp) => void): grpc.ClientUnaryCall;
compile(request: compile_pb.CompileReq, options?: Partial<grpc.CallOptions>): grpc.ClientReadableStream<compile_pb.CompileResp>;
compile(request: compile_pb.CompileReq, metadata?: grpc.Metadata, options?: Partial<grpc.CallOptions>): grpc.ClientReadableStream<compile_pb.CompileResp>;
platformInstall(request: core_pb.PlatformInstallReq, options?: Partial<grpc.CallOptions>): grpc.ClientReadableStream<core_pb.PlatformInstallResp>;
platformInstall(request: core_pb.PlatformInstallReq, metadata?: grpc.Metadata, options?: Partial<grpc.CallOptions>): grpc.ClientReadableStream<core_pb.PlatformInstallResp>;
platformDownload(request: core_pb.PlatformDownloadReq, options?: Partial<grpc.CallOptions>): grpc.ClientReadableStream<core_pb.PlatformDownloadResp>;
platformDownload(request: core_pb.PlatformDownloadReq, metadata?: grpc.Metadata, options?: Partial<grpc.CallOptions>): grpc.ClientReadableStream<core_pb.PlatformDownloadResp>;
platformUninstall(request: core_pb.PlatformUninstallReq, options?: Partial<grpc.CallOptions>): grpc.ClientReadableStream<core_pb.PlatformUninstallResp>;
platformUninstall(request: core_pb.PlatformUninstallReq, metadata?: grpc.Metadata, options?: Partial<grpc.CallOptions>): grpc.ClientReadableStream<core_pb.PlatformUninstallResp>;
platformUpgrade(request: core_pb.PlatformUpgradeReq, options?: Partial<grpc.CallOptions>): grpc.ClientReadableStream<core_pb.PlatformUpgradeResp>;
platformUpgrade(request: core_pb.PlatformUpgradeReq, metadata?: grpc.Metadata, options?: Partial<grpc.CallOptions>): grpc.ClientReadableStream<core_pb.PlatformUpgradeResp>;
upload(request: upload_pb.UploadReq, options?: Partial<grpc.CallOptions>): grpc.ClientReadableStream<upload_pb.UploadResp>;
upload(request: upload_pb.UploadReq, metadata?: grpc.Metadata, options?: Partial<grpc.CallOptions>): grpc.ClientReadableStream<upload_pb.UploadResp>;
platformSearch(request: core_pb.PlatformSearchReq, callback: (error: grpc.ServiceError | null, response: core_pb.PlatformSearchResp) => void): grpc.ClientUnaryCall;
platformSearch(request: core_pb.PlatformSearchReq, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: core_pb.PlatformSearchResp) => void): grpc.ClientUnaryCall;
platformSearch(request: core_pb.PlatformSearchReq, metadata: grpc.Metadata, options: Partial<grpc.CallOptions>, callback: (error: grpc.ServiceError | null, response: core_pb.PlatformSearchResp) => void): grpc.ClientUnaryCall;
platformList(request: core_pb.PlatformListReq, callback: (error: grpc.ServiceError | null, response: core_pb.PlatformListResp) => void): grpc.ClientUnaryCall;
platformList(request: core_pb.PlatformListReq, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: core_pb.PlatformListResp) => void): grpc.ClientUnaryCall;
platformList(request: core_pb.PlatformListReq, metadata: grpc.Metadata, options: Partial<grpc.CallOptions>, callback: (error: grpc.ServiceError | null, response: core_pb.PlatformListResp) => void): grpc.ClientUnaryCall;
libraryDownload(request: lib_pb.LibraryDownloadReq, options?: Partial<grpc.CallOptions>): grpc.ClientReadableStream<lib_pb.LibraryDownloadResp>;
libraryDownload(request: lib_pb.LibraryDownloadReq, metadata?: grpc.Metadata, options?: Partial<grpc.CallOptions>): grpc.ClientReadableStream<lib_pb.LibraryDownloadResp>;
libraryInstall(request: lib_pb.LibraryInstallReq, options?: Partial<grpc.CallOptions>): grpc.ClientReadableStream<lib_pb.LibraryInstallResp>;
libraryInstall(request: lib_pb.LibraryInstallReq, metadata?: grpc.Metadata, options?: Partial<grpc.CallOptions>): grpc.ClientReadableStream<lib_pb.LibraryInstallResp>;
libraryUninstall(request: lib_pb.LibraryUninstallReq, options?: Partial<grpc.CallOptions>): grpc.ClientReadableStream<lib_pb.LibraryUninstallResp>;
libraryUninstall(request: lib_pb.LibraryUninstallReq, metadata?: grpc.Metadata, options?: Partial<grpc.CallOptions>): grpc.ClientReadableStream<lib_pb.LibraryUninstallResp>;
libraryUpgradeAll(request: lib_pb.LibraryUpgradeAllReq, options?: Partial<grpc.CallOptions>): grpc.ClientReadableStream<lib_pb.LibraryUpgradeAllResp>;
libraryUpgradeAll(request: lib_pb.LibraryUpgradeAllReq, metadata?: grpc.Metadata, options?: Partial<grpc.CallOptions>): grpc.ClientReadableStream<lib_pb.LibraryUpgradeAllResp>;
librarySearch(request: lib_pb.LibrarySearchReq, callback: (error: grpc.ServiceError | null, response: lib_pb.LibrarySearchResp) => void): grpc.ClientUnaryCall;
librarySearch(request: lib_pb.LibrarySearchReq, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: lib_pb.LibrarySearchResp) => void): grpc.ClientUnaryCall;
librarySearch(request: lib_pb.LibrarySearchReq, metadata: grpc.Metadata, options: Partial<grpc.CallOptions>, callback: (error: grpc.ServiceError | null, response: lib_pb.LibrarySearchResp) => void): grpc.ClientUnaryCall;
libraryList(request: lib_pb.LibraryListReq, callback: (error: grpc.ServiceError | null, response: lib_pb.LibraryListResp) => void): grpc.ClientUnaryCall;
libraryList(request: lib_pb.LibraryListReq, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: lib_pb.LibraryListResp) => void): grpc.ClientUnaryCall;
libraryList(request: lib_pb.LibraryListReq, metadata: grpc.Metadata, options: Partial<grpc.CallOptions>, callback: (error: grpc.ServiceError | null, response: 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_pb.InitReq, callback: (error: grpc.ServiceError | null, response: commands_pb.InitResp) => void): grpc.ClientUnaryCall;
public init(request: commands_pb.InitReq, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: commands_pb.InitResp) => void): grpc.ClientUnaryCall;
public init(request: commands_pb.InitReq, metadata: grpc.Metadata, options: Partial<grpc.CallOptions>, callback: (error: grpc.ServiceError | null, response: commands_pb.InitResp) => void): grpc.ClientUnaryCall;
public destroy(request: commands_pb.DestroyReq, callback: (error: grpc.ServiceError | null, response: commands_pb.DestroyResp) => void): grpc.ClientUnaryCall;
public destroy(request: commands_pb.DestroyReq, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: commands_pb.DestroyResp) => void): grpc.ClientUnaryCall;
public destroy(request: commands_pb.DestroyReq, metadata: grpc.Metadata, options: Partial<grpc.CallOptions>, callback: (error: grpc.ServiceError | null, response: commands_pb.DestroyResp) => void): grpc.ClientUnaryCall;
public rescan(request: commands_pb.RescanReq, callback: (error: grpc.ServiceError | null, response: commands_pb.RescanResp) => void): grpc.ClientUnaryCall;
public rescan(request: commands_pb.RescanReq, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: commands_pb.RescanResp) => void): grpc.ClientUnaryCall;
public rescan(request: commands_pb.RescanReq, metadata: grpc.Metadata, options: Partial<grpc.CallOptions>, callback: (error: grpc.ServiceError | null, response: commands_pb.RescanResp) => void): grpc.ClientUnaryCall;
public updateIndex(request: commands_pb.UpdateIndexReq, options?: Partial<grpc.CallOptions>): grpc.ClientReadableStream<commands_pb.UpdateIndexResp>;
public updateIndex(request: commands_pb.UpdateIndexReq, metadata?: grpc.Metadata, options?: Partial<grpc.CallOptions>): grpc.ClientReadableStream<commands_pb.UpdateIndexResp>;
public boardList(request: board_pb.BoardListReq, callback: (error: grpc.ServiceError | null, response: board_pb.BoardListResp) => void): grpc.ClientUnaryCall;
public boardList(request: board_pb.BoardListReq, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: board_pb.BoardListResp) => void): grpc.ClientUnaryCall;
public boardList(request: board_pb.BoardListReq, metadata: grpc.Metadata, options: Partial<grpc.CallOptions>, callback: (error: grpc.ServiceError | null, response: board_pb.BoardListResp) => void): grpc.ClientUnaryCall;
public boardDetails(request: board_pb.BoardDetailsReq, callback: (error: grpc.ServiceError | null, response: board_pb.BoardDetailsResp) => void): grpc.ClientUnaryCall;
public boardDetails(request: board_pb.BoardDetailsReq, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: board_pb.BoardDetailsResp) => void): grpc.ClientUnaryCall;
public boardDetails(request: board_pb.BoardDetailsReq, metadata: grpc.Metadata, options: Partial<grpc.CallOptions>, callback: (error: grpc.ServiceError | null, response: board_pb.BoardDetailsResp) => void): grpc.ClientUnaryCall;
public compile(request: compile_pb.CompileReq, options?: Partial<grpc.CallOptions>): grpc.ClientReadableStream<compile_pb.CompileResp>;
public compile(request: compile_pb.CompileReq, metadata?: grpc.Metadata, options?: Partial<grpc.CallOptions>): grpc.ClientReadableStream<compile_pb.CompileResp>;
public platformInstall(request: core_pb.PlatformInstallReq, options?: Partial<grpc.CallOptions>): grpc.ClientReadableStream<core_pb.PlatformInstallResp>;
public platformInstall(request: core_pb.PlatformInstallReq, metadata?: grpc.Metadata, options?: Partial<grpc.CallOptions>): grpc.ClientReadableStream<core_pb.PlatformInstallResp>;
public platformDownload(request: core_pb.PlatformDownloadReq, options?: Partial<grpc.CallOptions>): grpc.ClientReadableStream<core_pb.PlatformDownloadResp>;
public platformDownload(request: core_pb.PlatformDownloadReq, metadata?: grpc.Metadata, options?: Partial<grpc.CallOptions>): grpc.ClientReadableStream<core_pb.PlatformDownloadResp>;
public platformUninstall(request: core_pb.PlatformUninstallReq, options?: Partial<grpc.CallOptions>): grpc.ClientReadableStream<core_pb.PlatformUninstallResp>;
public platformUninstall(request: core_pb.PlatformUninstallReq, metadata?: grpc.Metadata, options?: Partial<grpc.CallOptions>): grpc.ClientReadableStream<core_pb.PlatformUninstallResp>;
public platformUpgrade(request: core_pb.PlatformUpgradeReq, options?: Partial<grpc.CallOptions>): grpc.ClientReadableStream<core_pb.PlatformUpgradeResp>;
public platformUpgrade(request: core_pb.PlatformUpgradeReq, metadata?: grpc.Metadata, options?: Partial<grpc.CallOptions>): grpc.ClientReadableStream<core_pb.PlatformUpgradeResp>;
public upload(request: upload_pb.UploadReq, options?: Partial<grpc.CallOptions>): grpc.ClientReadableStream<upload_pb.UploadResp>;
public upload(request: upload_pb.UploadReq, metadata?: grpc.Metadata, options?: Partial<grpc.CallOptions>): grpc.ClientReadableStream<upload_pb.UploadResp>;
public platformSearch(request: core_pb.PlatformSearchReq, callback: (error: grpc.ServiceError | null, response: core_pb.PlatformSearchResp) => void): grpc.ClientUnaryCall;
public platformSearch(request: core_pb.PlatformSearchReq, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: core_pb.PlatformSearchResp) => void): grpc.ClientUnaryCall;
public platformSearch(request: core_pb.PlatformSearchReq, metadata: grpc.Metadata, options: Partial<grpc.CallOptions>, callback: (error: grpc.ServiceError | null, response: core_pb.PlatformSearchResp) => void): grpc.ClientUnaryCall;
public platformList(request: core_pb.PlatformListReq, callback: (error: grpc.ServiceError | null, response: core_pb.PlatformListResp) => void): grpc.ClientUnaryCall;
public platformList(request: core_pb.PlatformListReq, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: core_pb.PlatformListResp) => void): grpc.ClientUnaryCall;
public platformList(request: core_pb.PlatformListReq, metadata: grpc.Metadata, options: Partial<grpc.CallOptions>, callback: (error: grpc.ServiceError | null, response: core_pb.PlatformListResp) => void): grpc.ClientUnaryCall;
public libraryDownload(request: lib_pb.LibraryDownloadReq, options?: Partial<grpc.CallOptions>): grpc.ClientReadableStream<lib_pb.LibraryDownloadResp>;
public libraryDownload(request: lib_pb.LibraryDownloadReq, metadata?: grpc.Metadata, options?: Partial<grpc.CallOptions>): grpc.ClientReadableStream<lib_pb.LibraryDownloadResp>;
public libraryInstall(request: lib_pb.LibraryInstallReq, options?: Partial<grpc.CallOptions>): grpc.ClientReadableStream<lib_pb.LibraryInstallResp>;
public libraryInstall(request: lib_pb.LibraryInstallReq, metadata?: grpc.Metadata, options?: Partial<grpc.CallOptions>): grpc.ClientReadableStream<lib_pb.LibraryInstallResp>;
public libraryUninstall(request: lib_pb.LibraryUninstallReq, options?: Partial<grpc.CallOptions>): grpc.ClientReadableStream<lib_pb.LibraryUninstallResp>;
public libraryUninstall(request: lib_pb.LibraryUninstallReq, metadata?: grpc.Metadata, options?: Partial<grpc.CallOptions>): grpc.ClientReadableStream<lib_pb.LibraryUninstallResp>;
public libraryUpgradeAll(request: lib_pb.LibraryUpgradeAllReq, options?: Partial<grpc.CallOptions>): grpc.ClientReadableStream<lib_pb.LibraryUpgradeAllResp>;
public libraryUpgradeAll(request: lib_pb.LibraryUpgradeAllReq, metadata?: grpc.Metadata, options?: Partial<grpc.CallOptions>): grpc.ClientReadableStream<lib_pb.LibraryUpgradeAllResp>;
public librarySearch(request: lib_pb.LibrarySearchReq, callback: (error: grpc.ServiceError | null, response: lib_pb.LibrarySearchResp) => void): grpc.ClientUnaryCall;
public librarySearch(request: lib_pb.LibrarySearchReq, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: lib_pb.LibrarySearchResp) => void): grpc.ClientUnaryCall;
public librarySearch(request: lib_pb.LibrarySearchReq, metadata: grpc.Metadata, options: Partial<grpc.CallOptions>, callback: (error: grpc.ServiceError | null, response: lib_pb.LibrarySearchResp) => void): grpc.ClientUnaryCall;
public libraryList(request: lib_pb.LibraryListReq, callback: (error: grpc.ServiceError | null, response: lib_pb.LibraryListResp) => void): grpc.ClientUnaryCall;
public libraryList(request: lib_pb.LibraryListReq, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: lib_pb.LibraryListResp) => void): grpc.ClientUnaryCall;
public libraryList(request: lib_pb.LibraryListReq, metadata: grpc.Metadata, options: Partial<grpc.CallOptions>, callback: (error: grpc.ServiceError | null, response: lib_pb.LibraryListResp) => void): grpc.ClientUnaryCall;
}

View File

@@ -1,706 +0,0 @@
// GENERATED CODE -- DO NOT EDIT!
// Original file comments:
//
// This file is part of arduino-cli.
//
// Copyright 2018 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_pb = require('./commands_pb.js');
var common_pb = require('./common_pb.js');
var board_pb = require('./board_pb.js');
var compile_pb = require('./compile_pb.js');
var core_pb = require('./core_pb.js');
var upload_pb = require('./upload_pb.js');
var lib_pb = require('./lib_pb.js');
function serialize_arduino_BoardDetailsReq(arg) {
if (!(arg instanceof board_pb.BoardDetailsReq)) {
throw new Error('Expected argument of type arduino.BoardDetailsReq');
}
return Buffer.from(arg.serializeBinary());
}
function deserialize_arduino_BoardDetailsReq(buffer_arg) {
return board_pb.BoardDetailsReq.deserializeBinary(new Uint8Array(buffer_arg));
}
function serialize_arduino_BoardDetailsResp(arg) {
if (!(arg instanceof board_pb.BoardDetailsResp)) {
throw new Error('Expected argument of type arduino.BoardDetailsResp');
}
return Buffer.from(arg.serializeBinary());
}
function deserialize_arduino_BoardDetailsResp(buffer_arg) {
return board_pb.BoardDetailsResp.deserializeBinary(new Uint8Array(buffer_arg));
}
function serialize_arduino_BoardListReq(arg) {
if (!(arg instanceof board_pb.BoardListReq)) {
throw new Error('Expected argument of type arduino.BoardListReq');
}
return Buffer.from(arg.serializeBinary());
}
function deserialize_arduino_BoardListReq(buffer_arg) {
return board_pb.BoardListReq.deserializeBinary(new Uint8Array(buffer_arg));
}
function serialize_arduino_BoardListResp(arg) {
if (!(arg instanceof board_pb.BoardListResp)) {
throw new Error('Expected argument of type arduino.BoardListResp');
}
return Buffer.from(arg.serializeBinary());
}
function deserialize_arduino_BoardListResp(buffer_arg) {
return board_pb.BoardListResp.deserializeBinary(new Uint8Array(buffer_arg));
}
function serialize_arduino_CompileReq(arg) {
if (!(arg instanceof compile_pb.CompileReq)) {
throw new Error('Expected argument of type arduino.CompileReq');
}
return Buffer.from(arg.serializeBinary());
}
function deserialize_arduino_CompileReq(buffer_arg) {
return compile_pb.CompileReq.deserializeBinary(new Uint8Array(buffer_arg));
}
function serialize_arduino_CompileResp(arg) {
if (!(arg instanceof compile_pb.CompileResp)) {
throw new Error('Expected argument of type arduino.CompileResp');
}
return Buffer.from(arg.serializeBinary());
}
function deserialize_arduino_CompileResp(buffer_arg) {
return compile_pb.CompileResp.deserializeBinary(new Uint8Array(buffer_arg));
}
function serialize_arduino_DestroyReq(arg) {
if (!(arg instanceof commands_pb.DestroyReq)) {
throw new Error('Expected argument of type arduino.DestroyReq');
}
return Buffer.from(arg.serializeBinary());
}
function deserialize_arduino_DestroyReq(buffer_arg) {
return commands_pb.DestroyReq.deserializeBinary(new Uint8Array(buffer_arg));
}
function serialize_arduino_DestroyResp(arg) {
if (!(arg instanceof commands_pb.DestroyResp)) {
throw new Error('Expected argument of type arduino.DestroyResp');
}
return Buffer.from(arg.serializeBinary());
}
function deserialize_arduino_DestroyResp(buffer_arg) {
return commands_pb.DestroyResp.deserializeBinary(new Uint8Array(buffer_arg));
}
function serialize_arduino_InitReq(arg) {
if (!(arg instanceof commands_pb.InitReq)) {
throw new Error('Expected argument of type arduino.InitReq');
}
return Buffer.from(arg.serializeBinary());
}
function deserialize_arduino_InitReq(buffer_arg) {
return commands_pb.InitReq.deserializeBinary(new Uint8Array(buffer_arg));
}
function serialize_arduino_InitResp(arg) {
if (!(arg instanceof commands_pb.InitResp)) {
throw new Error('Expected argument of type arduino.InitResp');
}
return Buffer.from(arg.serializeBinary());
}
function deserialize_arduino_InitResp(buffer_arg) {
return commands_pb.InitResp.deserializeBinary(new Uint8Array(buffer_arg));
}
function serialize_arduino_LibraryDownloadReq(arg) {
if (!(arg instanceof lib_pb.LibraryDownloadReq)) {
throw new Error('Expected argument of type arduino.LibraryDownloadReq');
}
return Buffer.from(arg.serializeBinary());
}
function deserialize_arduino_LibraryDownloadReq(buffer_arg) {
return lib_pb.LibraryDownloadReq.deserializeBinary(new Uint8Array(buffer_arg));
}
function serialize_arduino_LibraryDownloadResp(arg) {
if (!(arg instanceof lib_pb.LibraryDownloadResp)) {
throw new Error('Expected argument of type arduino.LibraryDownloadResp');
}
return Buffer.from(arg.serializeBinary());
}
function deserialize_arduino_LibraryDownloadResp(buffer_arg) {
return lib_pb.LibraryDownloadResp.deserializeBinary(new Uint8Array(buffer_arg));
}
function serialize_arduino_LibraryInstallReq(arg) {
if (!(arg instanceof lib_pb.LibraryInstallReq)) {
throw new Error('Expected argument of type arduino.LibraryInstallReq');
}
return Buffer.from(arg.serializeBinary());
}
function deserialize_arduino_LibraryInstallReq(buffer_arg) {
return lib_pb.LibraryInstallReq.deserializeBinary(new Uint8Array(buffer_arg));
}
function serialize_arduino_LibraryInstallResp(arg) {
if (!(arg instanceof lib_pb.LibraryInstallResp)) {
throw new Error('Expected argument of type arduino.LibraryInstallResp');
}
return Buffer.from(arg.serializeBinary());
}
function deserialize_arduino_LibraryInstallResp(buffer_arg) {
return lib_pb.LibraryInstallResp.deserializeBinary(new Uint8Array(buffer_arg));
}
function serialize_arduino_LibraryListReq(arg) {
if (!(arg instanceof lib_pb.LibraryListReq)) {
throw new Error('Expected argument of type arduino.LibraryListReq');
}
return Buffer.from(arg.serializeBinary());
}
function deserialize_arduino_LibraryListReq(buffer_arg) {
return lib_pb.LibraryListReq.deserializeBinary(new Uint8Array(buffer_arg));
}
function serialize_arduino_LibraryListResp(arg) {
if (!(arg instanceof lib_pb.LibraryListResp)) {
throw new Error('Expected argument of type arduino.LibraryListResp');
}
return Buffer.from(arg.serializeBinary());
}
function deserialize_arduino_LibraryListResp(buffer_arg) {
return lib_pb.LibraryListResp.deserializeBinary(new Uint8Array(buffer_arg));
}
function serialize_arduino_LibrarySearchReq(arg) {
if (!(arg instanceof lib_pb.LibrarySearchReq)) {
throw new Error('Expected argument of type arduino.LibrarySearchReq');
}
return Buffer.from(arg.serializeBinary());
}
function deserialize_arduino_LibrarySearchReq(buffer_arg) {
return lib_pb.LibrarySearchReq.deserializeBinary(new Uint8Array(buffer_arg));
}
function serialize_arduino_LibrarySearchResp(arg) {
if (!(arg instanceof lib_pb.LibrarySearchResp)) {
throw new Error('Expected argument of type arduino.LibrarySearchResp');
}
return Buffer.from(arg.serializeBinary());
}
function deserialize_arduino_LibrarySearchResp(buffer_arg) {
return lib_pb.LibrarySearchResp.deserializeBinary(new Uint8Array(buffer_arg));
}
function serialize_arduino_LibraryUninstallReq(arg) {
if (!(arg instanceof lib_pb.LibraryUninstallReq)) {
throw new Error('Expected argument of type arduino.LibraryUninstallReq');
}
return Buffer.from(arg.serializeBinary());
}
function deserialize_arduino_LibraryUninstallReq(buffer_arg) {
return lib_pb.LibraryUninstallReq.deserializeBinary(new Uint8Array(buffer_arg));
}
function serialize_arduino_LibraryUninstallResp(arg) {
if (!(arg instanceof lib_pb.LibraryUninstallResp)) {
throw new Error('Expected argument of type arduino.LibraryUninstallResp');
}
return Buffer.from(arg.serializeBinary());
}
function deserialize_arduino_LibraryUninstallResp(buffer_arg) {
return lib_pb.LibraryUninstallResp.deserializeBinary(new Uint8Array(buffer_arg));
}
function serialize_arduino_LibraryUpgradeAllReq(arg) {
if (!(arg instanceof lib_pb.LibraryUpgradeAllReq)) {
throw new Error('Expected argument of type arduino.LibraryUpgradeAllReq');
}
return Buffer.from(arg.serializeBinary());
}
function deserialize_arduino_LibraryUpgradeAllReq(buffer_arg) {
return lib_pb.LibraryUpgradeAllReq.deserializeBinary(new Uint8Array(buffer_arg));
}
function serialize_arduino_LibraryUpgradeAllResp(arg) {
if (!(arg instanceof lib_pb.LibraryUpgradeAllResp)) {
throw new Error('Expected argument of type arduino.LibraryUpgradeAllResp');
}
return Buffer.from(arg.serializeBinary());
}
function deserialize_arduino_LibraryUpgradeAllResp(buffer_arg) {
return lib_pb.LibraryUpgradeAllResp.deserializeBinary(new Uint8Array(buffer_arg));
}
function serialize_arduino_PlatformDownloadReq(arg) {
if (!(arg instanceof core_pb.PlatformDownloadReq)) {
throw new Error('Expected argument of type arduino.PlatformDownloadReq');
}
return Buffer.from(arg.serializeBinary());
}
function deserialize_arduino_PlatformDownloadReq(buffer_arg) {
return core_pb.PlatformDownloadReq.deserializeBinary(new Uint8Array(buffer_arg));
}
function serialize_arduino_PlatformDownloadResp(arg) {
if (!(arg instanceof core_pb.PlatformDownloadResp)) {
throw new Error('Expected argument of type arduino.PlatformDownloadResp');
}
return Buffer.from(arg.serializeBinary());
}
function deserialize_arduino_PlatformDownloadResp(buffer_arg) {
return core_pb.PlatformDownloadResp.deserializeBinary(new Uint8Array(buffer_arg));
}
function serialize_arduino_PlatformInstallReq(arg) {
if (!(arg instanceof core_pb.PlatformInstallReq)) {
throw new Error('Expected argument of type arduino.PlatformInstallReq');
}
return Buffer.from(arg.serializeBinary());
}
function deserialize_arduino_PlatformInstallReq(buffer_arg) {
return core_pb.PlatformInstallReq.deserializeBinary(new Uint8Array(buffer_arg));
}
function serialize_arduino_PlatformInstallResp(arg) {
if (!(arg instanceof core_pb.PlatformInstallResp)) {
throw new Error('Expected argument of type arduino.PlatformInstallResp');
}
return Buffer.from(arg.serializeBinary());
}
function deserialize_arduino_PlatformInstallResp(buffer_arg) {
return core_pb.PlatformInstallResp.deserializeBinary(new Uint8Array(buffer_arg));
}
function serialize_arduino_PlatformListReq(arg) {
if (!(arg instanceof core_pb.PlatformListReq)) {
throw new Error('Expected argument of type arduino.PlatformListReq');
}
return Buffer.from(arg.serializeBinary());
}
function deserialize_arduino_PlatformListReq(buffer_arg) {
return core_pb.PlatformListReq.deserializeBinary(new Uint8Array(buffer_arg));
}
function serialize_arduino_PlatformListResp(arg) {
if (!(arg instanceof core_pb.PlatformListResp)) {
throw new Error('Expected argument of type arduino.PlatformListResp');
}
return Buffer.from(arg.serializeBinary());
}
function deserialize_arduino_PlatformListResp(buffer_arg) {
return core_pb.PlatformListResp.deserializeBinary(new Uint8Array(buffer_arg));
}
function serialize_arduino_PlatformSearchReq(arg) {
if (!(arg instanceof core_pb.PlatformSearchReq)) {
throw new Error('Expected argument of type arduino.PlatformSearchReq');
}
return Buffer.from(arg.serializeBinary());
}
function deserialize_arduino_PlatformSearchReq(buffer_arg) {
return core_pb.PlatformSearchReq.deserializeBinary(new Uint8Array(buffer_arg));
}
function serialize_arduino_PlatformSearchResp(arg) {
if (!(arg instanceof core_pb.PlatformSearchResp)) {
throw new Error('Expected argument of type arduino.PlatformSearchResp');
}
return Buffer.from(arg.serializeBinary());
}
function deserialize_arduino_PlatformSearchResp(buffer_arg) {
return core_pb.PlatformSearchResp.deserializeBinary(new Uint8Array(buffer_arg));
}
function serialize_arduino_PlatformUninstallReq(arg) {
if (!(arg instanceof core_pb.PlatformUninstallReq)) {
throw new Error('Expected argument of type arduino.PlatformUninstallReq');
}
return Buffer.from(arg.serializeBinary());
}
function deserialize_arduino_PlatformUninstallReq(buffer_arg) {
return core_pb.PlatformUninstallReq.deserializeBinary(new Uint8Array(buffer_arg));
}
function serialize_arduino_PlatformUninstallResp(arg) {
if (!(arg instanceof core_pb.PlatformUninstallResp)) {
throw new Error('Expected argument of type arduino.PlatformUninstallResp');
}
return Buffer.from(arg.serializeBinary());
}
function deserialize_arduino_PlatformUninstallResp(buffer_arg) {
return core_pb.PlatformUninstallResp.deserializeBinary(new Uint8Array(buffer_arg));
}
function serialize_arduino_PlatformUpgradeReq(arg) {
if (!(arg instanceof core_pb.PlatformUpgradeReq)) {
throw new Error('Expected argument of type arduino.PlatformUpgradeReq');
}
return Buffer.from(arg.serializeBinary());
}
function deserialize_arduino_PlatformUpgradeReq(buffer_arg) {
return core_pb.PlatformUpgradeReq.deserializeBinary(new Uint8Array(buffer_arg));
}
function serialize_arduino_PlatformUpgradeResp(arg) {
if (!(arg instanceof core_pb.PlatformUpgradeResp)) {
throw new Error('Expected argument of type arduino.PlatformUpgradeResp');
}
return Buffer.from(arg.serializeBinary());
}
function deserialize_arduino_PlatformUpgradeResp(buffer_arg) {
return core_pb.PlatformUpgradeResp.deserializeBinary(new Uint8Array(buffer_arg));
}
function serialize_arduino_RescanReq(arg) {
if (!(arg instanceof commands_pb.RescanReq)) {
throw new Error('Expected argument of type arduino.RescanReq');
}
return Buffer.from(arg.serializeBinary());
}
function deserialize_arduino_RescanReq(buffer_arg) {
return commands_pb.RescanReq.deserializeBinary(new Uint8Array(buffer_arg));
}
function serialize_arduino_RescanResp(arg) {
if (!(arg instanceof commands_pb.RescanResp)) {
throw new Error('Expected argument of type arduino.RescanResp');
}
return Buffer.from(arg.serializeBinary());
}
function deserialize_arduino_RescanResp(buffer_arg) {
return commands_pb.RescanResp.deserializeBinary(new Uint8Array(buffer_arg));
}
function serialize_arduino_UpdateIndexReq(arg) {
if (!(arg instanceof commands_pb.UpdateIndexReq)) {
throw new Error('Expected argument of type arduino.UpdateIndexReq');
}
return Buffer.from(arg.serializeBinary());
}
function deserialize_arduino_UpdateIndexReq(buffer_arg) {
return commands_pb.UpdateIndexReq.deserializeBinary(new Uint8Array(buffer_arg));
}
function serialize_arduino_UpdateIndexResp(arg) {
if (!(arg instanceof commands_pb.UpdateIndexResp)) {
throw new Error('Expected argument of type arduino.UpdateIndexResp');
}
return Buffer.from(arg.serializeBinary());
}
function deserialize_arduino_UpdateIndexResp(buffer_arg) {
return commands_pb.UpdateIndexResp.deserializeBinary(new Uint8Array(buffer_arg));
}
function serialize_arduino_UploadReq(arg) {
if (!(arg instanceof upload_pb.UploadReq)) {
throw new Error('Expected argument of type arduino.UploadReq');
}
return Buffer.from(arg.serializeBinary());
}
function deserialize_arduino_UploadReq(buffer_arg) {
return upload_pb.UploadReq.deserializeBinary(new Uint8Array(buffer_arg));
}
function serialize_arduino_UploadResp(arg) {
if (!(arg instanceof upload_pb.UploadResp)) {
throw new Error('Expected argument of type arduino.UploadResp');
}
return Buffer.from(arg.serializeBinary());
}
function deserialize_arduino_UploadResp(buffer_arg) {
return upload_pb.UploadResp.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: '/arduino.ArduinoCore/Init',
requestStream: false,
responseStream: false,
requestType: commands_pb.InitReq,
responseType: commands_pb.InitResp,
requestSerialize: serialize_arduino_InitReq,
requestDeserialize: deserialize_arduino_InitReq,
responseSerialize: serialize_arduino_InitResp,
responseDeserialize: deserialize_arduino_InitResp,
},
// Destroy an instance of the Arduino Core Service
destroy: {
path: '/arduino.ArduinoCore/Destroy',
requestStream: false,
responseStream: false,
requestType: commands_pb.DestroyReq,
responseType: commands_pb.DestroyResp,
requestSerialize: serialize_arduino_DestroyReq,
requestDeserialize: deserialize_arduino_DestroyReq,
responseSerialize: serialize_arduino_DestroyResp,
responseDeserialize: deserialize_arduino_DestroyResp,
},
// Rescan instance of the Arduino Core Service
rescan: {
path: '/arduino.ArduinoCore/Rescan',
requestStream: false,
responseStream: false,
requestType: commands_pb.RescanReq,
responseType: commands_pb.RescanResp,
requestSerialize: serialize_arduino_RescanReq,
requestDeserialize: deserialize_arduino_RescanReq,
responseSerialize: serialize_arduino_RescanResp,
responseDeserialize: deserialize_arduino_RescanResp,
},
// Update package index of the Arduino Core Service
updateIndex: {
path: '/arduino.ArduinoCore/UpdateIndex',
requestStream: false,
responseStream: true,
requestType: commands_pb.UpdateIndexReq,
responseType: commands_pb.UpdateIndexResp,
requestSerialize: serialize_arduino_UpdateIndexReq,
requestDeserialize: deserialize_arduino_UpdateIndexReq,
responseSerialize: serialize_arduino_UpdateIndexResp,
responseDeserialize: deserialize_arduino_UpdateIndexResp,
},
// BOARD COMMANDS
// --------------
//
boardList: {
path: '/arduino.ArduinoCore/BoardList',
requestStream: false,
responseStream: false,
requestType: board_pb.BoardListReq,
responseType: board_pb.BoardListResp,
requestSerialize: serialize_arduino_BoardListReq,
requestDeserialize: deserialize_arduino_BoardListReq,
responseSerialize: serialize_arduino_BoardListResp,
responseDeserialize: deserialize_arduino_BoardListResp,
},
// Requests details about a board
boardDetails: {
path: '/arduino.ArduinoCore/BoardDetails',
requestStream: false,
responseStream: false,
requestType: board_pb.BoardDetailsReq,
responseType: board_pb.BoardDetailsResp,
requestSerialize: serialize_arduino_BoardDetailsReq,
requestDeserialize: deserialize_arduino_BoardDetailsReq,
responseSerialize: serialize_arduino_BoardDetailsResp,
responseDeserialize: deserialize_arduino_BoardDetailsResp,
},
compile: {
path: '/arduino.ArduinoCore/Compile',
requestStream: false,
responseStream: true,
requestType: compile_pb.CompileReq,
responseType: compile_pb.CompileResp,
requestSerialize: serialize_arduino_CompileReq,
requestDeserialize: deserialize_arduino_CompileReq,
responseSerialize: serialize_arduino_CompileResp,
responseDeserialize: deserialize_arduino_CompileResp,
},
platformInstall: {
path: '/arduino.ArduinoCore/PlatformInstall',
requestStream: false,
responseStream: true,
requestType: core_pb.PlatformInstallReq,
responseType: core_pb.PlatformInstallResp,
requestSerialize: serialize_arduino_PlatformInstallReq,
requestDeserialize: deserialize_arduino_PlatformInstallReq,
responseSerialize: serialize_arduino_PlatformInstallResp,
responseDeserialize: deserialize_arduino_PlatformInstallResp,
},
platformDownload: {
path: '/arduino.ArduinoCore/PlatformDownload',
requestStream: false,
responseStream: true,
requestType: core_pb.PlatformDownloadReq,
responseType: core_pb.PlatformDownloadResp,
requestSerialize: serialize_arduino_PlatformDownloadReq,
requestDeserialize: deserialize_arduino_PlatformDownloadReq,
responseSerialize: serialize_arduino_PlatformDownloadResp,
responseDeserialize: deserialize_arduino_PlatformDownloadResp,
},
platformUninstall: {
path: '/arduino.ArduinoCore/PlatformUninstall',
requestStream: false,
responseStream: true,
requestType: core_pb.PlatformUninstallReq,
responseType: core_pb.PlatformUninstallResp,
requestSerialize: serialize_arduino_PlatformUninstallReq,
requestDeserialize: deserialize_arduino_PlatformUninstallReq,
responseSerialize: serialize_arduino_PlatformUninstallResp,
responseDeserialize: deserialize_arduino_PlatformUninstallResp,
},
platformUpgrade: {
path: '/arduino.ArduinoCore/PlatformUpgrade',
requestStream: false,
responseStream: true,
requestType: core_pb.PlatformUpgradeReq,
responseType: core_pb.PlatformUpgradeResp,
requestSerialize: serialize_arduino_PlatformUpgradeReq,
requestDeserialize: deserialize_arduino_PlatformUpgradeReq,
responseSerialize: serialize_arduino_PlatformUpgradeResp,
responseDeserialize: deserialize_arduino_PlatformUpgradeResp,
},
upload: {
path: '/arduino.ArduinoCore/Upload',
requestStream: false,
responseStream: true,
requestType: upload_pb.UploadReq,
responseType: upload_pb.UploadResp,
requestSerialize: serialize_arduino_UploadReq,
requestDeserialize: deserialize_arduino_UploadReq,
responseSerialize: serialize_arduino_UploadResp,
responseDeserialize: deserialize_arduino_UploadResp,
},
platformSearch: {
path: '/arduino.ArduinoCore/PlatformSearch',
requestStream: false,
responseStream: false,
requestType: core_pb.PlatformSearchReq,
responseType: core_pb.PlatformSearchResp,
requestSerialize: serialize_arduino_PlatformSearchReq,
requestDeserialize: deserialize_arduino_PlatformSearchReq,
responseSerialize: serialize_arduino_PlatformSearchResp,
responseDeserialize: deserialize_arduino_PlatformSearchResp,
},
platformList: {
path: '/arduino.ArduinoCore/PlatformList',
requestStream: false,
responseStream: false,
requestType: core_pb.PlatformListReq,
responseType: core_pb.PlatformListResp,
requestSerialize: serialize_arduino_PlatformListReq,
requestDeserialize: deserialize_arduino_PlatformListReq,
responseSerialize: serialize_arduino_PlatformListResp,
responseDeserialize: deserialize_arduino_PlatformListResp,
},
libraryDownload: {
path: '/arduino.ArduinoCore/LibraryDownload',
requestStream: false,
responseStream: true,
requestType: lib_pb.LibraryDownloadReq,
responseType: lib_pb.LibraryDownloadResp,
requestSerialize: serialize_arduino_LibraryDownloadReq,
requestDeserialize: deserialize_arduino_LibraryDownloadReq,
responseSerialize: serialize_arduino_LibraryDownloadResp,
responseDeserialize: deserialize_arduino_LibraryDownloadResp,
},
libraryInstall: {
path: '/arduino.ArduinoCore/LibraryInstall',
requestStream: false,
responseStream: true,
requestType: lib_pb.LibraryInstallReq,
responseType: lib_pb.LibraryInstallResp,
requestSerialize: serialize_arduino_LibraryInstallReq,
requestDeserialize: deserialize_arduino_LibraryInstallReq,
responseSerialize: serialize_arduino_LibraryInstallResp,
responseDeserialize: deserialize_arduino_LibraryInstallResp,
},
libraryUninstall: {
path: '/arduino.ArduinoCore/LibraryUninstall',
requestStream: false,
responseStream: true,
requestType: lib_pb.LibraryUninstallReq,
responseType: lib_pb.LibraryUninstallResp,
requestSerialize: serialize_arduino_LibraryUninstallReq,
requestDeserialize: deserialize_arduino_LibraryUninstallReq,
responseSerialize: serialize_arduino_LibraryUninstallResp,
responseDeserialize: deserialize_arduino_LibraryUninstallResp,
},
libraryUpgradeAll: {
path: '/arduino.ArduinoCore/LibraryUpgradeAll',
requestStream: false,
responseStream: true,
requestType: lib_pb.LibraryUpgradeAllReq,
responseType: lib_pb.LibraryUpgradeAllResp,
requestSerialize: serialize_arduino_LibraryUpgradeAllReq,
requestDeserialize: deserialize_arduino_LibraryUpgradeAllReq,
responseSerialize: serialize_arduino_LibraryUpgradeAllResp,
responseDeserialize: deserialize_arduino_LibraryUpgradeAllResp,
},
librarySearch: {
path: '/arduino.ArduinoCore/LibrarySearch',
requestStream: false,
responseStream: false,
requestType: lib_pb.LibrarySearchReq,
responseType: lib_pb.LibrarySearchResp,
requestSerialize: serialize_arduino_LibrarySearchReq,
requestDeserialize: deserialize_arduino_LibrarySearchReq,
responseSerialize: serialize_arduino_LibrarySearchResp,
responseDeserialize: deserialize_arduino_LibrarySearchResp,
},
libraryList: {
path: '/arduino.ArduinoCore/LibraryList',
requestStream: false,
responseStream: false,
requestType: lib_pb.LibraryListReq,
responseType: lib_pb.LibraryListResp,
requestSerialize: serialize_arduino_LibraryListReq,
requestDeserialize: deserialize_arduino_LibraryListReq,
responseSerialize: serialize_arduino_LibraryListResp,
responseDeserialize: deserialize_arduino_LibraryListResp,
},
};
exports.ArduinoCoreClient = grpc.makeGenericClientConstructor(ArduinoCoreService);
// BOOTSTRAP COMMANDS
// -------------------

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -1,14 +1,20 @@
import { inject, injectable } from 'inversify';
import * as grpc from '@grpc/grpc-js';
import { ArduinoCoreClient } from './cli-protocol/commands_grpc_pb';
import { InitResp, InitReq, Configuration, UpdateIndexReq, UpdateIndexResp } from './cli-protocol/commands_pb';
import { ArduinoCoreClient } from './cli-protocol/commands/commands_grpc_pb';
import {
InitResp,
InitReq,
Configuration,
UpdateIndexReq,
UpdateIndexResp
} from './cli-protocol/commands/commands_pb';
import { WorkspaceServiceExt } from '../browser/workspace-service-ext';
import { FileSystem } from '@theia/filesystem/lib/common';
import URI from '@theia/core/lib/common/uri';
import { CoreClientProvider, Client } from './core-client-provider';
import * as PQueue from 'p-queue';
import { ToolOutputServiceServer } from '../common/protocol/tool-output-service';
import { Instance } from './cli-protocol/common_pb';
import { Instance } from './cli-protocol/commands/common_pb';
import * as fs from 'fs-extra';
import * as path from 'path';
import * as os from 'os';
@@ -81,16 +87,30 @@ export class CoreClientProviderImpl implements CoreClientProvider {
config.setSketchbookdir(rootPath);
config.setDatadir(defaultDataDirPath);
config.setDownloadsdir(defaultDownloadsDirPath);
config.setBoardmanageradditionalurlsList(['https://downloads.arduino.cc/packages/package_index.json']);
const initReq = new InitReq();
initReq.setConfiguration(config);
const initResp = await new Promise<InitResp>((resolve, reject) => client.init(initReq, (err, resp) => (!!err ? reject : resolve)(!!err ? err : resp)));
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) => {
if (!resp) {
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 seperate promise, try and update the index
// in a separate promise, try and update the index
let succeeded = true;
for (let i = 0; i < 10; i++) {
try {
@@ -118,11 +138,24 @@ export class CoreClientProviderImpl implements CoreClientProvider {
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()) {
this.toolOutputService.publishNewOutput("daemon", `Download${progress.getFile() ? ` of ${progress.getFile()}` : ''} completed.\n`);
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;
}
}
});

View File

@@ -1,5 +1,5 @@
import { Instance } from './cli-protocol/common_pb';
import { ArduinoCoreClient } from './cli-protocol/commands_grpc_pb';
import { Instance } from './cli-protocol/commands/common_pb';
import { ArduinoCoreClient } from './cli-protocol/commands/commands_grpc_pb';
export const CoreClientProviderPath = '/services/core-client-provider';
export const CoreClientProvider = Symbol('CoreClientProvider');

View File

@@ -1,12 +1,12 @@
import { inject, injectable } from 'inversify';
import { FileSystem } from '@theia/filesystem/lib/common/filesystem';
import { CoreService } from '../common/protocol/core-service';
import { CompileReq, CompileResp } from './cli-protocol/compile_pb';
import { CompileReq, CompileResp } from './cli-protocol/commands/compile_pb';
import { BoardsService, AttachedSerialBoard, AttachedNetworkBoard } from '../common/protocol/boards-service';
import { CoreClientProvider } from './core-client-provider';
import * as path from 'path';
import { ToolOutputServiceServer } from '../common/protocol/tool-output-service';
import { UploadReq, UploadResp } from './cli-protocol/upload_pb';
import { UploadReq, UploadResp } from './cli-protocol/commands/upload_pb';
@injectable()
export class CoreServiceImpl implements CoreService {

View File

@@ -2,7 +2,7 @@ import { injectable, inject } from 'inversify';
import { Library, LibraryService } from '../common/protocol/library-service';
import { CoreClientProvider } from './core-client-provider';
import { LibrarySearchReq, LibrarySearchResp, LibraryListReq, LibraryListResp, LibraryRelease,
InstalledLibrary, LibraryInstallReq, LibraryInstallResp } from './cli-protocol/lib_pb';
InstalledLibrary, LibraryInstallReq, LibraryInstallResp } from './cli-protocol/commands/lib_pb';
import { ToolOutputServiceServer } from '../common/protocol/tool-output-service';
@injectable()
@@ -14,7 +14,7 @@ export class LibraryServiceImpl implements LibraryService {
@inject(ToolOutputServiceServer)
protected readonly toolOutputService: ToolOutputServiceServer;
async search(options: { query?: string; }): Promise<{ items: Library[] }> {
async search(options: { query?: string, props: LibraryService.Search.Props }): Promise<{ items: Library[] }> {
const coreClient = await this.coreClientProvider.getClient();
if (!coreClient) {
return { items: [] };
@@ -24,22 +24,29 @@ export class LibraryServiceImpl implements LibraryService {
const listReq = new LibraryListReq();
listReq.setInstance(instance);
const installedLibsResp = await new Promise<LibraryListResp>((resolve, reject) => client.libraryList(listReq, (err, resp) => !!err ? reject(err) : resolve(resp)));
const installedLibs = installedLibsResp.getLibrariesList();
const installedLibs = installedLibsResp.getInstalledLibraryList();
const installedLibsIdx = new Map<string, InstalledLibrary>();
installedLibs.forEach(l => installedLibsIdx.set(l.getName(), l));
for (const installedLib of installedLibs) {
if (installedLib.hasLibrary()) {
const lib = installedLib.getLibrary();
if (lib) {
installedLibsIdx.set(lib.getRealName(), installedLib);
}
}
}
const req = new LibrarySearchReq();
req.setQuery(options.query || '');
req.setInstance(instance);
const resp = await new Promise<LibrarySearchResp>((resolve, reject) => client.librarySearch(req, (err, resp) => !!err ? reject(err) : resolve(resp)));
const items = resp.getSearchOutputList()
const items = resp.getLibrariesList()
.filter(item => !!item.getLatest())
.slice(0, 50)
.map(item => {
let installedVersion: string | undefined;
const installed = installedLibsIdx.get(item.getName());
if (installed) {
installedVersion = installed.getInstalled()!.getVersion();
installedVersion = installed.getLibrary()!.getVersion();
}
return toLibrary({
name: item.getName(),

View File

@@ -0,0 +1,82 @@
import { injectable, inject } from "inversify";
import { SketchesService, Sketch } from "../common/protocol/sketches-service";
import URI from "@theia/core/lib/common/uri";
import { FileStat, FileSystem } from "@theia/filesystem/lib/common";
import * as fs from 'fs';
import * as path from 'path';
import { FileUri } from "@theia/core/lib/node";
export const ALLOWED_FILE_EXTENSIONS = [".c", ".cpp", ".h", ".hh", ".hpp", ".s", ".pde", ".ino"];
@injectable()
export class SketchesServiceImpl implements SketchesService {
@inject(FileSystem)
protected readonly filesystem: FileSystem;
async getSketches(fileStat?: FileStat): Promise<Sketch[]> {
const sketches: Sketch[] = [];
if (fileStat && fileStat.isDirectory) {
const uri = new URI(fileStat.uri);
const sketchFolderPath = await this.filesystem.getFsPath(uri.toString());
if (sketchFolderPath) {
const fileNames = fs.readdirSync(sketchFolderPath);
for (const fileName of fileNames) {
const filePath = path.join(sketchFolderPath, fileName);
if (this.isSketchFolder(filePath, fileName)) {
sketches.push({
name: fileName,
uri: FileUri.create(filePath).toString()
});
}
}
}
}
return sketches;
}
/**
* Return all allowed files.
* File extensions: "c", "cpp", "h", "hh", "hpp", "s", "pde", "ino"
*/
async getSketchFiles(sketchFileStat: FileStat): Promise<string[]> {
const uris: string[] = [];
const sketchUri = new URI(sketchFileStat.uri);
const sketchPath = await this.filesystem.getFsPath(sketchUri.toString());
if (sketchPath) {
if (sketchFileStat.isDirectory && this.isSketchFolder(sketchPath, sketchUri.displayName)) {
const fileNames = fs.readdirSync(sketchPath);
for (const fileName of fileNames) {
const filePath = path.join(sketchPath, fileName);
if (ALLOWED_FILE_EXTENSIONS.indexOf(path.extname(filePath)) !== -1
&& fs.existsSync(filePath)
&& fs.lstatSync(filePath).isFile()) {
uris.push(FileUri.create(filePath).toString())
}
}
} else {
const sketchDir = path.dirname(sketchPath);
if (sketchDir && this.isSketchFolder(sketchDir, sketchUri.path.dir.name)) {
const sketchFolderStat = await this.filesystem.getFileStat(sketchUri.path.dir.toString());
if (sketchFolderStat) {
const sketchDirContents = await this.getSketchFiles(sketchFolderStat);
uris.push(...sketchDirContents);
}
}
}
}
return uris;
}
protected isSketchFolder(path: string, name: string): boolean {
if (fs.existsSync(path) && fs.lstatSync(path).isDirectory()) {
const files = fs.readdirSync(path);
for (let i = 0; i < files.length; i++) {
if (files[i] === name + '.ino') {
return true;
}
}
}
return false;
}
}

View File

@@ -8,6 +8,7 @@
"noUnusedLocals": true,
"strictNullChecks": true,
"experimentalDecorators": true,
"downlevelIteration": true,
"emitDecoratorMetadata": true,
"module": "commonjs",
"moduleResolution": "node",

View File

@@ -14,7 +14,8 @@
"prepare": "lerna run prepare",
"rebuild:browser": "theia rebuild:browser",
"rebuild:electron": "theia rebuild:electron",
"start": "cd arduino-ide-browser && yarn start"
"start": "cd arduino-ide-browser && yarn start",
"watch": "lerna run watch --parallel"
},
"workspaces": [
"arduino-ide-electron",

Some files were not shown because too many files have changed in this diff Show More