mirror of
https://github.com/arduino/arduino-ide.git
synced 2025-10-06 01:58:32 +00:00
Compare commits
69 Commits
2.3.1
...
light-vers
Author | SHA1 | Date | |
---|---|---|---|
![]() |
0b41378dca | ||
![]() |
8ec96fc891 | ||
![]() |
6eef09efd8 | ||
![]() |
1112057979 | ||
![]() |
8e18c47d30 | ||
![]() |
4788bfbc3f | ||
![]() |
71b11ed829 | ||
![]() |
3aedafa306 | ||
![]() |
284dd83d7d | ||
![]() |
c09b5f718a | ||
![]() |
dba57b312c | ||
![]() |
90d3d77ca4 | ||
![]() |
0aec778e84 | ||
![]() |
84d2dfd13e | ||
![]() |
86c7fd7b59 | ||
![]() |
de265694ee | ||
![]() |
8462d8a391 | ||
![]() |
48d6d37539 | ||
![]() |
d1065886ef | ||
![]() |
8773bd67ab | ||
![]() |
4189b086de | ||
![]() |
3fc8474d71 | ||
![]() |
4cf9909a07 | ||
![]() |
41844c9470 | ||
![]() |
7c231fff76 | ||
![]() |
d6235f0a0c | ||
![]() |
d377d00042 | ||
![]() |
f232010bec | ||
![]() |
788017bb99 | ||
![]() |
9331d2ec0d | ||
![]() |
6e695429cc | ||
![]() |
4f8b9800a0 | ||
![]() |
f72d1f0ac8 | ||
![]() |
0fe0feace4 | ||
![]() |
43f0ccb250 | ||
![]() |
c0b0b84d79 | ||
![]() |
3d82cb3525 | ||
![]() |
9cbee0eacf | ||
![]() |
63e9dfd7f5 | ||
![]() |
3ccc864453 | ||
![]() |
44f15238d6 | ||
![]() |
4a3abf542c | ||
![]() |
91bb75ca97 | ||
![]() |
77136687d3 | ||
![]() |
16bc1a4610 | ||
![]() |
2921979678 | ||
![]() |
a5bf56ffa6 | ||
![]() |
2de8bd1717 | ||
![]() |
1ec0a8cc77 | ||
![]() |
c3adde5460 | ||
![]() |
2e78e96b75 | ||
![]() |
aa9b10d68e | ||
![]() |
4217c0001d | ||
![]() |
a088ba99f5 | ||
![]() |
2a325a5b74 | ||
![]() |
347e3d8118 | ||
![]() |
8e09971078 | ||
![]() |
48e7bf6b5d | ||
![]() |
95c4399c07 | ||
![]() |
4a807ab538 | ||
![]() |
1a98485b02 | ||
![]() |
8fe6a81230 | ||
![]() |
547a630598 | ||
![]() |
ff8c646cfa | ||
![]() |
316e0fd8be | ||
![]() |
ca779e5cf2 | ||
![]() |
74c580175b | ||
![]() |
71bd189eb1 | ||
![]() |
0822ed28da |
93
.github/workflows/assets/linux.Dockerfile
vendored
93
.github/workflows/assets/linux.Dockerfile
vendored
@@ -1,43 +1,28 @@
|
||||
# The Arduino IDE Linux build workflow job runs in this container.
|
||||
# syntax=docker/dockerfile:1
|
||||
|
||||
FROM ubuntu:18.04
|
||||
# See: https://hub.docker.com/_/ubuntu/tags
|
||||
FROM ubuntu:18.10
|
||||
|
||||
# See: https://unofficial-builds.nodejs.org/download/release/
|
||||
ARG node_version="18.17.1"
|
||||
# This is required in order to use the Ubuntu package repositories for EOL Ubuntu versions:
|
||||
# https://help.ubuntu.com/community/EOLUpgrades#Update_sources.list
|
||||
RUN \
|
||||
sed \
|
||||
--in-place \
|
||||
--regexp-extended \
|
||||
--expression='s/([a-z]{2}\.)?archive.ubuntu.com|security.ubuntu.com/old-releases.ubuntu.com/g' \
|
||||
"/etc/apt/sources.list"
|
||||
|
||||
RUN \
|
||||
apt-get \
|
||||
--yes \
|
||||
update
|
||||
|
||||
# This is required to get add-apt-repository
|
||||
RUN \
|
||||
apt-get \
|
||||
--yes \
|
||||
install \
|
||||
"software-properties-common=0.96.24.32.22"
|
||||
|
||||
# Install Git
|
||||
# The PPA is required to get a modern version of Git. The version in the Ubuntu 18.04 package repository is 2.17.1,
|
||||
# while action/checkout@v3 requires 2.18 or higher.
|
||||
RUN \
|
||||
add-apt-repository \
|
||||
--yes \
|
||||
"ppa:git-core/ppa" && \
|
||||
apt-get \
|
||||
--yes \
|
||||
update && \
|
||||
\
|
||||
apt-get \
|
||||
--yes \
|
||||
install \
|
||||
"git" && \
|
||||
\
|
||||
apt-get \
|
||||
--yes \
|
||||
purge \
|
||||
"software-properties-common"
|
||||
"git"
|
||||
|
||||
# The repository path must be added to safe.directory, otherwise any Git operations on it would fail with a
|
||||
# "dubious ownership" error. actions/checkout configures this, but it is not applied to containers.
|
||||
@@ -51,18 +36,12 @@ ENV \
|
||||
|
||||
# Install Python
|
||||
# The Python installed by actions/setup-python has dependency on a higher version of glibc than available in the
|
||||
# ubuntu:18.04 container.
|
||||
# container.
|
||||
RUN \
|
||||
apt-get \
|
||||
--yes \
|
||||
install \
|
||||
"python3.8-minimal=3.8.0-3ubuntu1~18.04.2" && \
|
||||
\
|
||||
ln \
|
||||
--symbolic \
|
||||
--force \
|
||||
"$(which python3.8)" \
|
||||
"/usr/bin/python3"
|
||||
"python3.7-minimal=3.7.3-2~18.10"
|
||||
|
||||
# Install Theia's package dependencies
|
||||
# These are pre-installed in the GitHub Actions hosted runner machines.
|
||||
@@ -70,43 +49,15 @@ RUN \
|
||||
apt-get \
|
||||
--yes \
|
||||
install \
|
||||
"libsecret-1-dev=0.18.6-1" \
|
||||
"libx11-dev=2:1.6.4-3ubuntu0.4" \
|
||||
"libsecret-1-dev=0.18.6-3" \
|
||||
"libx11-dev=2:1.6.7-1" \
|
||||
"libxkbfile-dev=1:1.0.9-2"
|
||||
|
||||
# Install Node.js
|
||||
# It is necessary to use the "unofficial" linux-x64-glibc-217 build because the official Node.js 18.x is dynamically
|
||||
# linked against glibc 2.28, while Ubuntu 18.04 has glibc 2.27.
|
||||
ARG node_installation_path="/tmp/node-installation"
|
||||
ARG artifact_name="node-v${node_version}-linux-x64-glibc-217"
|
||||
# Target python3 symlink to Python 3.7 installation. It would otherwise target version 3.6 due to the installation of
|
||||
# the `python3` package as a transitive dependency.
|
||||
RUN \
|
||||
mkdir "$node_installation_path" && \
|
||||
cd "$node_installation_path" && \
|
||||
\
|
||||
apt-get \
|
||||
--yes \
|
||||
install \
|
||||
"wget=1.19.4-1ubuntu2.2" && \
|
||||
\
|
||||
archive_name="${artifact_name}.tar.xz" && \
|
||||
wget \
|
||||
"https://unofficial-builds.nodejs.org/download/release/v${node_version}/${archive_name}" && \
|
||||
\
|
||||
apt-get \
|
||||
--yes \
|
||||
purge \
|
||||
"wget" && \
|
||||
\
|
||||
tar \
|
||||
--file="$archive_name" \
|
||||
--extract && \
|
||||
rm "$archive_name"
|
||||
ENV PATH="${PATH}:${node_installation_path}/${artifact_name}/bin"
|
||||
|
||||
# Install Yarn
|
||||
# Yarn is pre-installed in the GitHub Actions hosted runner machines.
|
||||
RUN \
|
||||
npm \
|
||||
install \
|
||||
--global \
|
||||
"yarn@1.22.19"
|
||||
ln \
|
||||
--symbolic \
|
||||
--force \
|
||||
"$(which python3.7)" \
|
||||
"/usr/bin/python3"
|
||||
|
216
.github/workflows/build.yml
vendored
216
.github/workflows/build.yml
vendored
@@ -40,36 +40,46 @@ on:
|
||||
- Push Container Images
|
||||
branches:
|
||||
- main
|
||||
types:
|
||||
types:
|
||||
- completed
|
||||
|
||||
env:
|
||||
# See vars.GO_VERSION field of https://github.com/arduino/arduino-cli/blob/master/DistTasks.yml
|
||||
GO_VERSION: '1.19'
|
||||
GO_VERSION: '1.21'
|
||||
# See: https://github.com/actions/setup-node/#readme
|
||||
NODE_VERSION: '18.17'
|
||||
JOB_TRANSFER_ARTIFACT: build-artifacts
|
||||
YARN_VERSION: '1.22'
|
||||
JOB_TRANSFER_ARTIFACT_PREFIX: build-artifacts-
|
||||
CHANGELOG_ARTIFACTS: changelog
|
||||
STAGED_CHANNEL_FILES_ARTIFACT: staged-channel-files
|
||||
STAGED_CHANNEL_FILE_ARTIFACT_PREFIX: staged-channel-file-
|
||||
BASE_BUILD_DATA: |
|
||||
- config:
|
||||
# Human identifier for the job.
|
||||
name: Windows
|
||||
runs-on: windows-2019
|
||||
runs-on: [self-hosted, windows-sign-pc]
|
||||
# The value is a string representing a JSON document.
|
||||
# Setting this to null causes the job to run directly in the runner machine instead of in a container.
|
||||
container: |
|
||||
null
|
||||
# Name of the secret that contains the certificate.
|
||||
certificate-secret: WINDOWS_SIGNING_CERTIFICATE_PFX
|
||||
certificate-secret: INSTALLER_CERT_WINDOWS_CER
|
||||
# Name of the secret that contains the certificate password.
|
||||
certificate-password-secret: WINDOWS_SIGNING_CERTIFICATE_PASSWORD
|
||||
certificate-password-secret: INSTALLER_CERT_WINDOWS_PASSWORD
|
||||
# File extension for the certificate.
|
||||
certificate-extension: pfx
|
||||
# Container for windows cert signing
|
||||
certificate-container: INSTALLER_CERT_WINDOWS_CONTAINER
|
||||
# Arbitrary identifier used to give the workflow artifact uploaded by each "build" matrix job a unique name.
|
||||
job-transfer-artifact-suffix: Windows_64bit
|
||||
# Quoting on the value is required here to allow the same comparison expression syntax to be used for this
|
||||
# and the companion needs.select-targets.outputs.merge-channel-files property (output values always have string
|
||||
# type).
|
||||
mergeable-channel-file: 'false'
|
||||
# as this runs on a self hosted runner, we need to avoid building with the default working directory path,
|
||||
# otherwise paths in the build job will be too long for `light.exe`
|
||||
# we use the below as a Symbolic link (just changing the wd will break the checkout action)
|
||||
# this is a work around (see: https://github.com/actions/checkout/issues/197).
|
||||
working-directory: 'C:\a'
|
||||
artifacts:
|
||||
- path: '*Windows_64bit.exe'
|
||||
name: Windows_X86-64_interactive_installer
|
||||
@@ -84,6 +94,7 @@ env:
|
||||
{
|
||||
\"image\": \"ghcr.io/arduino/arduino-ide/linux:main\"
|
||||
}
|
||||
job-transfer-artifact-suffix: Linux_64bit
|
||||
mergeable-channel-file: 'false'
|
||||
artifacts:
|
||||
- path: '*Linux_64bit.zip'
|
||||
@@ -92,7 +103,7 @@ env:
|
||||
name: Linux_X86-64_app_image
|
||||
- config:
|
||||
name: macOS x86
|
||||
runs-on: macos-latest
|
||||
runs-on: macos-13
|
||||
container: |
|
||||
null
|
||||
# APPLE_SIGNING_CERTIFICATE_P12 secret was produced by following the procedure from:
|
||||
@@ -100,27 +111,32 @@ env:
|
||||
certificate-secret: APPLE_SIGNING_CERTIFICATE_P12
|
||||
certificate-password-secret: KEYCHAIN_PASSWORD
|
||||
certificate-extension: p12
|
||||
job-transfer-artifact-suffix: macOS_64bit
|
||||
mergeable-channel-file: 'true'
|
||||
artifacts:
|
||||
- path: '*macOS_64bit.dmg'
|
||||
name: macOS_X86-64_dmg
|
||||
- path: '*macOS_64bit.zip'
|
||||
name: macOS_X86-64_zip
|
||||
PAID_RUNNER_BUILD_DATA: |
|
||||
- config:
|
||||
name: macOS ARM
|
||||
runs-on: macos-latest-xlarge
|
||||
runs-on: macos-latest
|
||||
container: |
|
||||
null
|
||||
certificate-secret: APPLE_SIGNING_CERTIFICATE_P12
|
||||
certificate-password-secret: KEYCHAIN_PASSWORD
|
||||
certificate-extension: p12
|
||||
job-transfer-artifact-suffix: macOS_arm64
|
||||
mergeable-channel-file: 'true'
|
||||
artifacts:
|
||||
- path: '*macOS_arm64.dmg'
|
||||
name: macOS_arm64_dmg
|
||||
- path: '*macOS_arm64.zip'
|
||||
name: macOS_arm64_zip
|
||||
PAID_RUNNER_BUILD_DATA: |
|
||||
# This system was implemented to allow selective use of paid GitHub-hosted runners, due to the Apple Silicon runner
|
||||
# incurring a charge at that time. Free Apple Silicon runners are now available so the configuration was moved to
|
||||
# `BASE_BUILD_DATA`, but the system was left in place for future use.
|
||||
|
||||
jobs:
|
||||
run-determination:
|
||||
@@ -223,7 +239,7 @@ jobs:
|
||||
) | \
|
||||
yq \
|
||||
--output-format json \
|
||||
'[.[].artifacts.[]]'
|
||||
'map(.artifacts[] + (.config | pick(["job-transfer-artifact-suffix"])))'
|
||||
)"
|
||||
|
||||
# The build matrix produces two macOS jobs (x86 and ARM) so the "channel update info files"
|
||||
@@ -242,7 +258,7 @@ jobs:
|
||||
echo "${{ env.BASE_BUILD_DATA }}" | \
|
||||
yq \
|
||||
--output-format json \
|
||||
'[.[].artifacts.[]]'
|
||||
'map(.artifacts[] + (.config | pick(["job-transfer-artifact-suffix"])))'
|
||||
)"
|
||||
|
||||
merge_channel_files="false"
|
||||
@@ -268,8 +284,19 @@ jobs:
|
||||
- build-type-determination
|
||||
- select-targets
|
||||
env:
|
||||
# https://github.blog/changelog/2024-03-07-github-actions-all-actions-will-run-on-node20-instead-of-node16-by-default/
|
||||
ACTIONS_ALLOW_USE_UNSECURE_NODE_VERSION: true
|
||||
# Location of artifacts generated by build.
|
||||
BUILD_ARTIFACTS_PATH: electron-app/dist/build-artifacts
|
||||
# to skip passing signing credentials to electron-builder
|
||||
IS_WINDOWS_CONFIG: ${{ matrix.config.name == 'Windows' }}
|
||||
INSTALLER_CERT_WINDOWS_CER: "/tmp/cert.cer"
|
||||
# We are hardcoding the path for signtool because is not present on the windows PATH env var by default.
|
||||
# Keep in mind that this path could change when upgrading to a new runner version
|
||||
SIGNTOOL_PATH: "C:/Program Files (x86)/Windows Kits/10/bin/10.0.19041.0/x86/signtool.exe"
|
||||
WIN_CERT_PASSWORD: ${{ secrets[matrix.config.certificate-password-secret] }}
|
||||
WIN_CERT_CONTAINER_NAME: ${{ secrets[matrix.config.certificate-container] }}
|
||||
|
||||
strategy:
|
||||
matrix:
|
||||
config: ${{ fromJson(needs.select-targets.outputs.build-matrix) }}
|
||||
@@ -283,57 +310,53 @@ jobs:
|
||||
timeout-minutes: 90
|
||||
|
||||
steps:
|
||||
- name: Symlink custom working directory
|
||||
shell: cmd
|
||||
if: runner.os == 'Windows' && matrix.config.working-directory
|
||||
run: |
|
||||
if not exist "${{ matrix.config.working-directory }}" mklink /d "${{ matrix.config.working-directory }}" "C:\actions-runner\_work\arduino-ide\arduino-ide"
|
||||
|
||||
- name: Checkout
|
||||
if: fromJSON(matrix.config.container) == null
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Checkout
|
||||
# actions/checkout@v4 has dependency on a higher version of glibc than available in the Linux container.
|
||||
if: fromJSON(matrix.config.container) != null
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: Install Node.js
|
||||
if: fromJSON(matrix.config.container) == null
|
||||
if: runner.name != 'WINDOWS-SIGN-PC'
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: ${{ env.NODE_VERSION }}
|
||||
registry-url: 'https://registry.npmjs.org'
|
||||
cache: 'yarn'
|
||||
# Yarn is a prerequisite for the action's cache feature, so caching should be disabled when running in the
|
||||
# container where Yarn is not pre-installed.
|
||||
cache: ${{ fromJSON(matrix.config.container) == null && 'yarn' || null }}
|
||||
|
||||
- name: Install Yarn
|
||||
if: runner.name != 'WINDOWS-SIGN-PC'
|
||||
run: |
|
||||
npm \
|
||||
install \
|
||||
--global \
|
||||
"yarn@${{ env.YARN_VERSION }}"
|
||||
|
||||
- name: Install Python 3.x
|
||||
if: fromJSON(matrix.config.container) == null
|
||||
if: fromJSON(matrix.config.container) == null && runner.name != 'WINDOWS-SIGN-PC'
|
||||
uses: actions/setup-python@v5
|
||||
with:
|
||||
python-version: '3.11.x'
|
||||
|
||||
- name: Install Go
|
||||
if: fromJSON(matrix.config.container) == null
|
||||
if: runner.name != 'WINDOWS-SIGN-PC'
|
||||
uses: actions/setup-go@v5
|
||||
with:
|
||||
go-version: ${{ env.GO_VERSION }}
|
||||
|
||||
- name: Install Go
|
||||
# actions/setup-go@v5 has dependency on a higher version of glibc than available in the Linux container.
|
||||
if: fromJSON(matrix.config.container) != null
|
||||
uses: actions/setup-go@v4
|
||||
with:
|
||||
go-version: ${{ env.GO_VERSION }}
|
||||
|
||||
- name: Install Taskfile
|
||||
if: fromJSON(matrix.config.container) == null
|
||||
if: runner.name != 'WINDOWS-SIGN-PC'
|
||||
uses: arduino/setup-task@v2
|
||||
with:
|
||||
repo-token: ${{ secrets.GITHUB_TOKEN }}
|
||||
version: 3.x
|
||||
|
||||
- name: Install Taskfile
|
||||
# actions/setup-task@v2 has dependency on a higher version of glibc than available in the Linux container.
|
||||
if: fromJSON(matrix.config.container) != null
|
||||
uses: arduino/setup-task@v1
|
||||
with:
|
||||
repo-token: ${{ secrets.GITHUB_TOKEN }}
|
||||
version: 3.x
|
||||
|
||||
- name: Package
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
@@ -345,14 +368,10 @@ jobs:
|
||||
IS_NIGHTLY: ${{ needs.build-type-determination.outputs.is-nightly }}
|
||||
IS_RELEASE: ${{ needs.build-type-determination.outputs.is-release }}
|
||||
CAN_SIGN: ${{ secrets[matrix.config.certificate-secret] != '' }}
|
||||
# The CREATE_* environment vars are only used to run tests. These secrets are optional. Dependent tests will
|
||||
# be skipped if not available.
|
||||
CREATE_USERNAME: ${{ secrets.CREATE_USERNAME }}
|
||||
CREATE_PASSWORD: ${{ secrets.CREATE_PASSWORD }}
|
||||
CREATE_CLIENT_SECRET: ${{ secrets.CREATE_CLIENT_SECRET }}
|
||||
working-directory: ${{ matrix.config.working-directory || './' }}
|
||||
run: |
|
||||
# See: https://www.electron.build/code-signing
|
||||
if [ $CAN_SIGN = false ]; then
|
||||
if [ $CAN_SIGN = false ] || [ $IS_WINDOWS_CONFIG = true ]; then
|
||||
echo "Skipping the app signing: certificate not provided."
|
||||
else
|
||||
export CSC_LINK="${{ runner.temp }}/signing_certificate.${{ matrix.config.certificate-extension }}"
|
||||
@@ -362,13 +381,9 @@ jobs:
|
||||
fi
|
||||
|
||||
npx node-gyp install
|
||||
yarn install --immutable
|
||||
yarn install
|
||||
|
||||
yarn --cwd arduino-ide-extension build
|
||||
yarn test
|
||||
yarn --cwd arduino-ide-extension test:slow
|
||||
yarn --cwd arduino-ide-extension lint
|
||||
|
||||
yarn --cwd electron-app rebuild
|
||||
yarn --cwd electron-app build
|
||||
yarn --cwd electron-app package
|
||||
@@ -379,6 +394,7 @@ jobs:
|
||||
if: >
|
||||
needs.select-targets.outputs.merge-channel-files == 'true' &&
|
||||
matrix.config.mergeable-channel-file == 'true'
|
||||
working-directory: ${{ matrix.config.working-directory || './' }}
|
||||
run: |
|
||||
staged_channel_files_path="${{ runner.temp }}/staged-channel-files"
|
||||
mkdir "$staged_channel_files_path"
|
||||
@@ -391,20 +407,26 @@ jobs:
|
||||
echo "STAGED_CHANNEL_FILES_PATH=$staged_channel_files_path" >> "$GITHUB_ENV"
|
||||
|
||||
- name: Upload staged-for-merge channel file artifact
|
||||
uses: actions/upload-artifact@v3
|
||||
uses: actions/upload-artifact@v4
|
||||
if: >
|
||||
needs.select-targets.outputs.merge-channel-files == 'true' &&
|
||||
matrix.config.mergeable-channel-file == 'true'
|
||||
with:
|
||||
if-no-files-found: error
|
||||
name: ${{ env.STAGED_CHANNEL_FILES_ARTIFACT }}
|
||||
path: ${{ env.STAGED_CHANNEL_FILES_PATH }}
|
||||
name: ${{ env.STAGED_CHANNEL_FILE_ARTIFACT_PREFIX }}${{ matrix.config.job-transfer-artifact-suffix }}
|
||||
path: ${{ matrix.config.working-directory && format('{0}/{1}', matrix.config.working-directory, env.STAGED_CHANNEL_FILES_PATH) || env.STAGED_CHANNEL_FILES_PATH }}
|
||||
|
||||
- name: Upload [GitHub Actions]
|
||||
uses: actions/upload-artifact@v3
|
||||
- name: Upload builds to job transfer artifact
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: ${{ env.JOB_TRANSFER_ARTIFACT }}
|
||||
path: ${{ env.BUILD_ARTIFACTS_PATH }}
|
||||
name: ${{ env.JOB_TRANSFER_ARTIFACT_PREFIX }}${{ matrix.config.job-transfer-artifact-suffix }}
|
||||
path: ${{ matrix.config.working-directory && format('{0}/{1}', matrix.config.working-directory, env.BUILD_ARTIFACTS_PATH) || env.BUILD_ARTIFACTS_PATH }}
|
||||
|
||||
- name: Manual Clean up for self-hosted runners
|
||||
if: runner.os == 'Windows' && matrix.config.working-directory
|
||||
shell: cmd
|
||||
run: |
|
||||
rmdir /s /q "${{ matrix.config.working-directory }}\${{ env.BUILD_ARTIFACTS_PATH }}"
|
||||
|
||||
merge-channel-files:
|
||||
needs:
|
||||
@@ -423,16 +445,17 @@ jobs:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Download staged-for-merge channel files artifact
|
||||
uses: actions/download-artifact@v3
|
||||
- name: Download staged-for-merge channel file artifacts
|
||||
uses: actions/download-artifact@v4
|
||||
with:
|
||||
name: ${{ env.STAGED_CHANNEL_FILES_ARTIFACT }}
|
||||
merge-multiple: true
|
||||
path: ${{ env.CHANNEL_FILES_PATH }}
|
||||
pattern: ${{ env.STAGED_CHANNEL_FILE_ARTIFACT_PREFIX }}*
|
||||
|
||||
- name: Remove no longer needed artifact
|
||||
uses: geekyeggo/delete-artifact@v2
|
||||
- name: Remove no longer needed artifacts
|
||||
uses: geekyeggo/delete-artifact@v5
|
||||
with:
|
||||
name: ${{ env.STAGED_CHANNEL_FILES_ARTIFACT }}
|
||||
name: ${{ env.STAGED_CHANNEL_FILE_ARTIFACT_PREFIX }}*
|
||||
|
||||
- name: Install Node.js
|
||||
uses: actions/setup-node@v4
|
||||
@@ -462,11 +485,11 @@ jobs:
|
||||
--channel "${{ needs.build-type-determination.outputs.channel-name }}" \
|
||||
--input "${{ env.CHANNEL_FILES_PATH }}"
|
||||
|
||||
- name: Upload merged channel files to job transfer artifact
|
||||
uses: actions/upload-artifact@v3
|
||||
- name: Upload merged channel files job transfer artifact
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
if-no-files-found: error
|
||||
name: ${{ env.JOB_TRANSFER_ARTIFACT }}
|
||||
name: ${{ env.JOB_TRANSFER_ARTIFACT_PREFIX }}channel-files
|
||||
path: ${{ env.CHANNEL_FILES_PATH }}
|
||||
|
||||
artifacts:
|
||||
@@ -477,22 +500,25 @@ jobs:
|
||||
if: always() && needs.build.result != 'skipped'
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
env:
|
||||
BUILD_ARTIFACTS_FOLDER: build-artifacts
|
||||
|
||||
strategy:
|
||||
matrix:
|
||||
artifact: ${{ fromJson(needs.select-targets.outputs.artifact-matrix) }}
|
||||
|
||||
steps:
|
||||
- name: Download job transfer artifact
|
||||
uses: actions/download-artifact@v3
|
||||
- name: Download job transfer artifact that contains ${{ matrix.artifact.name }} tester build
|
||||
uses: actions/download-artifact@v4
|
||||
with:
|
||||
name: ${{ env.JOB_TRANSFER_ARTIFACT }}
|
||||
path: ${{ env.JOB_TRANSFER_ARTIFACT }}
|
||||
name: ${{ env.JOB_TRANSFER_ARTIFACT_PREFIX }}${{ matrix.artifact.job-transfer-artifact-suffix }}
|
||||
path: ${{ env.BUILD_ARTIFACTS_FOLDER }}
|
||||
|
||||
- name: Upload tester build artifact
|
||||
uses: actions/upload-artifact@v3
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: ${{ matrix.artifact.name }}
|
||||
path: ${{ env.JOB_TRANSFER_ARTIFACT }}/${{ matrix.artifact.path }}
|
||||
path: ${{ env.BUILD_ARTIFACTS_FOLDER }}/${{ matrix.artifact.path }}
|
||||
|
||||
changelog:
|
||||
needs:
|
||||
@@ -535,11 +561,11 @@ jobs:
|
||||
|
||||
echo "$BODY" > CHANGELOG.txt
|
||||
|
||||
- name: Upload Changelog [GitHub Actions]
|
||||
- name: Upload changelog job transfer artifact
|
||||
if: needs.build-type-determination.outputs.is-nightly == 'true'
|
||||
uses: actions/upload-artifact@v3
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: ${{ env.JOB_TRANSFER_ARTIFACT }}
|
||||
name: ${{ env.JOB_TRANSFER_ARTIFACT_PREFIX }}changelog
|
||||
path: CHANGELOG.txt
|
||||
|
||||
publish:
|
||||
@@ -558,18 +584,23 @@ jobs:
|
||||
needs.build-type-determination.outputs.publish-to-s3 == 'true' &&
|
||||
needs.build-type-determination.outputs.is-nightly == 'true'
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
env:
|
||||
ARTIFACTS_FOLDER: build-artifacts
|
||||
|
||||
steps:
|
||||
- name: Download [GitHub Actions]
|
||||
uses: actions/download-artifact@v3
|
||||
- name: Download all job transfer artifacts
|
||||
uses: actions/download-artifact@v4
|
||||
with:
|
||||
name: ${{ env.JOB_TRANSFER_ARTIFACT }}
|
||||
path: ${{ env.JOB_TRANSFER_ARTIFACT }}
|
||||
merge-multiple: true
|
||||
path: ${{ env.ARTIFACTS_FOLDER }}
|
||||
pattern: ${{ env.JOB_TRANSFER_ARTIFACT_PREFIX }}*
|
||||
|
||||
- name: Publish Nightly [S3]
|
||||
uses: docker://plugins/s3
|
||||
env:
|
||||
PLUGIN_SOURCE: '${{ env.JOB_TRANSFER_ARTIFACT }}/*'
|
||||
PLUGIN_STRIP_PREFIX: '${{ env.JOB_TRANSFER_ARTIFACT }}/'
|
||||
PLUGIN_SOURCE: '${{ env.ARTIFACTS_FOLDER }}/*'
|
||||
PLUGIN_STRIP_PREFIX: '${{ env.ARTIFACTS_FOLDER }}/'
|
||||
PLUGIN_TARGET: '/arduino-ide/nightly'
|
||||
PLUGIN_BUCKET: ${{ secrets.DOWNLOADS_BUCKET }}
|
||||
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
|
||||
@@ -590,12 +621,17 @@ jobs:
|
||||
needs.changelog.result == 'success' &&
|
||||
needs.build-type-determination.outputs.is-release == 'true'
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
env:
|
||||
ARTIFACTS_FOLDER: build-artifacts
|
||||
|
||||
steps:
|
||||
- name: Download [GitHub Actions]
|
||||
uses: actions/download-artifact@v3
|
||||
- name: Download all job transfer artifacts
|
||||
uses: actions/download-artifact@v4
|
||||
with:
|
||||
name: ${{ env.JOB_TRANSFER_ARTIFACT }}
|
||||
path: ${{ env.JOB_TRANSFER_ARTIFACT }}
|
||||
merge-multiple: true
|
||||
path: ${{ env.ARTIFACTS_FOLDER }}
|
||||
pattern: ${{ env.JOB_TRANSFER_ARTIFACT_PREFIX }}*
|
||||
|
||||
- name: Get Tag
|
||||
id: tag_name
|
||||
@@ -603,11 +639,11 @@ jobs:
|
||||
echo "TAG_NAME=${GITHUB_REF#refs/tags/}" >> $GITHUB_OUTPUT
|
||||
|
||||
- name: Publish Release [GitHub]
|
||||
uses: svenstaro/upload-release-action@2.7.0
|
||||
uses: svenstaro/upload-release-action@2.9.0
|
||||
with:
|
||||
repo_token: ${{ secrets.GITHUB_TOKEN }}
|
||||
release_name: ${{ steps.tag_name.outputs.TAG_NAME }}
|
||||
file: ${{ env.JOB_TRANSFER_ARTIFACT }}/*
|
||||
file: ${{ env.ARTIFACTS_FOLDER }}/*
|
||||
tag: ${{ github.ref }}
|
||||
file_glob: true
|
||||
body: ${{ needs.changelog.outputs.BODY }}
|
||||
@@ -616,8 +652,8 @@ jobs:
|
||||
if: needs.build-type-determination.outputs.publish-to-s3 == 'true'
|
||||
uses: docker://plugins/s3
|
||||
env:
|
||||
PLUGIN_SOURCE: '${{ env.JOB_TRANSFER_ARTIFACT }}/*'
|
||||
PLUGIN_STRIP_PREFIX: '${{ env.JOB_TRANSFER_ARTIFACT }}/'
|
||||
PLUGIN_SOURCE: '${{ env.ARTIFACTS_FOLDER }}/*'
|
||||
PLUGIN_STRIP_PREFIX: '${{ env.ARTIFACTS_FOLDER }}/'
|
||||
PLUGIN_TARGET: '/arduino-ide'
|
||||
PLUGIN_BUCKET: ${{ secrets.DOWNLOADS_BUCKET }}
|
||||
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
|
||||
@@ -635,7 +671,7 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- name: Remove unneeded job transfer artifact
|
||||
uses: geekyeggo/delete-artifact@v2
|
||||
- name: Remove unneeded job transfer artifacts
|
||||
uses: geekyeggo/delete-artifact@v5
|
||||
with:
|
||||
name: ${{ env.JOB_TRANSFER_ARTIFACT }}
|
||||
name: ${{ env.JOB_TRANSFER_ARTIFACT_PREFIX }}*
|
||||
|
65
.github/workflows/check-certificates.yml
vendored
65
.github/workflows/check-certificates.yml
vendored
@@ -74,9 +74,11 @@ jobs:
|
||||
- identifier: macOS signing certificate # Text used to identify certificate in notifications.
|
||||
certificate-secret: APPLE_SIGNING_CERTIFICATE_P12 # Name of the secret that contains the certificate.
|
||||
password-secret: KEYCHAIN_PASSWORD # Name of the secret that contains the certificate password.
|
||||
type: pkcs12
|
||||
- identifier: Windows signing certificate
|
||||
certificate-secret: WINDOWS_SIGNING_CERTIFICATE_PFX
|
||||
password-secret: WINDOWS_SIGNING_CERTIFICATE_PASSWORD
|
||||
certificate-secret: INSTALLER_CERT_WINDOWS_CER
|
||||
# The password for the Windows certificate is not needed, because its not a container, but a single certificate.
|
||||
type: x509
|
||||
|
||||
steps:
|
||||
- name: Set certificate path environment variable
|
||||
@@ -95,7 +97,7 @@ jobs:
|
||||
CERTIFICATE_PASSWORD: ${{ secrets[matrix.certificate.password-secret] }}
|
||||
run: |
|
||||
(
|
||||
openssl pkcs12 \
|
||||
openssl ${{ matrix.certificate.type }} \
|
||||
-in "${{ env.CERTIFICATE_PATH }}" \
|
||||
-legacy \
|
||||
-noout \
|
||||
@@ -122,26 +124,43 @@ jobs:
|
||||
CERTIFICATE_PASSWORD: ${{ secrets[matrix.certificate.password-secret] }}
|
||||
id: get-days-before-expiration
|
||||
run: |
|
||||
EXPIRATION_DATE="$(
|
||||
(
|
||||
openssl pkcs12 \
|
||||
-in "${{ env.CERTIFICATE_PATH }}" \
|
||||
-clcerts \
|
||||
-legacy \
|
||||
-nodes \
|
||||
-passin env:CERTIFICATE_PASSWORD
|
||||
) | (
|
||||
openssl x509 \
|
||||
-noout \
|
||||
-enddate
|
||||
) | (
|
||||
grep \
|
||||
--max-count=1 \
|
||||
--only-matching \
|
||||
--perl-regexp \
|
||||
'notAfter=(\K.*)'
|
||||
)
|
||||
)"
|
||||
if [[ ${{ matrix.certificate.type }} == "pkcs12" ]]; then
|
||||
EXPIRATION_DATE="$(
|
||||
(
|
||||
openssl pkcs12 \
|
||||
-in "${{ env.CERTIFICATE_PATH }}" \
|
||||
-clcerts \
|
||||
-legacy \
|
||||
-nodes \
|
||||
-passin env:CERTIFICATE_PASSWORD
|
||||
) | (
|
||||
openssl x509 \
|
||||
-noout \
|
||||
-enddate
|
||||
) | (
|
||||
grep \
|
||||
--max-count=1 \
|
||||
--only-matching \
|
||||
--perl-regexp \
|
||||
'notAfter=(\K.*)'
|
||||
)
|
||||
)"
|
||||
elif [[ ${{ matrix.certificate.type }} == "x509" ]]; then
|
||||
EXPIRATION_DATE="$(
|
||||
(
|
||||
openssl x509 \
|
||||
-in ${{ env.CERTIFICATE_PATH }} \
|
||||
-noout \
|
||||
-enddate
|
||||
) | (
|
||||
grep \
|
||||
--max-count=1 \
|
||||
--only-matching \
|
||||
--perl-regexp \
|
||||
'notAfter=(\K.*)'
|
||||
)
|
||||
)"
|
||||
fi
|
||||
|
||||
DAYS_BEFORE_EXPIRATION="$((($(date --utc --date="$EXPIRATION_DATE" +%s) - $(date --utc +%s)) / 60 / 60 / 24))"
|
||||
|
||||
|
2
.github/workflows/check-containers.yml
vendored
2
.github/workflows/check-containers.yml
vendored
@@ -43,7 +43,7 @@ jobs:
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Build and push to local registry
|
||||
uses: docker/build-push-action@v5
|
||||
uses: docker/build-push-action@v6
|
||||
with:
|
||||
context: .
|
||||
file: ${{ matrix.image.path }}
|
||||
|
2
.github/workflows/check-i18n-task.yml
vendored
2
.github/workflows/check-i18n-task.yml
vendored
@@ -2,7 +2,7 @@ name: Check Internationalization
|
||||
|
||||
env:
|
||||
# See vars.GO_VERSION field of https://github.com/arduino/arduino-cli/blob/master/DistTasks.yml
|
||||
GO_VERSION: '1.19'
|
||||
GO_VERSION: '1.21'
|
||||
|
||||
# See: https://docs.github.com/en/actions/reference/events-that-trigger-workflows
|
||||
on:
|
||||
|
88
.github/workflows/check-javascript.yml
vendored
Normal file
88
.github/workflows/check-javascript.yml
vendored
Normal file
@@ -0,0 +1,88 @@
|
||||
# Source: https://github.com/arduino/tooling-project-assets/blob/main/workflow-templates/check-javascript-task.md
|
||||
name: Check JavaScript
|
||||
|
||||
env:
|
||||
# See: https://github.com/actions/setup-node/#readme
|
||||
NODE_VERSION: 18.17
|
||||
|
||||
# See: https://docs.github.com/actions/writing-workflows/choosing-when-your-workflow-runs/events-that-trigger-workflows
|
||||
on:
|
||||
create:
|
||||
push:
|
||||
paths:
|
||||
- '.github/workflows/check-javascript.ya?ml'
|
||||
- '**/.eslintignore'
|
||||
- '**/.eslintrc*'
|
||||
- '**/.npmrc'
|
||||
- '**/package.json'
|
||||
- '**/package-lock.json'
|
||||
- '**/yarn.lock'
|
||||
- '**.jsx?'
|
||||
pull_request:
|
||||
paths:
|
||||
- '.github/workflows/check-javascript.ya?ml'
|
||||
- '**/.eslintignore'
|
||||
- '**/.eslintrc*'
|
||||
- '**/.npmrc'
|
||||
- '**/package.json'
|
||||
- '**/package-lock.json'
|
||||
- '**/yarn.lock'
|
||||
- '**.jsx?'
|
||||
workflow_dispatch:
|
||||
repository_dispatch:
|
||||
|
||||
jobs:
|
||||
run-determination:
|
||||
runs-on: ubuntu-latest
|
||||
permissions: {}
|
||||
outputs:
|
||||
result: ${{ steps.determination.outputs.result }}
|
||||
steps:
|
||||
- name: Determine if the rest of the workflow should run
|
||||
id: determination
|
||||
run: |
|
||||
RELEASE_BRANCH_REGEX="refs/heads/[0-9]+.[0-9]+.x"
|
||||
# The `create` event trigger doesn't support `branches` filters, so it's necessary to use Bash instead.
|
||||
if [[
|
||||
"${{ github.event_name }}" != "create" ||
|
||||
"${{ github.ref }}" =~ $RELEASE_BRANCH_REGEX
|
||||
]]; then
|
||||
# Run the other jobs.
|
||||
RESULT="true"
|
||||
else
|
||||
# There is no need to run the other jobs.
|
||||
RESULT="false"
|
||||
fi
|
||||
|
||||
echo "result=$RESULT" >> $GITHUB_OUTPUT
|
||||
|
||||
check:
|
||||
needs: run-determination
|
||||
if: needs.run-determination.outputs.result == 'true'
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Setup Node.js
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
cache: yarn
|
||||
node-version: ${{ env.NODE_VERSION }}
|
||||
|
||||
- name: Install npm package dependencies
|
||||
env:
|
||||
# Avoid failure of @vscode/ripgrep installation due to GitHub API rate limiting:
|
||||
# https://github.com/microsoft/vscode-ripgrep#github-api-limit-note
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
run: |
|
||||
yarn install
|
||||
|
||||
- name: Lint
|
||||
run: |
|
||||
yarn \
|
||||
--cwd arduino-ide-extension \
|
||||
lint
|
91
.github/workflows/check-yarn.yml
vendored
Normal file
91
.github/workflows/check-yarn.yml
vendored
Normal file
@@ -0,0 +1,91 @@
|
||||
name: Check Yarn
|
||||
|
||||
# See: https://docs.github.com/en/actions/reference/events-that-trigger-workflows
|
||||
on:
|
||||
create:
|
||||
push:
|
||||
paths:
|
||||
- ".github/workflows/check-yarn.ya?ml"
|
||||
- "**/.yarnrc"
|
||||
- "**/package.json"
|
||||
- "**/package-lock.json"
|
||||
- "**/yarn.lock"
|
||||
pull_request:
|
||||
paths:
|
||||
- ".github/workflows/check-yarn.ya?ml"
|
||||
- "**/.yarnrc"
|
||||
- "**/package.json"
|
||||
- "**/package-lock.json"
|
||||
- "**/yarn.lock"
|
||||
schedule:
|
||||
# Run every Tuesday at 8 AM UTC to catch breakage resulting from changes to the JSON schema.
|
||||
- cron: "0 8 * * TUE"
|
||||
workflow_dispatch:
|
||||
repository_dispatch:
|
||||
|
||||
jobs:
|
||||
run-determination:
|
||||
runs-on: ubuntu-latest
|
||||
permissions: {}
|
||||
outputs:
|
||||
result: ${{ steps.determination.outputs.result }}
|
||||
steps:
|
||||
- name: Determine if the rest of the workflow should run
|
||||
id: determination
|
||||
run: |
|
||||
RELEASE_BRANCH_REGEX="refs/heads/[0-9]+.[0-9]+.x"
|
||||
# The `create` event trigger doesn't support `branches` filters, so it's necessary to use Bash instead.
|
||||
if [[
|
||||
"${{ github.event_name }}" != "create" ||
|
||||
"${{ github.ref }}" =~ $RELEASE_BRANCH_REGEX
|
||||
]]; then
|
||||
# Run the other jobs.
|
||||
RESULT="true"
|
||||
else
|
||||
# There is no need to run the other jobs.
|
||||
RESULT="false"
|
||||
fi
|
||||
|
||||
echo "result=$RESULT" >> $GITHUB_OUTPUT
|
||||
|
||||
check-sync:
|
||||
name: check-sync (${{ matrix.project.path }})
|
||||
needs: run-determination
|
||||
if: needs.run-determination.outputs.result == 'true'
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
project:
|
||||
- path: .
|
||||
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Setup Node.js
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
cache: yarn
|
||||
node-version: ${{ env.NODE_VERSION }}
|
||||
|
||||
- name: Install npm package dependencies
|
||||
env:
|
||||
# Avoid failure of @vscode/ripgrep installation due to GitHub API rate limiting:
|
||||
# https://github.com/microsoft/vscode-ripgrep#github-api-limit-note
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
run: |
|
||||
yarn \
|
||||
install \
|
||||
--ignore-scripts
|
||||
|
||||
- name: Check yarn.lock
|
||||
run: |
|
||||
git \
|
||||
diff \
|
||||
--color \
|
||||
--exit-code \
|
||||
"${{ matrix.project.path }}/yarn.lock"
|
2
.github/workflows/i18n-nightly-push.yml
vendored
2
.github/workflows/i18n-nightly-push.yml
vendored
@@ -2,7 +2,7 @@ name: i18n-nightly-push
|
||||
|
||||
env:
|
||||
# See vars.GO_VERSION field of https://github.com/arduino/arduino-cli/blob/master/DistTasks.yml
|
||||
GO_VERSION: '1.19'
|
||||
GO_VERSION: '1.21'
|
||||
|
||||
on:
|
||||
schedule:
|
||||
|
4
.github/workflows/i18n-weekly-pull.yml
vendored
4
.github/workflows/i18n-weekly-pull.yml
vendored
@@ -2,7 +2,7 @@ name: i18n-weekly-pull
|
||||
|
||||
env:
|
||||
# See vars.GO_VERSION field of https://github.com/arduino/arduino-cli/blob/master/DistTasks.yml
|
||||
GO_VERSION: '1.19'
|
||||
GO_VERSION: '1.21'
|
||||
|
||||
on:
|
||||
schedule:
|
||||
@@ -46,7 +46,7 @@ jobs:
|
||||
TRANSIFEX_API_KEY: ${{ secrets.TRANSIFEX_API_KEY }}
|
||||
|
||||
- name: Create Pull Request
|
||||
uses: peter-evans/create-pull-request@v5
|
||||
uses: peter-evans/create-pull-request@v7
|
||||
with:
|
||||
commit-message: Updated translation files
|
||||
title: Update translation files
|
||||
|
2
.github/workflows/push-container-images.yml
vendored
2
.github/workflows/push-container-images.yml
vendored
@@ -59,7 +59,7 @@ jobs:
|
||||
images: ${{ matrix.image.registry }}/${{ matrix.image.name }}
|
||||
|
||||
- name: Build and push image
|
||||
uses: docker/build-push-action@v5
|
||||
uses: docker/build-push-action@v6
|
||||
with:
|
||||
context: .
|
||||
file: ${{ matrix.image.path }}
|
||||
|
19
.github/workflows/sync-labels.yml
vendored
19
.github/workflows/sync-labels.yml
vendored
@@ -19,7 +19,7 @@ on:
|
||||
|
||||
env:
|
||||
CONFIGURATIONS_FOLDER: .github/label-configuration-files
|
||||
CONFIGURATIONS_ARTIFACT: label-configuration-files
|
||||
CONFIGURATIONS_ARTIFACT_PREFIX: label-configuration-file-
|
||||
|
||||
jobs:
|
||||
check:
|
||||
@@ -71,13 +71,13 @@ jobs:
|
||||
file-url: https://raw.githubusercontent.com/arduino/tooling-project-assets/main/workflow-templates/assets/sync-labels/${{ matrix.filename }}
|
||||
|
||||
- name: Pass configuration files to next job via workflow artifact
|
||||
uses: actions/upload-artifact@v3
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
path: |
|
||||
*.yaml
|
||||
*.yml
|
||||
if-no-files-found: error
|
||||
name: ${{ env.CONFIGURATIONS_ARTIFACT }}
|
||||
name: ${{ env.CONFIGURATIONS_ARTIFACT_PREFIX }}${{ matrix.filename }}
|
||||
|
||||
sync:
|
||||
needs: download
|
||||
@@ -108,16 +108,17 @@ jobs:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Download configuration files artifact
|
||||
uses: actions/download-artifact@v3
|
||||
- name: Download configuration file artifacts
|
||||
uses: actions/download-artifact@v4
|
||||
with:
|
||||
name: ${{ env.CONFIGURATIONS_ARTIFACT }}
|
||||
merge-multiple: true
|
||||
pattern: ${{ env.CONFIGURATIONS_ARTIFACT_PREFIX }}*
|
||||
path: ${{ env.CONFIGURATIONS_FOLDER }}
|
||||
|
||||
- name: Remove unneeded artifact
|
||||
uses: geekyeggo/delete-artifact@v2
|
||||
- name: Remove unneeded artifacts
|
||||
uses: geekyeggo/delete-artifact@v5
|
||||
with:
|
||||
name: ${{ env.CONFIGURATIONS_ARTIFACT }}
|
||||
name: ${{ env.CONFIGURATIONS_ARTIFACT_PREFIX }}*
|
||||
|
||||
- name: Merge label configuration files
|
||||
run: |
|
||||
|
134
.github/workflows/test-javascript.yml
vendored
Normal file
134
.github/workflows/test-javascript.yml
vendored
Normal file
@@ -0,0 +1,134 @@
|
||||
name: Test JavaScript
|
||||
|
||||
env:
|
||||
# See vars.GO_VERSION field of https://github.com/arduino/arduino-cli/blob/master/DistTasks.yml
|
||||
GO_VERSION: '1.21'
|
||||
# See: https://github.com/actions/setup-node/#readme
|
||||
NODE_VERSION: 18.17
|
||||
|
||||
on:
|
||||
push:
|
||||
paths:
|
||||
- ".github/workflows/test-javascript.ya?ml"
|
||||
- "**/.mocharc.js"
|
||||
- "**/.mocharc.jsonc?"
|
||||
- "**/.mocharc.ya?ml"
|
||||
- "**/package.json"
|
||||
- "**/package-lock.json"
|
||||
- "**/yarn.lock"
|
||||
- "tests/testdata/**"
|
||||
- "**/tsconfig.json"
|
||||
- "**.[jt]sx?"
|
||||
pull_request:
|
||||
paths:
|
||||
- ".github/workflows/test-javascript.ya?ml"
|
||||
- "**/.mocharc.js"
|
||||
- "**/.mocharc.jsonc?"
|
||||
- "**/.mocharc.ya?ml"
|
||||
- "**/package.json"
|
||||
- "**/package-lock.json"
|
||||
- "**/yarn.lock"
|
||||
- "tests/testdata/**"
|
||||
- "**/tsconfig.json"
|
||||
- "**.[jt]sx?"
|
||||
workflow_dispatch:
|
||||
repository_dispatch:
|
||||
|
||||
jobs:
|
||||
run-determination:
|
||||
runs-on: ubuntu-latest
|
||||
permissions: {}
|
||||
outputs:
|
||||
result: ${{ steps.determination.outputs.result }}
|
||||
steps:
|
||||
- name: Determine if the rest of the workflow should run
|
||||
id: determination
|
||||
run: |
|
||||
RELEASE_BRANCH_REGEX="refs/heads/[0-9]+.[0-9]+.x"
|
||||
# The `create` event trigger doesn't support `branches` filters, so it's necessary to use Bash instead.
|
||||
if [[
|
||||
"${{ github.event_name }}" != "create" ||
|
||||
"${{ github.ref }}" =~ $RELEASE_BRANCH_REGEX
|
||||
]]; then
|
||||
# Run the other jobs.
|
||||
RESULT="true"
|
||||
else
|
||||
# There is no need to run the other jobs.
|
||||
RESULT="false"
|
||||
fi
|
||||
|
||||
echo "result=$RESULT" >> $GITHUB_OUTPUT
|
||||
|
||||
test:
|
||||
name: test (${{ matrix.project.path }}, ${{ matrix.operating-system }})
|
||||
needs: run-determination
|
||||
if: needs.run-determination.outputs.result == 'true'
|
||||
runs-on: ${{ matrix.operating-system }}
|
||||
defaults:
|
||||
run:
|
||||
shell: bash
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
project:
|
||||
- path: .
|
||||
operating-system:
|
||||
- macos-latest
|
||||
- ubuntu-latest
|
||||
- windows-latest
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Setup Node.js
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
cache: yarn
|
||||
node-version: ${{ env.NODE_VERSION }}
|
||||
|
||||
# See: https://github.com/eclipse-theia/theia/blob/master/doc/Developing.md#prerequisites
|
||||
- name: Install Python
|
||||
uses: actions/setup-python@v5
|
||||
with:
|
||||
python-version: '3.11.x'
|
||||
|
||||
- name: Install Go
|
||||
uses: actions/setup-go@v5
|
||||
with:
|
||||
go-version: ${{ env.GO_VERSION }}
|
||||
|
||||
- name: Install Taskfile
|
||||
uses: arduino/setup-task@v2
|
||||
with:
|
||||
repo-token: ${{ secrets.GITHUB_TOKEN }}
|
||||
version: 3.x
|
||||
|
||||
- name: Install npm package dependencies
|
||||
env:
|
||||
# Avoid failure of @vscode/ripgrep installation due to GitHub API rate limiting:
|
||||
# https://github.com/microsoft/vscode-ripgrep#github-api-limit-note
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
run: |
|
||||
yarn install
|
||||
|
||||
- name: Compile TypeScript
|
||||
run: |
|
||||
yarn \
|
||||
--cwd arduino-ide-extension \
|
||||
build
|
||||
|
||||
- name: Run tests
|
||||
env:
|
||||
# These secrets are optional. Dependent tests will be skipped if not available.
|
||||
CREATE_USERNAME: ${{ secrets.CREATE_USERNAME }}
|
||||
CREATE_PASSWORD: ${{ secrets.CREATE_PASSWORD }}
|
||||
CREATE_CLIENT_SECRET: ${{ secrets.CREATE_CLIENT_SECRET }}
|
||||
run: |
|
||||
yarn test
|
||||
yarn \
|
||||
--cwd arduino-ide-extension \
|
||||
test:slow
|
4
.github/workflows/themes-weekly-pull.yml
vendored
4
.github/workflows/themes-weekly-pull.yml
vendored
@@ -8,7 +8,7 @@ on:
|
||||
|
||||
env:
|
||||
# See vars.GO_VERSION field of https://github.com/arduino/arduino-cli/blob/master/DistTasks.yml
|
||||
GO_VERSION: '1.19'
|
||||
GO_VERSION: '1.21'
|
||||
NODE_VERSION: '18.17'
|
||||
|
||||
jobs:
|
||||
@@ -55,7 +55,7 @@ jobs:
|
||||
run: yarn run themes:generate
|
||||
|
||||
- name: Create Pull Request
|
||||
uses: peter-evans/create-pull-request@v5
|
||||
uses: peter-evans/create-pull-request@v7
|
||||
with:
|
||||
commit-message: Updated themes
|
||||
title: Update themes
|
||||
|
@@ -2,7 +2,9 @@
|
||||
|
||||
# Arduino IDE 2.x
|
||||
|
||||
[](https://github.com/arduino/arduino-ide/actions?query=workflow%3A%22Arduino+IDE%22)
|
||||
[](https://github.com/arduino/arduino-ide/actions/workflows/build.yml)
|
||||
[](https://github.com/arduino/arduino-ide/actions/workflows/check-javascript.yml)
|
||||
[](https://github.com/arduino/arduino-ide/actions/workflows/test-javascript.yml)
|
||||
|
||||
This repository contains the source code of the Arduino IDE 2.x. If you're looking for the old IDE, go to the [repository of the 1.x version](https://github.com/arduino/Arduino).
|
||||
|
||||
|
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "arduino-ide-extension",
|
||||
"version": "2.3.1",
|
||||
"version": "2.3.5",
|
||||
"description": "An extension for Theia building the Arduino IDE",
|
||||
"license": "AGPL-3.0-or-later",
|
||||
"scripts": {
|
||||
@@ -13,7 +13,7 @@
|
||||
"download-ls": "node ./scripts/download-ls.js",
|
||||
"download-examples": "node ./scripts/download-examples.js",
|
||||
"generate-protocol": "node ./scripts/generate-protocol.js",
|
||||
"lint": "eslint",
|
||||
"lint": "eslint .",
|
||||
"prebuild": "rimraf lib",
|
||||
"build": "tsc",
|
||||
"build:dev": "yarn build",
|
||||
@@ -39,6 +39,7 @@
|
||||
"@theia/outline-view": "1.41.0",
|
||||
"@theia/output": "1.41.0",
|
||||
"@theia/plugin-ext": "1.41.0",
|
||||
"@theia/plugin-ext-vscode": "1.41.0",
|
||||
"@theia/preferences": "1.41.0",
|
||||
"@theia/scm": "1.41.0",
|
||||
"@theia/search-in-workspace": "1.41.0",
|
||||
@@ -66,13 +67,15 @@
|
||||
"cross-fetch": "^3.1.5",
|
||||
"dateformat": "^3.0.3",
|
||||
"deepmerge": "^4.2.2",
|
||||
"dompurify": "^2.4.7",
|
||||
"drivelist": "^9.2.4",
|
||||
"electron-updater": "^4.6.5",
|
||||
"fast-deep-equal": "^3.1.3",
|
||||
"fast-json-stable-stringify": "^2.1.0",
|
||||
"fast-safe-stringify": "^2.1.1",
|
||||
"filename-reserved-regex": "^2.0.0",
|
||||
"glob": "^7.1.6",
|
||||
"fqbn": "^1.0.5",
|
||||
"glob": "10.4.4",
|
||||
"google-protobuf": "^3.20.1",
|
||||
"hash.js": "^1.1.7",
|
||||
"is-online": "^10.0.0",
|
||||
@@ -126,8 +129,8 @@
|
||||
"rimraf": "^2.6.1"
|
||||
},
|
||||
"optionalDependencies": {
|
||||
"grpc-tools": "^1.12.4",
|
||||
"protoc": "^1.0.4"
|
||||
"@pingghost/protoc": "^1.0.2",
|
||||
"grpc-tools": "^1.12.4"
|
||||
},
|
||||
"mocha": {
|
||||
"require": [
|
||||
@@ -169,13 +172,17 @@
|
||||
],
|
||||
"arduino": {
|
||||
"arduino-cli": {
|
||||
"version": "0.35.2"
|
||||
"version": "1.1.1"
|
||||
},
|
||||
"arduino-fwuploader": {
|
||||
"version": "2.4.1"
|
||||
},
|
||||
"arduino-language-server": {
|
||||
"version": "0.7.6"
|
||||
"version": {
|
||||
"owner": "arduino",
|
||||
"repo": "arduino-language-server",
|
||||
"commitish": "05ec308"
|
||||
}
|
||||
},
|
||||
"clangd": {
|
||||
"version": "14.0.0"
|
||||
|
@@ -34,7 +34,7 @@
|
||||
}, '');
|
||||
|
||||
const args = process.argv.slice(2);
|
||||
if (args.length == 0) {
|
||||
if (args.length === 0) {
|
||||
console.error('Missing argument to destination file');
|
||||
process.exit(1);
|
||||
}
|
||||
|
@@ -3,13 +3,15 @@
|
||||
(async () => {
|
||||
const os = require('node:os');
|
||||
const path = require('node:path');
|
||||
const { mkdirSync, promises: fs } = require('node:fs');
|
||||
const decompress = require('decompress');
|
||||
const unzip = require('decompress-unzip');
|
||||
const { mkdirSync, promises: fs, rmSync, existsSync } = require('node:fs');
|
||||
const { exec } = require('./utils');
|
||||
const glob = require('glob');
|
||||
const { SemVer, gte, valid: validSemVer } = require('semver');
|
||||
const protoc = path.dirname(require('protoc/protoc'));
|
||||
|
||||
const repository = await fs.mkdtemp(path.join(os.tmpdir(), 'arduino-cli-'));
|
||||
const { glob } = require('glob');
|
||||
const { SemVer, gte, valid: validSemVer, eq } = require('semver');
|
||||
// Use a node-protoc fork until apple arm32 is supported
|
||||
// https://github.com/YePpHa/node-protoc/pull/10
|
||||
const protoc = path.dirname(require('@pingghost/protoc/protoc'));
|
||||
|
||||
const { owner, repo, commitish } = (() => {
|
||||
const pkg = require(path.join(__dirname, '..', 'package.json'));
|
||||
@@ -56,11 +58,6 @@
|
||||
return { owner, repo, commitish };
|
||||
})();
|
||||
|
||||
const url = `https://github.com/${owner}/${repo}.git`;
|
||||
console.log(`>>> Cloning repository from '${url}'...`);
|
||||
exec('git', ['clone', url, repository], { logStdout: true });
|
||||
console.log(`<<< Repository cloned.`);
|
||||
|
||||
const { platform } = process;
|
||||
const resourcesFolder = path.join(
|
||||
__dirname,
|
||||
@@ -86,108 +83,207 @@
|
||||
// - `git-snapshot` for local build executed via `task build`. We do not do this.
|
||||
// - rest, we assume it is a valid semver and has the corresponding tagged code, we use the tag to generate the APIs from the `proto` files.
|
||||
/*
|
||||
{
|
||||
"Application": "arduino-cli",
|
||||
"VersionString": "nightly-20210126",
|
||||
"Commit": "079bb6c6",
|
||||
"Status": "alpha",
|
||||
"Date": "2021-01-26T01:46:31Z"
|
||||
}
|
||||
*/
|
||||
const versionObject = JSON.parse(versionJson);
|
||||
let version = versionObject.VersionString;
|
||||
if (validSemVer(version)) {
|
||||
// https://github.com/arduino/arduino-cli/pull/2374
|
||||
if (gte(new SemVer(version, { loose: true }), new SemVer('0.35.0-rc.1'))) {
|
||||
version = `v${version}`;
|
||||
{
|
||||
"Application": "arduino-cli",
|
||||
"VersionString": "nightly-20210126",
|
||||
"Commit": "079bb6c6",
|
||||
"Status": "alpha",
|
||||
"Date": "2021-01-26T01:46:31Z"
|
||||
}
|
||||
console.log(`>>> Checking out tagged version: '${version}'...`);
|
||||
exec('git', ['-C', repository, 'fetch', '--all', '--tags'], {
|
||||
logStdout: true,
|
||||
});
|
||||
exec(
|
||||
'git',
|
||||
['-C', repository, 'checkout', `tags/${version}`, '-b', version],
|
||||
{ logStdout: true }
|
||||
);
|
||||
console.log(`<<< Checked out tagged version: '${version}'.`);
|
||||
} else if (commitish) {
|
||||
console.log(
|
||||
`>>> Checking out commitish from 'package.json': '${commitish}'...`
|
||||
);
|
||||
exec('git', ['-C', repository, 'checkout', commitish], { logStdout: true });
|
||||
console.log(
|
||||
`<<< Checked out commitish from 'package.json': '${commitish}'.`
|
||||
);
|
||||
} else if (versionObject.Commit) {
|
||||
console.log(
|
||||
`>>> Checking out commitish from the CLI: '${versionObject.Commit}'...`
|
||||
);
|
||||
exec('git', ['-C', repository, 'checkout', versionObject.Commit], {
|
||||
logStdout: true,
|
||||
});
|
||||
console.log(
|
||||
`<<< Checked out commitish from the CLI: '${versionObject.Commit}'.`
|
||||
);
|
||||
} else {
|
||||
console.log(`WARN: no 'git checkout'. Generating from the HEAD revision.`);
|
||||
*/
|
||||
const versionObject = JSON.parse(versionJson);
|
||||
|
||||
async function globProtos(folder, pattern = '**/*.proto') {
|
||||
let protos = [];
|
||||
try {
|
||||
const matches = await glob(pattern, { cwd: folder });
|
||||
protos = matches.map((filename) => path.join(folder, filename));
|
||||
} catch (error) {
|
||||
console.log(error.stack ?? error.message);
|
||||
}
|
||||
return protos;
|
||||
}
|
||||
|
||||
console.log('>>> Generating TS/JS API from:');
|
||||
exec('git', ['-C', repository, 'rev-parse', '--abbrev-ref', 'HEAD'], {
|
||||
logStdout: true,
|
||||
});
|
||||
async function getProtosFromRepo(
|
||||
commitish = '',
|
||||
version = '',
|
||||
owner = 'arduino',
|
||||
repo = 'arduino-cli'
|
||||
) {
|
||||
const repoFolder = await fs.mkdtemp(path.join(os.tmpdir(), 'arduino-cli-'));
|
||||
|
||||
const rpc = path.join(repository, 'rpc');
|
||||
const out = path.join(__dirname, '..', 'src', 'node', 'cli-protocol');
|
||||
mkdirSync(out, { recursive: true });
|
||||
const url = `https://github.com/${owner}/${repo}.git`;
|
||||
console.log(`>>> Cloning repository from '${url}'...`);
|
||||
exec('git', ['clone', url, repoFolder], { logStdout: true });
|
||||
console.log(`<<< Repository cloned.`);
|
||||
|
||||
const protos = await new Promise((resolve) =>
|
||||
glob('**/*.proto', { cwd: rpc }, (error, matches) => {
|
||||
if (error) {
|
||||
console.log(error.stack ?? error.message);
|
||||
resolve([]);
|
||||
return;
|
||||
if (validSemVer(version)) {
|
||||
let versionTag = version;
|
||||
// https://github.com/arduino/arduino-cli/pull/2374
|
||||
if (
|
||||
gte(new SemVer(version, { loose: true }), new SemVer('0.35.0-rc.1'))
|
||||
) {
|
||||
versionTag = `v${version}`;
|
||||
}
|
||||
resolve(matches.map((filename) => path.join(rpc, filename)));
|
||||
})
|
||||
);
|
||||
if (!protos || protos.length === 0) {
|
||||
console.log(`Could not find any .proto files under ${rpc}.`);
|
||||
console.log(`>>> Checking out tagged version: '${versionTag}'...`);
|
||||
exec('git', ['-C', repoFolder, 'fetch', '--all', '--tags'], {
|
||||
logStdout: true,
|
||||
});
|
||||
exec(
|
||||
'git',
|
||||
['-C', repoFolder, 'checkout', `tags/${versionTag}`, '-b', versionTag],
|
||||
{ logStdout: true }
|
||||
);
|
||||
console.log(`<<< Checked out tagged version: '${versionTag}'.`);
|
||||
} else if (commitish) {
|
||||
console.log(`>>> Checking out commitish: '${commitish}'...`);
|
||||
exec('git', ['-C', repoFolder, 'checkout', commitish], {
|
||||
logStdout: true,
|
||||
});
|
||||
console.log(`<<< Checked out commitish: '${commitish}'.`);
|
||||
} else {
|
||||
console.log(
|
||||
`WARN: no 'git checkout'. Generating from the HEAD revision.`
|
||||
);
|
||||
}
|
||||
|
||||
const rpcFolder = await fs.mkdtemp(
|
||||
path.join(os.tmpdir(), 'arduino-cli-rpc')
|
||||
);
|
||||
|
||||
// Copy the the repository rpc folder so we can remove the repository
|
||||
await fs.cp(path.join(repoFolder, 'rpc'), path.join(rpcFolder), {
|
||||
recursive: true,
|
||||
});
|
||||
rmSync(repoFolder, { recursive: true, maxRetries: 5, force: true });
|
||||
|
||||
// Patch for https://github.com/arduino/arduino-cli/issues/2755
|
||||
// Google proto files are removed from source since v1.1.0
|
||||
if (!existsSync(path.join(rpcFolder, 'google'))) {
|
||||
// Include packaged google proto files from v1.1.1
|
||||
// See https://github.com/arduino/arduino-cli/pull/2761
|
||||
console.log(`>>> Missing google proto files. Including from v1.1.1...`);
|
||||
const v111ProtoFolder = await getProtosFromZip('1.1.1');
|
||||
|
||||
// Create an return a folder name google in rpcFolder
|
||||
const googleFolder = path.join(rpcFolder, 'google');
|
||||
await fs.cp(path.join(v111ProtoFolder, 'google'), googleFolder, {
|
||||
recursive: true,
|
||||
});
|
||||
console.log(`<<< Included google proto files from v1.1.1.`);
|
||||
}
|
||||
|
||||
return rpcFolder;
|
||||
}
|
||||
|
||||
async function getProtosFromZip(version) {
|
||||
if (!version) {
|
||||
console.log(`Could not download proto files: CLI version not provided.`);
|
||||
process.exit(1);
|
||||
}
|
||||
console.log(`>>> Downloading proto files from zip for ${version}.`);
|
||||
|
||||
const url = `https://downloads.arduino.cc/arduino-cli/arduino-cli_${version}_proto.zip`;
|
||||
const protos = await fs.mkdtemp(
|
||||
path.join(os.tmpdir(), 'arduino-cli-proto')
|
||||
);
|
||||
|
||||
const { default: download } = await import('@xhmikosr/downloader');
|
||||
/** @type {import('node:buffer').Buffer} */
|
||||
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
||||
// @ts-ignore
|
||||
const data = await download(url);
|
||||
|
||||
await decompress(data, protos, {
|
||||
plugins: [unzip()],
|
||||
filter: (file) => file.path.endsWith('.proto'),
|
||||
});
|
||||
|
||||
console.log(
|
||||
`<<< Finished downloading and extracting proto files for ${version}.`
|
||||
);
|
||||
|
||||
return protos;
|
||||
}
|
||||
|
||||
let protosFolder;
|
||||
|
||||
if (commitish) {
|
||||
protosFolder = await getProtosFromRepo(commitish, undefined, owner, repo);
|
||||
} else if (
|
||||
versionObject.VersionString &&
|
||||
validSemVer(versionObject.VersionString)
|
||||
) {
|
||||
const version = versionObject.VersionString;
|
||||
// v1.1.0 does not contains google proto files in zip
|
||||
// See https://github.com/arduino/arduino-cli/issues/2755
|
||||
const isV110 = eq(new SemVer(version, { loose: true }), '1.1.0');
|
||||
protosFolder = isV110
|
||||
? await getProtosFromRepo(undefined, version)
|
||||
: await getProtosFromZip(version);
|
||||
} else if (versionObject.Commit) {
|
||||
protosFolder = await getProtosFromRepo(versionObject.Commit);
|
||||
}
|
||||
|
||||
if (!protosFolder) {
|
||||
console.log(`Could not get proto files: missing commitish or version.`);
|
||||
process.exit(1);
|
||||
}
|
||||
|
||||
// Generate JS code from the `.proto` files.
|
||||
exec(
|
||||
'grpc_tools_node_protoc',
|
||||
[
|
||||
`--js_out=import_style=commonjs,binary:${out}`,
|
||||
`--grpc_out=generate_package_definition:${out}`,
|
||||
'-I',
|
||||
rpc,
|
||||
...protos,
|
||||
],
|
||||
{ logStdout: true }
|
||||
);
|
||||
const protos = await globProtos(protosFolder);
|
||||
|
||||
// Generate the `.d.ts` files for JS.
|
||||
exec(
|
||||
path.join(protoc, `protoc${platform === 'win32' ? '.exe' : ''}`),
|
||||
[
|
||||
`--plugin=protoc-gen-ts=${path.resolve(
|
||||
__dirname,
|
||||
'..',
|
||||
'node_modules',
|
||||
'.bin',
|
||||
`protoc-gen-ts${platform === 'win32' ? '.cmd' : ''}`
|
||||
)}`,
|
||||
`--ts_out=generate_package_definition:${out}`,
|
||||
'-I',
|
||||
rpc,
|
||||
...protos,
|
||||
],
|
||||
{ logStdout: true }
|
||||
);
|
||||
if (!protos || protos.length === 0) {
|
||||
rmSync(protosFolder, { recursive: true, maxRetries: 5, force: true });
|
||||
console.log(`Could not find any .proto files under ${protosFolder}.`);
|
||||
process.exit(1);
|
||||
}
|
||||
|
||||
console.log('>>> Generating TS/JS API from:');
|
||||
|
||||
const out = path.join(__dirname, '..', 'src', 'node', 'cli-protocol');
|
||||
// Must wipe the gen output folder. Otherwise, dangling service implementation remain in IDE2 code,
|
||||
// although it has been removed from the proto file.
|
||||
// For example, https://github.com/arduino/arduino-cli/commit/50a8bf5c3e61d5b661ccfcd6a055e82eeb510859.
|
||||
// rmSync(out, { recursive: true, maxRetries: 5, force: true });
|
||||
mkdirSync(out, { recursive: true });
|
||||
|
||||
try {
|
||||
// Generate JS code from the `.proto` files.
|
||||
exec(
|
||||
'grpc_tools_node_protoc',
|
||||
[
|
||||
`--js_out=import_style=commonjs,binary:${out}`,
|
||||
`--grpc_out=generate_package_definition:${out}`,
|
||||
'-I',
|
||||
protosFolder,
|
||||
...protos,
|
||||
],
|
||||
{ logStdout: true }
|
||||
);
|
||||
|
||||
// Generate the `.d.ts` files for JS.
|
||||
exec(
|
||||
path.join(protoc, `protoc${platform === 'win32' ? '.exe' : ''}`),
|
||||
[
|
||||
`--plugin=protoc-gen-ts=${path.resolve(
|
||||
__dirname,
|
||||
'..',
|
||||
'node_modules',
|
||||
'.bin',
|
||||
`protoc-gen-ts${platform === 'win32' ? '.cmd' : ''}`
|
||||
)}`,
|
||||
`--ts_out=generate_package_definition:${out}`,
|
||||
'-I',
|
||||
protosFolder,
|
||||
...protos,
|
||||
],
|
||||
{ logStdout: true }
|
||||
);
|
||||
} catch (error) {
|
||||
console.log(error);
|
||||
} finally {
|
||||
rmSync(protosFolder, { recursive: true, maxRetries: 5, force: true });
|
||||
}
|
||||
|
||||
console.log('<<< Generation was successful.');
|
||||
})();
|
||||
|
@@ -42,6 +42,7 @@ import { ArduinoMenus } from './menu/arduino-menus';
|
||||
import { MonitorViewContribution } from './serial/monitor/monitor-view-contribution';
|
||||
import { SerialPlotterContribution } from './serial/plotter/plotter-frontend-contribution';
|
||||
import { ArduinoToolbar } from './toolbar/arduino-toolbar';
|
||||
import { FrontendApplicationConfigProvider } from '@theia/core/lib/browser/frontend-application-config-provider';
|
||||
|
||||
@injectable()
|
||||
export class ArduinoFrontendContribution
|
||||
@@ -103,6 +104,12 @@ export class ArduinoFrontendContribution
|
||||
}
|
||||
|
||||
registerToolbarItems(registry: TabBarToolbarRegistry): void {
|
||||
const config = FrontendApplicationConfigProvider.get();
|
||||
|
||||
debugger;
|
||||
if (config.isLightVersion) {
|
||||
return;
|
||||
}
|
||||
registry.registerItem({
|
||||
id: BoardsToolBarItem.TOOLBAR_ID,
|
||||
render: () => (
|
||||
|
@@ -1,5 +1,9 @@
|
||||
import '../../src/browser/style/index.css';
|
||||
import { Container, ContainerModule } from '@theia/core/shared/inversify';
|
||||
import {
|
||||
Container,
|
||||
ContainerModule,
|
||||
interfaces,
|
||||
} from '@theia/core/shared/inversify';
|
||||
import { WidgetFactory } from '@theia/core/lib/browser/widget-manager';
|
||||
import { CommandContribution } from '@theia/core/lib/common/command';
|
||||
import { bindViewContribution } from '@theia/core/lib/browser/shell/view-contribution';
|
||||
@@ -53,6 +57,8 @@ import {
|
||||
DockPanelRenderer as TheiaDockPanelRenderer,
|
||||
TabBarRendererFactory,
|
||||
ContextMenuRenderer,
|
||||
createTreeContainer,
|
||||
TreeWidget,
|
||||
} from '@theia/core/lib/browser';
|
||||
import { MenuContribution } from '@theia/core/lib/common/menu';
|
||||
import {
|
||||
@@ -79,7 +85,6 @@ import { TabBarDecoratorService as TheiaTabBarDecoratorService } from '@theia/co
|
||||
import { TabBarDecoratorService } from './theia/core/tab-bar-decorator';
|
||||
import { ProblemManager as TheiaProblemManager } from '@theia/markers/lib/browser';
|
||||
import { ProblemManager } from './theia/markers/problem-manager';
|
||||
import { BoardsAutoInstaller } from './boards/boards-auto-installer';
|
||||
import { ShellLayoutRestorer } from './theia/core/shell-layout-restorer';
|
||||
import {
|
||||
ArduinoComponentContextMenuRenderer,
|
||||
@@ -216,9 +221,6 @@ import { NotificationsRenderer as TheiaNotificationsRenderer } from '@theia/mess
|
||||
import { NotificationsRenderer } from './theia/messages/notifications-renderer';
|
||||
import { SketchbookWidgetContribution } from './widgets/sketchbook/sketchbook-widget-contribution';
|
||||
import { LocalCacheFsProvider } from './local-cache/local-cache-fs-provider';
|
||||
import { CloudSketchbookWidget } from './widgets/cloud-sketchbook/cloud-sketchbook-widget';
|
||||
import { CloudSketchbookTreeWidget } from './widgets/cloud-sketchbook/cloud-sketchbook-tree-widget';
|
||||
import { createCloudSketchbookTreeWidget } from './widgets/cloud-sketchbook/cloud-sketchbook-tree-container';
|
||||
import { CreateApi } from './create/create-api';
|
||||
import { ShareSketchDialog } from './dialogs/cloud-share-sketch-dialog';
|
||||
import { AuthenticationClientService } from './auth/authentication-client-service';
|
||||
@@ -372,6 +374,19 @@ import { DebugSessionWidget } from '@theia/debug/lib/browser/view/debug-session-
|
||||
import { DebugConfigurationWidget } from './theia/debug/debug-configuration-widget';
|
||||
import { DebugConfigurationWidget as TheiaDebugConfigurationWidget } from '@theia/debug/lib/browser/view/debug-configuration-widget';
|
||||
import { DebugToolBar } from '@theia/debug/lib/browser/view/debug-toolbar-widget';
|
||||
import {
|
||||
PluginTree,
|
||||
PluginTreeModel,
|
||||
TreeViewWidgetOptions,
|
||||
VIEW_ITEM_CONTEXT_MENU,
|
||||
} from '@theia/plugin-ext/lib/main/browser/view/tree-view-widget';
|
||||
import { TreeViewDecoratorService } from '@theia/plugin-ext/lib/main/browser/view/tree-view-decorator-service';
|
||||
import { PLUGIN_VIEW_DATA_FACTORY_ID } from '@theia/plugin-ext/lib/main/browser/view/plugin-view-registry';
|
||||
import { TreeViewWidget } from './theia/plugin-ext/tree-view-widget';
|
||||
import {
|
||||
VersionWelcomeDialog,
|
||||
VersionWelcomeDialogProps,
|
||||
} from './dialogs/version-welcome-dialog';
|
||||
|
||||
// Hack to fix copy/cut/paste issue after electron version update in Theia.
|
||||
// https://github.com/eclipse-theia/theia/issues/12487
|
||||
@@ -478,8 +493,8 @@ export default new ContainerModule((bind, unbind, isBound, rebind) => {
|
||||
.whenTargetNamed('store');
|
||||
|
||||
// Boards auto-installer
|
||||
bind(BoardsAutoInstaller).toSelf().inSingletonScope();
|
||||
bind(FrontendApplicationContribution).toService(BoardsAutoInstaller);
|
||||
// bind(BoardsAutoInstaller).toSelf().inSingletonScope();
|
||||
// bind(FrontendApplicationContribution).toService(BoardsAutoInstaller);
|
||||
|
||||
// Boards list widget
|
||||
bind(BoardsListWidget).toSelf();
|
||||
@@ -951,11 +966,11 @@ export default new ContainerModule((bind, unbind, isBound, rebind) => {
|
||||
createWidget: () => ctx.container.get(SketchbookCompositeWidget),
|
||||
}));
|
||||
|
||||
bind(CloudSketchbookWidget).toSelf();
|
||||
rebind(SketchbookWidget).toService(CloudSketchbookWidget);
|
||||
bind(CloudSketchbookTreeWidget).toDynamicValue(({ container }) =>
|
||||
createCloudSketchbookTreeWidget(container)
|
||||
);
|
||||
// bind(CloudSketchbookWidget).toSelf();
|
||||
// rebind(SketchbookWidget).toService(CloudSketchbookWidget);
|
||||
// bind(CloudSketchbookTreeWidget).toDynamicValue(({ container }) =>
|
||||
// createCloudSketchbookTreeWidget(container)
|
||||
// );
|
||||
bind(CreateApi).toSelf().inSingletonScope();
|
||||
bind(SketchCache).toSelf().inSingletonScope();
|
||||
bind(CreateFeatures).toSelf().inSingletonScope();
|
||||
@@ -999,6 +1014,11 @@ export default new ContainerModule((bind, unbind, isBound, rebind) => {
|
||||
title: 'IDEUpdater',
|
||||
});
|
||||
|
||||
bind(VersionWelcomeDialog).toSelf().inSingletonScope();
|
||||
bind(VersionWelcomeDialogProps).toConstantValue({
|
||||
title: 'VersionWelcomeDialog',
|
||||
});
|
||||
|
||||
bind(UserFieldsDialog).toSelf().inSingletonScope();
|
||||
bind(UserFieldsDialogProps).toConstantValue({
|
||||
title: 'UserFields',
|
||||
@@ -1082,4 +1102,43 @@ export default new ContainerModule((bind, unbind, isBound, rebind) => {
|
||||
rebind(TheiaTerminalFrontendContribution).toService(
|
||||
TerminalFrontendContribution
|
||||
);
|
||||
|
||||
bindViewsWelcome_TheiaGH14309({ bind, widget: TreeViewWidget });
|
||||
});
|
||||
|
||||
// Align the viewsWelcome rendering with VS Code (https://github.com/eclipse-theia/theia/issues/14309)
|
||||
// Copied from Theia code but with customized TreeViewWidget with the customized viewsWelcome rendering
|
||||
// https://github.com/eclipse-theia/theia/blob/0c5f69455d9ee355b1a7ca510ffa63d2b20f0c77/packages/plugin-ext/src/main/browser/plugin-ext-frontend-module.ts#L159-L181
|
||||
function bindViewsWelcome_TheiaGH14309({
|
||||
bind,
|
||||
widget,
|
||||
}: {
|
||||
bind: interfaces.Bind;
|
||||
widget: interfaces.Newable<TreeWidget>;
|
||||
}) {
|
||||
bind(WidgetFactory)
|
||||
.toDynamicValue(({ container }) => ({
|
||||
id: PLUGIN_VIEW_DATA_FACTORY_ID,
|
||||
createWidget: (options: TreeViewWidgetOptions) => {
|
||||
const props = {
|
||||
contextMenuPath: VIEW_ITEM_CONTEXT_MENU,
|
||||
expandOnlyOnExpansionToggleClick: true,
|
||||
expansionTogglePadding: 22,
|
||||
globalSelection: true,
|
||||
leftPadding: 8,
|
||||
search: true,
|
||||
multiSelect: options.multiSelect,
|
||||
};
|
||||
const child = createTreeContainer(container, {
|
||||
props,
|
||||
tree: PluginTree,
|
||||
model: PluginTreeModel,
|
||||
widget,
|
||||
decoratorService: TreeViewDecoratorService,
|
||||
});
|
||||
child.bind(TreeViewWidgetOptions).toConstantValue(options);
|
||||
return child.get(TreeWidget);
|
||||
},
|
||||
}))
|
||||
.inSingletonScope();
|
||||
}
|
||||
|
@@ -137,6 +137,18 @@ const properties: ArduinoPreferenceSchemaProperties = {
|
||||
'arduino.upload.verify': {
|
||||
type: 'boolean',
|
||||
default: false,
|
||||
description: nls.localize(
|
||||
'arduino/preferences/upload.verify',
|
||||
'After upload, verify that the contents of the memory on the board match the uploaded binary.'
|
||||
),
|
||||
},
|
||||
'arduino.upload.autoVerify': {
|
||||
type: 'boolean',
|
||||
default: true,
|
||||
description: nls.localize(
|
||||
'arduino/preferences/upload.autoVerify',
|
||||
"True if the IDE should automatically verify the code before the upload. True by default. When this value is false, IDE does not recompile the code before uploading the binary to the board. It's highly advised to only set this value to false if you know what you are doing."
|
||||
),
|
||||
},
|
||||
'arduino.window.autoScale': {
|
||||
type: 'boolean',
|
||||
@@ -228,6 +240,14 @@ const properties: ArduinoPreferenceSchemaProperties = {
|
||||
),
|
||||
default: 'https://api2.arduino.cc/create',
|
||||
},
|
||||
'arduino.cloud.sharedSpaceID': {
|
||||
type: 'string',
|
||||
description: nls.localize(
|
||||
'arduino/preferences/cloud.sharedSpaceId',
|
||||
'The ID of the Arduino Cloud shared space to load the sketchbook from. If empty, your private space is selected.'
|
||||
),
|
||||
default: '',
|
||||
},
|
||||
'arduino.auth.clientID': {
|
||||
type: 'string',
|
||||
description: nls.localize(
|
||||
@@ -319,6 +339,7 @@ export interface ArduinoConfiguration {
|
||||
'arduino.compile.warnings': CompilerWarnings;
|
||||
'arduino.upload.verbose': boolean;
|
||||
'arduino.upload.verify': boolean;
|
||||
'arduino.upload.autoVerify': boolean;
|
||||
'arduino.window.autoScale': boolean;
|
||||
'arduino.ide.updateChannel': UpdateChannel;
|
||||
'arduino.ide.updateBaseUrl': string;
|
||||
@@ -329,6 +350,7 @@ export interface ArduinoConfiguration {
|
||||
'arduino.cloud.push.warn': boolean;
|
||||
'arduino.cloud.pushpublic.warn': boolean;
|
||||
'arduino.cloud.sketchSyncEndpoint': string;
|
||||
'arduino.cloud.sharedSpaceID': string;
|
||||
'arduino.auth.clientID': string;
|
||||
'arduino.auth.domain': string;
|
||||
'arduino.auth.audience': string;
|
||||
|
@@ -52,6 +52,10 @@ export class BoardsAutoInstaller implements FrontendApplicationContribution {
|
||||
private readonly toDispose = new DisposableCollection();
|
||||
|
||||
onStart(): void {
|
||||
if (process.env.IS_LIGHT_VERSION) {
|
||||
return;
|
||||
}
|
||||
|
||||
this.toDispose.pushAll([
|
||||
this.boardsServiceProvider.onBoardsConfigDidChange((event) => {
|
||||
if (isBoardIdentifierChangeEvent(event)) {
|
||||
|
@@ -12,6 +12,7 @@ import { ILogger } from '@theia/core/lib/common/logger';
|
||||
import { deepClone, deepFreeze } from '@theia/core/lib/common/objects';
|
||||
import type { Mutable } from '@theia/core/lib/common/types';
|
||||
import { inject, injectable, named } from '@theia/core/shared/inversify';
|
||||
import { FQBN } from 'fqbn';
|
||||
import {
|
||||
BoardDetails,
|
||||
BoardsService,
|
||||
@@ -20,6 +21,7 @@ import {
|
||||
Programmer,
|
||||
isBoardIdentifierChangeEvent,
|
||||
isProgrammer,
|
||||
sanitizeFqbn,
|
||||
} from '../../common/protocol';
|
||||
import { notEmpty } from '../../common/utils';
|
||||
import type {
|
||||
@@ -29,6 +31,14 @@ import type {
|
||||
import { NotificationCenter } from '../notification-center';
|
||||
import { BoardsServiceProvider } from './boards-service-provider';
|
||||
|
||||
export interface SelectConfigOptionParams {
|
||||
readonly fqbn: string;
|
||||
readonly optionsToUpdate: readonly Readonly<{
|
||||
option: string;
|
||||
selectedValue: string;
|
||||
}>[];
|
||||
}
|
||||
|
||||
@injectable()
|
||||
export class BoardsDataStore
|
||||
implements
|
||||
@@ -64,7 +74,12 @@ export class BoardsDataStore
|
||||
this.toDispose.pushAll([
|
||||
this.boardsServiceProvider.onBoardsConfigDidChange((event) => {
|
||||
if (isBoardIdentifierChangeEvent(event)) {
|
||||
this.updateSelectedBoardData(event.selectedBoard?.fqbn);
|
||||
this.updateSelectedBoardData(
|
||||
event.selectedBoard?.fqbn,
|
||||
// If the change event comes from toolbar and the FQBN contains custom board options, change the currently selected options
|
||||
// https://github.com/arduino/arduino-ide/issues/1588
|
||||
event.reason === 'toolbar'
|
||||
);
|
||||
}
|
||||
}),
|
||||
this.notificationCenter.onPlatformDidInstall(async ({ item }) => {
|
||||
@@ -116,7 +131,7 @@ export class BoardsDataStore
|
||||
if (!fqbn) {
|
||||
return undefined;
|
||||
} else {
|
||||
const data = await this.getData(fqbn);
|
||||
const data = await this.getData(sanitizeFqbn(fqbn));
|
||||
if (data === BoardsDataStore.Data.EMPTY) {
|
||||
return undefined;
|
||||
}
|
||||
@@ -125,9 +140,22 @@ export class BoardsDataStore
|
||||
}
|
||||
|
||||
private async updateSelectedBoardData(
|
||||
fqbn: string | undefined
|
||||
fqbn: string | undefined,
|
||||
updateConfigOptions = false
|
||||
): Promise<void> {
|
||||
this._selectedBoardData = await this.getSelectedBoardData(fqbn);
|
||||
if (fqbn && updateConfigOptions) {
|
||||
const { options } = new FQBN(fqbn);
|
||||
if (options) {
|
||||
const optionsToUpdate = Object.entries(options).map(([key, value]) => ({
|
||||
option: key,
|
||||
selectedValue: value,
|
||||
}));
|
||||
const params = { fqbn, optionsToUpdate };
|
||||
await this.selectConfigOption(params);
|
||||
this._selectedBoardData = await this.getSelectedBoardData(fqbn); // reload the updated data
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
onStop(): void {
|
||||
@@ -168,7 +196,7 @@ export class BoardsDataStore
|
||||
return undefined;
|
||||
}
|
||||
const { configOptions } = await this.getData(fqbn);
|
||||
return ConfigOption.decorate(fqbn, configOptions);
|
||||
return new FQBN(fqbn).withConfigOptions(...configOptions).toString();
|
||||
}
|
||||
|
||||
async getData(fqbn: string | undefined): Promise<BoardsDataStore.Data> {
|
||||
@@ -194,6 +222,20 @@ export class BoardsDataStore
|
||||
return data;
|
||||
}
|
||||
|
||||
async reloadBoardData(fqbn: string | undefined): Promise<void> {
|
||||
if (!fqbn) {
|
||||
return;
|
||||
}
|
||||
const key = this.getStorageKey(fqbn);
|
||||
const details = await this.loadBoardDetails(fqbn, true);
|
||||
if (!details) {
|
||||
return;
|
||||
}
|
||||
const data = createDataStoreEntry(details);
|
||||
await this.storageService.setData(key, data);
|
||||
this.fireChanged({ fqbn, data });
|
||||
}
|
||||
|
||||
async selectProgrammer({
|
||||
fqbn,
|
||||
selectedProgrammer,
|
||||
@@ -201,48 +243,63 @@ export class BoardsDataStore
|
||||
fqbn: string;
|
||||
selectedProgrammer: Programmer;
|
||||
}): Promise<boolean> {
|
||||
const storedData = deepClone(await this.getData(fqbn));
|
||||
const sanitizedFQBN = sanitizeFqbn(fqbn);
|
||||
const storedData = deepClone(await this.getData(sanitizedFQBN));
|
||||
const { programmers } = storedData;
|
||||
if (!programmers.find((p) => Programmer.equals(selectedProgrammer, p))) {
|
||||
return false;
|
||||
}
|
||||
|
||||
const data = { ...storedData, selectedProgrammer };
|
||||
await this.setData({ fqbn, data });
|
||||
this.fireChanged({ fqbn, data });
|
||||
const change: BoardsDataStoreChange = {
|
||||
fqbn: sanitizedFQBN,
|
||||
data: { ...storedData, selectedProgrammer },
|
||||
};
|
||||
await this.setData(change);
|
||||
this.fireChanged(change);
|
||||
return true;
|
||||
}
|
||||
|
||||
async selectConfigOption({
|
||||
fqbn,
|
||||
option,
|
||||
selectedValue,
|
||||
}: {
|
||||
fqbn: string;
|
||||
option: string;
|
||||
selectedValue: string;
|
||||
}): Promise<boolean> {
|
||||
const data = deepClone(await this.getData(fqbn));
|
||||
const { configOptions } = data;
|
||||
const configOption = configOptions.find((c) => c.option === option);
|
||||
if (!configOption) {
|
||||
async selectConfigOption(params: SelectConfigOptionParams): Promise<boolean> {
|
||||
const { fqbn, optionsToUpdate } = params;
|
||||
if (!optionsToUpdate.length) {
|
||||
return false;
|
||||
}
|
||||
let updated = false;
|
||||
for (const value of configOption.values) {
|
||||
const mutable: Mutable<ConfigValue> = value;
|
||||
if (mutable.value === selectedValue) {
|
||||
mutable.selected = true;
|
||||
updated = true;
|
||||
} else {
|
||||
mutable.selected = false;
|
||||
|
||||
const sanitizedFQBN = sanitizeFqbn(fqbn);
|
||||
const mutableData = deepClone(await this.getData(sanitizedFQBN));
|
||||
let didChange = false;
|
||||
|
||||
for (const { option, selectedValue } of optionsToUpdate) {
|
||||
const { configOptions } = mutableData;
|
||||
const configOption = configOptions.find((c) => c.option === option);
|
||||
if (configOption) {
|
||||
const configOptionValueIndex = configOption.values.findIndex(
|
||||
(configOptionValue) => configOptionValue.value === selectedValue
|
||||
);
|
||||
if (configOptionValueIndex >= 0) {
|
||||
// unselect all
|
||||
configOption.values
|
||||
.map((value) => value as Mutable<ConfigValue>)
|
||||
.forEach((value) => (value.selected = false));
|
||||
const mutableConfigValue: Mutable<ConfigValue> =
|
||||
configOption.values[configOptionValueIndex];
|
||||
// make the new value `selected`
|
||||
mutableConfigValue.selected = true;
|
||||
didChange = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (!updated) {
|
||||
|
||||
if (!didChange) {
|
||||
return false;
|
||||
}
|
||||
await this.setData({ fqbn, data });
|
||||
this.fireChanged({ fqbn, data });
|
||||
|
||||
const change: BoardsDataStoreChange = {
|
||||
fqbn: sanitizedFQBN,
|
||||
data: mutableData,
|
||||
};
|
||||
await this.setData(change);
|
||||
this.fireChanged(change);
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -256,9 +313,15 @@ export class BoardsDataStore
|
||||
return `.arduinoIDE-configOptions-${fqbn}`;
|
||||
}
|
||||
|
||||
async loadBoardDetails(fqbn: string): Promise<BoardDetails | undefined> {
|
||||
async loadBoardDetails(
|
||||
fqbn: string,
|
||||
forceRefresh = false
|
||||
): Promise<BoardDetails | undefined> {
|
||||
try {
|
||||
const details = await this.boardsService.getBoardDetails({ fqbn });
|
||||
const details = await this.boardsService.getBoardDetails({
|
||||
fqbn,
|
||||
forceRefresh,
|
||||
});
|
||||
return details;
|
||||
} catch (err) {
|
||||
if (
|
||||
|
@@ -12,6 +12,7 @@ import { Emitter } from '@theia/core/lib/common/event';
|
||||
import { ILogger } from '@theia/core/lib/common/logger';
|
||||
import { MessageService } from '@theia/core/lib/common/message-service';
|
||||
import { nls } from '@theia/core/lib/common/nls';
|
||||
import { deepClone } from '@theia/core/lib/common/objects';
|
||||
import { Deferred } from '@theia/core/lib/common/promise-util';
|
||||
import type { Mutable } from '@theia/core/lib/common/types';
|
||||
import { inject, injectable, optional } from '@theia/core/shared/inversify';
|
||||
@@ -21,31 +22,32 @@ import {
|
||||
} from '@theia/output/lib/browser/output-channel';
|
||||
import {
|
||||
BoardIdentifier,
|
||||
boardIdentifierEquals,
|
||||
BoardUserField,
|
||||
BoardWithPackage,
|
||||
BoardsConfig,
|
||||
BoardsConfigChangeEvent,
|
||||
BoardsPackage,
|
||||
BoardsService,
|
||||
BoardUserField,
|
||||
BoardWithPackage,
|
||||
DetectedPorts,
|
||||
Port,
|
||||
PortIdentifier,
|
||||
boardIdentifierEquals,
|
||||
emptyBoardsConfig,
|
||||
isBoardIdentifier,
|
||||
isBoardIdentifierChangeEvent,
|
||||
isPortIdentifier,
|
||||
isPortIdentifierChangeEvent,
|
||||
Port,
|
||||
PortIdentifier,
|
||||
portIdentifierEquals,
|
||||
sanitizeFqbn,
|
||||
serializePlatformIdentifier,
|
||||
} from '../../common/protocol';
|
||||
import {
|
||||
BoardList,
|
||||
BoardListHistory,
|
||||
createBoardList,
|
||||
EditBoardsConfigActionParams,
|
||||
isBoardListHistory,
|
||||
SelectBoardsConfigActionParams,
|
||||
createBoardList,
|
||||
isBoardListHistory,
|
||||
} from '../../common/protocol/board-list';
|
||||
import type { Defined } from '../../common/types';
|
||||
import type {
|
||||
@@ -104,6 +106,21 @@ type BoardListHistoryUpdateResult =
|
||||
type BoardToSelect = BoardIdentifier | undefined | 'ignore-board';
|
||||
type PortToSelect = PortIdentifier | undefined | 'ignore-port';
|
||||
|
||||
function sanitizeBoardToSelectFQBN(board: BoardToSelect): BoardToSelect {
|
||||
if (isBoardIdentifier(board)) {
|
||||
return sanitizeBoardIdentifierFQBN(board);
|
||||
}
|
||||
return board;
|
||||
}
|
||||
function sanitizeBoardIdentifierFQBN(board: BoardIdentifier): BoardIdentifier {
|
||||
if (board.fqbn) {
|
||||
const copy: Mutable<BoardIdentifier> = deepClone(board);
|
||||
copy.fqbn = sanitizeFqbn(board.fqbn);
|
||||
return copy;
|
||||
}
|
||||
return board;
|
||||
}
|
||||
|
||||
interface UpdateBoardListHistoryParams {
|
||||
readonly portToSelect: PortToSelect;
|
||||
readonly boardToSelect: BoardToSelect;
|
||||
@@ -136,6 +153,9 @@ export interface BoardListUIActions {
|
||||
}
|
||||
export type BoardListUI = BoardList & BoardListUIActions;
|
||||
|
||||
export type BoardsConfigChangeEventUI = BoardsConfigChangeEvent &
|
||||
Readonly<{ reason?: UpdateBoardsConfigReason }>;
|
||||
|
||||
@injectable()
|
||||
export class BoardListDumper implements Disposable {
|
||||
@inject(OutputChannelManager)
|
||||
@@ -190,7 +210,7 @@ export class BoardsServiceProvider
|
||||
private _ready = new Deferred<void>();
|
||||
|
||||
private readonly boardsConfigDidChangeEmitter =
|
||||
new Emitter<BoardsConfigChangeEvent>();
|
||||
new Emitter<BoardsConfigChangeEventUI>();
|
||||
readonly onBoardsConfigDidChange = this.boardsConfigDidChangeEmitter.event;
|
||||
|
||||
private readonly boardListDidChangeEmitter = new Emitter<BoardListUI>();
|
||||
@@ -353,7 +373,8 @@ export class BoardsServiceProvider
|
||||
portToSelect !== 'ignore-port' &&
|
||||
!portIdentifierEquals(portToSelect, previousSelectedPort);
|
||||
const boardDidChangeEvent = boardDidChange
|
||||
? { selectedBoard: boardToSelect, previousSelectedBoard }
|
||||
? // The change event must always contain any custom board options. Hence the board to select is not sanitized.
|
||||
{ selectedBoard: boardToSelect, previousSelectedBoard }
|
||||
: undefined;
|
||||
const portDidChangeEvent = portDidChange
|
||||
? { selectedPort: portToSelect, previousSelectedPort }
|
||||
@@ -374,16 +395,31 @@ export class BoardsServiceProvider
|
||||
return false;
|
||||
}
|
||||
|
||||
this.maybeUpdateBoardListHistory({ portToSelect, boardToSelect });
|
||||
this.maybeUpdateBoardsData({ boardToSelect, reason });
|
||||
// unlike for the board change event, every persistent state must not contain custom board config options in the FQBN
|
||||
const sanitizedBoardToSelect = sanitizeBoardToSelectFQBN(boardToSelect);
|
||||
|
||||
this.maybeUpdateBoardListHistory({
|
||||
portToSelect,
|
||||
boardToSelect: sanitizedBoardToSelect,
|
||||
});
|
||||
this.maybeUpdateBoardsData({
|
||||
boardToSelect: sanitizedBoardToSelect,
|
||||
reason,
|
||||
});
|
||||
|
||||
if (isBoardIdentifierChangeEvent(event)) {
|
||||
this._boardsConfig.selectedBoard = event.selectedBoard;
|
||||
this._boardsConfig.selectedBoard = event.selectedBoard
|
||||
? sanitizeBoardIdentifierFQBN(event.selectedBoard)
|
||||
: event.selectedBoard;
|
||||
}
|
||||
if (isPortIdentifierChangeEvent(event)) {
|
||||
this._boardsConfig.selectedPort = event.selectedPort;
|
||||
}
|
||||
|
||||
if (reason) {
|
||||
event = Object.assign(event, { reason });
|
||||
}
|
||||
|
||||
this.boardsConfigDidChangeEmitter.fire(event);
|
||||
this.refreshBoardList();
|
||||
this.saveState();
|
||||
|
@@ -20,6 +20,7 @@ import {
|
||||
} from '../../common/protocol';
|
||||
import type { BoardList } from '../../common/protocol/board-list';
|
||||
import { BoardsListWidget } from '../boards/boards-list-widget';
|
||||
import { BoardsDataStore } from '../boards/boards-data-store';
|
||||
import { BoardsServiceProvider } from '../boards/boards-service-provider';
|
||||
import {
|
||||
ArduinoMenus,
|
||||
@@ -39,6 +40,8 @@ export class BoardSelection extends SketchContribution {
|
||||
private readonly menuModelRegistry: MenuModelRegistry;
|
||||
@inject(NotificationCenter)
|
||||
private readonly notificationCenter: NotificationCenter;
|
||||
@inject(BoardsDataStore)
|
||||
private readonly boardsDataStore: BoardsDataStore;
|
||||
@inject(BoardsService)
|
||||
private readonly boardsService: BoardsService;
|
||||
@inject(BoardsServiceProvider)
|
||||
@@ -74,6 +77,29 @@ SN: ${SN}
|
||||
});
|
||||
},
|
||||
});
|
||||
|
||||
registry.registerCommand(BoardSelection.Commands.RELOAD_BOARD_DATA, {
|
||||
execute: async () => {
|
||||
const selectedFqbn =
|
||||
this.boardsServiceProvider.boardList.boardsConfig.selectedBoard?.fqbn;
|
||||
let message: string;
|
||||
|
||||
if (selectedFqbn) {
|
||||
await this.boardsDataStore.reloadBoardData(selectedFqbn);
|
||||
message = nls.localize(
|
||||
'arduino/board/boardDataReloaded',
|
||||
'Board data reloaded.'
|
||||
);
|
||||
} else {
|
||||
message = nls.localize(
|
||||
'arduino/board/selectBoardToReload',
|
||||
'Please select a board first.'
|
||||
);
|
||||
}
|
||||
|
||||
this.messageService.info(message, { timeout: 2000 });
|
||||
},
|
||||
});
|
||||
}
|
||||
|
||||
override onStart(): void {
|
||||
@@ -151,6 +177,21 @@ SN: ${SN}
|
||||
)
|
||||
);
|
||||
|
||||
const reloadBoardData = {
|
||||
commandId: BoardSelection.Commands.RELOAD_BOARD_DATA.id,
|
||||
label: nls.localize('arduino/board/reloadBoardData', 'Reload Board Data'),
|
||||
order: '102',
|
||||
};
|
||||
this.menuModelRegistry.registerMenuAction(
|
||||
ArduinoMenus.TOOLS__BOARD_SELECTION_GROUP,
|
||||
reloadBoardData
|
||||
);
|
||||
this.toDisposeBeforeMenuRebuild.push(
|
||||
Disposable.create(() =>
|
||||
this.menuModelRegistry.unregisterMenuAction(reloadBoardData)
|
||||
)
|
||||
);
|
||||
|
||||
const getBoardInfo = {
|
||||
commandId: BoardSelection.Commands.GET_BOARD_INFO.id,
|
||||
label: nls.localize('arduino/board/getBoardInfo', 'Get Board Info'),
|
||||
@@ -361,5 +402,8 @@ SN: ${SN}
|
||||
export namespace BoardSelection {
|
||||
export namespace Commands {
|
||||
export const GET_BOARD_INFO: Command = { id: 'arduino-get-board-info' };
|
||||
export const RELOAD_BOARD_DATA: Command = {
|
||||
id: 'arduino-reload-board-data',
|
||||
};
|
||||
}
|
||||
}
|
||||
|
@@ -35,6 +35,10 @@ export class BoardsDataMenuUpdater extends Contribution {
|
||||
private readonly toDisposeOnBoardChange = new DisposableCollection();
|
||||
|
||||
override onStart(): void {
|
||||
if (process.env.IS_LIGHT_VERSION) {
|
||||
return;
|
||||
}
|
||||
|
||||
this.boardsDataStore.onDidChange(() =>
|
||||
this.updateMenuActions(
|
||||
this.boardsServiceProvider.boardsConfig.selectedBoard
|
||||
@@ -87,8 +91,7 @@ export class BoardsDataMenuUpdater extends Contribution {
|
||||
execute: () =>
|
||||
this.boardsDataStore.selectConfigOption({
|
||||
fqbn,
|
||||
option,
|
||||
selectedValue: value.value,
|
||||
optionsToUpdate: [{ option, selectedValue: value.value }],
|
||||
}),
|
||||
isToggled: () => value.selected,
|
||||
};
|
||||
|
@@ -37,11 +37,15 @@ export class BurnBootloader extends CoreServiceContribution {
|
||||
'arduino/bootloader/burningBootloader',
|
||||
'Burning bootloader...'
|
||||
),
|
||||
task: (progressId, coreService) =>
|
||||
coreService.burnBootloader({
|
||||
...options,
|
||||
progressId,
|
||||
}),
|
||||
task: (progressId, coreService, token) =>
|
||||
coreService.burnBootloader(
|
||||
{
|
||||
...options,
|
||||
progressId,
|
||||
},
|
||||
token
|
||||
),
|
||||
cancelable: true,
|
||||
});
|
||||
this.messageService.info(
|
||||
nls.localize(
|
||||
|
@@ -3,10 +3,14 @@ import { LocalStorageService } from '@theia/core/lib/browser/storage-service';
|
||||
import { inject, injectable } from '@theia/core/shared/inversify';
|
||||
import {
|
||||
IDEUpdater,
|
||||
LAST_USED_IDE_VERSION,
|
||||
SKIP_IDE_VERSION,
|
||||
} from '../../common/protocol/ide-updater';
|
||||
import { IDEUpdaterDialog } from '../dialogs/ide-updater/ide-updater-dialog';
|
||||
import { Contribution } from './contribution';
|
||||
import { VersionWelcomeDialog } from '../dialogs/version-welcome-dialog';
|
||||
import { AppService } from '../app-service';
|
||||
import { SemVer } from 'semver';
|
||||
|
||||
@injectable()
|
||||
export class CheckForIDEUpdates extends Contribution {
|
||||
@@ -16,9 +20,15 @@ export class CheckForIDEUpdates extends Contribution {
|
||||
@inject(IDEUpdaterDialog)
|
||||
private readonly updaterDialog: IDEUpdaterDialog;
|
||||
|
||||
@inject(VersionWelcomeDialog)
|
||||
private readonly versionWelcomeDialog: VersionWelcomeDialog;
|
||||
|
||||
@inject(LocalStorageService)
|
||||
private readonly localStorage: LocalStorageService;
|
||||
|
||||
@inject(AppService)
|
||||
private readonly appService: AppService;
|
||||
|
||||
override onStart(): void {
|
||||
this.preferences.onPreferenceChanged(
|
||||
({ preferenceName, newValue, oldValue }) => {
|
||||
@@ -36,7 +46,11 @@ export class CheckForIDEUpdates extends Contribution {
|
||||
);
|
||||
}
|
||||
|
||||
override onReady(): void {
|
||||
override async onReady(): Promise<void> {
|
||||
if (process.env.IS_LIGHT_VERSION) {
|
||||
return;
|
||||
}
|
||||
|
||||
this.updater
|
||||
.init(
|
||||
this.preferences.get('arduino.ide.updateChannel'),
|
||||
@@ -49,7 +63,13 @@ export class CheckForIDEUpdates extends Contribution {
|
||||
return this.updater.checkForUpdates(true);
|
||||
})
|
||||
.then(async (updateInfo) => {
|
||||
if (!updateInfo) return;
|
||||
if (!updateInfo) {
|
||||
const isNewVersion = await this.isNewStableVersion();
|
||||
if (isNewVersion) {
|
||||
this.versionWelcomeDialog.open();
|
||||
}
|
||||
return;
|
||||
}
|
||||
const versionToSkip = await this.localStorage.getData<string>(
|
||||
SKIP_IDE_VERSION
|
||||
);
|
||||
@@ -64,6 +84,44 @@ export class CheckForIDEUpdates extends Contribution {
|
||||
e.message
|
||||
)
|
||||
);
|
||||
})
|
||||
.finally(() => {
|
||||
this.setCurrentIDEVersion();
|
||||
});
|
||||
}
|
||||
|
||||
private async setCurrentIDEVersion(): Promise<void> {
|
||||
try {
|
||||
const { appVersion } = await this.appService.info();
|
||||
const currSemVer = new SemVer(appVersion ?? '');
|
||||
this.localStorage.setData(LAST_USED_IDE_VERSION, currSemVer.format());
|
||||
} catch {
|
||||
// ignore invalid versions
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if user is running a new IDE version for the first time.
|
||||
* @returns true if the current IDE version is greater than the last used version
|
||||
* and both are non-prerelease versions.
|
||||
*/
|
||||
private async isNewStableVersion(): Promise<boolean> {
|
||||
try {
|
||||
const { appVersion } = await this.appService.info();
|
||||
const prevVersion = await this.localStorage.getData<string>(
|
||||
LAST_USED_IDE_VERSION
|
||||
);
|
||||
|
||||
const prevSemVer = new SemVer(prevVersion ?? '');
|
||||
const currSemVer = new SemVer(appVersion ?? '');
|
||||
|
||||
if (prevSemVer.prerelease.length || currSemVer.prerelease.length) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return currSemVer.compare(prevSemVer) === 1;
|
||||
} catch (e) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -1,83 +1,89 @@
|
||||
import { ClipboardService } from '@theia/core/lib/browser/clipboard-service';
|
||||
import {
|
||||
FrontendApplication,
|
||||
FrontendApplicationContribution,
|
||||
} from '@theia/core/lib/browser/frontend-application';
|
||||
import { FrontendApplicationStateService } from '@theia/core/lib/browser/frontend-application-state';
|
||||
import {
|
||||
KeybindingContribution,
|
||||
KeybindingRegistry,
|
||||
} from '@theia/core/lib/browser/keybinding';
|
||||
import { LabelProvider } from '@theia/core/lib/browser/label-provider';
|
||||
import { OpenerService, open } from '@theia/core/lib/browser/opener-service';
|
||||
import { Saveable } from '@theia/core/lib/browser/saveable';
|
||||
import { ApplicationShell } from '@theia/core/lib/browser/shell/application-shell';
|
||||
import {
|
||||
TabBarToolbarContribution,
|
||||
TabBarToolbarRegistry,
|
||||
} from '@theia/core/lib/browser/shell/tab-bar-toolbar';
|
||||
import { CancellationToken } from '@theia/core/lib/common/cancellation';
|
||||
import {
|
||||
Command,
|
||||
CommandContribution,
|
||||
CommandRegistry,
|
||||
CommandService,
|
||||
} from '@theia/core/lib/common/command';
|
||||
import {
|
||||
Disposable,
|
||||
DisposableCollection,
|
||||
} from '@theia/core/lib/common/disposable';
|
||||
import { EnvVariablesServer } from '@theia/core/lib/common/env-variables';
|
||||
import { ILogger } from '@theia/core/lib/common/logger';
|
||||
import {
|
||||
MenuContribution,
|
||||
MenuModelRegistry,
|
||||
} from '@theia/core/lib/common/menu';
|
||||
import { MessageService } from '@theia/core/lib/common/message-service';
|
||||
import { MessageType } from '@theia/core/lib/common/message-service-protocol';
|
||||
import { nls } from '@theia/core/lib/common/nls';
|
||||
import { MaybePromise, isObject } from '@theia/core/lib/common/types';
|
||||
import URI from '@theia/core/lib/common/uri';
|
||||
import {
|
||||
inject,
|
||||
injectable,
|
||||
interfaces,
|
||||
postConstruct,
|
||||
} from '@theia/core/shared/inversify';
|
||||
import URI from '@theia/core/lib/common/uri';
|
||||
import { ILogger } from '@theia/core/lib/common/logger';
|
||||
import {
|
||||
Disposable,
|
||||
DisposableCollection,
|
||||
} from '@theia/core/lib/common/disposable';
|
||||
import { Saveable } from '@theia/core/lib/browser/saveable';
|
||||
import { FileService } from '@theia/filesystem/lib/browser/file-service';
|
||||
import { MaybePromise } from '@theia/core/lib/common/types';
|
||||
import { LabelProvider } from '@theia/core/lib/browser/label-provider';
|
||||
import { EditorManager } from '@theia/editor/lib/browser/editor-manager';
|
||||
import { MessageService } from '@theia/core/lib/common/message-service';
|
||||
import { EnvVariablesServer } from '@theia/core/lib/common/env-variables';
|
||||
import { open, OpenerService } from '@theia/core/lib/browser/opener-service';
|
||||
import { FileService } from '@theia/filesystem/lib/browser/file-service';
|
||||
import { NotificationManager } from '@theia/messages/lib/browser/notifications-manager';
|
||||
import { OutputChannelSeverity } from '@theia/output/lib/browser/output-channel';
|
||||
import { MainMenuManager } from '../../common/main-menu-manager';
|
||||
import { userAbort } from '../../common/nls';
|
||||
import {
|
||||
MenuModelRegistry,
|
||||
MenuContribution,
|
||||
} from '@theia/core/lib/common/menu';
|
||||
CoreError,
|
||||
CoreService,
|
||||
FileSystemExt,
|
||||
ResponseServiceClient,
|
||||
Sketch,
|
||||
SketchesService,
|
||||
} from '../../common/protocol';
|
||||
import {
|
||||
KeybindingRegistry,
|
||||
KeybindingContribution,
|
||||
} from '@theia/core/lib/browser/keybinding';
|
||||
import {
|
||||
TabBarToolbarContribution,
|
||||
TabBarToolbarRegistry,
|
||||
} from '@theia/core/lib/browser/shell/tab-bar-toolbar';
|
||||
import {
|
||||
FrontendApplicationContribution,
|
||||
FrontendApplication,
|
||||
} from '@theia/core/lib/browser/frontend-application';
|
||||
import {
|
||||
Command,
|
||||
CommandRegistry,
|
||||
CommandContribution,
|
||||
CommandService,
|
||||
} from '@theia/core/lib/common/command';
|
||||
ExecuteWithProgress,
|
||||
UserAbortApplicationError,
|
||||
} from '../../common/protocol/progressible';
|
||||
import { ArduinoPreferences } from '../arduino-preferences';
|
||||
import { BoardsDataStore } from '../boards/boards-data-store';
|
||||
import { BoardsServiceProvider } from '../boards/boards-service-provider';
|
||||
import { ConfigServiceClient } from '../config/config-service-client';
|
||||
import { DialogService } from '../dialog-service';
|
||||
import { SettingsService } from '../dialogs/settings/settings';
|
||||
import {
|
||||
CurrentSketch,
|
||||
SketchesServiceClientImpl,
|
||||
} from '../sketches-service-client-impl';
|
||||
import {
|
||||
SketchesService,
|
||||
FileSystemExt,
|
||||
Sketch,
|
||||
CoreService,
|
||||
CoreError,
|
||||
ResponseServiceClient,
|
||||
} from '../../common/protocol';
|
||||
import { ArduinoPreferences } from '../arduino-preferences';
|
||||
import { FrontendApplicationStateService } from '@theia/core/lib/browser/frontend-application-state';
|
||||
import { nls } from '@theia/core';
|
||||
import { OutputChannelManager } from '../theia/output/output-channel';
|
||||
import { ClipboardService } from '@theia/core/lib/browser/clipboard-service';
|
||||
import { ExecuteWithProgress } from '../../common/protocol/progressible';
|
||||
import { BoardsServiceProvider } from '../boards/boards-service-provider';
|
||||
import { BoardsDataStore } from '../boards/boards-data-store';
|
||||
import { NotificationManager } from '@theia/messages/lib/browser/notifications-manager';
|
||||
import { MessageType } from '@theia/core/lib/common/message-service-protocol';
|
||||
import { WorkspaceService } from '../theia/workspace/workspace-service';
|
||||
import { MainMenuManager } from '../../common/main-menu-manager';
|
||||
import { ConfigServiceClient } from '../config/config-service-client';
|
||||
import { ApplicationShell } from '@theia/core/lib/browser/shell/application-shell';
|
||||
import { DialogService } from '../dialog-service';
|
||||
import { ApplicationConnectionStatusContribution } from '../theia/core/connection-status-service';
|
||||
import { OutputChannelManager } from '../theia/output/output-channel';
|
||||
import { WorkspaceService } from '../theia/workspace/workspace-service';
|
||||
|
||||
export {
|
||||
Command,
|
||||
CommandRegistry,
|
||||
MenuModelRegistry,
|
||||
KeybindingRegistry,
|
||||
MenuModelRegistry,
|
||||
Sketch,
|
||||
TabBarToolbarRegistry,
|
||||
URI,
|
||||
Sketch,
|
||||
open,
|
||||
};
|
||||
|
||||
@@ -247,6 +253,12 @@ export abstract class CoreServiceContribution extends SketchContribution {
|
||||
}
|
||||
|
||||
protected handleError(error: unknown): void {
|
||||
if (isObject(error) && UserAbortApplicationError.is(error)) {
|
||||
this.outputChannelManager
|
||||
.getChannel('Arduino')
|
||||
.appendLine(userAbort, OutputChannelSeverity.Warning);
|
||||
return;
|
||||
}
|
||||
this.tryToastErrorMessage(error);
|
||||
}
|
||||
|
||||
@@ -293,7 +305,13 @@ export abstract class CoreServiceContribution extends SketchContribution {
|
||||
protected async doWithProgress<T>(options: {
|
||||
progressText: string;
|
||||
keepOutput?: boolean;
|
||||
task: (progressId: string, coreService: CoreService) => Promise<T>;
|
||||
task: (
|
||||
progressId: string,
|
||||
coreService: CoreService,
|
||||
cancellationToken?: CancellationToken
|
||||
) => Promise<T>;
|
||||
// false by default
|
||||
cancelable?: boolean;
|
||||
}): Promise<T> {
|
||||
const toDisposeOnComplete = new DisposableCollection(
|
||||
this.maybeActivateMonitorWidget()
|
||||
@@ -306,8 +324,10 @@ export abstract class CoreServiceContribution extends SketchContribution {
|
||||
messageService: this.messageService,
|
||||
responseService: this.responseService,
|
||||
progressText,
|
||||
run: ({ progressId }) => task(progressId, this.coreService),
|
||||
run: ({ progressId, cancellationToken }) =>
|
||||
task(progressId, this.coreService, cancellationToken),
|
||||
keepOutput,
|
||||
cancelable: options.cancelable,
|
||||
});
|
||||
toDisposeOnComplete.dispose();
|
||||
return result;
|
||||
|
@@ -289,8 +289,8 @@ export class Debug
|
||||
): Promise<boolean> {
|
||||
if (err instanceof Error) {
|
||||
try {
|
||||
const tempBuildPaths = await this.sketchesService.tempBuildPath(sketch);
|
||||
return tempBuildPaths.some((tempBuildPath) =>
|
||||
const buildPaths = await this.sketchesService.getBuildPath(sketch);
|
||||
return buildPaths.some((tempBuildPath) =>
|
||||
err.message.includes(tempBuildPath)
|
||||
);
|
||||
} catch {
|
||||
@@ -398,12 +398,9 @@ export async function isDebugEnabled(
|
||||
`Failed to append boards config to the FQBN. Original FQBN was: ${fqbn}`
|
||||
);
|
||||
}
|
||||
if (!data.selectedProgrammer) {
|
||||
throw new Error(noProgrammerSelectedFor(board.name));
|
||||
}
|
||||
const params = {
|
||||
fqbn: fqbnWithConfig,
|
||||
programmer: data.selectedProgrammer.id,
|
||||
programmer: data.selectedProgrammer?.id,
|
||||
};
|
||||
try {
|
||||
const debugFqbn = await checkDebugEnabled(params);
|
||||
@@ -443,13 +440,3 @@ export function debuggingNotSupported(boardName: string): string {
|
||||
boardName
|
||||
);
|
||||
}
|
||||
/**
|
||||
* (non-API)
|
||||
*/
|
||||
export function noProgrammerSelectedFor(boardName: string): string {
|
||||
return nls.localize(
|
||||
'arduino/debug/noProgrammerSelectedFor',
|
||||
"No programmer selected for '{0}'",
|
||||
boardName
|
||||
);
|
||||
}
|
||||
|
@@ -16,6 +16,10 @@ export class IndexesUpdateProgress extends Contribution {
|
||||
| undefined;
|
||||
|
||||
override onStart(): void {
|
||||
if (process.env.IS_LIGHT_VERSION) {
|
||||
return;
|
||||
}
|
||||
|
||||
this.notificationCenter.onIndexUpdateWillStart(({ progressId }) =>
|
||||
this.getOrCreateProgress(progressId)
|
||||
);
|
||||
|
@@ -9,7 +9,6 @@ import {
|
||||
BoardIdentifier,
|
||||
BoardsService,
|
||||
ExecutableService,
|
||||
assertSanitizedFqbn,
|
||||
isBoardIdentifierChangeEvent,
|
||||
sanitizeFqbn,
|
||||
} from '../../common/protocol';
|
||||
@@ -114,6 +113,10 @@ export class InoLanguage extends SketchContribution {
|
||||
private languageServerFqbn?: string;
|
||||
|
||||
override onReady(): void {
|
||||
if (process.env.IS_LIGHT_VERSION) {
|
||||
return;
|
||||
}
|
||||
|
||||
const start = (
|
||||
selectedBoard: BoardIdentifier | undefined,
|
||||
forceStart = false
|
||||
@@ -159,14 +162,11 @@ export class InoLanguage extends SketchContribution {
|
||||
this.notificationCenter.onDidReinitialize(() => forceRestart()),
|
||||
this.boardDataStore.onDidChange((event) => {
|
||||
if (this.languageServerFqbn) {
|
||||
const sanitizedFqbn = sanitizeFqbn(this.languageServerFqbn);
|
||||
if (!sanitizeFqbn) {
|
||||
throw new Error(
|
||||
`Failed to sanitize the FQBN of the running language server. FQBN with the board settings was: ${this.languageServerFqbn}`
|
||||
);
|
||||
}
|
||||
const sanitizedFQBN = sanitizeFqbn(this.languageServerFqbn);
|
||||
// The incoming FQBNs might contain custom boards configs, sanitize them before the comparison.
|
||||
// https://github.com/arduino/arduino-ide/pull/2113#pullrequestreview-1499998328
|
||||
const matchingChange = event.changes.find(
|
||||
(change) => change.fqbn === sanitizedFqbn
|
||||
(change) => sanitizedFQBN === sanitizeFqbn(change.fqbn)
|
||||
);
|
||||
const { boardsConfig } = this.boardsServiceProvider;
|
||||
if (
|
||||
@@ -195,12 +195,12 @@ export class InoLanguage extends SketchContribution {
|
||||
name: string | undefined,
|
||||
forceStart = false
|
||||
): Promise<void> {
|
||||
const port = await this.daemon.tryGetPort();
|
||||
if (!port) {
|
||||
if (process.env.IS_LIGHT_VERSION) {
|
||||
return;
|
||||
}
|
||||
const portNumber = Number.parseInt(port, 10); // TODO: IDE2 APIs should provide a number and not string
|
||||
if (Number.isNaN(portNumber)) {
|
||||
|
||||
const port = await this.daemon.tryGetPort();
|
||||
if (typeof port !== 'number') {
|
||||
return;
|
||||
}
|
||||
const release = await this.languageServerStartMutex.acquire();
|
||||
@@ -232,7 +232,6 @@ export class InoLanguage extends SketchContribution {
|
||||
}
|
||||
return;
|
||||
}
|
||||
assertSanitizedFqbn(fqbn);
|
||||
const fqbnWithConfig = await this.boardDataStore.appendConfigToFqbn(fqbn);
|
||||
if (!fqbnWithConfig) {
|
||||
throw new Error(
|
||||
@@ -280,7 +279,7 @@ export class InoLanguage extends SketchContribution {
|
||||
lsPath,
|
||||
daemonAddress: {
|
||||
hostname: 'localhost',
|
||||
port: portNumber,
|
||||
port,
|
||||
instance: 1, // TODO: get it from the backend
|
||||
},
|
||||
clangdPath,
|
||||
|
@@ -45,6 +45,10 @@ export class UpdateIndexes extends Contribution {
|
||||
}
|
||||
|
||||
private async checkForUpdates(): Promise<void> {
|
||||
if (process.env.IS_LIGHT_VERSION) {
|
||||
return;
|
||||
}
|
||||
|
||||
const checkForUpdates = this.preferences['arduino.checkForUpdates'];
|
||||
if (!checkForUpdates) {
|
||||
console.debug(
|
||||
@@ -83,6 +87,10 @@ export class UpdateIndexes extends Contribution {
|
||||
types: IndexType[],
|
||||
force = false
|
||||
): Promise<void> {
|
||||
if (process.env.IS_LIGHT_VERSION) {
|
||||
return;
|
||||
}
|
||||
|
||||
const updatedAt = new Date().toISOString();
|
||||
return Promise.all(
|
||||
types.map((type) => this.needsIndexUpdate(type, updatedAt, force))
|
||||
@@ -104,6 +112,10 @@ export class UpdateIndexes extends Contribution {
|
||||
now: string,
|
||||
force = false
|
||||
): Promise<IndexType | false> {
|
||||
if (process.env.IS_LIGHT_VERSION) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (force) {
|
||||
console.debug(
|
||||
`[update-indexes]: Update for index type: '${type}' was forcefully requested.`
|
||||
|
@@ -1,7 +1,8 @@
|
||||
import { Emitter } from '@theia/core/lib/common/event';
|
||||
import { nls } from '@theia/core/lib/common/nls';
|
||||
import { inject, injectable } from '@theia/core/shared/inversify';
|
||||
import { CoreService, sanitizeFqbn } from '../../common/protocol';
|
||||
import { FQBN } from 'fqbn';
|
||||
import { CoreService } from '../../common/protocol';
|
||||
import { ArduinoMenus } from '../menu/arduino-menus';
|
||||
import { CurrentSketch } from '../sketches-service-client-impl';
|
||||
import { ArduinoToolbar } from '../toolbar/arduino-toolbar';
|
||||
@@ -103,6 +104,7 @@ export class UploadSketch extends CoreServiceContribution {
|
||||
}
|
||||
|
||||
try {
|
||||
const autoVerify = this.preferences['arduino.upload.autoVerify'];
|
||||
// toggle the toolbar button and menu item state.
|
||||
// uploadInProgress will be set to false whether the upload fails or not
|
||||
this.uploadInProgress = true;
|
||||
@@ -115,7 +117,7 @@ export class UploadSketch extends CoreServiceContribution {
|
||||
'arduino-verify-sketch',
|
||||
<VerifySketchParams>{
|
||||
exportBinaries: false,
|
||||
silent: true,
|
||||
mode: autoVerify ? 'auto' : 'dry-run',
|
||||
}
|
||||
);
|
||||
if (!verifyOptions) {
|
||||
@@ -126,6 +128,7 @@ export class UploadSketch extends CoreServiceContribution {
|
||||
usingProgrammer,
|
||||
verifyOptions
|
||||
);
|
||||
|
||||
if (!uploadOptions) {
|
||||
return;
|
||||
}
|
||||
@@ -136,10 +139,37 @@ export class UploadSketch extends CoreServiceContribution {
|
||||
|
||||
const uploadResponse = await this.doWithProgress({
|
||||
progressText: nls.localize('arduino/sketch/uploading', 'Uploading...'),
|
||||
task: (progressId, coreService) =>
|
||||
coreService.upload({ ...uploadOptions, progressId }),
|
||||
task: async (progressId, coreService, token) => {
|
||||
try {
|
||||
return await coreService.upload(
|
||||
{ ...uploadOptions, progressId },
|
||||
token
|
||||
);
|
||||
} catch (err) {
|
||||
if (err.code === 4005) {
|
||||
const uploadWithProgrammerOptions = await this.uploadOptions(
|
||||
true,
|
||||
verifyOptions
|
||||
);
|
||||
if (uploadWithProgrammerOptions) {
|
||||
return coreService.upload(
|
||||
{ ...uploadWithProgrammerOptions, progressId },
|
||||
token
|
||||
);
|
||||
}
|
||||
} else {
|
||||
throw err;
|
||||
}
|
||||
}
|
||||
},
|
||||
keepOutput: true,
|
||||
cancelable: true,
|
||||
});
|
||||
|
||||
if (!uploadResponse) {
|
||||
return;
|
||||
}
|
||||
|
||||
// the port update is NOOP if nothing has changed
|
||||
this.boardsServiceProvider.updateConfig(uploadResponse.portAfterUpload);
|
||||
|
||||
@@ -172,7 +202,11 @@ export class UploadSketch extends CoreServiceContribution {
|
||||
const [fqbn, { selectedProgrammer: programmer }, verify, verbose] =
|
||||
await Promise.all([
|
||||
verifyOptions.fqbn, // already decorated FQBN
|
||||
this.boardsDataStore.getData(sanitizeFqbn(verifyOptions.fqbn)),
|
||||
this.boardsDataStore.getData(
|
||||
verifyOptions.fqbn
|
||||
? new FQBN(verifyOptions.fqbn).toString(true)
|
||||
: undefined
|
||||
),
|
||||
this.preferences.get('arduino.upload.verify'),
|
||||
this.preferences.get('arduino.upload.verbose'),
|
||||
]);
|
||||
|
@@ -1,37 +1,49 @@
|
||||
import { inject, injectable } from '@theia/core/shared/inversify';
|
||||
import { Emitter } from '@theia/core/lib/common/event';
|
||||
import { nls } from '@theia/core/lib/common/nls';
|
||||
import { inject, injectable } from '@theia/core/shared/inversify';
|
||||
import type { CoreService } from '../../common/protocol';
|
||||
import { ArduinoMenus } from '../menu/arduino-menus';
|
||||
import { CurrentSketch } from '../sketches-service-client-impl';
|
||||
import { ArduinoToolbar } from '../toolbar/arduino-toolbar';
|
||||
import {
|
||||
CoreServiceContribution,
|
||||
Command,
|
||||
CommandRegistry,
|
||||
MenuModelRegistry,
|
||||
CoreServiceContribution,
|
||||
KeybindingRegistry,
|
||||
MenuModelRegistry,
|
||||
TabBarToolbarRegistry,
|
||||
} from './contribution';
|
||||
import { nls } from '@theia/core/lib/common';
|
||||
import { CurrentSketch } from '../sketches-service-client-impl';
|
||||
import { CoreService } from '../../common/protocol';
|
||||
import { CoreErrorHandler } from './core-error-handler';
|
||||
|
||||
export type VerifySketchMode =
|
||||
/**
|
||||
* When the user explicitly triggers the verify command from the primary UI: menu, toolbar, or keybinding. The UI shows the output, updates the toolbar items state, etc.
|
||||
*/
|
||||
| 'explicit'
|
||||
/**
|
||||
* When the verify phase automatically runs as part of the upload but there is no UI indication of the command: the toolbar items do not update.
|
||||
*/
|
||||
| 'auto'
|
||||
/**
|
||||
* The verify does not run. There is no UI indication of the command. For example, when the user decides to disable the auto verify (`'arduino.upload.autoVerify'`) to skips the code recompilation phase.
|
||||
*/
|
||||
| 'dry-run';
|
||||
|
||||
export interface VerifySketchParams {
|
||||
/**
|
||||
* Same as `CoreService.Options.Compile#exportBinaries`
|
||||
*/
|
||||
readonly exportBinaries?: boolean;
|
||||
/**
|
||||
* If `true`, there won't be any UI indication of the verify command in the toolbar. It's `false` by default.
|
||||
* The mode specifying how verify should run. It's `'explicit'` by default.
|
||||
*/
|
||||
readonly silent?: boolean;
|
||||
readonly mode?: VerifySketchMode;
|
||||
}
|
||||
|
||||
/**
|
||||
* - `"idle"` when neither verify, nor upload is running,
|
||||
* - `"explicit-verify"` when only verify is running triggered by the user, and
|
||||
* - `"automatic-verify"` is when the automatic verify phase is running as part of an upload triggered by the user.
|
||||
* - `"idle"` when neither verify, nor upload is running
|
||||
*/
|
||||
type VerifyProgress = 'idle' | 'explicit-verify' | 'automatic-verify';
|
||||
type VerifyProgress = 'idle' | VerifySketchMode;
|
||||
|
||||
@injectable()
|
||||
export class VerifySketch extends CoreServiceContribution {
|
||||
@@ -54,10 +66,10 @@ export class VerifySketch extends CoreServiceContribution {
|
||||
registry.registerCommand(VerifySketch.Commands.VERIFY_SKETCH_TOOLBAR, {
|
||||
isVisible: (widget) =>
|
||||
ArduinoToolbar.is(widget) && widget.side === 'left',
|
||||
isEnabled: () => this.verifyProgress !== 'explicit-verify',
|
||||
isEnabled: () => this.verifyProgress !== 'explicit',
|
||||
// toggled only when verify is running, but not toggled when automatic verify is running before the upload
|
||||
// https://github.com/arduino/arduino-ide/pull/1750#pullrequestreview-1214762975
|
||||
isToggled: () => this.verifyProgress === 'explicit-verify',
|
||||
isToggled: () => this.verifyProgress === 'explicit',
|
||||
execute: () =>
|
||||
registry.executeCommand(VerifySketch.Commands.VERIFY_SKETCH.id),
|
||||
});
|
||||
@@ -113,29 +125,36 @@ export class VerifySketch extends CoreServiceContribution {
|
||||
}
|
||||
|
||||
try {
|
||||
this.verifyProgress = params?.silent
|
||||
? 'automatic-verify'
|
||||
: 'explicit-verify';
|
||||
this.verifyProgress = params?.mode ?? 'explicit';
|
||||
this.onDidChangeEmitter.fire();
|
||||
this.menuManager.update();
|
||||
this.clearVisibleNotification();
|
||||
this.coreErrorHandler.reset();
|
||||
const dryRun = this.verifyProgress === 'dry-run';
|
||||
|
||||
const options = await this.options(params?.exportBinaries);
|
||||
if (!options) {
|
||||
return undefined;
|
||||
}
|
||||
|
||||
if (dryRun) {
|
||||
return options;
|
||||
}
|
||||
|
||||
await this.doWithProgress({
|
||||
progressText: nls.localize(
|
||||
'arduino/sketch/compile',
|
||||
'Compiling sketch...'
|
||||
),
|
||||
task: (progressId, coreService) =>
|
||||
coreService.compile({
|
||||
...options,
|
||||
progressId,
|
||||
}),
|
||||
task: (progressId, coreService, token) =>
|
||||
coreService.compile(
|
||||
{
|
||||
...options,
|
||||
progressId,
|
||||
},
|
||||
token
|
||||
),
|
||||
cancelable: true,
|
||||
});
|
||||
this.messageService.info(
|
||||
nls.localize('arduino/sketch/doneCompiling', 'Done compiling.'),
|
||||
|
@@ -509,11 +509,19 @@ export class CreateApi {
|
||||
|
||||
private async headers(): Promise<Record<string, string>> {
|
||||
const token = await this.token();
|
||||
return {
|
||||
const headers: Record<string, string> = {
|
||||
'content-type': 'application/json',
|
||||
accept: 'application/json',
|
||||
authorization: `Bearer ${token}`,
|
||||
};
|
||||
|
||||
const sharedSpaceID =
|
||||
this.arduinoPreferences['arduino.cloud.sharedSpaceID'];
|
||||
if (sharedSpaceID) {
|
||||
headers['x-organization'] = sharedSpaceID;
|
||||
}
|
||||
|
||||
return headers;
|
||||
}
|
||||
|
||||
private domain(apiVersion = 'v2'): string {
|
||||
|
@@ -17,6 +17,7 @@ import {
|
||||
} from '../../../common/protocol/ide-updater';
|
||||
import { LocalStorageService } from '@theia/core/lib/browser';
|
||||
import { WindowService } from '@theia/core/lib/browser/window/window-service';
|
||||
import { sanitize } from 'dompurify';
|
||||
|
||||
@injectable()
|
||||
export class IDEUpdaterDialogProps extends DialogProps {}
|
||||
@@ -165,6 +166,51 @@ export class IDEUpdaterDialog extends ReactDialog<UpdateInfo | undefined> {
|
||||
goToDownloadPageButton.focus();
|
||||
}
|
||||
|
||||
private appendDonateFooter() {
|
||||
const footer = document.createElement('div');
|
||||
footer.classList.add('ide-updater-dialog--footer');
|
||||
const footerContent = document.createElement('div');
|
||||
footerContent.classList.add('ide-updater-dialog--footer-content');
|
||||
footer.appendChild(footerContent);
|
||||
|
||||
const footerLink = document.createElement('a');
|
||||
footerLink.innerText = sanitize(
|
||||
nls.localize('arduino/ide-updater/donateLinkText', 'donate to support us')
|
||||
);
|
||||
footerLink.classList.add('ide-updater-dialog--footer-link');
|
||||
footerLink.onclick = () =>
|
||||
this.openExternal('https://www.arduino.cc/en/donate');
|
||||
|
||||
const footerLinkIcon = document.createElement('span');
|
||||
footerLinkIcon.title = nls.localize(
|
||||
'arduino/ide-updater/donateLinkIconTitle',
|
||||
'open donation page'
|
||||
);
|
||||
footerLinkIcon.classList.add('ide-updater-dialog--footer-link-icon');
|
||||
footerLink.appendChild(footerLinkIcon);
|
||||
|
||||
const placeholderKey = '%%link%%';
|
||||
const footerText = sanitize(
|
||||
nls.localize(
|
||||
'arduino/ide-updater/donateText',
|
||||
'Open source is love, {0}',
|
||||
placeholderKey
|
||||
)
|
||||
);
|
||||
const placeholder = footerText.indexOf(placeholderKey);
|
||||
if (placeholder !== -1) {
|
||||
const parts = footerText.split(placeholderKey);
|
||||
footerContent.appendChild(document.createTextNode(parts[0]));
|
||||
footerContent.appendChild(footerLink);
|
||||
footerContent.appendChild(document.createTextNode(parts[1]));
|
||||
} else {
|
||||
footerContent.appendChild(document.createTextNode(footerText));
|
||||
footerContent.appendChild(footerLink);
|
||||
}
|
||||
|
||||
this.controlPanel.insertAdjacentElement('afterend', footer);
|
||||
}
|
||||
|
||||
private openDownloadPage(): void {
|
||||
this.openExternal('https://www.arduino.cc/en/software');
|
||||
this.close();
|
||||
@@ -187,6 +233,7 @@ export class IDEUpdaterDialog extends ReactDialog<UpdateInfo | undefined> {
|
||||
downloadStarted: true,
|
||||
});
|
||||
this.clearButtons();
|
||||
this.appendDonateFooter();
|
||||
this.updater.downloadUpdate();
|
||||
}
|
||||
|
||||
|
@@ -0,0 +1,107 @@
|
||||
import React from '@theia/core/shared/react';
|
||||
import { inject, injectable } from '@theia/core/shared/inversify';
|
||||
import { Message } from '@theia/core/shared/@phosphor/messaging';
|
||||
import { ReactDialog } from '../theia/dialogs/dialogs';
|
||||
import { nls } from '@theia/core';
|
||||
import { DialogProps } from '@theia/core/lib/browser';
|
||||
import { WindowService } from '@theia/core/lib/browser/window/window-service';
|
||||
import { AppService } from '../app-service';
|
||||
import { sanitize } from 'dompurify';
|
||||
|
||||
@injectable()
|
||||
export class VersionWelcomeDialogProps extends DialogProps {}
|
||||
|
||||
@injectable()
|
||||
export class VersionWelcomeDialog extends ReactDialog<void> {
|
||||
@inject(AppService)
|
||||
private readonly appService: AppService;
|
||||
|
||||
@inject(WindowService)
|
||||
private readonly windowService: WindowService;
|
||||
|
||||
constructor(
|
||||
@inject(VersionWelcomeDialogProps)
|
||||
protected override readonly props: VersionWelcomeDialogProps
|
||||
) {
|
||||
super({
|
||||
title: nls.localize(
|
||||
'arduino/versionWelcome/title',
|
||||
'Welcome to a new version of the Arduino IDE!'
|
||||
),
|
||||
});
|
||||
this.node.id = 'version-welcome-dialog-container';
|
||||
this.contentNode.classList.add('version-welcome-dialog');
|
||||
}
|
||||
|
||||
protected render(): React.ReactNode {
|
||||
return (
|
||||
<div>
|
||||
<p>
|
||||
{nls.localize(
|
||||
'arduino/versionWelcome/donateMessage',
|
||||
'Arduino is committed to keeping software free and open-source for everyone. Your donation helps us develop new features, improve libraries, and support millions of users worldwide.'
|
||||
)}
|
||||
</p>
|
||||
<p className="bold">
|
||||
{nls.localize(
|
||||
'arduino/versionWelcome/donateMessage2',
|
||||
'Please consider supporting our work on the free open source Arduino IDE.'
|
||||
)}
|
||||
</p>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
override get value(): void {
|
||||
return;
|
||||
}
|
||||
|
||||
private appendButtons(): void {
|
||||
const cancelButton = this.createButton(
|
||||
nls.localize('arduino/versionWelcome/cancelButton', 'Maybe later')
|
||||
);
|
||||
cancelButton.classList.add('secondary');
|
||||
cancelButton.classList.add('cancel-button');
|
||||
this.addAction(cancelButton, this.close.bind(this), 'click');
|
||||
this.controlPanel.appendChild(cancelButton);
|
||||
|
||||
const donateButton = this.createButton(
|
||||
nls.localize('arduino/versionWelcome/donateButton', 'Donate now')
|
||||
);
|
||||
this.addAction(donateButton, this.onDonateButtonClick.bind(this), 'click');
|
||||
this.controlPanel.appendChild(donateButton);
|
||||
donateButton.focus();
|
||||
}
|
||||
|
||||
private onDonateButtonClick(): void {
|
||||
this.openDonationPage();
|
||||
this.close();
|
||||
}
|
||||
|
||||
private readonly openDonationPage = () => {
|
||||
const url = 'https://www.arduino.cc/en/donate';
|
||||
this.windowService.openNewWindow(url, { external: true });
|
||||
};
|
||||
|
||||
private async updateTitleVersion(): Promise<void> {
|
||||
const appInfo = await this.appService.info();
|
||||
const { appVersion } = appInfo;
|
||||
|
||||
if (appVersion) {
|
||||
this.titleNode.innerText = sanitize(
|
||||
nls.localize(
|
||||
'arduino/versionWelcome/titleWithVersion',
|
||||
'Welcome to the new Arduino IDE {0}!',
|
||||
appVersion
|
||||
)
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
protected override onAfterAttach(msg: Message): void {
|
||||
this.update();
|
||||
this.appendButtons();
|
||||
this.updateTitleVersion();
|
||||
super.onAfterAttach(msg);
|
||||
}
|
||||
}
|
@@ -0,0 +1,3 @@
|
||||
<svg width="12" height="11" viewBox="0 0 12 11" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M0.878141 10.6219C0.960188 10.7039 1.07147 10.75 1.1875 10.75H10.8125C10.9285 10.75 11.0398 10.7039 11.1219 10.6219C11.2039 10.5398 11.25 10.4285 11.25 10.3125V6.81252C11.25 6.69648 11.2039 6.5852 11.1219 6.50316C11.0398 6.42111 10.9285 6.37502 10.8125 6.37502C10.6965 6.37502 10.5852 6.42111 10.5031 6.50316C10.4211 6.5852 10.375 6.69648 10.375 6.81252V9.87502H1.625V1.12502H4.6875C4.80353 1.12502 4.91481 1.07892 4.99686 0.996874C5.07891 0.914827 5.125 0.803548 5.125 0.687515C5.125 0.571483 5.07891 0.460203 4.99686 0.378156C4.91481 0.296109 4.80353 0.250015 4.6875 0.250015H1.1875C1.07147 0.250015 0.960188 0.296109 0.878141 0.378156C0.796094 0.460203 0.75 0.571483 0.75 0.687515V10.3125C0.75 10.4285 0.796094 10.5398 0.878141 10.6219ZM11.25 4.62502V0.687515C11.25 0.571483 11.2039 0.460203 11.1219 0.378156C11.0398 0.296109 10.9285 0.250015 10.8125 0.250015H6.875C6.75897 0.250015 6.64769 0.296109 6.56564 0.378156C6.48359 0.460203 6.4375 0.571483 6.4375 0.687515C6.4375 0.803548 6.48359 0.914827 6.56564 0.996874C6.64769 1.07892 6.75897 1.12502 6.875 1.12502H9.75375L5.68937 5.18939C5.64837 5.23006 5.61582 5.27845 5.59361 5.33176C5.5714 5.38508 5.55996 5.44226 5.55996 5.50002C5.55996 5.55777 5.5714 5.61495 5.59361 5.66827C5.61582 5.72158 5.64837 5.76997 5.68937 5.81064C5.73005 5.85165 5.77843 5.88419 5.83175 5.90641C5.88506 5.92862 5.94224 5.94005 6 5.94005C6.05776 5.94005 6.11494 5.92862 6.16825 5.90641C6.22157 5.88419 6.26995 5.85165 6.31062 5.81064L10.375 1.74627V4.62502C10.375 4.74105 10.4211 4.85233 10.5031 4.93437C10.5852 5.01642 10.6965 5.06252 10.8125 5.06252C10.9285 5.06252 11.0398 5.01642 11.1219 4.93437C11.2039 4.85233 11.25 4.74105 11.25 4.62502Z" fill="#008184"/>
|
||||
</svg>
|
After Width: | Height: | Size: 1.8 KiB |
@@ -12,15 +12,13 @@ import {
|
||||
LibrarySearch,
|
||||
LibraryService,
|
||||
} from '../../common/protocol/library-service';
|
||||
import {
|
||||
ListWidget,
|
||||
UserAbortError,
|
||||
} from '../widgets/component-list/list-widget';
|
||||
import { ListWidget } from '../widgets/component-list/list-widget';
|
||||
import { Installable } from '../../common/protocol';
|
||||
import { ListItemRenderer } from '../widgets/component-list/list-item-renderer';
|
||||
import { nls } from '@theia/core/lib/common';
|
||||
import { LibraryFilterRenderer } from '../widgets/component-list/filter-renderer';
|
||||
import { findChildTheiaButton, splitByBoldTag } from '../utils/dom';
|
||||
import { UserAbortError } from '../../common/protocol/progressible';
|
||||
|
||||
@injectable()
|
||||
export class LibraryListWidget extends ListWidget<
|
||||
|
@@ -46,7 +46,7 @@ export class NotificationCenter
|
||||
new Emitter<ProgressMessage>();
|
||||
private readonly indexUpdateDidFailEmitter =
|
||||
new Emitter<IndexUpdateDidFailParams>();
|
||||
private readonly daemonDidStartEmitter = new Emitter<string>();
|
||||
private readonly daemonDidStartEmitter = new Emitter<number>();
|
||||
private readonly daemonDidStopEmitter = new Emitter<void>();
|
||||
private readonly configDidChangeEmitter = new Emitter<ConfigState>();
|
||||
private readonly platformDidInstallEmitter = new Emitter<{
|
||||
@@ -136,7 +136,7 @@ export class NotificationCenter
|
||||
this.indexUpdateDidFailEmitter.fire(params);
|
||||
}
|
||||
|
||||
notifyDaemonDidStart(port: string): void {
|
||||
notifyDaemonDidStart(port: number): void {
|
||||
this.daemonDidStartEmitter.fire(port);
|
||||
}
|
||||
|
||||
|
@@ -34,6 +34,37 @@
|
||||
min-width: 0;
|
||||
}
|
||||
|
||||
.ide-updater-dialog--footer {
|
||||
display: inline-block;
|
||||
margin-top: -16px;
|
||||
padding: 12px 0 24px 0;
|
||||
border-top: 1px solid var(--theia-editorWidget-border);
|
||||
}
|
||||
.ide-updater-dialog--footer-content {
|
||||
float: right;
|
||||
}
|
||||
|
||||
.ide-updater-dialog--footer-link {
|
||||
display: inline-block;
|
||||
color: var(--theia-textLink-foreground);
|
||||
font-weight: 500;
|
||||
line-height: 13px;
|
||||
}
|
||||
.ide-updater-dialog--footer-link:hover {
|
||||
color: var(--theia-textLink-foreground);
|
||||
cursor: pointer;
|
||||
}
|
||||
.ide-updater-dialog--footer-link-icon {
|
||||
display: inline-block;
|
||||
-webkit-mask: url(../icons/link-open-icon.svg) center no-repeat;
|
||||
background-color: var(--theia-textLink-foreground);
|
||||
height: 12px;
|
||||
width: 12px;
|
||||
cursor: pointer;
|
||||
transform: translateY(2px);
|
||||
margin-left: 4px;
|
||||
}
|
||||
|
||||
.ide-updater-dialog .changelog {
|
||||
color: var(--theia-editor-foreground);
|
||||
background-color: var(--theia-editor-background);
|
||||
@@ -109,6 +140,7 @@
|
||||
max-height: 100%;
|
||||
overflow: hidden;
|
||||
display: flex;
|
||||
padding-bottom: 20px !important;
|
||||
}
|
||||
|
||||
#ide-updater-dialog-container .skip-version-button {
|
||||
|
@@ -10,6 +10,7 @@
|
||||
@import "./settings-dialog.css";
|
||||
@import "./firmware-uploader-dialog.css";
|
||||
@import "./ide-updater-dialog.css";
|
||||
@import "./version-welcome-dialog.css";
|
||||
@import "./certificate-uploader-dialog.css";
|
||||
@import "./user-fields-dialog.css";
|
||||
@import "./debug.css";
|
||||
|
@@ -0,0 +1,7 @@
|
||||
#version-welcome-dialog-container > .dialogBlock {
|
||||
width: 546px;
|
||||
|
||||
.bold {
|
||||
font-weight: bold;
|
||||
}
|
||||
}
|
@@ -74,8 +74,8 @@ export class DaemonPort implements FrontendApplicationContribution {
|
||||
@inject(NotificationCenter)
|
||||
private readonly notificationCenter: NotificationCenter;
|
||||
|
||||
private readonly onPortDidChangeEmitter = new Emitter<string | undefined>();
|
||||
private _port: string | undefined;
|
||||
private readonly onPortDidChangeEmitter = new Emitter<number | undefined>();
|
||||
private _port: number | undefined;
|
||||
|
||||
onStart(): void {
|
||||
this.daemon.tryGetPort().then(
|
||||
@@ -91,15 +91,15 @@ export class DaemonPort implements FrontendApplicationContribution {
|
||||
this.onPortDidChangeEmitter.dispose();
|
||||
}
|
||||
|
||||
get port(): string | undefined {
|
||||
get port(): number | undefined {
|
||||
return this._port;
|
||||
}
|
||||
|
||||
get onDidChangePort(): Event<string | undefined> {
|
||||
get onDidChangePort(): Event<number | undefined> {
|
||||
return this.onPortDidChangeEmitter.event;
|
||||
}
|
||||
|
||||
private setPort(port: string | undefined): void {
|
||||
private setPort(port: number | undefined): void {
|
||||
const oldPort = this._port;
|
||||
this._port = port;
|
||||
if (this._port !== oldPort) {
|
||||
|
@@ -0,0 +1,241 @@
|
||||
import { LabelIcon } from '@theia/core/lib/browser/label-parser';
|
||||
import { OpenerService, open } from '@theia/core/lib/browser/opener-service';
|
||||
import { codicon } from '@theia/core/lib/browser/widgets/widget';
|
||||
import { DisposableCollection } from '@theia/core/lib/common/disposable';
|
||||
import { URI } from '@theia/core/lib/common/uri';
|
||||
import { inject, injectable } from '@theia/core/shared/inversify';
|
||||
import React from '@theia/core/shared/react';
|
||||
import { URI as CodeUri } from '@theia/core/shared/vscode-uri';
|
||||
import { TreeViewWidget as TheiaTreeViewWidget } from '@theia/plugin-ext/lib/main/browser/view/tree-view-widget';
|
||||
|
||||
// Copied back from https://github.com/eclipse-theia/theia/pull/14391
|
||||
// Remove the patching when Arduino uses Eclipse Theia >1.55.0
|
||||
// https://github.com/eclipse-theia/theia/blob/8d3c5a11af65448b6700bedd096f8d68f0675541/packages/core/src/browser/tree/tree-view-welcome-widget.tsx#L37-L54
|
||||
// https://github.com/eclipse-theia/theia/blob/8d3c5a11af65448b6700bedd096f8d68f0675541/packages/core/src/browser/tree/tree-view-welcome-widget.tsx#L146-L298
|
||||
|
||||
interface ViewWelcome {
|
||||
readonly view: string;
|
||||
readonly content: string;
|
||||
readonly when?: string;
|
||||
readonly enablement?: string;
|
||||
readonly order: number;
|
||||
}
|
||||
|
||||
export interface IItem {
|
||||
readonly welcomeInfo: ViewWelcome;
|
||||
visible: boolean;
|
||||
}
|
||||
|
||||
export interface ILink {
|
||||
readonly label: string;
|
||||
readonly href: string;
|
||||
readonly title?: string;
|
||||
}
|
||||
|
||||
type LinkedTextItem = string | ILink;
|
||||
|
||||
@injectable()
|
||||
export class TreeViewWidget extends TheiaTreeViewWidget {
|
||||
@inject(OpenerService)
|
||||
private readonly openerService: OpenerService;
|
||||
|
||||
private readonly toDisposeBeforeUpdateViewWelcomeNodes =
|
||||
new DisposableCollection();
|
||||
|
||||
protected override updateViewWelcomeNodes(): void {
|
||||
this.viewWelcomeNodes = [];
|
||||
this.toDisposeBeforeUpdateViewWelcomeNodes.dispose();
|
||||
const items = this.visibleItems.sort((a, b) => a.order - b.order);
|
||||
|
||||
const enablementKeys: Set<string>[] = [];
|
||||
// the plugin-view-registry will push the changes when there is a change in the `when` prop which controls the visibility
|
||||
// this listener is to update the enablement of the components in the view welcome
|
||||
this.toDisposeBeforeUpdateViewWelcomeNodes.push(
|
||||
this.contextService.onDidChange((event) => {
|
||||
if (enablementKeys.some((keys) => event.affects(keys))) {
|
||||
this.updateViewWelcomeNodes();
|
||||
this.update();
|
||||
}
|
||||
})
|
||||
);
|
||||
// Note: VS Code does not support the `renderSecondaryButtons` prop in welcome content either.
|
||||
for (const item of items) {
|
||||
const { content } = item;
|
||||
const enablement = isEnablementAware(item) ? item.enablement : undefined;
|
||||
const itemEnablementKeys = enablement
|
||||
? this.contextService.parseKeys(enablement)
|
||||
: undefined;
|
||||
if (itemEnablementKeys) {
|
||||
enablementKeys.push(itemEnablementKeys);
|
||||
}
|
||||
const lines = content.split('\n');
|
||||
|
||||
for (let line of lines) {
|
||||
line = line.trim();
|
||||
|
||||
if (!line) {
|
||||
continue;
|
||||
}
|
||||
|
||||
const linkedTextItems = this.parseLinkedText_patch14309(line);
|
||||
|
||||
if (
|
||||
linkedTextItems.length === 1 &&
|
||||
typeof linkedTextItems[0] !== 'string'
|
||||
) {
|
||||
const node = linkedTextItems[0];
|
||||
this.viewWelcomeNodes.push(
|
||||
this.renderButtonNode_patch14309(
|
||||
node,
|
||||
this.viewWelcomeNodes.length,
|
||||
enablement
|
||||
)
|
||||
);
|
||||
} else {
|
||||
const renderNode = (item: LinkedTextItem, index: number) =>
|
||||
typeof item == 'string'
|
||||
? this.renderTextNode_patch14309(item, index)
|
||||
: this.renderLinkNode_patch14309(item, index, enablement);
|
||||
|
||||
this.viewWelcomeNodes.push(
|
||||
<p key={`p-${this.viewWelcomeNodes.length}`}>
|
||||
{...linkedTextItems.flatMap(renderNode)}
|
||||
</p>
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private renderButtonNode_patch14309(
|
||||
node: ILink,
|
||||
lineKey: string | number,
|
||||
enablement: string | undefined
|
||||
): React.ReactNode {
|
||||
return (
|
||||
<div key={`line-${lineKey}`} className="theia-WelcomeViewButtonWrapper">
|
||||
<button
|
||||
title={node.title}
|
||||
className="theia-button theia-WelcomeViewButton"
|
||||
disabled={!this.isEnabledClick_patch14309(enablement)}
|
||||
onClick={(e) => this.openLinkOrCommand_patch14309(e, node.href)}
|
||||
>
|
||||
{node.label}
|
||||
</button>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
private renderTextNode_patch14309(
|
||||
node: string,
|
||||
textKey: string | number
|
||||
): React.ReactNode {
|
||||
return (
|
||||
<span key={`text-${textKey}`}>
|
||||
{this.labelParser
|
||||
.parse(node)
|
||||
.map((segment, index) =>
|
||||
LabelIcon.is(segment) ? (
|
||||
<span key={index} className={codicon(segment.name)} />
|
||||
) : (
|
||||
<span key={index}>{segment}</span>
|
||||
)
|
||||
)}
|
||||
</span>
|
||||
);
|
||||
}
|
||||
|
||||
private renderLinkNode_patch14309(
|
||||
node: ILink,
|
||||
linkKey: string | number,
|
||||
enablement: string | undefined
|
||||
): React.ReactNode {
|
||||
return (
|
||||
<a
|
||||
key={`link-${linkKey}`}
|
||||
className={this.getLinkClassName_patch14309(node.href, enablement)}
|
||||
title={node.title || ''}
|
||||
onClick={(e) => this.openLinkOrCommand_patch14309(e, node.href)}
|
||||
>
|
||||
{node.label}
|
||||
</a>
|
||||
);
|
||||
}
|
||||
|
||||
private getLinkClassName_patch14309(
|
||||
href: string,
|
||||
enablement: string | undefined
|
||||
): string {
|
||||
const classNames = ['theia-WelcomeViewCommandLink'];
|
||||
// Only command-backed links can be disabled. All other, https:, file: remain enabled
|
||||
if (
|
||||
href.startsWith('command:') &&
|
||||
!this.isEnabledClick_patch14309(enablement)
|
||||
) {
|
||||
classNames.push('disabled');
|
||||
}
|
||||
return classNames.join(' ');
|
||||
}
|
||||
|
||||
private isEnabledClick_patch14309(enablement: string | undefined): boolean {
|
||||
return typeof enablement === 'string'
|
||||
? this.contextService.match(enablement)
|
||||
: true;
|
||||
}
|
||||
|
||||
private openLinkOrCommand_patch14309 = (
|
||||
event: React.MouseEvent,
|
||||
value: string
|
||||
): void => {
|
||||
event.stopPropagation();
|
||||
|
||||
if (value.startsWith('command:')) {
|
||||
const command = value.replace('command:', '');
|
||||
this.commands.executeCommand(command);
|
||||
} else if (value.startsWith('file:')) {
|
||||
const uri = value.replace('file:', '');
|
||||
open(this.openerService, new URI(CodeUri.file(uri).toString()));
|
||||
} else {
|
||||
this.windowService.openNewWindow(value, { external: true });
|
||||
}
|
||||
};
|
||||
|
||||
private parseLinkedText_patch14309(text: string): LinkedTextItem[] {
|
||||
const result: LinkedTextItem[] = [];
|
||||
|
||||
const linkRegex =
|
||||
/\[([^\]]+)\]\(((?:https?:\/\/|command:|file:)[^\)\s]+)(?: (["'])(.+?)(\3))?\)/gi;
|
||||
let index = 0;
|
||||
let match: RegExpExecArray | null;
|
||||
|
||||
while ((match = linkRegex.exec(text))) {
|
||||
if (match.index - index > 0) {
|
||||
result.push(text.substring(index, match.index));
|
||||
}
|
||||
|
||||
const [, label, href, , title] = match;
|
||||
|
||||
if (title) {
|
||||
result.push({ label, href, title });
|
||||
} else {
|
||||
result.push({ label, href });
|
||||
}
|
||||
|
||||
index = match.index + match[0].length;
|
||||
}
|
||||
|
||||
if (index < text.length) {
|
||||
result.push(text.substring(index));
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
}
|
||||
|
||||
interface EnablementAware {
|
||||
readonly enablement: string | undefined;
|
||||
}
|
||||
|
||||
function isEnablementAware(arg: unknown): arg is EnablementAware {
|
||||
return !!arg && typeof arg === 'object' && 'enablement' in arg;
|
||||
}
|
@@ -2,7 +2,7 @@ import React from '@theia/core/shared/react';
|
||||
import type { ArduinoComponent } from '../../../common/protocol/arduino-component';
|
||||
import { Installable } from '../../../common/protocol/installable';
|
||||
import type { ListItemRenderer } from './list-item-renderer';
|
||||
import { UserAbortError } from './list-widget';
|
||||
import { UserAbortError } from '../../../common/protocol/progressible';
|
||||
|
||||
export class ComponentListItem<
|
||||
T extends ArduinoComponent
|
||||
|
@@ -5,7 +5,10 @@ import { CommandService } from '@theia/core/lib/common/command';
|
||||
import { MessageService } from '@theia/core/lib/common/message-service';
|
||||
import { ConfirmDialog } from '@theia/core/lib/browser/dialogs';
|
||||
import { Searchable } from '../../../common/protocol/searchable';
|
||||
import { ExecuteWithProgress } from '../../../common/protocol/progressible';
|
||||
import {
|
||||
ExecuteWithProgress,
|
||||
UserAbortError,
|
||||
} from '../../../common/protocol/progressible';
|
||||
import {
|
||||
Installable,
|
||||
libraryInstallFailed,
|
||||
@@ -13,7 +16,7 @@ import {
|
||||
} from '../../../common/protocol/installable';
|
||||
import { ArduinoComponent } from '../../../common/protocol/arduino-component';
|
||||
import { SearchBar } from './search-bar';
|
||||
import { ListWidget, UserAbortError } from './list-widget';
|
||||
import { ListWidget } from './list-widget';
|
||||
import { ComponentList } from './component-list';
|
||||
import { ListItemRenderer } from './list-item-renderer';
|
||||
import {
|
||||
|
@@ -192,10 +192,3 @@ export namespace ListWidget {
|
||||
readonly defaultSearchOptions: S;
|
||||
}
|
||||
}
|
||||
|
||||
export class UserAbortError extends Error {
|
||||
constructor(message = 'User abort') {
|
||||
super(message);
|
||||
Object.setPrototypeOf(this, UserAbortError.prototype);
|
||||
}
|
||||
}
|
||||
|
@@ -127,6 +127,9 @@ export class SketchbookTreeModel extends FileTreeModel {
|
||||
if (preferenceName === 'arduino.sketchbook.showAllFiles') {
|
||||
this.updateRoot();
|
||||
}
|
||||
if (preferenceName === 'arduino.cloud.sharedSpaceID') {
|
||||
this.updateRoot();
|
||||
}
|
||||
})
|
||||
);
|
||||
|
||||
|
@@ -39,3 +39,5 @@ export const noSketchOpened = nls.localize(
|
||||
'arduino/common/noSketchOpened',
|
||||
'No sketch opened'
|
||||
);
|
||||
|
||||
export const userAbort = nls.localize('arduino/common/userAbort', 'User abort');
|
||||
|
@@ -5,14 +5,14 @@ export interface ArduinoDaemon {
|
||||
* Returns with a promise that resolves with the port
|
||||
* of the CLI daemon when it's up and running.
|
||||
*/
|
||||
getPort(): Promise<string>;
|
||||
getPort(): Promise<number>;
|
||||
/**
|
||||
* Unlike `getPort` this method returns with a promise
|
||||
* that resolves to `undefined` when the daemon is not running.
|
||||
* Otherwise resolves to the CLI daemon port.
|
||||
*/
|
||||
tryGetPort(): Promise<string | undefined>;
|
||||
start(): Promise<string>;
|
||||
tryGetPort(): Promise<number | undefined>;
|
||||
start(): Promise<number>;
|
||||
stop(): Promise<void>;
|
||||
restart(): Promise<string>;
|
||||
restart(): Promise<number>;
|
||||
}
|
||||
|
@@ -1,4 +1,5 @@
|
||||
import { nls } from '@theia/core/lib/common/nls';
|
||||
import { FQBN } from 'fqbn';
|
||||
import type { MaybePromise } from '@theia/core/lib/common/types';
|
||||
import type URI from '@theia/core/lib/common/uri';
|
||||
import {
|
||||
@@ -66,7 +67,10 @@ export interface BoardsService
|
||||
skipPostInstall?: boolean;
|
||||
}): Promise<void>;
|
||||
getDetectedPorts(): Promise<DetectedPorts>;
|
||||
getBoardDetails(options: { fqbn: string }): Promise<BoardDetails | undefined>;
|
||||
getBoardDetails(options: {
|
||||
fqbn: string;
|
||||
forceRefresh?: boolean;
|
||||
}): Promise<BoardDetails | undefined>;
|
||||
getBoardPackage(options: {
|
||||
id: string /* TODO: change to PlatformIdentifier type? */;
|
||||
}): Promise<BoardsPackage | undefined>;
|
||||
@@ -75,6 +79,9 @@ export interface BoardsService
|
||||
}): Promise<BoardsPackage | undefined>;
|
||||
searchBoards({ query }: { query?: string }): Promise<BoardWithPackage[]>;
|
||||
getInstalledBoards(): Promise<BoardWithPackage[]>;
|
||||
/**
|
||||
* Returns with all installed platforms including the manually installed ones.
|
||||
*/
|
||||
getInstalledPlatforms(): Promise<BoardsPackage[]>;
|
||||
getBoardUserFields(options: {
|
||||
fqbn: string;
|
||||
@@ -95,7 +102,7 @@ export interface CheckDebugEnabledParams {
|
||||
* The FQBN might contain custom board config options. For example, `arduino:esp32:nano_nora:USBMode=hwcdc,option2=value2`.
|
||||
*/
|
||||
readonly fqbn: string;
|
||||
readonly programmer: string;
|
||||
readonly programmer?: string;
|
||||
}
|
||||
|
||||
export interface BoardSearch extends Searchable.Options {
|
||||
@@ -364,40 +371,6 @@ export interface ConfigOption {
|
||||
readonly values: ConfigValue[];
|
||||
}
|
||||
export namespace ConfigOption {
|
||||
/**
|
||||
* Appends the configuration options to the `fqbn` argument.
|
||||
* Throws an error if the `fqbn` does not have the `segment(':'segment)*` format.
|
||||
* The provided output format is always segment(':'segment)*(':'option'='value(','option'='value)*)?
|
||||
*/
|
||||
export function decorate(
|
||||
fqbn: string,
|
||||
configOptions: ConfigOption[]
|
||||
): string {
|
||||
if (!configOptions.length) {
|
||||
return fqbn;
|
||||
}
|
||||
|
||||
const toValue = (values: ConfigValue[]) => {
|
||||
const selectedValue = values.find(({ selected }) => selected);
|
||||
if (!selectedValue) {
|
||||
console.warn(
|
||||
`None of the config values was selected. Values were: ${JSON.stringify(
|
||||
values
|
||||
)}`
|
||||
);
|
||||
return undefined;
|
||||
}
|
||||
return selectedValue.value;
|
||||
};
|
||||
const options = configOptions
|
||||
.map(({ option, values }) => [option, toValue(values)])
|
||||
.filter(([, value]) => !!value)
|
||||
.map(([option, value]) => `${option}=${value}`)
|
||||
.join(',');
|
||||
|
||||
return `${fqbn}:${options}`;
|
||||
}
|
||||
|
||||
export class ConfigOptionError extends Error {
|
||||
constructor(message: string) {
|
||||
super(message);
|
||||
@@ -571,28 +544,13 @@ export namespace Board {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Throws an error if the `fqbn` argument is not sanitized. A sanitized FQBN has the `VENDOR:ARCHITECTURE:BOARD_ID` construct.
|
||||
*/
|
||||
export function assertSanitizedFqbn(fqbn: string): void {
|
||||
if (fqbn.split(':').length !== 3) {
|
||||
throw new Error(
|
||||
`Expected a sanitized FQBN with three segments in the following format: 'VENDOR:ARCHITECTURE:BOARD_ID'. Got ${fqbn} instead.`
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Converts the `VENDOR:ARCHITECTURE:BOARD_ID[:MENU_ID=OPTION_ID[,MENU2_ID=OPTION_ID ...]]` FQBN to
|
||||
* `VENDOR:ARCHITECTURE:BOARD_ID` format.
|
||||
* See the details of the `{build.fqbn}` entry in the [specs](https://arduino.github.io/arduino-cli/latest/platform-specification/#global-predefined-properties).
|
||||
*/
|
||||
export function sanitizeFqbn(fqbn: string | undefined): string | undefined {
|
||||
if (!fqbn) {
|
||||
return undefined;
|
||||
}
|
||||
const [vendor, arch, id] = fqbn.split(':');
|
||||
return `${vendor}:${arch}:${id}`;
|
||||
export function sanitizeFqbn(fqbn: string): string {
|
||||
return new FQBN(fqbn).sanitize().toString();
|
||||
}
|
||||
|
||||
export type PlatformIdentifier = Readonly<{ vendorId: string; arch: string }>;
|
||||
@@ -749,8 +707,8 @@ export function boardIdentifierEquals(
|
||||
return false; // TODO: This a strict now. Maybe compare name in the future.
|
||||
}
|
||||
if (left.fqbn && right.fqbn) {
|
||||
const leftFqbn = options.looseFqbn ? sanitizeFqbn(left.fqbn) : left.fqbn;
|
||||
const rightFqbn = options.looseFqbn ? sanitizeFqbn(right.fqbn) : right.fqbn;
|
||||
const leftFqbn = new FQBN(left.fqbn).toString(options.looseFqbn);
|
||||
const rightFqbn = new FQBN(right.fqbn).toString(options.looseFqbn);
|
||||
return leftFqbn === rightFqbn;
|
||||
}
|
||||
// No more Genuino hack.
|
||||
|
@@ -1,4 +1,5 @@
|
||||
import { ApplicationError } from '@theia/core/lib/common/application-error';
|
||||
import type { CancellationToken } from '@theia/core/lib/common/cancellation';
|
||||
import { nls } from '@theia/core/lib/common/nls';
|
||||
import type {
|
||||
Location,
|
||||
@@ -7,7 +8,7 @@ import type {
|
||||
} from '@theia/core/shared/vscode-languageserver-protocol';
|
||||
import type { CompileSummary as ApiCompileSummary } from 'vscode-arduino-api';
|
||||
import type { BoardUserField, Installable } from '../../common/protocol/';
|
||||
import { isPortIdentifier, PortIdentifier, Programmer } from './boards-service';
|
||||
import { PortIdentifier, Programmer, isPortIdentifier } from './boards-service';
|
||||
import type { IndexUpdateSummary } from './notification-service';
|
||||
import type { Sketch } from './sketches-service';
|
||||
|
||||
@@ -70,6 +71,7 @@ export namespace CoreError {
|
||||
Upload: 4002,
|
||||
UploadUsingProgrammer: 4003,
|
||||
BurnBootloader: 4004,
|
||||
UploadRequiresProgrammer: 4005,
|
||||
};
|
||||
export const VerifyFailed = declareCoreError(Codes.Verify);
|
||||
export const UploadFailed = declareCoreError(Codes.Upload);
|
||||
@@ -77,6 +79,10 @@ export namespace CoreError {
|
||||
Codes.UploadUsingProgrammer
|
||||
);
|
||||
export const BurnBootloaderFailed = declareCoreError(Codes.BurnBootloader);
|
||||
export const UploadRequiresProgrammer = declareCoreError(
|
||||
Codes.UploadRequiresProgrammer
|
||||
);
|
||||
|
||||
export function is(
|
||||
error: unknown
|
||||
): error is ApplicationError<number, ErrorLocation[]> {
|
||||
@@ -162,9 +168,18 @@ export function isUploadResponse(arg: unknown): arg is UploadResponse {
|
||||
export const CoreServicePath = '/services/core-service';
|
||||
export const CoreService = Symbol('CoreService');
|
||||
export interface CoreService {
|
||||
compile(options: CoreService.Options.Compile): Promise<void>;
|
||||
upload(options: CoreService.Options.Upload): Promise<UploadResponse>;
|
||||
burnBootloader(options: CoreService.Options.Bootloader): Promise<void>;
|
||||
compile(
|
||||
options: CoreService.Options.Compile,
|
||||
cancellationToken?: CancellationToken
|
||||
): Promise<void>;
|
||||
upload(
|
||||
options: CoreService.Options.Upload,
|
||||
cancellationToken?: CancellationToken
|
||||
): Promise<UploadResponse>;
|
||||
burnBootloader(
|
||||
options: CoreService.Options.Bootloader,
|
||||
cancellationToken?: CancellationToken
|
||||
): Promise<void>;
|
||||
/**
|
||||
* Refreshes the underling core gRPC client for the Arduino CLI.
|
||||
*/
|
||||
|
@@ -71,3 +71,4 @@ export interface IDEUpdaterClient {
|
||||
}
|
||||
|
||||
export const SKIP_IDE_VERSION = 'skipIDEVersion';
|
||||
export const LAST_USED_IDE_VERSION = 'lastUsedIDEVersion';
|
||||
|
@@ -51,7 +51,7 @@ export interface NotificationServiceClient {
|
||||
notifyIndexUpdateDidFail(params: IndexUpdateDidFailParams): void;
|
||||
|
||||
// Daemon
|
||||
notifyDaemonDidStart(port: string): void;
|
||||
notifyDaemonDidStart(port: number): void;
|
||||
notifyDaemonDidStop(): void;
|
||||
|
||||
// CLI config
|
||||
|
@@ -1,22 +1,48 @@
|
||||
import { ApplicationError } from '@theia/core/lib/common/application-error';
|
||||
import type { CancellationToken } from '@theia/core/lib/common/cancellation';
|
||||
import { CancellationTokenSource } from '@theia/core/lib/common/cancellation';
|
||||
import type { MessageService } from '@theia/core/lib/common/message-service';
|
||||
import type { Progress } from '@theia/core/lib/common/message-service-protocol';
|
||||
import { userAbort } from '../nls';
|
||||
import type { ResponseServiceClient } from './response-service';
|
||||
|
||||
export const UserAbortApplicationError = ApplicationError.declare(
|
||||
9999,
|
||||
(message: string, uri: string) => {
|
||||
return {
|
||||
message,
|
||||
data: { uri },
|
||||
};
|
||||
}
|
||||
);
|
||||
|
||||
export class UserAbortError extends Error {
|
||||
constructor() {
|
||||
super(userAbort);
|
||||
Object.setPrototypeOf(this, UserAbortError.prototype);
|
||||
}
|
||||
}
|
||||
|
||||
export namespace ExecuteWithProgress {
|
||||
export async function doWithProgress<T>(options: {
|
||||
run: ({ progressId }: { progressId: string }) => Promise<T>;
|
||||
run: ({
|
||||
progressId,
|
||||
cancellationToken,
|
||||
}: {
|
||||
progressId: string;
|
||||
cancellationToken?: CancellationToken;
|
||||
}) => Promise<T>;
|
||||
messageService: MessageService;
|
||||
responseService: ResponseServiceClient;
|
||||
progressText: string;
|
||||
keepOutput?: boolean;
|
||||
cancelable?: boolean;
|
||||
}): Promise<T> {
|
||||
return withProgress(
|
||||
options.progressText,
|
||||
options.messageService,
|
||||
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
||||
async (progress, _token) => {
|
||||
async (progress, token) => {
|
||||
const progressId = progress.id;
|
||||
const toDispose = options.responseService.onProgressDidChange(
|
||||
(progressMessage) => {
|
||||
@@ -30,24 +56,29 @@ export namespace ExecuteWithProgress {
|
||||
if (!options.keepOutput) {
|
||||
options.responseService.clearOutput();
|
||||
}
|
||||
const result = await options.run({ progressId });
|
||||
const result = await options.run({
|
||||
progressId,
|
||||
cancellationToken: token,
|
||||
});
|
||||
return result;
|
||||
} finally {
|
||||
toDispose.dispose();
|
||||
}
|
||||
}
|
||||
},
|
||||
options.cancelable
|
||||
);
|
||||
}
|
||||
|
||||
export async function withProgress<T>(
|
||||
text: string,
|
||||
messageService: MessageService,
|
||||
cb: (progress: Progress, token: CancellationToken) => Promise<T>
|
||||
cb: (progress: Progress, token: CancellationToken) => Promise<T>,
|
||||
cancelable = false
|
||||
): Promise<T> {
|
||||
const cancellationSource = new CancellationTokenSource();
|
||||
const { token } = cancellationSource;
|
||||
const progress = await messageService.showProgress(
|
||||
{ text, options: { cancelable: false } },
|
||||
{ text, options: { cancelable } },
|
||||
() => cancellationSource.cancel()
|
||||
);
|
||||
try {
|
||||
|
@@ -141,13 +141,14 @@ export interface SketchesService {
|
||||
/**
|
||||
* This is the JS/TS re-implementation of [`GenBuildPath`](https://github.com/arduino/arduino-cli/blob/c0d4e4407d80aabad81142693513b3306759cfa6/arduino/sketch/sketch.go#L296-L306) of the CLI.
|
||||
* Pass in a sketch and get the build temporary folder filesystem path calculated from the main sketch file location. Can be multiple ones. This method does not check the existence of the sketch.
|
||||
* Since CLI v1.1.0 the default sketch folder is the os user cache dir. See https://github.com/arduino/arduino-cli/pull/2673/commits/d2ffeb06ca6360a211d5aa7ddd11505212ffb1b9
|
||||
*
|
||||
* The case sensitivity of the drive letter on Windows matters when the CLI calculates the MD5 hash of the temporary build folder.
|
||||
* IDE2 does not know and does not want to rely on how the CLI treats the paths: with lowercase or uppercase drive letters.
|
||||
* Hence, IDE2 has to provide multiple build paths on Windows. This hack will be obsolete when the CLI can provide error codes:
|
||||
* https://github.com/arduino/arduino-cli/issues/1762.
|
||||
*/
|
||||
tempBuildPath(sketch: SketchRef): Promise<string[]>;
|
||||
getBuildPath(sketch: SketchRef): Promise<string[]>;
|
||||
}
|
||||
|
||||
export interface SketchRef {
|
||||
|
@@ -521,6 +521,8 @@ export class ElectronMainApplication extends TheiaElectronMainApplication {
|
||||
}
|
||||
|
||||
protected override async startBackend(): Promise<number> {
|
||||
// FIXME: temporary test to check improvements on low powered machines.
|
||||
process.env.IS_LIGHT_VERSION = 'true';
|
||||
// Check if we should run everything as one process.
|
||||
const noBackendFork = process.argv.indexOf('--no-cluster') !== -1;
|
||||
// We cannot use the `process.cwd()` as the application project path (the location of the `package.json` in other words)
|
||||
|
@@ -0,0 +1,53 @@
|
||||
import { credentials, makeClientConstructor } from '@grpc/grpc-js';
|
||||
import * as commandsGrpcPb from './cli-protocol/cc/arduino/cli/commands/v1/commands_grpc_pb';
|
||||
import { ArduinoCoreServiceClient } from './cli-protocol/cc/arduino/cli/commands/v1/commands_grpc_pb';
|
||||
|
||||
export interface CreateClientOptions {
|
||||
/**
|
||||
* The port to the Arduino CLI daemon.
|
||||
*/
|
||||
readonly port: number;
|
||||
/**
|
||||
* Defaults to `'localhost'`.
|
||||
*/
|
||||
readonly host?: string;
|
||||
|
||||
/**
|
||||
* gRCP channel options. Defaults to `createDefaultChannelOptions` with `'0.0.0'` `appVersion`
|
||||
*/
|
||||
readonly channelOptions?: Record<string, unknown>;
|
||||
}
|
||||
|
||||
export function createDefaultChannelOptions(
|
||||
appVersion = '0.0.0'
|
||||
): Record<string, unknown> {
|
||||
return {
|
||||
'grpc.max_send_message_length': 512 * 1024 * 1024,
|
||||
'grpc.max_receive_message_length': 512 * 1024 * 1024,
|
||||
'grpc.primary_user_agent': `arduino-ide/${appVersion}`,
|
||||
};
|
||||
}
|
||||
|
||||
export function createArduinoCoreServiceClient(
|
||||
options: CreateClientOptions
|
||||
): ArduinoCoreServiceClient {
|
||||
const {
|
||||
port,
|
||||
host = 'localhost',
|
||||
channelOptions = createDefaultChannelOptions(),
|
||||
} = options;
|
||||
const address = `${host}:${port}`;
|
||||
// https://github.com/agreatfool/grpc_tools_node_protoc_ts/blob/master/doc/grpcjs_support.md#usage
|
||||
const ArduinoCoreServiceClient = makeClientConstructor(
|
||||
// @ts-expect-error: ignore
|
||||
commandsGrpcPb['cc.arduino.cli.commands.v1.ArduinoCoreService'],
|
||||
'ArduinoCoreServiceService'
|
||||
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||||
) as any;
|
||||
const client = new ArduinoCoreServiceClient(
|
||||
address,
|
||||
credentials.createInsecure(),
|
||||
channelOptions
|
||||
) as ArduinoCoreServiceClient;
|
||||
return client;
|
||||
}
|
@@ -39,11 +39,11 @@ export class ArduinoDaemonImpl
|
||||
private readonly processUtils: ProcessUtils;
|
||||
|
||||
private readonly toDispose = new DisposableCollection();
|
||||
private readonly onDaemonStartedEmitter = new Emitter<string>();
|
||||
private readonly onDaemonStartedEmitter = new Emitter<number>();
|
||||
private readonly onDaemonStoppedEmitter = new Emitter<void>();
|
||||
|
||||
private _running = false;
|
||||
private _port = new Deferred<string>();
|
||||
private _port = new Deferred<number>();
|
||||
|
||||
// Backend application lifecycle.
|
||||
|
||||
@@ -53,18 +53,18 @@ export class ArduinoDaemonImpl
|
||||
|
||||
// Daemon API
|
||||
|
||||
async getPort(): Promise<string> {
|
||||
async getPort(): Promise<number> {
|
||||
return this._port.promise;
|
||||
}
|
||||
|
||||
async tryGetPort(): Promise<string | undefined> {
|
||||
async tryGetPort(): Promise<number | undefined> {
|
||||
if (this._running) {
|
||||
return this._port.promise;
|
||||
}
|
||||
return undefined;
|
||||
}
|
||||
|
||||
async start(): Promise<string> {
|
||||
async start(): Promise<number> {
|
||||
try {
|
||||
this.toDispose.dispose(); // This will `kill` the previously started daemon process, if any.
|
||||
const cliPath = this.getExecPath();
|
||||
@@ -101,13 +101,13 @@ export class ArduinoDaemonImpl
|
||||
this.toDispose.dispose();
|
||||
}
|
||||
|
||||
async restart(): Promise<string> {
|
||||
async restart(): Promise<number> {
|
||||
return this.start();
|
||||
}
|
||||
|
||||
// Backend only daemon API
|
||||
|
||||
get onDaemonStarted(): Event<string> {
|
||||
get onDaemonStarted(): Event<number> {
|
||||
return this.onDaemonStartedEmitter.event;
|
||||
}
|
||||
|
||||
@@ -150,11 +150,11 @@ export class ArduinoDaemonImpl
|
||||
|
||||
protected async spawnDaemonProcess(): Promise<{
|
||||
daemon: ChildProcess;
|
||||
port: string;
|
||||
port: number;
|
||||
}> {
|
||||
const args = await this.getSpawnArgs();
|
||||
const cliPath = this.getExecPath();
|
||||
const ready = new Deferred<{ daemon: ChildProcess; port: string }>();
|
||||
const ready = new Deferred<{ daemon: ChildProcess; port: number }>();
|
||||
const options = {
|
||||
env: { ...deepClone(process.env), NO_COLOR: String(true) },
|
||||
};
|
||||
@@ -195,7 +195,13 @@ export class ArduinoDaemonImpl
|
||||
|
||||
if (port.length && address.length) {
|
||||
grpcServerIsReady = true;
|
||||
ready.resolve({ daemon, port });
|
||||
const portNumber = Number.parseInt(port, 10);
|
||||
if (Number.isNaN(portNumber)) {
|
||||
ready.reject(
|
||||
new Error(`Received a NaN port from the CLI: ${port}`)
|
||||
);
|
||||
}
|
||||
ready.resolve({ daemon, port: portNumber });
|
||||
}
|
||||
}
|
||||
});
|
||||
@@ -225,7 +231,7 @@ export class ArduinoDaemonImpl
|
||||
return ready.promise;
|
||||
}
|
||||
|
||||
private fireDaemonStarted(port: string): void {
|
||||
private fireDaemonStarted(port: number): void {
|
||||
this._running = true;
|
||||
this._port.resolve(port);
|
||||
this.onDaemonStartedEmitter.fire(port);
|
||||
@@ -238,7 +244,7 @@ export class ArduinoDaemonImpl
|
||||
}
|
||||
this._running = false;
|
||||
this._port.reject(); // Reject all pending.
|
||||
this._port = new Deferred<string>();
|
||||
this._port = new Deferred<number>();
|
||||
this.onDaemonStoppedEmitter.fire();
|
||||
this.notificationService.notifyDaemonDidStop();
|
||||
}
|
||||
|
@@ -75,12 +75,7 @@ import {
|
||||
} from '../common/protocol';
|
||||
import { BackendApplication } from './theia/core/backend-application';
|
||||
import { BoardDiscovery } from './board-discovery';
|
||||
import { AuthenticationServiceImpl } from './auth/authentication-service-impl';
|
||||
import {
|
||||
AuthenticationService,
|
||||
AuthenticationServiceClient,
|
||||
AuthenticationServicePath,
|
||||
} from '../common/protocol/authentication-service';
|
||||
|
||||
import { ArduinoFirmwareUploaderImpl } from './arduino-firmware-uploader-impl';
|
||||
import { PlotterBackendContribution } from './plotter/plotter-backend-contribution';
|
||||
import { ArduinoLocalizationContribution } from './i18n/arduino-localization-contribution';
|
||||
@@ -116,12 +111,16 @@ import { MessagingContribution } from './theia/core/messaging-contribution';
|
||||
import { MessagingService } from '@theia/core/lib/node/messaging/messaging-service';
|
||||
import { HostedPluginReader } from './theia/plugin-ext/plugin-reader';
|
||||
import { HostedPluginReader as TheiaHostedPluginReader } from '@theia/plugin-ext/lib/hosted/node/plugin-reader';
|
||||
import { PluginDeployer } from '@theia/plugin-ext/lib/common/plugin-protocol';
|
||||
import {
|
||||
PluginDeployer,
|
||||
PluginScanner,
|
||||
} from '@theia/plugin-ext/lib/common/plugin-protocol';
|
||||
import {
|
||||
LocalDirectoryPluginDeployerResolverWithFallback,
|
||||
PluginDeployer_GH_12064,
|
||||
} from './theia/plugin-ext/plugin-deployer';
|
||||
import { SettingsReader } from './settings-reader';
|
||||
import { VsCodePluginScanner } from './theia/plugin-ext-vscode/scanner-vscode';
|
||||
|
||||
export default new ContainerModule((bind, unbind, isBound, rebind) => {
|
||||
bind(BackendApplication).toSelf().inSingletonScope();
|
||||
@@ -350,25 +349,25 @@ export default new ContainerModule((bind, unbind, isBound, rebind) => {
|
||||
].forEach((name) => bindChildLogger(bind, name));
|
||||
|
||||
// Cloud sketchbook bindings
|
||||
bind(AuthenticationServiceImpl).toSelf().inSingletonScope();
|
||||
bind(AuthenticationService).toService(AuthenticationServiceImpl);
|
||||
bind(BackendApplicationContribution).toService(AuthenticationServiceImpl);
|
||||
bind(ConnectionHandler)
|
||||
.toDynamicValue(
|
||||
(context) =>
|
||||
new JsonRpcConnectionHandler<AuthenticationServiceClient>(
|
||||
AuthenticationServicePath,
|
||||
(client) => {
|
||||
const server = context.container.get<AuthenticationServiceImpl>(
|
||||
AuthenticationServiceImpl
|
||||
);
|
||||
server.setClient(client);
|
||||
client.onDidCloseConnection(() => server.disposeClient(client));
|
||||
return server;
|
||||
}
|
||||
)
|
||||
)
|
||||
.inSingletonScope();
|
||||
// bind(AuthenticationServiceImpl).toSelf().inSingletonScope();
|
||||
// bind(AuthenticationService).toService(AuthenticationServiceImpl);
|
||||
// bind(BackendApplicationContribution).toService(AuthenticationServiceImpl);
|
||||
// bind(ConnectionHandler)
|
||||
// .toDynamicValue(
|
||||
// (context) =>
|
||||
// new JsonRpcConnectionHandler<AuthenticationServiceClient>(
|
||||
// AuthenticationServicePath,
|
||||
// (client) => {
|
||||
// const server = context.container.get<AuthenticationServiceImpl>(
|
||||
// AuthenticationServiceImpl
|
||||
// );
|
||||
// server.setClient(client);
|
||||
// client.onDidCloseConnection(() => server.disposeClient(client));
|
||||
// return server;
|
||||
// }
|
||||
// )
|
||||
// )
|
||||
// .inSingletonScope();
|
||||
|
||||
bind(PlotterBackendContribution).toSelf().inSingletonScope();
|
||||
bind(BackendApplicationContribution).toService(PlotterBackendContribution);
|
||||
@@ -410,6 +409,11 @@ export default new ContainerModule((bind, unbind, isBound, rebind) => {
|
||||
rebind(PluginDeployer).to(PluginDeployer_GH_12064).inSingletonScope();
|
||||
|
||||
bind(SettingsReader).toSelf().inSingletonScope();
|
||||
|
||||
// To read the enablement property of the viewsWelcome
|
||||
// https://github.com/eclipse-theia/theia/issues/14309
|
||||
bind(VsCodePluginScanner).toSelf().inSingletonScope();
|
||||
rebind(PluginScanner).toService(VsCodePluginScanner);
|
||||
});
|
||||
|
||||
function bindChildLogger(bind: interfaces.Bind, name: string): void {
|
||||
|
@@ -170,6 +170,10 @@ export class BoardDiscovery
|
||||
}
|
||||
|
||||
async start(): Promise<void> {
|
||||
if (process.env.IS_LIGHT_VERSION) {
|
||||
return;
|
||||
}
|
||||
|
||||
this.logger.info('start');
|
||||
if (this.stopping) {
|
||||
this.logger.info('start is stopping wait');
|
||||
@@ -267,24 +271,12 @@ export class BoardDiscovery
|
||||
const { port, boards } = detectedPort;
|
||||
const key = Port.keyOf(port);
|
||||
if (eventType === EventType.Add) {
|
||||
const alreadyDetectedPort = newState[key];
|
||||
if (alreadyDetectedPort) {
|
||||
console.warn(
|
||||
`Detected a new port that has been already discovered. The old value will be overridden. Old value: ${JSON.stringify(
|
||||
alreadyDetectedPort
|
||||
)}, new value: ${JSON.stringify(detectedPort)}`
|
||||
);
|
||||
}
|
||||
// Note that, the serial discovery might detect port details (such as addressLabel) in chunks.
|
||||
// For example, first, the Teensy 4.1 port is detected with the `[no_device] Triple Serial` address label,
|
||||
// Then, when more refinements are available, the same port is detected with `/dev/cu.usbmodem127902301 Triple Serial` address label.
|
||||
// In such cases, an `add` event is received from the CLI, and the the detected port is overridden in the state.
|
||||
newState[key] = { port, boards };
|
||||
} else if (eventType === EventType.Remove) {
|
||||
const alreadyDetectedPort = newState[key];
|
||||
if (!alreadyDetectedPort) {
|
||||
console.warn(
|
||||
`Detected a port removal but it has not been discovered. This is most likely a bug! Detected port was: ${JSON.stringify(
|
||||
detectedPort
|
||||
)}`
|
||||
);
|
||||
}
|
||||
delete newState[key];
|
||||
}
|
||||
}
|
||||
|
@@ -1,9 +1,9 @@
|
||||
import { ILogger } from '@theia/core/lib/common/logger';
|
||||
import { nls } from '@theia/core/lib/common/nls';
|
||||
import { notEmpty } from '@theia/core/lib/common/objects';
|
||||
import { Mutable } from '@theia/core/lib/common/types';
|
||||
import { inject, injectable } from '@theia/core/shared/inversify';
|
||||
import {
|
||||
Board,
|
||||
BoardDetails,
|
||||
BoardSearch,
|
||||
BoardUserField,
|
||||
@@ -32,11 +32,9 @@ import {
|
||||
BoardListAllResponse,
|
||||
BoardSearchRequest,
|
||||
} from './cli-protocol/cc/arduino/cli/commands/v1/board_pb';
|
||||
import { Platform } from './cli-protocol/cc/arduino/cli/commands/v1/common_pb';
|
||||
import { PlatformSummary } from './cli-protocol/cc/arduino/cli/commands/v1/common_pb';
|
||||
import {
|
||||
PlatformInstallRequest,
|
||||
PlatformListRequest,
|
||||
PlatformListResponse,
|
||||
PlatformSearchRequest,
|
||||
PlatformSearchResponse,
|
||||
PlatformUninstallRequest,
|
||||
@@ -75,7 +73,11 @@ export class BoardsServiceImpl
|
||||
|
||||
async getBoardDetails(options: {
|
||||
fqbn: string;
|
||||
forceRefresh?: boolean;
|
||||
}): Promise<BoardDetails | undefined> {
|
||||
if (options.forceRefresh) {
|
||||
await this.refresh();
|
||||
}
|
||||
const coreClient = await this.coreClient;
|
||||
const { client, instance } = coreClient;
|
||||
const { fqbn } = options;
|
||||
@@ -178,7 +180,7 @@ export class BoardsServiceImpl
|
||||
const req = new IsDebugSupportedRequest()
|
||||
.setInstance(instance)
|
||||
.setFqbn(fqbn)
|
||||
.setProgrammer(programmer);
|
||||
.setProgrammer(programmer ?? '');
|
||||
try {
|
||||
const debugFqbn = await new Promise<string>((resolve, reject) =>
|
||||
client.isDebugSupported(req, (err, resp) => {
|
||||
@@ -247,24 +249,22 @@ export class BoardsServiceImpl
|
||||
|
||||
async getInstalledPlatforms(): Promise<BoardsPackage[]> {
|
||||
const { instance, client } = await this.coreClient;
|
||||
return new Promise<BoardsPackage[]>((resolve, reject) => {
|
||||
client.platformList(
|
||||
new PlatformListRequest().setInstance(instance),
|
||||
(err, response) => {
|
||||
if (err) {
|
||||
reject(err);
|
||||
return;
|
||||
}
|
||||
resolve(
|
||||
response
|
||||
.getInstalledPlatformsList()
|
||||
.map((platform, _, installedPlatforms) =>
|
||||
toBoardsPackage(platform, installedPlatforms)
|
||||
)
|
||||
);
|
||||
}
|
||||
);
|
||||
});
|
||||
const resp = await new Promise<PlatformSearchResponse>(
|
||||
(resolve, reject) => {
|
||||
client.platformSearch(
|
||||
new PlatformSearchRequest()
|
||||
.setInstance(instance)
|
||||
.setManuallyInstalled(true), // include core manually installed to the sketchbook
|
||||
(err, resp) => (err ? reject(err) : resolve(resp))
|
||||
);
|
||||
}
|
||||
);
|
||||
const searchOutput = resp.getSearchOutputList();
|
||||
return searchOutput
|
||||
.map((message) => message.toObject(false))
|
||||
.filter((summary) => summary.installedVersion) // only installed ones
|
||||
.map(createBoardsPackage)
|
||||
.filter(notEmpty);
|
||||
}
|
||||
|
||||
private async handleListBoards(
|
||||
@@ -287,12 +287,28 @@ export class BoardsServiceImpl
|
||||
for (const board of resp.getBoardsList()) {
|
||||
const platform = board.getPlatform();
|
||||
if (platform) {
|
||||
const platformId = platform.getId();
|
||||
const metadata = platform.getMetadata();
|
||||
if (!metadata) {
|
||||
console.warn(
|
||||
`Platform metadata is missing for platform: ${JSON.stringify(
|
||||
platform.toObject(false)
|
||||
)}. Skipping`
|
||||
);
|
||||
continue;
|
||||
}
|
||||
const platformId = metadata.getId();
|
||||
const release = platform.getRelease();
|
||||
if (!release) {
|
||||
console.warn(
|
||||
`Platform release is missing for platform: ${platformId}. Skipping`
|
||||
);
|
||||
continue;
|
||||
}
|
||||
const fqbn = board.getFqbn() || undefined; // prefer undefined over empty string
|
||||
const parsedPlatformId = createPlatformIdentifier(platformId);
|
||||
if (!parsedPlatformId) {
|
||||
console.warn(
|
||||
`Could not create platform identifier from platform ID input: ${platform.getId()}. Skipping`
|
||||
`Could not create platform identifier from platform ID input: ${platformId}. Skipping`
|
||||
);
|
||||
continue;
|
||||
}
|
||||
@@ -319,8 +335,8 @@ export class BoardsServiceImpl
|
||||
name: board.getName(),
|
||||
fqbn: board.getFqbn(),
|
||||
packageId: parsedPlatformId,
|
||||
packageName: platform.getName(),
|
||||
manuallyInstalled: platform.getManuallyInstalled(),
|
||||
packageName: release.getName(),
|
||||
manuallyInstalled: metadata.getManuallyInstalled(),
|
||||
});
|
||||
}
|
||||
}
|
||||
@@ -375,89 +391,25 @@ export class BoardsServiceImpl
|
||||
const coreClient = await this.coreClient;
|
||||
const { client, instance } = coreClient;
|
||||
|
||||
const installedPlatformsReq = new PlatformListRequest();
|
||||
installedPlatformsReq.setInstance(instance);
|
||||
const installedPlatformsResp = await new Promise<PlatformListResponse>(
|
||||
(resolve, reject) => {
|
||||
client.platformList(installedPlatformsReq, (err, resp) => {
|
||||
!!err ? reject(err) : resolve(resp);
|
||||
});
|
||||
}
|
||||
);
|
||||
const installedPlatforms =
|
||||
installedPlatformsResp.getInstalledPlatformsList();
|
||||
|
||||
const req = new PlatformSearchRequest();
|
||||
req.setSearchArgs(options.query || '');
|
||||
req.setAllVersions(true);
|
||||
req.setInstance(instance);
|
||||
// `core search` returns with all platform versions when the command is executed via gRPC or with `--format json`
|
||||
// The `--all` flag is applicable only when filtering for the human-readable (`--format text`) output of the CLI
|
||||
const resp = await new Promise<PlatformSearchResponse>(
|
||||
(resolve, reject) => {
|
||||
client.platformSearch(req, (err, resp) => {
|
||||
!!err ? reject(err) : resolve(resp);
|
||||
});
|
||||
client.platformSearch(
|
||||
new PlatformSearchRequest()
|
||||
.setInstance(instance)
|
||||
.setSearchArgs(options.query ?? ''),
|
||||
(err, resp) => (err ? reject(err) : resolve(resp))
|
||||
);
|
||||
}
|
||||
);
|
||||
const packages = new Map<string, BoardsPackage>();
|
||||
// We must group the cores by ID, and sort platforms by, first the installed version, then version alphabetical order.
|
||||
// Otherwise we lose the FQBN information.
|
||||
const groupedById: Map<string, Platform[]> = new Map();
|
||||
for (const platform of resp.getSearchOutputList()) {
|
||||
const id = platform.getId();
|
||||
const idGroup = groupedById.get(id);
|
||||
if (idGroup) {
|
||||
idGroup.push(platform);
|
||||
} else {
|
||||
groupedById.set(id, [platform]);
|
||||
}
|
||||
}
|
||||
const installedAwareVersionComparator = (
|
||||
left: Platform,
|
||||
right: Platform
|
||||
) => {
|
||||
// XXX: we cannot rely on `platform.getInstalled()`, it is always an empty string.
|
||||
const leftInstalled = !!installedPlatforms.find(
|
||||
(ip) =>
|
||||
ip.getId() === left.getId() && ip.getInstalled() === left.getLatest()
|
||||
);
|
||||
const rightInstalled = !!installedPlatforms.find(
|
||||
(ip) =>
|
||||
ip.getId() === right.getId() &&
|
||||
ip.getInstalled() === right.getLatest()
|
||||
);
|
||||
if (leftInstalled && !rightInstalled) {
|
||||
return -1;
|
||||
}
|
||||
if (!leftInstalled && rightInstalled) {
|
||||
return 1;
|
||||
}
|
||||
|
||||
const invertedVersionComparator =
|
||||
Installable.Version.COMPARATOR(left.getLatest(), right.getLatest()) *
|
||||
-1;
|
||||
// Higher version comes first.
|
||||
|
||||
return invertedVersionComparator;
|
||||
};
|
||||
for (const value of groupedById.values()) {
|
||||
value.sort(installedAwareVersionComparator);
|
||||
}
|
||||
|
||||
for (const value of groupedById.values()) {
|
||||
for (const platform of value) {
|
||||
const id = platform.getId();
|
||||
const pkg = packages.get(id);
|
||||
if (pkg) {
|
||||
pkg.availableVersions.push(platform.getLatest());
|
||||
pkg.availableVersions.sort(Installable.Version.COMPARATOR).reverse();
|
||||
} else {
|
||||
packages.set(id, toBoardsPackage(platform, installedPlatforms));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
const filter = this.typePredicate(options);
|
||||
const boardsPackages = [...packages.values()].filter(filter);
|
||||
const typeFilter = this.typePredicate(options);
|
||||
const searchOutput = resp.getSearchOutputList();
|
||||
const boardsPackages = searchOutput
|
||||
.map((message) => message.toObject(false))
|
||||
.map(createBoardsPackage)
|
||||
.filter(notEmpty)
|
||||
.filter(typeFilter);
|
||||
return sortComponents(boardsPackages, boardsPackageSortGroup);
|
||||
}
|
||||
|
||||
@@ -624,36 +576,52 @@ function boardsPackageSortGroup(boardsPackage: BoardsPackage): SortGroup {
|
||||
return types.join('-') as SortGroup;
|
||||
}
|
||||
|
||||
function toBoardsPackage(
|
||||
platform: Platform,
|
||||
installedPlatforms: Platform[]
|
||||
): BoardsPackage {
|
||||
let installedVersion: string | undefined;
|
||||
const matchingPlatform = installedPlatforms.find(
|
||||
(ip) => ip.getId() === platform.getId()
|
||||
);
|
||||
if (!!matchingPlatform) {
|
||||
installedVersion = matchingPlatform.getInstalled();
|
||||
function createBoardsPackage(
|
||||
summary: PlatformSummary.AsObject
|
||||
): BoardsPackage | undefined {
|
||||
if (!isPlatformSummaryWithMetadata(summary)) {
|
||||
return undefined;
|
||||
}
|
||||
return {
|
||||
id: platform.getId(),
|
||||
name: platform.getName(),
|
||||
author: platform.getMaintainer(),
|
||||
availableVersions: [platform.getLatest()],
|
||||
description: platform
|
||||
.getBoardsList()
|
||||
.map((b) => b.getName())
|
||||
.join(', '),
|
||||
types: platform.getTypeList(),
|
||||
deprecated: platform.getDeprecated(),
|
||||
const versionReleaseMap = new Map(summary.releasesMap);
|
||||
const actualRelease =
|
||||
versionReleaseMap.get(summary.installedVersion) ??
|
||||
versionReleaseMap.get(summary.latestVersion);
|
||||
if (!actualRelease) {
|
||||
return undefined;
|
||||
}
|
||||
const { name, typesList, boardsList, deprecated, compatible } = actualRelease;
|
||||
if (!compatible) {
|
||||
return undefined; // never show incompatible platforms
|
||||
}
|
||||
const { id, website, maintainer } = summary.metadata;
|
||||
const availableVersions = Array.from(versionReleaseMap.keys())
|
||||
.sort(Installable.Version.COMPARATOR)
|
||||
.reverse();
|
||||
const boardsPackage: Mutable<BoardsPackage> = {
|
||||
id,
|
||||
name,
|
||||
summary: nls.localize(
|
||||
'arduino/component/boardsIncluded',
|
||||
'Boards included in this package:'
|
||||
),
|
||||
installedVersion,
|
||||
boards: platform
|
||||
.getBoardsList()
|
||||
.map((b) => <Board>{ name: b.getName(), fqbn: b.getFqbn() }),
|
||||
moreInfoLink: platform.getWebsite(),
|
||||
description: boardsList.map(({ name }) => name).join(', '),
|
||||
boards: boardsList,
|
||||
types: typesList,
|
||||
moreInfoLink: website,
|
||||
author: maintainer,
|
||||
deprecated,
|
||||
availableVersions,
|
||||
};
|
||||
if (summary.installedVersion) {
|
||||
boardsPackage.installedVersion = summary.installedVersion;
|
||||
}
|
||||
return boardsPackage;
|
||||
}
|
||||
|
||||
type PlatformSummaryWithMetadata = PlatformSummary.AsObject &
|
||||
Required<Pick<PlatformSummary.AsObject, 'metadata'>>;
|
||||
function isPlatformSummaryWithMetadata(
|
||||
summary: PlatformSummary.AsObject
|
||||
): summary is PlatformSummaryWithMetadata {
|
||||
return Boolean(summary.metadata);
|
||||
}
|
||||
|
@@ -384,6 +384,10 @@ export class BoardListResponse extends jspb.Message {
|
||||
getPortsList(): Array<DetectedPort>;
|
||||
setPortsList(value: Array<DetectedPort>): BoardListResponse;
|
||||
addPorts(value?: DetectedPort, index?: number): DetectedPort;
|
||||
clearWarningsList(): void;
|
||||
getWarningsList(): Array<string>;
|
||||
setWarningsList(value: Array<string>): BoardListResponse;
|
||||
addWarnings(value: string, index?: number): string;
|
||||
|
||||
serializeBinary(): Uint8Array;
|
||||
toObject(includeInstance?: boolean): BoardListResponse.AsObject;
|
||||
@@ -398,6 +402,7 @@ export class BoardListResponse extends jspb.Message {
|
||||
export namespace BoardListResponse {
|
||||
export type AsObject = {
|
||||
portsList: Array<DetectedPort.AsObject>,
|
||||
warningsList: Array<string>,
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -3387,7 +3387,7 @@ proto.cc.arduino.cli.commands.v1.BoardListRequest.prototype.setFqbn = function(v
|
||||
* @private {!Array<number>}
|
||||
* @const
|
||||
*/
|
||||
proto.cc.arduino.cli.commands.v1.BoardListResponse.repeatedFields_ = [1];
|
||||
proto.cc.arduino.cli.commands.v1.BoardListResponse.repeatedFields_ = [1,2];
|
||||
|
||||
|
||||
|
||||
@@ -3421,7 +3421,8 @@ proto.cc.arduino.cli.commands.v1.BoardListResponse.prototype.toObject = function
|
||||
proto.cc.arduino.cli.commands.v1.BoardListResponse.toObject = function(includeInstance, msg) {
|
||||
var f, obj = {
|
||||
portsList: jspb.Message.toObjectList(msg.getPortsList(),
|
||||
proto.cc.arduino.cli.commands.v1.DetectedPort.toObject, includeInstance)
|
||||
proto.cc.arduino.cli.commands.v1.DetectedPort.toObject, includeInstance),
|
||||
warningsList: (f = jspb.Message.getRepeatedField(msg, 2)) == null ? undefined : f
|
||||
};
|
||||
|
||||
if (includeInstance) {
|
||||
@@ -3463,6 +3464,10 @@ proto.cc.arduino.cli.commands.v1.BoardListResponse.deserializeBinaryFromReader =
|
||||
reader.readMessage(value,proto.cc.arduino.cli.commands.v1.DetectedPort.deserializeBinaryFromReader);
|
||||
msg.addPorts(value);
|
||||
break;
|
||||
case 2:
|
||||
var value = /** @type {string} */ (reader.readString());
|
||||
msg.addWarnings(value);
|
||||
break;
|
||||
default:
|
||||
reader.skipField();
|
||||
break;
|
||||
@@ -3500,6 +3505,13 @@ proto.cc.arduino.cli.commands.v1.BoardListResponse.serializeBinaryToWriter = fun
|
||||
proto.cc.arduino.cli.commands.v1.DetectedPort.serializeBinaryToWriter
|
||||
);
|
||||
}
|
||||
f = message.getWarningsList();
|
||||
if (f.length > 0) {
|
||||
writer.writeRepeatedString(
|
||||
2,
|
||||
f
|
||||
);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@@ -3541,6 +3553,43 @@ proto.cc.arduino.cli.commands.v1.BoardListResponse.prototype.clearPortsList = fu
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* repeated string warnings = 2;
|
||||
* @return {!Array<string>}
|
||||
*/
|
||||
proto.cc.arduino.cli.commands.v1.BoardListResponse.prototype.getWarningsList = function() {
|
||||
return /** @type {!Array<string>} */ (jspb.Message.getRepeatedField(this, 2));
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* @param {!Array<string>} value
|
||||
* @return {!proto.cc.arduino.cli.commands.v1.BoardListResponse} returns this
|
||||
*/
|
||||
proto.cc.arduino.cli.commands.v1.BoardListResponse.prototype.setWarningsList = function(value) {
|
||||
return jspb.Message.setField(this, 2, value || []);
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* @param {string} value
|
||||
* @param {number=} opt_index
|
||||
* @return {!proto.cc.arduino.cli.commands.v1.BoardListResponse} returns this
|
||||
*/
|
||||
proto.cc.arduino.cli.commands.v1.BoardListResponse.prototype.addWarnings = function(value, opt_index) {
|
||||
return jspb.Message.addToRepeatedField(this, 2, value, opt_index);
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* Clears the list making it empty but non-null.
|
||||
* @return {!proto.cc.arduino.cli.commands.v1.BoardListResponse} returns this
|
||||
*/
|
||||
proto.cc.arduino.cli.commands.v1.BoardListResponse.prototype.clearWarningsList = function() {
|
||||
return this.setWarningsList([]);
|
||||
};
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* List of repeated fields within this message type.
|
||||
|
@@ -6,15 +6,16 @@
|
||||
|
||||
import * as grpc from "@grpc/grpc-js";
|
||||
import * as cc_arduino_cli_commands_v1_commands_pb from "../../../../../cc/arduino/cli/commands/v1/commands_pb";
|
||||
import * as google_rpc_status_pb from "../../../../../google/rpc/status_pb";
|
||||
import * as cc_arduino_cli_commands_v1_common_pb from "../../../../../cc/arduino/cli/commands/v1/common_pb";
|
||||
import * as cc_arduino_cli_commands_v1_board_pb from "../../../../../cc/arduino/cli/commands/v1/board_pb";
|
||||
import * as cc_arduino_cli_commands_v1_common_pb from "../../../../../cc/arduino/cli/commands/v1/common_pb";
|
||||
import * as cc_arduino_cli_commands_v1_compile_pb from "../../../../../cc/arduino/cli/commands/v1/compile_pb";
|
||||
import * as cc_arduino_cli_commands_v1_core_pb from "../../../../../cc/arduino/cli/commands/v1/core_pb";
|
||||
import * as cc_arduino_cli_commands_v1_debug_pb from "../../../../../cc/arduino/cli/commands/v1/debug_pb";
|
||||
import * as cc_arduino_cli_commands_v1_monitor_pb from "../../../../../cc/arduino/cli/commands/v1/monitor_pb";
|
||||
import * as cc_arduino_cli_commands_v1_upload_pb from "../../../../../cc/arduino/cli/commands/v1/upload_pb";
|
||||
import * as cc_arduino_cli_commands_v1_lib_pb from "../../../../../cc/arduino/cli/commands/v1/lib_pb";
|
||||
import * as cc_arduino_cli_commands_v1_monitor_pb from "../../../../../cc/arduino/cli/commands/v1/monitor_pb";
|
||||
import * as cc_arduino_cli_commands_v1_settings_pb from "../../../../../cc/arduino/cli/commands/v1/settings_pb";
|
||||
import * as cc_arduino_cli_commands_v1_upload_pb from "../../../../../cc/arduino/cli/commands/v1/upload_pb";
|
||||
import * as google_rpc_status_pb from "../../../../../google/rpc/status_pb";
|
||||
|
||||
interface IArduinoCoreServiceService extends grpc.ServiceDefinition<grpc.UntypedServiceImplementation> {
|
||||
create: IArduinoCoreServiceService_ICreate;
|
||||
@@ -43,7 +44,6 @@ interface IArduinoCoreServiceService extends grpc.ServiceDefinition<grpc.Untyped
|
||||
listProgrammersAvailableForUpload: IArduinoCoreServiceService_IListProgrammersAvailableForUpload;
|
||||
burnBootloader: IArduinoCoreServiceService_IBurnBootloader;
|
||||
platformSearch: IArduinoCoreServiceService_IPlatformSearch;
|
||||
platformList: IArduinoCoreServiceService_IPlatformList;
|
||||
libraryDownload: IArduinoCoreServiceService_ILibraryDownload;
|
||||
libraryInstall: IArduinoCoreServiceService_ILibraryInstall;
|
||||
libraryUpgrade: IArduinoCoreServiceService_ILibraryUpgrade;
|
||||
@@ -59,6 +59,14 @@ interface IArduinoCoreServiceService extends grpc.ServiceDefinition<grpc.Untyped
|
||||
debug: IArduinoCoreServiceService_IDebug;
|
||||
isDebugSupported: IArduinoCoreServiceService_IIsDebugSupported;
|
||||
getDebugConfig: IArduinoCoreServiceService_IGetDebugConfig;
|
||||
checkForArduinoCLIUpdates: IArduinoCoreServiceService_ICheckForArduinoCLIUpdates;
|
||||
cleanDownloadCacheDirectory: IArduinoCoreServiceService_ICleanDownloadCacheDirectory;
|
||||
configurationSave: IArduinoCoreServiceService_IConfigurationSave;
|
||||
configurationOpen: IArduinoCoreServiceService_IConfigurationOpen;
|
||||
configurationGet: IArduinoCoreServiceService_IConfigurationGet;
|
||||
settingsEnumerate: IArduinoCoreServiceService_ISettingsEnumerate;
|
||||
settingsGetValue: IArduinoCoreServiceService_ISettingsGetValue;
|
||||
settingsSetValue: IArduinoCoreServiceService_ISettingsSetValue;
|
||||
}
|
||||
|
||||
interface IArduinoCoreServiceService_ICreate extends grpc.MethodDefinition<cc_arduino_cli_commands_v1_commands_pb.CreateRequest, cc_arduino_cli_commands_v1_commands_pb.CreateResponse> {
|
||||
@@ -295,15 +303,6 @@ interface IArduinoCoreServiceService_IPlatformSearch extends grpc.MethodDefiniti
|
||||
responseSerialize: grpc.serialize<cc_arduino_cli_commands_v1_core_pb.PlatformSearchResponse>;
|
||||
responseDeserialize: grpc.deserialize<cc_arduino_cli_commands_v1_core_pb.PlatformSearchResponse>;
|
||||
}
|
||||
interface IArduinoCoreServiceService_IPlatformList extends grpc.MethodDefinition<cc_arduino_cli_commands_v1_core_pb.PlatformListRequest, cc_arduino_cli_commands_v1_core_pb.PlatformListResponse> {
|
||||
path: "/cc.arduino.cli.commands.v1.ArduinoCoreService/PlatformList";
|
||||
requestStream: false;
|
||||
responseStream: false;
|
||||
requestSerialize: grpc.serialize<cc_arduino_cli_commands_v1_core_pb.PlatformListRequest>;
|
||||
requestDeserialize: grpc.deserialize<cc_arduino_cli_commands_v1_core_pb.PlatformListRequest>;
|
||||
responseSerialize: grpc.serialize<cc_arduino_cli_commands_v1_core_pb.PlatformListResponse>;
|
||||
responseDeserialize: grpc.deserialize<cc_arduino_cli_commands_v1_core_pb.PlatformListResponse>;
|
||||
}
|
||||
interface IArduinoCoreServiceService_ILibraryDownload extends grpc.MethodDefinition<cc_arduino_cli_commands_v1_lib_pb.LibraryDownloadRequest, cc_arduino_cli_commands_v1_lib_pb.LibraryDownloadResponse> {
|
||||
path: "/cc.arduino.cli.commands.v1.ArduinoCoreService/LibraryDownload";
|
||||
requestStream: false;
|
||||
@@ -439,6 +438,78 @@ interface IArduinoCoreServiceService_IGetDebugConfig extends grpc.MethodDefiniti
|
||||
responseSerialize: grpc.serialize<cc_arduino_cli_commands_v1_debug_pb.GetDebugConfigResponse>;
|
||||
responseDeserialize: grpc.deserialize<cc_arduino_cli_commands_v1_debug_pb.GetDebugConfigResponse>;
|
||||
}
|
||||
interface IArduinoCoreServiceService_ICheckForArduinoCLIUpdates extends grpc.MethodDefinition<cc_arduino_cli_commands_v1_commands_pb.CheckForArduinoCLIUpdatesRequest, cc_arduino_cli_commands_v1_commands_pb.CheckForArduinoCLIUpdatesResponse> {
|
||||
path: "/cc.arduino.cli.commands.v1.ArduinoCoreService/CheckForArduinoCLIUpdates";
|
||||
requestStream: false;
|
||||
responseStream: false;
|
||||
requestSerialize: grpc.serialize<cc_arduino_cli_commands_v1_commands_pb.CheckForArduinoCLIUpdatesRequest>;
|
||||
requestDeserialize: grpc.deserialize<cc_arduino_cli_commands_v1_commands_pb.CheckForArduinoCLIUpdatesRequest>;
|
||||
responseSerialize: grpc.serialize<cc_arduino_cli_commands_v1_commands_pb.CheckForArduinoCLIUpdatesResponse>;
|
||||
responseDeserialize: grpc.deserialize<cc_arduino_cli_commands_v1_commands_pb.CheckForArduinoCLIUpdatesResponse>;
|
||||
}
|
||||
interface IArduinoCoreServiceService_ICleanDownloadCacheDirectory extends grpc.MethodDefinition<cc_arduino_cli_commands_v1_commands_pb.CleanDownloadCacheDirectoryRequest, cc_arduino_cli_commands_v1_commands_pb.CleanDownloadCacheDirectoryResponse> {
|
||||
path: "/cc.arduino.cli.commands.v1.ArduinoCoreService/CleanDownloadCacheDirectory";
|
||||
requestStream: false;
|
||||
responseStream: false;
|
||||
requestSerialize: grpc.serialize<cc_arduino_cli_commands_v1_commands_pb.CleanDownloadCacheDirectoryRequest>;
|
||||
requestDeserialize: grpc.deserialize<cc_arduino_cli_commands_v1_commands_pb.CleanDownloadCacheDirectoryRequest>;
|
||||
responseSerialize: grpc.serialize<cc_arduino_cli_commands_v1_commands_pb.CleanDownloadCacheDirectoryResponse>;
|
||||
responseDeserialize: grpc.deserialize<cc_arduino_cli_commands_v1_commands_pb.CleanDownloadCacheDirectoryResponse>;
|
||||
}
|
||||
interface IArduinoCoreServiceService_IConfigurationSave extends grpc.MethodDefinition<cc_arduino_cli_commands_v1_settings_pb.ConfigurationSaveRequest, cc_arduino_cli_commands_v1_settings_pb.ConfigurationSaveResponse> {
|
||||
path: "/cc.arduino.cli.commands.v1.ArduinoCoreService/ConfigurationSave";
|
||||
requestStream: false;
|
||||
responseStream: false;
|
||||
requestSerialize: grpc.serialize<cc_arduino_cli_commands_v1_settings_pb.ConfigurationSaveRequest>;
|
||||
requestDeserialize: grpc.deserialize<cc_arduino_cli_commands_v1_settings_pb.ConfigurationSaveRequest>;
|
||||
responseSerialize: grpc.serialize<cc_arduino_cli_commands_v1_settings_pb.ConfigurationSaveResponse>;
|
||||
responseDeserialize: grpc.deserialize<cc_arduino_cli_commands_v1_settings_pb.ConfigurationSaveResponse>;
|
||||
}
|
||||
interface IArduinoCoreServiceService_IConfigurationOpen extends grpc.MethodDefinition<cc_arduino_cli_commands_v1_settings_pb.ConfigurationOpenRequest, cc_arduino_cli_commands_v1_settings_pb.ConfigurationOpenResponse> {
|
||||
path: "/cc.arduino.cli.commands.v1.ArduinoCoreService/ConfigurationOpen";
|
||||
requestStream: false;
|
||||
responseStream: false;
|
||||
requestSerialize: grpc.serialize<cc_arduino_cli_commands_v1_settings_pb.ConfigurationOpenRequest>;
|
||||
requestDeserialize: grpc.deserialize<cc_arduino_cli_commands_v1_settings_pb.ConfigurationOpenRequest>;
|
||||
responseSerialize: grpc.serialize<cc_arduino_cli_commands_v1_settings_pb.ConfigurationOpenResponse>;
|
||||
responseDeserialize: grpc.deserialize<cc_arduino_cli_commands_v1_settings_pb.ConfigurationOpenResponse>;
|
||||
}
|
||||
interface IArduinoCoreServiceService_IConfigurationGet extends grpc.MethodDefinition<cc_arduino_cli_commands_v1_settings_pb.ConfigurationGetRequest, cc_arduino_cli_commands_v1_settings_pb.ConfigurationGetResponse> {
|
||||
path: "/cc.arduino.cli.commands.v1.ArduinoCoreService/ConfigurationGet";
|
||||
requestStream: false;
|
||||
responseStream: false;
|
||||
requestSerialize: grpc.serialize<cc_arduino_cli_commands_v1_settings_pb.ConfigurationGetRequest>;
|
||||
requestDeserialize: grpc.deserialize<cc_arduino_cli_commands_v1_settings_pb.ConfigurationGetRequest>;
|
||||
responseSerialize: grpc.serialize<cc_arduino_cli_commands_v1_settings_pb.ConfigurationGetResponse>;
|
||||
responseDeserialize: grpc.deserialize<cc_arduino_cli_commands_v1_settings_pb.ConfigurationGetResponse>;
|
||||
}
|
||||
interface IArduinoCoreServiceService_ISettingsEnumerate extends grpc.MethodDefinition<cc_arduino_cli_commands_v1_settings_pb.SettingsEnumerateRequest, cc_arduino_cli_commands_v1_settings_pb.SettingsEnumerateResponse> {
|
||||
path: "/cc.arduino.cli.commands.v1.ArduinoCoreService/SettingsEnumerate";
|
||||
requestStream: false;
|
||||
responseStream: false;
|
||||
requestSerialize: grpc.serialize<cc_arduino_cli_commands_v1_settings_pb.SettingsEnumerateRequest>;
|
||||
requestDeserialize: grpc.deserialize<cc_arduino_cli_commands_v1_settings_pb.SettingsEnumerateRequest>;
|
||||
responseSerialize: grpc.serialize<cc_arduino_cli_commands_v1_settings_pb.SettingsEnumerateResponse>;
|
||||
responseDeserialize: grpc.deserialize<cc_arduino_cli_commands_v1_settings_pb.SettingsEnumerateResponse>;
|
||||
}
|
||||
interface IArduinoCoreServiceService_ISettingsGetValue extends grpc.MethodDefinition<cc_arduino_cli_commands_v1_settings_pb.SettingsGetValueRequest, cc_arduino_cli_commands_v1_settings_pb.SettingsGetValueResponse> {
|
||||
path: "/cc.arduino.cli.commands.v1.ArduinoCoreService/SettingsGetValue";
|
||||
requestStream: false;
|
||||
responseStream: false;
|
||||
requestSerialize: grpc.serialize<cc_arduino_cli_commands_v1_settings_pb.SettingsGetValueRequest>;
|
||||
requestDeserialize: grpc.deserialize<cc_arduino_cli_commands_v1_settings_pb.SettingsGetValueRequest>;
|
||||
responseSerialize: grpc.serialize<cc_arduino_cli_commands_v1_settings_pb.SettingsGetValueResponse>;
|
||||
responseDeserialize: grpc.deserialize<cc_arduino_cli_commands_v1_settings_pb.SettingsGetValueResponse>;
|
||||
}
|
||||
interface IArduinoCoreServiceService_ISettingsSetValue extends grpc.MethodDefinition<cc_arduino_cli_commands_v1_settings_pb.SettingsSetValueRequest, cc_arduino_cli_commands_v1_settings_pb.SettingsSetValueResponse> {
|
||||
path: "/cc.arduino.cli.commands.v1.ArduinoCoreService/SettingsSetValue";
|
||||
requestStream: false;
|
||||
responseStream: false;
|
||||
requestSerialize: grpc.serialize<cc_arduino_cli_commands_v1_settings_pb.SettingsSetValueRequest>;
|
||||
requestDeserialize: grpc.deserialize<cc_arduino_cli_commands_v1_settings_pb.SettingsSetValueRequest>;
|
||||
responseSerialize: grpc.serialize<cc_arduino_cli_commands_v1_settings_pb.SettingsSetValueResponse>;
|
||||
responseDeserialize: grpc.deserialize<cc_arduino_cli_commands_v1_settings_pb.SettingsSetValueResponse>;
|
||||
}
|
||||
|
||||
export const ArduinoCoreServiceService: IArduinoCoreServiceService;
|
||||
|
||||
@@ -469,7 +540,6 @@ export interface IArduinoCoreServiceServer extends grpc.UntypedServiceImplementa
|
||||
listProgrammersAvailableForUpload: grpc.handleUnaryCall<cc_arduino_cli_commands_v1_upload_pb.ListProgrammersAvailableForUploadRequest, cc_arduino_cli_commands_v1_upload_pb.ListProgrammersAvailableForUploadResponse>;
|
||||
burnBootloader: grpc.handleServerStreamingCall<cc_arduino_cli_commands_v1_upload_pb.BurnBootloaderRequest, cc_arduino_cli_commands_v1_upload_pb.BurnBootloaderResponse>;
|
||||
platformSearch: grpc.handleUnaryCall<cc_arduino_cli_commands_v1_core_pb.PlatformSearchRequest, cc_arduino_cli_commands_v1_core_pb.PlatformSearchResponse>;
|
||||
platformList: grpc.handleUnaryCall<cc_arduino_cli_commands_v1_core_pb.PlatformListRequest, cc_arduino_cli_commands_v1_core_pb.PlatformListResponse>;
|
||||
libraryDownload: grpc.handleServerStreamingCall<cc_arduino_cli_commands_v1_lib_pb.LibraryDownloadRequest, cc_arduino_cli_commands_v1_lib_pb.LibraryDownloadResponse>;
|
||||
libraryInstall: grpc.handleServerStreamingCall<cc_arduino_cli_commands_v1_lib_pb.LibraryInstallRequest, cc_arduino_cli_commands_v1_lib_pb.LibraryInstallResponse>;
|
||||
libraryUpgrade: grpc.handleServerStreamingCall<cc_arduino_cli_commands_v1_lib_pb.LibraryUpgradeRequest, cc_arduino_cli_commands_v1_lib_pb.LibraryUpgradeResponse>;
|
||||
@@ -485,6 +555,14 @@ export interface IArduinoCoreServiceServer extends grpc.UntypedServiceImplementa
|
||||
debug: grpc.handleBidiStreamingCall<cc_arduino_cli_commands_v1_debug_pb.DebugRequest, cc_arduino_cli_commands_v1_debug_pb.DebugResponse>;
|
||||
isDebugSupported: grpc.handleUnaryCall<cc_arduino_cli_commands_v1_debug_pb.IsDebugSupportedRequest, cc_arduino_cli_commands_v1_debug_pb.IsDebugSupportedResponse>;
|
||||
getDebugConfig: grpc.handleUnaryCall<cc_arduino_cli_commands_v1_debug_pb.GetDebugConfigRequest, cc_arduino_cli_commands_v1_debug_pb.GetDebugConfigResponse>;
|
||||
checkForArduinoCLIUpdates: grpc.handleUnaryCall<cc_arduino_cli_commands_v1_commands_pb.CheckForArduinoCLIUpdatesRequest, cc_arduino_cli_commands_v1_commands_pb.CheckForArduinoCLIUpdatesResponse>;
|
||||
cleanDownloadCacheDirectory: grpc.handleUnaryCall<cc_arduino_cli_commands_v1_commands_pb.CleanDownloadCacheDirectoryRequest, cc_arduino_cli_commands_v1_commands_pb.CleanDownloadCacheDirectoryResponse>;
|
||||
configurationSave: grpc.handleUnaryCall<cc_arduino_cli_commands_v1_settings_pb.ConfigurationSaveRequest, cc_arduino_cli_commands_v1_settings_pb.ConfigurationSaveResponse>;
|
||||
configurationOpen: grpc.handleUnaryCall<cc_arduino_cli_commands_v1_settings_pb.ConfigurationOpenRequest, cc_arduino_cli_commands_v1_settings_pb.ConfigurationOpenResponse>;
|
||||
configurationGet: grpc.handleUnaryCall<cc_arduino_cli_commands_v1_settings_pb.ConfigurationGetRequest, cc_arduino_cli_commands_v1_settings_pb.ConfigurationGetResponse>;
|
||||
settingsEnumerate: grpc.handleUnaryCall<cc_arduino_cli_commands_v1_settings_pb.SettingsEnumerateRequest, cc_arduino_cli_commands_v1_settings_pb.SettingsEnumerateResponse>;
|
||||
settingsGetValue: grpc.handleUnaryCall<cc_arduino_cli_commands_v1_settings_pb.SettingsGetValueRequest, cc_arduino_cli_commands_v1_settings_pb.SettingsGetValueResponse>;
|
||||
settingsSetValue: grpc.handleUnaryCall<cc_arduino_cli_commands_v1_settings_pb.SettingsSetValueRequest, cc_arduino_cli_commands_v1_settings_pb.SettingsSetValueResponse>;
|
||||
}
|
||||
|
||||
export interface IArduinoCoreServiceClient {
|
||||
@@ -554,9 +632,6 @@ export interface IArduinoCoreServiceClient {
|
||||
platformSearch(request: cc_arduino_cli_commands_v1_core_pb.PlatformSearchRequest, callback: (error: grpc.ServiceError | null, response: cc_arduino_cli_commands_v1_core_pb.PlatformSearchResponse) => void): grpc.ClientUnaryCall;
|
||||
platformSearch(request: cc_arduino_cli_commands_v1_core_pb.PlatformSearchRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: cc_arduino_cli_commands_v1_core_pb.PlatformSearchResponse) => void): grpc.ClientUnaryCall;
|
||||
platformSearch(request: cc_arduino_cli_commands_v1_core_pb.PlatformSearchRequest, metadata: grpc.Metadata, options: Partial<grpc.CallOptions>, callback: (error: grpc.ServiceError | null, response: cc_arduino_cli_commands_v1_core_pb.PlatformSearchResponse) => void): grpc.ClientUnaryCall;
|
||||
platformList(request: cc_arduino_cli_commands_v1_core_pb.PlatformListRequest, callback: (error: grpc.ServiceError | null, response: cc_arduino_cli_commands_v1_core_pb.PlatformListResponse) => void): grpc.ClientUnaryCall;
|
||||
platformList(request: cc_arduino_cli_commands_v1_core_pb.PlatformListRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: cc_arduino_cli_commands_v1_core_pb.PlatformListResponse) => void): grpc.ClientUnaryCall;
|
||||
platformList(request: cc_arduino_cli_commands_v1_core_pb.PlatformListRequest, metadata: grpc.Metadata, options: Partial<grpc.CallOptions>, callback: (error: grpc.ServiceError | null, response: cc_arduino_cli_commands_v1_core_pb.PlatformListResponse) => void): grpc.ClientUnaryCall;
|
||||
libraryDownload(request: cc_arduino_cli_commands_v1_lib_pb.LibraryDownloadRequest, options?: Partial<grpc.CallOptions>): grpc.ClientReadableStream<cc_arduino_cli_commands_v1_lib_pb.LibraryDownloadResponse>;
|
||||
libraryDownload(request: cc_arduino_cli_commands_v1_lib_pb.LibraryDownloadRequest, metadata?: grpc.Metadata, options?: Partial<grpc.CallOptions>): grpc.ClientReadableStream<cc_arduino_cli_commands_v1_lib_pb.LibraryDownloadResponse>;
|
||||
libraryInstall(request: cc_arduino_cli_commands_v1_lib_pb.LibraryInstallRequest, options?: Partial<grpc.CallOptions>): grpc.ClientReadableStream<cc_arduino_cli_commands_v1_lib_pb.LibraryInstallResponse>;
|
||||
@@ -595,6 +670,30 @@ export interface IArduinoCoreServiceClient {
|
||||
getDebugConfig(request: cc_arduino_cli_commands_v1_debug_pb.GetDebugConfigRequest, callback: (error: grpc.ServiceError | null, response: cc_arduino_cli_commands_v1_debug_pb.GetDebugConfigResponse) => void): grpc.ClientUnaryCall;
|
||||
getDebugConfig(request: cc_arduino_cli_commands_v1_debug_pb.GetDebugConfigRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: cc_arduino_cli_commands_v1_debug_pb.GetDebugConfigResponse) => void): grpc.ClientUnaryCall;
|
||||
getDebugConfig(request: cc_arduino_cli_commands_v1_debug_pb.GetDebugConfigRequest, metadata: grpc.Metadata, options: Partial<grpc.CallOptions>, callback: (error: grpc.ServiceError | null, response: cc_arduino_cli_commands_v1_debug_pb.GetDebugConfigResponse) => void): grpc.ClientUnaryCall;
|
||||
checkForArduinoCLIUpdates(request: cc_arduino_cli_commands_v1_commands_pb.CheckForArduinoCLIUpdatesRequest, callback: (error: grpc.ServiceError | null, response: cc_arduino_cli_commands_v1_commands_pb.CheckForArduinoCLIUpdatesResponse) => void): grpc.ClientUnaryCall;
|
||||
checkForArduinoCLIUpdates(request: cc_arduino_cli_commands_v1_commands_pb.CheckForArduinoCLIUpdatesRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: cc_arduino_cli_commands_v1_commands_pb.CheckForArduinoCLIUpdatesResponse) => void): grpc.ClientUnaryCall;
|
||||
checkForArduinoCLIUpdates(request: cc_arduino_cli_commands_v1_commands_pb.CheckForArduinoCLIUpdatesRequest, metadata: grpc.Metadata, options: Partial<grpc.CallOptions>, callback: (error: grpc.ServiceError | null, response: cc_arduino_cli_commands_v1_commands_pb.CheckForArduinoCLIUpdatesResponse) => void): grpc.ClientUnaryCall;
|
||||
cleanDownloadCacheDirectory(request: cc_arduino_cli_commands_v1_commands_pb.CleanDownloadCacheDirectoryRequest, callback: (error: grpc.ServiceError | null, response: cc_arduino_cli_commands_v1_commands_pb.CleanDownloadCacheDirectoryResponse) => void): grpc.ClientUnaryCall;
|
||||
cleanDownloadCacheDirectory(request: cc_arduino_cli_commands_v1_commands_pb.CleanDownloadCacheDirectoryRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: cc_arduino_cli_commands_v1_commands_pb.CleanDownloadCacheDirectoryResponse) => void): grpc.ClientUnaryCall;
|
||||
cleanDownloadCacheDirectory(request: cc_arduino_cli_commands_v1_commands_pb.CleanDownloadCacheDirectoryRequest, metadata: grpc.Metadata, options: Partial<grpc.CallOptions>, callback: (error: grpc.ServiceError | null, response: cc_arduino_cli_commands_v1_commands_pb.CleanDownloadCacheDirectoryResponse) => void): grpc.ClientUnaryCall;
|
||||
configurationSave(request: cc_arduino_cli_commands_v1_settings_pb.ConfigurationSaveRequest, callback: (error: grpc.ServiceError | null, response: cc_arduino_cli_commands_v1_settings_pb.ConfigurationSaveResponse) => void): grpc.ClientUnaryCall;
|
||||
configurationSave(request: cc_arduino_cli_commands_v1_settings_pb.ConfigurationSaveRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: cc_arduino_cli_commands_v1_settings_pb.ConfigurationSaveResponse) => void): grpc.ClientUnaryCall;
|
||||
configurationSave(request: cc_arduino_cli_commands_v1_settings_pb.ConfigurationSaveRequest, metadata: grpc.Metadata, options: Partial<grpc.CallOptions>, callback: (error: grpc.ServiceError | null, response: cc_arduino_cli_commands_v1_settings_pb.ConfigurationSaveResponse) => void): grpc.ClientUnaryCall;
|
||||
configurationOpen(request: cc_arduino_cli_commands_v1_settings_pb.ConfigurationOpenRequest, callback: (error: grpc.ServiceError | null, response: cc_arduino_cli_commands_v1_settings_pb.ConfigurationOpenResponse) => void): grpc.ClientUnaryCall;
|
||||
configurationOpen(request: cc_arduino_cli_commands_v1_settings_pb.ConfigurationOpenRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: cc_arduino_cli_commands_v1_settings_pb.ConfigurationOpenResponse) => void): grpc.ClientUnaryCall;
|
||||
configurationOpen(request: cc_arduino_cli_commands_v1_settings_pb.ConfigurationOpenRequest, metadata: grpc.Metadata, options: Partial<grpc.CallOptions>, callback: (error: grpc.ServiceError | null, response: cc_arduino_cli_commands_v1_settings_pb.ConfigurationOpenResponse) => void): grpc.ClientUnaryCall;
|
||||
configurationGet(request: cc_arduino_cli_commands_v1_settings_pb.ConfigurationGetRequest, callback: (error: grpc.ServiceError | null, response: cc_arduino_cli_commands_v1_settings_pb.ConfigurationGetResponse) => void): grpc.ClientUnaryCall;
|
||||
configurationGet(request: cc_arduino_cli_commands_v1_settings_pb.ConfigurationGetRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: cc_arduino_cli_commands_v1_settings_pb.ConfigurationGetResponse) => void): grpc.ClientUnaryCall;
|
||||
configurationGet(request: cc_arduino_cli_commands_v1_settings_pb.ConfigurationGetRequest, metadata: grpc.Metadata, options: Partial<grpc.CallOptions>, callback: (error: grpc.ServiceError | null, response: cc_arduino_cli_commands_v1_settings_pb.ConfigurationGetResponse) => void): grpc.ClientUnaryCall;
|
||||
settingsEnumerate(request: cc_arduino_cli_commands_v1_settings_pb.SettingsEnumerateRequest, callback: (error: grpc.ServiceError | null, response: cc_arduino_cli_commands_v1_settings_pb.SettingsEnumerateResponse) => void): grpc.ClientUnaryCall;
|
||||
settingsEnumerate(request: cc_arduino_cli_commands_v1_settings_pb.SettingsEnumerateRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: cc_arduino_cli_commands_v1_settings_pb.SettingsEnumerateResponse) => void): grpc.ClientUnaryCall;
|
||||
settingsEnumerate(request: cc_arduino_cli_commands_v1_settings_pb.SettingsEnumerateRequest, metadata: grpc.Metadata, options: Partial<grpc.CallOptions>, callback: (error: grpc.ServiceError | null, response: cc_arduino_cli_commands_v1_settings_pb.SettingsEnumerateResponse) => void): grpc.ClientUnaryCall;
|
||||
settingsGetValue(request: cc_arduino_cli_commands_v1_settings_pb.SettingsGetValueRequest, callback: (error: grpc.ServiceError | null, response: cc_arduino_cli_commands_v1_settings_pb.SettingsGetValueResponse) => void): grpc.ClientUnaryCall;
|
||||
settingsGetValue(request: cc_arduino_cli_commands_v1_settings_pb.SettingsGetValueRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: cc_arduino_cli_commands_v1_settings_pb.SettingsGetValueResponse) => void): grpc.ClientUnaryCall;
|
||||
settingsGetValue(request: cc_arduino_cli_commands_v1_settings_pb.SettingsGetValueRequest, metadata: grpc.Metadata, options: Partial<grpc.CallOptions>, callback: (error: grpc.ServiceError | null, response: cc_arduino_cli_commands_v1_settings_pb.SettingsGetValueResponse) => void): grpc.ClientUnaryCall;
|
||||
settingsSetValue(request: cc_arduino_cli_commands_v1_settings_pb.SettingsSetValueRequest, callback: (error: grpc.ServiceError | null, response: cc_arduino_cli_commands_v1_settings_pb.SettingsSetValueResponse) => void): grpc.ClientUnaryCall;
|
||||
settingsSetValue(request: cc_arduino_cli_commands_v1_settings_pb.SettingsSetValueRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: cc_arduino_cli_commands_v1_settings_pb.SettingsSetValueResponse) => void): grpc.ClientUnaryCall;
|
||||
settingsSetValue(request: cc_arduino_cli_commands_v1_settings_pb.SettingsSetValueRequest, metadata: grpc.Metadata, options: Partial<grpc.CallOptions>, callback: (error: grpc.ServiceError | null, response: cc_arduino_cli_commands_v1_settings_pb.SettingsSetValueResponse) => void): grpc.ClientUnaryCall;
|
||||
}
|
||||
|
||||
export class ArduinoCoreServiceClient extends grpc.Client implements IArduinoCoreServiceClient {
|
||||
@@ -665,9 +764,6 @@ export class ArduinoCoreServiceClient extends grpc.Client implements IArduinoCor
|
||||
public platformSearch(request: cc_arduino_cli_commands_v1_core_pb.PlatformSearchRequest, callback: (error: grpc.ServiceError | null, response: cc_arduino_cli_commands_v1_core_pb.PlatformSearchResponse) => void): grpc.ClientUnaryCall;
|
||||
public platformSearch(request: cc_arduino_cli_commands_v1_core_pb.PlatformSearchRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: cc_arduino_cli_commands_v1_core_pb.PlatformSearchResponse) => void): grpc.ClientUnaryCall;
|
||||
public platformSearch(request: cc_arduino_cli_commands_v1_core_pb.PlatformSearchRequest, metadata: grpc.Metadata, options: Partial<grpc.CallOptions>, callback: (error: grpc.ServiceError | null, response: cc_arduino_cli_commands_v1_core_pb.PlatformSearchResponse) => void): grpc.ClientUnaryCall;
|
||||
public platformList(request: cc_arduino_cli_commands_v1_core_pb.PlatformListRequest, callback: (error: grpc.ServiceError | null, response: cc_arduino_cli_commands_v1_core_pb.PlatformListResponse) => void): grpc.ClientUnaryCall;
|
||||
public platformList(request: cc_arduino_cli_commands_v1_core_pb.PlatformListRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: cc_arduino_cli_commands_v1_core_pb.PlatformListResponse) => void): grpc.ClientUnaryCall;
|
||||
public platformList(request: cc_arduino_cli_commands_v1_core_pb.PlatformListRequest, metadata: grpc.Metadata, options: Partial<grpc.CallOptions>, callback: (error: grpc.ServiceError | null, response: cc_arduino_cli_commands_v1_core_pb.PlatformListResponse) => void): grpc.ClientUnaryCall;
|
||||
public libraryDownload(request: cc_arduino_cli_commands_v1_lib_pb.LibraryDownloadRequest, options?: Partial<grpc.CallOptions>): grpc.ClientReadableStream<cc_arduino_cli_commands_v1_lib_pb.LibraryDownloadResponse>;
|
||||
public libraryDownload(request: cc_arduino_cli_commands_v1_lib_pb.LibraryDownloadRequest, metadata?: grpc.Metadata, options?: Partial<grpc.CallOptions>): grpc.ClientReadableStream<cc_arduino_cli_commands_v1_lib_pb.LibraryDownloadResponse>;
|
||||
public libraryInstall(request: cc_arduino_cli_commands_v1_lib_pb.LibraryInstallRequest, options?: Partial<grpc.CallOptions>): grpc.ClientReadableStream<cc_arduino_cli_commands_v1_lib_pb.LibraryInstallResponse>;
|
||||
@@ -704,4 +800,28 @@ export class ArduinoCoreServiceClient extends grpc.Client implements IArduinoCor
|
||||
public getDebugConfig(request: cc_arduino_cli_commands_v1_debug_pb.GetDebugConfigRequest, callback: (error: grpc.ServiceError | null, response: cc_arduino_cli_commands_v1_debug_pb.GetDebugConfigResponse) => void): grpc.ClientUnaryCall;
|
||||
public getDebugConfig(request: cc_arduino_cli_commands_v1_debug_pb.GetDebugConfigRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: cc_arduino_cli_commands_v1_debug_pb.GetDebugConfigResponse) => void): grpc.ClientUnaryCall;
|
||||
public getDebugConfig(request: cc_arduino_cli_commands_v1_debug_pb.GetDebugConfigRequest, metadata: grpc.Metadata, options: Partial<grpc.CallOptions>, callback: (error: grpc.ServiceError | null, response: cc_arduino_cli_commands_v1_debug_pb.GetDebugConfigResponse) => void): grpc.ClientUnaryCall;
|
||||
public checkForArduinoCLIUpdates(request: cc_arduino_cli_commands_v1_commands_pb.CheckForArduinoCLIUpdatesRequest, callback: (error: grpc.ServiceError | null, response: cc_arduino_cli_commands_v1_commands_pb.CheckForArduinoCLIUpdatesResponse) => void): grpc.ClientUnaryCall;
|
||||
public checkForArduinoCLIUpdates(request: cc_arduino_cli_commands_v1_commands_pb.CheckForArduinoCLIUpdatesRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: cc_arduino_cli_commands_v1_commands_pb.CheckForArduinoCLIUpdatesResponse) => void): grpc.ClientUnaryCall;
|
||||
public checkForArduinoCLIUpdates(request: cc_arduino_cli_commands_v1_commands_pb.CheckForArduinoCLIUpdatesRequest, metadata: grpc.Metadata, options: Partial<grpc.CallOptions>, callback: (error: grpc.ServiceError | null, response: cc_arduino_cli_commands_v1_commands_pb.CheckForArduinoCLIUpdatesResponse) => void): grpc.ClientUnaryCall;
|
||||
public cleanDownloadCacheDirectory(request: cc_arduino_cli_commands_v1_commands_pb.CleanDownloadCacheDirectoryRequest, callback: (error: grpc.ServiceError | null, response: cc_arduino_cli_commands_v1_commands_pb.CleanDownloadCacheDirectoryResponse) => void): grpc.ClientUnaryCall;
|
||||
public cleanDownloadCacheDirectory(request: cc_arduino_cli_commands_v1_commands_pb.CleanDownloadCacheDirectoryRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: cc_arduino_cli_commands_v1_commands_pb.CleanDownloadCacheDirectoryResponse) => void): grpc.ClientUnaryCall;
|
||||
public cleanDownloadCacheDirectory(request: cc_arduino_cli_commands_v1_commands_pb.CleanDownloadCacheDirectoryRequest, metadata: grpc.Metadata, options: Partial<grpc.CallOptions>, callback: (error: grpc.ServiceError | null, response: cc_arduino_cli_commands_v1_commands_pb.CleanDownloadCacheDirectoryResponse) => void): grpc.ClientUnaryCall;
|
||||
public configurationSave(request: cc_arduino_cli_commands_v1_settings_pb.ConfigurationSaveRequest, callback: (error: grpc.ServiceError | null, response: cc_arduino_cli_commands_v1_settings_pb.ConfigurationSaveResponse) => void): grpc.ClientUnaryCall;
|
||||
public configurationSave(request: cc_arduino_cli_commands_v1_settings_pb.ConfigurationSaveRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: cc_arduino_cli_commands_v1_settings_pb.ConfigurationSaveResponse) => void): grpc.ClientUnaryCall;
|
||||
public configurationSave(request: cc_arduino_cli_commands_v1_settings_pb.ConfigurationSaveRequest, metadata: grpc.Metadata, options: Partial<grpc.CallOptions>, callback: (error: grpc.ServiceError | null, response: cc_arduino_cli_commands_v1_settings_pb.ConfigurationSaveResponse) => void): grpc.ClientUnaryCall;
|
||||
public configurationOpen(request: cc_arduino_cli_commands_v1_settings_pb.ConfigurationOpenRequest, callback: (error: grpc.ServiceError | null, response: cc_arduino_cli_commands_v1_settings_pb.ConfigurationOpenResponse) => void): grpc.ClientUnaryCall;
|
||||
public configurationOpen(request: cc_arduino_cli_commands_v1_settings_pb.ConfigurationOpenRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: cc_arduino_cli_commands_v1_settings_pb.ConfigurationOpenResponse) => void): grpc.ClientUnaryCall;
|
||||
public configurationOpen(request: cc_arduino_cli_commands_v1_settings_pb.ConfigurationOpenRequest, metadata: grpc.Metadata, options: Partial<grpc.CallOptions>, callback: (error: grpc.ServiceError | null, response: cc_arduino_cli_commands_v1_settings_pb.ConfigurationOpenResponse) => void): grpc.ClientUnaryCall;
|
||||
public configurationGet(request: cc_arduino_cli_commands_v1_settings_pb.ConfigurationGetRequest, callback: (error: grpc.ServiceError | null, response: cc_arduino_cli_commands_v1_settings_pb.ConfigurationGetResponse) => void): grpc.ClientUnaryCall;
|
||||
public configurationGet(request: cc_arduino_cli_commands_v1_settings_pb.ConfigurationGetRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: cc_arduino_cli_commands_v1_settings_pb.ConfigurationGetResponse) => void): grpc.ClientUnaryCall;
|
||||
public configurationGet(request: cc_arduino_cli_commands_v1_settings_pb.ConfigurationGetRequest, metadata: grpc.Metadata, options: Partial<grpc.CallOptions>, callback: (error: grpc.ServiceError | null, response: cc_arduino_cli_commands_v1_settings_pb.ConfigurationGetResponse) => void): grpc.ClientUnaryCall;
|
||||
public settingsEnumerate(request: cc_arduino_cli_commands_v1_settings_pb.SettingsEnumerateRequest, callback: (error: grpc.ServiceError | null, response: cc_arduino_cli_commands_v1_settings_pb.SettingsEnumerateResponse) => void): grpc.ClientUnaryCall;
|
||||
public settingsEnumerate(request: cc_arduino_cli_commands_v1_settings_pb.SettingsEnumerateRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: cc_arduino_cli_commands_v1_settings_pb.SettingsEnumerateResponse) => void): grpc.ClientUnaryCall;
|
||||
public settingsEnumerate(request: cc_arduino_cli_commands_v1_settings_pb.SettingsEnumerateRequest, metadata: grpc.Metadata, options: Partial<grpc.CallOptions>, callback: (error: grpc.ServiceError | null, response: cc_arduino_cli_commands_v1_settings_pb.SettingsEnumerateResponse) => void): grpc.ClientUnaryCall;
|
||||
public settingsGetValue(request: cc_arduino_cli_commands_v1_settings_pb.SettingsGetValueRequest, callback: (error: grpc.ServiceError | null, response: cc_arduino_cli_commands_v1_settings_pb.SettingsGetValueResponse) => void): grpc.ClientUnaryCall;
|
||||
public settingsGetValue(request: cc_arduino_cli_commands_v1_settings_pb.SettingsGetValueRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: cc_arduino_cli_commands_v1_settings_pb.SettingsGetValueResponse) => void): grpc.ClientUnaryCall;
|
||||
public settingsGetValue(request: cc_arduino_cli_commands_v1_settings_pb.SettingsGetValueRequest, metadata: grpc.Metadata, options: Partial<grpc.CallOptions>, callback: (error: grpc.ServiceError | null, response: cc_arduino_cli_commands_v1_settings_pb.SettingsGetValueResponse) => void): grpc.ClientUnaryCall;
|
||||
public settingsSetValue(request: cc_arduino_cli_commands_v1_settings_pb.SettingsSetValueRequest, callback: (error: grpc.ServiceError | null, response: cc_arduino_cli_commands_v1_settings_pb.SettingsSetValueResponse) => void): grpc.ClientUnaryCall;
|
||||
public settingsSetValue(request: cc_arduino_cli_commands_v1_settings_pb.SettingsSetValueRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: cc_arduino_cli_commands_v1_settings_pb.SettingsSetValueResponse) => void): grpc.ClientUnaryCall;
|
||||
public settingsSetValue(request: cc_arduino_cli_commands_v1_settings_pb.SettingsSetValueRequest, metadata: grpc.Metadata, options: Partial<grpc.CallOptions>, callback: (error: grpc.ServiceError | null, response: cc_arduino_cli_commands_v1_settings_pb.SettingsSetValueResponse) => void): grpc.ClientUnaryCall;
|
||||
}
|
||||
|
@@ -3,30 +3,32 @@
|
||||
// Original file comments:
|
||||
// This file is part of arduino-cli.
|
||||
//
|
||||
// Copyright 2020 ARDUINO SA (http://www.arduino.cc/)
|
||||
// Copyright 2024 ARDUINO SA (https://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
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// 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.
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
//
|
||||
'use strict';
|
||||
var cc_arduino_cli_commands_v1_commands_pb = require('../../../../../cc/arduino/cli/commands/v1/commands_pb.js');
|
||||
var google_rpc_status_pb = require('../../../../../google/rpc/status_pb.js');
|
||||
var cc_arduino_cli_commands_v1_common_pb = require('../../../../../cc/arduino/cli/commands/v1/common_pb.js');
|
||||
var cc_arduino_cli_commands_v1_board_pb = require('../../../../../cc/arduino/cli/commands/v1/board_pb.js');
|
||||
var cc_arduino_cli_commands_v1_common_pb = require('../../../../../cc/arduino/cli/commands/v1/common_pb.js');
|
||||
var cc_arduino_cli_commands_v1_compile_pb = require('../../../../../cc/arduino/cli/commands/v1/compile_pb.js');
|
||||
var cc_arduino_cli_commands_v1_core_pb = require('../../../../../cc/arduino/cli/commands/v1/core_pb.js');
|
||||
var cc_arduino_cli_commands_v1_debug_pb = require('../../../../../cc/arduino/cli/commands/v1/debug_pb.js');
|
||||
var cc_arduino_cli_commands_v1_monitor_pb = require('../../../../../cc/arduino/cli/commands/v1/monitor_pb.js');
|
||||
var cc_arduino_cli_commands_v1_upload_pb = require('../../../../../cc/arduino/cli/commands/v1/upload_pb.js');
|
||||
var cc_arduino_cli_commands_v1_lib_pb = require('../../../../../cc/arduino/cli/commands/v1/lib_pb.js');
|
||||
var cc_arduino_cli_commands_v1_monitor_pb = require('../../../../../cc/arduino/cli/commands/v1/monitor_pb.js');
|
||||
var cc_arduino_cli_commands_v1_settings_pb = require('../../../../../cc/arduino/cli/commands/v1/settings_pb.js');
|
||||
var cc_arduino_cli_commands_v1_upload_pb = require('../../../../../cc/arduino/cli/commands/v1/upload_pb.js');
|
||||
var google_rpc_status_pb = require('../../../../../google/rpc/status_pb.js');
|
||||
|
||||
function serialize_cc_arduino_cli_commands_v1_ArchiveSketchRequest(arg) {
|
||||
if (!(arg instanceof cc_arduino_cli_commands_v1_commands_pb.ArchiveSketchRequest)) {
|
||||
@@ -182,6 +184,50 @@ function deserialize_cc_arduino_cli_commands_v1_BurnBootloaderResponse(buffer_ar
|
||||
return cc_arduino_cli_commands_v1_upload_pb.BurnBootloaderResponse.deserializeBinary(new Uint8Array(buffer_arg));
|
||||
}
|
||||
|
||||
function serialize_cc_arduino_cli_commands_v1_CheckForArduinoCLIUpdatesRequest(arg) {
|
||||
if (!(arg instanceof cc_arduino_cli_commands_v1_commands_pb.CheckForArduinoCLIUpdatesRequest)) {
|
||||
throw new Error('Expected argument of type cc.arduino.cli.commands.v1.CheckForArduinoCLIUpdatesRequest');
|
||||
}
|
||||
return Buffer.from(arg.serializeBinary());
|
||||
}
|
||||
|
||||
function deserialize_cc_arduino_cli_commands_v1_CheckForArduinoCLIUpdatesRequest(buffer_arg) {
|
||||
return cc_arduino_cli_commands_v1_commands_pb.CheckForArduinoCLIUpdatesRequest.deserializeBinary(new Uint8Array(buffer_arg));
|
||||
}
|
||||
|
||||
function serialize_cc_arduino_cli_commands_v1_CheckForArduinoCLIUpdatesResponse(arg) {
|
||||
if (!(arg instanceof cc_arduino_cli_commands_v1_commands_pb.CheckForArduinoCLIUpdatesResponse)) {
|
||||
throw new Error('Expected argument of type cc.arduino.cli.commands.v1.CheckForArduinoCLIUpdatesResponse');
|
||||
}
|
||||
return Buffer.from(arg.serializeBinary());
|
||||
}
|
||||
|
||||
function deserialize_cc_arduino_cli_commands_v1_CheckForArduinoCLIUpdatesResponse(buffer_arg) {
|
||||
return cc_arduino_cli_commands_v1_commands_pb.CheckForArduinoCLIUpdatesResponse.deserializeBinary(new Uint8Array(buffer_arg));
|
||||
}
|
||||
|
||||
function serialize_cc_arduino_cli_commands_v1_CleanDownloadCacheDirectoryRequest(arg) {
|
||||
if (!(arg instanceof cc_arduino_cli_commands_v1_commands_pb.CleanDownloadCacheDirectoryRequest)) {
|
||||
throw new Error('Expected argument of type cc.arduino.cli.commands.v1.CleanDownloadCacheDirectoryRequest');
|
||||
}
|
||||
return Buffer.from(arg.serializeBinary());
|
||||
}
|
||||
|
||||
function deserialize_cc_arduino_cli_commands_v1_CleanDownloadCacheDirectoryRequest(buffer_arg) {
|
||||
return cc_arduino_cli_commands_v1_commands_pb.CleanDownloadCacheDirectoryRequest.deserializeBinary(new Uint8Array(buffer_arg));
|
||||
}
|
||||
|
||||
function serialize_cc_arduino_cli_commands_v1_CleanDownloadCacheDirectoryResponse(arg) {
|
||||
if (!(arg instanceof cc_arduino_cli_commands_v1_commands_pb.CleanDownloadCacheDirectoryResponse)) {
|
||||
throw new Error('Expected argument of type cc.arduino.cli.commands.v1.CleanDownloadCacheDirectoryResponse');
|
||||
}
|
||||
return Buffer.from(arg.serializeBinary());
|
||||
}
|
||||
|
||||
function deserialize_cc_arduino_cli_commands_v1_CleanDownloadCacheDirectoryResponse(buffer_arg) {
|
||||
return cc_arduino_cli_commands_v1_commands_pb.CleanDownloadCacheDirectoryResponse.deserializeBinary(new Uint8Array(buffer_arg));
|
||||
}
|
||||
|
||||
function serialize_cc_arduino_cli_commands_v1_CompileRequest(arg) {
|
||||
if (!(arg instanceof cc_arduino_cli_commands_v1_compile_pb.CompileRequest)) {
|
||||
throw new Error('Expected argument of type cc.arduino.cli.commands.v1.CompileRequest');
|
||||
@@ -204,6 +250,72 @@ function deserialize_cc_arduino_cli_commands_v1_CompileResponse(buffer_arg) {
|
||||
return cc_arduino_cli_commands_v1_compile_pb.CompileResponse.deserializeBinary(new Uint8Array(buffer_arg));
|
||||
}
|
||||
|
||||
function serialize_cc_arduino_cli_commands_v1_ConfigurationGetRequest(arg) {
|
||||
if (!(arg instanceof cc_arduino_cli_commands_v1_settings_pb.ConfigurationGetRequest)) {
|
||||
throw new Error('Expected argument of type cc.arduino.cli.commands.v1.ConfigurationGetRequest');
|
||||
}
|
||||
return Buffer.from(arg.serializeBinary());
|
||||
}
|
||||
|
||||
function deserialize_cc_arduino_cli_commands_v1_ConfigurationGetRequest(buffer_arg) {
|
||||
return cc_arduino_cli_commands_v1_settings_pb.ConfigurationGetRequest.deserializeBinary(new Uint8Array(buffer_arg));
|
||||
}
|
||||
|
||||
function serialize_cc_arduino_cli_commands_v1_ConfigurationGetResponse(arg) {
|
||||
if (!(arg instanceof cc_arduino_cli_commands_v1_settings_pb.ConfigurationGetResponse)) {
|
||||
throw new Error('Expected argument of type cc.arduino.cli.commands.v1.ConfigurationGetResponse');
|
||||
}
|
||||
return Buffer.from(arg.serializeBinary());
|
||||
}
|
||||
|
||||
function deserialize_cc_arduino_cli_commands_v1_ConfigurationGetResponse(buffer_arg) {
|
||||
return cc_arduino_cli_commands_v1_settings_pb.ConfigurationGetResponse.deserializeBinary(new Uint8Array(buffer_arg));
|
||||
}
|
||||
|
||||
function serialize_cc_arduino_cli_commands_v1_ConfigurationOpenRequest(arg) {
|
||||
if (!(arg instanceof cc_arduino_cli_commands_v1_settings_pb.ConfigurationOpenRequest)) {
|
||||
throw new Error('Expected argument of type cc.arduino.cli.commands.v1.ConfigurationOpenRequest');
|
||||
}
|
||||
return Buffer.from(arg.serializeBinary());
|
||||
}
|
||||
|
||||
function deserialize_cc_arduino_cli_commands_v1_ConfigurationOpenRequest(buffer_arg) {
|
||||
return cc_arduino_cli_commands_v1_settings_pb.ConfigurationOpenRequest.deserializeBinary(new Uint8Array(buffer_arg));
|
||||
}
|
||||
|
||||
function serialize_cc_arduino_cli_commands_v1_ConfigurationOpenResponse(arg) {
|
||||
if (!(arg instanceof cc_arduino_cli_commands_v1_settings_pb.ConfigurationOpenResponse)) {
|
||||
throw new Error('Expected argument of type cc.arduino.cli.commands.v1.ConfigurationOpenResponse');
|
||||
}
|
||||
return Buffer.from(arg.serializeBinary());
|
||||
}
|
||||
|
||||
function deserialize_cc_arduino_cli_commands_v1_ConfigurationOpenResponse(buffer_arg) {
|
||||
return cc_arduino_cli_commands_v1_settings_pb.ConfigurationOpenResponse.deserializeBinary(new Uint8Array(buffer_arg));
|
||||
}
|
||||
|
||||
function serialize_cc_arduino_cli_commands_v1_ConfigurationSaveRequest(arg) {
|
||||
if (!(arg instanceof cc_arduino_cli_commands_v1_settings_pb.ConfigurationSaveRequest)) {
|
||||
throw new Error('Expected argument of type cc.arduino.cli.commands.v1.ConfigurationSaveRequest');
|
||||
}
|
||||
return Buffer.from(arg.serializeBinary());
|
||||
}
|
||||
|
||||
function deserialize_cc_arduino_cli_commands_v1_ConfigurationSaveRequest(buffer_arg) {
|
||||
return cc_arduino_cli_commands_v1_settings_pb.ConfigurationSaveRequest.deserializeBinary(new Uint8Array(buffer_arg));
|
||||
}
|
||||
|
||||
function serialize_cc_arduino_cli_commands_v1_ConfigurationSaveResponse(arg) {
|
||||
if (!(arg instanceof cc_arduino_cli_commands_v1_settings_pb.ConfigurationSaveResponse)) {
|
||||
throw new Error('Expected argument of type cc.arduino.cli.commands.v1.ConfigurationSaveResponse');
|
||||
}
|
||||
return Buffer.from(arg.serializeBinary());
|
||||
}
|
||||
|
||||
function deserialize_cc_arduino_cli_commands_v1_ConfigurationSaveResponse(buffer_arg) {
|
||||
return cc_arduino_cli_commands_v1_settings_pb.ConfigurationSaveResponse.deserializeBinary(new Uint8Array(buffer_arg));
|
||||
}
|
||||
|
||||
function serialize_cc_arduino_cli_commands_v1_CreateRequest(arg) {
|
||||
if (!(arg instanceof cc_arduino_cli_commands_v1_commands_pb.CreateRequest)) {
|
||||
throw new Error('Expected argument of type cc.arduino.cli.commands.v1.CreateRequest');
|
||||
@@ -688,28 +800,6 @@ function deserialize_cc_arduino_cli_commands_v1_PlatformInstallResponse(buffer_a
|
||||
return cc_arduino_cli_commands_v1_core_pb.PlatformInstallResponse.deserializeBinary(new Uint8Array(buffer_arg));
|
||||
}
|
||||
|
||||
function serialize_cc_arduino_cli_commands_v1_PlatformListRequest(arg) {
|
||||
if (!(arg instanceof cc_arduino_cli_commands_v1_core_pb.PlatformListRequest)) {
|
||||
throw new Error('Expected argument of type cc.arduino.cli.commands.v1.PlatformListRequest');
|
||||
}
|
||||
return Buffer.from(arg.serializeBinary());
|
||||
}
|
||||
|
||||
function deserialize_cc_arduino_cli_commands_v1_PlatformListRequest(buffer_arg) {
|
||||
return cc_arduino_cli_commands_v1_core_pb.PlatformListRequest.deserializeBinary(new Uint8Array(buffer_arg));
|
||||
}
|
||||
|
||||
function serialize_cc_arduino_cli_commands_v1_PlatformListResponse(arg) {
|
||||
if (!(arg instanceof cc_arduino_cli_commands_v1_core_pb.PlatformListResponse)) {
|
||||
throw new Error('Expected argument of type cc.arduino.cli.commands.v1.PlatformListResponse');
|
||||
}
|
||||
return Buffer.from(arg.serializeBinary());
|
||||
}
|
||||
|
||||
function deserialize_cc_arduino_cli_commands_v1_PlatformListResponse(buffer_arg) {
|
||||
return cc_arduino_cli_commands_v1_core_pb.PlatformListResponse.deserializeBinary(new Uint8Array(buffer_arg));
|
||||
}
|
||||
|
||||
function serialize_cc_arduino_cli_commands_v1_PlatformSearchRequest(arg) {
|
||||
if (!(arg instanceof cc_arduino_cli_commands_v1_core_pb.PlatformSearchRequest)) {
|
||||
throw new Error('Expected argument of type cc.arduino.cli.commands.v1.PlatformSearchRequest');
|
||||
@@ -798,6 +888,72 @@ function deserialize_cc_arduino_cli_commands_v1_SetSketchDefaultsResponse(buffer
|
||||
return cc_arduino_cli_commands_v1_commands_pb.SetSketchDefaultsResponse.deserializeBinary(new Uint8Array(buffer_arg));
|
||||
}
|
||||
|
||||
function serialize_cc_arduino_cli_commands_v1_SettingsEnumerateRequest(arg) {
|
||||
if (!(arg instanceof cc_arduino_cli_commands_v1_settings_pb.SettingsEnumerateRequest)) {
|
||||
throw new Error('Expected argument of type cc.arduino.cli.commands.v1.SettingsEnumerateRequest');
|
||||
}
|
||||
return Buffer.from(arg.serializeBinary());
|
||||
}
|
||||
|
||||
function deserialize_cc_arduino_cli_commands_v1_SettingsEnumerateRequest(buffer_arg) {
|
||||
return cc_arduino_cli_commands_v1_settings_pb.SettingsEnumerateRequest.deserializeBinary(new Uint8Array(buffer_arg));
|
||||
}
|
||||
|
||||
function serialize_cc_arduino_cli_commands_v1_SettingsEnumerateResponse(arg) {
|
||||
if (!(arg instanceof cc_arduino_cli_commands_v1_settings_pb.SettingsEnumerateResponse)) {
|
||||
throw new Error('Expected argument of type cc.arduino.cli.commands.v1.SettingsEnumerateResponse');
|
||||
}
|
||||
return Buffer.from(arg.serializeBinary());
|
||||
}
|
||||
|
||||
function deserialize_cc_arduino_cli_commands_v1_SettingsEnumerateResponse(buffer_arg) {
|
||||
return cc_arduino_cli_commands_v1_settings_pb.SettingsEnumerateResponse.deserializeBinary(new Uint8Array(buffer_arg));
|
||||
}
|
||||
|
||||
function serialize_cc_arduino_cli_commands_v1_SettingsGetValueRequest(arg) {
|
||||
if (!(arg instanceof cc_arduino_cli_commands_v1_settings_pb.SettingsGetValueRequest)) {
|
||||
throw new Error('Expected argument of type cc.arduino.cli.commands.v1.SettingsGetValueRequest');
|
||||
}
|
||||
return Buffer.from(arg.serializeBinary());
|
||||
}
|
||||
|
||||
function deserialize_cc_arduino_cli_commands_v1_SettingsGetValueRequest(buffer_arg) {
|
||||
return cc_arduino_cli_commands_v1_settings_pb.SettingsGetValueRequest.deserializeBinary(new Uint8Array(buffer_arg));
|
||||
}
|
||||
|
||||
function serialize_cc_arduino_cli_commands_v1_SettingsGetValueResponse(arg) {
|
||||
if (!(arg instanceof cc_arduino_cli_commands_v1_settings_pb.SettingsGetValueResponse)) {
|
||||
throw new Error('Expected argument of type cc.arduino.cli.commands.v1.SettingsGetValueResponse');
|
||||
}
|
||||
return Buffer.from(arg.serializeBinary());
|
||||
}
|
||||
|
||||
function deserialize_cc_arduino_cli_commands_v1_SettingsGetValueResponse(buffer_arg) {
|
||||
return cc_arduino_cli_commands_v1_settings_pb.SettingsGetValueResponse.deserializeBinary(new Uint8Array(buffer_arg));
|
||||
}
|
||||
|
||||
function serialize_cc_arduino_cli_commands_v1_SettingsSetValueRequest(arg) {
|
||||
if (!(arg instanceof cc_arduino_cli_commands_v1_settings_pb.SettingsSetValueRequest)) {
|
||||
throw new Error('Expected argument of type cc.arduino.cli.commands.v1.SettingsSetValueRequest');
|
||||
}
|
||||
return Buffer.from(arg.serializeBinary());
|
||||
}
|
||||
|
||||
function deserialize_cc_arduino_cli_commands_v1_SettingsSetValueRequest(buffer_arg) {
|
||||
return cc_arduino_cli_commands_v1_settings_pb.SettingsSetValueRequest.deserializeBinary(new Uint8Array(buffer_arg));
|
||||
}
|
||||
|
||||
function serialize_cc_arduino_cli_commands_v1_SettingsSetValueResponse(arg) {
|
||||
if (!(arg instanceof cc_arduino_cli_commands_v1_settings_pb.SettingsSetValueResponse)) {
|
||||
throw new Error('Expected argument of type cc.arduino.cli.commands.v1.SettingsSetValueResponse');
|
||||
}
|
||||
return Buffer.from(arg.serializeBinary());
|
||||
}
|
||||
|
||||
function deserialize_cc_arduino_cli_commands_v1_SettingsSetValueResponse(buffer_arg) {
|
||||
return cc_arduino_cli_commands_v1_settings_pb.SettingsSetValueResponse.deserializeBinary(new Uint8Array(buffer_arg));
|
||||
}
|
||||
|
||||
function serialize_cc_arduino_cli_commands_v1_SupportedUserFieldsRequest(arg) {
|
||||
if (!(arg instanceof cc_arduino_cli_commands_v1_upload_pb.SupportedUserFieldsRequest)) {
|
||||
throw new Error('Expected argument of type cc.arduino.cli.commands.v1.SupportedUserFieldsRequest');
|
||||
@@ -953,9 +1109,9 @@ function deserialize_cc_arduino_cli_commands_v1_ZipLibraryInstallResponse(buffer
|
||||
}
|
||||
|
||||
|
||||
// The main Arduino Platform service API
|
||||
// The main Arduino Platform service API.
|
||||
var ArduinoCoreServiceService = exports['cc.arduino.cli.commands.v1.ArduinoCoreService'] = {
|
||||
// Create a new Arduino Core instance
|
||||
// Create a new Arduino Core instance.
|
||||
create: {
|
||||
path: '/cc.arduino.cli.commands.v1.ArduinoCoreService/Create',
|
||||
requestStream: false,
|
||||
@@ -968,7 +1124,7 @@ create: {
|
||||
responseDeserialize: deserialize_cc_arduino_cli_commands_v1_CreateResponse,
|
||||
},
|
||||
// Initializes an existing Arduino Core instance by loading platforms and
|
||||
// libraries
|
||||
// libraries.
|
||||
init: {
|
||||
path: '/cc.arduino.cli.commands.v1.ArduinoCoreService/Init',
|
||||
requestStream: false,
|
||||
@@ -980,7 +1136,7 @@ init: {
|
||||
responseSerialize: serialize_cc_arduino_cli_commands_v1_InitResponse,
|
||||
responseDeserialize: deserialize_cc_arduino_cli_commands_v1_InitResponse,
|
||||
},
|
||||
// Destroy an instance of the Arduino Core Service
|
||||
// Destroy an instance of the Arduino Core Service.
|
||||
destroy: {
|
||||
path: '/cc.arduino.cli.commands.v1.ArduinoCoreService/Destroy',
|
||||
requestStream: false,
|
||||
@@ -992,7 +1148,7 @@ destroy: {
|
||||
responseSerialize: serialize_cc_arduino_cli_commands_v1_DestroyResponse,
|
||||
responseDeserialize: deserialize_cc_arduino_cli_commands_v1_DestroyResponse,
|
||||
},
|
||||
// Update package index of the Arduino Core Service
|
||||
// Update package index of the Arduino Core Service.
|
||||
updateIndex: {
|
||||
path: '/cc.arduino.cli.commands.v1.ArduinoCoreService/UpdateIndex',
|
||||
requestStream: false,
|
||||
@@ -1004,7 +1160,7 @@ updateIndex: {
|
||||
responseSerialize: serialize_cc_arduino_cli_commands_v1_UpdateIndexResponse,
|
||||
responseDeserialize: deserialize_cc_arduino_cli_commands_v1_UpdateIndexResponse,
|
||||
},
|
||||
// Update libraries index
|
||||
// Update libraries index.
|
||||
updateLibrariesIndex: {
|
||||
path: '/cc.arduino.cli.commands.v1.ArduinoCoreService/UpdateLibrariesIndex',
|
||||
requestStream: false,
|
||||
@@ -1028,7 +1184,7 @@ version: {
|
||||
responseSerialize: serialize_cc_arduino_cli_commands_v1_VersionResponse,
|
||||
responseDeserialize: deserialize_cc_arduino_cli_commands_v1_VersionResponse,
|
||||
},
|
||||
// Create a new Sketch
|
||||
// Create a new Sketch.
|
||||
newSketch: {
|
||||
path: '/cc.arduino.cli.commands.v1.ArduinoCoreService/NewSketch',
|
||||
requestStream: false,
|
||||
@@ -1040,7 +1196,7 @@ newSketch: {
|
||||
responseSerialize: serialize_cc_arduino_cli_commands_v1_NewSketchResponse,
|
||||
responseDeserialize: deserialize_cc_arduino_cli_commands_v1_NewSketchResponse,
|
||||
},
|
||||
// Returns all files composing a Sketch
|
||||
// Returns all files composing a Sketch.
|
||||
loadSketch: {
|
||||
path: '/cc.arduino.cli.commands.v1.ArduinoCoreService/LoadSketch',
|
||||
requestStream: false,
|
||||
@@ -1052,7 +1208,7 @@ loadSketch: {
|
||||
responseSerialize: serialize_cc_arduino_cli_commands_v1_LoadSketchResponse,
|
||||
responseDeserialize: deserialize_cc_arduino_cli_commands_v1_LoadSketchResponse,
|
||||
},
|
||||
// Creates a zip file containing all files of specified Sketch
|
||||
// Creates a zip file containing all files of specified Sketch.
|
||||
archiveSketch: {
|
||||
path: '/cc.arduino.cli.commands.v1.ArduinoCoreService/ArchiveSketch',
|
||||
requestStream: false,
|
||||
@@ -1078,10 +1234,7 @@ setSketchDefaults: {
|
||||
responseSerialize: serialize_cc_arduino_cli_commands_v1_SetSketchDefaultsResponse,
|
||||
responseDeserialize: deserialize_cc_arduino_cli_commands_v1_SetSketchDefaultsResponse,
|
||||
},
|
||||
// BOARD COMMANDS
|
||||
// --------------
|
||||
//
|
||||
// Requests details about a board
|
||||
// Requests details about a board.
|
||||
boardDetails: {
|
||||
path: '/cc.arduino.cli.commands.v1.ArduinoCoreService/BoardDetails',
|
||||
requestStream: false,
|
||||
@@ -1276,18 +1429,6 @@ platformSearch: {
|
||||
responseSerialize: serialize_cc_arduino_cli_commands_v1_PlatformSearchResponse,
|
||||
responseDeserialize: deserialize_cc_arduino_cli_commands_v1_PlatformSearchResponse,
|
||||
},
|
||||
// List all installed platforms.
|
||||
platformList: {
|
||||
path: '/cc.arduino.cli.commands.v1.ArduinoCoreService/PlatformList',
|
||||
requestStream: false,
|
||||
responseStream: false,
|
||||
requestType: cc_arduino_cli_commands_v1_core_pb.PlatformListRequest,
|
||||
responseType: cc_arduino_cli_commands_v1_core_pb.PlatformListResponse,
|
||||
requestSerialize: serialize_cc_arduino_cli_commands_v1_PlatformListRequest,
|
||||
requestDeserialize: deserialize_cc_arduino_cli_commands_v1_PlatformListRequest,
|
||||
responseSerialize: serialize_cc_arduino_cli_commands_v1_PlatformListResponse,
|
||||
responseDeserialize: deserialize_cc_arduino_cli_commands_v1_PlatformListResponse,
|
||||
},
|
||||
// Download the archive file of an Arduino library in the libraries index to
|
||||
// the staging directory.
|
||||
libraryDownload: {
|
||||
@@ -1325,7 +1466,7 @@ libraryUpgrade: {
|
||||
responseSerialize: serialize_cc_arduino_cli_commands_v1_LibraryUpgradeResponse,
|
||||
responseDeserialize: deserialize_cc_arduino_cli_commands_v1_LibraryUpgradeResponse,
|
||||
},
|
||||
// Install a library from a Zip File
|
||||
// Install a library from a Zip File.
|
||||
zipLibraryInstall: {
|
||||
path: '/cc.arduino.cli.commands.v1.ArduinoCoreService/ZipLibraryInstall',
|
||||
requestStream: false,
|
||||
@@ -1337,7 +1478,7 @@ zipLibraryInstall: {
|
||||
responseSerialize: serialize_cc_arduino_cli_commands_v1_ZipLibraryInstallResponse,
|
||||
responseDeserialize: deserialize_cc_arduino_cli_commands_v1_ZipLibraryInstallResponse,
|
||||
},
|
||||
// Download and install a library from a git url
|
||||
// Download and install a library from a git url.
|
||||
gitLibraryInstall: {
|
||||
path: '/cc.arduino.cli.commands.v1.ArduinoCoreService/GitLibraryInstall',
|
||||
requestStream: false,
|
||||
@@ -1410,7 +1551,7 @@ libraryList: {
|
||||
responseSerialize: serialize_cc_arduino_cli_commands_v1_LibraryListResponse,
|
||||
responseDeserialize: deserialize_cc_arduino_cli_commands_v1_LibraryListResponse,
|
||||
},
|
||||
// Open a monitor connection to a board port
|
||||
// Open a monitor connection to a board port.
|
||||
monitor: {
|
||||
path: '/cc.arduino.cli.commands.v1.ArduinoCoreService/Monitor',
|
||||
requestStream: true,
|
||||
@@ -1422,7 +1563,7 @@ monitor: {
|
||||
responseSerialize: serialize_cc_arduino_cli_commands_v1_MonitorResponse,
|
||||
responseDeserialize: deserialize_cc_arduino_cli_commands_v1_MonitorResponse,
|
||||
},
|
||||
// Returns the parameters that can be set in the MonitorRequest calls
|
||||
// Returns the parameters that can be set in the MonitorRequest calls.
|
||||
enumerateMonitorPortSettings: {
|
||||
path: '/cc.arduino.cli.commands.v1.ArduinoCoreService/EnumerateMonitorPortSettings',
|
||||
requestStream: false,
|
||||
@@ -1470,5 +1611,101 @@ getDebugConfig: {
|
||||
responseSerialize: serialize_cc_arduino_cli_commands_v1_GetDebugConfigResponse,
|
||||
responseDeserialize: deserialize_cc_arduino_cli_commands_v1_GetDebugConfigResponse,
|
||||
},
|
||||
// Check for updates to the Arduino CLI.
|
||||
checkForArduinoCLIUpdates: {
|
||||
path: '/cc.arduino.cli.commands.v1.ArduinoCoreService/CheckForArduinoCLIUpdates',
|
||||
requestStream: false,
|
||||
responseStream: false,
|
||||
requestType: cc_arduino_cli_commands_v1_commands_pb.CheckForArduinoCLIUpdatesRequest,
|
||||
responseType: cc_arduino_cli_commands_v1_commands_pb.CheckForArduinoCLIUpdatesResponse,
|
||||
requestSerialize: serialize_cc_arduino_cli_commands_v1_CheckForArduinoCLIUpdatesRequest,
|
||||
requestDeserialize: deserialize_cc_arduino_cli_commands_v1_CheckForArduinoCLIUpdatesRequest,
|
||||
responseSerialize: serialize_cc_arduino_cli_commands_v1_CheckForArduinoCLIUpdatesResponse,
|
||||
responseDeserialize: deserialize_cc_arduino_cli_commands_v1_CheckForArduinoCLIUpdatesResponse,
|
||||
},
|
||||
// Clean the download cache directory (where archives are downloaded).
|
||||
cleanDownloadCacheDirectory: {
|
||||
path: '/cc.arduino.cli.commands.v1.ArduinoCoreService/CleanDownloadCacheDirectory',
|
||||
requestStream: false,
|
||||
responseStream: false,
|
||||
requestType: cc_arduino_cli_commands_v1_commands_pb.CleanDownloadCacheDirectoryRequest,
|
||||
responseType: cc_arduino_cli_commands_v1_commands_pb.CleanDownloadCacheDirectoryResponse,
|
||||
requestSerialize: serialize_cc_arduino_cli_commands_v1_CleanDownloadCacheDirectoryRequest,
|
||||
requestDeserialize: deserialize_cc_arduino_cli_commands_v1_CleanDownloadCacheDirectoryRequest,
|
||||
responseSerialize: serialize_cc_arduino_cli_commands_v1_CleanDownloadCacheDirectoryResponse,
|
||||
responseDeserialize: deserialize_cc_arduino_cli_commands_v1_CleanDownloadCacheDirectoryResponse,
|
||||
},
|
||||
// Writes the settings currently stored in memory in a YAML file.
|
||||
configurationSave: {
|
||||
path: '/cc.arduino.cli.commands.v1.ArduinoCoreService/ConfigurationSave',
|
||||
requestStream: false,
|
||||
responseStream: false,
|
||||
requestType: cc_arduino_cli_commands_v1_settings_pb.ConfigurationSaveRequest,
|
||||
responseType: cc_arduino_cli_commands_v1_settings_pb.ConfigurationSaveResponse,
|
||||
requestSerialize: serialize_cc_arduino_cli_commands_v1_ConfigurationSaveRequest,
|
||||
requestDeserialize: deserialize_cc_arduino_cli_commands_v1_ConfigurationSaveRequest,
|
||||
responseSerialize: serialize_cc_arduino_cli_commands_v1_ConfigurationSaveResponse,
|
||||
responseDeserialize: deserialize_cc_arduino_cli_commands_v1_ConfigurationSaveResponse,
|
||||
},
|
||||
// Read the settings from a YAML file.
|
||||
configurationOpen: {
|
||||
path: '/cc.arduino.cli.commands.v1.ArduinoCoreService/ConfigurationOpen',
|
||||
requestStream: false,
|
||||
responseStream: false,
|
||||
requestType: cc_arduino_cli_commands_v1_settings_pb.ConfigurationOpenRequest,
|
||||
responseType: cc_arduino_cli_commands_v1_settings_pb.ConfigurationOpenResponse,
|
||||
requestSerialize: serialize_cc_arduino_cli_commands_v1_ConfigurationOpenRequest,
|
||||
requestDeserialize: deserialize_cc_arduino_cli_commands_v1_ConfigurationOpenRequest,
|
||||
responseSerialize: serialize_cc_arduino_cli_commands_v1_ConfigurationOpenResponse,
|
||||
responseDeserialize: deserialize_cc_arduino_cli_commands_v1_ConfigurationOpenResponse,
|
||||
},
|
||||
// Get the current configuration.
|
||||
configurationGet: {
|
||||
path: '/cc.arduino.cli.commands.v1.ArduinoCoreService/ConfigurationGet',
|
||||
requestStream: false,
|
||||
responseStream: false,
|
||||
requestType: cc_arduino_cli_commands_v1_settings_pb.ConfigurationGetRequest,
|
||||
responseType: cc_arduino_cli_commands_v1_settings_pb.ConfigurationGetResponse,
|
||||
requestSerialize: serialize_cc_arduino_cli_commands_v1_ConfigurationGetRequest,
|
||||
requestDeserialize: deserialize_cc_arduino_cli_commands_v1_ConfigurationGetRequest,
|
||||
responseSerialize: serialize_cc_arduino_cli_commands_v1_ConfigurationGetResponse,
|
||||
responseDeserialize: deserialize_cc_arduino_cli_commands_v1_ConfigurationGetResponse,
|
||||
},
|
||||
// Enumerate all the keys/values pairs available in the configuration.
|
||||
settingsEnumerate: {
|
||||
path: '/cc.arduino.cli.commands.v1.ArduinoCoreService/SettingsEnumerate',
|
||||
requestStream: false,
|
||||
responseStream: false,
|
||||
requestType: cc_arduino_cli_commands_v1_settings_pb.SettingsEnumerateRequest,
|
||||
responseType: cc_arduino_cli_commands_v1_settings_pb.SettingsEnumerateResponse,
|
||||
requestSerialize: serialize_cc_arduino_cli_commands_v1_SettingsEnumerateRequest,
|
||||
requestDeserialize: deserialize_cc_arduino_cli_commands_v1_SettingsEnumerateRequest,
|
||||
responseSerialize: serialize_cc_arduino_cli_commands_v1_SettingsEnumerateResponse,
|
||||
responseDeserialize: deserialize_cc_arduino_cli_commands_v1_SettingsEnumerateResponse,
|
||||
},
|
||||
// Get a single configuration value.
|
||||
settingsGetValue: {
|
||||
path: '/cc.arduino.cli.commands.v1.ArduinoCoreService/SettingsGetValue',
|
||||
requestStream: false,
|
||||
responseStream: false,
|
||||
requestType: cc_arduino_cli_commands_v1_settings_pb.SettingsGetValueRequest,
|
||||
responseType: cc_arduino_cli_commands_v1_settings_pb.SettingsGetValueResponse,
|
||||
requestSerialize: serialize_cc_arduino_cli_commands_v1_SettingsGetValueRequest,
|
||||
requestDeserialize: deserialize_cc_arduino_cli_commands_v1_SettingsGetValueRequest,
|
||||
responseSerialize: serialize_cc_arduino_cli_commands_v1_SettingsGetValueResponse,
|
||||
responseDeserialize: deserialize_cc_arduino_cli_commands_v1_SettingsGetValueResponse,
|
||||
},
|
||||
// Set a single configuration value.
|
||||
settingsSetValue: {
|
||||
path: '/cc.arduino.cli.commands.v1.ArduinoCoreService/SettingsSetValue',
|
||||
requestStream: false,
|
||||
responseStream: false,
|
||||
requestType: cc_arduino_cli_commands_v1_settings_pb.SettingsSetValueRequest,
|
||||
responseType: cc_arduino_cli_commands_v1_settings_pb.SettingsSetValueResponse,
|
||||
requestSerialize: serialize_cc_arduino_cli_commands_v1_SettingsSetValueRequest,
|
||||
requestDeserialize: deserialize_cc_arduino_cli_commands_v1_SettingsSetValueRequest,
|
||||
responseSerialize: serialize_cc_arduino_cli_commands_v1_SettingsSetValueResponse,
|
||||
responseDeserialize: deserialize_cc_arduino_cli_commands_v1_SettingsSetValueResponse,
|
||||
},
|
||||
};
|
||||
|
||||
|
@@ -5,15 +5,16 @@
|
||||
/* eslint-disable */
|
||||
|
||||
import * as jspb from "google-protobuf";
|
||||
import * as google_rpc_status_pb from "../../../../../google/rpc/status_pb";
|
||||
import * as cc_arduino_cli_commands_v1_common_pb from "../../../../../cc/arduino/cli/commands/v1/common_pb";
|
||||
import * as cc_arduino_cli_commands_v1_board_pb from "../../../../../cc/arduino/cli/commands/v1/board_pb";
|
||||
import * as cc_arduino_cli_commands_v1_common_pb from "../../../../../cc/arduino/cli/commands/v1/common_pb";
|
||||
import * as cc_arduino_cli_commands_v1_compile_pb from "../../../../../cc/arduino/cli/commands/v1/compile_pb";
|
||||
import * as cc_arduino_cli_commands_v1_core_pb from "../../../../../cc/arduino/cli/commands/v1/core_pb";
|
||||
import * as cc_arduino_cli_commands_v1_debug_pb from "../../../../../cc/arduino/cli/commands/v1/debug_pb";
|
||||
import * as cc_arduino_cli_commands_v1_monitor_pb from "../../../../../cc/arduino/cli/commands/v1/monitor_pb";
|
||||
import * as cc_arduino_cli_commands_v1_upload_pb from "../../../../../cc/arduino/cli/commands/v1/upload_pb";
|
||||
import * as cc_arduino_cli_commands_v1_lib_pb from "../../../../../cc/arduino/cli/commands/v1/lib_pb";
|
||||
import * as cc_arduino_cli_commands_v1_monitor_pb from "../../../../../cc/arduino/cli/commands/v1/monitor_pb";
|
||||
import * as cc_arduino_cli_commands_v1_settings_pb from "../../../../../cc/arduino/cli/commands/v1/settings_pb";
|
||||
import * as cc_arduino_cli_commands_v1_upload_pb from "../../../../../cc/arduino/cli/commands/v1/upload_pb";
|
||||
import * as google_rpc_status_pb from "../../../../../google/rpc/status_pb";
|
||||
|
||||
export class CreateRequest extends jspb.Message {
|
||||
|
||||
@@ -98,8 +99,8 @@ export class InitResponse extends jspb.Message {
|
||||
|
||||
hasProfile(): boolean;
|
||||
clearProfile(): void;
|
||||
getProfile(): cc_arduino_cli_commands_v1_common_pb.Profile | undefined;
|
||||
setProfile(value?: cc_arduino_cli_commands_v1_common_pb.Profile): InitResponse;
|
||||
getProfile(): cc_arduino_cli_commands_v1_common_pb.SketchProfile | undefined;
|
||||
setProfile(value?: cc_arduino_cli_commands_v1_common_pb.SketchProfile): InitResponse;
|
||||
|
||||
getMessageCase(): InitResponse.MessageCase;
|
||||
|
||||
@@ -117,7 +118,7 @@ export namespace InitResponse {
|
||||
export type AsObject = {
|
||||
initProgress?: InitResponse.Progress.AsObject,
|
||||
error?: google_rpc_status_pb.Status.AsObject,
|
||||
profile?: cc_arduino_cli_commands_v1_common_pb.Profile.AsObject,
|
||||
profile?: cc_arduino_cli_commands_v1_common_pb.SketchProfile.AsObject,
|
||||
}
|
||||
|
||||
|
||||
@@ -231,6 +232,8 @@ export class UpdateIndexRequest extends jspb.Message {
|
||||
setInstance(value?: cc_arduino_cli_commands_v1_common_pb.Instance): UpdateIndexRequest;
|
||||
getIgnoreCustomPackageIndexes(): boolean;
|
||||
setIgnoreCustomPackageIndexes(value: boolean): UpdateIndexRequest;
|
||||
getUpdateIfOlderThanSecs(): number;
|
||||
setUpdateIfOlderThanSecs(value: number): UpdateIndexRequest;
|
||||
|
||||
serializeBinary(): Uint8Array;
|
||||
toObject(includeInstance?: boolean): UpdateIndexRequest.AsObject;
|
||||
@@ -246,6 +249,7 @@ export namespace UpdateIndexRequest {
|
||||
export type AsObject = {
|
||||
instance?: cc_arduino_cli_commands_v1_common_pb.Instance.AsObject,
|
||||
ignoreCustomPackageIndexes: boolean,
|
||||
updateIfOlderThanSecs: number,
|
||||
}
|
||||
}
|
||||
|
||||
@@ -256,6 +260,13 @@ export class UpdateIndexResponse extends jspb.Message {
|
||||
getDownloadProgress(): cc_arduino_cli_commands_v1_common_pb.DownloadProgress | undefined;
|
||||
setDownloadProgress(value?: cc_arduino_cli_commands_v1_common_pb.DownloadProgress): UpdateIndexResponse;
|
||||
|
||||
hasResult(): boolean;
|
||||
clearResult(): void;
|
||||
getResult(): UpdateIndexResponse.Result | undefined;
|
||||
setResult(value?: UpdateIndexResponse.Result): UpdateIndexResponse;
|
||||
|
||||
getMessageCase(): UpdateIndexResponse.MessageCase;
|
||||
|
||||
serializeBinary(): Uint8Array;
|
||||
toObject(includeInstance?: boolean): UpdateIndexResponse.AsObject;
|
||||
static toObject(includeInstance: boolean, msg: UpdateIndexResponse): UpdateIndexResponse.AsObject;
|
||||
@@ -269,7 +280,39 @@ export class UpdateIndexResponse extends jspb.Message {
|
||||
export namespace UpdateIndexResponse {
|
||||
export type AsObject = {
|
||||
downloadProgress?: cc_arduino_cli_commands_v1_common_pb.DownloadProgress.AsObject,
|
||||
result?: UpdateIndexResponse.Result.AsObject,
|
||||
}
|
||||
|
||||
|
||||
export class Result extends jspb.Message {
|
||||
clearUpdatedIndexesList(): void;
|
||||
getUpdatedIndexesList(): Array<IndexUpdateReport>;
|
||||
setUpdatedIndexesList(value: Array<IndexUpdateReport>): Result;
|
||||
addUpdatedIndexes(value?: IndexUpdateReport, index?: number): IndexUpdateReport;
|
||||
|
||||
serializeBinary(): Uint8Array;
|
||||
toObject(includeInstance?: boolean): Result.AsObject;
|
||||
static toObject(includeInstance: boolean, msg: Result): Result.AsObject;
|
||||
static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};
|
||||
static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};
|
||||
static serializeBinaryToWriter(message: Result, writer: jspb.BinaryWriter): void;
|
||||
static deserializeBinary(bytes: Uint8Array): Result;
|
||||
static deserializeBinaryFromReader(message: Result, reader: jspb.BinaryReader): Result;
|
||||
}
|
||||
|
||||
export namespace Result {
|
||||
export type AsObject = {
|
||||
updatedIndexesList: Array<IndexUpdateReport.AsObject>,
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
export enum MessageCase {
|
||||
MESSAGE_NOT_SET = 0,
|
||||
DOWNLOAD_PROGRESS = 1,
|
||||
RESULT = 2,
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
export class UpdateLibrariesIndexRequest extends jspb.Message {
|
||||
@@ -278,6 +321,8 @@ export class UpdateLibrariesIndexRequest extends jspb.Message {
|
||||
clearInstance(): void;
|
||||
getInstance(): cc_arduino_cli_commands_v1_common_pb.Instance | undefined;
|
||||
setInstance(value?: cc_arduino_cli_commands_v1_common_pb.Instance): UpdateLibrariesIndexRequest;
|
||||
getUpdateIfOlderThanSecs(): number;
|
||||
setUpdateIfOlderThanSecs(value: number): UpdateLibrariesIndexRequest;
|
||||
|
||||
serializeBinary(): Uint8Array;
|
||||
toObject(includeInstance?: boolean): UpdateLibrariesIndexRequest.AsObject;
|
||||
@@ -292,6 +337,7 @@ export class UpdateLibrariesIndexRequest extends jspb.Message {
|
||||
export namespace UpdateLibrariesIndexRequest {
|
||||
export type AsObject = {
|
||||
instance?: cc_arduino_cli_commands_v1_common_pb.Instance.AsObject,
|
||||
updateIfOlderThanSecs: number,
|
||||
}
|
||||
}
|
||||
|
||||
@@ -302,6 +348,13 @@ export class UpdateLibrariesIndexResponse extends jspb.Message {
|
||||
getDownloadProgress(): cc_arduino_cli_commands_v1_common_pb.DownloadProgress | undefined;
|
||||
setDownloadProgress(value?: cc_arduino_cli_commands_v1_common_pb.DownloadProgress): UpdateLibrariesIndexResponse;
|
||||
|
||||
hasResult(): boolean;
|
||||
clearResult(): void;
|
||||
getResult(): UpdateLibrariesIndexResponse.Result | undefined;
|
||||
setResult(value?: UpdateLibrariesIndexResponse.Result): UpdateLibrariesIndexResponse;
|
||||
|
||||
getMessageCase(): UpdateLibrariesIndexResponse.MessageCase;
|
||||
|
||||
serializeBinary(): Uint8Array;
|
||||
toObject(includeInstance?: boolean): UpdateLibrariesIndexResponse.AsObject;
|
||||
static toObject(includeInstance: boolean, msg: UpdateLibrariesIndexResponse): UpdateLibrariesIndexResponse.AsObject;
|
||||
@@ -315,7 +368,72 @@ export class UpdateLibrariesIndexResponse extends jspb.Message {
|
||||
export namespace UpdateLibrariesIndexResponse {
|
||||
export type AsObject = {
|
||||
downloadProgress?: cc_arduino_cli_commands_v1_common_pb.DownloadProgress.AsObject,
|
||||
result?: UpdateLibrariesIndexResponse.Result.AsObject,
|
||||
}
|
||||
|
||||
|
||||
export class Result extends jspb.Message {
|
||||
|
||||
hasLibrariesIndex(): boolean;
|
||||
clearLibrariesIndex(): void;
|
||||
getLibrariesIndex(): IndexUpdateReport | undefined;
|
||||
setLibrariesIndex(value?: IndexUpdateReport): Result;
|
||||
|
||||
serializeBinary(): Uint8Array;
|
||||
toObject(includeInstance?: boolean): Result.AsObject;
|
||||
static toObject(includeInstance: boolean, msg: Result): Result.AsObject;
|
||||
static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};
|
||||
static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};
|
||||
static serializeBinaryToWriter(message: Result, writer: jspb.BinaryWriter): void;
|
||||
static deserializeBinary(bytes: Uint8Array): Result;
|
||||
static deserializeBinaryFromReader(message: Result, reader: jspb.BinaryReader): Result;
|
||||
}
|
||||
|
||||
export namespace Result {
|
||||
export type AsObject = {
|
||||
librariesIndex?: IndexUpdateReport.AsObject,
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
export enum MessageCase {
|
||||
MESSAGE_NOT_SET = 0,
|
||||
DOWNLOAD_PROGRESS = 1,
|
||||
RESULT = 2,
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
export class IndexUpdateReport extends jspb.Message {
|
||||
getIndexUrl(): string;
|
||||
setIndexUrl(value: string): IndexUpdateReport;
|
||||
getStatus(): IndexUpdateReport.Status;
|
||||
setStatus(value: IndexUpdateReport.Status): IndexUpdateReport;
|
||||
|
||||
serializeBinary(): Uint8Array;
|
||||
toObject(includeInstance?: boolean): IndexUpdateReport.AsObject;
|
||||
static toObject(includeInstance: boolean, msg: IndexUpdateReport): IndexUpdateReport.AsObject;
|
||||
static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};
|
||||
static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};
|
||||
static serializeBinaryToWriter(message: IndexUpdateReport, writer: jspb.BinaryWriter): void;
|
||||
static deserializeBinary(bytes: Uint8Array): IndexUpdateReport;
|
||||
static deserializeBinaryFromReader(message: IndexUpdateReport, reader: jspb.BinaryReader): IndexUpdateReport;
|
||||
}
|
||||
|
||||
export namespace IndexUpdateReport {
|
||||
export type AsObject = {
|
||||
indexUrl: string,
|
||||
status: IndexUpdateReport.Status,
|
||||
}
|
||||
|
||||
export enum Status {
|
||||
STATUS_UNSPECIFIED = 0,
|
||||
STATUS_UPDATED = 1,
|
||||
STATUS_ALREADY_UP_TO_DATE = 2,
|
||||
STATUS_FAILED = 3,
|
||||
STATUS_SKIPPED = 4,
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
export class VersionRequest extends jspb.Message {
|
||||
@@ -421,61 +539,12 @@ export namespace LoadSketchRequest {
|
||||
}
|
||||
}
|
||||
|
||||
export class SketchProfile extends jspb.Message {
|
||||
getName(): string;
|
||||
setName(value: string): SketchProfile;
|
||||
getFqbn(): string;
|
||||
setFqbn(value: string): SketchProfile;
|
||||
|
||||
serializeBinary(): Uint8Array;
|
||||
toObject(includeInstance?: boolean): SketchProfile.AsObject;
|
||||
static toObject(includeInstance: boolean, msg: SketchProfile): SketchProfile.AsObject;
|
||||
static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};
|
||||
static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};
|
||||
static serializeBinaryToWriter(message: SketchProfile, writer: jspb.BinaryWriter): void;
|
||||
static deserializeBinary(bytes: Uint8Array): SketchProfile;
|
||||
static deserializeBinaryFromReader(message: SketchProfile, reader: jspb.BinaryReader): SketchProfile;
|
||||
}
|
||||
|
||||
export namespace SketchProfile {
|
||||
export type AsObject = {
|
||||
name: string,
|
||||
fqbn: string,
|
||||
}
|
||||
}
|
||||
|
||||
export class LoadSketchResponse extends jspb.Message {
|
||||
getMainFile(): string;
|
||||
setMainFile(value: string): LoadSketchResponse;
|
||||
getLocationPath(): string;
|
||||
setLocationPath(value: string): LoadSketchResponse;
|
||||
clearOtherSketchFilesList(): void;
|
||||
getOtherSketchFilesList(): Array<string>;
|
||||
setOtherSketchFilesList(value: Array<string>): LoadSketchResponse;
|
||||
addOtherSketchFiles(value: string, index?: number): string;
|
||||
clearAdditionalFilesList(): void;
|
||||
getAdditionalFilesList(): Array<string>;
|
||||
setAdditionalFilesList(value: Array<string>): LoadSketchResponse;
|
||||
addAdditionalFiles(value: string, index?: number): string;
|
||||
clearRootFolderFilesList(): void;
|
||||
getRootFolderFilesList(): Array<string>;
|
||||
setRootFolderFilesList(value: Array<string>): LoadSketchResponse;
|
||||
addRootFolderFiles(value: string, index?: number): string;
|
||||
getDefaultFqbn(): string;
|
||||
setDefaultFqbn(value: string): LoadSketchResponse;
|
||||
getDefaultPort(): string;
|
||||
setDefaultPort(value: string): LoadSketchResponse;
|
||||
getDefaultProtocol(): string;
|
||||
setDefaultProtocol(value: string): LoadSketchResponse;
|
||||
clearProfilesList(): void;
|
||||
getProfilesList(): Array<SketchProfile>;
|
||||
setProfilesList(value: Array<SketchProfile>): LoadSketchResponse;
|
||||
addProfiles(value?: SketchProfile, index?: number): SketchProfile;
|
||||
|
||||
hasDefaultProfile(): boolean;
|
||||
clearDefaultProfile(): void;
|
||||
getDefaultProfile(): SketchProfile | undefined;
|
||||
setDefaultProfile(value?: SketchProfile): LoadSketchResponse;
|
||||
hasSketch(): boolean;
|
||||
clearSketch(): void;
|
||||
getSketch(): cc_arduino_cli_commands_v1_common_pb.Sketch | undefined;
|
||||
setSketch(value?: cc_arduino_cli_commands_v1_common_pb.Sketch): LoadSketchResponse;
|
||||
|
||||
serializeBinary(): Uint8Array;
|
||||
toObject(includeInstance?: boolean): LoadSketchResponse.AsObject;
|
||||
@@ -489,16 +558,7 @@ export class LoadSketchResponse extends jspb.Message {
|
||||
|
||||
export namespace LoadSketchResponse {
|
||||
export type AsObject = {
|
||||
mainFile: string,
|
||||
locationPath: string,
|
||||
otherSketchFilesList: Array<string>,
|
||||
additionalFilesList: Array<string>,
|
||||
rootFolderFilesList: Array<string>,
|
||||
defaultFqbn: string,
|
||||
defaultPort: string,
|
||||
defaultProtocol: string,
|
||||
profilesList: Array<SketchProfile.AsObject>,
|
||||
defaultProfile?: SketchProfile.AsObject,
|
||||
sketch?: cc_arduino_cli_commands_v1_common_pb.Sketch.AsObject,
|
||||
}
|
||||
}
|
||||
|
||||
@@ -557,6 +617,8 @@ export class SetSketchDefaultsRequest extends jspb.Message {
|
||||
setDefaultPortAddress(value: string): SetSketchDefaultsRequest;
|
||||
getDefaultPortProtocol(): string;
|
||||
setDefaultPortProtocol(value: string): SetSketchDefaultsRequest;
|
||||
getDefaultProgrammer(): string;
|
||||
setDefaultProgrammer(value: string): SetSketchDefaultsRequest;
|
||||
|
||||
serializeBinary(): Uint8Array;
|
||||
toObject(includeInstance?: boolean): SetSketchDefaultsRequest.AsObject;
|
||||
@@ -574,6 +636,7 @@ export namespace SetSketchDefaultsRequest {
|
||||
defaultFqbn: string,
|
||||
defaultPortAddress: string,
|
||||
defaultPortProtocol: string,
|
||||
defaultProgrammer: string,
|
||||
}
|
||||
}
|
||||
|
||||
@@ -584,6 +647,8 @@ export class SetSketchDefaultsResponse extends jspb.Message {
|
||||
setDefaultPortAddress(value: string): SetSketchDefaultsResponse;
|
||||
getDefaultPortProtocol(): string;
|
||||
setDefaultPortProtocol(value: string): SetSketchDefaultsResponse;
|
||||
getDefaultProgrammer(): string;
|
||||
setDefaultProgrammer(value: string): SetSketchDefaultsResponse;
|
||||
|
||||
serializeBinary(): Uint8Array;
|
||||
toObject(includeInstance?: boolean): SetSketchDefaultsResponse.AsObject;
|
||||
@@ -600,6 +665,87 @@ export namespace SetSketchDefaultsResponse {
|
||||
defaultFqbn: string,
|
||||
defaultPortAddress: string,
|
||||
defaultPortProtocol: string,
|
||||
defaultProgrammer: string,
|
||||
}
|
||||
}
|
||||
|
||||
export class CheckForArduinoCLIUpdatesRequest extends jspb.Message {
|
||||
getForceCheck(): boolean;
|
||||
setForceCheck(value: boolean): CheckForArduinoCLIUpdatesRequest;
|
||||
|
||||
serializeBinary(): Uint8Array;
|
||||
toObject(includeInstance?: boolean): CheckForArduinoCLIUpdatesRequest.AsObject;
|
||||
static toObject(includeInstance: boolean, msg: CheckForArduinoCLIUpdatesRequest): CheckForArduinoCLIUpdatesRequest.AsObject;
|
||||
static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};
|
||||
static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};
|
||||
static serializeBinaryToWriter(message: CheckForArduinoCLIUpdatesRequest, writer: jspb.BinaryWriter): void;
|
||||
static deserializeBinary(bytes: Uint8Array): CheckForArduinoCLIUpdatesRequest;
|
||||
static deserializeBinaryFromReader(message: CheckForArduinoCLIUpdatesRequest, reader: jspb.BinaryReader): CheckForArduinoCLIUpdatesRequest;
|
||||
}
|
||||
|
||||
export namespace CheckForArduinoCLIUpdatesRequest {
|
||||
export type AsObject = {
|
||||
forceCheck: boolean,
|
||||
}
|
||||
}
|
||||
|
||||
export class CheckForArduinoCLIUpdatesResponse extends jspb.Message {
|
||||
getNewestVersion(): string;
|
||||
setNewestVersion(value: string): CheckForArduinoCLIUpdatesResponse;
|
||||
|
||||
serializeBinary(): Uint8Array;
|
||||
toObject(includeInstance?: boolean): CheckForArduinoCLIUpdatesResponse.AsObject;
|
||||
static toObject(includeInstance: boolean, msg: CheckForArduinoCLIUpdatesResponse): CheckForArduinoCLIUpdatesResponse.AsObject;
|
||||
static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};
|
||||
static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};
|
||||
static serializeBinaryToWriter(message: CheckForArduinoCLIUpdatesResponse, writer: jspb.BinaryWriter): void;
|
||||
static deserializeBinary(bytes: Uint8Array): CheckForArduinoCLIUpdatesResponse;
|
||||
static deserializeBinaryFromReader(message: CheckForArduinoCLIUpdatesResponse, reader: jspb.BinaryReader): CheckForArduinoCLIUpdatesResponse;
|
||||
}
|
||||
|
||||
export namespace CheckForArduinoCLIUpdatesResponse {
|
||||
export type AsObject = {
|
||||
newestVersion: string,
|
||||
}
|
||||
}
|
||||
|
||||
export class CleanDownloadCacheDirectoryRequest extends jspb.Message {
|
||||
|
||||
hasInstance(): boolean;
|
||||
clearInstance(): void;
|
||||
getInstance(): cc_arduino_cli_commands_v1_common_pb.Instance | undefined;
|
||||
setInstance(value?: cc_arduino_cli_commands_v1_common_pb.Instance): CleanDownloadCacheDirectoryRequest;
|
||||
|
||||
serializeBinary(): Uint8Array;
|
||||
toObject(includeInstance?: boolean): CleanDownloadCacheDirectoryRequest.AsObject;
|
||||
static toObject(includeInstance: boolean, msg: CleanDownloadCacheDirectoryRequest): CleanDownloadCacheDirectoryRequest.AsObject;
|
||||
static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};
|
||||
static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};
|
||||
static serializeBinaryToWriter(message: CleanDownloadCacheDirectoryRequest, writer: jspb.BinaryWriter): void;
|
||||
static deserializeBinary(bytes: Uint8Array): CleanDownloadCacheDirectoryRequest;
|
||||
static deserializeBinaryFromReader(message: CleanDownloadCacheDirectoryRequest, reader: jspb.BinaryReader): CleanDownloadCacheDirectoryRequest;
|
||||
}
|
||||
|
||||
export namespace CleanDownloadCacheDirectoryRequest {
|
||||
export type AsObject = {
|
||||
instance?: cc_arduino_cli_commands_v1_common_pb.Instance.AsObject,
|
||||
}
|
||||
}
|
||||
|
||||
export class CleanDownloadCacheDirectoryResponse extends jspb.Message {
|
||||
|
||||
serializeBinary(): Uint8Array;
|
||||
toObject(includeInstance?: boolean): CleanDownloadCacheDirectoryResponse.AsObject;
|
||||
static toObject(includeInstance: boolean, msg: CleanDownloadCacheDirectoryResponse): CleanDownloadCacheDirectoryResponse.AsObject;
|
||||
static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};
|
||||
static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};
|
||||
static serializeBinaryToWriter(message: CleanDownloadCacheDirectoryResponse, writer: jspb.BinaryWriter): void;
|
||||
static deserializeBinary(bytes: Uint8Array): CleanDownloadCacheDirectoryResponse;
|
||||
static deserializeBinaryFromReader(message: CleanDownloadCacheDirectoryResponse, reader: jspb.BinaryReader): CleanDownloadCacheDirectoryResponse;
|
||||
}
|
||||
|
||||
export namespace CleanDownloadCacheDirectoryResponse {
|
||||
export type AsObject = {
|
||||
}
|
||||
}
|
||||
|
||||
|
File diff suppressed because it is too large
Load Diff
@@ -213,41 +213,16 @@ export namespace MissingProgrammerError {
|
||||
}
|
||||
|
||||
export class Platform extends jspb.Message {
|
||||
getId(): string;
|
||||
setId(value: string): Platform;
|
||||
getInstalled(): string;
|
||||
setInstalled(value: string): Platform;
|
||||
getLatest(): string;
|
||||
setLatest(value: string): Platform;
|
||||
getName(): string;
|
||||
setName(value: string): Platform;
|
||||
getMaintainer(): string;
|
||||
setMaintainer(value: string): Platform;
|
||||
getWebsite(): string;
|
||||
setWebsite(value: string): Platform;
|
||||
getEmail(): string;
|
||||
setEmail(value: string): Platform;
|
||||
clearBoardsList(): void;
|
||||
getBoardsList(): Array<Board>;
|
||||
setBoardsList(value: Array<Board>): Platform;
|
||||
addBoards(value?: Board, index?: number): Board;
|
||||
getManuallyInstalled(): boolean;
|
||||
setManuallyInstalled(value: boolean): Platform;
|
||||
getDeprecated(): boolean;
|
||||
setDeprecated(value: boolean): Platform;
|
||||
clearTypeList(): void;
|
||||
getTypeList(): Array<string>;
|
||||
setTypeList(value: Array<string>): Platform;
|
||||
addType(value: string, index?: number): string;
|
||||
|
||||
hasHelp(): boolean;
|
||||
clearHelp(): void;
|
||||
getHelp(): HelpResources | undefined;
|
||||
setHelp(value?: HelpResources): Platform;
|
||||
getIndexed(): boolean;
|
||||
setIndexed(value: boolean): Platform;
|
||||
getMissingMetadata(): boolean;
|
||||
setMissingMetadata(value: boolean): Platform;
|
||||
hasMetadata(): boolean;
|
||||
clearMetadata(): void;
|
||||
getMetadata(): PlatformMetadata | undefined;
|
||||
setMetadata(value?: PlatformMetadata): Platform;
|
||||
|
||||
hasRelease(): boolean;
|
||||
clearRelease(): void;
|
||||
getRelease(): PlatformRelease | undefined;
|
||||
setRelease(value?: PlatformRelease): Platform;
|
||||
|
||||
serializeBinary(): Uint8Array;
|
||||
toObject(includeInstance?: boolean): Platform.AsObject;
|
||||
@@ -260,21 +235,132 @@ export class Platform extends jspb.Message {
|
||||
}
|
||||
|
||||
export namespace Platform {
|
||||
export type AsObject = {
|
||||
metadata?: PlatformMetadata.AsObject,
|
||||
release?: PlatformRelease.AsObject,
|
||||
}
|
||||
}
|
||||
|
||||
export class PlatformSummary extends jspb.Message {
|
||||
|
||||
hasMetadata(): boolean;
|
||||
clearMetadata(): void;
|
||||
getMetadata(): PlatformMetadata | undefined;
|
||||
setMetadata(value?: PlatformMetadata): PlatformSummary;
|
||||
|
||||
getReleasesMap(): jspb.Map<string, PlatformRelease>;
|
||||
clearReleasesMap(): void;
|
||||
getInstalledVersion(): string;
|
||||
setInstalledVersion(value: string): PlatformSummary;
|
||||
getLatestVersion(): string;
|
||||
setLatestVersion(value: string): PlatformSummary;
|
||||
|
||||
serializeBinary(): Uint8Array;
|
||||
toObject(includeInstance?: boolean): PlatformSummary.AsObject;
|
||||
static toObject(includeInstance: boolean, msg: PlatformSummary): PlatformSummary.AsObject;
|
||||
static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};
|
||||
static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};
|
||||
static serializeBinaryToWriter(message: PlatformSummary, writer: jspb.BinaryWriter): void;
|
||||
static deserializeBinary(bytes: Uint8Array): PlatformSummary;
|
||||
static deserializeBinaryFromReader(message: PlatformSummary, reader: jspb.BinaryReader): PlatformSummary;
|
||||
}
|
||||
|
||||
export namespace PlatformSummary {
|
||||
export type AsObject = {
|
||||
metadata?: PlatformMetadata.AsObject,
|
||||
|
||||
releasesMap: Array<[string, PlatformRelease.AsObject]>,
|
||||
installedVersion: string,
|
||||
latestVersion: string,
|
||||
}
|
||||
}
|
||||
|
||||
export class PlatformMetadata extends jspb.Message {
|
||||
getId(): string;
|
||||
setId(value: string): PlatformMetadata;
|
||||
getMaintainer(): string;
|
||||
setMaintainer(value: string): PlatformMetadata;
|
||||
getWebsite(): string;
|
||||
setWebsite(value: string): PlatformMetadata;
|
||||
getEmail(): string;
|
||||
setEmail(value: string): PlatformMetadata;
|
||||
getManuallyInstalled(): boolean;
|
||||
setManuallyInstalled(value: boolean): PlatformMetadata;
|
||||
getDeprecated(): boolean;
|
||||
setDeprecated(value: boolean): PlatformMetadata;
|
||||
getIndexed(): boolean;
|
||||
setIndexed(value: boolean): PlatformMetadata;
|
||||
|
||||
serializeBinary(): Uint8Array;
|
||||
toObject(includeInstance?: boolean): PlatformMetadata.AsObject;
|
||||
static toObject(includeInstance: boolean, msg: PlatformMetadata): PlatformMetadata.AsObject;
|
||||
static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};
|
||||
static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};
|
||||
static serializeBinaryToWriter(message: PlatformMetadata, writer: jspb.BinaryWriter): void;
|
||||
static deserializeBinary(bytes: Uint8Array): PlatformMetadata;
|
||||
static deserializeBinaryFromReader(message: PlatformMetadata, reader: jspb.BinaryReader): PlatformMetadata;
|
||||
}
|
||||
|
||||
export namespace PlatformMetadata {
|
||||
export type AsObject = {
|
||||
id: string,
|
||||
installed: string,
|
||||
latest: string,
|
||||
name: string,
|
||||
maintainer: string,
|
||||
website: string,
|
||||
email: string,
|
||||
boardsList: Array<Board.AsObject>,
|
||||
manuallyInstalled: boolean,
|
||||
deprecated: boolean,
|
||||
typeList: Array<string>,
|
||||
help?: HelpResources.AsObject,
|
||||
indexed: boolean,
|
||||
}
|
||||
}
|
||||
|
||||
export class PlatformRelease extends jspb.Message {
|
||||
getName(): string;
|
||||
setName(value: string): PlatformRelease;
|
||||
getVersion(): string;
|
||||
setVersion(value: string): PlatformRelease;
|
||||
clearTypesList(): void;
|
||||
getTypesList(): Array<string>;
|
||||
setTypesList(value: Array<string>): PlatformRelease;
|
||||
addTypes(value: string, index?: number): string;
|
||||
getInstalled(): boolean;
|
||||
setInstalled(value: boolean): PlatformRelease;
|
||||
clearBoardsList(): void;
|
||||
getBoardsList(): Array<Board>;
|
||||
setBoardsList(value: Array<Board>): PlatformRelease;
|
||||
addBoards(value?: Board, index?: number): Board;
|
||||
|
||||
hasHelp(): boolean;
|
||||
clearHelp(): void;
|
||||
getHelp(): HelpResources | undefined;
|
||||
setHelp(value?: HelpResources): PlatformRelease;
|
||||
getMissingMetadata(): boolean;
|
||||
setMissingMetadata(value: boolean): PlatformRelease;
|
||||
getDeprecated(): boolean;
|
||||
setDeprecated(value: boolean): PlatformRelease;
|
||||
getCompatible(): boolean;
|
||||
setCompatible(value: boolean): PlatformRelease;
|
||||
|
||||
serializeBinary(): Uint8Array;
|
||||
toObject(includeInstance?: boolean): PlatformRelease.AsObject;
|
||||
static toObject(includeInstance: boolean, msg: PlatformRelease): PlatformRelease.AsObject;
|
||||
static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};
|
||||
static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};
|
||||
static serializeBinaryToWriter(message: PlatformRelease, writer: jspb.BinaryWriter): void;
|
||||
static deserializeBinary(bytes: Uint8Array): PlatformRelease;
|
||||
static deserializeBinaryFromReader(message: PlatformRelease, reader: jspb.BinaryReader): PlatformRelease;
|
||||
}
|
||||
|
||||
export namespace PlatformRelease {
|
||||
export type AsObject = {
|
||||
name: string,
|
||||
version: string,
|
||||
typesList: Array<string>,
|
||||
installed: boolean,
|
||||
boardsList: Array<Board.AsObject>,
|
||||
help?: HelpResources.AsObject,
|
||||
missingMetadata: boolean,
|
||||
deprecated: boolean,
|
||||
compatible: boolean,
|
||||
}
|
||||
}
|
||||
|
||||
@@ -330,29 +416,6 @@ export namespace Board {
|
||||
}
|
||||
}
|
||||
|
||||
export class Profile extends jspb.Message {
|
||||
getName(): string;
|
||||
setName(value: string): Profile;
|
||||
getFqbn(): string;
|
||||
setFqbn(value: string): Profile;
|
||||
|
||||
serializeBinary(): Uint8Array;
|
||||
toObject(includeInstance?: boolean): Profile.AsObject;
|
||||
static toObject(includeInstance: boolean, msg: Profile): Profile.AsObject;
|
||||
static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};
|
||||
static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};
|
||||
static serializeBinaryToWriter(message: Profile, writer: jspb.BinaryWriter): void;
|
||||
static deserializeBinary(bytes: Uint8Array): Profile;
|
||||
static deserializeBinaryFromReader(message: Profile, reader: jspb.BinaryReader): Profile;
|
||||
}
|
||||
|
||||
export namespace Profile {
|
||||
export type AsObject = {
|
||||
name: string,
|
||||
fqbn: string,
|
||||
}
|
||||
}
|
||||
|
||||
export class HelpResources extends jspb.Message {
|
||||
getOnline(): string;
|
||||
setOnline(value: string): HelpResources;
|
||||
@@ -372,3 +435,153 @@ export namespace HelpResources {
|
||||
online: string,
|
||||
}
|
||||
}
|
||||
|
||||
export class Sketch extends jspb.Message {
|
||||
getMainFile(): string;
|
||||
setMainFile(value: string): Sketch;
|
||||
getLocationPath(): string;
|
||||
setLocationPath(value: string): Sketch;
|
||||
clearOtherSketchFilesList(): void;
|
||||
getOtherSketchFilesList(): Array<string>;
|
||||
setOtherSketchFilesList(value: Array<string>): Sketch;
|
||||
addOtherSketchFiles(value: string, index?: number): string;
|
||||
clearAdditionalFilesList(): void;
|
||||
getAdditionalFilesList(): Array<string>;
|
||||
setAdditionalFilesList(value: Array<string>): Sketch;
|
||||
addAdditionalFiles(value: string, index?: number): string;
|
||||
clearRootFolderFilesList(): void;
|
||||
getRootFolderFilesList(): Array<string>;
|
||||
setRootFolderFilesList(value: Array<string>): Sketch;
|
||||
addRootFolderFiles(value: string, index?: number): string;
|
||||
getDefaultFqbn(): string;
|
||||
setDefaultFqbn(value: string): Sketch;
|
||||
getDefaultPort(): string;
|
||||
setDefaultPort(value: string): Sketch;
|
||||
getDefaultProtocol(): string;
|
||||
setDefaultProtocol(value: string): Sketch;
|
||||
clearProfilesList(): void;
|
||||
getProfilesList(): Array<SketchProfile>;
|
||||
setProfilesList(value: Array<SketchProfile>): Sketch;
|
||||
addProfiles(value?: SketchProfile, index?: number): SketchProfile;
|
||||
|
||||
hasDefaultProfile(): boolean;
|
||||
clearDefaultProfile(): void;
|
||||
getDefaultProfile(): SketchProfile | undefined;
|
||||
setDefaultProfile(value?: SketchProfile): Sketch;
|
||||
getDefaultProgrammer(): string;
|
||||
setDefaultProgrammer(value: string): Sketch;
|
||||
|
||||
hasDefaultPortConfig(): boolean;
|
||||
clearDefaultPortConfig(): void;
|
||||
getDefaultPortConfig(): MonitorPortConfiguration | undefined;
|
||||
setDefaultPortConfig(value?: MonitorPortConfiguration): Sketch;
|
||||
|
||||
serializeBinary(): Uint8Array;
|
||||
toObject(includeInstance?: boolean): Sketch.AsObject;
|
||||
static toObject(includeInstance: boolean, msg: Sketch): Sketch.AsObject;
|
||||
static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};
|
||||
static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};
|
||||
static serializeBinaryToWriter(message: Sketch, writer: jspb.BinaryWriter): void;
|
||||
static deserializeBinary(bytes: Uint8Array): Sketch;
|
||||
static deserializeBinaryFromReader(message: Sketch, reader: jspb.BinaryReader): Sketch;
|
||||
}
|
||||
|
||||
export namespace Sketch {
|
||||
export type AsObject = {
|
||||
mainFile: string,
|
||||
locationPath: string,
|
||||
otherSketchFilesList: Array<string>,
|
||||
additionalFilesList: Array<string>,
|
||||
rootFolderFilesList: Array<string>,
|
||||
defaultFqbn: string,
|
||||
defaultPort: string,
|
||||
defaultProtocol: string,
|
||||
profilesList: Array<SketchProfile.AsObject>,
|
||||
defaultProfile?: SketchProfile.AsObject,
|
||||
defaultProgrammer: string,
|
||||
defaultPortConfig?: MonitorPortConfiguration.AsObject,
|
||||
}
|
||||
}
|
||||
|
||||
export class MonitorPortConfiguration extends jspb.Message {
|
||||
clearSettingsList(): void;
|
||||
getSettingsList(): Array<MonitorPortSetting>;
|
||||
setSettingsList(value: Array<MonitorPortSetting>): MonitorPortConfiguration;
|
||||
addSettings(value?: MonitorPortSetting, index?: number): MonitorPortSetting;
|
||||
|
||||
serializeBinary(): Uint8Array;
|
||||
toObject(includeInstance?: boolean): MonitorPortConfiguration.AsObject;
|
||||
static toObject(includeInstance: boolean, msg: MonitorPortConfiguration): MonitorPortConfiguration.AsObject;
|
||||
static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};
|
||||
static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};
|
||||
static serializeBinaryToWriter(message: MonitorPortConfiguration, writer: jspb.BinaryWriter): void;
|
||||
static deserializeBinary(bytes: Uint8Array): MonitorPortConfiguration;
|
||||
static deserializeBinaryFromReader(message: MonitorPortConfiguration, reader: jspb.BinaryReader): MonitorPortConfiguration;
|
||||
}
|
||||
|
||||
export namespace MonitorPortConfiguration {
|
||||
export type AsObject = {
|
||||
settingsList: Array<MonitorPortSetting.AsObject>,
|
||||
}
|
||||
}
|
||||
|
||||
export class MonitorPortSetting extends jspb.Message {
|
||||
getSettingId(): string;
|
||||
setSettingId(value: string): MonitorPortSetting;
|
||||
getValue(): string;
|
||||
setValue(value: string): MonitorPortSetting;
|
||||
|
||||
serializeBinary(): Uint8Array;
|
||||
toObject(includeInstance?: boolean): MonitorPortSetting.AsObject;
|
||||
static toObject(includeInstance: boolean, msg: MonitorPortSetting): MonitorPortSetting.AsObject;
|
||||
static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};
|
||||
static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};
|
||||
static serializeBinaryToWriter(message: MonitorPortSetting, writer: jspb.BinaryWriter): void;
|
||||
static deserializeBinary(bytes: Uint8Array): MonitorPortSetting;
|
||||
static deserializeBinaryFromReader(message: MonitorPortSetting, reader: jspb.BinaryReader): MonitorPortSetting;
|
||||
}
|
||||
|
||||
export namespace MonitorPortSetting {
|
||||
export type AsObject = {
|
||||
settingId: string,
|
||||
value: string,
|
||||
}
|
||||
}
|
||||
|
||||
export class SketchProfile extends jspb.Message {
|
||||
getName(): string;
|
||||
setName(value: string): SketchProfile;
|
||||
getFqbn(): string;
|
||||
setFqbn(value: string): SketchProfile;
|
||||
getProgrammer(): string;
|
||||
setProgrammer(value: string): SketchProfile;
|
||||
getPort(): string;
|
||||
setPort(value: string): SketchProfile;
|
||||
|
||||
hasPortConfig(): boolean;
|
||||
clearPortConfig(): void;
|
||||
getPortConfig(): MonitorPortConfiguration | undefined;
|
||||
setPortConfig(value?: MonitorPortConfiguration): SketchProfile;
|
||||
getProtocol(): string;
|
||||
setProtocol(value: string): SketchProfile;
|
||||
|
||||
serializeBinary(): Uint8Array;
|
||||
toObject(includeInstance?: boolean): SketchProfile.AsObject;
|
||||
static toObject(includeInstance: boolean, msg: SketchProfile): SketchProfile.AsObject;
|
||||
static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};
|
||||
static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};
|
||||
static serializeBinaryToWriter(message: SketchProfile, writer: jspb.BinaryWriter): void;
|
||||
static deserializeBinary(bytes: Uint8Array): SketchProfile;
|
||||
static deserializeBinaryFromReader(message: SketchProfile, reader: jspb.BinaryReader): SketchProfile;
|
||||
}
|
||||
|
||||
export namespace SketchProfile {
|
||||
export type AsObject = {
|
||||
name: string,
|
||||
fqbn: string,
|
||||
programmer: string,
|
||||
port: string,
|
||||
portConfig?: MonitorPortConfiguration.AsObject,
|
||||
protocol: string,
|
||||
}
|
||||
}
|
||||
|
File diff suppressed because it is too large
Load Diff
@@ -5,7 +5,6 @@
|
||||
/* eslint-disable */
|
||||
|
||||
import * as jspb from "google-protobuf";
|
||||
import * as google_protobuf_wrappers_pb from "google-protobuf/google/protobuf/wrappers_pb";
|
||||
import * as cc_arduino_cli_commands_v1_common_pb from "../../../../../cc/arduino/cli/commands/v1/common_pb";
|
||||
import * as cc_arduino_cli_commands_v1_lib_pb from "../../../../../cc/arduino/cli/commands/v1/lib_pb";
|
||||
|
||||
@@ -57,8 +56,8 @@ export class CompileRequest extends jspb.Message {
|
||||
|
||||
hasExportBinaries(): boolean;
|
||||
clearExportBinaries(): void;
|
||||
getExportBinaries(): google_protobuf_wrappers_pb.BoolValue | undefined;
|
||||
setExportBinaries(value?: google_protobuf_wrappers_pb.BoolValue): CompileRequest;
|
||||
getExportBinaries(): boolean | undefined;
|
||||
setExportBinaries(value: boolean): CompileRequest;
|
||||
clearLibraryList(): void;
|
||||
getLibraryList(): Array<string>;
|
||||
setLibraryList(value: Array<string>): CompileRequest;
|
||||
@@ -73,6 +72,10 @@ export class CompileRequest extends jspb.Message {
|
||||
setSkipLibrariesDiscovery(value: boolean): CompileRequest;
|
||||
getDoNotExpandBuildProperties(): boolean;
|
||||
setDoNotExpandBuildProperties(value: boolean): CompileRequest;
|
||||
clearBuildCacheExtraPathsList(): void;
|
||||
getBuildCacheExtraPathsList(): Array<string>;
|
||||
setBuildCacheExtraPathsList(value: Array<string>): CompileRequest;
|
||||
addBuildCacheExtraPaths(value: string, index?: number): string;
|
||||
|
||||
serializeBinary(): Uint8Array;
|
||||
toObject(includeInstance?: boolean): CompileRequest.AsObject;
|
||||
@@ -105,54 +108,44 @@ export namespace CompileRequest {
|
||||
createCompilationDatabaseOnly: boolean,
|
||||
|
||||
sourceOverrideMap: Array<[string, string]>,
|
||||
exportBinaries?: google_protobuf_wrappers_pb.BoolValue.AsObject,
|
||||
exportBinaries?: boolean,
|
||||
libraryList: Array<string>,
|
||||
keysKeychain: string,
|
||||
signKey: string,
|
||||
encryptKey: string,
|
||||
skipLibrariesDiscovery: boolean,
|
||||
doNotExpandBuildProperties: boolean,
|
||||
buildCacheExtraPathsList: Array<string>,
|
||||
}
|
||||
}
|
||||
|
||||
export class CompileResponse extends jspb.Message {
|
||||
|
||||
hasOutStream(): boolean;
|
||||
clearOutStream(): void;
|
||||
getOutStream(): Uint8Array | string;
|
||||
getOutStream_asU8(): Uint8Array;
|
||||
getOutStream_asB64(): string;
|
||||
setOutStream(value: Uint8Array | string): CompileResponse;
|
||||
|
||||
hasErrStream(): boolean;
|
||||
clearErrStream(): void;
|
||||
getErrStream(): Uint8Array | string;
|
||||
getErrStream_asU8(): Uint8Array;
|
||||
getErrStream_asB64(): string;
|
||||
setErrStream(value: Uint8Array | string): CompileResponse;
|
||||
getBuildPath(): string;
|
||||
setBuildPath(value: string): CompileResponse;
|
||||
clearUsedLibrariesList(): void;
|
||||
getUsedLibrariesList(): Array<cc_arduino_cli_commands_v1_lib_pb.Library>;
|
||||
setUsedLibrariesList(value: Array<cc_arduino_cli_commands_v1_lib_pb.Library>): CompileResponse;
|
||||
addUsedLibraries(value?: cc_arduino_cli_commands_v1_lib_pb.Library, index?: number): cc_arduino_cli_commands_v1_lib_pb.Library;
|
||||
clearExecutableSectionsSizeList(): void;
|
||||
getExecutableSectionsSizeList(): Array<ExecutableSectionSize>;
|
||||
setExecutableSectionsSizeList(value: Array<ExecutableSectionSize>): CompileResponse;
|
||||
addExecutableSectionsSize(value?: ExecutableSectionSize, index?: number): ExecutableSectionSize;
|
||||
|
||||
hasBoardPlatform(): boolean;
|
||||
clearBoardPlatform(): void;
|
||||
getBoardPlatform(): cc_arduino_cli_commands_v1_common_pb.InstalledPlatformReference | undefined;
|
||||
setBoardPlatform(value?: cc_arduino_cli_commands_v1_common_pb.InstalledPlatformReference): CompileResponse;
|
||||
|
||||
hasBuildPlatform(): boolean;
|
||||
clearBuildPlatform(): void;
|
||||
getBuildPlatform(): cc_arduino_cli_commands_v1_common_pb.InstalledPlatformReference | undefined;
|
||||
setBuildPlatform(value?: cc_arduino_cli_commands_v1_common_pb.InstalledPlatformReference): CompileResponse;
|
||||
|
||||
hasProgress(): boolean;
|
||||
clearProgress(): void;
|
||||
getProgress(): cc_arduino_cli_commands_v1_common_pb.TaskProgress | undefined;
|
||||
setProgress(value?: cc_arduino_cli_commands_v1_common_pb.TaskProgress): CompileResponse;
|
||||
clearBuildPropertiesList(): void;
|
||||
getBuildPropertiesList(): Array<string>;
|
||||
setBuildPropertiesList(value: Array<string>): CompileResponse;
|
||||
addBuildProperties(value: string, index?: number): string;
|
||||
|
||||
hasResult(): boolean;
|
||||
clearResult(): void;
|
||||
getResult(): BuilderResult | undefined;
|
||||
setResult(value?: BuilderResult): CompileResponse;
|
||||
|
||||
getMessageCase(): CompileResponse.MessageCase;
|
||||
|
||||
serializeBinary(): Uint8Array;
|
||||
toObject(includeInstance?: boolean): CompileResponse.AsObject;
|
||||
@@ -168,13 +161,86 @@ export namespace CompileResponse {
|
||||
export type AsObject = {
|
||||
outStream: Uint8Array | string,
|
||||
errStream: Uint8Array | string,
|
||||
progress?: cc_arduino_cli_commands_v1_common_pb.TaskProgress.AsObject,
|
||||
result?: BuilderResult.AsObject,
|
||||
}
|
||||
|
||||
export enum MessageCase {
|
||||
MESSAGE_NOT_SET = 0,
|
||||
OUT_STREAM = 1,
|
||||
ERR_STREAM = 2,
|
||||
PROGRESS = 3,
|
||||
RESULT = 4,
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
export class InstanceNeedsReinitializationError extends jspb.Message {
|
||||
|
||||
serializeBinary(): Uint8Array;
|
||||
toObject(includeInstance?: boolean): InstanceNeedsReinitializationError.AsObject;
|
||||
static toObject(includeInstance: boolean, msg: InstanceNeedsReinitializationError): InstanceNeedsReinitializationError.AsObject;
|
||||
static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};
|
||||
static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};
|
||||
static serializeBinaryToWriter(message: InstanceNeedsReinitializationError, writer: jspb.BinaryWriter): void;
|
||||
static deserializeBinary(bytes: Uint8Array): InstanceNeedsReinitializationError;
|
||||
static deserializeBinaryFromReader(message: InstanceNeedsReinitializationError, reader: jspb.BinaryReader): InstanceNeedsReinitializationError;
|
||||
}
|
||||
|
||||
export namespace InstanceNeedsReinitializationError {
|
||||
export type AsObject = {
|
||||
}
|
||||
}
|
||||
|
||||
export class BuilderResult extends jspb.Message {
|
||||
getBuildPath(): string;
|
||||
setBuildPath(value: string): BuilderResult;
|
||||
clearUsedLibrariesList(): void;
|
||||
getUsedLibrariesList(): Array<cc_arduino_cli_commands_v1_lib_pb.Library>;
|
||||
setUsedLibrariesList(value: Array<cc_arduino_cli_commands_v1_lib_pb.Library>): BuilderResult;
|
||||
addUsedLibraries(value?: cc_arduino_cli_commands_v1_lib_pb.Library, index?: number): cc_arduino_cli_commands_v1_lib_pb.Library;
|
||||
clearExecutableSectionsSizeList(): void;
|
||||
getExecutableSectionsSizeList(): Array<ExecutableSectionSize>;
|
||||
setExecutableSectionsSizeList(value: Array<ExecutableSectionSize>): BuilderResult;
|
||||
addExecutableSectionsSize(value?: ExecutableSectionSize, index?: number): ExecutableSectionSize;
|
||||
|
||||
hasBoardPlatform(): boolean;
|
||||
clearBoardPlatform(): void;
|
||||
getBoardPlatform(): cc_arduino_cli_commands_v1_common_pb.InstalledPlatformReference | undefined;
|
||||
setBoardPlatform(value?: cc_arduino_cli_commands_v1_common_pb.InstalledPlatformReference): BuilderResult;
|
||||
|
||||
hasBuildPlatform(): boolean;
|
||||
clearBuildPlatform(): void;
|
||||
getBuildPlatform(): cc_arduino_cli_commands_v1_common_pb.InstalledPlatformReference | undefined;
|
||||
setBuildPlatform(value?: cc_arduino_cli_commands_v1_common_pb.InstalledPlatformReference): BuilderResult;
|
||||
clearBuildPropertiesList(): void;
|
||||
getBuildPropertiesList(): Array<string>;
|
||||
setBuildPropertiesList(value: Array<string>): BuilderResult;
|
||||
addBuildProperties(value: string, index?: number): string;
|
||||
clearDiagnosticsList(): void;
|
||||
getDiagnosticsList(): Array<CompileDiagnostic>;
|
||||
setDiagnosticsList(value: Array<CompileDiagnostic>): BuilderResult;
|
||||
addDiagnostics(value?: CompileDiagnostic, index?: number): CompileDiagnostic;
|
||||
|
||||
serializeBinary(): Uint8Array;
|
||||
toObject(includeInstance?: boolean): BuilderResult.AsObject;
|
||||
static toObject(includeInstance: boolean, msg: BuilderResult): BuilderResult.AsObject;
|
||||
static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};
|
||||
static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};
|
||||
static serializeBinaryToWriter(message: BuilderResult, writer: jspb.BinaryWriter): void;
|
||||
static deserializeBinary(bytes: Uint8Array): BuilderResult;
|
||||
static deserializeBinaryFromReader(message: BuilderResult, reader: jspb.BinaryReader): BuilderResult;
|
||||
}
|
||||
|
||||
export namespace BuilderResult {
|
||||
export type AsObject = {
|
||||
buildPath: string,
|
||||
usedLibrariesList: Array<cc_arduino_cli_commands_v1_lib_pb.Library.AsObject>,
|
||||
executableSectionsSizeList: Array<ExecutableSectionSize.AsObject>,
|
||||
boardPlatform?: cc_arduino_cli_commands_v1_common_pb.InstalledPlatformReference.AsObject,
|
||||
buildPlatform?: cc_arduino_cli_commands_v1_common_pb.InstalledPlatformReference.AsObject,
|
||||
progress?: cc_arduino_cli_commands_v1_common_pb.TaskProgress.AsObject,
|
||||
buildPropertiesList: Array<string>,
|
||||
diagnosticsList: Array<CompileDiagnostic.AsObject>,
|
||||
}
|
||||
}
|
||||
|
||||
@@ -203,3 +269,103 @@ export namespace ExecutableSectionSize {
|
||||
maxSize: number,
|
||||
}
|
||||
}
|
||||
|
||||
export class CompileDiagnostic extends jspb.Message {
|
||||
getSeverity(): string;
|
||||
setSeverity(value: string): CompileDiagnostic;
|
||||
getMessage(): string;
|
||||
setMessage(value: string): CompileDiagnostic;
|
||||
getFile(): string;
|
||||
setFile(value: string): CompileDiagnostic;
|
||||
getLine(): number;
|
||||
setLine(value: number): CompileDiagnostic;
|
||||
getColumn(): number;
|
||||
setColumn(value: number): CompileDiagnostic;
|
||||
clearContextList(): void;
|
||||
getContextList(): Array<CompileDiagnosticContext>;
|
||||
setContextList(value: Array<CompileDiagnosticContext>): CompileDiagnostic;
|
||||
addContext(value?: CompileDiagnosticContext, index?: number): CompileDiagnosticContext;
|
||||
clearNotesList(): void;
|
||||
getNotesList(): Array<CompileDiagnosticNote>;
|
||||
setNotesList(value: Array<CompileDiagnosticNote>): CompileDiagnostic;
|
||||
addNotes(value?: CompileDiagnosticNote, index?: number): CompileDiagnosticNote;
|
||||
|
||||
serializeBinary(): Uint8Array;
|
||||
toObject(includeInstance?: boolean): CompileDiagnostic.AsObject;
|
||||
static toObject(includeInstance: boolean, msg: CompileDiagnostic): CompileDiagnostic.AsObject;
|
||||
static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};
|
||||
static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};
|
||||
static serializeBinaryToWriter(message: CompileDiagnostic, writer: jspb.BinaryWriter): void;
|
||||
static deserializeBinary(bytes: Uint8Array): CompileDiagnostic;
|
||||
static deserializeBinaryFromReader(message: CompileDiagnostic, reader: jspb.BinaryReader): CompileDiagnostic;
|
||||
}
|
||||
|
||||
export namespace CompileDiagnostic {
|
||||
export type AsObject = {
|
||||
severity: string,
|
||||
message: string,
|
||||
file: string,
|
||||
line: number,
|
||||
column: number,
|
||||
contextList: Array<CompileDiagnosticContext.AsObject>,
|
||||
notesList: Array<CompileDiagnosticNote.AsObject>,
|
||||
}
|
||||
}
|
||||
|
||||
export class CompileDiagnosticContext extends jspb.Message {
|
||||
getMessage(): string;
|
||||
setMessage(value: string): CompileDiagnosticContext;
|
||||
getFile(): string;
|
||||
setFile(value: string): CompileDiagnosticContext;
|
||||
getLine(): number;
|
||||
setLine(value: number): CompileDiagnosticContext;
|
||||
getColumn(): number;
|
||||
setColumn(value: number): CompileDiagnosticContext;
|
||||
|
||||
serializeBinary(): Uint8Array;
|
||||
toObject(includeInstance?: boolean): CompileDiagnosticContext.AsObject;
|
||||
static toObject(includeInstance: boolean, msg: CompileDiagnosticContext): CompileDiagnosticContext.AsObject;
|
||||
static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};
|
||||
static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};
|
||||
static serializeBinaryToWriter(message: CompileDiagnosticContext, writer: jspb.BinaryWriter): void;
|
||||
static deserializeBinary(bytes: Uint8Array): CompileDiagnosticContext;
|
||||
static deserializeBinaryFromReader(message: CompileDiagnosticContext, reader: jspb.BinaryReader): CompileDiagnosticContext;
|
||||
}
|
||||
|
||||
export namespace CompileDiagnosticContext {
|
||||
export type AsObject = {
|
||||
message: string,
|
||||
file: string,
|
||||
line: number,
|
||||
column: number,
|
||||
}
|
||||
}
|
||||
|
||||
export class CompileDiagnosticNote extends jspb.Message {
|
||||
getMessage(): string;
|
||||
setMessage(value: string): CompileDiagnosticNote;
|
||||
getFile(): string;
|
||||
setFile(value: string): CompileDiagnosticNote;
|
||||
getLine(): number;
|
||||
setLine(value: number): CompileDiagnosticNote;
|
||||
getColumn(): number;
|
||||
setColumn(value: number): CompileDiagnosticNote;
|
||||
|
||||
serializeBinary(): Uint8Array;
|
||||
toObject(includeInstance?: boolean): CompileDiagnosticNote.AsObject;
|
||||
static toObject(includeInstance: boolean, msg: CompileDiagnosticNote): CompileDiagnosticNote.AsObject;
|
||||
static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};
|
||||
static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};
|
||||
static serializeBinaryToWriter(message: CompileDiagnosticNote, writer: jspb.BinaryWriter): void;
|
||||
static deserializeBinary(bytes: Uint8Array): CompileDiagnosticNote;
|
||||
static deserializeBinaryFromReader(message: CompileDiagnosticNote, reader: jspb.BinaryReader): CompileDiagnosticNote;
|
||||
}
|
||||
|
||||
export namespace CompileDiagnosticNote {
|
||||
export type AsObject = {
|
||||
message: string,
|
||||
file: string,
|
||||
line: number,
|
||||
column: number,
|
||||
}
|
||||
}
|
||||
|
File diff suppressed because it is too large
Load Diff
@@ -60,6 +60,13 @@ export class PlatformInstallResponse extends jspb.Message {
|
||||
getTaskProgress(): cc_arduino_cli_commands_v1_common_pb.TaskProgress | undefined;
|
||||
setTaskProgress(value?: cc_arduino_cli_commands_v1_common_pb.TaskProgress): PlatformInstallResponse;
|
||||
|
||||
hasResult(): boolean;
|
||||
clearResult(): void;
|
||||
getResult(): PlatformInstallResponse.Result | undefined;
|
||||
setResult(value?: PlatformInstallResponse.Result): PlatformInstallResponse;
|
||||
|
||||
getMessageCase(): PlatformInstallResponse.MessageCase;
|
||||
|
||||
serializeBinary(): Uint8Array;
|
||||
toObject(includeInstance?: boolean): PlatformInstallResponse.AsObject;
|
||||
static toObject(includeInstance: boolean, msg: PlatformInstallResponse): PlatformInstallResponse.AsObject;
|
||||
@@ -74,7 +81,35 @@ export namespace PlatformInstallResponse {
|
||||
export type AsObject = {
|
||||
progress?: cc_arduino_cli_commands_v1_common_pb.DownloadProgress.AsObject,
|
||||
taskProgress?: cc_arduino_cli_commands_v1_common_pb.TaskProgress.AsObject,
|
||||
result?: PlatformInstallResponse.Result.AsObject,
|
||||
}
|
||||
|
||||
|
||||
export class Result extends jspb.Message {
|
||||
|
||||
serializeBinary(): Uint8Array;
|
||||
toObject(includeInstance?: boolean): Result.AsObject;
|
||||
static toObject(includeInstance: boolean, msg: Result): Result.AsObject;
|
||||
static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};
|
||||
static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};
|
||||
static serializeBinaryToWriter(message: Result, writer: jspb.BinaryWriter): void;
|
||||
static deserializeBinary(bytes: Uint8Array): Result;
|
||||
static deserializeBinaryFromReader(message: Result, reader: jspb.BinaryReader): Result;
|
||||
}
|
||||
|
||||
export namespace Result {
|
||||
export type AsObject = {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
export enum MessageCase {
|
||||
MESSAGE_NOT_SET = 0,
|
||||
PROGRESS = 1,
|
||||
TASK_PROGRESS = 2,
|
||||
RESULT = 3,
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
export class PlatformLoadingError extends jspb.Message {
|
||||
@@ -133,6 +168,13 @@ export class PlatformDownloadResponse extends jspb.Message {
|
||||
getProgress(): cc_arduino_cli_commands_v1_common_pb.DownloadProgress | undefined;
|
||||
setProgress(value?: cc_arduino_cli_commands_v1_common_pb.DownloadProgress): PlatformDownloadResponse;
|
||||
|
||||
hasResult(): boolean;
|
||||
clearResult(): void;
|
||||
getResult(): PlatformDownloadResponse.Result | undefined;
|
||||
setResult(value?: PlatformDownloadResponse.Result): PlatformDownloadResponse;
|
||||
|
||||
getMessageCase(): PlatformDownloadResponse.MessageCase;
|
||||
|
||||
serializeBinary(): Uint8Array;
|
||||
toObject(includeInstance?: boolean): PlatformDownloadResponse.AsObject;
|
||||
static toObject(includeInstance: boolean, msg: PlatformDownloadResponse): PlatformDownloadResponse.AsObject;
|
||||
@@ -146,7 +188,34 @@ export class PlatformDownloadResponse extends jspb.Message {
|
||||
export namespace PlatformDownloadResponse {
|
||||
export type AsObject = {
|
||||
progress?: cc_arduino_cli_commands_v1_common_pb.DownloadProgress.AsObject,
|
||||
result?: PlatformDownloadResponse.Result.AsObject,
|
||||
}
|
||||
|
||||
|
||||
export class Result extends jspb.Message {
|
||||
|
||||
serializeBinary(): Uint8Array;
|
||||
toObject(includeInstance?: boolean): Result.AsObject;
|
||||
static toObject(includeInstance: boolean, msg: Result): Result.AsObject;
|
||||
static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};
|
||||
static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};
|
||||
static serializeBinaryToWriter(message: Result, writer: jspb.BinaryWriter): void;
|
||||
static deserializeBinary(bytes: Uint8Array): Result;
|
||||
static deserializeBinaryFromReader(message: Result, reader: jspb.BinaryReader): Result;
|
||||
}
|
||||
|
||||
export namespace Result {
|
||||
export type AsObject = {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
export enum MessageCase {
|
||||
MESSAGE_NOT_SET = 0,
|
||||
PROGRESS = 1,
|
||||
RESULT = 2,
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
export class PlatformUninstallRequest extends jspb.Message {
|
||||
@@ -188,6 +257,13 @@ export class PlatformUninstallResponse extends jspb.Message {
|
||||
getTaskProgress(): cc_arduino_cli_commands_v1_common_pb.TaskProgress | undefined;
|
||||
setTaskProgress(value?: cc_arduino_cli_commands_v1_common_pb.TaskProgress): PlatformUninstallResponse;
|
||||
|
||||
hasResult(): boolean;
|
||||
clearResult(): void;
|
||||
getResult(): PlatformUninstallResponse.Result | undefined;
|
||||
setResult(value?: PlatformUninstallResponse.Result): PlatformUninstallResponse;
|
||||
|
||||
getMessageCase(): PlatformUninstallResponse.MessageCase;
|
||||
|
||||
serializeBinary(): Uint8Array;
|
||||
toObject(includeInstance?: boolean): PlatformUninstallResponse.AsObject;
|
||||
static toObject(includeInstance: boolean, msg: PlatformUninstallResponse): PlatformUninstallResponse.AsObject;
|
||||
@@ -201,7 +277,34 @@ export class PlatformUninstallResponse extends jspb.Message {
|
||||
export namespace PlatformUninstallResponse {
|
||||
export type AsObject = {
|
||||
taskProgress?: cc_arduino_cli_commands_v1_common_pb.TaskProgress.AsObject,
|
||||
result?: PlatformUninstallResponse.Result.AsObject,
|
||||
}
|
||||
|
||||
|
||||
export class Result extends jspb.Message {
|
||||
|
||||
serializeBinary(): Uint8Array;
|
||||
toObject(includeInstance?: boolean): Result.AsObject;
|
||||
static toObject(includeInstance: boolean, msg: Result): Result.AsObject;
|
||||
static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};
|
||||
static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};
|
||||
static serializeBinaryToWriter(message: Result, writer: jspb.BinaryWriter): void;
|
||||
static deserializeBinary(bytes: Uint8Array): Result;
|
||||
static deserializeBinaryFromReader(message: Result, reader: jspb.BinaryReader): Result;
|
||||
}
|
||||
|
||||
export namespace Result {
|
||||
export type AsObject = {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
export enum MessageCase {
|
||||
MESSAGE_NOT_SET = 0,
|
||||
TASK_PROGRESS = 1,
|
||||
RESULT = 2,
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
export class AlreadyAtLatestVersionError extends jspb.Message {
|
||||
@@ -268,10 +371,12 @@ export class PlatformUpgradeResponse extends jspb.Message {
|
||||
getTaskProgress(): cc_arduino_cli_commands_v1_common_pb.TaskProgress | undefined;
|
||||
setTaskProgress(value?: cc_arduino_cli_commands_v1_common_pb.TaskProgress): PlatformUpgradeResponse;
|
||||
|
||||
hasPlatform(): boolean;
|
||||
clearPlatform(): void;
|
||||
getPlatform(): cc_arduino_cli_commands_v1_common_pb.Platform | undefined;
|
||||
setPlatform(value?: cc_arduino_cli_commands_v1_common_pb.Platform): PlatformUpgradeResponse;
|
||||
hasResult(): boolean;
|
||||
clearResult(): void;
|
||||
getResult(): PlatformUpgradeResponse.Result | undefined;
|
||||
setResult(value?: PlatformUpgradeResponse.Result): PlatformUpgradeResponse;
|
||||
|
||||
getMessageCase(): PlatformUpgradeResponse.MessageCase;
|
||||
|
||||
serializeBinary(): Uint8Array;
|
||||
toObject(includeInstance?: boolean): PlatformUpgradeResponse.AsObject;
|
||||
@@ -287,8 +392,41 @@ export namespace PlatformUpgradeResponse {
|
||||
export type AsObject = {
|
||||
progress?: cc_arduino_cli_commands_v1_common_pb.DownloadProgress.AsObject,
|
||||
taskProgress?: cc_arduino_cli_commands_v1_common_pb.TaskProgress.AsObject,
|
||||
platform?: cc_arduino_cli_commands_v1_common_pb.Platform.AsObject,
|
||||
result?: PlatformUpgradeResponse.Result.AsObject,
|
||||
}
|
||||
|
||||
|
||||
export class Result extends jspb.Message {
|
||||
|
||||
hasPlatform(): boolean;
|
||||
clearPlatform(): void;
|
||||
getPlatform(): cc_arduino_cli_commands_v1_common_pb.Platform | undefined;
|
||||
setPlatform(value?: cc_arduino_cli_commands_v1_common_pb.Platform): Result;
|
||||
|
||||
serializeBinary(): Uint8Array;
|
||||
toObject(includeInstance?: boolean): Result.AsObject;
|
||||
static toObject(includeInstance: boolean, msg: Result): Result.AsObject;
|
||||
static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};
|
||||
static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};
|
||||
static serializeBinaryToWriter(message: Result, writer: jspb.BinaryWriter): void;
|
||||
static deserializeBinary(bytes: Uint8Array): Result;
|
||||
static deserializeBinaryFromReader(message: Result, reader: jspb.BinaryReader): Result;
|
||||
}
|
||||
|
||||
export namespace Result {
|
||||
export type AsObject = {
|
||||
platform?: cc_arduino_cli_commands_v1_common_pb.Platform.AsObject,
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
export enum MessageCase {
|
||||
MESSAGE_NOT_SET = 0,
|
||||
PROGRESS = 1,
|
||||
TASK_PROGRESS = 2,
|
||||
RESULT = 3,
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
export class PlatformSearchRequest extends jspb.Message {
|
||||
@@ -299,8 +437,8 @@ export class PlatformSearchRequest extends jspb.Message {
|
||||
setInstance(value?: cc_arduino_cli_commands_v1_common_pb.Instance): PlatformSearchRequest;
|
||||
getSearchArgs(): string;
|
||||
setSearchArgs(value: string): PlatformSearchRequest;
|
||||
getAllVersions(): boolean;
|
||||
setAllVersions(value: boolean): PlatformSearchRequest;
|
||||
getManuallyInstalled(): boolean;
|
||||
setManuallyInstalled(value: boolean): PlatformSearchRequest;
|
||||
|
||||
serializeBinary(): Uint8Array;
|
||||
toObject(includeInstance?: boolean): PlatformSearchRequest.AsObject;
|
||||
@@ -316,15 +454,15 @@ export namespace PlatformSearchRequest {
|
||||
export type AsObject = {
|
||||
instance?: cc_arduino_cli_commands_v1_common_pb.Instance.AsObject,
|
||||
searchArgs: string,
|
||||
allVersions: boolean,
|
||||
manuallyInstalled: boolean,
|
||||
}
|
||||
}
|
||||
|
||||
export class PlatformSearchResponse extends jspb.Message {
|
||||
clearSearchOutputList(): void;
|
||||
getSearchOutputList(): Array<cc_arduino_cli_commands_v1_common_pb.Platform>;
|
||||
setSearchOutputList(value: Array<cc_arduino_cli_commands_v1_common_pb.Platform>): PlatformSearchResponse;
|
||||
addSearchOutput(value?: cc_arduino_cli_commands_v1_common_pb.Platform, index?: number): cc_arduino_cli_commands_v1_common_pb.Platform;
|
||||
getSearchOutputList(): Array<cc_arduino_cli_commands_v1_common_pb.PlatformSummary>;
|
||||
setSearchOutputList(value: Array<cc_arduino_cli_commands_v1_common_pb.PlatformSummary>): PlatformSearchResponse;
|
||||
addSearchOutput(value?: cc_arduino_cli_commands_v1_common_pb.PlatformSummary, index?: number): cc_arduino_cli_commands_v1_common_pb.PlatformSummary;
|
||||
|
||||
serializeBinary(): Uint8Array;
|
||||
toObject(includeInstance?: boolean): PlatformSearchResponse.AsObject;
|
||||
@@ -338,57 +476,6 @@ export class PlatformSearchResponse extends jspb.Message {
|
||||
|
||||
export namespace PlatformSearchResponse {
|
||||
export type AsObject = {
|
||||
searchOutputList: Array<cc_arduino_cli_commands_v1_common_pb.Platform.AsObject>,
|
||||
}
|
||||
}
|
||||
|
||||
export class PlatformListRequest extends jspb.Message {
|
||||
|
||||
hasInstance(): boolean;
|
||||
clearInstance(): void;
|
||||
getInstance(): cc_arduino_cli_commands_v1_common_pb.Instance | undefined;
|
||||
setInstance(value?: cc_arduino_cli_commands_v1_common_pb.Instance): PlatformListRequest;
|
||||
getUpdatableOnly(): boolean;
|
||||
setUpdatableOnly(value: boolean): PlatformListRequest;
|
||||
getAll(): boolean;
|
||||
setAll(value: boolean): PlatformListRequest;
|
||||
|
||||
serializeBinary(): Uint8Array;
|
||||
toObject(includeInstance?: boolean): PlatformListRequest.AsObject;
|
||||
static toObject(includeInstance: boolean, msg: PlatformListRequest): PlatformListRequest.AsObject;
|
||||
static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};
|
||||
static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};
|
||||
static serializeBinaryToWriter(message: PlatformListRequest, writer: jspb.BinaryWriter): void;
|
||||
static deserializeBinary(bytes: Uint8Array): PlatformListRequest;
|
||||
static deserializeBinaryFromReader(message: PlatformListRequest, reader: jspb.BinaryReader): PlatformListRequest;
|
||||
}
|
||||
|
||||
export namespace PlatformListRequest {
|
||||
export type AsObject = {
|
||||
instance?: cc_arduino_cli_commands_v1_common_pb.Instance.AsObject,
|
||||
updatableOnly: boolean,
|
||||
all: boolean,
|
||||
}
|
||||
}
|
||||
|
||||
export class PlatformListResponse extends jspb.Message {
|
||||
clearInstalledPlatformsList(): void;
|
||||
getInstalledPlatformsList(): Array<cc_arduino_cli_commands_v1_common_pb.Platform>;
|
||||
setInstalledPlatformsList(value: Array<cc_arduino_cli_commands_v1_common_pb.Platform>): PlatformListResponse;
|
||||
addInstalledPlatforms(value?: cc_arduino_cli_commands_v1_common_pb.Platform, index?: number): cc_arduino_cli_commands_v1_common_pb.Platform;
|
||||
|
||||
serializeBinary(): Uint8Array;
|
||||
toObject(includeInstance?: boolean): PlatformListResponse.AsObject;
|
||||
static toObject(includeInstance: boolean, msg: PlatformListResponse): PlatformListResponse.AsObject;
|
||||
static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};
|
||||
static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};
|
||||
static serializeBinaryToWriter(message: PlatformListResponse, writer: jspb.BinaryWriter): void;
|
||||
static deserializeBinary(bytes: Uint8Array): PlatformListResponse;
|
||||
static deserializeBinaryFromReader(message: PlatformListResponse, reader: jspb.BinaryReader): PlatformListResponse;
|
||||
}
|
||||
|
||||
export namespace PlatformListResponse {
|
||||
export type AsObject = {
|
||||
installedPlatformsList: Array<cc_arduino_cli_commands_v1_common_pb.Platform.AsObject>,
|
||||
searchOutputList: Array<cc_arduino_cli_commands_v1_common_pb.PlatformSummary.AsObject>,
|
||||
}
|
||||
}
|
||||
|
File diff suppressed because it is too large
Load Diff
@@ -41,12 +41,20 @@ export namespace DebugRequest {
|
||||
}
|
||||
|
||||
export class DebugResponse extends jspb.Message {
|
||||
|
||||
hasData(): boolean;
|
||||
clearData(): void;
|
||||
getData(): Uint8Array | string;
|
||||
getData_asU8(): Uint8Array;
|
||||
getData_asB64(): string;
|
||||
setData(value: Uint8Array | string): DebugResponse;
|
||||
getError(): string;
|
||||
setError(value: string): DebugResponse;
|
||||
|
||||
hasResult(): boolean;
|
||||
clearResult(): void;
|
||||
getResult(): DebugResponse.Result | undefined;
|
||||
setResult(value?: DebugResponse.Result): DebugResponse;
|
||||
|
||||
getMessageCase(): DebugResponse.MessageCase;
|
||||
|
||||
serializeBinary(): Uint8Array;
|
||||
toObject(includeInstance?: boolean): DebugResponse.AsObject;
|
||||
@@ -61,8 +69,37 @@ export class DebugResponse extends jspb.Message {
|
||||
export namespace DebugResponse {
|
||||
export type AsObject = {
|
||||
data: Uint8Array | string,
|
||||
error: string,
|
||||
result?: DebugResponse.Result.AsObject,
|
||||
}
|
||||
|
||||
|
||||
export class Result extends jspb.Message {
|
||||
getError(): string;
|
||||
setError(value: string): Result;
|
||||
|
||||
serializeBinary(): Uint8Array;
|
||||
toObject(includeInstance?: boolean): Result.AsObject;
|
||||
static toObject(includeInstance: boolean, msg: Result): Result.AsObject;
|
||||
static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};
|
||||
static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};
|
||||
static serializeBinaryToWriter(message: Result, writer: jspb.BinaryWriter): void;
|
||||
static deserializeBinary(bytes: Uint8Array): Result;
|
||||
static deserializeBinaryFromReader(message: Result, reader: jspb.BinaryReader): Result;
|
||||
}
|
||||
|
||||
export namespace Result {
|
||||
export type AsObject = {
|
||||
error: string,
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
export enum MessageCase {
|
||||
MESSAGE_NOT_SET = 0,
|
||||
DATA = 1,
|
||||
RESULT = 2,
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
export class IsDebugSupportedRequest extends jspb.Message {
|
||||
@@ -82,6 +119,10 @@ export class IsDebugSupportedRequest extends jspb.Message {
|
||||
setInterpreter(value: string): IsDebugSupportedRequest;
|
||||
getProgrammer(): string;
|
||||
setProgrammer(value: string): IsDebugSupportedRequest;
|
||||
clearDebugPropertiesList(): void;
|
||||
getDebugPropertiesList(): Array<string>;
|
||||
setDebugPropertiesList(value: Array<string>): IsDebugSupportedRequest;
|
||||
addDebugProperties(value: string, index?: number): string;
|
||||
|
||||
serializeBinary(): Uint8Array;
|
||||
toObject(includeInstance?: boolean): IsDebugSupportedRequest.AsObject;
|
||||
@@ -100,6 +141,7 @@ export namespace IsDebugSupportedRequest {
|
||||
port?: cc_arduino_cli_commands_v1_port_pb.Port.AsObject,
|
||||
interpreter: string,
|
||||
programmer: string,
|
||||
debugPropertiesList: Array<string>,
|
||||
}
|
||||
}
|
||||
|
||||
@@ -147,6 +189,10 @@ export class GetDebugConfigRequest extends jspb.Message {
|
||||
setImportDir(value: string): GetDebugConfigRequest;
|
||||
getProgrammer(): string;
|
||||
setProgrammer(value: string): GetDebugConfigRequest;
|
||||
clearDebugPropertiesList(): void;
|
||||
getDebugPropertiesList(): Array<string>;
|
||||
setDebugPropertiesList(value: Array<string>): GetDebugConfigRequest;
|
||||
addDebugProperties(value: string, index?: number): string;
|
||||
|
||||
serializeBinary(): Uint8Array;
|
||||
toObject(includeInstance?: boolean): GetDebugConfigRequest.AsObject;
|
||||
@@ -167,6 +213,7 @@ export namespace GetDebugConfigRequest {
|
||||
interpreter: string,
|
||||
importDir: string,
|
||||
programmer: string,
|
||||
debugPropertiesList: Array<string>,
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -31,6 +31,8 @@ goog.exportSymbol('proto.cc.arduino.cli.commands.v1.DebugGCCToolchainConfigurati
|
||||
goog.exportSymbol('proto.cc.arduino.cli.commands.v1.DebugOpenOCDServerConfiguration', null, global);
|
||||
goog.exportSymbol('proto.cc.arduino.cli.commands.v1.DebugRequest', null, global);
|
||||
goog.exportSymbol('proto.cc.arduino.cli.commands.v1.DebugResponse', null, global);
|
||||
goog.exportSymbol('proto.cc.arduino.cli.commands.v1.DebugResponse.MessageCase', null, global);
|
||||
goog.exportSymbol('proto.cc.arduino.cli.commands.v1.DebugResponse.Result', null, global);
|
||||
goog.exportSymbol('proto.cc.arduino.cli.commands.v1.GetDebugConfigRequest', null, global);
|
||||
goog.exportSymbol('proto.cc.arduino.cli.commands.v1.GetDebugConfigResponse', null, global);
|
||||
goog.exportSymbol('proto.cc.arduino.cli.commands.v1.IsDebugSupportedRequest', null, global);
|
||||
@@ -67,7 +69,7 @@ if (goog.DEBUG && !COMPILED) {
|
||||
* @constructor
|
||||
*/
|
||||
proto.cc.arduino.cli.commands.v1.DebugResponse = function(opt_data) {
|
||||
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
|
||||
jspb.Message.initialize(this, opt_data, 0, -1, null, proto.cc.arduino.cli.commands.v1.DebugResponse.oneofGroups_);
|
||||
};
|
||||
goog.inherits(proto.cc.arduino.cli.commands.v1.DebugResponse, jspb.Message);
|
||||
if (goog.DEBUG && !COMPILED) {
|
||||
@@ -87,9 +89,30 @@ if (goog.DEBUG && !COMPILED) {
|
||||
* @extends {jspb.Message}
|
||||
* @constructor
|
||||
*/
|
||||
proto.cc.arduino.cli.commands.v1.IsDebugSupportedRequest = function(opt_data) {
|
||||
proto.cc.arduino.cli.commands.v1.DebugResponse.Result = function(opt_data) {
|
||||
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
|
||||
};
|
||||
goog.inherits(proto.cc.arduino.cli.commands.v1.DebugResponse.Result, jspb.Message);
|
||||
if (goog.DEBUG && !COMPILED) {
|
||||
/**
|
||||
* @public
|
||||
* @override
|
||||
*/
|
||||
proto.cc.arduino.cli.commands.v1.DebugResponse.Result.displayName = 'proto.cc.arduino.cli.commands.v1.DebugResponse.Result';
|
||||
}
|
||||
/**
|
||||
* Generated by JsPbCodeGenerator.
|
||||
* @param {Array=} opt_data Optional initial data array, typically from a
|
||||
* server response, or constructed directly in Javascript. The array is used
|
||||
* in place and becomes part of the constructed object. It is not cloned.
|
||||
* If no data is provided, the constructed object will be empty, but still
|
||||
* valid.
|
||||
* @extends {jspb.Message}
|
||||
* @constructor
|
||||
*/
|
||||
proto.cc.arduino.cli.commands.v1.IsDebugSupportedRequest = function(opt_data) {
|
||||
jspb.Message.initialize(this, opt_data, 0, -1, proto.cc.arduino.cli.commands.v1.IsDebugSupportedRequest.repeatedFields_, null);
|
||||
};
|
||||
goog.inherits(proto.cc.arduino.cli.commands.v1.IsDebugSupportedRequest, jspb.Message);
|
||||
if (goog.DEBUG && !COMPILED) {
|
||||
/**
|
||||
@@ -130,7 +153,7 @@ if (goog.DEBUG && !COMPILED) {
|
||||
* @constructor
|
||||
*/
|
||||
proto.cc.arduino.cli.commands.v1.GetDebugConfigRequest = function(opt_data) {
|
||||
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
|
||||
jspb.Message.initialize(this, opt_data, 0, -1, proto.cc.arduino.cli.commands.v1.GetDebugConfigRequest.repeatedFields_, null);
|
||||
};
|
||||
goog.inherits(proto.cc.arduino.cli.commands.v1.GetDebugConfigRequest, jspb.Message);
|
||||
if (goog.DEBUG && !COMPILED) {
|
||||
@@ -439,6 +462,32 @@ proto.cc.arduino.cli.commands.v1.DebugRequest.prototype.setSendInterrupt = funct
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Oneof group definitions for this message. Each group defines the field
|
||||
* numbers belonging to that group. When of these fields' value is set, all
|
||||
* other fields in the group are cleared. During deserialization, if multiple
|
||||
* fields are encountered for a group, only the last value seen will be kept.
|
||||
* @private {!Array<!Array<number>>}
|
||||
* @const
|
||||
*/
|
||||
proto.cc.arduino.cli.commands.v1.DebugResponse.oneofGroups_ = [[1,2]];
|
||||
|
||||
/**
|
||||
* @enum {number}
|
||||
*/
|
||||
proto.cc.arduino.cli.commands.v1.DebugResponse.MessageCase = {
|
||||
MESSAGE_NOT_SET: 0,
|
||||
DATA: 1,
|
||||
RESULT: 2
|
||||
};
|
||||
|
||||
/**
|
||||
* @return {proto.cc.arduino.cli.commands.v1.DebugResponse.MessageCase}
|
||||
*/
|
||||
proto.cc.arduino.cli.commands.v1.DebugResponse.prototype.getMessageCase = function() {
|
||||
return /** @type {proto.cc.arduino.cli.commands.v1.DebugResponse.MessageCase} */(jspb.Message.computeOneofCase(this, proto.cc.arduino.cli.commands.v1.DebugResponse.oneofGroups_[0]));
|
||||
};
|
||||
|
||||
|
||||
|
||||
if (jspb.Message.GENERATE_TO_OBJECT) {
|
||||
@@ -471,7 +520,7 @@ proto.cc.arduino.cli.commands.v1.DebugResponse.prototype.toObject = function(opt
|
||||
proto.cc.arduino.cli.commands.v1.DebugResponse.toObject = function(includeInstance, msg) {
|
||||
var f, obj = {
|
||||
data: msg.getData_asB64(),
|
||||
error: jspb.Message.getFieldWithDefault(msg, 2, "")
|
||||
result: (f = msg.getResult()) && proto.cc.arduino.cli.commands.v1.DebugResponse.Result.toObject(includeInstance, f)
|
||||
};
|
||||
|
||||
if (includeInstance) {
|
||||
@@ -513,8 +562,9 @@ proto.cc.arduino.cli.commands.v1.DebugResponse.deserializeBinaryFromReader = fun
|
||||
msg.setData(value);
|
||||
break;
|
||||
case 2:
|
||||
var value = /** @type {string} */ (reader.readString());
|
||||
msg.setError(value);
|
||||
var value = new proto.cc.arduino.cli.commands.v1.DebugResponse.Result;
|
||||
reader.readMessage(value,proto.cc.arduino.cli.commands.v1.DebugResponse.Result.deserializeBinaryFromReader);
|
||||
msg.setResult(value);
|
||||
break;
|
||||
default:
|
||||
reader.skipField();
|
||||
@@ -545,23 +595,154 @@ proto.cc.arduino.cli.commands.v1.DebugResponse.prototype.serializeBinary = funct
|
||||
*/
|
||||
proto.cc.arduino.cli.commands.v1.DebugResponse.serializeBinaryToWriter = function(message, writer) {
|
||||
var f = undefined;
|
||||
f = message.getData_asU8();
|
||||
if (f.length > 0) {
|
||||
f = /** @type {!(string|Uint8Array)} */ (jspb.Message.getField(message, 1));
|
||||
if (f != null) {
|
||||
writer.writeBytes(
|
||||
1,
|
||||
f
|
||||
);
|
||||
}
|
||||
f = message.getResult();
|
||||
if (f != null) {
|
||||
writer.writeMessage(
|
||||
2,
|
||||
f,
|
||||
proto.cc.arduino.cli.commands.v1.DebugResponse.Result.serializeBinaryToWriter
|
||||
);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
if (jspb.Message.GENERATE_TO_OBJECT) {
|
||||
/**
|
||||
* Creates an object representation of this proto.
|
||||
* Field names that are reserved in JavaScript and will be renamed to pb_name.
|
||||
* Optional fields that are not set will be set to undefined.
|
||||
* To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
|
||||
* For the list of reserved names please see:
|
||||
* net/proto2/compiler/js/internal/generator.cc#kKeyword.
|
||||
* @param {boolean=} opt_includeInstance Deprecated. whether to include the
|
||||
* JSPB instance for transitional soy proto support:
|
||||
* http://goto/soy-param-migration
|
||||
* @return {!Object}
|
||||
*/
|
||||
proto.cc.arduino.cli.commands.v1.DebugResponse.Result.prototype.toObject = function(opt_includeInstance) {
|
||||
return proto.cc.arduino.cli.commands.v1.DebugResponse.Result.toObject(opt_includeInstance, this);
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* Static version of the {@see toObject} method.
|
||||
* @param {boolean|undefined} includeInstance Deprecated. Whether to include
|
||||
* the JSPB instance for transitional soy proto support:
|
||||
* http://goto/soy-param-migration
|
||||
* @param {!proto.cc.arduino.cli.commands.v1.DebugResponse.Result} msg The msg instance to transform.
|
||||
* @return {!Object}
|
||||
* @suppress {unusedLocalVariables} f is only used for nested messages
|
||||
*/
|
||||
proto.cc.arduino.cli.commands.v1.DebugResponse.Result.toObject = function(includeInstance, msg) {
|
||||
var f, obj = {
|
||||
error: jspb.Message.getFieldWithDefault(msg, 1, "")
|
||||
};
|
||||
|
||||
if (includeInstance) {
|
||||
obj.$jspbMessageInstance = msg;
|
||||
}
|
||||
return obj;
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Deserializes binary data (in protobuf wire format).
|
||||
* @param {jspb.ByteSource} bytes The bytes to deserialize.
|
||||
* @return {!proto.cc.arduino.cli.commands.v1.DebugResponse.Result}
|
||||
*/
|
||||
proto.cc.arduino.cli.commands.v1.DebugResponse.Result.deserializeBinary = function(bytes) {
|
||||
var reader = new jspb.BinaryReader(bytes);
|
||||
var msg = new proto.cc.arduino.cli.commands.v1.DebugResponse.Result;
|
||||
return proto.cc.arduino.cli.commands.v1.DebugResponse.Result.deserializeBinaryFromReader(msg, reader);
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* Deserializes binary data (in protobuf wire format) from the
|
||||
* given reader into the given message object.
|
||||
* @param {!proto.cc.arduino.cli.commands.v1.DebugResponse.Result} msg The message object to deserialize into.
|
||||
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
|
||||
* @return {!proto.cc.arduino.cli.commands.v1.DebugResponse.Result}
|
||||
*/
|
||||
proto.cc.arduino.cli.commands.v1.DebugResponse.Result.deserializeBinaryFromReader = function(msg, reader) {
|
||||
while (reader.nextField()) {
|
||||
if (reader.isEndGroup()) {
|
||||
break;
|
||||
}
|
||||
var field = reader.getFieldNumber();
|
||||
switch (field) {
|
||||
case 1:
|
||||
var value = /** @type {string} */ (reader.readString());
|
||||
msg.setError(value);
|
||||
break;
|
||||
default:
|
||||
reader.skipField();
|
||||
break;
|
||||
}
|
||||
}
|
||||
return msg;
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* Serializes the message to binary data (in protobuf wire format).
|
||||
* @return {!Uint8Array}
|
||||
*/
|
||||
proto.cc.arduino.cli.commands.v1.DebugResponse.Result.prototype.serializeBinary = function() {
|
||||
var writer = new jspb.BinaryWriter();
|
||||
proto.cc.arduino.cli.commands.v1.DebugResponse.Result.serializeBinaryToWriter(this, writer);
|
||||
return writer.getResultBuffer();
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* Serializes the given message to binary data (in protobuf wire
|
||||
* format), writing to the given BinaryWriter.
|
||||
* @param {!proto.cc.arduino.cli.commands.v1.DebugResponse.Result} message
|
||||
* @param {!jspb.BinaryWriter} writer
|
||||
* @suppress {unusedLocalVariables} f is only used for nested messages
|
||||
*/
|
||||
proto.cc.arduino.cli.commands.v1.DebugResponse.Result.serializeBinaryToWriter = function(message, writer) {
|
||||
var f = undefined;
|
||||
f = message.getError();
|
||||
if (f.length > 0) {
|
||||
writer.writeString(
|
||||
2,
|
||||
1,
|
||||
f
|
||||
);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* optional string error = 1;
|
||||
* @return {string}
|
||||
*/
|
||||
proto.cc.arduino.cli.commands.v1.DebugResponse.Result.prototype.getError = function() {
|
||||
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* @param {string} value
|
||||
* @return {!proto.cc.arduino.cli.commands.v1.DebugResponse.Result} returns this
|
||||
*/
|
||||
proto.cc.arduino.cli.commands.v1.DebugResponse.Result.prototype.setError = function(value) {
|
||||
return jspb.Message.setProto3StringField(this, 1, value);
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* optional bytes data = 1;
|
||||
* @return {!(string|Uint8Array)}
|
||||
@@ -600,28 +781,72 @@ proto.cc.arduino.cli.commands.v1.DebugResponse.prototype.getData_asU8 = function
|
||||
* @return {!proto.cc.arduino.cli.commands.v1.DebugResponse} returns this
|
||||
*/
|
||||
proto.cc.arduino.cli.commands.v1.DebugResponse.prototype.setData = function(value) {
|
||||
return jspb.Message.setProto3BytesField(this, 1, value);
|
||||
return jspb.Message.setOneofField(this, 1, proto.cc.arduino.cli.commands.v1.DebugResponse.oneofGroups_[0], value);
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* optional string error = 2;
|
||||
* @return {string}
|
||||
*/
|
||||
proto.cc.arduino.cli.commands.v1.DebugResponse.prototype.getError = function() {
|
||||
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* @param {string} value
|
||||
* Clears the field making it undefined.
|
||||
* @return {!proto.cc.arduino.cli.commands.v1.DebugResponse} returns this
|
||||
*/
|
||||
proto.cc.arduino.cli.commands.v1.DebugResponse.prototype.setError = function(value) {
|
||||
return jspb.Message.setProto3StringField(this, 2, value);
|
||||
proto.cc.arduino.cli.commands.v1.DebugResponse.prototype.clearData = function() {
|
||||
return jspb.Message.setOneofField(this, 1, proto.cc.arduino.cli.commands.v1.DebugResponse.oneofGroups_[0], undefined);
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* Returns whether this field is set.
|
||||
* @return {boolean}
|
||||
*/
|
||||
proto.cc.arduino.cli.commands.v1.DebugResponse.prototype.hasData = function() {
|
||||
return jspb.Message.getField(this, 1) != null;
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* optional Result result = 2;
|
||||
* @return {?proto.cc.arduino.cli.commands.v1.DebugResponse.Result}
|
||||
*/
|
||||
proto.cc.arduino.cli.commands.v1.DebugResponse.prototype.getResult = function() {
|
||||
return /** @type{?proto.cc.arduino.cli.commands.v1.DebugResponse.Result} */ (
|
||||
jspb.Message.getWrapperField(this, proto.cc.arduino.cli.commands.v1.DebugResponse.Result, 2));
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* @param {?proto.cc.arduino.cli.commands.v1.DebugResponse.Result|undefined} value
|
||||
* @return {!proto.cc.arduino.cli.commands.v1.DebugResponse} returns this
|
||||
*/
|
||||
proto.cc.arduino.cli.commands.v1.DebugResponse.prototype.setResult = function(value) {
|
||||
return jspb.Message.setOneofWrapperField(this, 2, proto.cc.arduino.cli.commands.v1.DebugResponse.oneofGroups_[0], value);
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* Clears the message field making it undefined.
|
||||
* @return {!proto.cc.arduino.cli.commands.v1.DebugResponse} returns this
|
||||
*/
|
||||
proto.cc.arduino.cli.commands.v1.DebugResponse.prototype.clearResult = function() {
|
||||
return this.setResult(undefined);
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* Returns whether this field is set.
|
||||
* @return {boolean}
|
||||
*/
|
||||
proto.cc.arduino.cli.commands.v1.DebugResponse.prototype.hasResult = function() {
|
||||
return jspb.Message.getField(this, 2) != null;
|
||||
};
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* List of repeated fields within this message type.
|
||||
* @private {!Array<number>}
|
||||
* @const
|
||||
*/
|
||||
proto.cc.arduino.cli.commands.v1.IsDebugSupportedRequest.repeatedFields_ = [6];
|
||||
|
||||
|
||||
|
||||
@@ -658,7 +883,8 @@ proto.cc.arduino.cli.commands.v1.IsDebugSupportedRequest.toObject = function(inc
|
||||
fqbn: jspb.Message.getFieldWithDefault(msg, 2, ""),
|
||||
port: (f = msg.getPort()) && cc_arduino_cli_commands_v1_port_pb.Port.toObject(includeInstance, f),
|
||||
interpreter: jspb.Message.getFieldWithDefault(msg, 4, ""),
|
||||
programmer: jspb.Message.getFieldWithDefault(msg, 5, "")
|
||||
programmer: jspb.Message.getFieldWithDefault(msg, 5, ""),
|
||||
debugPropertiesList: (f = jspb.Message.getRepeatedField(msg, 6)) == null ? undefined : f
|
||||
};
|
||||
|
||||
if (includeInstance) {
|
||||
@@ -717,6 +943,10 @@ proto.cc.arduino.cli.commands.v1.IsDebugSupportedRequest.deserializeBinaryFromRe
|
||||
var value = /** @type {string} */ (reader.readString());
|
||||
msg.setProgrammer(value);
|
||||
break;
|
||||
case 6:
|
||||
var value = /** @type {string} */ (reader.readString());
|
||||
msg.addDebugProperties(value);
|
||||
break;
|
||||
default:
|
||||
reader.skipField();
|
||||
break;
|
||||
@@ -783,6 +1013,13 @@ proto.cc.arduino.cli.commands.v1.IsDebugSupportedRequest.serializeBinaryToWriter
|
||||
f
|
||||
);
|
||||
}
|
||||
f = message.getDebugPropertiesList();
|
||||
if (f.length > 0) {
|
||||
writer.writeRepeatedString(
|
||||
6,
|
||||
f
|
||||
);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@@ -914,6 +1151,43 @@ proto.cc.arduino.cli.commands.v1.IsDebugSupportedRequest.prototype.setProgrammer
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* repeated string debug_properties = 6;
|
||||
* @return {!Array<string>}
|
||||
*/
|
||||
proto.cc.arduino.cli.commands.v1.IsDebugSupportedRequest.prototype.getDebugPropertiesList = function() {
|
||||
return /** @type {!Array<string>} */ (jspb.Message.getRepeatedField(this, 6));
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* @param {!Array<string>} value
|
||||
* @return {!proto.cc.arduino.cli.commands.v1.IsDebugSupportedRequest} returns this
|
||||
*/
|
||||
proto.cc.arduino.cli.commands.v1.IsDebugSupportedRequest.prototype.setDebugPropertiesList = function(value) {
|
||||
return jspb.Message.setField(this, 6, value || []);
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* @param {string} value
|
||||
* @param {number=} opt_index
|
||||
* @return {!proto.cc.arduino.cli.commands.v1.IsDebugSupportedRequest} returns this
|
||||
*/
|
||||
proto.cc.arduino.cli.commands.v1.IsDebugSupportedRequest.prototype.addDebugProperties = function(value, opt_index) {
|
||||
return jspb.Message.addToRepeatedField(this, 6, value, opt_index);
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* Clears the list making it empty but non-null.
|
||||
* @return {!proto.cc.arduino.cli.commands.v1.IsDebugSupportedRequest} returns this
|
||||
*/
|
||||
proto.cc.arduino.cli.commands.v1.IsDebugSupportedRequest.prototype.clearDebugPropertiesList = function() {
|
||||
return this.setDebugPropertiesList([]);
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -1075,6 +1349,13 @@ proto.cc.arduino.cli.commands.v1.IsDebugSupportedResponse.prototype.setDebugFqbn
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* List of repeated fields within this message type.
|
||||
* @private {!Array<number>}
|
||||
* @const
|
||||
*/
|
||||
proto.cc.arduino.cli.commands.v1.GetDebugConfigRequest.repeatedFields_ = [10];
|
||||
|
||||
|
||||
|
||||
if (jspb.Message.GENERATE_TO_OBJECT) {
|
||||
@@ -1112,7 +1393,8 @@ proto.cc.arduino.cli.commands.v1.GetDebugConfigRequest.toObject = function(inclu
|
||||
port: (f = msg.getPort()) && cc_arduino_cli_commands_v1_port_pb.Port.toObject(includeInstance, f),
|
||||
interpreter: jspb.Message.getFieldWithDefault(msg, 5, ""),
|
||||
importDir: jspb.Message.getFieldWithDefault(msg, 8, ""),
|
||||
programmer: jspb.Message.getFieldWithDefault(msg, 9, "")
|
||||
programmer: jspb.Message.getFieldWithDefault(msg, 9, ""),
|
||||
debugPropertiesList: (f = jspb.Message.getRepeatedField(msg, 10)) == null ? undefined : f
|
||||
};
|
||||
|
||||
if (includeInstance) {
|
||||
@@ -1179,6 +1461,10 @@ proto.cc.arduino.cli.commands.v1.GetDebugConfigRequest.deserializeBinaryFromRead
|
||||
var value = /** @type {string} */ (reader.readString());
|
||||
msg.setProgrammer(value);
|
||||
break;
|
||||
case 10:
|
||||
var value = /** @type {string} */ (reader.readString());
|
||||
msg.addDebugProperties(value);
|
||||
break;
|
||||
default:
|
||||
reader.skipField();
|
||||
break;
|
||||
@@ -1259,6 +1545,13 @@ proto.cc.arduino.cli.commands.v1.GetDebugConfigRequest.serializeBinaryToWriter =
|
||||
f
|
||||
);
|
||||
}
|
||||
f = message.getDebugPropertiesList();
|
||||
if (f.length > 0) {
|
||||
writer.writeRepeatedString(
|
||||
10,
|
||||
f
|
||||
);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@@ -1426,6 +1719,43 @@ proto.cc.arduino.cli.commands.v1.GetDebugConfigRequest.prototype.setProgrammer =
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* repeated string debug_properties = 10;
|
||||
* @return {!Array<string>}
|
||||
*/
|
||||
proto.cc.arduino.cli.commands.v1.GetDebugConfigRequest.prototype.getDebugPropertiesList = function() {
|
||||
return /** @type {!Array<string>} */ (jspb.Message.getRepeatedField(this, 10));
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* @param {!Array<string>} value
|
||||
* @return {!proto.cc.arduino.cli.commands.v1.GetDebugConfigRequest} returns this
|
||||
*/
|
||||
proto.cc.arduino.cli.commands.v1.GetDebugConfigRequest.prototype.setDebugPropertiesList = function(value) {
|
||||
return jspb.Message.setField(this, 10, value || []);
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* @param {string} value
|
||||
* @param {number=} opt_index
|
||||
* @return {!proto.cc.arduino.cli.commands.v1.GetDebugConfigRequest} returns this
|
||||
*/
|
||||
proto.cc.arduino.cli.commands.v1.GetDebugConfigRequest.prototype.addDebugProperties = function(value, opt_index) {
|
||||
return jspb.Message.addToRepeatedField(this, 10, value, opt_index);
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* Clears the list making it empty but non-null.
|
||||
* @return {!proto.cc.arduino.cli.commands.v1.GetDebugConfigRequest} returns this
|
||||
*/
|
||||
proto.cc.arduino.cli.commands.v1.GetDebugConfigRequest.prototype.clearDebugPropertiesList = function() {
|
||||
return this.setDebugPropertiesList([]);
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
@@ -43,6 +43,13 @@ export class LibraryDownloadResponse extends jspb.Message {
|
||||
getProgress(): cc_arduino_cli_commands_v1_common_pb.DownloadProgress | undefined;
|
||||
setProgress(value?: cc_arduino_cli_commands_v1_common_pb.DownloadProgress): LibraryDownloadResponse;
|
||||
|
||||
hasResult(): boolean;
|
||||
clearResult(): void;
|
||||
getResult(): LibraryDownloadResponse.Result | undefined;
|
||||
setResult(value?: LibraryDownloadResponse.Result): LibraryDownloadResponse;
|
||||
|
||||
getMessageCase(): LibraryDownloadResponse.MessageCase;
|
||||
|
||||
serializeBinary(): Uint8Array;
|
||||
toObject(includeInstance?: boolean): LibraryDownloadResponse.AsObject;
|
||||
static toObject(includeInstance: boolean, msg: LibraryDownloadResponse): LibraryDownloadResponse.AsObject;
|
||||
@@ -56,7 +63,34 @@ export class LibraryDownloadResponse extends jspb.Message {
|
||||
export namespace LibraryDownloadResponse {
|
||||
export type AsObject = {
|
||||
progress?: cc_arduino_cli_commands_v1_common_pb.DownloadProgress.AsObject,
|
||||
result?: LibraryDownloadResponse.Result.AsObject,
|
||||
}
|
||||
|
||||
|
||||
export class Result extends jspb.Message {
|
||||
|
||||
serializeBinary(): Uint8Array;
|
||||
toObject(includeInstance?: boolean): Result.AsObject;
|
||||
static toObject(includeInstance: boolean, msg: Result): Result.AsObject;
|
||||
static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};
|
||||
static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};
|
||||
static serializeBinaryToWriter(message: Result, writer: jspb.BinaryWriter): void;
|
||||
static deserializeBinary(bytes: Uint8Array): Result;
|
||||
static deserializeBinaryFromReader(message: Result, reader: jspb.BinaryReader): Result;
|
||||
}
|
||||
|
||||
export namespace Result {
|
||||
export type AsObject = {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
export enum MessageCase {
|
||||
MESSAGE_NOT_SET = 0,
|
||||
PROGRESS = 1,
|
||||
RESULT = 2,
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
export class LibraryInstallRequest extends jspb.Message {
|
||||
@@ -109,6 +143,13 @@ export class LibraryInstallResponse extends jspb.Message {
|
||||
getTaskProgress(): cc_arduino_cli_commands_v1_common_pb.TaskProgress | undefined;
|
||||
setTaskProgress(value?: cc_arduino_cli_commands_v1_common_pb.TaskProgress): LibraryInstallResponse;
|
||||
|
||||
hasResult(): boolean;
|
||||
clearResult(): void;
|
||||
getResult(): LibraryInstallResponse.Result | undefined;
|
||||
setResult(value?: LibraryInstallResponse.Result): LibraryInstallResponse;
|
||||
|
||||
getMessageCase(): LibraryInstallResponse.MessageCase;
|
||||
|
||||
serializeBinary(): Uint8Array;
|
||||
toObject(includeInstance?: boolean): LibraryInstallResponse.AsObject;
|
||||
static toObject(includeInstance: boolean, msg: LibraryInstallResponse): LibraryInstallResponse.AsObject;
|
||||
@@ -123,7 +164,35 @@ export namespace LibraryInstallResponse {
|
||||
export type AsObject = {
|
||||
progress?: cc_arduino_cli_commands_v1_common_pb.DownloadProgress.AsObject,
|
||||
taskProgress?: cc_arduino_cli_commands_v1_common_pb.TaskProgress.AsObject,
|
||||
result?: LibraryInstallResponse.Result.AsObject,
|
||||
}
|
||||
|
||||
|
||||
export class Result extends jspb.Message {
|
||||
|
||||
serializeBinary(): Uint8Array;
|
||||
toObject(includeInstance?: boolean): Result.AsObject;
|
||||
static toObject(includeInstance: boolean, msg: Result): Result.AsObject;
|
||||
static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};
|
||||
static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};
|
||||
static serializeBinaryToWriter(message: Result, writer: jspb.BinaryWriter): void;
|
||||
static deserializeBinary(bytes: Uint8Array): Result;
|
||||
static deserializeBinaryFromReader(message: Result, reader: jspb.BinaryReader): Result;
|
||||
}
|
||||
|
||||
export namespace Result {
|
||||
export type AsObject = {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
export enum MessageCase {
|
||||
MESSAGE_NOT_SET = 0,
|
||||
PROGRESS = 1,
|
||||
TASK_PROGRESS = 2,
|
||||
RESULT = 3,
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
export class LibraryUpgradeRequest extends jspb.Message {
|
||||
@@ -167,6 +236,13 @@ export class LibraryUpgradeResponse extends jspb.Message {
|
||||
getTaskProgress(): cc_arduino_cli_commands_v1_common_pb.TaskProgress | undefined;
|
||||
setTaskProgress(value?: cc_arduino_cli_commands_v1_common_pb.TaskProgress): LibraryUpgradeResponse;
|
||||
|
||||
hasResult(): boolean;
|
||||
clearResult(): void;
|
||||
getResult(): LibraryUpgradeResponse.Result | undefined;
|
||||
setResult(value?: LibraryUpgradeResponse.Result): LibraryUpgradeResponse;
|
||||
|
||||
getMessageCase(): LibraryUpgradeResponse.MessageCase;
|
||||
|
||||
serializeBinary(): Uint8Array;
|
||||
toObject(includeInstance?: boolean): LibraryUpgradeResponse.AsObject;
|
||||
static toObject(includeInstance: boolean, msg: LibraryUpgradeResponse): LibraryUpgradeResponse.AsObject;
|
||||
@@ -181,7 +257,35 @@ export namespace LibraryUpgradeResponse {
|
||||
export type AsObject = {
|
||||
progress?: cc_arduino_cli_commands_v1_common_pb.DownloadProgress.AsObject,
|
||||
taskProgress?: cc_arduino_cli_commands_v1_common_pb.TaskProgress.AsObject,
|
||||
result?: LibraryUpgradeResponse.Result.AsObject,
|
||||
}
|
||||
|
||||
|
||||
export class Result extends jspb.Message {
|
||||
|
||||
serializeBinary(): Uint8Array;
|
||||
toObject(includeInstance?: boolean): Result.AsObject;
|
||||
static toObject(includeInstance: boolean, msg: Result): Result.AsObject;
|
||||
static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};
|
||||
static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};
|
||||
static serializeBinaryToWriter(message: Result, writer: jspb.BinaryWriter): void;
|
||||
static deserializeBinary(bytes: Uint8Array): Result;
|
||||
static deserializeBinaryFromReader(message: Result, reader: jspb.BinaryReader): Result;
|
||||
}
|
||||
|
||||
export namespace Result {
|
||||
export type AsObject = {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
export enum MessageCase {
|
||||
MESSAGE_NOT_SET = 0,
|
||||
PROGRESS = 1,
|
||||
TASK_PROGRESS = 2,
|
||||
RESULT = 3,
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
export class LibraryUninstallRequest extends jspb.Message {
|
||||
@@ -220,6 +324,13 @@ export class LibraryUninstallResponse extends jspb.Message {
|
||||
getTaskProgress(): cc_arduino_cli_commands_v1_common_pb.TaskProgress | undefined;
|
||||
setTaskProgress(value?: cc_arduino_cli_commands_v1_common_pb.TaskProgress): LibraryUninstallResponse;
|
||||
|
||||
hasResult(): boolean;
|
||||
clearResult(): void;
|
||||
getResult(): LibraryUninstallResponse.Result | undefined;
|
||||
setResult(value?: LibraryUninstallResponse.Result): LibraryUninstallResponse;
|
||||
|
||||
getMessageCase(): LibraryUninstallResponse.MessageCase;
|
||||
|
||||
serializeBinary(): Uint8Array;
|
||||
toObject(includeInstance?: boolean): LibraryUninstallResponse.AsObject;
|
||||
static toObject(includeInstance: boolean, msg: LibraryUninstallResponse): LibraryUninstallResponse.AsObject;
|
||||
@@ -233,7 +344,34 @@ export class LibraryUninstallResponse extends jspb.Message {
|
||||
export namespace LibraryUninstallResponse {
|
||||
export type AsObject = {
|
||||
taskProgress?: cc_arduino_cli_commands_v1_common_pb.TaskProgress.AsObject,
|
||||
result?: LibraryUninstallResponse.Result.AsObject,
|
||||
}
|
||||
|
||||
|
||||
export class Result extends jspb.Message {
|
||||
|
||||
serializeBinary(): Uint8Array;
|
||||
toObject(includeInstance?: boolean): Result.AsObject;
|
||||
static toObject(includeInstance: boolean, msg: Result): Result.AsObject;
|
||||
static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};
|
||||
static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};
|
||||
static serializeBinaryToWriter(message: Result, writer: jspb.BinaryWriter): void;
|
||||
static deserializeBinary(bytes: Uint8Array): Result;
|
||||
static deserializeBinaryFromReader(message: Result, reader: jspb.BinaryReader): Result;
|
||||
}
|
||||
|
||||
export namespace Result {
|
||||
export type AsObject = {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
export enum MessageCase {
|
||||
MESSAGE_NOT_SET = 0,
|
||||
TASK_PROGRESS = 1,
|
||||
RESULT = 2,
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
export class LibraryUpgradeAllRequest extends jspb.Message {
|
||||
@@ -271,6 +409,13 @@ export class LibraryUpgradeAllResponse extends jspb.Message {
|
||||
getTaskProgress(): cc_arduino_cli_commands_v1_common_pb.TaskProgress | undefined;
|
||||
setTaskProgress(value?: cc_arduino_cli_commands_v1_common_pb.TaskProgress): LibraryUpgradeAllResponse;
|
||||
|
||||
hasResult(): boolean;
|
||||
clearResult(): void;
|
||||
getResult(): LibraryUpgradeAllResponse.Result | undefined;
|
||||
setResult(value?: LibraryUpgradeAllResponse.Result): LibraryUpgradeAllResponse;
|
||||
|
||||
getMessageCase(): LibraryUpgradeAllResponse.MessageCase;
|
||||
|
||||
serializeBinary(): Uint8Array;
|
||||
toObject(includeInstance?: boolean): LibraryUpgradeAllResponse.AsObject;
|
||||
static toObject(includeInstance: boolean, msg: LibraryUpgradeAllResponse): LibraryUpgradeAllResponse.AsObject;
|
||||
@@ -285,7 +430,35 @@ export namespace LibraryUpgradeAllResponse {
|
||||
export type AsObject = {
|
||||
progress?: cc_arduino_cli_commands_v1_common_pb.DownloadProgress.AsObject,
|
||||
taskProgress?: cc_arduino_cli_commands_v1_common_pb.TaskProgress.AsObject,
|
||||
result?: LibraryUpgradeAllResponse.Result.AsObject,
|
||||
}
|
||||
|
||||
|
||||
export class Result extends jspb.Message {
|
||||
|
||||
serializeBinary(): Uint8Array;
|
||||
toObject(includeInstance?: boolean): Result.AsObject;
|
||||
static toObject(includeInstance: boolean, msg: Result): Result.AsObject;
|
||||
static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};
|
||||
static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};
|
||||
static serializeBinaryToWriter(message: Result, writer: jspb.BinaryWriter): void;
|
||||
static deserializeBinary(bytes: Uint8Array): Result;
|
||||
static deserializeBinaryFromReader(message: Result, reader: jspb.BinaryReader): Result;
|
||||
}
|
||||
|
||||
export namespace Result {
|
||||
export type AsObject = {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
export enum MessageCase {
|
||||
MESSAGE_NOT_SET = 0,
|
||||
PROGRESS = 1,
|
||||
TASK_PROGRESS = 2,
|
||||
RESULT = 3,
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
export class LibraryResolveDependenciesRequest extends jspb.Message {
|
||||
@@ -298,6 +471,8 @@ export class LibraryResolveDependenciesRequest extends jspb.Message {
|
||||
setName(value: string): LibraryResolveDependenciesRequest;
|
||||
getVersion(): string;
|
||||
setVersion(value: string): LibraryResolveDependenciesRequest;
|
||||
getDoNotUpdateInstalledLibraries(): boolean;
|
||||
setDoNotUpdateInstalledLibraries(value: boolean): LibraryResolveDependenciesRequest;
|
||||
|
||||
serializeBinary(): Uint8Array;
|
||||
toObject(includeInstance?: boolean): LibraryResolveDependenciesRequest.AsObject;
|
||||
@@ -314,6 +489,7 @@ export namespace LibraryResolveDependenciesRequest {
|
||||
instance?: cc_arduino_cli_commands_v1_common_pb.Instance.AsObject,
|
||||
name: string,
|
||||
version: string,
|
||||
doNotUpdateInstalledLibraries: boolean,
|
||||
}
|
||||
}
|
||||
|
||||
@@ -371,8 +547,6 @@ export class LibrarySearchRequest extends jspb.Message {
|
||||
clearInstance(): void;
|
||||
getInstance(): cc_arduino_cli_commands_v1_common_pb.Instance | undefined;
|
||||
setInstance(value?: cc_arduino_cli_commands_v1_common_pb.Instance): LibrarySearchRequest;
|
||||
getQuery(): string;
|
||||
setQuery(value: string): LibrarySearchRequest;
|
||||
getOmitReleasesDetails(): boolean;
|
||||
setOmitReleasesDetails(value: boolean): LibrarySearchRequest;
|
||||
getSearchArgs(): string;
|
||||
@@ -391,7 +565,6 @@ export class LibrarySearchRequest extends jspb.Message {
|
||||
export namespace LibrarySearchRequest {
|
||||
export type AsObject = {
|
||||
instance?: cc_arduino_cli_commands_v1_common_pb.Instance.AsObject,
|
||||
query: string,
|
||||
omitReleasesDetails: boolean,
|
||||
searchArgs: string,
|
||||
}
|
||||
@@ -809,6 +982,13 @@ export class ZipLibraryInstallResponse extends jspb.Message {
|
||||
getTaskProgress(): cc_arduino_cli_commands_v1_common_pb.TaskProgress | undefined;
|
||||
setTaskProgress(value?: cc_arduino_cli_commands_v1_common_pb.TaskProgress): ZipLibraryInstallResponse;
|
||||
|
||||
hasResult(): boolean;
|
||||
clearResult(): void;
|
||||
getResult(): ZipLibraryInstallResponse.Result | undefined;
|
||||
setResult(value?: ZipLibraryInstallResponse.Result): ZipLibraryInstallResponse;
|
||||
|
||||
getMessageCase(): ZipLibraryInstallResponse.MessageCase;
|
||||
|
||||
serializeBinary(): Uint8Array;
|
||||
toObject(includeInstance?: boolean): ZipLibraryInstallResponse.AsObject;
|
||||
static toObject(includeInstance: boolean, msg: ZipLibraryInstallResponse): ZipLibraryInstallResponse.AsObject;
|
||||
@@ -822,7 +1002,34 @@ export class ZipLibraryInstallResponse extends jspb.Message {
|
||||
export namespace ZipLibraryInstallResponse {
|
||||
export type AsObject = {
|
||||
taskProgress?: cc_arduino_cli_commands_v1_common_pb.TaskProgress.AsObject,
|
||||
result?: ZipLibraryInstallResponse.Result.AsObject,
|
||||
}
|
||||
|
||||
|
||||
export class Result extends jspb.Message {
|
||||
|
||||
serializeBinary(): Uint8Array;
|
||||
toObject(includeInstance?: boolean): Result.AsObject;
|
||||
static toObject(includeInstance: boolean, msg: Result): Result.AsObject;
|
||||
static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};
|
||||
static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};
|
||||
static serializeBinaryToWriter(message: Result, writer: jspb.BinaryWriter): void;
|
||||
static deserializeBinary(bytes: Uint8Array): Result;
|
||||
static deserializeBinaryFromReader(message: Result, reader: jspb.BinaryReader): Result;
|
||||
}
|
||||
|
||||
export namespace Result {
|
||||
export type AsObject = {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
export enum MessageCase {
|
||||
MESSAGE_NOT_SET = 0,
|
||||
TASK_PROGRESS = 1,
|
||||
RESULT = 2,
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
export class GitLibraryInstallRequest extends jspb.Message {
|
||||
@@ -861,6 +1068,13 @@ export class GitLibraryInstallResponse extends jspb.Message {
|
||||
getTaskProgress(): cc_arduino_cli_commands_v1_common_pb.TaskProgress | undefined;
|
||||
setTaskProgress(value?: cc_arduino_cli_commands_v1_common_pb.TaskProgress): GitLibraryInstallResponse;
|
||||
|
||||
hasResult(): boolean;
|
||||
clearResult(): void;
|
||||
getResult(): GitLibraryInstallResponse.Result | undefined;
|
||||
setResult(value?: GitLibraryInstallResponse.Result): GitLibraryInstallResponse;
|
||||
|
||||
getMessageCase(): GitLibraryInstallResponse.MessageCase;
|
||||
|
||||
serializeBinary(): Uint8Array;
|
||||
toObject(includeInstance?: boolean): GitLibraryInstallResponse.AsObject;
|
||||
static toObject(includeInstance: boolean, msg: GitLibraryInstallResponse): GitLibraryInstallResponse.AsObject;
|
||||
@@ -874,7 +1088,34 @@ export class GitLibraryInstallResponse extends jspb.Message {
|
||||
export namespace GitLibraryInstallResponse {
|
||||
export type AsObject = {
|
||||
taskProgress?: cc_arduino_cli_commands_v1_common_pb.TaskProgress.AsObject,
|
||||
result?: GitLibraryInstallResponse.Result.AsObject,
|
||||
}
|
||||
|
||||
|
||||
export class Result extends jspb.Message {
|
||||
|
||||
serializeBinary(): Uint8Array;
|
||||
toObject(includeInstance?: boolean): Result.AsObject;
|
||||
static toObject(includeInstance: boolean, msg: Result): Result.AsObject;
|
||||
static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};
|
||||
static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};
|
||||
static serializeBinaryToWriter(message: Result, writer: jspb.BinaryWriter): void;
|
||||
static deserializeBinary(bytes: Uint8Array): Result;
|
||||
static deserializeBinaryFromReader(message: Result, reader: jspb.BinaryReader): Result;
|
||||
}
|
||||
|
||||
export namespace Result {
|
||||
export type AsObject = {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
export enum MessageCase {
|
||||
MESSAGE_NOT_SET = 0,
|
||||
TASK_PROGRESS = 1,
|
||||
RESULT = 2,
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
export enum LibraryInstallLocation {
|
||||
|
File diff suppressed because it is too large
Load Diff
@@ -10,26 +10,29 @@ import * as cc_arduino_cli_commands_v1_port_pb from "../../../../../cc/arduino/c
|
||||
|
||||
export class MonitorRequest extends jspb.Message {
|
||||
|
||||
hasInstance(): boolean;
|
||||
clearInstance(): void;
|
||||
getInstance(): cc_arduino_cli_commands_v1_common_pb.Instance | undefined;
|
||||
setInstance(value?: cc_arduino_cli_commands_v1_common_pb.Instance): MonitorRequest;
|
||||
hasOpenRequest(): boolean;
|
||||
clearOpenRequest(): void;
|
||||
getOpenRequest(): MonitorPortOpenRequest | undefined;
|
||||
setOpenRequest(value?: MonitorPortOpenRequest): MonitorRequest;
|
||||
|
||||
hasPort(): boolean;
|
||||
clearPort(): void;
|
||||
getPort(): cc_arduino_cli_commands_v1_port_pb.Port | undefined;
|
||||
setPort(value?: cc_arduino_cli_commands_v1_port_pb.Port): MonitorRequest;
|
||||
getFqbn(): string;
|
||||
setFqbn(value: string): MonitorRequest;
|
||||
hasTxData(): boolean;
|
||||
clearTxData(): void;
|
||||
getTxData(): Uint8Array | string;
|
||||
getTxData_asU8(): Uint8Array;
|
||||
getTxData_asB64(): string;
|
||||
setTxData(value: Uint8Array | string): MonitorRequest;
|
||||
|
||||
hasPortConfiguration(): boolean;
|
||||
clearPortConfiguration(): void;
|
||||
getPortConfiguration(): MonitorPortConfiguration | undefined;
|
||||
setPortConfiguration(value?: MonitorPortConfiguration): MonitorRequest;
|
||||
hasUpdatedConfiguration(): boolean;
|
||||
clearUpdatedConfiguration(): void;
|
||||
getUpdatedConfiguration(): cc_arduino_cli_commands_v1_common_pb.MonitorPortConfiguration | undefined;
|
||||
setUpdatedConfiguration(value?: cc_arduino_cli_commands_v1_common_pb.MonitorPortConfiguration): MonitorRequest;
|
||||
|
||||
hasClose(): boolean;
|
||||
clearClose(): void;
|
||||
getClose(): boolean;
|
||||
setClose(value: boolean): MonitorRequest;
|
||||
|
||||
getMessageCase(): MonitorRequest.MessageCase;
|
||||
|
||||
serializeBinary(): Uint8Array;
|
||||
toObject(includeInstance?: boolean): MonitorRequest.AsObject;
|
||||
@@ -42,51 +45,87 @@ export class MonitorRequest extends jspb.Message {
|
||||
}
|
||||
|
||||
export namespace MonitorRequest {
|
||||
export type AsObject = {
|
||||
openRequest?: MonitorPortOpenRequest.AsObject,
|
||||
txData: Uint8Array | string,
|
||||
updatedConfiguration?: cc_arduino_cli_commands_v1_common_pb.MonitorPortConfiguration.AsObject,
|
||||
close: boolean,
|
||||
}
|
||||
|
||||
export enum MessageCase {
|
||||
MESSAGE_NOT_SET = 0,
|
||||
OPEN_REQUEST = 1,
|
||||
TX_DATA = 2,
|
||||
UPDATED_CONFIGURATION = 3,
|
||||
CLOSE = 4,
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
export class MonitorPortOpenRequest extends jspb.Message {
|
||||
|
||||
hasInstance(): boolean;
|
||||
clearInstance(): void;
|
||||
getInstance(): cc_arduino_cli_commands_v1_common_pb.Instance | undefined;
|
||||
setInstance(value?: cc_arduino_cli_commands_v1_common_pb.Instance): MonitorPortOpenRequest;
|
||||
|
||||
hasPort(): boolean;
|
||||
clearPort(): void;
|
||||
getPort(): cc_arduino_cli_commands_v1_port_pb.Port | undefined;
|
||||
setPort(value?: cc_arduino_cli_commands_v1_port_pb.Port): MonitorPortOpenRequest;
|
||||
getFqbn(): string;
|
||||
setFqbn(value: string): MonitorPortOpenRequest;
|
||||
|
||||
hasPortConfiguration(): boolean;
|
||||
clearPortConfiguration(): void;
|
||||
getPortConfiguration(): cc_arduino_cli_commands_v1_common_pb.MonitorPortConfiguration | undefined;
|
||||
setPortConfiguration(value?: cc_arduino_cli_commands_v1_common_pb.MonitorPortConfiguration): MonitorPortOpenRequest;
|
||||
|
||||
serializeBinary(): Uint8Array;
|
||||
toObject(includeInstance?: boolean): MonitorPortOpenRequest.AsObject;
|
||||
static toObject(includeInstance: boolean, msg: MonitorPortOpenRequest): MonitorPortOpenRequest.AsObject;
|
||||
static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};
|
||||
static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};
|
||||
static serializeBinaryToWriter(message: MonitorPortOpenRequest, writer: jspb.BinaryWriter): void;
|
||||
static deserializeBinary(bytes: Uint8Array): MonitorPortOpenRequest;
|
||||
static deserializeBinaryFromReader(message: MonitorPortOpenRequest, reader: jspb.BinaryReader): MonitorPortOpenRequest;
|
||||
}
|
||||
|
||||
export namespace MonitorPortOpenRequest {
|
||||
export type AsObject = {
|
||||
instance?: cc_arduino_cli_commands_v1_common_pb.Instance.AsObject,
|
||||
port?: cc_arduino_cli_commands_v1_port_pb.Port.AsObject,
|
||||
fqbn: string,
|
||||
txData: Uint8Array | string,
|
||||
portConfiguration?: MonitorPortConfiguration.AsObject,
|
||||
}
|
||||
}
|
||||
|
||||
export class MonitorPortConfiguration extends jspb.Message {
|
||||
clearSettingsList(): void;
|
||||
getSettingsList(): Array<MonitorPortSetting>;
|
||||
setSettingsList(value: Array<MonitorPortSetting>): MonitorPortConfiguration;
|
||||
addSettings(value?: MonitorPortSetting, index?: number): MonitorPortSetting;
|
||||
|
||||
serializeBinary(): Uint8Array;
|
||||
toObject(includeInstance?: boolean): MonitorPortConfiguration.AsObject;
|
||||
static toObject(includeInstance: boolean, msg: MonitorPortConfiguration): MonitorPortConfiguration.AsObject;
|
||||
static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};
|
||||
static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};
|
||||
static serializeBinaryToWriter(message: MonitorPortConfiguration, writer: jspb.BinaryWriter): void;
|
||||
static deserializeBinary(bytes: Uint8Array): MonitorPortConfiguration;
|
||||
static deserializeBinaryFromReader(message: MonitorPortConfiguration, reader: jspb.BinaryReader): MonitorPortConfiguration;
|
||||
}
|
||||
|
||||
export namespace MonitorPortConfiguration {
|
||||
export type AsObject = {
|
||||
settingsList: Array<MonitorPortSetting.AsObject>,
|
||||
portConfiguration?: cc_arduino_cli_commands_v1_common_pb.MonitorPortConfiguration.AsObject,
|
||||
}
|
||||
}
|
||||
|
||||
export class MonitorResponse extends jspb.Message {
|
||||
|
||||
hasError(): boolean;
|
||||
clearError(): void;
|
||||
getError(): string;
|
||||
setError(value: string): MonitorResponse;
|
||||
|
||||
hasRxData(): boolean;
|
||||
clearRxData(): void;
|
||||
getRxData(): Uint8Array | string;
|
||||
getRxData_asU8(): Uint8Array;
|
||||
getRxData_asB64(): string;
|
||||
setRxData(value: Uint8Array | string): MonitorResponse;
|
||||
clearAppliedSettingsList(): void;
|
||||
getAppliedSettingsList(): Array<MonitorPortSetting>;
|
||||
setAppliedSettingsList(value: Array<MonitorPortSetting>): MonitorResponse;
|
||||
addAppliedSettings(value?: MonitorPortSetting, index?: number): MonitorPortSetting;
|
||||
|
||||
hasAppliedSettings(): boolean;
|
||||
clearAppliedSettings(): void;
|
||||
getAppliedSettings(): cc_arduino_cli_commands_v1_common_pb.MonitorPortConfiguration | undefined;
|
||||
setAppliedSettings(value?: cc_arduino_cli_commands_v1_common_pb.MonitorPortConfiguration): MonitorResponse;
|
||||
|
||||
hasSuccess(): boolean;
|
||||
clearSuccess(): void;
|
||||
getSuccess(): boolean;
|
||||
setSuccess(value: boolean): MonitorResponse;
|
||||
|
||||
getMessageCase(): MonitorResponse.MessageCase;
|
||||
|
||||
serializeBinary(): Uint8Array;
|
||||
toObject(includeInstance?: boolean): MonitorResponse.AsObject;
|
||||
static toObject(includeInstance: boolean, msg: MonitorResponse): MonitorResponse.AsObject;
|
||||
@@ -101,32 +140,18 @@ export namespace MonitorResponse {
|
||||
export type AsObject = {
|
||||
error: string,
|
||||
rxData: Uint8Array | string,
|
||||
appliedSettingsList: Array<MonitorPortSetting.AsObject>,
|
||||
appliedSettings?: cc_arduino_cli_commands_v1_common_pb.MonitorPortConfiguration.AsObject,
|
||||
success: boolean,
|
||||
}
|
||||
}
|
||||
|
||||
export class MonitorPortSetting extends jspb.Message {
|
||||
getSettingId(): string;
|
||||
setSettingId(value: string): MonitorPortSetting;
|
||||
getValue(): string;
|
||||
setValue(value: string): MonitorPortSetting;
|
||||
|
||||
serializeBinary(): Uint8Array;
|
||||
toObject(includeInstance?: boolean): MonitorPortSetting.AsObject;
|
||||
static toObject(includeInstance: boolean, msg: MonitorPortSetting): MonitorPortSetting.AsObject;
|
||||
static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};
|
||||
static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};
|
||||
static serializeBinaryToWriter(message: MonitorPortSetting, writer: jspb.BinaryWriter): void;
|
||||
static deserializeBinary(bytes: Uint8Array): MonitorPortSetting;
|
||||
static deserializeBinaryFromReader(message: MonitorPortSetting, reader: jspb.BinaryReader): MonitorPortSetting;
|
||||
}
|
||||
|
||||
export namespace MonitorPortSetting {
|
||||
export type AsObject = {
|
||||
settingId: string,
|
||||
value: string,
|
||||
export enum MessageCase {
|
||||
MESSAGE_NOT_SET = 0,
|
||||
ERROR = 1,
|
||||
RX_DATA = 2,
|
||||
APPLIED_SETTINGS = 3,
|
||||
SUCCESS = 4,
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
export class EnumerateMonitorPortSettingsRequest extends jspb.Message {
|
||||
|
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1 @@
|
||||
// GENERATED CODE -- NO SERVICES IN PROTO
|
627
arduino-ide-extension/src/node/cli-protocol/cc/arduino/cli/commands/v1/settings_pb.d.ts
vendored
Normal file
627
arduino-ide-extension/src/node/cli-protocol/cc/arduino/cli/commands/v1/settings_pb.d.ts
vendored
Normal file
@@ -0,0 +1,627 @@
|
||||
// package: cc.arduino.cli.commands.v1
|
||||
// file: cc/arduino/cli/commands/v1/settings.proto
|
||||
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
|
||||
import * as jspb from "google-protobuf";
|
||||
|
||||
export class Configuration extends jspb.Message {
|
||||
|
||||
hasDirectories(): boolean;
|
||||
clearDirectories(): void;
|
||||
getDirectories(): Configuration.Directories | undefined;
|
||||
setDirectories(value?: Configuration.Directories): Configuration;
|
||||
|
||||
hasNetwork(): boolean;
|
||||
clearNetwork(): void;
|
||||
getNetwork(): Configuration.Network | undefined;
|
||||
setNetwork(value?: Configuration.Network): Configuration;
|
||||
|
||||
hasSketch(): boolean;
|
||||
clearSketch(): void;
|
||||
getSketch(): Configuration.Sketch | undefined;
|
||||
setSketch(value?: Configuration.Sketch): Configuration;
|
||||
|
||||
hasBuildCache(): boolean;
|
||||
clearBuildCache(): void;
|
||||
getBuildCache(): Configuration.BuildCache | undefined;
|
||||
setBuildCache(value?: Configuration.BuildCache): Configuration;
|
||||
|
||||
hasBoardManager(): boolean;
|
||||
clearBoardManager(): void;
|
||||
getBoardManager(): Configuration.BoardManager | undefined;
|
||||
setBoardManager(value?: Configuration.BoardManager): Configuration;
|
||||
|
||||
hasDaemon(): boolean;
|
||||
clearDaemon(): void;
|
||||
getDaemon(): Configuration.Daemon | undefined;
|
||||
setDaemon(value?: Configuration.Daemon): Configuration;
|
||||
|
||||
hasOutput(): boolean;
|
||||
clearOutput(): void;
|
||||
getOutput(): Configuration.Output | undefined;
|
||||
setOutput(value?: Configuration.Output): Configuration;
|
||||
|
||||
hasLogging(): boolean;
|
||||
clearLogging(): void;
|
||||
getLogging(): Configuration.Logging | undefined;
|
||||
setLogging(value?: Configuration.Logging): Configuration;
|
||||
|
||||
hasLibrary(): boolean;
|
||||
clearLibrary(): void;
|
||||
getLibrary(): Configuration.Library | undefined;
|
||||
setLibrary(value?: Configuration.Library): Configuration;
|
||||
|
||||
hasUpdater(): boolean;
|
||||
clearUpdater(): void;
|
||||
getUpdater(): Configuration.Updater | undefined;
|
||||
setUpdater(value?: Configuration.Updater): Configuration;
|
||||
|
||||
hasLocale(): boolean;
|
||||
clearLocale(): void;
|
||||
getLocale(): string | undefined;
|
||||
setLocale(value: string): Configuration;
|
||||
|
||||
serializeBinary(): Uint8Array;
|
||||
toObject(includeInstance?: boolean): Configuration.AsObject;
|
||||
static toObject(includeInstance: boolean, msg: Configuration): Configuration.AsObject;
|
||||
static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};
|
||||
static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};
|
||||
static serializeBinaryToWriter(message: Configuration, writer: jspb.BinaryWriter): void;
|
||||
static deserializeBinary(bytes: Uint8Array): Configuration;
|
||||
static deserializeBinaryFromReader(message: Configuration, reader: jspb.BinaryReader): Configuration;
|
||||
}
|
||||
|
||||
export namespace Configuration {
|
||||
export type AsObject = {
|
||||
directories?: Configuration.Directories.AsObject,
|
||||
network?: Configuration.Network.AsObject,
|
||||
sketch?: Configuration.Sketch.AsObject,
|
||||
buildCache?: Configuration.BuildCache.AsObject,
|
||||
boardManager?: Configuration.BoardManager.AsObject,
|
||||
daemon?: Configuration.Daemon.AsObject,
|
||||
output?: Configuration.Output.AsObject,
|
||||
logging?: Configuration.Logging.AsObject,
|
||||
library?: Configuration.Library.AsObject,
|
||||
updater?: Configuration.Updater.AsObject,
|
||||
locale?: string,
|
||||
}
|
||||
|
||||
|
||||
export class Directories extends jspb.Message {
|
||||
getData(): string;
|
||||
setData(value: string): Directories;
|
||||
getUser(): string;
|
||||
setUser(value: string): Directories;
|
||||
getDownloads(): string;
|
||||
setDownloads(value: string): Directories;
|
||||
|
||||
hasBuiltin(): boolean;
|
||||
clearBuiltin(): void;
|
||||
getBuiltin(): Configuration.Directories.Builtin | undefined;
|
||||
setBuiltin(value?: Configuration.Directories.Builtin): Directories;
|
||||
|
||||
serializeBinary(): Uint8Array;
|
||||
toObject(includeInstance?: boolean): Directories.AsObject;
|
||||
static toObject(includeInstance: boolean, msg: Directories): Directories.AsObject;
|
||||
static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};
|
||||
static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};
|
||||
static serializeBinaryToWriter(message: Directories, writer: jspb.BinaryWriter): void;
|
||||
static deserializeBinary(bytes: Uint8Array): Directories;
|
||||
static deserializeBinaryFromReader(message: Directories, reader: jspb.BinaryReader): Directories;
|
||||
}
|
||||
|
||||
export namespace Directories {
|
||||
export type AsObject = {
|
||||
data: string,
|
||||
user: string,
|
||||
downloads: string,
|
||||
builtin?: Configuration.Directories.Builtin.AsObject,
|
||||
}
|
||||
|
||||
|
||||
export class Builtin extends jspb.Message {
|
||||
|
||||
hasLibraries(): boolean;
|
||||
clearLibraries(): void;
|
||||
getLibraries(): string | undefined;
|
||||
setLibraries(value: string): Builtin;
|
||||
|
||||
serializeBinary(): Uint8Array;
|
||||
toObject(includeInstance?: boolean): Builtin.AsObject;
|
||||
static toObject(includeInstance: boolean, msg: Builtin): Builtin.AsObject;
|
||||
static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};
|
||||
static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};
|
||||
static serializeBinaryToWriter(message: Builtin, writer: jspb.BinaryWriter): void;
|
||||
static deserializeBinary(bytes: Uint8Array): Builtin;
|
||||
static deserializeBinaryFromReader(message: Builtin, reader: jspb.BinaryReader): Builtin;
|
||||
}
|
||||
|
||||
export namespace Builtin {
|
||||
export type AsObject = {
|
||||
libraries?: string,
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
export class Network extends jspb.Message {
|
||||
|
||||
hasExtraUserAgent(): boolean;
|
||||
clearExtraUserAgent(): void;
|
||||
getExtraUserAgent(): string | undefined;
|
||||
setExtraUserAgent(value: string): Network;
|
||||
|
||||
hasProxy(): boolean;
|
||||
clearProxy(): void;
|
||||
getProxy(): string | undefined;
|
||||
setProxy(value: string): Network;
|
||||
|
||||
serializeBinary(): Uint8Array;
|
||||
toObject(includeInstance?: boolean): Network.AsObject;
|
||||
static toObject(includeInstance: boolean, msg: Network): Network.AsObject;
|
||||
static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};
|
||||
static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};
|
||||
static serializeBinaryToWriter(message: Network, writer: jspb.BinaryWriter): void;
|
||||
static deserializeBinary(bytes: Uint8Array): Network;
|
||||
static deserializeBinaryFromReader(message: Network, reader: jspb.BinaryReader): Network;
|
||||
}
|
||||
|
||||
export namespace Network {
|
||||
export type AsObject = {
|
||||
extraUserAgent?: string,
|
||||
proxy?: string,
|
||||
}
|
||||
}
|
||||
|
||||
export class Sketch extends jspb.Message {
|
||||
getAlwaysExportBinaries(): boolean;
|
||||
setAlwaysExportBinaries(value: boolean): Sketch;
|
||||
|
||||
serializeBinary(): Uint8Array;
|
||||
toObject(includeInstance?: boolean): Sketch.AsObject;
|
||||
static toObject(includeInstance: boolean, msg: Sketch): Sketch.AsObject;
|
||||
static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};
|
||||
static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};
|
||||
static serializeBinaryToWriter(message: Sketch, writer: jspb.BinaryWriter): void;
|
||||
static deserializeBinary(bytes: Uint8Array): Sketch;
|
||||
static deserializeBinaryFromReader(message: Sketch, reader: jspb.BinaryReader): Sketch;
|
||||
}
|
||||
|
||||
export namespace Sketch {
|
||||
export type AsObject = {
|
||||
alwaysExportBinaries: boolean,
|
||||
}
|
||||
}
|
||||
|
||||
export class BuildCache extends jspb.Message {
|
||||
getCompilationsBeforePurge(): number;
|
||||
setCompilationsBeforePurge(value: number): BuildCache;
|
||||
getTtlSecs(): number;
|
||||
setTtlSecs(value: number): BuildCache;
|
||||
|
||||
serializeBinary(): Uint8Array;
|
||||
toObject(includeInstance?: boolean): BuildCache.AsObject;
|
||||
static toObject(includeInstance: boolean, msg: BuildCache): BuildCache.AsObject;
|
||||
static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};
|
||||
static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};
|
||||
static serializeBinaryToWriter(message: BuildCache, writer: jspb.BinaryWriter): void;
|
||||
static deserializeBinary(bytes: Uint8Array): BuildCache;
|
||||
static deserializeBinaryFromReader(message: BuildCache, reader: jspb.BinaryReader): BuildCache;
|
||||
}
|
||||
|
||||
export namespace BuildCache {
|
||||
export type AsObject = {
|
||||
compilationsBeforePurge: number,
|
||||
ttlSecs: number,
|
||||
}
|
||||
}
|
||||
|
||||
export class BoardManager extends jspb.Message {
|
||||
clearAdditionalUrlsList(): void;
|
||||
getAdditionalUrlsList(): Array<string>;
|
||||
setAdditionalUrlsList(value: Array<string>): BoardManager;
|
||||
addAdditionalUrls(value: string, index?: number): string;
|
||||
|
||||
serializeBinary(): Uint8Array;
|
||||
toObject(includeInstance?: boolean): BoardManager.AsObject;
|
||||
static toObject(includeInstance: boolean, msg: BoardManager): BoardManager.AsObject;
|
||||
static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};
|
||||
static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};
|
||||
static serializeBinaryToWriter(message: BoardManager, writer: jspb.BinaryWriter): void;
|
||||
static deserializeBinary(bytes: Uint8Array): BoardManager;
|
||||
static deserializeBinaryFromReader(message: BoardManager, reader: jspb.BinaryReader): BoardManager;
|
||||
}
|
||||
|
||||
export namespace BoardManager {
|
||||
export type AsObject = {
|
||||
additionalUrlsList: Array<string>,
|
||||
}
|
||||
}
|
||||
|
||||
export class Daemon extends jspb.Message {
|
||||
getPort(): string;
|
||||
setPort(value: string): Daemon;
|
||||
|
||||
serializeBinary(): Uint8Array;
|
||||
toObject(includeInstance?: boolean): Daemon.AsObject;
|
||||
static toObject(includeInstance: boolean, msg: Daemon): Daemon.AsObject;
|
||||
static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};
|
||||
static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};
|
||||
static serializeBinaryToWriter(message: Daemon, writer: jspb.BinaryWriter): void;
|
||||
static deserializeBinary(bytes: Uint8Array): Daemon;
|
||||
static deserializeBinaryFromReader(message: Daemon, reader: jspb.BinaryReader): Daemon;
|
||||
}
|
||||
|
||||
export namespace Daemon {
|
||||
export type AsObject = {
|
||||
port: string,
|
||||
}
|
||||
}
|
||||
|
||||
export class Output extends jspb.Message {
|
||||
getNoColor(): boolean;
|
||||
setNoColor(value: boolean): Output;
|
||||
|
||||
serializeBinary(): Uint8Array;
|
||||
toObject(includeInstance?: boolean): Output.AsObject;
|
||||
static toObject(includeInstance: boolean, msg: Output): Output.AsObject;
|
||||
static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};
|
||||
static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};
|
||||
static serializeBinaryToWriter(message: Output, writer: jspb.BinaryWriter): void;
|
||||
static deserializeBinary(bytes: Uint8Array): Output;
|
||||
static deserializeBinaryFromReader(message: Output, reader: jspb.BinaryReader): Output;
|
||||
}
|
||||
|
||||
export namespace Output {
|
||||
export type AsObject = {
|
||||
noColor: boolean,
|
||||
}
|
||||
}
|
||||
|
||||
export class Logging extends jspb.Message {
|
||||
getLevel(): string;
|
||||
setLevel(value: string): Logging;
|
||||
getFormat(): string;
|
||||
setFormat(value: string): Logging;
|
||||
|
||||
hasFile(): boolean;
|
||||
clearFile(): void;
|
||||
getFile(): string | undefined;
|
||||
setFile(value: string): Logging;
|
||||
|
||||
serializeBinary(): Uint8Array;
|
||||
toObject(includeInstance?: boolean): Logging.AsObject;
|
||||
static toObject(includeInstance: boolean, msg: Logging): Logging.AsObject;
|
||||
static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};
|
||||
static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};
|
||||
static serializeBinaryToWriter(message: Logging, writer: jspb.BinaryWriter): void;
|
||||
static deserializeBinary(bytes: Uint8Array): Logging;
|
||||
static deserializeBinaryFromReader(message: Logging, reader: jspb.BinaryReader): Logging;
|
||||
}
|
||||
|
||||
export namespace Logging {
|
||||
export type AsObject = {
|
||||
level: string,
|
||||
format: string,
|
||||
file?: string,
|
||||
}
|
||||
}
|
||||
|
||||
export class Library extends jspb.Message {
|
||||
getEnableUnsafeInstall(): boolean;
|
||||
setEnableUnsafeInstall(value: boolean): Library;
|
||||
|
||||
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 = {
|
||||
enableUnsafeInstall: boolean,
|
||||
}
|
||||
}
|
||||
|
||||
export class Updater extends jspb.Message {
|
||||
getEnableNotification(): boolean;
|
||||
setEnableNotification(value: boolean): Updater;
|
||||
|
||||
serializeBinary(): Uint8Array;
|
||||
toObject(includeInstance?: boolean): Updater.AsObject;
|
||||
static toObject(includeInstance: boolean, msg: Updater): Updater.AsObject;
|
||||
static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};
|
||||
static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};
|
||||
static serializeBinaryToWriter(message: Updater, writer: jspb.BinaryWriter): void;
|
||||
static deserializeBinary(bytes: Uint8Array): Updater;
|
||||
static deserializeBinaryFromReader(message: Updater, reader: jspb.BinaryReader): Updater;
|
||||
}
|
||||
|
||||
export namespace Updater {
|
||||
export type AsObject = {
|
||||
enableNotification: boolean,
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
export class ConfigurationGetRequest extends jspb.Message {
|
||||
|
||||
serializeBinary(): Uint8Array;
|
||||
toObject(includeInstance?: boolean): ConfigurationGetRequest.AsObject;
|
||||
static toObject(includeInstance: boolean, msg: ConfigurationGetRequest): ConfigurationGetRequest.AsObject;
|
||||
static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};
|
||||
static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};
|
||||
static serializeBinaryToWriter(message: ConfigurationGetRequest, writer: jspb.BinaryWriter): void;
|
||||
static deserializeBinary(bytes: Uint8Array): ConfigurationGetRequest;
|
||||
static deserializeBinaryFromReader(message: ConfigurationGetRequest, reader: jspb.BinaryReader): ConfigurationGetRequest;
|
||||
}
|
||||
|
||||
export namespace ConfigurationGetRequest {
|
||||
export type AsObject = {
|
||||
}
|
||||
}
|
||||
|
||||
export class ConfigurationGetResponse extends jspb.Message {
|
||||
|
||||
hasConfiguration(): boolean;
|
||||
clearConfiguration(): void;
|
||||
getConfiguration(): Configuration | undefined;
|
||||
setConfiguration(value?: Configuration): ConfigurationGetResponse;
|
||||
|
||||
serializeBinary(): Uint8Array;
|
||||
toObject(includeInstance?: boolean): ConfigurationGetResponse.AsObject;
|
||||
static toObject(includeInstance: boolean, msg: ConfigurationGetResponse): ConfigurationGetResponse.AsObject;
|
||||
static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};
|
||||
static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};
|
||||
static serializeBinaryToWriter(message: ConfigurationGetResponse, writer: jspb.BinaryWriter): void;
|
||||
static deserializeBinary(bytes: Uint8Array): ConfigurationGetResponse;
|
||||
static deserializeBinaryFromReader(message: ConfigurationGetResponse, reader: jspb.BinaryReader): ConfigurationGetResponse;
|
||||
}
|
||||
|
||||
export namespace ConfigurationGetResponse {
|
||||
export type AsObject = {
|
||||
configuration?: Configuration.AsObject,
|
||||
}
|
||||
}
|
||||
|
||||
export class ConfigurationSaveRequest extends jspb.Message {
|
||||
getSettingsFormat(): string;
|
||||
setSettingsFormat(value: string): ConfigurationSaveRequest;
|
||||
|
||||
serializeBinary(): Uint8Array;
|
||||
toObject(includeInstance?: boolean): ConfigurationSaveRequest.AsObject;
|
||||
static toObject(includeInstance: boolean, msg: ConfigurationSaveRequest): ConfigurationSaveRequest.AsObject;
|
||||
static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};
|
||||
static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};
|
||||
static serializeBinaryToWriter(message: ConfigurationSaveRequest, writer: jspb.BinaryWriter): void;
|
||||
static deserializeBinary(bytes: Uint8Array): ConfigurationSaveRequest;
|
||||
static deserializeBinaryFromReader(message: ConfigurationSaveRequest, reader: jspb.BinaryReader): ConfigurationSaveRequest;
|
||||
}
|
||||
|
||||
export namespace ConfigurationSaveRequest {
|
||||
export type AsObject = {
|
||||
settingsFormat: string,
|
||||
}
|
||||
}
|
||||
|
||||
export class ConfigurationSaveResponse extends jspb.Message {
|
||||
getEncodedSettings(): string;
|
||||
setEncodedSettings(value: string): ConfigurationSaveResponse;
|
||||
|
||||
serializeBinary(): Uint8Array;
|
||||
toObject(includeInstance?: boolean): ConfigurationSaveResponse.AsObject;
|
||||
static toObject(includeInstance: boolean, msg: ConfigurationSaveResponse): ConfigurationSaveResponse.AsObject;
|
||||
static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};
|
||||
static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};
|
||||
static serializeBinaryToWriter(message: ConfigurationSaveResponse, writer: jspb.BinaryWriter): void;
|
||||
static deserializeBinary(bytes: Uint8Array): ConfigurationSaveResponse;
|
||||
static deserializeBinaryFromReader(message: ConfigurationSaveResponse, reader: jspb.BinaryReader): ConfigurationSaveResponse;
|
||||
}
|
||||
|
||||
export namespace ConfigurationSaveResponse {
|
||||
export type AsObject = {
|
||||
encodedSettings: string,
|
||||
}
|
||||
}
|
||||
|
||||
export class ConfigurationOpenRequest extends jspb.Message {
|
||||
getEncodedSettings(): string;
|
||||
setEncodedSettings(value: string): ConfigurationOpenRequest;
|
||||
getSettingsFormat(): string;
|
||||
setSettingsFormat(value: string): ConfigurationOpenRequest;
|
||||
|
||||
serializeBinary(): Uint8Array;
|
||||
toObject(includeInstance?: boolean): ConfigurationOpenRequest.AsObject;
|
||||
static toObject(includeInstance: boolean, msg: ConfigurationOpenRequest): ConfigurationOpenRequest.AsObject;
|
||||
static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};
|
||||
static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};
|
||||
static serializeBinaryToWriter(message: ConfigurationOpenRequest, writer: jspb.BinaryWriter): void;
|
||||
static deserializeBinary(bytes: Uint8Array): ConfigurationOpenRequest;
|
||||
static deserializeBinaryFromReader(message: ConfigurationOpenRequest, reader: jspb.BinaryReader): ConfigurationOpenRequest;
|
||||
}
|
||||
|
||||
export namespace ConfigurationOpenRequest {
|
||||
export type AsObject = {
|
||||
encodedSettings: string,
|
||||
settingsFormat: string,
|
||||
}
|
||||
}
|
||||
|
||||
export class ConfigurationOpenResponse extends jspb.Message {
|
||||
clearWarningsList(): void;
|
||||
getWarningsList(): Array<string>;
|
||||
setWarningsList(value: Array<string>): ConfigurationOpenResponse;
|
||||
addWarnings(value: string, index?: number): string;
|
||||
|
||||
serializeBinary(): Uint8Array;
|
||||
toObject(includeInstance?: boolean): ConfigurationOpenResponse.AsObject;
|
||||
static toObject(includeInstance: boolean, msg: ConfigurationOpenResponse): ConfigurationOpenResponse.AsObject;
|
||||
static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};
|
||||
static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};
|
||||
static serializeBinaryToWriter(message: ConfigurationOpenResponse, writer: jspb.BinaryWriter): void;
|
||||
static deserializeBinary(bytes: Uint8Array): ConfigurationOpenResponse;
|
||||
static deserializeBinaryFromReader(message: ConfigurationOpenResponse, reader: jspb.BinaryReader): ConfigurationOpenResponse;
|
||||
}
|
||||
|
||||
export namespace ConfigurationOpenResponse {
|
||||
export type AsObject = {
|
||||
warningsList: Array<string>,
|
||||
}
|
||||
}
|
||||
|
||||
export class SettingsGetValueRequest extends jspb.Message {
|
||||
getKey(): string;
|
||||
setKey(value: string): SettingsGetValueRequest;
|
||||
getValueFormat(): string;
|
||||
setValueFormat(value: string): SettingsGetValueRequest;
|
||||
|
||||
serializeBinary(): Uint8Array;
|
||||
toObject(includeInstance?: boolean): SettingsGetValueRequest.AsObject;
|
||||
static toObject(includeInstance: boolean, msg: SettingsGetValueRequest): SettingsGetValueRequest.AsObject;
|
||||
static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};
|
||||
static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};
|
||||
static serializeBinaryToWriter(message: SettingsGetValueRequest, writer: jspb.BinaryWriter): void;
|
||||
static deserializeBinary(bytes: Uint8Array): SettingsGetValueRequest;
|
||||
static deserializeBinaryFromReader(message: SettingsGetValueRequest, reader: jspb.BinaryReader): SettingsGetValueRequest;
|
||||
}
|
||||
|
||||
export namespace SettingsGetValueRequest {
|
||||
export type AsObject = {
|
||||
key: string,
|
||||
valueFormat: string,
|
||||
}
|
||||
}
|
||||
|
||||
export class SettingsGetValueResponse extends jspb.Message {
|
||||
getEncodedValue(): string;
|
||||
setEncodedValue(value: string): SettingsGetValueResponse;
|
||||
|
||||
serializeBinary(): Uint8Array;
|
||||
toObject(includeInstance?: boolean): SettingsGetValueResponse.AsObject;
|
||||
static toObject(includeInstance: boolean, msg: SettingsGetValueResponse): SettingsGetValueResponse.AsObject;
|
||||
static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};
|
||||
static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};
|
||||
static serializeBinaryToWriter(message: SettingsGetValueResponse, writer: jspb.BinaryWriter): void;
|
||||
static deserializeBinary(bytes: Uint8Array): SettingsGetValueResponse;
|
||||
static deserializeBinaryFromReader(message: SettingsGetValueResponse, reader: jspb.BinaryReader): SettingsGetValueResponse;
|
||||
}
|
||||
|
||||
export namespace SettingsGetValueResponse {
|
||||
export type AsObject = {
|
||||
encodedValue: string,
|
||||
}
|
||||
}
|
||||
|
||||
export class SettingsSetValueRequest extends jspb.Message {
|
||||
getKey(): string;
|
||||
setKey(value: string): SettingsSetValueRequest;
|
||||
getEncodedValue(): string;
|
||||
setEncodedValue(value: string): SettingsSetValueRequest;
|
||||
getValueFormat(): string;
|
||||
setValueFormat(value: string): SettingsSetValueRequest;
|
||||
|
||||
serializeBinary(): Uint8Array;
|
||||
toObject(includeInstance?: boolean): SettingsSetValueRequest.AsObject;
|
||||
static toObject(includeInstance: boolean, msg: SettingsSetValueRequest): SettingsSetValueRequest.AsObject;
|
||||
static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};
|
||||
static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};
|
||||
static serializeBinaryToWriter(message: SettingsSetValueRequest, writer: jspb.BinaryWriter): void;
|
||||
static deserializeBinary(bytes: Uint8Array): SettingsSetValueRequest;
|
||||
static deserializeBinaryFromReader(message: SettingsSetValueRequest, reader: jspb.BinaryReader): SettingsSetValueRequest;
|
||||
}
|
||||
|
||||
export namespace SettingsSetValueRequest {
|
||||
export type AsObject = {
|
||||
key: string,
|
||||
encodedValue: string,
|
||||
valueFormat: string,
|
||||
}
|
||||
}
|
||||
|
||||
export class SettingsSetValueResponse extends jspb.Message {
|
||||
|
||||
serializeBinary(): Uint8Array;
|
||||
toObject(includeInstance?: boolean): SettingsSetValueResponse.AsObject;
|
||||
static toObject(includeInstance: boolean, msg: SettingsSetValueResponse): SettingsSetValueResponse.AsObject;
|
||||
static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};
|
||||
static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};
|
||||
static serializeBinaryToWriter(message: SettingsSetValueResponse, writer: jspb.BinaryWriter): void;
|
||||
static deserializeBinary(bytes: Uint8Array): SettingsSetValueResponse;
|
||||
static deserializeBinaryFromReader(message: SettingsSetValueResponse, reader: jspb.BinaryReader): SettingsSetValueResponse;
|
||||
}
|
||||
|
||||
export namespace SettingsSetValueResponse {
|
||||
export type AsObject = {
|
||||
}
|
||||
}
|
||||
|
||||
export class SettingsEnumerateRequest extends jspb.Message {
|
||||
|
||||
serializeBinary(): Uint8Array;
|
||||
toObject(includeInstance?: boolean): SettingsEnumerateRequest.AsObject;
|
||||
static toObject(includeInstance: boolean, msg: SettingsEnumerateRequest): SettingsEnumerateRequest.AsObject;
|
||||
static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};
|
||||
static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};
|
||||
static serializeBinaryToWriter(message: SettingsEnumerateRequest, writer: jspb.BinaryWriter): void;
|
||||
static deserializeBinary(bytes: Uint8Array): SettingsEnumerateRequest;
|
||||
static deserializeBinaryFromReader(message: SettingsEnumerateRequest, reader: jspb.BinaryReader): SettingsEnumerateRequest;
|
||||
}
|
||||
|
||||
export namespace SettingsEnumerateRequest {
|
||||
export type AsObject = {
|
||||
}
|
||||
}
|
||||
|
||||
export class SettingsEnumerateResponse extends jspb.Message {
|
||||
clearEntriesList(): void;
|
||||
getEntriesList(): Array<SettingsEnumerateResponse.Entry>;
|
||||
setEntriesList(value: Array<SettingsEnumerateResponse.Entry>): SettingsEnumerateResponse;
|
||||
addEntries(value?: SettingsEnumerateResponse.Entry, index?: number): SettingsEnumerateResponse.Entry;
|
||||
|
||||
serializeBinary(): Uint8Array;
|
||||
toObject(includeInstance?: boolean): SettingsEnumerateResponse.AsObject;
|
||||
static toObject(includeInstance: boolean, msg: SettingsEnumerateResponse): SettingsEnumerateResponse.AsObject;
|
||||
static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};
|
||||
static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};
|
||||
static serializeBinaryToWriter(message: SettingsEnumerateResponse, writer: jspb.BinaryWriter): void;
|
||||
static deserializeBinary(bytes: Uint8Array): SettingsEnumerateResponse;
|
||||
static deserializeBinaryFromReader(message: SettingsEnumerateResponse, reader: jspb.BinaryReader): SettingsEnumerateResponse;
|
||||
}
|
||||
|
||||
export namespace SettingsEnumerateResponse {
|
||||
export type AsObject = {
|
||||
entriesList: Array<SettingsEnumerateResponse.Entry.AsObject>,
|
||||
}
|
||||
|
||||
|
||||
export class Entry extends jspb.Message {
|
||||
getKey(): string;
|
||||
setKey(value: string): Entry;
|
||||
getType(): string;
|
||||
setType(value: string): Entry;
|
||||
|
||||
serializeBinary(): Uint8Array;
|
||||
toObject(includeInstance?: boolean): Entry.AsObject;
|
||||
static toObject(includeInstance: boolean, msg: Entry): Entry.AsObject;
|
||||
static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};
|
||||
static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};
|
||||
static serializeBinaryToWriter(message: Entry, writer: jspb.BinaryWriter): void;
|
||||
static deserializeBinary(bytes: Uint8Array): Entry;
|
||||
static deserializeBinaryFromReader(message: Entry, reader: jspb.BinaryReader): Entry;
|
||||
}
|
||||
|
||||
export namespace Entry {
|
||||
export type AsObject = {
|
||||
key: string,
|
||||
type: string,
|
||||
}
|
||||
}
|
||||
|
||||
}
|
File diff suppressed because it is too large
Load Diff
@@ -38,6 +38,10 @@ export class UploadRequest extends jspb.Message {
|
||||
|
||||
getUserFieldsMap(): jspb.Map<string, string>;
|
||||
clearUserFieldsMap(): void;
|
||||
clearUploadPropertiesList(): void;
|
||||
getUploadPropertiesList(): Array<string>;
|
||||
setUploadPropertiesList(value: Array<string>): UploadRequest;
|
||||
addUploadProperties(value: string, index?: number): string;
|
||||
|
||||
serializeBinary(): Uint8Array;
|
||||
toObject(includeInstance?: boolean): UploadRequest.AsObject;
|
||||
@@ -63,6 +67,7 @@ export namespace UploadRequest {
|
||||
dryRun: boolean,
|
||||
|
||||
userFieldsMap: Array<[string, string]>,
|
||||
uploadPropertiesList: Array<string>,
|
||||
}
|
||||
}
|
||||
|
||||
@@ -185,6 +190,10 @@ export class UploadUsingProgrammerRequest extends jspb.Message {
|
||||
|
||||
getUserFieldsMap(): jspb.Map<string, string>;
|
||||
clearUserFieldsMap(): void;
|
||||
clearUploadPropertiesList(): void;
|
||||
getUploadPropertiesList(): Array<string>;
|
||||
setUploadPropertiesList(value: Array<string>): UploadUsingProgrammerRequest;
|
||||
addUploadProperties(value: string, index?: number): string;
|
||||
|
||||
serializeBinary(): Uint8Array;
|
||||
toObject(includeInstance?: boolean): UploadUsingProgrammerRequest.AsObject;
|
||||
@@ -210,19 +219,28 @@ export namespace UploadUsingProgrammerRequest {
|
||||
dryRun: boolean,
|
||||
|
||||
userFieldsMap: Array<[string, string]>,
|
||||
uploadPropertiesList: Array<string>,
|
||||
}
|
||||
}
|
||||
|
||||
export class UploadUsingProgrammerResponse extends jspb.Message {
|
||||
|
||||
hasOutStream(): boolean;
|
||||
clearOutStream(): void;
|
||||
getOutStream(): Uint8Array | string;
|
||||
getOutStream_asU8(): Uint8Array;
|
||||
getOutStream_asB64(): string;
|
||||
setOutStream(value: Uint8Array | string): UploadUsingProgrammerResponse;
|
||||
|
||||
hasErrStream(): boolean;
|
||||
clearErrStream(): void;
|
||||
getErrStream(): Uint8Array | string;
|
||||
getErrStream_asU8(): Uint8Array;
|
||||
getErrStream_asB64(): string;
|
||||
setErrStream(value: Uint8Array | string): UploadUsingProgrammerResponse;
|
||||
|
||||
getMessageCase(): UploadUsingProgrammerResponse.MessageCase;
|
||||
|
||||
serializeBinary(): Uint8Array;
|
||||
toObject(includeInstance?: boolean): UploadUsingProgrammerResponse.AsObject;
|
||||
static toObject(includeInstance: boolean, msg: UploadUsingProgrammerResponse): UploadUsingProgrammerResponse.AsObject;
|
||||
@@ -238,6 +256,13 @@ export namespace UploadUsingProgrammerResponse {
|
||||
outStream: Uint8Array | string,
|
||||
errStream: Uint8Array | string,
|
||||
}
|
||||
|
||||
export enum MessageCase {
|
||||
MESSAGE_NOT_SET = 0,
|
||||
OUT_STREAM = 1,
|
||||
ERR_STREAM = 2,
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
export class BurnBootloaderRequest extends jspb.Message {
|
||||
@@ -264,6 +289,10 @@ export class BurnBootloaderRequest extends jspb.Message {
|
||||
|
||||
getUserFieldsMap(): jspb.Map<string, string>;
|
||||
clearUserFieldsMap(): void;
|
||||
clearUploadPropertiesList(): void;
|
||||
getUploadPropertiesList(): Array<string>;
|
||||
setUploadPropertiesList(value: Array<string>): BurnBootloaderRequest;
|
||||
addUploadProperties(value: string, index?: number): string;
|
||||
|
||||
serializeBinary(): Uint8Array;
|
||||
toObject(includeInstance?: boolean): BurnBootloaderRequest.AsObject;
|
||||
@@ -286,19 +315,28 @@ export namespace BurnBootloaderRequest {
|
||||
dryRun: boolean,
|
||||
|
||||
userFieldsMap: Array<[string, string]>,
|
||||
uploadPropertiesList: Array<string>,
|
||||
}
|
||||
}
|
||||
|
||||
export class BurnBootloaderResponse extends jspb.Message {
|
||||
|
||||
hasOutStream(): boolean;
|
||||
clearOutStream(): void;
|
||||
getOutStream(): Uint8Array | string;
|
||||
getOutStream_asU8(): Uint8Array;
|
||||
getOutStream_asB64(): string;
|
||||
setOutStream(value: Uint8Array | string): BurnBootloaderResponse;
|
||||
|
||||
hasErrStream(): boolean;
|
||||
clearErrStream(): void;
|
||||
getErrStream(): Uint8Array | string;
|
||||
getErrStream_asU8(): Uint8Array;
|
||||
getErrStream_asB64(): string;
|
||||
setErrStream(value: Uint8Array | string): BurnBootloaderResponse;
|
||||
|
||||
getMessageCase(): BurnBootloaderResponse.MessageCase;
|
||||
|
||||
serializeBinary(): Uint8Array;
|
||||
toObject(includeInstance?: boolean): BurnBootloaderResponse.AsObject;
|
||||
static toObject(includeInstance: boolean, msg: BurnBootloaderResponse): BurnBootloaderResponse.AsObject;
|
||||
@@ -314,6 +352,13 @@ export namespace BurnBootloaderResponse {
|
||||
outStream: Uint8Array | string,
|
||||
errStream: Uint8Array | string,
|
||||
}
|
||||
|
||||
export enum MessageCase {
|
||||
MESSAGE_NOT_SET = 0,
|
||||
OUT_STREAM = 1,
|
||||
ERR_STREAM = 2,
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
export class ListProgrammersAvailableForUploadRequest extends jspb.Message {
|
||||
|
@@ -27,6 +27,7 @@ var cc_arduino_cli_commands_v1_port_pb = require('../../../../../cc/arduino/cli/
|
||||
goog.object.extend(proto, cc_arduino_cli_commands_v1_port_pb);
|
||||
goog.exportSymbol('proto.cc.arduino.cli.commands.v1.BurnBootloaderRequest', null, global);
|
||||
goog.exportSymbol('proto.cc.arduino.cli.commands.v1.BurnBootloaderResponse', null, global);
|
||||
goog.exportSymbol('proto.cc.arduino.cli.commands.v1.BurnBootloaderResponse.MessageCase', null, global);
|
||||
goog.exportSymbol('proto.cc.arduino.cli.commands.v1.ListProgrammersAvailableForUploadRequest', null, global);
|
||||
goog.exportSymbol('proto.cc.arduino.cli.commands.v1.ListProgrammersAvailableForUploadResponse', null, global);
|
||||
goog.exportSymbol('proto.cc.arduino.cli.commands.v1.ProgrammerIsRequiredForUploadError', null, global);
|
||||
@@ -38,6 +39,7 @@ goog.exportSymbol('proto.cc.arduino.cli.commands.v1.UploadResponse.MessageCase',
|
||||
goog.exportSymbol('proto.cc.arduino.cli.commands.v1.UploadResult', null, global);
|
||||
goog.exportSymbol('proto.cc.arduino.cli.commands.v1.UploadUsingProgrammerRequest', null, global);
|
||||
goog.exportSymbol('proto.cc.arduino.cli.commands.v1.UploadUsingProgrammerResponse', null, global);
|
||||
goog.exportSymbol('proto.cc.arduino.cli.commands.v1.UploadUsingProgrammerResponse.MessageCase', null, global);
|
||||
goog.exportSymbol('proto.cc.arduino.cli.commands.v1.UserField', null, global);
|
||||
/**
|
||||
* Generated by JsPbCodeGenerator.
|
||||
@@ -50,7 +52,7 @@ goog.exportSymbol('proto.cc.arduino.cli.commands.v1.UserField', null, global);
|
||||
* @constructor
|
||||
*/
|
||||
proto.cc.arduino.cli.commands.v1.UploadRequest = function(opt_data) {
|
||||
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
|
||||
jspb.Message.initialize(this, opt_data, 0, -1, proto.cc.arduino.cli.commands.v1.UploadRequest.repeatedFields_, null);
|
||||
};
|
||||
goog.inherits(proto.cc.arduino.cli.commands.v1.UploadRequest, jspb.Message);
|
||||
if (goog.DEBUG && !COMPILED) {
|
||||
@@ -134,7 +136,7 @@ if (goog.DEBUG && !COMPILED) {
|
||||
* @constructor
|
||||
*/
|
||||
proto.cc.arduino.cli.commands.v1.UploadUsingProgrammerRequest = function(opt_data) {
|
||||
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
|
||||
jspb.Message.initialize(this, opt_data, 0, -1, proto.cc.arduino.cli.commands.v1.UploadUsingProgrammerRequest.repeatedFields_, null);
|
||||
};
|
||||
goog.inherits(proto.cc.arduino.cli.commands.v1.UploadUsingProgrammerRequest, jspb.Message);
|
||||
if (goog.DEBUG && !COMPILED) {
|
||||
@@ -155,7 +157,7 @@ if (goog.DEBUG && !COMPILED) {
|
||||
* @constructor
|
||||
*/
|
||||
proto.cc.arduino.cli.commands.v1.UploadUsingProgrammerResponse = function(opt_data) {
|
||||
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
|
||||
jspb.Message.initialize(this, opt_data, 0, -1, null, proto.cc.arduino.cli.commands.v1.UploadUsingProgrammerResponse.oneofGroups_);
|
||||
};
|
||||
goog.inherits(proto.cc.arduino.cli.commands.v1.UploadUsingProgrammerResponse, jspb.Message);
|
||||
if (goog.DEBUG && !COMPILED) {
|
||||
@@ -176,7 +178,7 @@ if (goog.DEBUG && !COMPILED) {
|
||||
* @constructor
|
||||
*/
|
||||
proto.cc.arduino.cli.commands.v1.BurnBootloaderRequest = function(opt_data) {
|
||||
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
|
||||
jspb.Message.initialize(this, opt_data, 0, -1, proto.cc.arduino.cli.commands.v1.BurnBootloaderRequest.repeatedFields_, null);
|
||||
};
|
||||
goog.inherits(proto.cc.arduino.cli.commands.v1.BurnBootloaderRequest, jspb.Message);
|
||||
if (goog.DEBUG && !COMPILED) {
|
||||
@@ -197,7 +199,7 @@ if (goog.DEBUG && !COMPILED) {
|
||||
* @constructor
|
||||
*/
|
||||
proto.cc.arduino.cli.commands.v1.BurnBootloaderResponse = function(opt_data) {
|
||||
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
|
||||
jspb.Message.initialize(this, opt_data, 0, -1, null, proto.cc.arduino.cli.commands.v1.BurnBootloaderResponse.oneofGroups_);
|
||||
};
|
||||
goog.inherits(proto.cc.arduino.cli.commands.v1.BurnBootloaderResponse, jspb.Message);
|
||||
if (goog.DEBUG && !COMPILED) {
|
||||
@@ -313,6 +315,13 @@ if (goog.DEBUG && !COMPILED) {
|
||||
proto.cc.arduino.cli.commands.v1.SupportedUserFieldsResponse.displayName = 'proto.cc.arduino.cli.commands.v1.SupportedUserFieldsResponse';
|
||||
}
|
||||
|
||||
/**
|
||||
* List of repeated fields within this message type.
|
||||
* @private {!Array<number>}
|
||||
* @const
|
||||
*/
|
||||
proto.cc.arduino.cli.commands.v1.UploadRequest.repeatedFields_ = [12];
|
||||
|
||||
|
||||
|
||||
if (jspb.Message.GENERATE_TO_OBJECT) {
|
||||
@@ -354,7 +363,8 @@ proto.cc.arduino.cli.commands.v1.UploadRequest.toObject = function(includeInstan
|
||||
importDir: jspb.Message.getFieldWithDefault(msg, 8, ""),
|
||||
programmer: jspb.Message.getFieldWithDefault(msg, 9, ""),
|
||||
dryRun: jspb.Message.getBooleanFieldWithDefault(msg, 10, false),
|
||||
userFieldsMap: (f = msg.getUserFieldsMap()) ? f.toObject(includeInstance, undefined) : []
|
||||
userFieldsMap: (f = msg.getUserFieldsMap()) ? f.toObject(includeInstance, undefined) : [],
|
||||
uploadPropertiesList: (f = jspb.Message.getRepeatedField(msg, 12)) == null ? undefined : f
|
||||
};
|
||||
|
||||
if (includeInstance) {
|
||||
@@ -439,6 +449,10 @@ proto.cc.arduino.cli.commands.v1.UploadRequest.deserializeBinaryFromReader = fun
|
||||
jspb.Map.deserializeBinary(message, reader, jspb.BinaryReader.prototype.readString, jspb.BinaryReader.prototype.readString, null, "", "");
|
||||
});
|
||||
break;
|
||||
case 12:
|
||||
var value = /** @type {string} */ (reader.readString());
|
||||
msg.addUploadProperties(value);
|
||||
break;
|
||||
default:
|
||||
reader.skipField();
|
||||
break;
|
||||
@@ -544,6 +558,13 @@ proto.cc.arduino.cli.commands.v1.UploadRequest.serializeBinaryToWriter = functio
|
||||
if (f && f.getLength() > 0) {
|
||||
f.serializeBinary(11, writer, jspb.BinaryWriter.prototype.writeString, jspb.BinaryWriter.prototype.writeString);
|
||||
}
|
||||
f = message.getUploadPropertiesList();
|
||||
if (f.length > 0) {
|
||||
writer.writeRepeatedString(
|
||||
12,
|
||||
f
|
||||
);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@@ -787,6 +808,43 @@ proto.cc.arduino.cli.commands.v1.UploadRequest.prototype.clearUserFieldsMap = fu
|
||||
return this;};
|
||||
|
||||
|
||||
/**
|
||||
* repeated string upload_properties = 12;
|
||||
* @return {!Array<string>}
|
||||
*/
|
||||
proto.cc.arduino.cli.commands.v1.UploadRequest.prototype.getUploadPropertiesList = function() {
|
||||
return /** @type {!Array<string>} */ (jspb.Message.getRepeatedField(this, 12));
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* @param {!Array<string>} value
|
||||
* @return {!proto.cc.arduino.cli.commands.v1.UploadRequest} returns this
|
||||
*/
|
||||
proto.cc.arduino.cli.commands.v1.UploadRequest.prototype.setUploadPropertiesList = function(value) {
|
||||
return jspb.Message.setField(this, 12, value || []);
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* @param {string} value
|
||||
* @param {number=} opt_index
|
||||
* @return {!proto.cc.arduino.cli.commands.v1.UploadRequest} returns this
|
||||
*/
|
||||
proto.cc.arduino.cli.commands.v1.UploadRequest.prototype.addUploadProperties = function(value, opt_index) {
|
||||
return jspb.Message.addToRepeatedField(this, 12, value, opt_index);
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* Clears the list making it empty but non-null.
|
||||
* @return {!proto.cc.arduino.cli.commands.v1.UploadRequest} returns this
|
||||
*/
|
||||
proto.cc.arduino.cli.commands.v1.UploadRequest.prototype.clearUploadPropertiesList = function() {
|
||||
return this.setUploadPropertiesList([]);
|
||||
};
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Oneof group definitions for this message. Each group defines the field
|
||||
@@ -1362,6 +1420,13 @@ proto.cc.arduino.cli.commands.v1.ProgrammerIsRequiredForUploadError.serializeBin
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* List of repeated fields within this message type.
|
||||
* @private {!Array<number>}
|
||||
* @const
|
||||
*/
|
||||
proto.cc.arduino.cli.commands.v1.UploadUsingProgrammerRequest.repeatedFields_ = [12];
|
||||
|
||||
|
||||
|
||||
if (jspb.Message.GENERATE_TO_OBJECT) {
|
||||
@@ -1403,7 +1468,8 @@ proto.cc.arduino.cli.commands.v1.UploadUsingProgrammerRequest.toObject = functio
|
||||
importDir: jspb.Message.getFieldWithDefault(msg, 8, ""),
|
||||
programmer: jspb.Message.getFieldWithDefault(msg, 9, ""),
|
||||
dryRun: jspb.Message.getBooleanFieldWithDefault(msg, 10, false),
|
||||
userFieldsMap: (f = msg.getUserFieldsMap()) ? f.toObject(includeInstance, undefined) : []
|
||||
userFieldsMap: (f = msg.getUserFieldsMap()) ? f.toObject(includeInstance, undefined) : [],
|
||||
uploadPropertiesList: (f = jspb.Message.getRepeatedField(msg, 12)) == null ? undefined : f
|
||||
};
|
||||
|
||||
if (includeInstance) {
|
||||
@@ -1488,6 +1554,10 @@ proto.cc.arduino.cli.commands.v1.UploadUsingProgrammerRequest.deserializeBinaryF
|
||||
jspb.Map.deserializeBinary(message, reader, jspb.BinaryReader.prototype.readString, jspb.BinaryReader.prototype.readString, null, "", "");
|
||||
});
|
||||
break;
|
||||
case 12:
|
||||
var value = /** @type {string} */ (reader.readString());
|
||||
msg.addUploadProperties(value);
|
||||
break;
|
||||
default:
|
||||
reader.skipField();
|
||||
break;
|
||||
@@ -1593,6 +1663,13 @@ proto.cc.arduino.cli.commands.v1.UploadUsingProgrammerRequest.serializeBinaryToW
|
||||
if (f && f.getLength() > 0) {
|
||||
f.serializeBinary(11, writer, jspb.BinaryWriter.prototype.writeString, jspb.BinaryWriter.prototype.writeString);
|
||||
}
|
||||
f = message.getUploadPropertiesList();
|
||||
if (f.length > 0) {
|
||||
writer.writeRepeatedString(
|
||||
12,
|
||||
f
|
||||
);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@@ -1836,6 +1913,69 @@ proto.cc.arduino.cli.commands.v1.UploadUsingProgrammerRequest.prototype.clearUse
|
||||
return this;};
|
||||
|
||||
|
||||
/**
|
||||
* repeated string upload_properties = 12;
|
||||
* @return {!Array<string>}
|
||||
*/
|
||||
proto.cc.arduino.cli.commands.v1.UploadUsingProgrammerRequest.prototype.getUploadPropertiesList = function() {
|
||||
return /** @type {!Array<string>} */ (jspb.Message.getRepeatedField(this, 12));
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* @param {!Array<string>} value
|
||||
* @return {!proto.cc.arduino.cli.commands.v1.UploadUsingProgrammerRequest} returns this
|
||||
*/
|
||||
proto.cc.arduino.cli.commands.v1.UploadUsingProgrammerRequest.prototype.setUploadPropertiesList = function(value) {
|
||||
return jspb.Message.setField(this, 12, value || []);
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* @param {string} value
|
||||
* @param {number=} opt_index
|
||||
* @return {!proto.cc.arduino.cli.commands.v1.UploadUsingProgrammerRequest} returns this
|
||||
*/
|
||||
proto.cc.arduino.cli.commands.v1.UploadUsingProgrammerRequest.prototype.addUploadProperties = function(value, opt_index) {
|
||||
return jspb.Message.addToRepeatedField(this, 12, value, opt_index);
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* Clears the list making it empty but non-null.
|
||||
* @return {!proto.cc.arduino.cli.commands.v1.UploadUsingProgrammerRequest} returns this
|
||||
*/
|
||||
proto.cc.arduino.cli.commands.v1.UploadUsingProgrammerRequest.prototype.clearUploadPropertiesList = function() {
|
||||
return this.setUploadPropertiesList([]);
|
||||
};
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Oneof group definitions for this message. Each group defines the field
|
||||
* numbers belonging to that group. When of these fields' value is set, all
|
||||
* other fields in the group are cleared. During deserialization, if multiple
|
||||
* fields are encountered for a group, only the last value seen will be kept.
|
||||
* @private {!Array<!Array<number>>}
|
||||
* @const
|
||||
*/
|
||||
proto.cc.arduino.cli.commands.v1.UploadUsingProgrammerResponse.oneofGroups_ = [[1,2]];
|
||||
|
||||
/**
|
||||
* @enum {number}
|
||||
*/
|
||||
proto.cc.arduino.cli.commands.v1.UploadUsingProgrammerResponse.MessageCase = {
|
||||
MESSAGE_NOT_SET: 0,
|
||||
OUT_STREAM: 1,
|
||||
ERR_STREAM: 2
|
||||
};
|
||||
|
||||
/**
|
||||
* @return {proto.cc.arduino.cli.commands.v1.UploadUsingProgrammerResponse.MessageCase}
|
||||
*/
|
||||
proto.cc.arduino.cli.commands.v1.UploadUsingProgrammerResponse.prototype.getMessageCase = function() {
|
||||
return /** @type {proto.cc.arduino.cli.commands.v1.UploadUsingProgrammerResponse.MessageCase} */(jspb.Message.computeOneofCase(this, proto.cc.arduino.cli.commands.v1.UploadUsingProgrammerResponse.oneofGroups_[0]));
|
||||
};
|
||||
|
||||
|
||||
|
||||
@@ -1943,15 +2083,15 @@ proto.cc.arduino.cli.commands.v1.UploadUsingProgrammerResponse.prototype.seriali
|
||||
*/
|
||||
proto.cc.arduino.cli.commands.v1.UploadUsingProgrammerResponse.serializeBinaryToWriter = function(message, writer) {
|
||||
var f = undefined;
|
||||
f = message.getOutStream_asU8();
|
||||
if (f.length > 0) {
|
||||
f = /** @type {!(string|Uint8Array)} */ (jspb.Message.getField(message, 1));
|
||||
if (f != null) {
|
||||
writer.writeBytes(
|
||||
1,
|
||||
f
|
||||
);
|
||||
}
|
||||
f = message.getErrStream_asU8();
|
||||
if (f.length > 0) {
|
||||
f = /** @type {!(string|Uint8Array)} */ (jspb.Message.getField(message, 2));
|
||||
if (f != null) {
|
||||
writer.writeBytes(
|
||||
2,
|
||||
f
|
||||
@@ -1998,7 +2138,25 @@ proto.cc.arduino.cli.commands.v1.UploadUsingProgrammerResponse.prototype.getOutS
|
||||
* @return {!proto.cc.arduino.cli.commands.v1.UploadUsingProgrammerResponse} returns this
|
||||
*/
|
||||
proto.cc.arduino.cli.commands.v1.UploadUsingProgrammerResponse.prototype.setOutStream = function(value) {
|
||||
return jspb.Message.setProto3BytesField(this, 1, value);
|
||||
return jspb.Message.setOneofField(this, 1, proto.cc.arduino.cli.commands.v1.UploadUsingProgrammerResponse.oneofGroups_[0], value);
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* Clears the field making it undefined.
|
||||
* @return {!proto.cc.arduino.cli.commands.v1.UploadUsingProgrammerResponse} returns this
|
||||
*/
|
||||
proto.cc.arduino.cli.commands.v1.UploadUsingProgrammerResponse.prototype.clearOutStream = function() {
|
||||
return jspb.Message.setOneofField(this, 1, proto.cc.arduino.cli.commands.v1.UploadUsingProgrammerResponse.oneofGroups_[0], undefined);
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* Returns whether this field is set.
|
||||
* @return {boolean}
|
||||
*/
|
||||
proto.cc.arduino.cli.commands.v1.UploadUsingProgrammerResponse.prototype.hasOutStream = function() {
|
||||
return jspb.Message.getField(this, 1) != null;
|
||||
};
|
||||
|
||||
|
||||
@@ -2040,10 +2198,35 @@ proto.cc.arduino.cli.commands.v1.UploadUsingProgrammerResponse.prototype.getErrS
|
||||
* @return {!proto.cc.arduino.cli.commands.v1.UploadUsingProgrammerResponse} returns this
|
||||
*/
|
||||
proto.cc.arduino.cli.commands.v1.UploadUsingProgrammerResponse.prototype.setErrStream = function(value) {
|
||||
return jspb.Message.setProto3BytesField(this, 2, value);
|
||||
return jspb.Message.setOneofField(this, 2, proto.cc.arduino.cli.commands.v1.UploadUsingProgrammerResponse.oneofGroups_[0], value);
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* Clears the field making it undefined.
|
||||
* @return {!proto.cc.arduino.cli.commands.v1.UploadUsingProgrammerResponse} returns this
|
||||
*/
|
||||
proto.cc.arduino.cli.commands.v1.UploadUsingProgrammerResponse.prototype.clearErrStream = function() {
|
||||
return jspb.Message.setOneofField(this, 2, proto.cc.arduino.cli.commands.v1.UploadUsingProgrammerResponse.oneofGroups_[0], undefined);
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* Returns whether this field is set.
|
||||
* @return {boolean}
|
||||
*/
|
||||
proto.cc.arduino.cli.commands.v1.UploadUsingProgrammerResponse.prototype.hasErrStream = function() {
|
||||
return jspb.Message.getField(this, 2) != null;
|
||||
};
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* List of repeated fields within this message type.
|
||||
* @private {!Array<number>}
|
||||
* @const
|
||||
*/
|
||||
proto.cc.arduino.cli.commands.v1.BurnBootloaderRequest.repeatedFields_ = [12];
|
||||
|
||||
|
||||
|
||||
@@ -2083,7 +2266,8 @@ proto.cc.arduino.cli.commands.v1.BurnBootloaderRequest.toObject = function(inclu
|
||||
verify: jspb.Message.getBooleanFieldWithDefault(msg, 5, false),
|
||||
programmer: jspb.Message.getFieldWithDefault(msg, 6, ""),
|
||||
dryRun: jspb.Message.getBooleanFieldWithDefault(msg, 7, false),
|
||||
userFieldsMap: (f = msg.getUserFieldsMap()) ? f.toObject(includeInstance, undefined) : []
|
||||
userFieldsMap: (f = msg.getUserFieldsMap()) ? f.toObject(includeInstance, undefined) : [],
|
||||
uploadPropertiesList: (f = jspb.Message.getRepeatedField(msg, 12)) == null ? undefined : f
|
||||
};
|
||||
|
||||
if (includeInstance) {
|
||||
@@ -2156,6 +2340,10 @@ proto.cc.arduino.cli.commands.v1.BurnBootloaderRequest.deserializeBinaryFromRead
|
||||
jspb.Map.deserializeBinary(message, reader, jspb.BinaryReader.prototype.readString, jspb.BinaryReader.prototype.readString, null, "", "");
|
||||
});
|
||||
break;
|
||||
case 12:
|
||||
var value = /** @type {string} */ (reader.readString());
|
||||
msg.addUploadProperties(value);
|
||||
break;
|
||||
default:
|
||||
reader.skipField();
|
||||
break;
|
||||
@@ -2240,6 +2428,13 @@ proto.cc.arduino.cli.commands.v1.BurnBootloaderRequest.serializeBinaryToWriter =
|
||||
if (f && f.getLength() > 0) {
|
||||
f.serializeBinary(11, writer, jspb.BinaryWriter.prototype.writeString, jspb.BinaryWriter.prototype.writeString);
|
||||
}
|
||||
f = message.getUploadPropertiesList();
|
||||
if (f.length > 0) {
|
||||
writer.writeRepeatedString(
|
||||
12,
|
||||
f
|
||||
);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@@ -2429,6 +2624,69 @@ proto.cc.arduino.cli.commands.v1.BurnBootloaderRequest.prototype.clearUserFields
|
||||
return this;};
|
||||
|
||||
|
||||
/**
|
||||
* repeated string upload_properties = 12;
|
||||
* @return {!Array<string>}
|
||||
*/
|
||||
proto.cc.arduino.cli.commands.v1.BurnBootloaderRequest.prototype.getUploadPropertiesList = function() {
|
||||
return /** @type {!Array<string>} */ (jspb.Message.getRepeatedField(this, 12));
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* @param {!Array<string>} value
|
||||
* @return {!proto.cc.arduino.cli.commands.v1.BurnBootloaderRequest} returns this
|
||||
*/
|
||||
proto.cc.arduino.cli.commands.v1.BurnBootloaderRequest.prototype.setUploadPropertiesList = function(value) {
|
||||
return jspb.Message.setField(this, 12, value || []);
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* @param {string} value
|
||||
* @param {number=} opt_index
|
||||
* @return {!proto.cc.arduino.cli.commands.v1.BurnBootloaderRequest} returns this
|
||||
*/
|
||||
proto.cc.arduino.cli.commands.v1.BurnBootloaderRequest.prototype.addUploadProperties = function(value, opt_index) {
|
||||
return jspb.Message.addToRepeatedField(this, 12, value, opt_index);
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* Clears the list making it empty but non-null.
|
||||
* @return {!proto.cc.arduino.cli.commands.v1.BurnBootloaderRequest} returns this
|
||||
*/
|
||||
proto.cc.arduino.cli.commands.v1.BurnBootloaderRequest.prototype.clearUploadPropertiesList = function() {
|
||||
return this.setUploadPropertiesList([]);
|
||||
};
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Oneof group definitions for this message. Each group defines the field
|
||||
* numbers belonging to that group. When of these fields' value is set, all
|
||||
* other fields in the group are cleared. During deserialization, if multiple
|
||||
* fields are encountered for a group, only the last value seen will be kept.
|
||||
* @private {!Array<!Array<number>>}
|
||||
* @const
|
||||
*/
|
||||
proto.cc.arduino.cli.commands.v1.BurnBootloaderResponse.oneofGroups_ = [[1,2]];
|
||||
|
||||
/**
|
||||
* @enum {number}
|
||||
*/
|
||||
proto.cc.arduino.cli.commands.v1.BurnBootloaderResponse.MessageCase = {
|
||||
MESSAGE_NOT_SET: 0,
|
||||
OUT_STREAM: 1,
|
||||
ERR_STREAM: 2
|
||||
};
|
||||
|
||||
/**
|
||||
* @return {proto.cc.arduino.cli.commands.v1.BurnBootloaderResponse.MessageCase}
|
||||
*/
|
||||
proto.cc.arduino.cli.commands.v1.BurnBootloaderResponse.prototype.getMessageCase = function() {
|
||||
return /** @type {proto.cc.arduino.cli.commands.v1.BurnBootloaderResponse.MessageCase} */(jspb.Message.computeOneofCase(this, proto.cc.arduino.cli.commands.v1.BurnBootloaderResponse.oneofGroups_[0]));
|
||||
};
|
||||
|
||||
|
||||
|
||||
@@ -2536,15 +2794,15 @@ proto.cc.arduino.cli.commands.v1.BurnBootloaderResponse.prototype.serializeBinar
|
||||
*/
|
||||
proto.cc.arduino.cli.commands.v1.BurnBootloaderResponse.serializeBinaryToWriter = function(message, writer) {
|
||||
var f = undefined;
|
||||
f = message.getOutStream_asU8();
|
||||
if (f.length > 0) {
|
||||
f = /** @type {!(string|Uint8Array)} */ (jspb.Message.getField(message, 1));
|
||||
if (f != null) {
|
||||
writer.writeBytes(
|
||||
1,
|
||||
f
|
||||
);
|
||||
}
|
||||
f = message.getErrStream_asU8();
|
||||
if (f.length > 0) {
|
||||
f = /** @type {!(string|Uint8Array)} */ (jspb.Message.getField(message, 2));
|
||||
if (f != null) {
|
||||
writer.writeBytes(
|
||||
2,
|
||||
f
|
||||
@@ -2591,7 +2849,25 @@ proto.cc.arduino.cli.commands.v1.BurnBootloaderResponse.prototype.getOutStream_a
|
||||
* @return {!proto.cc.arduino.cli.commands.v1.BurnBootloaderResponse} returns this
|
||||
*/
|
||||
proto.cc.arduino.cli.commands.v1.BurnBootloaderResponse.prototype.setOutStream = function(value) {
|
||||
return jspb.Message.setProto3BytesField(this, 1, value);
|
||||
return jspb.Message.setOneofField(this, 1, proto.cc.arduino.cli.commands.v1.BurnBootloaderResponse.oneofGroups_[0], value);
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* Clears the field making it undefined.
|
||||
* @return {!proto.cc.arduino.cli.commands.v1.BurnBootloaderResponse} returns this
|
||||
*/
|
||||
proto.cc.arduino.cli.commands.v1.BurnBootloaderResponse.prototype.clearOutStream = function() {
|
||||
return jspb.Message.setOneofField(this, 1, proto.cc.arduino.cli.commands.v1.BurnBootloaderResponse.oneofGroups_[0], undefined);
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* Returns whether this field is set.
|
||||
* @return {boolean}
|
||||
*/
|
||||
proto.cc.arduino.cli.commands.v1.BurnBootloaderResponse.prototype.hasOutStream = function() {
|
||||
return jspb.Message.getField(this, 1) != null;
|
||||
};
|
||||
|
||||
|
||||
@@ -2633,7 +2909,25 @@ proto.cc.arduino.cli.commands.v1.BurnBootloaderResponse.prototype.getErrStream_a
|
||||
* @return {!proto.cc.arduino.cli.commands.v1.BurnBootloaderResponse} returns this
|
||||
*/
|
||||
proto.cc.arduino.cli.commands.v1.BurnBootloaderResponse.prototype.setErrStream = function(value) {
|
||||
return jspb.Message.setProto3BytesField(this, 2, value);
|
||||
return jspb.Message.setOneofField(this, 2, proto.cc.arduino.cli.commands.v1.BurnBootloaderResponse.oneofGroups_[0], value);
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* Clears the field making it undefined.
|
||||
* @return {!proto.cc.arduino.cli.commands.v1.BurnBootloaderResponse} returns this
|
||||
*/
|
||||
proto.cc.arduino.cli.commands.v1.BurnBootloaderResponse.prototype.clearErrStream = function() {
|
||||
return jspb.Message.setOneofField(this, 2, proto.cc.arduino.cli.commands.v1.BurnBootloaderResponse.oneofGroups_[0], undefined);
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* Returns whether this field is set.
|
||||
* @return {boolean}
|
||||
*/
|
||||
proto.cc.arduino.cli.commands.v1.BurnBootloaderResponse.prototype.hasErrStream = function() {
|
||||
return jspb.Message.getField(this, 2) != null;
|
||||
};
|
||||
|
||||
|
||||
|
@@ -1,126 +0,0 @@
|
||||
// package: cc.arduino.cli.settings.v1
|
||||
// file: cc/arduino/cli/settings/v1/settings.proto
|
||||
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
|
||||
import * as grpc from "@grpc/grpc-js";
|
||||
import * as cc_arduino_cli_settings_v1_settings_pb from "../../../../../cc/arduino/cli/settings/v1/settings_pb";
|
||||
|
||||
interface ISettingsServiceService extends grpc.ServiceDefinition<grpc.UntypedServiceImplementation> {
|
||||
getAll: ISettingsServiceService_IGetAll;
|
||||
merge: ISettingsServiceService_IMerge;
|
||||
getValue: ISettingsServiceService_IGetValue;
|
||||
setValue: ISettingsServiceService_ISetValue;
|
||||
write: ISettingsServiceService_IWrite;
|
||||
delete: ISettingsServiceService_IDelete;
|
||||
}
|
||||
|
||||
interface ISettingsServiceService_IGetAll extends grpc.MethodDefinition<cc_arduino_cli_settings_v1_settings_pb.GetAllRequest, cc_arduino_cli_settings_v1_settings_pb.GetAllResponse> {
|
||||
path: "/cc.arduino.cli.settings.v1.SettingsService/GetAll";
|
||||
requestStream: false;
|
||||
responseStream: false;
|
||||
requestSerialize: grpc.serialize<cc_arduino_cli_settings_v1_settings_pb.GetAllRequest>;
|
||||
requestDeserialize: grpc.deserialize<cc_arduino_cli_settings_v1_settings_pb.GetAllRequest>;
|
||||
responseSerialize: grpc.serialize<cc_arduino_cli_settings_v1_settings_pb.GetAllResponse>;
|
||||
responseDeserialize: grpc.deserialize<cc_arduino_cli_settings_v1_settings_pb.GetAllResponse>;
|
||||
}
|
||||
interface ISettingsServiceService_IMerge extends grpc.MethodDefinition<cc_arduino_cli_settings_v1_settings_pb.MergeRequest, cc_arduino_cli_settings_v1_settings_pb.MergeResponse> {
|
||||
path: "/cc.arduino.cli.settings.v1.SettingsService/Merge";
|
||||
requestStream: false;
|
||||
responseStream: false;
|
||||
requestSerialize: grpc.serialize<cc_arduino_cli_settings_v1_settings_pb.MergeRequest>;
|
||||
requestDeserialize: grpc.deserialize<cc_arduino_cli_settings_v1_settings_pb.MergeRequest>;
|
||||
responseSerialize: grpc.serialize<cc_arduino_cli_settings_v1_settings_pb.MergeResponse>;
|
||||
responseDeserialize: grpc.deserialize<cc_arduino_cli_settings_v1_settings_pb.MergeResponse>;
|
||||
}
|
||||
interface ISettingsServiceService_IGetValue extends grpc.MethodDefinition<cc_arduino_cli_settings_v1_settings_pb.GetValueRequest, cc_arduino_cli_settings_v1_settings_pb.GetValueResponse> {
|
||||
path: "/cc.arduino.cli.settings.v1.SettingsService/GetValue";
|
||||
requestStream: false;
|
||||
responseStream: false;
|
||||
requestSerialize: grpc.serialize<cc_arduino_cli_settings_v1_settings_pb.GetValueRequest>;
|
||||
requestDeserialize: grpc.deserialize<cc_arduino_cli_settings_v1_settings_pb.GetValueRequest>;
|
||||
responseSerialize: grpc.serialize<cc_arduino_cli_settings_v1_settings_pb.GetValueResponse>;
|
||||
responseDeserialize: grpc.deserialize<cc_arduino_cli_settings_v1_settings_pb.GetValueResponse>;
|
||||
}
|
||||
interface ISettingsServiceService_ISetValue extends grpc.MethodDefinition<cc_arduino_cli_settings_v1_settings_pb.SetValueRequest, cc_arduino_cli_settings_v1_settings_pb.SetValueResponse> {
|
||||
path: "/cc.arduino.cli.settings.v1.SettingsService/SetValue";
|
||||
requestStream: false;
|
||||
responseStream: false;
|
||||
requestSerialize: grpc.serialize<cc_arduino_cli_settings_v1_settings_pb.SetValueRequest>;
|
||||
requestDeserialize: grpc.deserialize<cc_arduino_cli_settings_v1_settings_pb.SetValueRequest>;
|
||||
responseSerialize: grpc.serialize<cc_arduino_cli_settings_v1_settings_pb.SetValueResponse>;
|
||||
responseDeserialize: grpc.deserialize<cc_arduino_cli_settings_v1_settings_pb.SetValueResponse>;
|
||||
}
|
||||
interface ISettingsServiceService_IWrite extends grpc.MethodDefinition<cc_arduino_cli_settings_v1_settings_pb.WriteRequest, cc_arduino_cli_settings_v1_settings_pb.WriteResponse> {
|
||||
path: "/cc.arduino.cli.settings.v1.SettingsService/Write";
|
||||
requestStream: false;
|
||||
responseStream: false;
|
||||
requestSerialize: grpc.serialize<cc_arduino_cli_settings_v1_settings_pb.WriteRequest>;
|
||||
requestDeserialize: grpc.deserialize<cc_arduino_cli_settings_v1_settings_pb.WriteRequest>;
|
||||
responseSerialize: grpc.serialize<cc_arduino_cli_settings_v1_settings_pb.WriteResponse>;
|
||||
responseDeserialize: grpc.deserialize<cc_arduino_cli_settings_v1_settings_pb.WriteResponse>;
|
||||
}
|
||||
interface ISettingsServiceService_IDelete extends grpc.MethodDefinition<cc_arduino_cli_settings_v1_settings_pb.DeleteRequest, cc_arduino_cli_settings_v1_settings_pb.DeleteResponse> {
|
||||
path: "/cc.arduino.cli.settings.v1.SettingsService/Delete";
|
||||
requestStream: false;
|
||||
responseStream: false;
|
||||
requestSerialize: grpc.serialize<cc_arduino_cli_settings_v1_settings_pb.DeleteRequest>;
|
||||
requestDeserialize: grpc.deserialize<cc_arduino_cli_settings_v1_settings_pb.DeleteRequest>;
|
||||
responseSerialize: grpc.serialize<cc_arduino_cli_settings_v1_settings_pb.DeleteResponse>;
|
||||
responseDeserialize: grpc.deserialize<cc_arduino_cli_settings_v1_settings_pb.DeleteResponse>;
|
||||
}
|
||||
|
||||
export const SettingsServiceService: ISettingsServiceService;
|
||||
|
||||
export interface ISettingsServiceServer extends grpc.UntypedServiceImplementation {
|
||||
getAll: grpc.handleUnaryCall<cc_arduino_cli_settings_v1_settings_pb.GetAllRequest, cc_arduino_cli_settings_v1_settings_pb.GetAllResponse>;
|
||||
merge: grpc.handleUnaryCall<cc_arduino_cli_settings_v1_settings_pb.MergeRequest, cc_arduino_cli_settings_v1_settings_pb.MergeResponse>;
|
||||
getValue: grpc.handleUnaryCall<cc_arduino_cli_settings_v1_settings_pb.GetValueRequest, cc_arduino_cli_settings_v1_settings_pb.GetValueResponse>;
|
||||
setValue: grpc.handleUnaryCall<cc_arduino_cli_settings_v1_settings_pb.SetValueRequest, cc_arduino_cli_settings_v1_settings_pb.SetValueResponse>;
|
||||
write: grpc.handleUnaryCall<cc_arduino_cli_settings_v1_settings_pb.WriteRequest, cc_arduino_cli_settings_v1_settings_pb.WriteResponse>;
|
||||
delete: grpc.handleUnaryCall<cc_arduino_cli_settings_v1_settings_pb.DeleteRequest, cc_arduino_cli_settings_v1_settings_pb.DeleteResponse>;
|
||||
}
|
||||
|
||||
export interface ISettingsServiceClient {
|
||||
getAll(request: cc_arduino_cli_settings_v1_settings_pb.GetAllRequest, callback: (error: grpc.ServiceError | null, response: cc_arduino_cli_settings_v1_settings_pb.GetAllResponse) => void): grpc.ClientUnaryCall;
|
||||
getAll(request: cc_arduino_cli_settings_v1_settings_pb.GetAllRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: cc_arduino_cli_settings_v1_settings_pb.GetAllResponse) => void): grpc.ClientUnaryCall;
|
||||
getAll(request: cc_arduino_cli_settings_v1_settings_pb.GetAllRequest, metadata: grpc.Metadata, options: Partial<grpc.CallOptions>, callback: (error: grpc.ServiceError | null, response: cc_arduino_cli_settings_v1_settings_pb.GetAllResponse) => void): grpc.ClientUnaryCall;
|
||||
merge(request: cc_arduino_cli_settings_v1_settings_pb.MergeRequest, callback: (error: grpc.ServiceError | null, response: cc_arduino_cli_settings_v1_settings_pb.MergeResponse) => void): grpc.ClientUnaryCall;
|
||||
merge(request: cc_arduino_cli_settings_v1_settings_pb.MergeRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: cc_arduino_cli_settings_v1_settings_pb.MergeResponse) => void): grpc.ClientUnaryCall;
|
||||
merge(request: cc_arduino_cli_settings_v1_settings_pb.MergeRequest, metadata: grpc.Metadata, options: Partial<grpc.CallOptions>, callback: (error: grpc.ServiceError | null, response: cc_arduino_cli_settings_v1_settings_pb.MergeResponse) => void): grpc.ClientUnaryCall;
|
||||
getValue(request: cc_arduino_cli_settings_v1_settings_pb.GetValueRequest, callback: (error: grpc.ServiceError | null, response: cc_arduino_cli_settings_v1_settings_pb.GetValueResponse) => void): grpc.ClientUnaryCall;
|
||||
getValue(request: cc_arduino_cli_settings_v1_settings_pb.GetValueRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: cc_arduino_cli_settings_v1_settings_pb.GetValueResponse) => void): grpc.ClientUnaryCall;
|
||||
getValue(request: cc_arduino_cli_settings_v1_settings_pb.GetValueRequest, metadata: grpc.Metadata, options: Partial<grpc.CallOptions>, callback: (error: grpc.ServiceError | null, response: cc_arduino_cli_settings_v1_settings_pb.GetValueResponse) => void): grpc.ClientUnaryCall;
|
||||
setValue(request: cc_arduino_cli_settings_v1_settings_pb.SetValueRequest, callback: (error: grpc.ServiceError | null, response: cc_arduino_cli_settings_v1_settings_pb.SetValueResponse) => void): grpc.ClientUnaryCall;
|
||||
setValue(request: cc_arduino_cli_settings_v1_settings_pb.SetValueRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: cc_arduino_cli_settings_v1_settings_pb.SetValueResponse) => void): grpc.ClientUnaryCall;
|
||||
setValue(request: cc_arduino_cli_settings_v1_settings_pb.SetValueRequest, metadata: grpc.Metadata, options: Partial<grpc.CallOptions>, callback: (error: grpc.ServiceError | null, response: cc_arduino_cli_settings_v1_settings_pb.SetValueResponse) => void): grpc.ClientUnaryCall;
|
||||
write(request: cc_arduino_cli_settings_v1_settings_pb.WriteRequest, callback: (error: grpc.ServiceError | null, response: cc_arduino_cli_settings_v1_settings_pb.WriteResponse) => void): grpc.ClientUnaryCall;
|
||||
write(request: cc_arduino_cli_settings_v1_settings_pb.WriteRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: cc_arduino_cli_settings_v1_settings_pb.WriteResponse) => void): grpc.ClientUnaryCall;
|
||||
write(request: cc_arduino_cli_settings_v1_settings_pb.WriteRequest, metadata: grpc.Metadata, options: Partial<grpc.CallOptions>, callback: (error: grpc.ServiceError | null, response: cc_arduino_cli_settings_v1_settings_pb.WriteResponse) => void): grpc.ClientUnaryCall;
|
||||
delete(request: cc_arduino_cli_settings_v1_settings_pb.DeleteRequest, callback: (error: grpc.ServiceError | null, response: cc_arduino_cli_settings_v1_settings_pb.DeleteResponse) => void): grpc.ClientUnaryCall;
|
||||
delete(request: cc_arduino_cli_settings_v1_settings_pb.DeleteRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: cc_arduino_cli_settings_v1_settings_pb.DeleteResponse) => void): grpc.ClientUnaryCall;
|
||||
delete(request: cc_arduino_cli_settings_v1_settings_pb.DeleteRequest, metadata: grpc.Metadata, options: Partial<grpc.CallOptions>, callback: (error: grpc.ServiceError | null, response: cc_arduino_cli_settings_v1_settings_pb.DeleteResponse) => void): grpc.ClientUnaryCall;
|
||||
}
|
||||
|
||||
export class SettingsServiceClient extends grpc.Client implements ISettingsServiceClient {
|
||||
constructor(address: string, credentials: grpc.ChannelCredentials, options?: Partial<grpc.ClientOptions>);
|
||||
public getAll(request: cc_arduino_cli_settings_v1_settings_pb.GetAllRequest, callback: (error: grpc.ServiceError | null, response: cc_arduino_cli_settings_v1_settings_pb.GetAllResponse) => void): grpc.ClientUnaryCall;
|
||||
public getAll(request: cc_arduino_cli_settings_v1_settings_pb.GetAllRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: cc_arduino_cli_settings_v1_settings_pb.GetAllResponse) => void): grpc.ClientUnaryCall;
|
||||
public getAll(request: cc_arduino_cli_settings_v1_settings_pb.GetAllRequest, metadata: grpc.Metadata, options: Partial<grpc.CallOptions>, callback: (error: grpc.ServiceError | null, response: cc_arduino_cli_settings_v1_settings_pb.GetAllResponse) => void): grpc.ClientUnaryCall;
|
||||
public merge(request: cc_arduino_cli_settings_v1_settings_pb.MergeRequest, callback: (error: grpc.ServiceError | null, response: cc_arduino_cli_settings_v1_settings_pb.MergeResponse) => void): grpc.ClientUnaryCall;
|
||||
public merge(request: cc_arduino_cli_settings_v1_settings_pb.MergeRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: cc_arduino_cli_settings_v1_settings_pb.MergeResponse) => void): grpc.ClientUnaryCall;
|
||||
public merge(request: cc_arduino_cli_settings_v1_settings_pb.MergeRequest, metadata: grpc.Metadata, options: Partial<grpc.CallOptions>, callback: (error: grpc.ServiceError | null, response: cc_arduino_cli_settings_v1_settings_pb.MergeResponse) => void): grpc.ClientUnaryCall;
|
||||
public getValue(request: cc_arduino_cli_settings_v1_settings_pb.GetValueRequest, callback: (error: grpc.ServiceError | null, response: cc_arduino_cli_settings_v1_settings_pb.GetValueResponse) => void): grpc.ClientUnaryCall;
|
||||
public getValue(request: cc_arduino_cli_settings_v1_settings_pb.GetValueRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: cc_arduino_cli_settings_v1_settings_pb.GetValueResponse) => void): grpc.ClientUnaryCall;
|
||||
public getValue(request: cc_arduino_cli_settings_v1_settings_pb.GetValueRequest, metadata: grpc.Metadata, options: Partial<grpc.CallOptions>, callback: (error: grpc.ServiceError | null, response: cc_arduino_cli_settings_v1_settings_pb.GetValueResponse) => void): grpc.ClientUnaryCall;
|
||||
public setValue(request: cc_arduino_cli_settings_v1_settings_pb.SetValueRequest, callback: (error: grpc.ServiceError | null, response: cc_arduino_cli_settings_v1_settings_pb.SetValueResponse) => void): grpc.ClientUnaryCall;
|
||||
public setValue(request: cc_arduino_cli_settings_v1_settings_pb.SetValueRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: cc_arduino_cli_settings_v1_settings_pb.SetValueResponse) => void): grpc.ClientUnaryCall;
|
||||
public setValue(request: cc_arduino_cli_settings_v1_settings_pb.SetValueRequest, metadata: grpc.Metadata, options: Partial<grpc.CallOptions>, callback: (error: grpc.ServiceError | null, response: cc_arduino_cli_settings_v1_settings_pb.SetValueResponse) => void): grpc.ClientUnaryCall;
|
||||
public write(request: cc_arduino_cli_settings_v1_settings_pb.WriteRequest, callback: (error: grpc.ServiceError | null, response: cc_arduino_cli_settings_v1_settings_pb.WriteResponse) => void): grpc.ClientUnaryCall;
|
||||
public write(request: cc_arduino_cli_settings_v1_settings_pb.WriteRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: cc_arduino_cli_settings_v1_settings_pb.WriteResponse) => void): grpc.ClientUnaryCall;
|
||||
public write(request: cc_arduino_cli_settings_v1_settings_pb.WriteRequest, metadata: grpc.Metadata, options: Partial<grpc.CallOptions>, callback: (error: grpc.ServiceError | null, response: cc_arduino_cli_settings_v1_settings_pb.WriteResponse) => void): grpc.ClientUnaryCall;
|
||||
public delete(request: cc_arduino_cli_settings_v1_settings_pb.DeleteRequest, callback: (error: grpc.ServiceError | null, response: cc_arduino_cli_settings_v1_settings_pb.DeleteResponse) => void): grpc.ClientUnaryCall;
|
||||
public delete(request: cc_arduino_cli_settings_v1_settings_pb.DeleteRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: cc_arduino_cli_settings_v1_settings_pb.DeleteResponse) => void): grpc.ClientUnaryCall;
|
||||
public delete(request: cc_arduino_cli_settings_v1_settings_pb.DeleteRequest, metadata: grpc.Metadata, options: Partial<grpc.CallOptions>, callback: (error: grpc.ServiceError | null, response: cc_arduino_cli_settings_v1_settings_pb.DeleteResponse) => void): grpc.ClientUnaryCall;
|
||||
}
|
@@ -1,231 +0,0 @@
|
||||
// GENERATED CODE -- DO NOT EDIT!
|
||||
|
||||
// Original file comments:
|
||||
// This file is part of arduino-cli.
|
||||
//
|
||||
// Copyright 2020 ARDUINO SA (http://www.arduino.cc/)
|
||||
//
|
||||
// This software is released under the GNU General Public License version 3,
|
||||
// which covers the main part of arduino-cli.
|
||||
// The terms of this license can be found at:
|
||||
// https://www.gnu.org/licenses/gpl-3.0.en.html
|
||||
//
|
||||
// You can be released from the requirements of the above licenses by purchasing
|
||||
// a commercial license. Buying such a license is mandatory if you want to
|
||||
// modify or otherwise use the software for commercial activities involving the
|
||||
// Arduino software without disclosing the source code of your own applications.
|
||||
// To purchase a commercial license, send an email to license@arduino.cc.
|
||||
//
|
||||
'use strict';
|
||||
var cc_arduino_cli_settings_v1_settings_pb = require('../../../../../cc/arduino/cli/settings/v1/settings_pb.js');
|
||||
|
||||
function serialize_cc_arduino_cli_settings_v1_DeleteRequest(arg) {
|
||||
if (!(arg instanceof cc_arduino_cli_settings_v1_settings_pb.DeleteRequest)) {
|
||||
throw new Error('Expected argument of type cc.arduino.cli.settings.v1.DeleteRequest');
|
||||
}
|
||||
return Buffer.from(arg.serializeBinary());
|
||||
}
|
||||
|
||||
function deserialize_cc_arduino_cli_settings_v1_DeleteRequest(buffer_arg) {
|
||||
return cc_arduino_cli_settings_v1_settings_pb.DeleteRequest.deserializeBinary(new Uint8Array(buffer_arg));
|
||||
}
|
||||
|
||||
function serialize_cc_arduino_cli_settings_v1_DeleteResponse(arg) {
|
||||
if (!(arg instanceof cc_arduino_cli_settings_v1_settings_pb.DeleteResponse)) {
|
||||
throw new Error('Expected argument of type cc.arduino.cli.settings.v1.DeleteResponse');
|
||||
}
|
||||
return Buffer.from(arg.serializeBinary());
|
||||
}
|
||||
|
||||
function deserialize_cc_arduino_cli_settings_v1_DeleteResponse(buffer_arg) {
|
||||
return cc_arduino_cli_settings_v1_settings_pb.DeleteResponse.deserializeBinary(new Uint8Array(buffer_arg));
|
||||
}
|
||||
|
||||
function serialize_cc_arduino_cli_settings_v1_GetAllRequest(arg) {
|
||||
if (!(arg instanceof cc_arduino_cli_settings_v1_settings_pb.GetAllRequest)) {
|
||||
throw new Error('Expected argument of type cc.arduino.cli.settings.v1.GetAllRequest');
|
||||
}
|
||||
return Buffer.from(arg.serializeBinary());
|
||||
}
|
||||
|
||||
function deserialize_cc_arduino_cli_settings_v1_GetAllRequest(buffer_arg) {
|
||||
return cc_arduino_cli_settings_v1_settings_pb.GetAllRequest.deserializeBinary(new Uint8Array(buffer_arg));
|
||||
}
|
||||
|
||||
function serialize_cc_arduino_cli_settings_v1_GetAllResponse(arg) {
|
||||
if (!(arg instanceof cc_arduino_cli_settings_v1_settings_pb.GetAllResponse)) {
|
||||
throw new Error('Expected argument of type cc.arduino.cli.settings.v1.GetAllResponse');
|
||||
}
|
||||
return Buffer.from(arg.serializeBinary());
|
||||
}
|
||||
|
||||
function deserialize_cc_arduino_cli_settings_v1_GetAllResponse(buffer_arg) {
|
||||
return cc_arduino_cli_settings_v1_settings_pb.GetAllResponse.deserializeBinary(new Uint8Array(buffer_arg));
|
||||
}
|
||||
|
||||
function serialize_cc_arduino_cli_settings_v1_GetValueRequest(arg) {
|
||||
if (!(arg instanceof cc_arduino_cli_settings_v1_settings_pb.GetValueRequest)) {
|
||||
throw new Error('Expected argument of type cc.arduino.cli.settings.v1.GetValueRequest');
|
||||
}
|
||||
return Buffer.from(arg.serializeBinary());
|
||||
}
|
||||
|
||||
function deserialize_cc_arduino_cli_settings_v1_GetValueRequest(buffer_arg) {
|
||||
return cc_arduino_cli_settings_v1_settings_pb.GetValueRequest.deserializeBinary(new Uint8Array(buffer_arg));
|
||||
}
|
||||
|
||||
function serialize_cc_arduino_cli_settings_v1_GetValueResponse(arg) {
|
||||
if (!(arg instanceof cc_arduino_cli_settings_v1_settings_pb.GetValueResponse)) {
|
||||
throw new Error('Expected argument of type cc.arduino.cli.settings.v1.GetValueResponse');
|
||||
}
|
||||
return Buffer.from(arg.serializeBinary());
|
||||
}
|
||||
|
||||
function deserialize_cc_arduino_cli_settings_v1_GetValueResponse(buffer_arg) {
|
||||
return cc_arduino_cli_settings_v1_settings_pb.GetValueResponse.deserializeBinary(new Uint8Array(buffer_arg));
|
||||
}
|
||||
|
||||
function serialize_cc_arduino_cli_settings_v1_MergeRequest(arg) {
|
||||
if (!(arg instanceof cc_arduino_cli_settings_v1_settings_pb.MergeRequest)) {
|
||||
throw new Error('Expected argument of type cc.arduino.cli.settings.v1.MergeRequest');
|
||||
}
|
||||
return Buffer.from(arg.serializeBinary());
|
||||
}
|
||||
|
||||
function deserialize_cc_arduino_cli_settings_v1_MergeRequest(buffer_arg) {
|
||||
return cc_arduino_cli_settings_v1_settings_pb.MergeRequest.deserializeBinary(new Uint8Array(buffer_arg));
|
||||
}
|
||||
|
||||
function serialize_cc_arduino_cli_settings_v1_MergeResponse(arg) {
|
||||
if (!(arg instanceof cc_arduino_cli_settings_v1_settings_pb.MergeResponse)) {
|
||||
throw new Error('Expected argument of type cc.arduino.cli.settings.v1.MergeResponse');
|
||||
}
|
||||
return Buffer.from(arg.serializeBinary());
|
||||
}
|
||||
|
||||
function deserialize_cc_arduino_cli_settings_v1_MergeResponse(buffer_arg) {
|
||||
return cc_arduino_cli_settings_v1_settings_pb.MergeResponse.deserializeBinary(new Uint8Array(buffer_arg));
|
||||
}
|
||||
|
||||
function serialize_cc_arduino_cli_settings_v1_SetValueRequest(arg) {
|
||||
if (!(arg instanceof cc_arduino_cli_settings_v1_settings_pb.SetValueRequest)) {
|
||||
throw new Error('Expected argument of type cc.arduino.cli.settings.v1.SetValueRequest');
|
||||
}
|
||||
return Buffer.from(arg.serializeBinary());
|
||||
}
|
||||
|
||||
function deserialize_cc_arduino_cli_settings_v1_SetValueRequest(buffer_arg) {
|
||||
return cc_arduino_cli_settings_v1_settings_pb.SetValueRequest.deserializeBinary(new Uint8Array(buffer_arg));
|
||||
}
|
||||
|
||||
function serialize_cc_arduino_cli_settings_v1_SetValueResponse(arg) {
|
||||
if (!(arg instanceof cc_arduino_cli_settings_v1_settings_pb.SetValueResponse)) {
|
||||
throw new Error('Expected argument of type cc.arduino.cli.settings.v1.SetValueResponse');
|
||||
}
|
||||
return Buffer.from(arg.serializeBinary());
|
||||
}
|
||||
|
||||
function deserialize_cc_arduino_cli_settings_v1_SetValueResponse(buffer_arg) {
|
||||
return cc_arduino_cli_settings_v1_settings_pb.SetValueResponse.deserializeBinary(new Uint8Array(buffer_arg));
|
||||
}
|
||||
|
||||
function serialize_cc_arduino_cli_settings_v1_WriteRequest(arg) {
|
||||
if (!(arg instanceof cc_arduino_cli_settings_v1_settings_pb.WriteRequest)) {
|
||||
throw new Error('Expected argument of type cc.arduino.cli.settings.v1.WriteRequest');
|
||||
}
|
||||
return Buffer.from(arg.serializeBinary());
|
||||
}
|
||||
|
||||
function deserialize_cc_arduino_cli_settings_v1_WriteRequest(buffer_arg) {
|
||||
return cc_arduino_cli_settings_v1_settings_pb.WriteRequest.deserializeBinary(new Uint8Array(buffer_arg));
|
||||
}
|
||||
|
||||
function serialize_cc_arduino_cli_settings_v1_WriteResponse(arg) {
|
||||
if (!(arg instanceof cc_arduino_cli_settings_v1_settings_pb.WriteResponse)) {
|
||||
throw new Error('Expected argument of type cc.arduino.cli.settings.v1.WriteResponse');
|
||||
}
|
||||
return Buffer.from(arg.serializeBinary());
|
||||
}
|
||||
|
||||
function deserialize_cc_arduino_cli_settings_v1_WriteResponse(buffer_arg) {
|
||||
return cc_arduino_cli_settings_v1_settings_pb.WriteResponse.deserializeBinary(new Uint8Array(buffer_arg));
|
||||
}
|
||||
|
||||
|
||||
// The SettingsService provides an interface to Arduino CLI configuration
|
||||
// options
|
||||
var SettingsServiceService = exports['cc.arduino.cli.settings.v1.SettingsService'] = {
|
||||
// List all the settings.
|
||||
getAll: {
|
||||
path: '/cc.arduino.cli.settings.v1.SettingsService/GetAll',
|
||||
requestStream: false,
|
||||
responseStream: false,
|
||||
requestType: cc_arduino_cli_settings_v1_settings_pb.GetAllRequest,
|
||||
responseType: cc_arduino_cli_settings_v1_settings_pb.GetAllResponse,
|
||||
requestSerialize: serialize_cc_arduino_cli_settings_v1_GetAllRequest,
|
||||
requestDeserialize: deserialize_cc_arduino_cli_settings_v1_GetAllRequest,
|
||||
responseSerialize: serialize_cc_arduino_cli_settings_v1_GetAllResponse,
|
||||
responseDeserialize: deserialize_cc_arduino_cli_settings_v1_GetAllResponse,
|
||||
},
|
||||
// Set multiple settings values at once.
|
||||
merge: {
|
||||
path: '/cc.arduino.cli.settings.v1.SettingsService/Merge',
|
||||
requestStream: false,
|
||||
responseStream: false,
|
||||
requestType: cc_arduino_cli_settings_v1_settings_pb.MergeRequest,
|
||||
responseType: cc_arduino_cli_settings_v1_settings_pb.MergeResponse,
|
||||
requestSerialize: serialize_cc_arduino_cli_settings_v1_MergeRequest,
|
||||
requestDeserialize: deserialize_cc_arduino_cli_settings_v1_MergeRequest,
|
||||
responseSerialize: serialize_cc_arduino_cli_settings_v1_MergeResponse,
|
||||
responseDeserialize: deserialize_cc_arduino_cli_settings_v1_MergeResponse,
|
||||
},
|
||||
// Get the value of a specific setting.
|
||||
getValue: {
|
||||
path: '/cc.arduino.cli.settings.v1.SettingsService/GetValue',
|
||||
requestStream: false,
|
||||
responseStream: false,
|
||||
requestType: cc_arduino_cli_settings_v1_settings_pb.GetValueRequest,
|
||||
responseType: cc_arduino_cli_settings_v1_settings_pb.GetValueResponse,
|
||||
requestSerialize: serialize_cc_arduino_cli_settings_v1_GetValueRequest,
|
||||
requestDeserialize: deserialize_cc_arduino_cli_settings_v1_GetValueRequest,
|
||||
responseSerialize: serialize_cc_arduino_cli_settings_v1_GetValueResponse,
|
||||
responseDeserialize: deserialize_cc_arduino_cli_settings_v1_GetValueResponse,
|
||||
},
|
||||
// Set the value of a specific setting.
|
||||
setValue: {
|
||||
path: '/cc.arduino.cli.settings.v1.SettingsService/SetValue',
|
||||
requestStream: false,
|
||||
responseStream: false,
|
||||
requestType: cc_arduino_cli_settings_v1_settings_pb.SetValueRequest,
|
||||
responseType: cc_arduino_cli_settings_v1_settings_pb.SetValueResponse,
|
||||
requestSerialize: serialize_cc_arduino_cli_settings_v1_SetValueRequest,
|
||||
requestDeserialize: deserialize_cc_arduino_cli_settings_v1_SetValueRequest,
|
||||
responseSerialize: serialize_cc_arduino_cli_settings_v1_SetValueResponse,
|
||||
responseDeserialize: deserialize_cc_arduino_cli_settings_v1_SetValueResponse,
|
||||
},
|
||||
// Writes to file settings currently stored in memory
|
||||
write: {
|
||||
path: '/cc.arduino.cli.settings.v1.SettingsService/Write',
|
||||
requestStream: false,
|
||||
responseStream: false,
|
||||
requestType: cc_arduino_cli_settings_v1_settings_pb.WriteRequest,
|
||||
responseType: cc_arduino_cli_settings_v1_settings_pb.WriteResponse,
|
||||
requestSerialize: serialize_cc_arduino_cli_settings_v1_WriteRequest,
|
||||
requestDeserialize: deserialize_cc_arduino_cli_settings_v1_WriteRequest,
|
||||
responseSerialize: serialize_cc_arduino_cli_settings_v1_WriteResponse,
|
||||
responseDeserialize: deserialize_cc_arduino_cli_settings_v1_WriteResponse,
|
||||
},
|
||||
// Deletes an entry and rewrites the file settings
|
||||
delete: {
|
||||
path: '/cc.arduino.cli.settings.v1.SettingsService/Delete',
|
||||
requestStream: false,
|
||||
responseStream: false,
|
||||
requestType: cc_arduino_cli_settings_v1_settings_pb.DeleteRequest,
|
||||
responseType: cc_arduino_cli_settings_v1_settings_pb.DeleteResponse,
|
||||
requestSerialize: serialize_cc_arduino_cli_settings_v1_DeleteRequest,
|
||||
requestDeserialize: deserialize_cc_arduino_cli_settings_v1_DeleteRequest,
|
||||
responseSerialize: serialize_cc_arduino_cli_settings_v1_DeleteResponse,
|
||||
responseDeserialize: deserialize_cc_arduino_cli_settings_v1_DeleteResponse,
|
||||
},
|
||||
};
|
||||
|
@@ -1,238 +0,0 @@
|
||||
// package: cc.arduino.cli.settings.v1
|
||||
// file: cc/arduino/cli/settings/v1/settings.proto
|
||||
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
|
||||
import * as jspb from "google-protobuf";
|
||||
|
||||
export class GetAllResponse extends jspb.Message {
|
||||
getJsonData(): string;
|
||||
setJsonData(value: string): GetAllResponse;
|
||||
|
||||
serializeBinary(): Uint8Array;
|
||||
toObject(includeInstance?: boolean): GetAllResponse.AsObject;
|
||||
static toObject(includeInstance: boolean, msg: GetAllResponse): GetAllResponse.AsObject;
|
||||
static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};
|
||||
static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};
|
||||
static serializeBinaryToWriter(message: GetAllResponse, writer: jspb.BinaryWriter): void;
|
||||
static deserializeBinary(bytes: Uint8Array): GetAllResponse;
|
||||
static deserializeBinaryFromReader(message: GetAllResponse, reader: jspb.BinaryReader): GetAllResponse;
|
||||
}
|
||||
|
||||
export namespace GetAllResponse {
|
||||
export type AsObject = {
|
||||
jsonData: string,
|
||||
}
|
||||
}
|
||||
|
||||
export class MergeRequest extends jspb.Message {
|
||||
getJsonData(): string;
|
||||
setJsonData(value: string): MergeRequest;
|
||||
|
||||
serializeBinary(): Uint8Array;
|
||||
toObject(includeInstance?: boolean): MergeRequest.AsObject;
|
||||
static toObject(includeInstance: boolean, msg: MergeRequest): MergeRequest.AsObject;
|
||||
static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};
|
||||
static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};
|
||||
static serializeBinaryToWriter(message: MergeRequest, writer: jspb.BinaryWriter): void;
|
||||
static deserializeBinary(bytes: Uint8Array): MergeRequest;
|
||||
static deserializeBinaryFromReader(message: MergeRequest, reader: jspb.BinaryReader): MergeRequest;
|
||||
}
|
||||
|
||||
export namespace MergeRequest {
|
||||
export type AsObject = {
|
||||
jsonData: string,
|
||||
}
|
||||
}
|
||||
|
||||
export class GetValueResponse extends jspb.Message {
|
||||
getKey(): string;
|
||||
setKey(value: string): GetValueResponse;
|
||||
getJsonData(): string;
|
||||
setJsonData(value: string): GetValueResponse;
|
||||
|
||||
serializeBinary(): Uint8Array;
|
||||
toObject(includeInstance?: boolean): GetValueResponse.AsObject;
|
||||
static toObject(includeInstance: boolean, msg: GetValueResponse): GetValueResponse.AsObject;
|
||||
static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};
|
||||
static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};
|
||||
static serializeBinaryToWriter(message: GetValueResponse, writer: jspb.BinaryWriter): void;
|
||||
static deserializeBinary(bytes: Uint8Array): GetValueResponse;
|
||||
static deserializeBinaryFromReader(message: GetValueResponse, reader: jspb.BinaryReader): GetValueResponse;
|
||||
}
|
||||
|
||||
export namespace GetValueResponse {
|
||||
export type AsObject = {
|
||||
key: string,
|
||||
jsonData: string,
|
||||
}
|
||||
}
|
||||
|
||||
export class SetValueRequest extends jspb.Message {
|
||||
getKey(): string;
|
||||
setKey(value: string): SetValueRequest;
|
||||
getJsonData(): string;
|
||||
setJsonData(value: string): SetValueRequest;
|
||||
|
||||
serializeBinary(): Uint8Array;
|
||||
toObject(includeInstance?: boolean): SetValueRequest.AsObject;
|
||||
static toObject(includeInstance: boolean, msg: SetValueRequest): SetValueRequest.AsObject;
|
||||
static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};
|
||||
static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};
|
||||
static serializeBinaryToWriter(message: SetValueRequest, writer: jspb.BinaryWriter): void;
|
||||
static deserializeBinary(bytes: Uint8Array): SetValueRequest;
|
||||
static deserializeBinaryFromReader(message: SetValueRequest, reader: jspb.BinaryReader): SetValueRequest;
|
||||
}
|
||||
|
||||
export namespace SetValueRequest {
|
||||
export type AsObject = {
|
||||
key: string,
|
||||
jsonData: string,
|
||||
}
|
||||
}
|
||||
|
||||
export class GetAllRequest extends jspb.Message {
|
||||
|
||||
serializeBinary(): Uint8Array;
|
||||
toObject(includeInstance?: boolean): GetAllRequest.AsObject;
|
||||
static toObject(includeInstance: boolean, msg: GetAllRequest): GetAllRequest.AsObject;
|
||||
static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};
|
||||
static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};
|
||||
static serializeBinaryToWriter(message: GetAllRequest, writer: jspb.BinaryWriter): void;
|
||||
static deserializeBinary(bytes: Uint8Array): GetAllRequest;
|
||||
static deserializeBinaryFromReader(message: GetAllRequest, reader: jspb.BinaryReader): GetAllRequest;
|
||||
}
|
||||
|
||||
export namespace GetAllRequest {
|
||||
export type AsObject = {
|
||||
}
|
||||
}
|
||||
|
||||
export class GetValueRequest extends jspb.Message {
|
||||
getKey(): string;
|
||||
setKey(value: string): GetValueRequest;
|
||||
|
||||
serializeBinary(): Uint8Array;
|
||||
toObject(includeInstance?: boolean): GetValueRequest.AsObject;
|
||||
static toObject(includeInstance: boolean, msg: GetValueRequest): GetValueRequest.AsObject;
|
||||
static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};
|
||||
static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};
|
||||
static serializeBinaryToWriter(message: GetValueRequest, writer: jspb.BinaryWriter): void;
|
||||
static deserializeBinary(bytes: Uint8Array): GetValueRequest;
|
||||
static deserializeBinaryFromReader(message: GetValueRequest, reader: jspb.BinaryReader): GetValueRequest;
|
||||
}
|
||||
|
||||
export namespace GetValueRequest {
|
||||
export type AsObject = {
|
||||
key: string,
|
||||
}
|
||||
}
|
||||
|
||||
export class MergeResponse extends jspb.Message {
|
||||
|
||||
serializeBinary(): Uint8Array;
|
||||
toObject(includeInstance?: boolean): MergeResponse.AsObject;
|
||||
static toObject(includeInstance: boolean, msg: MergeResponse): MergeResponse.AsObject;
|
||||
static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};
|
||||
static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};
|
||||
static serializeBinaryToWriter(message: MergeResponse, writer: jspb.BinaryWriter): void;
|
||||
static deserializeBinary(bytes: Uint8Array): MergeResponse;
|
||||
static deserializeBinaryFromReader(message: MergeResponse, reader: jspb.BinaryReader): MergeResponse;
|
||||
}
|
||||
|
||||
export namespace MergeResponse {
|
||||
export type AsObject = {
|
||||
}
|
||||
}
|
||||
|
||||
export class SetValueResponse extends jspb.Message {
|
||||
|
||||
serializeBinary(): Uint8Array;
|
||||
toObject(includeInstance?: boolean): SetValueResponse.AsObject;
|
||||
static toObject(includeInstance: boolean, msg: SetValueResponse): SetValueResponse.AsObject;
|
||||
static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};
|
||||
static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};
|
||||
static serializeBinaryToWriter(message: SetValueResponse, writer: jspb.BinaryWriter): void;
|
||||
static deserializeBinary(bytes: Uint8Array): SetValueResponse;
|
||||
static deserializeBinaryFromReader(message: SetValueResponse, reader: jspb.BinaryReader): SetValueResponse;
|
||||
}
|
||||
|
||||
export namespace SetValueResponse {
|
||||
export type AsObject = {
|
||||
}
|
||||
}
|
||||
|
||||
export class WriteRequest extends jspb.Message {
|
||||
getFilePath(): string;
|
||||
setFilePath(value: string): WriteRequest;
|
||||
|
||||
serializeBinary(): Uint8Array;
|
||||
toObject(includeInstance?: boolean): WriteRequest.AsObject;
|
||||
static toObject(includeInstance: boolean, msg: WriteRequest): WriteRequest.AsObject;
|
||||
static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};
|
||||
static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};
|
||||
static serializeBinaryToWriter(message: WriteRequest, writer: jspb.BinaryWriter): void;
|
||||
static deserializeBinary(bytes: Uint8Array): WriteRequest;
|
||||
static deserializeBinaryFromReader(message: WriteRequest, reader: jspb.BinaryReader): WriteRequest;
|
||||
}
|
||||
|
||||
export namespace WriteRequest {
|
||||
export type AsObject = {
|
||||
filePath: string,
|
||||
}
|
||||
}
|
||||
|
||||
export class WriteResponse extends jspb.Message {
|
||||
|
||||
serializeBinary(): Uint8Array;
|
||||
toObject(includeInstance?: boolean): WriteResponse.AsObject;
|
||||
static toObject(includeInstance: boolean, msg: WriteResponse): WriteResponse.AsObject;
|
||||
static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};
|
||||
static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};
|
||||
static serializeBinaryToWriter(message: WriteResponse, writer: jspb.BinaryWriter): void;
|
||||
static deserializeBinary(bytes: Uint8Array): WriteResponse;
|
||||
static deserializeBinaryFromReader(message: WriteResponse, reader: jspb.BinaryReader): WriteResponse;
|
||||
}
|
||||
|
||||
export namespace WriteResponse {
|
||||
export type AsObject = {
|
||||
}
|
||||
}
|
||||
|
||||
export class DeleteRequest extends jspb.Message {
|
||||
getKey(): string;
|
||||
setKey(value: string): DeleteRequest;
|
||||
|
||||
serializeBinary(): Uint8Array;
|
||||
toObject(includeInstance?: boolean): DeleteRequest.AsObject;
|
||||
static toObject(includeInstance: boolean, msg: DeleteRequest): DeleteRequest.AsObject;
|
||||
static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};
|
||||
static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};
|
||||
static serializeBinaryToWriter(message: DeleteRequest, writer: jspb.BinaryWriter): void;
|
||||
static deserializeBinary(bytes: Uint8Array): DeleteRequest;
|
||||
static deserializeBinaryFromReader(message: DeleteRequest, reader: jspb.BinaryReader): DeleteRequest;
|
||||
}
|
||||
|
||||
export namespace DeleteRequest {
|
||||
export type AsObject = {
|
||||
key: string,
|
||||
}
|
||||
}
|
||||
|
||||
export class DeleteResponse extends jspb.Message {
|
||||
|
||||
serializeBinary(): Uint8Array;
|
||||
toObject(includeInstance?: boolean): DeleteResponse.AsObject;
|
||||
static toObject(includeInstance: boolean, msg: DeleteResponse): DeleteResponse.AsObject;
|
||||
static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};
|
||||
static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};
|
||||
static serializeBinaryToWriter(message: DeleteResponse, writer: jspb.BinaryWriter): void;
|
||||
static deserializeBinary(bytes: Uint8Array): DeleteResponse;
|
||||
static deserializeBinaryFromReader(message: DeleteResponse, reader: jspb.BinaryReader): DeleteResponse;
|
||||
}
|
||||
|
||||
export namespace DeleteResponse {
|
||||
export type AsObject = {
|
||||
}
|
||||
}
|
File diff suppressed because it is too large
Load Diff
@@ -1,7 +1,6 @@
|
||||
import { promises as fs } from 'node:fs';
|
||||
import { dirname } from 'node:path';
|
||||
import yaml from 'js-yaml';
|
||||
import * as grpc from '@grpc/grpc-js';
|
||||
import { injectable, inject, named } from '@theia/core/shared/inversify';
|
||||
import URI from '@theia/core/lib/common/uri';
|
||||
import { ILogger } from '@theia/core/lib/common/logger';
|
||||
@@ -16,18 +15,17 @@ import {
|
||||
ConfigState,
|
||||
} from '../common/protocol';
|
||||
import { spawnCommand } from './exec-util';
|
||||
import {
|
||||
MergeRequest,
|
||||
WriteRequest,
|
||||
} from './cli-protocol/cc/arduino/cli/settings/v1/settings_pb';
|
||||
import { SettingsServiceClient } from './cli-protocol/cc/arduino/cli/settings/v1/settings_grpc_pb';
|
||||
import * as serviceGrpcPb from './cli-protocol/cc/arduino/cli/settings/v1/settings_grpc_pb';
|
||||
import { ArduinoDaemonImpl } from './arduino-daemon-impl';
|
||||
import { DefaultCliConfig, CLI_CONFIG } from './cli-config';
|
||||
import { DefaultCliConfig, CLI_CONFIG, CliConfig } from './cli-config';
|
||||
import { Deferred } from '@theia/core/lib/common/promise-util';
|
||||
import { EnvVariablesServer } from '@theia/core/lib/common/env-variables';
|
||||
import { deepClone, nls } from '@theia/core';
|
||||
import { ErrnoException } from './utils/errors';
|
||||
import { createArduinoCoreServiceClient } from './arduino-core-service-client';
|
||||
import {
|
||||
ConfigurationSaveRequest,
|
||||
SettingsSetValueRequest,
|
||||
} from './cli-protocol/cc/arduino/cli/commands/v1/settings_pb';
|
||||
|
||||
const deepmerge = require('deepmerge');
|
||||
|
||||
@@ -97,7 +95,7 @@ export class ConfigServiceImpl
|
||||
};
|
||||
copyDefaultCliConfig.locale = locale || 'en';
|
||||
const proxy = Network.stringify(network);
|
||||
copyDefaultCliConfig.network = { proxy };
|
||||
copyDefaultCliConfig.network = proxy ? { proxy } : {}; // must be an empty object to unset the default prop with the `WriteRequest`.
|
||||
|
||||
// always use the port of the daemon
|
||||
const port = await this.daemon.getPort();
|
||||
@@ -182,13 +180,13 @@ export class ConfigServiceImpl
|
||||
const content = await fs.readFile(cliConfigPath, {
|
||||
encoding: 'utf8',
|
||||
});
|
||||
const model = (yaml.safeLoad(content) || {}) as DefaultCliConfig;
|
||||
const model = (yaml.safeLoad(content) || {}) as CliConfig;
|
||||
this.logger.info(`Loaded CLI configuration: ${JSON.stringify(model)}`);
|
||||
if (model.directories.data && model.directories.user) {
|
||||
if (model.directories?.data && model.directories?.user) {
|
||||
this.logger.info(
|
||||
"'directories.data' and 'directories.user' are set in the CLI configuration model."
|
||||
);
|
||||
return model;
|
||||
return model as DefaultCliConfig;
|
||||
}
|
||||
// The CLI can run with partial (missing `port`, `directories`), the IDE2 cannot.
|
||||
// We merge the default CLI config with the partial user's config.
|
||||
@@ -219,13 +217,17 @@ export class ConfigServiceImpl
|
||||
|
||||
private async getFallbackCliConfig(): Promise<DefaultCliConfig> {
|
||||
const cliPath = this.daemon.getExecPath();
|
||||
const rawJson = await spawnCommand(cliPath, [
|
||||
'config',
|
||||
'dump',
|
||||
'format',
|
||||
'--json',
|
||||
const [configRaw, directoriesRaw] = await Promise.all([
|
||||
spawnCommand(cliPath, ['config', 'dump', '--json']),
|
||||
// Since CLI 1.0, the command `config dump` only returns user-modified values and not default ones.
|
||||
// directories.user and directories.data are required by IDE2 so we get the default value explicitly.
|
||||
spawnCommand(cliPath, ['config', 'get', 'directories', '--json']),
|
||||
]);
|
||||
return JSON.parse(rawJson);
|
||||
|
||||
const config = JSON.parse(configRaw);
|
||||
const { user, data } = JSON.parse(directoriesRaw);
|
||||
|
||||
return { ...config.config, directories: { user, data } };
|
||||
}
|
||||
|
||||
private async initCliConfigTo(fsPathToDir: string): Promise<void> {
|
||||
@@ -293,61 +295,65 @@ export class ConfigServiceImpl
|
||||
}
|
||||
|
||||
private async updateDaemon(
|
||||
port: string | number,
|
||||
port: number,
|
||||
config: DefaultCliConfig
|
||||
): Promise<void> {
|
||||
const client = this.createClient(port);
|
||||
const req = new MergeRequest();
|
||||
const json = JSON.stringify(config, null, 2);
|
||||
req.setJsonData(json);
|
||||
this.logger.info(`Updating daemon with 'data': ${json}`);
|
||||
return new Promise<void>((resolve, reject) => {
|
||||
client.merge(req, (error) => {
|
||||
|
||||
const updatableConfig = {
|
||||
locale: config.locale,
|
||||
'directories.user': config.directories.user,
|
||||
'directories.data': config.directories.data,
|
||||
'network.proxy': config.network?.proxy,
|
||||
'board_manager.additional_urls':
|
||||
config.board_manager?.additional_urls || [],
|
||||
};
|
||||
|
||||
const client = createArduinoCoreServiceClient({ port });
|
||||
|
||||
for (const [key, value] of Object.entries(updatableConfig)) {
|
||||
const req = new SettingsSetValueRequest();
|
||||
req.setKey(key);
|
||||
req.setEncodedValue(JSON.stringify(value));
|
||||
await new Promise<void>((resolve) => {
|
||||
client.settingsSetValue(req, (error) => {
|
||||
if (error) {
|
||||
this.logger.error(
|
||||
`Could not update config with key: ${key} and value: ${value}`,
|
||||
error
|
||||
);
|
||||
}
|
||||
resolve();
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
client.close();
|
||||
}
|
||||
|
||||
private async writeDaemonState(port: number): Promise<void> {
|
||||
const client = createArduinoCoreServiceClient({ port });
|
||||
const req = new ConfigurationSaveRequest();
|
||||
req.setSettingsFormat('yaml');
|
||||
|
||||
const configRaw = await new Promise<string>((resolve, reject) => {
|
||||
client.configurationSave(req, (error, resp) => {
|
||||
try {
|
||||
if (error) {
|
||||
reject(error);
|
||||
return;
|
||||
}
|
||||
resolve();
|
||||
resolve(resp.getEncodedSettings());
|
||||
} finally {
|
||||
client.close();
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
private async writeDaemonState(port: string | number): Promise<void> {
|
||||
const client = this.createClient(port);
|
||||
const req = new WriteRequest();
|
||||
const cliConfigUri = await this.getCliConfigFileUri();
|
||||
const cliConfigPath = FileUri.fsPath(cliConfigUri);
|
||||
req.setFilePath(cliConfigPath);
|
||||
return new Promise<void>((resolve, reject) => {
|
||||
client.write(req, (error) => {
|
||||
try {
|
||||
if (error) {
|
||||
reject(error);
|
||||
return;
|
||||
}
|
||||
resolve();
|
||||
} finally {
|
||||
client.close();
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
private createClient(port: string | number): SettingsServiceClient {
|
||||
// https://github.com/agreatfool/grpc_tools_node_protoc_ts/blob/master/doc/grpcjs_support.md#usage
|
||||
const SettingsServiceClient = grpc.makeClientConstructor(
|
||||
// @ts-expect-error: ignore
|
||||
serviceGrpcPb['cc.arduino.cli.settings.v1.SettingsService'],
|
||||
'SettingsServiceService'
|
||||
) as any;
|
||||
return new SettingsServiceClient(
|
||||
`localhost:${port}`,
|
||||
grpc.credentials.createInsecure()
|
||||
) as SettingsServiceClient;
|
||||
await fs.writeFile(cliConfigPath, configRaw, { encoding: 'utf-8' });
|
||||
}
|
||||
|
||||
// #1445
|
||||
|
@@ -17,7 +17,6 @@ import {
|
||||
UpdateLibrariesIndexRequest,
|
||||
UpdateLibrariesIndexResponse,
|
||||
} from './cli-protocol/cc/arduino/cli/commands/v1/commands_pb';
|
||||
import * as commandsGrpcPb from './cli-protocol/cc/arduino/cli/commands/v1/commands_grpc_pb';
|
||||
import {
|
||||
IndexType,
|
||||
IndexUpdateDidCompleteParams,
|
||||
@@ -43,6 +42,10 @@ import {
|
||||
} from './grpc-progressible';
|
||||
import type { DefaultCliConfig } from './cli-config';
|
||||
import { ServiceError } from './service-error';
|
||||
import {
|
||||
createArduinoCoreServiceClient,
|
||||
createDefaultChannelOptions,
|
||||
} from './arduino-core-service-client';
|
||||
|
||||
@injectable()
|
||||
export class CoreClientProvider {
|
||||
@@ -128,10 +131,9 @@ export class CoreClientProvider {
|
||||
/**
|
||||
* Encapsulates both the gRPC core client creation (`CreateRequest`) and initialization (`InitRequest`).
|
||||
*/
|
||||
private async create(port: string): Promise<CoreClientProvider.Client> {
|
||||
private async create(port: number): Promise<CoreClientProvider.Client> {
|
||||
this.closeClient();
|
||||
const address = this.address(port);
|
||||
const client = await this.createClient(address);
|
||||
const client = await this.createClient(port);
|
||||
this.toDisposeOnCloseClient.pushAll([
|
||||
Disposable.create(() => client.client.close()),
|
||||
]);
|
||||
@@ -195,22 +197,9 @@ export class CoreClientProvider {
|
||||
return this.toDisposeOnCloseClient.dispose();
|
||||
}
|
||||
|
||||
private async createClient(
|
||||
address: string
|
||||
): Promise<CoreClientProvider.Client> {
|
||||
// https://github.com/agreatfool/grpc_tools_node_protoc_ts/blob/master/doc/grpcjs_support.md#usage
|
||||
const ArduinoCoreServiceClient = grpc.makeClientConstructor(
|
||||
// @ts-expect-error: ignore
|
||||
commandsGrpcPb['cc.arduino.cli.commands.v1.ArduinoCoreService'],
|
||||
'ArduinoCoreServiceService'
|
||||
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||||
) as any;
|
||||
const client = new ArduinoCoreServiceClient(
|
||||
address,
|
||||
grpc.credentials.createInsecure(),
|
||||
this.channelOptions
|
||||
) as ArduinoCoreServiceClient;
|
||||
|
||||
private async createClient(port: number): Promise<CoreClientProvider.Client> {
|
||||
const channelOptions = createDefaultChannelOptions(this.version);
|
||||
const client = createArduinoCoreServiceClient({ port, channelOptions });
|
||||
const instance = await new Promise<Instance>((resolve, reject) => {
|
||||
client.create(new CreateRequest(), (err, resp) => {
|
||||
if (err) {
|
||||
@@ -407,18 +396,6 @@ export class CoreClientProvider {
|
||||
});
|
||||
}
|
||||
|
||||
private address(port: string): string {
|
||||
return `localhost:${port}`;
|
||||
}
|
||||
|
||||
private get channelOptions(): Record<string, unknown> {
|
||||
return {
|
||||
'grpc.max_send_message_length': 512 * 1024 * 1024,
|
||||
'grpc.max_receive_message_length': 512 * 1024 * 1024,
|
||||
'grpc.primary_user_agent': `arduino-ide/${this.version}`,
|
||||
};
|
||||
}
|
||||
|
||||
private _version: string | undefined;
|
||||
private get version(): string {
|
||||
if (this._version) {
|
||||
|
@@ -1,50 +1,60 @@
|
||||
import { type ClientReadableStream } from '@grpc/grpc-js';
|
||||
import { ApplicationError } from '@theia/core/lib/common/application-error';
|
||||
import type { CancellationToken } from '@theia/core/lib/common/cancellation';
|
||||
import { CommandService } from '@theia/core/lib/common/command';
|
||||
import {
|
||||
Disposable,
|
||||
DisposableCollection,
|
||||
} from '@theia/core/lib/common/disposable';
|
||||
import { nls } from '@theia/core/lib/common/nls';
|
||||
import type { Mutable } from '@theia/core/lib/common/types';
|
||||
import { FileUri } from '@theia/core/lib/node/file-uri';
|
||||
import { inject, injectable } from '@theia/core/shared/inversify';
|
||||
import { relative } from 'node:path';
|
||||
import * as jspb from 'google-protobuf';
|
||||
import { BoolValue } from 'google-protobuf/google/protobuf/wrappers_pb';
|
||||
import type { ClientReadableStream } from '@grpc/grpc-js';
|
||||
import path from 'node:path';
|
||||
import {
|
||||
UploadResponse as ApiUploadResponse,
|
||||
OutputMessage,
|
||||
Port,
|
||||
PortIdentifier,
|
||||
resolveDetectedPort,
|
||||
} from '../common/protocol';
|
||||
import {
|
||||
CompilerWarnings,
|
||||
CoreService,
|
||||
CoreError,
|
||||
CompileSummary,
|
||||
CompilerWarnings,
|
||||
CoreError,
|
||||
CoreService,
|
||||
isCompileSummary,
|
||||
isUploadResponse,
|
||||
} from '../common/protocol/core-service';
|
||||
import { ResponseService } from '../common/protocol/response-service';
|
||||
import { firstToUpperCase, notEmpty } from '../common/utils';
|
||||
import { BoardDiscovery, createApiPort } from './board-discovery';
|
||||
import { tryParseError } from './cli-error-parser';
|
||||
import { ArduinoCoreServiceClient } from './cli-protocol/cc/arduino/cli/commands/v1/commands_grpc_pb';
|
||||
import { Instance } from './cli-protocol/cc/arduino/cli/commands/v1/common_pb';
|
||||
import {
|
||||
CompileRequest,
|
||||
CompileResponse,
|
||||
InstanceNeedsReinitializationError,
|
||||
} from './cli-protocol/cc/arduino/cli/commands/v1/compile_pb';
|
||||
import { CoreClientAware } from './core-client-provider';
|
||||
import { Port as RpcPort } from './cli-protocol/cc/arduino/cli/commands/v1/port_pb';
|
||||
import {
|
||||
BurnBootloaderRequest,
|
||||
BurnBootloaderResponse,
|
||||
ProgrammerIsRequiredForUploadError,
|
||||
UploadRequest,
|
||||
UploadResponse,
|
||||
UploadUsingProgrammerRequest,
|
||||
UploadUsingProgrammerResponse,
|
||||
} from './cli-protocol/cc/arduino/cli/commands/v1/upload_pb';
|
||||
import { ResponseService } from '../common/protocol/response-service';
|
||||
import {
|
||||
resolveDetectedPort,
|
||||
OutputMessage,
|
||||
PortIdentifier,
|
||||
Port,
|
||||
UploadResponse as ApiUploadResponse,
|
||||
} from '../common/protocol';
|
||||
import { ArduinoCoreServiceClient } from './cli-protocol/cc/arduino/cli/commands/v1/commands_grpc_pb';
|
||||
import { Port as RpcPort } from './cli-protocol/cc/arduino/cli/commands/v1/port_pb';
|
||||
import { ApplicationError, CommandService, Disposable, nls } from '@theia/core';
|
||||
import { MonitorManager } from './monitor-manager';
|
||||
import { AutoFlushingBuffer } from './utils/buffers';
|
||||
import { tryParseError } from './cli-error-parser';
|
||||
import { Instance } from './cli-protocol/cc/arduino/cli/commands/v1/common_pb';
|
||||
import { firstToUpperCase, notEmpty } from '../common/utils';
|
||||
import { ServiceError } from './service-error';
|
||||
import { CoreClientAware } from './core-client-provider';
|
||||
import { ExecuteWithProgress, ProgressResponse } from './grpc-progressible';
|
||||
import type { Mutable } from '@theia/core/lib/common/types';
|
||||
import { BoardDiscovery, createApiPort } from './board-discovery';
|
||||
import { MonitorManager } from './monitor-manager';
|
||||
import { ServiceError } from './service-error';
|
||||
import { AutoFlushingBuffer } from './utils/buffers';
|
||||
import { userAbort } from '../common/nls';
|
||||
import { UserAbortApplicationError } from '../common/protocol/progressible';
|
||||
|
||||
namespace Uploadable {
|
||||
export type Request = UploadRequest | UploadUsingProgrammerRequest;
|
||||
@@ -64,9 +74,13 @@ export class CoreServiceImpl extends CoreClientAware implements CoreService {
|
||||
@inject(BoardDiscovery)
|
||||
private readonly boardDiscovery: BoardDiscovery;
|
||||
|
||||
async compile(options: CoreService.Options.Compile): Promise<void> {
|
||||
async compile(
|
||||
options: CoreService.Options.Compile,
|
||||
cancellationToken?: CancellationToken
|
||||
): Promise<void> {
|
||||
const coreClient = await this.coreClient;
|
||||
const { client, instance } = coreClient;
|
||||
const request = this.compileRequest(options, instance);
|
||||
const compileSummary = <CompileSummaryFragment>{};
|
||||
const progressHandler = this.createProgressHandler(options);
|
||||
const compileSummaryHandler = (response: CompileResponse) =>
|
||||
@@ -75,42 +89,92 @@ export class CoreServiceImpl extends CoreClientAware implements CoreService {
|
||||
progressHandler,
|
||||
compileSummaryHandler
|
||||
);
|
||||
const request = this.compileRequest(options, instance);
|
||||
const toDisposeOnFinally = new DisposableCollection(handler);
|
||||
|
||||
return new Promise<void>((resolve, reject) => {
|
||||
client
|
||||
.compile(request)
|
||||
.on('data', handler.onData)
|
||||
.on('error', (error) => {
|
||||
if (!ServiceError.is(error)) {
|
||||
console.error(
|
||||
'Unexpected error occurred while compiling the sketch.',
|
||||
error
|
||||
);
|
||||
reject(error);
|
||||
} else {
|
||||
const compilerErrors = tryParseError({
|
||||
content: handler.content,
|
||||
sketch: options.sketch,
|
||||
});
|
||||
const message = nls.localize(
|
||||
'arduino/compile/error',
|
||||
'Compilation error: {0}',
|
||||
compilerErrors
|
||||
.map(({ message }) => message)
|
||||
.filter(notEmpty)
|
||||
.shift() ?? error.details
|
||||
);
|
||||
this.sendResponse(
|
||||
error.details + '\n\n' + message,
|
||||
OutputMessage.Severity.Error
|
||||
);
|
||||
reject(CoreError.VerifyFailed(message, compilerErrors));
|
||||
}
|
||||
})
|
||||
.on('end', resolve);
|
||||
let hasRetried = false;
|
||||
|
||||
const handleUnexpectedError = (error: Error) => {
|
||||
console.error(
|
||||
'Unexpected error occurred while compiling the sketch.',
|
||||
error
|
||||
);
|
||||
reject(error);
|
||||
};
|
||||
|
||||
const handleCancellationError = () => {
|
||||
console.log(userAbort);
|
||||
reject(UserAbortApplicationError());
|
||||
};
|
||||
|
||||
const handleInstanceNeedsReinitializationError = async (
|
||||
error: ServiceError & InstanceNeedsReinitializationError
|
||||
) => {
|
||||
if (hasRetried) {
|
||||
// If error persists, send the error message to the output
|
||||
return parseAndSendErrorResponse(error);
|
||||
}
|
||||
|
||||
hasRetried = true;
|
||||
await this.refresh();
|
||||
return startCompileStream();
|
||||
};
|
||||
|
||||
const parseAndSendErrorResponse = (error: ServiceError) => {
|
||||
const compilerErrors = tryParseError({
|
||||
content: handler.content,
|
||||
sketch: options.sketch,
|
||||
});
|
||||
const message = nls.localize(
|
||||
'arduino/compile/error',
|
||||
'Compilation error: {0}',
|
||||
compilerErrors
|
||||
.map(({ message }) => message)
|
||||
.filter(notEmpty)
|
||||
.shift() ?? error.details
|
||||
);
|
||||
this.sendResponse(
|
||||
error.details + '\n\n' + message,
|
||||
OutputMessage.Severity.Error
|
||||
);
|
||||
reject(CoreError.VerifyFailed(message, compilerErrors));
|
||||
};
|
||||
|
||||
const handleError = async (error: Error) => {
|
||||
if (!ServiceError.is(error)) return handleUnexpectedError(error);
|
||||
if (ServiceError.isCancel(error)) return handleCancellationError();
|
||||
|
||||
if (
|
||||
ServiceError.isInstanceOf(error, InstanceNeedsReinitializationError)
|
||||
) {
|
||||
return await handleInstanceNeedsReinitializationError(error);
|
||||
}
|
||||
|
||||
parseAndSendErrorResponse(error);
|
||||
};
|
||||
|
||||
const startCompileStream = () => {
|
||||
const call = client.compile(request);
|
||||
if (cancellationToken) {
|
||||
toDisposeOnFinally.push(
|
||||
cancellationToken.onCancellationRequested(() => call.cancel())
|
||||
);
|
||||
}
|
||||
|
||||
call
|
||||
.on('data', handler.onData)
|
||||
.on('error', handleError)
|
||||
.on('end', resolve);
|
||||
};
|
||||
|
||||
startCompileStream();
|
||||
}).finally(() => {
|
||||
handler.dispose();
|
||||
toDisposeOnFinally.dispose();
|
||||
if (!isCompileSummary(compileSummary)) {
|
||||
if (cancellationToken && cancellationToken.isCancellationRequested) {
|
||||
// NOOP
|
||||
return;
|
||||
}
|
||||
console.error(
|
||||
`Have not received the full compile summary from the CLI while running the compilation. ${JSON.stringify(
|
||||
compileSummary
|
||||
@@ -168,15 +232,16 @@ export class CoreServiceImpl extends CoreClientAware implements CoreService {
|
||||
request.setVerbose(options.verbose);
|
||||
request.setQuiet(false);
|
||||
if (typeof options.exportBinaries === 'boolean') {
|
||||
const exportBinaries = new BoolValue();
|
||||
exportBinaries.setValue(options.exportBinaries);
|
||||
request.setExportBinaries(exportBinaries);
|
||||
request.setExportBinaries(options.exportBinaries);
|
||||
}
|
||||
this.mergeSourceOverrides(request, options);
|
||||
return request;
|
||||
}
|
||||
|
||||
upload(options: CoreService.Options.Upload): Promise<ApiUploadResponse> {
|
||||
upload(
|
||||
options: CoreService.Options.Upload,
|
||||
cancellationToken?: CancellationToken
|
||||
): Promise<ApiUploadResponse> {
|
||||
const { usingProgrammer } = options;
|
||||
return this.doUpload(
|
||||
options,
|
||||
@@ -190,7 +255,8 @@ export class CoreServiceImpl extends CoreClientAware implements CoreService {
|
||||
usingProgrammer
|
||||
? CoreError.UploadUsingProgrammerFailed
|
||||
: CoreError.UploadFailed,
|
||||
`upload${usingProgrammer ? ' using programmer' : ''}`
|
||||
`upload${usingProgrammer ? ' using programmer' : ''}`,
|
||||
cancellationToken
|
||||
);
|
||||
}
|
||||
|
||||
@@ -204,7 +270,8 @@ export class CoreServiceImpl extends CoreClientAware implements CoreService {
|
||||
client: ArduinoCoreServiceClient
|
||||
) => (request: REQ) => ClientReadableStream<RESP>,
|
||||
errorCtor: ApplicationError.Constructor<number, CoreError.ErrorLocation[]>,
|
||||
task: string
|
||||
task: string,
|
||||
cancellationToken?: CancellationToken
|
||||
): Promise<ApiUploadResponse> {
|
||||
const portBeforeUpload = options.port;
|
||||
const uploadResponseFragment: Mutable<Partial<ApiUploadResponse>> = {
|
||||
@@ -241,33 +308,59 @@ export class CoreServiceImpl extends CoreClientAware implements CoreService {
|
||||
progressHandler,
|
||||
updateUploadResponseFragmentHandler
|
||||
);
|
||||
const toDisposeOnFinally = new DisposableCollection(handler);
|
||||
const grpcCall = responseFactory(client);
|
||||
return this.notifyUploadWillStart(options).then(() =>
|
||||
new Promise<ApiUploadResponse>((resolve, reject) => {
|
||||
grpcCall(this.initUploadRequest(request, options, instance))
|
||||
const call = grpcCall(
|
||||
this.initUploadRequest(request, options, instance)
|
||||
);
|
||||
if (cancellationToken) {
|
||||
toDisposeOnFinally.push(
|
||||
cancellationToken.onCancellationRequested(() => call.cancel())
|
||||
);
|
||||
}
|
||||
call
|
||||
.on('data', handler.onData)
|
||||
.on('error', (error) => {
|
||||
if (!ServiceError.is(error)) {
|
||||
console.error(`Unexpected error occurred while ${task}.`, error);
|
||||
reject(error);
|
||||
} else {
|
||||
const message = nls.localize(
|
||||
'arduino/upload/error',
|
||||
'{0} error: {1}',
|
||||
firstToUpperCase(task),
|
||||
error.details
|
||||
);
|
||||
this.sendResponse(error.details, OutputMessage.Severity.Error);
|
||||
reject(
|
||||
errorCtor(
|
||||
message,
|
||||
tryParseError({
|
||||
content: handler.content,
|
||||
sketch: options.sketch,
|
||||
})
|
||||
)
|
||||
);
|
||||
return;
|
||||
}
|
||||
if (ServiceError.isCancel(error)) {
|
||||
console.log(userAbort);
|
||||
reject(UserAbortApplicationError());
|
||||
return;
|
||||
}
|
||||
|
||||
if (
|
||||
ServiceError.isInstanceOf(
|
||||
error,
|
||||
ProgrammerIsRequiredForUploadError
|
||||
)
|
||||
) {
|
||||
reject(CoreError.UploadRequiresProgrammer());
|
||||
return;
|
||||
}
|
||||
|
||||
const message = nls.localize(
|
||||
'arduino/upload/error',
|
||||
'{0} error: {1}',
|
||||
firstToUpperCase(task),
|
||||
error.details
|
||||
);
|
||||
|
||||
this.sendResponse(error.details, OutputMessage.Severity.Error);
|
||||
reject(
|
||||
errorCtor(
|
||||
message,
|
||||
tryParseError({
|
||||
content: handler.content,
|
||||
sketch: options.sketch,
|
||||
})
|
||||
)
|
||||
);
|
||||
})
|
||||
.on('end', () => {
|
||||
if (isUploadResponse(uploadResponseFragment)) {
|
||||
@@ -285,7 +378,7 @@ export class CoreServiceImpl extends CoreClientAware implements CoreService {
|
||||
}
|
||||
});
|
||||
}).finally(async () => {
|
||||
handler.dispose();
|
||||
toDisposeOnFinally.dispose();
|
||||
await this.notifyUploadDidFinish(
|
||||
Object.assign(options, {
|
||||
afterPort: uploadResponseFragment.portAfterUpload,
|
||||
@@ -320,16 +413,25 @@ export class CoreServiceImpl extends CoreClientAware implements CoreService {
|
||||
return request;
|
||||
}
|
||||
|
||||
async burnBootloader(options: CoreService.Options.Bootloader): Promise<void> {
|
||||
async burnBootloader(
|
||||
options: CoreService.Options.Bootloader,
|
||||
cancellationToken?: CancellationToken
|
||||
): Promise<void> {
|
||||
const coreClient = await this.coreClient;
|
||||
const { client, instance } = coreClient;
|
||||
const progressHandler = this.createProgressHandler(options);
|
||||
const handler = this.createOnDataHandler(progressHandler);
|
||||
const request = this.burnBootloaderRequest(options, instance);
|
||||
const toDisposeOnFinally = new DisposableCollection(handler);
|
||||
return this.notifyUploadWillStart(options).then(() =>
|
||||
new Promise<void>((resolve, reject) => {
|
||||
client
|
||||
.burnBootloader(request)
|
||||
const call = client.burnBootloader(request);
|
||||
if (cancellationToken) {
|
||||
toDisposeOnFinally.push(
|
||||
cancellationToken.onCancellationRequested(() => call.cancel())
|
||||
);
|
||||
}
|
||||
call
|
||||
.on('data', handler.onData)
|
||||
.on('error', (error) => {
|
||||
if (!ServiceError.is(error)) {
|
||||
@@ -338,23 +440,28 @@ export class CoreServiceImpl extends CoreClientAware implements CoreService {
|
||||
error
|
||||
);
|
||||
reject(error);
|
||||
} else {
|
||||
this.sendResponse(error.details, OutputMessage.Severity.Error);
|
||||
reject(
|
||||
CoreError.BurnBootloaderFailed(
|
||||
nls.localize(
|
||||
'arduino/burnBootloader/error',
|
||||
'Error while burning the bootloader: {0}',
|
||||
error.details
|
||||
),
|
||||
tryParseError({ content: handler.content })
|
||||
)
|
||||
);
|
||||
return;
|
||||
}
|
||||
if (ServiceError.isCancel(error)) {
|
||||
console.log(userAbort);
|
||||
reject(UserAbortApplicationError());
|
||||
return;
|
||||
}
|
||||
this.sendResponse(error.details, OutputMessage.Severity.Error);
|
||||
reject(
|
||||
CoreError.BurnBootloaderFailed(
|
||||
nls.localize(
|
||||
'arduino/burnBootloader/error',
|
||||
'Error while burning the bootloader: {0}',
|
||||
error.details
|
||||
),
|
||||
tryParseError({ content: handler.content })
|
||||
)
|
||||
);
|
||||
})
|
||||
.on('end', resolve);
|
||||
}).finally(async () => {
|
||||
handler.dispose();
|
||||
toDisposeOnFinally.dispose();
|
||||
await this.notifyUploadDidFinish(
|
||||
Object.assign(options, { afterPort: options.port })
|
||||
);
|
||||
@@ -463,7 +570,7 @@ export class CoreServiceImpl extends CoreClientAware implements CoreService {
|
||||
for (const uri of Object.keys(options.sourceOverride)) {
|
||||
const content = options.sourceOverride[uri];
|
||||
if (content) {
|
||||
const relativePath = relative(sketchPath, FileUri.fsPath(uri));
|
||||
const relativePath = path.relative(sketchPath, FileUri.fsPath(uri));
|
||||
req.getSourceOverrideMap().set(relativePath, content);
|
||||
}
|
||||
}
|
||||
@@ -535,18 +642,31 @@ function updateCompileSummary(
|
||||
compileSummary: CompileSummaryFragment,
|
||||
response: CompileResponse
|
||||
): CompileSummaryFragment {
|
||||
const buildPath = response.getBuildPath();
|
||||
const messageCase = response.getMessageCase();
|
||||
if (messageCase !== CompileResponse.MessageCase.RESULT) {
|
||||
return compileSummary;
|
||||
}
|
||||
const result = response.getResult();
|
||||
if (!result) {
|
||||
console.warn(
|
||||
`Build result is missing from response: ${JSON.stringify(
|
||||
response.toObject(false)
|
||||
)}`
|
||||
);
|
||||
return compileSummary;
|
||||
}
|
||||
const buildPath = result.getBuildPath();
|
||||
if (buildPath) {
|
||||
compileSummary.buildPath = buildPath;
|
||||
compileSummary.buildOutputUri = FileUri.create(buildPath).toString();
|
||||
}
|
||||
const executableSectionsSize = response.getExecutableSectionsSizeList();
|
||||
const executableSectionsSize = result.getExecutableSectionsSizeList();
|
||||
if (executableSectionsSize) {
|
||||
compileSummary.executableSectionsSize = executableSectionsSize.map((item) =>
|
||||
item.toObject(false)
|
||||
);
|
||||
}
|
||||
const usedLibraries = response.getUsedLibrariesList();
|
||||
const usedLibraries = result.getUsedLibrariesList();
|
||||
if (usedLibraries) {
|
||||
compileSummary.usedLibraries = usedLibraries.map((item) => {
|
||||
const object = item.toObject(false);
|
||||
@@ -575,15 +695,15 @@ function updateCompileSummary(
|
||||
return library;
|
||||
});
|
||||
}
|
||||
const boardPlatform = response.getBoardPlatform();
|
||||
const boardPlatform = result.getBoardPlatform();
|
||||
if (boardPlatform) {
|
||||
compileSummary.buildPlatform = boardPlatform.toObject(false);
|
||||
}
|
||||
const buildPlatform = response.getBuildPlatform();
|
||||
const buildPlatform = result.getBuildPlatform();
|
||||
if (buildPlatform) {
|
||||
compileSummary.buildPlatform = buildPlatform.toObject(false);
|
||||
}
|
||||
const buildProperties = response.getBuildPropertiesList();
|
||||
const buildProperties = result.getBuildPropertiesList();
|
||||
if (buildProperties) {
|
||||
compileSummary.buildProperties = buildProperties.slice();
|
||||
}
|
||||
|
@@ -81,7 +81,7 @@ export class LibraryServiceImpl
|
||||
}
|
||||
|
||||
const req = new LibrarySearchRequest();
|
||||
req.setQuery(options.query || '');
|
||||
req.setSearchArgs(options.query || '');
|
||||
req.setInstance(instance);
|
||||
req.setOmitReleasesDetails(true);
|
||||
const resp = await new Promise<LibrarySearchResponse>((resolve, reject) =>
|
||||
|
@@ -22,8 +22,7 @@ import {
|
||||
import {
|
||||
EnumerateMonitorPortSettingsRequest,
|
||||
EnumerateMonitorPortSettingsResponse,
|
||||
MonitorPortConfiguration,
|
||||
MonitorPortSetting,
|
||||
MonitorPortOpenRequest,
|
||||
MonitorRequest,
|
||||
MonitorResponse,
|
||||
} from './cli-protocol/cc/arduino/cli/commands/v1/monitor_pb';
|
||||
@@ -38,6 +37,10 @@ import {
|
||||
} from '@theia/core/lib/common/promise-util';
|
||||
import { MonitorServiceFactoryOptions } from './monitor-service-factory';
|
||||
import { ServiceError } from './service-error';
|
||||
import {
|
||||
MonitorPortConfiguration,
|
||||
MonitorPortSetting,
|
||||
} from './cli-protocol/cc/arduino/cli/commands/v1/common_pb';
|
||||
|
||||
export const MonitorServiceName = 'monitor-service';
|
||||
type DuplexHandlerKeys =
|
||||
@@ -229,16 +232,16 @@ export class MonitorService extends CoreClientAware implements Disposable {
|
||||
const coreClient = await this.coreClient;
|
||||
|
||||
const { instance } = coreClient;
|
||||
const monitorRequest = new MonitorRequest();
|
||||
monitorRequest.setInstance(instance);
|
||||
const openPortRequest = new MonitorPortOpenRequest();
|
||||
openPortRequest.setInstance(instance);
|
||||
if (this.board?.fqbn) {
|
||||
monitorRequest.setFqbn(this.board.fqbn);
|
||||
openPortRequest.setFqbn(this.board.fqbn);
|
||||
}
|
||||
if (this.port?.address && this.port?.protocol) {
|
||||
const rpcPort = new RpcPort();
|
||||
rpcPort.setAddress(this.port.address);
|
||||
rpcPort.setProtocol(this.port.protocol);
|
||||
monitorRequest.setPort(rpcPort);
|
||||
openPortRequest.setPort(rpcPort);
|
||||
}
|
||||
const config = new MonitorPortConfiguration();
|
||||
for (const id in this.settings.pluggableMonitorSettings) {
|
||||
@@ -247,9 +250,9 @@ export class MonitorService extends CoreClientAware implements Disposable {
|
||||
s.setValue(this.settings.pluggableMonitorSettings[id].selectedValue);
|
||||
config.addSettings(s);
|
||||
}
|
||||
monitorRequest.setPortConfiguration(config);
|
||||
openPortRequest.setPortConfiguration(config);
|
||||
|
||||
await this.pollWriteToStream(monitorRequest);
|
||||
await this.pollWriteToStream(openPortRequest);
|
||||
// Only store the config, if the monitor has successfully started.
|
||||
this.currentPortConfigSnapshot = MonitorPortConfiguration.toObject(
|
||||
false,
|
||||
@@ -344,7 +347,7 @@ export class MonitorService extends CoreClientAware implements Disposable {
|
||||
}
|
||||
}
|
||||
|
||||
pollWriteToStream(request: MonitorRequest): Promise<void> {
|
||||
pollWriteToStream(request: MonitorPortOpenRequest): Promise<void> {
|
||||
const createWriteToStreamExecutor =
|
||||
(duplex: ClientDuplexStream<MonitorRequest, MonitorResponse>) =>
|
||||
(resolve: () => void, reject: (reason?: unknown) => void) => {
|
||||
@@ -380,7 +383,7 @@ export class MonitorService extends CoreClientAware implements Disposable {
|
||||
];
|
||||
|
||||
this.setDuplexHandlers(duplex, resolvingDuplexHandlers);
|
||||
duplex.write(request);
|
||||
duplex.write(new MonitorRequest().setOpenRequest(request));
|
||||
};
|
||||
|
||||
return Promise.race([
|
||||
@@ -409,6 +412,8 @@ export class MonitorService extends CoreClientAware implements Disposable {
|
||||
]) as Promise<unknown> as Promise<void>;
|
||||
}
|
||||
|
||||
private endingDuplex: Promise<void> | undefined;
|
||||
|
||||
/**
|
||||
* Pauses the currently running monitor, it still closes the gRPC connection
|
||||
* with the underlying monitor process but it doesn't stop the message handlers
|
||||
@@ -418,29 +423,43 @@ export class MonitorService extends CoreClientAware implements Disposable {
|
||||
* @returns
|
||||
*/
|
||||
async pause(): Promise<void> {
|
||||
return new Promise(async (resolve) => {
|
||||
if (!this.duplex) {
|
||||
this.logger.warn(
|
||||
`monitor to ${this.port?.address} using ${this.port?.protocol} already stopped`
|
||||
);
|
||||
return resolve();
|
||||
}
|
||||
// It's enough to close the connection with the client
|
||||
// to stop the monitor process
|
||||
this.duplex.end();
|
||||
this.logger.info(
|
||||
`stopped monitor to ${this.port?.address} using ${this.port?.protocol}`
|
||||
const duplex = this.duplex;
|
||||
if (!duplex) {
|
||||
this.logger.warn(
|
||||
`monitor to ${this.port?.address} using ${this.port?.protocol} already stopped`
|
||||
);
|
||||
return;
|
||||
}
|
||||
if (this.endingDuplex) {
|
||||
return this.endingDuplex;
|
||||
}
|
||||
const deferredEnd = new Deferred<void>();
|
||||
this.endingDuplex = deferredEnd.promise;
|
||||
|
||||
this.duplex.on('end', resolve);
|
||||
// to terminate the monitor connection, send a close request, and wait for the end event
|
||||
duplex.once('end', () => {
|
||||
deferredEnd.resolve();
|
||||
});
|
||||
try {
|
||||
await new Promise((resolve) =>
|
||||
duplex.write(new MonitorRequest().setClose(true), resolve)
|
||||
);
|
||||
await this.endingDuplex;
|
||||
} finally {
|
||||
this.endingDuplex = undefined;
|
||||
}
|
||||
// Sanity check
|
||||
// Duplexes are allowed to be half open, check whether the monitor server (the readable) has ended
|
||||
if (!duplex.readableEnded) {
|
||||
throw new Error('Could not end the monitor connection');
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Stop the monitor currently running
|
||||
*/
|
||||
async stop(): Promise<void> {
|
||||
return this.pause().finally(this.stopMessagesHandlers.bind(this));
|
||||
return this.pause().finally(() => this.stopMessagesHandlers());
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -454,11 +473,7 @@ export class MonitorService extends CoreClientAware implements Disposable {
|
||||
if (!this.duplex) {
|
||||
throw createNotConnectedError(this.port);
|
||||
}
|
||||
const coreClient = await this.coreClient;
|
||||
const { instance } = coreClient;
|
||||
|
||||
const req = new MonitorRequest();
|
||||
req.setInstance(instance);
|
||||
req.setTxData(new TextEncoder().encode(message));
|
||||
return new Promise<void>((resolve, reject) => {
|
||||
if (this.duplex) {
|
||||
@@ -588,17 +603,13 @@ export class MonitorService extends CoreClientAware implements Disposable {
|
||||
return;
|
||||
}
|
||||
|
||||
const coreClient = await this.coreClient;
|
||||
const { instance } = coreClient;
|
||||
|
||||
this.logger.info(
|
||||
`Sending monitor request with new port configuration: ${JSON.stringify(
|
||||
MonitorPortConfiguration.toObject(false, diffConfig)
|
||||
)}`
|
||||
);
|
||||
const req = new MonitorRequest();
|
||||
req.setInstance(instance);
|
||||
req.setPortConfiguration(diffConfig);
|
||||
req.setUpdatedConfiguration(diffConfig);
|
||||
this.duplex.write(req);
|
||||
}
|
||||
|
||||
|
@@ -43,7 +43,7 @@ export class NotificationServiceServerImpl
|
||||
this.clients.forEach((client) => client.notifyIndexUpdateDidFail(params));
|
||||
}
|
||||
|
||||
notifyDaemonDidStart(port: string): void {
|
||||
notifyDaemonDidStart(port: number): void {
|
||||
this.clients.forEach((client) => client.notifyDaemonDidStart(port));
|
||||
}
|
||||
|
||||
|
@@ -1,14 +1,71 @@
|
||||
import { Metadata, StatusObject } from '@grpc/grpc-js';
|
||||
import { Status } from './cli-protocol/google/rpc/status_pb';
|
||||
import { stringToUint8Array } from '../common/utils';
|
||||
import { Status as StatusCode } from '@grpc/grpc-js/build/src/constants';
|
||||
import { ProgrammerIsRequiredForUploadError } from './cli-protocol/cc/arduino/cli/commands/v1/upload_pb';
|
||||
import { InstanceNeedsReinitializationError } from './cli-protocol/cc/arduino/cli/commands/v1/compile_pb';
|
||||
|
||||
type ProtoError = typeof ProgrammerIsRequiredForUploadError;
|
||||
const protoErrorsMap = new Map<string, ProtoError>([
|
||||
[
|
||||
'cc.arduino.cli.commands.v1.ProgrammerIsRequiredForUploadError',
|
||||
ProgrammerIsRequiredForUploadError,
|
||||
],
|
||||
[
|
||||
'cc.arduino.cli.commands.v1.InstanceNeedsReinitializationError',
|
||||
InstanceNeedsReinitializationError,
|
||||
],
|
||||
// handle other cli defined errors here
|
||||
]);
|
||||
|
||||
export type ServiceError = StatusObject & Error;
|
||||
export namespace ServiceError {
|
||||
export function isCancel(arg: unknown): arg is ServiceError & { code: 1 } {
|
||||
export function isCancel(
|
||||
arg: unknown
|
||||
): arg is ServiceError & { code: StatusCode.CANCELLED } {
|
||||
return is(arg) && arg.code === 1; // https://grpc.github.io/grpc/core/md_doc_statuscodes.html
|
||||
}
|
||||
export function is(arg: unknown): arg is ServiceError {
|
||||
return arg instanceof Error && isStatusObjet(arg);
|
||||
|
||||
export function isInvalidArgument(
|
||||
arg: unknown
|
||||
): arg is ServiceError & { code: StatusCode.INVALID_ARGUMENT } {
|
||||
return is(arg) && arg.code === 3; // https://grpc.github.io/grpc/core/md_doc_statuscodes.html
|
||||
}
|
||||
function isStatusObjet(arg: unknown): arg is StatusObject {
|
||||
|
||||
export function is(arg: unknown): arg is ServiceError {
|
||||
return arg instanceof Error && isStatusObject(arg);
|
||||
}
|
||||
|
||||
export function isInstanceOf<ProtoError>(
|
||||
arg: unknown,
|
||||
type: new (...args: unknown[]) => ProtoError
|
||||
): arg is ProtoError {
|
||||
if (!isStatusObject(arg)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
try {
|
||||
const bin = arg.metadata.get('grpc-status-details-bin')[0];
|
||||
const uint8Array =
|
||||
typeof bin === 'string'
|
||||
? stringToUint8Array(bin)
|
||||
: new Uint8Array(bin.buffer, bin.byteOffset, bin.byteLength);
|
||||
|
||||
const errors = Status.deserializeBinary(uint8Array)
|
||||
.getDetailsList()
|
||||
.map((details) => {
|
||||
const typeName = details.getTypeName();
|
||||
const ErrorType = protoErrorsMap.get(typeName);
|
||||
return ErrorType?.deserializeBinary(details.getValue_asU8());
|
||||
});
|
||||
|
||||
return !!errors.find((error) => error && error instanceof type);
|
||||
} catch {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
function isStatusObject(arg: unknown): arg is StatusObject {
|
||||
if (typeof arg === 'object') {
|
||||
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||||
const any = arg as any;
|
||||
|
@@ -8,7 +8,7 @@ import type { Mutable } from '@theia/core/lib/common/types';
|
||||
import URI from '@theia/core/lib/common/uri';
|
||||
import { FileUri } from '@theia/core/lib/node/file-uri';
|
||||
import { inject, injectable, named } from '@theia/core/shared/inversify';
|
||||
import glob from 'glob';
|
||||
import { glob } from 'glob';
|
||||
import crypto from 'node:crypto';
|
||||
import {
|
||||
CopyOptions,
|
||||
@@ -167,7 +167,16 @@ export class SketchesServiceImpl
|
||||
reject(rejectWith);
|
||||
return;
|
||||
}
|
||||
const responseSketchPath = maybeNormalizeDrive(resp.getLocationPath());
|
||||
const sketch = resp.getSketch();
|
||||
if (!sketch) {
|
||||
reject(
|
||||
new Error(`Incomplete LoadSketch response. Sketch is missing.`)
|
||||
);
|
||||
return;
|
||||
}
|
||||
const responseSketchPath = maybeNormalizeDrive(
|
||||
sketch.getLocationPath()
|
||||
);
|
||||
if (requestSketchPath !== responseSketchPath) {
|
||||
this.logger.warn(
|
||||
`Warning! The request sketch path was different than the response sketch path from the CLI. This could be a potential bug. Request: <${requestSketchPath}>, response: <${responseSketchPath}>.`
|
||||
@@ -185,14 +194,14 @@ export class SketchesServiceImpl
|
||||
resolve({
|
||||
name: path.basename(responseSketchPath),
|
||||
uri: FileUri.create(responseSketchPath).toString(),
|
||||
mainFileUri: FileUri.create(resp.getMainFile()).toString(),
|
||||
otherSketchFileUris: resp
|
||||
mainFileUri: FileUri.create(sketch.getMainFile()).toString(),
|
||||
otherSketchFileUris: sketch
|
||||
.getOtherSketchFilesList()
|
||||
.map((p) => FileUri.create(p).toString()),
|
||||
additionalFileUris: resp
|
||||
additionalFileUris: sketch
|
||||
.getAdditionalFilesList()
|
||||
.map((p) => FileUri.create(p).toString()),
|
||||
rootFolderFileUris: resp
|
||||
rootFolderFileUris: sketch
|
||||
.getRootFolderFilesList()
|
||||
.map((p) => FileUri.create(p).toString()),
|
||||
mtimeMs,
|
||||
@@ -600,9 +609,13 @@ export class SketchesServiceImpl
|
||||
force: true,
|
||||
});
|
||||
|
||||
const sourceMainSketchFilePath = FileUri.fsPath(sketch.mainFileUri);
|
||||
// Can copy sketch with pde main sketch file: https://github.com/arduino/arduino-ide/issues/2377
|
||||
const ext = path.extname(sourceMainSketchFilePath);
|
||||
|
||||
// rename the main sketch file
|
||||
await fs.rename(
|
||||
join(temp, `${sourceFolderBasename}.ino`),
|
||||
join(temp, `${sourceFolderBasename}${ext}`),
|
||||
join(temp, `${destinationFolderBasename}.ino`)
|
||||
);
|
||||
|
||||
@@ -655,47 +668,43 @@ export class SketchesServiceImpl
|
||||
);
|
||||
}
|
||||
|
||||
async tempBuildPath(sketch: Sketch): Promise<string[]> {
|
||||
async getBuildPath(sketch: Sketch): Promise<string[]> {
|
||||
const sketchPath = FileUri.fsPath(sketch.uri);
|
||||
const { tempDirRealpath } = this.isTempSketch;
|
||||
const tempBuildPaths = [
|
||||
this.tempBuildPathMD5Hash(tempDirRealpath, sketchPath),
|
||||
];
|
||||
|
||||
let basePath: string;
|
||||
try {
|
||||
basePath = userCacheDir();
|
||||
} catch {
|
||||
// Fallback to /tmp
|
||||
const { tempDirRealpath } = this.isTempSketch;
|
||||
basePath = tempDirRealpath;
|
||||
}
|
||||
const buildPaths = [this.buildPathMD5Hash(basePath, sketchPath)];
|
||||
|
||||
// If on Windows, provide both the upper and the lowercase drive letter MD5 hashes. All together four paths are expected:
|
||||
// One of them should match if the sketch is not yet compiled.
|
||||
// https://github.com/arduino/arduino-ide/pull/1809#discussion_r1071031040
|
||||
if (isWindows && Win32DriveRegex.test(tempDirRealpath)) {
|
||||
if (isWindows && Win32DriveRegex.test(basePath)) {
|
||||
const toggleFirstCharCasing = (s: string) =>
|
||||
startsWithUpperCase(s) ? firstToLowerCase(s) : firstToUpperCase(s);
|
||||
const otherCaseTempDirRealPath = toggleFirstCharCasing(tempDirRealpath);
|
||||
tempBuildPaths.push(
|
||||
this.tempBuildPathMD5Hash(otherCaseTempDirRealPath, sketchPath)
|
||||
);
|
||||
const otherCaseDirRealPath = toggleFirstCharCasing(basePath);
|
||||
buildPaths.push(this.buildPathMD5Hash(otherCaseDirRealPath, sketchPath));
|
||||
if (Win32DriveRegex.test(sketchPath)) {
|
||||
const otherCaseSketchPath = toggleFirstCharCasing(sketchPath);
|
||||
tempBuildPaths.push(
|
||||
this.tempBuildPathMD5Hash(tempDirRealpath, otherCaseSketchPath),
|
||||
this.tempBuildPathMD5Hash(
|
||||
otherCaseTempDirRealPath,
|
||||
otherCaseSketchPath
|
||||
)
|
||||
buildPaths.push(
|
||||
this.buildPathMD5Hash(basePath, otherCaseSketchPath),
|
||||
this.buildPathMD5Hash(otherCaseDirRealPath, otherCaseSketchPath)
|
||||
);
|
||||
}
|
||||
}
|
||||
return tempBuildPaths;
|
||||
return buildPaths;
|
||||
}
|
||||
|
||||
private tempBuildPathMD5Hash(tempFolderPath: string, path: string): string {
|
||||
return join(
|
||||
tempFolderPath,
|
||||
'arduino',
|
||||
'sketches',
|
||||
this.tempBuildFolderMD5Hash(path)
|
||||
);
|
||||
private buildPathMD5Hash(basePath: string, path: string): string {
|
||||
return join(basePath, 'arduino', 'sketches', this.buildFolderMD5Hash(path));
|
||||
}
|
||||
|
||||
private tempBuildFolderMD5Hash(path: string): string {
|
||||
private buildFolderMD5Hash(path: string): string {
|
||||
return crypto.createHash('md5').update(path).digest('hex').toUpperCase();
|
||||
}
|
||||
|
||||
@@ -840,13 +849,13 @@ export async function discoverSketches(
|
||||
container: Mutable<SketchContainer>,
|
||||
logger?: ILogger
|
||||
): Promise<SketchContainer> {
|
||||
const pathToAllSketchFiles = await globSketches(
|
||||
const pathToAllSketchFiles = await glob(
|
||||
'/!(libraries|hardware)/**/*.{ino,pde}',
|
||||
root
|
||||
{ root }
|
||||
);
|
||||
// if no match try to glob the sketchbook as a sketch folder
|
||||
if (!pathToAllSketchFiles.length) {
|
||||
pathToAllSketchFiles.push(...(await globSketches('/*.{ino,pde}', root)));
|
||||
pathToAllSketchFiles.push(...(await glob('/*.{ino,pde}', { root })));
|
||||
}
|
||||
|
||||
// Sort by path length to filter out nested sketches, such as the `Nested_folder` inside the `Folder` sketch.
|
||||
@@ -860,7 +869,14 @@ export async function discoverSketches(
|
||||
// +--Nested_folder
|
||||
// |
|
||||
// +--Nested_folder.ino
|
||||
pathToAllSketchFiles.sort((left, right) => left.length - right.length);
|
||||
pathToAllSketchFiles.sort((left, right) => {
|
||||
if (left.length === right.length) {
|
||||
// Sort alphabetically for tests consistency
|
||||
return left.localeCompare(right);
|
||||
}
|
||||
return left.length - right.length;
|
||||
});
|
||||
|
||||
const getOrCreateChildContainer = (
|
||||
container: SketchContainer,
|
||||
segments: string[]
|
||||
@@ -961,17 +977,39 @@ export async function discoverSketches(
|
||||
uri: FileUri.create(path.dirname(pathToSketchFile)).toString(),
|
||||
});
|
||||
}
|
||||
|
||||
return prune(container);
|
||||
}
|
||||
|
||||
async function globSketches(pattern: string, root: string): Promise<string[]> {
|
||||
return new Promise<string[]>((resolve, reject) => {
|
||||
glob(pattern, { root }, (error, results) => {
|
||||
if (error) {
|
||||
reject(error);
|
||||
} else {
|
||||
resolve(results);
|
||||
/**
|
||||
* Replica of Go `os.UserCacheDir()`.
|
||||
* https://github.com/golang/go/blob/777f43ab27bde4c662cd0a663f807f74f3fbab0f/src/os/file.go#L477
|
||||
*/
|
||||
export function userCacheDir(): string {
|
||||
let dir: string | undefined;
|
||||
const platform = os.platform();
|
||||
|
||||
switch (platform) {
|
||||
case 'darwin': {
|
||||
dir = path.join(os.homedir(), '/Library/Caches');
|
||||
break;
|
||||
}
|
||||
case 'win32': {
|
||||
dir = process.env.LocalAppData || undefined;
|
||||
if (!dir) {
|
||||
throw new Error('%LocalAppData% is not defined');
|
||||
}
|
||||
});
|
||||
});
|
||||
break;
|
||||
}
|
||||
default: {
|
||||
dir = process.env.XDG_CACHE_HOME || undefined;
|
||||
if (!dir) {
|
||||
dir = path.join(os.homedir() + '/.cache');
|
||||
} else if (!path.isAbsolute(dir)) {
|
||||
throw new Error('path in $XDG_CACHE_HOME is relative');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return dir;
|
||||
}
|
||||
|
@@ -0,0 +1,44 @@
|
||||
import { injectable, postConstruct } from '@theia/core/shared/inversify';
|
||||
import { VsCodePluginScanner as TheiaVsCodePluginScanner } from '@theia/plugin-ext-vscode/lib/node/scanner-vscode';
|
||||
import {
|
||||
PluginPackageViewWelcome,
|
||||
ViewWelcome,
|
||||
} from '@theia/plugin-ext/lib/common/plugin-protocol';
|
||||
|
||||
@injectable()
|
||||
export class VsCodePluginScanner extends TheiaVsCodePluginScanner {
|
||||
@postConstruct()
|
||||
protected init(): void {
|
||||
this['readViewWelcome'] = (
|
||||
rawViewWelcome: PluginPackageViewWelcome,
|
||||
pluginViewsIds: string[]
|
||||
) => {
|
||||
const result = {
|
||||
view: rawViewWelcome.view,
|
||||
content: rawViewWelcome.contents,
|
||||
when: rawViewWelcome.when,
|
||||
// if the plugin contributes Welcome view to its own view - it will be ordered first
|
||||
order:
|
||||
pluginViewsIds.findIndex((v) => v === rawViewWelcome.view) > -1
|
||||
? 0
|
||||
: 1,
|
||||
};
|
||||
return maybeSetEnablement(rawViewWelcome, result);
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
// This is not yet supported by Theia but available in Code (https://github.com/microsoft/vscode/issues/114304)
|
||||
function maybeSetEnablement(
|
||||
rawViewWelcome: PluginPackageViewWelcome,
|
||||
result: ViewWelcome
|
||||
) {
|
||||
const enablement =
|
||||
'enablement' in rawViewWelcome &&
|
||||
typeof rawViewWelcome['enablement'] === 'string' &&
|
||||
rawViewWelcome['enablement'];
|
||||
if (enablement) {
|
||||
Object.assign(result, { enablement });
|
||||
}
|
||||
return result;
|
||||
}
|
@@ -170,6 +170,36 @@ describe('board-service-provider', () => {
|
||||
expect(events).deep.equals([expectedEvent]);
|
||||
});
|
||||
|
||||
it('should ignore custom board configs from the FQBN', () => {
|
||||
boardsServiceProvider['_boardsConfig'] = {
|
||||
selectedBoard: uno,
|
||||
selectedPort: unoSerialPort,
|
||||
};
|
||||
const events: BoardsConfigChangeEvent[] = [];
|
||||
toDisposeAfterEach.push(
|
||||
boardsServiceProvider.onBoardsConfigDidChange((event) =>
|
||||
events.push(event)
|
||||
)
|
||||
);
|
||||
const mkr1000WithCustomOptions = {
|
||||
...mkr1000,
|
||||
fqbn: `${mkr1000.fqbn}:c1=v1`,
|
||||
};
|
||||
const didUpdate = boardsServiceProvider.updateConfig(
|
||||
mkr1000WithCustomOptions
|
||||
);
|
||||
expect(didUpdate).to.be.true;
|
||||
const expectedEvent: BoardIdentifierChangeEvent = {
|
||||
previousSelectedBoard: uno,
|
||||
selectedBoard: mkr1000WithCustomOptions, // the even has the custom board options
|
||||
};
|
||||
expect(events).deep.equals([expectedEvent]);
|
||||
// the persisted state does not have the config options property
|
||||
expect(boardsServiceProvider.boardsConfig.selectedBoard?.fqbn).to.equal(
|
||||
mkr1000.fqbn
|
||||
);
|
||||
});
|
||||
|
||||
it('should not update the board if did not change (board identifier)', () => {
|
||||
boardsServiceProvider['_boardsConfig'] = {
|
||||
selectedBoard: uno,
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user