UNPKG

@finos/legend-application-studio

Version:
97 lines 4.89 kB
/** * Copyright (c) 2020-present, Goldman Sachs * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ import { type GeneratorFn } from '@finos/legend-shared'; import type { EditorStore } from './EditorStore.js'; import { GraphGenerationState } from './editor-state/GraphGenerationState.js'; import { type Entity, EntitiesWithOrigin } from '@finos/legend-storage'; import { type EntityChange, type ProjectDependency } from '@finos/legend-server-sdlc'; import { type ProjectDependencyGraphReport, ProjectDependencyCoordinates } from '@finos/legend-server-depot'; import { type EngineError, type PackageableElement, type CompilationWarning, type PureModel, type FunctionActivatorConfiguration, type RelationalDatabaseTypeConfiguration } from '@finos/legend-graph'; export declare enum GraphBuilderStatus { SUCCEEDED = "SUCCEEDED", FAILED = "FAILED", REDIRECTED_TO_TEXT_MODE = "REDIRECTED_TO_TEXT_MODE" } export declare enum GraphCompilationOutcome { SKIPPED = "SKIPPED", SUCCEEDED = "SUCCEEDED", FAILED = "FAILED" } export interface GraphBuilderResult { status: GraphBuilderStatus; error?: Error; } export type Problem = CompilationWarning | EngineError; export declare class EditorGraphState { readonly editorStore: EditorStore; readonly graphGenerationState: GraphGenerationState; isInitializingGraph: boolean; isRunningGlobalCompile: boolean; isRunningGlobalGenerate: boolean; isApplicationLeavingGraphEditMode: boolean; isUpdatingGraph: boolean; isUpdatingApplication: boolean; functionActivatorConfigurations: FunctionActivatorConfiguration[]; relationalDatabseTypeConfigurations: RelationalDatabaseTypeConfiguration[] | undefined; warnings: CompilationWarning[]; error: EngineError | undefined; compilationResultEntities: Entity[]; enableStrictMode: boolean; mostRecentCompilationGraphHash: string | undefined; mostRecentCompilationOutcome: GraphCompilationOutcome | undefined; constructor(editorStore: EditorStore); get problems(): Problem[]; /** * This function is temporary. There is no good way to detect if a problem not coming from * the main graph at the moment. In text mode, we can rely on the fact that the source information * has line 0 column 0. But this is not the case for form mode, so this is just temporary * to help with text-mode. */ TEMPORARY__removeDependencyProblems(problems: Problem[] | CompilationWarning[]): Problem[] | CompilationWarning[]; setMostRecentCompilationGraphHash(val: string | undefined): void; setMostRecentCompilationOutcome(val: GraphCompilationOutcome | undefined): void; get areProblemsStale(): boolean; get isApplicationUpdateOperationIsRunning(): boolean; checkIfApplicationUpdateOperationIsRunning(): boolean; clearProblems(): void; setEnableStrictMode(val: boolean): void; fetchAvailableFunctionActivatorConfigurations(): GeneratorFn<void>; fetchAvailableRelationalDatabseTypeConfigurations(): GeneratorFn<void>; findRelationalDatabaseTypeConfiguration(type: string): RelationalDatabaseTypeConfiguration | undefined; buildGraph(entities: Entity[]): GeneratorFn<GraphBuilderResult>; buildGraphForLazyText(): GeneratorFn<void>; private redirectToModelImporterForDebugging; /** * Loads entity changes to graph and updates application. */ loadEntityChangesToGraph(changes: EntityChange[], baseEntities: Entity[] | undefined): GeneratorFn<void>; /** * NOTE: this can post memory-leak issue if we start having immutable elements referencing current graph elements: * e.g. subclass analytics on the immutable class, etc. * * @risk memory-leak */ rebuildDependencies(newGraph: PureModel): GeneratorFn<void>; /** * Used to update generation model and generation graph using the generated entities * does not alter the main or dependency model */ updateGenerationGraphAndApplication(): GeneratorFn<void>; getIndexedDependencyEntities(dependencyReport?: ProjectDependencyGraphReport | undefined): Promise<Map<string, EntitiesWithOrigin>>; buildProjectDependencyCoordinates(projectDependencies: ProjectDependency[]): Promise<ProjectDependencyCoordinates[]>; getPackageableElementType(element: PackageableElement): string; } //# sourceMappingURL=EditorGraphState.d.ts.map