@finos/legend-application-studio 28.18.123 → 28.18.125

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.
Files changed (106) hide show
  1. package/lib/__lib__/LegendStudioNavigation.d.ts +7 -0
  2. package/lib/__lib__/LegendStudioNavigation.d.ts.map +1 -1
  3. package/lib/__lib__/LegendStudioNavigation.js +5 -0
  4. package/lib/__lib__/LegendStudioNavigation.js.map +1 -1
  5. package/lib/application/LegendIngestionConfiguration.d.ts +40 -0
  6. package/lib/application/LegendIngestionConfiguration.d.ts.map +1 -0
  7. package/lib/application/LegendIngestionConfiguration.js +57 -0
  8. package/lib/application/LegendIngestionConfiguration.js.map +1 -0
  9. package/lib/application/LegendStudioApplicationConfig.d.ts +2 -0
  10. package/lib/application/LegendStudioApplicationConfig.d.ts.map +1 -1
  11. package/lib/application/LegendStudioApplicationConfig.js +6 -0
  12. package/lib/application/LegendStudioApplicationConfig.js.map +1 -1
  13. package/lib/components/ElementIconUtils.d.ts.map +1 -1
  14. package/lib/components/ElementIconUtils.js +3 -1
  15. package/lib/components/ElementIconUtils.js.map +1 -1
  16. package/lib/components/LegendStudioWebApplication.d.ts.map +1 -1
  17. package/lib/components/LegendStudioWebApplication.js +16 -0
  18. package/lib/components/LegendStudioWebApplication.js.map +1 -1
  19. package/lib/components/editor/Editor.d.ts.map +1 -1
  20. package/lib/components/editor/Editor.js +3 -2
  21. package/lib/components/editor/Editor.js.map +1 -1
  22. package/lib/components/editor/editor-group/EditorGroup.d.ts.map +1 -1
  23. package/lib/components/editor/editor-group/EditorGroup.js +5 -0
  24. package/lib/components/editor/editor-group/EditorGroup.js.map +1 -1
  25. package/lib/components/editor/editor-group/ingest-editor/IngestDefinitionEditor.d.ts +19 -0
  26. package/lib/components/editor/editor-group/ingest-editor/IngestDefinitionEditor.d.ts.map +1 -0
  27. package/lib/components/editor/editor-group/ingest-editor/IngestDefinitionEditor.js +71 -0
  28. package/lib/components/editor/editor-group/ingest-editor/IngestDefinitionEditor.js.map +1 -0
  29. package/lib/components/lazy-text-editor/LazyTextEditor.js +1 -1
  30. package/lib/components/lazy-text-editor/LazyTextEditor.js.map +1 -1
  31. package/lib/index.css +1 -1
  32. package/lib/package.json +3 -1
  33. package/lib/stores/editor/EditorGraphState.d.ts.map +1 -1
  34. package/lib/stores/editor/EditorGraphState.js +4 -1
  35. package/lib/stores/editor/EditorGraphState.js.map +1 -1
  36. package/lib/stores/editor/EditorStore.d.ts +6 -2
  37. package/lib/stores/editor/EditorStore.d.ts.map +1 -1
  38. package/lib/stores/editor/EditorStore.js +21 -4
  39. package/lib/stores/editor/EditorStore.js.map +1 -1
  40. package/lib/stores/editor/EditorTabManagerState.d.ts +2 -1
  41. package/lib/stores/editor/EditorTabManagerState.d.ts.map +1 -1
  42. package/lib/stores/editor/EditorTabManagerState.js +6 -2
  43. package/lib/stores/editor/EditorTabManagerState.js.map +1 -1
  44. package/lib/stores/editor/GraphEditFormModeState.d.ts +2 -1
  45. package/lib/stores/editor/GraphEditFormModeState.d.ts.map +1 -1
  46. package/lib/stores/editor/GraphEditFormModeState.js +2 -2
  47. package/lib/stores/editor/GraphEditFormModeState.js.map +1 -1
  48. package/lib/stores/editor/GraphEditorMode.d.ts +2 -1
  49. package/lib/stores/editor/GraphEditorMode.d.ts.map +1 -1
  50. package/lib/stores/editor/GraphEditorMode.js.map +1 -1
  51. package/lib/stores/editor/editor-state/element-editor-state/ElementEditorInitialConfiguration.d.ts +30 -0
  52. package/lib/stores/editor/editor-state/element-editor-state/ElementEditorInitialConfiguration.d.ts.map +1 -0
  53. package/lib/stores/editor/editor-state/element-editor-state/ElementEditorInitialConfiguration.js +50 -0
  54. package/lib/stores/editor/editor-state/element-editor-state/ElementEditorInitialConfiguration.js.map +1 -0
  55. package/lib/stores/editor/editor-state/element-editor-state/ElementEditorState.d.ts +2 -1
  56. package/lib/stores/editor/editor-state/element-editor-state/ElementEditorState.d.ts.map +1 -1
  57. package/lib/stores/editor/editor-state/element-editor-state/ElementEditorState.js +1 -1
  58. package/lib/stores/editor/editor-state/element-editor-state/ElementEditorState.js.map +1 -1
  59. package/lib/stores/editor/editor-state/element-editor-state/ingest/IngestDefinitionEditorState.d.ts +37 -0
  60. package/lib/stores/editor/editor-state/element-editor-state/ingest/IngestDefinitionEditorState.d.ts.map +1 -0
  61. package/lib/stores/editor/editor-state/element-editor-state/ingest/IngestDefinitionEditorState.js +107 -0
  62. package/lib/stores/editor/editor-state/element-editor-state/ingest/IngestDefinitionEditorState.js.map +1 -0
  63. package/lib/stores/editor/utils/ModelClassifierUtils.d.ts +2 -1
  64. package/lib/stores/editor/utils/ModelClassifierUtils.d.ts.map +1 -1
  65. package/lib/stores/editor/utils/ModelClassifierUtils.js +1 -0
  66. package/lib/stores/editor/utils/ModelClassifierUtils.js.map +1 -1
  67. package/lib/stores/ingestion/IngestDeploymentServerClient.d.ts +29 -0
  68. package/lib/stores/ingestion/IngestDeploymentServerClient.d.ts.map +1 -0
  69. package/lib/stores/ingestion/IngestDeploymentServerClient.js +49 -0
  70. package/lib/stores/ingestion/IngestDeploymentServerClient.js.map +1 -0
  71. package/lib/stores/ingestion/IngestDiscoveryServerClient.d.ts +26 -0
  72. package/lib/stores/ingestion/IngestDiscoveryServerClient.d.ts.map +1 -0
  73. package/lib/stores/ingestion/IngestDiscoveryServerClient.js +35 -0
  74. package/lib/stores/ingestion/IngestDiscoveryServerClient.js.map +1 -0
  75. package/lib/stores/ingestion/IngestionDeploymentResponse.d.ts +30 -0
  76. package/lib/stores/ingestion/IngestionDeploymentResponse.d.ts.map +1 -0
  77. package/lib/stores/ingestion/IngestionDeploymentResponse.js +37 -0
  78. package/lib/stores/ingestion/IngestionDeploymentResponse.js.map +1 -0
  79. package/lib/stores/ingestion/IngestionManager.d.ts +35 -0
  80. package/lib/stores/ingestion/IngestionManager.d.ts.map +1 -0
  81. package/lib/stores/ingestion/IngestionManager.js +80 -0
  82. package/lib/stores/ingestion/IngestionManager.js.map +1 -0
  83. package/package.json +10 -8
  84. package/src/__lib__/LegendStudioNavigation.ts +14 -0
  85. package/src/application/LegendIngestionConfiguration.ts +94 -0
  86. package/src/application/LegendStudioApplicationConfig.ts +15 -0
  87. package/src/components/ElementIconUtils.tsx +3 -0
  88. package/src/components/LegendStudioWebApplication.tsx +29 -0
  89. package/src/components/editor/Editor.tsx +8 -3
  90. package/src/components/editor/editor-group/EditorGroup.tsx +4 -1
  91. package/src/components/editor/editor-group/ingest-editor/IngestDefinitionEditor.tsx +156 -0
  92. package/src/components/lazy-text-editor/LazyTextEditor.tsx +1 -1
  93. package/src/stores/editor/EditorGraphState.ts +3 -0
  94. package/src/stores/editor/EditorStore.ts +39 -1
  95. package/src/stores/editor/EditorTabManagerState.ts +6 -0
  96. package/src/stores/editor/GraphEditFormModeState.ts +9 -2
  97. package/src/stores/editor/GraphEditorMode.ts +5 -1
  98. package/src/stores/editor/editor-state/element-editor-state/ElementEditorInitialConfiguration.ts +97 -0
  99. package/src/stores/editor/editor-state/element-editor-state/ElementEditorState.ts +6 -1
  100. package/src/stores/editor/editor-state/element-editor-state/ingest/IngestDefinitionEditorState.ts +169 -0
  101. package/src/stores/editor/utils/ModelClassifierUtils.ts +1 -0
  102. package/src/stores/ingestion/IngestDeploymentServerClient.ts +83 -0
  103. package/src/stores/ingestion/IngestDiscoveryServerClient.ts +52 -0
  104. package/src/stores/ingestion/IngestionDeploymentResponse.ts +45 -0
  105. package/src/stores/ingestion/IngestionManager.ts +151 -0
  106. package/tsconfig.json +8 -0
