chore: format resources 💄

Signed-off-by: Akos Kitta <a.kitta@arduino.cc>
This commit is contained in:
Akos Kitta 2023-08-24 13:59:43 +02:00 committed by Akos Kitta
parent 5939b65511
commit 8a5dee9307
53 changed files with 1158 additions and 1003 deletions

View File

@ -1,7 +1,7 @@
name: Bug report name: Bug report
description: Report a problem with the code or documentation in this repository. description: Report a problem with the code or documentation in this repository.
labels: labels:
- "type: imperfection" - 'type: imperfection'
body: body:
- type: textarea - type: textarea
id: description id: description

View File

@ -1,7 +1,7 @@
name: Feature request name: Feature request
description: Suggest an enhancement to this project. description: Suggest an enhancement to this project.
labels: labels:
- "type: enhancement" - 'type: enhancement'
body: body:
- type: textarea - type: textarea
id: description id: description

View File

@ -1,15 +1,18 @@
### Motivation ### Motivation
<!-- Why this pull request? --> <!-- Why this pull request? -->
### Change description ### Change description
<!-- What does your code do? --> <!-- What does your code do? -->
### Other information ### Other information
<!-- Any additional information that could help the review process --> <!-- Any additional information that could help the review process -->
### Reviewer checklist ### Reviewer checklist
* [ ] PR addresses a single concern. - [ ] PR addresses a single concern.
* [ ] The PR has no duplicates (please search among the [Pull Requests](https://github.com/arduino/arduino-ide/pulls) before creating one) - [ ] The PR has no duplicates (please search among the [Pull Requests](https://github.com/arduino/arduino-ide/pulls) before creating one)
* [ ] PR title and description are properly filled. - [ ] PR title and description are properly filled.
* [ ] Docs have been added / updated (for bug fixes / features) - [ ] Docs have been added / updated (for bug fixes / features)

View File

@ -12,4 +12,4 @@ updates:
schedule: schedule:
interval: daily interval: daily
labels: labels:
- "topic: infrastructure" - 'topic: infrastructure'

View File

@ -1,27 +1,27 @@
# Used by the "Sync Labels" workflow # Used by the "Sync Labels" workflow
# See: https://github.com/Financial-Times/github-label-sync#label-config-file # See: https://github.com/Financial-Times/github-label-sync#label-config-file
- name: "topic: accessibility" - name: 'topic: accessibility'
color: "00ffff" color: '00ffff'
description: Enabling the use of the software by everyone description: Enabling the use of the software by everyone
- name: "topic: CLI" - name: 'topic: CLI'
color: "00ffff" color: '00ffff'
description: Related to Arduino CLI description: Related to Arduino CLI
- name: "topic: cloud" - name: 'topic: cloud'
color: "00ffff" color: '00ffff'
description: Related to Arduino Cloud and cloud sketches description: Related to Arduino Cloud and cloud sketches
- name: "topic: debugger" - name: 'topic: debugger'
color: "00ffff" color: '00ffff'
description: Related to the integrated debugger description: Related to the integrated debugger
- name: "topic: language server" - name: 'topic: language server'
color: "00ffff" color: '00ffff'
description: Related to the Arduino Language Server description: Related to the Arduino Language Server
- name: "topic: serial monitor" - name: 'topic: serial monitor'
color: "00ffff" color: '00ffff'
description: Related to the Serial Monitor description: Related to the Serial Monitor
- name: "topic: theia" - name: 'topic: theia'
color: "00ffff" color: '00ffff'
description: Related to the Theia IDE framework description: Related to the Theia IDE framework
- name: "topic: theme" - name: 'topic: theme'
color: "00ffff" color: '00ffff'
description: Related to GUI theming description: Related to GUI theming

View File

@ -31,7 +31,7 @@ on:
env: env:
# See vars.GO_VERSION field of https://github.com/arduino/arduino-cli/blob/master/DistTasks.yml # See vars.GO_VERSION field of https://github.com/arduino/arduino-cli/blob/master/DistTasks.yml
GO_VERSION: "1.19" GO_VERSION: '1.19'
JOB_TRANSFER_ARTIFACT: build-artifacts JOB_TRANSFER_ARTIFACT: build-artifacts
CHANGELOG_ARTIFACTS: changelog CHANGELOG_ARTIFACTS: changelog

View File

@ -2,7 +2,7 @@ name: Check Internationalization
env: env:
# See vars.GO_VERSION field of https://github.com/arduino/arduino-cli/blob/master/DistTasks.yml # See vars.GO_VERSION field of https://github.com/arduino/arduino-cli/blob/master/DistTasks.yml
GO_VERSION: "1.19" GO_VERSION: '1.19'
# See: https://docs.github.com/en/actions/reference/events-that-trigger-workflows # See: https://docs.github.com/en/actions/reference/events-that-trigger-workflows
on: on:

View File

@ -2,7 +2,7 @@ name: i18n-nightly-push
env: env:
# See vars.GO_VERSION field of https://github.com/arduino/arduino-cli/blob/master/DistTasks.yml # See vars.GO_VERSION field of https://github.com/arduino/arduino-cli/blob/master/DistTasks.yml
GO_VERSION: "1.19" GO_VERSION: '1.19'
on: on:
schedule: schedule:

View File

@ -2,7 +2,7 @@ name: i18n-weekly-pull
env: env:
# See vars.GO_VERSION field of https://github.com/arduino/arduino-cli/blob/master/DistTasks.yml # See vars.GO_VERSION field of https://github.com/arduino/arduino-cli/blob/master/DistTasks.yml
GO_VERSION: "1.19" GO_VERSION: '1.19'
on: on:
schedule: schedule:

View File

@ -5,15 +5,15 @@ name: Sync Labels
on: on:
push: push:
paths: paths:
- ".github/workflows/sync-labels.ya?ml" - '.github/workflows/sync-labels.ya?ml'
- ".github/label-configuration-files/*.ya?ml" - '.github/label-configuration-files/*.ya?ml'
pull_request: pull_request:
paths: paths:
- ".github/workflows/sync-labels.ya?ml" - '.github/workflows/sync-labels.ya?ml'
- ".github/label-configuration-files/*.ya?ml" - '.github/label-configuration-files/*.ya?ml'
schedule: schedule:
# Run daily at 8 AM UTC to sync with changes to shared label configurations. # Run daily at 8 AM UTC to sync with changes to shared label configurations.
- cron: "0 8 * * *" - cron: '0 8 * * *'
workflow_dispatch: workflow_dispatch:
repository_dispatch: repository_dispatch:

View File

@ -8,8 +8,8 @@ on:
env: env:
# See vars.GO_VERSION field of https://github.com/arduino/arduino-cli/blob/master/DistTasks.yml # See vars.GO_VERSION field of https://github.com/arduino/arduino-cli/blob/master/DistTasks.yml
GO_VERSION: "1.19" GO_VERSION: '1.19'
NODE_VERSION: 16.x NODE_VERSION: '18.17'
jobs: jobs:
pull-from-jsonbin: pull-from-jsonbin:

15
.vscode/launch.json vendored
View File

@ -7,7 +7,7 @@
"name": "App", "name": "App",
"runtimeExecutable": "${workspaceFolder}/node_modules/.bin/electron", "runtimeExecutable": "${workspaceFolder}/node_modules/.bin/electron",
"windows": { "windows": {
"runtimeExecutable": "${workspaceFolder}/node_modules/.bin/electron.cmd", "runtimeExecutable": "${workspaceFolder}/node_modules/.bin/electron.cmd"
}, },
"cwd": "${workspaceFolder}/electron-app", "cwd": "${workspaceFolder}/electron-app",
"args": [ "args": [
@ -19,7 +19,7 @@
"--no-app-auto-install", "--no-app-auto-install",
"--plugins=local-dir:./plugins", "--plugins=local-dir:./plugins",
"--hosted-plugin-inspect=9339", "--hosted-plugin-inspect=9339",
"--no-ping-timeout", "--no-ping-timeout"
], ],
"env": { "env": {
"NODE_ENV": "development" "NODE_ENV": "development"
@ -42,7 +42,7 @@
"name": "App [Dev]", "name": "App [Dev]",
"runtimeExecutable": "${workspaceFolder}/node_modules/.bin/electron", "runtimeExecutable": "${workspaceFolder}/node_modules/.bin/electron",
"windows": { "windows": {
"runtimeExecutable": "${workspaceFolder}/node_modules/.bin/electron.cmd", "runtimeExecutable": "${workspaceFolder}/node_modules/.bin/electron.cmd"
}, },
"cwd": "${workspaceFolder}/electron-app", "cwd": "${workspaceFolder}/electron-app",
"args": [ "args": [
@ -56,7 +56,7 @@
"--hosted-plugin-inspect=9339", "--hosted-plugin-inspect=9339",
"--content-trace", "--content-trace",
"--open-devtools", "--open-devtools",
"--no-ping-timeout", "--no-ping-timeout"
], ],
"env": { "env": {
"NODE_ENV": "development" "NODE_ENV": "development"
@ -115,15 +115,12 @@
"request": "attach", "request": "attach",
"name": "Attach by Process ID", "name": "Attach by Process ID",
"processId": "${command:PickProcess}" "processId": "${command:PickProcess}"
}, }
], ],
"compounds": [ "compounds": [
{ {
"name": "Launch Electron Backend & Frontend", "name": "Launch Electron Backend & Frontend",
"configurations": [ "configurations": ["App", "Attach to Electron Frontend"]
"App",
"Attach to Electron Frontend"
]
} }
] ]
} }

