@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,260 @@
|
|
|
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 { ActionAlertActionType, ActionAlertType, } from '@finos/legend-application';
|
|
17
|
+
import { EditorStore, LEGEND_STUDIO_APP_EVENT, MINIMUM_SERVICE_OWNERS, generateServiceManagementUrl, pureExecution_setFunction, } from '@finos/legend-application-studio';
|
|
18
|
+
import { GraphManagerState, PureExecution, CORE_PURE_PATH, ServiceExecutionMode, } from '@finos/legend-graph';
|
|
19
|
+
import { ServiceQueryBuilderState, } from '@finos/legend-query-builder';
|
|
20
|
+
import { ProjectData, } from '@finos/legend-server-depot';
|
|
21
|
+
import { WorkspaceType, EntityChangeType, } from '@finos/legend-server-sdlc';
|
|
22
|
+
import { assertErrorThrown, assertType, LogEvent, HttpStatus, NetworkClientError, assertNonNullable, ActionState, assertTrue, assertNonEmptyString, guaranteeType, guaranteeNonNullable, } from '@finos/legend-shared';
|
|
23
|
+
import { action, computed, flow, flowResult, makeObservable, observable, } from 'mobx';
|
|
24
|
+
import { parseServiceCoordinates } from './DSL_Service_LegendStudioRouter.js';
|
|
25
|
+
export class ServiceQueryEditorStore extends EditorStore {
|
|
26
|
+
queryBuilderState;
|
|
27
|
+
_service;
|
|
28
|
+
showNewServiceModal = false;
|
|
29
|
+
showServiceRegistrationModal = false;
|
|
30
|
+
registerServiceState = ActionState.create();
|
|
31
|
+
serviceRegistrationEnvConfigs = [];
|
|
32
|
+
currentServiceRegistrationEnvConfig;
|
|
33
|
+
showSubmitReviewModal = false;
|
|
34
|
+
constructor(applicationStore, sdlcServerClient, depotServerClient) {
|
|
35
|
+
const graphManagerState = new GraphManagerState(applicationStore.pluginManager, applicationStore.log);
|
|
36
|
+
super(applicationStore, sdlcServerClient, depotServerClient, graphManagerState);
|
|
37
|
+
makeObservable(this, {
|
|
38
|
+
queryBuilderState: observable,
|
|
39
|
+
_service: observable,
|
|
40
|
+
service: computed,
|
|
41
|
+
showNewServiceModal: observable,
|
|
42
|
+
showServiceRegistrationModal: observable,
|
|
43
|
+
currentServiceRegistrationEnvConfig: observable,
|
|
44
|
+
showSubmitReviewModal: observable,
|
|
45
|
+
setCurrentServiceRegistrationEnvConfig: action,
|
|
46
|
+
setShowNewServiceModal: action,
|
|
47
|
+
setShowServiceRegistrationModal: action,
|
|
48
|
+
setShowSubmitReviewModal: observable,
|
|
49
|
+
initializeWithServiceQuery: flow,
|
|
50
|
+
saveWorkspace: flow,
|
|
51
|
+
recreateWorkspace: flow,
|
|
52
|
+
registerService: flow,
|
|
53
|
+
});
|
|
54
|
+
this.serviceRegistrationEnvConfigs =
|
|
55
|
+
this.applicationStore.config.options.TEMPORARY__serviceRegistrationConfig.filter((config) => config.modes.includes(ServiceExecutionMode.SEMI_INTERACTIVE));
|
|
56
|
+
if (this.serviceRegistrationEnvConfigs.length) {
|
|
57
|
+
this.currentServiceRegistrationEnvConfig =
|
|
58
|
+
this.serviceRegistrationEnvConfigs[0];
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
get service() {
|
|
62
|
+
return guaranteeNonNullable(this._service, `Service query editor store has not been initialized properly`);
|
|
63
|
+
}
|
|
64
|
+
setShowNewServiceModal(val) {
|
|
65
|
+
this.showNewServiceModal = val;
|
|
66
|
+
}
|
|
67
|
+
setShowServiceRegistrationModal(val) {
|
|
68
|
+
this.showServiceRegistrationModal = val;
|
|
69
|
+
}
|
|
70
|
+
setCurrentServiceRegistrationEnvConfig(val) {
|
|
71
|
+
this.currentServiceRegistrationEnvConfig = val;
|
|
72
|
+
}
|
|
73
|
+
setShowSubmitReviewModal(val) {
|
|
74
|
+
this.showSubmitReviewModal = val;
|
|
75
|
+
}
|
|
76
|
+
*initializeWithServiceQuery() {
|
|
77
|
+
try {
|
|
78
|
+
const serviceInfo = (yield this.fetchServiceInformation());
|
|
79
|
+
yield flowResult(this.initialize(serviceInfo.projectId, serviceInfo.groupWorkspaceId, WorkspaceType.GROUP));
|
|
80
|
+
// initialize the query builder state
|
|
81
|
+
this._service = this.graphManagerState.graph.getService(serviceInfo.servicePath);
|
|
82
|
+
assertType(this.service.execution, PureExecution, `Can't process service execution: only Pure execution is supported`);
|
|
83
|
+
const queryBuilderState = new ServiceQueryBuilderState(this.applicationStore, this.graphManagerState, this.service, undefined);
|
|
84
|
+
// leverage initialization of query builder state to ensure we handle unsupported queries
|
|
85
|
+
queryBuilderState.initializeWithQuery(this.service.execution.func),
|
|
86
|
+
(this.queryBuilderState = queryBuilderState);
|
|
87
|
+
}
|
|
88
|
+
catch (error) {
|
|
89
|
+
assertErrorThrown(error);
|
|
90
|
+
this.applicationStore.log.error(LogEvent.create(LEGEND_STUDIO_APP_EVENT.WORKSPACE_SETUP_FAILURE), error);
|
|
91
|
+
this.applicationStore.notifyError(error);
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
*saveWorkspace(serviceEntity, createNew, onSuccess) {
|
|
95
|
+
if (!this.queryBuilderState ||
|
|
96
|
+
this.localChangesState.pushChangesState.isInProgress ||
|
|
97
|
+
this.workspaceUpdaterState.isUpdatingWorkspace) {
|
|
98
|
+
return;
|
|
99
|
+
}
|
|
100
|
+
this.localChangesState.pushChangesState.inProgress();
|
|
101
|
+
this.applicationStore.setBlockingAlert({
|
|
102
|
+
message: `Saving workspace...`,
|
|
103
|
+
prompt: 'Please do not close the application',
|
|
104
|
+
showLoading: true,
|
|
105
|
+
});
|
|
106
|
+
try {
|
|
107
|
+
yield flowResult(this.sdlcState.fetchRemoteWorkspaceRevision(this.sdlcState.activeProject.projectId, this.sdlcState.activeWorkspace));
|
|
108
|
+
if (this.sdlcState.isWorkspaceOutOfSync) {
|
|
109
|
+
return;
|
|
110
|
+
}
|
|
111
|
+
// push the changes
|
|
112
|
+
// NOTE: change detection in query-builder should be enough
|
|
113
|
+
// to make sure that this change is valid
|
|
114
|
+
const entityChange = {
|
|
115
|
+
classifierPath: CORE_PURE_PATH.SERVICE,
|
|
116
|
+
entityPath: serviceEntity.path,
|
|
117
|
+
content: serviceEntity.content,
|
|
118
|
+
type: createNew ? EntityChangeType.CREATE : EntityChangeType.MODIFY,
|
|
119
|
+
};
|
|
120
|
+
const nullableRevisionChange = (yield this.sdlcServerClient.performEntityChanges(this.sdlcState.activeProject.projectId, this.sdlcState.activeWorkspace, {
|
|
121
|
+
message: `updated service ${serviceEntity.path} query`,
|
|
122
|
+
entityChanges: [entityChange],
|
|
123
|
+
revisionId: this.sdlcState.activeRevision.id,
|
|
124
|
+
}));
|
|
125
|
+
assertNonNullable(nullableRevisionChange, `Can't save workspace: empty change set was pushed - this may be due to an error with change detection`);
|
|
126
|
+
this.applicationStore.log.info(LogEvent.create(LEGEND_STUDIO_APP_EVENT.WORKSPACE_LOCAL_CHANGES_PUSHED));
|
|
127
|
+
onSuccess?.();
|
|
128
|
+
}
|
|
129
|
+
catch (error) {
|
|
130
|
+
assertErrorThrown(error);
|
|
131
|
+
this.applicationStore.log.error(LogEvent.create(LEGEND_STUDIO_APP_EVENT.SDLC_MANAGER_FAILURE), error);
|
|
132
|
+
if (error instanceof NetworkClientError &&
|
|
133
|
+
error.response.status === HttpStatus.CONFLICT) {
|
|
134
|
+
// NOTE: a confict here indicates that the reference revision ID sent along with update call
|
|
135
|
+
// does not match the HEAD of the workspace, therefore, we need to prompt user to refresh the application
|
|
136
|
+
this.applicationStore.notifyWarning(`Can't save workspace: current workspace revision is not the latest; please backup your work and refresh the application`);
|
|
137
|
+
}
|
|
138
|
+
else {
|
|
139
|
+
this.applicationStore.notifyError(error);
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
finally {
|
|
143
|
+
this.applicationStore.setBlockingAlert(undefined);
|
|
144
|
+
this.localChangesState.pushChangesState.complete();
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
*recreateWorkspace() {
|
|
148
|
+
try {
|
|
149
|
+
this.setBlockingAlert({
|
|
150
|
+
message: 'Re-creating workspace...',
|
|
151
|
+
prompt: 'Please do not close the application',
|
|
152
|
+
showLoading: true,
|
|
153
|
+
});
|
|
154
|
+
yield this.sdlcServerClient.deleteWorkspace(this.sdlcState.activeProject.projectId, this.sdlcState.activeWorkspace);
|
|
155
|
+
yield this.sdlcServerClient.createWorkspace(this.sdlcState.activeProject.projectId, this.sdlcState.activeWorkspace.workspaceId, this.sdlcState.activeWorkspace.workspaceType);
|
|
156
|
+
this.applicationStore.navigator.reload();
|
|
157
|
+
}
|
|
158
|
+
catch (error) {
|
|
159
|
+
assertErrorThrown(error);
|
|
160
|
+
this.applicationStore.log.error(LogEvent.create(LEGEND_STUDIO_APP_EVENT.SDLC_MANAGER_FAILURE), error);
|
|
161
|
+
this.applicationStore.notifyError(error);
|
|
162
|
+
}
|
|
163
|
+
finally {
|
|
164
|
+
this.setBlockingAlert(undefined);
|
|
165
|
+
}
|
|
166
|
+
}
|
|
167
|
+
updateServiceQuery() {
|
|
168
|
+
assertNonNullable(this.queryBuilderState, `Service query editor store has not been initialized properly`);
|
|
169
|
+
pureExecution_setFunction(guaranteeType(this.service.execution, PureExecution), this.queryBuilderState.buildQuery());
|
|
170
|
+
}
|
|
171
|
+
*registerService(overridePattern) {
|
|
172
|
+
const registrationConfig = this.currentServiceRegistrationEnvConfig;
|
|
173
|
+
if (registrationConfig) {
|
|
174
|
+
try {
|
|
175
|
+
this.registerServiceState.inProgress();
|
|
176
|
+
// make sure the service query is updated
|
|
177
|
+
this.updateServiceQuery();
|
|
178
|
+
// validate owners
|
|
179
|
+
this.service.owners.forEach((owner) => assertNonEmptyString(owner, `Service can't have an empty owner name`));
|
|
180
|
+
assertTrue(this.service.owners.length >= MINIMUM_SERVICE_OWNERS, `Service needs to have at least 2 owners in order to be registered`);
|
|
181
|
+
this.registerServiceState.setMessage(`Registering service...`);
|
|
182
|
+
const serviceRegistrationResult = (yield this.graphManagerState.graphManager.registerService(this.service, this.graphManagerState.graph, this.projectConfigurationEditorState.currentProjectConfiguration
|
|
183
|
+
.groupId, this.projectConfigurationEditorState.currentProjectConfiguration
|
|
184
|
+
.artifactId, undefined, // if not specified, we will use the latest revision version (i.e. SNAPSHOT/HEAD)
|
|
185
|
+
registrationConfig.executionUrl, ServiceExecutionMode.SEMI_INTERACTIVE, {
|
|
186
|
+
TEMPORARY__semiInteractiveOverridePattern: overridePattern,
|
|
187
|
+
}));
|
|
188
|
+
this.registerServiceState.setMessage(`Activating service...`);
|
|
189
|
+
yield this.graphManagerState.graphManager.activateService(registrationConfig.executionUrl, serviceRegistrationResult.serviceInstanceId);
|
|
190
|
+
this.setShowServiceRegistrationModal(false);
|
|
191
|
+
assertNonEmptyString(serviceRegistrationResult.pattern, 'Service registration pattern is missing or empty');
|
|
192
|
+
this.setActionAlertInfo({
|
|
193
|
+
message: `Service with pattern ${serviceRegistrationResult.pattern} registered and activated`,
|
|
194
|
+
prompt: 'You can now launch and monitor the operation of your service',
|
|
195
|
+
type: ActionAlertType.STANDARD,
|
|
196
|
+
actions: [
|
|
197
|
+
{
|
|
198
|
+
label: 'Launch Service',
|
|
199
|
+
type: ActionAlertActionType.PROCEED,
|
|
200
|
+
handler: () => {
|
|
201
|
+
this.applicationStore.navigator.openNewWindow(generateServiceManagementUrl(registrationConfig.managementUrl, serviceRegistrationResult.pattern));
|
|
202
|
+
},
|
|
203
|
+
default: true,
|
|
204
|
+
},
|
|
205
|
+
{
|
|
206
|
+
label: 'Close',
|
|
207
|
+
type: ActionAlertActionType.PROCEED_WITH_CAUTION,
|
|
208
|
+
},
|
|
209
|
+
],
|
|
210
|
+
});
|
|
211
|
+
}
|
|
212
|
+
catch (error) {
|
|
213
|
+
assertErrorThrown(error);
|
|
214
|
+
this.applicationStore.log.error(LogEvent.create(LEGEND_STUDIO_APP_EVENT.SERVICE_REGISTRATION_FAILURE), error);
|
|
215
|
+
this.applicationStore.notifyError(error);
|
|
216
|
+
}
|
|
217
|
+
finally {
|
|
218
|
+
this.registerServiceState.reset();
|
|
219
|
+
this.registerServiceState.setMessage(undefined);
|
|
220
|
+
}
|
|
221
|
+
}
|
|
222
|
+
}
|
|
223
|
+
}
|
|
224
|
+
export class ServiceQueryUpdaterStore extends ServiceQueryEditorStore {
|
|
225
|
+
serviceCoordinates;
|
|
226
|
+
groupWorkspaceId;
|
|
227
|
+
constructor(applicationStore, sdlcServerClient, depotServerClient, serviceCoordinates, groupWorkspaceId) {
|
|
228
|
+
super(applicationStore, sdlcServerClient, depotServerClient);
|
|
229
|
+
this.serviceCoordinates = serviceCoordinates;
|
|
230
|
+
this.groupWorkspaceId = groupWorkspaceId;
|
|
231
|
+
}
|
|
232
|
+
async fetchServiceInformation() {
|
|
233
|
+
const { groupId, artifactId, servicePath } = parseServiceCoordinates(this.serviceCoordinates);
|
|
234
|
+
const project = ProjectData.serialization.fromJson(await this.depotServerClient.getProject(groupId, artifactId));
|
|
235
|
+
return {
|
|
236
|
+
projectId: project.projectId,
|
|
237
|
+
groupWorkspaceId: this.groupWorkspaceId,
|
|
238
|
+
servicePath,
|
|
239
|
+
};
|
|
240
|
+
}
|
|
241
|
+
}
|
|
242
|
+
export class ProjectServiceQueryUpdaterStore extends ServiceQueryEditorStore {
|
|
243
|
+
projectId;
|
|
244
|
+
groupWorkspaceId;
|
|
245
|
+
servicePath;
|
|
246
|
+
constructor(applicationStore, sdlcServerClient, depotServerClient, projectId, groupWorkspaceId, servicePath) {
|
|
247
|
+
super(applicationStore, sdlcServerClient, depotServerClient);
|
|
248
|
+
this.projectId = projectId;
|
|
249
|
+
this.groupWorkspaceId = groupWorkspaceId;
|
|
250
|
+
this.servicePath = servicePath;
|
|
251
|
+
}
|
|
252
|
+
async fetchServiceInformation() {
|
|
253
|
+
return {
|
|
254
|
+
projectId: this.projectId,
|
|
255
|
+
groupWorkspaceId: this.groupWorkspaceId,
|
|
256
|
+
servicePath: this.servicePath,
|
|
257
|
+
};
|
|
258
|
+
}
|
|
259
|
+
}
|
|
260
|
+
//# sourceMappingURL=ServiceQueryEditorStore.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ServiceQueryEditorStore.js","sourceRoot":"","sources":["../../../src/stores/studio/ServiceQueryEditorStore.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EACL,qBAAqB,EACrB,eAAe,GAChB,MAAM,2BAA2B,CAAC;AACnC,OAAO,EAGL,WAAW,EACX,uBAAuB,EACvB,sBAAsB,EACtB,4BAA4B,EAC5B,yBAAyB,GAC1B,MAAM,kCAAkC,CAAC;AAC1C,OAAO,EAGL,iBAAiB,EACjB,aAAa,EACb,cAAc,EACd,oBAAoB,GACrB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAEL,wBAAwB,GACzB,MAAM,6BAA6B,CAAC;AACrC,OAAO,EAEL,WAAW,GACZ,MAAM,4BAA4B,CAAC;AACpC,OAAO,EAGL,aAAa,EACb,g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;IAED,KAAK,CAAC,uBAAuB;QAC3B,OAAO;YACL,SAAS,EAAE,IAAI,CAAC,SAAS;YACzB,gBAAgB,EAAE,IAAI,CAAC,gBAAgB;YACvC,WAAW,EAAE,IAAI,CAAC,WAAW;SAC9B,CAAC;IACJ,CAAC;CACF"}
|
|
@@ -0,0 +1,46 @@
|
|
|
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 { type SDLCServerClient, Workspace, Project } from '@finos/legend-server-sdlc';
|
|
18
|
+
import { type LegendStudioApplicationStore } from '@finos/legend-application-studio';
|
|
19
|
+
import type { Entity } from '@finos/legend-storage';
|
|
20
|
+
export declare class UpdateProjectServiceQuerySetupStore {
|
|
21
|
+
applicationStore: LegendStudioApplicationStore;
|
|
22
|
+
sdlcServerClient: SDLCServerClient;
|
|
23
|
+
initState: ActionState;
|
|
24
|
+
loadProjectsState: ActionState;
|
|
25
|
+
projects: Project[];
|
|
26
|
+
currentProject?: Project | undefined;
|
|
27
|
+
loadWorkspacesState: ActionState;
|
|
28
|
+
createWorkspaceState: ActionState;
|
|
29
|
+
groupWorkspaces: Workspace[];
|
|
30
|
+
currentGroupWorkspace?: Workspace | undefined;
|
|
31
|
+
showCreateWorkspaceModal: boolean;
|
|
32
|
+
services: Entity[];
|
|
33
|
+
currentService?: Entity | undefined;
|
|
34
|
+
constructor(applicationStore: LegendStudioApplicationStore, sdlcServerClient: SDLCServerClient);
|
|
35
|
+
setShowCreateWorkspaceModal(val: boolean): void;
|
|
36
|
+
resetCurrentProject(): void;
|
|
37
|
+
resetCurrentGroupWorkspace(): void;
|
|
38
|
+
resetCurrentService(): void;
|
|
39
|
+
initialize(projectId: string | undefined): GeneratorFn<void>;
|
|
40
|
+
loadProjects(searchText: string): GeneratorFn<void>;
|
|
41
|
+
changeProject(project: Project): GeneratorFn<void>;
|
|
42
|
+
changeWorkspace(workspace: Workspace): GeneratorFn<void>;
|
|
43
|
+
changeService(service: Entity): void;
|
|
44
|
+
createWorkspace(projectId: string, workspaceId: string): GeneratorFn<void>;
|
|
45
|
+
}
|
|
46
|
+
//# sourceMappingURL=UpdateProjectServiceQuerySetupStore.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"UpdateProjectServiceQuerySetupStore.d.ts","sourceRoot":"","sources":["../../../src/stores/studio/UpdateProjectServiceQuerySetupStore.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAGH,OAAO,EACL,KAAK,WAAW,EAEhB,WAAW,EAIZ,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EACL,KAAK,gBAAgB,EACrB,SAAS,EAET,OAAO,EACR,MAAM,2BAA2B,CAAC;AACnC,OAAO,EACL,KAAK,4BAA4B,EAElC,MAAM,kCAAkC,CAAC;AAG1C,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,uBAAuB,CAAC;AAKpD,qBAAa,mCAAmC;IAC9C,gBAAgB,EAAE,4BAA4B,CAAC;IAC/C,gBAAgB,EAAE,gBAAgB,CAAC;IAEnC,SAAS,cAAwB;IACjC,iBAAiB,cAAwB;IACzC,QAAQ,EAAE,OAAO,EAAE,CAAM;IACzB,cAAc,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;IAErC,mBAAmB,cAAwB;IAC3C,oBAAoB,cAAwB;IAC5C,eAAe,EAAE,SAAS,EAAE,CAAM;IAClC,qBAAqB,CAAC,EAAE,SAAS,GAAG,SAAS,CAAC;IAC9C,wBAAwB,UAAS;IAEjC,QAAQ,EAAE,MAAM,EAAE,CAAM;IACxB,cAAc,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;gBAGlC,gBAAgB,EAAE,4BAA4B,EAC9C,gBAAgB,EAAE,gBAAgB;IA0BpC,2BAA2B,CAAC,GAAG,EAAE,OAAO,GAAG,IAAI;IAI/C,mBAAmB,IAAI,IAAI;IAS3B,0BAA0B,IAAI,IAAI;IAMlC,mBAAmB,IAAI,IAAI;IAI1B,UAAU,CAAC,SAAS,EAAE,MAAM,GAAG,SAAS,GAAG,WAAW,CAAC,IAAI,CAAC;IAqC5D,YAAY,CAAC,UAAU,EAAE,MAAM,GAAG,WAAW,CAAC,IAAI,CAAC;IAqBnD,aAAa,CAAC,OAAO,EAAE,OAAO,GAAG,WAAW,CAAC,IAAI,CAAC;IA+ClD,eAAe,CAAC,SAAS,EAAE,SAAS,GAAG,WAAW,CAAC,IAAI,CAAC;IAoBzD,aAAa,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI;IAInC,eAAe,CAAC,SAAS,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,GAAG,WAAW,CAAC,IAAI,CAAC;CAwC5E"}
|
|
@@ -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 { Workspace, WorkspaceType, Project, } from '@finos/legend-server-sdlc';
|
|
19
|
+
import { LEGEND_STUDIO_APP_EVENT, } from '@finos/legend-application-studio';
|
|
20
|
+
import { generateProjectServiceQueryUpdaterSetupRoute } from './DSL_Service_LegendStudioRouter.js';
|
|
21
|
+
import { CORE_PURE_PATH } from '@finos/legend-graph';
|
|
22
|
+
const MINIMUM_PROJECT_LOADER_SEARCH_LENGTH = 3;
|
|
23
|
+
const DEFAULT_PROJECT_LOADER_LIMIT = 10;
|
|
24
|
+
export class UpdateProjectServiceQuerySetupStore {
|
|
25
|
+
applicationStore;
|
|
26
|
+
sdlcServerClient;
|
|
27
|
+
initState = ActionState.create();
|
|
28
|
+
loadProjectsState = ActionState.create();
|
|
29
|
+
projects = [];
|
|
30
|
+
currentProject;
|
|
31
|
+
loadWorkspacesState = ActionState.create();
|
|
32
|
+
createWorkspaceState = ActionState.create();
|
|
33
|
+
groupWorkspaces = [];
|
|
34
|
+
currentGroupWorkspace;
|
|
35
|
+
showCreateWorkspaceModal = false;
|
|
36
|
+
services = [];
|
|
37
|
+
currentService;
|
|
38
|
+
constructor(applicationStore, sdlcServerClient) {
|
|
39
|
+
makeObservable(this, {
|
|
40
|
+
projects: observable,
|
|
41
|
+
currentProject: observable,
|
|
42
|
+
groupWorkspaces: observable,
|
|
43
|
+
currentGroupWorkspace: observable,
|
|
44
|
+
showCreateWorkspaceModal: observable,
|
|
45
|
+
services: observable,
|
|
46
|
+
currentService: observable,
|
|
47
|
+
setShowCreateWorkspaceModal: action,
|
|
48
|
+
resetCurrentProject: action,
|
|
49
|
+
resetCurrentGroupWorkspace: action,
|
|
50
|
+
resetCurrentService: action,
|
|
51
|
+
changeService: action,
|
|
52
|
+
initialize: flow,
|
|
53
|
+
loadProjects: flow,
|
|
54
|
+
changeProject: flow,
|
|
55
|
+
changeWorkspace: flow,
|
|
56
|
+
createWorkspace: flow,
|
|
57
|
+
});
|
|
58
|
+
this.applicationStore = applicationStore;
|
|
59
|
+
this.sdlcServerClient = sdlcServerClient;
|
|
60
|
+
}
|
|
61
|
+
setShowCreateWorkspaceModal(val) {
|
|
62
|
+
this.showCreateWorkspaceModal = val;
|
|
63
|
+
}
|
|
64
|
+
resetCurrentProject() {
|
|
65
|
+
this.currentProject = undefined;
|
|
66
|
+
this.groupWorkspaces = [];
|
|
67
|
+
this.resetCurrentGroupWorkspace();
|
|
68
|
+
this.applicationStore.navigator.goTo(generateProjectServiceQueryUpdaterSetupRoute(undefined));
|
|
69
|
+
}
|
|
70
|
+
resetCurrentGroupWorkspace() {
|
|
71
|
+
this.currentGroupWorkspace = undefined;
|
|
72
|
+
this.services = [];
|
|
73
|
+
this.resetCurrentService();
|
|
74
|
+
}
|
|
75
|
+
resetCurrentService() {
|
|
76
|
+
this.currentService = undefined;
|
|
77
|
+
}
|
|
78
|
+
*initialize(projectId) {
|
|
79
|
+
if (!this.initState.isInInitialState) {
|
|
80
|
+
return;
|
|
81
|
+
}
|
|
82
|
+
this.initState.inProgress();
|
|
83
|
+
try {
|
|
84
|
+
if (projectId) {
|
|
85
|
+
let project;
|
|
86
|
+
try {
|
|
87
|
+
project = Project.serialization.fromJson((yield this.sdlcServerClient.getProject(projectId)));
|
|
88
|
+
}
|
|
89
|
+
catch {
|
|
90
|
+
this.applicationStore.navigator.goTo(generateProjectServiceQueryUpdaterSetupRoute(undefined));
|
|
91
|
+
this.initState.pass();
|
|
92
|
+
return;
|
|
93
|
+
}
|
|
94
|
+
yield flowResult(this.changeProject(project));
|
|
95
|
+
}
|
|
96
|
+
this.initState.pass();
|
|
97
|
+
}
|
|
98
|
+
catch (error) {
|
|
99
|
+
assertErrorThrown(error);
|
|
100
|
+
this.applicationStore.log.error(LogEvent.create(LEGEND_STUDIO_APP_EVENT.SDLC_MANAGER_FAILURE), error);
|
|
101
|
+
this.applicationStore.notifyError(error);
|
|
102
|
+
this.initState.fail();
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
*loadProjects(searchText) {
|
|
106
|
+
const isValidSearchString = searchText.length >= MINIMUM_PROJECT_LOADER_SEARCH_LENGTH;
|
|
107
|
+
this.loadProjectsState.inProgress();
|
|
108
|
+
try {
|
|
109
|
+
this.projects = (yield this.sdlcServerClient.getProjects(undefined, isValidSearchString ? searchText : undefined, undefined, DEFAULT_PROJECT_LOADER_LIMIT)).map((v) => Project.serialization.fromJson(v));
|
|
110
|
+
this.loadProjectsState.pass();
|
|
111
|
+
}
|
|
112
|
+
catch (error) {
|
|
113
|
+
assertErrorThrown(error);
|
|
114
|
+
this.applicationStore.notifyError(error);
|
|
115
|
+
this.loadProjectsState.fail();
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
*changeProject(project) {
|
|
119
|
+
this.currentProject = project;
|
|
120
|
+
this.applicationStore.navigator.goTo(generateProjectServiceQueryUpdaterSetupRoute(project.projectId));
|
|
121
|
+
this.loadWorkspacesState.inProgress();
|
|
122
|
+
try {
|
|
123
|
+
const workspacesInConflictResolutionIds = (yield this.sdlcServerClient.getWorkspacesInConflictResolutionMode(project.projectId)).map((workspace) => workspace.workspaceId);
|
|
124
|
+
this.groupWorkspaces = (yield this.sdlcServerClient.getGroupWorkspaces(project.projectId))
|
|
125
|
+
.map((v) => Workspace.serialization.fromJson(v))
|
|
126
|
+
.filter((workspace) =>
|
|
127
|
+
// NOTE we don't handle workspaces that only have conflict resolution but no standard workspace
|
|
128
|
+
// since that indicates bad state of the SDLC server
|
|
129
|
+
!workspacesInConflictResolutionIds.includes(workspace.workspaceId) && workspace.workspaceType === WorkspaceType.GROUP);
|
|
130
|
+
if (this.groupWorkspaces.length) {
|
|
131
|
+
yield flowResult(this.changeWorkspace(guaranteeNonNullable(this.groupWorkspaces[0])));
|
|
132
|
+
}
|
|
133
|
+
this.loadWorkspacesState.pass();
|
|
134
|
+
}
|
|
135
|
+
catch (error) {
|
|
136
|
+
assertErrorThrown(error);
|
|
137
|
+
this.applicationStore.log.error(LogEvent.create(LEGEND_STUDIO_APP_EVENT.SDLC_MANAGER_FAILURE), error);
|
|
138
|
+
this.applicationStore.notifyError(error);
|
|
139
|
+
this.loadWorkspacesState.fail();
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
*changeWorkspace(workspace) {
|
|
143
|
+
this.currentGroupWorkspace = workspace;
|
|
144
|
+
try {
|
|
145
|
+
const entities = (yield flowResult(this.sdlcServerClient.getEntities(workspace.projectId, workspace)));
|
|
146
|
+
this.services = entities.filter((entity) => entity.classifierPath === CORE_PURE_PATH.SERVICE);
|
|
147
|
+
if (this.services.length) {
|
|
148
|
+
this.changeService(guaranteeNonNullable(this.services[0]));
|
|
149
|
+
}
|
|
150
|
+
}
|
|
151
|
+
catch {
|
|
152
|
+
this.services = [];
|
|
153
|
+
this.resetCurrentService();
|
|
154
|
+
}
|
|
155
|
+
}
|
|
156
|
+
changeService(service) {
|
|
157
|
+
this.currentService = service;
|
|
158
|
+
}
|
|
159
|
+
*createWorkspace(projectId, workspaceId) {
|
|
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));
|
|
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=UpdateProjectServiceQuerySetupStore.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"UpdateProjectServiceQuerySetupStore.js","sourceRoot":"","sources":["../../../src/stores/studio/UpdateProjectServiceQuerySetupStore.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,EAEL,SAAS,EACT,aAAa,EACb,OAAO,GACR,MAAM,2BAA2B,CAAC;AACnC,OAAO,EAEL,uBAAuB,GACxB,MAAM,kCAAkC,CAAC;AAC1C,OAAO,EAAE,4CAA4C,EAAE,MAAM,qCAAqC,CAAC;AACnG,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAGrD,MAAM,oCAAoC,GAAG,CAAC,CAAC;AAC/C,MAAM,4BAA4B,GAAG,EAAE,CAAC;AAExC,MAAM,OAAO,mCAAmC;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D;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"}
|
|
@@ -0,0 +1,48 @@
|
|
|
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 { type DepotServerClient, ProjectData } from '@finos/legend-server-depot';
|
|
18
|
+
import { type ServiceInfo } from '@finos/legend-query-builder';
|
|
19
|
+
import { type SDLCServerClient, Workspace } from '@finos/legend-server-sdlc';
|
|
20
|
+
import { type LegendStudioApplicationStore } from '@finos/legend-application-studio';
|
|
21
|
+
import type { Entity } from '@finos/legend-storage';
|
|
22
|
+
export declare class UpdateServiceQuerySetupStore {
|
|
23
|
+
applicationStore: LegendStudioApplicationStore;
|
|
24
|
+
sdlcServerClient: SDLCServerClient;
|
|
25
|
+
depotServerClient: DepotServerClient;
|
|
26
|
+
initState: ActionState;
|
|
27
|
+
loadServicesState: ActionState;
|
|
28
|
+
services: ServiceInfo[];
|
|
29
|
+
currentProject?: ProjectData | undefined;
|
|
30
|
+
currentSnapshotService?: ServiceInfo | undefined;
|
|
31
|
+
loadWorkspacesState: ActionState;
|
|
32
|
+
createWorkspaceState: ActionState;
|
|
33
|
+
groupWorkspaces: Workspace[];
|
|
34
|
+
currentGroupWorkspace?: Workspace | undefined;
|
|
35
|
+
currentWorkspaceService?: Entity | undefined;
|
|
36
|
+
checkWorkspaceCompatibilityState: ActionState;
|
|
37
|
+
showCreateWorkspaceModal: boolean;
|
|
38
|
+
constructor(applicationStore: LegendStudioApplicationStore, sdlcServerClient: SDLCServerClient, depotServerClient: DepotServerClient);
|
|
39
|
+
setShowCreateWorkspaceModal(val: boolean): void;
|
|
40
|
+
resetCurrentService(): void;
|
|
41
|
+
resetCurrentGroupWorkspace(): void;
|
|
42
|
+
initialize(serviceCoordinates: string | undefined): GeneratorFn<void>;
|
|
43
|
+
loadServices(searchText: string): GeneratorFn<void>;
|
|
44
|
+
changeService(groupId: string, artifactId: string, servicePath: string): GeneratorFn<void>;
|
|
45
|
+
changeWorkspace(workspace: Workspace, servicePath: string): GeneratorFn<void>;
|
|
46
|
+
createWorkspace(projectId: string, workspaceId: string, servicePath: string): GeneratorFn<void>;
|
|
47
|
+
}
|
|
48
|
+
//# sourceMappingURL=UpdateServiceQuerySetupStore.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"UpdateServiceQuerySetupStore.d.ts","sourceRoot":"","sources":["../../../src/stores/studio/UpdateServiceQuerySetupStore.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAGH,OAAO,EACL,KAAK,WAAW,E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