@mcp-abap-adt/connection 1.4.2 → 1.5.0

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,5 @@
1
- import type { ISapConfig, SapAuthType } from '@mcp-abap-adt/interfaces';
2
- export type { SapAuthType };
1
+ import type { ISapConfig, SapAuthType, SapConnectionType } from '@mcp-abap-adt/interfaces';
2
+ export type { SapAuthType, SapConnectionType };
3
3
  export type SapConfig = ISapConfig;
4
4
  export declare function sapConfigSignature(config: ISapConfig): string;
5
5
  //# sourceMappingURL=sapConfig.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"sapConfig.d.ts","sourceRoot":"","sources":["../../src/config/sapConfig.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AAGxE,YAAY,EAAE,WAAW,EAAE,CAAC;AAC5B,MAAM,MAAM,SAAS,GAAG,UAAU,CAAC;AAEnC,wBAAgB,kBAAkB,CAAC,MAAM,EAAE,UAAU,GAAG,MAAM,CAuB7D"}
1
+ {"version":3,"file":"sapConfig.d.ts","sourceRoot":"","sources":["../../src/config/sapConfig.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EACV,UAAU,EACV,WAAW,EACX,iBAAiB,EAClB,MAAM,0BAA0B,CAAC;AAGlC,YAAY,EAAE,WAAW,EAAE,iBAAiB,EAAE,CAAC;AAC/C,MAAM,MAAM,SAAS,GAAG,UAAU,CAAC;AAEnC,wBAAgB,kBAAkB,CAAC,MAAM,EAAE,UAAU,GAAG,MAAM,CAuB7D"}
@@ -255,8 +255,8 @@ class RfcAbapConnection {
255
255
  }
256
256
  }
257
257
  static validateConfig(config) {
258
- if (config.authType !== 'rfc') {
259
- throw new Error(`RFC connection expects authType "rfc", got "${config.authType}"`);
258
+ if (config.connectionType !== 'rfc') {
259
+ throw new Error(`RFC connection expects connectionType "rfc", got "${config.connectionType}"`);
260
260
  }
261
261
  if (!config.url) {
262
262
  throw new Error('RFC connection requires url (hostname is parsed from it)');
@@ -1 +1 @@
1
- {"version":3,"file":"connectionFactory.d.ts","sourceRoot":"","sources":["../../src/connection/connectionFactory.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,0BAA0B,CAAC;AAChE,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AACxD,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AAC5C,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAM1D,wBAAgB,oBAAoB,CAClC,MAAM,EAAE,SAAS,EACjB,MAAM,CAAC,EAAE,OAAO,GAAG,IAAI,EACvB,SAAS,CAAC,EAAE,MAAM,EAClB,cAAc,CAAC,EAAE,eAAe,EAChC,OAAO,CAAC,EAAE;IAAE,eAAe,CAAC,EAAE,OAAO,CAAA;CAAE,GACtC,cAAc,CAehB"}
1
+ {"version":3,"file":"connectionFactory.d.ts","sourceRoot":"","sources":["../../src/connection/connectionFactory.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,0BAA0B,CAAC;AAChE,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AACxD,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AAC5C,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAM1D,wBAAgB,oBAAoB,CAClC,MAAM,EAAE,SAAS,EACjB,MAAM,CAAC,EAAE,OAAO,GAAG,IAAI,EACvB,SAAS,CAAC,EAAE,MAAM,EAClB,cAAc,CAAC,EAAE,eAAe,EAChC,OAAO,CAAC,EAAE;IAAE,eAAe,CAAC,EAAE,OAAO,CAAA;CAAE,GACtC,cAAc,CAkBhB"}
@@ -6,6 +6,10 @@ const JwtAbapConnection_js_1 = require("./JwtAbapConnection.js");
6
6
  const RfcAbapConnection_js_1 = require("./RfcAbapConnection.js");
7
7
  const SamlAbapConnection_js_1 = require("./SamlAbapConnection.js");
8
8
  function createAbapConnection(config, logger, sessionId, tokenRefresher, options) {
9
+ // RFC connection type takes priority over auth type
10
+ if (config.connectionType === 'rfc') {
11
+ return new RfcAbapConnection_js_1.RfcAbapConnection(config, logger);
12
+ }
9
13
  switch (config.authType) {
10
14
  case 'basic':
11
15
  return new BaseAbapConnection_js_1.BaseAbapConnection(config, logger, sessionId, options);
@@ -13,8 +17,6 @@ function createAbapConnection(config, logger, sessionId, tokenRefresher, options
13
17
  return new JwtAbapConnection_js_1.JwtAbapConnection(config, logger, sessionId, tokenRefresher);
14
18
  case 'saml':
15
19
  return new SamlAbapConnection_js_1.SamlAbapConnection(config, logger, sessionId, options);
16
- case 'rfc':
17
- return new RfcAbapConnection_js_1.RfcAbapConnection(config, logger);
18
20
  default:
19
21
  throw new Error(`Unsupported SAP authentication type: ${config.authType}`);
20
22
  }
package/dist/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  export type { IWebSocketCloseInfo, IWebSocketConnectOptions, IWebSocketMessageEnvelope, IWebSocketMessageHandler, IWebSocketTransport, } from '@mcp-abap-adt/interfaces';
2
- export type { SapAuthType, SapConfig, } from './config/sapConfig.js';
2
+ export type { SapAuthType, SapConfig, SapConnectionType, } from './config/sapConfig.js';
3
3
  export { sapConfigSignature } from './config/sapConfig.js';
4
4
  export type { AbapConnection, AbapRequestOptions, } from './connection/AbapConnection.js';
5
5
  export { BaseAbapConnection, BaseAbapConnection as OnPremAbapConnection, } from './connection/BaseAbapConnection.js';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAEA,YAAY,EACV,mBAAmB,EACnB,wBAAwB,EACxB,yBAAyB,EACzB,wBAAwB,EACxB,mBAAmB,GACpB,MAAM,0BAA0B,CAAC;AAClC,YAAY,EACV,WAAW,EACX,SAAS,GACV,MAAM,uBAA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CAAmC,CAAC;AAEzE,OAAO,EAAE,WAAW,EAAE,mBAAmB,EAAE,MAAM,4BAA4B,CAAC;AAC9E,OAAO,EACL,yBAAyB,EACzB,KAAK,iBAAiB,EACtB,KAAK,cAAc,GACpB,MAAM,2CAA2C,CAAC;AACnD,OAAO,EACL,iBAAiB,EACjB,iBAAiB,IAAI,mBAAmB,GACzC,MAAM,mCAAmC,CAAC;AAC3C,OAAO,EAAE,iBAAiB,EAAE,MAAM,mCAAmC,CAAC;AACtE,OAAO,EAAE,kBAAkB,EAAE,MAAM,oCAAoC,CAAC;AACxE,YAAY,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;AAE3C,OAAO,EACL,UAAU,EACV,gBAAgB,EAChB,KAAK,aAAa,GACnB,MAAM,qBAAqB,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mcp-abap-adt/connection",
3
- "version": "1.4.2",
3
+ "version": "1.5.0",
4
4
  "description": "ABAP connection layer for MCP ABAP ADT server",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -46,7 +46,7 @@
46
46
  "node": ">=18.0.0"
47
47
  },
48
48
  "dependencies": {
49
- "@mcp-abap-adt/interfaces": "^2.7.0",
49
+ "@mcp-abap-adt/interfaces": "^3.0.0",
50
50
  "axios": "^1.13.5",
51
51
  "commander": "^14.0.3",
52
52
  "express": "^5.1.0",