@abaplint/transpiler-cli 2.7.98 → 2.7.99

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/bundle.js +15 -6
  2. package/package.json +2 -2
package/build/bundle.js CHANGED
@@ -81411,12 +81411,6 @@ class Traversal {
81411
81411
  if (def.getSuperClass() !== undefined || def.getName().toUpperCase() === "CX_ROOT") {
81412
81412
  ret += "super();\n";
81413
81413
  }
81414
- /*
81415
- if (def.getSuperClass() !== undefined
81416
- && def.getMethodDefinitions().getByName("CONSTRUCTOR") === undefined) {
81417
- ret += `await super.constructor_(INPUT);\n`;
81418
- }
81419
- */
81420
81414
  const cName = Traversal.escapeNamespace(def.getName().toLowerCase());
81421
81415
  ret += "this.me = new abap.types.ABAPObject();\n";
81422
81416
  ret += "this.me.set(this);\n";
@@ -81433,6 +81427,7 @@ class Traversal {
81433
81427
  // attributes from directly implemented interfaces(not interfaces implemented in super classes)
81434
81428
  for (const i of def.getImplementing()) {
81435
81429
  ret += this.dataFromInterfaces(i.name, scope, cName);
81430
+ ret += this.aliasesFromInterfaces(i.name, scope, cName);
81436
81431
  }
81437
81432
  // handle aliases after initialization of carrier variables
81438
81433
  for (const a of ((_b = def.getAliases()) === null || _b === void 0 ? void 0 : _b.getAll()) || []) {
@@ -81495,6 +81490,20 @@ class Traversal {
81495
81490
  }
81496
81491
  return ret;
81497
81492
  }
81493
+ aliasesFromInterfaces(name, scope, cname) {
81494
+ let ret = "";
81495
+ const intf = this.findInterfaceDefinition(name, scope);
81496
+ for (const a of (intf === null || intf === void 0 ? void 0 : intf.getAliases().getAll()) || []) {
81497
+ const iname = Traversal.escapeNamespace(intf === null || intf === void 0 ? void 0 : intf.getName().toLowerCase());
81498
+ const aname = Traversal.escapeNamespace(a.getName().toLowerCase());
81499
+ const cname = Traversal.escapeNamespace(a.getComponent().toLowerCase().replace("~", "$"));
81500
+ ret += "this." + iname + "$" + aname + " = this." + cname + ";\n";
81501
+ }
81502
+ for (const i of (intf === null || intf === void 0 ? void 0 : intf.getImplementing()) || []) {
81503
+ ret += this.aliasesFromInterfaces(i.name, scope, cname);
81504
+ }
81505
+ return ret;
81506
+ }
81498
81507
  determineType(node, scope) {
81499
81508
  var _a, _b, _c;
81500
81509
  if (scope === undefined) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@abaplint/transpiler-cli",
3
- "version": "2.7.98",
3
+ "version": "2.7.99",
4
4
  "description": "Transpiler - Command Line Interface",
5
5
  "funding": "https://github.com/sponsors/larshp",
6
6
  "bin": {
@@ -26,7 +26,7 @@
26
26
  "author": "abaplint",
27
27
  "license": "MIT",
28
28
  "devDependencies": {
29
- "@abaplint/transpiler": "^2.7.98",
29
+ "@abaplint/transpiler": "^2.7.99",
30
30
  "@types/glob": "^7.2.0",
31
31
  "glob": "=7.2.0",
32
32
  "@types/progress": "^2.0.5",