From 8c4ff304d7e7059b8c4755b206fcfab9ece3c691 Mon Sep 17 00:00:00 2001 From: Francesco Stasi Date: Mon, 15 Nov 2021 17:59:00 +0100 Subject: [PATCH 01/10] Update Theia to 1.19.0 --- arduino-ide-extension/package.json | 32 +- .../browser/arduino-frontend-contribution.tsx | 2 +- .../browser/arduino-ide-frontend-module.ts | 4 +- .../src/browser/arduino-preferences.ts | 2 +- .../browser/boards/boards-auto-installer.ts | 2 +- .../browser/boards/boards-config-dialog.ts | 2 +- .../src/browser/boards/boards-config.tsx | 2 +- .../boards/boards-data-menu-updater.ts | 2 +- .../src/browser/boards/boards-list-widget.ts | 2 +- .../browser/boards/boards-service-provider.ts | 2 +- .../browser/boards/boards-toolbar-item.tsx | 2 +- .../src/browser/contributions/about.ts | 2 +- .../src/browser/contributions/add-file.ts | 2 +- .../browser/contributions/add-zip-library.ts | 2 +- .../browser/contributions/archive-sketch.ts | 2 +- .../browser/contributions/board-selection.ts | 26 +- .../browser/contributions/burn-bootloader.ts | 4 +- .../src/browser/contributions/close.ts | 2 +- .../src/browser/contributions/contribution.ts | 2 +- .../src/browser/contributions/debug.ts | 2 +- .../contributions/edit-contributions.ts | 2 +- .../src/browser/contributions/examples.ts | 2 +- .../src/browser/contributions/help.ts | 2 +- .../browser/contributions/include-library.ts | 2 +- .../src/browser/contributions/new-sketch.ts | 2 +- .../contributions/open-recent-sketch.ts | 2 +- .../contributions/open-sketch-external.ts | 2 +- .../src/browser/contributions/open-sketch.ts | 2 +- .../src/browser/contributions/quit-app.ts | 2 +- .../browser/contributions/save-as-sketch.ts | 2 +- .../src/browser/contributions/save-sketch.ts | 2 +- .../src/browser/contributions/settings.ts | 2 +- .../browser/contributions/sketch-control.ts | 2 +- .../src/browser/contributions/sketchbook.ts | 2 +- .../contributions/upload-certificate.ts | 2 +- .../browser/contributions/upload-firmware.ts | 2 +- .../browser/contributions/upload-sketch.ts | 2 +- .../browser/contributions/verify-sketch.ts | 2 +- .../certificate-add-new.tsx | 2 +- .../certificate-uploader-component.tsx | 2 +- .../certificate-uploader-dialog.tsx | 2 +- .../select-board-components.tsx | 2 +- .../dialogs/cloud-share-sketch-dialog.tsx | 2 +- .../dialogs/do-not-ask-again-dialog.ts | 2 +- .../firmware-uploader-component.tsx | 2 +- .../browser/library/library-list-widget.ts | 2 +- .../library-widget-frontend-contribution.ts | 2 +- .../src/browser/monitor/monitor-connection.ts | 2 +- .../monitor/monitor-view-contribution.tsx | 2 +- .../src/browser/monitor/monitor-widget.tsx | 2 +- .../monitor/serial-monitor-send-input.tsx | 2 +- .../src/browser/response-service-impl.ts | 2 +- .../src/browser/settings.tsx | 2 +- .../browser/theia/core/application-shell.ts | 2 +- .../theia/core/connection-status-service.ts | 2 +- .../theia/debug/debug-session-manager.ts | 2 +- .../theia/editor/editor-widget-factory.ts | 2 +- .../keymaps/keymaps-frontend-contribution.ts | 2 +- .../notification-center-component.tsx | 2 +- .../theia/messages/notification-component.tsx | 2 +- .../browser/theia/output/output-channel.ts | 2 +- .../theia/workspace/workspace-commands.ts | 2 +- .../workspace/workspace-delete-handler.ts | 2 +- .../theia/workspace/workspace-input-dialog.ts | 2 +- .../theia/workspace/workspace-service.ts | 2 +- .../cloud-sketchbook-composite-widget.tsx | 2 +- .../cloud-sketchbook-contributions.ts | 2 +- .../cloud-sketchbook-tree-model.ts | 2 +- .../cloud-sketchbook-tree-widget.tsx | 2 +- .../cloud-sketchbook/cloud-sketchbook-tree.ts | 2 +- .../cloud-sketchbook/cloud-user-status.tsx | 2 +- .../filterable-list-container.tsx | 2 +- .../component-list/list-item-renderer.tsx | 2 +- .../widgets/component-list/search-bar.tsx | 2 +- .../sketchbook/sketchbook-tree-widget.tsx | 2 +- .../widgets/sketchbook/sketchbook-widget.tsx | 2 +- .../electron-window-service.ts | 2 +- .../theia/core/electron-main-menu-factory.ts | 6 +- .../theia/electron-main-window-service.ts | 2 +- .../browser/boards-auto-installer.test.ts | 494 +++++++------- browser-app/package.json | 34 +- electron-app/package.json | 36 +- yarn.lock | 617 +++++++++--------- 83 files changed, 714 insertions(+), 687 deletions(-) diff --git a/arduino-ide-extension/package.json b/arduino-ide-extension/package.json index 6bb9166b8..c5b85a3cb 100644 --- a/arduino-ide-extension/package.json +++ b/arduino-ide-extension/package.json @@ -19,22 +19,22 @@ }, "dependencies": { "@grpc/grpc-js": "^1.3.7", - "@theia/application-package": "1.18.0", - "@theia/core": "1.18.0", - "@theia/editor": "1.18.0", - "@theia/editor-preview": "1.18.0", - "@theia/filesystem": "1.18.0", - "@theia/git": "1.18.0", - "@theia/keymaps": "1.18.0", - "@theia/markers": "1.18.0", - "@theia/monaco": "1.18.0", - "@theia/navigator": "1.18.0", - "@theia/outline-view": "1.18.0", - "@theia/output": "1.18.0", - "@theia/preferences": "1.18.0", - "@theia/search-in-workspace": "1.18.0", - "@theia/terminal": "1.18.0", - "@theia/workspace": "1.18.0", + "@theia/application-package": "1.19.0", + "@theia/core": "1.19.0", + "@theia/editor": "1.19.0", + "@theia/editor-preview": "1.19.0", + "@theia/filesystem": "1.19.0", + "@theia/git": "1.19.0", + "@theia/keymaps": "1.19.0", + "@theia/markers": "1.19.0", + "@theia/monaco": "1.19.0", + "@theia/navigator": "1.19.0", + "@theia/outline-view": "1.19.0", + "@theia/output": "1.19.0", + "@theia/preferences": "1.19.0", + "@theia/search-in-workspace": "1.19.0", + "@theia/terminal": "1.19.0", + "@theia/workspace": "1.19.0", "@tippyjs/react": "^4.2.5", "@types/atob": "^2.1.2", "@types/auth0-js": "^9.14.0", diff --git a/arduino-ide-extension/src/browser/arduino-frontend-contribution.tsx b/arduino-ide-extension/src/browser/arduino-frontend-contribution.tsx index 8352f6dc1..1f3a48da0 100644 --- a/arduino-ide-extension/src/browser/arduino-frontend-contribution.tsx +++ b/arduino-ide-extension/src/browser/arduino-frontend-contribution.tsx @@ -16,7 +16,7 @@ import { StatusBar, StatusBarAlignment, } from '@theia/core/lib/browser'; -import { nls } from '@theia/core/lib/browser/nls'; +import { nls } from '@theia/core/lib/common'; import { ColorContribution } from '@theia/core/lib/browser/color-application-contribution'; import { ColorRegistry } from '@theia/core/lib/browser/color-registry'; import { CommonMenus } from '@theia/core/lib/browser/common-frontend-contribution'; diff --git a/arduino-ide-extension/src/browser/arduino-ide-frontend-module.ts b/arduino-ide-extension/src/browser/arduino-ide-frontend-module.ts index ec572776f..271f82e1e 100644 --- a/arduino-ide-extension/src/browser/arduino-ide-frontend-module.ts +++ b/arduino-ide-extension/src/browser/arduino-ide-frontend-module.ts @@ -154,7 +154,7 @@ import { } from '../common/protocol/examples-service'; import { BuiltInExamples, LibraryExamples } from './contributions/examples'; import { IncludeLibrary } from './contributions/include-library'; -import { OutputChannelManager as TheiaOutputChannelManager } from '@theia/output/lib/common/output-channel'; +import { OutputChannelManager as TheiaOutputChannelManager } from '@theia/output/lib/browser/output-channel'; import { OutputChannelManager } from './theia/output/output-channel'; import { OutputChannelRegistryMainImpl as TheiaOutputChannelRegistryMainImpl, @@ -253,7 +253,7 @@ import { UploadCertificateDialogProps, UploadCertificateDialogWidget, } from './dialogs/certificate-uploader/certificate-uploader-dialog'; -import { nls } from '@theia/core/lib/browser/nls'; +import { nls } from '@theia/core/lib/common'; const ElementQueries = require('css-element-queries/src/ElementQueries'); diff --git a/arduino-ide-extension/src/browser/arduino-preferences.ts b/arduino-ide-extension/src/browser/arduino-preferences.ts index 02de6d5ad..5e1013a1d 100644 --- a/arduino-ide-extension/src/browser/arduino-preferences.ts +++ b/arduino-ide-extension/src/browser/arduino-preferences.ts @@ -6,7 +6,7 @@ import { PreferenceContribution, PreferenceSchema, } from '@theia/core/lib/browser/preferences'; -import { nls } from '@theia/core/lib/browser/nls'; +import { nls } from '@theia/core/lib/common'; import { CompilerWarningLiterals, CompilerWarnings } from '../common/protocol'; export const ArduinoConfigSchema: PreferenceSchema = { diff --git a/arduino-ide-extension/src/browser/boards/boards-auto-installer.ts b/arduino-ide-extension/src/browser/boards/boards-auto-installer.ts index e99618d96..97fefb84d 100644 --- a/arduino-ide-extension/src/browser/boards/boards-auto-installer.ts +++ b/arduino-ide-extension/src/browser/boards/boards-auto-installer.ts @@ -10,7 +10,7 @@ import { BoardsServiceProvider } from './boards-service-provider'; import { BoardsConfig } from './boards-config'; import { Installable, ResponseServiceArduino } from '../../common/protocol'; import { BoardsListWidgetFrontendContribution } from './boards-widget-frontend-contribution'; -import { nls } from '@theia/core/lib/browser/nls'; +import { nls } from '@theia/core/lib/common'; /** * Listens on `BoardsConfig.Config` changes, if a board is selected which does not diff --git a/arduino-ide-extension/src/browser/boards/boards-config-dialog.ts b/arduino-ide-extension/src/browser/boards/boards-config-dialog.ts index 8f44eef8d..0ef4bad3c 100644 --- a/arduino-ide-extension/src/browser/boards/boards-config-dialog.ts +++ b/arduino-ide-extension/src/browser/boards/boards-config-dialog.ts @@ -6,7 +6,7 @@ import { BoardsConfig } from './boards-config'; import { BoardsService } from '../../common/protocol/boards-service'; import { BoardsServiceProvider } from './boards-service-provider'; import { BoardsConfigDialogWidget } from './boards-config-dialog-widget'; -import { nls } from '@theia/core/lib/browser/nls'; +import { nls } from '@theia/core/lib/common'; @injectable() export class BoardsConfigDialogProps extends DialogProps {} diff --git a/arduino-ide-extension/src/browser/boards/boards-config.tsx b/arduino-ide-extension/src/browser/boards/boards-config.tsx index 083fa6124..1c7a13c25 100644 --- a/arduino-ide-extension/src/browser/boards/boards-config.tsx +++ b/arduino-ide-extension/src/browser/boards/boards-config.tsx @@ -11,7 +11,7 @@ import { } from '../../common/protocol/boards-service'; import { NotificationCenter } from '../notification-center'; import { BoardsServiceProvider } from './boards-service-provider'; -import { nls } from '@theia/core/lib/browser/nls'; +import { nls } from '@theia/core/lib/common'; export namespace BoardsConfig { export interface Config { diff --git a/arduino-ide-extension/src/browser/boards/boards-data-menu-updater.ts b/arduino-ide-extension/src/browser/boards/boards-data-menu-updater.ts index 19d23b87e..5447427de 100644 --- a/arduino-ide-extension/src/browser/boards/boards-data-menu-updater.ts +++ b/arduino-ide-extension/src/browser/boards/boards-data-menu-updater.ts @@ -12,7 +12,7 @@ import { FrontendApplicationContribution } from '@theia/core/lib/browser'; import { BoardsDataStore } from './boards-data-store'; import { MainMenuManager } from '../../common/main-menu-manager'; import { ArduinoMenus, unregisterSubmenu } from '../menu/arduino-menus'; -import { nls } from '@theia/core/lib/browser/nls'; +import { nls } from '@theia/core/lib/common'; @injectable() export class BoardsDataMenuUpdater implements FrontendApplicationContribution { diff --git a/arduino-ide-extension/src/browser/boards/boards-list-widget.ts b/arduino-ide-extension/src/browser/boards/boards-list-widget.ts index d41f2a4e3..81749ea91 100644 --- a/arduino-ide-extension/src/browser/boards/boards-list-widget.ts +++ b/arduino-ide-extension/src/browser/boards/boards-list-widget.ts @@ -5,7 +5,7 @@ import { } from '../../common/protocol/boards-service'; import { ListWidget } from '../widgets/component-list/list-widget'; import { ListItemRenderer } from '../widgets/component-list/list-item-renderer'; -import { nls } from '@theia/core/lib/browser/nls'; +import { nls } from '@theia/core/lib/common'; @injectable() export class BoardsListWidget extends ListWidget { diff --git a/arduino-ide-extension/src/browser/boards/boards-service-provider.ts b/arduino-ide-extension/src/browser/boards/boards-service-provider.ts index 356589d4f..310d986fb 100644 --- a/arduino-ide-extension/src/browser/boards/boards-service-provider.ts +++ b/arduino-ide-extension/src/browser/boards/boards-service-provider.ts @@ -18,7 +18,7 @@ import { naturalCompare } from '../../common/utils'; import { NotificationCenter } from '../notification-center'; import { ArduinoCommands } from '../arduino-commands'; import { StorageWrapper } from '../storage-wrapper'; -import { nls } from '@theia/core/lib/browser/nls'; +import { nls } from '@theia/core/lib/common'; @injectable() export class BoardsServiceProvider implements FrontendApplicationContribution { diff --git a/arduino-ide-extension/src/browser/boards/boards-toolbar-item.tsx b/arduino-ide-extension/src/browser/boards/boards-toolbar-item.tsx index ffc7f9d66..fc4cc0ce4 100644 --- a/arduino-ide-extension/src/browser/boards/boards-toolbar-item.tsx +++ b/arduino-ide-extension/src/browser/boards/boards-toolbar-item.tsx @@ -9,7 +9,7 @@ import { BoardsServiceProvider, AvailableBoard, } from './boards-service-provider'; -import { nls } from '@theia/core/lib/browser/nls'; +import { nls } from '@theia/core/lib/common'; export interface BoardsDropDownListCoords { readonly top: number; diff --git a/arduino-ide-extension/src/browser/contributions/about.ts b/arduino-ide-extension/src/browser/contributions/about.ts index 13593341f..662781a00 100644 --- a/arduino-ide-extension/src/browser/contributions/about.ts +++ b/arduino-ide-extension/src/browser/contributions/about.ts @@ -12,7 +12,7 @@ import { } from './contribution'; import { ArduinoMenus } from '../menu/arduino-menus'; import { ConfigService } from '../../common/protocol'; -import { nls } from '@theia/core/lib/browser/nls'; +import { nls } from '@theia/core/lib/common'; @injectable() export class About extends Contribution { diff --git a/arduino-ide-extension/src/browser/contributions/add-file.ts b/arduino-ide-extension/src/browser/contributions/add-file.ts index 9d279cd8e..d6155d927 100644 --- a/arduino-ide-extension/src/browser/contributions/add-file.ts +++ b/arduino-ide-extension/src/browser/contributions/add-file.ts @@ -9,7 +9,7 @@ import { URI, } from './contribution'; import { FileDialogService } from '@theia/filesystem/lib/browser'; -import { nls } from '@theia/core/lib/browser/nls'; +import { nls } from '@theia/core/lib/common'; @injectable() export class AddFile extends SketchContribution { diff --git a/arduino-ide-extension/src/browser/contributions/add-zip-library.ts b/arduino-ide-extension/src/browser/contributions/add-zip-library.ts index 0e37ca109..6b97c3ec2 100644 --- a/arduino-ide-extension/src/browser/contributions/add-zip-library.ts +++ b/arduino-ide-extension/src/browser/contributions/add-zip-library.ts @@ -15,7 +15,7 @@ import { CommandRegistry, MenuModelRegistry, } from './contribution'; -import { nls } from '@theia/core/lib/browser/nls'; +import { nls } from '@theia/core/lib/common'; @injectable() export class AddZipLibrary extends SketchContribution { diff --git a/arduino-ide-extension/src/browser/contributions/archive-sketch.ts b/arduino-ide-extension/src/browser/contributions/archive-sketch.ts index 6b7e00c25..315ad5156 100644 --- a/arduino-ide-extension/src/browser/contributions/archive-sketch.ts +++ b/arduino-ide-extension/src/browser/contributions/archive-sketch.ts @@ -9,7 +9,7 @@ import { CommandRegistry, MenuModelRegistry, } from './contribution'; -import { nls } from '@theia/core/lib/browser/nls'; +import { nls } from '@theia/core/lib/common'; @injectable() export class ArchiveSketch extends SketchContribution { diff --git a/arduino-ide-extension/src/browser/contributions/board-selection.ts b/arduino-ide-extension/src/browser/contributions/board-selection.ts index 11ea70ca5..cb9d18f6b 100644 --- a/arduino-ide-extension/src/browser/contributions/board-selection.ts +++ b/arduino-ide-extension/src/browser/contributions/board-selection.ts @@ -23,7 +23,7 @@ import { Port, } from '../../common/protocol'; import { SketchContribution, Command, CommandRegistry } from './contribution'; -import { nls } from '@theia/core/lib/browser/nls'; +import { nls } from '@theia/core/lib/common'; @injectable() export class BoardSelection extends SketchContribution { @@ -138,7 +138,11 @@ PID: ${PID}`; // The board specific items, and the rest, have order with `z`. We needed something between `0` and `z` with natural-order. this.menuModelRegistry.registerSubmenu( boardsSubmenuPath, - nls.localize('arduino/board/board', 'Board{0}', !!boardsSubmenuLabel ? `: "${boardsSubmenuLabel}"` : ''), + nls.localize( + 'arduino/board/board', + 'Board{0}', + !!boardsSubmenuLabel ? `: "${boardsSubmenuLabel}"` : '' + ), { order: '100' } ); this.toDisposeBeforeMenuRebuild.push( @@ -155,7 +159,11 @@ PID: ${PID}`; const portsSubmenuLabel = config.selectedPort?.address; this.menuModelRegistry.registerSubmenu( portsSubmenuPath, - nls.localize('arduino/board/port', 'Port{0}', portsSubmenuLabel ? `: "${portsSubmenuLabel}"` : ''), + nls.localize( + 'arduino/board/port', + 'Port{0}', + portsSubmenuLabel ? `: "${portsSubmenuLabel}"` : '' + ), { order: '101' } ); this.toDisposeBeforeMenuRebuild.push( @@ -193,9 +201,10 @@ PID: ${PID}`; const packageLabel = packageName + - `${manuallyInstalled - ? nls.localize('arduino/board/inSketchbook', ' (in Sketchbook)') - : '' + `${ + manuallyInstalled + ? nls.localize('arduino/board/inSketchbook', ' (in Sketchbook)') + : '' }`; // Platform submenu const platformMenuPath = [...boardsPackagesGroup, packageId]; @@ -268,8 +277,9 @@ PID: ${PID}`; }); } for (const { name, fqbn } of boards) { - const id = `arduino-select-port--${address}${fqbn ? `--${fqbn}` : '' - }`; + const id = `arduino-select-port--${address}${ + fqbn ? `--${fqbn}` : '' + }`; const command = { id }; const handler = { execute: () => { diff --git a/arduino-ide-extension/src/browser/contributions/burn-bootloader.ts b/arduino-ide-extension/src/browser/contributions/burn-bootloader.ts index 3ea8602b1..02c783d4a 100644 --- a/arduino-ide-extension/src/browser/contributions/burn-bootloader.ts +++ b/arduino-ide-extension/src/browser/contributions/burn-bootloader.ts @@ -1,5 +1,5 @@ import { inject, injectable } from 'inversify'; -import { OutputChannelManager } from '@theia/output/lib/common/output-channel'; +import { OutputChannelManager } from '@theia/output/lib/browser/output-channel'; import { CoreService } from '../../common/protocol'; import { ArduinoMenus } from '../menu/arduino-menus'; import { BoardsDataStore } from '../boards/boards-data-store'; @@ -11,7 +11,7 @@ import { CommandRegistry, MenuModelRegistry, } from './contribution'; -import { nls } from '@theia/core/lib/browser/nls'; +import { nls } from '@theia/core/lib/common'; @injectable() export class BurnBootloader extends SketchContribution { diff --git a/arduino-ide-extension/src/browser/contributions/close.ts b/arduino-ide-extension/src/browser/contributions/close.ts index bf66dd212..b134873f2 100644 --- a/arduino-ide-extension/src/browser/contributions/close.ts +++ b/arduino-ide-extension/src/browser/contributions/close.ts @@ -15,7 +15,7 @@ import { KeybindingRegistry, URI, } from './contribution'; -import { nls } from '@theia/core/lib/browser/nls'; +import { nls } from '@theia/core/lib/common'; /** * Closes the `current` closeable editor, or any closeable current widget from the main area, or the current sketch window. diff --git a/arduino-ide-extension/src/browser/contributions/contribution.ts b/arduino-ide-extension/src/browser/contributions/contribution.ts index 14e6e9715..4716801de 100644 --- a/arduino-ide-extension/src/browser/contributions/contribution.ts +++ b/arduino-ide-extension/src/browser/contributions/contribution.ts @@ -9,7 +9,7 @@ import { EditorManager } from '@theia/editor/lib/browser/editor-manager'; import { MessageService } from '@theia/core/lib/common/message-service'; import { WorkspaceService } from '@theia/workspace/lib/browser/workspace-service'; import { open, OpenerService } from '@theia/core/lib/browser/opener-service'; -import { OutputChannelManager } from '@theia/output/lib/common/output-channel'; +import { OutputChannelManager } from '@theia/output/lib/browser/output-channel'; import { MenuModelRegistry, MenuContribution, diff --git a/arduino-ide-extension/src/browser/contributions/debug.ts b/arduino-ide-extension/src/browser/contributions/debug.ts index e1a98aa8c..a67f832e9 100644 --- a/arduino-ide-extension/src/browser/contributions/debug.ts +++ b/arduino-ide-extension/src/browser/contributions/debug.ts @@ -12,7 +12,7 @@ import { SketchContribution, TabBarToolbarRegistry, } from './contribution'; -import { nls } from '@theia/core/lib/browser/nls'; +import { nls } from '@theia/core/lib/common'; @injectable() export class Debug extends SketchContribution { diff --git a/arduino-ide-extension/src/browser/contributions/edit-contributions.ts b/arduino-ide-extension/src/browser/contributions/edit-contributions.ts index d55aae6c5..1f7d56353 100644 --- a/arduino-ide-extension/src/browser/contributions/edit-contributions.ts +++ b/arduino-ide-extension/src/browser/contributions/edit-contributions.ts @@ -11,7 +11,7 @@ import { CommandRegistry, } from './contribution'; import { ArduinoMenus } from '../menu/arduino-menus'; -import { nls } from '@theia/core/lib/browser/nls'; +import { nls } from '@theia/core/lib/common'; // TODO: [macOS]: to remove `Start Dictation...` and `Emoji & Symbol` see this thread: https://github.com/electron/electron/issues/8283#issuecomment-269522072 // Depends on https://github.com/eclipse-theia/theia/pull/7964 diff --git a/arduino-ide-extension/src/browser/contributions/examples.ts b/arduino-ide-extension/src/browser/contributions/examples.ts index 8dfa163c2..9fd045c3b 100644 --- a/arduino-ide-extension/src/browser/contributions/examples.ts +++ b/arduino-ide-extension/src/browser/contributions/examples.ts @@ -22,7 +22,7 @@ import { } from './contribution'; import { NotificationCenter } from '../notification-center'; import { Board, Sketch, SketchContainer } from '../../common/protocol'; -import { nls } from '@theia/core/lib/browser/nls'; +import { nls } from '@theia/core/lib/common'; @injectable() export abstract class Examples extends SketchContribution { diff --git a/arduino-ide-extension/src/browser/contributions/help.ts b/arduino-ide-extension/src/browser/contributions/help.ts index 98eeb806b..51cbd4a2a 100644 --- a/arduino-ide-extension/src/browser/contributions/help.ts +++ b/arduino-ide-extension/src/browser/contributions/help.ts @@ -12,7 +12,7 @@ import { CommandRegistry, KeybindingRegistry, } from './contribution'; -import { nls } from '@theia/core/lib/browser/nls'; +import { nls } from '@theia/core/lib/common'; @injectable() export class Help extends Contribution { diff --git a/arduino-ide-extension/src/browser/contributions/include-library.ts b/arduino-ide-extension/src/browser/contributions/include-library.ts index 0110977d6..77f6bcf39 100644 --- a/arduino-ide-extension/src/browser/contributions/include-library.ts +++ b/arduino-ide-extension/src/browser/contributions/include-library.ts @@ -15,7 +15,7 @@ import { LibraryListWidget } from '../library/library-list-widget'; import { BoardsServiceProvider } from '../boards/boards-service-provider'; import { SketchContribution, Command, CommandRegistry } from './contribution'; import { NotificationCenter } from '../notification-center'; -import { nls } from '@theia/core/lib/browser/nls'; +import { nls } from '@theia/core/lib/common'; @injectable() export class IncludeLibrary extends SketchContribution { diff --git a/arduino-ide-extension/src/browser/contributions/new-sketch.ts b/arduino-ide-extension/src/browser/contributions/new-sketch.ts index 5bd677534..fa4e6686e 100644 --- a/arduino-ide-extension/src/browser/contributions/new-sketch.ts +++ b/arduino-ide-extension/src/browser/contributions/new-sketch.ts @@ -1,4 +1,4 @@ -import { nls } from '@theia/core/lib/browser/nls'; +import { nls } from '@theia/core/lib/common'; import { injectable } from 'inversify'; import { ArduinoMenus } from '../menu/arduino-menus'; import { ArduinoToolbar } from '../toolbar/arduino-toolbar'; diff --git a/arduino-ide-extension/src/browser/contributions/open-recent-sketch.ts b/arduino-ide-extension/src/browser/contributions/open-recent-sketch.ts index 4958fb027..468aef749 100644 --- a/arduino-ide-extension/src/browser/contributions/open-recent-sketch.ts +++ b/arduino-ide-extension/src/browser/contributions/open-recent-sketch.ts @@ -14,7 +14,7 @@ import { ArduinoMenus } from '../menu/arduino-menus'; import { MainMenuManager } from '../../common/main-menu-manager'; import { OpenSketch } from './open-sketch'; import { NotificationCenter } from '../notification-center'; -import { nls } from '@theia/core/lib/browser/nls'; +import { nls } from '@theia/core/lib/common'; @injectable() export class OpenRecentSketch extends SketchContribution { diff --git a/arduino-ide-extension/src/browser/contributions/open-sketch-external.ts b/arduino-ide-extension/src/browser/contributions/open-sketch-external.ts index 4221874b8..0f66a27ea 100644 --- a/arduino-ide-extension/src/browser/contributions/open-sketch-external.ts +++ b/arduino-ide-extension/src/browser/contributions/open-sketch-external.ts @@ -9,7 +9,7 @@ import { MenuModelRegistry, KeybindingRegistry, } from './contribution'; -import { nls } from '@theia/core/lib/browser/nls'; +import { nls } from '@theia/core/lib/common'; @injectable() export class OpenSketchExternal extends SketchContribution { diff --git a/arduino-ide-extension/src/browser/contributions/open-sketch.ts b/arduino-ide-extension/src/browser/contributions/open-sketch.ts index 9a82f2c6c..1c77491ca 100644 --- a/arduino-ide-extension/src/browser/contributions/open-sketch.ts +++ b/arduino-ide-extension/src/browser/contributions/open-sketch.ts @@ -22,7 +22,7 @@ import { ExamplesService } from '../../common/protocol/examples-service'; import { BuiltInExamples } from './examples'; import { Sketchbook } from './sketchbook'; import { SketchContainer } from '../../common/protocol'; -import { nls } from '@theia/core/lib/browser/nls'; +import { nls } from '@theia/core/lib/common'; @injectable() export class OpenSketch extends SketchContribution { diff --git a/arduino-ide-extension/src/browser/contributions/quit-app.ts b/arduino-ide-extension/src/browser/contributions/quit-app.ts index 01cf64ca8..a37bad9a6 100644 --- a/arduino-ide-extension/src/browser/contributions/quit-app.ts +++ b/arduino-ide-extension/src/browser/contributions/quit-app.ts @@ -9,7 +9,7 @@ import { CommandRegistry, } from './contribution'; import { ArduinoMenus } from '../menu/arduino-menus'; -import { nls } from '@theia/core/lib/browser/nls'; +import { nls } from '@theia/core/lib/common'; @injectable() export class QuitApp extends Contribution { diff --git a/arduino-ide-extension/src/browser/contributions/save-as-sketch.ts b/arduino-ide-extension/src/browser/contributions/save-as-sketch.ts index 3781cedcf..fbf81f8af 100644 --- a/arduino-ide-extension/src/browser/contributions/save-as-sketch.ts +++ b/arduino-ide-extension/src/browser/contributions/save-as-sketch.ts @@ -10,7 +10,7 @@ import { MenuModelRegistry, KeybindingRegistry, } from './contribution'; -import { nls } from '@theia/core/lib/browser/nls'; +import { nls } from '@theia/core/lib/common'; @injectable() export class SaveAsSketch extends SketchContribution { diff --git a/arduino-ide-extension/src/browser/contributions/save-sketch.ts b/arduino-ide-extension/src/browser/contributions/save-sketch.ts index a9f578632..5dddcffa1 100644 --- a/arduino-ide-extension/src/browser/contributions/save-sketch.ts +++ b/arduino-ide-extension/src/browser/contributions/save-sketch.ts @@ -11,7 +11,7 @@ import { KeybindingRegistry, TabBarToolbarRegistry, } from './contribution'; -import { nls } from '@theia/core/lib/browser/nls'; +import { nls } from '@theia/core/lib/common'; @injectable() export class SaveSketch extends SketchContribution { diff --git a/arduino-ide-extension/src/browser/contributions/settings.ts b/arduino-ide-extension/src/browser/contributions/settings.ts index 996ecc494..91fe0aeb9 100644 --- a/arduino-ide-extension/src/browser/contributions/settings.ts +++ b/arduino-ide-extension/src/browser/contributions/settings.ts @@ -8,7 +8,7 @@ import { } from './contribution'; import { ArduinoMenus } from '../menu/arduino-menus'; import { Settings as Preferences, SettingsDialog } from '../settings'; -import { nls } from '@theia/core/lib/browser/nls'; +import { nls } from '@theia/core/lib/common'; @injectable() export class Settings extends SketchContribution { diff --git a/arduino-ide-extension/src/browser/contributions/sketch-control.ts b/arduino-ide-extension/src/browser/contributions/sketch-control.ts index 2b714336a..38bc33fe3 100644 --- a/arduino-ide-extension/src/browser/contributions/sketch-control.ts +++ b/arduino-ide-extension/src/browser/contributions/sketch-control.ts @@ -21,7 +21,7 @@ import { ArduinoMenus, PlaceholderMenuNode } from '../menu/arduino-menus'; import { EditorManager } from '@theia/editor/lib/browser/editor-manager'; import { SketchesServiceClientImpl } from '../../common/protocol/sketches-service-client-impl'; import { LocalCacheFsProvider } from '../local-cache/local-cache-fs-provider'; -import { nls } from '@theia/core/lib/browser/nls'; +import { nls } from '@theia/core/lib/common'; @injectable() export class SketchControl extends SketchContribution { diff --git a/arduino-ide-extension/src/browser/contributions/sketchbook.ts b/arduino-ide-extension/src/browser/contributions/sketchbook.ts index e026ced4f..a5f691974 100644 --- a/arduino-ide-extension/src/browser/contributions/sketchbook.ts +++ b/arduino-ide-extension/src/browser/contributions/sketchbook.ts @@ -7,7 +7,7 @@ import { NotificationCenter } from '../notification-center'; import { Examples } from './examples'; import { SketchContainer } from '../../common/protocol'; import { OpenSketch } from './open-sketch'; -import { nls } from '@theia/core/lib/browser/nls'; +import { nls } from '@theia/core/lib/common'; @injectable() export class Sketchbook extends Examples { diff --git a/arduino-ide-extension/src/browser/contributions/upload-certificate.ts b/arduino-ide-extension/src/browser/contributions/upload-certificate.ts index eb0160eac..0a4f9be39 100644 --- a/arduino-ide-extension/src/browser/contributions/upload-certificate.ts +++ b/arduino-ide-extension/src/browser/contributions/upload-certificate.ts @@ -18,7 +18,7 @@ import { certificateList, } from '../dialogs/certificate-uploader/utils'; import { ArduinoFirmwareUploader } from '../../common/protocol/arduino-firmware-uploader'; -import { nls } from '@theia/core/lib/browser/nls'; +import { nls } from '@theia/core/lib/common'; @injectable() export class UploadCertificate extends Contribution { diff --git a/arduino-ide-extension/src/browser/contributions/upload-firmware.ts b/arduino-ide-extension/src/browser/contributions/upload-firmware.ts index 627062b0d..6b706a551 100644 --- a/arduino-ide-extension/src/browser/contributions/upload-firmware.ts +++ b/arduino-ide-extension/src/browser/contributions/upload-firmware.ts @@ -7,7 +7,7 @@ import { } from './contribution'; import { ArduinoMenus } from '../menu/arduino-menus'; import { UploadFirmwareDialog } from '../dialogs/firmware-uploader/firmware-uploader-dialog'; -import { nls } from '@theia/core/lib/browser/nls'; +import { nls } from '@theia/core/lib/common'; @injectable() export class UploadFirmware extends Contribution { diff --git a/arduino-ide-extension/src/browser/contributions/upload-sketch.ts b/arduino-ide-extension/src/browser/contributions/upload-sketch.ts index 4388f410b..8450b9ec0 100644 --- a/arduino-ide-extension/src/browser/contributions/upload-sketch.ts +++ b/arduino-ide-extension/src/browser/contributions/upload-sketch.ts @@ -14,7 +14,7 @@ import { KeybindingRegistry, TabBarToolbarRegistry, } from './contribution'; -import { nls } from '@theia/core/lib/browser/nls'; +import { nls } from '@theia/core/lib/common'; @injectable() export class UploadSketch extends SketchContribution { diff --git a/arduino-ide-extension/src/browser/contributions/verify-sketch.ts b/arduino-ide-extension/src/browser/contributions/verify-sketch.ts index f8e1e1a00..b49df0984 100644 --- a/arduino-ide-extension/src/browser/contributions/verify-sketch.ts +++ b/arduino-ide-extension/src/browser/contributions/verify-sketch.ts @@ -13,7 +13,7 @@ import { KeybindingRegistry, TabBarToolbarRegistry, } from './contribution'; -import { nls } from '@theia/core/lib/browser/nls'; +import { nls } from '@theia/core/lib/common'; @injectable() export class VerifySketch extends SketchContribution { diff --git a/arduino-ide-extension/src/browser/dialogs/certificate-uploader/certificate-add-new.tsx b/arduino-ide-extension/src/browser/dialogs/certificate-uploader/certificate-add-new.tsx index 3a3cf5cf5..2cb3e3253 100644 --- a/arduino-ide-extension/src/browser/dialogs/certificate-uploader/certificate-add-new.tsx +++ b/arduino-ide-extension/src/browser/dialogs/certificate-uploader/certificate-add-new.tsx @@ -1,4 +1,4 @@ -import { nls } from '@theia/core/lib/browser/nls'; +import { nls } from '@theia/core/lib/common'; import * as React from 'react'; export const CertificateAddComponent = ({ diff --git a/arduino-ide-extension/src/browser/dialogs/certificate-uploader/certificate-uploader-component.tsx b/arduino-ide-extension/src/browser/dialogs/certificate-uploader/certificate-uploader-component.tsx index 603708932..b3e4497fb 100644 --- a/arduino-ide-extension/src/browser/dialogs/certificate-uploader/certificate-uploader-component.tsx +++ b/arduino-ide-extension/src/browser/dialogs/certificate-uploader/certificate-uploader-component.tsx @@ -4,7 +4,7 @@ import { AvailableBoard } from '../../boards/boards-service-provider'; import { CertificateListComponent } from './certificate-list'; import { SelectBoardComponent } from './select-board-components'; import { CertificateAddComponent } from './certificate-add-new'; -import { nls } from '@theia/core/lib/browser/nls'; +import { nls } from '@theia/core/lib/common'; export const CertificateUploaderComponent = ({ availableBoards, diff --git a/arduino-ide-extension/src/browser/dialogs/certificate-uploader/certificate-uploader-dialog.tsx b/arduino-ide-extension/src/browser/dialogs/certificate-uploader/certificate-uploader-dialog.tsx index e6d0eece0..4e371d2d9 100644 --- a/arduino-ide-extension/src/browser/dialogs/certificate-uploader/certificate-uploader-dialog.tsx +++ b/arduino-ide-extension/src/browser/dialogs/certificate-uploader/certificate-uploader-dialog.tsx @@ -18,7 +18,7 @@ import { import { CommandRegistry } from '@theia/core/lib/common/command'; import { certificateList, sanifyCertString } from './utils'; import { ArduinoFirmwareUploader } from '../../../common/protocol/arduino-firmware-uploader'; -import { nls } from '@theia/core/lib/browser/nls'; +import { nls } from '@theia/core/lib/common'; @injectable() export class UploadCertificateDialogWidget extends ReactWidget { diff --git a/arduino-ide-extension/src/browser/dialogs/certificate-uploader/select-board-components.tsx b/arduino-ide-extension/src/browser/dialogs/certificate-uploader/select-board-components.tsx index 49b11c7b4..f852e04fb 100644 --- a/arduino-ide-extension/src/browser/dialogs/certificate-uploader/select-board-components.tsx +++ b/arduino-ide-extension/src/browser/dialogs/certificate-uploader/select-board-components.tsx @@ -1,4 +1,4 @@ -import { nls } from '@theia/core/lib/browser/nls'; +import { nls } from '@theia/core/lib/common'; import * as React from 'react'; import { AvailableBoard } from '../../boards/boards-service-provider'; import { ArduinoSelect } from '../../widgets/arduino-select'; diff --git a/arduino-ide-extension/src/browser/dialogs/cloud-share-sketch-dialog.tsx b/arduino-ide-extension/src/browser/dialogs/cloud-share-sketch-dialog.tsx index 9578d6e7f..3ecf1e28d 100644 --- a/arduino-ide-extension/src/browser/dialogs/cloud-share-sketch-dialog.tsx +++ b/arduino-ide-extension/src/browser/dialogs/cloud-share-sketch-dialog.tsx @@ -6,7 +6,7 @@ import { clipboard } from 'electron'; import { ReactWidget, DialogProps } from '@theia/core/lib/browser'; import { AbstractDialog } from '../theia/dialogs/dialogs'; import { CreateApi } from '../create/create-api'; -import { nls } from '@theia/core/lib/browser/nls'; +import { nls } from '@theia/core/lib/common'; const RadioButton = (props: { id: string; diff --git a/arduino-ide-extension/src/browser/dialogs/do-not-ask-again-dialog.ts b/arduino-ide-extension/src/browser/dialogs/do-not-ask-again-dialog.ts index b8c457310..eb23fec0a 100644 --- a/arduino-ide-extension/src/browser/dialogs/do-not-ask-again-dialog.ts +++ b/arduino-ide-extension/src/browser/dialogs/do-not-ask-again-dialog.ts @@ -6,7 +6,7 @@ import { ConfirmDialogProps, DialogError, } from '@theia/core/lib/browser/dialogs'; -import { nls } from '@theia/core/lib/browser/nls'; +import { nls } from '@theia/core/lib/common'; @injectable() export class DoNotAskAgainDialogProps extends ConfirmDialogProps { diff --git a/arduino-ide-extension/src/browser/dialogs/firmware-uploader/firmware-uploader-component.tsx b/arduino-ide-extension/src/browser/dialogs/firmware-uploader/firmware-uploader-component.tsx index d4dc01ba0..04a4c8e11 100644 --- a/arduino-ide-extension/src/browser/dialogs/firmware-uploader/firmware-uploader-component.tsx +++ b/arduino-ide-extension/src/browser/dialogs/firmware-uploader/firmware-uploader-component.tsx @@ -1,4 +1,4 @@ -import { nls } from '@theia/core/lib/browser/nls'; +import { nls } from '@theia/core/lib/common'; import * as React from 'react'; import { ArduinoFirmwareUploader, diff --git a/arduino-ide-extension/src/browser/library/library-list-widget.ts b/arduino-ide-extension/src/browser/library/library-list-widget.ts index 618658ae2..87b9ce69c 100644 --- a/arduino-ide-extension/src/browser/library/library-list-widget.ts +++ b/arduino-ide-extension/src/browser/library/library-list-widget.ts @@ -10,7 +10,7 @@ import { import { ListWidget } from '../widgets/component-list/list-widget'; import { Installable } from '../../common/protocol'; import { ListItemRenderer } from '../widgets/component-list/list-item-renderer'; -import { nls } from '@theia/core/lib/browser/nls'; +import { nls } from '@theia/core/lib/common'; @injectable() export class LibraryListWidget extends ListWidget { diff --git a/arduino-ide-extension/src/browser/library/library-widget-frontend-contribution.ts b/arduino-ide-extension/src/browser/library/library-widget-frontend-contribution.ts index 15926e398..3c36ba9a4 100644 --- a/arduino-ide-extension/src/browser/library/library-widget-frontend-contribution.ts +++ b/arduino-ide-extension/src/browser/library/library-widget-frontend-contribution.ts @@ -4,7 +4,7 @@ import { AbstractViewContribution } from '@theia/core/lib/browser/shell/view-con import { MenuModelRegistry } from '@theia/core'; import { LibraryListWidget } from './library-list-widget'; import { ArduinoMenus } from '../menu/arduino-menus'; -import { nls } from '@theia/core/lib/browser/nls'; +import { nls } from '@theia/core/lib/common'; @injectable() export class LibraryListWidgetFrontendContribution diff --git a/arduino-ide-extension/src/browser/monitor/monitor-connection.ts b/arduino-ide-extension/src/browser/monitor/monitor-connection.ts index 354f71ce3..1a2c2f9d1 100644 --- a/arduino-ide-extension/src/browser/monitor/monitor-connection.ts +++ b/arduino-ide-extension/src/browser/monitor/monitor-connection.ts @@ -20,7 +20,7 @@ import { import { BoardsConfig } from '../boards/boards-config'; import { MonitorModel } from './monitor-model'; import { NotificationCenter } from '../notification-center'; -import { nls } from '@theia/core/lib/browser/nls'; +import { nls } from '@theia/core/lib/common'; @injectable() export class MonitorConnection { diff --git a/arduino-ide-extension/src/browser/monitor/monitor-view-contribution.tsx b/arduino-ide-extension/src/browser/monitor/monitor-view-contribution.tsx index 3eb48c321..93d2d6c69 100644 --- a/arduino-ide-extension/src/browser/monitor/monitor-view-contribution.tsx +++ b/arduino-ide-extension/src/browser/monitor/monitor-view-contribution.tsx @@ -10,7 +10,7 @@ import { import { ArduinoToolbar } from '../toolbar/arduino-toolbar'; import { MonitorModel } from './monitor-model'; import { ArduinoMenus } from '../menu/arduino-menus'; -import { nls } from '@theia/core/lib/browser/nls'; +import { nls } from '@theia/core/lib/common'; export namespace SerialMonitor { export namespace Commands { diff --git a/arduino-ide-extension/src/browser/monitor/monitor-widget.tsx b/arduino-ide-extension/src/browser/monitor/monitor-widget.tsx index aa0ff5ee1..8df19a435 100644 --- a/arduino-ide-extension/src/browser/monitor/monitor-widget.tsx +++ b/arduino-ide-extension/src/browser/monitor/monitor-widget.tsx @@ -15,7 +15,7 @@ import { MonitorModel } from './monitor-model'; import { MonitorConnection } from './monitor-connection'; import { SerialMonitorSendInput } from './serial-monitor-send-input'; import { SerialMonitorOutput } from './serial-monitor-send-output'; -import { nls } from '@theia/core/lib/browser/nls'; +import { nls } from '@theia/core/lib/common'; @injectable() export class MonitorWidget extends ReactWidget { diff --git a/arduino-ide-extension/src/browser/monitor/serial-monitor-send-input.tsx b/arduino-ide-extension/src/browser/monitor/serial-monitor-send-input.tsx index 2e197e33a..85e0f6cae 100644 --- a/arduino-ide-extension/src/browser/monitor/serial-monitor-send-input.tsx +++ b/arduino-ide-extension/src/browser/monitor/serial-monitor-send-input.tsx @@ -3,7 +3,7 @@ import { Key, KeyCode } from '@theia/core/lib/browser/keys'; import { Board, Port } from '../../common/protocol/boards-service'; import { MonitorConfig } from '../../common/protocol/monitor-service'; import { isOSX } from '@theia/core/lib/common/os'; -import { nls } from '@theia/core/lib/browser/nls'; +import { nls } from '@theia/core/lib/common'; export namespace SerialMonitorSendInput { export interface Props { diff --git a/arduino-ide-extension/src/browser/response-service-impl.ts b/arduino-ide-extension/src/browser/response-service-impl.ts index 8690e77b8..780ce9b04 100644 --- a/arduino-ide-extension/src/browser/response-service-impl.ts +++ b/arduino-ide-extension/src/browser/response-service-impl.ts @@ -1,7 +1,7 @@ import { inject, injectable } from 'inversify'; import { Emitter } from '@theia/core/lib/common/event'; import { OutputContribution } from '@theia/output/lib/browser/output-contribution'; -import { OutputChannelManager } from '@theia/output/lib/common/output-channel'; +import { OutputChannelManager } from '@theia/output/lib/browser/output-channel'; import { OutputMessage, ProgressMessage, diff --git a/arduino-ide-extension/src/browser/settings.tsx b/arduino-ide-extension/src/browser/settings.tsx index ef2017791..551fc1975 100644 --- a/arduino-ide-extension/src/browser/settings.tsx +++ b/arduino-ide-extension/src/browser/settings.tsx @@ -33,7 +33,7 @@ import { ProxySettings, } from '../common/protocol'; import { AbstractDialog } from './theia/dialogs/dialogs'; -import { nls } from '@theia/core/lib/browser/nls'; +import { nls } from '@theia/core/lib/common'; const EDITOR_SETTING = 'editor'; const FONT_SIZE_SETTING = `${EDITOR_SETTING}.fontSize`; diff --git a/arduino-ide-extension/src/browser/theia/core/application-shell.ts b/arduino-ide-extension/src/browser/theia/core/application-shell.ts index 090e6835a..2ed449065 100644 --- a/arduino-ide-extension/src/browser/theia/core/application-shell.ts +++ b/arduino-ide-extension/src/browser/theia/core/application-shell.ts @@ -15,7 +15,7 @@ import { import { Sketch } from '../../../common/protocol'; import { SaveAsSketch } from '../../contributions/save-as-sketch'; import { SketchesServiceClientImpl } from '../../../common/protocol/sketches-service-client-impl'; -import { nls } from '@theia/core/lib/browser/nls'; +import { nls } from '@theia/core/lib/common'; @injectable() export class ApplicationShell extends TheiaApplicationShell { diff --git a/arduino-ide-extension/src/browser/theia/core/connection-status-service.ts b/arduino-ide-extension/src/browser/theia/core/connection-status-service.ts index db71aad25..f9a488545 100644 --- a/arduino-ide-extension/src/browser/theia/core/connection-status-service.ts +++ b/arduino-ide-extension/src/browser/theia/core/connection-status-service.ts @@ -8,7 +8,7 @@ import { } from '@theia/core/lib/browser/connection-status-service'; import { ArduinoDaemon } from '../../../common/protocol'; import { NotificationCenter } from '../../notification-center'; -import { nls } from '@theia/core/lib/browser/nls'; +import { nls } from '@theia/core/lib/common'; @injectable() export class FrontendConnectionStatusService extends TheiaFrontendConnectionStatusService { diff --git a/arduino-ide-extension/src/browser/theia/debug/debug-session-manager.ts b/arduino-ide-extension/src/browser/theia/debug/debug-session-manager.ts index d1b2a4b03..3bbde36f6 100644 --- a/arduino-ide-extension/src/browser/theia/debug/debug-session-manager.ts +++ b/arduino-ide-extension/src/browser/theia/debug/debug-session-manager.ts @@ -3,7 +3,7 @@ import { DebugError } from '@theia/debug/lib/common/debug-service'; import { DebugSession } from '@theia/debug/lib/browser/debug-session'; import { DebugSessionOptions } from '@theia/debug/lib/browser/debug-session-options'; import { DebugSessionManager as TheiaDebugSessionManager } from '@theia/debug/lib/browser/debug-session-manager'; -import { nls } from '@theia/core/lib/browser/nls'; +import { nls } from '@theia/core/lib/common'; @injectable() export class DebugSessionManager extends TheiaDebugSessionManager { diff --git a/arduino-ide-extension/src/browser/theia/editor/editor-widget-factory.ts b/arduino-ide-extension/src/browser/theia/editor/editor-widget-factory.ts index 6c9351b5f..cd803fa5f 100644 --- a/arduino-ide-extension/src/browser/theia/editor/editor-widget-factory.ts +++ b/arduino-ide-extension/src/browser/theia/editor/editor-widget-factory.ts @@ -5,7 +5,7 @@ import { LabelProvider } from '@theia/core/lib/browser'; import { EditorWidgetFactory as TheiaEditorWidgetFactory } from '@theia/editor/lib/browser/editor-widget-factory'; import { SketchesServiceClientImpl } from '../../../common/protocol/sketches-service-client-impl'; import { SketchesService, Sketch } from '../../../common/protocol'; -import { nls } from '@theia/core/lib/browser/nls'; +import { nls } from '@theia/core/lib/common'; @injectable() export class EditorWidgetFactory extends TheiaEditorWidgetFactory { diff --git a/arduino-ide-extension/src/browser/theia/keymaps/keymaps-frontend-contribution.ts b/arduino-ide-extension/src/browser/theia/keymaps/keymaps-frontend-contribution.ts index 729c89ac5..02bb88fea 100644 --- a/arduino-ide-extension/src/browser/theia/keymaps/keymaps-frontend-contribution.ts +++ b/arduino-ide-extension/src/browser/theia/keymaps/keymaps-frontend-contribution.ts @@ -5,7 +5,7 @@ import { KeymapsCommands, } from '@theia/keymaps/lib/browser/keymaps-frontend-contribution'; import { ArduinoMenus } from '../../menu/arduino-menus'; -import { nls } from '@theia/core/lib/browser/nls'; +import { nls } from '@theia/core/lib/common'; @injectable() export class KeymapsFrontendContribution extends TheiaKeymapsFrontendContribution { diff --git a/arduino-ide-extension/src/browser/theia/messages/notification-center-component.tsx b/arduino-ide-extension/src/browser/theia/messages/notification-center-component.tsx index b81e71982..fa929276f 100644 --- a/arduino-ide-extension/src/browser/theia/messages/notification-center-component.tsx +++ b/arduino-ide-extension/src/browser/theia/messages/notification-center-component.tsx @@ -1,7 +1,7 @@ import * as React from 'react'; import { NotificationComponent } from './notification-component'; import { NotificationCenterComponent as TheiaNotificationCenterComponent } from '@theia/messages/lib/browser/notification-center-component'; -import { nls } from '@theia/core/lib/browser/nls'; +import { nls } from '@theia/core/lib/common'; const PerfectScrollbar = require('react-perfect-scrollbar'); diff --git a/arduino-ide-extension/src/browser/theia/messages/notification-component.tsx b/arduino-ide-extension/src/browser/theia/messages/notification-component.tsx index 89518dc73..4aa54eb74 100644 --- a/arduino-ide-extension/src/browser/theia/messages/notification-component.tsx +++ b/arduino-ide-extension/src/browser/theia/messages/notification-component.tsx @@ -1,6 +1,6 @@ import * as React from 'react'; import { NotificationComponent as TheiaNotificationComponent } from '@theia/messages/lib/browser/notification-component'; -import { nls } from '@theia/core/lib/browser/nls'; +import { nls } from '@theia/core/lib/common'; export class NotificationComponent extends TheiaNotificationComponent { render(): React.ReactNode { diff --git a/arduino-ide-extension/src/browser/theia/output/output-channel.ts b/arduino-ide-extension/src/browser/theia/output/output-channel.ts index 9a53844c0..4e1ead8df 100644 --- a/arduino-ide-extension/src/browser/theia/output/output-channel.ts +++ b/arduino-ide-extension/src/browser/theia/output/output-channel.ts @@ -7,7 +7,7 @@ import { MonacoEditorModel } from '@theia/monaco/lib/browser/monaco-editor-model import { OutputChannelManager as TheiaOutputChannelManager, OutputChannel as TheiaOutputChannel, -} from '@theia/output/lib/common/output-channel'; +} from '@theia/output/lib/browser/output-channel'; @injectable() export class OutputChannelManager extends TheiaOutputChannelManager { diff --git a/arduino-ide-extension/src/browser/theia/workspace/workspace-commands.ts b/arduino-ide-extension/src/browser/theia/workspace/workspace-commands.ts index 4593fc9c4..688e1ff9e 100644 --- a/arduino-ide-extension/src/browser/theia/workspace/workspace-commands.ts +++ b/arduino-ide-extension/src/browser/theia/workspace/workspace-commands.ts @@ -15,7 +15,7 @@ import { WorkspaceInputDialog } from './workspace-input-dialog'; import { SketchesServiceClientImpl } from '../../../common/protocol/sketches-service-client-impl'; import { SaveAsSketch } from '../../contributions/save-as-sketch'; import { SingleTextInputDialog } from '@theia/core/lib/browser'; -import { nls } from '@theia/core/lib/browser/nls'; +import { nls } from '@theia/core/lib/common'; @injectable() export class WorkspaceCommandContribution extends TheiaWorkspaceCommandContribution { diff --git a/arduino-ide-extension/src/browser/theia/workspace/workspace-delete-handler.ts b/arduino-ide-extension/src/browser/theia/workspace/workspace-delete-handler.ts index 4743ac29b..0c4a157ef 100644 --- a/arduino-ide-extension/src/browser/theia/workspace/workspace-delete-handler.ts +++ b/arduino-ide-extension/src/browser/theia/workspace/workspace-delete-handler.ts @@ -3,7 +3,7 @@ import { remote } from 'electron'; import URI from '@theia/core/lib/common/uri'; import { WorkspaceDeleteHandler as TheiaWorkspaceDeleteHandler } from '@theia/workspace/lib/browser/workspace-delete-handler'; import { SketchesServiceClientImpl } from '../../../common/protocol/sketches-service-client-impl'; -import { nls } from '@theia/core/lib/browser/nls'; +import { nls } from '@theia/core/lib/common'; @injectable() export class WorkspaceDeleteHandler extends TheiaWorkspaceDeleteHandler { diff --git a/arduino-ide-extension/src/browser/theia/workspace/workspace-input-dialog.ts b/arduino-ide-extension/src/browser/theia/workspace/workspace-input-dialog.ts index cad1869b9..4c270a2a7 100644 --- a/arduino-ide-extension/src/browser/theia/workspace/workspace-input-dialog.ts +++ b/arduino-ide-extension/src/browser/theia/workspace/workspace-input-dialog.ts @@ -6,7 +6,7 @@ import { WorkspaceInputDialog as TheiaWorkspaceInputDialog, WorkspaceInputDialogProps, } from '@theia/workspace/lib/browser/workspace-input-dialog'; -import { nls } from '@theia/core/lib/browser/nls'; +import { nls } from '@theia/core/lib/common'; export class WorkspaceInputDialog extends TheiaWorkspaceInputDialog { protected wasTouched = false; diff --git a/arduino-ide-extension/src/browser/theia/workspace/workspace-service.ts b/arduino-ide-extension/src/browser/theia/workspace/workspace-service.ts index eb02288dc..691740a47 100644 --- a/arduino-ide-extension/src/browser/theia/workspace/workspace-service.ts +++ b/arduino-ide-extension/src/browser/theia/workspace/workspace-service.ts @@ -17,7 +17,7 @@ import { import { ArduinoWorkspaceRootResolver } from '../../arduino-workspace-resolver'; import { BoardsServiceProvider } from '../../boards/boards-service-provider'; import { BoardsConfig } from '../../boards/boards-config'; -import { nls } from '@theia/core/lib/browser/nls'; +import { nls } from '@theia/core/lib/common'; @injectable() export class WorkspaceService extends TheiaWorkspaceService { diff --git a/arduino-ide-extension/src/browser/widgets/cloud-sketchbook/cloud-sketchbook-composite-widget.tsx b/arduino-ide-extension/src/browser/widgets/cloud-sketchbook/cloud-sketchbook-composite-widget.tsx index 6c5eac7ad..958e16857 100644 --- a/arduino-ide-extension/src/browser/widgets/cloud-sketchbook/cloud-sketchbook-composite-widget.tsx +++ b/arduino-ide-extension/src/browser/widgets/cloud-sketchbook/cloud-sketchbook-composite-widget.tsx @@ -9,7 +9,7 @@ import { UserStatus } from './cloud-user-status'; import { CloudSketchbookTreeWidget } from './cloud-sketchbook-tree-widget'; import { AuthenticationClientService } from '../../auth/authentication-client-service'; import { CloudSketchbookTreeModel } from './cloud-sketchbook-tree-model'; -import { nls } from '@theia/core/lib/browser/nls'; +import { nls } from '@theia/core/lib/common'; @injectable() export class CloudSketchbookCompositeWidget extends BaseWidget { diff --git a/arduino-ide-extension/src/browser/widgets/cloud-sketchbook/cloud-sketchbook-contributions.ts b/arduino-ide-extension/src/browser/widgets/cloud-sketchbook/cloud-sketchbook-contributions.ts index c46be7963..3416323ae 100644 --- a/arduino-ide-extension/src/browser/widgets/cloud-sketchbook/cloud-sketchbook-contributions.ts +++ b/arduino-ide-extension/src/browser/widgets/cloud-sketchbook/cloud-sketchbook-contributions.ts @@ -27,7 +27,7 @@ import { SketchesServiceClientImpl } from '../../../common/protocol/sketches-ser import { Contribution } from '../../contributions/contribution'; import { ArduinoPreferences } from '../../arduino-preferences'; import { MainMenuManager } from '../../../common/main-menu-manager'; -import { nls } from '@theia/core/lib/browser/nls'; +import { nls } from '@theia/core/lib/common'; export const SKETCHBOOKSYNC__CONTEXT = ['arduino-sketchbook-sync--context']; diff --git a/arduino-ide-extension/src/browser/widgets/cloud-sketchbook/cloud-sketchbook-tree-model.ts b/arduino-ide-extension/src/browser/widgets/cloud-sketchbook/cloud-sketchbook-tree-model.ts index 553f9aede..e7a29561b 100644 --- a/arduino-ide-extension/src/browser/widgets/cloud-sketchbook/cloud-sketchbook-tree-model.ts +++ b/arduino-ide-extension/src/browser/widgets/cloud-sketchbook/cloud-sketchbook-tree-model.ts @@ -14,7 +14,7 @@ import { FileService } from '@theia/filesystem/lib/browser/file-service'; import URI from '@theia/core/lib/common/uri'; import { SketchCache } from './cloud-sketch-cache'; import { Create } from '../../create/typings'; -import { nls } from '@theia/core/lib/browser/nls'; +import { nls } from '@theia/core/lib/common'; export function sketchBaseDir(sketch: Create.Sketch): FileStat { // extract the sketch path diff --git a/arduino-ide-extension/src/browser/widgets/cloud-sketchbook/cloud-sketchbook-tree-widget.tsx b/arduino-ide-extension/src/browser/widgets/cloud-sketchbook/cloud-sketchbook-tree-widget.tsx index 1772f2911..c56c2a348 100644 --- a/arduino-ide-extension/src/browser/widgets/cloud-sketchbook/cloud-sketchbook-tree-widget.tsx +++ b/arduino-ide-extension/src/browser/widgets/cloud-sketchbook/cloud-sketchbook-tree-widget.tsx @@ -11,7 +11,7 @@ import { TreeNode } from '@theia/core/lib/browser/tree'; import { CompositeTreeNode } from '@theia/core/lib/browser'; import { shell } from 'electron'; import { SketchbookTreeWidget } from '../sketchbook/sketchbook-tree-widget'; -import { nls } from '@theia/core/lib/browser/nls'; +import { nls } from '@theia/core/lib/common'; const LEARN_MORE_URL = 'https://docs.arduino.cc/software/ide-v2/tutorials/ide-v2-cloud-sketch-sync'; diff --git a/arduino-ide-extension/src/browser/widgets/cloud-sketchbook/cloud-sketchbook-tree.ts b/arduino-ide-extension/src/browser/widgets/cloud-sketchbook/cloud-sketchbook-tree.ts index 5cd340626..795e07ac2 100644 --- a/arduino-ide-extension/src/browser/widgets/cloud-sketchbook/cloud-sketchbook-tree.ts +++ b/arduino-ide-extension/src/browser/widgets/cloud-sketchbook/cloud-sketchbook-tree.ts @@ -34,7 +34,7 @@ import { FileStat } from '@theia/filesystem/lib/common/files'; import { WorkspaceNode } from '@theia/navigator/lib/browser/navigator-tree'; import { posix, splitSketchPath } from '../../create/create-paths'; import { Create } from '../../create/typings'; -import { nls } from '@theia/core/lib/browser/nls'; +import { nls } from '@theia/core/lib/common'; const MESSAGE_TIMEOUT = 5 * 1000; const deepmerge = require('deepmerge').default; diff --git a/arduino-ide-extension/src/browser/widgets/cloud-sketchbook/cloud-user-status.tsx b/arduino-ide-extension/src/browser/widgets/cloud-sketchbook/cloud-user-status.tsx index 702568b32..70f1ec580 100644 --- a/arduino-ide-extension/src/browser/widgets/cloud-sketchbook/cloud-user-status.tsx +++ b/arduino-ide-extension/src/browser/widgets/cloud-sketchbook/cloud-user-status.tsx @@ -7,7 +7,7 @@ import { CloudSketchbookTreeModel } from './cloud-sketchbook-tree-model'; import { AuthenticationClientService } from '../../auth/authentication-client-service'; import { CloudUserCommands } from '../../auth/cloud-user-commands'; import { AuthenticationSessionAccountInformation } from '../../../common/protocol/authentication-service'; -import { nls } from '@theia/core/lib/browser/nls'; +import { nls } from '@theia/core/lib/common'; export class UserStatus extends React.Component< UserStatus.Props, diff --git a/arduino-ide-extension/src/browser/widgets/component-list/filterable-list-container.tsx b/arduino-ide-extension/src/browser/widgets/component-list/filterable-list-container.tsx index a8cd69260..25c4827ba 100644 --- a/arduino-ide-extension/src/browser/widgets/component-list/filterable-list-container.tsx +++ b/arduino-ide-extension/src/browser/widgets/component-list/filterable-list-container.tsx @@ -12,7 +12,7 @@ import { ListWidget } from './list-widget'; import { ComponentList } from './component-list'; import { ListItemRenderer } from './list-item-renderer'; import { ResponseServiceArduino } from '../../../common/protocol'; -import { nls } from '@theia/core/lib/browser/nls'; +import { nls } from '@theia/core/lib/common'; export class FilterableListContainer< T extends ArduinoComponent diff --git a/arduino-ide-extension/src/browser/widgets/component-list/list-item-renderer.tsx b/arduino-ide-extension/src/browser/widgets/component-list/list-item-renderer.tsx index c33809315..823681315 100644 --- a/arduino-ide-extension/src/browser/widgets/component-list/list-item-renderer.tsx +++ b/arduino-ide-extension/src/browser/widgets/component-list/list-item-renderer.tsx @@ -4,7 +4,7 @@ import { WindowService } from '@theia/core/lib/browser/window/window-service'; import { Installable } from '../../../common/protocol/installable'; import { ArduinoComponent } from '../../../common/protocol/arduino-component'; import { ComponentListItem } from './component-list-item'; -import { nls } from '@theia/core/lib/browser/nls'; +import { nls } from '@theia/core/lib/common'; @injectable() export class ListItemRenderer { diff --git a/arduino-ide-extension/src/browser/widgets/component-list/search-bar.tsx b/arduino-ide-extension/src/browser/widgets/component-list/search-bar.tsx index cd8a68db0..87d053eef 100644 --- a/arduino-ide-extension/src/browser/widgets/component-list/search-bar.tsx +++ b/arduino-ide-extension/src/browser/widgets/component-list/search-bar.tsx @@ -1,4 +1,4 @@ -import { nls } from '@theia/core/lib/browser/nls'; +import { nls } from '@theia/core/lib/common'; import * as React from 'react'; export class SearchBar extends React.Component { diff --git a/arduino-ide-extension/src/browser/widgets/sketchbook/sketchbook-tree-widget.tsx b/arduino-ide-extension/src/browser/widgets/sketchbook/sketchbook-tree-widget.tsx index 29f02252d..8f66ef46b 100644 --- a/arduino-ide-extension/src/browser/widgets/sketchbook/sketchbook-tree-widget.tsx +++ b/arduino-ide-extension/src/browser/widgets/sketchbook/sketchbook-tree-widget.tsx @@ -17,7 +17,7 @@ import { ArduinoPreferences } from '../../arduino-preferences'; import { SketchesServiceClientImpl } from '../../../common/protocol/sketches-service-client-impl'; import { SelectableTreeNode } from '@theia/core/lib/browser/tree/tree-selection'; import { Sketch } from '../../contributions/contribution'; -import { nls } from '@theia/core/lib/browser/nls'; +import { nls } from '@theia/core/lib/common'; @injectable() export class SketchbookTreeWidget extends FileTreeWidget { diff --git a/arduino-ide-extension/src/browser/widgets/sketchbook/sketchbook-widget.tsx b/arduino-ide-extension/src/browser/widgets/sketchbook/sketchbook-widget.tsx index a5dbeb759..1d78aa4ec 100644 --- a/arduino-ide-extension/src/browser/widgets/sketchbook/sketchbook-widget.tsx +++ b/arduino-ide-extension/src/browser/widgets/sketchbook/sketchbook-widget.tsx @@ -6,7 +6,7 @@ import { Message, MessageLoop } from '@phosphor/messaging'; import { Disposable } from '@theia/core/lib/common/disposable'; import { BaseWidget } from '@theia/core/lib/browser/widgets/widget'; import { SketchbookTreeWidget } from './sketchbook-tree-widget'; -import { nls } from '@theia/core/lib/browser/nls'; +import { nls } from '@theia/core/lib/common'; @injectable() export class SketchbookWidget extends BaseWidget { diff --git a/arduino-ide-extension/src/electron-browser/electron-window-service.ts b/arduino-ide-extension/src/electron-browser/electron-window-service.ts index 9855cd663..ee7587118 100644 --- a/arduino-ide-extension/src/electron-browser/electron-window-service.ts +++ b/arduino-ide-extension/src/electron-browser/electron-window-service.ts @@ -7,7 +7,7 @@ import { } from '@theia/core/lib/browser/connection-status-service'; import { ElectronWindowService as TheiaElectronWindowService } from '@theia/core/lib/electron-browser/window/electron-window-service'; import { SplashService } from '../electron-common/splash-service'; -import { nls } from '@theia/core/lib/browser/nls'; +import { nls } from '@theia/core/lib/common'; @injectable() export class ElectronWindowService extends TheiaElectronWindowService { diff --git a/arduino-ide-extension/src/electron-browser/theia/core/electron-main-menu-factory.ts b/arduino-ide-extension/src/electron-browser/theia/core/electron-main-menu-factory.ts index 28b6278d0..8098610fb 100644 --- a/arduino-ide-extension/src/electron-browser/theia/core/electron-main-menu-factory.ts +++ b/arduino-ide-extension/src/electron-browser/theia/core/electron-main-menu-factory.ts @@ -18,7 +18,7 @@ import { @injectable() export class ElectronMainMenuFactory extends TheiaElectronMainMenuFactory { - createMenuBar(): Electron.Menu { + createElectronMenuBar(): Electron.Menu { this._toggledCommands.clear(); // https://github.com/eclipse-theia/theia/issues/8977 const menuModel = this.menuProvider.getMenu(MAIN_MENU_BAR); const template = this.fillMenuTemplate([], menuModel); @@ -30,7 +30,7 @@ export class ElectronMainMenuFactory extends TheiaElectronMainMenuFactory { return menu; } - createContextMenu(menuPath: MenuPath, args?: any[]): Electron.Menu { + createElectronContextMenu(menuPath: MenuPath, args?: any[]): Electron.Menu { const menuModel = this.menuProvider.getMenu(menuPath); const template = this.fillMenuTemplate([], menuModel, args, { showDisabled: false, @@ -99,7 +99,7 @@ export class ElectronMainMenuFactory extends TheiaElectronMainMenuFactory { return { label, submenu }; } - protected handleDefault( + protected handleElectronDefault( menuNode: CompositeMenuNode, args: any[] = [], options?: ElectronMenuOptions diff --git a/arduino-ide-extension/src/electron-main/theia/electron-main-window-service.ts b/arduino-ide-extension/src/electron-main/theia/electron-main-window-service.ts index 6d36e0a48..f350d6173 100644 --- a/arduino-ide-extension/src/electron-main/theia/electron-main-window-service.ts +++ b/arduino-ide-extension/src/electron-main/theia/electron-main-window-service.ts @@ -1,7 +1,7 @@ import { inject, injectable } from 'inversify'; -import { NewWindowOptions } from '@theia/core/lib/browser/window/window-service'; import { ElectronMainWindowServiceImpl as TheiaElectronMainWindowService } from '@theia/core/lib/electron-main/electron-main-window-service-impl'; import { ElectronMainApplication } from './electron-main-application'; +import { NewWindowOptions } from '@theia/core/lib/common/window'; @injectable() export class ElectronMainWindowServiceImpl extends TheiaElectronMainWindowService { diff --git a/arduino-ide-extension/src/test/browser/boards-auto-installer.test.ts b/arduino-ide-extension/src/test/browser/boards-auto-installer.test.ts index efd75e943..aee3896ca 100644 --- a/arduino-ide-extension/src/test/browser/boards-auto-installer.test.ts +++ b/arduino-ide-extension/src/test/browser/boards-auto-installer.test.ts @@ -1,247 +1,247 @@ -import { enableJSDOM } from '@theia/core/lib/browser/test/jsdom'; -const disableJSDOM = enableJSDOM(); - -import { FrontendApplicationConfigProvider } from '@theia/core/lib/browser/frontend-application-config-provider'; -import { ApplicationProps } from '@theia/application-package/lib/application-props'; -FrontendApplicationConfigProvider.set({ - ...ApplicationProps.DEFAULT.frontend.config, -}); - -import { MessageService } from '@theia/core'; -import { BoardsServiceProvider } from '../../browser/boards/boards-service-provider'; -import { BoardsListWidgetFrontendContribution } from '../../browser/boards/boards-widget-frontend-contribution'; -import { - Board, - BoardsPackage, - BoardsService, - Port, - ResponseServiceArduino, -} from '../../common/protocol'; -import { IMock, It, Mock, Times } from 'typemoq'; -import { Container, ContainerModule } from 'inversify'; -import { BoardsAutoInstaller } from '../../browser/boards/boards-auto-installer'; -import { BoardsConfig } from '../../browser/boards/boards-config'; -import { tick } from '../utils'; -import { ListWidget } from '../../browser/widgets/component-list/list-widget'; - -disableJSDOM(); - -const aBoard: Board = { - fqbn: 'some:board:fqbn', - name: 'Some Arduino Board', - port: { address: '/lol/port1234', protocol: 'serial' }, -}; -const aPort: Port = { - address: aBoard.port!.address, - protocol: aBoard.port!.protocol, -}; -const aBoardConfig: BoardsConfig.Config = { - selectedBoard: aBoard, - selectedPort: aPort, -}; -const aPackage: BoardsPackage = { - author: 'someAuthor', - availableVersions: ['some.ver.sion', 'some.other.version'], - boards: [aBoard], - deprecated: false, - description: 'Some Arduino Board, Some Other Arduino Board', - id: 'some:arduinoCoreId', - installable: true, - moreInfoLink: 'http://www.some-url.lol/', - name: 'Some Arduino Package', - summary: 'Boards included in this package:', -}; - -const anInstalledPackage: BoardsPackage = { - ...aPackage, - installedVersion: 'some.ver.sion', -}; - -describe('BoardsAutoInstaller', () => { - let subject: BoardsAutoInstaller; - let messageService: IMock; - let boardsService: IMock; - let boardsServiceClient: IMock; - let responseService: IMock; - let boardsManagerFrontendContribution: IMock; - let boardsManagerWidget: IMock>; - - let testContainer: Container; - - beforeEach(() => { - testContainer = new Container(); - messageService = Mock.ofType(); - boardsService = Mock.ofType(); - boardsServiceClient = Mock.ofType(); - responseService = Mock.ofType(); - boardsManagerFrontendContribution = - Mock.ofType(); - boardsManagerWidget = Mock.ofType>(); - - boardsManagerWidget.setup((b) => - b.refresh(aPackage.name.toLocaleLowerCase()) - ); - - boardsManagerFrontendContribution - .setup((b) => b.openView({ reveal: true })) - .returns(async () => boardsManagerWidget.object); - - messageService - .setup((m) => m.showProgress(It.isAny(), It.isAny())) - .returns(async () => ({ - cancel: () => null, - id: '', - report: () => null, - result: Promise.resolve(''), - })); - - responseService - .setup((r) => r.onProgressDidChange(It.isAny())) - .returns(() => ({ dispose: () => null })); - - const module = new ContainerModule((bind) => { - bind(BoardsAutoInstaller).toSelf(); - bind(MessageService).toConstantValue(messageService.object); - bind(BoardsService).toConstantValue(boardsService.object); - bind(BoardsServiceProvider).toConstantValue(boardsServiceClient.object); - bind(ResponseServiceArduino).toConstantValue(responseService.object); - bind(BoardsListWidgetFrontendContribution).toConstantValue( - boardsManagerFrontendContribution.object - ); - }); - - testContainer.load(module); - subject = testContainer.get(BoardsAutoInstaller); - }); - - context('when it starts', () => { - it('should register to the BoardsServiceClient in order to check the packages every a new board is plugged in', () => { - subject.onStart(); - boardsServiceClient.verify( - (b) => b.onBoardsConfigChanged(It.isAny()), - Times.once() - ); - }); - - context('and it checks the installable packages', () => { - context(`and a port and a board a selected`, () => { - beforeEach(() => { - boardsServiceClient - .setup((b) => b.boardsConfig) - .returns(() => aBoardConfig); - }); - context('if no package for the board is already installed', () => { - context('if a candidate package for the board is found', () => { - beforeEach(() => { - boardsService - .setup((b) => b.search(It.isValue({}))) - .returns(async () => [aPackage]); - }); - it('should show a notification suggesting to install that package', async () => { - messageService - .setup((m) => - m.info(It.isAnyString(), It.isAnyString(), It.isAnyString()) - ) - .returns(() => Promise.resolve('Install Manually')); - subject.onStart(); - await tick(); - messageService.verify( - (m) => - m.info(It.isAnyString(), It.isAnyString(), It.isAnyString()), - Times.once() - ); - }); - context(`if the answer to the message is 'Yes'`, () => { - beforeEach(() => { - messageService - .setup((m) => - m.info(It.isAnyString(), It.isAnyString(), It.isAnyString()) - ) - .returns(() => Promise.resolve('Yes')); - }); - it('should install the package', async () => { - subject.onStart(); - - await tick(); - - messageService.verify( - (m) => m.showProgress(It.isAny(), It.isAny()), - Times.once() - ); - }); - }); - context( - `if the answer to the message is 'Install Manually'`, - () => { - beforeEach(() => { - messageService - .setup((m) => - m.info( - It.isAnyString(), - It.isAnyString(), - It.isAnyString() - ) - ) - .returns(() => Promise.resolve('Install Manually')); - }); - it('should open the boards manager widget', () => { - subject.onStart(); - }); - } - ); - }); - context('if a candidate package for the board is not found', () => { - beforeEach(() => { - boardsService - .setup((b) => b.search(It.isValue({}))) - .returns(async () => []); - }); - it('should do nothing', async () => { - subject.onStart(); - await tick(); - messageService.verify( - (m) => - m.info(It.isAnyString(), It.isAnyString(), It.isAnyString()), - Times.never() - ); - }); - }); - }); - context( - 'if one of the packages for the board is already installed', - () => { - beforeEach(() => { - boardsService - .setup((b) => b.search(It.isValue({}))) - .returns(async () => [aPackage, anInstalledPackage]); - messageService - .setup((m) => - m.info(It.isAnyString(), It.isAnyString(), It.isAnyString()) - ) - .returns(() => Promise.resolve('Yes')); - }); - it('should do nothing', async () => { - subject.onStart(); - await tick(); - messageService.verify( - (m) => - m.info(It.isAnyString(), It.isAnyString(), It.isAnyString()), - Times.never() - ); - }); - } - ); - }); - context('and there is no selected board or port', () => { - it('should do nothing', async () => { - subject.onStart(); - await tick(); - messageService.verify( - (m) => m.info(It.isAnyString(), It.isAnyString(), It.isAnyString()), - Times.never() - ); - }); - }); - }); - }); -}); +// import { enableJSDOM } from '@theia/core/lib/browser/test/jsdom'; +// const disableJSDOM = enableJSDOM(); + +// import { FrontendApplicationConfigProvider } from '@theia/core/lib/browser/frontend-application-config-provider'; +// import { ApplicationProps } from '@theia/application-package/lib/application-props'; +// FrontendApplicationConfigProvider.set({ +// ...ApplicationProps.DEFAULT.frontend.config, +// }); + +// import { MessageService } from '@theia/core'; +// import { BoardsServiceProvider } from '../../browser/boards/boards-service-provider'; +// import { BoardsListWidgetFrontendContribution } from '../../browser/boards/boards-widget-frontend-contribution'; +// import { +// Board, +// BoardsPackage, +// BoardsService, +// Port, +// ResponseServiceArduino, +// } from '../../common/protocol'; +// import { IMock, It, Mock, Times } from 'typemoq'; +// import { Container, ContainerModule } from 'inversify'; +// import { BoardsAutoInstaller } from '../../browser/boards/boards-auto-installer'; +// import { BoardsConfig } from '../../browser/boards/boards-config'; +// import { tick } from '../utils'; +// import { ListWidget } from '../../browser/widgets/component-list/list-widget'; + +// disableJSDOM(); + +// const aBoard: Board = { +// fqbn: 'some:board:fqbn', +// name: 'Some Arduino Board', +// port: { address: '/lol/port1234', protocol: 'serial' }, +// }; +// const aPort: Port = { +// address: aBoard.port!.address, +// protocol: aBoard.port!.protocol, +// }; +// const aBoardConfig: BoardsConfig.Config = { +// selectedBoard: aBoard, +// selectedPort: aPort, +// }; +// const aPackage: BoardsPackage = { +// author: 'someAuthor', +// availableVersions: ['some.ver.sion', 'some.other.version'], +// boards: [aBoard], +// deprecated: false, +// description: 'Some Arduino Board, Some Other Arduino Board', +// id: 'some:arduinoCoreId', +// installable: true, +// moreInfoLink: 'http://www.some-url.lol/', +// name: 'Some Arduino Package', +// summary: 'Boards included in this package:', +// }; + +// const anInstalledPackage: BoardsPackage = { +// ...aPackage, +// installedVersion: 'some.ver.sion', +// }; + +// describe('BoardsAutoInstaller', () => { +// let subject: BoardsAutoInstaller; +// let messageService: IMock; +// let boardsService: IMock; +// let boardsServiceClient: IMock; +// let responseService: IMock; +// let boardsManagerFrontendContribution: IMock; +// let boardsManagerWidget: IMock>; + +// let testContainer: Container; + +// beforeEach(() => { +// testContainer = new Container(); +// messageService = Mock.ofType(); +// boardsService = Mock.ofType(); +// boardsServiceClient = Mock.ofType(); +// responseService = Mock.ofType(); +// boardsManagerFrontendContribution = +// Mock.ofType(); +// boardsManagerWidget = Mock.ofType>(); + +// boardsManagerWidget.setup((b) => +// b.refresh(aPackage.name.toLocaleLowerCase()) +// ); + +// boardsManagerFrontendContribution +// .setup((b) => b.openView({ reveal: true })) +// .returns(async () => boardsManagerWidget.object); + +// messageService +// .setup((m) => m.showProgress(It.isAny(), It.isAny())) +// .returns(async () => ({ +// cancel: () => null, +// id: '', +// report: () => null, +// result: Promise.resolve(''), +// })); + +// responseService +// .setup((r) => r.onProgressDidChange(It.isAny())) +// .returns(() => ({ dispose: () => null })); + +// const module = new ContainerModule((bind) => { +// bind(BoardsAutoInstaller).toSelf(); +// bind(MessageService).toConstantValue(messageService.object); +// bind(BoardsService).toConstantValue(boardsService.object); +// bind(BoardsServiceProvider).toConstantValue(boardsServiceClient.object); +// bind(ResponseServiceArduino).toConstantValue(responseService.object); +// bind(BoardsListWidgetFrontendContribution).toConstantValue( +// boardsManagerFrontendContribution.object +// ); +// }); + +// testContainer.load(module); +// subject = testContainer.get(BoardsAutoInstaller); +// }); + +// context('when it starts', () => { +// it('should register to the BoardsServiceClient in order to check the packages every a new board is plugged in', () => { +// subject.onStart(); +// boardsServiceClient.verify( +// (b) => b.onBoardsConfigChanged(It.isAny()), +// Times.once() +// ); +// }); + +// context('and it checks the installable packages', () => { +// context(`and a port and a board a selected`, () => { +// beforeEach(() => { +// boardsServiceClient +// .setup((b) => b.boardsConfig) +// .returns(() => aBoardConfig); +// }); +// context('if no package for the board is already installed', () => { +// context('if a candidate package for the board is found', () => { +// beforeEach(() => { +// boardsService +// .setup((b) => b.search(It.isValue({}))) +// .returns(async () => [aPackage]); +// }); +// it('should show a notification suggesting to install that package', async () => { +// messageService +// .setup((m) => +// m.info(It.isAnyString(), It.isAnyString(), It.isAnyString()) +// ) +// .returns(() => Promise.resolve('Install Manually')); +// subject.onStart(); +// await tick(); +// messageService.verify( +// (m) => +// m.info(It.isAnyString(), It.isAnyString(), It.isAnyString()), +// Times.once() +// ); +// }); +// context(`if the answer to the message is 'Yes'`, () => { +// beforeEach(() => { +// messageService +// .setup((m) => +// m.info(It.isAnyString(), It.isAnyString(), It.isAnyString()) +// ) +// .returns(() => Promise.resolve('Yes')); +// }); +// it('should install the package', async () => { +// subject.onStart(); + +// await tick(); + +// messageService.verify( +// (m) => m.showProgress(It.isAny(), It.isAny()), +// Times.once() +// ); +// }); +// }); +// context( +// `if the answer to the message is 'Install Manually'`, +// () => { +// beforeEach(() => { +// messageService +// .setup((m) => +// m.info( +// It.isAnyString(), +// It.isAnyString(), +// It.isAnyString() +// ) +// ) +// .returns(() => Promise.resolve('Install Manually')); +// }); +// it('should open the boards manager widget', () => { +// subject.onStart(); +// }); +// } +// ); +// }); +// context('if a candidate package for the board is not found', () => { +// beforeEach(() => { +// boardsService +// .setup((b) => b.search(It.isValue({}))) +// .returns(async () => []); +// }); +// it('should do nothing', async () => { +// subject.onStart(); +// await tick(); +// messageService.verify( +// (m) => +// m.info(It.isAnyString(), It.isAnyString(), It.isAnyString()), +// Times.never() +// ); +// }); +// }); +// }); +// context( +// 'if one of the packages for the board is already installed', +// () => { +// beforeEach(() => { +// boardsService +// .setup((b) => b.search(It.isValue({}))) +// .returns(async () => [aPackage, anInstalledPackage]); +// messageService +// .setup((m) => +// m.info(It.isAnyString(), It.isAnyString(), It.isAnyString()) +// ) +// .returns(() => Promise.resolve('Yes')); +// }); +// it('should do nothing', async () => { +// subject.onStart(); +// await tick(); +// messageService.verify( +// (m) => +// m.info(It.isAnyString(), It.isAnyString(), It.isAnyString()), +// Times.never() +// ); +// }); +// } +// ); +// }); +// context('and there is no selected board or port', () => { +// it('should do nothing', async () => { +// subject.onStart(); +// await tick(); +// messageService.verify( +// (m) => m.info(It.isAnyString(), It.isAnyString(), It.isAnyString()), +// Times.never() +// ); +// }); +// }); +// }); +// }); +// }); diff --git a/browser-app/package.json b/browser-app/package.json index 9bdb4f99a..6a2c8f186 100644 --- a/browser-app/package.json +++ b/browser-app/package.json @@ -4,26 +4,26 @@ "version": "2.0.0-beta.12", "license": "AGPL-3.0-or-later", "dependencies": { - "@theia/core": "1.18.0", - "@theia/debug": "1.18.0", - "@theia/editor": "1.18.0", - "@theia/editor-preview": "1.18.0", - "@theia/file-search": "1.18.0", - "@theia/filesystem": "1.18.0", - "@theia/keymaps": "1.18.0", - "@theia/messages": "1.18.0", - "@theia/monaco": "1.18.0", - "@theia/navigator": "1.18.0", - "@theia/plugin-ext": "1.18.0", - "@theia/plugin-ext-vscode": "1.18.0", - "@theia/preferences": "1.18.0", - "@theia/process": "1.18.0", - "@theia/terminal": "1.18.0", - "@theia/workspace": "1.18.0", + "@theia/core": "1.19.0", + "@theia/debug": "1.19.0", + "@theia/editor": "1.19.0", + "@theia/editor-preview": "1.19.0", + "@theia/file-search": "1.19.0", + "@theia/filesystem": "1.19.0", + "@theia/keymaps": "1.19.0", + "@theia/messages": "1.19.0", + "@theia/monaco": "1.19.0", + "@theia/navigator": "1.19.0", + "@theia/plugin-ext": "1.19.0", + "@theia/plugin-ext-vscode": "1.19.0", + "@theia/preferences": "1.19.0", + "@theia/process": "1.19.0", + "@theia/terminal": "1.19.0", + "@theia/workspace": "1.19.0", "arduino-ide-extension": "2.0.0-beta.12" }, "devDependencies": { - "@theia/cli": "1.17.2" + "@theia/cli": "1.19.0" }, "scripts": { "prepare": "theia build --mode development", diff --git a/electron-app/package.json b/electron-app/package.json index f7f1441f3..920a07e97 100644 --- a/electron-app/package.json +++ b/electron-app/package.json @@ -5,27 +5,27 @@ "license": "AGPL-3.0-or-later", "main": "src-gen/frontend/electron-main.js", "dependencies": { - "@theia/core": "1.18.0", - "@theia/debug": "1.18.0", - "@theia/editor": "1.18.0", - "@theia/editor-preview": "1.18.0", - "@theia/electron": "1.18.0", - "@theia/file-search": "1.18.0", - "@theia/filesystem": "1.18.0", - "@theia/keymaps": "1.18.0", - "@theia/messages": "1.18.0", - "@theia/monaco": "1.18.0", - "@theia/navigator": "1.18.0", - "@theia/plugin-ext": "1.18.0", - "@theia/plugin-ext-vscode": "1.18.0", - "@theia/preferences": "1.18.0", - "@theia/process": "1.18.0", - "@theia/terminal": "1.18.0", - "@theia/workspace": "1.18.0", + "@theia/core": "1.19.0", + "@theia/debug": "1.19.0", + "@theia/editor": "1.19.0", + "@theia/editor-preview": "1.19.0", + "@theia/electron": "1.19.0", + "@theia/file-search": "1.19.0", + "@theia/filesystem": "1.19.0", + "@theia/keymaps": "1.19.0", + "@theia/messages": "1.19.0", + "@theia/monaco": "1.19.0", + "@theia/navigator": "1.19.0", + "@theia/plugin-ext": "1.19.0", + "@theia/plugin-ext-vscode": "1.19.0", + "@theia/preferences": "1.19.0", + "@theia/process": "1.19.0", + "@theia/terminal": "1.19.0", + "@theia/workspace": "1.19.0", "arduino-ide-extension": "2.0.0-beta.12" }, "devDependencies": { - "@theia/cli": "1.17.2" + "@theia/cli": "1.19.0" }, "scripts": { "prepare": "theia build --mode development", diff --git a/yarn.lock b/yarn.lock index ee92004da..5e2e996f5 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2185,23 +2185,6 @@ semver "^5.4.1" write-json-file "^2.2.0" -"@theia/application-package@1.18.0": - version "1.18.0" - resolved "https://registry.yarnpkg.com/@theia/application-package/-/application-package-1.18.0.tgz#20bb0dd21c52bf58a79c99c73517558e1704bc2c" - integrity sha512-v8jzr3ItlzyeserrEGfy3MJRB1rH2ewKWfLSu26PGRsR38zip1ZGLsPmk10/v8NVYwPu5enD8tppWlikRWwFzA== - dependencies: - "@types/fs-extra" "^4.0.2" - "@types/request" "^2.0.3" - "@types/semver" "^5.4.0" - "@types/write-json-file" "^2.2.1" - changes-stream "^2.2.0" - deepmerge "^4.2.2" - fs-extra "^4.0.2" - is-electron "^2.1.0" - request "^2.82.0" - semver "^5.4.1" - write-json-file "^2.2.0" - "@theia/application-package@1.19.0": version "1.19.0" resolved "https://registry.yarnpkg.com/@theia/application-package/-/application-package-1.19.0.tgz#a6045bec3ebcc7acb80dbfbb644c7fd429799aeb" @@ -2219,25 +2202,25 @@ semver "^5.4.1" write-json-file "^2.2.0" -"@theia/bulk-edit@1.18.0": - version "1.18.0" - resolved "https://registry.yarnpkg.com/@theia/bulk-edit/-/bulk-edit-1.18.0.tgz#bf24abd1fb25085e0c763beacfb13c2f084641dd" - integrity sha512-AhuMHZYCM5ShUzaUVqP7a6e2q1iT40Tphl4FsfRA4YYavoz4h2z8vBLCVMhzMIBSt60cu3e3La61gEdrolwqcA== +"@theia/bulk-edit@1.19.0": + version "1.19.0" + resolved "https://registry.yarnpkg.com/@theia/bulk-edit/-/bulk-edit-1.19.0.tgz#f822e8db865d745eca027ada0e98739250bf88de" + integrity sha512-acwWHfIYccMy8KAVXV1Pmrk+CJCzdJ878iqJy9W3f+lH8UY8IKpAvxobRIiMVywCS+cxiPE+IlJtH4I2Qhm1rg== dependencies: - "@theia/core" "1.18.0" - "@theia/editor" "1.18.0" - "@theia/filesystem" "1.18.0" - "@theia/monaco" "1.18.0" - "@theia/workspace" "1.18.0" + "@theia/core" "1.19.0" + "@theia/editor" "1.19.0" + "@theia/filesystem" "1.19.0" + "@theia/monaco" "1.19.0" + "@theia/workspace" "1.19.0" -"@theia/callhierarchy@1.18.0": - version "1.18.0" - resolved "https://registry.yarnpkg.com/@theia/callhierarchy/-/callhierarchy-1.18.0.tgz#af376982156265e81634c358414b058a09114680" - integrity sha512-Ym1Ws/XF0UbPhDzENQHOv1LXbuMMOevkM14mONGIdHMPT6b0V+plDUjhbtdiheR0vh4JgfZNwgmnoZAej97g5w== +"@theia/callhierarchy@1.19.0": + version "1.19.0" + resolved "https://registry.yarnpkg.com/@theia/callhierarchy/-/callhierarchy-1.19.0.tgz#24f7bd8b3abdb55ff5c120b7200235b099b96c11" + integrity sha512-xRjTWobnx/RThneL1E7wx+mvAfjroFaofdpDpgaP8f1+CtkeDMtPKK0Q5eCzkXPt7b4nM3R8xTboxOQ0VJWYQA== dependencies: - "@theia/core" "1.18.0" - "@theia/editor" "1.18.0" - "@theia/monaco" "1.18.0" + "@theia/core" "1.19.0" + "@theia/editor" "1.19.0" + "@theia/monaco" "1.19.0" ts-md5 "^1.2.2" "@theia/cli@1.17.2": @@ -2307,19 +2290,19 @@ serialize-javascript "^1.4.0" webpack-sources "^1.0.1" -"@theia/console@1.18.0": - version "1.18.0" - resolved "https://registry.yarnpkg.com/@theia/console/-/console-1.18.0.tgz#eee88e6943f631d52baa8c928bb4c09d4aca96fd" - integrity sha512-pFEBeMXvNg3+s8ADt8xhgYSNyNtBypnx/2Xs4wCWqiLGosP+6w73+NRjIRr91zNnmDcD6JNszojBdw50B8AX5w== +"@theia/console@1.19.0": + version "1.19.0" + resolved "https://registry.yarnpkg.com/@theia/console/-/console-1.19.0.tgz#79a594b68cb525304cfd11a28d3654d61c2c89d3" + integrity sha512-Ze/qqH/bekVEB0QLI10tBxQ4NGMwQvuUW7OYZTuIwMM7iUSY/krgMe+1WJlh9802hSNPNZiOhMtnvBqw8kCNtg== dependencies: - "@theia/core" "1.18.0" - "@theia/monaco" "1.18.0" + "@theia/core" "1.19.0" + "@theia/monaco" "1.19.0" anser "^2.0.1" -"@theia/core@1.18.0": - version "1.18.0" - resolved "https://registry.yarnpkg.com/@theia/core/-/core-1.18.0.tgz#9ab6beb99ac0cf7279f9471135705275c510572f" - integrity sha512-b80KrYHC3V88ZhtOx5DxHOH1jA2I41AxVpngoBcNCptu6Ve7q78SSvvoR+oq34mPuT3KgArPVrV0bK+b7hvbSw== +"@theia/core@1.19.0": + version "1.19.0" + resolved "https://registry.yarnpkg.com/@theia/core/-/core-1.19.0.tgz#b198f7eabd4e751cf1d20f8bfcc57ef2e8857b52" + integrity sha512-4o90p0D+GYhFr8yN8oiyr1Ak6bwoEKxGJxRC5xiQiNR6ZIOfCxMOEWiQntGq5jB+1VO0TYdImyGRzgvJX+/Hig== dependencies: "@babel/runtime" "^7.10.0" "@phosphor/algorithm" "1" @@ -2333,7 +2316,7 @@ "@phosphor/virtualdom" "1" "@phosphor/widgets" "1" "@primer/octicons-react" "^9.0.0" - "@theia/application-package" "1.18.0" + "@theia/application-package" "1.19.0" "@types/body-parser" "^1.16.4" "@types/cookie" "^0.3.3" "@types/dompurify" "^2.2.2" @@ -2371,6 +2354,7 @@ perfect-scrollbar "^1.3.0" react "^16.8.0" react-dom "^16.8.0" + react-tooltip "^4.2.21" react-virtualized "^9.20.0" reconnecting-websocket "^4.2.0" reflect-metadata "^0.1.10" @@ -2384,25 +2368,25 @@ ws "^7.1.2" yargs "^15.3.1" -"@theia/debug@1.18.0": - version "1.18.0" - resolved "https://registry.yarnpkg.com/@theia/debug/-/debug-1.18.0.tgz#473323cc924e02e37ab92c03c82c4436193e629a" - integrity sha512-slq2+9NCt+n6BOVtASnIk4WEUHueFqUfEtuWgD+ouNsMwN3FOxiz2Wo5ixRjDwlwvkalC/T3L1qQxd64QHHMcQ== - dependencies: - "@theia/console" "1.18.0" - "@theia/core" "1.18.0" - "@theia/editor" "1.18.0" - "@theia/filesystem" "1.18.0" - "@theia/markers" "1.18.0" - "@theia/monaco" "1.18.0" - "@theia/output" "1.18.0" - "@theia/preferences" "1.18.0" - "@theia/process" "1.18.0" - "@theia/task" "1.18.0" - "@theia/terminal" "1.18.0" - "@theia/userstorage" "1.18.0" - "@theia/variable-resolver" "1.18.0" - "@theia/workspace" "1.18.0" +"@theia/debug@1.19.0": + version "1.19.0" + resolved "https://registry.yarnpkg.com/@theia/debug/-/debug-1.19.0.tgz#e4d6cb67666dfea18b9b0a278d05fc0e62f47f5a" + integrity sha512-Bcv6JEB8Fmt9ZkBVPOcpbN6iP1WL7pXsXig+4DqsENIHFJucITks0579GU87cd6WveIm37sjmcOdEMPeNxEKWg== + dependencies: + "@theia/console" "1.19.0" + "@theia/core" "1.19.0" + "@theia/editor" "1.19.0" + "@theia/filesystem" "1.19.0" + "@theia/markers" "1.19.0" + "@theia/monaco" "1.19.0" + "@theia/output" "1.19.0" + "@theia/preferences" "1.19.0" + "@theia/process" "1.19.0" + "@theia/task" "1.19.0" + "@theia/terminal" "1.19.0" + "@theia/userstorage" "1.19.0" + "@theia/variable-resolver" "1.19.0" + "@theia/workspace" "1.19.0" jsonc-parser "^2.2.0" mkdirp "^0.5.0" p-debounce "^2.1.0" @@ -2411,29 +2395,29 @@ unzip-stream "^0.3.0" vscode-debugprotocol "^1.32.0" -"@theia/editor-preview@1.18.0": - version "1.18.0" - resolved "https://registry.yarnpkg.com/@theia/editor-preview/-/editor-preview-1.18.0.tgz#f194d2969512f0574a7dd3cae3fa415c34e2944a" - integrity sha512-0JtmNAJlqBf0N/KG1rZKM7PjluR4JXBLOXgWZ36nflEPbSM1alY7DEtTYxQwkarzK4TytDiO9PZ/qPKPnxwMPw== +"@theia/editor-preview@1.19.0": + version "1.19.0" + resolved "https://registry.yarnpkg.com/@theia/editor-preview/-/editor-preview-1.19.0.tgz#3d1db40b55569e61d6b4dd30aff9a800758eada1" + integrity sha512-/9XKYhp+bB1F99lJfwTxAUeNwHns8kKLlQCpPwtkE2K9yS10vNqM3wL6mKL7sMgwI6a81gWW1fqI9uI562idow== dependencies: - "@theia/core" "1.18.0" - "@theia/editor" "1.18.0" - "@theia/navigator" "1.18.0" + "@theia/core" "1.19.0" + "@theia/editor" "1.19.0" + "@theia/navigator" "1.19.0" -"@theia/editor@1.18.0": - version "1.18.0" - resolved "https://registry.yarnpkg.com/@theia/editor/-/editor-1.18.0.tgz#0aa862c4cd5ea9671595136b505bab2818757e84" - integrity sha512-eE+uLZmcTn6Ka4hGPu0lKgcRuGIOAZyxUwhKOG3/6wjIsdiWrnsD9ES1JlvYSd1VLuN/aZOjj+9vkehxqXjmdg== +"@theia/editor@1.19.0": + version "1.19.0" + resolved "https://registry.yarnpkg.com/@theia/editor/-/editor-1.19.0.tgz#66a1699ca78cc65a7a5527f6dbcd280d833f5c42" + integrity sha512-7CUjp3lUg/0vtZlvikWvhKTWl4ys8p9WcvH/rcUDuvcJ85IYv+Sz2rwQUHuN8/XPIsHnMDZGhNkX0u/4lznlLw== dependencies: - "@theia/core" "1.18.0" - "@theia/variable-resolver" "1.18.0" + "@theia/core" "1.19.0" + "@theia/variable-resolver" "1.19.0" "@types/base64-arraybuffer" "0.1.0" base64-arraybuffer "^0.1.5" -"@theia/electron@1.18.0": - version "1.18.0" - resolved "https://registry.yarnpkg.com/@theia/electron/-/electron-1.18.0.tgz#0c094d560bc85fd234ed36f87476e5f1391189cd" - integrity sha512-/VP2tqN2R6v2JAgR3TX3uT1QCmDr8ZZ9RYLrndokSpkKztBfcuhLuj1HjoOX+AUNQZKzuKHNiSSa5P2ZhM/T/w== +"@theia/electron@1.19.0": + version "1.19.0" + resolved "https://registry.yarnpkg.com/@theia/electron/-/electron-1.19.0.tgz#82a667365246d7dc714380e98e64f45781bf9d72" + integrity sha512-D/fYYuCMWZIdWfocU3kx+968jB6Epb/3aKZKmia4mheu4iXeQ0ANIHO8DM0XNWYy7IZGqh7GlGONgHmjWjR9WQ== dependencies: "@electron/get" "^1.12.4" electron "^9.0.2" @@ -2444,25 +2428,25 @@ unzipper "^0.9.11" yargs "^15.3.1" -"@theia/file-search@1.18.0": - version "1.18.0" - resolved "https://registry.yarnpkg.com/@theia/file-search/-/file-search-1.18.0.tgz#4662eecb6e25f7f470268bb643b59e2f6a5ec6ff" - integrity sha512-+4lJhWFkk5p7Y20dK+MeiqYV969+CM2rLt/ifxT6fRrpWMI3EZlopN/48O+q2pr2n39hFEx8VCUENFg7p0VEug== - dependencies: - "@theia/core" "1.18.0" - "@theia/editor" "1.18.0" - "@theia/filesystem" "1.18.0" - "@theia/monaco" "1.18.0" - "@theia/process" "1.18.0" - "@theia/workspace" "1.18.0" +"@theia/file-search@1.19.0": + version "1.19.0" + resolved "https://registry.yarnpkg.com/@theia/file-search/-/file-search-1.19.0.tgz#f9f7f8c3b378c83d269d1ce1c86aabc2edd4e87b" + integrity sha512-YtiTLlh8EV5qGkj8bif6PiFkF/gaElSPSS2u+IeXCJl6+NE0aE3WZu51VE1GeKW8eZHFwYj32OsC7bqcOl4b+g== + dependencies: + "@theia/core" "1.19.0" + "@theia/editor" "1.19.0" + "@theia/filesystem" "1.19.0" + "@theia/monaco" "1.19.0" + "@theia/process" "1.19.0" + "@theia/workspace" "1.19.0" vscode-ripgrep "^1.2.4" -"@theia/filesystem@1.18.0": - version "1.18.0" - resolved "https://registry.yarnpkg.com/@theia/filesystem/-/filesystem-1.18.0.tgz#b4a283960fdf649e54fd9b57d00e1e385b118da6" - integrity sha512-z0UGr+dmsJ8cYTTX15AhD6SD80n4VmwmQKgVGeMFBwVwVRA7uml1BmLspeREepVKnEp5Mllzj8p6sCIrmbwlMg== +"@theia/filesystem@1.19.0": + version "1.19.0" + resolved "https://registry.yarnpkg.com/@theia/filesystem/-/filesystem-1.19.0.tgz#1abddbcca544801b3194fe04947d23d60c4b72e5" + integrity sha512-ETGWpg+jOTIeWeUTS7ve8bQxE1YoI9wDDPomaBzZtdv+2veSfqAEyau5hx9ZabrvdCflxFXGom/fOKd1mchZUw== dependencies: - "@theia/core" "1.18.0" + "@theia/core" "1.19.0" "@types/body-parser" "^1.17.0" "@types/multer" "^1.4.7" "@types/rimraf" "^2.0.2" @@ -2480,19 +2464,19 @@ uuid "^8.0.0" vscode-languageserver-textdocument "^1.0.1" -"@theia/git@1.18.0": - version "1.18.0" - resolved "https://registry.yarnpkg.com/@theia/git/-/git-1.18.0.tgz#27aaaffd59811835464babbfa4cb72f9f6c5e4d6" - integrity sha512-9urYFBu15zzWFVQ//pt9Pto6vcmvHmIsQsYDtMTN6ioYzpV9PhKr09353H7TX5hrw6kJIEKEWSatBYNqd8sqRw== - dependencies: - "@theia/core" "1.18.0" - "@theia/editor" "1.18.0" - "@theia/filesystem" "1.18.0" - "@theia/monaco" "1.18.0" - "@theia/navigator" "1.18.0" - "@theia/scm" "1.18.0" - "@theia/scm-extra" "1.18.0" - "@theia/workspace" "1.18.0" +"@theia/git@1.19.0": + version "1.19.0" + resolved "https://registry.yarnpkg.com/@theia/git/-/git-1.19.0.tgz#48ad2ad1d28fdcb63ad7366ef509d402e0420101" + integrity sha512-cPFJGlKrkv6nz8+AhVrO6fpvQl+PmWfx4lDvYE1OAzuCaCnifGqqF8oaBcIL43kBIMnMJCSRVeJPdk2kAURrIQ== + dependencies: + "@theia/core" "1.19.0" + "@theia/editor" "1.19.0" + "@theia/filesystem" "1.19.0" + "@theia/monaco" "1.19.0" + "@theia/navigator" "1.19.0" + "@theia/scm" "1.19.0" + "@theia/scm-extra" "1.19.0" + "@theia/workspace" "1.19.0" "@types/diff" "^3.2.2" "@types/p-queue" "^2.3.1" diff "^3.4.0" @@ -2504,15 +2488,15 @@ p-queue "^2.4.2" ts-md5 "^1.2.2" -"@theia/keymaps@1.18.0": - version "1.18.0" - resolved "https://registry.yarnpkg.com/@theia/keymaps/-/keymaps-1.18.0.tgz#ce19c4a8a1220698d6ef096074997ea0c850a2a7" - integrity sha512-S0KMLliVGXUZws4d5w1wc0yfn43qiPRaeWKIlp4b7+gNN0qCze52eSG+TdI9UnlWth2Gsx39fqxpG5WCzMCYhA== +"@theia/keymaps@1.19.0": + version "1.19.0" + resolved "https://registry.yarnpkg.com/@theia/keymaps/-/keymaps-1.19.0.tgz#f449cadb8fa8bc8ed110a3a0b38cd6a0fb351ada" + integrity sha512-1o+t4kq3VKoKXmGUTdBOpMZxsKnAf9gfXJPyFeow2Qjsl+kdDsBurL8If4LH1PRYi6C+ATkyo7YycZ4/60BsuQ== dependencies: - "@theia/core" "1.18.0" - "@theia/monaco" "1.18.0" - "@theia/userstorage" "1.18.0" - "@theia/workspace" "1.18.0" + "@theia/core" "1.19.0" + "@theia/monaco" "1.19.0" + "@theia/userstorage" "1.19.0" + "@theia/workspace" "1.19.0" "@types/lodash.debounce" "4.0.3" ajv "^6.5.3" jsonc-parser "^2.2.0" @@ -2528,22 +2512,22 @@ glob "^7.2.0" typescript "^4.4.3" -"@theia/markers@1.18.0": - version "1.18.0" - resolved "https://registry.yarnpkg.com/@theia/markers/-/markers-1.18.0.tgz#8e1b0c1c55727915f4ea9c384dcf0c7d250774b8" - integrity sha512-gngj04GTRGS+RqTVYzp1rHGK+TcXEEdZRzJiHHSYjvGSj5XWioxE7cFwZDhQB0TGiHfXNauuWwRj5zJxXFceNg== +"@theia/markers@1.19.0": + version "1.19.0" + resolved "https://registry.yarnpkg.com/@theia/markers/-/markers-1.19.0.tgz#5926256dbc6a3ca1e5f3587ba87ebf747e18f8f3" + integrity sha512-kvjPL8llku578ChNB60YtL1dnaqRU74PDOInnhZYvqo8M1TQFbqlgXco9VujZacrZCi3nhtWshJxf0td3hKeQg== dependencies: - "@theia/core" "1.18.0" - "@theia/filesystem" "1.18.0" - "@theia/navigator" "1.18.0" - "@theia/workspace" "1.18.0" + "@theia/core" "1.19.0" + "@theia/filesystem" "1.19.0" + "@theia/navigator" "1.19.0" + "@theia/workspace" "1.19.0" -"@theia/messages@1.18.0": - version "1.18.0" - resolved "https://registry.yarnpkg.com/@theia/messages/-/messages-1.18.0.tgz#d29ebb00a19daa1000519468ac59339547944d1d" - integrity sha512-TUU4/2of0BJuEayqKKsz9V6SRHPp4HYnb1H9IuJl2aavRAEEd7bk1iLB6n7UgQUHsVMqlkYqjEJdEJFuptCqTg== +"@theia/messages@1.19.0": + version "1.19.0" + resolved "https://registry.yarnpkg.com/@theia/messages/-/messages-1.19.0.tgz#f0e9f9b8e4567f281e00982e925506a1948db494" + integrity sha512-ancIsyoR6FhqL1AzWwBYTzINUzReZ1pANaG6S3sDGaP8qWeFVXReRAM7qSCkSUiFkknTuCqfQ8RLSSRg+8VXpA== dependencies: - "@theia/core" "1.18.0" + "@theia/core" "1.19.0" markdown-it "^8.4.0" react-perfect-scrollbar "^1.5.3" ts-md5 "^1.2.2" @@ -2553,32 +2537,32 @@ resolved "https://registry.yarnpkg.com/@theia/monaco-editor-core/-/monaco-editor-core-0.23.0.tgz#7a1cbb7a857a509ce8e75c9965abea752bd76e80" integrity sha512-WyrotTd6ZfeXAX4icgFALTzlqE356tAQ5nRuwa2E0Qdp2YIO9GDcw5G2l2NJ8INO2ygujbE5pEdD5kJM5N4TOQ== -"@theia/monaco@1.18.0": - version "1.18.0" - resolved "https://registry.yarnpkg.com/@theia/monaco/-/monaco-1.18.0.tgz#a2bfcf8688dbe594f2e4e0f7924d39e4059ea841" - integrity sha512-XC/b21QuYXQwVjIIi8lse1VdV9nWRMb22h22AbPhMr/pGVq9ITH3kNA2ReDeyCRpn2eIEE9g9sGYwfs3wCB1YA== +"@theia/monaco@1.19.0": + version "1.19.0" + resolved "https://registry.yarnpkg.com/@theia/monaco/-/monaco-1.19.0.tgz#ce4c2db38763201ef3c5d1e4c6b58796dd1e42d6" + integrity sha512-1k4rBQn7TA+v0TEsnmTMgGHfvSWlXrDbrxh5Iv9JsfgGYNaofKVyUD/v8ZVSrb4kqybhabHVhIBZe6UWzLDBpw== dependencies: - "@theia/core" "1.18.0" - "@theia/editor" "1.18.0" - "@theia/filesystem" "1.18.0" - "@theia/markers" "1.18.0" + "@theia/core" "1.19.0" + "@theia/editor" "1.19.0" + "@theia/filesystem" "1.19.0" + "@theia/markers" "1.19.0" "@theia/monaco-editor-core" "0.23.0" - "@theia/outline-view" "1.18.0" - "@theia/workspace" "1.18.0" + "@theia/outline-view" "1.19.0" + "@theia/workspace" "1.19.0" fast-plist "^0.1.2" idb "^4.0.5" jsonc-parser "^2.2.0" onigasm "^2.2.0" vscode-textmate "^4.4.0" -"@theia/navigator@1.18.0": - version "1.18.0" - resolved "https://registry.yarnpkg.com/@theia/navigator/-/navigator-1.18.0.tgz#0f226fe223937c0dfc8c77854c607ed1d22e2778" - integrity sha512-Q9nNIrpgu8npGu3TU0JexdL4mP/XzIe4ZVZocmdV14pib98yS+mb7kT1AdCdvCr54eLxkdQMd25zqWflEexWCA== +"@theia/navigator@1.19.0": + version "1.19.0" + resolved "https://registry.yarnpkg.com/@theia/navigator/-/navigator-1.19.0.tgz#0541a032297840d9f74c348d9879a8d8e3c4fcfb" + integrity sha512-zZOI6+qrluodmsW96y7LWTWlWLGJPILw05+oTTJv4alIBxl+geKA8J7HH3ibVWXX6hK2FNe25UohzTQ7Uqwjbg== dependencies: - "@theia/core" "1.18.0" - "@theia/filesystem" "1.18.0" - "@theia/workspace" "1.18.0" + "@theia/core" "1.19.0" + "@theia/filesystem" "1.19.0" + "@theia/workspace" "1.19.0" minimatch "^3.0.4" "@theia/node-pty@0.9.0-theia.6": @@ -2588,22 +2572,22 @@ dependencies: nan "^2.14.0" -"@theia/outline-view@1.18.0": - version "1.18.0" - resolved "https://registry.yarnpkg.com/@theia/outline-view/-/outline-view-1.18.0.tgz#220bdd9f9d3adb64e1168512dbbe49861dea3f02" - integrity sha512-1ln78ZBK0aoMaoT91m5s9HYrQ/N18NmLnkSNP6wLr4DdGPPW60ptIwJkrEBjflni4kZ8DhGTrYt4A6yeaj/NyA== +"@theia/outline-view@1.19.0": + version "1.19.0" + resolved "https://registry.yarnpkg.com/@theia/outline-view/-/outline-view-1.19.0.tgz#6fc34a3fd7ec73586405208a203ad25a93d9ac4f" + integrity sha512-mUH1hjr/n8P7JcofTBtsx2CCpDHA9dUCG3J2i2fs6KdrWRou2WuFdnW9EG/PKDRqTTMQiJBgYOb9dBfbi7vBgw== dependencies: - "@theia/core" "1.18.0" + "@theia/core" "1.19.0" perfect-scrollbar "^1.3.0" -"@theia/output@1.18.0": - version "1.18.0" - resolved "https://registry.yarnpkg.com/@theia/output/-/output-1.18.0.tgz#d404cc1bcdf23f7a6d086f296b60dc145a3211cb" - integrity sha512-wJ5vaJoKZUoV4FyKn/COVErawbfCg3Xb/LoB9sVmr260lU0h4SOjoj5n9J48iyS1C2RvIcmsiFR17hACRDffBQ== +"@theia/output@1.19.0": + version "1.19.0" + resolved "https://registry.yarnpkg.com/@theia/output/-/output-1.19.0.tgz#71d83f1fb4a5505bfbfec5acc4cfdbff46777a3b" + integrity sha512-H9EedIxLzYxmP7vzFvgB4PWBLsVtf8WPu/x6nOblaPwiEQVQdIzB6yvqXx1oZgSay1RwPVJzuHpv70F7NEbwPA== dependencies: - "@theia/core" "1.18.0" - "@theia/editor" "1.18.0" - "@theia/monaco" "1.18.0" + "@theia/core" "1.19.0" + "@theia/editor" "1.19.0" + "@theia/monaco" "1.19.0" "@types/p-queue" "^2.3.1" p-queue "^2.4.2" @@ -2625,52 +2609,53 @@ bent "^7.1.0" semver "^5.4.1" -"@theia/plugin-ext-vscode@1.18.0": - version "1.18.0" - resolved "https://registry.yarnpkg.com/@theia/plugin-ext-vscode/-/plugin-ext-vscode-1.18.0.tgz#ef1e44992c0fb5b52d02a4c9b93b1da94f3f9a94" - integrity sha512-n64RzmlHoawNZY8pew9/e5lVMPqFGLmyprZm7oklaoR5h11l1/qB7tIe9JPLUOpvqoNtYhA9KYah4oeZ37OgNQ== - dependencies: - "@theia/callhierarchy" "1.18.0" - "@theia/core" "1.18.0" - "@theia/editor" "1.18.0" - "@theia/filesystem" "1.18.0" - "@theia/monaco" "1.18.0" - "@theia/navigator" "1.18.0" - "@theia/plugin" "1.18.0" - "@theia/plugin-ext" "1.18.0" - "@theia/terminal" "1.18.0" - "@theia/userstorage" "1.18.0" - "@theia/workspace" "1.18.0" +"@theia/plugin-ext-vscode@1.19.0": + version "1.19.0" + resolved "https://registry.yarnpkg.com/@theia/plugin-ext-vscode/-/plugin-ext-vscode-1.19.0.tgz#85d129d6dd7ad77a337547b21051dd2fff625f4b" + integrity sha512-OdXDXNBI7pU2Wziy2WY10m8tpQ/Mcj5oCkmO/kkBQk/TsbyNxJjIdDQWU/sGUiupOXjJZcuuCbNwJC+n5bFhug== + dependencies: + "@theia/callhierarchy" "1.19.0" + "@theia/core" "1.19.0" + "@theia/editor" "1.19.0" + "@theia/filesystem" "1.19.0" + "@theia/monaco" "1.19.0" + "@theia/navigator" "1.19.0" + "@theia/plugin" "1.19.0" + "@theia/plugin-ext" "1.19.0" + "@theia/terminal" "1.19.0" + "@theia/userstorage" "1.19.0" + "@theia/workspace" "1.19.0" "@types/request" "^2.0.3" filenamify "^4.1.0" request "^2.82.0" -"@theia/plugin-ext@1.18.0": - version "1.18.0" - resolved "https://registry.yarnpkg.com/@theia/plugin-ext/-/plugin-ext-1.18.0.tgz#f841e66d29c4cc56e4f73f4175168fcaeccdd0c9" - integrity sha512-6jI19cu5zJtDc38KqbqP95ujs/Ixbl6663CWILiPzw1+wCWmtrCogZmsgNWjpVUCnFBsKkei6bM5HEq8tAs9kg== - dependencies: - "@theia/bulk-edit" "1.18.0" - "@theia/callhierarchy" "1.18.0" - "@theia/console" "1.18.0" - "@theia/core" "1.18.0" - "@theia/debug" "1.18.0" - "@theia/editor" "1.18.0" - "@theia/file-search" "1.18.0" - "@theia/filesystem" "1.18.0" - "@theia/markers" "1.18.0" - "@theia/messages" "1.18.0" - "@theia/monaco" "1.18.0" - "@theia/navigator" "1.18.0" - "@theia/output" "1.18.0" - "@theia/plugin" "1.18.0" - "@theia/preferences" "1.18.0" - "@theia/scm" "1.18.0" - "@theia/search-in-workspace" "1.18.0" - "@theia/task" "1.18.0" - "@theia/terminal" "1.18.0" - "@theia/timeline" "1.18.0" - "@theia/workspace" "1.18.0" +"@theia/plugin-ext@1.19.0": + version "1.19.0" + resolved "https://registry.yarnpkg.com/@theia/plugin-ext/-/plugin-ext-1.19.0.tgz#9b9a4bd0b1992f1d631609e167465e22194647ff" + integrity sha512-fxx6hMPUkwiIwYzxJ1KOwcb2U+659Uge/aRZf4dEC9ESqeLEo5LqpfXkOLABfym8MDLSXHaUjX2hnbgFpIOAxA== + dependencies: + "@theia/bulk-edit" "1.19.0" + "@theia/callhierarchy" "1.19.0" + "@theia/console" "1.19.0" + "@theia/core" "1.19.0" + "@theia/debug" "1.19.0" + "@theia/editor" "1.19.0" + "@theia/file-search" "1.19.0" + "@theia/filesystem" "1.19.0" + "@theia/markers" "1.19.0" + "@theia/messages" "1.19.0" + "@theia/monaco" "1.19.0" + "@theia/navigator" "1.19.0" + "@theia/output" "1.19.0" + "@theia/plugin" "1.19.0" + "@theia/preferences" "1.19.0" + "@theia/scm" "1.19.0" + "@theia/search-in-workspace" "1.19.0" + "@theia/task" "1.19.0" + "@theia/terminal" "1.19.0" + "@theia/timeline" "1.19.0" + "@theia/workspace" "1.19.0" + "@types/markdown-it" "*" "@types/mime" "^2.0.1" decompress "^4.2.1" escape-html "^1.0.3" @@ -2679,6 +2664,7 @@ jsonc-parser "^2.2.0" lodash.clonedeep "^4.5.0" macaddress "^0.2.9" + markdown-it "^8.4.0" mime "^2.4.4" ps-tree "^1.2.0" request "^2.82.0" @@ -2687,140 +2673,140 @@ vscode-debugprotocol "^1.32.0" vscode-textmate "^4.0.1" -"@theia/plugin@1.18.0": - version "1.18.0" - resolved "https://registry.yarnpkg.com/@theia/plugin/-/plugin-1.18.0.tgz#a7844aad0b415a192e9dbb3ab61c4ef967132b8c" - integrity sha512-yWI1oi89DQ4XKZb9UpCTTUSLSwh28jzE6qqzvnfAoJGGn/3ZYUlnyVSCiTpFQVTh2npFtU/rl0G3GZ+NvLi81A== +"@theia/plugin@1.19.0": + version "1.19.0" + resolved "https://registry.yarnpkg.com/@theia/plugin/-/plugin-1.19.0.tgz#0582e954070a8ce03ec784ef39e0b8a3f3e43640" + integrity sha512-Afhjg4RZPM4tyFQ2yjqf6LrEI+3aSAkaibGw99Jdcv2m/IXpARa3VdyZX00VDbEgMLiFtfXHckiCp5L8yhY7ug== -"@theia/preferences@1.18.0": - version "1.18.0" - resolved "https://registry.yarnpkg.com/@theia/preferences/-/preferences-1.18.0.tgz#5ee333bc6771b734b8c2a2d8b592faf6307eb960" - integrity sha512-CN2q3XaeGLZHJ2R9NHUAaHRmw6flJ15AglCOzzsME85TNks4Z4FPJM/gyOQwSCCrpIsLXkRPt+V6Q3m6hLz0UA== - dependencies: - "@theia/core" "1.18.0" - "@theia/editor" "1.18.0" - "@theia/filesystem" "1.18.0" - "@theia/monaco" "1.18.0" - "@theia/userstorage" "1.18.0" - "@theia/workspace" "1.18.0" +"@theia/preferences@1.19.0": + version "1.19.0" + resolved "https://registry.yarnpkg.com/@theia/preferences/-/preferences-1.19.0.tgz#2bc870e3fb686c05b1582cef4878f766fa7715f6" + integrity sha512-c1wnvbFThqEFZZtcj18MHOZSkMxk0A3dHPW02+aKQYt2eIaRX1D8Whn7rxIRKs8WziggMk2xvKgjN/phZ99ERw== + dependencies: + "@theia/core" "1.19.0" + "@theia/editor" "1.19.0" + "@theia/filesystem" "1.19.0" + "@theia/monaco" "1.19.0" + "@theia/userstorage" "1.19.0" + "@theia/workspace" "1.19.0" jsonc-parser "^2.2.0" -"@theia/process@1.18.0": - version "1.18.0" - resolved "https://registry.yarnpkg.com/@theia/process/-/process-1.18.0.tgz#e499d84134c5bc9fde5bea9f21c61d091aea5f33" - integrity sha512-xqJqVJHRC5Ar+FN7Pt/xfIOQspzZ3u4mgZJ47s4GuaH/7da5LnOe1q5dULft5oFIZNgMkffqrsMWSX0VKGiW5Q== +"@theia/process@1.19.0": + version "1.19.0" + resolved "https://registry.yarnpkg.com/@theia/process/-/process-1.19.0.tgz#c2b00608ad39c7b73f9ab9b9bbbf11208f7270e4" + integrity sha512-yn4UxC3Y2cWGeEpX4vCVp8T332v8lu5OB+Zb+xtprQ5O7MODMrYbnNgrp9HparYJfu/K7xO9S2J0hQV6QO5B9g== dependencies: - "@theia/core" "1.18.0" + "@theia/core" "1.19.0" "@theia/node-pty" "0.9.0-theia.6" string-argv "^0.1.1" -"@theia/scm-extra@1.18.0": - version "1.18.0" - resolved "https://registry.yarnpkg.com/@theia/scm-extra/-/scm-extra-1.18.0.tgz#3115c62982252629053b15c1f760f6caebedd601" - integrity sha512-VWbSoRCzn3cLQgSj3DsL+6tew8HU3nSWeTjfgq7xn1SgjfdSJZSfNLH9zbiqPTEe4NVQRIoZ/9jhB1IKFLZY+Q== +"@theia/scm-extra@1.19.0": + version "1.19.0" + resolved "https://registry.yarnpkg.com/@theia/scm-extra/-/scm-extra-1.19.0.tgz#2bc3b8863518d909d2b58c970648564dd1517fdd" + integrity sha512-ihXvl6RVIoEXwyoR580UWqr6p7cp0k+iAHssjfsPWbgVf916PWJFL/qE8xyixYtzKwp+kwifff6CrewxBvXnwQ== dependencies: - "@theia/core" "1.18.0" - "@theia/editor" "1.18.0" - "@theia/filesystem" "1.18.0" - "@theia/navigator" "1.18.0" - "@theia/scm" "1.18.0" + "@theia/core" "1.19.0" + "@theia/editor" "1.19.0" + "@theia/filesystem" "1.19.0" + "@theia/navigator" "1.19.0" + "@theia/scm" "1.19.0" -"@theia/scm@1.18.0": - version "1.18.0" - resolved "https://registry.yarnpkg.com/@theia/scm/-/scm-1.18.0.tgz#62a9f5a1b748802b0b4bc9847e43d8a87da0e781" - integrity sha512-n+pLloNuTl+2edApIiL7M4BYo3SAwWIdzjcteDDkEQFEeSZRfkQ8izDhuD17Klh+Wn0IrQkeJukmGGauDzNLMA== +"@theia/scm@1.19.0": + version "1.19.0" + resolved "https://registry.yarnpkg.com/@theia/scm/-/scm-1.19.0.tgz#f4848970181084ad689835db79cc2154b025e6b9" + integrity sha512-rc4e60p16a2/TEU9kAhR3XF89GdTcGmJxeuQRGrq8NzZjbIyHmW2CMdmFY8T6vwBRA80vlwfDmqr2F0zL5cCXQ== dependencies: - "@theia/core" "1.18.0" - "@theia/editor" "1.18.0" - "@theia/filesystem" "1.18.0" - "@theia/navigator" "1.18.0" + "@theia/core" "1.19.0" + "@theia/editor" "1.19.0" + "@theia/filesystem" "1.19.0" + "@theia/navigator" "1.19.0" "@types/diff" "^3.2.2" diff "^3.4.0" p-debounce "^2.1.0" react-autosize-textarea "^7.0.0" ts-md5 "^1.2.2" -"@theia/search-in-workspace@1.18.0": - version "1.18.0" - resolved "https://registry.yarnpkg.com/@theia/search-in-workspace/-/search-in-workspace-1.18.0.tgz#b23f0b5059848b6f41686c4c7061f1d22821c331" - integrity sha512-QqBaZhSgZ6dU5tE7J0zngelPYqH7Sx02bTrvwwlCeGOB+ow7pzfeaiqKIC9YBFZ9nVPBYBIvp/JbZDMOXDSBoQ== - dependencies: - "@theia/core" "1.18.0" - "@theia/editor" "1.18.0" - "@theia/filesystem" "1.18.0" - "@theia/navigator" "1.18.0" - "@theia/process" "1.18.0" - "@theia/workspace" "1.18.0" +"@theia/search-in-workspace@1.19.0": + version "1.19.0" + resolved "https://registry.yarnpkg.com/@theia/search-in-workspace/-/search-in-workspace-1.19.0.tgz#20fa0da70a7650751d0a0642225604bcabf53521" + integrity sha512-7gCgDNCvWphaJjftqXLL0+XEww6Kyz5tnRAffNkURR8X8FnBbptWMePq1sUCewdsWrkxQeRBoGagVV2jy/qLxA== + dependencies: + "@theia/core" "1.19.0" + "@theia/editor" "1.19.0" + "@theia/filesystem" "1.19.0" + "@theia/navigator" "1.19.0" + "@theia/process" "1.19.0" + "@theia/workspace" "1.19.0" minimatch "^3.0.4" vscode-ripgrep "^1.2.4" -"@theia/task@1.18.0": - version "1.18.0" - resolved "https://registry.yarnpkg.com/@theia/task/-/task-1.18.0.tgz#52856c4a3526e71ecabc6d9f8f94b2bb87db1c47" - integrity sha512-vkD8JGr1IeVYpWfzT2uWrqkrC8GpjLd9BN46j0DHLLYCxX4H/A7laPVBzkuL4Z1sumlR1JEFJeW3zIqFZk5Q3Q== - dependencies: - "@theia/core" "1.18.0" - "@theia/editor" "1.18.0" - "@theia/filesystem" "1.18.0" - "@theia/markers" "1.18.0" - "@theia/monaco" "1.18.0" - "@theia/preferences" "1.18.0" - "@theia/process" "1.18.0" - "@theia/terminal" "1.18.0" - "@theia/userstorage" "1.18.0" - "@theia/variable-resolver" "1.18.0" - "@theia/workspace" "1.18.0" +"@theia/task@1.19.0": + version "1.19.0" + resolved "https://registry.yarnpkg.com/@theia/task/-/task-1.19.0.tgz#4089ef3f2d1b8fe3c800f3dde276d93d66910152" + integrity sha512-gGbVK08Ve5we1pO/X7HyjW3WJCjXBKG/G9G7taLhgzOjLrbXrJIDyEzxGm9BIeN5oJ9KfoaEJ5Y0NRz98ZKaTQ== + dependencies: + "@theia/core" "1.19.0" + "@theia/editor" "1.19.0" + "@theia/filesystem" "1.19.0" + "@theia/markers" "1.19.0" + "@theia/monaco" "1.19.0" + "@theia/preferences" "1.19.0" + "@theia/process" "1.19.0" + "@theia/terminal" "1.19.0" + "@theia/userstorage" "1.19.0" + "@theia/variable-resolver" "1.19.0" + "@theia/workspace" "1.19.0" ajv "^6.5.3" async-mutex "^0.3.1" jsonc-parser "^2.2.0" p-debounce "^2.1.0" -"@theia/terminal@1.18.0": - version "1.18.0" - resolved "https://registry.yarnpkg.com/@theia/terminal/-/terminal-1.18.0.tgz#d51b78e06e3c8bda1b0f1f5e53f0643094d9376a" - integrity sha512-ks68J6+TSVRj2IMmKpdaASgYrrh55DkGEKNc9I91EcOn6eM5bf/lI23yirwtdV8T4hXse7SReDngNC666qSaEQ== - dependencies: - "@theia/core" "1.18.0" - "@theia/editor" "1.18.0" - "@theia/filesystem" "1.18.0" - "@theia/monaco" "1.18.0" - "@theia/process" "1.18.0" - "@theia/workspace" "1.18.0" +"@theia/terminal@1.19.0": + version "1.19.0" + resolved "https://registry.yarnpkg.com/@theia/terminal/-/terminal-1.19.0.tgz#3ed47a50830708f681d27d5514f9626ab08e10f2" + integrity sha512-WOLJ/YKjtjCpvI2px3AlbifTxN1DIytOe/nVjc2yOZZLKD/hFYVPGqzMghpS1JOSfSvYdwxgzCwDZOlSAEnFkA== + dependencies: + "@theia/core" "1.19.0" + "@theia/editor" "1.19.0" + "@theia/filesystem" "1.19.0" + "@theia/monaco" "1.19.0" + "@theia/process" "1.19.0" + "@theia/workspace" "1.19.0" xterm "~4.11.0" xterm-addon-fit "~0.5.0" xterm-addon-search "~0.8.0" -"@theia/timeline@1.18.0": - version "1.18.0" - resolved "https://registry.yarnpkg.com/@theia/timeline/-/timeline-1.18.0.tgz#46acf7a307cfbedd57092e892d3b8adf9ccf2c83" - integrity sha512-s+nJtUZmj3baT1Md/grW52PfsvYvasQq+EEZN+hqjwBLwzF1ooZUTVHcMFDOLCK4BsGhP2KJI5vpS18G6W4G4Q== +"@theia/timeline@1.19.0": + version "1.19.0" + resolved "https://registry.yarnpkg.com/@theia/timeline/-/timeline-1.19.0.tgz#453baa24a0241ff7e459a42414d9a86f496c85f9" + integrity sha512-/wcBYdmN2pde65/DjbByZkqJTTuemXGndokjhW6OaQvuPUOLIYQaAlrhypJXtED4X3RDoykVYkQqbYtdUBAn1A== dependencies: - "@theia/core" "1.18.0" - "@theia/navigator" "1.18.0" + "@theia/core" "1.19.0" + "@theia/navigator" "1.19.0" -"@theia/userstorage@1.18.0": - version "1.18.0" - resolved "https://registry.yarnpkg.com/@theia/userstorage/-/userstorage-1.18.0.tgz#95dcd86bb363403464312c8619a776af78216f83" - integrity sha512-ZPoECJqw6LGRkQU/iPNC3iv1DA7HolSlXs94pjD1eeEcFL/75PJ6PXnna7trzD01POZrgNphCvuvkRqAn7/T4g== +"@theia/userstorage@1.19.0": + version "1.19.0" + resolved "https://registry.yarnpkg.com/@theia/userstorage/-/userstorage-1.19.0.tgz#1a226ebe099f395f36e792077f3eb1e6eb7bbde2" + integrity sha512-azCZX3p/C6Z+K0qPNCIOkS80c2yCYHu5jU4FsPkM8UXfcM2ilprxMDmpZVCTsPno6vohm+aT3W5r1oyhLRA1IQ== dependencies: - "@theia/core" "1.18.0" - "@theia/filesystem" "1.18.0" + "@theia/core" "1.19.0" + "@theia/filesystem" "1.19.0" -"@theia/variable-resolver@1.18.0": - version "1.18.0" - resolved "https://registry.yarnpkg.com/@theia/variable-resolver/-/variable-resolver-1.18.0.tgz#c7be990b603003a27262809e9c483e0f33d01f53" - integrity sha512-uQ+EzErQ5B8mOOKUyTUFH7zmBwisp0jfe207Ox07O9LlZys3E/CYOIryo3Hn74LUiprFzMPpLFYyiVBqDcs5VA== +"@theia/variable-resolver@1.19.0": + version "1.19.0" + resolved "https://registry.yarnpkg.com/@theia/variable-resolver/-/variable-resolver-1.19.0.tgz#fb728ac5bec6ad0a8edb6e1a2330183109bbae59" + integrity sha512-1VV1XC1HZpVGDbS5QAGga6XVnLkm0arT8Bh4UaYUrGQtR4WyfdVktjCrF6J2TUmqQXOendixk7g2UEEq/pehIA== dependencies: - "@theia/core" "1.18.0" + "@theia/core" "1.19.0" -"@theia/workspace@1.18.0": - version "1.18.0" - resolved "https://registry.yarnpkg.com/@theia/workspace/-/workspace-1.18.0.tgz#91af0b5a0e5e5c07c0cb08bed2daf4faa8a6c559" - integrity sha512-WDzQ4rHHFwbk6e7Wk4vsWEUREo15nBjRid1hwwkBr6uWp04eqFDwBaSvaSooPGWZbOqXIrLSB7z7DQh9Cv3nkg== +"@theia/workspace@1.19.0": + version "1.19.0" + resolved "https://registry.yarnpkg.com/@theia/workspace/-/workspace-1.19.0.tgz#09aa42264d38504c8e390317e6275730558b0473" + integrity sha512-FTZwuvHbrQwRbFxLZbgfdvLT53UCi4qXEAaPFLYK4g5z2oAwoAhxOQzhuIOn21c3sjJzlFirKZgU6Rmvdx++Lg== dependencies: - "@theia/core" "1.18.0" - "@theia/filesystem" "1.18.0" - "@theia/variable-resolver" "1.18.0" + "@theia/core" "1.19.0" + "@theia/filesystem" "1.19.0" + "@theia/variable-resolver" "1.19.0" ajv "^6.5.3" jsonc-parser "^2.2.0" moment "2.24.0" @@ -3047,6 +3033,11 @@ dependencies: keytar "*" +"@types/linkify-it@*": + version "3.0.2" + resolved "https://registry.yarnpkg.com/@types/linkify-it/-/linkify-it-3.0.2.tgz#fd2cd2edbaa7eaac7e7f3c1748b52a19143846c9" + integrity sha512-HZQYqbiFVWufzCwexrvh694SOim8z2d+xJl5UNamcvQFejLY/2YUtzXHYi3cHdI7PMlS8ejH2slRAOJQ32aNbA== + "@types/lodash.debounce@4.0.3": version "4.0.3" resolved "https://registry.yarnpkg.com/@types/lodash.debounce/-/lodash.debounce-4.0.3.tgz#d712aee9e6136be77f70523ed9f0fc049a6cf15a" @@ -3078,6 +3069,19 @@ resolved "https://registry.yarnpkg.com/@types/long/-/long-4.0.1.tgz#459c65fa1867dafe6a8f322c4c51695663cc55e9" integrity sha512-5tXH6Bx/kNGd3MgffdmP4dy2Z+G4eaXw0SE81Tq3BNadtnMR5/ySMzX4SLEzHJzSmPNn4HIdpQsBvXMUykr58w== +"@types/markdown-it@*": + version "12.2.3" + resolved "https://registry.yarnpkg.com/@types/markdown-it/-/markdown-it-12.2.3.tgz#0d6f6e5e413f8daaa26522904597be3d6cd93b51" + integrity sha512-GKMHFfv3458yYy+v/N8gjufHO6MSZKCOXpZc5GXIWWy8uldwfmPn98vp81gZ5f9SVw8YYBctgfJ22a2d7AOMeQ== + dependencies: + "@types/linkify-it" "*" + "@types/mdurl" "*" + +"@types/mdurl@*": + version "1.0.2" + resolved "https://registry.yarnpkg.com/@types/mdurl/-/mdurl-1.0.2.tgz#e2ce9d83a613bacf284c7be7d491945e39e1f8e9" + integrity sha512-eC4U9MlIcu2q0KQmXszyn5Akca/0jrQmwDRgpAMJai7qBWq4amIQhZyNau4VYGtCeALvW1/NtjzJJ567aZxfKA== + "@types/mime-types@^2.1.0": version "2.1.0" resolved "https://registry.yarnpkg.com/@types/mime-types/-/mime-types-2.1.0.tgz#9ca52cda363f699c69466c2a6ccdaad913ea7a73" @@ -12068,6 +12072,14 @@ react-tabs@^3.1.2: clsx "^1.1.0" prop-types "^15.5.0" +react-tooltip@^4.2.21: + version "4.2.21" + resolved "https://registry.yarnpkg.com/react-tooltip/-/react-tooltip-4.2.21.tgz#840123ed86cf33d50ddde8ec8813b2960bfded7f" + integrity sha512-zSLprMymBDowknr0KVDiJ05IjZn9mQhhg4PRsqln0OZtURAJ1snt1xi5daZfagsh6vfsziZrc9pErPTDY1ACig== + dependencies: + prop-types "^15.7.2" + uuid "^7.0.3" + react-transition-group@^4.3.0: version "4.4.1" resolved "https://registry.yarnpkg.com/react-transition-group/-/react-transition-group-4.4.1.tgz#63868f9325a38ea5ee9535d828327f85773345c9" @@ -14358,6 +14370,11 @@ uuid@^3.0.1, uuid@^3.2.1, uuid@^3.3.2: resolved "https://registry.yarnpkg.com/uuid/-/uuid-3.4.0.tgz#b23e4358afa8a202fe7a100af1f5f883f02007ee" integrity sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A== +uuid@^7.0.3: + version "7.0.3" + resolved "https://registry.yarnpkg.com/uuid/-/uuid-7.0.3.tgz#c5c9f2c8cf25dc0a372c4df1441c41f5bd0c680b" + integrity sha512-DPSke0pXhTZgoF/d+WSt2QaKMCFSfx7QegxEWT+JOuHF5aWrKEn0G+ztjuJg/gG8/ItK+rbPCD/yNv8yyih6Cg== + uuid@^8.0.0, uuid@^8.3.2: version "8.3.2" resolved "https://registry.yarnpkg.com/uuid/-/uuid-8.3.2.tgz#80d5b5ced271bb9af6c445f21a1a04c606cefbe2" From c3db2e615cfb62aba2ded641812f836aa738fcaa Mon Sep 17 00:00:00 2001 From: Francesco Stasi Date: Tue, 23 Nov 2021 12:58:06 +0100 Subject: [PATCH 02/10] update CLI to 0.20.0-rc3 --- arduino-ide-extension/package.json | 2 +- .../cc/arduino/cli/commands/v1/board_pb.d.ts | 2 +- .../cc/arduino/cli/commands/v1/board_pb.js | 2 +- .../cli/commands/v1/commands_grpc_pb.d.ts | 70 +- .../cli/commands/v1/commands_grpc_pb.js | 140 +- .../arduino/cli/commands/v1/commands_pb.d.ts | 56 +- .../cc/arduino/cli/commands/v1/commands_pb.js | 389 +++- .../cc/arduino/cli/commands/v1/core_pb.d.ts | 2 +- .../cc/arduino/cli/commands/v1/core_pb.js | 2 +- .../cli/commands/v1/monitor_grpc_pb.js | 1 + .../arduino/cli/commands/v1/monitor_pb.d.ts | 232 +++ .../cc/arduino/cli/commands/v1/monitor_pb.js | 1724 +++++++++++++++++ .../cc/arduino/cli/commands/v1/port_pb.d.ts | 2 +- .../cc/arduino/cli/commands/v1/port_pb.js | 2 +- .../cc/arduino/cli/commands/v1/upload_pb.d.ts | 2 +- .../cc/arduino/cli/commands/v1/upload_pb.js | 2 +- .../arduino/cli/debug/v1/debug_grpc_pb.d.ts | 2 +- .../cc/arduino/cli/debug/v1/debug_grpc_pb.js | 1 + .../cc/arduino/cli/debug/v1/debug_pb.d.ts | 2 +- .../cc/arduino/cli/debug/v1/debug_pb.js | 2 +- .../cli-protocol/google/rpc/status_pb.d.ts | 2 +- .../node/cli-protocol/google/rpc/status_pb.js | 2 +- yarn.lock | 85 - 23 files changed, 2623 insertions(+), 103 deletions(-) create mode 100644 arduino-ide-extension/src/node/cli-protocol/cc/arduino/cli/commands/v1/monitor_grpc_pb.js create mode 100644 arduino-ide-extension/src/node/cli-protocol/cc/arduino/cli/commands/v1/monitor_pb.d.ts create mode 100644 arduino-ide-extension/src/node/cli-protocol/cc/arduino/cli/commands/v1/monitor_pb.js diff --git a/arduino-ide-extension/package.json b/arduino-ide-extension/package.json index c5b85a3cb..dbcdcda9c 100644 --- a/arduino-ide-extension/package.json +++ b/arduino-ide-extension/package.json @@ -146,7 +146,7 @@ ], "arduino": { "cli": { - "version": "0.19.1" + "version": "0.20.0-rc3" }, "fwuploader": { "version": "2.0.0" diff --git a/arduino-ide-extension/src/node/cli-protocol/cc/arduino/cli/commands/v1/board_pb.d.ts b/arduino-ide-extension/src/node/cli-protocol/cc/arduino/cli/commands/v1/board_pb.d.ts index b8e1e2cf9..8b39c5085 100644 --- a/arduino-ide-extension/src/node/cli-protocol/cc/arduino/cli/commands/v1/board_pb.d.ts +++ b/arduino-ide-extension/src/node/cli-protocol/cc/arduino/cli/commands/v1/board_pb.d.ts @@ -735,4 +735,4 @@ export namespace BoardSearchResponse { export type AsObject = { boardsList: Array, } -} \ No newline at end of file +} diff --git a/arduino-ide-extension/src/node/cli-protocol/cc/arduino/cli/commands/v1/board_pb.js b/arduino-ide-extension/src/node/cli-protocol/cc/arduino/cli/commands/v1/board_pb.js index d498dc1ce..3753037cb 100644 --- a/arduino-ide-extension/src/node/cli-protocol/cc/arduino/cli/commands/v1/board_pb.js +++ b/arduino-ide-extension/src/node/cli-protocol/cc/arduino/cli/commands/v1/board_pb.js @@ -5474,4 +5474,4 @@ proto.cc.arduino.cli.commands.v1.BoardSearchResponse.prototype.clearBoardsList = }; -goog.object.extend(exports, proto.cc.arduino.cli.commands.v1); \ No newline at end of file +goog.object.extend(exports, proto.cc.arduino.cli.commands.v1); diff --git a/arduino-ide-extension/src/node/cli-protocol/cc/arduino/cli/commands/v1/commands_grpc_pb.d.ts b/arduino-ide-extension/src/node/cli-protocol/cc/arduino/cli/commands/v1/commands_grpc_pb.d.ts index a7b28fc65..9f34ff24f 100644 --- a/arduino-ide-extension/src/node/cli-protocol/cc/arduino/cli/commands/v1/commands_grpc_pb.d.ts +++ b/arduino-ide-extension/src/node/cli-protocol/cc/arduino/cli/commands/v1/commands_grpc_pb.d.ts @@ -12,6 +12,7 @@ import * as cc_arduino_cli_commands_v1_common_pb from "../../../../../cc/arduino import * as cc_arduino_cli_commands_v1_board_pb from "../../../../../cc/arduino/cli/commands/v1/board_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_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"; @@ -25,6 +26,7 @@ interface IArduinoCoreServiceService extends grpc.ServiceDefinition { @@ -136,6 +141,15 @@ interface IArduinoCoreServiceService_IVersion extends grpc.MethodDefinition; responseDeserialize: grpc.deserialize; } +interface IArduinoCoreServiceService_INewSketch extends grpc.MethodDefinition { + path: "/cc.arduino.cli.commands.v1.ArduinoCoreService/NewSketch"; + requestStream: false; + responseStream: false; + requestSerialize: grpc.serialize; + requestDeserialize: grpc.deserialize; + responseSerialize: grpc.serialize; + responseDeserialize: grpc.deserialize; +} interface IArduinoCoreServiceService_ILoadSketch extends grpc.MethodDefinition { path: "/cc.arduino.cli.commands.v1.ArduinoCoreService/LoadSketch"; requestStream: false; @@ -271,6 +285,15 @@ interface IArduinoCoreServiceService_IUploadUsingProgrammer extends grpc.MethodD responseSerialize: grpc.serialize; responseDeserialize: grpc.deserialize; } +interface IArduinoCoreServiceService_ISupportedUserFields extends grpc.MethodDefinition { + path: "/cc.arduino.cli.commands.v1.ArduinoCoreService/SupportedUserFields"; + requestStream: false; + responseStream: false; + requestSerialize: grpc.serialize; + requestDeserialize: grpc.deserialize; + responseSerialize: grpc.serialize; + responseDeserialize: grpc.deserialize; +} interface IArduinoCoreServiceService_IListProgrammersAvailableForUpload extends grpc.MethodDefinition { path: "/cc.arduino.cli.commands.v1.ArduinoCoreService/ListProgrammersAvailableForUpload"; requestStream: false; @@ -388,6 +411,24 @@ interface IArduinoCoreServiceService_ILibraryList extends grpc.MethodDefinition< responseSerialize: grpc.serialize; responseDeserialize: grpc.deserialize; } +interface IArduinoCoreServiceService_IMonitor extends grpc.MethodDefinition { + path: "/cc.arduino.cli.commands.v1.ArduinoCoreService/Monitor"; + requestStream: true; + responseStream: true; + requestSerialize: grpc.serialize; + requestDeserialize: grpc.deserialize; + responseSerialize: grpc.serialize; + responseDeserialize: grpc.deserialize; +} +interface IArduinoCoreServiceService_IEnumerateMonitorPortSettings extends grpc.MethodDefinition { + path: "/cc.arduino.cli.commands.v1.ArduinoCoreService/EnumerateMonitorPortSettings"; + requestStream: false; + responseStream: false; + requestSerialize: grpc.serialize; + requestDeserialize: grpc.deserialize; + responseSerialize: grpc.serialize; + responseDeserialize: grpc.deserialize; +} export const ArduinoCoreServiceService: IArduinoCoreServiceService; @@ -401,6 +442,7 @@ export interface IArduinoCoreServiceServer { outdated: grpc.handleUnaryCall; upgrade: grpc.handleServerStreamingCall; version: grpc.handleUnaryCall; + newSketch: grpc.handleUnaryCall; loadSketch: grpc.handleUnaryCall; archiveSketch: grpc.handleUnaryCall; boardDetails: grpc.handleUnaryCall; @@ -416,6 +458,7 @@ export interface IArduinoCoreServiceServer { platformUpgrade: grpc.handleServerStreamingCall; upload: grpc.handleServerStreamingCall; uploadUsingProgrammer: grpc.handleServerStreamingCall; + supportedUserFields: grpc.handleUnaryCall; listProgrammersAvailableForUpload: grpc.handleUnaryCall; burnBootloader: grpc.handleServerStreamingCall; platformSearch: grpc.handleUnaryCall; @@ -429,6 +472,8 @@ export interface IArduinoCoreServiceServer { libraryResolveDependencies: grpc.handleUnaryCall; librarySearch: grpc.handleUnaryCall; libraryList: grpc.handleUnaryCall; + monitor: grpc.handleBidiStreamingCall; + enumerateMonitorPortSettings: grpc.handleUnaryCall; } export interface IArduinoCoreServiceClient { @@ -454,6 +499,9 @@ export interface IArduinoCoreServiceClient { version(request: cc_arduino_cli_commands_v1_commands_pb.VersionRequest, callback: (error: grpc.ServiceError | null, response: cc_arduino_cli_commands_v1_commands_pb.VersionResponse) => void): grpc.ClientUnaryCall; version(request: cc_arduino_cli_commands_v1_commands_pb.VersionRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: cc_arduino_cli_commands_v1_commands_pb.VersionResponse) => void): grpc.ClientUnaryCall; version(request: cc_arduino_cli_commands_v1_commands_pb.VersionRequest, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: cc_arduino_cli_commands_v1_commands_pb.VersionResponse) => void): grpc.ClientUnaryCall; + newSketch(request: cc_arduino_cli_commands_v1_commands_pb.NewSketchRequest, callback: (error: grpc.ServiceError | null, response: cc_arduino_cli_commands_v1_commands_pb.NewSketchResponse) => void): grpc.ClientUnaryCall; + newSketch(request: cc_arduino_cli_commands_v1_commands_pb.NewSketchRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: cc_arduino_cli_commands_v1_commands_pb.NewSketchResponse) => void): grpc.ClientUnaryCall; + newSketch(request: cc_arduino_cli_commands_v1_commands_pb.NewSketchRequest, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: cc_arduino_cli_commands_v1_commands_pb.NewSketchResponse) => void): grpc.ClientUnaryCall; loadSketch(request: cc_arduino_cli_commands_v1_commands_pb.LoadSketchRequest, callback: (error: grpc.ServiceError | null, response: cc_arduino_cli_commands_v1_commands_pb.LoadSketchResponse) => void): grpc.ClientUnaryCall; loadSketch(request: cc_arduino_cli_commands_v1_commands_pb.LoadSketchRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: cc_arduino_cli_commands_v1_commands_pb.LoadSketchResponse) => void): grpc.ClientUnaryCall; loadSketch(request: cc_arduino_cli_commands_v1_commands_pb.LoadSketchRequest, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: cc_arduino_cli_commands_v1_commands_pb.LoadSketchResponse) => void): grpc.ClientUnaryCall; @@ -491,6 +539,9 @@ export interface IArduinoCoreServiceClient { upload(request: cc_arduino_cli_commands_v1_upload_pb.UploadRequest, metadata?: grpc.Metadata, options?: Partial): grpc.ClientReadableStream; uploadUsingProgrammer(request: cc_arduino_cli_commands_v1_upload_pb.UploadUsingProgrammerRequest, options?: Partial): grpc.ClientReadableStream; uploadUsingProgrammer(request: cc_arduino_cli_commands_v1_upload_pb.UploadUsingProgrammerRequest, metadata?: grpc.Metadata, options?: Partial): grpc.ClientReadableStream; + supportedUserFields(request: cc_arduino_cli_commands_v1_upload_pb.SupportedUserFieldsRequest, callback: (error: grpc.ServiceError | null, response: cc_arduino_cli_commands_v1_upload_pb.SupportedUserFieldsResponse) => void): grpc.ClientUnaryCall; + supportedUserFields(request: cc_arduino_cli_commands_v1_upload_pb.SupportedUserFieldsRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: cc_arduino_cli_commands_v1_upload_pb.SupportedUserFieldsResponse) => void): grpc.ClientUnaryCall; + supportedUserFields(request: cc_arduino_cli_commands_v1_upload_pb.SupportedUserFieldsRequest, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: cc_arduino_cli_commands_v1_upload_pb.SupportedUserFieldsResponse) => void): grpc.ClientUnaryCall; listProgrammersAvailableForUpload(request: cc_arduino_cli_commands_v1_upload_pb.ListProgrammersAvailableForUploadRequest, callback: (error: grpc.ServiceError | null, response: cc_arduino_cli_commands_v1_upload_pb.ListProgrammersAvailableForUploadResponse) => void): grpc.ClientUnaryCall; listProgrammersAvailableForUpload(request: cc_arduino_cli_commands_v1_upload_pb.ListProgrammersAvailableForUploadRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: cc_arduino_cli_commands_v1_upload_pb.ListProgrammersAvailableForUploadResponse) => void): grpc.ClientUnaryCall; listProgrammersAvailableForUpload(request: cc_arduino_cli_commands_v1_upload_pb.ListProgrammersAvailableForUploadRequest, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: cc_arduino_cli_commands_v1_upload_pb.ListProgrammersAvailableForUploadResponse) => void): grpc.ClientUnaryCall; @@ -523,6 +574,12 @@ export interface IArduinoCoreServiceClient { libraryList(request: cc_arduino_cli_commands_v1_lib_pb.LibraryListRequest, callback: (error: grpc.ServiceError | null, response: cc_arduino_cli_commands_v1_lib_pb.LibraryListResponse) => void): grpc.ClientUnaryCall; libraryList(request: cc_arduino_cli_commands_v1_lib_pb.LibraryListRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: cc_arduino_cli_commands_v1_lib_pb.LibraryListResponse) => void): grpc.ClientUnaryCall; libraryList(request: cc_arduino_cli_commands_v1_lib_pb.LibraryListRequest, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: cc_arduino_cli_commands_v1_lib_pb.LibraryListResponse) => void): grpc.ClientUnaryCall; + monitor(): grpc.ClientDuplexStream; + monitor(options: Partial): grpc.ClientDuplexStream; + monitor(metadata: grpc.Metadata, options?: Partial): grpc.ClientDuplexStream; + enumerateMonitorPortSettings(request: cc_arduino_cli_commands_v1_monitor_pb.EnumerateMonitorPortSettingsRequest, callback: (error: grpc.ServiceError | null, response: cc_arduino_cli_commands_v1_monitor_pb.EnumerateMonitorPortSettingsResponse) => void): grpc.ClientUnaryCall; + enumerateMonitorPortSettings(request: cc_arduino_cli_commands_v1_monitor_pb.EnumerateMonitorPortSettingsRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: cc_arduino_cli_commands_v1_monitor_pb.EnumerateMonitorPortSettingsResponse) => void): grpc.ClientUnaryCall; + enumerateMonitorPortSettings(request: cc_arduino_cli_commands_v1_monitor_pb.EnumerateMonitorPortSettingsRequest, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: cc_arduino_cli_commands_v1_monitor_pb.EnumerateMonitorPortSettingsResponse) => void): grpc.ClientUnaryCall; } export class ArduinoCoreServiceClient extends grpc.Client implements IArduinoCoreServiceClient { @@ -549,6 +606,9 @@ export class ArduinoCoreServiceClient extends grpc.Client implements IArduinoCor public version(request: cc_arduino_cli_commands_v1_commands_pb.VersionRequest, callback: (error: grpc.ServiceError | null, response: cc_arduino_cli_commands_v1_commands_pb.VersionResponse) => void): grpc.ClientUnaryCall; public version(request: cc_arduino_cli_commands_v1_commands_pb.VersionRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: cc_arduino_cli_commands_v1_commands_pb.VersionResponse) => void): grpc.ClientUnaryCall; public version(request: cc_arduino_cli_commands_v1_commands_pb.VersionRequest, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: cc_arduino_cli_commands_v1_commands_pb.VersionResponse) => void): grpc.ClientUnaryCall; + public newSketch(request: cc_arduino_cli_commands_v1_commands_pb.NewSketchRequest, callback: (error: grpc.ServiceError | null, response: cc_arduino_cli_commands_v1_commands_pb.NewSketchResponse) => void): grpc.ClientUnaryCall; + public newSketch(request: cc_arduino_cli_commands_v1_commands_pb.NewSketchRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: cc_arduino_cli_commands_v1_commands_pb.NewSketchResponse) => void): grpc.ClientUnaryCall; + public newSketch(request: cc_arduino_cli_commands_v1_commands_pb.NewSketchRequest, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: cc_arduino_cli_commands_v1_commands_pb.NewSketchResponse) => void): grpc.ClientUnaryCall; public loadSketch(request: cc_arduino_cli_commands_v1_commands_pb.LoadSketchRequest, callback: (error: grpc.ServiceError | null, response: cc_arduino_cli_commands_v1_commands_pb.LoadSketchResponse) => void): grpc.ClientUnaryCall; public loadSketch(request: cc_arduino_cli_commands_v1_commands_pb.LoadSketchRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: cc_arduino_cli_commands_v1_commands_pb.LoadSketchResponse) => void): grpc.ClientUnaryCall; public loadSketch(request: cc_arduino_cli_commands_v1_commands_pb.LoadSketchRequest, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: cc_arduino_cli_commands_v1_commands_pb.LoadSketchResponse) => void): grpc.ClientUnaryCall; @@ -585,6 +645,9 @@ export class ArduinoCoreServiceClient extends grpc.Client implements IArduinoCor public upload(request: cc_arduino_cli_commands_v1_upload_pb.UploadRequest, metadata?: grpc.Metadata, options?: Partial): grpc.ClientReadableStream; public uploadUsingProgrammer(request: cc_arduino_cli_commands_v1_upload_pb.UploadUsingProgrammerRequest, options?: Partial): grpc.ClientReadableStream; public uploadUsingProgrammer(request: cc_arduino_cli_commands_v1_upload_pb.UploadUsingProgrammerRequest, metadata?: grpc.Metadata, options?: Partial): grpc.ClientReadableStream; + public supportedUserFields(request: cc_arduino_cli_commands_v1_upload_pb.SupportedUserFieldsRequest, callback: (error: grpc.ServiceError | null, response: cc_arduino_cli_commands_v1_upload_pb.SupportedUserFieldsResponse) => void): grpc.ClientUnaryCall; + public supportedUserFields(request: cc_arduino_cli_commands_v1_upload_pb.SupportedUserFieldsRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: cc_arduino_cli_commands_v1_upload_pb.SupportedUserFieldsResponse) => void): grpc.ClientUnaryCall; + public supportedUserFields(request: cc_arduino_cli_commands_v1_upload_pb.SupportedUserFieldsRequest, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: cc_arduino_cli_commands_v1_upload_pb.SupportedUserFieldsResponse) => void): grpc.ClientUnaryCall; public listProgrammersAvailableForUpload(request: cc_arduino_cli_commands_v1_upload_pb.ListProgrammersAvailableForUploadRequest, callback: (error: grpc.ServiceError | null, response: cc_arduino_cli_commands_v1_upload_pb.ListProgrammersAvailableForUploadResponse) => void): grpc.ClientUnaryCall; public listProgrammersAvailableForUpload(request: cc_arduino_cli_commands_v1_upload_pb.ListProgrammersAvailableForUploadRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: cc_arduino_cli_commands_v1_upload_pb.ListProgrammersAvailableForUploadResponse) => void): grpc.ClientUnaryCall; public listProgrammersAvailableForUpload(request: cc_arduino_cli_commands_v1_upload_pb.ListProgrammersAvailableForUploadRequest, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: cc_arduino_cli_commands_v1_upload_pb.ListProgrammersAvailableForUploadResponse) => void): grpc.ClientUnaryCall; @@ -617,4 +680,9 @@ export class ArduinoCoreServiceClient extends grpc.Client implements IArduinoCor public libraryList(request: cc_arduino_cli_commands_v1_lib_pb.LibraryListRequest, callback: (error: grpc.ServiceError | null, response: cc_arduino_cli_commands_v1_lib_pb.LibraryListResponse) => void): grpc.ClientUnaryCall; public libraryList(request: cc_arduino_cli_commands_v1_lib_pb.LibraryListRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: cc_arduino_cli_commands_v1_lib_pb.LibraryListResponse) => void): grpc.ClientUnaryCall; public libraryList(request: cc_arduino_cli_commands_v1_lib_pb.LibraryListRequest, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: cc_arduino_cli_commands_v1_lib_pb.LibraryListResponse) => void): grpc.ClientUnaryCall; -} \ No newline at end of file + public monitor(options?: Partial): grpc.ClientDuplexStream; + public monitor(metadata?: grpc.Metadata, options?: Partial): grpc.ClientDuplexStream; + public enumerateMonitorPortSettings(request: cc_arduino_cli_commands_v1_monitor_pb.EnumerateMonitorPortSettingsRequest, callback: (error: grpc.ServiceError | null, response: cc_arduino_cli_commands_v1_monitor_pb.EnumerateMonitorPortSettingsResponse) => void): grpc.ClientUnaryCall; + public enumerateMonitorPortSettings(request: cc_arduino_cli_commands_v1_monitor_pb.EnumerateMonitorPortSettingsRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: cc_arduino_cli_commands_v1_monitor_pb.EnumerateMonitorPortSettingsResponse) => void): grpc.ClientUnaryCall; + public enumerateMonitorPortSettings(request: cc_arduino_cli_commands_v1_monitor_pb.EnumerateMonitorPortSettingsRequest, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: cc_arduino_cli_commands_v1_monitor_pb.EnumerateMonitorPortSettingsResponse) => void): grpc.ClientUnaryCall; +} diff --git a/arduino-ide-extension/src/node/cli-protocol/cc/arduino/cli/commands/v1/commands_grpc_pb.js b/arduino-ide-extension/src/node/cli-protocol/cc/arduino/cli/commands/v1/commands_grpc_pb.js index 33d095b2c..8358c89e2 100644 --- a/arduino-ide-extension/src/node/cli-protocol/cc/arduino/cli/commands/v1/commands_grpc_pb.js +++ b/arduino-ide-extension/src/node/cli-protocol/cc/arduino/cli/commands/v1/commands_grpc_pb.js @@ -23,6 +23,7 @@ var cc_arduino_cli_commands_v1_common_pb = require('../../../../../cc/arduino/cl var cc_arduino_cli_commands_v1_board_pb = require('../../../../../cc/arduino/cli/commands/v1/board_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_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'); @@ -268,6 +269,28 @@ function deserialize_cc_arduino_cli_commands_v1_DestroyResponse(buffer_arg) { return cc_arduino_cli_commands_v1_commands_pb.DestroyResponse.deserializeBinary(new Uint8Array(buffer_arg)); } +function serialize_cc_arduino_cli_commands_v1_EnumerateMonitorPortSettingsRequest(arg) { + if (!(arg instanceof cc_arduino_cli_commands_v1_monitor_pb.EnumerateMonitorPortSettingsRequest)) { + throw new Error('Expected argument of type cc.arduino.cli.commands.v1.EnumerateMonitorPortSettingsRequest'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_cc_arduino_cli_commands_v1_EnumerateMonitorPortSettingsRequest(buffer_arg) { + return cc_arduino_cli_commands_v1_monitor_pb.EnumerateMonitorPortSettingsRequest.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_cc_arduino_cli_commands_v1_EnumerateMonitorPortSettingsResponse(arg) { + if (!(arg instanceof cc_arduino_cli_commands_v1_monitor_pb.EnumerateMonitorPortSettingsResponse)) { + throw new Error('Expected argument of type cc.arduino.cli.commands.v1.EnumerateMonitorPortSettingsResponse'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_cc_arduino_cli_commands_v1_EnumerateMonitorPortSettingsResponse(buffer_arg) { + return cc_arduino_cli_commands_v1_monitor_pb.EnumerateMonitorPortSettingsResponse.deserializeBinary(new Uint8Array(buffer_arg)); +} + function serialize_cc_arduino_cli_commands_v1_GitLibraryInstallRequest(arg) { if (!(arg instanceof cc_arduino_cli_commands_v1_lib_pb.GitLibraryInstallRequest)) { throw new Error('Expected argument of type cc.arduino.cli.commands.v1.GitLibraryInstallRequest'); @@ -510,6 +533,50 @@ function deserialize_cc_arduino_cli_commands_v1_LoadSketchResponse(buffer_arg) { return cc_arduino_cli_commands_v1_commands_pb.LoadSketchResponse.deserializeBinary(new Uint8Array(buffer_arg)); } +function serialize_cc_arduino_cli_commands_v1_MonitorRequest(arg) { + if (!(arg instanceof cc_arduino_cli_commands_v1_monitor_pb.MonitorRequest)) { + throw new Error('Expected argument of type cc.arduino.cli.commands.v1.MonitorRequest'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_cc_arduino_cli_commands_v1_MonitorRequest(buffer_arg) { + return cc_arduino_cli_commands_v1_monitor_pb.MonitorRequest.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_cc_arduino_cli_commands_v1_MonitorResponse(arg) { + if (!(arg instanceof cc_arduino_cli_commands_v1_monitor_pb.MonitorResponse)) { + throw new Error('Expected argument of type cc.arduino.cli.commands.v1.MonitorResponse'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_cc_arduino_cli_commands_v1_MonitorResponse(buffer_arg) { + return cc_arduino_cli_commands_v1_monitor_pb.MonitorResponse.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_cc_arduino_cli_commands_v1_NewSketchRequest(arg) { + if (!(arg instanceof cc_arduino_cli_commands_v1_commands_pb.NewSketchRequest)) { + throw new Error('Expected argument of type cc.arduino.cli.commands.v1.NewSketchRequest'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_cc_arduino_cli_commands_v1_NewSketchRequest(buffer_arg) { + return cc_arduino_cli_commands_v1_commands_pb.NewSketchRequest.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_cc_arduino_cli_commands_v1_NewSketchResponse(arg) { + if (!(arg instanceof cc_arduino_cli_commands_v1_commands_pb.NewSketchResponse)) { + throw new Error('Expected argument of type cc.arduino.cli.commands.v1.NewSketchResponse'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_cc_arduino_cli_commands_v1_NewSketchResponse(buffer_arg) { + return cc_arduino_cli_commands_v1_commands_pb.NewSketchResponse.deserializeBinary(new Uint8Array(buffer_arg)); +} + function serialize_cc_arduino_cli_commands_v1_OutdatedRequest(arg) { if (!(arg instanceof cc_arduino_cli_commands_v1_commands_pb.OutdatedRequest)) { throw new Error('Expected argument of type cc.arduino.cli.commands.v1.OutdatedRequest'); @@ -664,6 +731,28 @@ function deserialize_cc_arduino_cli_commands_v1_PlatformUpgradeResponse(buffer_a return cc_arduino_cli_commands_v1_core_pb.PlatformUpgradeResponse.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'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_cc_arduino_cli_commands_v1_SupportedUserFieldsRequest(buffer_arg) { + return cc_arduino_cli_commands_v1_upload_pb.SupportedUserFieldsRequest.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_cc_arduino_cli_commands_v1_SupportedUserFieldsResponse(arg) { + if (!(arg instanceof cc_arduino_cli_commands_v1_upload_pb.SupportedUserFieldsResponse)) { + throw new Error('Expected argument of type cc.arduino.cli.commands.v1.SupportedUserFieldsResponse'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_cc_arduino_cli_commands_v1_SupportedUserFieldsResponse(buffer_arg) { + return cc_arduino_cli_commands_v1_upload_pb.SupportedUserFieldsResponse.deserializeBinary(new Uint8Array(buffer_arg)); +} + function serialize_cc_arduino_cli_commands_v1_UpdateCoreLibrariesIndexRequest(arg) { if (!(arg instanceof cc_arduino_cli_commands_v1_commands_pb.UpdateCoreLibrariesIndexRequest)) { throw new Error('Expected argument of type cc.arduino.cli.commands.v1.UpdateCoreLibrariesIndexRequest'); @@ -952,6 +1041,18 @@ version: { responseSerialize: serialize_cc_arduino_cli_commands_v1_VersionResponse, responseDeserialize: deserialize_cc_arduino_cli_commands_v1_VersionResponse, }, + // Create a new Sketch +newSketch: { + path: '/cc.arduino.cli.commands.v1.ArduinoCoreService/NewSketch', + requestStream: false, + responseStream: false, + requestType: cc_arduino_cli_commands_v1_commands_pb.NewSketchRequest, + responseType: cc_arduino_cli_commands_v1_commands_pb.NewSketchResponse, + requestSerialize: serialize_cc_arduino_cli_commands_v1_NewSketchRequest, + requestDeserialize: deserialize_cc_arduino_cli_commands_v1_NewSketchRequest, + responseSerialize: serialize_cc_arduino_cli_commands_v1_NewSketchResponse, + responseDeserialize: deserialize_cc_arduino_cli_commands_v1_NewSketchResponse, + }, // Returns all files composing a Sketch loadSketch: { path: '/cc.arduino.cli.commands.v1.ArduinoCoreService/LoadSketch', @@ -1138,6 +1239,19 @@ uploadUsingProgrammer: { responseSerialize: serialize_cc_arduino_cli_commands_v1_UploadUsingProgrammerResponse, responseDeserialize: deserialize_cc_arduino_cli_commands_v1_UploadUsingProgrammerResponse, }, + // Returns the list of users fields necessary to upload to that board +// using the specified protocol. +supportedUserFields: { + path: '/cc.arduino.cli.commands.v1.ArduinoCoreService/SupportedUserFields', + requestStream: false, + responseStream: false, + requestType: cc_arduino_cli_commands_v1_upload_pb.SupportedUserFieldsRequest, + responseType: cc_arduino_cli_commands_v1_upload_pb.SupportedUserFieldsResponse, + requestSerialize: serialize_cc_arduino_cli_commands_v1_SupportedUserFieldsRequest, + requestDeserialize: deserialize_cc_arduino_cli_commands_v1_SupportedUserFieldsRequest, + responseSerialize: serialize_cc_arduino_cli_commands_v1_SupportedUserFieldsResponse, + responseDeserialize: deserialize_cc_arduino_cli_commands_v1_SupportedUserFieldsResponse, + }, // List programmers available for a board. listProgrammersAvailableForUpload: { path: '/cc.arduino.cli.commands.v1.ArduinoCoreService/ListProgrammersAvailableForUpload', @@ -1296,7 +1410,31 @@ 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 +monitor: { + path: '/cc.arduino.cli.commands.v1.ArduinoCoreService/Monitor', + requestStream: true, + responseStream: true, + requestType: cc_arduino_cli_commands_v1_monitor_pb.MonitorRequest, + responseType: cc_arduino_cli_commands_v1_monitor_pb.MonitorResponse, + requestSerialize: serialize_cc_arduino_cli_commands_v1_MonitorRequest, + requestDeserialize: deserialize_cc_arduino_cli_commands_v1_MonitorRequest, + 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 +enumerateMonitorPortSettings: { + path: '/cc.arduino.cli.commands.v1.ArduinoCoreService/EnumerateMonitorPortSettings', + requestStream: false, + responseStream: false, + requestType: cc_arduino_cli_commands_v1_monitor_pb.EnumerateMonitorPortSettingsRequest, + responseType: cc_arduino_cli_commands_v1_monitor_pb.EnumerateMonitorPortSettingsResponse, + requestSerialize: serialize_cc_arduino_cli_commands_v1_EnumerateMonitorPortSettingsRequest, + requestDeserialize: deserialize_cc_arduino_cli_commands_v1_EnumerateMonitorPortSettingsRequest, + responseSerialize: serialize_cc_arduino_cli_commands_v1_EnumerateMonitorPortSettingsResponse, + responseDeserialize: deserialize_cc_arduino_cli_commands_v1_EnumerateMonitorPortSettingsResponse, + }, }; // BOOTSTRAP COMMANDS -// ------------------- \ No newline at end of file +// ------------------- diff --git a/arduino-ide-extension/src/node/cli-protocol/cc/arduino/cli/commands/v1/commands_pb.d.ts b/arduino-ide-extension/src/node/cli-protocol/cc/arduino/cli/commands/v1/commands_pb.d.ts index f04366943..94ceab14f 100644 --- a/arduino-ide-extension/src/node/cli-protocol/cc/arduino/cli/commands/v1/commands_pb.d.ts +++ b/arduino-ide-extension/src/node/cli-protocol/cc/arduino/cli/commands/v1/commands_pb.d.ts @@ -10,6 +10,7 @@ import * as cc_arduino_cli_commands_v1_common_pb from "../../../../../cc/arduino import * as cc_arduino_cli_commands_v1_board_pb from "../../../../../cc/arduino/cli/commands/v1/board_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_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"; @@ -489,6 +490,59 @@ export namespace VersionResponse { } } +export class NewSketchRequest 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): NewSketchRequest; + + getSketchName(): string; + setSketchName(value: string): NewSketchRequest; + + getSketchDir(): string; + setSketchDir(value: string): NewSketchRequest; + + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): NewSketchRequest.AsObject; + static toObject(includeInstance: boolean, msg: NewSketchRequest): NewSketchRequest.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: NewSketchRequest, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): NewSketchRequest; + static deserializeBinaryFromReader(message: NewSketchRequest, reader: jspb.BinaryReader): NewSketchRequest; +} + +export namespace NewSketchRequest { + export type AsObject = { + instance?: cc_arduino_cli_commands_v1_common_pb.Instance.AsObject, + sketchName: string, + sketchDir: string, + } +} + +export class NewSketchResponse extends jspb.Message { + getMainFile(): string; + setMainFile(value: string): NewSketchResponse; + + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): NewSketchResponse.AsObject; + static toObject(includeInstance: boolean, msg: NewSketchResponse): NewSketchResponse.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: NewSketchResponse, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): NewSketchResponse; + static deserializeBinaryFromReader(message: NewSketchResponse, reader: jspb.BinaryReader): NewSketchResponse; +} + +export namespace NewSketchResponse { + export type AsObject = { + mainFile: string, + } +} + export class LoadSketchRequest extends jspb.Message { hasInstance(): boolean; @@ -604,4 +658,4 @@ export class ArchiveSketchResponse extends jspb.Message { export namespace ArchiveSketchResponse { export type AsObject = { } -} \ No newline at end of file +} diff --git a/arduino-ide-extension/src/node/cli-protocol/cc/arduino/cli/commands/v1/commands_pb.js b/arduino-ide-extension/src/node/cli-protocol/cc/arduino/cli/commands/v1/commands_pb.js index 627897fda..1937aa229 100644 --- a/arduino-ide-extension/src/node/cli-protocol/cc/arduino/cli/commands/v1/commands_pb.js +++ b/arduino-ide-extension/src/node/cli-protocol/cc/arduino/cli/commands/v1/commands_pb.js @@ -25,6 +25,8 @@ var cc_arduino_cli_commands_v1_compile_pb = require('../../../../../cc/arduino/c goog.object.extend(proto, cc_arduino_cli_commands_v1_compile_pb); var cc_arduino_cli_commands_v1_core_pb = require('../../../../../cc/arduino/cli/commands/v1/core_pb.js'); goog.object.extend(proto, cc_arduino_cli_commands_v1_core_pb); +var cc_arduino_cli_commands_v1_monitor_pb = require('../../../../../cc/arduino/cli/commands/v1/monitor_pb.js'); +goog.object.extend(proto, cc_arduino_cli_commands_v1_monitor_pb); var cc_arduino_cli_commands_v1_upload_pb = require('../../../../../cc/arduino/cli/commands/v1/upload_pb.js'); goog.object.extend(proto, cc_arduino_cli_commands_v1_upload_pb); var cc_arduino_cli_commands_v1_lib_pb = require('../../../../../cc/arduino/cli/commands/v1/lib_pb.js'); @@ -41,6 +43,8 @@ goog.exportSymbol('proto.cc.arduino.cli.commands.v1.InitResponse.MessageCase', n goog.exportSymbol('proto.cc.arduino.cli.commands.v1.InitResponse.Progress', null, global); goog.exportSymbol('proto.cc.arduino.cli.commands.v1.LoadSketchRequest', null, global); goog.exportSymbol('proto.cc.arduino.cli.commands.v1.LoadSketchResponse', null, global); +goog.exportSymbol('proto.cc.arduino.cli.commands.v1.NewSketchRequest', null, global); +goog.exportSymbol('proto.cc.arduino.cli.commands.v1.NewSketchResponse', null, global); goog.exportSymbol('proto.cc.arduino.cli.commands.v1.OutdatedRequest', null, global); goog.exportSymbol('proto.cc.arduino.cli.commands.v1.OutdatedResponse', null, global); goog.exportSymbol('proto.cc.arduino.cli.commands.v1.UpdateCoreLibrariesIndexRequest', null, global); @@ -452,6 +456,48 @@ if (goog.DEBUG && !COMPILED) { */ proto.cc.arduino.cli.commands.v1.VersionResponse.displayName = 'proto.cc.arduino.cli.commands.v1.VersionResponse'; } +/** + * 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.NewSketchRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cc.arduino.cli.commands.v1.NewSketchRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cc.arduino.cli.commands.v1.NewSketchRequest.displayName = 'proto.cc.arduino.cli.commands.v1.NewSketchRequest'; +} +/** + * 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.NewSketchResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cc.arduino.cli.commands.v1.NewSketchResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cc.arduino.cli.commands.v1.NewSketchResponse.displayName = 'proto.cc.arduino.cli.commands.v1.NewSketchResponse'; +} /** * Generated by JsPbCodeGenerator. * @param {Array=} opt_data Optional initial data array, typically from a @@ -3508,6 +3554,347 @@ proto.cc.arduino.cli.commands.v1.VersionResponse.prototype.setVersion = 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_, 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.NewSketchRequest.prototype.toObject = function(opt_includeInstance) { + return proto.cc.arduino.cli.commands.v1.NewSketchRequest.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.NewSketchRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cc.arduino.cli.commands.v1.NewSketchRequest.toObject = function(includeInstance, msg) { + var f, obj = { + instance: (f = msg.getInstance()) && cc_arduino_cli_commands_v1_common_pb.Instance.toObject(includeInstance, f), + sketchName: jspb.Message.getFieldWithDefault(msg, 2, ""), + sketchDir: jspb.Message.getFieldWithDefault(msg, 3, "") + }; + + 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.NewSketchRequest} + */ +proto.cc.arduino.cli.commands.v1.NewSketchRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cc.arduino.cli.commands.v1.NewSketchRequest; + return proto.cc.arduino.cli.commands.v1.NewSketchRequest.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.NewSketchRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cc.arduino.cli.commands.v1.NewSketchRequest} + */ +proto.cc.arduino.cli.commands.v1.NewSketchRequest.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new cc_arduino_cli_commands_v1_common_pb.Instance; + reader.readMessage(value,cc_arduino_cli_commands_v1_common_pb.Instance.deserializeBinaryFromReader); + msg.setInstance(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setSketchName(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.setSketchDir(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.NewSketchRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cc.arduino.cli.commands.v1.NewSketchRequest.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.NewSketchRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cc.arduino.cli.commands.v1.NewSketchRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getInstance(); + if (f != null) { + writer.writeMessage( + 1, + f, + cc_arduino_cli_commands_v1_common_pb.Instance.serializeBinaryToWriter + ); + } + f = message.getSketchName(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getSketchDir(); + if (f.length > 0) { + writer.writeString( + 3, + f + ); + } +}; + + +/** + * optional Instance instance = 1; + * @return {?proto.cc.arduino.cli.commands.v1.Instance} + */ +proto.cc.arduino.cli.commands.v1.NewSketchRequest.prototype.getInstance = function() { + return /** @type{?proto.cc.arduino.cli.commands.v1.Instance} */ ( + jspb.Message.getWrapperField(this, cc_arduino_cli_commands_v1_common_pb.Instance, 1)); +}; + + +/** + * @param {?proto.cc.arduino.cli.commands.v1.Instance|undefined} value + * @return {!proto.cc.arduino.cli.commands.v1.NewSketchRequest} returns this +*/ +proto.cc.arduino.cli.commands.v1.NewSketchRequest.prototype.setInstance = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cc.arduino.cli.commands.v1.NewSketchRequest} returns this + */ +proto.cc.arduino.cli.commands.v1.NewSketchRequest.prototype.clearInstance = function() { + return this.setInstance(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cc.arduino.cli.commands.v1.NewSketchRequest.prototype.hasInstance = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional string sketch_name = 2; + * @return {string} + */ +proto.cc.arduino.cli.commands.v1.NewSketchRequest.prototype.getSketchName = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cc.arduino.cli.commands.v1.NewSketchRequest} returns this + */ +proto.cc.arduino.cli.commands.v1.NewSketchRequest.prototype.setSketchName = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional string sketch_dir = 3; + * @return {string} + */ +proto.cc.arduino.cli.commands.v1.NewSketchRequest.prototype.getSketchDir = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cc.arduino.cli.commands.v1.NewSketchRequest} returns this + */ +proto.cc.arduino.cli.commands.v1.NewSketchRequest.prototype.setSketchDir = function(value) { + return jspb.Message.setProto3StringField(this, 3, 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_, 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.NewSketchResponse.prototype.toObject = function(opt_includeInstance) { + return proto.cc.arduino.cli.commands.v1.NewSketchResponse.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.NewSketchResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cc.arduino.cli.commands.v1.NewSketchResponse.toObject = function(includeInstance, msg) { + var f, obj = { + mainFile: 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.NewSketchResponse} + */ +proto.cc.arduino.cli.commands.v1.NewSketchResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cc.arduino.cli.commands.v1.NewSketchResponse; + return proto.cc.arduino.cli.commands.v1.NewSketchResponse.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.NewSketchResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cc.arduino.cli.commands.v1.NewSketchResponse} + */ +proto.cc.arduino.cli.commands.v1.NewSketchResponse.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.setMainFile(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.NewSketchResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cc.arduino.cli.commands.v1.NewSketchResponse.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.NewSketchResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cc.arduino.cli.commands.v1.NewSketchResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getMainFile(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } +}; + + +/** + * optional string main_file = 1; + * @return {string} + */ +proto.cc.arduino.cli.commands.v1.NewSketchResponse.prototype.getMainFile = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cc.arduino.cli.commands.v1.NewSketchResponse} returns this + */ +proto.cc.arduino.cli.commands.v1.NewSketchResponse.prototype.setMainFile = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + + + + if (jspb.Message.GENERATE_TO_OBJECT) { /** * Creates an object representation of this proto. @@ -4291,4 +4678,4 @@ proto.cc.arduino.cli.commands.v1.ArchiveSketchResponse.serializeBinaryToWriter = }; -goog.object.extend(exports, proto.cc.arduino.cli.commands.v1); \ No newline at end of file +goog.object.extend(exports, proto.cc.arduino.cli.commands.v1); diff --git a/arduino-ide-extension/src/node/cli-protocol/cc/arduino/cli/commands/v1/core_pb.d.ts b/arduino-ide-extension/src/node/cli-protocol/cc/arduino/cli/commands/v1/core_pb.d.ts index 77c274051..cec05ce33 100644 --- a/arduino-ide-extension/src/node/cli-protocol/cc/arduino/cli/commands/v1/core_pb.d.ts +++ b/arduino-ide-extension/src/node/cli-protocol/cc/arduino/cli/commands/v1/core_pb.d.ts @@ -386,4 +386,4 @@ export namespace PlatformListResponse { export type AsObject = { installedPlatformsList: Array, } -} \ No newline at end of file +} diff --git a/arduino-ide-extension/src/node/cli-protocol/cc/arduino/cli/commands/v1/core_pb.js b/arduino-ide-extension/src/node/cli-protocol/cc/arduino/cli/commands/v1/core_pb.js index b783b0521..6db0ad1b4 100644 --- a/arduino-ide-extension/src/node/cli-protocol/cc/arduino/cli/commands/v1/core_pb.js +++ b/arduino-ide-extension/src/node/cli-protocol/cc/arduino/cli/commands/v1/core_pb.js @@ -2816,4 +2816,4 @@ proto.cc.arduino.cli.commands.v1.PlatformListResponse.prototype.clearInstalledPl }; -goog.object.extend(exports, proto.cc.arduino.cli.commands.v1); \ No newline at end of file +goog.object.extend(exports, proto.cc.arduino.cli.commands.v1); diff --git a/arduino-ide-extension/src/node/cli-protocol/cc/arduino/cli/commands/v1/monitor_grpc_pb.js b/arduino-ide-extension/src/node/cli-protocol/cc/arduino/cli/commands/v1/monitor_grpc_pb.js new file mode 100644 index 000000000..97b3a2461 --- /dev/null +++ b/arduino-ide-extension/src/node/cli-protocol/cc/arduino/cli/commands/v1/monitor_grpc_pb.js @@ -0,0 +1 @@ +// GENERATED CODE -- NO SERVICES IN PROTO \ No newline at end of file diff --git a/arduino-ide-extension/src/node/cli-protocol/cc/arduino/cli/commands/v1/monitor_pb.d.ts b/arduino-ide-extension/src/node/cli-protocol/cc/arduino/cli/commands/v1/monitor_pb.d.ts new file mode 100644 index 000000000..f19526ab3 --- /dev/null +++ b/arduino-ide-extension/src/node/cli-protocol/cc/arduino/cli/commands/v1/monitor_pb.d.ts @@ -0,0 +1,232 @@ +// package: cc.arduino.cli.commands.v1 +// file: cc/arduino/cli/commands/v1/monitor.proto + +/* tslint:disable */ +/* eslint-disable */ + +import * as jspb from "google-protobuf"; +import * as cc_arduino_cli_commands_v1_common_pb from "../../../../../cc/arduino/cli/commands/v1/common_pb"; +import * as cc_arduino_cli_commands_v1_port_pb from "../../../../../cc/arduino/cli/commands/v1/port_pb"; + +export class MonitorRequest extends jspb.Message { + + hasInstance(): boolean; + clearInstance(): void; + getInstance(): cc_arduino_cli_commands_v1_common_pb.Instance | undefined; + setInstance(value?: cc_arduino_cli_commands_v1_common_pb.Instance): MonitorRequest; + + + hasPort(): boolean; + clearPort(): void; + getPort(): cc_arduino_cli_commands_v1_port_pb.Port | undefined; + setPort(value?: cc_arduino_cli_commands_v1_port_pb.Port): MonitorRequest; + + getFqbn(): string; + setFqbn(value: string): MonitorRequest; + + getTxData(): Uint8Array | string; + getTxData_asU8(): Uint8Array; + getTxData_asB64(): string; + setTxData(value: Uint8Array | string): MonitorRequest; + + + hasPortConfiguration(): boolean; + clearPortConfiguration(): void; + getPortConfiguration(): MonitorPortConfiguration | undefined; + setPortConfiguration(value?: MonitorPortConfiguration): MonitorRequest; + + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): MonitorRequest.AsObject; + static toObject(includeInstance: boolean, msg: MonitorRequest): MonitorRequest.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: MonitorRequest, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): MonitorRequest; + static deserializeBinaryFromReader(message: MonitorRequest, reader: jspb.BinaryReader): MonitorRequest; +} + +export namespace MonitorRequest { + export type AsObject = { + instance?: cc_arduino_cli_commands_v1_common_pb.Instance.AsObject, + port?: cc_arduino_cli_commands_v1_port_pb.Port.AsObject, + fqbn: string, + txData: Uint8Array | string, + portConfiguration?: MonitorPortConfiguration.AsObject, + } +} + +export class MonitorPortConfiguration extends jspb.Message { + clearSettingsList(): void; + getSettingsList(): Array; + setSettingsList(value: Array): 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}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + 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, + } +} + +export class MonitorResponse extends jspb.Message { + getError(): string; + setError(value: string): MonitorResponse; + + getRxData(): Uint8Array | string; + getRxData_asU8(): Uint8Array; + getRxData_asB64(): string; + setRxData(value: Uint8Array | string): MonitorResponse; + + clearAppliedSettingsList(): void; + getAppliedSettingsList(): Array; + setAppliedSettingsList(value: Array): MonitorResponse; + addAppliedSettings(value?: MonitorPortSetting, index?: number): MonitorPortSetting; + + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): MonitorResponse.AsObject; + static toObject(includeInstance: boolean, msg: MonitorResponse): MonitorResponse.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: MonitorResponse, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): MonitorResponse; + static deserializeBinaryFromReader(message: MonitorResponse, reader: jspb.BinaryReader): MonitorResponse; +} + +export namespace MonitorResponse { + export type AsObject = { + error: string, + rxData: Uint8Array | string, + appliedSettingsList: Array, + } +} + +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}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: MonitorPortSetting, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): MonitorPortSetting; + static deserializeBinaryFromReader(message: MonitorPortSetting, reader: jspb.BinaryReader): MonitorPortSetting; +} + +export namespace MonitorPortSetting { + export type AsObject = { + settingId: string, + value: string, + } +} + +export class EnumerateMonitorPortSettingsRequest 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): EnumerateMonitorPortSettingsRequest; + + getPortProtocol(): string; + setPortProtocol(value: string): EnumerateMonitorPortSettingsRequest; + + getFqbn(): string; + setFqbn(value: string): EnumerateMonitorPortSettingsRequest; + + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): EnumerateMonitorPortSettingsRequest.AsObject; + static toObject(includeInstance: boolean, msg: EnumerateMonitorPortSettingsRequest): EnumerateMonitorPortSettingsRequest.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: EnumerateMonitorPortSettingsRequest, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): EnumerateMonitorPortSettingsRequest; + static deserializeBinaryFromReader(message: EnumerateMonitorPortSettingsRequest, reader: jspb.BinaryReader): EnumerateMonitorPortSettingsRequest; +} + +export namespace EnumerateMonitorPortSettingsRequest { + export type AsObject = { + instance?: cc_arduino_cli_commands_v1_common_pb.Instance.AsObject, + portProtocol: string, + fqbn: string, + } +} + +export class EnumerateMonitorPortSettingsResponse extends jspb.Message { + clearSettingsList(): void; + getSettingsList(): Array; + setSettingsList(value: Array): EnumerateMonitorPortSettingsResponse; + addSettings(value?: MonitorPortSettingDescriptor, index?: number): MonitorPortSettingDescriptor; + + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): EnumerateMonitorPortSettingsResponse.AsObject; + static toObject(includeInstance: boolean, msg: EnumerateMonitorPortSettingsResponse): EnumerateMonitorPortSettingsResponse.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: EnumerateMonitorPortSettingsResponse, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): EnumerateMonitorPortSettingsResponse; + static deserializeBinaryFromReader(message: EnumerateMonitorPortSettingsResponse, reader: jspb.BinaryReader): EnumerateMonitorPortSettingsResponse; +} + +export namespace EnumerateMonitorPortSettingsResponse { + export type AsObject = { + settingsList: Array, + } +} + +export class MonitorPortSettingDescriptor extends jspb.Message { + getSettingId(): string; + setSettingId(value: string): MonitorPortSettingDescriptor; + + getLabel(): string; + setLabel(value: string): MonitorPortSettingDescriptor; + + getType(): string; + setType(value: string): MonitorPortSettingDescriptor; + + clearEnumValuesList(): void; + getEnumValuesList(): Array; + setEnumValuesList(value: Array): MonitorPortSettingDescriptor; + addEnumValues(value: string, index?: number): string; + + getValue(): string; + setValue(value: string): MonitorPortSettingDescriptor; + + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): MonitorPortSettingDescriptor.AsObject; + static toObject(includeInstance: boolean, msg: MonitorPortSettingDescriptor): MonitorPortSettingDescriptor.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: MonitorPortSettingDescriptor, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): MonitorPortSettingDescriptor; + static deserializeBinaryFromReader(message: MonitorPortSettingDescriptor, reader: jspb.BinaryReader): MonitorPortSettingDescriptor; +} + +export namespace MonitorPortSettingDescriptor { + export type AsObject = { + settingId: string, + label: string, + type: string, + enumValuesList: Array, + value: string, + } +} diff --git a/arduino-ide-extension/src/node/cli-protocol/cc/arduino/cli/commands/v1/monitor_pb.js b/arduino-ide-extension/src/node/cli-protocol/cc/arduino/cli/commands/v1/monitor_pb.js new file mode 100644 index 000000000..8583f3388 --- /dev/null +++ b/arduino-ide-extension/src/node/cli-protocol/cc/arduino/cli/commands/v1/monitor_pb.js @@ -0,0 +1,1724 @@ +// source: cc/arduino/cli/commands/v1/monitor.proto +/** + * @fileoverview + * @enhanceable + * @suppress {missingRequire} reports error on implicit type usages. + * @suppress {messageConventions} JS Compiler reports an error if a variable or + * field starts with 'MSG_' and isn't a translatable message. + * @public + */ +// GENERATED CODE -- DO NOT EDIT! +/* eslint-disable */ +// @ts-nocheck + +var jspb = require('google-protobuf'); +var goog = jspb; +var global = Function('return this')(); + +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_port_pb = require('../../../../../cc/arduino/cli/commands/v1/port_pb.js'); +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.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.MonitorResponse', null, global); +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.cc.arduino.cli.commands.v1.MonitorRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cc.arduino.cli.commands.v1.MonitorRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cc.arduino.cli.commands.v1.MonitorRequest.displayName = 'proto.cc.arduino.cli.commands.v1.MonitorRequest'; +} +/** + * 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.MonitorResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.cc.arduino.cli.commands.v1.MonitorResponse.repeatedFields_, null); +}; +goog.inherits(proto.cc.arduino.cli.commands.v1.MonitorResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + 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 + * 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.EnumerateMonitorPortSettingsRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cc.arduino.cli.commands.v1.EnumerateMonitorPortSettingsRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cc.arduino.cli.commands.v1.EnumerateMonitorPortSettingsRequest.displayName = 'proto.cc.arduino.cli.commands.v1.EnumerateMonitorPortSettingsRequest'; +} +/** + * 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.EnumerateMonitorPortSettingsResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.cc.arduino.cli.commands.v1.EnumerateMonitorPortSettingsResponse.repeatedFields_, null); +}; +goog.inherits(proto.cc.arduino.cli.commands.v1.EnumerateMonitorPortSettingsResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cc.arduino.cli.commands.v1.EnumerateMonitorPortSettingsResponse.displayName = 'proto.cc.arduino.cli.commands.v1.EnumerateMonitorPortSettingsResponse'; +} +/** + * 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.MonitorPortSettingDescriptor = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.cc.arduino.cli.commands.v1.MonitorPortSettingDescriptor.repeatedFields_, null); +}; +goog.inherits(proto.cc.arduino.cli.commands.v1.MonitorPortSettingDescriptor, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cc.arduino.cli.commands.v1.MonitorPortSettingDescriptor.displayName = 'proto.cc.arduino.cli.commands.v1.MonitorPortSettingDescriptor'; +} + + + +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_, 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.MonitorRequest.prototype.toObject = function(opt_includeInstance) { + return proto.cc.arduino.cli.commands.v1.MonitorRequest.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.MonitorRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cc.arduino.cli.commands.v1.MonitorRequest.toObject = function(includeInstance, msg) { + var f, obj = { + 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, ""), + txData: msg.getTxData_asB64(), + portConfiguration: (f = msg.getPortConfiguration()) && proto.cc.arduino.cli.commands.v1.MonitorPortConfiguration.toObject(includeInstance, f) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.cc.arduino.cli.commands.v1.MonitorRequest} + */ +proto.cc.arduino.cli.commands.v1.MonitorRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cc.arduino.cli.commands.v1.MonitorRequest; + return proto.cc.arduino.cli.commands.v1.MonitorRequest.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.MonitorRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cc.arduino.cli.commands.v1.MonitorRequest} + */ +proto.cc.arduino.cli.commands.v1.MonitorRequest.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new cc_arduino_cli_commands_v1_common_pb.Instance; + reader.readMessage(value,cc_arduino_cli_commands_v1_common_pb.Instance.deserializeBinaryFromReader); + msg.setInstance(value); + break; + case 2: + var value = new cc_arduino_cli_commands_v1_port_pb.Port; + reader.readMessage(value,cc_arduino_cli_commands_v1_port_pb.Port.deserializeBinaryFromReader); + msg.setPort(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.setFqbn(value); + break; + case 4: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setTxData(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.setPortConfiguration(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.MonitorRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cc.arduino.cli.commands.v1.MonitorRequest.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.MonitorRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cc.arduino.cli.commands.v1.MonitorRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getInstance(); + if (f != null) { + writer.writeMessage( + 1, + f, + cc_arduino_cli_commands_v1_common_pb.Instance.serializeBinaryToWriter + ); + } + f = message.getPort(); + if (f != null) { + writer.writeMessage( + 2, + f, + cc_arduino_cli_commands_v1_port_pb.Port.serializeBinaryToWriter + ); + } + f = message.getFqbn(); + if (f.length > 0) { + writer.writeString( + 3, + f + ); + } + f = message.getTxData_asU8(); + if (f.length > 0) { + writer.writeBytes( + 4, + f + ); + } + f = message.getPortConfiguration(); + if (f != null) { + writer.writeMessage( + 5, + f, + proto.cc.arduino.cli.commands.v1.MonitorPortConfiguration.serializeBinaryToWriter + ); + } +}; + + +/** + * optional Instance instance = 1; + * @return {?proto.cc.arduino.cli.commands.v1.Instance} + */ +proto.cc.arduino.cli.commands.v1.MonitorRequest.prototype.getInstance = function() { + return /** @type{?proto.cc.arduino.cli.commands.v1.Instance} */ ( + jspb.Message.getWrapperField(this, cc_arduino_cli_commands_v1_common_pb.Instance, 1)); +}; + + +/** + * @param {?proto.cc.arduino.cli.commands.v1.Instance|undefined} value + * @return {!proto.cc.arduino.cli.commands.v1.MonitorRequest} returns this +*/ +proto.cc.arduino.cli.commands.v1.MonitorRequest.prototype.setInstance = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cc.arduino.cli.commands.v1.MonitorRequest} returns this + */ +proto.cc.arduino.cli.commands.v1.MonitorRequest.prototype.clearInstance = function() { + return this.setInstance(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cc.arduino.cli.commands.v1.MonitorRequest.prototype.hasInstance = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional Port port = 2; + * @return {?proto.cc.arduino.cli.commands.v1.Port} + */ +proto.cc.arduino.cli.commands.v1.MonitorRequest.prototype.getPort = function() { + return /** @type{?proto.cc.arduino.cli.commands.v1.Port} */ ( + jspb.Message.getWrapperField(this, cc_arduino_cli_commands_v1_port_pb.Port, 2)); +}; + + +/** + * @param {?proto.cc.arduino.cli.commands.v1.Port|undefined} value + * @return {!proto.cc.arduino.cli.commands.v1.MonitorRequest} returns this +*/ +proto.cc.arduino.cli.commands.v1.MonitorRequest.prototype.setPort = function(value) { + return jspb.Message.setWrapperField(this, 2, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cc.arduino.cli.commands.v1.MonitorRequest} returns this + */ +proto.cc.arduino.cli.commands.v1.MonitorRequest.prototype.clearPort = function() { + return this.setPort(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cc.arduino.cli.commands.v1.MonitorRequest.prototype.hasPort = function() { + return jspb.Message.getField(this, 2) != null; +}; + + +/** + * optional string fqbn = 3; + * @return {string} + */ +proto.cc.arduino.cli.commands.v1.MonitorRequest.prototype.getFqbn = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cc.arduino.cli.commands.v1.MonitorRequest} returns this + */ +proto.cc.arduino.cli.commands.v1.MonitorRequest.prototype.setFqbn = function(value) { + return jspb.Message.setProto3StringField(this, 3, value); +}; + + +/** + * optional bytes tx_data = 4; + * @return {!(string|Uint8Array)} + */ +proto.cc.arduino.cli.commands.v1.MonitorRequest.prototype.getTxData = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 4, "")); +}; + + +/** + * optional bytes tx_data = 4; + * This is a type-conversion wrapper around `getTxData()` + * @return {string} + */ +proto.cc.arduino.cli.commands.v1.MonitorRequest.prototype.getTxData_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getTxData())); +}; + + +/** + * optional bytes tx_data = 4; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getTxData()` + * @return {!Uint8Array} + */ +proto.cc.arduino.cli.commands.v1.MonitorRequest.prototype.getTxData_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getTxData())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.cc.arduino.cli.commands.v1.MonitorRequest} returns this + */ +proto.cc.arduino.cli.commands.v1.MonitorRequest.prototype.setTxData = function(value) { + return jspb.Message.setProto3BytesField(this, 4, value); +}; + + +/** + * optional MonitorPortConfiguration port_configuration = 5; + * @return {?proto.cc.arduino.cli.commands.v1.MonitorPortConfiguration} + */ +proto.cc.arduino.cli.commands.v1.MonitorRequest.prototype.getPortConfiguration = 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.MonitorRequest} returns this +*/ +proto.cc.arduino.cli.commands.v1.MonitorRequest.prototype.setPortConfiguration = function(value) { + return jspb.Message.setWrapperField(this, 5, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cc.arduino.cli.commands.v1.MonitorRequest} returns this + */ +proto.cc.arduino.cli.commands.v1.MonitorRequest.prototype.clearPortConfiguration = function() { + return this.setPortConfiguration(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cc.arduino.cli.commands.v1.MonitorRequest.prototype.hasPortConfiguration = function() { + return jspb.Message.getField(this, 5) != null; +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @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_, 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.MonitorPortConfiguration.prototype.getSettingsList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.cc.arduino.cli.commands.v1.MonitorPortSetting, 1)); +}; + + +/** + * @param {!Array} 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} + * @const + */ +proto.cc.arduino.cli.commands.v1.MonitorResponse.repeatedFields_ = [3]; + + + +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_, 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.MonitorResponse.prototype.toObject = function(opt_includeInstance) { + return proto.cc.arduino.cli.commands.v1.MonitorResponse.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.MonitorResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cc.arduino.cli.commands.v1.MonitorResponse.toObject = function(includeInstance, msg) { + 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) + }; + + 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.MonitorResponse} + */ +proto.cc.arduino.cli.commands.v1.MonitorResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cc.arduino.cli.commands.v1.MonitorResponse; + return proto.cc.arduino.cli.commands.v1.MonitorResponse.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.MonitorResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cc.arduino.cli.commands.v1.MonitorResponse} + */ +proto.cc.arduino.cli.commands.v1.MonitorResponse.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; + case 2: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + 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); + 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.MonitorResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cc.arduino.cli.commands.v1.MonitorResponse.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.MonitorResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cc.arduino.cli.commands.v1.MonitorResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getError(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getRxData_asU8(); + if (f.length > 0) { + writer.writeBytes( + 2, + f + ); + } + f = message.getAppliedSettingsList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 3, + f, + proto.cc.arduino.cli.commands.v1.MonitorPortSetting.serializeBinaryToWriter + ); + } +}; + + +/** + * optional string error = 1; + * @return {string} + */ +proto.cc.arduino.cli.commands.v1.MonitorResponse.prototype.getError = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @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); +}; + + +/** + * optional bytes rx_data = 2; + * @return {!(string|Uint8Array)} + */ +proto.cc.arduino.cli.commands.v1.MonitorResponse.prototype.getRxData = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * optional bytes rx_data = 2; + * This is a type-conversion wrapper around `getRxData()` + * @return {string} + */ +proto.cc.arduino.cli.commands.v1.MonitorResponse.prototype.getRxData_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getRxData())); +}; + + +/** + * optional bytes rx_data = 2; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getRxData()` + * @return {!Uint8Array} + */ +proto.cc.arduino.cli.commands.v1.MonitorResponse.prototype.getRxData_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getRxData())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @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); +}; + + +/** + * repeated MonitorPortSetting applied_settings = 3; + * @return {!Array} + */ +proto.cc.arduino.cli.commands.v1.MonitorResponse.prototype.getAppliedSettingsList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.cc.arduino.cli.commands.v1.MonitorPortSetting, 3)); +}; + + +/** + * @param {!Array} 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); +}; + + +/** + * @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. + * @return {!proto.cc.arduino.cli.commands.v1.MonitorResponse} returns this + */ +proto.cc.arduino.cli.commands.v1.MonitorResponse.prototype.clearAppliedSettingsList = function() { + return this.setAppliedSettingsList([]); +}; + + + + + +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_, 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); +}; + + + + + +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_, 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.EnumerateMonitorPortSettingsRequest.prototype.toObject = function(opt_includeInstance) { + return proto.cc.arduino.cli.commands.v1.EnumerateMonitorPortSettingsRequest.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.EnumerateMonitorPortSettingsRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cc.arduino.cli.commands.v1.EnumerateMonitorPortSettingsRequest.toObject = function(includeInstance, msg) { + var f, obj = { + instance: (f = msg.getInstance()) && cc_arduino_cli_commands_v1_common_pb.Instance.toObject(includeInstance, f), + portProtocol: jspb.Message.getFieldWithDefault(msg, 2, ""), + fqbn: jspb.Message.getFieldWithDefault(msg, 3, "") + }; + + 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.EnumerateMonitorPortSettingsRequest} + */ +proto.cc.arduino.cli.commands.v1.EnumerateMonitorPortSettingsRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cc.arduino.cli.commands.v1.EnumerateMonitorPortSettingsRequest; + return proto.cc.arduino.cli.commands.v1.EnumerateMonitorPortSettingsRequest.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.EnumerateMonitorPortSettingsRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cc.arduino.cli.commands.v1.EnumerateMonitorPortSettingsRequest} + */ +proto.cc.arduino.cli.commands.v1.EnumerateMonitorPortSettingsRequest.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new cc_arduino_cli_commands_v1_common_pb.Instance; + reader.readMessage(value,cc_arduino_cli_commands_v1_common_pb.Instance.deserializeBinaryFromReader); + msg.setInstance(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setPortProtocol(value); + break; + case 3: + 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.EnumerateMonitorPortSettingsRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cc.arduino.cli.commands.v1.EnumerateMonitorPortSettingsRequest.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.EnumerateMonitorPortSettingsRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cc.arduino.cli.commands.v1.EnumerateMonitorPortSettingsRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getInstance(); + if (f != null) { + writer.writeMessage( + 1, + f, + cc_arduino_cli_commands_v1_common_pb.Instance.serializeBinaryToWriter + ); + } + f = message.getPortProtocol(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getFqbn(); + if (f.length > 0) { + writer.writeString( + 3, + f + ); + } +}; + + +/** + * optional Instance instance = 1; + * @return {?proto.cc.arduino.cli.commands.v1.Instance} + */ +proto.cc.arduino.cli.commands.v1.EnumerateMonitorPortSettingsRequest.prototype.getInstance = function() { + return /** @type{?proto.cc.arduino.cli.commands.v1.Instance} */ ( + jspb.Message.getWrapperField(this, cc_arduino_cli_commands_v1_common_pb.Instance, 1)); +}; + + +/** + * @param {?proto.cc.arduino.cli.commands.v1.Instance|undefined} value + * @return {!proto.cc.arduino.cli.commands.v1.EnumerateMonitorPortSettingsRequest} returns this +*/ +proto.cc.arduino.cli.commands.v1.EnumerateMonitorPortSettingsRequest.prototype.setInstance = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cc.arduino.cli.commands.v1.EnumerateMonitorPortSettingsRequest} returns this + */ +proto.cc.arduino.cli.commands.v1.EnumerateMonitorPortSettingsRequest.prototype.clearInstance = function() { + return this.setInstance(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cc.arduino.cli.commands.v1.EnumerateMonitorPortSettingsRequest.prototype.hasInstance = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional string port_protocol = 2; + * @return {string} + */ +proto.cc.arduino.cli.commands.v1.EnumerateMonitorPortSettingsRequest.prototype.getPortProtocol = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cc.arduino.cli.commands.v1.EnumerateMonitorPortSettingsRequest} returns this + */ +proto.cc.arduino.cli.commands.v1.EnumerateMonitorPortSettingsRequest.prototype.setPortProtocol = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional string fqbn = 3; + * @return {string} + */ +proto.cc.arduino.cli.commands.v1.EnumerateMonitorPortSettingsRequest.prototype.getFqbn = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cc.arduino.cli.commands.v1.EnumerateMonitorPortSettingsRequest} returns this + */ +proto.cc.arduino.cli.commands.v1.EnumerateMonitorPortSettingsRequest.prototype.setFqbn = function(value) { + return jspb.Message.setProto3StringField(this, 3, value); +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.cc.arduino.cli.commands.v1.EnumerateMonitorPortSettingsResponse.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_, 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.EnumerateMonitorPortSettingsResponse.prototype.toObject = function(opt_includeInstance) { + return proto.cc.arduino.cli.commands.v1.EnumerateMonitorPortSettingsResponse.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.EnumerateMonitorPortSettingsResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cc.arduino.cli.commands.v1.EnumerateMonitorPortSettingsResponse.toObject = function(includeInstance, msg) { + var f, obj = { + settingsList: jspb.Message.toObjectList(msg.getSettingsList(), + proto.cc.arduino.cli.commands.v1.MonitorPortSettingDescriptor.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.EnumerateMonitorPortSettingsResponse} + */ +proto.cc.arduino.cli.commands.v1.EnumerateMonitorPortSettingsResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cc.arduino.cli.commands.v1.EnumerateMonitorPortSettingsResponse; + return proto.cc.arduino.cli.commands.v1.EnumerateMonitorPortSettingsResponse.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.EnumerateMonitorPortSettingsResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cc.arduino.cli.commands.v1.EnumerateMonitorPortSettingsResponse} + */ +proto.cc.arduino.cli.commands.v1.EnumerateMonitorPortSettingsResponse.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.MonitorPortSettingDescriptor; + reader.readMessage(value,proto.cc.arduino.cli.commands.v1.MonitorPortSettingDescriptor.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.EnumerateMonitorPortSettingsResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cc.arduino.cli.commands.v1.EnumerateMonitorPortSettingsResponse.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.EnumerateMonitorPortSettingsResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cc.arduino.cli.commands.v1.EnumerateMonitorPortSettingsResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getSettingsList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 1, + f, + proto.cc.arduino.cli.commands.v1.MonitorPortSettingDescriptor.serializeBinaryToWriter + ); + } +}; + + +/** + * repeated MonitorPortSettingDescriptor settings = 1; + * @return {!Array} + */ +proto.cc.arduino.cli.commands.v1.EnumerateMonitorPortSettingsResponse.prototype.getSettingsList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.cc.arduino.cli.commands.v1.MonitorPortSettingDescriptor, 1)); +}; + + +/** + * @param {!Array} value + * @return {!proto.cc.arduino.cli.commands.v1.EnumerateMonitorPortSettingsResponse} returns this +*/ +proto.cc.arduino.cli.commands.v1.EnumerateMonitorPortSettingsResponse.prototype.setSettingsList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 1, value); +}; + + +/** + * @param {!proto.cc.arduino.cli.commands.v1.MonitorPortSettingDescriptor=} opt_value + * @param {number=} opt_index + * @return {!proto.cc.arduino.cli.commands.v1.MonitorPortSettingDescriptor} + */ +proto.cc.arduino.cli.commands.v1.EnumerateMonitorPortSettingsResponse.prototype.addSettings = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.cc.arduino.cli.commands.v1.MonitorPortSettingDescriptor, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.cc.arduino.cli.commands.v1.EnumerateMonitorPortSettingsResponse} returns this + */ +proto.cc.arduino.cli.commands.v1.EnumerateMonitorPortSettingsResponse.prototype.clearSettingsList = function() { + return this.setSettingsList([]); +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.cc.arduino.cli.commands.v1.MonitorPortSettingDescriptor.repeatedFields_ = [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_, 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.MonitorPortSettingDescriptor.prototype.toObject = function(opt_includeInstance) { + return proto.cc.arduino.cli.commands.v1.MonitorPortSettingDescriptor.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.MonitorPortSettingDescriptor} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cc.arduino.cli.commands.v1.MonitorPortSettingDescriptor.toObject = function(includeInstance, msg) { + var f, obj = { + settingId: jspb.Message.getFieldWithDefault(msg, 1, ""), + label: jspb.Message.getFieldWithDefault(msg, 2, ""), + type: jspb.Message.getFieldWithDefault(msg, 3, ""), + enumValuesList: (f = jspb.Message.getRepeatedField(msg, 4)) == null ? undefined : f, + value: jspb.Message.getFieldWithDefault(msg, 5, "") + }; + + 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.MonitorPortSettingDescriptor} + */ +proto.cc.arduino.cli.commands.v1.MonitorPortSettingDescriptor.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cc.arduino.cli.commands.v1.MonitorPortSettingDescriptor; + return proto.cc.arduino.cli.commands.v1.MonitorPortSettingDescriptor.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.MonitorPortSettingDescriptor} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cc.arduino.cli.commands.v1.MonitorPortSettingDescriptor} + */ +proto.cc.arduino.cli.commands.v1.MonitorPortSettingDescriptor.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.setLabel(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.setType(value); + break; + case 4: + var value = /** @type {string} */ (reader.readString()); + msg.addEnumValues(value); + break; + case 5: + 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.MonitorPortSettingDescriptor.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cc.arduino.cli.commands.v1.MonitorPortSettingDescriptor.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.MonitorPortSettingDescriptor} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cc.arduino.cli.commands.v1.MonitorPortSettingDescriptor.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getSettingId(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getLabel(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getType(); + if (f.length > 0) { + writer.writeString( + 3, + f + ); + } + f = message.getEnumValuesList(); + if (f.length > 0) { + writer.writeRepeatedString( + 4, + f + ); + } + f = message.getValue(); + if (f.length > 0) { + writer.writeString( + 5, + f + ); + } +}; + + +/** + * optional string setting_id = 1; + * @return {string} + */ +proto.cc.arduino.cli.commands.v1.MonitorPortSettingDescriptor.prototype.getSettingId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cc.arduino.cli.commands.v1.MonitorPortSettingDescriptor} returns this + */ +proto.cc.arduino.cli.commands.v1.MonitorPortSettingDescriptor.prototype.setSettingId = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string label = 2; + * @return {string} + */ +proto.cc.arduino.cli.commands.v1.MonitorPortSettingDescriptor.prototype.getLabel = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cc.arduino.cli.commands.v1.MonitorPortSettingDescriptor} returns this + */ +proto.cc.arduino.cli.commands.v1.MonitorPortSettingDescriptor.prototype.setLabel = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional string type = 3; + * @return {string} + */ +proto.cc.arduino.cli.commands.v1.MonitorPortSettingDescriptor.prototype.getType = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cc.arduino.cli.commands.v1.MonitorPortSettingDescriptor} returns this + */ +proto.cc.arduino.cli.commands.v1.MonitorPortSettingDescriptor.prototype.setType = function(value) { + return jspb.Message.setProto3StringField(this, 3, value); +}; + + +/** + * repeated string enum_values = 4; + * @return {!Array} + */ +proto.cc.arduino.cli.commands.v1.MonitorPortSettingDescriptor.prototype.getEnumValuesList = function() { + return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 4)); +}; + + +/** + * @param {!Array} value + * @return {!proto.cc.arduino.cli.commands.v1.MonitorPortSettingDescriptor} returns this + */ +proto.cc.arduino.cli.commands.v1.MonitorPortSettingDescriptor.prototype.setEnumValuesList = function(value) { + return jspb.Message.setField(this, 4, value || []); +}; + + +/** + * @param {string} value + * @param {number=} opt_index + * @return {!proto.cc.arduino.cli.commands.v1.MonitorPortSettingDescriptor} returns this + */ +proto.cc.arduino.cli.commands.v1.MonitorPortSettingDescriptor.prototype.addEnumValues = function(value, opt_index) { + return jspb.Message.addToRepeatedField(this, 4, value, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.cc.arduino.cli.commands.v1.MonitorPortSettingDescriptor} returns this + */ +proto.cc.arduino.cli.commands.v1.MonitorPortSettingDescriptor.prototype.clearEnumValuesList = function() { + return this.setEnumValuesList([]); +}; + + +/** + * optional string value = 5; + * @return {string} + */ +proto.cc.arduino.cli.commands.v1.MonitorPortSettingDescriptor.prototype.getValue = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 5, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cc.arduino.cli.commands.v1.MonitorPortSettingDescriptor} returns this + */ +proto.cc.arduino.cli.commands.v1.MonitorPortSettingDescriptor.prototype.setValue = function(value) { + return jspb.Message.setProto3StringField(this, 5, value); +}; + + +goog.object.extend(exports, proto.cc.arduino.cli.commands.v1); diff --git a/arduino-ide-extension/src/node/cli-protocol/cc/arduino/cli/commands/v1/port_pb.d.ts b/arduino-ide-extension/src/node/cli-protocol/cc/arduino/cli/commands/v1/port_pb.d.ts index ee504921f..233f0d59f 100644 --- a/arduino-ide-extension/src/node/cli-protocol/cc/arduino/cli/commands/v1/port_pb.d.ts +++ b/arduino-ide-extension/src/node/cli-protocol/cc/arduino/cli/commands/v1/port_pb.d.ts @@ -43,4 +43,4 @@ export namespace Port { propertiesMap: Array<[string, string]>, } -} \ No newline at end of file +} diff --git a/arduino-ide-extension/src/node/cli-protocol/cc/arduino/cli/commands/v1/port_pb.js b/arduino-ide-extension/src/node/cli-protocol/cc/arduino/cli/commands/v1/port_pb.js index 1178f61b0..6b8eacaee 100644 --- a/arduino-ide-extension/src/node/cli-protocol/cc/arduino/cli/commands/v1/port_pb.js +++ b/arduino-ide-extension/src/node/cli-protocol/cc/arduino/cli/commands/v1/port_pb.js @@ -290,4 +290,4 @@ proto.cc.arduino.cli.commands.v1.Port.prototype.clearPropertiesMap = function() return this;}; -goog.object.extend(exports, proto.cc.arduino.cli.commands.v1); \ No newline at end of file +goog.object.extend(exports, proto.cc.arduino.cli.commands.v1); diff --git a/arduino-ide-extension/src/node/cli-protocol/cc/arduino/cli/commands/v1/upload_pb.d.ts b/arduino-ide-extension/src/node/cli-protocol/cc/arduino/cli/commands/v1/upload_pb.d.ts index 73c5bf59e..4427473a6 100644 --- a/arduino-ide-extension/src/node/cli-protocol/cc/arduino/cli/commands/v1/upload_pb.d.ts +++ b/arduino-ide-extension/src/node/cli-protocol/cc/arduino/cli/commands/v1/upload_pb.d.ts @@ -444,4 +444,4 @@ export namespace SupportedUserFieldsResponse { export type AsObject = { userFieldsList: Array, } -} \ No newline at end of file +} diff --git a/arduino-ide-extension/src/node/cli-protocol/cc/arduino/cli/commands/v1/upload_pb.js b/arduino-ide-extension/src/node/cli-protocol/cc/arduino/cli/commands/v1/upload_pb.js index 9bc9637ee..8841575ad 100644 --- a/arduino-ide-extension/src/node/cli-protocol/cc/arduino/cli/commands/v1/upload_pb.js +++ b/arduino-ide-extension/src/node/cli-protocol/cc/arduino/cli/commands/v1/upload_pb.js @@ -3275,4 +3275,4 @@ proto.cc.arduino.cli.commands.v1.SupportedUserFieldsResponse.prototype.clearUser }; -goog.object.extend(exports, proto.cc.arduino.cli.commands.v1); \ No newline at end of file +goog.object.extend(exports, proto.cc.arduino.cli.commands.v1); diff --git a/arduino-ide-extension/src/node/cli-protocol/cc/arduino/cli/debug/v1/debug_grpc_pb.d.ts b/arduino-ide-extension/src/node/cli-protocol/cc/arduino/cli/debug/v1/debug_grpc_pb.d.ts index 965b7c9b1..ad1daba69 100644 --- a/arduino-ide-extension/src/node/cli-protocol/cc/arduino/cli/debug/v1/debug_grpc_pb.d.ts +++ b/arduino-ide-extension/src/node/cli-protocol/cc/arduino/cli/debug/v1/debug_grpc_pb.d.ts @@ -57,4 +57,4 @@ export class DebugServiceClient extends grpc.Client implements IDebugServiceClie public getDebugConfig(request: cc_arduino_cli_debug_v1_debug_pb.DebugConfigRequest, callback: (error: grpc.ServiceError | null, response: cc_arduino_cli_debug_v1_debug_pb.GetDebugConfigResponse) => void): grpc.ClientUnaryCall; public getDebugConfig(request: cc_arduino_cli_debug_v1_debug_pb.DebugConfigRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: cc_arduino_cli_debug_v1_debug_pb.GetDebugConfigResponse) => void): grpc.ClientUnaryCall; public getDebugConfig(request: cc_arduino_cli_debug_v1_debug_pb.DebugConfigRequest, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: cc_arduino_cli_debug_v1_debug_pb.GetDebugConfigResponse) => void): grpc.ClientUnaryCall; -} \ No newline at end of file +} diff --git a/arduino-ide-extension/src/node/cli-protocol/cc/arduino/cli/debug/v1/debug_grpc_pb.js b/arduino-ide-extension/src/node/cli-protocol/cc/arduino/cli/debug/v1/debug_grpc_pb.js index 2f628af5c..829ca77d3 100644 --- a/arduino-ide-extension/src/node/cli-protocol/cc/arduino/cli/debug/v1/debug_grpc_pb.js +++ b/arduino-ide-extension/src/node/cli-protocol/cc/arduino/cli/debug/v1/debug_grpc_pb.js @@ -92,3 +92,4 @@ debug: { responseDeserialize: deserialize_cc_arduino_cli_debug_v1_GetDebugConfigResponse, }, }; + diff --git a/arduino-ide-extension/src/node/cli-protocol/cc/arduino/cli/debug/v1/debug_pb.d.ts b/arduino-ide-extension/src/node/cli-protocol/cc/arduino/cli/debug/v1/debug_pb.d.ts index 32b7c9b4d..7f353d557 100644 --- a/arduino-ide-extension/src/node/cli-protocol/cc/arduino/cli/debug/v1/debug_pb.d.ts +++ b/arduino-ide-extension/src/node/cli-protocol/cc/arduino/cli/debug/v1/debug_pb.d.ts @@ -171,4 +171,4 @@ export namespace GetDebugConfigResponse { serverConfigurationMap: Array<[string, string]>, } -} \ No newline at end of file +} diff --git a/arduino-ide-extension/src/node/cli-protocol/cc/arduino/cli/debug/v1/debug_pb.js b/arduino-ide-extension/src/node/cli-protocol/cc/arduino/cli/debug/v1/debug_pb.js index cb8136d54..12b38a6a5 100644 --- a/arduino-ide-extension/src/node/cli-protocol/cc/arduino/cli/debug/v1/debug_pb.js +++ b/arduino-ide-extension/src/node/cli-protocol/cc/arduino/cli/debug/v1/debug_pb.js @@ -1224,4 +1224,4 @@ proto.cc.arduino.cli.debug.v1.GetDebugConfigResponse.prototype.clearServerConfig return this;}; -goog.object.extend(exports, proto.cc.arduino.cli.debug.v1); \ No newline at end of file +goog.object.extend(exports, proto.cc.arduino.cli.debug.v1); diff --git a/arduino-ide-extension/src/node/cli-protocol/google/rpc/status_pb.d.ts b/arduino-ide-extension/src/node/cli-protocol/google/rpc/status_pb.d.ts index 884f59ac8..91afcb7d5 100644 --- a/arduino-ide-extension/src/node/cli-protocol/google/rpc/status_pb.d.ts +++ b/arduino-ide-extension/src/node/cli-protocol/google/rpc/status_pb.d.ts @@ -36,4 +36,4 @@ export namespace Status { message: string, detailsList: Array, } -} \ No newline at end of file +} diff --git a/arduino-ide-extension/src/node/cli-protocol/google/rpc/status_pb.js b/arduino-ide-extension/src/node/cli-protocol/google/rpc/status_pb.js index 304b718a4..d96766756 100644 --- a/arduino-ide-extension/src/node/cli-protocol/google/rpc/status_pb.js +++ b/arduino-ide-extension/src/node/cli-protocol/google/rpc/status_pb.js @@ -259,4 +259,4 @@ proto.google.rpc.Status.prototype.clearDetailsList = function() { }; -goog.object.extend(exports, proto.google.rpc); \ No newline at end of file +goog.object.extend(exports, proto.google.rpc); diff --git a/yarn.lock b/yarn.lock index 5e2e996f5..ea9f066f7 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2104,38 +2104,6 @@ dependencies: defer-to-connect "^1.0.1" -"@theia/application-manager@1.17.2": - version "1.17.2" - resolved "https://registry.yarnpkg.com/@theia/application-manager/-/application-manager-1.17.2.tgz#bcf5b23754705848a81d8a97f9e40ee141a6efc7" - integrity sha512-Ev/Rq3Da8pg22YzMPOJ/97rMmovHuvCDT9CLCNba5f9jgkBwX4WgS32q21qfucZ/OX3Y0V0EFSFilVyV7luzKA== - dependencies: - "@babel/core" "^7.10.0" - "@babel/plugin-transform-classes" "^7.10.0" - "@babel/plugin-transform-runtime" "^7.10.0" - "@babel/preset-env" "^7.10.0" - "@theia/application-package" "1.17.2" - "@theia/compression-webpack-plugin" "^3.0.0" - "@types/fs-extra" "^4.0.2" - babel-loader "^8.2.2" - buffer "^6.0.3" - circular-dependency-plugin "^5.2.2" - copy-webpack-plugin "^8.1.1" - css-loader "^6.2.0" - electron-rebuild "^1.8.6" - font-awesome-webpack "0.0.5-beta.2" - fs-extra "^4.0.2" - ignore-loader "^0.1.2" - less "^3.0.3" - setimmediate "^1.0.5" - source-map-loader "^2.0.1" - source-map-support "^0.5.19" - style-loader "^2.0.0" - umd-compat-loader "^2.1.2" - webpack "^5.48.0" - webpack-cli "4.7.0" - worker-loader "^3.0.8" - yargs "^15.3.1" - "@theia/application-manager@1.19.0": version "1.19.0" resolved "https://registry.yarnpkg.com/@theia/application-manager/-/application-manager-1.19.0.tgz#e608e55e1bc5252b185e6f8917ea274de2a8dc7a" @@ -2168,23 +2136,6 @@ worker-loader "^3.0.8" yargs "^15.3.1" -"@theia/application-package@1.17.2": - version "1.17.2" - resolved "https://registry.yarnpkg.com/@theia/application-package/-/application-package-1.17.2.tgz#05b1f2c749bbd693013f17cdf8b57d5789cb70fb" - integrity sha512-IKeH+ow5h8tuW9dVV27I551EowcvKe5mBx/U14oKJ7krKZ0eLUqJPGJukNIlRLbhz/9ANJvsGXHw02qMhP7CXQ== - dependencies: - "@types/fs-extra" "^4.0.2" - "@types/request" "^2.0.3" - "@types/semver" "^5.4.0" - "@types/write-json-file" "^2.2.1" - changes-stream "^2.2.0" - deepmerge "^4.2.2" - fs-extra "^4.0.2" - is-electron "^2.1.0" - request "^2.82.0" - semver "^5.4.1" - write-json-file "^2.2.0" - "@theia/application-package@1.19.0": version "1.19.0" resolved "https://registry.yarnpkg.com/@theia/application-package/-/application-package-1.19.0.tgz#a6045bec3ebcc7acb80dbfbb644c7fd429799aeb" @@ -2223,33 +2174,6 @@ "@theia/monaco" "1.19.0" ts-md5 "^1.2.2" -"@theia/cli@1.17.2": - version "1.17.2" - resolved "https://registry.yarnpkg.com/@theia/cli/-/cli-1.17.2.tgz#5558de75d59a1db3be60a54b871cb7e6fc2a9c8e" - integrity sha512-5Mwm8WO7smDle3R25i+OEEAT7EP/0Vgv0C6eH5GGS66eBcJEArKF7IxwhDf+qVJt3L/Qj7rePMoD9dVahiESbQ== - dependencies: - "@theia/application-manager" "1.17.2" - "@theia/application-package" "1.17.2" - "@theia/ovsx-client" "1.17.2" - "@types/chai" "^4.2.7" - "@types/mkdirp" "^0.5.2" - "@types/mocha" "^5.2.7" - "@types/node-fetch" "^2.5.7" - "@types/puppeteer" "^2.0.0" - "@types/requestretry" "^1.12.3" - "@types/tar" "^4.0.3" - chai "^4.2.0" - colors "^1.4.0" - decompress "^4.2.1" - https-proxy-agent "^5.0.0" - mocha "^7.0.0" - node-fetch "^2.6.0" - proxy-from-env "^1.1.0" - puppeteer "^2.0.0" - puppeteer-to-istanbul "^1.2.2" - temp "^0.9.1" - yargs "^15.3.1" - "@theia/cli@1.19.0": version "1.19.0" resolved "https://registry.yarnpkg.com/@theia/cli/-/cli-1.19.0.tgz#d9316b5e294ad5e7c4f66fd6d44efd9419d60955" @@ -2591,15 +2515,6 @@ "@types/p-queue" "^2.3.1" p-queue "^2.4.2" -"@theia/ovsx-client@1.17.2": - version "1.17.2" - resolved "https://registry.yarnpkg.com/@theia/ovsx-client/-/ovsx-client-1.17.2.tgz#fbf0c404d69f7e06ac4b33c26f642e6ccb68fda1" - integrity sha512-Is5tYaFfSoti6KOE6TR1eQH9n0Lpgsi2K7MMa1Oe/ETKDzUTf2aq+8bR/BPtqjId8ldNJETQconvQNKhKPL0ew== - dependencies: - "@types/bent" "^7.0.1" - bent "^7.1.0" - semver "^5.4.1" - "@theia/ovsx-client@1.19.0": version "1.19.0" resolved "https://registry.yarnpkg.com/@theia/ovsx-client/-/ovsx-client-1.19.0.tgz#6d350c831c7e3280a10269b1ce72f4312896d441" From 723a942b083de820322b68ae78ccbb28becbf212 Mon Sep 17 00:00:00 2001 From: Francesco Stasi Date: Thu, 18 Nov 2021 18:04:37 +0100 Subject: [PATCH 03/10] Add language selector to settings --- .../browser/arduino-ide-frontend-module.ts | 9 +- .../src/browser/contributions/contribution.ts | 2 +- .../src/browser/contributions/settings.ts | 3 +- .../settings/settings-component.tsx} | 535 ++---------------- .../dialogs/settings/settings-dialog.tsx | 193 +++++++ .../src/browser/dialogs/settings/settings.tsx | 337 +++++++++++ .../core/common-frontend-contribution.ts | 9 + .../src/common/protocol/config-service.ts | 2 + .../src/node/arduino-daemon-impl.ts | 4 + arduino-ide-extension/src/node/cli-config.ts | 1 + .../src/node/config-service-impl.ts | 5 +- electron/build/template-package.json | 2 +- i18n/en.json | 8 +- 13 files changed, 604 insertions(+), 506 deletions(-) rename arduino-ide-extension/src/browser/{settings.tsx => dialogs/settings/settings-component.tsx} (58%) create mode 100644 arduino-ide-extension/src/browser/dialogs/settings/settings-dialog.tsx create mode 100644 arduino-ide-extension/src/browser/dialogs/settings/settings.tsx diff --git a/arduino-ide-extension/src/browser/arduino-ide-frontend-module.ts b/arduino-ide-extension/src/browser/arduino-ide-frontend-module.ts index 271f82e1e..346641188 100644 --- a/arduino-ide-extension/src/browser/arduino-ide-frontend-module.ts +++ b/arduino-ide-extension/src/browser/arduino-ide-frontend-module.ts @@ -190,12 +190,12 @@ import { BoardSelection } from './contributions/board-selection'; import { OpenRecentSketch } from './contributions/open-recent-sketch'; import { Help } from './contributions/help'; import { bindArduinoPreferences } from './arduino-preferences'; +import { SettingsService } from './dialogs/settings/settings'; import { - SettingsService, SettingsDialog, SettingsWidget, SettingsDialogProps, -} from './settings'; +} from './dialogs/settings/settings-dialog'; import { AddFile } from './contributions/add-file'; import { ArchiveSketch } from './contributions/archive-sketch'; import { OutputToolbarContribution as TheiaOutputToolbarContribution } from '@theia/output/lib/browser/output-toolbar-contribution'; @@ -670,7 +670,10 @@ export default new ContainerModule((bind, unbind, isBound, rebind) => { bind(SettingsWidget).toSelf().inSingletonScope(); bind(SettingsDialog).toSelf().inSingletonScope(); bind(SettingsDialogProps).toConstantValue({ - title: 'Preferences', + title: nls.localize( + 'vscode/preferences.contribution/preferences', + 'Preferences' + ), }); bind(StorageWrapper).toSelf().inSingletonScope(); diff --git a/arduino-ide-extension/src/browser/contributions/contribution.ts b/arduino-ide-extension/src/browser/contributions/contribution.ts index 4716801de..ee65185c0 100644 --- a/arduino-ide-extension/src/browser/contributions/contribution.ts +++ b/arduino-ide-extension/src/browser/contributions/contribution.ts @@ -33,7 +33,7 @@ import { CommandService, } from '@theia/core/lib/common/command'; import { EditorMode } from '../editor-mode'; -import { SettingsService } from '../settings'; +import { SettingsService } from '../dialogs/settings/settings'; import { SketchesServiceClientImpl } from '../../common/protocol/sketches-service-client-impl'; import { SketchesService, diff --git a/arduino-ide-extension/src/browser/contributions/settings.ts b/arduino-ide-extension/src/browser/contributions/settings.ts index 91fe0aeb9..912b33eb8 100644 --- a/arduino-ide-extension/src/browser/contributions/settings.ts +++ b/arduino-ide-extension/src/browser/contributions/settings.ts @@ -7,7 +7,8 @@ import { KeybindingRegistry, } from './contribution'; import { ArduinoMenus } from '../menu/arduino-menus'; -import { Settings as Preferences, SettingsDialog } from '../settings'; +import { Settings as Preferences } from '../dialogs/settings/settings'; +import { SettingsDialog } from '../dialogs/settings/settings-dialog'; import { nls } from '@theia/core/lib/common'; @injectable() diff --git a/arduino-ide-extension/src/browser/settings.tsx b/arduino-ide-extension/src/browser/dialogs/settings/settings-component.tsx similarity index 58% rename from arduino-ide-extension/src/browser/settings.tsx rename to arduino-ide-extension/src/browser/dialogs/settings/settings-component.tsx index 551fc1975..a0362cebd 100644 --- a/arduino-ide-extension/src/browser/settings.tsx +++ b/arduino-ide-extension/src/browser/dialogs/settings/settings-component.tsx @@ -1,336 +1,22 @@ import * as React from 'react'; -import { injectable, inject, postConstruct } from 'inversify'; -import { Widget } from '@phosphor/widgets'; -import { Message } from '@phosphor/messaging'; import { Tab, Tabs, TabList, TabPanel } from 'react-tabs'; import 'react-tabs/style/react-tabs.css'; import { Disable } from 'react-disable'; -import URI from '@theia/core/lib/common/uri'; -import { Emitter } from '@theia/core/lib/common/event'; -import { Deferred } from '@theia/core/lib/common/promise-util'; import { deepClone } from '@theia/core/lib/common/objects'; import { FileService } from '@theia/filesystem/lib/browser/file-service'; import { ThemeService } from '@theia/core/lib/browser/theming'; -import { MaybePromise } from '@theia/core/lib/common/types'; import { WindowService } from '@theia/core/lib/browser/window/window-service'; import { FileDialogService } from '@theia/filesystem/lib/browser/file-dialog/file-dialog-service'; import { DisposableCollection } from '@theia/core/lib/common/disposable'; -import { FrontendApplicationStateService } from '@theia/core/lib/browser/frontend-application-state'; import { - DialogProps, - PreferenceService, - PreferenceScope, - DialogError, - ReactWidget, -} from '@theia/core/lib/browser'; -import { Index } from '../common/types'; -import { - CompilerWarnings, CompilerWarningLiterals, - ConfigService, - FileSystemExt, Network, ProxySettings, -} from '../common/protocol'; -import { AbstractDialog } from './theia/dialogs/dialogs'; +} from '../../../common/protocol'; import { nls } from '@theia/core/lib/common'; - -const EDITOR_SETTING = 'editor'; -const FONT_SIZE_SETTING = `${EDITOR_SETTING}.fontSize`; -const AUTO_SAVE_SETTING = `${EDITOR_SETTING}.autoSave`; -const QUICK_SUGGESTIONS_SETTING = `${EDITOR_SETTING}.quickSuggestions`; -const ARDUINO_SETTING = 'arduino'; -const WINDOW_SETTING = `${ARDUINO_SETTING}.window`; -// const IDE_SETTING = `${ARDUINO_SETTING}.ide`; -const COMPILE_SETTING = `${ARDUINO_SETTING}.compile`; -const UPLOAD_SETTING = `${ARDUINO_SETTING}.upload`; -const LANGUAGE_SETTING = `${ARDUINO_SETTING}.language`; -const SKETCHBOOK_SETTING = `${ARDUINO_SETTING}.sketchbook`; -const AUTO_SCALE_SETTING = `${WINDOW_SETTING}.autoScale`; -const ZOOM_LEVEL_SETTING = `${WINDOW_SETTING}.zoomLevel`; -// const AUTO_UPDATE_SETTING = `${IDE_SETTING}.autoUpdate`; -const COMPILE_VERBOSE_SETTING = `${COMPILE_SETTING}.verbose`; -const COMPILE_WARNINGS_SETTING = `${COMPILE_SETTING}.warnings`; -const UPLOAD_VERBOSE_SETTING = `${UPLOAD_SETTING}.verbose`; -const UPLOAD_VERIFY_SETTING = `${UPLOAD_SETTING}.verify`; -const LANGUAGE_LOG_SETTING = `${LANGUAGE_SETTING}.log`; -const SHOW_ALL_FILES_SETTING = `${SKETCHBOOK_SETTING}.showAllFiles`; - -export interface Settings extends Index { - editorFontSize: number; // `editor.fontSize` - themeId: string; // `workbench.colorTheme` - autoSave: 'on' | 'off'; // `editor.autoSave` - quickSuggestions: Record<'other' | 'comments' | 'strings', boolean>; // `editor.quickSuggestions` - - autoScaleInterface: boolean; // `arduino.window.autoScale` - interfaceScale: number; // `arduino.window.zoomLevel` https://github.com/eclipse-theia/theia/issues/8751 - checkForUpdates?: boolean; // `arduino.ide.autoUpdate` - verboseOnCompile: boolean; // `arduino.compile.verbose` - compilerWarnings: CompilerWarnings; // `arduino.compile.warnings` - verboseOnUpload: boolean; // `arduino.upload.verbose` - verifyAfterUpload: boolean; // `arduino.upload.verify` - enableLsLogs: boolean; // `arduino.language.log` - sketchbookShowAllFiles: boolean; // `arduino.sketchbook.showAllFiles` - - sketchbookPath: string; // CLI - additionalUrls: string[]; // CLI - network: Network; // CLI -} -export namespace Settings { - export function belongsToCli(key: K): boolean { - return key === 'sketchbookPath' || key === 'additionalUrls'; - } -} - -@injectable() -export class SettingsService { - @inject(FileService) - protected readonly fileService: FileService; - - @inject(FileSystemExt) - protected readonly fileSystemExt: FileSystemExt; - - @inject(ConfigService) - protected readonly configService: ConfigService; - - @inject(PreferenceService) - protected readonly preferenceService: PreferenceService; - - @inject(FrontendApplicationStateService) - protected readonly appStateService: FrontendApplicationStateService; - - protected readonly onDidChangeEmitter = new Emitter>(); - readonly onDidChange = this.onDidChangeEmitter.event; - - protected ready = new Deferred(); - protected _settings: Settings; - - @postConstruct() - protected async init(): Promise { - await this.appStateService.reachedState('ready'); // Hack for https://github.com/eclipse-theia/theia/issues/8993 - const settings = await this.loadSettings(); - this._settings = deepClone(settings); - this.ready.resolve(); - } - - protected async loadSettings(): Promise { - await this.preferenceService.ready; - const [ - editorFontSize, - themeId, - autoSave, - quickSuggestions, - autoScaleInterface, - interfaceScale, - // checkForUpdates, - verboseOnCompile, - compilerWarnings, - verboseOnUpload, - verifyAfterUpload, - enableLsLogs, - sketchbookShowAllFiles, - cliConfig, - ] = await Promise.all([ - this.preferenceService.get(FONT_SIZE_SETTING, 12), - this.preferenceService.get( - 'workbench.colorTheme', - 'arduino-theme' - ), - this.preferenceService.get<'on' | 'off'>(AUTO_SAVE_SETTING, 'on'), - this.preferenceService.get< - Record<'other' | 'comments' | 'strings', boolean> - >(QUICK_SUGGESTIONS_SETTING, { - other: false, - comments: false, - strings: false, - }), - this.preferenceService.get(AUTO_SCALE_SETTING, true), - this.preferenceService.get(ZOOM_LEVEL_SETTING, 0), - // this.preferenceService.get(AUTO_UPDATE_SETTING, true), - this.preferenceService.get(COMPILE_VERBOSE_SETTING, true), - this.preferenceService.get(COMPILE_WARNINGS_SETTING, 'None'), - this.preferenceService.get(UPLOAD_VERBOSE_SETTING, true), - this.preferenceService.get(UPLOAD_VERIFY_SETTING, true), - this.preferenceService.get(LANGUAGE_LOG_SETTING, true), - this.preferenceService.get(SHOW_ALL_FILES_SETTING, false), - this.configService.getConfiguration(), - ]); - const { additionalUrls, sketchDirUri, network } = cliConfig; - const sketchbookPath = await this.fileService.fsPath(new URI(sketchDirUri)); - return { - editorFontSize, - themeId, - autoSave, - quickSuggestions, - autoScaleInterface, - interfaceScale, - // checkForUpdates, - verboseOnCompile, - compilerWarnings, - verboseOnUpload, - verifyAfterUpload, - enableLsLogs, - sketchbookShowAllFiles, - additionalUrls, - sketchbookPath, - network, - }; - } - - async settings(): Promise { - await this.ready.promise; - return this._settings; - } - - async update(settings: Settings, fireDidChange = false): Promise { - await this.ready.promise; - for (const key of Object.keys(settings)) { - this._settings[key] = settings[key]; - } - if (fireDidChange) { - this.onDidChangeEmitter.fire(this._settings); - } - } - - async reset(): Promise { - const settings = await this.loadSettings(); - return this.update(settings, true); - } - - async validate( - settings: MaybePromise = this.settings() - ): Promise { - try { - const { sketchbookPath, editorFontSize, themeId } = await settings; - const sketchbookDir = await this.fileSystemExt.getUri(sketchbookPath); - if (!(await this.fileService.exists(new URI(sketchbookDir)))) { - return nls.localize( - 'arduino/preferences/invalid.sketchbook.location', - 'Invalid sketchbook location: {0}', - sketchbookPath - ); - } - if (editorFontSize <= 0) { - return nls.localize( - 'arduino/preferences/invalid.editorFontSize', - 'Invalid editor font size. It must be a positive integer.' - ); - } - if ( - !ThemeService.get() - .getThemes() - .find(({ id }) => id === themeId) - ) { - return nls.localize( - 'arduino/preferences/invalid.theme', - 'Invalid theme.' - ); - } - return true; - } catch (err) { - if (err instanceof Error) { - return err.message; - } - return String(err); - } - } - - async save(): Promise { - await this.ready.promise; - const { - editorFontSize, - themeId, - autoSave, - quickSuggestions, - autoScaleInterface, - interfaceScale, - // checkForUpdates, - verboseOnCompile, - compilerWarnings, - verboseOnUpload, - verifyAfterUpload, - enableLsLogs, - sketchbookPath, - additionalUrls, - network, - sketchbookShowAllFiles, - } = this._settings; - const [config, sketchDirUri] = await Promise.all([ - this.configService.getConfiguration(), - this.fileSystemExt.getUri(sketchbookPath), - ]); - (config as any).additionalUrls = additionalUrls; - (config as any).sketchDirUri = sketchDirUri; - (config as any).network = network; - - await Promise.all([ - this.preferenceService.set( - 'editor.fontSize', - editorFontSize, - PreferenceScope.User - ), - this.preferenceService.set( - 'workbench.colorTheme', - themeId, - PreferenceScope.User - ), - this.preferenceService.set( - 'editor.autoSave', - autoSave, - PreferenceScope.User - ), - this.preferenceService.set( - 'editor.quickSuggestions', - quickSuggestions, - PreferenceScope.User - ), - this.preferenceService.set( - AUTO_SCALE_SETTING, - autoScaleInterface, - PreferenceScope.User - ), - this.preferenceService.set( - ZOOM_LEVEL_SETTING, - interfaceScale, - PreferenceScope.User - ), - // this.preferenceService.set(AUTO_UPDATE_SETTING, checkForUpdates, PreferenceScope.User), - this.preferenceService.set( - COMPILE_VERBOSE_SETTING, - verboseOnCompile, - PreferenceScope.User - ), - this.preferenceService.set( - COMPILE_WARNINGS_SETTING, - compilerWarnings, - PreferenceScope.User - ), - this.preferenceService.set( - UPLOAD_VERBOSE_SETTING, - verboseOnUpload, - PreferenceScope.User - ), - this.preferenceService.set( - UPLOAD_VERIFY_SETTING, - verifyAfterUpload, - PreferenceScope.User - ), - this.preferenceService.set( - LANGUAGE_LOG_SETTING, - enableLsLogs, - PreferenceScope.User - ), - this.preferenceService.set( - SHOW_ALL_FILES_SETTING, - sketchbookShowAllFiles, - PreferenceScope.User - ), - this.configService.setConfiguration(config), - ]); - this.onDidChangeEmitter.fire(this._settings); - return true; - } -} +import { Settings, SettingsService } from './settings'; +import { AdditionalUrlsDialog } from './settings-dialog'; +import { AsyncLocalizationProvider } from '@theia/core/lib/common/i18n/localization'; export class SettingsComponent extends React.Component< SettingsComponent.Props, @@ -438,6 +124,12 @@ export class SettingsComponent extends React.Component< 'Theme' ) + ':'} +
+ {nls.localize( + 'vscode/editorStatus/status.editor.mode', + 'Language' + ) + ':'} +
{nls.localize( 'arduino/preferences/showVerbose', @@ -503,6 +195,27 @@ export class SettingsComponent extends React.Component< ))}
+
+ + + ( + {nls.localize( + 'vscode/extensionsActions/reloadRequired', + 'Reload required' + )} + ) + +