@abaplint/transpiler-cli 2.3.58 → 2.3.60

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 +25 -3
  2. package/package.json +2 -2
package/build/bundle.js CHANGED
@@ -13645,7 +13645,7 @@ eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\n
13645
13645
  /***/ (function(__unused_webpack_module, exports, __webpack_require__) {
13646
13646
 
13647
13647
  "use strict";
13648
- eval("\r\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n var desc = Object.getOwnPropertyDescriptor(m, k);\r\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\r\n desc = { enumerable: true, get: function() { return m[k]; } };\r\n }\r\n Object.defineProperty(o, k2, desc);\r\n}) : (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n o[k2] = m[k];\r\n}));\r\nvar __exportStar = (this && this.__exportStar) || function(m, exports) {\r\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);\r\n};\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\n__exportStar(__webpack_require__(/*! ./arith_operator */ \"./node_modules/@abaplint/transpiler/build/src/expressions/arith_operator.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./attribute_chain */ \"./node_modules/@abaplint/transpiler/build/src/expressions/attribute_chain.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./attribute_name */ \"./node_modules/@abaplint/transpiler/build/src/expressions/attribute_name.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./call_transformation_options */ \"./node_modules/@abaplint/transpiler/build/src/expressions/call_transformation_options.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./call_transformation_parameters */ \"./node_modules/@abaplint/transpiler/build/src/expressions/call_transformation_parameters.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./compare_operator */ \"./node_modules/@abaplint/transpiler/build/src/expressions/compare_operator.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./compare */ \"./node_modules/@abaplint/transpiler/build/src/expressions/compare.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./component_chain_simple */ \"./node_modules/@abaplint/transpiler/build/src/expressions/component_chain_simple.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./component_chain */ \"./node_modules/@abaplint/transpiler/build/src/expressions/component_chain.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./component_compare */ \"./node_modules/@abaplint/transpiler/build/src/expressions/component_compare.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./component_cond_sub */ \"./node_modules/@abaplint/transpiler/build/src/expressions/component_cond_sub.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./component_cond */ \"./node_modules/@abaplint/transpiler/build/src/expressions/component_cond.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./cond_sub */ \"./node_modules/@abaplint/transpiler/build/src/expressions/cond_sub.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./cond */ \"./node_modules/@abaplint/transpiler/build/src/expressions/cond.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./constant */ \"./node_modules/@abaplint/transpiler/build/src/expressions/constant.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./database_table */ \"./node_modules/@abaplint/transpiler/build/src/expressions/database_table.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./field_chain */ \"./node_modules/@abaplint/transpiler/build/src/expressions/field_chain.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./field_length */ \"./node_modules/@abaplint/transpiler/build/src/expressions/field_length.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./field_offset */ \"./node_modules/@abaplint/transpiler/build/src/expressions/field_offset.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./field_symbol */ \"./node_modules/@abaplint/transpiler/build/src/expressions/field_symbol.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./function_exporting */ \"./node_modules/@abaplint/transpiler/build/src/expressions/function_exporting.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./function_parameters */ \"./node_modules/@abaplint/transpiler/build/src/expressions/function_parameters.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./message_number */ \"./node_modules/@abaplint/transpiler/build/src/expressions/message_number.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./method_call_body */ \"./node_modules/@abaplint/transpiler/build/src/expressions/method_call_body.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./method_call_chain */ \"./node_modules/@abaplint/transpiler/build/src/expressions/method_call_chain.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./method_call_param */ \"./node_modules/@abaplint/transpiler/build/src/expressions/method_call_param.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./method_call */ \"./node_modules/@abaplint/transpiler/build/src/expressions/method_call.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./method_parameters */ \"./node_modules/@abaplint/transpiler/build/src/expressions/method_parameters.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./method_source */ \"./node_modules/@abaplint/transpiler/build/src/expressions/method_source.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./parameter_list_s */ \"./node_modules/@abaplint/transpiler/build/src/expressions/parameter_list_s.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./parameter_list_t */ \"./node_modules/@abaplint/transpiler/build/src/expressions/parameter_list_t.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./parameter_name */ \"./node_modules/@abaplint/transpiler/build/src/expressions/parameter_name.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./parameter_s */ \"./node_modules/@abaplint/transpiler/build/src/expressions/parameter_s.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./parameter_t */ \"./node_modules/@abaplint/transpiler/build/src/expressions/parameter_t.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./simple_source1 */ \"./node_modules/@abaplint/transpiler/build/src/expressions/simple_source1.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./simple_source2 */ \"./node_modules/@abaplint/transpiler/build/src/expressions/simple_source2.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./simple_source3 */ \"./node_modules/@abaplint/transpiler/build/src/expressions/simple_source3.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./simple_source4 */ \"./node_modules/@abaplint/transpiler/build/src/expressions/simple_source4.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./source_field_symbol */ \"./node_modules/@abaplint/transpiler/build/src/expressions/source_field_symbol.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./source */ \"./node_modules/@abaplint/transpiler/build/src/expressions/source.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./sql_cond */ \"./node_modules/@abaplint/transpiler/build/src/expressions/sql_cond.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./sql_source_simple */ \"./node_modules/@abaplint/transpiler/build/src/expressions/sql_source_simple.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./sql_source */ \"./node_modules/@abaplint/transpiler/build/src/expressions/sql_source.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./string_template_source */ \"./node_modules/@abaplint/transpiler/build/src/expressions/string_template_source.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./string_template */ \"./node_modules/@abaplint/transpiler/build/src/expressions/string_template.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./target */ \"./node_modules/@abaplint/transpiler/build/src/expressions/target.js\"), exports);\r\n//# sourceMappingURL=index.js.map\n\n//# sourceURL=webpack://@abaplint/transpiler-cli/./node_modules/@abaplint/transpiler/build/src/expressions/index.js?");
13648
+ eval("\r\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n var desc = Object.getOwnPropertyDescriptor(m, k);\r\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\r\n desc = { enumerable: true, get: function() { return m[k]; } };\r\n }\r\n Object.defineProperty(o, k2, desc);\r\n}) : (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n o[k2] = m[k];\r\n}));\r\nvar __exportStar = (this && this.__exportStar) || function(m, exports) {\r\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);\r\n};\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\n__exportStar(__webpack_require__(/*! ./arith_operator */ \"./node_modules/@abaplint/transpiler/build/src/expressions/arith_operator.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./attribute_chain */ \"./node_modules/@abaplint/transpiler/build/src/expressions/attribute_chain.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./attribute_name */ \"./node_modules/@abaplint/transpiler/build/src/expressions/attribute_name.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./call_transformation_options */ \"./node_modules/@abaplint/transpiler/build/src/expressions/call_transformation_options.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./call_transformation_parameters */ \"./node_modules/@abaplint/transpiler/build/src/expressions/call_transformation_parameters.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./compare_operator */ \"./node_modules/@abaplint/transpiler/build/src/expressions/compare_operator.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./compare */ \"./node_modules/@abaplint/transpiler/build/src/expressions/compare.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./component_chain_simple */ \"./node_modules/@abaplint/transpiler/build/src/expressions/component_chain_simple.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./component_chain */ \"./node_modules/@abaplint/transpiler/build/src/expressions/component_chain.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./component_compare */ \"./node_modules/@abaplint/transpiler/build/src/expressions/component_compare.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./component_cond_sub */ \"./node_modules/@abaplint/transpiler/build/src/expressions/component_cond_sub.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./component_cond */ \"./node_modules/@abaplint/transpiler/build/src/expressions/component_cond.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./cond_sub */ \"./node_modules/@abaplint/transpiler/build/src/expressions/cond_sub.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./cond */ \"./node_modules/@abaplint/transpiler/build/src/expressions/cond.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./constant */ \"./node_modules/@abaplint/transpiler/build/src/expressions/constant.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./database_table */ \"./node_modules/@abaplint/transpiler/build/src/expressions/database_table.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./field_chain */ \"./node_modules/@abaplint/transpiler/build/src/expressions/field_chain.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./field_length */ \"./node_modules/@abaplint/transpiler/build/src/expressions/field_length.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./field_offset */ \"./node_modules/@abaplint/transpiler/build/src/expressions/field_offset.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./field_symbol */ \"./node_modules/@abaplint/transpiler/build/src/expressions/field_symbol.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./function_exporting */ \"./node_modules/@abaplint/transpiler/build/src/expressions/function_exporting.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./sql_from */ \"./node_modules/@abaplint/transpiler/build/src/expressions/sql_from.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./sql_join */ \"./node_modules/@abaplint/transpiler/build/src/expressions/sql_join.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./function_parameters */ \"./node_modules/@abaplint/transpiler/build/src/expressions/function_parameters.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./message_number */ \"./node_modules/@abaplint/transpiler/build/src/expressions/message_number.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./method_call_body */ \"./node_modules/@abaplint/transpiler/build/src/expressions/method_call_body.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./method_call_chain */ \"./node_modules/@abaplint/transpiler/build/src/expressions/method_call_chain.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./method_call_param */ \"./node_modules/@abaplint/transpiler/build/src/expressions/method_call_param.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./method_call */ \"./node_modules/@abaplint/transpiler/build/src/expressions/method_call.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./method_parameters */ \"./node_modules/@abaplint/transpiler/build/src/expressions/method_parameters.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./method_source */ \"./node_modules/@abaplint/transpiler/build/src/expressions/method_source.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./parameter_list_s */ \"./node_modules/@abaplint/transpiler/build/src/expressions/parameter_list_s.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./parameter_list_t */ \"./node_modules/@abaplint/transpiler/build/src/expressions/parameter_list_t.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./parameter_name */ \"./node_modules/@abaplint/transpiler/build/src/expressions/parameter_name.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./parameter_s */ \"./node_modules/@abaplint/transpiler/build/src/expressions/parameter_s.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./parameter_t */ \"./node_modules/@abaplint/transpiler/build/src/expressions/parameter_t.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./simple_source1 */ \"./node_modules/@abaplint/transpiler/build/src/expressions/simple_source1.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./simple_source2 */ \"./node_modules/@abaplint/transpiler/build/src/expressions/simple_source2.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./simple_source3 */ \"./node_modules/@abaplint/transpiler/build/src/expressions/simple_source3.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./simple_source4 */ \"./node_modules/@abaplint/transpiler/build/src/expressions/simple_source4.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./source_field_symbol */ \"./node_modules/@abaplint/transpiler/build/src/expressions/source_field_symbol.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./source */ \"./node_modules/@abaplint/transpiler/build/src/expressions/source.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./sql_cond */ \"./node_modules/@abaplint/transpiler/build/src/expressions/sql_cond.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./sql_source_simple */ \"./node_modules/@abaplint/transpiler/build/src/expressions/sql_source_simple.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./sql_source */ \"./node_modules/@abaplint/transpiler/build/src/expressions/sql_source.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./string_template_source */ \"./node_modules/@abaplint/transpiler/build/src/expressions/string_template_source.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./string_template */ \"./node_modules/@abaplint/transpiler/build/src/expressions/string_template.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./target */ \"./node_modules/@abaplint/transpiler/build/src/expressions/target.js\"), exports);\r\n//# sourceMappingURL=index.js.map\n\n//# sourceURL=webpack://@abaplint/transpiler-cli/./node_modules/@abaplint/transpiler/build/src/expressions/index.js?");
13649
13649
 
13650
13650
  /***/ }),