@@ -0,0 +1,107 @@
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 { IngestDefinition } from '@finos/legend-graph';
17
+ import { ElementEditorState } from '../ElementEditorState.js';
18
+ import { ActionState, assertErrorThrown, assertTrue, guaranteeNonNullable, guaranteeType, } from '@finos/legend-shared';
19
+ import { flow, flowResult, makeObservable, observable } from 'mobx';
20
+ import { EditorInitialConfiguration, IngestElementEditorInitialConfiguration, } from '../ElementEditorInitialConfiguration.js';
21
+ import { EXTERNAL_APPLICATION_NAVIGATION__generateUrlWithEditorConfig } from '../../../../../__lib__/LegendStudioNavigation.js';
22
+ const createEditorInitialConfiguration = () => {
23
+ const config = new EditorInitialConfiguration();
24
+ const ingest = new IngestElementEditorInitialConfiguration();
25
+ ingest.deployOnOpen = true;
26
+ config.elementEditorConfiguration = ingest;
27
+ return config;
28
+ };
29
+ const editorInitialConfigToBase64 = (val) => btoa(JSON.stringify(EditorInitialConfiguration.serialization.toJson(val)));
30
+ export const generateUrlToDeployOnOpen = (val) => {
31
+ return val.editorStore.applicationStore.navigationService.navigator.generateAddress(EXTERNAL_APPLICATION_NAVIGATION__generateUrlWithEditorConfig(val.editorStore.editorMode.generateElementLink(val.ingest.path), editorInitialConfigToBase64(createEditorInitialConfiguration())));
32
+ };
33
+ export class IngestDefinitionEditorState extends ElementEditorState {
34
+ deploymentState = ActionState.create();
35
+ deployOnOpen = false;
36
+ constructor(editorStore, element, config) {
37
+ super(editorStore, element);
38
+ makeObservable(this, {
39
+ deploymentState: observable,
40
+ deployOnOpen: observable,
41
+ setDeployOnOpen: observable,
42
+ init_with_deploy: flow,
43
+ deploy: flow,
44
+ });
45
+ const elementConfig = config?.elementEditorConfiguration;
46
+ if (elementConfig instanceof IngestElementEditorInitialConfiguration) {
47
+ this.deployOnOpen = elementConfig.deployOnOpen ?? false;
48
+ }
49
+ }
50
+ get ingestionManager() {
51
+ return this.editorStore.ingestionManager;
52
+ }
53
+ setDeployOnOpen(value) {
54
+ this.deployOnOpen = value;
55
+ }
56
+ *init_with_deploy(auth) {
57
+ this.setDeployOnOpen(false);
58
+ if (!auth.isAuthenticated) {
59
+ auth
60
+ .signinRedirect({
61
+ state: generateUrlToDeployOnOpen(this),
62
+ })
63
+ .catch(this.editorStore.applicationStore.alertUnhandledError);
64
+ return;
65
+ }
66
+ const token = auth.user?.access_token;
67
+ yield flowResult(this.generateElementGrammar()).catch(this.editorStore.applicationStore.alertUnhandledError);
68
+ flowResult(this.deploy(token)).catch(this.editorStore.applicationStore.alertUnhandledError);
69
+ }
70
+ *deploy(token) {
71
+ try {
72
+ assertTrue(this.validForDeployment, 'Ingest definition is not valid for deployment');
73
+ this.deploymentState.inProgress();
74
+ const response = (yield guaranteeNonNullable(this.ingestionManager).deploy(guaranteeNonNullable(this.textContent), guaranteeNonNullable(this.ingest.appDirDeployment), this.deploymentState, token));
75
+ this.editorStore.applicationStore.notificationService.notifySuccess(`Ingest definition successfully deployed on ${response.ingestDefinitionUrn}`);
76
+ }
77
+ catch (error) {
78
+ assertErrorThrown(error);
79
+ this.editorStore.applicationStore.notificationService.notifyError(`Ingest definition failed to deploy: ${error.message}`);
80
+ }
81
+ finally {
82
+ this.deploymentState.complete();
83
+ }
84
+ }
85
+ reprocess(newElement, editorStore) {
86
+ return new IngestDefinitionEditorState(editorStore, newElement);
87
+ }
88
+ get validForDeployment() {
89
+ return Boolean(this.ingest.appDirDeployment && this.textContent && this.ingestionManager);
90
+ }
91
+ get validationMessage() {
92
+ if (!this.ingest.appDirDeployment) {
93
+ return 'No app dir deployment found';
94
+ }
95
+ else if (!this.textContent) {
96
+ return 'No ingest definition found';
97
+ }
98
+ else if (!this.ingestionManager) {
99
+ return 'No ingestion manager found';
100
+ }
101
+ return 'Deploy';
102
+ }
103
+ get ingest() {
104
+ return guaranteeType(this.element, IngestDefinition, 'Element inside ingest editor state must be a IngestDefinition');
105
+ }
106
+ }
107
+ //# sourceMappingURL=IngestDefinitionEditorState.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"IngestDefinitionEditorState.js","sourceRoot":"","sources":["../../../../../../src/stores/editor/editor-state/element-editor-state/ingest/IngestDefinitionEditorState.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,gBAAgB,EAA2B,MAAM,qBAAqB,CAAC;AAChF,OAAO,EAAE,kBAAkB,EAAE,MAAM,0BAA0B,CAAC;AAE9D,OAAO,EACL,WAAW,EACX,iBAAiB,EACjB,UAAU,EACV,oBAAoB,EACpB,aAAa,GAEd,MAAM,sBAAsB,CAAC;AAE9B,OAAO,EAAE,IAAI,EAAE,UAAU,EAAE,cAAc,EAAE,UAAU,EAAE,MAAM,MAAM,CAAC;AAEpE,OAAO,EACL,0BAA0B,EAC1B,uCAAuC,GACxC,MAAM,yCAAyC,CAAC;AAEjD,OAAO,EAAE,4DAA4D,EAAE,MAAM,kDAAkD,CAAC;AAEhI,MAAM,gCAAgC,GAAG,GAA+B,EAAE;IACxE,MAAM,MAAM,GAAG,IAAI,0BAA0B,EAAE,CAAC;IAChD,MAAM,MAAM,GAAG,IAAI,uCAAuC,EAAE,CAAC;IAC7D,MAAM,CAAC,YAAY,GAAG,IAAI,CAAC;IAC3B,MAAM,CAAC,0BAA0B,GAAG,MAAM,CAAC;IAC3C,OAAO,MAAM,CAAC;AAChB,CAAC,CAAC;AAEF,MAAM,2BAA2B,GAAG,CAAC,GAA+B,EAAU,EAAE,CAC9E,IAAI,CAAC,IAAI,CAAC,SAAS,CAAC,0BAA0B,CAAC,aAAa,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;AAE7E,MAAM,CAAC,MAAM,yBAAyB,GAAG,CACvC,GAAgC,EACxB,EAAE;IACV,OAAO,GAAG,CAAC,WAAW,CAAC,gBAAgB,CAAC,iBAAiB,CAAC,SAAS,CAAC,eAAe,CACjF,4DAA4D,CAC1D,GAAG,CAAC,WAAW,CAAC,UAAU,CAAC,mBAAmB,CAAC,G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O,OAAO,CACZ,IAAI,CAAC,MAAM,CAAC,gBAAgB,IAAI,IAAI,CAAC,WAAW,IAAI,IAAI,CAAC,gBAAgB,CAC1E,CAAC;IACJ,CAAC;IAED,IAAI,iBAAiB;QACnB,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,gBAAgB,EAAE,CAAC;YAClC,OAAO,6BAA6B,CAAC;QACvC,CAAC;aAAM,IAAI,CAAC,IAAI,CAAC,WAAW,EAAE,CAAC;YAC7B,OAAO,4BAA4B,CAAC;QACtC,CAAC;aAAM,IAAI,CAAC,IAAI,CAAC,gBAAgB,EAAE,CAAC;YAClC,OAAO,4BAA4B,CAAC;QACtC,CAAC;QACD,OAAO,QAAQ,CAAC;IAClB,CAAC;IAED,IAAI,MAAM;QACR,OAAO,aAAa,CAClB,IAAI,CAAC,OAAO,EACZ,gBAAgB,EAChB,+DAA+D,CAChE,CAAC;IACJ,CAAC;CACF"}
@@ -48,7 +48,8 @@ export declare enum PACKAGEABLE_ELEMENT_TYPE {
48
48
  HOSTED_SERVICE = "HOSTED_SERVICE",
49
49
  _DATA_PRODUCT = "BETA_DATA_PRODUCT",
50
50
  TEMPORARY__LOCAL_CONNECTION = "LOCAL_CONNECTION",
51
- INTERNAL__UnknownElement = "UNKNOWN"
51
+ INTERNAL__UnknownElement = "UNKNOWN",
52
+ INGEST_DEFINITION = "INGEST_DEFINITION"
52
53
  }
