@finos/legend-extension-dsl-service 0.0.1
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/LICENSE +201 -0
- package/README.md +3 -0
- package/lib/components/studio/DSL_Service_LegendStudioApplicationPlugin.d.ts +22 -0
- package/lib/components/studio/DSL_Service_LegendStudioApplicationPlugin.d.ts.map +1 -0
- package/lib/components/studio/DSL_Service_LegendStudioApplicationPlugin.js +59 -0
- package/lib/components/studio/DSL_Service_LegendStudioApplicationPlugin.js.map +1 -0
- package/lib/components/studio/ServiceQueryEditor.d.ts +25 -0
- package/lib/components/studio/ServiceQueryEditor.d.ts.map +1 -0
- package/lib/components/studio/ServiceQueryEditor.js +190 -0
- package/lib/components/studio/ServiceQueryEditor.js.map +1 -0
- package/lib/components/studio/ServiceQueryEditorReviewAction.d.ts +19 -0
- package/lib/components/studio/ServiceQueryEditorReviewAction.d.ts.map +1 -0
- package/lib/components/studio/ServiceQueryEditorReviewAction.js +71 -0
- package/lib/components/studio/ServiceQueryEditorReviewAction.js.map +1 -0
- package/lib/components/studio/ServiceQueryEditorStoreProvider.d.ts +31 -0
- package/lib/components/studio/ServiceQueryEditorStoreProvider.d.ts.map +1 -0
- package/lib/components/studio/ServiceQueryEditorStoreProvider.js +40 -0
- package/lib/components/studio/ServiceQueryEditorStoreProvider.js.map +1 -0
- package/lib/components/studio/ServiceQueryEditorWorkspaceStatus.d.ts +19 -0
- package/lib/components/studio/ServiceQueryEditorWorkspaceStatus.d.ts.map +1 -0
- package/lib/components/studio/ServiceQueryEditorWorkspaceStatus.js +69 -0
- package/lib/components/studio/ServiceQueryEditorWorkspaceStatus.js.map +1 -0
- package/lib/components/studio/UpdateProjectServiceQuerySetup.d.ts +18 -0
- package/lib/components/studio/UpdateProjectServiceQuerySetup.d.ts.map +1 -0
- package/lib/components/studio/UpdateProjectServiceQuerySetup.js +182 -0
- package/lib/components/studio/UpdateProjectServiceQuerySetup.js.map +1 -0
- package/lib/components/studio/UpdateServiceQuerySetup.d.ts +18 -0
- package/lib/components/studio/UpdateServiceQuerySetup.d.ts.map +1 -0
- package/lib/components/studio/UpdateServiceQuerySetup.js +172 -0
- package/lib/components/studio/UpdateServiceQuerySetup.js.map +1 -0
- package/lib/index.css +17 -0
- package/lib/index.css.map +1 -0
- package/lib/index.d.ts +17 -0
- package/lib/index.d.ts.map +1 -0
- package/lib/index.js +17 -0
- package/lib/index.js.map +1 -0
- package/lib/package.json +84 -0
- package/lib/stores/studio/DSL_Service_LegendStudioRouter.d.ts +53 -0
- package/lib/stores/studio/DSL_Service_LegendStudioRouter.d.ts.map +1 -0
- package/lib/stores/studio/DSL_Service_LegendStudioRouter.js +62 -0
- package/lib/stores/studio/DSL_Service_LegendStudioRouter.js.map +1 -0
- package/lib/stores/studio/ServiceQueryEditorStore.d.ts +64 -0
- package/lib/stores/studio/ServiceQueryEditorStore.d.ts.map +1 -0
- package/lib/stores/studio/ServiceQueryEditorStore.js +260 -0
- package/lib/stores/studio/ServiceQueryEditorStore.js.map +1 -0
- package/lib/stores/studio/UpdateProjectServiceQuerySetupStore.d.ts +46 -0
- package/lib/stores/studio/UpdateProjectServiceQuerySetupStore.d.ts.map +1 -0
- package/lib/stores/studio/UpdateProjectServiceQuerySetupStore.js +184 -0
- package/lib/stores/studio/UpdateProjectServiceQuerySetupStore.js.map +1 -0
- package/lib/stores/studio/UpdateServiceQuerySetupStore.d.ts +48 -0
- package/lib/stores/studio/UpdateServiceQuerySetupStore.d.ts.map +1 -0
- package/lib/stores/studio/UpdateServiceQuerySetupStore.js +184 -0
- package/lib/stores/studio/UpdateServiceQuerySetupStore.js.map +1 -0
- package/package.json +84 -0
- package/src/components/studio/DSL_Service_LegendStudioApplicationPlugin.tsx +71 -0
- package/src/components/studio/ServiceQueryEditor.tsx +551 -0
- package/src/components/studio/ServiceQueryEditorReviewAction.tsx +172 -0
- package/src/components/studio/ServiceQueryEditorStoreProvider.tsx +89 -0
- package/src/components/studio/ServiceQueryEditorWorkspaceStatus.tsx +121 -0
- package/src/components/studio/UpdateProjectServiceQuerySetup.tsx +479 -0
- package/src/components/studio/UpdateServiceQuerySetup.tsx +476 -0
- package/src/index.ts +17 -0
- package/src/stores/studio/DSL_Service_LegendStudioRouter.ts +159 -0
- package/src/stores/studio/ServiceQueryEditorStore.ts +487 -0
- package/src/stores/studio/UpdateProjectServiceQuerySetupStore.ts +281 -0
- package/src/stores/studio/UpdateServiceQuerySetupStore.ts +314 -0
- package/tsconfig.json +58 -0
- package/tsconfig.package.json +38 -0
|
@@ -0,0 +1,184 @@
|
|
|
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 { observable, makeObservable, flowResult, flow, action } from 'mobx';
|
|
17
|
+
import { ActionState, assertErrorThrown, guaranteeNonNullable, LogEvent, } from '@finos/legend-shared';
|
|
18
|
+
import { DepotScope, ProjectData, MASTER_SNAPSHOT_ALIAS, } from '@finos/legend-server-depot';
|
|
19
|
+
import { extractServiceInfo, } from '@finos/legend-query-builder';
|
|
20
|
+
import { Workspace, WorkspaceType, } from '@finos/legend-server-sdlc';
|
|
21
|
+
import { LEGEND_STUDIO_APP_EVENT, } from '@finos/legend-application-studio';
|
|
22
|
+
import { generateServiceQueryUpdaterSetupRoute, parseServiceCoordinates, } from './DSL_Service_LegendStudioRouter.js';
|
|
23
|
+
import { CORE_PURE_PATH } from '@finos/legend-graph';
|
|
24
|
+
const MINIMUM_SERVICE_LOADER_SEARCH_LENGTH = 3;
|
|
25
|
+
const DEFAULT_SERVICE_LOADER_LIMIT = 10;
|
|
26
|
+
export class UpdateServiceQuerySetupStore {
|
|
27
|
+
applicationStore;
|
|
28
|
+
sdlcServerClient;
|
|
29
|
+
depotServerClient;
|
|
30
|
+
initState = ActionState.create();
|
|
31
|
+
loadServicesState = ActionState.create();
|
|
32
|
+
services = [];
|
|
33
|
+
currentProject;
|
|
34
|
+
currentSnapshotService;
|
|
35
|
+
loadWorkspacesState = ActionState.create();
|
|
36
|
+
createWorkspaceState = ActionState.create();
|
|
37
|
+
groupWorkspaces = [];
|
|
38
|
+
currentGroupWorkspace;
|
|
39
|
+
currentWorkspaceService;
|
|
40
|
+
checkWorkspaceCompatibilityState = ActionState.create();
|
|
41
|
+
showCreateWorkspaceModal = false;
|
|
42
|
+
constructor(applicationStore, sdlcServerClient, depotServerClient) {
|
|
43
|
+
makeObservable(this, {
|
|
44
|
+
services: observable,
|
|
45
|
+
currentProject: observable,
|
|
46
|
+
currentSnapshotService: observable,
|
|
47
|
+
groupWorkspaces: observable,
|
|
48
|
+
currentGroupWorkspace: observable,
|
|
49
|
+
currentWorkspaceService: observable,
|
|
50
|
+
showCreateWorkspaceModal: observable,
|
|
51
|
+
setShowCreateWorkspaceModal: action,
|
|
52
|
+
resetCurrentService: action,
|
|
53
|
+
resetCurrentGroupWorkspace: action,
|
|
54
|
+
initialize: flow,
|
|
55
|
+
loadServices: flow,
|
|
56
|
+
changeService: flow,
|
|
57
|
+
changeWorkspace: flow,
|
|
58
|
+
createWorkspace: flow,
|
|
59
|
+
});
|
|
60
|
+
this.applicationStore = applicationStore;
|
|
61
|
+
this.sdlcServerClient = sdlcServerClient;
|
|
62
|
+
this.depotServerClient = depotServerClient;
|
|
63
|
+
}
|
|
64
|
+
setShowCreateWorkspaceModal(val) {
|
|
65
|
+
this.showCreateWorkspaceModal = val;
|
|
66
|
+
}
|
|
67
|
+
resetCurrentService() {
|
|
68
|
+
this.currentProject = undefined;
|
|
69
|
+
this.currentSnapshotService = undefined;
|
|
70
|
+
this.groupWorkspaces = [];
|
|
71
|
+
this.resetCurrentGroupWorkspace();
|
|
72
|
+
this.applicationStore.navigator.goTo(generateServiceQueryUpdaterSetupRoute(undefined, undefined, undefined));
|
|
73
|
+
}
|
|
74
|
+
resetCurrentGroupWorkspace() {
|
|
75
|
+
this.currentGroupWorkspace = undefined;
|
|
76
|
+
this.currentWorkspaceService = undefined;
|
|
77
|
+
}
|
|
78
|
+
*initialize(serviceCoordinates) {
|
|
79
|
+
if (!this.initState.isInInitialState) {
|
|
80
|
+
return;
|
|
81
|
+
}
|
|
82
|
+
this.initState.inProgress();
|
|
83
|
+
try {
|
|
84
|
+
if (serviceCoordinates) {
|
|
85
|
+
const { groupId, artifactId, servicePath } = parseServiceCoordinates(serviceCoordinates);
|
|
86
|
+
yield flowResult(this.changeService(groupId, artifactId, servicePath));
|
|
87
|
+
}
|
|
88
|
+
this.initState.pass();
|
|
89
|
+
}
|
|
90
|
+
catch (error) {
|
|
91
|
+
assertErrorThrown(error);
|
|
92
|
+
this.applicationStore.log.error(LogEvent.create(LEGEND_STUDIO_APP_EVENT.DEPOT_MANAGER_FAILURE), error);
|
|
93
|
+
this.applicationStore.notifyError(error);
|
|
94
|
+
this.initState.fail();
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
*loadServices(searchText) {
|
|
98
|
+
const isValidSearchString = searchText.length >= MINIMUM_SERVICE_LOADER_SEARCH_LENGTH;
|
|
99
|
+
this.loadServicesState.inProgress();
|
|
100
|
+
try {
|
|
101
|
+
this.services = (yield this.depotServerClient.getEntitiesByClassifierPath(CORE_PURE_PATH.SERVICE, {
|
|
102
|
+
search: isValidSearchString ? searchText : undefined,
|
|
103
|
+
// NOTE: since this mode is meant for contribution, we want to load services
|
|
104
|
+
// on the snapshot version (i.e. merged to the default branch on the projects)
|
|
105
|
+
scope: DepotScope.SNAPSHOT,
|
|
106
|
+
limit: DEFAULT_SERVICE_LOADER_LIMIT,
|
|
107
|
+
})).map((storedEntity) => extractServiceInfo(storedEntity));
|
|
108
|
+
this.loadServicesState.pass();
|
|
109
|
+
}
|
|
110
|
+
catch (error) {
|
|
111
|
+
assertErrorThrown(error);
|
|
112
|
+
this.applicationStore.notifyError(error);
|
|
113
|
+
this.loadServicesState.fail();
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
*changeService(groupId, artifactId, servicePath) {
|
|
117
|
+
this.loadWorkspacesState.inProgress();
|
|
118
|
+
try {
|
|
119
|
+
const project = ProjectData.serialization.fromJson((yield this.depotServerClient.getProject(groupId, artifactId)));
|
|
120
|
+
this.currentProject = project;
|
|
121
|
+
const serviceEntity = (yield this.depotServerClient.getEntity(project, MASTER_SNAPSHOT_ALIAS, servicePath));
|
|
122
|
+
this.currentSnapshotService = extractServiceInfo({
|
|
123
|
+
groupId: groupId,
|
|
124
|
+
artifactId: artifactId,
|
|
125
|
+
versionId: MASTER_SNAPSHOT_ALIAS,
|
|
126
|
+
entity: serviceEntity,
|
|
127
|
+
});
|
|
128
|
+
this.applicationStore.navigator.goTo(generateServiceQueryUpdaterSetupRoute(project.groupId, project.artifactId, servicePath));
|
|
129
|
+
const workspacesInConflictResolutionIds = (yield this.sdlcServerClient.getWorkspacesInConflictResolutionMode(project.projectId)).map((workspace) => workspace.workspaceId);
|
|
130
|
+
this.groupWorkspaces = (yield this.sdlcServerClient.getGroupWorkspaces(project.projectId))
|
|
131
|
+
.map((v) => Workspace.serialization.fromJson(v))
|
|
132
|
+
.filter((workspace) =>
|
|
133
|
+
// NOTE we don't handle workspaces that only have conflict resolution but no standard workspace
|
|
134
|
+
// since that indicates bad state of the SDLC server
|
|
135
|
+
!workspacesInConflictResolutionIds.includes(workspace.workspaceId) && workspace.workspaceType === WorkspaceType.GROUP);
|
|
136
|
+
if (this.groupWorkspaces.length) {
|
|
137
|
+
yield flowResult(this.changeWorkspace(guaranteeNonNullable(this.groupWorkspaces[0]), servicePath));
|
|
138
|
+
}
|
|
139
|
+
this.loadWorkspacesState.pass();
|
|
140
|
+
}
|
|
141
|
+
catch (error) {
|
|
142
|
+
assertErrorThrown(error);
|
|
143
|
+
this.applicationStore.log.error(LogEvent.create(LEGEND_STUDIO_APP_EVENT.DEPOT_MANAGER_FAILURE), error);
|
|
144
|
+
this.applicationStore.notifyError(error);
|
|
145
|
+
this.loadWorkspacesState.fail();
|
|
146
|
+
}
|
|
147
|
+
}
|
|
148
|
+
*changeWorkspace(workspace, servicePath) {
|
|
149
|
+
this.currentGroupWorkspace = workspace;
|
|
150
|
+
this.checkWorkspaceCompatibilityState.inProgress();
|
|
151
|
+
try {
|
|
152
|
+
this.currentWorkspaceService = (yield flowResult(this.sdlcServerClient.getWorkspaceEntity(workspace, servicePath)));
|
|
153
|
+
}
|
|
154
|
+
catch {
|
|
155
|
+
this.currentWorkspaceService = undefined;
|
|
156
|
+
}
|
|
157
|
+
this.checkWorkspaceCompatibilityState.reset();
|
|
158
|
+
}
|
|
159
|
+
*createWorkspace(projectId, workspaceId, servicePath) {
|
|
160
|
+
this.createWorkspaceState.inProgress();
|
|
161
|
+
try {
|
|
162
|
+
const newGroupWorkspace = Workspace.serialization.fromJson((yield this.sdlcServerClient.createWorkspace(projectId, workspaceId, WorkspaceType.GROUP)));
|
|
163
|
+
this.applicationStore.notifySuccess(`Workspace '${newGroupWorkspace.workspaceId}' is succesfully created`);
|
|
164
|
+
const matchingGroupWorkspace = this.groupWorkspaces.find((workspace) => workspace.workspaceId === newGroupWorkspace.workspaceId);
|
|
165
|
+
const groupWorkspaceToSelect = matchingGroupWorkspace ?? newGroupWorkspace;
|
|
166
|
+
yield flowResult(this.changeWorkspace(groupWorkspaceToSelect, servicePath));
|
|
167
|
+
this.setShowCreateWorkspaceModal(false);
|
|
168
|
+
// NOTE: do this after closing the modal to not interfere
|
|
169
|
+
// with validation of existing workspaces in create workspace modal
|
|
170
|
+
if (!matchingGroupWorkspace) {
|
|
171
|
+
this.groupWorkspaces.push(newGroupWorkspace);
|
|
172
|
+
}
|
|
173
|
+
}
|
|
174
|
+
catch (error) {
|
|
175
|
+
assertErrorThrown(error);
|
|
176
|
+
this.applicationStore.log.error(LogEvent.create(LEGEND_STUDIO_APP_EVENT.WORKSPACE_SETUP_FAILURE), error);
|
|
177
|
+
this.applicationStore.notifyError(error);
|
|
178
|
+
}
|
|
179
|
+
finally {
|
|
180
|
+
this.createWorkspaceState.reset();
|
|
181
|
+
}
|
|
182
|
+
}
|
|
183
|
+
}
|
|
184
|
+
//# sourceMappingURL=UpdateServiceQuerySetupStore.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"UpdateServiceQuerySetupStore.js","sourceRoot":"","sources":["../../../src/stores/studio/UpdateServiceQuerySetupStore.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,UAAU,EAAE,cAAc,EAAE,UAAU,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,MAAM,CAAC;AAC5E,OAAO,EAGL,WAAW,EACX,iBAAiB,EACjB,oBAAoB,EACpB,QAAQ,GACT,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAGL,UAAU,EACV,WAAW,EACX,qBAAqB,GACtB,MAAM,4BAA4B,CAAC;AACpC,OAAO,EACL,kBAAkB,GAEnB,MAAM,6BAA6B,CAAC;AACrC,OAAO,EAEL,SAAS,EACT,aAAa,GACd,MAAM,2BAA2B,CAAC;AACnC,OAAO,EAEL,uBAAuB,GACxB,MAAM,kCAAkC,CAAC;AAC1C,OAAO,EACL,qCAAqC,EACrC,uBAAuB,GACxB,MAAM,qCAAqC,CAAC;AAC7C,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAGrD,MAAM,oCAAoC,GAAG,CAAC,CAAC;AAC/C,MAAM,4BAA4B,GAAG,EAAE,CAAC;AAExC,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AAiB,CAAC;YAE9C,MAAM,UAAU,CACd,IAAI,CAAC,eAAe,CAAC,sBAAsB,EAAE,WAAW,CAAC,CAC1D,CAAC;YACF,IAAI,CAAC,2BAA2B,CAAC,KAAK,CAAC,CAAC;YAExC,yDAAyD;YACzD,mEAAmE;YACnE,IAAI,CAAC,sBAAsB,EAAE;gBAC3B,IAAI,CAAC,eAAe,CAAC,IAAI,CAAC,iBAAiB,CAAC,CAAC;aAC9C;SACF;QAAC,OAAO,KAAK,EAAE;YACd,iBAAiB,CAAC,KAAK,CAAC,CAAC;YACzB,IAAI,CAAC,gBAAgB,CAAC,GAAG,CAAC,KAAK,CAC7B,QAAQ,CAAC,MAAM,CAAC,uBAAuB,CAAC,uBAAuB,CAAC,EAChE,KAAK,CACN,CAAC;YACF,IAAI,CAAC,gBAAgB,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC;SAC1C;gBAAS;YACR,IAAI,CAAC,oBAAoB,CAAC,KAAK,EAAE,CAAC;SACnC;IACH,CAAC;CACF"}
|
package/package.json
ADDED
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@finos/legend-extension-dsl-service",
|
|
3
|
+
"version": "0.0.1",
|
|
4
|
+
"description": "Legend extension for Service DSL",
|
|
5
|
+
"keywords": [
|
|
6
|
+
"legend",
|
|
7
|
+
"legend-extension",
|
|
8
|
+
"dsl",
|
|
9
|
+
"dsl-service"
|
|
10
|
+
],
|
|
11
|
+
"homepage": "https://github.com/finos/legend-studio/tree/master/packages/legend-extension-dsl-service",
|
|
12
|
+
"bugs": {
|
|
13
|
+
"url": "https://github.com/finos/legend-studio/issues"
|
|
14
|
+
},
|
|
15
|
+
"repository": {
|
|
16
|
+
"type": "git",
|
|
17
|
+
"url": "https://github.com/finos/legend-studio.git",
|
|
18
|
+
"directory": "packages/legend-extension-dsl-service"
|
|
19
|
+
},
|
|
20
|
+
"license": "Apache-2.0",
|
|
21
|
+
"sideEffects": false,
|
|
22
|
+
"type": "module",
|
|
23
|
+
"exports": {
|
|
24
|
+
".": "./lib/index.js",
|
|
25
|
+
"./lib/index.css": "./lib/index.css"
|
|
26
|
+
},
|
|
27
|
+
"module": "lib/index.js",
|
|
28
|
+
"types": "lib/index.d.ts",
|
|
29
|
+
"scripts": {
|
|
30
|
+
"build": "yarn clean && yarn build:sass && yarn build:ts",
|
|
31
|
+
"build:sass": "cross-env INIT_CWD=$INIT_CWD node ../../scripts/workflow/buildSass.js",
|
|
32
|
+
"build:ts": "tsc --project ./tsconfig.build.json",
|
|
33
|
+
"clean": "npm-run-all clean:cache clean:lib",
|
|
34
|
+
"clean:cache": "rimraf \"build\"",
|
|
35
|
+
"clean:lib": "rimraf \"lib\"",
|
|
36
|
+
"dev": "npm-run-all --parallel dev:sass dev:ts",
|
|
37
|
+
"dev:sass": "sass style:lib --watch --load-path=../../node_modules/@finos/legend-art/scss",
|
|
38
|
+
"dev:ts": "tsc --watch --preserveWatchOutput",
|
|
39
|
+
"lint:js": "cross-env NODE_ENV=production eslint --cache --cache-location ./build/.eslintcache --report-unused-disable-directives --parser-options=project:\"./tsconfig.json\" \"./src/**/*.{js,ts,tsx}\"",
|
|
40
|
+
"publish:prepare": "node ../../scripts/release/preparePublishContent.js",
|
|
41
|
+
"publish:snapshot": "node ../../scripts/release/publishDevSnapshot.js",
|
|
42
|
+
"test": "jest",
|
|
43
|
+
"test:watch": "jest --watch"
|
|
44
|
+
},
|
|
45
|
+
"dependencies": {
|
|
46
|
+
"@finos/legend-application": "8.0.0",
|
|
47
|
+
"@finos/legend-application-query": "8.0.0",
|
|
48
|
+
"@finos/legend-application-studio": "17.0.0",
|
|
49
|
+
"@finos/legend-art": "3.2.2",
|
|
50
|
+
"@finos/legend-graph": "16.0.0",
|
|
51
|
+
"@finos/legend-query-builder": "0.1.0",
|
|
52
|
+
"@finos/legend-server-depot": "4.0.0",
|
|
53
|
+
"@finos/legend-server-sdlc": "4.0.15",
|
|
54
|
+
"@finos/legend-shared": "6.1.2",
|
|
55
|
+
"@finos/legend-storage": "3.0.11",
|
|
56
|
+
"@types/react": "18.0.21",
|
|
57
|
+
"mobx": "6.6.2",
|
|
58
|
+
"mobx-react-lite": "3.4.0",
|
|
59
|
+
"react": "18.2.0",
|
|
60
|
+
"react-dom": "18.2.0",
|
|
61
|
+
"react-router": "5.3.3",
|
|
62
|
+
"serializr": "2.0.5"
|
|
63
|
+
},
|
|
64
|
+
"devDependencies": {
|
|
65
|
+
"@finos/legend-dev-utils": "2.0.17",
|
|
66
|
+
"@jest/globals": "29.0.3",
|
|
67
|
+
"cross-env": "7.0.3",
|
|
68
|
+
"eslint": "8.24.0",
|
|
69
|
+
"jest": "29.0.3",
|
|
70
|
+
"npm-run-all": "4.1.5",
|
|
71
|
+
"rimraf": "3.0.2",
|
|
72
|
+
"sass": "1.55.0",
|
|
73
|
+
"typescript": "4.8.3"
|
|
74
|
+
},
|
|
75
|
+
"peerDependencies": {
|
|
76
|
+
"react": "^18.0.0"
|
|
77
|
+
},
|
|
78
|
+
"publishConfig": {
|
|
79
|
+
"directory": "build/publishContent"
|
|
80
|
+
},
|
|
81
|
+
"extensions": {
|
|
82
|
+
"applicationStudioPlugin": "@finos/legend-application-studio-plugin-dsl-service"
|
|
83
|
+
}
|
|
84
|
+
}
|
|
@@ -0,0 +1,71 @@
|
|
|
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
|
+
|
|
17
|
+
import packageJson from '../../../package.json';
|
|
18
|
+
import {
|
|
19
|
+
type DSL_LegendStudioApplicationPlugin_Extension,
|
|
20
|
+
LegendStudioApplicationPlugin,
|
|
21
|
+
} from '@finos/legend-application-studio';
|
|
22
|
+
import type { ApplicationPageEntry } from '@finos/legend-application';
|
|
23
|
+
import { DSL_SERVICE_LEGEND_STUDIO_ROUTE_PATTERN } from '../../stores/studio/DSL_Service_LegendStudioRouter.js';
|
|
24
|
+
import { UpdateServiceQuerySetup } from './UpdateServiceQuerySetup.js';
|
|
25
|
+
import { UpdateProjectServiceQuerySetup } from './UpdateProjectServiceQuerySetup.js';
|
|
26
|
+
import {
|
|
27
|
+
ProjectServiceQueryUpdater,
|
|
28
|
+
ServiceQueryUpdater,
|
|
29
|
+
} from './ServiceQueryEditor.js';
|
|
30
|
+
|
|
31
|
+
export class DSL_Service_LegendStudioApplicationPlugin
|
|
32
|
+
extends LegendStudioApplicationPlugin
|
|
33
|
+
implements DSL_LegendStudioApplicationPlugin_Extension
|
|
34
|
+
{
|
|
35
|
+
constructor() {
|
|
36
|
+
super(packageJson.extensions.applicationStudioPlugin, packageJson.version);
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
override getExtraApplicationPageEntries(): ApplicationPageEntry[] {
|
|
40
|
+
return [
|
|
41
|
+
{
|
|
42
|
+
key: 'update-service-query-setup-application-page',
|
|
43
|
+
urlPatterns: [
|
|
44
|
+
DSL_SERVICE_LEGEND_STUDIO_ROUTE_PATTERN.UPDATE_SERVICE_QUERY_SETUP,
|
|
45
|
+
],
|
|
46
|
+
renderer: UpdateServiceQuerySetup,
|
|
47
|
+
},
|
|
48
|
+
{
|
|
49
|
+
key: 'update-service-query-application-page',
|
|
50
|
+
urlPatterns: [
|
|
51
|
+
DSL_SERVICE_LEGEND_STUDIO_ROUTE_PATTERN.UPDATE_SERVICE_QUERY,
|
|
52
|
+
],
|
|
53
|
+
renderer: ServiceQueryUpdater,
|
|
54
|
+
},
|
|
55
|
+
{
|
|
56
|
+
key: 'update-project-service-query-setup-application-page',
|
|
57
|
+
urlPatterns: [
|
|
58
|
+
DSL_SERVICE_LEGEND_STUDIO_ROUTE_PATTERN.UPDATE_PROJECT_SERVICE_QUERY_SETUP,
|
|
59
|
+
],
|
|
60
|
+
renderer: UpdateProjectServiceQuerySetup,
|
|
61
|
+
},
|
|
62
|
+
{
|
|
63
|
+
key: 'update-project-service-query-application-page',
|
|
64
|
+
urlPatterns: [
|
|
65
|
+
DSL_SERVICE_LEGEND_STUDIO_ROUTE_PATTERN.UPDATE_PROJECT_SERVICE_QUERY,
|
|
66
|
+
],
|
|
67
|
+
renderer: ProjectServiceQueryUpdater,
|
|
68
|
+
},
|
|
69
|
+
];
|
|
70
|
+
}
|
|
71
|
+
}
|