13651
13651
 
@@ -13858,6 +13858,28 @@ eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\n
13858
13858
 
13859
13859
  /***/ }),
13860
13860
 
13861
+ /***/ "./node_modules/@abaplint/transpiler/build/src/expressions/sql_from.js":
13862
+ /*!*****************************************************************************!*\
13863
+ !*** ./node_modules/@abaplint/transpiler/build/src/expressions/sql_from.js ***!
13864
+ \*****************************************************************************/
13865
+ /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
13866
+
13867
+ "use strict";
13868
+ eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nexports.SQLFromTranspiler = void 0;\r\nconst abaplint = __webpack_require__(/*! @abaplint/core */ \"./node_modules/@abaplint/core/build/src/index.js\");\r\nconst chunk_1 = __webpack_require__(/*! ../chunk */ \"./node_modules/@abaplint/transpiler/build/src/chunk.js\");\r\nconst sql_join_1 = __webpack_require__(/*! ./sql_join */ \"./node_modules/@abaplint/transpiler/build/src/expressions/sql_join.js\");\r\nclass SQLFromTranspiler {\r\n transpile(node, traversal) {\r\n const chunk = new chunk_1.Chunk();\r\n for (const c of node.getChildren()) {\r\n if (c instanceof abaplint.Nodes.TokenNode) {\r\n chunk.appendString(c.concatTokens() + \" \");\r\n }\r\n else if (c.get() instanceof abaplint.Expressions.SQLJoin) {\r\n chunk.appendChunk(new sql_join_1.SQLJoinTranspiler().transpile(c, traversal));\r\n chunk.appendString(\" \");\r\n }\r\n else {\r\n chunk.appendString(c.concatTokens() + \" \");\r\n }\r\n }\r\n return chunk;\r\n }\r\n}\r\nexports.SQLFromTranspiler = SQLFromTranspiler;\r\n//# sourceMappingURL=sql_from.js.map\n\n//# sourceURL=webpack://@abaplint/transpiler-cli/./node_modules/@abaplint/transpiler/build/src/expressions/sql_from.js?");
13869
+
13870
+ /***/ }),
13871
+
13872
+ /***/ "./node_modules/@abaplint/transpiler/build/src/expressions/sql_join.js":
13873
+ /*!*****************************************************************************!*\
13874
+ !*** ./node_modules/@abaplint/transpiler/build/src/expressions/sql_join.js ***!
13875
+ \*****************************************************************************/
13876
+ /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
13877
+
13878
+ "use strict";
13879
+ eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nexports.SQLJoinTranspiler = void 0;\r\nconst abaplint = __webpack_require__(/*! @abaplint/core */ \"./node_modules/@abaplint/core/build/src/index.js\");\r\nconst chunk_1 = __webpack_require__(/*! ../chunk */ \"./node_modules/@abaplint/transpiler/build/src/chunk.js\");\r\nconst sql_cond_1 = __webpack_require__(/*! ./sql_cond */ \"./node_modules/@abaplint/transpiler/build/src/expressions/sql_cond.js\");\r\nclass SQLJoinTranspiler {\r\n transpile(node, traversal) {\r\n const chunk = new chunk_1.Chunk();\r\n for (const c of node.getChildren()) {\r\n if (c instanceof abaplint.Nodes.TokenNode) {\r\n chunk.appendString(c.concatTokens() + \" \");\r\n }\r\n else if (c.get() instanceof abaplint.Expressions.SQLCond) {\r\n chunk.appendChunk(new sql_cond_1.SQLCondTranspiler().transpile(c, traversal));\r\n }\r\n else {\r\n chunk.appendString(c.concatTokens() + \" \");\r\n }\r\n }\r\n return chunk;\r\n }\r\n}\r\nexports.SQLJoinTranspiler = SQLJoinTranspiler;\r\n//# sourceMappingURL=sql_join.js.map\n\n//# sourceURL=webpack://@abaplint/transpiler-cli/./node_modules/@abaplint/transpiler/build/src/expressions/sql_join.js?");
13880
+
13881
+ /***/ }),
13882
+
13861
13883
  /***/ "./node_modules/@abaplint/transpiler/build/src/expressions/sql_source.js":