53
54
  export declare enum PACKAGEABLE_ELEMENT_GROUP_BY_CATEGORY {
54
55
  MODEL = "Model",
@@ -1 +1 @@
1
- {"version":3,"file":"ModelClassifierUtils.d.ts","sourceRoot":"","sources":["../../../../src/stores/editor/utils/ModelClassifierUtils.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EACL,KAAK,IAAI,EAMV,MAAM,qBAAqB,CAAC;AAG7B,oBAAY,mBAAmB;IAC7B,KAAK,UAAU;IACf,WAAW,gBAAgB;IAC3B,OAAO,YAAY;IACnB,IAAI,SAAS;IACb,SAAS,cAAc;CACxB;AAED,eAAO,MAAM,oBAAoB,GAAI,MAAM,IAAI,KAAG,mBAajD,CAAC;AAEF,oBAAY,wBAAwB;IAClC,SAAS,cAAc;IACvB,OAAO,YAAY;IACnB,OAAO,YAAY;IACnB,WAAW,gBAAgB;IAC3B,KAAK,UAAU;IACf,WAAW,gBAAgB;IAC3B,QAAQ,aAAa;IACrB,OAAO,YAAY;IACnB,IAAI,SAAS;IACb,eAAe,oBAAoB;IACnC,QAAQ,aAAa;IACrB,aAAa,kBAAkB;IAC/B,OAAO,YAAY;IACnB,OAAO,YAAY;IACnB,qBAAqB,0BAA0B;IAC/C,UAAU,eAAe;IACzB,OAAO,YAAY;IACnB,eAAe,oBAAoB;IACnC,wBAAwB,6BAA6B;IACrD,aAAa,kBAAkB;IAC/B,IAAI,SAAS;IACb,aAAa,kBAAkB;IAC/B,cAAc,mBAAmB;IAEjC,aAAa,sBAAsB;IAEnC,2BAA2B,qBAAqB;IAChD,wBAAwB,YAAY;CACrC;AAED,oBAAY,qCAAqC;IAC/C,KAAK,UAAU;IACf,KAAK,UAAU;IACf,KAAK,UAAU;IACf,eAAe,oBAAoB;IACnC,UAAU,eAAe;IACzB,KAAK,UAAU;CAChB"}
1
+ {"version":3,"file":"ModelClassifierUtils.d.ts","sourceRoot":"","sources":["../../../../src/stores/editor/utils/ModelClassifierUtils.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EACL,KAAK,IAAI,EAMV,MAAM,qBAAqB,CAAC;AAG7B,oBAAY,mBAAmB;IAC7B,KAAK,UAAU;IACf,WAAW,gBAAgB;IAC3B,OAAO,YAAY;IACnB,IAAI,SAAS;IACb,SAAS,cAAc;CACxB;AAED,eAAO,MAAM,oBAAoB,GAAI,MAAM,IAAI,KAAG,mBAajD,CAAC;AAEF,oBAAY,wBAAwB;IAClC,SAAS,cAAc;IACvB,OAAO,YAAY;IACnB,OAAO,YAAY;IACnB,WAAW,gBAAgB;IAC3B,KAAK,UAAU;IACf,WAAW,gBAAgB;IAC3B,QAAQ,aAAa;IACrB,OAAO,YAAY;IACnB,IAAI,SAAS;IACb,eAAe,oBAAoB;IACnC,QAAQ,aAAa;IACrB,aAAa,kBAAkB;IAC/B,OAAO,YAAY;IACnB,OAAO,YAAY;IACnB,qBAAqB,0BAA0B;IAC/C,UAAU,eAAe;IACzB,OAAO,YAAY;IACnB,eAAe,oBAAoB;IACnC,wBAAwB,6BAA6B;IACrD,aAAa,kBAAkB;IAC/B,IAAI,SAAS;IACb,aAAa,kBAAkB;IAC/B,cAAc,mBAAmB;IAEjC,aAAa,sBAAsB;IAEnC,2BAA2B,qBAAqB;IAChD,wBAAwB,YAAY;IACpC,iBAAiB,sBAAsB;CACxC;AAED,oBAAY,qCAAqC;IAC/C,KAAK,UAAU;IACf,KAAK,UAAU;IACf,KAAK,UAAU;IACf,eAAe,oBAAoB;IACnC,UAAU,eAAe;IACzB,KAAK,UAAU;CAChB"}
@@ -70,6 +70,7 @@ export var PACKAGEABLE_ELEMENT_TYPE;
70
70
  PACKAGEABLE_ELEMENT_TYPE["_DATA_PRODUCT"] = "BETA_DATA_PRODUCT";
71
71
  PACKAGEABLE_ELEMENT_TYPE["TEMPORARY__LOCAL_CONNECTION"] = "LOCAL_CONNECTION";
72
72
  PACKAGEABLE_ELEMENT_TYPE["INTERNAL__UnknownElement"] = "UNKNOWN";
73
+ PACKAGEABLE_ELEMENT_TYPE["INGEST_DEFINITION"] = "INGEST_DEFINITION";
73
74
  })(PACKAGEABLE_ELEMENT_TYPE || (PACKAGEABLE_ELEMENT_TYPE = {}));
74
75
  export var PACKAGEABLE_ELEMENT_GROUP_BY_CATEGORY;
75
76
  (function (PACKAGEABLE_ELEMENT_GROUP_BY_CATEGORY) {
@@ -1 +1 @@
1
- {"version":3,"file":"ModelClassifierUtils.js","sourceRoot":"","sources":["../../../../src/stores/editor/utils/ModelClassifierUtils.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GA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AA;IACrB,2DAA+B,CAAA;IAC/B,+CAAmB,CAAA;IACnB,+CAAmB,CAAA;IACnB,2EAA+C,CAAA;IAC/C,qDAAyB,CAAA;IACzB,+CAAmB,CAAA;IACnB,+DAAmC,CAAA;IACnC,iFAAqD,CAAA;IACrD,2DAA+B,CAAA;IAC/B,yCAAa,CAAA;IACb,2DAA+B,CAAA;IAC/B,6DAAiC,CAAA;IACjC,+BAA+B;IAC/B,+DAAmC,CAAA;IAEnC,4EAAgD,CAAA;IAChD,gEAAoC,CAAA;AACtC,CAAC,EA7BW,wBAAwB,KAAxB,wBAAwB,QA6BnC;AAED,MAAM,CAAN,IAAY,qCAOX;AAPD,WAAY,qCAAqC;IAC/C,wDAAe,CAAA;IACf,wDAAe,CAAA;IACf,wDAAe,CAAA;IACf,4EAAmC,CAAA;IACnC,kEAAyB,CAAA;IACzB,wDAAe,CAAA;AACjB,CAAC,EAPW,qCAAqC,KAArC,qCAAqC,QAOhD"}
1
+ {"version":3,"file":"ModelClassifierUtils.js","sourceRoot":"","sources":["../../../../src/stores/editor/utils/ModelClassifierUtils.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAEL,KAAK,EACL,WAAW,EACX,OAAO,EACP,aAAa,EACb,IAAI,GACL,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAE,yBAAyB,EAAE,MAAM,sBAAsB,CAAC;AAEjE,MAAM,CAAN,IAAY,mBAMX;AAND,WAAY,mBAAmB;IAC7B,sCAAe,CAAA;IACf,kDAA2B,CAAA;IAC3B,0CAAmB,CAAA;IACnB,oCAAa,CAAA;IACb,8CAAuB,CAAA;AACzB,CAAC,EANW,mBAAmB,KAAnB,mBAAmB,QAM9B;AAED,MAAM,CAAC,MAAM,oBAAoB,GAAG,CAAC,IAAU,EAAuB,EAAE;IACtE,IAAI,IAAI,YAAY,aAAa,EAAE,CAAC;QAClC,OAAO,mBAAmB,CAAC,SAAS,CAAC;IACvC,CAAC;SAAM,I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,4EAAmC,CAAA;IACnC,kEAAyB,CAAA;IACzB,wDAAe,CAAA;AACjB,CAAC,EAPW,qCAAqC,KAArC,qCAAqC,QAOhD"}
@@ -0,0 +1,29 @@
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 { AbstractServerClient, type PlainObject } from '@finos/legend-shared';
17
+ import type { IngestDefinitionDeploymentResponse, IngestDefinitionValidationResponse } from './IngestionDeploymentResponse.js';
18
+ import type { IngestDeploymentServerConfig } from '../../application/LegendIngestionConfiguration.js';
19
+ export declare class IngestDeploymentServerClient extends AbstractServerClient {
20
+ environmentClassification: string;
21
+ constructor(config: IngestDeploymentServerConfig);
22
+ private _token;
23
+ private _tokenWithTextPlain;
24
+ private _ingest;
25
+ changeServer(serverConfig: IngestDeploymentServerConfig): void;
26
+ validate(validateGrammar: string, token: string | undefined): Promise<PlainObject<IngestDefinitionValidationResponse>>;
27
+ deploy(deployGrammar: string, token: string | undefined): Promise<IngestDefinitionDeploymentResponse>;
28
+ }
29
+ //# sourceMappingURL=IngestDeploymentServerClient.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"IngestDeploymentServerClient.d.ts","sourceRoot":"","sources":["../../../src/stores/ingestion/IngestDeploymentServerClient.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EACL,oBAAoB,EAGpB,KAAK,WAAW,EACjB,MAAM,sBAAsB,CAAC;AAE9B,OAAO,KAAK,EACV,kCAAkC,EAClC,kCAAkC,EACnC,MAAM,kCAAkC,CAAC;AAC1C,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,mDAAmD,CAAC;AAEtG,qBAAa,4BAA6B,SAAQ,oBAAoB;IACpE,yBAAyB,EAAE,MAAM,CAAC;gBACtB,MAAM,EAAE,4BAA4B;IAWhD,OAAO,CAAC,MAAM,CAEX;IAEH,OAAO,CAAC,mBAAmB,CAGxB;IAEH,OAAO,CAAC,OAAO,CACoC;IAEnD,YAAY,CAAC,YAAY,EAAE,4BAA4B,GAAG,IAAI;IAK9D,QAAQ,CACN,eAAe,EAAE,MAAM,EACvB,KAAK,EAAE,MAAM,GAAG,SAAS,GACxB,OAAO,CAAC,WAAW,CAAC,kCAAkC,CAAC,CAAC;IAS3D,MAAM,CACJ,aAAa,EAAE,MAAM,EACrB,KAAK,EAAE,MAAM,GAAG,SAAS,GACxB,OAAO,CAAC,kCAAkC,CAAC;CAQ/C"}
@@ -0,0 +1,49 @@
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 { AbstractServerClient, ContentType, HttpHeader, } from '@finos/legend-shared';
17
+ import { makeObservable, observable } from 'mobx';
18
+ export class IngestDeploymentServerClient extends AbstractServerClient {
19
+ environmentClassification;
20
+ constructor(config) {
21
+ super({
22
+ baseUrl: config.ingestServerUrl,
23
+ });
24
+ this.environmentClassification = config.environmentClassification;
25
+ makeObservable(this, {
26
+ environmentClassification: observable,
27
+ baseUrl: observable,
28
+ });
29
+ }
30
+ _token = (token) => ({
31
+ Authorization: `Bearer ${token}`,
32
+ });
33
+ _tokenWithTextPlain = (token) => ({
34
+ [HttpHeader.CONTENT_TYPE]: ContentType.TEXT_PLAIN,
35
+ Authorization: `Bearer ${token}`,
36
+ });
37
+ _ingest = () => `${this.baseUrl}/ingest/sdlc/deploy/definitions`;
38
+ changeServer(serverConfig) {
39
+ this.baseUrl = serverConfig.ingestServerUrl;
40
+ this.environmentClassification = serverConfig.environmentClassification;
41
+ }
42
+ validate(validateGrammar, token) {
43
+ return this.post(`${this._ingest()}/validate`, validateGrammar, undefined, this._tokenWithTextPlain(token));
44
+ }
45
+ deploy(deployGrammar, token) {
46
+ return this.post(`${this._ingest()}`, deployGrammar, undefined, this._tokenWithTextPlain(token));
47
+ }
48
+ }
49
+ //# sourceMappingURL=IngestDeploymentServerClient.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"IngestDeploymentServerClient.js","sourceRoot":"","sources":["../../../src/stores/ingestion/IngestDeploymentServerClient.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EACL,oBAAoB,EACpB,WAAW,EACX,UAAU,GAEX,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAAE,cAAc,EAAE,UAAU,EAAE,MAAM,MAAM,CAAC;AAOlD,MAAM,OAAO,4BAA6B,SAAQ,oBAAoB;IACpE,yBAAyB,CAAS;IAClC,YAAY,MAAoC;QAC9C,KAAK,CAAC;YACJ,OAAO,EAAE,MAAM,CAAC,eAAe;SAChC,CAAC,CAAC;QACH,IAAI,CAAC,yBAAyB,GAAG,MAAM,CAAC,yBAAyB,CAAC;QAClE,cAAc,CAAC,IAAI,EAAE;YACnB,yBAAyB,EAAE,UAAU;YACrC,OAAO,EAAE,UAAU;SACpB,CAAC,CAAC;IACL,CAAC;IAEO,MAAM,GAAG,CAAC,KAAc,EAAE,EAAE,CAAC,CAAC;QACpC,aAAa,EAAE,UAAU,KAAK,EAAE;KACjC,CAAC,CAAC;IAEK,mBAAmB,GAAG,CAAC,KAAc,EAAE,EAAE,CAAC,CAAC;QACjD,CAAC,UAAU,CAAC,YAAY,CAAC,EAAE,WAAW,CAAC,UAAU;QACjD,aAAa,EAAE,UAAU,KAAK,EAAE;KACjC,CAAC,CAAC;IAEK,OAAO,GAAG,GAAW,EAAE,CAC7B,GAAG,IAAI,CAAC,OAAO,iCAAiC,CAAC;IAEnD,YAAY,CAAC,YAA0C;QACrD,IAAI,CAAC,OAAO,GAAG,YAAY,CAAC,eAAe,CAAC;QAC5C,IAAI,CAAC,yBAAyB,GAAG,YAAY,CAAC,yBAAyB,CAAC;IAC1E,CAAC;IAED,QAAQ,CACN,eAAuB,EACvB,KAAyB;QAEzB,OAAO,IAAI,CAAC,IAAI,CACd,GAAG,IAAI,CAAC,OAAO,EAAE,WAAW,EAC5B,eAAe,EACf,SAAS,EACT,IAAI,CAAC,mBAAmB,CAAC,KAAK,CAAC,CAChC,CAAC;IACJ,CAAC;IAED,MAAM,CACJ,aAAqB,EACrB,KAAyB;QAEzB,OAAO,IAAI,CAAC,IAAI,CACd,GAAG,IAAI,CAAC,OAAO,EAAE,EAAE,EACnB,aAAa,EACb,SAAS,EACT,IAAI,CAAC,mBAAmB,CAAC,KAAK,CAAC,CAChC,CAAC;IACJ,CAAC;CACF"}
@@ -0,0 +1,26 @@
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 { AbstractServerClient, type PlainObject } from '@finos/legend-shared';
17
+ import type { IngestDeploymentServerConfig } from '../../application/LegendIngestionConfiguration.js';
18
+ export declare class IngestDiscoveryServerClient extends AbstractServerClient {
19
+ constructor(url: string);
20
+ private _ingest;
21
+ private _env;
22
+ private _token;
23
+ discover(token?: string | undefined): Promise<PlainObject<IngestDeploymentServerConfig[]>>;
24
+ findProducerServer(id: number, level: string, token?: string | undefined): Promise<PlainObject<IngestDeploymentServerConfig>>;
25
+ }
26
+ //# sourceMappingURL=IngestDiscoveryServerClient.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"IngestDiscoveryServerClient.d.ts","sourceRoot":"","sources":["../../../src/stores/ingestion/IngestDiscoveryServerClient.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,oBAAoB,EAAE,KAAK,WAAW,EAAE,MAAM,sBAAsB,CAAC;AAC9E,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,mDAAmD,CAAC;AAEtG,qBAAa,2BAA4B,SAAQ,oBAAoB;gBACvD,GAAG,EAAE,MAAM;IAKvB,OAAO,CAAC,OAAO,CAC6C;IAE5D,OAAO,CAAC,IAAI,CAAiE;IAE7E,OAAO,CAAC,MAAM,CAEX;IAEH,QAAQ,CACN,KAAK,CAAC,EAAE,MAAM,GAAG,SAAS,GACzB,OAAO,CAAC,WAAW,CAAC,4BAA4B,EAAE,CAAC,CAAC;IAIvD,kBAAkB,CAChB,EAAE,EAAE,MAAM,EACV,KAAK,EAAE,MAAM,EACb,KAAK,CAAC,EAAE,MAAM,GAAG,SAAS,GACzB,OAAO,CAAC,WAAW,CAAC,4BAA4B,CAAC,CAAC;CAOtD"}
@@ -0,0 +1,35 @@
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 { AbstractServerClient } from '@finos/legend-shared';
17
+ export class IngestDiscoveryServerClient extends AbstractServerClient {
18
+ constructor(url) {
19
+ super({
20
+ baseUrl: url,
21
+ });
22
+ }
23
+ _ingest = () => `${this.baseUrl}/ingest/discovery/environments/producers`;
24
+ _env = () => `${this.baseUrl}/ingest/discovery/environments`;
25
+ _token = (token) => ({
26
+ Authorization: `Bearer ${token}`,
27
+ });
28
+ discover(token) {
29
+ return this.get(`${this._env()}`, {}, this._token(token));
30
+ }
31
+ findProducerServer(id, level, token) {
32
+ return this.get(`${this._ingest()}/${id}/${level}/search`, {}, this._token(token));
33
+ }
34
+ }
35
+ //# sourceMappingURL=IngestDiscoveryServerClient.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"IngestDiscoveryServerClient.js","sourceRoot":"","sources":["../../../src/stores/ingestion/IngestDiscoveryServerClient.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,oBAAoB,EAAoB,MAAM,sBAAsB,CAAC;AAG9E,MAAM,OAAO,2BAA4B,SAAQ,oBAAoB;IACnE,YAAY,GAAW;QACrB,KAAK,CAAC;YACJ,OAAO,EAAE,GAAG;SACb,CAAC,CAAC;IACL,CAAC;IACO,OAAO,GAAG,GAAW,EAAE,CAC7B,GAAG,IAAI,CAAC,OAAO,0CAA0C,CAAC;IAEpD,IAAI,GAAG,GAAW,EAAE,CAAC,GAAG,IAAI,CAAC,OAAO,gCAAgC,CAAC;IAErE,MAAM,GAAG,CAAC,KAAc,EAAE,EAAE,CAAC,CAAC;QACpC,aAAa,EAAE,UAAU,KAAK,EAAE;KACjC,CAAC,CAAC;IAEH,QAAQ,CACN,KAA0B;QAE1B,OAAO,IAAI,CAAC,GAAG,CAAC,GAAG,IAAI,CAAC,IAAI,EAAE,EAAE,EAAE,EAAE,EAAE,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC;IAC5D,CAAC;IAED,kBAAkB,CAChB,EAAU,EACV,KAAa,EACb,KAA0B;QAE1B,OAAO,IAAI,CAAC,GAAG,CACb,GAAG,IAAI,CAAC,OAAO,EAAE,IAAI,EAAE,IAAI,KAAK,SAAS,EACzC,EAAE,EACF,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,CACnB,CAAC;IACJ,CAAC;CACF"}
@@ -0,0 +1,30 @@
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 { SerializationFactory } from '@finos/legend-shared';
17
+ export declare enum IngestDefinitionValidationResponseStatus {
18
+ NOT_CHECKED = "NOT_CHECKED",
19
+ SUCCESS = "SUCCESS",
20
+ FAILURE = "FAILURE"
21
+ }
22
+ export declare class IngestDefinitionValidationResponse {
23
+ status: IngestDefinitionValidationResponseStatus;
24
+ static readonly serialization: SerializationFactory<IngestDefinitionValidationResponse>;
25
+ }
26
+ export declare class IngestDefinitionDeploymentResponse {
27
+ ingestDefinitionUrn: string;
28
+ static readonly serialization: SerializationFactory<IngestDefinitionDeploymentResponse>;
29
+ }
30
+ //# sourceMappingURL=IngestionDeploymentResponse.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"IngestionDeploymentResponse.d.ts","sourceRoot":"","sources":["../../../src/stores/ingestion/IngestionDeploymentResponse.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,oBAAoB,EAAE,MAAM,sBAAsB,CAAC;AAG5D,oBAAY,wCAAwC;IAClD,WAAW,gBAAgB;IAC3B,OAAO,YAAY;IACnB,OAAO,YAAY;CACpB;AAGD,qBAAa,kCAAkC;IAC7C,MAAM,EAAG,wCAAwC,CAAC;IAElD,MAAM,CAAC,QAAQ,CAAC,aAAa,2DAI3B;CACH;AAED,qBAAa,kCAAkC;IAC7C,mBAAmB,EAAG,MAAM,CAAC;IAE7B,MAAM,CAAC,QAAQ,CAAC,aAAa,2DAI3B;CACH"}
@@ -0,0 +1,37 @@
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 { SerializationFactory } from '@finos/legend-shared';
17
+ import { createModelSchema, primitive } from 'serializr';
18
+ export var IngestDefinitionValidationResponseStatus;
19
+ (function (IngestDefinitionValidationResponseStatus) {
20
+ IngestDefinitionValidationResponseStatus["NOT_CHECKED"] = "NOT_CHECKED";
21
+ IngestDefinitionValidationResponseStatus["SUCCESS"] = "SUCCESS";
22
+ IngestDefinitionValidationResponseStatus["FAILURE"] = "FAILURE";
23
+ })(IngestDefinitionValidationResponseStatus || (IngestDefinitionValidationResponseStatus = {}));
24
+ // TODO: include full response for user
25
+ export class IngestDefinitionValidationResponse {
26
+ status;
27
+ static serialization = new SerializationFactory(createModelSchema(IngestDefinitionValidationResponse, {
28
+ status: primitive(),
29
+ }));
30
+ }
31
+ export class IngestDefinitionDeploymentResponse {
32
+ ingestDefinitionUrn;
33
+ static serialization = new SerializationFactory(createModelSchema(IngestDefinitionDeploymentResponse, {
34
+ ingestDefinitionUrn: primitive(),
35
+ }));
36
+ }
37
+ //# sourceMappingURL=IngestionDeploymentResponse.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"IngestionDeploymentResponse.js","sourceRoot":"","sources":["../../../src/stores/ingestion/IngestionDeploymentResponse.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,oBAAoB,EAAE,MAAM,sBAAsB,CAAC;AAC5D,OAAO,EAAE,iBAAiB,EAAE,SAAS,EAAE,MAAM,WAAW,CAAC;AAEzD,MAAM,CAAN,IAAY,wCAIX;AAJD,WAAY,wCAAwC;IAClD,uEAA2B,CAAA;IAC3B,+DAAmB,CAAA;IACnB,+DAAmB,CAAA;AACrB,CAAC,EAJW,wCAAwC,KAAxC,wCAAwC,QAInD;AAED,uCAAuC;AACvC,MAAM,OAAO,kCAAkC;IAC7C,MAAM,CAA4C;IAElD,MAAM,CAAU,aAAa,GAAG,IAAI,oBAAoB,CACtD,iBAAiB,CAAC,kCAAkC,EAAE;QACpD,MAAM,EAAE,SAAS,EAAE;KACpB,CAAC,CACH,CAAC;;AAGJ,MAAM,OAAO,kCAAkC;IAC7C,mBAAmB,CAAU;IAE7B,MAAM,CAAU,aAAa,GAAG,IAAI,oBAAoB,CACtD,iBAAiB,CAAC,kCAAkC,EAAE;QACpD,mBAAmB,EAAE,SAAS,EAAE;KACjC,CAAC,CACH,CAAC"}
@@ -0,0 +1,35 @@
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 { AppDirNode } from '@finos/legend-graph';
17
+ import type { GenericLegendApplicationStore } from '@finos/legend-application';
18
+ import { type ActionState } from '@finos/legend-shared';
19
+ import { IngestDefinitionDeploymentResponse } from './IngestionDeploymentResponse.js';
20
+ import { type LegendIngestionConfiguration } from '../../application/LegendIngestionConfiguration.js';
21
+ export declare class IngestionManager {
22
+ private ingestDiscoveryServerClient;
23
+ private ingestDeploymentServerClient;
24
+ private _currentAppID;
25
+ private _currentLevel;
26
+ private readonly applicationStore;
27
+ constructor(config: LegendIngestionConfiguration, applicationStore: GenericLegendApplicationStore);
28
+ isCurrentAppDirNode(appDirNode: AppDirNode): boolean;
29
+ setCurrentAppDirNode(appDirNode: AppDirNode): void;
30
+ deploy(ingestDefinition: string, appDirNode: AppDirNode, actionState: ActionState | undefined, token: string | undefined): Promise<IngestDefinitionDeploymentResponse>;
31
+ private _validate;
32
+ private _deploy;
33
+ private identifyIngestDeploymentServer;
34
+ }
35
+ //# sourceMappingURL=IngestionManager.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"IngestionManager.d.ts","sourceRoot":"","sources":["../../../src/stores/ingestion/IngestionManager.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAGtD,OAAO,KAAK,EAAE,6BAA6B,EAAE,MAAM,2BAA2B,CAAC;AAC/E,OAAO,EAAE,KAAK,WAAW,EAAoB,MAAM,sBAAsB,CAAC;AAC1E,OAAO,EAEL,kCAAkC,EAEnC,MAAM,kCAAkC,CAAC;AAC1C,OAAO,EAEL,KAAK,4BAA4B,EAClC,MAAM,mDAAmD,CAAC;AAE3D,qBAAa,gBAAgB;IAC3B,OAAO,CAAC,2BAA2B,CAA8B;IACjE,OAAO,CAAC,4BAA4B,CAA+B;IACnE,OAAO,CAAC,aAAa,CAAqB;IAC1C,OAAO,CAAC,aAAa,CAAqB;IAC1C,OAAO,CAAC,QAAQ,CAAC,gBAAgB,CAAgC;gBAG/D,MAAM,EAAE,4BAA4B,EACpC,gBAAgB,EAAE,6BAA6B;IAiBjD,mBAAmB,CAAC,UAAU,EAAE,UAAU,GAAG,OAAO;IAOpD,oBAAoB,CAAC,UAAU,EAAE,UAAU,GAAG,IAAI;IAK5C,MAAM,CACV,gBAAgB,EAAE,MAAM,EACxB,UAAU,EAAE,UAAU,EACtB,WAAW,EAAE,WAAW,GAAG,SAAS,EACpC,KAAK,EAAE,MAAM,GAAG,SAAS,GACxB,OAAO,CAAC,kCAAkC,CAAC;YAyBhC,SAAS;YAgBT,OAAO;YAgBP,8BAA8B;CAmB7C"}
@@ -0,0 +1,80 @@
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 { IngestDeploymentServerClient } from './IngestDeploymentServerClient.js';
17
+ import { IngestDiscoveryServerClient } from './IngestDiscoveryServerClient.js';
18
+ import {} from '@finos/legend-shared';
19
+ import { IngestDefinitionValidationResponse, IngestDefinitionDeploymentResponse, IngestDefinitionValidationResponseStatus, } from './IngestionDeploymentResponse.js';
20
+ import { IngestDeploymentServerConfig, } from '../../application/LegendIngestionConfiguration.js';
21
+ export class IngestionManager {
22
+ ingestDiscoveryServerClient;
23
+ ingestDeploymentServerClient;
24
+ _currentAppID;
25
+ _currentLevel;
26
+ applicationStore;
27
+ constructor(config, applicationStore) {
28
+ this.ingestDiscoveryServerClient = new IngestDiscoveryServerClient(config.discoveryUrl);
29
+ this.ingestDiscoveryServerClient.setTracerService(applicationStore.tracerService);
30
+ this.ingestDeploymentServerClient = new IngestDeploymentServerClient(config.deployment.defaultServer);
31
+ this.ingestDeploymentServerClient.setTracerService(applicationStore.tracerService);
32
+ this.applicationStore = applicationStore;
33
+ }
34
+ isCurrentAppDirNode(appDirNode) {
35
+ return (this._currentAppID === appDirNode.appDirId &&
36
+ this._currentLevel === appDirNode.level);
37
+ }
38
+ setCurrentAppDirNode(appDirNode) {
39
+ this._currentAppID = appDirNode.appDirId;
40
+ this._currentLevel = appDirNode.level;
41
+ }
42
+ async deploy(ingestDefinition, appDirNode, actionState, token) {
43
+ actionState?.setMessage(`Discovering associated ingest environment for DID ${appDirNode.appDirId}...`);
44
+ await this.identifyIngestDeploymentServer(appDirNode, token);
45
+ actionState?.setMessage(`Validating ingest with server ${this.ingestDeploymentServerClient.baseUrl ?? ''} for realm ${this.ingestDeploymentServerClient.environmentClassification}...`);
46
+ const validateResonse = await this._validate(ingestDefinition, undefined, token);
47
+ if (validateResonse.status !==
48
+ IngestDefinitionValidationResponseStatus.SUCCESS) {
49
+ throw new Error('Failed to validate Ingest Definition');
50
+ }
51
+ actionState?.setMessage(`Validation Success. Deploying ingest with server ${this.ingestDeploymentServerClient.baseUrl ?? ''} for realm ${this.ingestDeploymentServerClient.environmentClassification}...`);
52
+ return this._deploy(ingestDefinition, undefined, token);
53
+ }
54
+ async _validate(ingestDefinition, appDirNode, token) {
55
+ if (appDirNode) {
56
+ await this.identifyIngestDeploymentServer(appDirNode, token);
57
+ }
58
+ // validate
59
+ const response = await this.ingestDeploymentServerClient.validate(ingestDefinition, token);
60
+ return IngestDefinitionValidationResponse.serialization.fromJson(response);
61
+ }
62
+ async _deploy(ingestDefinition, appDirNode, token) {
63
+ if (appDirNode) {
64
+ await this.identifyIngestDeploymentServer(appDirNode, token);
65
+ }
66
+ // validate
67
+ const response = (await this.ingestDeploymentServerClient.deploy(ingestDefinition, token));
68
+ return IngestDefinitionDeploymentResponse.serialization.fromJson(response);
69
+ }
70
+ async identifyIngestDeploymentServer(appDirNode, token) {
71
+ // we do not change if current appDirNode is the same as the one we are trying to set
72
+ if (this.isCurrentAppDirNode(appDirNode)) {
73
+ return;
74
+ }
75
+ const serverConfig = IngestDeploymentServerConfig.serialization.fromJson(await this.ingestDiscoveryServerClient.findProducerServer(appDirNode.appDirId, appDirNode.level, token));
76
+ this.ingestDeploymentServerClient.changeServer(serverConfig);
77
+ this.setCurrentAppDirNode(appDirNode);
78
+ }
79
+ }
80
+ //# sourceMappingURL=IngestionManager.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"IngestionManager.js","sourceRoot":"","sources":["../../../src/stores/ingestion/IngestionManager.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAGH,OAAO,EAAE,4BAA4B,EAAE,MAAM,mCAAmC,CAAC;AACjF,OAAO,EAAE,2BAA2B,EAAE,MAAM,kCAAkC,CAAC;AAE/E,OAAO,EAAsC,MAAM,sBAAsB,CAAC;AAC1E,OAAO,EACL,kCAAkC,EAClC,kCAAkC,EAClC,wCAAwC,GACzC,MAAM,kCAAkC,CAAC;AAC1C,OAAO,EACL,4BAA4B,GAE7B,MAAM,mDAAmD,CAAC;AAE3D,MAAM,OAAO,gBAAgB;IACnB,2BAA2B,CAA8B;IACzD,4BAA4B,CAA+B;IAC3D,aAAa,CAAqB;IAClC,aAAa,CAAqB;IACzB,gBAAgB,CAAgC;IAEjE,YACE,MAAoC,EACpC,gBAA+C;QAE/C,IAAI,CAAC,2BAA2B,GAAG,IAAI,2BAA2B,CAChE,MAAM,CAAC,YAAY,CACpB,CAAC;QACF,IAAI,CAAC,2BAA2B,CAAC,gBAAgB,CAC/C,gBAAgB,CAAC,aAAa,CAC/B,CAAC;QACF,IAAI,CAAC,4BAA4B,GAAG,IAAI,4BAA4B,CAClE,MAAM,CAAC,UAAU,CAAC,aAA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AAoB,CAAC,UAAU,CAAC,CAAC;IACxC,CAAC;CACF"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@finos/legend-application-studio",
3
- "version": "28.18.123",
3
+ "version": "28.18.125",
4
4
  "description": "Legend Studio application core",
5
5
  "keywords": [
6
6
  "legend",
@@ -45,13 +45,13 @@
45
45
  "test:watch": "jest --watch"
46
46
  },
47
47
  "dependencies": {
48
- "@finos/legend-application": "16.0.42",
49
- "@finos/legend-art": "7.1.96",
50
- "@finos/legend-code-editor": "2.0.69",
51
- "@finos/legend-data-cube": "0.2.0",
52
- "@finos/legend-graph": "32.1.27",
53
- "@finos/legend-lego": "2.0.74",
54
- "@finos/legend-query-builder": "4.16.34",
48
+ "@finos/legend-application": "16.0.43",
49
+ "@finos/legend-art": "7.1.97",
50
+ "@finos/legend-code-editor": "2.0.70",
51
+ "@finos/legend-data-cube": "0.2.2",
52
+ "@finos/legend-graph": "32.1.28",
53
+ "@finos/legend-lego": "2.0.75",
54
+ "@finos/legend-query-builder": "4.16.36",
55
55
  "@finos/legend-server-depot": "6.0.90",
56
56
  "@finos/legend-server-sdlc": "5.3.56",
57
57
  "@finos/legend-server-showcase": "0.2.52",
@@ -67,9 +67,11 @@
67
67
  "mobx-utils": "6.1.0",
68
68
  "monaco-editor": "0.52.2",
69
69
  "node-diff3": "3.1.2",
70
+ "oidc-client-ts": "^3.2.0",
70
71
  "react": "19.0.0",
71
72
  "react-dnd": "16.0.1",
72
73
  "react-dom": "19.0.0",
74
+ "react-oidc-context": "^3.3.0",
73
75
  "serializr": "3.0.3",
74
76
  "yaml": "2.7.0"
75
77
  },
@@ -19,6 +19,10 @@ import { WorkspaceType } from '@finos/legend-server-sdlc';
19
19
  import { guaranteeNonNullable } from '@finos/legend-shared';
20
20
  import { generatePath } from '@finos/legend-application/browser';
21
21
 
22
+ export enum LEGEND_STUDIO_QUERY_PARAMS {
23
+ EDITOR_CONFIG = 'editorConfig',
24
+ }
25
+
22
26
  export enum LEGEND_STUDIO_ROUTE_PATTERN_TOKEN {
23
27
  SHOWCASE_PATH = 'showcasePath',
24
28
  PROJECT_ID = 'projectId',
@@ -82,6 +86,10 @@ export type ShowcaseViewerPathParams = {
82
86
  [LEGEND_STUDIO_ROUTE_PATTERN_TOKEN.SHOWCASE_PATH]?: string;
83
87
  };
84
88
 
89
+ export type StudioQueryParams = {
90
+ [LEGEND_STUDIO_QUERY_PARAMS.EDITOR_CONFIG]?: string;
91
+ };
92
+
85
93
  export type WorkspaceEditorPathParams = {
86
94
  [LEGEND_STUDIO_ROUTE_PATTERN_TOKEN.PROJECT_ID]: string;
87
95
  [LEGEND_STUDIO_ROUTE_PATTERN_TOKEN.PATCH_RELEASE_VERSION_ID]?: string;
@@ -349,3 +357,9 @@ export const generateShowcasePath = (showcasePath: string): string =>
349
357
  generatePath(LEGEND_STUDIO_SDLC_BYPASSED_ROUTE_PATTERN.SHOWCASE, {
350
358
  showcasePath: encodeURIComponent(showcasePath),
351
359
  });
360
+
361
+ export const EXTERNAL_APPLICATION_NAVIGATION__generateUrlWithEditorConfig = (
362
+ base: string,
363
+ editorConfig: string,
364
+ ): string =>
365
+ `${base}?${LEGEND_STUDIO_QUERY_PARAMS.EDITOR_CONFIG}=${encodeURIComponent(editorConfig)}`;