@finos/legend-application-studio 28.10.0 → 28.10.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/components/editor/editor-group/EditorGroup.js +4 -4
- package/lib/components/editor/editor-group/EditorGroup.js.map +1 -1
- package/lib/components/editor/editor-group/connection-editor/DatabaseBuilderWizard.d.ts.map +1 -1
- package/lib/components/editor/editor-group/connection-editor/DatabaseBuilderWizard.js +2 -1
- package/lib/components/editor/editor-group/connection-editor/DatabaseBuilderWizard.js.map +1 -1
- package/lib/components/editor/editor-group/end-to-end-flow-editor/{QueryConnectionWorkflowEditor.d.ts → ConnectionToQueryWorkflowEditor.d.ts} +7 -14
- package/lib/components/editor/editor-group/end-to-end-flow-editor/ConnectionToQueryWorkflowEditor.d.ts.map +1 -0
- package/lib/components/editor/editor-group/end-to-end-flow-editor/{QueryConnectionWorkflowEditor.js → ConnectionToQueryWorkflowEditor.js} +30 -25
- package/lib/components/editor/editor-group/end-to-end-flow-editor/ConnectionToQueryWorkflowEditor.js.map +1 -0
- package/lib/components/editor/editor-group/service-editor/ServiceExecutionQueryEditor.js +1 -1
- package/lib/components/editor/editor-group/service-editor/ServiceExecutionQueryEditor.js.map +1 -1
- package/lib/components/editor/side-bar/Explorer.d.ts.map +1 -1
- package/lib/components/editor/side-bar/Explorer.js +6 -6
- package/lib/components/editor/side-bar/Explorer.js.map +1 -1
- package/lib/components/editor/side-bar/end-to-end-workflow/EndToEndWorkflows.d.ts.map +1 -1
- package/lib/components/editor/side-bar/end-to-end-workflow/EndToEndWorkflows.js +6 -4
- package/lib/components/editor/side-bar/end-to-end-workflow/EndToEndWorkflows.js.map +1 -1
- package/lib/index.css +1 -1
- package/lib/package.json +10 -10
- package/lib/stores/editor/EditorStore.d.ts +1 -0
- package/lib/stores/editor/EditorStore.d.ts.map +1 -1
- package/lib/stores/editor/EditorStore.js +4 -0
- package/lib/stores/editor/EditorStore.js.map +1 -1
- package/lib/stores/editor/editor-state/element-editor-state/ElementEditorState.d.ts.map +1 -1
- package/lib/stores/editor/editor-state/element-editor-state/ElementEditorState.js +2 -1
- package/lib/stores/editor/editor-state/element-editor-state/ElementEditorState.js.map +1 -1
- package/lib/stores/editor/editor-state/end-to-end-workflow-state/EndToEndWorkflowEditorState.d.ts +3 -3
- package/lib/stores/editor/editor-state/end-to-end-workflow-state/EndToEndWorkflowEditorState.d.ts.map +1 -1
- package/lib/stores/editor/editor-state/end-to-end-workflow-state/EndToEndWorkflowEditorState.js +4 -6
- package/lib/stores/editor/editor-state/end-to-end-workflow-state/EndToEndWorkflowEditorState.js.map +1 -1
- package/lib/stores/editor/editor-state/end-to-end-workflow-state/QueryConnectionEndToEndWorkflowEditorState.d.ts +111 -0
- package/lib/stores/editor/editor-state/end-to-end-workflow-state/QueryConnectionEndToEndWorkflowEditorState.d.ts.map +1 -0
- package/lib/stores/editor/editor-state/end-to-end-workflow-state/QueryConnectionEndToEndWorkflowEditorState.js +453 -0
- package/lib/stores/editor/editor-state/end-to-end-workflow-state/QueryConnectionEndToEndWorkflowEditorState.js.map +1 -0
- package/lib/stores/editor/sidebar-state/end-to-end-workflow/GlobalEndToEndFlowState.d.ts +2 -91
- package/lib/stores/editor/sidebar-state/end-to-end-workflow/GlobalEndToEndFlowState.d.ts.map +1 -1
- package/lib/stores/editor/sidebar-state/end-to-end-workflow/GlobalEndToEndFlowState.js +8 -465
- package/lib/stores/editor/sidebar-state/end-to-end-workflow/GlobalEndToEndFlowState.js.map +1 -1
- package/package.json +21 -21
- package/src/components/editor/editor-group/EditorGroup.tsx +4 -4
- package/src/components/editor/editor-group/connection-editor/DatabaseBuilderWizard.tsx +2 -1
- package/src/components/editor/editor-group/end-to-end-flow-editor/{QueryConnectionWorkflowEditor.tsx → ConnectionToQueryWorkflowEditor.tsx} +83 -43
- package/src/components/editor/editor-group/service-editor/ServiceExecutionQueryEditor.tsx +1 -1
- package/src/components/editor/side-bar/Explorer.tsx +7 -6
- package/src/components/editor/side-bar/end-to-end-workflow/EndToEndWorkflows.tsx +8 -7
- package/src/stores/editor/EditorStore.ts +5 -0
- package/src/stores/editor/editor-state/element-editor-state/ElementEditorState.ts +2 -1
- package/src/stores/editor/editor-state/end-to-end-workflow-state/EndToEndWorkflowEditorState.ts +4 -6
- package/src/stores/editor/{sidebar-state/end-to-end-workflow/GlobalEndToEndFlowState.tsx → editor-state/end-to-end-workflow-state/QueryConnectionEndToEndWorkflowEditorState.ts} +168 -277
- package/src/stores/editor/sidebar-state/end-to-end-workflow/GlobalEndToEndFlowState.ts +43 -0
- package/tsconfig.json +4 -3
- package/lib/components/editor/editor-group/end-to-end-flow-editor/QueryConnectionWorkflowEditor.d.ts.map +0 -1
- package/lib/components/editor/editor-group/end-to-end-flow-editor/QueryConnectionWorkflowEditor.js.map +0 -1
@@ -0,0 +1,111 @@
|
|
1
|
+
/**
|
2
|
+
* Copyright (c) 2020-present, Goldman Sachs
|
3
|
+
*
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
5
|
+
* you may not use this file except in compliance with the License.
|
6
|
+
* You may obtain a copy of the License at
|
7
|
+
*
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
9
|
+
*
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
13
|
+
* See the License for the specific language governing permissions and
|
14
|
+
* limitations under the License.
|
15
|
+
*/
|
16
|
+
import { type GeneratorFn, ActionState } from '@finos/legend-shared';
|
17
|
+
import { EndToEndWorkflowEditorState } from './EndToEndWorkflowEditorState.js';
|
18
|
+
import { RelationalDatabaseConnection, type PureModel, PackageableConnection, PackageableRuntime, ParserError, CompilationError } from '@finos/legend-graph';
|
19
|
+
import type { EditorStore } from '../../EditorStore.js';
|
20
|
+
import { BaseStepperState } from '@finos/legend-art';
|
21
|
+
import type { Entity } from '@finos/legend-storage';
|
22
|
+
import { DatabaseModelBuilderState } from '../element-editor-state/connection/DatabaseModelBuilderState.js';
|
23
|
+
import { DatabaseBuilderWizardState } from '../element-editor-state/connection/DatabaseBuilderWizardState.js';
|
24
|
+
import { RelationalDatabaseConnectionValueState } from '../element-editor-state/connection/ConnectionEditorState.js';
|
25
|
+
export declare enum QUERY_CONNECTION_WORKFLOW_STEPS {
|
26
|
+
CREATE_CONNECTION = "Create Connection",
|
27
|
+
CREATE_DATABASE = "Create Database",
|
28
|
+
EDIT_DATABASE = "Edit Database",
|
29
|
+
CREATE_CLASS_MAPPING_RUNTIME = "Create Class/Mapping/Runtime",
|
30
|
+
CONFIRMATION = "Confirmation"
|
31
|
+
}
|
32
|
+
export declare abstract class ConnectionToQueryStepperState extends BaseStepperState {
|
33
|
+
abstract label: QUERY_CONNECTION_WORKFLOW_STEPS;
|
34
|
+
}
|
35
|
+
export declare class QueryConnectionConfirmationAndGrammarEditorStepperState extends ConnectionToQueryStepperState {
|
36
|
+
workflowEditorState: QueryConnectionEndToEndWorkflowEditorState;
|
37
|
+
isCompilingCode: ActionState;
|
38
|
+
editorStore: EditorStore;
|
39
|
+
constructor(queryConnectionEndToEndWorkflowState: QueryConnectionEndToEndWorkflowEditorState);
|
40
|
+
get label(): QUERY_CONNECTION_WORKFLOW_STEPS;
|
41
|
+
compile(): GeneratorFn<void>;
|
42
|
+
query(): GeneratorFn<void>;
|
43
|
+
handleNext(): GeneratorFn<void>;
|
44
|
+
}
|
45
|
+
export declare class DatabaseModelBuilderStepperState extends ConnectionToQueryStepperState {
|
46
|
+
workflowEditorState: QueryConnectionEndToEndWorkflowEditorState;
|
47
|
+
databaseModelBuilderState: DatabaseModelBuilderState;
|
48
|
+
editorStore: EditorStore;
|
49
|
+
constructor(queryConnectionEndToEndWorkflowState: QueryConnectionEndToEndWorkflowEditorState, databaseModelBuilderState: DatabaseModelBuilderState);
|
50
|
+
get label(): QUERY_CONNECTION_WORKFLOW_STEPS;
|
51
|
+
updateGraphWithModels(entities: Entity[]): GeneratorFn<void>;
|
52
|
+
handleNext(): GeneratorFn<void>;
|
53
|
+
}
|
54
|
+
export declare class DatabaseGrammarEditorStepperState extends ConnectionToQueryStepperState {
|
55
|
+
workflowEditorState: QueryConnectionEndToEndWorkflowEditorState;
|
56
|
+
isCompilingGrammarCode: ActionState;
|
57
|
+
editorStore: EditorStore;
|
58
|
+
constructor(queryConnectionEndToEndWorkflowState: QueryConnectionEndToEndWorkflowEditorState);
|
59
|
+
get label(): QUERY_CONNECTION_WORKFLOW_STEPS;
|
60
|
+
compileDatabaseGrammarCode(): GeneratorFn<void>;
|
61
|
+
buildDatabaseModelBuilderState(): void;
|
62
|
+
handleNext(): GeneratorFn<void>;
|
63
|
+
}
|
64
|
+
export declare class DatabaseBuilderStepperState extends ConnectionToQueryStepperState {
|
65
|
+
workflowEditorState: QueryConnectionEndToEndWorkflowEditorState;
|
66
|
+
databaseBuilderWizardState: DatabaseBuilderWizardState;
|
67
|
+
isGeneratingDatabaseGrammarCode: ActionState;
|
68
|
+
editorStore: EditorStore;
|
69
|
+
constructor(queryConnectionEndToEndWorkflowState: QueryConnectionEndToEndWorkflowEditorState, databaseBuilderWizardState: DatabaseBuilderWizardState);
|
70
|
+
get label(): QUERY_CONNECTION_WORKFLOW_STEPS;
|
71
|
+
buildDatabase(): GeneratorFn<void>;
|
72
|
+
generateDatabaseGrammarCode(): GeneratorFn<void>;
|
73
|
+
handleNext(): GeneratorFn<void>;
|
74
|
+
}
|
75
|
+
export declare class ConnectionValueStepperState extends ConnectionToQueryStepperState {
|
76
|
+
workflowEditorState: QueryConnectionEndToEndWorkflowEditorState;
|
77
|
+
targetConnectionPath: string;
|
78
|
+
connectionValueState: RelationalDatabaseConnectionValueState;
|
79
|
+
constructor(workflowEditorState: QueryConnectionEndToEndWorkflowEditorState);
|
80
|
+
get createConnection(): RelationalDatabaseConnection;
|
81
|
+
get label(): QUERY_CONNECTION_WORKFLOW_STEPS;
|
82
|
+
setTargetConnectionPath(val: string): void;
|
83
|
+
handleNext(): GeneratorFn<void>;
|
84
|
+
}
|
85
|
+
export declare class QueryConnectionEndToEndWorkflowEditorState extends EndToEndWorkflowEditorState {
|
86
|
+
activeStep: number;
|
87
|
+
activeStepToBaseStepperState: Map<string, BaseStepperState>;
|
88
|
+
activeStepToStepLabel: Map<number, string>;
|
89
|
+
targetRuntimePath: string;
|
90
|
+
packageableConnection: PackageableConnection | undefined;
|
91
|
+
packageableRuntime: PackageableRuntime | undefined;
|
92
|
+
databaseGrammarCode: string;
|
93
|
+
runtimeGrammarCode: string;
|
94
|
+
connectionGrammarCode: string;
|
95
|
+
finalGrammarCode: string;
|
96
|
+
workflowGraph: PureModel;
|
97
|
+
isValid: boolean;
|
98
|
+
compileError: ParserError | CompilationError | undefined;
|
99
|
+
constructor(editorStore: EditorStore);
|
100
|
+
get label(): string;
|
101
|
+
initactiveStepToStepLabel(): void;
|
102
|
+
setActiveStep(step: number): void;
|
103
|
+
setTargetRuntimePath(val: string): void;
|
104
|
+
setRuntimeGrammarCode(val: string): void;
|
105
|
+
setDatabaseGrammarCode(code: string): void;
|
106
|
+
setFinalGrammarCode(val: string): void;
|
107
|
+
setCompileError(err: ParserError | CompilationError | undefined): void;
|
108
|
+
updateRuntime(newPath: string): GeneratorFn<void>;
|
109
|
+
reset(): void;
|
110
|
+
}
|
111
|
+
//# sourceMappingURL=QueryConnectionEndToEndWorkflowEditorState.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"QueryConnectionEndToEndWorkflowEditorState.d.ts","sourceRoot":"","sources":["../../../../../src/stores/editor/editor-state/end-to-end-workflow-state/QueryConnectionEndToEndWorkflowEditorState.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAGH,OAAO,EAEL,KAAK,WAAW,EAGhB,WAAW,EAEZ,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAEL,2BAA2B,EAC5B,MAAM,kCAAkC,CAAC;AAC1C,OAAO,EACL,4B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2B;IACzF,UAAU,EAAE,MAAM,CAAC;IACnB,4BAA4B,gCAAuC;IACnE,qBAAqB,sBAA6B;IAClD,iBAAiB,SAAwB;IACzC,qBAAqB,EAAE,qBAAqB,GAAG,SAAS,CAAC;IACzD,kBAAkB,EAAE,kBAAkB,GAAG,SAAS,CAAC;IACnD,mBAAmB,SAAM;IACzB,kBAAkB,SAAM;IACxB,qBAAqB,SAAM;IAC3B,gBAAgB,SAAM;IACtB,aAAa,EAAE,SAAS,CAAC;IACzB,OAAO,EAAE,OAAO,CAAC;IACjB,YAAY,EAAE,WAAW,GAAG,gBAAgB,GAAG,SAAS,CAAC;gBAE7C,WAAW,EAAE,WAAW;IAgCpC,IAAa,KAAK,IAAI,MAAM,CAE3B;IAED,yBAAyB,IAAI,IAAI;IAMjC,aAAa,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI;IAIjC,oBAAoB,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI;IAIvC,qBAAqB,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI;IAIxC,sBAAsB,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI;IAI1C,mBAAmB,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI;IAItC,eAAe,CAAC,GAAG,EAAE,WAAW,GAAG,gBAAgB,GAAG,SAAS,GAAG,IAAI;IAIrE,aAAa,CAAC,OAAO,EAAE,MAAM,GAAG,WAAW,CAAC,IAAI,CAAC;IA2BlD,KAAK,IAAI,IAAI;CAUd"}
|
@@ -0,0 +1,453 @@
|
|
1
|
+
/**
|
2
|
+
* Copyright (c) 2020-present, Goldman Sachs
|
3
|
+
*
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
5
|
+
* you may not use this file except in compliance with the License.
|
6
|
+
* You may obtain a copy of the License at
|
7
|
+
*
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
9
|
+
*
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
13
|
+
* See the License for the specific language governing permissions and
|
14
|
+
* limitations under the License.
|
15
|
+
*/
|
16
|
+
import { action, flow, flowResult, observable, makeObservable } from 'mobx';
|
17
|
+
import { guaranteeNonNullable, LogEvent, assertErrorThrown, ActionState, getNonNullableEntry, } from '@finos/legend-shared';
|
18
|
+
import { END_TO_END_WORKFLOWS, EndToEndWorkflowEditorState, } from './EndToEndWorkflowEditorState.js';
|
19
|
+
import { RelationalDatabaseConnection, LocalH2DatasourceSpecification, PackageableElementExplicitReference, stub_Database, DatabaseType, DefaultH2AuthenticationStrategy, PackageableConnection, EngineRuntime, IdentifiedConnection, generateIdentifiedConnectionId, PackageableRuntime, extractElementNameFromPath, getOrCreatePackage, extractPackagePathFromPath, getMappingCompatibleClasses, RuntimePointer, ParserError, CompilationError, observe_RelationalDatabaseConnection, } from '@finos/legend-graph';
|
20
|
+
import { BaseStepperState } from '@finos/legend-art';
|
21
|
+
import { LEGEND_STUDIO_APP_EVENT } from '../../../../__lib__/LegendStudioEvent.js';
|
22
|
+
import { EntityChangeType } from '@finos/legend-server-sdlc';
|
23
|
+
import { ClassQueryBuilderState, QueryBuilderConfig, } from '@finos/legend-query-builder';
|
24
|
+
import { packageableConnection_setConnectionValue, runtime_addIdentifiedConnection, runtime_addMapping, runtime_setMappings, } from '../../../graph-modifier/DSL_Mapping_GraphModifierHelper.js';
|
25
|
+
import { DatabaseModelBuilderState } from '../element-editor-state/connection/DatabaseModelBuilderState.js';
|
26
|
+
import { DatabaseBuilderWizardState } from '../element-editor-state/connection/DatabaseBuilderWizardState.js';
|
27
|
+
import { RelationalDatabaseConnectionValueState } from '../element-editor-state/connection/ConnectionEditorState.js';
|
28
|
+
import { DEFAULT_H2_SQL } from '../../NewElementState.js';
|
29
|
+
export var QUERY_CONNECTION_WORKFLOW_STEPS;
|
30
|
+
(function (QUERY_CONNECTION_WORKFLOW_STEPS) {
|
31
|
+
QUERY_CONNECTION_WORKFLOW_STEPS["CREATE_CONNECTION"] = "Create Connection";
|
32
|
+
QUERY_CONNECTION_WORKFLOW_STEPS["CREATE_DATABASE"] = "Create Database";
|
33
|
+
QUERY_CONNECTION_WORKFLOW_STEPS["EDIT_DATABASE"] = "Edit Database";
|
34
|
+
QUERY_CONNECTION_WORKFLOW_STEPS["CREATE_CLASS_MAPPING_RUNTIME"] = "Create Class/Mapping/Runtime";
|
35
|
+
QUERY_CONNECTION_WORKFLOW_STEPS["CONFIRMATION"] = "Confirmation";
|
36
|
+
})(QUERY_CONNECTION_WORKFLOW_STEPS || (QUERY_CONNECTION_WORKFLOW_STEPS = {}));
|
37
|
+
const DEFAULT_CONNECTION_PATH = 'store::MyConnection';
|
38
|
+
const DEFAULT_RUNTIME_PATH = 'store::MyRuntime';
|
39
|
+
const JOIN_CODE_SYNTAX = '// Please refer to pure code syntax below for how to create join' +
|
40
|
+
'\n' +
|
41
|
+
'// Join join_name(Table1.column1 = Table2.column2);' +
|
42
|
+
'\n';
|
43
|
+
export class ConnectionToQueryStepperState extends BaseStepperState {
|
44
|
+
}
|
45
|
+
// step5 - confirm/update final grammar and query
|
46
|
+
export class QueryConnectionConfirmationAndGrammarEditorStepperState extends ConnectionToQueryStepperState {
|
47
|
+
workflowEditorState;
|
48
|
+
isCompilingCode = ActionState.create();
|
49
|
+
editorStore;
|
50
|
+
constructor(queryConnectionEndToEndWorkflowState) {
|
51
|
+
super();
|
52
|
+
makeObservable(this, {
|
53
|
+
workflowEditorState: false,
|
54
|
+
isCompilingCode: observable,
|
55
|
+
handleNext: flow,
|
56
|
+
query: flow,
|
57
|
+
compile: flow,
|
58
|
+
});
|
59
|
+
this.workflowEditorState = queryConnectionEndToEndWorkflowState;
|
60
|
+
this.editorStore = this.workflowEditorState.editorStore;
|
61
|
+
}
|
62
|
+
get label() {
|
63
|
+
return QUERY_CONNECTION_WORKFLOW_STEPS.CONFIRMATION;
|
64
|
+
}
|
65
|
+
*compile() {
|
66
|
+
try {
|
67
|
+
this.isCompilingCode.inProgress();
|
68
|
+
const compilationResult = (yield flowResult(yield this.editorStore.graphManagerState.graphManager.compileText(this.workflowEditorState.finalGrammarCode, this.workflowEditorState.workflowGraph)));
|
69
|
+
this.editorStore.applicationStore.notificationService.notifySuccess('Compiled successfully');
|
70
|
+
const entities = compilationResult.entities;
|
71
|
+
const newGraph = this.editorStore.graphManagerState.createNewGraph();
|
72
|
+
yield flowResult(this.editorStore.graphManagerState.graphManager.buildGraph(newGraph, entities, ActionState.create()));
|
73
|
+
this.workflowEditorState.workflowGraph = newGraph;
|
74
|
+
this.workflowEditorState.setCompileError(undefined);
|
75
|
+
}
|
76
|
+
catch (error) {
|
77
|
+
if (error instanceof ParserError || error instanceof CompilationError) {
|
78
|
+
this.workflowEditorState.setCompileError(error);
|
79
|
+
}
|
80
|
+
assertErrorThrown(error);
|
81
|
+
this.editorStore.applicationStore.logService.error(LogEvent.create(LEGEND_STUDIO_APP_EVENT.DATABASE_MODEL_BUILDER_FAILURE), error);
|
82
|
+
this.editorStore.applicationStore.notificationService.notifyError(error);
|
83
|
+
this.isCompilingCode.fail();
|
84
|
+
}
|
85
|
+
finally {
|
86
|
+
this.isCompilingCode.complete();
|
87
|
+
}
|
88
|
+
}
|
89
|
+
*query() {
|
90
|
+
const entities = (yield this.editorStore.graphManagerState.graphManager.pureCodeToEntities(this.workflowEditorState.finalGrammarCode));
|
91
|
+
const newEntities = [];
|
92
|
+
for (const entity of entities) {
|
93
|
+
newEntities.push({
|
94
|
+
type: EntityChangeType.CREATE,
|
95
|
+
entityPath: entity.path,
|
96
|
+
content: entity.content,
|
97
|
+
});
|
98
|
+
}
|
99
|
+
yield flowResult(this.editorStore.graphState.loadEntityChangesToGraph(newEntities, undefined));
|
100
|
+
this.editorStore.tabManagerState.openTab(this.editorStore.globalEndToEndWorkflowState
|
101
|
+
.queryToConnectionWorkflowEditorState);
|
102
|
+
this.editorStore.tabManagerState.closeTab(this.editorStore.globalEndToEndWorkflowState
|
103
|
+
.queryToConnectionWorkflowEditorState);
|
104
|
+
const theClass = getMappingCompatibleClasses(getNonNullableEntry(this.workflowEditorState.workflowGraph.mappings, 0), this.workflowEditorState.workflowGraph.classes)[0];
|
105
|
+
if (theClass) {
|
106
|
+
const config = new QueryBuilderConfig();
|
107
|
+
const queryBuilderState = new ClassQueryBuilderState(this.editorStore.applicationStore, this.editorStore.graphManagerState, config);
|
108
|
+
queryBuilderState.class = theClass;
|
109
|
+
queryBuilderState.executionContextState.mapping = getNonNullableEntry(this.workflowEditorState.workflowGraph.mappings, 0);
|
110
|
+
queryBuilderState.executionContextState.runtimeValue = new RuntimePointer(PackageableElementExplicitReference.create(getNonNullableEntry(this.workflowEditorState.workflowGraph.runtimes, 0)));
|
111
|
+
yield flowResult(this.editorStore.embeddedQueryBuilderState.setEmbeddedQueryBuilderConfiguration({
|
112
|
+
setupQueryBuilderState: () => queryBuilderState,
|
113
|
+
actionConfigs: [],
|
114
|
+
}));
|
115
|
+
}
|
116
|
+
}
|
117
|
+
*handleNext() {
|
118
|
+
yield flowResult(this.query()).then(() => {
|
119
|
+
this.workflowEditorState.reset();
|
120
|
+
});
|
121
|
+
}
|
122
|
+
}
|
123
|
+
// step 4 - build class/mapping/runtime from database
|
124
|
+
export class DatabaseModelBuilderStepperState extends ConnectionToQueryStepperState {
|
125
|
+
workflowEditorState;
|
126
|
+
databaseModelBuilderState;
|
127
|
+
editorStore;
|
128
|
+
constructor(queryConnectionEndToEndWorkflowState, databaseModelBuilderState) {
|
129
|
+
super();
|
130
|
+
makeObservable(this, {
|
131
|
+
workflowEditorState: false,
|
132
|
+
updateGraphWithModels: flow,
|
133
|
+
handleNext: flow,
|
134
|
+
});
|
135
|
+
this.workflowEditorState = queryConnectionEndToEndWorkflowState;
|
136
|
+
this.databaseModelBuilderState = databaseModelBuilderState;
|
137
|
+
this.editorStore = this.workflowEditorState.editorStore;
|
138
|
+
}
|
139
|
+
get label() {
|
140
|
+
return QUERY_CONNECTION_WORKFLOW_STEPS.CREATE_CLASS_MAPPING_RUNTIME;
|
141
|
+
}
|
142
|
+
*updateGraphWithModels(entities) {
|
143
|
+
try {
|
144
|
+
const newGraph = this.editorStore.graphManagerState.createNewGraph();
|
145
|
+
newGraph.addElement(guaranteeNonNullable(this.workflowEditorState.packageableConnection), this.workflowEditorState.packageableConnection?.package?.path);
|
146
|
+
const databaseBuilderStepperState = this.workflowEditorState.activeStepToBaseStepperState.get(QUERY_CONNECTION_WORKFLOW_STEPS.CREATE_DATABASE);
|
147
|
+
newGraph.addElement(databaseBuilderStepperState.databaseBuilderWizardState
|
148
|
+
.schemaExplorerState.database, databaseBuilderStepperState.databaseBuilderWizardState
|
149
|
+
.schemaExplorerState.database.package?.path);
|
150
|
+
yield flowResult(this.editorStore.graphManagerState.graphManager.buildGraph(newGraph, entities, ActionState.create()));
|
151
|
+
// create a runtime
|
152
|
+
if (this.workflowEditorState.packageableRuntime) {
|
153
|
+
runtime_setMappings(this.workflowEditorState.packageableRuntime.runtimeValue, [
|
154
|
+
PackageableElementExplicitReference.create(getNonNullableEntry(newGraph.mappings, 0)),
|
155
|
+
]);
|
156
|
+
}
|
157
|
+
else {
|
158
|
+
const runtime = new PackageableRuntime(extractElementNameFromPath(this.workflowEditorState.targetRuntimePath));
|
159
|
+
runtime.runtimeValue = new EngineRuntime();
|
160
|
+
runtime_addMapping(runtime.runtimeValue, PackageableElementExplicitReference.create(getNonNullableEntry(newGraph.mappings, 0)));
|
161
|
+
runtime_addIdentifiedConnection(runtime.runtimeValue, new IdentifiedConnection(generateIdentifiedConnectionId(runtime.runtimeValue), guaranteeNonNullable(this.workflowEditorState.packageableConnection).connectionValue), this.workflowEditorState.editorStore.changeDetectionState
|
162
|
+
.observerContext);
|
163
|
+
this.workflowEditorState.packageableRuntime = runtime;
|
164
|
+
}
|
165
|
+
newGraph.addElement(this.workflowEditorState.packageableRuntime, extractPackagePathFromPath(this.workflowEditorState.targetRuntimePath));
|
166
|
+
this.workflowEditorState.workflowGraph = newGraph;
|
167
|
+
this.workflowEditorState.setRuntimeGrammarCode((yield this.editorStore.graphManagerState.graphManager.entitiesToPureCode([
|
168
|
+
this.editorStore.graphManagerState.graphManager.elementToEntity(this.workflowEditorState.packageableRuntime),
|
169
|
+
], { pretty: true })));
|
170
|
+
const connectionGrammarCode = (yield this.editorStore.graphManagerState.graphManager.entitiesToPureCode([
|
171
|
+
this.editorStore.graphManagerState.graphManager.elementToEntity(guaranteeNonNullable(this.workflowEditorState.packageableConnection)),
|
172
|
+
], { pretty: true }));
|
173
|
+
this.workflowEditorState.connectionGrammarCode = connectionGrammarCode;
|
174
|
+
}
|
175
|
+
catch (error) {
|
176
|
+
assertErrorThrown(error);
|
177
|
+
this.editorStore.applicationStore.logService.error(LogEvent.create(LEGEND_STUDIO_APP_EVENT.DATABASE_MODEL_BUILDER_FAILURE), error);
|
178
|
+
this.editorStore.applicationStore.notificationService.notifyError(error);
|
179
|
+
}
|
180
|
+
}
|
181
|
+
*handleNext() {
|
182
|
+
this.workflowEditorState.setFinalGrammarCode(this.databaseModelBuilderState.generatedGrammarCode
|
183
|
+
.concat(this.workflowEditorState.runtimeGrammarCode)
|
184
|
+
.concat(this.workflowEditorState.databaseGrammarCode)
|
185
|
+
.concat(this.workflowEditorState.connectionGrammarCode));
|
186
|
+
this.workflowEditorState.activeStepToBaseStepperState.set(QUERY_CONNECTION_WORKFLOW_STEPS.CONFIRMATION, new QueryConnectionConfirmationAndGrammarEditorStepperState(this.workflowEditorState));
|
187
|
+
}
|
188
|
+
}
|
189
|
+
// step 3 - database grammar editor
|
190
|
+
export class DatabaseGrammarEditorStepperState extends ConnectionToQueryStepperState {
|
191
|
+
workflowEditorState;
|
192
|
+
isCompilingGrammarCode = ActionState.create();
|
193
|
+
editorStore;
|
194
|
+
constructor(queryConnectionEndToEndWorkflowState) {
|
195
|
+
super();
|
196
|
+
makeObservable(this, {
|
197
|
+
workflowEditorState: false,
|
198
|
+
isCompilingGrammarCode: observable,
|
199
|
+
buildDatabaseModelBuilderState: action,
|
200
|
+
compileDatabaseGrammarCode: flow,
|
201
|
+
handleNext: flow,
|
202
|
+
});
|
203
|
+
this.workflowEditorState = queryConnectionEndToEndWorkflowState;
|
204
|
+
this.editorStore = this.workflowEditorState.editorStore;
|
205
|
+
}
|
206
|
+
get label() {
|
207
|
+
return QUERY_CONNECTION_WORKFLOW_STEPS.EDIT_DATABASE;
|
208
|
+
}
|
209
|
+
*compileDatabaseGrammarCode() {
|
210
|
+
try {
|
211
|
+
this.isCompilingGrammarCode.inProgress();
|
212
|
+
const databaseBuilderStepperState = this.workflowEditorState.activeStepToBaseStepperState.get(QUERY_CONNECTION_WORKFLOW_STEPS.CREATE_DATABASE);
|
213
|
+
const connectionValueStepperState = this.workflowEditorState.activeStepToBaseStepperState.get(QUERY_CONNECTION_WORKFLOW_STEPS.CREATE_CONNECTION);
|
214
|
+
const compilationResult = (yield flowResult(yield this.editorStore.graphManagerState.graphManager.compileText(this.workflowEditorState.databaseGrammarCode, this.workflowEditorState.workflowGraph)));
|
215
|
+
this.editorStore.applicationStore.notificationService.notifySuccess('Compiled successfully');
|
216
|
+
const entities = compilationResult.entities;
|
217
|
+
const newGraph = this.editorStore.graphManagerState.createNewGraph();
|
218
|
+
yield flowResult(this.editorStore.graphManagerState.graphManager.buildGraph(newGraph, entities, ActionState.create()));
|
219
|
+
if (newGraph.databases.length > 1) {
|
220
|
+
this.workflowEditorState.isValid = false;
|
221
|
+
this.editorStore.applicationStore.notificationService.notifyError('Please make sure there is only one databse');
|
222
|
+
}
|
223
|
+
else {
|
224
|
+
this.workflowEditorState.isValid = true;
|
225
|
+
}
|
226
|
+
// databaseBuilderWizardState.schemaExplorerState.database needs to be updated
|
227
|
+
databaseBuilderStepperState.databaseBuilderWizardState.schemaExplorerState.database =
|
228
|
+
getNonNullableEntry(newGraph.databases, 0);
|
229
|
+
this.workflowEditorState.workflowGraph = newGraph;
|
230
|
+
// start building packageableConnection based on database and adding it to current graph
|
231
|
+
const packageableConnection = new PackageableConnection(extractElementNameFromPath(connectionValueStepperState.targetConnectionPath));
|
232
|
+
connectionValueStepperState.connectionValueState.connection.store =
|
233
|
+
PackageableElementExplicitReference.create(databaseBuilderStepperState.databaseBuilderWizardState
|
234
|
+
.schemaExplorerState.database);
|
235
|
+
packageableConnection.package = getOrCreatePackage(this.workflowEditorState.workflowGraph.root, connectionValueStepperState.targetConnectionPath, true, new Map());
|
236
|
+
packageableConnection_setConnectionValue(packageableConnection, connectionValueStepperState.connectionValueState.connection, this.workflowEditorState.editorStore.changeDetectionState
|
237
|
+
.observerContext);
|
238
|
+
this.workflowEditorState.packageableConnection = packageableConnection;
|
239
|
+
this.workflowEditorState.workflowGraph.addElement(packageableConnection, extractPackagePathFromPath(connectionValueStepperState.targetConnectionPath));
|
240
|
+
this.workflowEditorState.setCompileError(undefined);
|
241
|
+
this.isCompilingGrammarCode.pass();
|
242
|
+
}
|
243
|
+
catch (error) {
|
244
|
+
if (error instanceof ParserError || error instanceof CompilationError) {
|
245
|
+
this.workflowEditorState.setCompileError(error);
|
246
|
+
}
|
247
|
+
this.workflowEditorState.isValid = false;
|
248
|
+
assertErrorThrown(error);
|
249
|
+
this.editorStore.applicationStore.logService.error(LogEvent.create(LEGEND_STUDIO_APP_EVENT.DATABASE_MODEL_BUILDER_FAILURE), error);
|
250
|
+
this.editorStore.applicationStore.notificationService.notifyError(error);
|
251
|
+
this.isCompilingGrammarCode.fail();
|
252
|
+
}
|
253
|
+
finally {
|
254
|
+
this.isCompilingGrammarCode.complete();
|
255
|
+
}
|
256
|
+
}
|
257
|
+
buildDatabaseModelBuilderState() {
|
258
|
+
const databaseBuilderStepperState = this.workflowEditorState.activeStepToBaseStepperState.get(QUERY_CONNECTION_WORKFLOW_STEPS.CREATE_DATABASE);
|
259
|
+
const databaseModelBuilderState = new DatabaseModelBuilderState(this.editorStore, databaseBuilderStepperState.databaseBuilderWizardState.schemaExplorerState.database, false, this.workflowEditorState.workflowGraph);
|
260
|
+
this.workflowEditorState.activeStepToBaseStepperState.set(QUERY_CONNECTION_WORKFLOW_STEPS.CREATE_CLASS_MAPPING_RUNTIME, new DatabaseModelBuilderStepperState(this.workflowEditorState, databaseModelBuilderState));
|
261
|
+
}
|
262
|
+
*handleNext() {
|
263
|
+
yield flowResult(this.compileDatabaseGrammarCode()).then(() => {
|
264
|
+
this.buildDatabaseModelBuilderState();
|
265
|
+
});
|
266
|
+
}
|
267
|
+
}
|
268
|
+
// step 2 - build database
|
269
|
+
export class DatabaseBuilderStepperState extends ConnectionToQueryStepperState {
|
270
|
+
workflowEditorState;
|
271
|
+
databaseBuilderWizardState;
|
272
|
+
isGeneratingDatabaseGrammarCode = ActionState.create();
|
273
|
+
editorStore;
|
274
|
+
constructor(queryConnectionEndToEndWorkflowState, databaseBuilderWizardState) {
|
275
|
+
super();
|
276
|
+
makeObservable(this, {
|
277
|
+
workflowEditorState: false,
|
278
|
+
databaseBuilderWizardState: observable,
|
279
|
+
isGeneratingDatabaseGrammarCode: observable,
|
280
|
+
handleNext: flow,
|
281
|
+
generateDatabaseGrammarCode: flow,
|
282
|
+
buildDatabase: flow,
|
283
|
+
});
|
284
|
+
this.workflowEditorState = queryConnectionEndToEndWorkflowState;
|
285
|
+
this.databaseBuilderWizardState = databaseBuilderWizardState;
|
286
|
+
this.editorStore = this.workflowEditorState.editorStore;
|
287
|
+
}
|
288
|
+
get label() {
|
289
|
+
return QUERY_CONNECTION_WORKFLOW_STEPS.CREATE_DATABASE;
|
290
|
+
}
|
291
|
+
*buildDatabase() {
|
292
|
+
try {
|
293
|
+
if (!this.databaseBuilderWizardState.schemaExplorerState.treeData) {
|
294
|
+
return;
|
295
|
+
}
|
296
|
+
yield flowResult(this.databaseBuilderWizardState.schemaExplorerState.updateDatabase());
|
297
|
+
}
|
298
|
+
catch (error) {
|
299
|
+
assertErrorThrown(error);
|
300
|
+
this.editorStore.applicationStore.logService.error(LogEvent.create(LEGEND_STUDIO_APP_EVENT.DATABASE_BUILDER_FAILURE), error);
|
301
|
+
this.editorStore.applicationStore.notificationService.notifyError(error);
|
302
|
+
this.isGeneratingDatabaseGrammarCode.fail();
|
303
|
+
}
|
304
|
+
}
|
305
|
+
*generateDatabaseGrammarCode() {
|
306
|
+
try {
|
307
|
+
this.isGeneratingDatabaseGrammarCode.inProgress();
|
308
|
+
// can't use this.databaseBuilderState.databaseGrammarCode as databaseGrammarCode might not be up to date
|
309
|
+
this.workflowEditorState.setDatabaseGrammarCode(JOIN_CODE_SYNTAX +
|
310
|
+
(yield this.editorStore.graphManagerState.graphManager.entitiesToPureCode([
|
311
|
+
this.editorStore.graphManagerState.graphManager.elementToEntity(this.databaseBuilderWizardState.schemaExplorerState.database),
|
312
|
+
], { pretty: true })));
|
313
|
+
this.isGeneratingDatabaseGrammarCode.pass();
|
314
|
+
}
|
315
|
+
catch (error) {
|
316
|
+
assertErrorThrown(error);
|
317
|
+
this.editorStore.applicationStore.logService.error(LogEvent.create(LEGEND_STUDIO_APP_EVENT.DATABASE_MODEL_BUILDER_FAILURE), error);
|
318
|
+
this.editorStore.applicationStore.notificationService.notifyError(error);
|
319
|
+
this.isGeneratingDatabaseGrammarCode.fail();
|
320
|
+
}
|
321
|
+
}
|
322
|
+
*handleNext() {
|
323
|
+
yield flowResult(this.buildDatabase());
|
324
|
+
yield flowResult(this.generateDatabaseGrammarCode());
|
325
|
+
this.workflowEditorState.activeStepToBaseStepperState.set(QUERY_CONNECTION_WORKFLOW_STEPS.EDIT_DATABASE, new DatabaseGrammarEditorStepperState(this.workflowEditorState));
|
326
|
+
}
|
327
|
+
}
|
328
|
+
// step 1 - build connection
|
329
|
+
export class ConnectionValueStepperState extends ConnectionToQueryStepperState {
|
330
|
+
workflowEditorState;
|
331
|
+
targetConnectionPath = DEFAULT_CONNECTION_PATH;
|
332
|
+
connectionValueState;
|
333
|
+
constructor(workflowEditorState) {
|
334
|
+
super();
|
335
|
+
makeObservable(this, {
|
336
|
+
workflowEditorState: false,
|
337
|
+
targetConnectionPath: observable,
|
338
|
+
connectionValueState: observable,
|
339
|
+
setTargetConnectionPath: action,
|
340
|
+
handleNext: flow,
|
341
|
+
});
|
342
|
+
this.workflowEditorState = workflowEditorState;
|
343
|
+
this.connectionValueState = new RelationalDatabaseConnectionValueState(this.workflowEditorState.editorStore, observe_RelationalDatabaseConnection(this.createConnection, this.workflowEditorState.editorStore.changeDetectionState
|
344
|
+
.observerContext));
|
345
|
+
}
|
346
|
+
get createConnection() {
|
347
|
+
const spec = new LocalH2DatasourceSpecification();
|
348
|
+
spec.testDataSetupSqls = [DEFAULT_H2_SQL];
|
349
|
+
const connection = new RelationalDatabaseConnection(PackageableElementExplicitReference.create(stub_Database()), DatabaseType.H2, spec, new DefaultH2AuthenticationStrategy());
|
350
|
+
return connection;
|
351
|
+
}
|
352
|
+
get label() {
|
353
|
+
return QUERY_CONNECTION_WORKFLOW_STEPS.CREATE_CONNECTION;
|
354
|
+
}
|
355
|
+
setTargetConnectionPath(val) {
|
356
|
+
this.targetConnectionPath = val;
|
357
|
+
}
|
358
|
+
*handleNext() {
|
359
|
+
const databaseBuilderWizardState = new DatabaseBuilderWizardState(this.workflowEditorState.editorStore, this.connectionValueState.connection, false);
|
360
|
+
databaseBuilderWizardState.schemaExplorerState.setMakeTargetDatabasePathEditable(true);
|
361
|
+
this.workflowEditorState.activeStepToBaseStepperState.set(QUERY_CONNECTION_WORKFLOW_STEPS.CREATE_DATABASE, new DatabaseBuilderStepperState(this.workflowEditorState, databaseBuilderWizardState));
|
362
|
+
}
|
363
|
+
}
|
364
|
+
export class QueryConnectionEndToEndWorkflowEditorState extends EndToEndWorkflowEditorState {
|
365
|
+
activeStep;
|
366
|
+
activeStepToBaseStepperState = new Map();
|
367
|
+
activeStepToStepLabel = new Map();
|
368
|
+
targetRuntimePath = DEFAULT_RUNTIME_PATH;
|
369
|
+
packageableConnection;
|
370
|
+
packageableRuntime;
|
371
|
+
databaseGrammarCode = '';
|
372
|
+
runtimeGrammarCode = '';
|
373
|
+
connectionGrammarCode = '';
|
374
|
+
finalGrammarCode = '';
|
375
|
+
workflowGraph;
|
376
|
+
isValid;
|
377
|
+
compileError;
|
378
|
+
constructor(editorStore) {
|
379
|
+
super(editorStore);
|
380
|
+
makeObservable(this, {
|
381
|
+
activeStep: observable,
|
382
|
+
activeStepToBaseStepperState: observable,
|
383
|
+
compileError: observable,
|
384
|
+
packageableRuntime: observable,
|
385
|
+
runtimeGrammarCode: observable,
|
386
|
+
connectionGrammarCode: observable,
|
387
|
+
finalGrammarCode: observable,
|
388
|
+
targetRuntimePath: observable,
|
389
|
+
isValid: observable,
|
390
|
+
packageableConnection: observable,
|
391
|
+
setActiveStep: action,
|
392
|
+
setDatabaseGrammarCode: action,
|
393
|
+
setRuntimeGrammarCode: action,
|
394
|
+
setTargetRuntimePath: action,
|
395
|
+
setFinalGrammarCode: action,
|
396
|
+
setCompileError: action,
|
397
|
+
reset: action,
|
398
|
+
updateRuntime: flow,
|
399
|
+
});
|
400
|
+
this.activeStep = 0;
|
401
|
+
this.isValid = true;
|
402
|
+
this.activeStepToBaseStepperState.set(QUERY_CONNECTION_WORKFLOW_STEPS.CREATE_CONNECTION, new ConnectionValueStepperState(this));
|
403
|
+
this.workflowGraph = this.editorStore.graphManagerState.createNewGraph();
|
404
|
+
this.initactiveStepToStepLabel();
|
405
|
+
}
|
406
|
+
get label() {
|
407
|
+
return END_TO_END_WORKFLOWS.CREATE_QUERY_FROM_CONNECTION;
|
408
|
+
}
|
409
|
+
initactiveStepToStepLabel() {
|
410
|
+
Object.values(QUERY_CONNECTION_WORKFLOW_STEPS).forEach((val, index) => this.activeStepToStepLabel.set(index, val));
|
411
|
+
}
|
412
|
+
setActiveStep(step) {
|
413
|
+
this.activeStep = step;
|
414
|
+
}
|
415
|
+
setTargetRuntimePath(val) {
|
416
|
+
this.targetRuntimePath = val;
|
417
|
+
}
|
418
|
+
setRuntimeGrammarCode(val) {
|
419
|
+
this.runtimeGrammarCode = val;
|
420
|
+
}
|
421
|
+
setDatabaseGrammarCode(code) {
|
422
|
+
this.databaseGrammarCode = code;
|
423
|
+
}
|
424
|
+
setFinalGrammarCode(val) {
|
425
|
+
this.finalGrammarCode = val;
|
426
|
+
}
|
427
|
+
setCompileError(err) {
|
428
|
+
this.compileError = err;
|
429
|
+
}
|
430
|
+
*updateRuntime(newPath) {
|
431
|
+
if (this.packageableRuntime) {
|
432
|
+
this.packageableRuntime.package = getOrCreatePackage(this.workflowGraph.root, extractPackagePathFromPath(newPath) ?? newPath, true, new Map());
|
433
|
+
if (newPath.includes('::')) {
|
434
|
+
this.packageableRuntime.name = extractElementNameFromPath(newPath);
|
435
|
+
}
|
436
|
+
else {
|
437
|
+
this.packageableRuntime.name = newPath;
|
438
|
+
}
|
439
|
+
this.packageableRuntime.name = extractElementNameFromPath(newPath);
|
440
|
+
this.setRuntimeGrammarCode((yield this.editorStore.graphManagerState.graphManager.entitiesToPureCode([
|
441
|
+
this.editorStore.graphManagerState.graphManager.elementToEntity(this.packageableRuntime),
|
442
|
+
], { pretty: true })));
|
443
|
+
}
|
444
|
+
}
|
445
|
+
reset() {
|
446
|
+
this.activeStep = -1;
|
447
|
+
this.workflowGraph = this.editorStore.graphManagerState.createNewGraph();
|
448
|
+
this.packageableConnection = undefined;
|
449
|
+
this.packageableRuntime = undefined;
|
450
|
+
this.activeStepToBaseStepperState.set(QUERY_CONNECTION_WORKFLOW_STEPS.CREATE_CONNECTION, new ConnectionValueStepperState(this));
|
451
|
+
}
|
452
|
+
}
|
453
|
+
//# sourceMappingURL=QueryConnectionEndToEndWorkflowEditorState.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"QueryConnectionEndToEndWorkflowEditorState.js","sourceRoot":"","sources":["../../../../../src/stores/editor/editor-state/end-to-end-workflow-state/QueryConnectionEndToEndWorkflowEditorState.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,UAAU,EA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