Alberto Iannaccone 7f8b227c39
[ATL-1531] Integrate arduino-cli 0.19.1 (#506)
* integrate cli 0.19.0

* Update CLI version used to fix crash on lib/core install/uninstall

* Update CLI version

* Update CLI version

* update cli version

Co-authored-by: Silvano Cerza <silvanocerza@gmail.com>
2021-09-30 09:02:09 +01:00

59 lines
1.6 KiB
TypeScript

import { Port } from '../../common/protocol/boards-service';
import { Programmer } from './boards-service';
export const CompilerWarningLiterals = [
'None',
'Default',
'More',
'All',
] as const;
export type CompilerWarnings = typeof CompilerWarningLiterals[number];
export const CoreServicePath = '/services/core-service';
export const CoreService = Symbol('CoreService');
export interface CoreService {
compile(
options: CoreService.Compile.Options &
Readonly<{
exportBinaries?: boolean;
compilerWarnings?: CompilerWarnings;
}>
): Promise<void>;
upload(options: CoreService.Upload.Options): Promise<void>;
uploadUsingProgrammer(options: CoreService.Upload.Options): Promise<void>;
burnBootloader(options: CoreService.Bootloader.Options): Promise<void>;
}
export namespace CoreService {
export namespace Compile {
export interface Options {
/**
* `file` URI to the sketch folder.
*/
readonly sketchUri: string;
readonly fqbn?: string | undefined;
readonly optimizeForDebug: boolean;
readonly verbose: boolean;
readonly sourceOverride: Record<string, string>;
}
}
export namespace Upload {
export interface Options extends Compile.Options {
readonly port?: Port | undefined;
readonly programmer?: Programmer | undefined;
readonly verify: boolean;
}
}
export namespace Bootloader {
export interface Options {
readonly fqbn?: string | undefined;
readonly port?: Port | undefined;
readonly programmer?: Programmer | undefined;
readonly verbose: boolean;
readonly verify: boolean;
}
}
}