raas-core
Version:
129 lines (128 loc) • 3.18 kB
TypeScript
import { rhamtEvents } from './events';
import { Protocol } from './protocol/protocol';
import { AnalysisResults } from './analysisResults';
export declare class RhamtModel {
configurations: Map<string, RhamtConfiguration>;
getConfigurations(): RhamtConfiguration[];
exists(name: string): boolean;
}
export declare namespace AnalysisState {
const ANALYZING = 0;
const STOPPED = 1;
const COMPLETED = 2;
}
export declare namespace ChangeType {
const MODIFIED = 0;
const ADDED = 1;
const DELETED = 2;
const PROGRESS = 3;
const CANCELLED = 4;
const ERROR = 5;
const COMPLETE = 6;
const STARTED = 7;
const CLONING = 8;
}
export interface CloneUpdate {
readonly input: Clone;
readonly value: number;
readonly title: string;
readonly description?: string;
}
export interface Input {
id: string;
path: string;
}
export interface Clone extends Input {
repo: string;
starting: boolean;
cloning: boolean;
cancelled: boolean;
completed: boolean;
}
export declare class RhamtConfiguration {
onChanged: rhamtEvents.TypedEvent<{
type: number;
name: string;
value: any;
}>;
onResultsLoaded: rhamtEvents.TypedEvent<void>;
private _id;
private _results;
options: {
[index: string]: any;
};
runtime: Runtime;
jvm: Protocol.JVM;
id: string;
results: AnalysisResults | undefined;
}
export interface Runtime {
host: string;
port: number;
}
export interface IUniqueElement {
id: string;
}
export interface IExecutionResult extends IUniqueElement {
hints: IHint[];
classifications: IClassification[];
}
export interface IIssue extends IUniqueElement {
quickfixes: IQuickFix[];
file: string;
severity: string;
ruleId: string;
effort: string;
title: string;
messageOrDescription: string;
links: ILink[];
report: string;
}
export interface IHint extends IIssue {
originalLineSource: string;
lineNumber: number;
column: number;
length: number;
sourceSnippet: string;
}
export interface IClassification extends IIssue {
description: string;
}
export declare type IQuickFixType = 'REPLACE' | 'DELETE_LINE' | 'INSERT_LINE' | 'TRANSFORMATION';
export interface IQuickFix extends IUniqueElement {
type: IQuickFixType;
searchString: string;
replacementString: string;
newLine: string;
transformationId: string;
name: string;
file: string;
}
export interface ILink extends IUniqueElement {
description: string;
url: string;
}
export interface IReport extends IUniqueElement {
inputFile: string;
reportLocation: string;
}
export interface IMigrationPath extends IUniqueElement {
pahtId: string;
source: ITechnology;
target: ITechnology;
}
export interface ITechnology extends IUniqueElement {
technologyId: string;
versionRange: string;
}
export interface IIgnorePattern extends IUniqueElement {
pattern: string;
enabled: boolean;
}
export interface Endpoints {
raasHost(): string;
raasPort(): string;
location(): string;
port(): string;
stateLocation(): string;
}