@abaplint/transpiler 2.2.8 → 2.2.10
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.
|
@@ -57,7 +57,7 @@ class SQLiteDatabaseSchema {
|
|
|
57
57
|
}
|
|
58
58
|
// assumption: all transparent tables have primary keys
|
|
59
59
|
// add single quotes to field names to allow for keywords as field names
|
|
60
|
-
const key = ", PRIMARY KEY(" + tabl.listKeys().map(e => "'" + e.toLowerCase() + "'").join(",") + ")";
|
|
60
|
+
const key = ", PRIMARY KEY(" + tabl.listKeys(this.reg).map(e => "'" + e.toLowerCase() + "'").join(",") + ")";
|
|
61
61
|
return `CREATE TABLE '${tabl.getName().toLowerCase()}' (${fields.join(", ")}${key});\n`;
|
|
62
62
|
}
|
|
63
63
|
toType(type, fieldname, errorInfo) {
|
|
@@ -15,7 +15,7 @@ class HandleTable {
|
|
|
15
15
|
const chunk = new chunk_1.Chunk().appendString(`abap.DDIC["${obj.getName().toUpperCase()}"] = {
|
|
16
16
|
"objectType": "TABL",
|
|
17
17
|
"type": ${new transpile_types_1.TranspileTypes().toType(type)},
|
|
18
|
-
"keyFields": ${JSON.stringify(obj.listKeys())},
|
|
18
|
+
"keyFields": ${JSON.stringify(obj.listKeys(reg))},
|
|
19
19
|
};`);
|
|
20
20
|
const output = {
|
|
21
21
|
object: {
|
|
@@ -65,7 +65,7 @@ class MethodImplementationTranspiler {
|
|
|
65
65
|
else {
|
|
66
66
|
// note: this can be difficult, the "def" might be from an interface, ie. a different scope than the method
|
|
67
67
|
val = new expressions_1.FieldChainTranspiler().transpile(parameterDefault, traversal, true, methodDef === null || methodDef === void 0 ? void 0 : methodDef.getFilename()).getCode();
|
|
68
|
-
if (val.startsWith(parameterDefault.getFirstToken().getStr()) === true) {
|
|
68
|
+
if (val.startsWith(parameterDefault.getFirstToken().getStr().toLowerCase()) === true) {
|
|
69
69
|
val = "this." + val;
|
|
70
70
|
}
|
|
71
71
|
}
|
|
@@ -96,7 +96,7 @@ class SelectTranspiler {
|
|
|
96
96
|
if (from.length === 1) {
|
|
97
97
|
const tabl = traversal.findTable(from[0]);
|
|
98
98
|
if (tabl) {
|
|
99
|
-
keys = tabl.listKeys().map(k => k.toLowerCase());
|
|
99
|
+
keys = tabl.listKeys(traversal.reg).map(k => k.toLowerCase());
|
|
100
100
|
}
|
|
101
101
|
}
|
|
102
102
|
return keys;
|
package/build/src/traversal.d.ts
CHANGED
|
@@ -5,7 +5,7 @@ export declare class Traversal {
|
|
|
5
5
|
private readonly spaghetti;
|
|
6
6
|
private readonly file;
|
|
7
7
|
private readonly obj;
|
|
8
|
-
|
|
8
|
+
readonly reg: abaplint.IRegistry;
|
|
9
9
|
readonly runtimeTypeError: boolean;
|
|
10
10
|
constructor(spaghetti: abaplint.ISpaghettiScope, file: abaplint.ABAPFile, obj: abaplint.ABAPObject, reg: abaplint.IRegistry, runtimeTypeError?: boolean);
|
|
11
11
|
static escapeClassName(name: string | undefined): string | undefined;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@abaplint/transpiler",
|
|
3
|
-
"version": "2.2.
|
|
3
|
+
"version": "2.2.10",
|
|
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.93.
|
|
31
|
+
"@abaplint/core": "^2.93.36",
|
|
32
32
|
"source-map": "^0.7.4"
|
|
33
33
|
},
|
|
34
34
|
"devDependencies": {
|