@mcp-abap-adt/connection 0.2.4 → 0.2.5
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.
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { SapConfig } from "../config/sapConfig.js";
|
|
2
2
|
import { AbapConnection } from "./AbapConnection.js";
|
|
3
3
|
import { ILogger } from "../logger.js";
|
|
4
|
-
|
|
4
|
+
import type { ITokenRefresher } from "@mcp-abap-adt/interfaces";
|
|
5
|
+
export declare function createAbapConnection(config: SapConfig, logger?: ILogger | null, sessionId?: string, tokenRefresher?: ITokenRefresher): AbapConnection;
|
|
5
6
|
//# sourceMappingURL=connectionFactory.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"connectionFactory.d.ts","sourceRoot":"","sources":["../../src/connection/connectionFactory.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AACnD,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAGrD,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;
|
|
1
|
+
{"version":3,"file":"connectionFactory.d.ts","sourceRoot":"","sources":["../../src/connection/connectionFactory.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AACnD,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAGrD,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AACvC,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,0BAA0B,CAAC;AAEhE,wBAAgB,oBAAoB,CAClC,MAAM,EAAE,SAAS,EACjB,MAAM,CAAC,EAAE,OAAO,GAAG,IAAI,EACvB,SAAS,CAAC,EAAE,MAAM,EAClB,cAAc,CAAC,EAAE,eAAe,GAC/B,cAAc,CAShB"}
|
|
@@ -3,12 +3,12 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.createAbapConnection = createAbapConnection;
|
|
4
4
|
const JwtAbapConnection_js_1 = require("./JwtAbapConnection.js");
|
|
5
5
|
const BaseAbapConnection_js_1 = require("./BaseAbapConnection.js");
|
|
6
|
-
function createAbapConnection(config, logger, sessionId) {
|
|
6
|
+
function createAbapConnection(config, logger, sessionId, tokenRefresher) {
|
|
7
7
|
switch (config.authType) {
|
|
8
8
|
case "basic":
|
|
9
9
|
return new BaseAbapConnection_js_1.BaseAbapConnection(config, logger, sessionId);
|
|
10
10
|
case "jwt":
|
|
11
|
-
return new JwtAbapConnection_js_1.JwtAbapConnection(config, logger, sessionId);
|
|
11
|
+
return new JwtAbapConnection_js_1.JwtAbapConnection(config, logger, sessionId, tokenRefresher);
|
|
12
12
|
default:
|
|
13
13
|
throw new Error(`Unsupported SAP authentication type: ${config.authType}`);
|
|
14
14
|
}
|