@abaplint/transpiler-cli 2.7.87 → 2.7.89
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 +24 -15
- package/package.json +2 -2
package/build/bundle.js
CHANGED
|
@@ -69659,7 +69659,7 @@ class DatabaseSetup {
|
|
|
69659
69659
|
// INSERT data
|
|
69660
69660
|
for (const obj of this.reg.getObjects()) {
|
|
69661
69661
|
if (obj instanceof abaplint.Objects.MessageClass) {
|
|
69662
|
-
insert.push(this.insertT100(obj));
|
|
69662
|
+
insert.push(...this.insertT100(obj));
|
|
69663
69663
|
}
|
|
69664
69664
|
else if (obj instanceof abaplint.Objects.Class
|
|
69665
69665
|
|| obj instanceof abaplint.Objects.Interface) {
|
|
@@ -69701,11 +69701,11 @@ class DatabaseSetup {
|
|
|
69701
69701
|
// ignore if T100 is unknown
|
|
69702
69702
|
const obj = this.reg.getObject("TABL", "T100");
|
|
69703
69703
|
if (obj === undefined) {
|
|
69704
|
-
return
|
|
69704
|
+
return [];
|
|
69705
69705
|
}
|
|
69706
|
-
|
|
69706
|
+
const ret = [];
|
|
69707
69707
|
for (const m of msag.getMessages()) {
|
|
69708
|
-
ret
|
|
69708
|
+
ret.push(`INSERT INTO "t100" ("sprsl", "arbgb", "msgnr", "text") VALUES ('E', '${msag.getName().padEnd(20, " ")}', '${m.getNumber()}', '${this.escape(m.getMessage().padEnd(73, " "))}');`);
|
|
69709
69709
|
}
|
|
69710
69710
|
return ret;
|
|
69711
69711
|
}
|
|
@@ -72313,9 +72313,14 @@ class SQLFieldNameTranspiler {
|
|
|
72313
72313
|
transpile(node, _traversal) {
|
|
72314
72314
|
const chunk = new chunk_1.Chunk();
|
|
72315
72315
|
let concat = node.concatTokens();
|
|
72316
|
+
/*
|
|
72316
72317
|
if (concat.includes("~") && concat.split("~")[0].includes("/")) {
|
|
72317
|
-
|
|
72318
|
-
}
|
|
72318
|
+
concat = "'" + concat.replace("~", "'~");
|
|
72319
|
+
} else {
|
|
72320
|
+
*/
|
|
72321
|
+
concat = concat.replace(/~/, `\\".\\"`);
|
|
72322
|
+
concat = `\\"` + concat + `\\"`;
|
|
72323
|
+
// }
|
|
72319
72324
|
chunk.appendString(concat);
|
|
72320
72325
|
return chunk;
|
|
72321
72326
|
}
|
|
@@ -77776,25 +77781,29 @@ class ReadTableTranspiler {
|
|
|
77776
77781
|
if (left.get() instanceof abaplint.Expressions.Dynamic
|
|
77777
77782
|
&& left instanceof abaplint.Nodes.ExpressionNode) {
|
|
77778
77783
|
const concat = left.concatTokens().toLowerCase();
|
|
77779
|
-
field = concat.substring(2, concat.length - 2);
|
|
77784
|
+
field = "i." + concat.substring(2, concat.length - 2);
|
|
77785
|
+
}
|
|
77786
|
+
else if (left.get() instanceof abaplint.Expressions.ComponentChainSimple
|
|
77787
|
+
&& left instanceof abaplint.Nodes.ExpressionNode) {
|
|
77788
|
+
field = new expressions_1.ComponentChainSimpleTranspiler("i.").transpile(left, traversal).getCode();
|
|
77780
77789
|
}
|
|
77781
77790
|
else {
|
|
77782
|
-
|
|
77791
|
+
throw new Error("transpiler: READ TABLE, unexpected node");
|
|
77783
77792
|
}
|
|
77784
|
-
if (field === "table_line") {
|
|
77793
|
+
if (field === "i.table_line") {
|
|
77785
77794
|
usesTableLine = true;
|
|
77786
77795
|
}
|
|
77787
77796
|
if (s.includes("await")) {
|
|
77788
77797
|
const id = unique_identifier_1.UniqueIdentifier.get();
|
|
77789
77798
|
prefix += "const " + id + " = " + s + ";\n";
|
|
77790
|
-
withKey.push("abap.compare.eq(
|
|
77791
|
-
withKeyValue.push(`{key: (i) => {return
|
|
77792
|
-
withKeySimple.push(`"${field}": ${id}`);
|
|
77799
|
+
withKey.push("abap.compare.eq(" + field + ", " + id + ")");
|
|
77800
|
+
withKeyValue.push(`{key: (i) => {return ${field}}, value: ${id}}`);
|
|
77801
|
+
withKeySimple.push(`"${field.replace("i.", "")}": ${id}`);
|
|
77793
77802
|
}
|
|
77794
77803
|
else {
|
|
77795
|
-
withKey.push("abap.compare.eq(
|
|
77796
|
-
withKeyValue.push(`{key: (i) => {return
|
|
77797
|
-
withKeySimple.push(`"${field}": ${s}`);
|
|
77804
|
+
withKey.push("abap.compare.eq(" + field + ", " + s + ")");
|
|
77805
|
+
withKeyValue.push(`{key: (i) => {return ${field}}, value: ${s}}`);
|
|
77806
|
+
withKeySimple.push(`"${field.replace("i.", "")}": ${s}`);
|
|
77798
77807
|
}
|
|
77799
77808
|
}
|
|
77800
77809
|
extra.push("withKey: (i) => {return " + withKey.join(" && ") + ";}");
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@abaplint/transpiler-cli",
|
|
3
|
-
"version": "2.7.
|
|
3
|
+
"version": "2.7.89",
|
|
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.
|
|
29
|
+
"@abaplint/transpiler": "^2.7.89",
|
|
30
30
|
"@types/glob": "^7.2.0",
|
|
31
31
|
"glob": "=7.2.0",
|
|
32
32
|
"@types/progress": "^2.0.5",
|