mirror of
https://github.com/arduino/arduino-ide.git
synced 2025-11-05 08:28:32 +00:00
feat: simplify board and port handling (#2165)
Use Arduino CLI revision `38479dc`
Closes #43
Closes #82
Closes #1319
Closes #1366
Closes #2143
Closes #2158
Ref: 38479dc706
Signed-off-by: Akos Kitta <a.kitta@arduino.cc>
This commit is contained in:
@@ -1,15 +1,15 @@
|
||||
import { nls } from '@theia/core/lib/common/nls';
|
||||
import { ApplicationError } from '@theia/core/lib/common/application-error';
|
||||
import { nls } from '@theia/core/lib/common/nls';
|
||||
import type {
|
||||
Location,
|
||||
Range,
|
||||
Position,
|
||||
Range,
|
||||
} from '@theia/core/shared/vscode-languageserver-protocol';
|
||||
import type { BoardUserField, Port, Installable } from '../../common/protocol/';
|
||||
import type { Programmer } from './boards-service';
|
||||
import type { Sketch } from './sketches-service';
|
||||
import { IndexUpdateSummary } from './notification-service';
|
||||
import type { CompileSummary as ApiCompileSummary } from 'vscode-arduino-api';
|
||||
import type { BoardUserField, Installable } from '../../common/protocol/';
|
||||
import { isPortIdentifier, PortIdentifier, Programmer } from './boards-service';
|
||||
import type { IndexUpdateSummary } from './notification-service';
|
||||
import type { Sketch } from './sketches-service';
|
||||
|
||||
export const CompilerWarningLiterals = [
|
||||
'None',
|
||||
@@ -148,11 +148,22 @@ export function isCompileSummary(arg: unknown): arg is CompileSummary {
|
||||
);
|
||||
}
|
||||
|
||||
export interface UploadResponse {
|
||||
readonly portAfterUpload: PortIdentifier;
|
||||
}
|
||||
export function isUploadResponse(arg: unknown): arg is UploadResponse {
|
||||
return (
|
||||
Boolean(arg) &&
|
||||
typeof arg === 'object' &&
|
||||
isPortIdentifier((<UploadResponse>arg).portAfterUpload)
|
||||
);
|
||||
}
|
||||
|
||||
export const CoreServicePath = '/services/core-service';
|
||||
export const CoreService = Symbol('CoreService');
|
||||
export interface CoreService {
|
||||
compile(options: CoreService.Options.Compile): Promise<void>;
|
||||
upload(options: CoreService.Options.Upload): Promise<void>;
|
||||
upload(options: CoreService.Options.Upload): Promise<UploadResponse>;
|
||||
burnBootloader(options: CoreService.Options.Bootloader): Promise<void>;
|
||||
/**
|
||||
* Refreshes the underling core gRPC client for the Arduino CLI.
|
||||
@@ -198,7 +209,7 @@ export namespace CoreService {
|
||||
readonly sketch: Sketch;
|
||||
}
|
||||
export interface BoardBased {
|
||||
readonly port?: Port;
|
||||
readonly port?: PortIdentifier;
|
||||
readonly programmer?: Programmer | undefined;
|
||||
/**
|
||||
* For the _Verify after upload_ setting.
|
||||
|
||||
Reference in New Issue
Block a user