Compare commits

..

56 Commits

Author SHA1 Message Date
Giacomo Cusinato
a8885945b4 got it working 2025-03-28 23:13:51 +09:00
Giacomo Cusinato
f343c7ffc5 spinner and inversify error 2025-03-28 21:58:47 +09:00
Christian Sarnataro
493ddc22d7 Initial draft for restoring browser app 2025-03-27 11:22:36 +01:00
Giacomo Cusinato
9ab87bf8b5 chore: use AWS OpenID Connect for S3 publish 2025-03-11 21:42:12 +07:00
dankeboy36
5ec1915000 fix(plugin): decouple state update from the LS (#2643)
* fix(plugin): decouple state update from the LS

To enhance the reliability of Arduino IDE extensions, the update
process for `ArduinoState` has been modified to ensure independence
from the language server's availability. This change addresses issues
caused by `compileSummary` being `undefined` due to potential startup
failures of the Arduino Language Server, as noted in
https://github.com/dankeboy36/esp-exception-decoder/issues/28#issuecomment-2681800772.

The `compile` command now resolves with a `CompileSummary` rather than
`void`, facilitating a more reliable way for extensions to access
necessary data. Furthermore, the command has been adjusted to allow
resolution with `undefined` when the compiled data is partial.

By transitioning to direct usage of the resolved compile value for
state updates, the reliance on executed commands for extensions is
eliminated. This update also moves the VSIX command execution to the
frontend without altering existing IDE behavior.

Closes arduino/arduino-ide#2642

Signed-off-by: dankeboy36 <dankeboy36@gmail.com>

* fix: install missing libx11-dev and libxkbfile-dev

Signed-off-by: dankeboy36 <dankeboy36@gmail.com>

* fix: pick better GH step name

Signed-off-by: dankeboy36 <dankeboy36@gmail.com>

* fix: install the required dependencies on Linux

Signed-off-by: dankeboy36 <dankeboy36@gmail.com>

* fix(revert): do not manually install deps on Linux

Signed-off-by: dankeboy36 <dankeboy36@gmail.com>

* chore: pin `ubuntu-22.04` for linux actions

* fix: restore accidentally removed dispose on finally

Signed-off-by: dankeboy36 <dankeboy36@gmail.com>

* fix(test): align mock naming 💄

Signed-off-by: dankeboy36 <dankeboy36@gmail.com>

* fix: let the ino contribution notify the LS

+ event emitter dispatches the new state.

Signed-off-by: dankeboy36 <dankeboy36@gmail.com>

* fix(test): emit the new compiler summary state

Signed-off-by: dankeboy36 <dankeboy36@gmail.com>

* chore(revert): unpin linux version, use latest

revert of b11bde1c47

Signed-off-by: dankeboy36 <dankeboy36@gmail.com>

---------

Signed-off-by: dankeboy36 <dankeboy36@gmail.com>
Co-authored-by: Giacomo Cusinato <7659518+giacomocusinato@users.noreply.github.com>
2025-03-10 15:20:22 +07:00
Per Tillisch
6d96e227eb Bump built-in example sketches version to 1.10.2
The Arduino IDE installation includes a collection of example sketches demonstrating fundamental concepts.

These examples are hosted in a dedicated repository, which is a dependency of this project. A new release has been made
in that `arduino/arduino-examples` repository.

The infrastructure for downloading the examples during the Arduino IDE build is hereby updated to use the latest release
of the `arduino/arduino-examples` repository.
2025-02-28 06:56:33 -08:00
dankeboy36
1712f9ea9d fix: install missing linux dependencies
Install `libx11-dev`, `libxkbfile-dev`, `libsecret-1-dev` libraries as the most recent update to ubuntu-latest does not include them
Signed-off-by: dankeboy36 <dankeboy36@gmail.com>
2025-02-28 19:15:04 +07:00
Giacomo Cusinato
6eef09efd8 chore: switch to version 2.3.5 after the release (#2587)
To produce a correctly versioned nightly build.
See the [docs](1b9c7e93e0/docs/internal/release-procedure.md (7-%EF%B8%8F-bump-version-metadata-of-packages)) for more details.
2024-12-03 13:21:25 +01:00
github-actions[bot]
1112057979 Updated translation files (#2523)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2024-12-02 16:02:58 +01:00
Giacomo Cusinato
8e18c47d30 feat: use dompurify to sanitize translations
Pin same version of `dompurify` used in Theia
2024-12-02 15:21:22 +01:00
Giacomo Cusinato
4788bfbc3f feat: introduce VersionWelcomeDialog
Show donate dialog after the first time a first IDE version is loaded
2024-12-02 15:21:22 +01:00
Giacomo Cusinato
71b11ed829 feat: add donate footer to updater dialog 2024-12-02 15:21:22 +01:00
dependabot[bot]
3aedafa306 build(deps): Bump docker/build-push-action from 5 to 6
Bumps [docker/build-push-action](https://github.com/docker/build-push-action) from 5 to 6.
- [Release notes](https://github.com/docker/build-push-action/releases)
- [Commits](https://github.com/docker/build-push-action/compare/v5...v6)

---
updated-dependencies:
- dependency-name: docker/build-push-action
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-11-29 01:38:27 -08:00
dependabot[bot]
284dd83d7d build(deps): Bump peter-evans/create-pull-request from 5 to 7
Bumps [peter-evans/create-pull-request](https://github.com/peter-evans/create-pull-request) from 5 to 7.
- [Release notes](https://github.com/peter-evans/create-pull-request/releases)
- [Commits](https://github.com/peter-evans/create-pull-request/compare/v5...v7)

---
updated-dependencies:
- dependency-name: peter-evans/create-pull-request
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-11-29 00:05:37 -08:00
per1234
c09b5f718a Use Ubuntu 18.10 in Linux build container
Background
==========

Shared Library Dependencies
---------------------------

The Linux build of Arduino IDE has dynamic linkage against the libstdc++ and glibc shared libraries. This results in
it having a dependency on the version of the libraries that happens to be present in the environment it is built in.

Although newer versions of the shared libraries are compatible with executables linked against an older version, the
reverse is not true. This means that building Arduino IDE on a Linux machine with a recent distro version installed
causes the IDE to error on startup for users who have a distro with older versions of the dependencies.

For example, if Arduino IDE were built on a machine with version 3.4.33 of libstdc++, then attempting to run it on a
machine with an older version of libstdc++ would fail with an error like:

```
Error: /usr/lib/x86_64-linux-gnu/libstdc++.so.6: version `GLIBCXX_3.4.33' not found (required by /home/foo/arduino-ide/resources/app/lib/backend/native/nsfw.node)
```

Likewise,  if Arduino IDE were built on a machine with version 2.39 of glibc, then attempting to run it on a machine
with an older version of glibc would fail with an error like:

```
Error: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.39' not found (required by /home/foo/arduino-ide/resources/app/node_modules/nsfw/build/Release/nsfw.node)
```

Build Machine Requirements
--------------------------

The IDE builds distributed by Arduino should be compatible with a reasonable range of Linux distribution versions. In
order to achieve this, the builds must be performed in a machine with an older version of the shared libraries. The
shared libraries are part of the Linux distro, and installing a different version is not feasible. So this imposes a
maximum limit on the build machine's distro version.

The distributed builds are generated via a GitHub Actions workflow. The most simple approach is to run the build in the
machine of the GitHub-hosted runners provided for each operating system. However, GitHub provides a limited range of
operating system versions in their runners, and removes the older versions as newer versions are added. This means that
building in the GitHub-hosted runner machine would not allow for the desired range of Linux distro version
compatibility. For this reason, the Linux build is performed in a Docker container that provides an older version of
Ubuntu.

The same situation of incompatibility with Linux distro versions that have a version of the shared library dependencies
older than the version present on the build machine occurs for several of the tools and frameworks used by the build
process (e.g., Node.js, Python). In this case, the tables are turned as we are now the user rather than the distributor
and so are at the mercy of the Linux distro version compatibility range provided by the distributor. So this imposes a
minimum limit on the build machine's distro version.

Although several of the dependencies used by the standard build system have dependencies on versions of glibc higher
than the version 2.27 present in Ubuntu 18.04, it was possible to use this distro version in the Linux build container
by using alternative distributions and/or versions of these dependencies.

Workflow Artifacts
------------------

The build workflow uses GitHub actions workflow artifacts to transfer the files generated by the build job to subsequent
jobs in the workflow. The "actions/upload-artifact" action is used for this purpose.

Problem
=======

GitHub is dropping support for the workflow artifacts produced by the version 3.x of the "actions/upload-artifact"
action that was previously used by the build job. So the action version used in the build workflow was updated to the
current version 4.x. This version of the action uses a newer version of the Node.js runtime (20). Unfortunately the the
Node.js 20 runtime used by the action has a dependency on glibc version 2.28, which causes the Linux build job to fail
after the update of the "actions/upload-artifact" action:

```
Run actions/upload-artifact@v4
/__e/node20/bin/node: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.28' not found (required by /__e/node20/bin/node)
```

Unlike the other dependencies of the build process, it is no longer possible to work around this incompatibility by
continuing to use the older compatible version of the "actions/upload-artifact" action. It is also impossible to replace
the incompatible Node.js 20.x distribution used by the action, since it comes from the read-only file system of the
runner image. Likewise, it is not possible to configure or force the action to use a Node.js installation at a different
path on the runner machine.

Resolution
==========

Compatibility with the new version of the "actions/upload-artifact" action is attained by updating the version of Linux
in the build container to 18.10, which is the oldest version that has glibc 2.28. The presence of a newer glibc version
in the container also makes it compatible with several other dependencies of the build process, meaning the code in the
Dockerfile and workflow for working around the incompatibilities of Ubuntu 18.04 can be removed.

Consequences
============

Unfortunately this means the loss of compatibility of the Linux Arduino IDE builds with distros that use glibc 2.27
(e.g., Ubuntu 18.04). User of those distros will now find that Arduino IDE fails to start with an error like:

```
Error: node-loader:
Error: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.28' not found (required by /home/foo/arduino-ide/resources/app/lib/backend/native/pty.node)
    at 85467 (/home/foo/arduino-ide/resources/app/lib/backend/main.js:2:2766)
    at __webpack_require__ (/home/foo/arduino-ide/resources/app/lib/backend/main.js:2:6663105)
    at 23571 (/home/foo/arduino-ide/resources/app/lib/backend/main.js:2:3374073)
    at __webpack_require__ (/home/foo/arduino-ide/resources/app/lib/backend/main.js:2:6663105)
    at 55444 (/home/foo/arduino-ide/resources/app/lib/backend/main.js:2:3369761)
    at __webpack_require__ (/home/foo/arduino-ide/resources/app/lib/backend/main.js:2:6663105)
    at 24290 (/home/foo/arduino-ide/resources/app/lib/backend/main.js:2:1780542)
    at __webpack_require__ (/home/foo/arduino-ide/resources/app/lib/backend/main.js:2:6663105)
    at 43416 (/home/foo/arduino-ide/resources/app/lib/backend/main.js:2:1770138)
    at __webpack_require__ (/home/foo/arduino-ide/resources/app/lib/backend/main.js:2:6663105)
```
2024-11-27 06:58:10 -08:00
per1234
dba57b312c Don't upload multiple times to same artifact in build workflow
The build workflow produces binaries for a range of target hosts. This is done by using a job matrix in the GitHub
Actions workflow that produces each build in a parallel job. GitHub Actions workflow artifacts are used to transfer the
generated files between sequential jobs in the workflow. The "actions/upload-artifact" action is used for this purpose.

Previously, a single artifact was used for this purpose, with each of the parallel jobs uploading its own generated
files to that artifact. However, support for uploading multiple times to a single artifact was dropped in version 4.0.0
of the "actions/upload-artifact" action. So it is now necessary to use a dedicated artifact for each of the builds.
These can be downloaded in aggregate by using the artifact name globbing and merging features which were introduced in
version 4.1.0 of the "actions/download-artifact" action.
2024-11-27 06:58:10 -08:00
per1234
90d3d77ca4 Don't upload multiple times to same artifact in label sync workflow
The "Sync Labels" GitHub Actions workflow is configured to allow the use of multiple shared label configuration files.
This is done by using a job matrix in the GitHub Actions workflow to download each of the files from the source
repository in a parallel GitHub Actions workflow job. A GitHub Actions workflow artifact was used to transfer the
generated files between sequential jobs in the workflow. The "actions/upload-artifact" and "actions/download-artifact"
actions are used for this purpose.

Previously, a single artifact was used for the transfer of all the shared label configuration files, with each of the
parallel jobs uploading its own generated files to that artifact. However, support for uploading multiple times to a
single artifact was dropped in version 4.0.0 of the "actions/upload-artifact" action. So it is now necessary to use a
dedicated artifact for each of the builds. These can be downloaded in aggregate by using the artifact name globbing and
merging features which were introduced in version 4.1.0 of the "actions/download-artifact" action.
2024-11-27 06:58:10 -08:00
dependabot[bot]
0aec778e84 build(deps): Bump geekyeggo/delete-artifact from 2 to 5
Bumps [geekyeggo/delete-artifact](https://github.com/geekyeggo/delete-artifact) from 2 to 5.
- [Release notes](https://github.com/geekyeggo/delete-artifact/releases)
- [Changelog](https://github.com/GeekyEggo/delete-artifact/blob/main/CHANGELOG.md)
- [Commits](https://github.com/geekyeggo/delete-artifact/compare/v2...v5)

---
updated-dependencies:
- dependency-name: geekyeggo/delete-artifact
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-11-27 06:58:10 -08:00
dependabot[bot]
84d2dfd13e build(deps): Bump actions/download-artifact from 3 to 4
Bumps [actions/download-artifact](https://github.com/actions/download-artifact) from 3 to 4.
- [Release notes](https://github.com/actions/download-artifact/releases)
- [Commits](https://github.com/actions/download-artifact/compare/v3...v4)

---
updated-dependencies:
- dependency-name: actions/download-artifact
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-11-27 06:58:10 -08:00
dependabot[bot]
86c7fd7b59 build(deps): Bump actions/upload-artifact from 3 to 4
Bumps [actions/upload-artifact](https://github.com/actions/upload-artifact) from 3 to 4.
- [Release notes](https://github.com/actions/upload-artifact/releases)
- [Commits](https://github.com/actions/upload-artifact/compare/v3...v4)

---
updated-dependencies:
- dependency-name: actions/upload-artifact
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-11-27 06:58:10 -08:00
Giacomo Cusinato
de265694ee feat: use Arduino CLI v1.1.1 2024-11-27 14:05:16 +01:00
Giacomo Cusinato
8462d8a391 refactor: generate-protocol now fetch proto files from arduino_cli_{version}_proto.zip
- Use the CLI release proto.zip to get proto files for production versions of CLI
- Extract the proto files from repo if CLI version is declared as `commitsh` or version is 1.1.0

See https://github.com/arduino/arduino-cli/pull/2761
2024-11-27 14:05:16 +01:00
dankeboy36
48d6d37539 feat: can skip verify before upload
Adds a new preference to control whether the
verify command should automatically run before the
upload. If the `arduino.upload.autoVerify` setting
value is `false`, IDE does not recompile the
sketch code before uploading it to the board.

Signed-off-by: dankeboy36 <dankeboy36@gmail.com>
2024-11-26 21:41:48 +01:00
Giacomo Cusinato
d1065886ef feat: use Arduino CLI 1.1.0 2024-11-21 14:21:30 +01:00
Giacomo Cusinato
8773bd67ab fix: use missing google proto files in CLI 2024-11-21 14:21:30 +01:00
Giacomo Cusinato
4189b086de fix: update yarn.lock 2024-11-21 10:44:20 +01:00
dankeboy36
3fc8474d71 fix: align viewsWelcome behavior to VS Code (#2543)
* fix: align `viewsWelcome` behavior to VS Code

Ref: eclipse-theia/theia#14309
Signed-off-by: dankeboy36 <dankeboy36@gmail.com>

* fix: update change proposal from Theia as is

Ref: arduino/arduino-ide#2543
Signed-off-by: dankeboy36 <dankeboy36@gmail.com>

---------

Signed-off-by: dankeboy36 <dankeboy36@gmail.com>
2024-11-21 08:43:04 +01:00
Giacomo Cusinato
4cf9909a07 fix: retry compilation if grpc client needs to be reinitialized (#2548)
* fix: use `Status` enum for status code in `ServiceError` type guards

This change resolves the issue where the intersection of `ServiceError` error codes of type `number` resulted in the `never` type due to conflict between number and `State` enum if `StatusObject`

* feat: add `isInvalidArgument` type guard to `ServiceError`

* fix: retry compilation if grpc client needs to be reinitialized

See https://github.com/arduino/arduino-ide/issues/2547
2024-11-21 08:42:14 +01:00
Giacomo Cusinato
41844c9470 feat: implement menu action to reload current board data (#2553) 2024-11-21 08:41:26 +01:00
Giacomo Cusinato
7c231fff76 fix: memory leak when scanning sketchbooks with large files (#2555)
Resolves https://github.com/arduino/arduino-ide/issues/2537

Fix memory leak issue caused by inflight dependency, see https://github.com/isaacs/node-glob/issues/435
2024-11-21 08:40:52 +01:00
dependabot[bot]
d6235f0a0c build(deps): Bump svenstaro/upload-release-action from 2.7.0 to 2.9.0
Bumps [svenstaro/upload-release-action](https://github.com/svenstaro/upload-release-action) from 2.7.0 to 2.9.0.
- [Release notes](https://github.com/svenstaro/upload-release-action/releases)
- [Changelog](https://github.com/svenstaro/upload-release-action/blob/master/CHANGELOG.md)
- [Commits](https://github.com/svenstaro/upload-release-action/compare/2.7.0...2.9.0)

---
updated-dependencies:
- dependency-name: svenstaro/upload-release-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-11-19 04:04:35 -08:00
per1234
d377d00042 Use appropriate equality operator in changelog script
It is considered good practice to use JavaScript's type-safe strict equality operator === instead of the equality
operator ==. Compliance with this practice is enforced by the project's ESLint configuration, via the "eqeqeq" rule.

The script used to generate the changelog for Arduino IDE's auto-update dialog contained an inappropriate usage of the
equality operator. This caused linting runs to fail:

arduino-ide-extension/scripts/compose-changelog.js
  37:19  error  Expected '===' and instead saw '=='  eqeqeq
2024-11-19 03:53:36 -08:00
per1234
f232010bec Correct eslint command in lint script
The `lint` script of the "arduino-ide-extension" package is intended to use the ESLint linter tool to check for problems
in all the package's JavaScript and TypeScript code files. It is used by the continuous integration system to validate
contributions.

Previously, the command invoked `eslint` without any arguments. With the 8.x version of ESLint used by the project, it
is necessary to provide a path argument in order to cause it to lint the contents of files. Because that argument was
not provided, the script didn't do anything at all and so would return a 0 exit status even if the code had linting rule
violations.

This is fixed by adding a `.` path argument to the command invoked by the script. This will cause ESLint to recurse
through the `arduino-ide-extension` folder and lint the code in all relevant files.
2024-11-19 03:53:36 -08:00
per1234
788017bb99 Use a dedicated GitHub workflow to check for problems with Yarn configuration
The "build" workflow builds the application for all supported targets, generates workflow artifacts from which the
builds can be downloaded by users and beta testers, and publishes nightly and production releases.

As if that wasn't enough, the workflow was also configured to check the sync of the Yarn lockfile.

This monolithic approach is harmful for multiple reasons:

* Makes it difficult to interpret a failed workflow run
* Makes the build workflow more difficult to maintain
* Increases the turnaround time for contributors and maintainers to get feedback from the CI system

The sync check operation is hereby moved to a dedicated workflow, consistent with standard practices for Arduino Tooling
projects.
2024-11-18 06:57:16 -08:00
per1234
9331d2ec0d Use a dedicated GitHub Actions workflow for testing TypeScript/JavaScript code
The "build" workflow builds the application for all supported targets, generates workflow artifacts from which the
builds can be downloaded by users and beta testers, and publishes nightly and production releases.

As if that wasn't enough, the workflow was also configured to perform the unrelated operation of running the project's
test suites.

This monolithic approach is harmful for multiple reasons:

* Makes it difficult to interpret a failed workflow run
* Unnecessarily adds a significant amount of extra content to the already extensive logs produced by the build process
* Makes the build workflow more difficult to maintain
* Increases the length of a build workflow run
* Increases the impact of a spurious failure
* Increases the turnaround time for contributors and maintainers to get feedback from the CI system

The test run operation is hereby moved to a dedicated workflow, consistent with standard practices for Arduino Tooling
projects.
2024-11-18 06:57:16 -08:00
per1234
6e695429cc Use a dedicated GitHub Actions workflow for linting TypeScript/JavaScript code
The "build" workflow builds the application for all supported targets, generates workflow artifacts from which the
builds can be downloaded by users and beta testers, and publishes nightly and production releases.

As if that wasn't enough, the workflow was also configured to perform the unrelated operation of linting the project's
TypeScript and JavaScript code.

This monolithic approach is harmful for multiple reasons:

* Makes it difficult to interpret a failed workflow run
* Unnecessarily adds a significant amount of extra content to the already extensive logs produced by the build process
* Makes the build workflow more difficult to maintain
* Increases the length of a build workflow run
* Increases the impact of a spurious failure
* Increases the turnaround time for contributors and maintainers to get feedback from the CI system

The linting operation is hereby moved to a dedicated workflow, consistent with standard practices for Arduino Tooling
projects.
2024-11-18 06:57:16 -08:00
per1234
4f8b9800a0 Remove redundant signing determination code from build system
The "build" workflow signs the macOS and Windows builds of the application. The signing process relies on access to GitHub Actions
secrets. For this reason, the workflow is configured to only sign the builds when it has access to GitHub Actions
secrets to avoid spurious failures of the workflow that would otherwise be caused by signing failure.

A flexible general purpose system for determining whether to attempt signing of a build was established years ago. However, a redundant system was added specific to the Windows build instead of using the existing system.

The redundant system is hereby removed. This makes the workflow easier to understand and maintain.
2024-11-17 22:00:34 -08:00
per1234
f72d1f0ac8 Use appropriate indicator for Windows signing determination in build workflow
The "build" workflow signs the Windows builds of the application. The signing process relies on access to GitHub Actions
secrets. For this reason, the workflow is configured to only sign the builds when it has access to GitHub Actions
secrets to avoid spurious failures of the workflow that would otherwise be caused by signing failure.

Previously the signing was determined based on the value of the `github.event.pull_request.head.repo.fork` context item.
That was effective for the use case of the workflow being triggered by a pull request from a fork (for security reasons,
GitHub Actions does not give access to secrets under these conditions).

However, there is another context under which the workflow might run without access to the signing secrets, for which
the use of context item is not appropriate. It is important to support the use of the workflow in forks of the
repository. In addition to the possible value to hard forked projects, this is essential to allow conscientious
contributors to test contributions to the build and release system in their own fork prior to submitting a pull request.
The previous configuration would cause a workflow run performed by a contributor in a fork to attempt to sign the
Windows build. Unless the contributor had set up the ridiculously complex infrastructure required to perform the signing
for the Windows build, which is utterly infeasible, this would cause the workflow to fail spuriously.

The appropriate approach, which has been the established convention in the rest of the workflow code, is to use the
secret itself when determining whether to attempt the signing process. If the secret is not defined (resulting in it
having an empty string value), then the signing should be skipped. If it is defined, then the signing should be
performed.
2024-11-17 22:00:34 -08:00
per1234
0fe0feace4 Get job-specific configuration from matrix in build workflow
The "build" workflow builds the application for a range of target hosts. This is done by using a job matrix. A separate
parallel job runs for each target. The target-specific configuration data is defined in the job matrix array.

This configuration data includes the information related to the code signing certificates. Inexplicably, during the work
to add support for signing the Windows builds with an "eToken" hardware authentication device, this data was not used
for the Windows code signing configuration. Instead the certificate data was redundantly hardcoded into the workflow
code.

The Windows code signing certificate configuration is hereby changed to use the established flexible job configuration
data system. This makes the workflow easier to understand and maintain.
2024-11-17 20:18:52 -08:00
per1234
43f0ccb250 Use appropriate indicator for dependency installation conditionals in build workflow
The Windows builds of the application are cryptographically signed. The signing requires an "eToken" hardware
authentication device be connected to the machine performing the signing. This means that it is necessary to use a
self-hosted GitHub Actions runner for the Windows job of the build workflow rather than the runners hosted by GitHub.

There are some unique characteristics of the self-hosted runner which the workflow code must accommodate. One of these
is that, rather than installing dependencies of the build process during the workflow run as is done for the
GitHub-hosted runners, the dependencies are preinstalled in the self-hosted runner machine. So the dependency
installation steps must be configured so that they will be skipped when the job is running on the self-hosted runner.

This is done by adding a conditional to the steps. Previously the conditional was based on the value of the `runner.os`
context item. This is not an appropriate indicator of the job running on the self-hosted runner because `runner.os` will
have the same value if the job was running on a GitHub-hosted Windows runner. That might seem like only a hypothetical
problem since the workflow does not use a GitHub-hosted Windows runner. However, it is important to support the use of
the workflow in forks of the repository. In addition to the possible value to hard forked projects, this is essential to
allow conscientious contributors to test contributions to the build and release system in their own fork prior to
submitting a pull request.

The conditionals are changed to use the more appropriate indicator of the specific name of the self-hosted Windows
runner (via the `runner.name` context item).
2024-11-17 03:15:42 -08:00
per1234
c0b0b84d79 Simplify and generalize configurable working directory code in build workflow
The Windows builds of the application are cryptographically signed. The signing requires an "eToken" hardware
authentication device be connected to the machine performing the signing. This means that it is necessary to use a
self-hosted GitHub Actions runner for the Windows job of the build workflow rather than the runners hosted by GitHub.

There are some unique characteristics of the self-hosted runner which the workflow code must accommodate. The default
working directory of the self-hosted runner is not suitable to perform the build under because the the resulting folder
structure produced paths that exceeded the ridiculously small maximum path length of Windows. So the workflow must be
configured to use a custom working directory with a short path (`C:\a`).

This custom working directory must be used only for the job running on the self-hosted Windows runner so the working
directory of the relevant workflow steps are configured using a ternary expression. Previously, this expression had
multiple conditions:

* the value of the `runner.os` context item
* the definition of a custom working directory value in the job matrix

The second condition is entirely sufficient. The use of the first condition only added unnecessary complexity to the
workflow code, and imposed a pointless limitation of only allowing the use of the custom working directory system on
Windows runners.

Removing the unnecessary condition makes the workflow easier to understand and maintain, and makes it possible to
configure any job to use a custom working directory if necessary.
2024-11-17 02:15:21 -08:00
per1234
3d82cb3525 Add PAID_RUNNER_BUILD_DATA environment variable back to build workflow
The build workflow produces builds for a range of target host architectures, including macOS Apple Silicon. This is done
by running a native build in a machine of the target architecture.

At the time the support for producing Apple Silicon builds was added to the workflow, use of GitHub-hosted Apple Silicon
runner machines was charged by the minute (while use of the other runners is free). In order to avoid excessive
expenses, the workflow was configured so that the Apple Silicon builds were only produced when absolutely necessary.
This was done by defining two sets of job matrix arrays, one for jobs using free runners, and the other for jobs using
paid runners. Due to the limitations of the GitHub Actions framework, it was necessary to use workflow environment
variables for this purpose.

Since that time, GitHub made free GitHub-hosted Apple Silicon runners available. When the workflow was adjusted to use
that runner, the configuration for the Apple Silicon build job was moved to the free runner job matrix array. The system
for supporting selective use of paid GitHub-hosted runners to produce builds was not removed at that time. This is
reasonable since it is possible the need will arise for using paid runners at some point in the future (e.g., only
legacy older versions of free macOS "Intel" runners are now provided and it is likely that even these will eventually be
phased out forcing us to use the paid runner to produce builds for that target). However, the environment variable for
the paid runner job matrix array data was removed. The absence of that variable made it very difficult to understand the
workflow code for the system.

For this reason, the environment variable is replaced, but empty of data. A comment is added to explain the reason for
this.
2024-11-17 00:54:17 -08:00
per1234
9cbee0eacf Trim trailing whitespace in build workflow 2024-11-17 00:54:17 -08:00
Giacomo Cusinato
63e9dfd7f5 fix: disable local windows signing for forks PR
Resolves https://github.com/arduino/arduino-ide/issues/2545
2024-11-11 14:53:42 +01:00
dankeboy36
3ccc864453 fix(doc): add missing prerequisites to dev docs (#2531)
Document prerequisites of the Arduino CLI, LS, etc. tools when built
from a Git commitish.

---------

Signed-off-by: dankeboy36 <dankeboy36@gmail.com>
Co-authored-by: per1234 <accounts@perglass.com>
2024-10-26 17:15:23 -07:00
Dave Simpson
44f15238d6 chore: switch to version 2.3.4 after the release (#2514) 2024-10-24 09:26:49 +02:00
Giacomo Cusinato
4a3abf542c fix: prevent parsing CLI errors without metadata
When parsing a CLI error, check if any metadata from grpc is present before trying to parse it.
Closes #2516
2024-10-22 09:06:28 -07:00
per1234
91bb75ca97 Bump version metadata post release
On every startup, Arduino IDE checks for new versions of the IDE. If a newer version is available, a notification/dialog
is shown offering an update.

"Newer" is determined by comparing the version of the user's IDE to the latest available version on the update channel.
This comparison is done according to the Semantic Versioning Specification ("SemVer").

In order to facilitate beta testing, builds are generated of the Arduino IDE at the current stage in development. These
builds are given an identifying version of the following form:

- <version>-snapshot-<short hash> - builds generated for every push and pull request that modifies relevant files
- <version>-nightly-<YYYYMMDD> - daily builds of the tip of the default branch

In order to cause these builds to be correctly considered "newer" than the release version, the version metadata must be
bumped immediately following each release.

This will also serve as the metadata bump for the next release in the event that release is a minor release. In case it
is instead a minor or major release, the version metadata will need to be updated once more before the release tag is
created.
2024-10-22 07:52:48 -07:00
Dave Simpson
77136687d3 Use macos-latest runner for macOS ARM build (#2513) 2024-09-24 18:30:58 +02:00
github-actions[bot]
16bc1a4610 Updated translation files (#2392)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2024-09-24 17:05:43 +02:00
Dave Simpson
2921979678 Use macos-13 for Intel build (#2508) 2024-09-24 15:59:16 +02:00
Giacomo Cusinato
a5bf56ffa6 feat: upload using programmer by default if board requires it 2024-09-19 11:57:42 +02:00
Giacomo Cusinato
2de8bd1717 feat: decode grpc status objects and map them to protocol types
Status object thrown by grpc commands contains metadata that needs to be serialized in order to map it to custom errors generated through proto files https://github.com/grpc/grpc-web/issues/399
2024-09-19 11:57:42 +02:00
Giacomo Cusinato
1ec0a8cc77 feat: use Arduino CLI 1.0.4 (#2457)
* fix: use `@pingghost/protoc` to compile proto files

The npm package previously used (`protoc`) is still lacking apple arm32 support, see https://github.com/YePpHa/node-protoc/pull/10

* feat: use Arduino CLI 1.0.4

* fix: allow use of node16 in github actions

* chore: update `arduino-language-server` version for cli-1.0.0

* fix: deprecated platform order test

Arduino deprecated platforms should have more priority then other deprecated ones
2024-09-06 11:38:55 +02:00
Giacomo Cusinato
c3adde5460 feat: add shared space support (#2486) 2024-09-06 10:29:31 +02:00
Dave Simpson
2e78e96b75 [chore] Update Windows signing Cert to eToken (#2452) 2024-07-03 09:42:10 +02:00
143 changed files with 17396 additions and 3219 deletions

View File

@@ -14,6 +14,7 @@ module.exports = {
'.browser_modules/*',
'docs/*',
'scripts/*',
'browser-app/*',
'electron-app/lib/*',
'electron-app/src-gen/*',
'electron-app/gen-webpack*.js',

View File

@@ -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"

View File

@@ -40,7 +40,7 @@ on:
- Push Container Images
branches:
- main
types:
types:
- completed
env:
@@ -48,28 +48,38 @@ env:
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:
@@ -187,7 +203,7 @@ jobs:
echo "is-nightly=$is_nightly" >> $GITHUB_OUTPUT
echo "channel-name=$channel_name" >> $GITHUB_OUTPUT
# Only attempt upload to Amazon S3 if the credentials are available.
echo "publish-to-s3=${{ secrets.AWS_SECRET_ACCESS_KEY != '' }}" >> $GITHUB_OUTPUT
echo "publish-to-s3=${{ secrets.AWS_ROLE_ARN != '' }}" >> $GITHUB_OUTPUT
select-targets:
needs: build-type-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"
@@ -270,6 +286,15 @@ jobs:
env:
# 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,76 +308,66 @@ 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 }}
AC_USERNAME: ${{ secrets.AC_USERNAME }}
AC_PASSWORD: ${{ secrets.AC_PASSWORD }}
AC_TEAM_ID: ${{ secrets.AC_TEAM_ID }}
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
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 +377,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 +390,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 +403,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 +441,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 +481,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 +496,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 +557,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,22 +580,33 @@ 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
environment: production
permissions:
id-token: write
contents: read
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: Configure AWS Credentials for Nightly [S3]
uses: aws-actions/configure-aws-credentials@v4
with:
role-to-assume: ${{ secrets.AWS_ROLE_ARN }}
aws-region: us-east-1
- name: Publish Nightly [S3]
uses: docker://plugins/s3
env:
PLUGIN_SOURCE: '${{ env.JOB_TRANSFER_ARTIFACT }}/*'
PLUGIN_STRIP_PREFIX: '${{ env.JOB_TRANSFER_ARTIFACT }}/'
PLUGIN_TARGET: '/arduino-ide/nightly'
PLUGIN_BUCKET: ${{ secrets.DOWNLOADS_BUCKET }}
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
run: |
aws s3 sync ${{ env.ARTIFACTS_FOLDER }} s3://${{ secrets.DOWNLOADS_BUCKET }}/arduino-ide/nightly
release:
needs:
@@ -590,12 +623,23 @@ jobs:
needs.changelog.result == 'success' &&
needs.build-type-determination.outputs.is-release == 'true'
runs-on: ubuntu-latest
env:
ARTIFACTS_FOLDER: build-artifacts
environment: production
permissions:
id-token: write
contents: read
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,25 +647,26 @@ 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 }}
- name: Configure AWS Credentials for Release [S3]
if: needs.build-type-determination.outputs.publish-to-s3 == 'true'
uses: aws-actions/configure-aws-credentials@v4
with:
role-to-assume: ${{ secrets.AWS_ROLE_ARN }}
aws-region: us-east-1
- name: Publish Release [S3]
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_TARGET: '/arduino-ide'
PLUGIN_BUCKET: ${{ secrets.DOWNLOADS_BUCKET }}
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
run: |
aws s3 sync ${{ env.ARTIFACTS_FOLDER }} s3://${{ secrets.DOWNLOADS_BUCKET }}/arduino-ide
clean:
# This job must run after all jobs that use the transfer artifact.
@@ -635,7 +680,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 }}*

View File

@@ -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))"

View File

@@ -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 }}

View File

@@ -76,6 +76,12 @@ jobs:
repo-token: ${{ secrets.GITHUB_TOKEN }}
version: 3.x
- name: Install dependencies (Linux only)
if: runner.os == 'Linux'
run: |
sudo apt-get update
sudo apt-get install -y libx11-dev libxkbfile-dev libsecret-1-dev
- name: Install dependencies
run: yarn install --immutable
env:

94
.github/workflows/check-javascript.yml vendored Normal file
View File

@@ -0,0 +1,94 @@
# 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 Dependencies (Linux only)
if: runner.os == 'Linux'
run: |
sudo apt-get update
sudo apt-get install -y libx11-dev libxkbfile-dev libsecret-1-dev
- 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

97
.github/workflows/check-yarn.yml vendored Normal file
View File

@@ -0,0 +1,97 @@
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 Dependencies (Linux only)
if: runner.os == 'Linux'
run: |
sudo apt-get update
sudo apt-get install -y libx11-dev libxkbfile-dev libsecret-1-dev
- 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"

View File

@@ -14,6 +14,11 @@ jobs:
create-changelog:
if: github.repository == 'arduino/arduino-ide'
runs-on: ubuntu-latest
permissions:
id-token: write
contents: read
environment: production
steps:
- name: Checkout
uses: actions/checkout@v4
@@ -44,12 +49,12 @@ jobs:
# Compose changelog
yarn run compose-changelog "${{ github.workspace }}/${{ env.CHANGELOG_ARTIFACTS }}/$CHANGELOG_FILE_NAME"
- name: Configure AWS Credentials for Changelog [S3]
uses: aws-actions/configure-aws-credentials@v4
with:
role-to-assume: ${{ secrets.AWS_ROLE_ARN }}
aws-region: us-east-1
- name: Publish Changelog [S3]
uses: docker://plugins/s3
env:
PLUGIN_SOURCE: '${{ env.CHANGELOG_ARTIFACTS }}/*'
PLUGIN_STRIP_PREFIX: '${{ env.CHANGELOG_ARTIFACTS }}/'
PLUGIN_TARGET: '/arduino-ide/changelog'
PLUGIN_BUCKET: ${{ secrets.DOWNLOADS_BUCKET }}
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
run: |
aws s3 sync ${{ env.CHANGELOG_ARTIFACTS }} s3://${{ secrets.DOWNLOADS_BUCKET }}/arduino-ide/changelog

View File

@@ -34,6 +34,12 @@ jobs:
repo-token: ${{ secrets.GITHUB_TOKEN }}
version: 3.x
- name: Install dependencies (Linux only)
if: runner.os == 'Linux'
run: |
sudo apt-get update
sudo apt-get install -y libx11-dev libxkbfile-dev libsecret-1-dev
- name: Install dependencies
run: yarn install --immutable

View File

@@ -34,6 +34,12 @@ jobs:
repo-token: ${{ secrets.GITHUB_TOKEN }}
version: 3.x
- name: Install dependencies (Linux only)
if: runner.os == 'Linux'
run: |
sudo apt-get update
sudo apt-get install -y libx11-dev libxkbfile-dev libsecret-1-dev
- name: Install dependencies
run: yarn install --immutable
@@ -46,7 +52,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

View File

@@ -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 }}

View File

@@ -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: |

140
.github/workflows/test-javascript.yml vendored Normal file
View File

@@ -0,0 +1,140 @@
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 Dependencies (Linux only)
if: runner.os == 'Linux'
run: |
sudo apt-get update
sudo apt-get install -y libx11-dev libxkbfile-dev libsecret-1-dev
- 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

View File

@@ -36,6 +36,12 @@ jobs:
repo-token: ${{ secrets.GITHUB_TOKEN }}
version: 3.x
- name: Install dependencies (Linux only)
if: runner.os == 'Linux'
run: |
sudo apt-get update
sudo apt-get install -y libx11-dev libxkbfile-dev libsecret-1-dev
- name: Install dependencies
run: yarn install --immutable
@@ -55,7 +61,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

1
.nvmrc Normal file
View File

@@ -0,0 +1 @@
18

31
.vscode/launch.json vendored
View File

@@ -80,6 +80,37 @@
"port": 9222,
"webRoot": "${workspaceFolder}/electron-app"
},
{
"type": "node",
"request": "launch",
"name": "App (Browser)",
"program": "${workspaceRoot}/browser-app/src-gen/backend/main.js",
"args": [
"--hostname=0.0.0.0",
"--port=3000",
"--no-cluster",
"--no-app-auto-install",
"--plugins=local-dir:plugins"
],
"windows": {
"env": {
"NODE_ENV": "development",
"NODE_PRESERVE_SYMLINKS": "1"
}
},
"env": {
"NODE_ENV": "development"
},
"sourceMaps": true,
"outFiles": [
"${workspaceRoot}/browser-app/src-gen/backend/*.js",
"${workspaceRoot}/browser-app/lib/**/*.js",
"${workspaceRoot}/arduino-ide-extension/lib/**/*.js"
],
"smartStep": true,
"internalConsoleOptions": "openOnSessionStart",
"outputCapture": "std"
},
{
"type": "node",
"request": "launch",

30
.vscode/tasks.json vendored
View File

@@ -15,6 +15,17 @@
"clear": false
}
},
{
"label": "Arduino IDE - Start Browser App",
"type": "shell",
"command": "yarn --cwd ./browser-app start",
"group": "build",
"presentation": {
"reveal": "always",
"panel": "new",
"clear": true
}
},
{
"label": "Watch Extension",
"type": "shell",
@@ -26,6 +37,17 @@
"clear": false
}
},
{
"label": "Arduino IDE - Watch Browser App",
"type": "shell",
"command": "yarn --cwd ./browser-app watch",
"group": "build",
"presentation": {
"reveal": "always",
"panel": "new",
"clear": false
}
},
{
"label": "Watch App",
"type": "shell",
@@ -37,6 +59,14 @@
"clear": false
}
},
{
"label": "Arduino IDE - Watch All [Browser]",
"type": "shell",
"dependsOn": [
"Arduino IDE - Watch IDE Extension",
"Arduino IDE - Watch Browser App"
]
},
{
"label": "Watch All",
"type": "shell",

View File

@@ -2,7 +2,9 @@
# Arduino IDE 2.x
[![Arduino IDE](https://github.com/arduino/arduino-ide/workflows/Arduino%20IDE/badge.svg)](https://github.com/arduino/arduino-ide/actions?query=workflow%3A%22Arduino+IDE%22)
[![Build status](https://github.com/arduino/arduino-ide/actions/workflows/build.yml/badge.svg)](https://github.com/arduino/arduino-ide/actions/workflows/build.yml)
[![Check JavaScript status](https://github.com/arduino/arduino-ide/actions/workflows/check-javascript.yml/badge.svg)](https://github.com/arduino/arduino-ide/actions/workflows/check-javascript.yml)
[![Test JavaScript status](https://github.com/arduino/arduino-ide/actions/workflows/test-javascript.yml/badge.svg)](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).

View File

@@ -1,6 +1,6 @@
{
"name": "arduino-ide-extension",
"version": "2.3.3",
"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,6 +67,7 @@
"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",
@@ -73,7 +75,7 @@
"fast-safe-stringify": "^2.1.1",
"filename-reserved-regex": "^2.0.0",
"fqbn": "^1.0.5",
"glob": "^7.1.6",
"glob": "10.4.4",
"google-protobuf": "^3.20.1",
"hash.js": "^1.1.7",
"is-online": "^10.0.0",
@@ -127,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": [
@@ -156,21 +158,13 @@
"frontend": "lib/browser/arduino-ide-frontend-module"
},
{
"frontend": "lib/browser/theia/core/browser-menu-module",
"frontendElectron": "lib/electron-browser/theia/core/electron-menu-module"
},
{
"frontendElectron": "lib/electron-browser/theia/core/electron-window-module"
},
{
"frontendElectron": "lib/electron-browser/electron-arduino-module"
},
{
"electronMain": "lib/electron-main/arduino-electron-main-module"
}
],
"arduino": {
"arduino-cli": {
"version": "0.36.0-rc.1"
"version": "1.1.1"
},
"arduino-fwuploader": {
"version": "2.4.1"
@@ -179,7 +173,7 @@
"version": {
"owner": "arduino",
"repo": "arduino-language-server",
"commitish": "91c2ba8"
"commitish": "05ec308"
}
},
"clangd": {

View File

@@ -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);
}

View File

@@ -1,7 +1,7 @@
// @ts-check
// The version to use.
const version = '1.10.1';
const version = '1.10.2';
(async () => {
const os = require('node:os');

View File

@@ -3,13 +3,15 @@
(async () => {
const os = require('node:os');
const path = require('node:path');
const { mkdirSync, promises: fs, rmSync } = 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,112 +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,
*/
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;
}
async function getProtosFromRepo(
commitish = '',
version = '',
owner = 'arduino',
repo = 'arduino-cli'
) {
const repoFolder = await fs.mkdtemp(path.join(os.tmpdir(), 'arduino-cli-'));
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.`);
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}`;
}
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,
});
exec(
'git',
['-C', repository, 'checkout', `tags/${version}`, '-b', version],
{ logStdout: 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')
);
console.log(`<<< Checked out tagged version: '${version}'.`);
} else if (commitish) {
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(
`>>> Checking out commitish from 'package.json': '${commitish}'...`
);
exec('git', ['-C', repository, 'checkout', commitish], { logStdout: true });
console.log(
`<<< Checked out commitish from 'package.json': '${commitish}'.`
`<<< 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) {
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.`);
protosFolder = await getProtosFromRepo(versionObject.Commit);
}
if (!protosFolder) {
console.log(`Could not get proto files: missing commitish or version.`);
process.exit(1);
}
const protos = await globProtos(protosFolder);
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:');
exec('git', ['-C', repository, 'rev-parse', '--abbrev-ref', 'HEAD'], {
logStdout: true,
});
const rpc = path.join(repository, 'rpc');
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 });
// rmSync(out, { recursive: true, maxRetries: 5, force: true });
mkdirSync(out, { recursive: true });
const protos = await new Promise((resolve) =>
glob('**/*.proto', { cwd: rpc }, (error, matches) => {
if (error) {
console.log(error.stack ?? error.message);
resolve([]);
return;
}
resolve(matches.map((filename) => path.join(rpc, filename)));
})
);
if (!protos || protos.length === 0) {
console.log(`Could not find any .proto files under ${rpc}.`);
process.exit(1);
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 });
}
// 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 }
);
// 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 }
);
console.log('<<< Generation was successful.');
})();

View File

@@ -2,7 +2,6 @@ import { ColorContribution } from '@theia/core/lib/browser/color-application-con
import { ColorRegistry } from '@theia/core/lib/browser/color-registry';
import { CommonMenus } from '@theia/core/lib/browser/common-frontend-contribution';
import { FrontendApplicationContribution } from '@theia/core/lib/browser/frontend-application';
import { FrontendApplicationStateService } from '@theia/core/lib/browser/frontend-application-state';
import {
TabBarToolbarContribution,
TabBarToolbarRegistry,
@@ -24,7 +23,6 @@ import {
import { MessageService } from '@theia/core/lib/common/message-service';
import { nls } from '@theia/core/lib/common/nls';
import { isHighContrast } from '@theia/core/lib/common/theme';
import { ElectronWindowPreferences } from '@theia/core/lib/electron-browser/window/electron-window-preferences';
import {
inject,
injectable,
@@ -62,11 +60,11 @@ export class ArduinoFrontendContribution
@inject(CommandRegistry)
private readonly commandRegistry: CommandRegistry;
@inject(ElectronWindowPreferences)
private readonly electronWindowPreferences: ElectronWindowPreferences;
// @inject(ElectronWindowPreferences)
// private readonly electronWindowPreferences: ElectronWindowPreferences;
@inject(FrontendApplicationStateService)
private readonly appStateService: FrontendApplicationStateService;
// @inject(FrontendApplicationStateService)
// private readonly appStateService: FrontendApplicationStateService;
@postConstruct()
protected init(): void {
@@ -82,24 +80,24 @@ export class ArduinoFrontendContribution
}
onStart(): void {
this.electronWindowPreferences.onPreferenceChanged((event) => {
if (event.newValue !== event.oldValue) {
switch (event.preferenceName) {
case 'window.zoomLevel':
if (typeof event.newValue === 'number') {
window.electronTheiaCore.setZoomLevel(event.newValue || 0);
}
break;
}
}
});
this.appStateService.reachedState('ready').then(() =>
this.electronWindowPreferences.ready.then(() => {
const zoomLevel =
this.electronWindowPreferences.get('window.zoomLevel');
window.electronTheiaCore.setZoomLevel(zoomLevel);
})
);
// this.electronWindowPreferences.onPreferenceChanged((event) => {
// if (event.newValue !== event.oldValue) {
// switch (event.preferenceName) {
// case 'window.zoomLevel':
// if (typeof event.newValue === 'number') {
// window.electronTheiaCore.setZoomLevel(event.newValue || 0);
// }
// break;
// }
// }
// });
// this.appStateService.reachedState('ready').then(() =>
// this.electronWindowPreferences.ready.then(() => {
// const zoomLevel =
// this.electronWindowPreferences.get('window.zoomLevel');
// window.electronTheiaCore.setZoomLevel(zoomLevel);
// })
// );
}
registerToolbarItems(registry: TabBarToolbarRegistry): void {

View File

@@ -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 {
@@ -125,7 +131,10 @@ import { OpenSketch } from './contributions/open-sketch';
import { Close } from './contributions/close';
import { SaveAsSketch } from './contributions/save-as-sketch';
import { SaveSketch } from './contributions/save-sketch';
import { VerifySketch } from './contributions/verify-sketch';
import {
CompileSummaryProvider,
VerifySketch,
} from './contributions/verify-sketch';
import { UploadSketch } from './contributions/upload-sketch';
import { CommonFrontendContribution } from './theia/core/common-frontend-contribution';
import { EditContributions } from './contributions/edit-contributions';
@@ -256,17 +265,12 @@ import {
} from './dialogs/user-fields/user-fields-dialog';
import { nls } from '@theia/core/lib/common';
import { IDEUpdaterCommands } from './ide-updater/ide-updater-commands';
import {
IDEUpdater,
IDEUpdaterClient,
IDEUpdaterPath,
} from '../common/protocol/ide-updater';
import { IDEUpdater, IDEUpdaterClient } from '../common/protocol/ide-updater';
import { IDEUpdaterClientImpl } from './ide-updater/ide-updater-client-impl';
import {
IDEUpdaterDialog,
IDEUpdaterDialogProps,
} from './dialogs/ide-updater/ide-updater-dialog';
import { ElectronIpcConnectionProvider } from '@theia/core/lib/electron-browser/messaging/electron-ipc-connection-provider';
import { MonitorModel } from './monitor-model';
import { MonitorManagerProxyClientImpl } from './monitor-manager-proxy-client-impl';
import { EditorManager as TheiaEditorManager } from '@theia/editor/lib/browser/editor-manager';
@@ -286,10 +290,7 @@ import { PreferenceTreeGenerator } from './theia/preferences/preference-tree-gen
import { PreferenceTreeGenerator as TheiaPreferenceTreeGenerator } from '@theia/preferences/lib/browser/util/preference-tree-generator';
import { AboutDialog } from './theia/core/about-dialog';
import { AboutDialog as TheiaAboutDialog } from '@theia/core/lib/browser/about-dialog';
import {
SurveyNotificationService,
SurveyNotificationServicePath,
} from '../common/protocol/survey-service';
import { SurveyNotificationService } from '../common/protocol/survey-service';
import { WindowContribution } from './theia/core/window-contribution';
import { WindowContribution as TheiaWindowContribution } from '@theia/core/lib/browser/window-contribution';
import { CoreErrorHandler } from './contributions/core-error-handler';
@@ -372,6 +373,21 @@ 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';
import { DialogService } from './dialog-service';
import { AppInfo, AppService } from './app-service';
// Hack to fix copy/cut/paste issue after electron version update in Theia.
// https://github.com/eclipse-theia/theia/issues/12487
@@ -552,14 +568,15 @@ export default new ContainerModule((bind, unbind, isBound, rebind) => {
WorkspaceVariableContribution
);
bind(SurveyNotificationService)
.toDynamicValue((context) => {
return ElectronIpcConnectionProvider.createProxy(
context.container,
SurveyNotificationServicePath
);
})
.inSingletonScope();
bind(SurveyNotificationService).toConstantValue(
{} as SurveyNotificationService
);
// return ElectronIpcConnectionProvider.createProxy(
// context.container,
// SurveyNotificationServicePath
// );
// })
// .inSingletonScope();
// Layout and shell customizations.
rebind(TheiaOutlineViewContribution)
@@ -769,6 +786,8 @@ export default new ContainerModule((bind, unbind, isBound, rebind) => {
Contribution.configure(bind, BoardsDataMenuUpdater);
Contribution.configure(bind, AutoSelectProgrammer);
bind(CompileSummaryProvider).toService(VerifySketch);
bindContributionProvider(bind, StartupTaskProvider);
bind(StartupTaskProvider).toService(BoardsServiceProvider); // to reuse the boards config in another window
@@ -999,6 +1018,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',
@@ -1010,16 +1034,16 @@ export default new ContainerModule((bind, unbind, isBound, rebind) => {
// Frontend binding for the IDE Updater service
bind(IDEUpdaterClientImpl).toSelf().inSingletonScope();
bind(IDEUpdaterClient).toService(IDEUpdaterClientImpl);
bind(IDEUpdater)
.toDynamicValue((context) => {
const client = context.container.get(IDEUpdaterClientImpl);
return ElectronIpcConnectionProvider.createProxy(
context.container,
IDEUpdaterPath,
client
);
})
.inSingletonScope();
bind(IDEUpdater).toConstantValue({} as IDEUpdater);
// .toDynamicValue((context) => {
// const client = context.container.get(IDEUpdaterClientImpl);
// return ElectronIpcConnectionProvider.createProxy(
// context.container,
// IDEUpdaterPath,
// client
// );
// })
// .inSingletonScope();
bind(HostedPluginSupportImpl).toSelf().inSingletonScope();
bind(HostedPluginSupport).toService(HostedPluginSupportImpl);
@@ -1082,4 +1106,69 @@ export default new ContainerModule((bind, unbind, isBound, rebind) => {
rebind(TheiaTerminalFrontendContribution).toService(
TerminalFrontendContribution
);
bindViewsWelcome_TheiaGH14309({ bind, widget: TreeViewWidget });
bind(DialogService).toConstantValue(<DialogService>{});
bind(AppService).toConstantValue(<AppService>{
quit() {
console.log('Quitting application...');
// Implement quit logic here
},
async info() {
return {
name: 'MyApp',
version: '1.0.0',
description: 'An example application',
appVersion: '1.0.0',
cliVersion: '1.0.0',
buildDate: new Date().toISOString(),
} as AppInfo;
},
registerStartupTasksHandler(_) {
console.log('registerStartupTasksHandler', _);
return { dispose: () => {} };
},
scheduleDeletion(_) {
console.log(`Scheduled deletion for sketch}`, _);
// Implement deletion logic
},
});
});
// 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();
}

View File

@@ -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;

View File

@@ -222,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,
@@ -299,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 (

View File

@@ -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',
};
}
}

View File

@@ -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,7 @@ export class CheckForIDEUpdates extends Contribution {
);
}
override onReady(): void {
override async onReady(): Promise<void> {
this.updater
.init(
this.preferences.get('arduino.ide.updateChannel'),
@@ -49,7 +59,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 +80,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;
}
}
}

View File

@@ -15,7 +15,6 @@ import { Installable } from '../../common/protocol/installable';
import { ExecuteWithProgress } from '../../common/protocol/progressible';
import { BoardsListWidgetFrontendContribution } from '../boards/boards-widget-frontend-contribution';
import { LibraryListWidgetFrontendContribution } from '../library/library-widget-frontend-contribution';
import { WindowServiceExt } from '../theia/core/window-service-ext';
import type { ListWidget } from '../widgets/component-list/list-widget';
import { Command, CommandRegistry, Contribution } from './contribution';
@@ -53,8 +52,8 @@ const Updatable = { type: 'Updatable' } as const;
@injectable()
export class CheckForUpdates extends Contribution {
@inject(WindowServiceExt)
private readonly windowService: WindowServiceExt;
// @inject(WindowServiceExt)
// private readonly windowService: WindowServiceExt;
@inject(ResponseServiceClient)
private readonly responseService: ResponseServiceClient;
@inject(BoardsService)
@@ -72,16 +71,16 @@ export class CheckForUpdates extends Contribution {
});
}
override async onReady(): Promise<void> {
const checkForUpdates = this.preferences['arduino.checkForUpdates'];
if (checkForUpdates) {
this.windowService.isFirstWindow().then((firstWindow) => {
if (firstWindow) {
this.checkForUpdates();
}
});
}
}
// override async onReady(): Promise<void> {
// const checkForUpdates = this.preferences['arduino.checkForUpdates'];
// if (checkForUpdates) {
// this.windowService.isFirstWindow().then((firstWindow) => {
// if (firstWindow) {
// this.checkForUpdates();
// }
// });
// }
// }
private async checkForUpdates(silent = true) {
const [boardsPackages, libraryPackages] = await Promise.all([

View File

@@ -7,11 +7,10 @@ import { ApplicationShell } from '@theia/core/lib/browser/shell/application-shel
import { nls } from '@theia/core/lib/common/nls';
import type { MaybePromise } from '@theia/core/lib/common/types';
import { toArray } from '@theia/core/shared/@phosphor/algorithm';
import { inject, injectable } from '@theia/core/shared/inversify';
import { injectable } from '@theia/core/shared/inversify';
import { MonacoEditor } from '@theia/monaco/lib/browser/monaco-editor';
import { ArduinoMenus } from '../menu/arduino-menus';
import { CurrentSketch } from '../sketches-service-client-impl';
import { WindowServiceExt } from '../theia/core/window-service-ext';
import {
Command,
CommandRegistry,
@@ -28,8 +27,8 @@ import { SaveAsSketch } from './save-as-sketch';
*/
@injectable()
export class Close extends SketchContribution {
@inject(WindowServiceExt)
private readonly windowServiceExt: WindowServiceExt;
// @inject(WindowServiceExt)
// private readonly windowServiceExt: WindowServiceExt;
private shell: ApplicationShell | undefined;
@@ -59,7 +58,7 @@ export class Close extends SketchContribution {
}
}
}
return this.windowServiceExt.close();
// return this.windowServiceExt.close();
},
});
}

View File

@@ -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 {

View File

@@ -8,6 +8,7 @@ import {
ArduinoDaemon,
BoardIdentifier,
BoardsService,
CompileSummary,
ExecutableService,
isBoardIdentifierChangeEvent,
sanitizeFqbn,
@@ -23,6 +24,7 @@ import { HostedPluginEvents } from '../hosted/hosted-plugin-events';
import { NotificationCenter } from '../notification-center';
import { CurrentSketch } from '../sketches-service-client-impl';
import { SketchContribution, URI } from './contribution';
import { CompileSummaryProvider } from './verify-sketch';
interface DaemonAddress {
/**
@@ -107,6 +109,8 @@ export class InoLanguage extends SketchContribution {
private readonly notificationCenter: NotificationCenter;
@inject(BoardsDataStore)
private readonly boardDataStore: BoardsDataStore;
@inject(CompileSummaryProvider)
private readonly compileSummaryProvider: CompileSummaryProvider;
private readonly toDispose = new DisposableCollection();
private readonly languageServerStartMutex = new Mutex();
@@ -173,6 +177,13 @@ export class InoLanguage extends SketchContribution {
}
}
}),
this.compileSummaryProvider.onDidChangeCompileSummary(
(compileSummary) => {
if (compileSummary) {
this.fireBuildDidComplete(compileSummary);
}
}
),
]);
Promise.all([
this.boardsServiceProvider.ready,
@@ -317,4 +328,32 @@ export class InoLanguage extends SketchContribution {
params
);
}
// Execute the a command contributed by the Arduino Tools VSIX to send the `ino/buildDidComplete` notification to the language server
private async fireBuildDidComplete(
compileSummary: CompileSummary
): Promise<void> {
const params = {
...compileSummary,
};
console.info(
`Executing 'arduino.languageserver.notifyBuildDidComplete' with ${JSON.stringify(
params.buildOutputUri
)}`
);
try {
await this.commandService.executeCommand(
'arduino.languageserver.notifyBuildDidComplete',
params
);
} catch (err) {
console.error(
`Unexpected error when firing event on build did complete. ${JSON.stringify(
params.buildOutputUri
)}`,
err
);
}
}
}

View File

@@ -1,13 +1,11 @@
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 { HostedPluginSupport } from '../hosted/hosted-plugin-support';
import type { ArduinoState } from 'vscode-arduino-api';
import {
BoardsConfig,
BoardsService,
CompileSummary,
isCompileSummary,
BoardsConfig,
PortIdentifier,
resolveDetectedPort,
} from '../../common/protocol';
@@ -18,8 +16,10 @@ import {
} from '../../common/protocol/arduino-context-mapper';
import { BoardsDataStore } from '../boards/boards-data-store';
import { BoardsServiceProvider } from '../boards/boards-service-provider';
import { HostedPluginSupport } from '../hosted/hosted-plugin-support';
import { CurrentSketch } from '../sketches-service-client-impl';
import { SketchContribution } from './contribution';
import { CompileSummaryProvider } from './verify-sketch';
/**
* (non-API) exported for tests
@@ -43,6 +43,8 @@ export class UpdateArduinoState extends SketchContribution {
private readonly boardsDataStore: BoardsDataStore;
@inject(HostedPluginSupport)
private readonly hostedPluginSupport: HostedPluginSupport;
@inject(CompileSummaryProvider)
private readonly compileSummaryProvider: CompileSummaryProvider;
private readonly toDispose = new DisposableCollection();
@@ -60,14 +62,13 @@ export class UpdateArduinoState extends SketchContribution {
this.configService.onDidChangeSketchDirUri((userDirUri) =>
this.updateUserDirPath(userDirUri)
),
this.commandService.onDidExecuteCommand(({ commandId, args }) => {
if (
commandId === 'arduino.languageserver.notifyBuildDidComplete' &&
isCompileSummary(args[0])
) {
this.updateCompileSummary(args[0]);
this.compileSummaryProvider.onDidChangeCompileSummary(
(compilerSummary) => {
if (compilerSummary) {
this.updateCompileSummary(compilerSummary);
}
}
}),
),
this.boardsDataStore.onDidChange((event) => {
const selectedFqbn =
this.boardsServiceProvider.boardsConfig.selectedBoard?.fqbn;
@@ -88,6 +89,10 @@ export class UpdateArduinoState extends SketchContribution {
this.updateSketchPath(this.sketchServiceClient.tryGetCurrentSketch());
this.updateUserDirPath(this.configService.tryGetSketchDirUri());
this.updateDataDirPath(this.configService.tryGetDataDirUri());
const { compileSummary } = this.compileSummaryProvider;
if (compileSummary) {
this.updateCompileSummary(compileSummary);
}
}
onStop(): void {

View File

@@ -3,13 +3,12 @@ import { nls } from '@theia/core/lib/common/nls';
import { inject, injectable } from '@theia/core/shared/inversify';
import { CoreService, IndexType } from '../../common/protocol';
import { NotificationCenter } from '../notification-center';
import { WindowServiceExt } from '../theia/core/window-service-ext';
import { Command, CommandRegistry, Contribution } from './contribution';
@injectable()
export class UpdateIndexes extends Contribution {
@inject(WindowServiceExt)
private readonly windowService: WindowServiceExt;
// @inject(WindowServiceExt)
// private readonly windowService: WindowServiceExt;
@inject(LocalStorageService)
private readonly localStorage: LocalStorageService;
@inject(CoreService)
@@ -53,30 +52,28 @@ export class UpdateIndexes extends Contribution {
return;
}
if (await this.windowService.isFirstWindow()) {
const summary = await this.coreService.indexUpdateSummaryBeforeInit();
if (summary.message) {
this.messageService.error(summary.message);
}
const typesToCheck = IndexType.All.filter((type) => !(type in summary));
if (Object.keys(summary).length) {
console.debug(
`[update-indexes]: Detected an index update summary before the core gRPC client initialization. Updating local storage with ${JSON.stringify(
summary
)}`
);
} else {
console.debug(
'[update-indexes]: No index update summary was available before the core gRPC client initialization. Checking the status of the all the index types.'
);
}
await Promise.allSettled([
...Object.entries(summary).map(([type, updatedAt]) =>
this.setLastUpdateDateTime(type as IndexType, updatedAt)
),
this.updateIndexes(typesToCheck),
]);
const summary = await this.coreService.indexUpdateSummaryBeforeInit();
if (summary.message) {
this.messageService.error(summary.message);
}
const typesToCheck = IndexType.All.filter((type) => !(type in summary));
if (Object.keys(summary).length) {
console.debug(
`[update-indexes]: Detected an index update summary before the core gRPC client initialization. Updating local storage with ${JSON.stringify(
summary
)}`
);
} else {
console.debug(
'[update-indexes]: No index update summary was available before the core gRPC client initialization. Checking the status of the all the index types.'
);
}
await Promise.allSettled([
...Object.entries(summary).map(([type, updatedAt]) =>
this.setLastUpdateDateTime(type as IndexType, updatedAt)
),
this.updateIndexes(typesToCheck),
]);
}
private async updateIndexes(

View File

@@ -104,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;
@@ -116,7 +117,7 @@ export class UploadSketch extends CoreServiceContribution {
'arduino-verify-sketch',
<VerifySketchParams>{
exportBinaries: false,
silent: true,
mode: autoVerify ? 'auto' : 'dry-run',
}
);
if (!verifyOptions) {
@@ -127,6 +128,7 @@ export class UploadSketch extends CoreServiceContribution {
usingProgrammer,
verifyOptions
);
if (!uploadOptions) {
return;
}
@@ -137,11 +139,37 @@ export class UploadSketch extends CoreServiceContribution {
const uploadResponse = await this.doWithProgress({
progressText: nls.localize('arduino/sketch/uploading', 'Uploading...'),
task: (progressId, coreService, token) =>
coreService.upload({ ...uploadOptions, progressId }, token),
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);

View File

@@ -1,7 +1,7 @@
import { Emitter } from '@theia/core/lib/common/event';
import { Emitter, Event } 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 type { CompileSummary, CoreService } from '../../common/protocol';
import { ArduinoMenus } from '../menu/arduino-menus';
import { CurrentSketch } from '../sketches-service-client-impl';
import { ArduinoToolbar } from '../toolbar/arduino-toolbar';
@@ -15,32 +15,57 @@ import {
} from './contribution';
import { CoreErrorHandler } from './core-error-handler';
export const CompileSummaryProvider = Symbol('CompileSummaryProvider');
export interface CompileSummaryProvider {
readonly compileSummary: CompileSummary | undefined;
readonly onDidChangeCompileSummary: Event<CompileSummary | undefined>;
}
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 {
export class VerifySketch
extends CoreServiceContribution
implements CompileSummaryProvider
{
@inject(CoreErrorHandler)
private readonly coreErrorHandler: CoreErrorHandler;
private readonly onDidChangeEmitter = new Emitter<void>();
private readonly onDidChange = this.onDidChangeEmitter.event;
private readonly onDidChangeCompileSummaryEmitter = new Emitter<
CompileSummary | undefined
>();
private verifyProgress: VerifyProgress = 'idle';
private _compileSummary: CompileSummary | undefined;
override registerCommands(registry: CommandRegistry): void {
registry.registerCommand(VerifySketch.Commands.VERIFY_SKETCH, {
@@ -54,10 +79,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),
});
@@ -105,6 +130,21 @@ export class VerifySketch extends CoreServiceContribution {
super.handleError(error);
}
get compileSummary(): CompileSummary | undefined {
return this._compileSummary;
}
private updateCompileSummary(
compileSummary: CompileSummary | undefined
): void {
this._compileSummary = compileSummary;
this.onDidChangeCompileSummaryEmitter.fire(this._compileSummary);
}
get onDidChangeCompileSummary(): Event<CompileSummary | undefined> {
return this.onDidChangeCompileSummaryEmitter.event;
}
private async verifySketch(
params?: VerifySketchParams
): Promise<CoreService.Options.Compile | undefined> {
@@ -113,20 +153,23 @@ 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;
}
await this.doWithProgress({
if (dryRun) {
return options;
}
const compileSummary = await this.doWithProgress({
progressText: nls.localize(
'arduino/sketch/compile',
'Compiling sketch...'
@@ -145,6 +188,9 @@ export class VerifySketch extends CoreServiceContribution {
nls.localize('arduino/sketch/doneCompiling', 'Done compiling.'),
{ timeout: 3000 }
);
this.updateCompileSummary(compileSummary);
// Returns with the used options for the compilation
// so that follow-up tasks (such as upload) can reuse the compiled code.
// Note that the `fqbn` is already decorated with the board settings, if any.

View File

@@ -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 {

View File

@@ -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();
}

View File

@@ -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);
}
}

View File

@@ -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

View File

@@ -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 {

View File

@@ -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";

View File

@@ -0,0 +1,7 @@
#version-welcome-dialog-container > .dialogBlock {
width: 546px;
.bold {
font-weight: bold;
}
}

View File

@@ -0,0 +1,26 @@
import { injectable } from '@theia/core/shared/inversify';
import {
BrowserMainMenuFactory as TheiaBrowserMainMenuFactory,
MenuBarWidget,
} from '@theia/core/lib/browser/menu/browser-menu-plugin';
import { MainMenuManager } from '../../../common/main-menu-manager';
@injectable()
export class BrowserMainMenuFactory
extends TheiaBrowserMainMenuFactory
implements MainMenuManager
{
protected menuBar: MenuBarWidget | undefined;
override createMenuBar(): MenuBarWidget {
this.menuBar = super.createMenuBar();
return this.menuBar;
}
update(): void {
if (this.menuBar) {
this.menuBar.clearMenus();
this.fillMenuBar(this.menuBar);
}
}
}

View File

@@ -0,0 +1,18 @@
import '../../../../src/browser/style/browser-menu.css';
import { ContainerModule } from '@theia/core/shared/inversify';
import {
BrowserMenuBarContribution,
BrowserMainMenuFactory as TheiaBrowserMainMenuFactory,
} from '@theia/core/lib/browser/menu/browser-menu-plugin';
import { MainMenuManager } from '../../../common/main-menu-manager';
import { ArduinoMenuContribution } from './browser-menu-plugin';
import { BrowserMainMenuFactory } from './browser-main-menu-factory';
export default new ContainerModule((bind, unbind, isBound, rebind) => {
bind(BrowserMainMenuFactory).toSelf().inSingletonScope();
bind(MainMenuManager).toService(BrowserMainMenuFactory);
rebind(TheiaBrowserMainMenuFactory).toService(BrowserMainMenuFactory);
rebind(BrowserMenuBarContribution)
.to(ArduinoMenuContribution)
.inSingletonScope();
});

View File

@@ -0,0 +1,20 @@
import { DefaultWindowService as TheiaDefaultWindowService } from '@theia/core/lib/browser/window/default-window-service';
import { injectable } from '@theia/core/shared/inversify';
import { WindowServiceExt } from './window-service-ext';
@injectable()
export class DefaultWindowService
extends TheiaDefaultWindowService
implements WindowServiceExt
{
close(): void {
throw new Error('Method not implemented.');
}
/**
* The default implementation always resolves to `true`.
* IDE2 does not use it. It's currently an electron-only app.
*/
async isFirstWindow(): Promise<boolean> {
return true;
}
}

View File

@@ -0,0 +1,21 @@
import { DefaultWindowService as TheiaDefaultWindowService } from '@theia/core/lib/browser/window/default-window-service';
import { injectable } from '@theia/core/shared/inversify';
import { WindowServiceExt } from './window-service-ext';
@injectable()
export class DefaultWindowService
extends TheiaDefaultWindowService
implements WindowServiceExt
{
/**
* The default implementation always resolves to `true`.
* IDE2 does not use it. It's currently an electron-only app.
*/
async isFirstWindow(): Promise<boolean> {
return true;
}
close() {
console.log('close');
}
}

View File

@@ -1,20 +1,14 @@
import { CommandRegistry } from '@theia/core/lib/common/command';
import { MenuModelRegistry } from '@theia/core/lib/common/menu/menu-model-registry';
import { nls } from '@theia/core/lib/common/nls';
import { injectable } from '@theia/core/shared/inversify';
import { MenuModelRegistry } from '@theia/core';
import {
KeymapsCommands,
KeymapsFrontendContribution as TheiaKeymapsFrontendContribution,
KeymapsCommands,
} from '@theia/keymaps/lib/browser/keymaps-frontend-contribution';
import { ArduinoMenus } from '../../menu/arduino-menus';
import { nls } from '@theia/core/lib/common';
@injectable()
export class KeymapsFrontendContribution extends TheiaKeymapsFrontendContribution {
override registerCommands(registry: CommandRegistry): void {
super.registerCommands(registry);
registry.unregisterCommand(KeymapsCommands.OPEN_KEYMAPS_JSON_TOOLBAR.id);
}
override registerMenus(menus: MenuModelRegistry): void {
menus.registerMenuAction(ArduinoMenus.FILE__ADVANCED_SUBMENU, {
commandId: KeymapsCommands.OPEN_KEYMAPS.id,

View File

@@ -22,7 +22,6 @@ import { MonacoThemeRegistry as TheiaMonacoThemeRegistry } from '@theia/monaco/l
import type { ThemeMix } from '@theia/monaco/lib/browser/textmate/monaco-theme-types';
import { HostedPluginSupport } from '../../hosted/hosted-plugin-support';
import { ArduinoThemes, compatibleBuiltInTheme } from '../core/theming';
import { WindowServiceExt } from '../core/window-service-ext';
type MonacoThemeRegistrationSource =
/**
@@ -156,8 +155,8 @@ export class CleanupObsoleteThemes implements FrontendApplicationContribution {
private readonly themeService: ThemeService;
@inject(MessageService)
private readonly messageService: MessageService;
@inject(WindowServiceExt)
private readonly windowService: WindowServiceExt;
// @inject(WindowServiceExt)
// private readonly windowService: WindowServiceExt;
onStart(): void {
this.hostedPlugin.didStart.then(() => this.cleanupObsoleteThemes());
@@ -172,7 +171,7 @@ export class CleanupObsoleteThemes implements FrontendApplicationContribution {
if (!obsoleteThemeIds.length) {
return;
}
const firstWindow = await this.windowService.isFirstWindow();
const firstWindow = true; // await this.windowService.isFirstWindow();
if (firstWindow) {
await this.removeObsoleteThemesFromIndexedDB(obsoleteThemeIds);
this.unregisterObsoleteThemes(obsoleteThemeIds);

View File

@@ -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;
}

View File

@@ -19,14 +19,13 @@ import {
hasStartupTasks,
StartupTask,
} from '../../../electron-common/startup-task';
import { WindowServiceExt } from '../core/window-service-ext';
@injectable()
export class WorkspaceService extends TheiaWorkspaceService {
@inject(SketchesService)
private readonly sketchesService: SketchesService;
@inject(WindowServiceExt)
private readonly windowServiceExt: WindowServiceExt;
// @inject(WindowServiceExt)
// private readonly windowServiceExt: WindowServiceExt;
@inject(ContributionProvider)
@named(StartupTaskProvider)
private readonly providers: ContributionProvider<StartupTaskProvider>;
@@ -104,7 +103,8 @@ export class WorkspaceService extends TheiaWorkspaceService {
protected override reloadWindow(options?: WorkspaceInput): void {
const tasks = this.tasks(options);
this.setURLFragment(this._workspace?.resource.path.toString() || '');
this.windowServiceExt.reload({ tasks });
console.log(tasks);
// this.windowServiceExt.reload({ tasks });
}
protected override openNewWindow(

View File

@@ -127,6 +127,9 @@ export class SketchbookTreeModel extends FileTreeModel {
if (preferenceName === 'arduino.sketchbook.showAllFiles') {
this.updateRoot();
}
if (preferenceName === 'arduino.cloud.sharedSpaceID') {
this.updateRoot();
}
})
);

View File

@@ -1,8 +1,10 @@
export const MainMenuManager = Symbol('MainMenuManager');
export interface MainMenuManager {
// export const MainMenuManager = Symbol('MainMenuManager');
export class MainMenuManager {
/**
* Call this method if you have changed the content of the main menu (updated a toggle flag, removed/added new groups or menu items)
* and you want to re-render it from scratch. Works for electron too.
*/
update(): void;
update() {
console.warn('MainMenuManager.update() is not implemented');
}
}

View File

@@ -67,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>;

View File

@@ -71,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);
@@ -78,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[]> {
@@ -166,7 +171,7 @@ export interface CoreService {
compile(
options: CoreService.Options.Compile,
cancellationToken?: CancellationToken
): Promise<void>;
): Promise<CompileSummary | undefined>;
upload(
options: CoreService.Options.Upload,
cancellationToken?: CancellationToken

View File

@@ -71,3 +71,4 @@ export interface IDEUpdaterClient {
}
export const SKIP_IDE_VERSION = 'skipIDEVersion';
export const LAST_USED_IDE_VERSION = 'lastUsedIDEVersion';

View File

@@ -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 {

View File

@@ -116,12 +116,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();
@@ -410,6 +414,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 {

View File

@@ -73,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;
@@ -585,7 +589,7 @@ function createBoardsPackage(
if (!actualRelease) {
return undefined;
}
const { name, typeList, boardsList, deprecated, compatible } = actualRelease;
const { name, typesList, boardsList, deprecated, compatible } = actualRelease;
if (!compatible) {
return undefined; // never show incompatible platforms
}
@@ -602,7 +606,7 @@ function createBoardsPackage(
),
description: boardsList.map(({ name }) => name).join(', '),
boards: boardsList,
types: typeList,
types: typesList,
moreInfoLink: website,
author: maintainer,
deprecated,

View File

@@ -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>,
}
}

View File

@@ -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.

View File

@@ -6,16 +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;
@@ -59,12 +59,14 @@ interface IArduinoCoreServiceService extends grpc.ServiceDefinition<grpc.Untyped
debug: IArduinoCoreServiceService_IDebug;
isDebugSupported: IArduinoCoreServiceService_IIsDebugSupported;
getDebugConfig: IArduinoCoreServiceService_IGetDebugConfig;
settingsGetAll: IArduinoCoreServiceService_ISettingsGetAll;
settingsMerge: IArduinoCoreServiceService_ISettingsMerge;
checkForArduinoCLIUpdates: IArduinoCoreServiceService_ICheckForArduinoCLIUpdates;
cleanDownloadCacheDirectory: IArduinoCoreServiceService_ICleanDownloadCacheDirectory;
configurationSave: IArduinoCoreServiceService_IConfigurationSave;
configurationOpen: IArduinoCoreServiceService_IConfigurationOpen;
configurationGet: IArduinoCoreServiceService_IConfigurationGet;
settingsEnumerate: IArduinoCoreServiceService_ISettingsEnumerate;
settingsGetValue: IArduinoCoreServiceService_ISettingsGetValue;
settingsSetValue: IArduinoCoreServiceService_ISettingsSetValue;
settingsWrite: IArduinoCoreServiceService_ISettingsWrite;
settingsDelete: IArduinoCoreServiceService_ISettingsDelete;
}
interface IArduinoCoreServiceService_ICreate extends grpc.MethodDefinition<cc_arduino_cli_commands_v1_commands_pb.CreateRequest, cc_arduino_cli_commands_v1_commands_pb.CreateResponse> {
@@ -436,23 +438,59 @@ 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_ISettingsGetAll extends grpc.MethodDefinition<cc_arduino_cli_commands_v1_settings_pb.SettingsGetAllRequest, cc_arduino_cli_commands_v1_settings_pb.SettingsGetAllResponse> {
path: "/cc.arduino.cli.commands.v1.ArduinoCoreService/SettingsGetAll";
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_settings_pb.SettingsGetAllRequest>;
requestDeserialize: grpc.deserialize<cc_arduino_cli_commands_v1_settings_pb.SettingsGetAllRequest>;
responseSerialize: grpc.serialize<cc_arduino_cli_commands_v1_settings_pb.SettingsGetAllResponse>;
responseDeserialize: grpc.deserialize<cc_arduino_cli_commands_v1_settings_pb.SettingsGetAllResponse>;
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_ISettingsMerge extends grpc.MethodDefinition<cc_arduino_cli_commands_v1_settings_pb.SettingsMergeRequest, cc_arduino_cli_commands_v1_settings_pb.SettingsMergeResponse> {
path: "/cc.arduino.cli.commands.v1.ArduinoCoreService/SettingsMerge";
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_settings_pb.SettingsMergeRequest>;
requestDeserialize: grpc.deserialize<cc_arduino_cli_commands_v1_settings_pb.SettingsMergeRequest>;
responseSerialize: grpc.serialize<cc_arduino_cli_commands_v1_settings_pb.SettingsMergeResponse>;
responseDeserialize: grpc.deserialize<cc_arduino_cli_commands_v1_settings_pb.SettingsMergeResponse>;
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";
@@ -472,24 +510,6 @@ interface IArduinoCoreServiceService_ISettingsSetValue extends grpc.MethodDefini
responseSerialize: grpc.serialize<cc_arduino_cli_commands_v1_settings_pb.SettingsSetValueResponse>;
responseDeserialize: grpc.deserialize<cc_arduino_cli_commands_v1_settings_pb.SettingsSetValueResponse>;
}
interface IArduinoCoreServiceService_ISettingsWrite extends grpc.MethodDefinition<cc_arduino_cli_commands_v1_settings_pb.SettingsWriteRequest, cc_arduino_cli_commands_v1_settings_pb.SettingsWriteResponse> {
path: "/cc.arduino.cli.commands.v1.ArduinoCoreService/SettingsWrite";
requestStream: false;
responseStream: false;
requestSerialize: grpc.serialize<cc_arduino_cli_commands_v1_settings_pb.SettingsWriteRequest>;
requestDeserialize: grpc.deserialize<cc_arduino_cli_commands_v1_settings_pb.SettingsWriteRequest>;
responseSerialize: grpc.serialize<cc_arduino_cli_commands_v1_settings_pb.SettingsWriteResponse>;
responseDeserialize: grpc.deserialize<cc_arduino_cli_commands_v1_settings_pb.SettingsWriteResponse>;
}
interface IArduinoCoreServiceService_ISettingsDelete extends grpc.MethodDefinition<cc_arduino_cli_commands_v1_settings_pb.SettingsDeleteRequest, cc_arduino_cli_commands_v1_settings_pb.SettingsDeleteResponse> {
path: "/cc.arduino.cli.commands.v1.ArduinoCoreService/SettingsDelete";
requestStream: false;
responseStream: false;
requestSerialize: grpc.serialize<cc_arduino_cli_commands_v1_settings_pb.SettingsDeleteRequest>;
requestDeserialize: grpc.deserialize<cc_arduino_cli_commands_v1_settings_pb.SettingsDeleteRequest>;
responseSerialize: grpc.serialize<cc_arduino_cli_commands_v1_settings_pb.SettingsDeleteResponse>;
responseDeserialize: grpc.deserialize<cc_arduino_cli_commands_v1_settings_pb.SettingsDeleteResponse>;
}
export const ArduinoCoreServiceService: IArduinoCoreServiceService;
@@ -535,12 +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>;
settingsGetAll: grpc.handleUnaryCall<cc_arduino_cli_commands_v1_settings_pb.SettingsGetAllRequest, cc_arduino_cli_commands_v1_settings_pb.SettingsGetAllResponse>;
settingsMerge: grpc.handleUnaryCall<cc_arduino_cli_commands_v1_settings_pb.SettingsMergeRequest, cc_arduino_cli_commands_v1_settings_pb.SettingsMergeResponse>;
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>;
settingsWrite: grpc.handleUnaryCall<cc_arduino_cli_commands_v1_settings_pb.SettingsWriteRequest, cc_arduino_cli_commands_v1_settings_pb.SettingsWriteResponse>;
settingsDelete: grpc.handleUnaryCall<cc_arduino_cli_commands_v1_settings_pb.SettingsDeleteRequest, cc_arduino_cli_commands_v1_settings_pb.SettingsDeleteResponse>;
}
export interface IArduinoCoreServiceClient {
@@ -648,24 +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;
settingsGetAll(request: cc_arduino_cli_commands_v1_settings_pb.SettingsGetAllRequest, callback: (error: grpc.ServiceError | null, response: cc_arduino_cli_commands_v1_settings_pb.SettingsGetAllResponse) => void): grpc.ClientUnaryCall;
settingsGetAll(request: cc_arduino_cli_commands_v1_settings_pb.SettingsGetAllRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: cc_arduino_cli_commands_v1_settings_pb.SettingsGetAllResponse) => void): grpc.ClientUnaryCall;
settingsGetAll(request: cc_arduino_cli_commands_v1_settings_pb.SettingsGetAllRequest, metadata: grpc.Metadata, options: Partial<grpc.CallOptions>, callback: (error: grpc.ServiceError | null, response: cc_arduino_cli_commands_v1_settings_pb.SettingsGetAllResponse) => void): grpc.ClientUnaryCall;
settingsMerge(request: cc_arduino_cli_commands_v1_settings_pb.SettingsMergeRequest, callback: (error: grpc.ServiceError | null, response: cc_arduino_cli_commands_v1_settings_pb.SettingsMergeResponse) => void): grpc.ClientUnaryCall;
settingsMerge(request: cc_arduino_cli_commands_v1_settings_pb.SettingsMergeRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: cc_arduino_cli_commands_v1_settings_pb.SettingsMergeResponse) => void): grpc.ClientUnaryCall;
settingsMerge(request: cc_arduino_cli_commands_v1_settings_pb.SettingsMergeRequest, metadata: grpc.Metadata, options: Partial<grpc.CallOptions>, callback: (error: grpc.ServiceError | null, response: cc_arduino_cli_commands_v1_settings_pb.SettingsMergeResponse) => 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;
settingsWrite(request: cc_arduino_cli_commands_v1_settings_pb.SettingsWriteRequest, callback: (error: grpc.ServiceError | null, response: cc_arduino_cli_commands_v1_settings_pb.SettingsWriteResponse) => void): grpc.ClientUnaryCall;
settingsWrite(request: cc_arduino_cli_commands_v1_settings_pb.SettingsWriteRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: cc_arduino_cli_commands_v1_settings_pb.SettingsWriteResponse) => void): grpc.ClientUnaryCall;
settingsWrite(request: cc_arduino_cli_commands_v1_settings_pb.SettingsWriteRequest, metadata: grpc.Metadata, options: Partial<grpc.CallOptions>, callback: (error: grpc.ServiceError | null, response: cc_arduino_cli_commands_v1_settings_pb.SettingsWriteResponse) => void): grpc.ClientUnaryCall;
settingsDelete(request: cc_arduino_cli_commands_v1_settings_pb.SettingsDeleteRequest, callback: (error: grpc.ServiceError | null, response: cc_arduino_cli_commands_v1_settings_pb.SettingsDeleteResponse) => void): grpc.ClientUnaryCall;
settingsDelete(request: cc_arduino_cli_commands_v1_settings_pb.SettingsDeleteRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: cc_arduino_cli_commands_v1_settings_pb.SettingsDeleteResponse) => void): grpc.ClientUnaryCall;
settingsDelete(request: cc_arduino_cli_commands_v1_settings_pb.SettingsDeleteRequest, metadata: grpc.Metadata, options: Partial<grpc.CallOptions>, callback: (error: grpc.ServiceError | null, response: cc_arduino_cli_commands_v1_settings_pb.SettingsDeleteResponse) => void): grpc.ClientUnaryCall;
}
export class ArduinoCoreServiceClient extends grpc.Client implements IArduinoCoreServiceClient {
@@ -772,22 +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 settingsGetAll(request: cc_arduino_cli_commands_v1_settings_pb.SettingsGetAllRequest, callback: (error: grpc.ServiceError | null, response: cc_arduino_cli_commands_v1_settings_pb.SettingsGetAllResponse) => void): grpc.ClientUnaryCall;
public settingsGetAll(request: cc_arduino_cli_commands_v1_settings_pb.SettingsGetAllRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: cc_arduino_cli_commands_v1_settings_pb.SettingsGetAllResponse) => void): grpc.ClientUnaryCall;
public settingsGetAll(request: cc_arduino_cli_commands_v1_settings_pb.SettingsGetAllRequest, metadata: grpc.Metadata, options: Partial<grpc.CallOptions>, callback: (error: grpc.ServiceError | null, response: cc_arduino_cli_commands_v1_settings_pb.SettingsGetAllResponse) => void): grpc.ClientUnaryCall;
public settingsMerge(request: cc_arduino_cli_commands_v1_settings_pb.SettingsMergeRequest, callback: (error: grpc.ServiceError | null, response: cc_arduino_cli_commands_v1_settings_pb.SettingsMergeResponse) => void): grpc.ClientUnaryCall;
public settingsMerge(request: cc_arduino_cli_commands_v1_settings_pb.SettingsMergeRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: cc_arduino_cli_commands_v1_settings_pb.SettingsMergeResponse) => void): grpc.ClientUnaryCall;
public settingsMerge(request: cc_arduino_cli_commands_v1_settings_pb.SettingsMergeRequest, metadata: grpc.Metadata, options: Partial<grpc.CallOptions>, callback: (error: grpc.ServiceError | null, response: cc_arduino_cli_commands_v1_settings_pb.SettingsMergeResponse) => 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;
public settingsWrite(request: cc_arduino_cli_commands_v1_settings_pb.SettingsWriteRequest, callback: (error: grpc.ServiceError | null, response: cc_arduino_cli_commands_v1_settings_pb.SettingsWriteResponse) => void): grpc.ClientUnaryCall;
public settingsWrite(request: cc_arduino_cli_commands_v1_settings_pb.SettingsWriteRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: cc_arduino_cli_commands_v1_settings_pb.SettingsWriteResponse) => void): grpc.ClientUnaryCall;
public settingsWrite(request: cc_arduino_cli_commands_v1_settings_pb.SettingsWriteRequest, metadata: grpc.Metadata, options: Partial<grpc.CallOptions>, callback: (error: grpc.ServiceError | null, response: cc_arduino_cli_commands_v1_settings_pb.SettingsWriteResponse) => void): grpc.ClientUnaryCall;
public settingsDelete(request: cc_arduino_cli_commands_v1_settings_pb.SettingsDeleteRequest, callback: (error: grpc.ServiceError | null, response: cc_arduino_cli_commands_v1_settings_pb.SettingsDeleteResponse) => void): grpc.ClientUnaryCall;
public settingsDelete(request: cc_arduino_cli_commands_v1_settings_pb.SettingsDeleteRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: cc_arduino_cli_commands_v1_settings_pb.SettingsDeleteResponse) => void): grpc.ClientUnaryCall;
public settingsDelete(request: cc_arduino_cli_commands_v1_settings_pb.SettingsDeleteRequest, metadata: grpc.Metadata, options: Partial<grpc.CallOptions>, callback: (error: grpc.ServiceError | null, response: cc_arduino_cli_commands_v1_settings_pb.SettingsDeleteResponse) => void): grpc.ClientUnaryCall;
}

View File

@@ -3,31 +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)) {
@@ -183,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');
@@ -205,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');
@@ -777,48 +888,26 @@ 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_SettingsDeleteRequest(arg) {
if (!(arg instanceof cc_arduino_cli_commands_v1_settings_pb.SettingsDeleteRequest)) {
throw new Error('Expected argument of type cc.arduino.cli.commands.v1.SettingsDeleteRequest');
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_SettingsDeleteRequest(buffer_arg) {
return cc_arduino_cli_commands_v1_settings_pb.SettingsDeleteRequest.deserializeBinary(new Uint8Array(buffer_arg));
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_SettingsDeleteResponse(arg) {
if (!(arg instanceof cc_arduino_cli_commands_v1_settings_pb.SettingsDeleteResponse)) {
throw new Error('Expected argument of type cc.arduino.cli.commands.v1.SettingsDeleteResponse');
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_SettingsDeleteResponse(buffer_arg) {
return cc_arduino_cli_commands_v1_settings_pb.SettingsDeleteResponse.deserializeBinary(new Uint8Array(buffer_arg));
}
function serialize_cc_arduino_cli_commands_v1_SettingsGetAllRequest(arg) {
if (!(arg instanceof cc_arduino_cli_commands_v1_settings_pb.SettingsGetAllRequest)) {
throw new Error('Expected argument of type cc.arduino.cli.commands.v1.SettingsGetAllRequest');
}
return Buffer.from(arg.serializeBinary());
}
function deserialize_cc_arduino_cli_commands_v1_SettingsGetAllRequest(buffer_arg) {
return cc_arduino_cli_commands_v1_settings_pb.SettingsGetAllRequest.deserializeBinary(new Uint8Array(buffer_arg));
}
function serialize_cc_arduino_cli_commands_v1_SettingsGetAllResponse(arg) {
if (!(arg instanceof cc_arduino_cli_commands_v1_settings_pb.SettingsGetAllResponse)) {
throw new Error('Expected argument of type cc.arduino.cli.commands.v1.SettingsGetAllResponse');
}
return Buffer.from(arg.serializeBinary());
}
function deserialize_cc_arduino_cli_commands_v1_SettingsGetAllResponse(buffer_arg) {
return cc_arduino_cli_commands_v1_settings_pb.SettingsGetAllResponse.deserializeBinary(new Uint8Array(buffer_arg));
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) {
@@ -843,28 +932,6 @@ function deserialize_cc_arduino_cli_commands_v1_SettingsGetValueResponse(buffer_
return cc_arduino_cli_commands_v1_settings_pb.SettingsGetValueResponse.deserializeBinary(new Uint8Array(buffer_arg));
}
function serialize_cc_arduino_cli_commands_v1_SettingsMergeRequest(arg) {
if (!(arg instanceof cc_arduino_cli_commands_v1_settings_pb.SettingsMergeRequest)) {
throw new Error('Expected argument of type cc.arduino.cli.commands.v1.SettingsMergeRequest');
}
return Buffer.from(arg.serializeBinary());
}
function deserialize_cc_arduino_cli_commands_v1_SettingsMergeRequest(buffer_arg) {
return cc_arduino_cli_commands_v1_settings_pb.SettingsMergeRequest.deserializeBinary(new Uint8Array(buffer_arg));
}
function serialize_cc_arduino_cli_commands_v1_SettingsMergeResponse(arg) {
if (!(arg instanceof cc_arduino_cli_commands_v1_settings_pb.SettingsMergeResponse)) {
throw new Error('Expected argument of type cc.arduino.cli.commands.v1.SettingsMergeResponse');
}
return Buffer.from(arg.serializeBinary());
}
function deserialize_cc_arduino_cli_commands_v1_SettingsMergeResponse(buffer_arg) {
return cc_arduino_cli_commands_v1_settings_pb.SettingsMergeResponse.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');
@@ -887,28 +954,6 @@ function deserialize_cc_arduino_cli_commands_v1_SettingsSetValueResponse(buffer_
return cc_arduino_cli_commands_v1_settings_pb.SettingsSetValueResponse.deserializeBinary(new Uint8Array(buffer_arg));
}
function serialize_cc_arduino_cli_commands_v1_SettingsWriteRequest(arg) {
if (!(arg instanceof cc_arduino_cli_commands_v1_settings_pb.SettingsWriteRequest)) {
throw new Error('Expected argument of type cc.arduino.cli.commands.v1.SettingsWriteRequest');
}
return Buffer.from(arg.serializeBinary());
}
function deserialize_cc_arduino_cli_commands_v1_SettingsWriteRequest(buffer_arg) {
return cc_arduino_cli_commands_v1_settings_pb.SettingsWriteRequest.deserializeBinary(new Uint8Array(buffer_arg));
}
function serialize_cc_arduino_cli_commands_v1_SettingsWriteResponse(arg) {
if (!(arg instanceof cc_arduino_cli_commands_v1_settings_pb.SettingsWriteResponse)) {
throw new Error('Expected argument of type cc.arduino.cli.commands.v1.SettingsWriteResponse');
}
return Buffer.from(arg.serializeBinary());
}
function deserialize_cc_arduino_cli_commands_v1_SettingsWriteResponse(buffer_arg) {
return cc_arduino_cli_commands_v1_settings_pb.SettingsWriteResponse.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');
@@ -1064,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,
@@ -1079,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,
@@ -1091,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,
@@ -1103,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,
@@ -1115,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,
@@ -1139,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,
@@ -1151,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,
@@ -1163,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,
@@ -1189,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,
@@ -1424,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,
@@ -1436,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,
@@ -1509,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,
@@ -1521,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,
@@ -1569,31 +1611,79 @@ getDebugConfig: {
responseSerialize: serialize_cc_arduino_cli_commands_v1_GetDebugConfigResponse,
responseDeserialize: deserialize_cc_arduino_cli_commands_v1_GetDebugConfigResponse,
},
// List all the settings.
settingsGetAll: {
path: '/cc.arduino.cli.commands.v1.ArduinoCoreService/SettingsGetAll',
// 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_settings_pb.SettingsGetAllRequest,
responseType: cc_arduino_cli_commands_v1_settings_pb.SettingsGetAllResponse,
requestSerialize: serialize_cc_arduino_cli_commands_v1_SettingsGetAllRequest,
requestDeserialize: deserialize_cc_arduino_cli_commands_v1_SettingsGetAllRequest,
responseSerialize: serialize_cc_arduino_cli_commands_v1_SettingsGetAllResponse,
responseDeserialize: deserialize_cc_arduino_cli_commands_v1_SettingsGetAllResponse,
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,
},
// Set multiple settings values at once.
settingsMerge: {
path: '/cc.arduino.cli.commands.v1.ArduinoCoreService/SettingsMerge',
// 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_settings_pb.SettingsMergeRequest,
responseType: cc_arduino_cli_commands_v1_settings_pb.SettingsMergeResponse,
requestSerialize: serialize_cc_arduino_cli_commands_v1_SettingsMergeRequest,
requestDeserialize: deserialize_cc_arduino_cli_commands_v1_SettingsMergeRequest,
responseSerialize: serialize_cc_arduino_cli_commands_v1_SettingsMergeResponse,
responseDeserialize: deserialize_cc_arduino_cli_commands_v1_SettingsMergeResponse,
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,
},
// Get the value of a specific setting.
// 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,
@@ -1605,7 +1695,7 @@ settingsGetValue: {
responseSerialize: serialize_cc_arduino_cli_commands_v1_SettingsGetValueResponse,
responseDeserialize: deserialize_cc_arduino_cli_commands_v1_SettingsGetValueResponse,
},
// Set the value of a specific setting.
// Set a single configuration value.
settingsSetValue: {
path: '/cc.arduino.cli.commands.v1.ArduinoCoreService/SettingsSetValue',
requestStream: false,
@@ -1617,29 +1707,5 @@ settingsSetValue: {
responseSerialize: serialize_cc_arduino_cli_commands_v1_SettingsSetValueResponse,
responseDeserialize: deserialize_cc_arduino_cli_commands_v1_SettingsSetValueResponse,
},
// Writes to file settings currently stored in memory
settingsWrite: {
path: '/cc.arduino.cli.commands.v1.ArduinoCoreService/SettingsWrite',
requestStream: false,
responseStream: false,
requestType: cc_arduino_cli_commands_v1_settings_pb.SettingsWriteRequest,
responseType: cc_arduino_cli_commands_v1_settings_pb.SettingsWriteResponse,
requestSerialize: serialize_cc_arduino_cli_commands_v1_SettingsWriteRequest,
requestDeserialize: deserialize_cc_arduino_cli_commands_v1_SettingsWriteRequest,
responseSerialize: serialize_cc_arduino_cli_commands_v1_SettingsWriteResponse,
responseDeserialize: deserialize_cc_arduino_cli_commands_v1_SettingsWriteResponse,
},
// Deletes an entry and rewrites the file settings
settingsDelete: {
path: '/cc.arduino.cli.commands.v1.ArduinoCoreService/SettingsDelete',
requestStream: false,
responseStream: false,
requestType: cc_arduino_cli_commands_v1_settings_pb.SettingsDeleteRequest,
responseType: cc_arduino_cli_commands_v1_settings_pb.SettingsDeleteResponse,
requestSerialize: serialize_cc_arduino_cli_commands_v1_SettingsDeleteRequest,
requestDeserialize: deserialize_cc_arduino_cli_commands_v1_SettingsDeleteRequest,
responseSerialize: serialize_cc_arduino_cli_commands_v1_SettingsDeleteResponse,
responseDeserialize: deserialize_cc_arduino_cli_commands_v1_SettingsDeleteResponse,
},
};

View File

@@ -5,16 +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 {
@@ -99,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;
@@ -118,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,
}
@@ -232,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;
@@ -247,6 +249,7 @@ export namespace UpdateIndexRequest {
export type AsObject = {
instance?: cc_arduino_cli_commands_v1_common_pb.Instance.AsObject,
ignoreCustomPackageIndexes: boolean,
updateIfOlderThanSecs: number,
}
}
@@ -257,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;
@@ -270,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 {
@@ -279,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;
@@ -293,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,
}
}
@@ -303,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;
@@ -316,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 {
@@ -500,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;
@@ -517,6 +636,7 @@ export namespace SetSketchDefaultsRequest {
defaultFqbn: string,
defaultPortAddress: string,
defaultPortProtocol: string,
defaultProgrammer: string,
}
}
@@ -527,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;
@@ -543,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 = {
}
}

View File

@@ -318,10 +318,10 @@ export class PlatformRelease extends jspb.Message {
setName(value: string): PlatformRelease;
getVersion(): string;
setVersion(value: string): PlatformRelease;
clearTypeList(): void;
getTypeList(): Array<string>;
setTypeList(value: Array<string>): PlatformRelease;
addType(value: string, index?: number): string;
clearTypesList(): void;
getTypesList(): Array<string>;
setTypesList(value: Array<string>): PlatformRelease;
addTypes(value: string, index?: number): string;
getInstalled(): boolean;
setInstalled(value: boolean): PlatformRelease;
clearBoardsList(): void;
@@ -354,7 +354,7 @@ export namespace PlatformRelease {
export type AsObject = {
name: string,
version: string,
typeList: Array<string>,
typesList: Array<string>,
installed: boolean,
boardsList: Array<Board.AsObject>,
help?: HelpResources.AsObject,
@@ -416,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;
@@ -491,6 +468,13 @@ export class Sketch extends jspb.Message {
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;
@@ -514,6 +498,53 @@ export namespace Sketch {
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,
}
}
@@ -522,6 +553,17 @@ export class SketchProfile extends jspb.Message {
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;
@@ -537,5 +579,9 @@ export namespace SketchProfile {
export type AsObject = {
name: string,
fqbn: string,
programmer: string,
port: string,
portConfig?: MonitorPortConfiguration.AsObject,
protocol: string,
}
}

View File

@@ -31,11 +31,12 @@ goog.exportSymbol('proto.cc.arduino.cli.commands.v1.HelpResources', null, global
goog.exportSymbol('proto.cc.arduino.cli.commands.v1.InstalledPlatformReference', null, global);
goog.exportSymbol('proto.cc.arduino.cli.commands.v1.Instance', null, global);
goog.exportSymbol('proto.cc.arduino.cli.commands.v1.MissingProgrammerError', null, global);
goog.exportSymbol('proto.cc.arduino.cli.commands.v1.MonitorPortConfiguration', null, global);
goog.exportSymbol('proto.cc.arduino.cli.commands.v1.MonitorPortSetting', null, global);
goog.exportSymbol('proto.cc.arduino.cli.commands.v1.Platform', null, global);
goog.exportSymbol('proto.cc.arduino.cli.commands.v1.PlatformMetadata', null, global);
goog.exportSymbol('proto.cc.arduino.cli.commands.v1.PlatformRelease', null, global);
goog.exportSymbol('proto.cc.arduino.cli.commands.v1.PlatformSummary', null, global);
goog.exportSymbol('proto.cc.arduino.cli.commands.v1.Profile', null, global);
goog.exportSymbol('proto.cc.arduino.cli.commands.v1.Programmer', null, global);
goog.exportSymbol('proto.cc.arduino.cli.commands.v1.Sketch', null, global);
goog.exportSymbol('proto.cc.arduino.cli.commands.v1.SketchProfile', null, global);
@@ -334,27 +335,6 @@ if (goog.DEBUG && !COMPILED) {
*/
proto.cc.arduino.cli.commands.v1.Board.displayName = 'proto.cc.arduino.cli.commands.v1.Board';
}
/**
* 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.Profile = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(proto.cc.arduino.cli.commands.v1.Profile, jspb.Message);
if (goog.DEBUG && !COMPILED) {
/**
* @public
* @override
*/
proto.cc.arduino.cli.commands.v1.Profile.displayName = 'proto.cc.arduino.cli.commands.v1.Profile';
}
/**
* Generated by JsPbCodeGenerator.
* @param {Array=} opt_data Optional initial data array, typically from a
@@ -397,6 +377,48 @@ if (goog.DEBUG && !COMPILED) {
*/
proto.cc.arduino.cli.commands.v1.Sketch.displayName = 'proto.cc.arduino.cli.commands.v1.Sketch';
}
/**
* 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.MonitorPortConfiguration = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, proto.cc.arduino.cli.commands.v1.MonitorPortConfiguration.repeatedFields_, null);
};
goog.inherits(proto.cc.arduino.cli.commands.v1.MonitorPortConfiguration, jspb.Message);
if (goog.DEBUG && !COMPILED) {
/**
* @public
* @override
*/
proto.cc.arduino.cli.commands.v1.MonitorPortConfiguration.displayName = 'proto.cc.arduino.cli.commands.v1.MonitorPortConfiguration';
}
/**
* 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.MonitorPortSetting = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(proto.cc.arduino.cli.commands.v1.MonitorPortSetting, jspb.Message);
if (goog.DEBUG && !COMPILED) {
/**
* @public
* @override
*/
proto.cc.arduino.cli.commands.v1.MonitorPortSetting.displayName = 'proto.cc.arduino.cli.commands.v1.MonitorPortSetting';
}
/**
* Generated by JsPbCodeGenerator.
* @param {Array=} opt_data Optional initial data array, typically from a
@@ -2616,7 +2638,7 @@ proto.cc.arduino.cli.commands.v1.PlatformRelease.toObject = function(includeInst
var f, obj = {
name: jspb.Message.getFieldWithDefault(msg, 1, ""),
version: jspb.Message.getFieldWithDefault(msg, 2, ""),
typeList: (f = jspb.Message.getRepeatedField(msg, 3)) == null ? undefined : f,
typesList: (f = jspb.Message.getRepeatedField(msg, 3)) == null ? undefined : f,
installed: jspb.Message.getBooleanFieldWithDefault(msg, 4, false),
boardsList: jspb.Message.toObjectList(msg.getBoardsList(),
proto.cc.arduino.cli.commands.v1.Board.toObject, includeInstance),
@@ -2670,7 +2692,7 @@ proto.cc.arduino.cli.commands.v1.PlatformRelease.deserializeBinaryFromReader = f
break;
case 3:
var value = /** @type {string} */ (reader.readString());
msg.addType(value);
msg.addTypes(value);
break;
case 4:
var value = /** @type {boolean} */ (reader.readBool());
@@ -2741,7 +2763,7 @@ proto.cc.arduino.cli.commands.v1.PlatformRelease.serializeBinaryToWriter = funct
f
);
}
f = message.getTypeList();
f = message.getTypesList();
if (f.length > 0) {
writer.writeRepeatedString(
3,
@@ -2832,10 +2854,10 @@ proto.cc.arduino.cli.commands.v1.PlatformRelease.prototype.setVersion = function
/**
* repeated string type = 3;
* repeated string types = 3;
* @return {!Array<string>}
*/
proto.cc.arduino.cli.commands.v1.PlatformRelease.prototype.getTypeList = function() {
proto.cc.arduino.cli.commands.v1.PlatformRelease.prototype.getTypesList = function() {
return /** @type {!Array<string>} */ (jspb.Message.getRepeatedField(this, 3));
};
@@ -2844,7 +2866,7 @@ proto.cc.arduino.cli.commands.v1.PlatformRelease.prototype.getTypeList = functio
* @param {!Array<string>} value
* @return {!proto.cc.arduino.cli.commands.v1.PlatformRelease} returns this
*/
proto.cc.arduino.cli.commands.v1.PlatformRelease.prototype.setTypeList = function(value) {
proto.cc.arduino.cli.commands.v1.PlatformRelease.prototype.setTypesList = function(value) {
return jspb.Message.setField(this, 3, value || []);
};
@@ -2854,7 +2876,7 @@ proto.cc.arduino.cli.commands.v1.PlatformRelease.prototype.setTypeList = functio
* @param {number=} opt_index
* @return {!proto.cc.arduino.cli.commands.v1.PlatformRelease} returns this
*/
proto.cc.arduino.cli.commands.v1.PlatformRelease.prototype.addType = function(value, opt_index) {
proto.cc.arduino.cli.commands.v1.PlatformRelease.prototype.addTypes = function(value, opt_index) {
return jspb.Message.addToRepeatedField(this, 3, value, opt_index);
};
@@ -2863,8 +2885,8 @@ proto.cc.arduino.cli.commands.v1.PlatformRelease.prototype.addType = function(va
* Clears the list making it empty but non-null.
* @return {!proto.cc.arduino.cli.commands.v1.PlatformRelease} returns this
*/
proto.cc.arduino.cli.commands.v1.PlatformRelease.prototype.clearTypeList = function() {
return this.setTypeList([]);
proto.cc.arduino.cli.commands.v1.PlatformRelease.prototype.clearTypesList = function() {
return this.setTypesList([]);
};
@@ -3398,166 +3420,6 @@ proto.cc.arduino.cli.commands.v1.Board.prototype.setFqbn = function(value) {
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.Profile.prototype.toObject = function(opt_includeInstance) {
return proto.cc.arduino.cli.commands.v1.Profile.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.Profile} msg The msg instance to transform.
* @return {!Object}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.cc.arduino.cli.commands.v1.Profile.toObject = function(includeInstance, msg) {
var f, obj = {
name: jspb.Message.getFieldWithDefault(msg, 1, ""),
fqbn: jspb.Message.getFieldWithDefault(msg, 2, "")
};
if (includeInstance) {
obj.$jspbMessageInstance = msg;
}
return obj;
};
}
/**
* Deserializes binary data (in protobuf wire format).
* @param {jspb.ByteSource} bytes The bytes to deserialize.
* @return {!proto.cc.arduino.cli.commands.v1.Profile}
*/
proto.cc.arduino.cli.commands.v1.Profile.deserializeBinary = function(bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.cc.arduino.cli.commands.v1.Profile;
return proto.cc.arduino.cli.commands.v1.Profile.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.Profile} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.cc.arduino.cli.commands.v1.Profile}
*/
proto.cc.arduino.cli.commands.v1.Profile.deserializeBinaryFromReader = function(msg, reader) {
while (reader.nextField()) {
if (reader.isEndGroup()) {
break;
}
var field = reader.getFieldNumber();
switch (field) {
case 1:
var value = /** @type {string} */ (reader.readString());
msg.setName(value);
break;
case 2:
var value = /** @type {string} */ (reader.readString());
msg.setFqbn(value);
break;
default:
reader.skipField();
break;
}
}
return msg;
};
/**
* Serializes the message to binary data (in protobuf wire format).
* @return {!Uint8Array}
*/
proto.cc.arduino.cli.commands.v1.Profile.prototype.serializeBinary = function() {
var writer = new jspb.BinaryWriter();
proto.cc.arduino.cli.commands.v1.Profile.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.Profile} message
* @param {!jspb.BinaryWriter} writer
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.cc.arduino.cli.commands.v1.Profile.serializeBinaryToWriter = function(message, writer) {
var f = undefined;
f = message.getName();
if (f.length > 0) {
writer.writeString(
1,
f
);
}
f = message.getFqbn();
if (f.length > 0) {
writer.writeString(
2,
f
);
}
};
/**
* optional string name = 1;
* @return {string}
*/
proto.cc.arduino.cli.commands.v1.Profile.prototype.getName = function() {
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
};
/**
* @param {string} value
* @return {!proto.cc.arduino.cli.commands.v1.Profile} returns this
*/
proto.cc.arduino.cli.commands.v1.Profile.prototype.setName = function(value) {
return jspb.Message.setProto3StringField(this, 1, value);
};
/**
* optional string fqbn = 2;
* @return {string}
*/
proto.cc.arduino.cli.commands.v1.Profile.prototype.getFqbn = function() {
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
};
/**
* @param {string} value
* @return {!proto.cc.arduino.cli.commands.v1.Profile} returns this
*/
proto.cc.arduino.cli.commands.v1.Profile.prototype.setFqbn = function(value) {
return jspb.Message.setProto3StringField(this, 2, value);
};
if (jspb.Message.GENERATE_TO_OBJECT) {
/**
* Creates an object representation of this proto.
@@ -3734,7 +3596,9 @@ proto.cc.arduino.cli.commands.v1.Sketch.toObject = function(includeInstance, msg
defaultProtocol: jspb.Message.getFieldWithDefault(msg, 8, ""),
profilesList: jspb.Message.toObjectList(msg.getProfilesList(),
proto.cc.arduino.cli.commands.v1.SketchProfile.toObject, includeInstance),
defaultProfile: (f = msg.getDefaultProfile()) && proto.cc.arduino.cli.commands.v1.SketchProfile.toObject(includeInstance, f)
defaultProfile: (f = msg.getDefaultProfile()) && proto.cc.arduino.cli.commands.v1.SketchProfile.toObject(includeInstance, f),
defaultProgrammer: jspb.Message.getFieldWithDefault(msg, 11, ""),
defaultPortConfig: (f = msg.getDefaultPortConfig()) && proto.cc.arduino.cli.commands.v1.MonitorPortConfiguration.toObject(includeInstance, f)
};
if (includeInstance) {
@@ -3813,6 +3677,15 @@ proto.cc.arduino.cli.commands.v1.Sketch.deserializeBinaryFromReader = function(m
reader.readMessage(value,proto.cc.arduino.cli.commands.v1.SketchProfile.deserializeBinaryFromReader);
msg.setDefaultProfile(value);
break;
case 11:
var value = /** @type {string} */ (reader.readString());
msg.setDefaultProgrammer(value);
break;
case 12:
var value = new proto.cc.arduino.cli.commands.v1.MonitorPortConfiguration;
reader.readMessage(value,proto.cc.arduino.cli.commands.v1.MonitorPortConfiguration.deserializeBinaryFromReader);
msg.setDefaultPortConfig(value);
break;
default:
reader.skipField();
break;
@@ -3914,6 +3787,21 @@ proto.cc.arduino.cli.commands.v1.Sketch.serializeBinaryToWriter = function(messa
proto.cc.arduino.cli.commands.v1.SketchProfile.serializeBinaryToWriter
);
}
f = message.getDefaultProgrammer();
if (f.length > 0) {
writer.writeString(
11,
f
);
}
f = message.getDefaultPortConfig();
if (f != null) {
writer.writeMessage(
12,
f,
proto.cc.arduino.cli.commands.v1.MonitorPortConfiguration.serializeBinaryToWriter
);
}
};
@@ -4193,6 +4081,381 @@ proto.cc.arduino.cli.commands.v1.Sketch.prototype.hasDefaultProfile = function()
};
/**
* optional string default_programmer = 11;
* @return {string}
*/
proto.cc.arduino.cli.commands.v1.Sketch.prototype.getDefaultProgrammer = function() {
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 11, ""));
};
/**
* @param {string} value
* @return {!proto.cc.arduino.cli.commands.v1.Sketch} returns this
*/
proto.cc.arduino.cli.commands.v1.Sketch.prototype.setDefaultProgrammer = function(value) {
return jspb.Message.setProto3StringField(this, 11, value);
};
/**
* optional MonitorPortConfiguration default_port_config = 12;
* @return {?proto.cc.arduino.cli.commands.v1.MonitorPortConfiguration}
*/
proto.cc.arduino.cli.commands.v1.Sketch.prototype.getDefaultPortConfig = function() {
return /** @type{?proto.cc.arduino.cli.commands.v1.MonitorPortConfiguration} */ (
jspb.Message.getWrapperField(this, proto.cc.arduino.cli.commands.v1.MonitorPortConfiguration, 12));
};
/**
* @param {?proto.cc.arduino.cli.commands.v1.MonitorPortConfiguration|undefined} value
* @return {!proto.cc.arduino.cli.commands.v1.Sketch} returns this
*/
proto.cc.arduino.cli.commands.v1.Sketch.prototype.setDefaultPortConfig = function(value) {
return jspb.Message.setWrapperField(this, 12, value);
};
/**
* Clears the message field making it undefined.
* @return {!proto.cc.arduino.cli.commands.v1.Sketch} returns this
*/
proto.cc.arduino.cli.commands.v1.Sketch.prototype.clearDefaultPortConfig = function() {
return this.setDefaultPortConfig(undefined);
};
/**
* Returns whether this field is set.
* @return {boolean}
*/
proto.cc.arduino.cli.commands.v1.Sketch.prototype.hasDefaultPortConfig = function() {
return jspb.Message.getField(this, 12) != null;
};
/**
* List of repeated fields within this message type.
* @private {!Array<number>}
* @const
*/
proto.cc.arduino.cli.commands.v1.MonitorPortConfiguration.repeatedFields_ = [1];
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.MonitorPortConfiguration.prototype.toObject = function(opt_includeInstance) {
return proto.cc.arduino.cli.commands.v1.MonitorPortConfiguration.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.MonitorPortConfiguration} msg The msg instance to transform.
* @return {!Object}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.cc.arduino.cli.commands.v1.MonitorPortConfiguration.toObject = function(includeInstance, msg) {
var f, obj = {
settingsList: jspb.Message.toObjectList(msg.getSettingsList(),
proto.cc.arduino.cli.commands.v1.MonitorPortSetting.toObject, includeInstance)
};
if (includeInstance) {
obj.$jspbMessageInstance = msg;
}
return obj;
};
}
/**
* Deserializes binary data (in protobuf wire format).
* @param {jspb.ByteSource} bytes The bytes to deserialize.
* @return {!proto.cc.arduino.cli.commands.v1.MonitorPortConfiguration}
*/
proto.cc.arduino.cli.commands.v1.MonitorPortConfiguration.deserializeBinary = function(bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.cc.arduino.cli.commands.v1.MonitorPortConfiguration;
return proto.cc.arduino.cli.commands.v1.MonitorPortConfiguration.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.MonitorPortConfiguration} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.cc.arduino.cli.commands.v1.MonitorPortConfiguration}
*/
proto.cc.arduino.cli.commands.v1.MonitorPortConfiguration.deserializeBinaryFromReader = function(msg, reader) {
while (reader.nextField()) {
if (reader.isEndGroup()) {
break;
}
var field = reader.getFieldNumber();
switch (field) {
case 1:
var value = new proto.cc.arduino.cli.commands.v1.MonitorPortSetting;
reader.readMessage(value,proto.cc.arduino.cli.commands.v1.MonitorPortSetting.deserializeBinaryFromReader);
msg.addSettings(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.MonitorPortConfiguration.prototype.serializeBinary = function() {
var writer = new jspb.BinaryWriter();
proto.cc.arduino.cli.commands.v1.MonitorPortConfiguration.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.MonitorPortConfiguration} message
* @param {!jspb.BinaryWriter} writer
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.cc.arduino.cli.commands.v1.MonitorPortConfiguration.serializeBinaryToWriter = function(message, writer) {
var f = undefined;
f = message.getSettingsList();
if (f.length > 0) {
writer.writeRepeatedMessage(
1,
f,
proto.cc.arduino.cli.commands.v1.MonitorPortSetting.serializeBinaryToWriter
);
}
};
/**
* repeated MonitorPortSetting settings = 1;
* @return {!Array<!proto.cc.arduino.cli.commands.v1.MonitorPortSetting>}
*/
proto.cc.arduino.cli.commands.v1.MonitorPortConfiguration.prototype.getSettingsList = function() {
return /** @type{!Array<!proto.cc.arduino.cli.commands.v1.MonitorPortSetting>} */ (
jspb.Message.getRepeatedWrapperField(this, proto.cc.arduino.cli.commands.v1.MonitorPortSetting, 1));
};
/**
* @param {!Array<!proto.cc.arduino.cli.commands.v1.MonitorPortSetting>} value
* @return {!proto.cc.arduino.cli.commands.v1.MonitorPortConfiguration} returns this
*/
proto.cc.arduino.cli.commands.v1.MonitorPortConfiguration.prototype.setSettingsList = function(value) {
return jspb.Message.setRepeatedWrapperField(this, 1, value);
};
/**
* @param {!proto.cc.arduino.cli.commands.v1.MonitorPortSetting=} opt_value
* @param {number=} opt_index
* @return {!proto.cc.arduino.cli.commands.v1.MonitorPortSetting}
*/
proto.cc.arduino.cli.commands.v1.MonitorPortConfiguration.prototype.addSettings = function(opt_value, opt_index) {
return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.cc.arduino.cli.commands.v1.MonitorPortSetting, opt_index);
};
/**
* Clears the list making it empty but non-null.
* @return {!proto.cc.arduino.cli.commands.v1.MonitorPortConfiguration} returns this
*/
proto.cc.arduino.cli.commands.v1.MonitorPortConfiguration.prototype.clearSettingsList = function() {
return this.setSettingsList([]);
};
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.MonitorPortSetting.prototype.toObject = function(opt_includeInstance) {
return proto.cc.arduino.cli.commands.v1.MonitorPortSetting.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.MonitorPortSetting} msg The msg instance to transform.
* @return {!Object}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.cc.arduino.cli.commands.v1.MonitorPortSetting.toObject = function(includeInstance, msg) {
var f, obj = {
settingId: jspb.Message.getFieldWithDefault(msg, 1, ""),
value: jspb.Message.getFieldWithDefault(msg, 2, "")
};
if (includeInstance) {
obj.$jspbMessageInstance = msg;
}
return obj;
};
}
/**
* Deserializes binary data (in protobuf wire format).
* @param {jspb.ByteSource} bytes The bytes to deserialize.
* @return {!proto.cc.arduino.cli.commands.v1.MonitorPortSetting}
*/
proto.cc.arduino.cli.commands.v1.MonitorPortSetting.deserializeBinary = function(bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.cc.arduino.cli.commands.v1.MonitorPortSetting;
return proto.cc.arduino.cli.commands.v1.MonitorPortSetting.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.MonitorPortSetting} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.cc.arduino.cli.commands.v1.MonitorPortSetting}
*/
proto.cc.arduino.cli.commands.v1.MonitorPortSetting.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.setSettingId(value);
break;
case 2:
var value = /** @type {string} */ (reader.readString());
msg.setValue(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.MonitorPortSetting.prototype.serializeBinary = function() {
var writer = new jspb.BinaryWriter();
proto.cc.arduino.cli.commands.v1.MonitorPortSetting.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.MonitorPortSetting} message
* @param {!jspb.BinaryWriter} writer
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.cc.arduino.cli.commands.v1.MonitorPortSetting.serializeBinaryToWriter = function(message, writer) {
var f = undefined;
f = message.getSettingId();
if (f.length > 0) {
writer.writeString(
1,
f
);
}
f = message.getValue();
if (f.length > 0) {
writer.writeString(
2,
f
);
}
};
/**
* optional string setting_id = 1;
* @return {string}
*/
proto.cc.arduino.cli.commands.v1.MonitorPortSetting.prototype.getSettingId = function() {
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
};
/**
* @param {string} value
* @return {!proto.cc.arduino.cli.commands.v1.MonitorPortSetting} returns this
*/
proto.cc.arduino.cli.commands.v1.MonitorPortSetting.prototype.setSettingId = function(value) {
return jspb.Message.setProto3StringField(this, 1, value);
};
/**
* optional string value = 2;
* @return {string}
*/
proto.cc.arduino.cli.commands.v1.MonitorPortSetting.prototype.getValue = function() {
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
};
/**
* @param {string} value
* @return {!proto.cc.arduino.cli.commands.v1.MonitorPortSetting} returns this
*/
proto.cc.arduino.cli.commands.v1.MonitorPortSetting.prototype.setValue = function(value) {
return jspb.Message.setProto3StringField(this, 2, value);
};
@@ -4226,7 +4489,11 @@ proto.cc.arduino.cli.commands.v1.SketchProfile.prototype.toObject = function(opt
proto.cc.arduino.cli.commands.v1.SketchProfile.toObject = function(includeInstance, msg) {
var f, obj = {
name: jspb.Message.getFieldWithDefault(msg, 1, ""),
fqbn: jspb.Message.getFieldWithDefault(msg, 2, "")
fqbn: jspb.Message.getFieldWithDefault(msg, 2, ""),
programmer: jspb.Message.getFieldWithDefault(msg, 3, ""),
port: jspb.Message.getFieldWithDefault(msg, 4, ""),
portConfig: (f = msg.getPortConfig()) && proto.cc.arduino.cli.commands.v1.MonitorPortConfiguration.toObject(includeInstance, f),
protocol: jspb.Message.getFieldWithDefault(msg, 6, "")
};
if (includeInstance) {
@@ -4271,6 +4538,23 @@ proto.cc.arduino.cli.commands.v1.SketchProfile.deserializeBinaryFromReader = fun
var value = /** @type {string} */ (reader.readString());
msg.setFqbn(value);
break;
case 3:
var value = /** @type {string} */ (reader.readString());
msg.setProgrammer(value);
break;
case 4:
var value = /** @type {string} */ (reader.readString());
msg.setPort(value);
break;
case 5:
var value = new proto.cc.arduino.cli.commands.v1.MonitorPortConfiguration;
reader.readMessage(value,proto.cc.arduino.cli.commands.v1.MonitorPortConfiguration.deserializeBinaryFromReader);
msg.setPortConfig(value);
break;
case 6:
var value = /** @type {string} */ (reader.readString());
msg.setProtocol(value);
break;
default:
reader.skipField();
break;
@@ -4314,6 +4598,35 @@ proto.cc.arduino.cli.commands.v1.SketchProfile.serializeBinaryToWriter = functio
f
);
}
f = message.getProgrammer();
if (f.length > 0) {
writer.writeString(
3,
f
);
}
f = message.getPort();
if (f.length > 0) {
writer.writeString(
4,
f
);
}
f = message.getPortConfig();
if (f != null) {
writer.writeMessage(
5,
f,
proto.cc.arduino.cli.commands.v1.MonitorPortConfiguration.serializeBinaryToWriter
);
}
f = message.getProtocol();
if (f.length > 0) {
writer.writeString(
6,
f
);
}
};
@@ -4353,4 +4666,95 @@ proto.cc.arduino.cli.commands.v1.SketchProfile.prototype.setFqbn = function(valu
};
/**
* optional string programmer = 3;
* @return {string}
*/
proto.cc.arduino.cli.commands.v1.SketchProfile.prototype.getProgrammer = function() {
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, ""));
};
/**
* @param {string} value
* @return {!proto.cc.arduino.cli.commands.v1.SketchProfile} returns this
*/
proto.cc.arduino.cli.commands.v1.SketchProfile.prototype.setProgrammer = function(value) {
return jspb.Message.setProto3StringField(this, 3, value);
};
/**
* optional string port = 4;
* @return {string}
*/
proto.cc.arduino.cli.commands.v1.SketchProfile.prototype.getPort = function() {
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, ""));
};
/**
* @param {string} value
* @return {!proto.cc.arduino.cli.commands.v1.SketchProfile} returns this
*/
proto.cc.arduino.cli.commands.v1.SketchProfile.prototype.setPort = function(value) {
return jspb.Message.setProto3StringField(this, 4, value);
};
/**
* optional MonitorPortConfiguration port_config = 5;
* @return {?proto.cc.arduino.cli.commands.v1.MonitorPortConfiguration}
*/
proto.cc.arduino.cli.commands.v1.SketchProfile.prototype.getPortConfig = function() {
return /** @type{?proto.cc.arduino.cli.commands.v1.MonitorPortConfiguration} */ (
jspb.Message.getWrapperField(this, proto.cc.arduino.cli.commands.v1.MonitorPortConfiguration, 5));
};
/**
* @param {?proto.cc.arduino.cli.commands.v1.MonitorPortConfiguration|undefined} value
* @return {!proto.cc.arduino.cli.commands.v1.SketchProfile} returns this
*/
proto.cc.arduino.cli.commands.v1.SketchProfile.prototype.setPortConfig = function(value) {
return jspb.Message.setWrapperField(this, 5, value);
};
/**
* Clears the message field making it undefined.
* @return {!proto.cc.arduino.cli.commands.v1.SketchProfile} returns this
*/
proto.cc.arduino.cli.commands.v1.SketchProfile.prototype.clearPortConfig = function() {
return this.setPortConfig(undefined);
};
/**
* Returns whether this field is set.
* @return {boolean}
*/
proto.cc.arduino.cli.commands.v1.SketchProfile.prototype.hasPortConfig = function() {
return jspb.Message.getField(this, 5) != null;
};
/**
* optional string protocol = 6;
* @return {string}
*/
proto.cc.arduino.cli.commands.v1.SketchProfile.prototype.getProtocol = function() {
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 6, ""));
};
/**
* @param {string} value
* @return {!proto.cc.arduino.cli.commands.v1.SketchProfile} returns this
*/
proto.cc.arduino.cli.commands.v1.SketchProfile.prototype.setProtocol = function(value) {
return jspb.Message.setProto3StringField(this, 6, value);
};
goog.object.extend(exports, proto.cc.arduino.cli.commands.v1);

View File

@@ -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,13 +108,14 @@ 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>,
}
}
@@ -171,6 +175,23 @@ export namespace CompileResponse {
}
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;

View File

@@ -21,8 +21,6 @@ var global = (function() {
return Function('return this')();
}.call(null));
var google_protobuf_wrappers_pb = require('google-protobuf/google/protobuf/wrappers_pb.js');
goog.object.extend(proto, google_protobuf_wrappers_pb);
var cc_arduino_cli_commands_v1_common_pb = require('../../../../../cc/arduino/cli/commands/v1/common_pb.js');
goog.object.extend(proto, cc_arduino_cli_commands_v1_common_pb);
var cc_arduino_cli_commands_v1_lib_pb = require('../../../../../cc/arduino/cli/commands/v1/lib_pb.js');
@@ -35,6 +33,7 @@ goog.exportSymbol('proto.cc.arduino.cli.commands.v1.CompileRequest', null, globa
goog.exportSymbol('proto.cc.arduino.cli.commands.v1.CompileResponse', null, global);
goog.exportSymbol('proto.cc.arduino.cli.commands.v1.CompileResponse.MessageCase', null, global);
goog.exportSymbol('proto.cc.arduino.cli.commands.v1.ExecutableSectionSize', null, global);
goog.exportSymbol('proto.cc.arduino.cli.commands.v1.InstanceNeedsReinitializationError', null, global);
/**
* Generated by JsPbCodeGenerator.
* @param {Array=} opt_data Optional initial data array, typically from a
@@ -77,6 +76,27 @@ if (goog.DEBUG && !COMPILED) {
*/
proto.cc.arduino.cli.commands.v1.CompileResponse.displayName = 'proto.cc.arduino.cli.commands.v1.CompileResponse';
}
/**
* 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.InstanceNeedsReinitializationError = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(proto.cc.arduino.cli.commands.v1.InstanceNeedsReinitializationError, jspb.Message);
if (goog.DEBUG && !COMPILED) {
/**
* @public
* @override
*/
proto.cc.arduino.cli.commands.v1.InstanceNeedsReinitializationError.displayName = 'proto.cc.arduino.cli.commands.v1.InstanceNeedsReinitializationError';
}
/**
* Generated by JsPbCodeGenerator.
* @param {Array=} opt_data Optional initial data array, typically from a
@@ -188,7 +208,7 @@ if (goog.DEBUG && !COMPILED) {
* @private {!Array<number>}
* @const
*/
proto.cc.arduino.cli.commands.v1.CompileRequest.repeatedFields_ = [8,15,24];
proto.cc.arduino.cli.commands.v1.CompileRequest.repeatedFields_ = [8,15,24,30];
@@ -239,13 +259,14 @@ proto.cc.arduino.cli.commands.v1.CompileRequest.toObject = function(includeInsta
clean: jspb.Message.getBooleanFieldWithDefault(msg, 19, false),
createCompilationDatabaseOnly: jspb.Message.getBooleanFieldWithDefault(msg, 21, false),
sourceOverrideMap: (f = msg.getSourceOverrideMap()) ? f.toObject(includeInstance, undefined) : [],
exportBinaries: (f = msg.getExportBinaries()) && google_protobuf_wrappers_pb.BoolValue.toObject(includeInstance, f),
exportBinaries: jspb.Message.getBooleanFieldWithDefault(msg, 23, false),
libraryList: (f = jspb.Message.getRepeatedField(msg, 24)) == null ? undefined : f,
keysKeychain: jspb.Message.getFieldWithDefault(msg, 25, ""),
signKey: jspb.Message.getFieldWithDefault(msg, 26, ""),
encryptKey: jspb.Message.getFieldWithDefault(msg, 27, ""),
skipLibrariesDiscovery: jspb.Message.getBooleanFieldWithDefault(msg, 28, false),
doNotExpandBuildProperties: jspb.Message.getBooleanFieldWithDefault(msg, 29, false)
doNotExpandBuildProperties: jspb.Message.getBooleanFieldWithDefault(msg, 29, false),
buildCacheExtraPathsList: (f = jspb.Message.getRepeatedField(msg, 30)) == null ? undefined : f
};
if (includeInstance) {
@@ -358,8 +379,7 @@ proto.cc.arduino.cli.commands.v1.CompileRequest.deserializeBinaryFromReader = fu
});
break;
case 23:
var value = new google_protobuf_wrappers_pb.BoolValue;
reader.readMessage(value,google_protobuf_wrappers_pb.BoolValue.deserializeBinaryFromReader);
var value = /** @type {boolean} */ (reader.readBool());
msg.setExportBinaries(value);
break;
case 24:
@@ -386,6 +406,10 @@ proto.cc.arduino.cli.commands.v1.CompileRequest.deserializeBinaryFromReader = fu
var value = /** @type {boolean} */ (reader.readBool());
msg.setDoNotExpandBuildProperties(value);
break;
case 30:
var value = /** @type {string} */ (reader.readString());
msg.addBuildCacheExtraPaths(value);
break;
default:
reader.skipField();
break;
@@ -539,12 +563,11 @@ proto.cc.arduino.cli.commands.v1.CompileRequest.serializeBinaryToWriter = functi
if (f && f.getLength() > 0) {
f.serializeBinary(22, writer, jspb.BinaryWriter.prototype.writeString, jspb.BinaryWriter.prototype.writeString);
}
f = message.getExportBinaries();
f = /** @type {boolean} */ (jspb.Message.getField(message, 23));
if (f != null) {
writer.writeMessage(
writer.writeBool(
23,
f,
google_protobuf_wrappers_pb.BoolValue.serializeBinaryToWriter
f
);
}
f = message.getLibraryList();
@@ -589,6 +612,13 @@ proto.cc.arduino.cli.commands.v1.CompileRequest.serializeBinaryToWriter = functi
f
);
}
f = message.getBuildCacheExtraPathsList();
if (f.length > 0) {
writer.writeRepeatedString(
30,
f
);
}
};
@@ -978,30 +1008,29 @@ proto.cc.arduino.cli.commands.v1.CompileRequest.prototype.clearSourceOverrideMap
/**
* optional google.protobuf.BoolValue export_binaries = 23;
* @return {?proto.google.protobuf.BoolValue}
* optional bool export_binaries = 23;
* @return {boolean}
*/
proto.cc.arduino.cli.commands.v1.CompileRequest.prototype.getExportBinaries = function() {
return /** @type{?proto.google.protobuf.BoolValue} */ (
jspb.Message.getWrapperField(this, google_protobuf_wrappers_pb.BoolValue, 23));
return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 23, false));
};
/**
* @param {?proto.google.protobuf.BoolValue|undefined} value
* @param {boolean} value
* @return {!proto.cc.arduino.cli.commands.v1.CompileRequest} returns this
*/
*/
proto.cc.arduino.cli.commands.v1.CompileRequest.prototype.setExportBinaries = function(value) {
return jspb.Message.setWrapperField(this, 23, value);
return jspb.Message.setField(this, 23, value);
};
/**
* Clears the message field making it undefined.
* Clears the field making it undefined.
* @return {!proto.cc.arduino.cli.commands.v1.CompileRequest} returns this
*/
proto.cc.arduino.cli.commands.v1.CompileRequest.prototype.clearExportBinaries = function() {
return this.setExportBinaries(undefined);
return jspb.Message.setField(this, 23, undefined);
};
@@ -1141,6 +1170,43 @@ proto.cc.arduino.cli.commands.v1.CompileRequest.prototype.setDoNotExpandBuildPro
};
/**
* repeated string build_cache_extra_paths = 30;
* @return {!Array<string>}
*/
proto.cc.arduino.cli.commands.v1.CompileRequest.prototype.getBuildCacheExtraPathsList = function() {
return /** @type {!Array<string>} */ (jspb.Message.getRepeatedField(this, 30));
};
/**
* @param {!Array<string>} value
* @return {!proto.cc.arduino.cli.commands.v1.CompileRequest} returns this
*/
proto.cc.arduino.cli.commands.v1.CompileRequest.prototype.setBuildCacheExtraPathsList = function(value) {
return jspb.Message.setField(this, 30, value || []);
};
/**
* @param {string} value
* @param {number=} opt_index
* @return {!proto.cc.arduino.cli.commands.v1.CompileRequest} returns this
*/
proto.cc.arduino.cli.commands.v1.CompileRequest.prototype.addBuildCacheExtraPaths = function(value, opt_index) {
return jspb.Message.addToRepeatedField(this, 30, value, opt_index);
};
/**
* Clears the list making it empty but non-null.
* @return {!proto.cc.arduino.cli.commands.v1.CompileRequest} returns this
*/
proto.cc.arduino.cli.commands.v1.CompileRequest.prototype.clearBuildCacheExtraPathsList = function() {
return this.setBuildCacheExtraPathsList([]);
};
/**
* Oneof group definitions for this message. Each group defines the field
@@ -1516,6 +1582,107 @@ proto.cc.arduino.cli.commands.v1.CompileResponse.prototype.hasResult = function(
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.InstanceNeedsReinitializationError.prototype.toObject = function(opt_includeInstance) {
return proto.cc.arduino.cli.commands.v1.InstanceNeedsReinitializationError.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.InstanceNeedsReinitializationError} msg The msg instance to transform.
* @return {!Object}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.cc.arduino.cli.commands.v1.InstanceNeedsReinitializationError.toObject = function(includeInstance, msg) {
var f, obj = {
};
if (includeInstance) {
obj.$jspbMessageInstance = msg;
}
return obj;
};
}
/**
* Deserializes binary data (in protobuf wire format).
* @param {jspb.ByteSource} bytes The bytes to deserialize.
* @return {!proto.cc.arduino.cli.commands.v1.InstanceNeedsReinitializationError}
*/
proto.cc.arduino.cli.commands.v1.InstanceNeedsReinitializationError.deserializeBinary = function(bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.cc.arduino.cli.commands.v1.InstanceNeedsReinitializationError;
return proto.cc.arduino.cli.commands.v1.InstanceNeedsReinitializationError.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.InstanceNeedsReinitializationError} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.cc.arduino.cli.commands.v1.InstanceNeedsReinitializationError}
*/
proto.cc.arduino.cli.commands.v1.InstanceNeedsReinitializationError.deserializeBinaryFromReader = function(msg, reader) {
while (reader.nextField()) {
if (reader.isEndGroup()) {
break;
}
var field = reader.getFieldNumber();
switch (field) {
default:
reader.skipField();
break;
}
}
return msg;
};
/**
* Serializes the message to binary data (in protobuf wire format).
* @return {!Uint8Array}
*/
proto.cc.arduino.cli.commands.v1.InstanceNeedsReinitializationError.prototype.serializeBinary = function() {
var writer = new jspb.BinaryWriter();
proto.cc.arduino.cli.commands.v1.InstanceNeedsReinitializationError.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.InstanceNeedsReinitializationError} message
* @param {!jspb.BinaryWriter} writer
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.cc.arduino.cli.commands.v1.InstanceNeedsReinitializationError.serializeBinaryToWriter = function(message, writer) {
var f = undefined;
};
/**
* List of repeated fields within this message type.
* @private {!Array<number>}

View File

@@ -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 {

View File

@@ -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>,
}
}

View File

@@ -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([]);
};

View File

@@ -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 {
@@ -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 {

View File

@@ -24,8 +24,8 @@ export class MonitorRequest extends jspb.Message {
hasUpdatedConfiguration(): boolean;
clearUpdatedConfiguration(): void;
getUpdatedConfiguration(): MonitorPortConfiguration | undefined;
setUpdatedConfiguration(value?: MonitorPortConfiguration): MonitorRequest;
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;
@@ -48,7 +48,7 @@ export namespace MonitorRequest {
export type AsObject = {
openRequest?: MonitorPortOpenRequest.AsObject,
txData: Uint8Array | string,
updatedConfiguration?: MonitorPortConfiguration.AsObject,
updatedConfiguration?: cc_arduino_cli_commands_v1_common_pb.MonitorPortConfiguration.AsObject,
close: boolean,
}
@@ -78,8 +78,8 @@ export class MonitorPortOpenRequest extends jspb.Message {
hasPortConfiguration(): boolean;
clearPortConfiguration(): void;
getPortConfiguration(): MonitorPortConfiguration | undefined;
setPortConfiguration(value?: MonitorPortConfiguration): MonitorPortOpenRequest;
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;
@@ -96,46 +96,36 @@ export namespace MonitorPortOpenRequest {
instance?: cc_arduino_cli_commands_v1_common_pb.Instance.AsObject,
port?: cc_arduino_cli_commands_v1_port_pb.Port.AsObject,
fqbn: 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;
@@ -150,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 {

View File

@@ -27,13 +27,12 @@ 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.EnumerateMonitorPortSettingsRequest', null, global);
goog.exportSymbol('proto.cc.arduino.cli.commands.v1.EnumerateMonitorPortSettingsResponse', null, global);
goog.exportSymbol('proto.cc.arduino.cli.commands.v1.MonitorPortConfiguration', null, global);
goog.exportSymbol('proto.cc.arduino.cli.commands.v1.MonitorPortOpenRequest', null, global);
goog.exportSymbol('proto.cc.arduino.cli.commands.v1.MonitorPortSetting', null, global);
goog.exportSymbol('proto.cc.arduino.cli.commands.v1.MonitorPortSettingDescriptor', null, global);
goog.exportSymbol('proto.cc.arduino.cli.commands.v1.MonitorRequest', null, global);
goog.exportSymbol('proto.cc.arduino.cli.commands.v1.MonitorRequest.MessageCase', null, global);
goog.exportSymbol('proto.cc.arduino.cli.commands.v1.MonitorResponse', null, global);
goog.exportSymbol('proto.cc.arduino.cli.commands.v1.MonitorResponse.MessageCase', null, global);
/**
* Generated by JsPbCodeGenerator.
* @param {Array=} opt_data Optional initial data array, typically from a
@@ -76,27 +75,6 @@ if (goog.DEBUG && !COMPILED) {
*/
proto.cc.arduino.cli.commands.v1.MonitorPortOpenRequest.displayName = 'proto.cc.arduino.cli.commands.v1.MonitorPortOpenRequest';
}
/**
* 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.MonitorPortConfiguration = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, proto.cc.arduino.cli.commands.v1.MonitorPortConfiguration.repeatedFields_, null);
};
goog.inherits(proto.cc.arduino.cli.commands.v1.MonitorPortConfiguration, jspb.Message);
if (goog.DEBUG && !COMPILED) {
/**
* @public
* @override
*/
proto.cc.arduino.cli.commands.v1.MonitorPortConfiguration.displayName = 'proto.cc.arduino.cli.commands.v1.MonitorPortConfiguration';
}
/**
* Generated by JsPbCodeGenerator.
* @param {Array=} opt_data Optional initial data array, typically from a
@@ -108,7 +86,7 @@ if (goog.DEBUG && !COMPILED) {
* @constructor
*/
proto.cc.arduino.cli.commands.v1.MonitorResponse = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, proto.cc.arduino.cli.commands.v1.MonitorResponse.repeatedFields_, null);
jspb.Message.initialize(this, opt_data, 0, -1, null, proto.cc.arduino.cli.commands.v1.MonitorResponse.oneofGroups_);
};
goog.inherits(proto.cc.arduino.cli.commands.v1.MonitorResponse, jspb.Message);
if (goog.DEBUG && !COMPILED) {
@@ -118,27 +96,6 @@ if (goog.DEBUG && !COMPILED) {
*/
proto.cc.arduino.cli.commands.v1.MonitorResponse.displayName = 'proto.cc.arduino.cli.commands.v1.MonitorResponse';
}
/**
* 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.MonitorPortSetting = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(proto.cc.arduino.cli.commands.v1.MonitorPortSetting, jspb.Message);
if (goog.DEBUG && !COMPILED) {
/**
* @public
* @override
*/
proto.cc.arduino.cli.commands.v1.MonitorPortSetting.displayName = 'proto.cc.arduino.cli.commands.v1.MonitorPortSetting';
}
/**
* Generated by JsPbCodeGenerator.
* @param {Array=} opt_data Optional initial data array, typically from a
@@ -264,7 +221,7 @@ proto.cc.arduino.cli.commands.v1.MonitorRequest.toObject = function(includeInsta
var f, obj = {
openRequest: (f = msg.getOpenRequest()) && proto.cc.arduino.cli.commands.v1.MonitorPortOpenRequest.toObject(includeInstance, f),
txData: msg.getTxData_asB64(),
updatedConfiguration: (f = msg.getUpdatedConfiguration()) && proto.cc.arduino.cli.commands.v1.MonitorPortConfiguration.toObject(includeInstance, f),
updatedConfiguration: (f = msg.getUpdatedConfiguration()) && cc_arduino_cli_commands_v1_common_pb.MonitorPortConfiguration.toObject(includeInstance, f),
close: jspb.Message.getBooleanFieldWithDefault(msg, 4, false)
};
@@ -312,8 +269,8 @@ proto.cc.arduino.cli.commands.v1.MonitorRequest.deserializeBinaryFromReader = fu
msg.setTxData(value);
break;
case 3:
var value = new proto.cc.arduino.cli.commands.v1.MonitorPortConfiguration;
reader.readMessage(value,proto.cc.arduino.cli.commands.v1.MonitorPortConfiguration.deserializeBinaryFromReader);
var value = new cc_arduino_cli_commands_v1_common_pb.MonitorPortConfiguration;
reader.readMessage(value,cc_arduino_cli_commands_v1_common_pb.MonitorPortConfiguration.deserializeBinaryFromReader);
msg.setUpdatedConfiguration(value);
break;
case 4:
@@ -369,7 +326,7 @@ proto.cc.arduino.cli.commands.v1.MonitorRequest.serializeBinaryToWriter = functi
writer.writeMessage(
3,
f,
proto.cc.arduino.cli.commands.v1.MonitorPortConfiguration.serializeBinaryToWriter
cc_arduino_cli_commands_v1_common_pb.MonitorPortConfiguration.serializeBinaryToWriter
);
}
f = /** @type {boolean} */ (jspb.Message.getField(message, 4));
@@ -485,7 +442,7 @@ proto.cc.arduino.cli.commands.v1.MonitorRequest.prototype.hasTxData = function()
*/
proto.cc.arduino.cli.commands.v1.MonitorRequest.prototype.getUpdatedConfiguration = function() {
return /** @type{?proto.cc.arduino.cli.commands.v1.MonitorPortConfiguration} */ (
jspb.Message.getWrapperField(this, proto.cc.arduino.cli.commands.v1.MonitorPortConfiguration, 3));
jspb.Message.getWrapperField(this, cc_arduino_cli_commands_v1_common_pb.MonitorPortConfiguration, 3));
};
@@ -587,7 +544,7 @@ proto.cc.arduino.cli.commands.v1.MonitorPortOpenRequest.toObject = function(incl
instance: (f = msg.getInstance()) && cc_arduino_cli_commands_v1_common_pb.Instance.toObject(includeInstance, f),
port: (f = msg.getPort()) && cc_arduino_cli_commands_v1_port_pb.Port.toObject(includeInstance, f),
fqbn: jspb.Message.getFieldWithDefault(msg, 3, ""),
portConfiguration: (f = msg.getPortConfiguration()) && proto.cc.arduino.cli.commands.v1.MonitorPortConfiguration.toObject(includeInstance, f)
portConfiguration: (f = msg.getPortConfiguration()) && cc_arduino_cli_commands_v1_common_pb.MonitorPortConfiguration.toObject(includeInstance, f)
};
if (includeInstance) {
@@ -639,8 +596,8 @@ proto.cc.arduino.cli.commands.v1.MonitorPortOpenRequest.deserializeBinaryFromRea
msg.setFqbn(value);
break;
case 4:
var value = new proto.cc.arduino.cli.commands.v1.MonitorPortConfiguration;
reader.readMessage(value,proto.cc.arduino.cli.commands.v1.MonitorPortConfiguration.deserializeBinaryFromReader);
var value = new cc_arduino_cli_commands_v1_common_pb.MonitorPortConfiguration;
reader.readMessage(value,cc_arduino_cli_commands_v1_common_pb.MonitorPortConfiguration.deserializeBinaryFromReader);
msg.setPortConfiguration(value);
break;
default:
@@ -700,7 +657,7 @@ proto.cc.arduino.cli.commands.v1.MonitorPortOpenRequest.serializeBinaryToWriter
writer.writeMessage(
4,
f,
proto.cc.arduino.cli.commands.v1.MonitorPortConfiguration.serializeBinaryToWriter
cc_arduino_cli_commands_v1_common_pb.MonitorPortConfiguration.serializeBinaryToWriter
);
}
};
@@ -804,7 +761,7 @@ proto.cc.arduino.cli.commands.v1.MonitorPortOpenRequest.prototype.setFqbn = func
*/
proto.cc.arduino.cli.commands.v1.MonitorPortOpenRequest.prototype.getPortConfiguration = function() {
return /** @type{?proto.cc.arduino.cli.commands.v1.MonitorPortConfiguration} */ (
jspb.Message.getWrapperField(this, proto.cc.arduino.cli.commands.v1.MonitorPortConfiguration, 4));
jspb.Message.getWrapperField(this, cc_arduino_cli_commands_v1_common_pb.MonitorPortConfiguration, 4));
};
@@ -837,171 +794,32 @@ proto.cc.arduino.cli.commands.v1.MonitorPortOpenRequest.prototype.hasPortConfigu
/**
* List of repeated fields within this message type.
* @private {!Array<number>}
* 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.MonitorPortConfiguration.repeatedFields_ = [1];
proto.cc.arduino.cli.commands.v1.MonitorResponse.oneofGroups_ = [[1,2,3,4]];
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}
* @enum {number}
*/
proto.cc.arduino.cli.commands.v1.MonitorPortConfiguration.prototype.toObject = function(opt_includeInstance) {
return proto.cc.arduino.cli.commands.v1.MonitorPortConfiguration.toObject(opt_includeInstance, this);
proto.cc.arduino.cli.commands.v1.MonitorResponse.MessageCase = {
MESSAGE_NOT_SET: 0,
ERROR: 1,
RX_DATA: 2,
APPLIED_SETTINGS: 3,
SUCCESS: 4
};
/**
* 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.MonitorPortConfiguration} msg The msg instance to transform.
* @return {!Object}
* @suppress {unusedLocalVariables} f is only used for nested messages
* @return {proto.cc.arduino.cli.commands.v1.MonitorResponse.MessageCase}
*/
proto.cc.arduino.cli.commands.v1.MonitorPortConfiguration.toObject = function(includeInstance, msg) {
var f, obj = {
settingsList: jspb.Message.toObjectList(msg.getSettingsList(),
proto.cc.arduino.cli.commands.v1.MonitorPortSetting.toObject, includeInstance)
};
if (includeInstance) {
obj.$jspbMessageInstance = msg;
}
return obj;
proto.cc.arduino.cli.commands.v1.MonitorResponse.prototype.getMessageCase = function() {
return /** @type {proto.cc.arduino.cli.commands.v1.MonitorResponse.MessageCase} */(jspb.Message.computeOneofCase(this, proto.cc.arduino.cli.commands.v1.MonitorResponse.oneofGroups_[0]));
};
}
/**
* Deserializes binary data (in protobuf wire format).
* @param {jspb.ByteSource} bytes The bytes to deserialize.
* @return {!proto.cc.arduino.cli.commands.v1.MonitorPortConfiguration}
*/
proto.cc.arduino.cli.commands.v1.MonitorPortConfiguration.deserializeBinary = function(bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.cc.arduino.cli.commands.v1.MonitorPortConfiguration;
return proto.cc.arduino.cli.commands.v1.MonitorPortConfiguration.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.MonitorPortConfiguration} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.cc.arduino.cli.commands.v1.MonitorPortConfiguration}
*/
proto.cc.arduino.cli.commands.v1.MonitorPortConfiguration.deserializeBinaryFromReader = function(msg, reader) {
while (reader.nextField()) {
if (reader.isEndGroup()) {
break;
}
var field = reader.getFieldNumber();
switch (field) {
case 1:
var value = new proto.cc.arduino.cli.commands.v1.MonitorPortSetting;
reader.readMessage(value,proto.cc.arduino.cli.commands.v1.MonitorPortSetting.deserializeBinaryFromReader);
msg.addSettings(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.MonitorPortConfiguration.prototype.serializeBinary = function() {
var writer = new jspb.BinaryWriter();
proto.cc.arduino.cli.commands.v1.MonitorPortConfiguration.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.MonitorPortConfiguration} message
* @param {!jspb.BinaryWriter} writer
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.cc.arduino.cli.commands.v1.MonitorPortConfiguration.serializeBinaryToWriter = function(message, writer) {
var f = undefined;
f = message.getSettingsList();
if (f.length > 0) {
writer.writeRepeatedMessage(
1,
f,
proto.cc.arduino.cli.commands.v1.MonitorPortSetting.serializeBinaryToWriter
);
}
};
/**
* repeated MonitorPortSetting settings = 1;
* @return {!Array<!proto.cc.arduino.cli.commands.v1.MonitorPortSetting>}
*/
proto.cc.arduino.cli.commands.v1.MonitorPortConfiguration.prototype.getSettingsList = function() {
return /** @type{!Array<!proto.cc.arduino.cli.commands.v1.MonitorPortSetting>} */ (
jspb.Message.getRepeatedWrapperField(this, proto.cc.arduino.cli.commands.v1.MonitorPortSetting, 1));
};
/**
* @param {!Array<!proto.cc.arduino.cli.commands.v1.MonitorPortSetting>} value
* @return {!proto.cc.arduino.cli.commands.v1.MonitorPortConfiguration} returns this
*/
proto.cc.arduino.cli.commands.v1.MonitorPortConfiguration.prototype.setSettingsList = function(value) {
return jspb.Message.setRepeatedWrapperField(this, 1, value);
};
/**
* @param {!proto.cc.arduino.cli.commands.v1.MonitorPortSetting=} opt_value
* @param {number=} opt_index
* @return {!proto.cc.arduino.cli.commands.v1.MonitorPortSetting}
*/
proto.cc.arduino.cli.commands.v1.MonitorPortConfiguration.prototype.addSettings = function(opt_value, opt_index) {
return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.cc.arduino.cli.commands.v1.MonitorPortSetting, opt_index);
};
/**
* Clears the list making it empty but non-null.
* @return {!proto.cc.arduino.cli.commands.v1.MonitorPortConfiguration} returns this
*/
proto.cc.arduino.cli.commands.v1.MonitorPortConfiguration.prototype.clearSettingsList = function() {
return this.setSettingsList([]);
};
/**
* List of repeated fields within this message type.
* @private {!Array<number>}
* @const
*/
proto.cc.arduino.cli.commands.v1.MonitorResponse.repeatedFields_ = [3];
@@ -1036,8 +854,7 @@ proto.cc.arduino.cli.commands.v1.MonitorResponse.toObject = function(includeInst
var f, obj = {
error: jspb.Message.getFieldWithDefault(msg, 1, ""),
rxData: msg.getRxData_asB64(),
appliedSettingsList: jspb.Message.toObjectList(msg.getAppliedSettingsList(),
proto.cc.arduino.cli.commands.v1.MonitorPortSetting.toObject, includeInstance),
appliedSettings: (f = msg.getAppliedSettings()) && cc_arduino_cli_commands_v1_common_pb.MonitorPortConfiguration.toObject(includeInstance, f),
success: jspb.Message.getBooleanFieldWithDefault(msg, 4, false)
};
@@ -1084,9 +901,9 @@ proto.cc.arduino.cli.commands.v1.MonitorResponse.deserializeBinaryFromReader = f
msg.setRxData(value);
break;
case 3:
var value = new proto.cc.arduino.cli.commands.v1.MonitorPortSetting;
reader.readMessage(value,proto.cc.arduino.cli.commands.v1.MonitorPortSetting.deserializeBinaryFromReader);
msg.addAppliedSettings(value);
var value = new cc_arduino_cli_commands_v1_common_pb.MonitorPortConfiguration;
reader.readMessage(value,cc_arduino_cli_commands_v1_common_pb.MonitorPortConfiguration.deserializeBinaryFromReader);
msg.setAppliedSettings(value);
break;
case 4:
var value = /** @type {boolean} */ (reader.readBool());
@@ -1121,30 +938,30 @@ proto.cc.arduino.cli.commands.v1.MonitorResponse.prototype.serializeBinary = fun
*/
proto.cc.arduino.cli.commands.v1.MonitorResponse.serializeBinaryToWriter = function(message, writer) {
var f = undefined;
f = message.getError();
if (f.length > 0) {
f = /** @type {string} */ (jspb.Message.getField(message, 1));
if (f != null) {
writer.writeString(
1,
f
);
}
f = message.getRxData_asU8();
if (f.length > 0) {
f = /** @type {!(string|Uint8Array)} */ (jspb.Message.getField(message, 2));
if (f != null) {
writer.writeBytes(
2,
f
);
}
f = message.getAppliedSettingsList();
if (f.length > 0) {
writer.writeRepeatedMessage(
f = message.getAppliedSettings();
if (f != null) {
writer.writeMessage(
3,
f,
proto.cc.arduino.cli.commands.v1.MonitorPortSetting.serializeBinaryToWriter
cc_arduino_cli_commands_v1_common_pb.MonitorPortConfiguration.serializeBinaryToWriter
);
}
f = message.getSuccess();
if (f) {
f = /** @type {boolean} */ (jspb.Message.getField(message, 4));
if (f != null) {
writer.writeBool(
4,
f
@@ -1167,7 +984,25 @@ proto.cc.arduino.cli.commands.v1.MonitorResponse.prototype.getError = function()
* @return {!proto.cc.arduino.cli.commands.v1.MonitorResponse} returns this
*/
proto.cc.arduino.cli.commands.v1.MonitorResponse.prototype.setError = function(value) {
return jspb.Message.setProto3StringField(this, 1, value);
return jspb.Message.setOneofField(this, 1, proto.cc.arduino.cli.commands.v1.MonitorResponse.oneofGroups_[0], value);
};
/**
* Clears the field making it undefined.
* @return {!proto.cc.arduino.cli.commands.v1.MonitorResponse} returns this
*/
proto.cc.arduino.cli.commands.v1.MonitorResponse.prototype.clearError = function() {
return jspb.Message.setOneofField(this, 1, proto.cc.arduino.cli.commands.v1.MonitorResponse.oneofGroups_[0], undefined);
};
/**
* Returns whether this field is set.
* @return {boolean}
*/
proto.cc.arduino.cli.commands.v1.MonitorResponse.prototype.hasError = function() {
return jspb.Message.getField(this, 1) != null;
};
@@ -1209,45 +1044,62 @@ proto.cc.arduino.cli.commands.v1.MonitorResponse.prototype.getRxData_asU8 = func
* @return {!proto.cc.arduino.cli.commands.v1.MonitorResponse} returns this
*/
proto.cc.arduino.cli.commands.v1.MonitorResponse.prototype.setRxData = function(value) {
return jspb.Message.setProto3BytesField(this, 2, value);
return jspb.Message.setOneofField(this, 2, proto.cc.arduino.cli.commands.v1.MonitorResponse.oneofGroups_[0], value);
};
/**
* repeated MonitorPortSetting applied_settings = 3;
* @return {!Array<!proto.cc.arduino.cli.commands.v1.MonitorPortSetting>}
* Clears the field making it undefined.
* @return {!proto.cc.arduino.cli.commands.v1.MonitorResponse} returns this
*/
proto.cc.arduino.cli.commands.v1.MonitorResponse.prototype.getAppliedSettingsList = function() {
return /** @type{!Array<!proto.cc.arduino.cli.commands.v1.MonitorPortSetting>} */ (
jspb.Message.getRepeatedWrapperField(this, proto.cc.arduino.cli.commands.v1.MonitorPortSetting, 3));
proto.cc.arduino.cli.commands.v1.MonitorResponse.prototype.clearRxData = function() {
return jspb.Message.setOneofField(this, 2, proto.cc.arduino.cli.commands.v1.MonitorResponse.oneofGroups_[0], undefined);
};
/**
* @param {!Array<!proto.cc.arduino.cli.commands.v1.MonitorPortSetting>} value
* Returns whether this field is set.
* @return {boolean}
*/
proto.cc.arduino.cli.commands.v1.MonitorResponse.prototype.hasRxData = function() {
return jspb.Message.getField(this, 2) != null;
};
/**
* optional MonitorPortConfiguration applied_settings = 3;
* @return {?proto.cc.arduino.cli.commands.v1.MonitorPortConfiguration}
*/
proto.cc.arduino.cli.commands.v1.MonitorResponse.prototype.getAppliedSettings = function() {
return /** @type{?proto.cc.arduino.cli.commands.v1.MonitorPortConfiguration} */ (
jspb.Message.getWrapperField(this, cc_arduino_cli_commands_v1_common_pb.MonitorPortConfiguration, 3));
};
/**
* @param {?proto.cc.arduino.cli.commands.v1.MonitorPortConfiguration|undefined} value
* @return {!proto.cc.arduino.cli.commands.v1.MonitorResponse} returns this
*/
proto.cc.arduino.cli.commands.v1.MonitorResponse.prototype.setAppliedSettingsList = function(value) {
return jspb.Message.setRepeatedWrapperField(this, 3, value);
proto.cc.arduino.cli.commands.v1.MonitorResponse.prototype.setAppliedSettings = function(value) {
return jspb.Message.setOneofWrapperField(this, 3, proto.cc.arduino.cli.commands.v1.MonitorResponse.oneofGroups_[0], value);
};
/**
* @param {!proto.cc.arduino.cli.commands.v1.MonitorPortSetting=} opt_value
* @param {number=} opt_index
* @return {!proto.cc.arduino.cli.commands.v1.MonitorPortSetting}
*/
proto.cc.arduino.cli.commands.v1.MonitorResponse.prototype.addAppliedSettings = function(opt_value, opt_index) {
return jspb.Message.addToRepeatedWrapperField(this, 3, opt_value, proto.cc.arduino.cli.commands.v1.MonitorPortSetting, opt_index);
};
/**
* Clears the list making it empty but non-null.
* Clears the message field making it undefined.
* @return {!proto.cc.arduino.cli.commands.v1.MonitorResponse} returns this
*/
proto.cc.arduino.cli.commands.v1.MonitorResponse.prototype.clearAppliedSettingsList = function() {
return this.setAppliedSettingsList([]);
proto.cc.arduino.cli.commands.v1.MonitorResponse.prototype.clearAppliedSettings = function() {
return this.setAppliedSettings(undefined);
};
/**
* Returns whether this field is set.
* @return {boolean}
*/
proto.cc.arduino.cli.commands.v1.MonitorResponse.prototype.hasAppliedSettings = function() {
return jspb.Message.getField(this, 3) != null;
};
@@ -1265,167 +1117,25 @@ proto.cc.arduino.cli.commands.v1.MonitorResponse.prototype.getSuccess = function
* @return {!proto.cc.arduino.cli.commands.v1.MonitorResponse} returns this
*/
proto.cc.arduino.cli.commands.v1.MonitorResponse.prototype.setSuccess = function(value) {
return jspb.Message.setProto3BooleanField(this, 4, value);
};
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.MonitorPortSetting.prototype.toObject = function(opt_includeInstance) {
return proto.cc.arduino.cli.commands.v1.MonitorPortSetting.toObject(opt_includeInstance, this);
return jspb.Message.setOneofField(this, 4, proto.cc.arduino.cli.commands.v1.MonitorResponse.oneofGroups_[0], value);
};
/**
* 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.MonitorPortSetting} msg The msg instance to transform.
* @return {!Object}
* @suppress {unusedLocalVariables} f is only used for nested messages
* Clears the field making it undefined.
* @return {!proto.cc.arduino.cli.commands.v1.MonitorResponse} returns this
*/
proto.cc.arduino.cli.commands.v1.MonitorPortSetting.toObject = function(includeInstance, msg) {
var f, obj = {
settingId: jspb.Message.getFieldWithDefault(msg, 1, ""),
value: jspb.Message.getFieldWithDefault(msg, 2, "")
};
if (includeInstance) {
obj.$jspbMessageInstance = msg;
}
return obj;
};
}
/**
* Deserializes binary data (in protobuf wire format).
* @param {jspb.ByteSource} bytes The bytes to deserialize.
* @return {!proto.cc.arduino.cli.commands.v1.MonitorPortSetting}
*/
proto.cc.arduino.cli.commands.v1.MonitorPortSetting.deserializeBinary = function(bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.cc.arduino.cli.commands.v1.MonitorPortSetting;
return proto.cc.arduino.cli.commands.v1.MonitorPortSetting.deserializeBinaryFromReader(msg, reader);
proto.cc.arduino.cli.commands.v1.MonitorResponse.prototype.clearSuccess = function() {
return jspb.Message.setOneofField(this, 4, proto.cc.arduino.cli.commands.v1.MonitorResponse.oneofGroups_[0], undefined);
};
/**
* Deserializes binary data (in protobuf wire format) from the
* given reader into the given message object.
* @param {!proto.cc.arduino.cli.commands.v1.MonitorPortSetting} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.cc.arduino.cli.commands.v1.MonitorPortSetting}
* Returns whether this field is set.
* @return {boolean}
*/
proto.cc.arduino.cli.commands.v1.MonitorPortSetting.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.setSettingId(value);
break;
case 2:
var value = /** @type {string} */ (reader.readString());
msg.setValue(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.MonitorPortSetting.prototype.serializeBinary = function() {
var writer = new jspb.BinaryWriter();
proto.cc.arduino.cli.commands.v1.MonitorPortSetting.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.MonitorPortSetting} message
* @param {!jspb.BinaryWriter} writer
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.cc.arduino.cli.commands.v1.MonitorPortSetting.serializeBinaryToWriter = function(message, writer) {
var f = undefined;
f = message.getSettingId();
if (f.length > 0) {
writer.writeString(
1,
f
);
}
f = message.getValue();
if (f.length > 0) {
writer.writeString(
2,
f
);
}
};
/**
* optional string setting_id = 1;
* @return {string}
*/
proto.cc.arduino.cli.commands.v1.MonitorPortSetting.prototype.getSettingId = function() {
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
};
/**
* @param {string} value
* @return {!proto.cc.arduino.cli.commands.v1.MonitorPortSetting} returns this
*/
proto.cc.arduino.cli.commands.v1.MonitorPortSetting.prototype.setSettingId = function(value) {
return jspb.Message.setProto3StringField(this, 1, value);
};
/**
* optional string value = 2;
* @return {string}
*/
proto.cc.arduino.cli.commands.v1.MonitorPortSetting.prototype.getValue = function() {
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
};
/**
* @param {string} value
* @return {!proto.cc.arduino.cli.commands.v1.MonitorPortSetting} returns this
*/
proto.cc.arduino.cli.commands.v1.MonitorPortSetting.prototype.setValue = function(value) {
return jspb.Message.setProto3StringField(this, 2, value);
proto.cc.arduino.cli.commands.v1.MonitorResponse.prototype.hasSuccess = function() {
return jspb.Message.getField(this, 4) != null;
};

View File

@@ -6,112 +6,481 @@
import * as jspb from "google-protobuf";
export class SettingsGetAllResponse extends jspb.Message {
getJsonData(): string;
setJsonData(value: string): SettingsGetAllResponse;
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): SettingsGetAllResponse.AsObject;
static toObject(includeInstance: boolean, msg: SettingsGetAllResponse): SettingsGetAllResponse.AsObject;
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: SettingsGetAllResponse, writer: jspb.BinaryWriter): void;
static deserializeBinary(bytes: Uint8Array): SettingsGetAllResponse;
static deserializeBinaryFromReader(message: SettingsGetAllResponse, reader: jspb.BinaryReader): SettingsGetAllResponse;
static serializeBinaryToWriter(message: Configuration, writer: jspb.BinaryWriter): void;
static deserializeBinary(bytes: Uint8Array): Configuration;
static deserializeBinaryFromReader(message: Configuration, reader: jspb.BinaryReader): Configuration;
}
export namespace SettingsGetAllResponse {
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 = {
jsonData: string,
}
}
export class SettingsMergeRequest extends jspb.Message {
getJsonData(): string;
setJsonData(value: string): SettingsMergeRequest;
export class ConfigurationGetResponse extends jspb.Message {
hasConfiguration(): boolean;
clearConfiguration(): void;
getConfiguration(): Configuration | undefined;
setConfiguration(value?: Configuration): ConfigurationGetResponse;
serializeBinary(): Uint8Array;
toObject(includeInstance?: boolean): SettingsMergeRequest.AsObject;
static toObject(includeInstance: boolean, msg: SettingsMergeRequest): SettingsMergeRequest.AsObject;
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: SettingsMergeRequest, writer: jspb.BinaryWriter): void;
static deserializeBinary(bytes: Uint8Array): SettingsMergeRequest;
static deserializeBinaryFromReader(message: SettingsMergeRequest, reader: jspb.BinaryReader): SettingsMergeRequest;
static serializeBinaryToWriter(message: ConfigurationGetResponse, writer: jspb.BinaryWriter): void;
static deserializeBinary(bytes: Uint8Array): ConfigurationGetResponse;
static deserializeBinaryFromReader(message: ConfigurationGetResponse, reader: jspb.BinaryReader): ConfigurationGetResponse;
}
export namespace SettingsMergeRequest {
export namespace ConfigurationGetResponse {
export type AsObject = {
jsonData: string,
configuration?: Configuration.AsObject,
}
}
export class SettingsGetValueResponse extends jspb.Message {
getKey(): string;
setKey(value: string): SettingsGetValueResponse;
getJsonData(): string;
setJsonData(value: string): SettingsGetValueResponse;
export class ConfigurationSaveRequest extends jspb.Message {
getSettingsFormat(): string;
setSettingsFormat(value: string): ConfigurationSaveRequest;
serializeBinary(): Uint8Array;
toObject(includeInstance?: boolean): SettingsGetValueResponse.AsObject;
static toObject(includeInstance: boolean, msg: SettingsGetValueResponse): SettingsGetValueResponse.AsObject;
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: SettingsGetValueResponse, writer: jspb.BinaryWriter): void;
static deserializeBinary(bytes: Uint8Array): SettingsGetValueResponse;
static deserializeBinaryFromReader(message: SettingsGetValueResponse, reader: jspb.BinaryReader): SettingsGetValueResponse;
static serializeBinaryToWriter(message: ConfigurationSaveRequest, writer: jspb.BinaryWriter): void;
static deserializeBinary(bytes: Uint8Array): ConfigurationSaveRequest;
static deserializeBinaryFromReader(message: ConfigurationSaveRequest, reader: jspb.BinaryReader): ConfigurationSaveRequest;
}
export namespace SettingsGetValueResponse {
export namespace ConfigurationSaveRequest {
export type AsObject = {
key: string,
jsonData: string,
settingsFormat: string,
}
}
export class SettingsSetValueRequest extends jspb.Message {
getKey(): string;
setKey(value: string): SettingsSetValueRequest;
getJsonData(): string;
setJsonData(value: string): SettingsSetValueRequest;
export class ConfigurationSaveResponse extends jspb.Message {
getEncodedSettings(): string;
setEncodedSettings(value: string): ConfigurationSaveResponse;
serializeBinary(): Uint8Array;
toObject(includeInstance?: boolean): SettingsSetValueRequest.AsObject;
static toObject(includeInstance: boolean, msg: SettingsSetValueRequest): SettingsSetValueRequest.AsObject;
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: SettingsSetValueRequest, writer: jspb.BinaryWriter): void;
static deserializeBinary(bytes: Uint8Array): SettingsSetValueRequest;
static deserializeBinaryFromReader(message: SettingsSetValueRequest, reader: jspb.BinaryReader): SettingsSetValueRequest;
static serializeBinaryToWriter(message: ConfigurationSaveResponse, writer: jspb.BinaryWriter): void;
static deserializeBinary(bytes: Uint8Array): ConfigurationSaveResponse;
static deserializeBinaryFromReader(message: ConfigurationSaveResponse, reader: jspb.BinaryReader): ConfigurationSaveResponse;
}
export namespace SettingsSetValueRequest {
export namespace ConfigurationSaveResponse {
export type AsObject = {
key: string,
jsonData: string,
encodedSettings: string,
}
}
export class SettingsGetAllRequest extends jspb.Message {
export class ConfigurationOpenRequest extends jspb.Message {
getEncodedSettings(): string;
setEncodedSettings(value: string): ConfigurationOpenRequest;
getSettingsFormat(): string;
setSettingsFormat(value: string): ConfigurationOpenRequest;
serializeBinary(): Uint8Array;
toObject(includeInstance?: boolean): SettingsGetAllRequest.AsObject;
static toObject(includeInstance: boolean, msg: SettingsGetAllRequest): SettingsGetAllRequest.AsObject;
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: SettingsGetAllRequest, writer: jspb.BinaryWriter): void;
static deserializeBinary(bytes: Uint8Array): SettingsGetAllRequest;
static deserializeBinaryFromReader(message: SettingsGetAllRequest, reader: jspb.BinaryReader): SettingsGetAllRequest;
static serializeBinaryToWriter(message: ConfigurationOpenRequest, writer: jspb.BinaryWriter): void;
static deserializeBinary(bytes: Uint8Array): ConfigurationOpenRequest;
static deserializeBinaryFromReader(message: ConfigurationOpenRequest, reader: jspb.BinaryReader): ConfigurationOpenRequest;
}
export namespace SettingsGetAllRequest {
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;
@@ -126,23 +495,53 @@ export class SettingsGetValueRequest extends jspb.Message {
export namespace SettingsGetValueRequest {
export type AsObject = {
key: string,
valueFormat: string,
}
}
export class SettingsMergeResponse extends jspb.Message {
export class SettingsGetValueResponse extends jspb.Message {
getEncodedValue(): string;
setEncodedValue(value: string): SettingsGetValueResponse;
serializeBinary(): Uint8Array;
toObject(includeInstance?: boolean): SettingsMergeResponse.AsObject;
static toObject(includeInstance: boolean, msg: SettingsMergeResponse): SettingsMergeResponse.AsObject;
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: SettingsMergeResponse, writer: jspb.BinaryWriter): void;
static deserializeBinary(bytes: Uint8Array): SettingsMergeResponse;
static deserializeBinaryFromReader(message: SettingsMergeResponse, reader: jspb.BinaryReader): SettingsMergeResponse;
static serializeBinaryToWriter(message: SettingsGetValueResponse, writer: jspb.BinaryWriter): void;
static deserializeBinary(bytes: Uint8Array): SettingsGetValueResponse;
static deserializeBinaryFromReader(message: SettingsGetValueResponse, reader: jspb.BinaryReader): SettingsGetValueResponse;
}
export namespace SettingsMergeResponse {
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,
}
}
@@ -163,76 +562,66 @@ export namespace SettingsSetValueResponse {
}
}
export class SettingsWriteRequest extends jspb.Message {
getFilePath(): string;
setFilePath(value: string): SettingsWriteRequest;
export class SettingsEnumerateRequest extends jspb.Message {
serializeBinary(): Uint8Array;
toObject(includeInstance?: boolean): SettingsWriteRequest.AsObject;
static toObject(includeInstance: boolean, msg: SettingsWriteRequest): SettingsWriteRequest.AsObject;
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: SettingsWriteRequest, writer: jspb.BinaryWriter): void;
static deserializeBinary(bytes: Uint8Array): SettingsWriteRequest;
static deserializeBinaryFromReader(message: SettingsWriteRequest, reader: jspb.BinaryReader): SettingsWriteRequest;
static serializeBinaryToWriter(message: SettingsEnumerateRequest, writer: jspb.BinaryWriter): void;
static deserializeBinary(bytes: Uint8Array): SettingsEnumerateRequest;
static deserializeBinaryFromReader(message: SettingsEnumerateRequest, reader: jspb.BinaryReader): SettingsEnumerateRequest;
}
export namespace SettingsWriteRequest {
export type AsObject = {
filePath: string,
}
}
export class SettingsWriteResponse extends jspb.Message {
serializeBinary(): Uint8Array;
toObject(includeInstance?: boolean): SettingsWriteResponse.AsObject;
static toObject(includeInstance: boolean, msg: SettingsWriteResponse): SettingsWriteResponse.AsObject;
static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};
static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};
static serializeBinaryToWriter(message: SettingsWriteResponse, writer: jspb.BinaryWriter): void;
static deserializeBinary(bytes: Uint8Array): SettingsWriteResponse;
static deserializeBinaryFromReader(message: SettingsWriteResponse, reader: jspb.BinaryReader): SettingsWriteResponse;
}
export namespace SettingsWriteResponse {
export namespace SettingsEnumerateRequest {
export type AsObject = {
}
}
export class SettingsDeleteRequest extends jspb.Message {
getKey(): string;
setKey(value: string): SettingsDeleteRequest;
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): SettingsDeleteRequest.AsObject;
static toObject(includeInstance: boolean, msg: SettingsDeleteRequest): SettingsDeleteRequest.AsObject;
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: SettingsDeleteRequest, writer: jspb.BinaryWriter): void;
static deserializeBinary(bytes: Uint8Array): SettingsDeleteRequest;
static deserializeBinaryFromReader(message: SettingsDeleteRequest, reader: jspb.BinaryReader): SettingsDeleteRequest;
static serializeBinaryToWriter(message: SettingsEnumerateResponse, writer: jspb.BinaryWriter): void;
static deserializeBinary(bytes: Uint8Array): SettingsEnumerateResponse;
static deserializeBinaryFromReader(message: SettingsEnumerateResponse, reader: jspb.BinaryReader): SettingsEnumerateResponse;
}
export namespace SettingsDeleteRequest {
export namespace SettingsEnumerateResponse {
export type AsObject = {
key: string,
entriesList: Array<SettingsEnumerateResponse.Entry.AsObject>,
}
}
export class SettingsDeleteResponse extends jspb.Message {
serializeBinary(): Uint8Array;
toObject(includeInstance?: boolean): SettingsDeleteResponse.AsObject;
static toObject(includeInstance: boolean, msg: SettingsDeleteResponse): SettingsDeleteResponse.AsObject;
static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};
static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};
static serializeBinaryToWriter(message: SettingsDeleteResponse, writer: jspb.BinaryWriter): void;
static deserializeBinary(bytes: Uint8Array): SettingsDeleteResponse;
static deserializeBinaryFromReader(message: SettingsDeleteResponse, reader: jspb.BinaryReader): SettingsDeleteResponse;
}
export class Entry extends jspb.Message {
getKey(): string;
setKey(value: string): Entry;
getType(): string;
setType(value: string): Entry;
export namespace SettingsDeleteResponse {
export type AsObject = {
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,
}
}
}

View File

@@ -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,6 +219,7 @@ export namespace UploadUsingProgrammerRequest {
dryRun: boolean,
userFieldsMap: Array<[string, string]>,
uploadPropertiesList: Array<string>,
}
}
@@ -279,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;
@@ -301,6 +315,7 @@ export namespace BurnBootloaderRequest {
dryRun: boolean,
userFieldsMap: Array<[string, string]>,
uploadPropertiesList: Array<string>,
}
}

View File

@@ -52,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) {
@@ -136,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) {
@@ -178,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) {
@@ -315,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) {
@@ -356,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) {
@@ -441,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;
@@ -546,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
);
}
};
@@ -789,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
@@ -1364,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) {
@@ -1405,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) {
@@ -1490,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;
@@ -1595,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
);
}
};
@@ -1838,6 +1913,43 @@ 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
@@ -2109,6 +2221,13 @@ proto.cc.arduino.cli.commands.v1.UploadUsingProgrammerResponse.prototype.hasErrS
/**
* List of repeated fields within this message type.
* @private {!Array<number>}
* @const
*/
proto.cc.arduino.cli.commands.v1.BurnBootloaderRequest.repeatedFields_ = [12];
if (jspb.Message.GENERATE_TO_OBJECT) {
@@ -2147,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) {
@@ -2220,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;
@@ -2304,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
);
}
};
@@ -2493,6 +2624,43 @@ 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

View File

@@ -16,16 +16,16 @@ import {
} from '../common/protocol';
import { spawnCommand } from './exec-util';
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 {
SettingsMergeRequest,
SettingsWriteRequest,
} from './cli-protocol/cc/arduino/cli/commands/v1/settings_pb';
import { createArduinoCoreServiceClient } from './arduino-core-service-client';
import {
ConfigurationSaveRequest,
SettingsSetValueRequest,
} from './cli-protocol/cc/arduino/cli/commands/v1/settings_pb';
const deepmerge = require('deepmerge');
@@ -180,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.
@@ -217,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> {
@@ -291,48 +295,65 @@ export class ConfigServiceImpl
}
private async updateDaemon(
port: number | number,
port: number,
config: DefaultCliConfig
): Promise<void> {
const client = createArduinoCoreServiceClient({ port });
const req = new SettingsMergeRequest();
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.settingsMerge(req, (error) => {
try {
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) {
reject(error);
return;
this.logger.error(
`Could not update config with key: ${key} and value: ${value}`,
error
);
}
resolve();
} finally {
client.close();
}
});
});
});
}
client.close();
}
private async writeDaemonState(port: number | number): Promise<void> {
private async writeDaemonState(port: number): Promise<void> {
const client = createArduinoCoreServiceClient({ port });
const req = new SettingsWriteRequest();
const cliConfigUri = await this.getCliConfigFileUri();
const cliConfigPath = FileUri.fsPath(cliConfigUri);
req.setFilePath(cliConfigPath);
return new Promise<void>((resolve, reject) => {
client.settingsWrite(req, (error) => {
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();
}
});
});
const cliConfigUri = await this.getCliConfigFileUri();
const cliConfigPath = FileUri.fsPath(cliConfigUri);
await fs.writeFile(cliConfigPath, configRaw, { encoding: 'utf-8' });
}
// #1445

View File

@@ -1,7 +1,6 @@
import type { ClientReadableStream } from '@grpc/grpc-js';
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,
@@ -11,7 +10,6 @@ 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 * as jspb from 'google-protobuf';
import { BoolValue } from 'google-protobuf/google/protobuf/wrappers_pb';
import path from 'node:path';
import {
UploadResponse as ApiUploadResponse,
@@ -37,11 +35,13 @@ 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 { Port as RpcPort } from './cli-protocol/cc/arduino/cli/commands/v1/port_pb';
import {
BurnBootloaderRequest,
BurnBootloaderResponse,
ProgrammerIsRequiredForUploadError,
UploadRequest,
UploadResponse,
UploadUsingProgrammerRequest,
@@ -68,15 +68,13 @@ export class CoreServiceImpl extends CoreClientAware implements CoreService {
private readonly responseService: ResponseService;
@inject(MonitorManager)
private readonly monitorManager: MonitorManager;
@inject(CommandService)
private readonly commandService: CommandService;
@inject(BoardDiscovery)
private readonly boardDiscovery: BoardDiscovery;
async compile(
options: CoreService.Options.Compile,
cancellationToken?: CancellationToken
): Promise<void> {
): Promise<CompileSummary | undefined> {
const coreClient = await this.coreClient;
const { client, instance } = coreClient;
const request = this.compileRequest(options, instance);
@@ -89,88 +87,100 @@ export class CoreServiceImpl extends CoreClientAware implements CoreService {
compileSummaryHandler
);
const toDisposeOnFinally = new DisposableCollection(handler);
return new Promise<void>((resolve, reject) => {
const call = client.compile(request);
if (cancellationToken) {
toDisposeOnFinally.push(
cancellationToken.onCancellationRequested(() => call.cancel())
return new Promise<CompileSummary | undefined>((resolve, reject) => {
let hasRetried = false;
const handleUnexpectedError = (error: Error) => {
console.error(
'Unexpected error occurred while compiling the sketch.',
error
);
}
call
.on('data', handler.onData)
.on('error', (error) => {
if (!ServiceError.is(error)) {
console.error(
'Unexpected error occurred while compiling the sketch.',
error
);
reject(error);
return;
}
if (ServiceError.isCancel(error)) {
console.log(userAbort);
reject(UserAbortApplicationError());
return;
}
const compilerErrors = tryParseError({
content: handler.content,
sketch: options.sketch,
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', () => {
if (isCompileSummary(compileSummary)) {
resolve(compileSummary);
} else {
console.error(
`Have not received the full compile summary from the CLI while running the compilation. ${JSON.stringify(
compileSummary
)}`
);
resolve(undefined);
}
});
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);
};
startCompileStream();
}).finally(() => {
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
)}`
);
} else {
this.fireBuildDidComplete(compileSummary);
}
});
}
// This executes on the frontend, the VS Code extension receives it, and sends an `ino/buildDidComplete` notification to the language server.
private fireBuildDidComplete(compileSummary: CompileSummary): void {
const params = {
...compileSummary,
};
console.info(
`Executing 'arduino.languageserver.notifyBuildDidComplete' with ${JSON.stringify(
params.buildOutputUri
)}`
);
this.commandService
.executeCommand('arduino.languageserver.notifyBuildDidComplete', params)
.catch((err) =>
console.error(
`Unexpected error when firing event on build did complete. ${JSON.stringify(
params.buildOutputUri
)}`,
err
)
);
}
private compileRequest(
options: CoreService.Options.Compile & {
exportBinaries?: boolean;
@@ -195,9 +205,7 @@ 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;
@@ -298,12 +306,24 @@ export class CoreServiceImpl extends CoreClientAware implements CoreService {
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(

View File

@@ -22,9 +22,7 @@ import {
import {
EnumerateMonitorPortSettingsRequest,
EnumerateMonitorPortSettingsResponse,
MonitorPortConfiguration,
MonitorPortOpenRequest,
MonitorPortSetting,
MonitorRequest,
MonitorResponse,
} from './cli-protocol/cc/arduino/cli/commands/v1/monitor_pb';
@@ -39,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 =

View File

@@ -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;

View File

@@ -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,
@@ -668,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();
}
@@ -853,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.
@@ -873,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[]
@@ -974,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;
}

View File

@@ -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;
}

View File

@@ -31,6 +31,7 @@ import {
UpdateArduinoState,
UpdateStateParams,
} from '../../browser/contributions/update-arduino-state';
import { CompileSummaryProvider } from '../../browser/contributions/verify-sketch';
import { NotificationCenter } from '../../browser/notification-center';
import {
CurrentSketch,
@@ -61,10 +62,12 @@ describe('update-arduino-state', function () {
let currentSketchMock: CurrentSketch | undefined;
let sketchDirUriMock: URI | undefined;
let dataDirUriMock: URI | undefined;
let compileSummaryMock: CompileSummary | undefined;
let onCurrentSketchDidChangeEmitter: Emitter<CurrentSketch>;
let onDataDirDidChangeEmitter: Emitter<URI | undefined>;
let onSketchDirDidChangeEmitter: Emitter<URI | undefined>;
let onDataStoreDidChangeEmitter: Emitter<BoardsDataStoreChangeEvent>;
let compileSummaryDidChangeEmitter: Emitter<CompileSummary | undefined>;
beforeEach(async () => {
toDisposeAfterEach = new DisposableCollection();
@@ -76,15 +79,18 @@ describe('update-arduino-state', function () {
currentSketchMock = undefined;
sketchDirUriMock = undefined;
dataDirUriMock = undefined;
compileSummaryMock = undefined;
onCurrentSketchDidChangeEmitter = new Emitter();
onDataDirDidChangeEmitter = new Emitter();
onSketchDirDidChangeEmitter = new Emitter();
onDataStoreDidChangeEmitter = new Emitter();
compileSummaryDidChangeEmitter = new Emitter();
toDisposeAfterEach.pushAll([
onCurrentSketchDidChangeEmitter,
onDataDirDidChangeEmitter,
onSketchDirDidChangeEmitter,
onDataStoreDidChangeEmitter,
compileSummaryDidChangeEmitter,
]);
const container = createContainer();
@@ -418,10 +424,8 @@ describe('update-arduino-state', function () {
buildPlatform: undefined,
buildOutputUri: 'file:///path/to/build',
};
await commandRegistry.executeCommand(
'arduino.languageserver.notifyBuildDidComplete',
summary
);
compileSummaryMock = summary;
compileSummaryDidChangeEmitter.fire(compileSummaryMock);
await wait(50);
const params = stateUpdateParams.filter(
@@ -585,6 +589,12 @@ describe('update-arduino-state', function () {
new ContainerModule((bind, unbind, isBound, rebind) => {
bindSketchesContribution(bind, unbind, isBound, rebind);
bind(UpdateArduinoState).toSelf().inSingletonScope();
bind(CompileSummaryProvider).toConstantValue(<CompileSummaryProvider>{
get compileSummary(): CompileSummary | undefined {
return compileSummaryMock;
},
onDidChangeCompileSummary: compileSummaryDidChangeEmitter.event,
});
rebind(BoardsService).toConstantValue(<BoardsService>{
getDetectedPorts() {
return {};

View File

@@ -113,13 +113,13 @@ describe('boards-service-impl', () => {
expect(result.length).greaterThan(1);
const lastIndex = result.length - 1;
const last = result[lastIndex];
expect(last.id).to.be.equal('arduino:mbed');
expect(last.id).to.be.equal('Microsoft:win10');
expect(last.deprecated).to.be.true;
const windowsIoTCoreIndex = result.findIndex(
(platform) => platform.id === 'Microsoft:win10'
const arduinoMbedCoreIndex = result.findIndex(
(platform) => platform.id === 'arduino:mbed'
);
expect(windowsIoTCoreIndex).to.be.greaterThanOrEqual(0);
expect(windowsIoTCoreIndex).to.be.lessThan(lastIndex);
expect(arduinoMbedCoreIndex).to.be.greaterThanOrEqual(0);
expect(arduinoMbedCoreIndex).to.be.lessThan(lastIndex);
const first = result[0];
expect(typeof first.deprecated).to.be.equal('boolean');
expect(first.deprecated).to.be.false;

View File

@@ -1,12 +1,11 @@
import { CancellationTokenSource } from '@theia/core/lib/common/cancellation';
import { CommandRegistry } from '@theia/core/lib/common/command';
import { DisposableCollection } from '@theia/core/lib/common/disposable';
import { isWindows } from '@theia/core/lib/common/os';
import { FileUri } from '@theia/core/lib/node/file-uri';
import { Container, injectable } from '@theia/core/shared/inversify';
import { Container } from '@theia/core/shared/inversify';
import { expect } from 'chai';
import {
BoardsService,
CompileSummary,
CoreService,
SketchesService,
isCompileSummary,
@@ -36,11 +35,9 @@ describe('core-service-impl', () => {
this.timeout(testTimeout);
const coreService = container.get<CoreService>(CoreService);
const sketchesService = container.get<SketchesService>(SketchesService);
const commandService =
container.get<TestCommandRegistry>(TestCommandRegistry);
const sketch = await sketchesService.createNewSketch();
await coreService.compile({
const compileSummary = await coreService.compile({
fqbn: uno,
sketch,
optimizeForDebug: false,
@@ -48,27 +45,18 @@ describe('core-service-impl', () => {
verbose: true,
});
const executedBuildDidCompleteCommands =
commandService.executedCommands.filter(
([command]) =>
command === 'arduino.languageserver.notifyBuildDidComplete'
);
expect(executedBuildDidCompleteCommands.length).to.be.equal(1);
const [, args] = executedBuildDidCompleteCommands[0];
expect(args.length).to.be.equal(1);
const arg = args[0];
expect(isCompileSummary(arg)).to.be.true;
expect('buildOutputUri' in arg).to.be.true;
expect(arg.buildOutputUri).to.be.not.undefined;
expect(isCompileSummary(compileSummary)).to.be.true;
expect((<CompileSummary>compileSummary).buildOutputUri).to.be.not
.undefined;
const tempBuildPaths = await sketchesService.tempBuildPath(sketch);
const tempBuildPaths = await sketchesService.getBuildPath(sketch);
if (isWindows) {
expect(tempBuildPaths.length).to.be.greaterThan(1);
} else {
expect(tempBuildPaths.length).to.be.equal(1);
}
const { buildOutputUri } = arg;
const { buildOutputUri } = <CompileSummary>compileSummary;
const buildOutputPath = FileUri.fsPath(buildOutputUri).toString();
expect(tempBuildPaths.includes(buildOutputPath)).to.be.true;
});
@@ -91,35 +79,5 @@ async function start(
}
async function createContainer(): Promise<Container> {
return createBaseContainer({
additionalBindings: (bind, rebind) => {
bind(TestCommandRegistry).toSelf().inSingletonScope();
rebind(CommandRegistry).toService(TestCommandRegistry);
},
});
}
@injectable()
class TestCommandRegistry extends CommandRegistry {
// eslint-disable-next-line @typescript-eslint/no-explicit-any
readonly executedCommands: [string, any[]][] = [];
override async executeCommand<T>(
commandId: string,
// eslint-disable-next-line @typescript-eslint/no-explicit-any
...args: any[]
): Promise<T | undefined> {
const { token } = new CancellationTokenSource();
this.onWillExecuteCommandEmitter.fire({
commandId,
args,
token,
waitUntil: () => {
// NOOP
},
});
this.executedCommands.push([commandId, args]);
this.onDidExecuteCommandEmitter.fire({ commandId, args });
return undefined;
}
return createBaseContainer();
}

View File

@@ -37,7 +37,7 @@ describe('exec-utils', () => {
expect(fs.accessSync(cliCopyPath, fs.constants.X_OK)).to.be.undefined;
expect(cliCopyPath.includes(segment)).to.be.true;
const stdout = await spawnCommand(cliCopyPath, ['version']);
expect(stdout.includes(filename)).to.be.true;
expect(stdout.includes(path.parse(filename).name)).to.be.true;
});
});

View File

@@ -289,7 +289,6 @@ export async function createCliConfig(
const directories = {
data: join(configDirPath, 'data', 'Arduino15'),
downloads: join(configDirPath, 'data', 'Arduino15', 'staging'),
builtin: join(configDirPath, 'data', 'Arduino15', 'libraries'),
user: join(configDirPath, 'user', 'Arduino'),
};
for (const directoryPath of Object.values(directories)) {

64
browser-app/package.json Normal file
View File

@@ -0,0 +1,64 @@
{
"private": true,
"name": "browser-app",
"version": "2.0.0",
"license": "AGPL-3.0-or-later",
"dependencies": {
"@theia/core": "1.41.0",
"@theia/debug": "1.41.0",
"@theia/editor": "1.41.0",
"@theia/file-search": "1.41.0",
"@theia/filesystem": "1.41.0",
"@theia/keymaps": "1.41.0",
"@theia/messages": "1.41.0",
"@theia/monaco": "1.41.0",
"@theia/navigator": "1.41.0",
"@theia/plugin-ext": "1.41.0",
"@theia/plugin-ext-vscode": "1.41.0",
"@theia/preferences": "1.41.0",
"@theia/process": "1.41.0",
"@theia/terminal": "1.41.0",
"@theia/workspace": "1.41.0",
"arduino-ide-extension": "2.3.5"
},
"devDependencies": {
"@theia/cli": "1.41.0"
},
"scripts": {
"build:dev": "theia build --config webpack.config.js --mode development",
"prepare": "theia build --mode development",
"start": "theia start",
"watch": "theia build --watch --mode development"
},
"theia": {
"frontend": {
"config": {
"applicationName": "Arduino IDE",
"defaultTheme": "arduino-theme",
"preferences": {
"files.autoSave": "afterDelay",
"editor.minimap.enabled": false,
"editor.tabSize": 2,
"editor.scrollBeyondLastLine": false,
"editor.quickSuggestions": {
"other": false,
"comments": false,
"strings": false
},
"breadcrumbs.enabled": false
}
}
},
"backend": {
"config": {
"configDirName": ".arduinoIDE"
}
},
"generator": {
"config": {
"preloadTemplate": "<div class='theia-preload' style='background-color: rgb(237, 241, 242);'></div>"
}
}
}
}

View File

@@ -0,0 +1,20 @@
/**
* This file can be edited to customize webpack configuration.
* To reset delete this file and rerun theia build again.
*/
// @ts-check
const config = require('./gen-webpack.config.js');
config[0].resolve.fallback['http'] = false;
config[0].resolve.fallback['fs'] = false;
/**
* Expose bundled modules on window.theia.moduleName namespace, e.g.
* window['theia']['@theia/core/lib/common/uri'].
* Such syntax can be used by external code, for instance, for testing.
config.module.rules.push({
test: /\.js$/,
loader: require.resolve('@theia/application-manager/lib/expose-loader')
}); */
module.exports = config;

View File

@@ -50,6 +50,7 @@ This repository contains the main code, but two more repositories are included d
- To build the application, follow the Theia IDE [prerequisites](https://github.com/eclipse-theia/theia/blob/master/doc/Developing.md#prerequisites).
- This project recommends using [Visual Studio Code (VS Code)](https://code.visualstudio.com/) for the development.
- The build system might also need to build the [Arduino CLI](https://github.com/arduino/arduino-cli), the [Arduino Language Server](https://github.com/arduino/arduino-language-server), and other tools from the sources. In this case it is also necessary to have the build prerequisites for those projects installed. For more details, refer to the Arduino CLI's [prerequisites section](https://arduino.github.io/arduino-cli/latest/CONTRIBUTING/#prerequisites).
## Build from source

View File

@@ -1,7 +1,7 @@
{
"private": true,
"name": "electron-app",
"version": "2.3.3",
"version": "2.3.5",
"license": "AGPL-3.0-or-later",
"main": "./src-gen/backend/electron-main.js",
"dependencies": {
@@ -19,7 +19,7 @@
"@theia/preferences": "1.41.0",
"@theia/terminal": "1.41.0",
"@theia/workspace": "1.41.0",
"arduino-ide-extension": "2.3.3"
"arduino-ide-extension": "2.3.5"
},
"devDependencies": {
"@theia/cli": "1.41.0",
@@ -133,7 +133,8 @@
"msi",
"nsis",
"zip"
]
],
"sign": "./scripts/windowsCustomSign.js"
},
"mac": {
"darkModeSupport": true,

View File

@@ -4,7 +4,7 @@
const isCI = require('is-ci');
const fs = require('fs');
const path = require('path');
const glob = require('glob');
const { glob } = require('glob');
const { isRelease } = require('./utils');
const { isZip, adjustArchiveStructure } = require('./archive');

View File

@@ -0,0 +1,30 @@
const childProcess = require('child_process');
exports.default = async function (configuration) {
if (!process.env.GITHUB_ACTIONS || process.env.CAN_SIGN !== 'true') {
return;
}
const SIGNTOOL_PATH = process.env.SIGNTOOL_PATH;
const INSTALLER_CERT_WINDOWS_CER = process.env.INSTALLER_CERT_WINDOWS_CER;
const CERT_PASSWORD = process.env.WIN_CERT_PASSWORD;
const CONTAINER_NAME = process.env.WIN_CERT_CONTAINER_NAME;
const filePath = configuration.path;
if (
SIGNTOOL_PATH &&
INSTALLER_CERT_WINDOWS_CER &&
CERT_PASSWORD &&
CONTAINER_NAME
) {
childProcess.execSync(
`"${SIGNTOOL_PATH}" sign -d "Arduino IDE" -f "${INSTALLER_CERT_WINDOWS_CER}" -csp "eToken Base Cryptographic Provider" -k "[{{${CERT_PASSWORD}}}]=${CONTAINER_NAME}" -fd sha256 -tr http://timestamp.digicert.com -td SHA256 -v "${filePath}"`,
{ stdio: 'inherit' }
);
} else {
console.warn(
`Custom windows signing was no performed one of the following variables was not provided: SIGNTOOL_PATH (${SIGNTOOL_PATH}), INSTALLER_CERT_WINDOWS_CERT (${INSTALLER_CERT_WINDOWS_CER}), CERT_PASSWORD (${CERT_PASSWORD}), CONTAINER_NAME (${CONTAINER_NAME})`
);
process.exit(1);
}
};

View File

@@ -13,6 +13,7 @@
"board": {
"board": "Board{0}",
"boardConfigDialogTitle": "Select Other Board and Port",
"boardDataReloaded": "Board data reloaded.",
"boardInfo": "Board Info",
"boards": "boards",
"configDialog1": "Select both a Board and a Port if you want to upload a sketch.",
@@ -31,10 +32,12 @@
"port": "Port{0}",
"ports": "ports",
"programmer": "Programeerder",
"reloadBoardData": "Reload Board Data",
"reselectLater": "Herselekteer later",
"revertBoardsConfig": "Use '{0}' discovered on '{1}'",
"searchBoard": "Search board",
"selectBoard": "Kies Bord",
"selectBoardToReload": "Please select a board first.",
"selectPortForInfo": "Please select a port to obtain board info.",
"showAllAvailablePorts": "Shows all available ports when enabled",
"showAllPorts": "Show all ports",
@@ -152,7 +155,8 @@
"serialMonitor": "Seriaal Monitor",
"type": "Type",
"unknown": "Onbekend",
"updateable": "Updatable"
"updateable": "Updatable",
"userAbort": "User abort"
},
"compile": {
"error": "Compilation error: {0}"
@@ -213,7 +217,6 @@
"debuggingNotSupported": "Debugging is not supported by '{0}'",
"getDebugInfo": "Getting debug info...",
"noPlatformInstalledFor": "Platform is nie geïnstalleer vir ' {0} '",
"noProgrammerSelectedFor": "No programmer selected for '{0}'",
"optimizeForDebugging": "Geoptimaliseerd vir ontfouting",
"sketchIsNotCompiled": "Sketch '{0}' must be verified before starting a debug session. Please verify the sketch and start debugging again. Do you want to verify the sketch now?"
},
@@ -368,6 +371,7 @@
"cloud.pull.warn": "True if users should be warned before pulling a cloud sketch. Defaults to true.",
"cloud.push.warn": "True if users should be warned before pushing a cloud sketch. Defaults to true.",
"cloud.pushpublic.warn": "True if users should be warned before pushing a public sketch to the cloud. Defaults to true.",
"cloud.sharedSpaceId": "The ID of the Arduino Cloud shared space to load the sketchbook from. If empty, your private space is selected.",
"cloud.sketchSyncEndpoint": "The endpoint used to push and pull sketches from a backend. By default it points to Arduino Cloud API.",
"compile": "saamstel",
"compile.experimental": "True if the IDE should handle multiple compiler errors. False by default",
@@ -411,7 +415,9 @@
"survey.notification": "True if users should be notified if a survey is available. True by default.",
"unofficialBoardSupport": "Click for a list of unofficial board support URLs",
"upload": "oplaai",
"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.",
"upload.verbose": "True for verbose upload output. False by default.",
"upload.verify": "After upload, verify that the contents of the memory on the board match the uploaded binary.",
"verifyAfterUpload": "Verifieer kode na oplaai ",
"window.autoScale": "True if the user interface automatically scales with the font size.",
"window.zoomLevel": {

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