@finos/legend-application-repl 1.1.0 → 1.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/index.css +1 -1
- package/lib/package.json +2 -2
- package/lib/stores/LegendREPLDataCubeEngine.d.ts +1 -1
- package/lib/stores/LegendREPLDataCubeEngine.d.ts.map +1 -1
- package/lib/stores/LegendREPLDataCubeEngine.js +11 -11
- package/lib/stores/LegendREPLDataCubeEngine.js.map +1 -1
- package/package.json +7 -7
- package/src/stores/LegendREPLDataCubeEngine.ts +10 -12
package/lib/index.css
CHANGED
package/lib/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@finos/legend-application-repl",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.2",
|
|
4
4
|
"description": "Legend REPL Grid client application core",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"legend",
|
|
@@ -50,7 +50,7 @@
|
|
|
50
50
|
"@finos/legend-shared": "workspace:*",
|
|
51
51
|
"@types/react": "19.0.8",
|
|
52
52
|
"@types/react-dom": "19.0.3",
|
|
53
|
-
"mobx": "6.13.
|
|
53
|
+
"mobx": "6.13.6",
|
|
54
54
|
"mobx-react-lite": "4.1.0",
|
|
55
55
|
"react": "19.0.0",
|
|
56
56
|
"react-dom": "19.0.0",
|
|
@@ -23,7 +23,7 @@ export declare class LegendREPLDataCubeEngine extends DataCubeEngine {
|
|
|
23
23
|
private readonly _application;
|
|
24
24
|
private readonly _client;
|
|
25
25
|
constructor(application: LegendREPLApplicationStore, client: LegendREPLServerClient);
|
|
26
|
-
processQuerySource(
|
|
26
|
+
processQuerySource(sourceData: PlainObject): Promise<LegendREPLDataCubeSource>;
|
|
27
27
|
parseValueSpecification(code: string, returnSourceInformation?: boolean): Promise<V1_ValueSpecification>;
|
|
28
28
|
getValueSpecificationCode(value: V1_ValueSpecification, pretty?: boolean): Promise<string>;
|
|
29
29
|
getQueryTypeahead(code: string, baseQuery: V1_Lambda, source: DataCubeSource): Promise<import("@finos/legend-data-cube").CompletionItem[]>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LegendREPLDataCubeEngine.d.ts","sourceRoot":"","sources":["../../src/stores/LegendREPLDataCubeEngine.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,KAAK,sBAAsB,EAAE,MAAM,6BAA6B,CAAC;AAC1E,OAAO,EAIL,cAAc,EAEd,KAAK,cAAc,EACnB,KAAK,wBAAwB,
|
|
1
|
+
{"version":3,"file":"LegendREPLDataCubeEngine.d.ts","sourceRoot":"","sources":["../../src/stores/LegendREPLDataCubeEngine.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,KAAK,sBAAsB,EAAE,MAAM,6BAA6B,CAAC;AAC1E,OAAO,EAIL,cAAc,EAEd,KAAK,cAAc,EACnB,KAAK,wBAAwB,EAC9B,MAAM,yBAAyB,CAAC;AACjC,OAAO,EACL,kBAAkB,EAClB,KAAK,kBAAkB,EAGvB,KAAK,SAAS,EACd,KAAK,qBAAqB,EAK3B,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAKL,QAAQ,EAER,KAAK,WAAW,EAEjB,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EACL,wBAAwB,EAGzB,MAAM,+BAA+B,CAAC;AACvC,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,8CAA8C,CAAC;AAI/F,qBAAa,wBAAyB,SAAQ,cAAc;IAC1D,OAAO,CAAC,QAAQ,CAAC,YAAY,CAA6B;IAC1D,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAyB;gBAG/C,WAAW,EAAE,0BAA0B,EACvC,MAAM,EAAE,sBAAsB;IAUjB,kBAAkB,CAAC,UAAU,EAAE,WAAW;IAsC1C,uBAAuB,CACpC,IAAI,EAAE,MAAM,EACZ,uBAAuB,CAAC,EAAE,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License.
|
|
15
15
|
*/
|
|
16
16
|
import {} from './LegendREPLServerClient.js';
|
|
17
|
-
import { _elementPtr, _function, _lambda, DataCubeEngine, DataCubeFunction,
|
|
17
|
+
import { _elementPtr, _function, _lambda, DataCubeEngine, DataCubeFunction, } from '@finos/legend-data-cube';
|
|
18
18
|
import { TDSExecutionResult, V1_buildExecutionResult, V1_deserializeExecutionResult, V1_buildEngineError, V1_EngineError, V1_getGenericTypeFullPath, V1_relationTypeModelSchema, } from '@finos/legend-graph';
|
|
19
19
|
import { assertErrorThrown, guaranteeType, HttpStatus, isNonNullable, LogEvent, NetworkClientError, UnsupportedOperationError, } from '@finos/legend-shared';
|
|
20
20
|
import { LegendREPLDataCubeSource, RawLegendREPLDataCubeSource, REPL_DATA_CUBE_SOURCE_TYPE, } from './LegendREPLDataCubeSource.js';
|
|
@@ -29,10 +29,10 @@ export class LegendREPLDataCubeEngine extends DataCubeEngine {
|
|
|
29
29
|
this._client = client;
|
|
30
30
|
}
|
|
31
31
|
// ---------------------------------- IMPLEMENTATION ----------------------------------
|
|
32
|
-
async processQuerySource(
|
|
33
|
-
switch (
|
|
32
|
+
async processQuerySource(sourceData) {
|
|
33
|
+
switch (sourceData._type) {
|
|
34
34
|
case REPL_DATA_CUBE_SOURCE_TYPE: {
|
|
35
|
-
const rawSource = RawLegendREPLDataCubeSource.serialization.fromJson(
|
|
35
|
+
const rawSource = RawLegendREPLDataCubeSource.serialization.fromJson(sourceData);
|
|
36
36
|
const source = new LegendREPLDataCubeSource();
|
|
37
37
|
source.query = await this.parseValueSpecification(rawSource.query, false);
|
|
38
38
|
try {
|
|
@@ -51,26 +51,26 @@ export class LegendREPLDataCubeEngine extends DataCubeEngine {
|
|
|
51
51
|
return source;
|
|
52
52
|
}
|
|
53
53
|
default: {
|
|
54
|
-
throw new UnsupportedOperationError(`Can't process query source of type '${
|
|
54
|
+
throw new UnsupportedOperationError(`Can't process query source of type '${sourceData._type}'.`);
|
|
55
55
|
}
|
|
56
56
|
}
|
|
57
57
|
}
|
|
58
58
|
async parseValueSpecification(code, returnSourceInformation) {
|
|
59
|
-
return
|
|
59
|
+
return this.deserializeValueSpecification(await this._client.parseValueSpecification({
|
|
60
60
|
code,
|
|
61
61
|
returnSourceInformation,
|
|
62
62
|
}));
|
|
63
63
|
}
|
|
64
64
|
async getValueSpecificationCode(value, pretty) {
|
|
65
65
|
return this._client.getValueSpecificationCode({
|
|
66
|
-
value:
|
|
66
|
+
value: this.serializeValueSpecification(value),
|
|
67
67
|
pretty,
|
|
68
68
|
});
|
|
69
69
|
}
|
|
70
70
|
async getQueryTypeahead(code, baseQuery, source) {
|
|
71
71
|
return this._client.getQueryTypeahead({
|
|
72
72
|
code,
|
|
73
|
-
baseQuery:
|
|
73
|
+
baseQuery: this.serializeValueSpecification(baseQuery),
|
|
74
74
|
});
|
|
75
75
|
}
|
|
76
76
|
async getQueryRelationReturnType(query, source) {
|
|
@@ -80,7 +80,7 @@ export class LegendREPLDataCubeEngine extends DataCubeEngine {
|
|
|
80
80
|
try {
|
|
81
81
|
const relationType = deserialize(V1_relationTypeModelSchema, await this._client.getQueryCodeRelationReturnType({
|
|
82
82
|
code,
|
|
83
|
-
baseQuery:
|
|
83
|
+
baseQuery: this.serializeValueSpecification(baseQuery),
|
|
84
84
|
}));
|
|
85
85
|
return {
|
|
86
86
|
columns: relationType.columns.map((column) => ({
|
|
@@ -101,7 +101,7 @@ export class LegendREPLDataCubeEngine extends DataCubeEngine {
|
|
|
101
101
|
async executeQuery(query, source, options) {
|
|
102
102
|
const startTime = performance.now();
|
|
103
103
|
const result = await this._client.executeQuery({
|
|
104
|
-
query:
|
|
104
|
+
query: this.serializeValueSpecification(query),
|
|
105
105
|
debug: options?.debug,
|
|
106
106
|
});
|
|
107
107
|
const endTime = performance.now();
|
|
@@ -124,7 +124,7 @@ export class LegendREPLDataCubeEngine extends DataCubeEngine {
|
|
|
124
124
|
// ---------------------------------- UTILITIES ----------------------------------
|
|
125
125
|
async _getQueryRelationType(query) {
|
|
126
126
|
const relationType = deserialize(V1_relationTypeModelSchema, await this._client.getQueryRelationReturnType({
|
|
127
|
-
query:
|
|
127
|
+
query: this.serializeValueSpecification(query),
|
|
128
128
|
}));
|
|
129
129
|
return {
|
|
130
130
|
columns: relationType.columns.map((column) => ({
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LegendREPLDataCubeEngine.js","sourceRoot":"","sources":["../../src/stores/LegendREPLDataCubeEngine.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAA+B,MAAM,6BAA6B,CAAC;AAC1E,OAAO,EACL,WAAW,EACX,SAAS,EACT,OAAO,EACP,cAAc,EACd,gBAAgB,
|
|
1
|
+
{"version":3,"file":"LegendREPLDataCubeEngine.js","sourceRoot":"","sources":["../../src/stores/LegendREPLDataCubeEngine.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAA+B,MAAM,6BAA6B,CAAC;AAC1E,OAAO,EACL,WAAW,EACX,SAAS,EACT,OAAO,EACP,cAAc,EACd,gBAAgB,GAGjB,MAAM,yBAAyB,CAAC;AACjC,OAAO,EACL,kBAAkB,EAElB,uBAAuB,EACvB,6BAA6B,EAG7B,mBAAmB,EACnB,cAAc,EACd,yBAAyB,EACzB,0BAA0B,GAC3B,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EACL,iBAAiB,EACjB,aAAa,EACb,UAAU,EACV,aAAa,EACb,QAAQ,EACR,kBAAkB,EAElB,yBAAyB,GAC1B,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EACL,wBAAwB,EACxB,2BAA2B,EAC3B,0BAA0B,GAC3B,MAAM,+BAA+B,CAAC;AAEvC,OAAO,EAAE,iBAAiB,EAAE,MAAM,2BAA2B,CAAC;AAC9D,OAAO,EAAE,WAAW,EAAE,MAAM,WAAW,CAAC;AAExC,MAAM,OAAO,wBAAyB,SAAQ,cAAc;IACzC,YAAY,CAA6B;IACzC,O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,iBAAiB,CAAC,kCAAkC,CAAC,EACrE,OAAO,EACP,KAAK,CACN,CAAC;IACJ,CAAC;IAEQ,qBAAqB,CAAC,GAAW;QACxC,OAAO,IAAI,CAAC,YAAY,CAAC,oBAAoB,CAAC,WAAW,CAAC,GAAG,CAAC,CAAC;IACjE,CAAC;IAEQ,QAAQ,CAAC,GAAW;QAC3B,IAAI,CAAC,YAAY,CAAC,iBAAiB,CAAC,SAAS,CAAC,YAAY,CAAC,GAAG,CAAC,CAAC;IAClE,CAAC;IAEQ,aAAa,CAAC,KAAa,EAAE,IAAiB;QACrD,IAAI,CAAC,YAAY,CAAC,gBAAgB,CAAC,QAAQ,CAAC,KAAK,EAAE,IAAI,CAAC,CAAC;IAC3D,CAAC;CACF"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@finos/legend-application-repl",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.2",
|
|
4
4
|
"description": "Legend REPL Grid client application core",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"legend",
|
|
@@ -43,14 +43,14 @@
|
|
|
43
43
|
"test:watch": "jest --watch"
|
|
44
44
|
},
|
|
45
45
|
"dependencies": {
|
|
46
|
-
"@finos/legend-application": "16.0.
|
|
47
|
-
"@finos/legend-art": "7.1.
|
|
48
|
-
"@finos/legend-data-cube": "0.1.
|
|
49
|
-
"@finos/legend-graph": "32.1.
|
|
50
|
-
"@finos/legend-shared": "11.0.
|
|
46
|
+
"@finos/legend-application": "16.0.24",
|
|
47
|
+
"@finos/legend-art": "7.1.81",
|
|
48
|
+
"@finos/legend-data-cube": "0.1.2",
|
|
49
|
+
"@finos/legend-graph": "32.1.2",
|
|
50
|
+
"@finos/legend-shared": "11.0.3",
|
|
51
51
|
"@types/react": "19.0.8",
|
|
52
52
|
"@types/react-dom": "19.0.3",
|
|
53
|
-
"mobx": "6.13.
|
|
53
|
+
"mobx": "6.13.6",
|
|
54
54
|
"mobx-react-lite": "4.1.0",
|
|
55
55
|
"react": "19.0.0",
|
|
56
56
|
"react-dom": "19.0.0",
|
|
@@ -23,8 +23,6 @@ import {
|
|
|
23
23
|
DataCubeFunction,
|
|
24
24
|
type DataCubeSource,
|
|
25
25
|
type DataCubeExecutionOptions,
|
|
26
|
-
_deserializeValueSpecification,
|
|
27
|
-
_serializeValueSpecification,
|
|
28
26
|
} from '@finos/legend-data-cube';
|
|
29
27
|
import {
|
|
30
28
|
TDSExecutionResult,
|
|
@@ -73,11 +71,11 @@ export class LegendREPLDataCubeEngine extends DataCubeEngine {
|
|
|
73
71
|
|
|
74
72
|
// ---------------------------------- IMPLEMENTATION ----------------------------------
|
|
75
73
|
|
|
76
|
-
override async processQuerySource(
|
|
77
|
-
switch (
|
|
74
|
+
override async processQuerySource(sourceData: PlainObject) {
|
|
75
|
+
switch (sourceData._type) {
|
|
78
76
|
case REPL_DATA_CUBE_SOURCE_TYPE: {
|
|
79
77
|
const rawSource =
|
|
80
|
-
RawLegendREPLDataCubeSource.serialization.fromJson(
|
|
78
|
+
RawLegendREPLDataCubeSource.serialization.fromJson(sourceData);
|
|
81
79
|
const source = new LegendREPLDataCubeSource();
|
|
82
80
|
source.query = await this.parseValueSpecification(
|
|
83
81
|
rawSource.query,
|
|
@@ -105,7 +103,7 @@ export class LegendREPLDataCubeEngine extends DataCubeEngine {
|
|
|
105
103
|
}
|
|
106
104
|
default: {
|
|
107
105
|
throw new UnsupportedOperationError(
|
|
108
|
-
`Can't process query source of type '${
|
|
106
|
+
`Can't process query source of type '${sourceData._type}'.`,
|
|
109
107
|
);
|
|
110
108
|
}
|
|
111
109
|
}
|
|
@@ -115,7 +113,7 @@ export class LegendREPLDataCubeEngine extends DataCubeEngine {
|
|
|
115
113
|
code: string,
|
|
116
114
|
returnSourceInformation?: boolean,
|
|
117
115
|
) {
|
|
118
|
-
return
|
|
116
|
+
return this.deserializeValueSpecification(
|
|
119
117
|
await this._client.parseValueSpecification({
|
|
120
118
|
code,
|
|
121
119
|
returnSourceInformation,
|
|
@@ -128,7 +126,7 @@ export class LegendREPLDataCubeEngine extends DataCubeEngine {
|
|
|
128
126
|
pretty?: boolean,
|
|
129
127
|
) {
|
|
130
128
|
return this._client.getValueSpecificationCode({
|
|
131
|
-
value:
|
|
129
|
+
value: this.serializeValueSpecification(value),
|
|
132
130
|
pretty,
|
|
133
131
|
});
|
|
134
132
|
}
|
|
@@ -140,7 +138,7 @@ export class LegendREPLDataCubeEngine extends DataCubeEngine {
|
|
|
140
138
|
) {
|
|
141
139
|
return this._client.getQueryTypeahead({
|
|
142
140
|
code,
|
|
143
|
-
baseQuery:
|
|
141
|
+
baseQuery: this.serializeValueSpecification(baseQuery),
|
|
144
142
|
});
|
|
145
143
|
}
|
|
146
144
|
|
|
@@ -161,7 +159,7 @@ export class LegendREPLDataCubeEngine extends DataCubeEngine {
|
|
|
161
159
|
V1_relationTypeModelSchema,
|
|
162
160
|
await this._client.getQueryCodeRelationReturnType({
|
|
163
161
|
code,
|
|
164
|
-
baseQuery:
|
|
162
|
+
baseQuery: this.serializeValueSpecification(baseQuery),
|
|
165
163
|
}),
|
|
166
164
|
);
|
|
167
165
|
return {
|
|
@@ -193,7 +191,7 @@ export class LegendREPLDataCubeEngine extends DataCubeEngine {
|
|
|
193
191
|
) {
|
|
194
192
|
const startTime = performance.now();
|
|
195
193
|
const result = await this._client.executeQuery({
|
|
196
|
-
query:
|
|
194
|
+
query: this.serializeValueSpecification(query),
|
|
197
195
|
debug: options?.debug,
|
|
198
196
|
});
|
|
199
197
|
const endTime = performance.now();
|
|
@@ -231,7 +229,7 @@ export class LegendREPLDataCubeEngine extends DataCubeEngine {
|
|
|
231
229
|
const relationType = deserialize(
|
|
232
230
|
V1_relationTypeModelSchema,
|
|
233
231
|
await this._client.getQueryRelationReturnType({
|
|
234
|
-
query:
|
|
232
|
+
query: this.serializeValueSpecification(query),
|
|
235
233
|
}),
|
|
236
234
|
);
|
|
237
235
|
return {
|