@abaplint/core 2.108.10 → 2.108.12

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.
@@ -269,7 +269,7 @@ class Star {
269
269
  return this.sta.getUsing();
270
270
  }
271
271
  run(r) {
272
- const result = r;
272
+ let result = r;
273
273
  try {
274
274
  let res = r;
275
275
  let input = [];
@@ -279,7 +279,13 @@ class Star {
279
279
  if (res.length === 0) {
280
280
  break;
281
281
  }
282
- result.push(...res);
282
+ if (res.length > 1000) {
283
+ // avoid stack overflow
284
+ result = result.concat(res);
285
+ }
286
+ else {
287
+ result.push(...res);
288
+ }
283
289
  }
284
290
  }
285
291
  catch (err) {
@@ -412,7 +418,7 @@ class Sequence {
412
418
  return this.list.reduce((a, c) => { return a.concat(c.getUsing()); }, []);
413
419
  }
414
420
  run(r) {
415
- const result = [];
421
+ let result = [];
416
422
  for (const input of r) {
417
423
  let temp = [input];
418
424
  let match = true;
@@ -424,7 +430,13 @@ class Sequence {
424
430
  }
425
431
  }
426
432
  if (match === true) {
427
- result.push(...temp);
433
+ if (temp.length > 1000) {
434
+ // avoid stack overflow
435
+ result = result.concat(temp);
436
+ }
437
+ else {
438
+ result.push(...temp);
439
+ }
428
440
  }
429
441
  }
430
442
  return result;
@@ -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.12";
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.12",
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.13.0",
57
57
  "chai": "^4.4.1",
58
58
  "eslint": "^8.57.0",
59
59
  "mocha": "^10.4.0",