@finos/legend-application-studio 28.18.131 → 28.18.133
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/application/LegendIngestionConfiguration.d.ts +1 -0
- package/lib/application/LegendIngestionConfiguration.d.ts.map +1 -1
- package/lib/application/LegendIngestionConfiguration.js +3 -1
- package/lib/application/LegendIngestionConfiguration.js.map +1 -1
- package/lib/components/editor/Editor.d.ts.map +1 -1
- package/lib/components/editor/Editor.js +2 -1
- package/lib/components/editor/Editor.js.map +1 -1
- package/lib/components/editor/editor-group/dataProduct/DataPoductEditor.d.ts.map +1 -1
- package/lib/components/editor/editor-group/dataProduct/DataPoductEditor.js +52 -4
- package/lib/components/editor/editor-group/dataProduct/DataPoductEditor.js.map +1 -1
- package/lib/index.css +1 -1
- package/lib/package.json +1 -1
- package/lib/stores/editor/EditorStore.d.ts +2 -1
- package/lib/stores/editor/EditorStore.d.ts.map +1 -1
- package/lib/stores/editor/EditorStore.js +24 -11
- package/lib/stores/editor/EditorStore.js.map +1 -1
- package/lib/stores/editor/EditorTabManagerState.js +1 -1
- package/lib/stores/editor/EditorTabManagerState.js.map +1 -1
- package/lib/stores/editor/editor-state/element-editor-state/ElementEditorInitialConfiguration.d.ts +7 -0
- package/lib/stores/editor/editor-state/element-editor-state/ElementEditorInitialConfiguration.d.ts.map +1 -1
- package/lib/stores/editor/editor-state/element-editor-state/ElementEditorInitialConfiguration.js +17 -0
- package/lib/stores/editor/editor-state/element-editor-state/ElementEditorInitialConfiguration.js.map +1 -1
- package/lib/stores/editor/editor-state/element-editor-state/dataProduct/DataProductEditorState.d.ts +17 -3
- package/lib/stores/editor/editor-state/element-editor-state/dataProduct/DataProductEditorState.d.ts.map +1 -1
- package/lib/stores/editor/editor-state/element-editor-state/dataProduct/DataProductEditorState.js +73 -3
- package/lib/stores/editor/editor-state/element-editor-state/dataProduct/DataProductEditorState.js.map +1 -1
- package/lib/stores/ingestion/AdhocDataProductDeployResponse.d.ts +21 -0
- package/lib/stores/ingestion/AdhocDataProductDeployResponse.d.ts.map +1 -0
- package/lib/stores/ingestion/AdhocDataProductDeployResponse.js +24 -0
- package/lib/stores/ingestion/AdhocDataProductDeployResponse.js.map +1 -0
- package/lib/stores/ingestion/IngestDeploymentServerClient.d.ts +4 -0
- package/lib/stores/ingestion/IngestDeploymentServerClient.d.ts.map +1 -1
- package/lib/stores/ingestion/IngestDeploymentServerClient.js +5 -0
- package/lib/stores/ingestion/IngestDeploymentServerClient.js.map +1 -1
- package/lib/stores/ingestion/IngestionManager.d.ts +4 -1
- package/lib/stores/ingestion/IngestionManager.d.ts.map +1 -1
- package/lib/stores/ingestion/IngestionManager.js +25 -7
- package/lib/stores/ingestion/IngestionManager.js.map +1 -1
- package/lib/stores/lazy-text-editor/LazyTextEditorStore.d.ts.map +1 -1
- package/lib/stores/lazy-text-editor/LazyTextEditorStore.js +1 -1
- package/lib/stores/lazy-text-editor/LazyTextEditorStore.js.map +1 -1
- package/package.json +6 -6
- package/src/application/LegendIngestionConfiguration.ts +3 -1
- package/src/components/editor/Editor.tsx +2 -0
- package/src/components/editor/editor-group/dataProduct/DataPoductEditor.tsx +146 -0
- package/src/stores/editor/EditorStore.ts +38 -20
- package/src/stores/editor/EditorTabManagerState.ts +1 -1
- package/src/stores/editor/editor-state/element-editor-state/ElementEditorInitialConfiguration.ts +26 -0
- package/src/stores/editor/editor-state/element-editor-state/dataProduct/DataProductEditorState.ts +120 -2
- package/src/stores/ingestion/AdhocDataProductDeployResponse.ts +29 -0
- package/src/stores/ingestion/IngestDeploymentServerClient.ts +18 -0
- package/src/stores/ingestion/IngestionManager.ts +51 -11
- package/src/stores/lazy-text-editor/LazyTextEditorStore.ts +1 -0
- package/tsconfig.json +1 -0
@@ -18,7 +18,12 @@ import type { AppDirNode } from '@finos/legend-graph';
|
|
18
18
|
import { IngestDeploymentServerClient } from './IngestDeploymentServerClient.js';
|
19
19
|
import { IngestDiscoveryServerClient } from './IngestDiscoveryServerClient.js';
|
20
20
|
import type { GenericLegendApplicationStore } from '@finos/legend-application';
|
21
|
-
import {
|
21
|
+
import {
|
22
|
+
NetworkClientError,
|
23
|
+
type ActionState,
|
24
|
+
type PlainObject,
|
25
|
+
assertErrorThrown,
|
26
|
+
} from '@finos/legend-shared';
|
22
27
|
import {
|
23
28
|
type IngestDefinitionValidationResponse,
|
24
29
|
IngestDefinitionDeploymentResponse,
|
@@ -30,13 +35,18 @@ import {
|
|
30
35
|
IngestDeploymentServerConfig,
|
31
36
|
type LegendIngestionConfiguration,
|
32
37
|
} from '../../application/LegendIngestionConfiguration.js';
|
38
|
+
import {
|
39
|
+
createAdhocDataProductDeployResponse,
|
40
|
+
type AdhocDataProductDeployResponse,
|
41
|
+
} from './AdhocDataProductDeployResponse.js';
|
33
42
|
|
34
43
|
export class IngestionManager {
|
44
|
+
private readonly applicationStore: GenericLegendApplicationStore;
|
35
45
|
private ingestDiscoveryServerClient: IngestDiscoveryServerClient;
|
36
46
|
private ingestDeploymentServerClient: IngestDeploymentServerClient;
|
37
47
|
private _currentAppID: number | undefined;
|
38
48
|
private _currentLevel: string | undefined;
|
39
|
-
private
|
49
|
+
private useDefaultServer = false;
|
40
50
|
|
41
51
|
constructor(
|
42
52
|
config: LegendIngestionConfiguration,
|
@@ -54,6 +64,7 @@ export class IngestionManager {
|
|
54
64
|
this.ingestDeploymentServerClient.setTracerService(
|
55
65
|
applicationStore.tracerService,
|
56
66
|
);
|
67
|
+
this.useDefaultServer = Boolean(config.deployment.useDefaultServer);
|
57
68
|
this.applicationStore = applicationStore;
|
58
69
|
}
|
59
70
|
|
@@ -78,7 +89,7 @@ export class IngestionManager {
|
|
78
89
|
actionState?.setMessage(
|
79
90
|
`Discovering associated ingest environment for DID ${appDirNode.appDirId}...`,
|
80
91
|
);
|
81
|
-
|
92
|
+
await this.identifyIngestDeploymentServer(appDirNode, token);
|
82
93
|
actionState?.setMessage(
|
83
94
|
`Validating ingest with server ${this.ingestDeploymentServerClient.baseUrl ?? ''} for realm ${this.ingestDeploymentServerClient.environmentClassification}...`,
|
84
95
|
);
|
@@ -109,6 +120,27 @@ export class IngestionManager {
|
|
109
120
|
return fullResponse;
|
110
121
|
}
|
111
122
|
|
123
|
+
async deployDataProduct(
|
124
|
+
grammarText: string,
|
125
|
+
appDirNode: AppDirNode,
|
126
|
+
actionState: ActionState | undefined,
|
127
|
+
token: string | undefined,
|
128
|
+
): Promise<AdhocDataProductDeployResponse> {
|
129
|
+
actionState?.setMessage(
|
130
|
+
`Discovering associated data product environment for DID ${appDirNode.appDirId}...`,
|
131
|
+
);
|
132
|
+
await this.identifyIngestDeploymentServer(appDirNode, token);
|
133
|
+
actionState?.setMessage(
|
134
|
+
`Deploying data product with server ${this.ingestDeploymentServerClient.baseUrl ?? ''} for realm ${this.ingestDeploymentServerClient.environmentClassification}...`,
|
135
|
+
);
|
136
|
+
const deployResponse =
|
137
|
+
await this.ingestDeploymentServerClient.deployDataProduct(
|
138
|
+
grammarText,
|
139
|
+
token,
|
140
|
+
);
|
141
|
+
return createAdhocDataProductDeployResponse(deployResponse);
|
142
|
+
}
|
143
|
+
|
112
144
|
private async _validate(
|
113
145
|
ingestDefinition: string,
|
114
146
|
appDirNode: AppDirNode | undefined,
|
@@ -117,12 +149,21 @@ export class IngestionManager {
|
|
117
149
|
if (appDirNode) {
|
118
150
|
await this.identifyIngestDeploymentServer(appDirNode, token);
|
119
151
|
}
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
|
152
|
+
try {
|
153
|
+
const response = await this.ingestDeploymentServerClient.validate(
|
154
|
+
ingestDefinition,
|
155
|
+
token,
|
156
|
+
);
|
157
|
+
return createIngestDefinitionValidationResponse(response);
|
158
|
+
} catch (error) {
|
159
|
+
assertErrorThrown(error);
|
160
|
+
if (error instanceof NetworkClientError) {
|
161
|
+
return createIngestDefinitionValidationResponse(
|
162
|
+
error.payload as PlainObject<IngestDefinitionValidationResponse>,
|
163
|
+
);
|
164
|
+
}
|
165
|
+
throw error;
|
166
|
+
}
|
126
167
|
}
|
127
168
|
|
128
169
|
private async _deploy(
|
@@ -146,7 +187,7 @@ export class IngestionManager {
|
|
146
187
|
token: string | undefined,
|
147
188
|
): Promise<void> {
|
148
189
|
// we do not change if current appDirNode is the same as the one we are trying to set
|
149
|
-
if (this.isCurrentAppDirNode(appDirNode)) {
|
190
|
+
if (this.useDefaultServer || this.isCurrentAppDirNode(appDirNode)) {
|
150
191
|
return;
|
151
192
|
}
|
152
193
|
const serverConfig = IngestDeploymentServerConfig.serialization.fromJson(
|
@@ -156,7 +197,6 @@ export class IngestionManager {
|
|
156
197
|
token,
|
157
198
|
),
|
158
199
|
);
|
159
|
-
|
160
200
|
this.ingestDeploymentServerClient.changeServer(serverConfig);
|
161
201
|
this.setCurrentAppDirNode(appDirNode);
|
162
202
|
}
|
package/tsconfig.json
CHANGED
@@ -205,6 +205,7 @@
|
|
205
205
|
"./src/stores/graph-modifier/STO_FlatData_GraphModifierHelper.ts",
|
206
206
|
"./src/stores/graph-modifier/STO_Relational_GraphModifierHelper.ts",
|
207
207
|
"./src/stores/graph-modifier/Testable_GraphModifierHelper.ts",
|
208
|
+
"./src/stores/ingestion/AdhocDataProductDeployResponse.ts",
|
208
209
|
"./src/stores/ingestion/IngestDeploymentServerClient.ts",
|
209
210
|
"./src/stores/ingestion/IngestDiscoveryServerClient.ts",
|
210
211
|
"./src/stores/ingestion/IngestionDeploymentResponse.ts",
|