@abaplint/runtime 2.7.14 → 2.7.15
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/index.d.ts +10 -1
- package/build/src/index.js +9 -2
- package/package.json +1 -1
package/build/src/index.d.ts
CHANGED
|
@@ -15,6 +15,14 @@ import { ClassicError } from "./classic_error";
|
|
|
15
15
|
import { Console } from "./console/console";
|
|
16
16
|
import { MemoryConsole } from "./console/memory_console";
|
|
17
17
|
export { UnitTestResult, RFC, types, DB, MemoryConsole };
|
|
18
|
+
export type RuntimeDatabaseOptions = {
|
|
19
|
+
schemaPrefix?: string;
|
|
20
|
+
tablePrefix?: string;
|
|
21
|
+
};
|
|
22
|
+
export type RuntimeOptions = {
|
|
23
|
+
console?: Console;
|
|
24
|
+
database?: RuntimeDatabaseOptions;
|
|
25
|
+
};
|
|
18
26
|
export declare class ABAP {
|
|
19
27
|
FunctionModules: {
|
|
20
28
|
[name: string]: any;
|
|
@@ -49,5 +57,6 @@ export declare class ABAP {
|
|
|
49
57
|
expandDynamic: typeof expandDynamic;
|
|
50
58
|
ClassicError: typeof ClassicError;
|
|
51
59
|
readonly context: Context;
|
|
52
|
-
|
|
60
|
+
readonly dbo: RuntimeDatabaseOptions;
|
|
61
|
+
constructor(input?: RuntimeOptions);
|
|
53
62
|
}
|
package/build/src/index.js
CHANGED
|
@@ -23,7 +23,7 @@ const standard_out_console_1 = require("./console/standard_out_console");
|
|
|
23
23
|
const memory_console_1 = require("./console/memory_console");
|
|
24
24
|
Object.defineProperty(exports, "MemoryConsole", { enumerable: true, get: function () { return memory_console_1.MemoryConsole; } });
|
|
25
25
|
class ABAP {
|
|
26
|
-
constructor(
|
|
26
|
+
constructor(input) {
|
|
27
27
|
// global objects
|
|
28
28
|
this.FunctionModules = {};
|
|
29
29
|
this.Classes = {};
|
|
@@ -42,8 +42,15 @@ class ABAP {
|
|
|
42
42
|
this.expandDynamic = expand_dynamic_1.expandDynamic;
|
|
43
43
|
this.ClassicError = classic_error_1.ClassicError;
|
|
44
44
|
this.context = new context_1.Context();
|
|
45
|
-
this.console = console ? console : new standard_out_console_1.StandardOutConsole();
|
|
45
|
+
this.console = (input === null || input === void 0 ? void 0 : input.console) ? input === null || input === void 0 ? void 0 : input.console : new standard_out_console_1.StandardOutConsole();
|
|
46
46
|
this.context.console = this.console;
|
|
47
|
+
this.dbo = (input === null || input === void 0 ? void 0 : input.database) || { schemaPrefix: "", tablePrefix: "" };
|
|
48
|
+
if (this.dbo.schemaPrefix === undefined) {
|
|
49
|
+
this.dbo.schemaPrefix = "";
|
|
50
|
+
}
|
|
51
|
+
if (this.dbo.tablePrefix === undefined) {
|
|
52
|
+
this.dbo.tablePrefix = "";
|
|
53
|
+
}
|
|
47
54
|
this.statements = new statements_1.Statements(this.context);
|
|
48
55
|
// todo, this should not be a singleton, it should be part of this instance
|
|
49
56
|
// todo, move to context
|