@abaplint/transpiler-cli 2.7.58 → 2.7.59
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 +55 -8
- package/package.json +2 -2
package/build/bundle.js
CHANGED
|
@@ -70802,6 +70802,7 @@ __exportStar(__webpack_require__(/*! ./parameter_list_t */ "./node_modules/@abap
|
|
|
70802
70802
|
__exportStar(__webpack_require__(/*! ./parameter_name */ "./node_modules/@abaplint/transpiler/build/src/expressions/parameter_name.js"), exports);
|
|
70803
70803
|
__exportStar(__webpack_require__(/*! ./parameter_s */ "./node_modules/@abaplint/transpiler/build/src/expressions/parameter_s.js"), exports);
|
|
70804
70804
|
__exportStar(__webpack_require__(/*! ./parameter_t */ "./node_modules/@abaplint/transpiler/build/src/expressions/parameter_t.js"), exports);
|
|
70805
|
+
__exportStar(__webpack_require__(/*! ./receive_parameters */ "./node_modules/@abaplint/transpiler/build/src/expressions/receive_parameters.js"), exports);
|
|
70805
70806
|
__exportStar(__webpack_require__(/*! ./simple_source1 */ "./node_modules/@abaplint/transpiler/build/src/expressions/simple_source1.js"), exports);
|
|
70806
70807
|
__exportStar(__webpack_require__(/*! ./simple_source2 */ "./node_modules/@abaplint/transpiler/build/src/expressions/simple_source2.js"), exports);
|
|
70807
70808
|
__exportStar(__webpack_require__(/*! ./simple_source3 */ "./node_modules/@abaplint/transpiler/build/src/expressions/simple_source3.js"), exports);
|
|
@@ -70809,11 +70810,11 @@ __exportStar(__webpack_require__(/*! ./simple_source4 */ "./node_modules/@abapli
|
|
|
70809
70810
|
__exportStar(__webpack_require__(/*! ./source_field_symbol */ "./node_modules/@abaplint/transpiler/build/src/expressions/source_field_symbol.js"), exports);
|
|
70810
70811
|
__exportStar(__webpack_require__(/*! ./source_field */ "./node_modules/@abaplint/transpiler/build/src/expressions/source_field.js"), exports);
|
|
70811
70812
|
__exportStar(__webpack_require__(/*! ./source */ "./node_modules/@abaplint/transpiler/build/src/expressions/source.js"), exports);
|
|
70813
|
+
__exportStar(__webpack_require__(/*! ./sql_arithmetic_operator */ "./node_modules/@abaplint/transpiler/build/src/expressions/sql_arithmetic_operator.js"), exports);
|
|
70812
70814
|
__exportStar(__webpack_require__(/*! ./sql_cond */ "./node_modules/@abaplint/transpiler/build/src/expressions/sql_cond.js"), exports);
|
|
70813
70815
|
__exportStar(__webpack_require__(/*! ./sql_field_and_value */ "./node_modules/@abaplint/transpiler/build/src/expressions/sql_field_and_value.js"), exports);
|
|
70814
|
-
__exportStar(__webpack_require__(/*! ./sql_field */ "./node_modules/@abaplint/transpiler/build/src/expressions/sql_field.js"), exports);
|
|
70815
70816
|
__exportStar(__webpack_require__(/*! ./sql_field_name */ "./node_modules/@abaplint/transpiler/build/src/expressions/sql_field_name.js"), exports);
|
|
70816
|
-
__exportStar(__webpack_require__(/*! ./
|
|
70817
|
+
__exportStar(__webpack_require__(/*! ./sql_field */ "./node_modules/@abaplint/transpiler/build/src/expressions/sql_field.js"), exports);
|
|
70817
70818
|
__exportStar(__webpack_require__(/*! ./sql_from_source */ "./node_modules/@abaplint/transpiler/build/src/expressions/sql_from_source.js"), exports);
|
|
70818
70819
|
__exportStar(__webpack_require__(/*! ./sql_from */ "./node_modules/@abaplint/transpiler/build/src/expressions/sql_from.js"), exports);
|
|
70819
70820
|
__exportStar(__webpack_require__(/*! ./sql_into_structure */ "./node_modules/@abaplint/transpiler/build/src/expressions/sql_into_structure.js"), exports);
|
|
@@ -71392,6 +71393,27 @@ exports.ParameterTTranspiler = ParameterTTranspiler;
|
|
|
71392
71393
|
|
|
71393
71394
|
/***/ }),
|
|
71394
71395
|
|
|
71396
|
+
/***/ "./node_modules/@abaplint/transpiler/build/src/expressions/receive_parameters.js":
|
|
71397
|
+
/*!***************************************************************************************!*\
|
|
71398
|
+
!*** ./node_modules/@abaplint/transpiler/build/src/expressions/receive_parameters.js ***!
|
|
71399
|
+
\***************************************************************************************/
|
|
71400
|
+
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
|
|
71401
|
+
|
|
71402
|
+
"use strict";
|
|
71403
|
+
|
|
71404
|
+
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
71405
|
+
exports.ReceiveParametersTranspiler = void 0;
|
|
71406
|
+
const function_parameters_1 = __webpack_require__(/*! ./function_parameters */ "./node_modules/@abaplint/transpiler/build/src/expressions/function_parameters.js");
|
|
71407
|
+
class ReceiveParametersTranspiler {
|
|
71408
|
+
transpile(node, traversal) {
|
|
71409
|
+
return new function_parameters_1.FunctionParametersTranspiler().transpile(node, traversal);
|
|
71410
|
+
}
|
|
71411
|
+
}
|
|
71412
|
+
exports.ReceiveParametersTranspiler = ReceiveParametersTranspiler;
|
|
71413
|
+
//# sourceMappingURL=receive_parameters.js.map
|
|
71414
|
+
|
|
71415
|
+
/***/ }),
|
|
71416
|
+
|
|
71395
71417
|
/***/ "./node_modules/@abaplint/transpiler/build/src/expressions/simple_source1.js":
|
|
71396
71418
|
/*!***********************************************************************************!*\
|
|
71397
71419
|
!*** ./node_modules/@abaplint/transpiler/build/src/expressions/simple_source1.js ***!
|
|
@@ -73897,12 +73919,18 @@ class CallFunctionTranspiler {
|
|
|
73897
73919
|
if (exceptions) {
|
|
73898
73920
|
ret.appendString("try {\n");
|
|
73899
73921
|
}
|
|
73922
|
+
const calling = node.findExpressionAfterToken("CALLING");
|
|
73900
73923
|
const dest = (_b = node.findDirectExpression(abaplint.Expressions.Destination)) === null || _b === void 0 ? void 0 : _b.findDirectExpression(abaplint.Expressions.Source);
|
|
73901
73924
|
if (dest) {
|
|
73902
73925
|
const s = new expressions_1.SourceTranspiler(true).transpile(dest, traversal);
|
|
73903
73926
|
param = param.replace("{", ",").replace(/}$/, "");
|
|
73904
73927
|
ret.appendString(`await abap.statements.callFunction({name:${fmname},destination:${s.getCode()}${param}});`);
|
|
73905
73928
|
}
|
|
73929
|
+
else if (calling) {
|
|
73930
|
+
param = param.replace("{", ",").replace(/}$/, "");
|
|
73931
|
+
// typically used in combination with STARTING NEW TASK so dont await,
|
|
73932
|
+
ret.appendString(`abap.statements.callFunction({name:${fmname},calling:this->${calling.concatTokens().toLowerCase()}${param}});`);
|
|
73933
|
+
}
|
|
73906
73934
|
else {
|
|
73907
73935
|
const illegalFunc = traversal.lookupClassOrInterface("'CX_SY_DYN_CALL_ILLEGAL_FUNC'", node.getFirstToken(), true);
|
|
73908
73936
|
const call = `abap.FunctionModules[${fmname}]`;
|
|
@@ -77339,10 +77367,24 @@ exports.ReadTextpoolTranspiler = ReadTextpoolTranspiler;
|
|
|
77339
77367
|
|
|
77340
77368
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
77341
77369
|
exports.ReceiveTranspiler = void 0;
|
|
77370
|
+
const abaplint = __webpack_require__(/*! @abaplint/core */ "./node_modules/@abaplint/core/build/src/index.js");
|
|
77342
77371
|
const chunk_1 = __webpack_require__(/*! ../chunk */ "./node_modules/@abaplint/transpiler/build/src/chunk.js");
|
|
77343
77372
|
class ReceiveTranspiler {
|
|
77344
|
-
transpile(
|
|
77345
|
-
|
|
77373
|
+
transpile(node, traversal) {
|
|
77374
|
+
var _a;
|
|
77375
|
+
const fmchild = (_a = node.findDirectExpression(abaplint.Expressions.FunctionName)) === null || _a === void 0 ? void 0 : _a.getFirstChild();
|
|
77376
|
+
if (fmchild === undefined) {
|
|
77377
|
+
throw new Error("ReceiveTranspilerNameNotFound");
|
|
77378
|
+
}
|
|
77379
|
+
const fmname = fmchild.concatTokens().toUpperCase();
|
|
77380
|
+
let param = "";
|
|
77381
|
+
const fmp = node.findDirectExpression(abaplint.Expressions.ReceiveParameters);
|
|
77382
|
+
if (fmp) {
|
|
77383
|
+
param = traversal.traverse(fmp).getCode();
|
|
77384
|
+
}
|
|
77385
|
+
const ret = new chunk_1.Chunk();
|
|
77386
|
+
ret.appendString(`abap.statements.receive({name:${fmname},${param}});`);
|
|
77387
|
+
return ret;
|
|
77346
77388
|
}
|
|
77347
77389
|
}
|
|
77348
77390
|
exports.ReceiveTranspiler = ReceiveTranspiler;
|
|
@@ -78562,13 +78604,18 @@ class WaitTranspiler {
|
|
|
78562
78604
|
const sec = new expressions_1.SourceTranspiler(true).transpile(seconds, traversal).getCode();
|
|
78563
78605
|
return new chunk_1.Chunk().appendString(`await new Promise(r => setTimeout(r, ${sec} * 1000));`);
|
|
78564
78606
|
}
|
|
78565
|
-
const lookup = traversal.lookupClassOrInterface("KERNEL_PUSH_CHANNELS", node.getFirstToken());
|
|
78566
78607
|
const cond = node.findFirstExpression(abaplint.Expressions.Cond);
|
|
78567
78608
|
if (cond) {
|
|
78568
|
-
options.push("cond: " + traversal.traverse(cond).getCode());
|
|
78609
|
+
options.push("cond: () => {return " + traversal.traverse(cond).getCode() + ";}");
|
|
78610
|
+
}
|
|
78611
|
+
if (concat.startsWith("WAIT FOR ")) {
|
|
78612
|
+
const lookup = traversal.lookupClassOrInterface("KERNEL_PUSH_CHANNELS", node.getFirstToken());
|
|
78613
|
+
const call = `await ${lookup}.wait({${options.join(",")}});`;
|
|
78614
|
+
return new chunk_1.Chunk().append(`if (${lookup} === undefined) throw new Error("Wait, kernel class missing");\n${call}`, node, traversal);
|
|
78615
|
+
}
|
|
78616
|
+
else {
|
|
78617
|
+
return new chunk_1.Chunk().append("await abap.statements.wait({" + options.join(",") + "});", node, traversal);
|
|
78569
78618
|
}
|
|
78570
|
-
const call = `await ${lookup}.wait({${options.join(",")}});`;
|
|
78571
|
-
return new chunk_1.Chunk().append(`if (${lookup} === undefined) throw new Error("Wait, kernel class missing");\n${call}`, node, traversal);
|
|
78572
78619
|
}
|
|
78573
78620
|
}
|
|
78574
78621
|
exports.WaitTranspiler = WaitTranspiler;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@abaplint/transpiler-cli",
|
|
3
|
-
"version": "2.7.
|
|
3
|
+
"version": "2.7.59",
|
|
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.59",
|
|
30
30
|
"@types/glob": "^7.2.0",
|
|
31
31
|
"glob": "=7.2.0",
|
|
32
32
|
"@types/progress": "^2.0.5",
|