@abaplint/transpiler-cli 2.10.51 → 2.10.53
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 +22 -21
- package/build/types.d.ts +1 -0
- package/package.json +2 -2
package/build/bundle.js
CHANGED
|
@@ -80864,16 +80864,16 @@ class Initialization {
|
|
|
80864
80864
|
let ret = "";
|
|
80865
80865
|
if (useImport === true) {
|
|
80866
80866
|
ret = `/* eslint-disable import/newline-after-import */
|
|
80867
|
-
|
|
80867
|
+
import "./_top.mjs";\n`;
|
|
80868
80868
|
}
|
|
80869
80869
|
else {
|
|
80870
80870
|
ret = `/* eslint-disable import/newline-after-import */
|
|
80871
|
-
|
|
80872
|
-
|
|
80871
|
+
import runtime from "@abaplint/runtime";
|
|
80872
|
+
globalThis.abap = new runtime.ABAP();\n`;
|
|
80873
80873
|
}
|
|
80874
80874
|
ret += `${this.buildImports(reg, useImport)}
|
|
80875
80875
|
|
|
80876
|
-
|
|
80876
|
+
export async function initializeABAP() {\n`;
|
|
80877
80877
|
ret += ` const sqlite = [];\n`;
|
|
80878
80878
|
for (const i of dbSetup.schemas.sqlite) {
|
|
80879
80879
|
ret += ` sqlite.push(\`${i}\`);\n`;
|
|
@@ -80931,21 +80931,21 @@ class Initialization {
|
|
|
80931
80931
|
}
|
|
80932
80932
|
}
|
|
80933
80933
|
for (const obj of reg.getObjects()) {
|
|
80934
|
-
|
|
80935
|
-
|
|
80936
|
-
|
|
80937
|
-
|
|
80938
|
-
|
|
80939
|
-
|
|
80940
|
-
|
|
80941
|
-
|
|
80942
|
-
|
|
80943
|
-
else {
|
|
80944
|
-
list.push(imp(`${escapeNamespaceFilename(obj.getName().toLowerCase())}.${obj.getType().toLowerCase()}`));
|
|
80945
|
-
}
|
|
80934
|
+
const name = imp(`${escapeNamespaceFilename(obj.getName().toLowerCase())}.${obj.getType().toLowerCase()}`);
|
|
80935
|
+
if (obj instanceof abaplint.Objects.Class
|
|
80936
|
+
&& obj.getName().toUpperCase() !== "CL_ABAP_CHAR_UTILITIES"
|
|
80937
|
+
&& this.hasClassConstructor(reg, obj)) {
|
|
80938
|
+
// this will not solve all problems with class constructors 100%, but probably good enough
|
|
80939
|
+
late.push(name);
|
|
80940
|
+
}
|
|
80941
|
+
else if (obj instanceof abaplint.Objects.Program && obj.isInclude() === true) {
|
|
80942
|
+
continue;
|
|
80946
80943
|
}
|
|
80947
|
-
else if (obj instanceof abaplint.Objects.Interface
|
|
80948
|
-
|
|
80944
|
+
else if (obj instanceof abaplint.Objects.Interface
|
|
80945
|
+
|| obj instanceof abaplint.Objects.FunctionGroup
|
|
80946
|
+
|| obj instanceof abaplint.Objects.Program
|
|
80947
|
+
|| obj instanceof abaplint.Objects.Class) {
|
|
80948
|
+
list.push(name);
|
|
80949
80949
|
}
|
|
80950
80950
|
}
|
|
80951
80951
|
return [...list.sort(), ...late].join("\n");
|
|
@@ -100512,7 +100512,8 @@ function loadLib(config) {
|
|
|
100512
100512
|
}
|
|
100513
100513
|
return files;
|
|
100514
100514
|
}
|
|
100515
|
-
function writeObjects(objects,
|
|
100515
|
+
function writeObjects(objects, config, outputFolder, files) {
|
|
100516
|
+
const writeSourceMaps = config.write_source_map || false;
|
|
100516
100517
|
for (const o of objects) {
|
|
100517
100518
|
let contents = o.chunk.getCode();
|
|
100518
100519
|
if (writeSourceMaps === true
|
|
@@ -100538,7 +100539,7 @@ function writeObjects(objects, writeSourceMaps, outputFolder, files) {
|
|
|
100538
100539
|
}
|
|
100539
100540
|
fs.writeFileSync(outputFolder + path.sep + name, map);
|
|
100540
100541
|
}
|
|
100541
|
-
if (o.object.type.toUpperCase() === "PROG") {
|
|
100542
|
+
if (o.object.type.toUpperCase() === "PROG" && config.no_top_level_prog !== true) {
|
|
100542
100543
|
// hmm, will this work for INCLUDEs ?
|
|
100543
100544
|
contents = `await import("./_init.mjs");\n` + contents;
|
|
100544
100545
|
}
|
|
@@ -100566,7 +100567,7 @@ async function run() {
|
|
|
100566
100567
|
if (!fs.existsSync(outputFolder)) {
|
|
100567
100568
|
fs.mkdirSync(outputFolder);
|
|
100568
100569
|
}
|
|
100569
|
-
writeObjects(output.objects, config
|
|
100570
|
+
writeObjects(output.objects, config, outputFolder, files);
|
|
100570
100571
|
console.log(output.objects.length + " objects written to disk");
|
|
100571
100572
|
if (config.write_unit_tests === true) {
|
|
100572
100573
|
// breaking change? rename this output file,
|
package/build/types.d.ts
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@abaplint/transpiler-cli",
|
|
3
|
-
"version": "2.10.
|
|
3
|
+
"version": "2.10.53",
|
|
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.114",
|
|
31
|
-
"@abaplint/transpiler": "^2.10.
|
|
31
|
+
"@abaplint/transpiler": "^2.10.53",
|
|
32
32
|
"@types/glob": "^8.1.0",
|
|
33
33
|
"@types/node": "^22.15.18",
|
|
34
34
|
"@types/progress": "^2.0.7",
|