@abaplint/core 2.108.10 → 2.108.11

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.
@@ -5,6 +5,10 @@ const Types = require("../abap/types/basic");
5
5
  const _abstract_object_1 = require("./_abstract_object");
6
6
  const xml_utils_1 = require("../xml_utils");
7
7
  const ddic_1 = require("../ddic");
8
+ var ViewClass;
9
+ (function (ViewClass) {
10
+ ViewClass["ExternalView"] = "X";
11
+ })(ViewClass || (ViewClass = {}));
8
12
  class View extends _abstract_object_1.AbstractObject {
9
13
  getType() {
10
14
  return "VIEW";
@@ -48,6 +52,16 @@ class View extends _abstract_object_1.AbstractObject {
48
52
  // ignore, this is a special case of old style .INCLUDE
49
53
  continue;
50
54
  }
55
+ else if (this.parsedData.header.VIEWCLASS === ViewClass.ExternalView) {
56
+ components.push({
57
+ name: field.VIEWFIELD,
58
+ type: new Types.VoidType("ExternalView")
59
+ });
60
+ continue;
61
+ }
62
+ else if (field.TABNAME === this.getName()) {
63
+ throw new Error("Unexpected self reference in view " + this.getName() + ", " + field.FIELDNAME + " " + field.FIELDNAME);
64
+ }
51
65
  const lookup = ddic.lookupTableOrView(field.TABNAME);
52
66
  let found = lookup.type;
53
67
  if (lookup.object) {
@@ -83,13 +97,23 @@ class View extends _abstract_object_1.AbstractObject {
83
97
  }
84
98
  ///////////////
85
99
  parseXML() {
86
- var _a, _b;
87
- this.parsedData = { fields: [], join: [] };
100
+ var _a, _b, _c;
101
+ this.parsedData = {
102
+ header: {
103
+ VIEWCLASS: "",
104
+ },
105
+ fields: [],
106
+ join: [],
107
+ };
88
108
  const parsed = super.parseRaw2();
89
109
  if (parsed === undefined || parsed.abapGit === undefined) {
90
110
  return;
91
111
  }
92
- const fields = (_a = parsed.abapGit["asx:abap"]["asx:values"]) === null || _a === void 0 ? void 0 : _a.DD27P_TABLE;
112
+ const header = (_a = parsed.abapGit["asx:abap"]["asx:values"]) === null || _a === void 0 ? void 0 : _a.DD25V;
113
+ this.parsedData.header = {
114
+ VIEWCLASS: (header === null || header === void 0 ? void 0 : header.VIEWCLASS) || "",
115
+ };
116
+ const fields = (_b = parsed.abapGit["asx:abap"]["asx:values"]) === null || _b === void 0 ? void 0 : _b.DD27P_TABLE;
93
117
  for (const field of (0, xml_utils_1.xmlToArray)(fields === null || fields === void 0 ? void 0 : fields.DD27P)) {
94
118
  this.parsedData.fields.push({
95
119
  VIEWFIELD: field.VIEWFIELD,
@@ -97,7 +121,7 @@ class View extends _abstract_object_1.AbstractObject {
97
121
  FIELDNAME: field.FIELDNAME,
98
122
  });
99
123
  }
100
- const join = (_b = parsed.abapGit["asx:abap"]["asx:values"]) === null || _b === void 0 ? void 0 : _b.DD28J_TABLE;
124
+ const join = (_c = parsed.abapGit["asx:abap"]["asx:values"]) === null || _c === void 0 ? void 0 : _c.DD28J_TABLE;
101
125
  for (const j of (0, xml_utils_1.xmlToArray)(join === null || join === void 0 ? void 0 : join.DD28J)) {
102
126
  this.parsedData.join.push({
103
127
  LTAB: j.LTAB,
@@ -65,7 +65,7 @@ class Registry {
65
65
  }
66
66
  static abaplintVersion() {
67
67
  // magic, see build script "version.sh"
68
- return "2.108.10";
68
+ return "2.108.11";
69
69
  }
70
70
  getDDICReferences() {
71
71
  return this.ddicReferences;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@abaplint/core",
3
- "version": "2.108.10",
3
+ "version": "2.108.11",
4
4
  "description": "abaplint - Core API",
5
5
  "main": "build/src/index.js",
6
6
  "typings": "build/abaplint.d.ts",
@@ -50,10 +50,10 @@
50
50
  },
51
51
  "homepage": "https://abaplint.org",
52
52
  "devDependencies": {
53
- "@microsoft/api-extractor": "^7.43.8",
53
+ "@microsoft/api-extractor": "^7.46.2",
54
54
  "@types/chai": "^4.3.16",
55
55
  "@types/mocha": "^10.0.6",
56
- "@types/node": "^20.12.12",
56
+ "@types/node": "^20.12.13",
57
57
  "chai": "^4.4.1",
58
58
  "eslint": "^8.57.0",
59
59
  "mocha": "^10.4.0",