ardunno-cli
Version:
nice-grpc API for the Arduino CLI
282 lines • 11.8 kB
TypeScript
import _m0 from 'protobufjs/minimal';
import { InstalledPlatformReference, Instance, TaskProgress } from './common';
import { Library } from './lib';
export interface CompileRequest {
/** Arduino Core Service instance from the `Init` response. */
instance: Instance | undefined;
/**
* Fully Qualified Board Name, e.g.: `arduino:avr:uno`. If this field is not
* defined, the FQBN of the board attached to the sketch via the `BoardAttach`
* method is used.
*/
fqbn: string;
/** The path where the sketch is stored. */
sketchPath: string;
/** Just get the build properties and do not run the full compile. */
showProperties: boolean;
/** Print preprocessed code to stdout instead of compiling. */
preprocess: boolean;
/**
* Builds of core and sketches are saved into this path to be cached and
* reused.
*
* @deprecated
*/
buildCachePath: string;
/**
* Path to use to store the files used for the compilation. If omitted, a
* directory will be created in the operating system's default temporary
* path.
*/
buildPath: string;
/** List of custom build properties. */
buildProperties: string[];
/**
* Used to tell gcc which warning level to use. The level names are: "none",
* "default", "more" and "all".
*/
warnings: string;
/** Turns on verbose mode. */
verbose: boolean;
/** Suppresses almost every output. */
quiet: boolean;
/**
* The max number of concurrent compiler instances to run (as `make -jx`). If
* jobs is set to 0, it will use the number of available CPUs as the maximum.
*/
jobs: number;
/** A list of paths to directories containing a collection of libraries. */
libraries: string[];
/** Optimize compile output for debug, not for release. */
optimizeForDebug: boolean;
/**
* Optional: save the build artifacts in this directory, the directory must
* exist.
*/
exportDir: string;
/**
* Optional: cleanup the build folder and do not use any previously cached
* build.
*/
clean: boolean;
/**
* When set to `true` only the compilation database will be produced and no
* actual build will be performed.
*/
createCompilationDatabaseOnly: boolean;
/**
* This map (source file -> new content) let the builder use the provided
* content instead of reading the corresponding file on disk. This is useful
* for IDE that have unsaved changes in memory. The path must be relative to
* the sketch directory. Only files from the sketch are allowed.
*/
sourceOverride: {
[key: string]: string;
};
/**
* When set to `true` the compiled binary will be copied to the export
* directory.
*/
exportBinaries?: boolean | undefined;
/** A list of paths to single libraries root directory. */
library: string[];
/**
* The path where to search for the custom signing key name and the encrypt
* key name.
*/
keysKeychain: string;
/** The name of the custom key to use for signing during the compile process. */
signKey: string;
/**
* The name of the custom key to use for encrypting during the compile
* process.
*/
encryptKey: string;
/**
* If set to true the build will skip the library discovery process and will
* use the same libraries of latest build. Enabling this flag may produce a
* wrong output and should not be used in regular compiles unless there is a
* very specific reason to do so. This flag is mainly provided for usage in
* language servers to optimize the build speed in some particular cases.
*/
skipLibrariesDiscovery: boolean;
/**
* If set to true the returned build properties will be left unexpanded, with
* the variables placeholders exactly as defined in the platform.
*/
doNotExpandBuildProperties: boolean;
/**
* Search for precompiled cores in the given paths and use them if found. This
* search is performed after the standard build_cache directory.
*/
buildCacheExtraPaths: string[];
}
export interface CompileRequest_SourceOverrideEntry {
key: string;
value: string;
}
export interface CompileResponse {
message?: {
$case: 'outStream';
outStream: Uint8Array;
} | {
$case: 'errStream';
errStream: Uint8Array;
} | {
$case: 'progress';
progress: TaskProgress;
} | {
$case: 'result';
result: BuilderResult;
} | undefined;
}
export interface InstanceNeedsReinitializationError {
}
export interface BuilderResult {
/** The compiler build path. */
buildPath: string;
/** The libraries used in the build. */
usedLibraries: Library[];
/** The size of the executable split by sections. */
executableSectionsSize: ExecutableSectionSize[];
/** The platform where the board is defined. */
boardPlatform: InstalledPlatformReference | undefined;
/** The platform used for the build (if referenced from the board platform). */
buildPlatform: InstalledPlatformReference | undefined;
/** Build properties used for compiling. */
buildProperties: string[];
/** Compiler errors and warnings. */
diagnostics: CompileDiagnostic[];
}
export interface ExecutableSectionSize {
/** The name of the section. */
name: string;
/** The used size of the section in bytes. */
size: number;
/** The maximum size of the section in bytes. */
maxSize: number;
}
export interface CompileDiagnostic {
/** Severity of the diagnostic. */
severity: string;
/** The explanation of the diagnostic (it may be multiple preformatted lines). */
message: string;
/** The file containing the diagnostic. */
file: string;
/** The line of the diagnostic if available (starts from 1). */
line: number;
/** The column of the diagnostic if available (starts from 1). */
column: number;
/**
* The context where this diagnostic is found (it may be multiple files that
* represents a chain of includes, or a text describing where the diagnostic
* is found).
*/
context: CompileDiagnosticContext[];
/** Annotations or suggestions to the diagnostic made by the compiler. */
notes: CompileDiagnosticNote[];
}
export interface CompileDiagnosticContext {
/** The message describing the context reference. */
message: string;
/** The file of the context reference. */
file: string;
/** The line of the context reference. */
line: number;
/** The column of the context reference. */
column: number;
}
export interface CompileDiagnosticNote {
/** The message describing the compiler note. */
message: string;
/** The file of the compiler note. */
file: string;
/** The line of the compiler note. */
line: number;
/** The column of the compiler note. */
column: number;
}
export declare const CompileRequest: {
encode(message: CompileRequest, writer?: _m0.Writer): _m0.Writer;
decode(input: _m0.Reader | Uint8Array, length?: number): CompileRequest;
fromJSON(object: any): CompileRequest;
toJSON(message: CompileRequest): unknown;
create(base?: DeepPartial<CompileRequest>): CompileRequest;
fromPartial(object: DeepPartial<CompileRequest>): CompileRequest;
};
export declare const CompileRequest_SourceOverrideEntry: {
encode(message: CompileRequest_SourceOverrideEntry, writer?: _m0.Writer): _m0.Writer;
decode(input: _m0.Reader | Uint8Array, length?: number): CompileRequest_SourceOverrideEntry;
fromJSON(object: any): CompileRequest_SourceOverrideEntry;
toJSON(message: CompileRequest_SourceOverrideEntry): unknown;
create(base?: DeepPartial<CompileRequest_SourceOverrideEntry>): CompileRequest_SourceOverrideEntry;
fromPartial(object: DeepPartial<CompileRequest_SourceOverrideEntry>): CompileRequest_SourceOverrideEntry;
};
export declare const CompileResponse: {
encode(message: CompileResponse, writer?: _m0.Writer): _m0.Writer;
decode(input: _m0.Reader | Uint8Array, length?: number): CompileResponse;
fromJSON(object: any): CompileResponse;
toJSON(message: CompileResponse): unknown;
create(base?: DeepPartial<CompileResponse>): CompileResponse;
fromPartial(object: DeepPartial<CompileResponse>): CompileResponse;
};
export declare const InstanceNeedsReinitializationError: {
encode(_: InstanceNeedsReinitializationError, writer?: _m0.Writer): _m0.Writer;
decode(input: _m0.Reader | Uint8Array, length?: number): InstanceNeedsReinitializationError;
fromJSON(_: any): InstanceNeedsReinitializationError;
toJSON(_: InstanceNeedsReinitializationError): unknown;
create(base?: DeepPartial<InstanceNeedsReinitializationError>): InstanceNeedsReinitializationError;
fromPartial(_: DeepPartial<InstanceNeedsReinitializationError>): InstanceNeedsReinitializationError;
};
export declare const BuilderResult: {
encode(message: BuilderResult, writer?: _m0.Writer): _m0.Writer;
decode(input: _m0.Reader | Uint8Array, length?: number): BuilderResult;
fromJSON(object: any): BuilderResult;
toJSON(message: BuilderResult): unknown;
create(base?: DeepPartial<BuilderResult>): BuilderResult;
fromPartial(object: DeepPartial<BuilderResult>): BuilderResult;
};
export declare const ExecutableSectionSize: {
encode(message: ExecutableSectionSize, writer?: _m0.Writer): _m0.Writer;
decode(input: _m0.Reader | Uint8Array, length?: number): ExecutableSectionSize;
fromJSON(object: any): ExecutableSectionSize;
toJSON(message: ExecutableSectionSize): unknown;
create(base?: DeepPartial<ExecutableSectionSize>): ExecutableSectionSize;
fromPartial(object: DeepPartial<ExecutableSectionSize>): ExecutableSectionSize;
};
export declare const CompileDiagnostic: {
encode(message: CompileDiagnostic, writer?: _m0.Writer): _m0.Writer;
decode(input: _m0.Reader | Uint8Array, length?: number): CompileDiagnostic;
fromJSON(object: any): CompileDiagnostic;
toJSON(message: CompileDiagnostic): unknown;
create(base?: DeepPartial<CompileDiagnostic>): CompileDiagnostic;
fromPartial(object: DeepPartial<CompileDiagnostic>): CompileDiagnostic;
};
export declare const CompileDiagnosticContext: {
encode(message: CompileDiagnosticContext, writer?: _m0.Writer): _m0.Writer;
decode(input: _m0.Reader | Uint8Array, length?: number): CompileDiagnosticContext;
fromJSON(object: any): CompileDiagnosticContext;
toJSON(message: CompileDiagnosticContext): unknown;
create(base?: DeepPartial<CompileDiagnosticContext>): CompileDiagnosticContext;
fromPartial(object: DeepPartial<CompileDiagnosticContext>): CompileDiagnosticContext;
};
export declare const CompileDiagnosticNote: {
encode(message: CompileDiagnosticNote, writer?: _m0.Writer): _m0.Writer;
decode(input: _m0.Reader | Uint8Array, length?: number): CompileDiagnosticNote;
fromJSON(object: any): CompileDiagnosticNote;
toJSON(message: CompileDiagnosticNote): unknown;
create(base?: DeepPartial<CompileDiagnosticNote>): CompileDiagnosticNote;
fromPartial(object: DeepPartial<CompileDiagnosticNote>): CompileDiagnosticNote;
};
type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
type DeepPartial<T> = T extends Builtin ? T : T extends globalThis.Array<infer U> ? globalThis.Array<DeepPartial<U>> : T extends ReadonlyArray<infer U> ? ReadonlyArray<DeepPartial<U>> : T extends {
$case: string;
} ? {
[K in keyof Omit<T, '$case'>]?: DeepPartial<T[K]>;
} & {
$case: T['$case'];
} : T extends {} ? {
[K in keyof T]?: DeepPartial<T[K]>;
} : Partial<T>;
export {};
//# sourceMappingURL=compile.d.ts.map