View File

@ -8,5 +8,5 @@
"typescript.tsdk": "node_modules/typescript/lib", "typescript.tsdk": "node_modules/typescript/lib",
"editor.codeActionsOnSave": { "editor.codeActionsOnSave": {
"source.fixAll.eslint": true "source.fixAll.eslint": true
}, }
} }

5
.vscode/tasks.json vendored
View File

@ -40,10 +40,7 @@
{ {
"label": "Watch All", "label": "Watch All",
"type": "shell", "type": "shell",
"dependsOn": [ "dependsOn": ["Watch Extension", "Watch App"]
"Watch Extension",
"Watch App"
]
} }
] ]
} }

View File

@ -55,10 +55,12 @@ The Config Service knows about your system, like for example the default sketch
- checking whether a file is in a data or sketch directory - checking whether a file is in a data or sketch directory
### `"arduino"` configuration in the `package.json`: ### `"arduino"` configuration in the `package.json`:
- `"cli"`: - `"cli"`:
- `"version"` type `string` | `{ owner: string, repo: string, commitish?: string }`: if the type is a `string` and is a valid semver, it will get the corresponding [released](https://github.com/arduino/arduino-cli/releases) CLI. If the type is `string` and is a [date in `YYYYMMDD`](https://arduino.github.io/arduino-cli/latest/installation/#nightly-builds) format, it will get a nightly CLI. If the type is an object, a CLI, build from the sources in the `owner/repo` will be used. If `commitish` is not defined, the HEAD of the default branch will be used. In any other cases an error is thrown. - `"version"` type `string` | `{ owner: string, repo: string, commitish?: string }`: if the type is a `string` and is a valid semver, it will get the corresponding [released](https://github.com/arduino/arduino-cli/releases) CLI. If the type is `string` and is a [date in `YYYYMMDD`](https://arduino.github.io/arduino-cli/latest/installation/#nightly-builds) format, it will get a nightly CLI. If the type is an object, a CLI, build from the sources in the `owner/repo` will be used. If `commitish` is not defined, the HEAD of the default branch will be used. In any other cases an error is thrown.
#### Rebuild gRPC protocol interfaces #### Rebuild gRPC protocol interfaces
- Some CLI updates can bring changes to the gRPC interfaces, as the API might change. gRPC interfaces can be updated running the command - Some CLI updates can bring changes to the gRPC interfaces, as the API might change. gRPC interfaces can be updated running the command
`yarn --cwd arduino-ide-extension generate-protocol` `yarn --cwd arduino-ide-extension generate-protocol`
@ -72,8 +74,10 @@ The [**clangd** C++ language server](https://clangd.llvm.org/) and the [**ClangF
1. Submit a pull request in [the `arduino/tooling-project-assets` repository](https://github.com/arduino/tooling-project-assets) to update the version in the `vars.DEFAULT_CLANG_FORMAT_VERSION` field of [`Taskfile.yml`](https://github.com/arduino/tooling-project-assets/blob/main/Taskfile.yml). 1. Submit a pull request in [the `arduino/tooling-project-assets` repository](https://github.com/arduino/tooling-project-assets) to update the version in the `vars.DEFAULT_CLANG_FORMAT_VERSION` field of [`Taskfile.yml`](https://github.com/arduino/tooling-project-assets/blob/main/Taskfile.yml).
### Customize Icons ### Customize Icons
ArduinoIde uses a customized version of FontAwesome. ArduinoIde uses a customized version of FontAwesome.
In order to update/replace icons follow the following steps: In order to update/replace icons follow the following steps:
- import the file `arduino-icons.json` in [Icomoon](https://icomoon.io/app/#/projects) - import the file `arduino-icons.json` in [Icomoon](https://icomoon.io/app/#/projects)
- load it - load it
- edit the icons as needed - edit the icons as needed

View File

@ -58,7 +58,9 @@ type StrictPreferenceSchemaProperties<T extends object> = {
[p in keyof T]: PreferenceSchemaProperty; [p in keyof T]: PreferenceSchemaProperty;
}; };
type ArduinoPreferenceSchemaProperties = type ArduinoPreferenceSchemaProperties =
StrictPreferenceSchemaProperties<ArduinoConfiguration> & { 'arduino.window.zoomLevel': PreferenceSchemaProperty }; StrictPreferenceSchemaProperties<ArduinoConfiguration> & {
'arduino.window.zoomLevel': PreferenceSchemaProperty;
};
const properties: ArduinoPreferenceSchemaProperties = { const properties: ArduinoPreferenceSchemaProperties = {
'arduino.language.log': { 'arduino.language.log': {

View File

@ -45,10 +45,7 @@ export namespace UploadFirmware {
export namespace Commands { export namespace Commands {
export const OPEN: Command = { export const OPEN: Command = {
id: 'arduino-upload-firmware-open', id: 'arduino-upload-firmware-open',
label: nls.localize( label: nls.localize('arduino/firmware/updater', 'Firmware Updater'),
'arduino/firmware/updater',
'Firmware Updater'
),
category: 'Arduino', category: 'Arduino',
}; };
} }

View File

@ -38,7 +38,9 @@
.arduino-select__control.arduino-select__control--menu-is-open { .arduino-select__control.arduino-select__control--menu-is-open {
border: 1px solid !important; border: 1px solid !important;
border-color: var(--theia-focusBorder) !important; border-color: var(--theia-focusBorder) !important;
border-bottom-color: var(--theia-sideBar-background) !important; /* if the bottom border color has the same color as the background of the control, we make the border "invisible" */ border-bottom-color: var(
--theia-sideBar-background
) !important; /* if the bottom border color has the same color as the background of the control, we make the border "invisible" */
} }
.arduino-select__value-container .arduino-select__single-value { .arduino-select__value-container .arduino-select__single-value {

View File

@ -32,7 +32,6 @@ div.dialogContent.select-board-dialog > div.head .title {
margin-bottom: 10px; margin-bottom: 10px;
} }
div#select-board-dialog .selectBoardContainer .list .item.selected { div#select-board-dialog .selectBoardContainer .list .item.selected {
background: var(--theia-secondaryButton-hoverBackground); background: var(--theia-secondaryButton-hoverBackground);
} }
@ -195,7 +194,7 @@ div#select-board-dialog .selectBoardContainer .list .item.selected i {
} }
.arduino-boards-toolbar-item--label-connected { .arduino-boards-toolbar-item--label-connected {
font-family: 'Open Sans Bold'; font-family: "Open Sans Bold";
font-style: normal; font-style: normal;
font-weight: 700; font-weight: 700;
font-size: 14px; font-size: 14px;
@ -210,7 +209,7 @@ div#select-board-dialog .selectBoardContainer .list .item.selected i {
margin: -1px; margin: -1px;
z-index: 1; z-index: 1;
border: 1px solid var(--theia-arduino-toolbar-dropdown-border); border: 1px solid var(--theia-arduino-toolbar-dropdown-border);
font-family: 'Open Sans'; font-family: "Open Sans";
font-style: normal; font-style: normal;
font-weight: 400; font-weight: 400;
font-size: 12px; font-size: 12px;
@ -251,7 +250,7 @@ div#select-board-dialog .selectBoardContainer .list .item.selected i {
} }
/* Redefine default codicon size https://github.com/microsoft/vscode/commit/38cd0a377b7abef34fb07fe770fc633e68819ba6 */ /* Redefine default codicon size https://github.com/microsoft/vscode/commit/38cd0a377b7abef34fb07fe770fc633e68819ba6 */
.arduino-boards-dropdown-item .codicon[class*='codicon-'] { .arduino-boards-dropdown-item .codicon[class*="codicon-"] {
font-size: 14px; font-size: 14px;
} }
@ -288,7 +287,8 @@ div#select-board-dialog .selectBoardContainer .list .item.selected i {
.arduino-boards-dropdown-item--selected, .arduino-boards-dropdown-item--selected,
.arduino-boards-dropdown-item--selected:hover { .arduino-boards-dropdown-item--selected:hover {
background: var(--theia-arduino-toolbar-dropdown-option-backgroundSelected); background: var(--theia-arduino-toolbar-dropdown-option-backgroundSelected);
border: 1px solid var(--theia-arduino-toolbar-dropdown-option-backgroundSelected); border: 1px solid
var(--theia-arduino-toolbar-dropdown-option-backgroundSelected);
} }
.arduino-boards-dropdown-item--selected .arduino-boards-dropdown-item--selected

View File

@ -16,7 +16,7 @@
.certificate-uploader-dialog .certificate-list { .certificate-uploader-dialog .certificate-list {
border: 1px solid var(--theia-editorWidget-border); border: 1px solid var(--theia-editorWidget-border);
border-radius: 2px;; border-radius: 2px;
color: var(--theia-editor-foreground); color: var(--theia-editor-foreground);
background-color: var(--theia-editor-background); background-color: var(--theia-editor-background);
overflow: auto; overflow: auto;
@ -25,7 +25,7 @@
} }
.certificate-uploader-dialog .certificate-list .certificate-row { .certificate-uploader-dialog .certificate-list .certificate-row {
display: flex; display: flex;
padding: 6px 10px 5px 10px padding: 6px 10px 5px 10px;
} }
.certificate-uploader-dialog .certificate-list .certificate-row:hover { .certificate-uploader-dialog .certificate-list .certificate-row:hover {
background-color: var(--theia-list-activeSelectionBackground); background-color: var(--theia-list-activeSelectionBackground);
@ -39,11 +39,11 @@
.certificate-uploader-dialog .success { .certificate-uploader-dialog .success {
display: flex; display: flex;
align-items: center; align-items: center;
color: #1DA086; color: #1da086;
} }
.certificate-uploader-dialog .warn { .certificate-uploader-dialog .warn {
color: #C11F09; color: #c11f09;
} }
.certificate-uploader-dialog .status-icon { .certificate-uploader-dialog .status-icon {
@ -72,5 +72,4 @@
padding: 0 12px; padding: 0 12px;
width: 100%; width: 100%;
box-sizing: border-box; box-sizing: border-box;
} }

View File

@ -23,8 +23,7 @@
-webkit-mask-size: 100%; -webkit-mask-size: 100%;
} }
.p-mod-current .p-mod-current .cloud-sketchbook-tree-icon {
.cloud-sketchbook-tree-icon {
background-color: var(--theia-foreground); background-color: var(--theia-foreground);
-webkit-mask: url(../icons/arduino-cloud-filled.svg); -webkit-mask: url(../icons/arduino-cloud-filled.svg);
-webkit-mask-position: center; -webkit-mask-position: center;

View File

@ -1,4 +1,4 @@
.codicon-debug-alt:before { .codicon-debug-alt:before {
font-family: 'FontAwesome' !important; font-family: "FontAwesome" !important;
content: "\e905" !important content: "\e905" !important;
} }

View File

@ -56,14 +56,23 @@
} }
.p-Widget.dialogOverlay .dialogControl .spinner, .p-Widget.dialogOverlay .dialogControl .spinner,
.p-Widget.dialogOverlay .dialogBlock .dialogContent .dialogSection .dialogRow .spinner { .p-Widget.dialogOverlay
.dialogBlock
.dialogContent
.dialogSection
.dialogRow
.spinner {
background: var(--theia-icon-loading) center center no-repeat; background: var(--theia-icon-loading) center center no-repeat;
animation: theia-spin 1.25s linear infinite; animation: theia-spin 1.25s linear infinite;
width: 30px; width: 30px;
height: 30px; height: 30px;
} }
.p-Widget.dialogOverlay .dialogBlock .dialogContent .dialogSection .dialogRow:first-child { .p-Widget.dialogOverlay
.dialogBlock
.dialogContent
.dialogSection
.dialogRow:first-child {
margin-top: 0px; margin-top: 0px;
height: 32px; height: 32px;
} }
@ -78,7 +87,7 @@
} }
.fa.disabled { .fa.disabled {
opacity: .4; opacity: 0.4;
} }
@media only screen and (max-height: 560px) { @media only screen and (max-height: 560px) {

View File

@ -1,6 +1,8 @@
/* Show the dirty indicator on unclosable widgets. On hover, it should still show the dot instead of the X. */ /* Show the dirty indicator on unclosable widgets. On hover, it should still show the dot instead of the X. */
/* https://github.com/arduino/arduino-pro-ide/issues/380 */ /* https://github.com/arduino/arduino-pro-ide/issues/380 */
.p-TabBar.theia-app-centers .p-TabBar-tab.p-mod-closable.a-mod-uncloseable.theia-mod-dirty > .p-TabBar-tabCloseIcon:before { .p-TabBar.theia-app-centers
.p-TabBar-tab.p-mod-closable.a-mod-uncloseable.theia-mod-dirty
> .p-TabBar-tabCloseIcon:before {
content: "\ea71"; content: "\ea71";
} }

View File

@ -19,11 +19,11 @@
} }
.firmware-uploader-dialog .success { .firmware-uploader-dialog .success {
color: #1DA086; color: #1da086;
} }
.firmware-uploader-dialog .warn { .firmware-uploader-dialog .warn {
color: #C11F09; color: #c11f09;
} }
.firmware-uploader-dialog .status-icon { .firmware-uploader-dialog .status-icon {

View File

@ -1,19 +1,18 @@
@font-face { @font-face {
font-family: 'Open Sans'; font-family: "Open Sans";
src: url('fonts/OpenSans-Regular-webfont.woff') format('woff'); src: url("fonts/OpenSans-Regular-webfont.woff") format("woff");
} }
@font-face { @font-face {
font-family: 'Open Sans Bold'; font-family: "Open Sans Bold";
src: url('fonts/OpenSans-Bold-webfont.woff') format('woff'); src: url("fonts/OpenSans-Bold-webfont.woff") format("woff");
} }
@font-face { @font-face {
font-family: 'FontAwesome'; font-family: "FontAwesome";
src: src: url("fonts/FontAwesome.ttf?h959em") format("truetype"),
url('fonts/FontAwesome.ttf?h959em') format('truetype'), url("fonts/FontAwesome.woff?h959em") format("woff"),
url('fonts/FontAwesome.woff?h959em') format('woff'), url("fonts/FontAwesome.svg?h959em#FontAwesome") format("svg");
url('fonts/FontAwesome.svg?h959em#FontAwesome') format('svg');
font-weight: normal; font-weight: normal;
font-style: normal; font-style: normal;
font-display: block; font-display: block;
@ -21,7 +20,7 @@
.fa { .fa {
/* use !important to prevent issues with browser extensions that change fonts */ /* use !important to prevent issues with browser extensions that change fonts */
font-family: 'FontAwesome' !important; font-family: "FontAwesome" !important;
speak: never; speak: never;
font-style: normal; font-style: normal;
font-weight: normal; font-weight: normal;

View File

@ -19,7 +19,7 @@
} }
.ide-updater-dialog--logo { .ide-updater-dialog--logo {
background: url('./ide-logo.png') round; background: url("./ide-logo.png") round;
width: 52px; width: 52px;
height: 52px; height: 52px;
} }

View File

@ -1,24 +1,24 @@
@import './list-widget.css'; @import "./list-widget.css";
@import './boards-config-dialog.css'; @import "./boards-config-dialog.css";
@import './main.css'; @import "./main.css";
@import './dialogs.css'; @import "./dialogs.css";
@import './monitor.css'; @import "./monitor.css";
@import './arduino-select.css'; @import "./arduino-select.css";
@import './status-bar.css'; @import "./status-bar.css";
@import './terminal.css'; @import "./terminal.css";
@import './editor.css'; @import "./editor.css";
@import './settings-dialog.css'; @import "./settings-dialog.css";
@import './firmware-uploader-dialog.css'; @import "./firmware-uploader-dialog.css";
@import './ide-updater-dialog.css'; @import "./ide-updater-dialog.css";
@import './certificate-uploader-dialog.css'; @import "./certificate-uploader-dialog.css";
@import './user-fields-dialog.css'; @import "./user-fields-dialog.css";
@import './debug.css'; @import "./debug.css";
@import './sketchbook.css'; @import "./sketchbook.css";
@import './cloud-sketchbook.css'; @import "./cloud-sketchbook.css";
@import './fonts.css'; @import "./fonts.css";
@import './custom-codicon.css'; @import "./custom-codicon.css";
@import './progress-bar.css'; @import "./progress-bar.css";
@import './settings-step-input.css'; @import "./settings-step-input.css";
:root { :root {
--arduino-button-height: 28px; --arduino-button-height: 28px;
@ -84,13 +84,13 @@ button.theia-button,
.theia-button { .theia-button {
align-items: center; align-items: center;
display: flex; display: flex;
font-family: 'Open Sans Bold',sans-serif; font-family: "Open Sans Bold", sans-serif;
font-style: normal; font-style: normal;
font-weight: 700; font-weight: 700;
font-size: 14px; font-size: 14px;
justify-content: center; justify-content: center;
cursor: pointer; cursor: pointer;
letter-spacing: .01em; letter-spacing: 0.01em;
line-height: 24px; line-height: 24px;
outline: none; outline: none;
padding: 0 16px; padding: 0 16px;
@ -118,13 +118,15 @@ button.theia-button.secondary {
border: 2px solid var(--theia-secondaryButton-foreground); border: 2px solid var(--theia-secondaryButton-foreground);
} }
button.theia-button[disabled], .theia-button[disabled] { button.theia-button[disabled],
.theia-button[disabled] {
opacity: 0.5; opacity: 0.5;
color: var(--theia-button-foreground); color: var(--theia-button-foreground);
background-color: var(--theia-button-background); background-color: var(--theia-button-background);
} }
button.secondary[disabled], .theia-button.secondary[disabled] { button.secondary[disabled],
.theia-button.secondary[disabled] {
color: var(--theia-secondaryButton-foreground); color: var(--theia-secondaryButton-foreground);
background-color: var(--theia-secondaryButton-background); background-color: var(--theia-secondaryButton-background);
} }

View File

@ -1,6 +1,6 @@
.library-tab-icon { .library-tab-icon {
-webkit-mask: url('../icons/library-tab-icon.svg'); -webkit-mask: url("../icons/library-tab-icon.svg");
mask: url('../icons/library-tab-icon.svg'); mask: url("../icons/library-tab-icon.svg");
} }
.arduino-list-widget { .arduino-list-widget {
@ -82,7 +82,7 @@
} }
.component-list-item .header .title .name { .component-list-item .header .title .name {
font-family: 'Open Sans Bold'; font-family: "Open Sans Bold";
font-style: normal; font-style: normal;
font-weight: 700; font-weight: 700;
font-size: 14px; font-size: 14px;
@ -112,7 +112,9 @@
display: inline-block; display: inline-block;
justify-self: end; justify-self: end;
text-align: center; text-align: center;
background-color: var(--theia-arduino-toolbar-dropdown-option-backgroundHover); background-color: var(
--theia-arduino-toolbar-dropdown-option-backgroundHover
);
padding: 2px 4px 2px 4px; padding: 2px 4px 2px 4px;
font-size: 12px; font-size: 12px;
max-height: calc(1em + 4px); max-height: calc(1em + 4px);
@ -131,7 +133,7 @@
display: flex; display: flex;
flex-direction: column; flex-direction: column;
padding-top: 4px; padding-top: 4px;
font-family: 'Open Sans'; font-family: "Open Sans";
font-style: normal; font-style: normal;
font-weight: 400; font-weight: 400;
font-size: 12px; font-size: 12px;
@ -175,8 +177,20 @@
max-width: 8px; max-width: 8px;
} }
div.filterable-list-container > div > div > div > div:nth-child(1) > div.separator :first-child, div.filterable-list-container
div.filterable-list-container > div > div > div > div:nth-child(1) > div.separator :last-child { > div
> div
> div
> div:nth-child(1)
> div.separator
:first-child,
div.filterable-list-container
> div
> div
> div
> div:nth-child(1)
> div.separator
:last-child {
display: none; display: none;
} }
@ -202,11 +216,11 @@ div.filterable-list-container > div > div > div > div:nth-child(1) > div.separat
} }
.component-list-item .theia-button.secondary.no-border { .component-list-item .theia-button.secondary.no-border {
border: 2px solid var(--theia-button-foreground) border: 2px solid var(--theia-button-foreground);
} }
.component-list-item .theia-button.secondary.no-border:hover { .component-list-item .theia-button.secondary.no-border:hover {
border: 2px solid var(--theia-secondaryButton-foreground) border: 2px solid var(--theia-secondaryButton-foreground);
} }
.component-list-item .theia-button { .component-list-item .theia-button {

View File

@ -1,11 +1,12 @@
#theia-bottom-content-panel .p-TabBar[data-orientation='horizontal'].theia-app-bottom { #theia-bottom-content-panel
.p-TabBar[data-orientation="horizontal"].theia-app-bottom {
background: var(--theia-editorGroupHeader-tabsBackground); background: var(--theia-editorGroupHeader-tabsBackground);
} }
/* Avoid the Intellisense widget may be cover by the bottom panel partially. /* Avoid the Intellisense widget may be cover by the bottom panel partially.
TODO: This issue may be resolved after monaco-editor upgrade */ TODO: This issue may be resolved after monaco-editor upgrade */
#theia-main-content-panel { #theia-main-content-panel {
z-index: auto z-index: auto;
} }
#theia-main-content-panel div[id^="code-editor-opener"] { #theia-main-content-panel div[id^="code-editor-opener"] {
@ -23,7 +24,6 @@
border-radius: 1px; border-radius: 1px;
} }
.p-TabBar-toolbar .item.arduino-tool-item > div { .p-TabBar-toolbar .item.arduino-tool-item > div {
display: flex; display: flex;
justify-content: center; justify-content: center;
@ -42,9 +42,15 @@
background: var(--theia-arduino-toolbar-button-hoverBackground); background: var(--theia-arduino-toolbar-button-hoverBackground);
} }
.p-TabBar-toolbar .item.arduino-tool-item.enabled:hover > div.toggle-serial-monitor, .p-TabBar-toolbar
.p-TabBar-toolbar .item.arduino-tool-item.enabled:hover > div.toggle-serial-plotter { .item.arduino-tool-item.enabled:hover
background-color: var(--theia-arduino-toolbar-button-secondary-hoverBackground); > div.toggle-serial-monitor,
.p-TabBar-toolbar
.item.arduino-tool-item.enabled:hover
> div.toggle-serial-plotter {
background-color: var(
--theia-arduino-toolbar-button-secondary-hoverBackground
);
border-radius: 14px; border-radius: 14px;
} }
@ -91,7 +97,7 @@
} }
.arduino-start-debug-icon { .arduino-start-debug-icon {
-webkit-mask: url('../icons/debug-dark.svg') 50% 60%; -webkit-mask: url("../icons/debug-dark.svg") 50% 60%;
-webkit-mask-size: 70%; -webkit-mask-size: 70%;
-webkit-mask-repeat: no-repeat; -webkit-mask-repeat: no-repeat;
display: flex; display: flex;
@ -175,7 +181,12 @@
background-color: var(--theia-terminal-background); background-color: var(--theia-terminal-background);
} }
.theia-output .monaco-editor .lines-content.monaco-editor-background .view-lines .view-line .mtk1:not(.theia-output-error):not(.theia-output-warning) { .theia-output
.monaco-editor
.lines-content.monaco-editor-background
.view-lines
.view-line
.mtk1:not(.theia-output-error):not(.theia-output-warning) {
color: var(--theia-terminal-foreground); color: var(--theia-terminal-foreground);
} }

View File

@ -1,6 +1,6 @@
.monitor-tab-icon { .monitor-tab-icon {
-webkit-mask: url('../icons/monitor-tab-icon.svg'); -webkit-mask: url("../icons/monitor-tab-icon.svg");
mask: url('../icons/monitor-tab-icon.svg'); mask: url("../icons/monitor-tab-icon.svg");
} }
.serial-monitor { .serial-monitor {
@ -10,8 +10,8 @@
} }
.serial-monitor-messages { .serial-monitor-messages {
white-space: 'pre'; white-space: "pre";
font-family: monospace font-family: monospace;
} }
.serial-monitor-messages pre { .serial-monitor-messages pre {

View File

@ -1,5 +1,5 @@
#arduino-settings-dialog-container > .dialogBlock { #arduino-settings-dialog-container > .dialogBlock {
height: 531px;; height: 531px;
max-width: 740px !important; max-width: 740px !important;
width: calc(100% - 96px); width: calc(100% - 96px);
} }

View File

@ -1,5 +1,5 @@
.settings-step-input-container { .settings-step-input-container {
position: relative position: relative;
} }
.settings-step-input-element::-webkit-inner-spin-button, .settings-step-input-element::-webkit-inner-spin-button,

View File

@ -1,6 +1,6 @@
.sketchbook-tab-icon { .sketchbook-tab-icon {
-webkit-mask: url('./sketchbook.svg'); -webkit-mask: url("./sketchbook.svg");
mask: url('./sketchbook.svg'); mask: url("./sketchbook.svg");
} }
.p-TabBar-tabIcon.sketchbook-tree-icon { .p-TabBar-tabIcon.sketchbook-tree-icon {
@ -13,8 +13,7 @@
-webkit-mask-size: 100%; -webkit-mask-size: 100%;
} }
.p-mod-current .p-mod-current .sketchbook-tree-icon {
.sketchbook-tree-icon {
background-color: var(--theia-foreground); background-color: var(--theia-foreground);
-webkit-mask: url(./sketchbook-tree-icon-filled.svg); -webkit-mask: url(./sketchbook-tree-icon-filled.svg);
-webkit-mask-position: center; -webkit-mask-position: center;
@ -55,7 +54,6 @@ widget width.
font-weight: 500; font-weight: 500;
background-color: var(--theia-list-activeSelectionBackground) !important; background-color: var(--theia-list-activeSelectionBackground) !important;
color: var(--theia-list-activeSelectionForeground) !important; color: var(--theia-list-activeSelectionForeground) !important;
} }
#arduino-sketchbook-tree-widget .theia-TreeNode { #arduino-sketchbook-tree-widget .theia-TreeNode {

View File

@ -1,4 +1,8 @@
import { inject, injectable, postConstruct } from '@theia/core/shared/inversify'; import {
inject,
injectable,
postConstruct,
} from '@theia/core/shared/inversify';
import URI from '@theia/core/lib/common/uri'; import URI from '@theia/core/lib/common/uri';
import { Title, Widget } from '@theia/core/shared/@phosphor/widgets'; import { Title, Widget } from '@theia/core/shared/@phosphor/widgets';
import { EditorWidget } from '@theia/editor/lib/browser'; import { EditorWidget } from '@theia/editor/lib/browser';

View File

@ -4,13 +4,15 @@ import {
Disposable, Disposable,
DisposableCollection, DisposableCollection,
} from '@theia/core/lib/common/disposable'; } from '@theia/core/lib/common/disposable';
import { EditorServiceOverrides, MonacoEditor } from '@theia/monaco/lib/browser/monaco-editor'; import {
EditorServiceOverrides,
MonacoEditor,
} from '@theia/monaco/lib/browser/monaco-editor';
import { MonacoEditorProvider as TheiaMonacoEditorProvider } from '@theia/monaco/lib/browser/monaco-editor-provider'; import { MonacoEditorProvider as TheiaMonacoEditorProvider } from '@theia/monaco/lib/browser/monaco-editor-provider';
import { SketchesServiceClientImpl } from '../../sketches-service-client-impl'; import { SketchesServiceClientImpl } from '../../sketches-service-client-impl';
import * as monaco from '@theia/monaco-editor-core'; import * as monaco from '@theia/monaco-editor-core';
import type { ReferencesModel } from '@theia/monaco-editor-core/esm/vs/editor/contrib/gotoSymbol/browser/referencesModel'; import type { ReferencesModel } from '@theia/monaco-editor-core/esm/vs/editor/contrib/gotoSymbol/browser/referencesModel';
type CancelablePromise = Promise<ReferencesModel> & { type CancelablePromise = Promise<ReferencesModel> & {
cancel: () => void; cancel: () => void;
}; };
@ -39,7 +41,9 @@ export class MonacoEditorProvider extends TheiaMonacoEditorProvider {
private installCustomReferencesController(editor: MonacoEditor): Disposable { private installCustomReferencesController(editor: MonacoEditor): Disposable {
const control = editor.getControl(); const control = editor.getControl();
const referencesController: any = control.getContribution('editor.contrib.referencesController'); const referencesController: any = control.getContribution(
'editor.contrib.referencesController'
);
const originalToggleWidget = referencesController.toggleWidget; const originalToggleWidget = referencesController.toggleWidget;
const toDispose = new DisposableCollection(); const toDispose = new DisposableCollection();
const toDisposeBeforeToggleWidget = new DisposableCollection(); const toDisposeBeforeToggleWidget = new DisposableCollection();

View File

@ -14,7 +14,8 @@ export class FileNavigatorContribution extends TheiaFileNavigatorContribution {
constructor( constructor(
@inject(FileNavigatorPreferences) @inject(FileNavigatorPreferences)
protected override readonly fileNavigatorPreferences: FileNavigatorPreferences, protected override readonly fileNavigatorPreferences: FileNavigatorPreferences,
@inject(OpenerService) protected override readonly openerService: OpenerService, @inject(OpenerService)
protected override readonly openerService: OpenerService,
@inject(FileNavigatorFilter) @inject(FileNavigatorFilter)
protected override readonly fileNavigatorFilter: FileNavigatorFilter, protected override readonly fileNavigatorFilter: FileNavigatorFilter,
@inject(WorkspaceService) @inject(WorkspaceService)

View File

@ -8,7 +8,9 @@ import { OutputToolbarContribution as TheiaOutputToolbarContribution } from '@th
@injectable() @injectable()
export class OutputToolbarContribution extends TheiaOutputToolbarContribution { export class OutputToolbarContribution extends TheiaOutputToolbarContribution {
override async registerToolbarItems(registry: TabBarToolbarRegistry): Promise<void> { override async registerToolbarItems(
registry: TabBarToolbarRegistry
): Promise<void> {
await super.registerToolbarItems(registry); // Why is it async? await super.registerToolbarItems(registry); // Why is it async?
// It's a hack. Currently, it's not possible to unregister a toolbar contribution via API. // It's a hack. Currently, it's not possible to unregister a toolbar contribution via API.
( (

View File

@ -8,7 +8,10 @@ export class ScmContribution extends TheiaScmContribution {
// NOOP // NOOP
} }
protected override setStatusBarEntry(id: string, entry: StatusBarEntry): void { protected override setStatusBarEntry(
id: string,
entry: StatusBarEntry
): void {
// NOOP // NOOP
} }
} }

View File

@ -1,4 +1,8 @@
import { inject, injectable, postConstruct } from '@theia/core/shared/inversify'; import {
inject,
injectable,
postConstruct,
} from '@theia/core/shared/inversify';
import { CloudSketchbookCompositeWidget } from './cloud-sketchbook-composite-widget'; import { CloudSketchbookCompositeWidget } from './cloud-sketchbook-composite-widget';
import { SketchbookWidget } from '../sketchbook/sketchbook-widget'; import { SketchbookWidget } from '../sketchbook/sketchbook-widget';
import { ArduinoPreferences } from '../../arduino-preferences'; import { ArduinoPreferences } from '../../arduino-preferences';

View File

@ -67,7 +67,7 @@ export namespace LibrarySearch {
'Contributed', 'Contributed',
'Retired', 'Retired',
] as const; ] as const;
export type Type = typeof TypeLiterals[number]; export type Type = (typeof TypeLiterals)[number];
export namespace Type { export namespace Type {
export function is(arg: unknown): arg is Type { export function is(arg: unknown): arg is Type {
return typeof arg === 'string' && TypeLiterals.includes(arg as Type); return typeof arg === 'string' && TypeLiterals.includes(arg as Type);
@ -96,7 +96,7 @@ export namespace LibrarySearch {
'Timing', 'Timing',
'Uncategorized', 'Uncategorized',
] as const; ] as const;
export type Topic = typeof TopicLiterals[number]; export type Topic = (typeof TopicLiterals)[number];
export namespace Topic { export namespace Topic {
export function is(arg: unknown): arg is Topic { export function is(arg: unknown): arg is Topic {
return typeof arg === 'string' && TopicLiterals.includes(arg as Topic); return typeof arg === 'string' && TopicLiterals.includes(arg as Topic);

View File

@ -14,18 +14,11 @@
"resolveJsonModule": true, "resolveJsonModule": true,
"target": "ES2017", "target": "ES2017",
"outDir": "lib", "outDir": "lib",
"lib": [ "lib": ["ES2017", "dom"],
"ES2017",
"dom"
],
"jsx": "react", "jsx": "react",
"sourceMap": true, "sourceMap": true,
"skipLibCheck": true "skipLibCheck": true
}, },
"include": [ "include": ["src"],
"src" "files": ["../node_modules/nsfw/index.d.ts"]
],
"files": [
"../node_modules/nsfw/index.d.ts"
]
} }

View File

@ -3,24 +3,27 @@
Arduino IDE provides a Cloud Sketchbook feature that can be used to upload sketches to Arduino Cloud. Arduino IDE provides a Cloud Sketchbook feature that can be used to upload sketches to Arduino Cloud.
![](assets/remote.png) ![](assets/remote.png)
In order to use this feature, a user must be registered on [Arduino Cloud](https://store.arduino.cc/digital/create) and logged in. In order to use this feature, a user must be registered on [Arduino Cloud](https://store.arduino.cc/digital/create) and logged in.
This feature is completely optional and can be disabled in the IDE via the _"File > Advanced > Hide Cloud Sketchbook"_ menu item. This feature is completely optional and can be disabled in the IDE via the _"File > Advanced > Hide Cloud Sketchbook"_ menu item.
## Developer guide ## Developer guide
A developer could use the content of this repo to create a customized version of this feature and implement a different remote storage as follows: A developer could use the content of this repo to create a customized version of this feature and implement a different remote storage as follows:
### 1. Changing remote connection parameters in the Preferences panel (be careful while editing the Preferences panel!) ### 1. Changing remote connection parameters in the Preferences panel (be careful while editing the Preferences panel!)
Here a screenshot of the Preferences panel Here a screenshot of the Preferences panel
![](assets/preferences.png) ![](assets/preferences.png)
- The settings under _Arduino > Auth_ should be edited to match the OAuth2 configuration of your custom cloud sketchbook storage - The settings under _Arduino > Auth_ should be edited to match the OAuth2 configuration of your custom cloud sketchbook storage
- The setting under _Arduino > Sketch Sync Endpoint_ should be edited to point to your custom cloud sketchbook storage service - The setting under _Arduino > Sketch Sync Endpoint_ should be edited to point to your custom cloud sketchbook storage service
### 2. Implementing the Arduino Cloud Store APIs for your custom cloud sketchbook storage ### 2. Implementing the Arduino Cloud Store APIs for your custom cloud sketchbook storage
Following the API Reference below: Following the API Reference below:
| API Call | OpenAPI documentation | | API Call | OpenAPI documentation |
| ------------- | ------------- | | ----------------------------------------------------- | --------------------------------------------------------------------- |
| DELETE create/v2/files/d/$HOME/sketches_v2{posixPath} | https://api2.arduino.cc/create/docs#!/files95v2/files_v2_deletedir | | DELETE create/v2/files/d/$HOME/sketches_v2{posixPath} | https://api2.arduino.cc/create/docs#!/files95v2/files_v2_deletedir |
| DELETE create/v2/files/f/$HOME/sketches_v2{posixPath} | https://api2.arduino.cc/create/docs#!/files95v2/files_v2_deletefile | | DELETE create/v2/files/f/$HOME/sketches_v2{posixPath} | https://api2.arduino.cc/create/docs#!/files95v2/files_v2_deletefile |
| GET create/v2/files/d/$HOME/sketches_v2{posixPath} | https://api2.arduino.cc/create/docs#!/files95v2/files_v2_list | | GET create/v2/files/d/$HOME/sketches_v2{posixPath} | https://api2.arduino.cc/create/docs#!/files95v2/files_v2_list |
@ -38,6 +41,7 @@ Following the API Reference below:
## Build the Arduino IDE with this extension ## Build the Arduino IDE with this extension
To build the Arduino IDE with this extension, run the following in a terminal. On Windows, use _Git Bash_. To build the Arduino IDE with this extension, run the following in a terminal. On Windows, use _Git Bash_.
```sh ```sh
./bootstrap.sh ./bootstrap.sh
``` ```

View File

@ -3,15 +3,20 @@
Building the Pro IDE on Linux `armv7l` (aka `armhf`) and `aarch64` (aka `arm64`): Building the Pro IDE on Linux `armv7l` (aka `armhf`) and `aarch64` (aka `arm64`):
1. Install Node.js 16.x with [nvm](https://github.com/nvm-sh/nvm#install--update-script): 1. Install Node.js 16.x with [nvm](https://github.com/nvm-sh/nvm#install--update-script):
``` ```
wget -qO- https://raw.githubusercontent.com/nvm-sh/nvm/v0.35.3/install.sh | bash wget -qO- https://raw.githubusercontent.com/nvm-sh/nvm/v0.35.3/install.sh | bash
``` ```
Restart your shell then: Restart your shell then:
``` ```
nvm install 16 nvm install 16
nvm use 16 nvm use 16
``` ```
Verify: Verify:
``` ```
node -v node -v
``` ```
@ -19,21 +24,27 @@ Building the Pro IDE on Linux `armv7l` (aka `armhf`) and `aarch64` (aka `arm64`)
2. Install [Yarn](https://classic.yarnpkg.com/en/docs/install/#debian-stable): 2. Install [Yarn](https://classic.yarnpkg.com/en/docs/install/#debian-stable):
Configure the Debian package repository; otherwise, you will pull a different `yarn`. Configure the Debian package repository; otherwise, you will pull a different `yarn`.
``` ```
curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add - curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add -
echo "deb https://dl.yarnpkg.com/debian/ stable main" | sudo tee /etc/apt/sources.list.d/yarn.list echo "deb https://dl.yarnpkg.com/debian/ stable main" | sudo tee /etc/apt/sources.list.d/yarn.list
``` ```
Install: Install:
``` ```
sudo apt update && sudo apt install --no-install-recommends yarn sudo apt update && sudo apt install --no-install-recommends yarn
``` ```
Verify: Verify:
``` ```
yarn -v yarn -v
1.22.4 1.22.4
``` ```
3. Other native [dependencies](https://github.com/eclipse-theia/theia/blob/master/doc/Developing.md#prerequisites): 3. Other native [dependencies](https://github.com/eclipse-theia/theia/blob/master/doc/Developing.md#prerequisites):
- `make`, - `make`,
- `gcc`, - `gcc`,
- `pkg-config`, - `pkg-config`,
@ -42,6 +53,7 @@ Building the Pro IDE on Linux `armv7l` (aka `armhf`) and `aarch64` (aka `arm64`)
- `libxkbfile-dev` - `libxkbfile-dev`
4. [Build it](../development.md#build-from-source) from the source: 4. [Build it](../development.md#build-from-source) from the source:
``` ```
git clone https://github.com/arduino/arduino-ide.git \ git clone https://github.com/arduino/arduino-ide.git \
&& cd arduino-ide \ && cd arduino-ide \
@ -53,6 +65,7 @@ Building the Pro IDE on Linux `armv7l` (aka `armhf`) and `aarch64` (aka `arm64`)
5. Troubleshoot 5. Troubleshoot
If you see [`ENOSPC` errors](https://github.com/eclipse-theia/theia/blob/master/doc/Developing.md#linux) at runtime, increase the default `inotify` watches: If you see [`ENOSPC` errors](https://github.com/eclipse-theia/theia/blob/master/doc/Developing.md#linux) at runtime, increase the default `inotify` watches:
``` ```
echo fs.inotify.max_user_watches=524288 | sudo tee -a /etc/sysctl.conf && sudo sysctl -p echo fs.inotify.max_user_watches=524288 | sudo tee -a /etc/sysctl.conf && sudo sysctl -p
``` ```

View File

@ -57,7 +57,7 @@
@keyframes preload-spinner { @keyframes preload-spinner {
0% { 0% {
transform: scale(1.0); transform: scale(1);
} }
50% { 50% {
@ -65,48 +65,127 @@
} }
100% { 100% {
transform: scale(1.0); transform: scale(1);
} }
} }
</style> </style>
</head> </head>
<body> <body>
<div class='spinner-container'> <div class="spinner-container">
<div class='custom-spinner'> <div class="custom-spinner">
<svg id="spinner" xmlns="http://www.w3.org/2000/svg" width="2499" height="2500" <svg
viewBox="0 0 1372.201 1372.684"> id="spinner"
<path fill="#00979D" stroke="#81C9CB" stroke-width=".932" stroke-miterlimit="10" xmlns="http://www.w3.org/2000/svg"
d="M1371.701 686.024c0 378.658-306.972 685.605-685.549 685.605C307.451 1371.629.5 1064.682.5 686.024.5 307.455 307.451.483 686.152.483c378.594.001 685.549 306.972 685.549 685.541z" /> width="2499"
<linearGradient id="a" gradientUnits="userSpaceOnUse" x1="-16.3" y1="16.071" x2="1354.901" y2="16.071" height="2500"
gradientTransform="matrix(1 0 0 -1 16.8 702.696)"> viewBox="0 0 1372.201 1372.684"
>
<path
fill="#00979D"
stroke="#81C9CB"
stroke-width=".932"
stroke-miterlimit="10"
d="M1371.701 686.024c0 378.658-306.972 685.605-685.549 685.605C307.451 1371.629.5 1064.682.5 686.024.5 307.455 307.451.483 686.152.483c378.594.001 685.549 306.972 685.549 685.541z"
/>
<linearGradient
id="a"
gradientUnits="userSpaceOnUse"
x1="-16.3"
y1="16.071"
x2="1354.901"
y2="16.071"
gradientTransform="matrix(1 0 0 -1 16.8 702.696)"
>
<stop offset=".117" stop-color="#fff" stop-opacity="0" /> <stop offset=".117" stop-color="#fff" stop-opacity="0" />
<stop offset=".252" stop-color="#c0d1d3" stop-opacity=".153" /> <stop
<stop offset=".387" stop-color="#91b3b7" stop-opacity=".306" /> offset=".252"
<stop offset=".52" stop-color="#6d9fa3" stop-opacity=".457" /> stop-color="#c0d1d3"
<stop offset=".65" stop-color="#4d9195" stop-opacity=".604" /> stop-opacity=".153"
<stop offset=".776" stop-color="#30888b" stop-opacity=".746" /> />
<stop offset=".895" stop-color="#148386" stop-opacity=".881" /> <stop
offset=".387"
stop-color="#91b3b7"
stop-opacity=".306"
/>
<stop
offset=".52"
stop-color="#6d9fa3"
stop-opacity=".457"
/>
<stop
offset=".65"
stop-color="#4d9195"
stop-opacity=".604"
/>
<stop
offset=".776"
stop-color="#30888b"
stop-opacity=".746"
/>
<stop
offset=".895"
stop-color="#148386"
stop-opacity=".881"
/>
<stop offset="1" stop-color="#008184" /> <stop offset="1" stop-color="#008184" />
</linearGradient> </linearGradient>
<linearGradient id="b" gradientUnits="userSpaceOnUse" x1="-16.8" y1="16.071" x2="1355.401" y2="16.071" <linearGradient
gradientTransform="matrix(1 0 0 -1 16.8 702.696)"> id="b"
gradientUnits="userSpaceOnUse"
x1="-16.8"
y1="16.071"
x2="1355.401"
y2="16.071"
gradientTransform="matrix(1 0 0 -1 16.8 702.696)"
>
<stop offset="0" stop-color="#fff" stop-opacity="0" /> <stop offset="0" stop-color="#fff" stop-opacity="0" />
<stop offset=".153" stop-color="#c0d1d3" stop-opacity=".153" /> <stop
<stop offset=".306" stop-color="#91b3b7" stop-opacity=".306" /> offset=".153"
<stop offset=".457" stop-color="#6d9fa3" stop-opacity=".457" /> stop-color="#c0d1d3"
<stop offset=".604" stop-color="#4d9195" stop-opacity=".604" /> stop-opacity=".153"
<stop offset=".746" stop-color="#30888b" stop-opacity=".746" /> />
<stop offset=".881" stop-color="#148386" stop-opacity=".881" /> <stop
offset=".306"
stop-color="#91b3b7"
stop-opacity=".306"
/>
<stop
offset=".457"
stop-color="#6d9fa3"
stop-opacity=".457"
/>
<stop
offset=".604"
stop-color="#4d9195"
stop-opacity=".604"
/>
<stop
offset=".746"
stop-color="#30888b"
stop-opacity=".746"
/>
<stop
offset=".881"
stop-color="#148386"
stop-opacity=".881"
/>
<stop offset="1" stop-color="#008184" /> <stop offset="1" stop-color="#008184" />
</linearGradient> </linearGradient>
<path opacity=".5" fill="url(#a)" stroke="url(#b)" stroke-miterlimit="10" <path
d="M1371.701 686.595c0 378.65-306.972 685.606-685.549 685.606C307.451 1372.201.5 1065.23.5 686.595.5 308.019 307.451 1.048 686.152 1.048c378.594.016 685.549 306.97 685.549 685.547z" /> opacity=".5"
fill="url(#a)"
stroke="url(#b)"
stroke-miterlimit="10"
d="M1371.701 686.595c0 378.65-306.972 685.606-685.549 685.606C307.451 1372.201.5 1065.23.5 686.595.5 308.019 307.451 1.048 686.152 1.048c378.594.016 685.549 306.97 685.549 685.547z"
/>
<g fill="#FFF"> <g fill="#FFF">
<path <path
d="M947.959 931.196c-12.909 0-26.127-.929-39.127-2.864-108.978-15.554-181.848-93.822-222.665-153.989-40.946 60.166-113.811 138.512-222.74 154.045a275.864 275.864 0 0 1-39.133 2.785c-67.753 0-131.358-25.217-179.201-71.003-48.299-46.165-74.951-108.114-74.951-174.171 0-66.14 26.651-128.004 75.021-174.253 47.797-45.793 111.449-70.936 179.231-70.936 12.918 0 26.067.928 39.023 2.783 108.932 15.535 181.794 93.813 222.743 153.99 40.825-60.177 113.689-138.432 222.658-153.99 13-1.863 26.148-2.783 39.066-2.783 67.753 0 131.401 25.208 179.197 70.936 48.345 46.249 74.937 108.113 74.937 174.253 0 66.057-26.524 128.006-74.868 174.171-47.881 45.785-111.434 71.026-179.191 71.026M734.42 686.024c21.283 40.534 84.067 141.676 186.692 156.375 8.984 1.236 18.028 1.923 26.839 1.923 92.185 0 167.225-71.002 167.225-158.322s-75.023-158.321-167.291-158.321c-8.812 0-17.853.629-26.753 1.921-102.644 14.664-165.428 115.806-186.712 156.424M424.393 527.702c-92.308 0-167.36 70.998-167.36 158.321 0 87.305 75.021 158.322 167.245 158.322 8.852 0 17.897-.688 26.879-1.922 102.629-14.697 165.394-115.783 186.689-156.375-21.237-40.535-84.061-141.761-186.689-156.376-8.877-1.341-17.945-1.97-26.764-1.97" /> d="M947.959 931.196c-12.909 0-26.127-.929-39.127-2.864-108.978-15.554-181.848-93.822-222.665-153.989-40.946 60.166-113.811 138.512-222.74 154.045a275.864 275.864 0 0 1-39.133 2.785c-67.753 0-131.358-25.217-179.201-71.003-48.299-46.165-74.951-108.114-74.951-174.171 0-66.14 26.651-128.004 75.021-174.253 47.797-45.793 111.449-70.936 179.231-70.936 12.918 0 26.067.928 39.023 2.783 108.932 15.535 181.794 93.813 222.743 153.99 40.825-60.177 113.689-138.432 222.658-153.99 13-1.863 26.148-2.783 39.066-2.783 67.753 0 131.401 25.208 179.197 70.936 48.345 46.249 74.937 108.113 74.937 174.253 0 66.057-26.524 128.006-74.868 174.171-47.881 45.785-111.434 71.026-179.191 71.026M734.42 686.024c21.283 40.534 84.067 141.676 186.692 156.375 8.984 1.236 18.028 1.923 26.839 1.923 92.185 0 167.225-71.002 167.225-158.322s-75.023-158.321-167.291-158.321c-8.812 0-17.853.629-26.753 1.921-102.644 14.664-165.428 115.806-186.712 156.424M424.393 527.702c-92.308 0-167.36 70.998-167.36 158.321 0 87.305 75.021 158.322 167.245 158.322 8.852 0 17.897-.688 26.879-1.922 102.629-14.697 165.394-115.783 186.689-156.375-21.237-40.535-84.061-141.761-186.689-156.376-8.877-1.341-17.945-1.97-26.764-1.97"
/>
<path <path
d="M354.37 662.051h152.625v49.181H354.37zM1016.484 662.051h-51.671v-51.747h-49.348v51.747h-51.648v49.181h51.648v51.737h49.348v-51.737h51.671z" /> d="M354.37 662.051h152.625v49.181H354.37zM1016.484 662.051h-51.671v-51.747h-49.348v51.747h-51.648v49.181h51.648v51.737h49.348v-51.737h51.671z"
/>
</g> </g>
</svg> </svg>
</div> </div>

View File

@ -6,28 +6,39 @@ const semver = require('semver');
const targetVersion = process.argv.slice(2).shift(); const targetVersion = process.argv.slice(2).shift();
const repoRootPath = path.join(__dirname, '..'); const repoRootPath = path.join(__dirname, '..');
const { version: currentVersion } = require(path.join(repoRootPath, 'package.json')); const { version: currentVersion } = require(path.join(
repoRootPath,
'package.json'
));
if (!targetVersion) { if (!targetVersion) {
console.error('Target version was not specified. Target version must be a valid semver. Use: `yarn update:version x.y.z` to update the versions.'); console.error(
'Target version was not specified. Target version must be a valid semver. Use: `yarn update:version x.y.z` to update the versions.'
);
process.exit(1); process.exit(1);
} }
if (!semver.valid(targetVersion)) { if (!semver.valid(targetVersion)) {
console.error(`Target version '${targetVersion}' is not a valid semver. Use: \`yarn update:version x.y.z\` to update the versions.`); console.error(
`Target version '${targetVersion}' is not a valid semver. Use: \`yarn update:version x.y.z\` to update the versions.`
);
process.exit(1); process.exit(1);
} }
if (!semver.gt(targetVersion, currentVersion)) { if (!semver.gt(targetVersion, currentVersion)) {
console.error(`Target version '${targetVersion}' must be greater than the current version '${currentVersion}'.`); console.error(
`Target version '${targetVersion}' must be greater than the current version '${currentVersion}'.`
);
process.exit(1); process.exit(1);
} }
console.log(`🛠️ Updating current version from '${currentVersion}' to '${targetVersion}':`); console.log(
`🛠️ Updating current version from '${currentVersion}' to '${targetVersion}':`
);
for (const toUpdate of [ for (const toUpdate of [
path.join(repoRootPath, 'package.json'), path.join(repoRootPath, 'package.json'),
path.join(repoRootPath, 'electron-app', 'package.json'), path.join(repoRootPath, 'electron-app', 'package.json'),
path.join(repoRootPath, 'arduino-ide-extension', 'package.json') path.join(repoRootPath, 'arduino-ide-extension', 'package.json'),
]) { ]) {
process.stdout.write(` Updating ${toUpdate}'...`); process.stdout.write(` Updating ${toUpdate}'...`);
const pkg = require(toUpdate); const pkg = require(toUpdate);
@ -43,4 +54,6 @@ for (const toUpdate of [
process.stdout.write(` ✅ Done.\n`); process.stdout.write(` ✅ Done.\n`);
} }
console.log(`Done. The new version is '${targetVersion}' now. Commit your changes and tag the code for the release. 🚢`); console.log(
`Done. The new version is '${targetVersion}' now. Commit your changes and tag the code for the release. 🚢`
);