mirror of
https://github.com/arduino/arduino-ide.git
synced 2025-11-16 05:39:28 +00:00
Automated debug config setup
This commit is contained in:
committed by
Miro Spönemann
parent
ea5f528ef0
commit
8aa356bd6e
@@ -2,6 +2,7 @@ import { isWindows, isOSX } from '@theia/core/lib/common/os';
|
||||
import { JsonRpcServer } from '@theia/core/lib/common/messaging/proxy-factory';
|
||||
import { Searchable } from './searchable';
|
||||
import { Installable } from './installable';
|
||||
import { Detailable } from './detailable';
|
||||
import { ArduinoComponent } from './arduino-component';
|
||||
const naturalCompare: (left: string, right: string) => number = require('string-natural-compare').caseInsensitive;
|
||||
|
||||
@@ -59,7 +60,7 @@ export interface BoardsServiceClient {
|
||||
|
||||
export const BoardsServicePath = '/services/boards-service';
|
||||
export const BoardsService = Symbol('BoardsService');
|
||||
export interface BoardsService extends Installable<BoardPackage>, Searchable<BoardPackage>, JsonRpcServer<BoardsServiceClient> {
|
||||
export interface BoardsService extends Installable<BoardPackage>, Searchable<BoardPackage>, Detailable<BoardDetails>, JsonRpcServer<BoardsServiceClient> {
|
||||
getAttachedBoards(): Promise<{ boards: Board[] }>;
|
||||
getAvailablePorts(): Promise<{ ports: Port[] }>;
|
||||
}
|
||||
@@ -181,6 +182,28 @@ export interface Board {
|
||||
fqbn?: string
|
||||
}
|
||||
|
||||
export interface BoardDetails extends Board {
|
||||
fqbn: string;
|
||||
|
||||
requiredTools: Tool[];
|
||||
locations?: BoardDetailLocations;
|
||||
}
|
||||
|
||||
export interface BoardDetailLocations {
|
||||
debugScript: string;
|
||||
}
|
||||
|
||||
export interface Tool {
|
||||
readonly packager: string;
|
||||
readonly name: string;
|
||||
readonly version: string;
|
||||
readonly locations?: ToolLocations;
|
||||
}
|
||||
export interface ToolLocations {
|
||||
main: string
|
||||
[key: string]: string
|
||||
}
|
||||
|
||||
export namespace Board {
|
||||
|
||||
export function is(board: any): board is Board {
|
||||
|
||||
10
arduino-ide-extension/src/common/protocol/detailable.ts
Normal file
10
arduino-ide-extension/src/common/protocol/detailable.ts
Normal file
@@ -0,0 +1,10 @@
|
||||
|
||||
export interface Detailable<T> {
|
||||
detail(options: Detailable.Options): Promise<{ item?: T }>;
|
||||
}
|
||||
|
||||
export namespace Detailable {
|
||||
export interface Options {
|
||||
readonly id: string;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user