@abaplint/core 2.113.26 → 2.113.27
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/build/abaplint.d.ts +5 -0
- package/build/src/cds/expressions/cds_element.js +1 -1
- package/build/src/cds/expressions/cds_prefixed_name.js +13 -0
- package/build/src/cds/expressions/cds_select.js +1 -1
- package/build/src/cds/expressions/cds_source.js +1 -1
- package/build/src/cds/expressions/index.js +1 -0
- package/build/src/objects/data_definition.js +2 -2
- package/build/src/registry.js +1 -1
- package/package.json +2 -2
package/build/abaplint.d.ts
CHANGED
|
@@ -881,6 +881,10 @@ export declare class CDSParser {
|
|
|
881
881
|
parse(file: IFile | undefined): ExpressionNode | undefined;
|
|
882
882
|
}
|
|
883
883
|
|
|
884
|
+
declare class CDSPrefixedName extends Expression {
|
|
885
|
+
getRunnable(): IStatementRunnable;
|
|
886
|
+
}
|
|
887
|
+
|
|
884
888
|
declare class CDSProviderContract extends Expression {
|
|
885
889
|
getRunnable(): IStatementRunnable;
|
|
886
890
|
}
|
|
@@ -2407,6 +2411,7 @@ declare namespace ExpressionsCDS {
|
|
|
2407
2411
|
CDSName,
|
|
2408
2412
|
CDSParametersSelect,
|
|
2409
2413
|
CDSParameters,
|
|
2414
|
+
CDSPrefixedName,
|
|
2410
2415
|
CDSProviderContract,
|
|
2411
2416
|
CDSRelation,
|
|
2412
2417
|
CDSSelect,
|
|
@@ -7,7 +7,7 @@ const cds_as_1 = require("./cds_as");
|
|
|
7
7
|
const cds_cast_1 = require("./cds_cast");
|
|
8
8
|
class CDSElement extends combi_1.Expression {
|
|
9
9
|
getRunnable() {
|
|
10
|
-
return (0, combi_1.seq)((0, combi_1.starPrio)(_1.CDSAnnotation), (0, combi_1.optPrio)("KEY"), (0, combi_1.altPrio)(_1.CDSAggregate, _1.CDSString, _1.CDSFunction, _1.CDSArithmetics, cds_cast_1.CDSCast, _1.CDSCase, (0, combi_1.seq)(_1.CDSName, ": REDIRECTED TO", (0, combi_1.opt)((0, combi_1.alt)("PARENT", "COMPOSITION CHILD")), _1.CDSName),
|
|
10
|
+
return (0, combi_1.seq)((0, combi_1.starPrio)(_1.CDSAnnotation), (0, combi_1.optPrio)("KEY"), (0, combi_1.altPrio)(_1.CDSAggregate, _1.CDSString, _1.CDSFunction, _1.CDSArithmetics, cds_cast_1.CDSCast, _1.CDSCase, (0, combi_1.seq)(_1.CDSName, ": REDIRECTED TO", (0, combi_1.opt)((0, combi_1.alt)("PARENT", "COMPOSITION CHILD")), _1.CDSName), _1.CDSPrefixedName, (0, combi_1.regex)(/^\d+$/)), (0, combi_1.opt)(cds_as_1.CDSAs));
|
|
11
11
|
}
|
|
12
12
|
}
|
|
13
13
|
exports.CDSElement = CDSElement;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.CDSPrefixedName = void 0;
|
|
4
|
+
const combi_1 = require("../../abap/2_statements/combi");
|
|
5
|
+
const cds_name_1 = require("./cds_name");
|
|
6
|
+
const cds_parameters_1 = require("./cds_parameters");
|
|
7
|
+
class CDSPrefixedName extends combi_1.Expression {
|
|
8
|
+
getRunnable() {
|
|
9
|
+
return (0, combi_1.seq)(cds_name_1.CDSName, (0, combi_1.opt)(cds_parameters_1.CDSParameters), (0, combi_1.star)((0, combi_1.seq)(".", cds_name_1.CDSName, (0, combi_1.opt)(cds_parameters_1.CDSParameters))));
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
exports.CDSPrefixedName = CDSPrefixedName;
|
|
13
|
+
//# sourceMappingURL=cds_prefixed_name.js.map
|
|
@@ -10,7 +10,7 @@ class CDSSelect extends combi_1.Expression {
|
|
|
10
10
|
const fields = (0, combi_1.opt)((0, combi_1.seq)((0, combi_1.star)((0, combi_1.seq)(_1.CDSElement, ",")), _1.CDSElement));
|
|
11
11
|
const distinct = (0, combi_1.str)("DISTINCT");
|
|
12
12
|
const elements = (0, combi_1.seq)((0, combi_1.str)("{"), (0, combi_1.plus)(_1.CDSElement), (0, combi_1.star)((0, combi_1.seq)(",", _1.CDSElement)), (0, combi_1.str)("}"));
|
|
13
|
-
return (0, combi_1.seq)("SELECT", (0, combi_1.opt)(distinct), (0, combi_1.opt)(fields), "FROM", _1.CDSSource, (0, combi_1.
|
|
13
|
+
return (0, combi_1.seq)("SELECT", (0, combi_1.opt)(distinct), (0, combi_1.opt)(fields), "FROM", _1.CDSSource, (0, combi_1.star)(cds_join_1.CDSJoin), (0, combi_1.star)(_1.CDSComposition), (0, combi_1.star)(cds_association_1.CDSAssociation), (0, combi_1.star)(_1.CDSComposition), (0, combi_1.opt)(elements), (0, combi_1.opt)(_1.CDSWhere), (0, combi_1.opt)(_1.CDSGroupBy), (0, combi_1.opt)(_1.CDSHaving), (0, combi_1.opt)((0, combi_1.seq)("UNION", (0, combi_1.opt)("ALL"), CDSSelect)));
|
|
14
14
|
}
|
|
15
15
|
}
|
|
16
16
|
exports.CDSSelect = CDSSelect;
|
|
@@ -5,7 +5,7 @@ const _1 = require(".");
|
|
|
5
5
|
const combi_1 = require("../../abap/2_statements/combi");
|
|
6
6
|
class CDSSource extends combi_1.Expression {
|
|
7
7
|
getRunnable() {
|
|
8
|
-
return (0, combi_1.seq)(_1.CDSName, (0, combi_1.opt)(_1.CDSAs));
|
|
8
|
+
return (0, combi_1.seq)(_1.CDSName, (0, combi_1.opt)(_1.CDSParametersSelect), (0, combi_1.opt)(_1.CDSAs));
|
|
9
9
|
}
|
|
10
10
|
}
|
|
11
11
|
exports.CDSSource = CDSSource;
|
|
@@ -42,6 +42,7 @@ __exportStar(require("./cds_join"), exports);
|
|
|
42
42
|
__exportStar(require("./cds_name"), exports);
|
|
43
43
|
__exportStar(require("./cds_parameters_select"), exports);
|
|
44
44
|
__exportStar(require("./cds_parameters"), exports);
|
|
45
|
+
__exportStar(require("./cds_prefixed_name"), exports);
|
|
45
46
|
__exportStar(require("./cds_provider_contract"), exports);
|
|
46
47
|
__exportStar(require("./cds_relation"), exports);
|
|
47
48
|
__exportStar(require("./cds_select"), exports);
|
|
@@ -128,7 +128,7 @@ class DataDefinition extends _abstract_object_1.AbstractObject {
|
|
|
128
128
|
for (const e of (expr === null || expr === void 0 ? void 0 : expr.findDirectExpressions(expressions_1.CDSElement)) || []) {
|
|
129
129
|
let found = (_a = e.findDirectExpression(expressions_1.CDSAs)) === null || _a === void 0 ? void 0 : _a.findDirectExpression(expressions_1.CDSName);
|
|
130
130
|
if (found === undefined) {
|
|
131
|
-
const list = e.
|
|
131
|
+
const list = e.findAllExpressions(expressions_1.CDSName);
|
|
132
132
|
if (e.concatTokens().toUpperCase().includes(" REDIRECTED TO ")) {
|
|
133
133
|
found = list[0];
|
|
134
134
|
}
|
|
@@ -158,7 +158,7 @@ class DataDefinition extends _abstract_object_1.AbstractObject {
|
|
|
158
158
|
var _a, _b, _c, _d, _e, _f, _g;
|
|
159
159
|
for (const e of tree.findAllExpressions(expressions_1.CDSSource)) {
|
|
160
160
|
const name = ((_a = e.getFirstChild()) === null || _a === void 0 ? void 0 : _a.concatTokens().toUpperCase().replace(/ /g, "")) || "ERROR";
|
|
161
|
-
const as = (_c = (_b = e.findDirectExpression(expressions_1.CDSAs)) === null || _b === void 0 ? void 0 : _b.findDirectExpression(expressions_1.CDSName)) === null || _c === void 0 ? void 0 : _c.
|
|
161
|
+
const as = (_c = (_b = e.findDirectExpression(expressions_1.CDSAs)) === null || _b === void 0 ? void 0 : _b.findDirectExpression(expressions_1.CDSName)) === null || _c === void 0 ? void 0 : _c.concatTokens().toUpperCase();
|
|
162
162
|
this.parsedData.sources.push({ name, as });
|
|
163
163
|
}
|
|
164
164
|
for (const e of tree.findAllExpressions(expressions_1.CDSRelation)) {
|
package/build/src/registry.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@abaplint/core",
|
|
3
|
-
"version": "2.113.
|
|
3
|
+
"version": "2.113.27",
|
|
4
4
|
"description": "abaplint - Core API",
|
|
5
5
|
"main": "build/src/index.js",
|
|
6
6
|
"typings": "build/abaplint.d.ts",
|
|
@@ -53,7 +53,7 @@
|
|
|
53
53
|
"@microsoft/api-extractor": "^7.47.11",
|
|
54
54
|
"@types/chai": "^4.3.20",
|
|
55
55
|
"@types/mocha": "^10.0.9",
|
|
56
|
-
"@types/node": "^22.7.
|
|
56
|
+
"@types/node": "^22.7.8",
|
|
57
57
|
"chai": "^4.5.0",
|
|
58
58
|
"eslint": "^9.13.0",
|
|
59
59
|
"mocha": "^10.7.3",
|