@abaplint/transpiler-cli 2.4.10 → 2.4.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.
- package/build/bundle.js +5 -2
- package/package.json +2 -2
package/build/bundle.js
CHANGED
|
@@ -69016,12 +69016,12 @@ class HandleABAP {
|
|
|
69016
69016
|
}
|
|
69017
69017
|
runObject(obj, reg) {
|
|
69018
69018
|
var _a, _b, _c;
|
|
69019
|
-
const spaghetti = new abaplint.SyntaxLogic(reg, obj).run().spaghetti;
|
|
69020
69019
|
let ret = [];
|
|
69021
69020
|
if (obj instanceof abaplint.Objects.Program && obj.isInclude() === true) {
|
|
69022
69021
|
// includes are only compiled along with the programs where its used?
|
|
69023
69022
|
return [];
|
|
69024
69023
|
}
|
|
69024
|
+
const spaghetti = new abaplint.SyntaxLogic(reg, obj).run().spaghetti;
|
|
69025
69025
|
for (const file of obj.getSequencedFiles()) {
|
|
69026
69026
|
const chunk = new chunk_1.Chunk();
|
|
69027
69027
|
if (((_a = this.options) === null || _a === void 0 ? void 0 : _a.addFilenames) === true) {
|
|
@@ -73863,6 +73863,9 @@ const chunk_1 = __webpack_require__(/*! ../chunk */ "./node_modules/@abaplint/tr
|
|
|
73863
73863
|
const expressions_1 = __webpack_require__(/*! ../expressions */ "./node_modules/@abaplint/transpiler/build/src/expressions/index.js");
|
|
73864
73864
|
const unique_identifier_1 = __webpack_require__(/*! ../unique_identifier */ "./node_modules/@abaplint/transpiler/build/src/unique_identifier.js");
|
|
73865
73865
|
const sql_from_1 = __webpack_require__(/*! ../expressions/sql_from */ "./node_modules/@abaplint/transpiler/build/src/expressions/sql_from.js");
|
|
73866
|
+
function escapeRegExp(string) {
|
|
73867
|
+
return string.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"); // $& means the whole matched string
|
|
73868
|
+
}
|
|
73866
73869
|
class SelectTranspiler {
|
|
73867
73870
|
transpile(node, traversal, targetOverride) {
|
|
73868
73871
|
var _a;
|
|
@@ -73935,7 +73938,7 @@ class SelectTranspiler {
|
|
|
73935
73938
|
const unique = unique_identifier_1.UniqueIdentifier.get();
|
|
73936
73939
|
const fn = (_a = node.findFirstExpression(abaplint.Expressions.SQLForAllEntries)) === null || _a === void 0 ? void 0 : _a.findDirectExpression(abaplint.Expressions.SQLSource);
|
|
73937
73940
|
const faeTranspiled = new expressions_1.SQLSourceTranspiler().transpile(fn, traversal).getCode();
|
|
73938
|
-
select = select.replace(new RegExp(" " + faeTranspiled, "g"), " " + unique);
|
|
73941
|
+
select = select.replace(new RegExp(" " + escapeRegExp(faeTranspiled), "g"), " " + unique);
|
|
73939
73942
|
select = select.replace(unique + ".get().table_line.get()", unique + ".get()"); // there can be only one?
|
|
73940
73943
|
const code = `if (${faeTranspiled}.array().length === 0) {
|
|
73941
73944
|
throw "FAE, todo, empty table";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@abaplint/transpiler-cli",
|
|
3
|
-
"version": "2.4.
|
|
3
|
+
"version": "2.4.12",
|
|
4
4
|
"description": "Transpiler - Command Line Interface",
|
|
5
5
|
"bin": {
|
|
6
6
|
"abap_transpile": "./abap_transpile"
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
"author": "abaplint",
|
|
26
26
|
"license": "MIT",
|
|
27
27
|
"devDependencies": {
|
|
28
|
-
"@abaplint/transpiler": "^2.4.
|
|
28
|
+
"@abaplint/transpiler": "^2.4.12",
|
|
29
29
|
"@types/glob": "^7.2.0",
|
|
30
30
|
"glob": "=7.2.0",
|
|
31
31
|
"@types/progress": "^2.0.5",
|