@abaplint/core 2.113.25 → 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.
@@ -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,
@@ -7198,6 +7203,7 @@ declare class View extends AbstractObject {
7198
7203
  VIEWFIELD: string;
7199
7204
  TABNAME: string;
7200
7205
  FIELDNAME: string;
7206
+ KEYFLAG: string;
7201
7207
  }[] | undefined;
7202
7208
  getJoin(): {
7203
7209
  LTAB: string;
@@ -7208,6 +7214,7 @@ declare class View extends AbstractObject {
7208
7214
  }[] | undefined;
7209
7215
  setDirty(): void;
7210
7216
  parseType(reg: IRegistry): AbstractType;
7217
+ listKeys(): string[];
7211
7218
  getDescription(): string | undefined;
7212
7219
  private parseXML;
7213
7220
  }
@@ -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), (0, combi_1.seq)(_1.CDSName, (0, combi_1.opt)(_1.CDSParameters), (0, combi_1.star)((0, combi_1.seq)(".", _1.CDSName, (0, combi_1.opt)(_1.CDSParameters)))), (0, combi_1.regex)(/^\d+$/)), (0, combi_1.opt)(cds_as_1.CDSAs));
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.opt)(_1.CDSParametersSelect), (0, combi_1.opt)(_1.CDSAs), (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)));
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.findDirectExpressions(expressions_1.CDSName);
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.getFirstToken().getStr();
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)) {
@@ -226,6 +226,7 @@ class Table extends _abstract_object_1.AbstractObject {
226
226
  length: length,
227
227
  decimals: field.DECIMALS,
228
228
  infoText: this.getName() + "-" + field.FIELDNAME,
229
+ description: field.DDTEXT,
229
230
  })
230
231
  });
231
232
  }
@@ -303,6 +304,7 @@ class Table extends _abstract_object_1.AbstractObject {
303
304
  GROUPNAME: field.GROUPNAME,
304
305
  CHECKTABLE: field.CHECKTABLE,
305
306
  REFTYPE: field.REFTYPE,
307
+ DDTEXT: field.DDTEXT,
306
308
  });
307
309
  }
308
310
  }
@@ -91,6 +91,19 @@ class View extends _abstract_object_1.AbstractObject {
91
91
  }
92
92
  return new Types.StructureType(components, this.getName());
93
93
  }
94
+ listKeys() {
95
+ var _a;
96
+ if (this.parsedData === undefined) {
97
+ this.parseXML();
98
+ }
99
+ const ret = [];
100
+ for (const p of ((_a = this.parsedData) === null || _a === void 0 ? void 0 : _a.fields) || []) {
101
+ if (p.KEYFLAG === "X") {
102
+ ret.push(p.FIELDNAME);
103
+ }
104
+ }
105
+ return ret;
106
+ }
94
107
  getDescription() {
95
108
  var _a;
96
109
  if (this.parsedData === undefined) {
@@ -124,6 +137,7 @@ class View extends _abstract_object_1.AbstractObject {
124
137
  VIEWFIELD: field.VIEWFIELD,
125
138
  TABNAME: field.TABNAME,
126
139
  FIELDNAME: field.FIELDNAME,
140
+ KEYFLAG: field.KEYFLAG,
127
141
  });
128
142
  }
129
143
  const join = (_c = parsed.abapGit["asx:abap"]["asx:values"]) === null || _c === void 0 ? void 0 : _c.DD28J_TABLE;
@@ -67,7 +67,7 @@ class Registry {
67
67
  }
68
68
  static abaplintVersion() {
69
69
  // magic, see build script "version.sh"
70
- return "2.113.25";
70
+ return "2.113.27";
71
71
  }
72
72
  getDDICReferences() {
73
73
  return this.ddicReferences;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@abaplint/core",
3
- "version": "2.113.25",
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.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",