@abaplint/transpiler 2.5.1 → 2.5.3
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.
|
@@ -4,15 +4,16 @@ exports.HandleSMIM = void 0;
|
|
|
4
4
|
const chunk_1 = require("../chunk");
|
|
5
5
|
class HandleSMIM {
|
|
6
6
|
runObject(obj, _reg) {
|
|
7
|
-
var _a
|
|
7
|
+
var _a;
|
|
8
8
|
const filename = (_a = obj.getXMLFile()) === null || _a === void 0 ? void 0 : _a.getFilename().replace(".xml", ".mjs").toLowerCase();
|
|
9
9
|
if (filename === undefined) {
|
|
10
10
|
return [];
|
|
11
11
|
}
|
|
12
12
|
obj.parse();
|
|
13
|
+
const dataFile = obj.getDataFile();
|
|
13
14
|
const chunk = new chunk_1.Chunk().appendString(`abap.SMIM["${obj.getName().toUpperCase()}"] = {
|
|
14
15
|
"objectType": "SMIM",
|
|
15
|
-
"filename": ${JSON.stringify(
|
|
16
|
+
"filename": ${JSON.stringify(dataFile === null || dataFile === void 0 ? void 0 : dataFile.getFilename())},
|
|
16
17
|
"url": ${JSON.stringify(obj.getURL())},
|
|
17
18
|
"class": ${JSON.stringify(obj.getClass())},
|
|
18
19
|
};`);
|
|
@@ -26,7 +27,21 @@ class HandleSMIM {
|
|
|
26
27
|
requires: [],
|
|
27
28
|
exports: [],
|
|
28
29
|
};
|
|
29
|
-
|
|
30
|
+
const ret = [output];
|
|
31
|
+
if (dataFile) {
|
|
32
|
+
const data = {
|
|
33
|
+
object: {
|
|
34
|
+
name: obj.getName(),
|
|
35
|
+
type: obj.getType(),
|
|
36
|
+
},
|
|
37
|
+
filename: dataFile === null || dataFile === void 0 ? void 0 : dataFile.getFilename(),
|
|
38
|
+
chunk: new chunk_1.Chunk().appendString(dataFile === null || dataFile === void 0 ? void 0 : dataFile.getRaw()),
|
|
39
|
+
requires: [],
|
|
40
|
+
exports: [],
|
|
41
|
+
};
|
|
42
|
+
ret.push(data);
|
|
43
|
+
}
|
|
44
|
+
return ret;
|
|
30
45
|
}
|
|
31
46
|
}
|
|
32
47
|
exports.HandleSMIM = HandleSMIM;
|
|
@@ -4,15 +4,16 @@ exports.HandleW3MI = void 0;
|
|
|
4
4
|
const chunk_1 = require("../chunk");
|
|
5
5
|
class HandleW3MI {
|
|
6
6
|
runObject(obj, _reg) {
|
|
7
|
-
var _a
|
|
7
|
+
var _a;
|
|
8
8
|
const filename = (_a = obj.getXMLFile()) === null || _a === void 0 ? void 0 : _a.getFilename().replace(".xml", ".mjs").toLowerCase();
|
|
9
9
|
if (filename === undefined) {
|
|
10
10
|
return [];
|
|
11
11
|
}
|
|
12
12
|
obj.parse();
|
|
13
|
+
const dataFile = obj.getDataFile();
|
|
13
14
|
const chunk = new chunk_1.Chunk().appendString(`abap.W3MI["${obj.getName().toUpperCase()}"] = {
|
|
14
15
|
"objectType": "W3MI",
|
|
15
|
-
"filename": ${JSON.stringify(
|
|
16
|
+
"filename": ${JSON.stringify(dataFile === null || dataFile === void 0 ? void 0 : dataFile.getFilename())},
|
|
16
17
|
};`);
|
|
17
18
|
const output = {
|
|
18
19
|
object: {
|
|
@@ -24,7 +25,21 @@ class HandleW3MI {
|
|
|
24
25
|
requires: [],
|
|
25
26
|
exports: [],
|
|
26
27
|
};
|
|
27
|
-
|
|
28
|
+
const ret = [output];
|
|
29
|
+
if (dataFile) {
|
|
30
|
+
const data = {
|
|
31
|
+
object: {
|
|
32
|
+
name: obj.getName(),
|
|
33
|
+
type: obj.getType(),
|
|
34
|
+
},
|
|
35
|
+
filename: dataFile === null || dataFile === void 0 ? void 0 : dataFile.getFilename(),
|
|
36
|
+
chunk: new chunk_1.Chunk().appendString(dataFile === null || dataFile === void 0 ? void 0 : dataFile.getRaw()),
|
|
37
|
+
requires: [],
|
|
38
|
+
exports: [],
|
|
39
|
+
};
|
|
40
|
+
ret.push(data);
|
|
41
|
+
}
|
|
42
|
+
return ret;
|
|
28
43
|
}
|
|
29
44
|
}
|
|
30
45
|
exports.HandleW3MI = HandleW3MI;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@abaplint/transpiler",
|
|
3
|
-
"version": "2.5.
|
|
3
|
+
"version": "2.5.3",
|
|
4
4
|
"description": "Transpiler",
|
|
5
5
|
"main": "build/src/index.js",
|
|
6
6
|
"typings": "build/src/index.d.ts",
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
"author": "abaplint",
|
|
29
29
|
"license": "MIT",
|
|
30
30
|
"dependencies": {
|
|
31
|
-
"@abaplint/core": "^2.95.
|
|
31
|
+
"@abaplint/core": "^2.95.22",
|
|
32
32
|
"source-map": "^0.7.4"
|
|
33
33
|
},
|
|
34
34
|
"devDependencies": {
|