@mcp-abap-adt/connection
Version:
ABAP connection layer for MCP ABAP ADT server
16 lines (15 loc) • 727 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.createAbapConnection = createAbapConnection;
const BaseAbapConnection_js_1 = require("./BaseAbapConnection.js");
const JwtAbapConnection_js_1 = require("./JwtAbapConnection.js");
function createAbapConnection(config, logger, sessionId, tokenRefresher) {
switch (config.authType) {
case 'basic':
return new BaseAbapConnection_js_1.BaseAbapConnection(config, logger, sessionId);
case 'jwt':
return new JwtAbapConnection_js_1.JwtAbapConnection(config, logger, sessionId, tokenRefresher);
default:
throw new Error(`Unsupported SAP authentication type: ${config.authType}`);
}
}