@abaplint/cli 2.112.12 → 2.112.14

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 (2) hide show
  1. package/build/cli.js +26 -9
  2. package/package.json +4 -4
package/build/cli.js CHANGED
@@ -21425,7 +21425,7 @@ class CurrentScope {
21425
21425
  }
21426
21426
  const upper = name.toUpperCase();
21427
21427
  if (this.current.getData().vars[upper] !== undefined) {
21428
- // console.dir(new Error().stack);
21428
+ // console.dir(new Error().stack);
21429
21429
  throw new Error(`Variable name "${name}" already defined`);
21430
21430
  }
21431
21431
  else if (this.isOO() && this.current.getData().types[upper] !== undefined) {
@@ -21443,6 +21443,7 @@ class CurrentScope {
21443
21443
  }
21444
21444
  const upper = name.toUpperCase();
21445
21445
  if (parent.getData().vars[upper] !== undefined) {
21446
+ // console.dir(new Error().stack);
21446
21447
  throw new Error(`Variable name "${name}" already defined`);
21447
21448
  }
21448
21449
  else if (this.isOO() && parent.getData().types[upper] !== undefined) {
@@ -21934,7 +21935,7 @@ class ObjectOriented {
21934
21935
  }
21935
21936
  if (name.includes("~")) {
21936
21937
  const interfaceName = upper.split("~")[0];
21937
- if (def.getImplementing().some((a) => a.name.toUpperCase() === interfaceName)) {
21938
+ if (this.listInterfacesRecursive(def).includes(interfaceName)) {
21938
21939
  return this.searchAttributeName(this.scope.findInterfaceDefinition(interfaceName), name.split("~")[1]);
21939
21940
  }
21940
21941
  }
@@ -22096,7 +22097,19 @@ class ObjectOriented {
22096
22097
  }
22097
22098
  return ignore;
22098
22099
  }
22099
- // returns list of interfaces implemented
22100
+ /** returns list of interfaces implemented, recursive */
22101
+ listInterfacesRecursive(definition) {
22102
+ const list = [];
22103
+ for (const i of definition.getImplementing()) {
22104
+ const upper = i.name.toUpperCase();
22105
+ list.push(upper);
22106
+ const def = this.scope.findInterfaceDefinition(upper);
22107
+ if (def) {
22108
+ list.push(...this.listInterfacesRecursive(def));
22109
+ }
22110
+ }
22111
+ return [...new Set(list)];
22112
+ }
22100
22113
  fromInterfaces(definition, skip) {
22101
22114
  const ignore = [];
22102
22115
  for (const i of definition.getImplementing()) {
@@ -50933,8 +50946,11 @@ class Table extends _abstract_object_1.AbstractObject {
50933
50946
  return "TABL";
50934
50947
  }
50935
50948
  getDescription() {
50936
- // todo
50937
- return undefined;
50949
+ var _a;
50950
+ if (this.parsedData === undefined) {
50951
+ this.parseXML();
50952
+ }
50953
+ return (_a = this.parsedData) === null || _a === void 0 ? void 0 : _a.description;
50938
50954
  }
50939
50955
  getAllowedNaming() {
50940
50956
  let length = 30;
@@ -51162,7 +51178,7 @@ class Table extends _abstract_object_1.AbstractObject {
51162
51178
  }
51163
51179
  ///////////////
51164
51180
  parseXML() {
51165
- var _a, _b, _c, _d, _e, _f, _g, _h, _j;
51181
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
51166
51182
  const parsed = super.parseRaw2();
51167
51183
  if (parsed === undefined) {
51168
51184
  return;
@@ -51180,9 +51196,10 @@ class Table extends _abstract_object_1.AbstractObject {
51180
51196
  }
51181
51197
  // table category
51182
51198
  this.parsedData.tableCategory = (_f = (_e = parsed.abapGit["asx:abap"]["asx:values"]) === null || _e === void 0 ? void 0 : _e.DD02V) === null || _f === void 0 ? void 0 : _f.TABCLASS;
51183
- this.parsedData.dataClass = (_h = (_g = parsed.abapGit["asx:abap"]["asx:values"]) === null || _g === void 0 ? void 0 : _g.DD09L) === null || _h === void 0 ? void 0 : _h.TABART;
51199
+ this.parsedData.description = (_h = (_g = parsed.abapGit["asx:abap"]["asx:values"]) === null || _g === void 0 ? void 0 : _g.DD02V) === null || _h === void 0 ? void 0 : _h.DDTEXT;
51200
+ this.parsedData.dataClass = (_k = (_j = parsed.abapGit["asx:abap"]["asx:values"]) === null || _j === void 0 ? void 0 : _j.DD09L) === null || _k === void 0 ? void 0 : _k.TABART;
51184
51201
  // fields
51185
- const fields = (_j = parsed.abapGit["asx:abap"]["asx:values"]) === null || _j === void 0 ? void 0 : _j.DD03P_TABLE;
51202
+ const fields = (_l = parsed.abapGit["asx:abap"]["asx:values"]) === null || _l === void 0 ? void 0 : _l.DD03P_TABLE;
51186
51203
  for (const field of (0, xml_utils_1.xmlToArray)(fields === null || fields === void 0 ? void 0 : fields.DD03P)) {
51187
51204
  this.parsedData.fields.push({
51188
51205
  FIELDNAME: field.FIELDNAME,
@@ -52467,7 +52484,7 @@ class Registry {
52467
52484
  }
52468
52485
  static abaplintVersion() {
52469
52486
  // magic, see build script "version.sh"
52470
- return "2.112.12";
52487
+ return "2.112.14";
52471
52488
  }
52472
52489
  getDDICReferences() {
52473
52490
  return this.ddicReferences;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@abaplint/cli",
3
- "version": "2.112.12",
3
+ "version": "2.112.14",
4
4
  "description": "abaplint - Command Line Interface",
5
5
  "funding": "https://github.com/sponsors/larshp",
6
6
  "bin": {
@@ -38,12 +38,12 @@
38
38
  },
39
39
  "homepage": "https://abaplint.org",
40
40
  "devDependencies": {
41
- "@abaplint/core": "^2.112.12",
41
+ "@abaplint/core": "^2.112.14",
42
42
  "@types/chai": "^4.3.17",
43
43
  "@types/glob": "^8.1.0",
44
44
  "@types/minimist": "^1.2.5",
45
45
  "@types/mocha": "^10.0.7",
46
- "@types/node": "^22.1.0",
46
+ "@types/node": "^22.2.0",
47
47
  "@types/progress": "^2.0.7",
48
48
  "chai": "^4.5.0",
49
49
  "chalk": "^5.3.0",
@@ -52,7 +52,7 @@
52
52
  "json5": "^2.2.3",
53
53
  "memfs": "=4.9.3",
54
54
  "minimist": "^1.2.8",
55
- "mocha": "^10.7.0",
55
+ "mocha": "^10.7.3",
56
56
  "progress": "^2.0.3",
57
57
  "typescript": "^5.5.4",
58
58
  "webpack": "^5.93.0",