@abaplint/core 2.113.26 → 2.113.28
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 +7 -2
- package/build/src/abap/types/basic/structure_type.js +2 -1
- package/build/src/abap/types/basic/table_type.js +5 -2
- 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 +3 -3
- package/build/src/objects/table.js +1 -1
- package/build/src/objects/table_type.js +7 -7
- 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,
|
|
@@ -6588,7 +6593,7 @@ export { Structures }
|
|
|
6588
6593
|
declare class StructureType extends AbstractType {
|
|
6589
6594
|
private readonly indexed;
|
|
6590
6595
|
private readonly components;
|
|
6591
|
-
constructor(components: IStructureComponent[], qualifiedName?: string, ddicName?: string);
|
|
6596
|
+
constructor(components: IStructureComponent[], qualifiedName?: string, ddicName?: string, description?: string);
|
|
6592
6597
|
getComponents(): IStructureComponent[];
|
|
6593
6598
|
getComponentByName(name: string): AbstractType | undefined;
|
|
6594
6599
|
toText(level: number): string;
|
|
@@ -6751,7 +6756,7 @@ declare class TableType extends AbstractObject {
|
|
|
6751
6756
|
declare class TableType_2 extends AbstractType {
|
|
6752
6757
|
private readonly rowType;
|
|
6753
6758
|
private readonly options;
|
|
6754
|
-
constructor(rowType: AbstractType, options: ITableOptions, qualifiedName?: string);
|
|
6759
|
+
constructor(rowType: AbstractType, options: ITableOptions, qualifiedName?: string, description?: string);
|
|
6755
6760
|
getOptions(): ITableOptions;
|
|
6756
6761
|
isWithHeader(): boolean;
|
|
6757
6762
|
getAccessType(): TableAccessType | undefined;
|
|
@@ -3,10 +3,11 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.StructureType = void 0;
|
|
4
4
|
const _abstract_type_1 = require("./_abstract_type");
|
|
5
5
|
class StructureType extends _abstract_type_1.AbstractType {
|
|
6
|
-
constructor(components, qualifiedName, ddicName) {
|
|
6
|
+
constructor(components, qualifiedName, ddicName, description) {
|
|
7
7
|
super({
|
|
8
8
|
qualifiedName: qualifiedName,
|
|
9
9
|
ddicName: ddicName,
|
|
10
|
+
description: description,
|
|
10
11
|
});
|
|
11
12
|
if (components.length === 0) {
|
|
12
13
|
throw new Error("Structure does not contain any components");
|
|
@@ -17,9 +17,12 @@ var TableKeyType;
|
|
|
17
17
|
TableKeyType["empty"] = "EMPTY";
|
|
18
18
|
})(TableKeyType || (exports.TableKeyType = TableKeyType = {}));
|
|
19
19
|
class TableType extends _abstract_type_1.AbstractType {
|
|
20
|
-
constructor(rowType, options, qualifiedName) {
|
|
20
|
+
constructor(rowType, options, qualifiedName, description) {
|
|
21
21
|
var _a;
|
|
22
|
-
super({
|
|
22
|
+
super({
|
|
23
|
+
qualifiedName: qualifiedName,
|
|
24
|
+
description: description,
|
|
25
|
+
});
|
|
23
26
|
this.rowType = rowType;
|
|
24
27
|
this.options = options;
|
|
25
28
|
if (((_a = options.primaryKey) === null || _a === void 0 ? void 0 : _a.type) === TableAccessType.standard && options.primaryKey.isUnique === true) {
|
|
@@ -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);
|
|
@@ -110,7 +110,7 @@ class DataDefinition extends _abstract_object_1.AbstractObject {
|
|
|
110
110
|
}
|
|
111
111
|
findDescription() {
|
|
112
112
|
var _a;
|
|
113
|
-
const match = (_a = this.findSourceFile()) === null || _a === void 0 ? void 0 : _a.getRaw().match(/@EndUserText\.label: '([\w ]+)'/);
|
|
113
|
+
const match = (_a = this.findSourceFile()) === null || _a === void 0 ? void 0 : _a.getRaw().match(/@EndUserText\.label: '([\w,.: ]+)'/);
|
|
114
114
|
if (match) {
|
|
115
115
|
return match[1];
|
|
116
116
|
}
|
|
@@ -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)) {
|
|
@@ -247,7 +247,7 @@ class Table extends _abstract_object_1.AbstractObject {
|
|
|
247
247
|
return new Types.UnknownType("Table/Structure " + this.getName() + " does not contain any components");
|
|
248
248
|
}
|
|
249
249
|
reg.getDDICReferences().setUsing(this, references);
|
|
250
|
-
return new Types.StructureType(components, this.getName(), this.getName());
|
|
250
|
+
return new Types.StructureType(components, this.getName(), this.getName(), this.getDescription());
|
|
251
251
|
}
|
|
252
252
|
getTableCategory() {
|
|
253
253
|
var _a;
|
|
@@ -103,34 +103,34 @@ class TableType extends _abstract_object_1.AbstractObject {
|
|
|
103
103
|
}
|
|
104
104
|
else if (this.parsedXML.rowkind === "S") {
|
|
105
105
|
const lookup = ddic.lookupTableOrView(this.parsedXML.rowtype);
|
|
106
|
-
type = new Types.TableType(lookup.type, tableOptions, this.getName());
|
|
106
|
+
type = new Types.TableType(lookup.type, tableOptions, this.getName(), this.getDescription());
|
|
107
107
|
if (lookup.object) {
|
|
108
108
|
references.push({ object: lookup.object });
|
|
109
109
|
}
|
|
110
110
|
}
|
|
111
111
|
else if (this.parsedXML.rowkind === "E") {
|
|
112
112
|
const lookup = ddic.lookupDataElement(this.parsedXML.rowtype);
|
|
113
|
-
type = new Types.TableType(lookup.type, tableOptions, this.getName());
|
|
113
|
+
type = new Types.TableType(lookup.type, tableOptions, this.getName(), this.getDescription());
|
|
114
114
|
if (lookup.object) {
|
|
115
115
|
references.push({ object: lookup.object });
|
|
116
116
|
}
|
|
117
117
|
}
|
|
118
118
|
else if (this.parsedXML.rowkind === "L") {
|
|
119
119
|
const lookup = ddic.lookupTableType(this.parsedXML.rowtype);
|
|
120
|
-
type = new Types.TableType(lookup.type, tableOptions, this.getName());
|
|
120
|
+
type = new Types.TableType(lookup.type, tableOptions, this.getName(), this.getDescription());
|
|
121
121
|
if (lookup.object) {
|
|
122
122
|
references.push({ object: lookup.object });
|
|
123
123
|
}
|
|
124
124
|
}
|
|
125
125
|
else if (this.parsedXML.rowkind === "R" && this.parsedXML.rowtype === "OBJECT") {
|
|
126
|
-
type = new Types.TableType(new basic_1.GenericObjectReferenceType(), tableOptions, this.getName());
|
|
126
|
+
type = new Types.TableType(new basic_1.GenericObjectReferenceType(), tableOptions, this.getName(), this.getDescription());
|
|
127
127
|
}
|
|
128
128
|
else if (this.parsedXML.rowkind === "R" && this.parsedXML.rowtype === "DATA") {
|
|
129
|
-
type = new Types.TableType(new basic_1.DataReference(new Types.DataType()), tableOptions, this.getName());
|
|
129
|
+
type = new Types.TableType(new basic_1.DataReference(new Types.DataType()), tableOptions, this.getName(), this.getDescription());
|
|
130
130
|
}
|
|
131
131
|
else if (this.parsedXML.rowkind === "R" && this.parsedXML.rowtype !== undefined) {
|
|
132
132
|
const lookup = ddic.lookupObject(this.parsedXML.rowtype);
|
|
133
|
-
type = new Types.TableType(lookup.type, tableOptions, this.getName());
|
|
133
|
+
type = new Types.TableType(lookup.type, tableOptions, this.getName(), this.getDescription());
|
|
134
134
|
if (lookup.object) {
|
|
135
135
|
references.push({ object: lookup.object });
|
|
136
136
|
}
|
|
@@ -146,7 +146,7 @@ class TableType extends _abstract_object_1.AbstractObject {
|
|
|
146
146
|
decimals: this.parsedXML.decimals,
|
|
147
147
|
infoText: this.getName(),
|
|
148
148
|
});
|
|
149
|
-
type = new Types.TableType(row, tableOptions, this.getName());
|
|
149
|
+
type = new Types.TableType(row, tableOptions, this.getName(), this.getDescription());
|
|
150
150
|
}
|
|
151
151
|
}
|
|
152
152
|
else {
|
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.28",
|
|
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",
|