@abaplint/transpiler-cli 2.5.77 → 2.5.78
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 +42 -7
- package/package.json +4 -4
package/build/bundle.js
CHANGED
|
@@ -23578,9 +23578,10 @@ const tokens_1 = __webpack_require__(/*! ../../1_lexer/tokens */ "./node_modules
|
|
|
23578
23578
|
const attribute_name_1 = __webpack_require__(/*! ./attribute_name */ "./node_modules/@abaplint/core/build/src/abap/5_syntax/expressions/attribute_name.js");
|
|
23579
23579
|
const component_name_1 = __webpack_require__(/*! ./component_name */ "./node_modules/@abaplint/core/build/src/abap/5_syntax/expressions/component_name.js");
|
|
23580
23580
|
const types_1 = __webpack_require__(/*! ../../types */ "./node_modules/@abaplint/core/build/src/abap/types/index.js");
|
|
23581
|
+
const version_1 = __webpack_require__(/*! ../../../version */ "./node_modules/@abaplint/core/build/src/version.js");
|
|
23581
23582
|
class MethodSource {
|
|
23582
23583
|
runSyntax(node, scope, filename) {
|
|
23583
|
-
var _a;
|
|
23584
|
+
var _a, _b, _c;
|
|
23584
23585
|
const helper = new _object_oriented_1.ObjectOriented(scope);
|
|
23585
23586
|
const children = node.getChildren().slice();
|
|
23586
23587
|
const first = children.shift();
|
|
@@ -23592,6 +23593,15 @@ class MethodSource {
|
|
|
23592
23593
|
context = (_a = scope.findVariable("me")) === null || _a === void 0 ? void 0 : _a.getType();
|
|
23593
23594
|
children.unshift(first);
|
|
23594
23595
|
}
|
|
23596
|
+
if (scope.getVersion() === version_1.Version.Cloud
|
|
23597
|
+
&& first.get() instanceof Expressions.Dynamic
|
|
23598
|
+
&& first instanceof nodes_1.ExpressionNode
|
|
23599
|
+
&& ((_b = children[0]) === null || _b === void 0 ? void 0 : _b.concatTokens()) === "=>") {
|
|
23600
|
+
const name = (_c = first.findDirectExpression(Expressions.Constant)) === null || _c === void 0 ? void 0 : _c.concatTokens().replace(/'/g, "");
|
|
23601
|
+
if (name !== undefined && scope.findClassDefinition(name) === undefined) {
|
|
23602
|
+
throw new Error(`Class "${name}" not found/released`);
|
|
23603
|
+
}
|
|
23604
|
+
}
|
|
23595
23605
|
if (context instanceof basic_1.VoidType) {
|
|
23596
23606
|
// todo, if there are more dynamic with variables, the references for the variables are not added?
|
|
23597
23607
|
return context;
|
|
@@ -23622,7 +23632,7 @@ class MethodSource {
|
|
|
23622
23632
|
continue;
|
|
23623
23633
|
}
|
|
23624
23634
|
}
|
|
23625
|
-
catch (
|
|
23635
|
+
catch (_d) {
|
|
23626
23636
|
// ignore
|
|
23627
23637
|
}
|
|
23628
23638
|
// try looking for method name
|
|
@@ -26436,7 +26446,10 @@ class CreateObject {
|
|
|
26436
26446
|
}
|
|
26437
26447
|
else if (found instanceof basic_1.ObjectReferenceType) {
|
|
26438
26448
|
const id = found.getIdentifier();
|
|
26439
|
-
if (id instanceof types_1.
|
|
26449
|
+
if (id instanceof types_1.InterfaceDefinition && type === undefined) {
|
|
26450
|
+
throw new Error("Interface reference, cannot be instantiated");
|
|
26451
|
+
}
|
|
26452
|
+
else if (id instanceof types_1.ClassDefinition && cdef === undefined) {
|
|
26440
26453
|
cdef = id;
|
|
26441
26454
|
}
|
|
26442
26455
|
if (type === undefined && id instanceof types_1.ClassDefinition && id.isAbstract() === true) {
|
|
@@ -46213,7 +46226,7 @@ class Registry {
|
|
|
46213
46226
|
}
|
|
46214
46227
|
static abaplintVersion() {
|
|
46215
46228
|
// magic, see build script "version.sh"
|
|
46216
|
-
return "2.97.
|
|
46229
|
+
return "2.97.7";
|
|
46217
46230
|
}
|
|
46218
46231
|
getDDICReferences() {
|
|
46219
46232
|
return this.references;
|
|
@@ -79253,6 +79266,7 @@ const defaultOptions = {
|
|
|
79253
79266
|
stopNodes: [],
|
|
79254
79267
|
// transformTagName: false,
|
|
79255
79268
|
// transformAttributeName: false,
|
|
79269
|
+
oneListGroup: false
|
|
79256
79270
|
};
|
|
79257
79271
|
|
|
79258
79272
|
function Builder(options) {
|
|
@@ -79323,6 +79337,7 @@ Builder.prototype.j2x = function(jObj, level) {
|
|
|
79323
79337
|
} else if (Array.isArray(jObj[key])) {
|
|
79324
79338
|
//repeated nodes
|
|
79325
79339
|
const arrLen = jObj[key].length;
|
|
79340
|
+
let listTagVal = "";
|
|
79326
79341
|
for (let j = 0; j < arrLen; j++) {
|
|
79327
79342
|
const item = jObj[key][j];
|
|
79328
79343
|
if (typeof item === 'undefined') {
|
|
@@ -79332,11 +79347,19 @@ Builder.prototype.j2x = function(jObj, level) {
|
|
|
79332
79347
|
else val += this.indentate(level) + '<' + key + '/' + this.tagEndChar;
|
|
79333
79348
|
// val += this.indentate(level) + '<' + key + '/' + this.tagEndChar;
|
|
79334
79349
|
} else if (typeof item === 'object') {
|
|
79335
|
-
|
|
79350
|
+
if(this.options.oneListGroup ){
|
|
79351
|
+
listTagVal += this.j2x(item, level + 1).val;
|
|
79352
|
+
}else{
|
|
79353
|
+
listTagVal += this.processTextOrObjNode(item, key, level)
|
|
79354
|
+
}
|
|
79336
79355
|
} else {
|
|
79337
|
-
|
|
79356
|
+
listTagVal += this.buildTextValNode(item, key, '', level);
|
|
79338
79357
|
}
|
|
79339
79358
|
}
|
|
79359
|
+
if(this.options.oneListGroup){
|
|
79360
|
+
listTagVal = this.buildObjectNode(listTagVal, key, '', level);
|
|
79361
|
+
}
|
|
79362
|
+
val += listTagVal;
|
|
79340
79363
|
} else {
|
|
79341
79364
|
//nested node
|
|
79342
79365
|
if (this.options.attributesGroupName && key === this.options.attributesGroupName) {
|
|
@@ -80563,8 +80586,20 @@ function assignAttributes(obj, attrMap, jpath, options){
|
|
|
80563
80586
|
}
|
|
80564
80587
|
|
|
80565
80588
|
function isLeafTag(obj, options){
|
|
80589
|
+
const { textNodeName } = options;
|
|
80566
80590
|
const propCount = Object.keys(obj).length;
|
|
80567
|
-
|
|
80591
|
+
|
|
80592
|
+
if (propCount === 0) {
|
|
80593
|
+
return true;
|
|
80594
|
+
}
|
|
80595
|
+
|
|
80596
|
+
if (
|
|
80597
|
+
propCount === 1 &&
|
|
80598
|
+
(obj[textNodeName] || typeof obj[textNodeName] === "boolean" || obj[textNodeName] === 0)
|
|
80599
|
+
) {
|
|
80600
|
+
return true;
|
|
80601
|
+
}
|
|
80602
|
+
|
|
80568
80603
|
return false;
|
|
80569
80604
|
}
|
|
80570
80605
|
exports.prettify = prettify;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@abaplint/transpiler-cli",
|
|
3
|
-
"version": "2.5.
|
|
3
|
+
"version": "2.5.78",
|
|
4
4
|
"description": "Transpiler - Command Line Interface",
|
|
5
5
|
"bin": {
|
|
6
6
|
"abap_transpile": "./abap_transpile"
|
|
@@ -25,15 +25,15 @@
|
|
|
25
25
|
"author": "abaplint",
|
|
26
26
|
"license": "MIT",
|
|
27
27
|
"devDependencies": {
|
|
28
|
-
"@abaplint/transpiler": "^2.5.
|
|
28
|
+
"@abaplint/transpiler": "^2.5.78",
|
|
29
29
|
"@types/glob": "^7.2.0",
|
|
30
30
|
"glob": "=7.2.0",
|
|
31
31
|
"@types/progress": "^2.0.5",
|
|
32
32
|
"@types/node": "^18.15.11",
|
|
33
|
-
"@abaplint/core": "^2.97.
|
|
33
|
+
"@abaplint/core": "^2.97.7",
|
|
34
34
|
"progress": "^2.0.3",
|
|
35
35
|
"webpack": "^5.78.0",
|
|
36
36
|
"webpack-cli": "^5.0.1",
|
|
37
|
-
"typescript": "^5.0.
|
|
37
|
+
"typescript": "^5.0.4"
|
|
38
38
|
}
|
|
39
39
|
}
|