13862
13884
  /*!*******************************************************************************!*\
13863
13885
  !*** ./node_modules/@abaplint/transpiler/build/src/expressions/sql_source.js ***!
@@ -15075,7 +15097,7 @@ eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\n
15075
15097
  /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
15076
15098
 
15077
15099
  "use strict";
15078
- eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nexports.ReplaceTranspiler = void 0;\r\nconst abaplint = __webpack_require__(/*! @abaplint/core */ \"./node_modules/@abaplint/core/build/src/index.js\");\r\nconst expressions_1 = __webpack_require__(/*! ../expressions */ \"./node_modules/@abaplint/transpiler/build/src/expressions/index.js\");\r\nconst chunk_1 = __webpack_require__(/*! ../chunk */ \"./node_modules/@abaplint/transpiler/build/src/chunk.js\");\r\nclass ReplaceTranspiler {\r\n transpile(node, traversal) {\r\n const sources = node.findDirectExpressions(abaplint.Expressions.Source);\r\n const target = traversal.traverse(node.findDirectExpression(abaplint.Expressions.Target)).getCode();\r\n const concat = node.concatTokens().toUpperCase();\r\n const all = concat.startsWith(\"REPLACE ALL\");\r\n const extra = [];\r\n const w = node.findExpressionAfterToken(\"WITH\");\r\n if (w) {\r\n extra.push(\"with: \" + new expressions_1.SourceTranspiler().transpile(w, traversal).getCode());\r\n }\r\n const o = node.findExpressionAfterToken(\"OF\");\r\n if (o && o.get() instanceof abaplint.Expressions.Source) {\r\n extra.push(\"of: \" + new expressions_1.SourceTranspiler().transpile(o, traversal).getCode());\r\n }\r\n const length = node.findExpressionAfterToken(\"LENGTH\");\r\n if (length && length.get() instanceof abaplint.Expressions.Source) {\r\n extra.push(\"sectionLength: \" + new expressions_1.SourceTranspiler().transpile(length, traversal).getCode());\r\n }\r\n const offset = node.findExpressionAfterToken(\"OFFSET\");\r\n if (offset && offset.get() instanceof abaplint.Expressions.Source) {\r\n extra.push(\"sectionOffset: \" + new expressions_1.SourceTranspiler().transpile(offset, traversal).getCode());\r\n }\r\n const r = node.findDirectExpression(abaplint.Expressions.FindType);\r\n const type = r === null || r === void 0 ? void 0 : r.concatTokens().toUpperCase();\r\n if (type === \"REGEX\") {\r\n extra.push(\"regex: \" + new expressions_1.SourceTranspiler().transpile(sources[0], traversal).getCode());\r\n }\r\n if (o === undefined && o === undefined) {\r\n extra.push(\"of: \" + new expressions_1.SourceTranspiler().transpile(sources[0], traversal).getCode());\r\n }\r\n if (concat.includes(\" IGNORING CASE\")) {\r\n extra.push(\"ignoringCase: true\");\r\n }\r\n return new chunk_1.Chunk()\r\n .append(\"abap.statements.replace({target:\", node, traversal)\r\n .appendString(target + \", all:\" + all + \", \" + extra.join(\",\"))\r\n .append(\"});\", node.getLastToken(), traversal);\r\n }\r\n}\r\nexports.ReplaceTranspiler = ReplaceTranspiler;\r\n//# sourceMappingURL=replace.js.map\n\n//# sourceURL=webpack://@abaplint/transpiler-cli/./node_modules/@abaplint/transpiler/build/src/statements/replace.js?");
15100
+ eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nexports.ReplaceTranspiler = void 0;\r\nconst abaplint = __webpack_require__(/*! @abaplint/core */ \"./node_modules/@abaplint/core/build/src/index.js\");\r\nconst expressions_1 = __webpack_require__(/*! ../expressions */ \"./node_modules/@abaplint/transpiler/build/src/expressions/index.js\");\r\nconst chunk_1 = __webpack_require__(/*! ../chunk */ \"./node_modules/@abaplint/transpiler/build/src/chunk.js\");\r\nclass ReplaceTranspiler {\r\n transpile(node, traversal) {\r\n const sources = node.findDirectExpressions(abaplint.Expressions.Source);\r\n const target = traversal.traverse(node.findDirectExpression(abaplint.Expressions.Target)).getCode();\r\n const concat = node.concatTokens().toUpperCase();\r\n const all = concat.startsWith(\"REPLACE ALL\");\r\n const extra = [];\r\n const w = node.findExpressionAfterToken(\"WITH\");\r\n if (w) {\r\n extra.push(\"with: \" + new expressions_1.SourceTranspiler().transpile(w, traversal).getCode());\r\n }\r\n const o = node.findExpressionAfterToken(\"OF\");\r\n if (o && o.get() instanceof abaplint.Expressions.Source) {\r\n extra.push(\"of: \" + new expressions_1.SourceTranspiler().transpile(o, traversal).getCode());\r\n }\r\n const length = node.findExpressionAfterToken(\"LENGTH\");\r\n if (length && length.get() instanceof abaplint.Expressions.Source) {\r\n extra.push(\"sectionLength: \" + new expressions_1.SourceTranspiler().transpile(length, traversal).getCode());\r\n }\r\n const offset = node.findExpressionAfterToken(\"OFFSET\");\r\n if (offset && offset.get() instanceof abaplint.Expressions.Source) {\r\n extra.push(\"sectionOffset: \" + new expressions_1.SourceTranspiler().transpile(offset, traversal).getCode());\r\n }\r\n const r = node.findDirectExpression(abaplint.Expressions.FindType);\r\n const type = r === null || r === void 0 ? void 0 : r.concatTokens().toUpperCase();\r\n if (type === \"REGEX\") {\r\n extra.push(\"regex: \" + new expressions_1.SourceTranspiler().transpile(sources[0], traversal).getCode());\r\n }\r\n if (o === undefined && o === undefined && type !== \"REGEX\") {\r\n extra.push(\"of: \" + new expressions_1.SourceTranspiler().transpile(sources[0], traversal).getCode());\r\n }\r\n if (concat.includes(\" IGNORING CASE\")) {\r\n extra.push(\"ignoringCase: true\");\r\n }\r\n return new chunk_1.Chunk()\r\n .append(\"abap.statements.replace({target: \", node, traversal)\r\n .appendString(target + \", all: \" + all + \", \" + extra.join(\", \"))\r\n .append(\"});\", node.getLastToken(), traversal);\r\n }\r\n}\r\nexports.ReplaceTranspiler = ReplaceTranspiler;\r\n//# sourceMappingURL=replace.js.map\n\n//# sourceURL=webpack://@abaplint/transpiler-cli/./node_modules/@abaplint/transpiler/build/src/statements/replace.js?");
15079
15101
 
