@abaplint/transpiler-cli 2.6.24 → 2.6.26
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.
- package/build/bundle.js +19 -15
- package/package.json +4 -4
package/build/bundle.js
CHANGED
|
@@ -71968,6 +71968,7 @@ class ClassImplementationTranspiler {
|
|
|
71968
71968
|
const scope = traversal.findCurrentScopeByToken(token);
|
|
71969
71969
|
return new chunk_1.Chunk().append(ret + ` {
|
|
71970
71970
|
static INTERNAL_TYPE = 'CLAS';
|
|
71971
|
+
static INTERNAL_NAME = '${traversal.buildInternalName(token.getStr(), def)}';
|
|
71971
71972
|
static IMPLEMENTED_INTERFACES = [${this.findImplementedClass(traversal, def, scope).map(e => `"` + e.toUpperCase() + `"`).join(",")}];
|
|
71972
71973
|
static ATTRIBUTES = {${traversal.buildAttributes(def)}};`, node, traversal);
|
|
71973
71974
|
}
|
|
@@ -76623,6 +76624,8 @@ class ClassDefinitionTranspiler {
|
|
|
76623
76624
|
return new chunk_1.Chunk(`
|
|
76624
76625
|
class ${className === null || className === void 0 ? void 0 : className.toLowerCase()} {
|
|
76625
76626
|
static INTERNAL_TYPE = 'CLAS';
|
|
76627
|
+
static IMPLEMENTED_INTERFACES = [];
|
|
76628
|
+
static INTERNAL_NAME = 'ABSTRACT_CLASS_INTERNAL_NAME';
|
|
76626
76629
|
static ATTRIBUTES = {};
|
|
76627
76630
|
async constructor_() {
|
|
76628
76631
|
this.me = new abap.types.ABAPObject();
|
|
@@ -78178,8 +78181,21 @@ class Traversal {
|
|
|
78178
78181
|
}
|
|
78179
78182
|
return ret;
|
|
78180
78183
|
}
|
|
78181
|
-
|
|
78184
|
+
buildInternalName(name, def) {
|
|
78182
78185
|
var _a, _b;
|
|
78186
|
+
if (def) {
|
|
78187
|
+
if (def.isGlobal() === false) {
|
|
78188
|
+
const prefix = this.buildPrefix();
|
|
78189
|
+
return `${prefix}-${(_a = def === null || def === void 0 ? void 0 : def.getName()) === null || _a === void 0 ? void 0 : _a.toUpperCase()}`;
|
|
78190
|
+
}
|
|
78191
|
+
else {
|
|
78192
|
+
return (_b = def === null || def === void 0 ? void 0 : def.getName()) === null || _b === void 0 ? void 0 : _b.toUpperCase();
|
|
78193
|
+
}
|
|
78194
|
+
}
|
|
78195
|
+
// assume global
|
|
78196
|
+
return name.toUpperCase();
|
|
78197
|
+
}
|
|
78198
|
+
lookupClassOrInterface(name, token, directGlobal = false) {
|
|
78183
78199
|
if (name === undefined || token === undefined) {
|
|
78184
78200
|
return "abap.Classes['undefined']";
|
|
78185
78201
|
}
|
|
@@ -78187,24 +78203,12 @@ class Traversal {
|
|
|
78187
78203
|
return "abap.Classes[" + name + ".trimEnd()]";
|
|
78188
78204
|
}
|
|
78189
78205
|
const scope = this.findCurrentScopeByToken(token);
|
|
78190
|
-
// todo, add explicit type,
|
|
78191
78206
|
let def = scope === null || scope === void 0 ? void 0 : scope.findClassDefinition(name);
|
|
78192
78207
|
if (def === undefined) {
|
|
78193
78208
|
def = scope === null || scope === void 0 ? void 0 : scope.findInterfaceDefinition(name);
|
|
78194
78209
|
}
|
|
78195
|
-
|
|
78196
|
-
|
|
78197
|
-
const prefix = this.buildPrefix();
|
|
78198
|
-
return `abap.Classes['${prefix}-${(_a = def === null || def === void 0 ? void 0 : def.getName()) === null || _a === void 0 ? void 0 : _a.toUpperCase()}']`;
|
|
78199
|
-
}
|
|
78200
|
-
else {
|
|
78201
|
-
return `abap.Classes['${(_b = def === null || def === void 0 ? void 0 : def.getName()) === null || _b === void 0 ? void 0 : _b.toUpperCase()}']`;
|
|
78202
|
-
}
|
|
78203
|
-
}
|
|
78204
|
-
else {
|
|
78205
|
-
// assume global
|
|
78206
|
-
return "abap.Classes['" + name.toUpperCase() + "']";
|
|
78207
|
-
}
|
|
78210
|
+
const internalName = this.buildInternalName(name, def);
|
|
78211
|
+
return "abap.Classes['" + internalName + "']";
|
|
78208
78212
|
}
|
|
78209
78213
|
buildPrefix() {
|
|
78210
78214
|
return this.obj.getType() + "-" + this.obj.getName();
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@abaplint/transpiler-cli",
|
|
3
|
-
"version": "2.6.
|
|
3
|
+
"version": "2.6.26",
|
|
4
4
|
"description": "Transpiler - Command Line Interface",
|
|
5
5
|
"bin": {
|
|
6
6
|
"abap_transpile": "./abap_transpile"
|
|
@@ -25,14 +25,14 @@
|
|
|
25
25
|
"author": "abaplint",
|
|
26
26
|
"license": "MIT",
|
|
27
27
|
"devDependencies": {
|
|
28
|
-
"@abaplint/transpiler": "^2.6.
|
|
28
|
+
"@abaplint/transpiler": "^2.6.26",
|
|
29
29
|
"@types/glob": "^7.2.0",
|
|
30
30
|
"glob": "=7.2.0",
|
|
31
31
|
"@types/progress": "^2.0.5",
|
|
32
|
-
"@types/node": "^18.15.
|
|
32
|
+
"@types/node": "^18.15.13",
|
|
33
33
|
"@abaplint/core": "^2.97.15",
|
|
34
34
|
"progress": "^2.0.3",
|
|
35
|
-
"webpack": "^5.
|
|
35
|
+
"webpack": "^5.80.0",
|
|
36
36
|
"webpack-cli": "^5.0.1",
|
|
37
37
|
"typescript": "^5.0.4"
|
|
38
38
|
}
|