@abaplint/transpiler-cli 2.12.25 → 2.12.26
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 +17 -6
- package/package.json +4 -4
package/build/bundle.js
CHANGED
|
@@ -130,6 +130,15 @@ class FileOperations {
|
|
|
130
130
|
console.log(skipped + " files skipped in source");
|
|
131
131
|
return files;
|
|
132
132
|
}
|
|
133
|
+
static async writeFiles(files) {
|
|
134
|
+
const limit = this.setupPLimit();
|
|
135
|
+
const promises = files.map((file) => {
|
|
136
|
+
return limit(async () => {
|
|
137
|
+
await fsPromises.writeFile(file.path, file.contents);
|
|
138
|
+
});
|
|
139
|
+
});
|
|
140
|
+
await Promise.all(promises);
|
|
141
|
+
}
|
|
133
142
|
}
|
|
134
143
|
exports.FileOperations = FileOperations;
|
|
135
144
|
//# sourceMappingURL=file_operations.js.map
|
|
@@ -54339,7 +54348,7 @@ class Registry {
|
|
|
54339
54348
|
}
|
|
54340
54349
|
static abaplintVersion() {
|
|
54341
54350
|
// magic, see build script "version.sh"
|
|
54342
|
-
return "2.115.
|
|
54351
|
+
return "2.115.17";
|
|
54343
54352
|
}
|
|
54344
54353
|
getDDICReferences() {
|
|
54345
54354
|
return this.ddicReferences;
|
|
@@ -54553,7 +54562,7 @@ class Registry {
|
|
|
54553
54562
|
return this;
|
|
54554
54563
|
}
|
|
54555
54564
|
ParsingPerformance.clear();
|
|
54556
|
-
(_a = input === null || input === void 0 ? void 0 : input.progress) === null || _a === void 0 ? void 0 : _a.set(this.getObjectCount().
|
|
54565
|
+
(_a = input === null || input === void 0 ? void 0 : input.progress) === null || _a === void 0 ? void 0 : _a.set(this.getObjectCount().total, "Lexing and parsing");
|
|
54557
54566
|
for (const o of this.getObjects()) {
|
|
54558
54567
|
await ((_b = input === null || input === void 0 ? void 0 : input.progress) === null || _b === void 0 ? void 0 : _b.tick("Lexing and parsing(" + this.conf.getVersion() + ") - " + o.getType() + " " + o.getName()));
|
|
54559
54568
|
this.parsePrivate(o);
|
|
@@ -104992,8 +105001,9 @@ async function loadLib(config) {
|
|
|
104992
105001
|
}
|
|
104993
105002
|
return files;
|
|
104994
105003
|
}
|
|
104995
|
-
function writeObjects(outputFiles, config, outputFolder, files) {
|
|
105004
|
+
async function writeObjects(outputFiles, config, outputFolder, files) {
|
|
104996
105005
|
const writeSourceMaps = config.write_source_map || false;
|
|
105006
|
+
const filesToWrite = [];
|
|
104997
105007
|
for (const output of outputFiles) {
|
|
104998
105008
|
let contents = output.chunk.getCode();
|
|
104999
105009
|
if (writeSourceMaps === true
|
|
@@ -105014,14 +105024,15 @@ function writeObjects(outputFiles, config, outputFolder, files) {
|
|
|
105014
105024
|
map = map.replace(`"${f.filename}"`, withPath);
|
|
105015
105025
|
}
|
|
105016
105026
|
}
|
|
105017
|
-
|
|
105027
|
+
filesToWrite.push({ path: outputFolder + path.sep + name, contents: map });
|
|
105018
105028
|
}
|
|
105019
105029
|
if (output.object.type.toUpperCase() === "PROG") {
|
|
105020
105030
|
// hmm, will this work for INCLUDEs ?
|
|
105021
105031
|
contents = `if (!globalThis.abap) await import("./_init.mjs");\n` + contents;
|
|
105022
105032
|
}
|
|
105023
|
-
|
|
105033
|
+
filesToWrite.push({ path: outputFolder + path.sep + output.filename, contents });
|
|
105024
105034
|
}
|
|
105035
|
+
await file_operations_1.FileOperations.writeFiles(filesToWrite);
|
|
105025
105036
|
}
|
|
105026
105037
|
async function build(config, files) {
|
|
105027
105038
|
const libFiles = await loadLib(config);
|
|
@@ -105048,7 +105059,7 @@ async function run() {
|
|
|
105048
105059
|
if (!fs.existsSync(outputFolder)) {
|
|
105049
105060
|
fs.mkdirSync(outputFolder);
|
|
105050
105061
|
}
|
|
105051
|
-
writeObjects(output.objects, config, outputFolder, files);
|
|
105062
|
+
await writeObjects(output.objects, config, outputFolder, files);
|
|
105052
105063
|
console.log(output.objects.length + " objects written to disk");
|
|
105053
105064
|
if (config.write_unit_tests === true) {
|
|
105054
105065
|
// breaking change? rename this output file,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@abaplint/transpiler-cli",
|
|
3
|
-
"version": "2.12.
|
|
3
|
+
"version": "2.12.26",
|
|
4
4
|
"description": "Transpiler - Command Line Interface",
|
|
5
5
|
"funding": "https://github.com/sponsors/larshp",
|
|
6
6
|
"bin": {
|
|
@@ -27,10 +27,10 @@
|
|
|
27
27
|
"author": "abaplint",
|
|
28
28
|
"license": "MIT",
|
|
29
29
|
"devDependencies": {
|
|
30
|
-
"@abaplint/core": "^2.115.
|
|
31
|
-
"@abaplint/transpiler": "^2.12.
|
|
30
|
+
"@abaplint/core": "^2.115.17",
|
|
31
|
+
"@abaplint/transpiler": "^2.12.26",
|
|
32
32
|
"@types/glob": "^8.1.0",
|
|
33
|
-
"@types/node": "^24.10.
|
|
33
|
+
"@types/node": "^24.10.9",
|
|
34
34
|
"@types/progress": "^2.0.7",
|
|
35
35
|
"glob": "=7.2.0",
|
|
36
36
|
"progress": "^2.0.3",
|