15080
15102
  /***/ }),
15081
15103
 
@@ -15152,7 +15174,7 @@ eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\n
15152
15174
  /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
15153
15175
 
15154
15176
  "use strict";
15155
- eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nexports.SelectTranspiler = void 0;\r\nconst abaplint = __webpack_require__(/*! @abaplint/core */ \"./node_modules/@abaplint/core/build/src/index.js\");\r\nconst chunk_1 = __webpack_require__(/*! ../chunk */ \"./node_modules/@abaplint/transpiler/build/src/chunk.js\");\r\nconst expressions_1 = __webpack_require__(/*! ../expressions */ \"./node_modules/@abaplint/transpiler/build/src/expressions/index.js\");\r\nconst unique_identifier_1 = __webpack_require__(/*! ../unique_identifier */ \"./node_modules/@abaplint/transpiler/build/src/unique_identifier.js\");\r\nclass SelectTranspiler {\r\n transpile(node, traversal, targetOverride) {\r\n var _a, _b, _c, _d;\r\n let target = \"undefined\";\r\n if (targetOverride) {\r\n target = targetOverride;\r\n }\r\n else if (node.findFirstExpression(abaplint.Expressions.Target)) {\r\n target = traversal.traverse(node.findFirstExpression(abaplint.Expressions.Target)).getCode();\r\n }\r\n let select = \"SELECT \";\r\n const fieldList = node.findFirstExpression(abaplint.Expressions.SQLFieldList)\r\n || node.findFirstExpression(abaplint.Expressions.SQLFieldListLoop);\r\n if ((fieldList === null || fieldList === void 0 ? void 0 : fieldList.getChildren().length) === 1) {\r\n select += fieldList.concatTokens();\r\n }\r\n else {\r\n // add commas between field names, this is required for SQLite, and easy to remove in other clients?\r\n select += fieldList === null || fieldList === void 0 ? void 0 : fieldList.findAllExpressions(abaplint.Expressions.SQLField).map(e => e.concatTokens()).join(\", \");\r\n }\r\n select += \" \";\r\n select += ((_a = node.findFirstExpression(abaplint.Expressions.SQLFrom)) === null || _a === void 0 ? void 0 : _a.concatTokens()) + \" \";\r\n let where = undefined;\r\n for (const sqlCond of node.findAllExpressions(abaplint.Expressions.SQLCond)) {\r\n if (this.isWhereExpression(node, sqlCond)) {\r\n where = sqlCond;\r\n }\r\n }\r\n if (where) {\r\n select += \"WHERE \" + traversal.traverse(where).getCode() + \" \";\r\n }\r\n const upTo = node.findFirstExpression(abaplint.Expressions.SQLUpTo);\r\n if (upTo) {\r\n const s = upTo.findFirstExpression(abaplint.Expressions.SimpleSource3);\r\n if (s) {\r\n select += `UP TO \" + ${new expressions_1.SourceTranspiler(true).transpile(s, traversal).getCode()} + \" ROWS `;\r\n }\r\n else {\r\n select += upTo.concatTokens() + \" \";\r\n }\r\n }\r\n const orderBy = node.findFirstExpression(abaplint.Expressions.SQLOrderBy);\r\n if (orderBy) {\r\n select += orderBy.concatTokens() + \" \";\r\n }\r\n for (const d of node.findAllExpressionsRecursive(abaplint.Expressions.Dynamic)) {\r\n const chain = d.findFirstExpression(abaplint.Expressions.FieldChain);\r\n if (chain) {\r\n const code = new expressions_1.FieldChainTranspiler(true).transpile(chain, traversal).getCode();\r\n const search = d.concatTokens();\r\n select = select.replace(search, `\" + ${code} + \"`);\r\n }\r\n }\r\n if (node.concatTokens().toUpperCase().startsWith(\"SELECT SINGLE \")) {\r\n select += \"UP TO 1 ROWS\";\r\n }\r\n let runtimeOptions = \"\";\r\n if (node.concatTokens().toUpperCase().includes(\" APPENDING TABLE \")) {\r\n runtimeOptions = `, {appending: true}`;\r\n }\r\n let extra = \"\";\r\n const keys = this.findKeys(node, traversal);\r\n if (keys.length > 0) {\r\n extra = `, primaryKey: ${JSON.stringify(keys)}`;\r\n }\r\n if (node.findFirstExpression(abaplint.Expressions.SQLForAllEntries)) {\r\n const unique = unique_identifier_1.UniqueIdentifier.get();\r\n const faeName = (_d = (_c = (_b = node.findFirstExpression(abaplint.Expressions.SQLForAllEntries)) === null || _b === void 0 ? void 0 : _b.findDirectExpression(abaplint.Expressions.SQLSource)) === null || _c === void 0 ? void 0 : _c.concatTokens()) === null || _d === void 0 ? void 0 : _d.toLowerCase();\r\n select = select.replace(new RegExp(\" \" + faeName, \"g\"), \" \" + unique);\r\n select = select.replace(unique + \".get().table_line.get()\", unique + \".get()\"); // there can be only one?\r\n const code = `if (${faeName}.array().length === 0) {\r\n throw \"FAE, todo, empty table\";\r\n} else {\r\n abap.statements.clear(${target});\r\n for await (const ${unique} of abap.statements.loop(${faeName})) {\r\n await abap.statements.select(${target}, {select: \"${select.trim()}\"${extra}}, {appending: true});\r\n }\r\n abap.builtin.sy.get().dbcnt.set(${target}.array().length);\r\n}`;\r\n return new chunk_1.Chunk().append(code, node, traversal);\r\n }\r\n else {\r\n return new chunk_1.Chunk().append(`await abap.statements.select(${target}, {select: \"${select.trim()}\"${extra}}${runtimeOptions});`, node, traversal);\r\n }\r\n }\r\n findKeys(node, traversal) {\r\n let keys = [];\r\n const from = node.findAllExpressions(abaplint.Expressions.SQLFromSource).map(e => e.concatTokens());\r\n if (from.length === 1) {\r\n const tabl = traversal.findTable(from[0]);\r\n if (tabl) {\r\n keys = tabl.listKeys(traversal.reg).map(k => k.toLowerCase());\r\n }\r\n }\r\n return keys;\r\n }\r\n isWhereExpression(node, expression) {\r\n // check if previous token before sqlCond is \"WHERE\". It could also be \"ON\" in case of join condition\r\n let prevToken;\r\n const sqlCondToken = expression.getFirstToken();\r\n for (const token of node.getTokens()) {\r\n if (token.getStart() === sqlCondToken.getStart()) {\r\n break;\r\n }\r\n prevToken = token;\r\n }\r\n if (prevToken && prevToken.getStr() === \"WHERE\") {\r\n return true;\r\n }\r\n else {\r\n return false;\r\n }\r\n }\r\n}\r\nexports.SelectTranspiler = SelectTranspiler;\r\n//# sourceMappingURL=select.js.map\n\n//# sourceURL=webpack://@abaplint/transpiler-cli/./node_modules/@abaplint/transpiler/build/src/statements/select.js?");
15177
+ eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nexports.SelectTranspiler = void 0;\r\nconst abaplint = __webpack_require__(/*! @abaplint/core */ \"./node_modules/@abaplint/core/build/src/index.js\");\r\nconst chunk_1 = __webpack_require__(/*! ../chunk */ \"./node_modules/@abaplint/transpiler/build/src/chunk.js\");\r\nconst expressions_1 = __webpack_require__(/*! ../expressions */ \"./node_modules/@abaplint/transpiler/build/src/expressions/index.js\");\r\nconst unique_identifier_1 = __webpack_require__(/*! ../unique_identifier */ \"./node_modules/@abaplint/transpiler/build/src/unique_identifier.js\");\r\nconst sql_from_1 = __webpack_require__(/*! ../expressions/sql_from */ \"./node_modules/@abaplint/transpiler/build/src/expressions/sql_from.js\");\r\nclass SelectTranspiler {\r\n transpile(node, traversal, targetOverride) {\r\n var _a, _b, _c;\r\n let target = \"undefined\";\r\n if (targetOverride) {\r\n target = targetOverride;\r\n }\r\n else if (node.findFirstExpression(abaplint.Expressions.Target)) {\r\n target = traversal.traverse(node.findFirstExpression(abaplint.Expressions.Target)).getCode();\r\n }\r\n let select = \"SELECT \";\r\n const fieldList = node.findFirstExpression(abaplint.Expressions.SQLFieldList)\r\n || node.findFirstExpression(abaplint.Expressions.SQLFieldListLoop);\r\n if ((fieldList === null || fieldList === void 0 ? void 0 : fieldList.getChildren().length) === 1) {\r\n select += fieldList.concatTokens();\r\n }\r\n else {\r\n // add commas between field names, this is required for SQLite, and easy to remove in other clients?\r\n select += fieldList === null || fieldList === void 0 ? void 0 : fieldList.findAllExpressions(abaplint.Expressions.SQLField).map(e => e.concatTokens()).join(\", \");\r\n }\r\n select += \" \";\r\n const from = node.findFirstExpression(abaplint.Expressions.SQLFrom);\r\n if (from) {\r\n select += new sql_from_1.SQLFromTranspiler().transpile(from, traversal).getCode();\r\n }\r\n let where = undefined;\r\n for (const sqlCond of node.findAllExpressions(abaplint.Expressions.SQLCond)) {\r\n if (this.isWhereExpression(node, sqlCond)) {\r\n where = sqlCond;\r\n }\r\n }\r\n if (where) {\r\n select += \"WHERE \" + traversal.traverse(where).getCode() + \" \";\r\n }\r\n const upTo = node.findFirstExpression(abaplint.Expressions.SQLUpTo);\r\n if (upTo) {\r\n const s = upTo.findFirstExpression(abaplint.Expressions.SimpleSource3);\r\n if (s) {\r\n select += `UP TO \" + ${new expressions_1.SourceTranspiler(true).transpile(s, traversal).getCode()} + \" ROWS `;\r\n }\r\n else {\r\n select += upTo.concatTokens() + \" \";\r\n }\r\n }\r\n const orderBy = node.findFirstExpression(abaplint.Expressions.SQLOrderBy);\r\n if (orderBy) {\r\n select += orderBy.concatTokens() + \" \";\r\n }\r\n for (const d of node.findAllExpressionsRecursive(abaplint.Expressions.Dynamic)) {\r\n const chain = d.findFirstExpression(abaplint.Expressions.FieldChain);\r\n if (chain) {\r\n const code = new expressions_1.FieldChainTranspiler(true).transpile(chain, traversal).getCode();\r\n const search = d.concatTokens();\r\n select = select.replace(search, `\" + ${code} + \"`);\r\n }\r\n }\r\n if (node.concatTokens().toUpperCase().startsWith(\"SELECT SINGLE \")) {\r\n select += \"UP TO 1 ROWS\";\r\n }\r\n let runtimeOptions = \"\";\r\n if (node.concatTokens().toUpperCase().includes(\" APPENDING TABLE \")) {\r\n runtimeOptions = `, {appending: true}`;\r\n }\r\n let extra = \"\";\r\n const keys = this.findKeys(node, traversal);\r\n if (keys.length > 0) {\r\n extra = `, primaryKey: ${JSON.stringify(keys)}`;\r\n }\r\n if (node.findFirstExpression(abaplint.Expressions.SQLForAllEntries)) {\r\n const unique = unique_identifier_1.UniqueIdentifier.get();\r\n const faeName = (_c = (_b = (_a = node.findFirstExpression(abaplint.Expressions.SQLForAllEntries)) === null || _a === void 0 ? void 0 : _a.findDirectExpression(abaplint.Expressions.SQLSource)) === null || _b === void 0 ? void 0 : _b.concatTokens()) === null || _c === void 0 ? void 0 : _c.toLowerCase();\r\n select = select.replace(new RegExp(\" \" + faeName, \"g\"), \" \" + unique);\r\n select = select.replace(unique + \".get().table_line.get()\", unique + \".get()\"); // there can be only one?\r\n const code = `if (${faeName}.array().length === 0) {\r\n throw \"FAE, todo, empty table\";\r\n} else {\r\n abap.statements.clear(${target});\r\n for await (const ${unique} of abap.statements.loop(${faeName})) {\r\n await abap.statements.select(${target}, {select: \"${select.trim()}\"${extra}}, {appending: true});\r\n }\r\n abap.builtin.sy.get().dbcnt.set(${target}.array().length);\r\n}`;\r\n return new chunk_1.Chunk().append(code, node, traversal);\r\n }\r\n else {\r\n return new chunk_1.Chunk().append(`await abap.statements.select(${target}, {select: \"${select.trim()}\"${extra}}${runtimeOptions});`, node, traversal);\r\n }\r\n }\r\n findKeys(node, traversal) {\r\n let keys = [];\r\n const from = node.findAllExpressions(abaplint.Expressions.SQLFromSource).map(e => e.concatTokens());\r\n if (from.length === 1) {\r\n const tabl = traversal.findTable(from[0]);\r\n if (tabl) {\r\n keys = tabl.listKeys(traversal.reg).map(k => k.toLowerCase());\r\n }\r\n }\r\n return keys;\r\n }\r\n isWhereExpression(node, expression) {\r\n // check if previous token before sqlCond is \"WHERE\". It could also be \"ON\" in case of join condition\r\n let prevToken;\r\n const sqlCondToken = expression.getFirstToken();\r\n for (const token of node.getTokens()) {\r\n if (token.getStart() === sqlCondToken.getStart()) {\r\n break;\r\n }\r\n prevToken = token;\r\n }\r\n if (prevToken && prevToken.getStr() === \"WHERE\") {\r\n return true;\r\n }\r\n else {\r\n return false;\r\n }\r\n }\r\n}\r\nexports.SelectTranspiler = SelectTranspiler;\r\n//# sourceMappingURL=select.js.map\n\n//# sourceURL=webpack://@abaplint/transpiler-cli/./node_modules/@abaplint/transpiler/build/src/statements/select.js?");
15156
15178
 
15157
15179
  /***/ }),
15158
15180
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@abaplint/transpiler-cli",
3
- "version": "2.3.58",
3
+ "version": "2.3.60",
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.3.58",
28
+ "@abaplint/transpiler": "^2.3.60",
29
29
  "@types/glob": "^7.2.0",
30
30
  "glob": "=7.2.0",
31
31
  "@types/progress": "^2.0.5",