@abaplint/transpiler-cli 2.10.62 → 2.10.63
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 +52 -12
- package/package.json +2 -2
package/build/bundle.js
CHANGED
|
@@ -84711,7 +84711,6 @@ __exportStar(__webpack_require__(/*! ./close_dataset */ "./node_modules/@abaplin
|
|
|
84711
84711
|
__exportStar(__webpack_require__(/*! ./collect */ "./node_modules/@abaplint/transpiler/build/src/statements/collect.js"), exports);
|
|
84712
84712
|
__exportStar(__webpack_require__(/*! ./commit */ "./node_modules/@abaplint/transpiler/build/src/statements/commit.js"), exports);
|
|
84713
84713
|
__exportStar(__webpack_require__(/*! ./compute */ "./node_modules/@abaplint/transpiler/build/src/statements/compute.js"), exports);
|
|
84714
|
-
__exportStar(__webpack_require__(/*! ./program */ "./node_modules/@abaplint/transpiler/build/src/statements/program.js"), exports);
|
|
84715
84714
|
__exportStar(__webpack_require__(/*! ./concatenate */ "./node_modules/@abaplint/transpiler/build/src/statements/concatenate.js"), exports);
|
|
84716
84715
|
__exportStar(__webpack_require__(/*! ./condense */ "./node_modules/@abaplint/transpiler/build/src/statements/condense.js"), exports);
|
|
84717
84716
|
__exportStar(__webpack_require__(/*! ./constant */ "./node_modules/@abaplint/transpiler/build/src/statements/constant.js"), exports);
|
|
@@ -84723,8 +84722,8 @@ __exportStar(__webpack_require__(/*! ./data */ "./node_modules/@abaplint/transpi
|
|
|
84723
84722
|
__exportStar(__webpack_require__(/*! ./delete_database */ "./node_modules/@abaplint/transpiler/build/src/statements/delete_database.js"), exports);
|
|
84724
84723
|
__exportStar(__webpack_require__(/*! ./delete_dataset */ "./node_modules/@abaplint/transpiler/build/src/statements/delete_dataset.js"), exports);
|
|
84725
84724
|
__exportStar(__webpack_require__(/*! ./delete_internal */ "./node_modules/@abaplint/transpiler/build/src/statements/delete_internal.js"), exports);
|
|
84726
|
-
__exportStar(__webpack_require__(/*! ./delete_report */ "./node_modules/@abaplint/transpiler/build/src/statements/delete_report.js"), exports);
|
|
84727
84725
|
__exportStar(__webpack_require__(/*! ./delete_memory */ "./node_modules/@abaplint/transpiler/build/src/statements/delete_memory.js"), exports);
|
|
84726
|
+
__exportStar(__webpack_require__(/*! ./delete_report */ "./node_modules/@abaplint/transpiler/build/src/statements/delete_report.js"), exports);
|
|
84728
84727
|
__exportStar(__webpack_require__(/*! ./delete_textpool */ "./node_modules/@abaplint/transpiler/build/src/statements/delete_textpool.js"), exports);
|
|
84729
84728
|
__exportStar(__webpack_require__(/*! ./describe */ "./node_modules/@abaplint/transpiler/build/src/statements/describe.js"), exports);
|
|
84730
84729
|
__exportStar(__webpack_require__(/*! ./do */ "./node_modules/@abaplint/transpiler/build/src/statements/do.js"), exports);
|
|
@@ -84785,8 +84784,10 @@ __exportStar(__webpack_require__(/*! ./open_dataset */ "./node_modules/@abaplint
|
|
|
84785
84784
|
__exportStar(__webpack_require__(/*! ./overlay */ "./node_modules/@abaplint/transpiler/build/src/statements/overlay.js"), exports);
|
|
84786
84785
|
__exportStar(__webpack_require__(/*! ./parameter */ "./node_modules/@abaplint/transpiler/build/src/statements/parameter.js"), exports);
|
|
84787
84786
|
__exportStar(__webpack_require__(/*! ./perform */ "./node_modules/@abaplint/transpiler/build/src/statements/perform.js"), exports);
|
|
84787
|
+
__exportStar(__webpack_require__(/*! ./program */ "./node_modules/@abaplint/transpiler/build/src/statements/program.js"), exports);
|
|
84788
84788
|
__exportStar(__webpack_require__(/*! ./raise_event */ "./node_modules/@abaplint/transpiler/build/src/statements/raise_event.js"), exports);
|
|
84789
84789
|
__exportStar(__webpack_require__(/*! ./raise */ "./node_modules/@abaplint/transpiler/build/src/statements/raise.js"), exports);
|
|
84790
|
+
__exportStar(__webpack_require__(/*! ./ranges */ "./node_modules/@abaplint/transpiler/build/src/statements/ranges.js"), exports);
|
|
84790
84791
|
__exportStar(__webpack_require__(/*! ./read_dataset */ "./node_modules/@abaplint/transpiler/build/src/statements/read_dataset.js"), exports);
|
|
84791
84792
|
__exportStar(__webpack_require__(/*! ./read_line */ "./node_modules/@abaplint/transpiler/build/src/statements/read_line.js"), exports);
|
|
84792
84793
|
__exportStar(__webpack_require__(/*! ./read_report */ "./node_modules/@abaplint/transpiler/build/src/statements/read_report.js"), exports);
|
|
@@ -86047,6 +86048,47 @@ exports.RaiseEventTranspiler = RaiseEventTranspiler;
|
|
|
86047
86048
|
|
|
86048
86049
|
/***/ }),
|
|
86049
86050
|
|
|
86051
|
+
/***/ "./node_modules/@abaplint/transpiler/build/src/statements/ranges.js":
|
|
86052
|
+
/*!**************************************************************************!*\
|
|
86053
|
+
!*** ./node_modules/@abaplint/transpiler/build/src/statements/ranges.js ***!
|
|
86054
|
+
\**************************************************************************/
|
|
86055
|
+
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
|
|
86056
|
+
|
|
86057
|
+
"use strict";
|
|
86058
|
+
|
|
86059
|
+
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
86060
|
+
exports.RangesTranspiler = void 0;
|
|
86061
|
+
const abaplint = __webpack_require__(/*! @abaplint/core */ "./node_modules/@abaplint/core/build/src/index.js");
|
|
86062
|
+
const traversal_1 = __webpack_require__(/*! ../traversal */ "./node_modules/@abaplint/transpiler/build/src/traversal.js");
|
|
86063
|
+
const chunk_1 = __webpack_require__(/*! ../chunk */ "./node_modules/@abaplint/transpiler/build/src/chunk.js");
|
|
86064
|
+
const transpile_types_1 = __webpack_require__(/*! ../transpile_types */ "./node_modules/@abaplint/transpiler/build/src/transpile_types.js");
|
|
86065
|
+
class RangesTranspiler {
|
|
86066
|
+
transpile(node, traversal) {
|
|
86067
|
+
const token = node.findFirstExpression(abaplint.Expressions.SimpleName)?.getFirstToken();
|
|
86068
|
+
if (token === undefined) {
|
|
86069
|
+
throw new Error("RangesTranspiler, token not found");
|
|
86070
|
+
}
|
|
86071
|
+
const scope = traversal.findCurrentScopeByToken(token);
|
|
86072
|
+
if (scope === undefined) {
|
|
86073
|
+
throw new Error("RangesTranspiler, scope not found: " + node.concatTokens());
|
|
86074
|
+
}
|
|
86075
|
+
const found = scope.findVariable(token.getStr());
|
|
86076
|
+
if (found === undefined) {
|
|
86077
|
+
throw new Error("RangesTranspiler, var not found, \"" + token.getStr() + "\", " + traversal.getFilename() + ", line: " + token.getRow());
|
|
86078
|
+
}
|
|
86079
|
+
const ret = new chunk_1.Chunk()
|
|
86080
|
+
.appendString("let ")
|
|
86081
|
+
.appendString(traversal_1.Traversal.prefixVariable(traversal_1.Traversal.escapeNamespace(found.getName().toLowerCase())))
|
|
86082
|
+
.appendString(" = " + new transpile_types_1.TranspileTypes().toType(found.getType()))
|
|
86083
|
+
.appendString(";");
|
|
86084
|
+
return ret;
|
|
86085
|
+
}
|
|
86086
|
+
}
|
|
86087
|
+
exports.RangesTranspiler = RangesTranspiler;
|
|
86088
|
+
//# sourceMappingURL=ranges.js.map
|
|
86089
|
+
|
|
86090
|
+
/***/ }),
|
|
86091
|
+
|
|
86050
86092
|
/***/ "./node_modules/@abaplint/transpiler/build/src/statements/read_dataset.js":
|
|
86051
86093
|
/*!********************************************************************************!*\
|
|
86052
86094
|
!*** ./node_modules/@abaplint/transpiler/build/src/statements/read_dataset.js ***!
|
|
@@ -101346,8 +101388,8 @@ class Progress {
|
|
|
101346
101388
|
this.bar.render();
|
|
101347
101389
|
}
|
|
101348
101390
|
}
|
|
101349
|
-
function loadLib(config) {
|
|
101350
|
-
|
|
101391
|
+
async function loadLib(config) {
|
|
101392
|
+
let files = [];
|
|
101351
101393
|
if (config.lib && config.lib !== "" && config.libs === undefined) {
|
|
101352
101394
|
config.libs = [{ url: config.lib }];
|
|
101353
101395
|
}
|
|
@@ -101364,7 +101406,6 @@ function loadLib(config) {
|
|
|
101364
101406
|
childProcess.execSync("git clone --quiet --depth 1 " + l.url + " .", { cwd: dir, stdio: "inherit" });
|
|
101365
101407
|
cleanupFolder = true;
|
|
101366
101408
|
}
|
|
101367
|
-
let count = 0;
|
|
101368
101409
|
let patterns = ["/src/**"];
|
|
101369
101410
|
if (l.files !== undefined && typeof l.files === "string" && l.files !== "") {
|
|
101370
101411
|
patterns = [l.files];
|
|
@@ -101372,18 +101413,17 @@ function loadLib(config) {
|
|
|
101372
101413
|
else if (Array.isArray(l.files)) {
|
|
101373
101414
|
patterns = l.files;
|
|
101374
101415
|
}
|
|
101416
|
+
const filesToRead = [];
|
|
101375
101417
|
for (const pattern of patterns) {
|
|
101376
|
-
for (
|
|
101418
|
+
for (const filename of glob.sync(dir + pattern, { nosort: true, nodir: true })) {
|
|
101377
101419
|
if (filename.endsWith(".clas.testclasses.abap")) {
|
|
101378
101420
|
continue;
|
|
101379
101421
|
}
|
|
101380
|
-
|
|
101381
|
-
filename = path.basename(filename);
|
|
101382
|
-
files.push({ filename, contents });
|
|
101383
|
-
count++;
|
|
101422
|
+
filesToRead.push(filename);
|
|
101384
101423
|
}
|
|
101385
101424
|
}
|
|
101386
|
-
|
|
101425
|
+
files = await file_operations_1.FileOperations.readAllFiles(filesToRead, "");
|
|
101426
|
+
console.log("\t" + filesToRead.length + " files added from lib");
|
|
101387
101427
|
if (cleanupFolder === true) {
|
|
101388
101428
|
file_operations_1.FileOperations.deleteFolderRecursive(dir);
|
|
101389
101429
|
}
|
|
@@ -101427,7 +101467,7 @@ function writeObjects(objects, config, outputFolder, files) {
|
|
|
101427
101467
|
async function run() {
|
|
101428
101468
|
console.log("Transpiler CLI");
|
|
101429
101469
|
const config = config_1.TranspilerConfig.find(process.argv[2]);
|
|
101430
|
-
const libFiles = loadLib(config);
|
|
101470
|
+
const libFiles = await loadLib(config);
|
|
101431
101471
|
const files = await file_operations_1.FileOperations.loadFiles(config);
|
|
101432
101472
|
console.log("\nBuilding");
|
|
101433
101473
|
const t = new Transpiler.Transpiler(config.options);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@abaplint/transpiler-cli",
|
|
3
|
-
"version": "2.10.
|
|
3
|
+
"version": "2.10.63",
|
|
4
4
|
"description": "Transpiler - Command Line Interface",
|
|
5
5
|
"funding": "https://github.com/sponsors/larshp",
|
|
6
6
|
"bin": {
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
"license": "MIT",
|
|
29
29
|
"devDependencies": {
|
|
30
30
|
"@abaplint/core": "^2.113.136",
|
|
31
|
-
"@abaplint/transpiler": "^2.10.
|
|
31
|
+
"@abaplint/transpiler": "^2.10.63",
|
|
32
32
|
"@types/glob": "^8.1.0",
|
|
33
33
|
"@types/node": "^22.16.0",
|
|
34
34
|
"@types/progress": "^2.0.7",
|