@abaplint/transpiler 2.3.120 → 2.3.121
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/src/db/index.d.ts +2 -1
- package/build/src/db/index.js +6 -4
- package/build/src/index.js +1 -1
- package/build/src/types.d.ts +2 -0
- package/package.json +1 -1
package/build/src/db/index.d.ts
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import * as abaplint from "@abaplint/core";
|
|
2
|
+
import { ITranspilerOptions } from "../types";
|
|
2
3
|
import { DatabaseSetupResult } from "./database_setup_result";
|
|
3
4
|
export declare class DatabaseSetup {
|
|
4
5
|
private readonly reg;
|
|
5
6
|
constructor(reg: abaplint.IRegistry);
|
|
6
|
-
run(): DatabaseSetupResult;
|
|
7
|
+
run(options?: ITranspilerOptions | undefined): DatabaseSetupResult;
|
|
7
8
|
private buildInsert;
|
|
8
9
|
private insertREPOSRC;
|
|
9
10
|
private insertT000;
|
package/build/src/db/index.js
CHANGED
|
@@ -8,18 +8,18 @@ class DatabaseSetup {
|
|
|
8
8
|
constructor(reg) {
|
|
9
9
|
this.reg = reg;
|
|
10
10
|
}
|
|
11
|
-
run() {
|
|
11
|
+
run(options) {
|
|
12
12
|
return {
|
|
13
13
|
schemas: {
|
|
14
14
|
sqlite: new sqlite_database_schema_1.SQLiteDatabaseSchema(this.reg).run(),
|
|
15
15
|
hdb: ["todo"],
|
|
16
16
|
pg: ["todo"],
|
|
17
17
|
},
|
|
18
|
-
insert: this.buildInsert(),
|
|
18
|
+
insert: this.buildInsert(options),
|
|
19
19
|
};
|
|
20
20
|
}
|
|
21
21
|
////////////////////
|
|
22
|
-
buildInsert() {
|
|
22
|
+
buildInsert(options) {
|
|
23
23
|
// note: avoid hitting maximum statement size by splitting into multiple statements
|
|
24
24
|
const insert = [];
|
|
25
25
|
// INSERT data
|
|
@@ -29,7 +29,9 @@ class DatabaseSetup {
|
|
|
29
29
|
}
|
|
30
30
|
else if (obj instanceof abaplint.Objects.Class
|
|
31
31
|
|| obj instanceof abaplint.Objects.Interface) {
|
|
32
|
-
|
|
32
|
+
if ((options === null || options === void 0 ? void 0 : options.skipReposrc) !== true) {
|
|
33
|
+
insert.push(this.insertREPOSRC(obj));
|
|
34
|
+
}
|
|
33
35
|
}
|
|
34
36
|
}
|
|
35
37
|
insert.push(this.insertT000());
|
package/build/src/index.js
CHANGED
|
@@ -34,7 +34,7 @@ class Transpiler {
|
|
|
34
34
|
reg.parse();
|
|
35
35
|
new keywords_1.Keywords((_a = this.options) === null || _a === void 0 ? void 0 : _a.keywords).handle(reg);
|
|
36
36
|
this.validate(reg);
|
|
37
|
-
const dbSetup = new db_1.DatabaseSetup(reg).run();
|
|
37
|
+
const dbSetup = new db_1.DatabaseSetup(reg).run(this.options);
|
|
38
38
|
const output = {
|
|
39
39
|
objects: [],
|
|
40
40
|
unitTestScript: new unit_test_1.UnitTest().unitTestScript(reg, (_b = this.options) === null || _b === void 0 ? void 0 : _b.skip, (_c = this.options) === null || _c === void 0 ? void 0 : _c.only),
|
package/build/src/types.d.ts
CHANGED