@mcp-abap-adt/connection 0.2.8 → 1.0.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.
package/README.md CHANGED
@@ -178,6 +178,24 @@ const response = await connection.makeAdtRequest({
178
178
  });
179
179
  ```
180
180
 
181
+ ### SSO Usage (SAML Session Cookies)
182
+
183
+ ```typescript
184
+ import { createAbapConnection, SapConfig } from "@mcp-abap-adt/connection";
185
+
186
+ const config: SapConfig = {
187
+ url: "https://your-sap-system.com",
188
+ authType: "saml",
189
+ sessionCookies: "MYSAPSSO2=...; SAP_SESSIONID=...",
190
+ };
191
+
192
+ const connection = createAbapConnection(config, logger);
193
+ const response = await connection.makeAdtRequest({
194
+ method: "GET",
195
+ url: "/sap/bc/adt/programs/programs/your-program",
196
+ });
197
+ ```
198
+
181
199
  ### Cloud Usage with Automatic Token Refresh
182
200
 
183
201
  For automatic token refresh on 401/403 errors, inject `ITokenRefresher`:
@@ -338,12 +356,14 @@ Configuration for SAP ABAP connection.
338
356
  type SapConfig = {
339
357
  url: string;
340
358
  client?: string;
341
- authType: "basic" | "jwt";
359
+ authType: "basic" | "jwt" | "saml";
342
360
  // For basic auth
343
361
  username?: string;
344
362
  password?: string;
345
363
  // For JWT auth
346
364
  jwtToken?: string;
365
+ // For SAML session cookies
366
+ sessionCookies?: string;
347
367
  };
348
368
  ```
349
369
 
@@ -486,4 +506,3 @@ https://github.com/fr0ster/mcp-abap-adt
486
506
  ## Related Projects
487
507
 
488
508
  - [mcp-abap-adt](https://github.com/fr0ster/mcp-abap-adt) - Main MCP server for ABAP ADT
489
-
@@ -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,CAmB7D"}
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"}
@@ -10,6 +10,9 @@ function sapConfigSignature(config) {
10
10
  const refreshTokenPreview = config.refreshToken
11
11
  ? `${config.refreshToken.substring(0, 10)}...${config.refreshToken.substring(Math.max(0, config.refreshToken.length - 10))}`
12
12
  : null;
13
+ const sessionCookiesPreview = config.sessionCookies
14
+ ? `${config.sessionCookies.substring(0, 10)}...${config.sessionCookies.substring(Math.max(0, config.sessionCookies.length - 10))}`
15
+ : null;
13
16
  return JSON.stringify({
14
17
  url: config.url,
15
18
  client: config.client ?? null,
@@ -18,5 +21,6 @@ function sapConfigSignature(config) {
18
21
  password: config.password ? 'set' : null,
19
22
  jwtToken: jwtTokenPreview,
20
23
  refreshToken: refreshTokenPreview,
24
+ sessionCookies: sessionCookiesPreview,
21
25
  });
22
26
  }
@@ -1,4 +1,4 @@
1
- import { type AxiosResponse } from 'axios';
1
+ import { type IAdtResponse } from '@mcp-abap-adt/interfaces';
2
2
  import type { SapConfig } from '../config/sapConfig.js';
3
3
  import type { ILogger } from '../logger.js';
4
4
  import type { AbapConnection, AbapRequestOptions } from './AbapConnection.js';
@@ -58,7 +58,7 @@ declare abstract class AbstractAbapConnection implements AbapConnection {
58
58
  * - JwtAbapConnection: JWT auth with token refresh on 401/403
59
59
  */
60
60
  abstract connect(): Promise<void>;
61
- makeAdtRequest(options: AbapRequestOptions): Promise<AxiosResponse>;
61
+ makeAdtRequest<T = any, D = any>(options: AbapRequestOptions): Promise<IAdtResponse<T, D>>;
62
62
  protected abstract buildAuthorizationHeader(): string;
63
63
  /**
64
64
  * Fetch CSRF token from SAP system
@@ -77,6 +77,7 @@ declare abstract class AbstractAbapConnection implements AbapConnection {
77
77
  * Get cookies (protected for use by subclasses)
78
78
  */
79
79
  protected getCookies(): string | null;
80
+ protected setInitialCookies(cookies: string): void;
80
81
  private updateCookiesFromResponse;
81
82
  private getAxiosInstance;
82
83
  private ensureFreshCsrfToken;
@@ -1 +1 @@
1
- {"version":3,"file":"AbstractAbapConnection.d.ts","sourceRoot":"","sources":["../../src/connection/AbstractAbapConnection.ts"],"names":[],"mappings":"AAGA,OAAc,EAIZ,KAAK,aAAa,EACnB,MAAM,OAAO,CAAC;AACf,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AACxD,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AAE5C,OAAO,KAAK,EAAE,cAAc,EAAE,kBAAkB,EAAE,MAAM,qBAAqB,CAAC;AAG9E,uBAAe,sBAAuB,YAAW,cAAc;IAU3D,OAAO,CAAC,QAAQ,CAAC,MAAM;IACvB,SAAS,CAAC,QAAQ,CAAC,MAAM,EAAE,OAAO,GAAG,IAAI;IAV3C,OAAO,CAAC,aAAa,CAA8B;IACnD,OAAO,CAAC,SAAS,CAAuB;IACxC,OAAO,CAAC,OAAO,CAAuB;IACtC,OAAO,CAAC,WAAW,CAAkC;IACrD,OAAO,CAAC,OAAO,CAAS;IACxB,OAAO,CAAC,SAAS,CAAuB;IACxC,OAAO,CAAC,WAAW,CAAyC;IAE5D,SAAS,aACU,MAAM,EAAE,SAAS,EACf,MAAM,EAAE,OAAO,GAAG,IAAI,EACzC,SAAS,CAAC,EAAE,MAAM;IAoBpB;;;;;OAKG;IACH,cAAc,CAAC,IAAI,EAAE,UAAU,GAAG,WAAW,GAAG,IAAI;IAOpD;;;;OAIG;IACH,qBAAqB,IAAI,IAA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AG,EACnC,OAAO,EAAE,kBAAkB,GAC1B,OAAO,CAAC,YAAY,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;IA4P9B,SAAS,CAAC,QAAQ,CAAC,wBAAwB,IAAI,MAAM;IAErD;;;OAGG;cACa,cAAc,CAC5B,GAAG,EAAE,MAAM,EACX,UAAU,GAAE,MAAgC,EAC5C,UAAU,GAAE,MAAgC,GAC3C,OAAO,CAAC,MAAM,CAAC;IAgLlB;;OAEG;IACH,SAAS,CAAC,YAAY,IAAI,MAAM,GAAG,IAAI;IAIvC;;OAEG;IACH,SAAS,CAAC,YAAY,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,GAAG,IAAI;IAIlD;;OAEG;IACH,SAAS,CAAC,UAAU,IAAI,MAAM,GAAG,IAAI;IAIrC,SAAS,CAAC,iBAAiB,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI;IAIlD,OAAO,CAAC,yBAAyB;IAuDjC,OAAO,CAAC,gBAAgB;YAqBV,oBAAoB;IAiClC,OAAO,CAAC,eAAe;CA+BxB;AAGD,OAAO,EAAE,sBAAsB,EAAE,CAAC"}
@@ -483,6 +483,9 @@ class AbstractAbapConnection {
483
483
  getCookies() {
484
484
  return this.cookies;
485
485
  }
486
+ setInitialCookies(cookies) {
487
+ this.cookies = cookies;
488
+ }
486
489
  updateCookiesFromResponse(headers) {
487
490
  if (!headers) {
488
491
  return;
@@ -1,5 +1,4 @@
1
- import type { ITokenRefresher } from '@mcp-abap-adt/interfaces';
2
- import { type AxiosResponse } from 'axios';
1
+ import type { IAdtResponse, ITokenRefresher } from '@mcp-abap-adt/interfaces';
3
2
  import type { SapConfig } from '../config/sapConfig.js';
4
3
  import type { ILogger } from '../logger.js';
5
4
  import type { AbapRequestOptions } from './AbapConnection.js';
@@ -28,7 +27,7 @@ export declare class JwtAbapConnection extends AbstractAbapConnection {
28
27
  /**
29
28
  * Override makeAdtRequest to handle JWT auth errors with automatic token refresh
30
29
  */
31
- makeAdtRequest(options: AbapRequestOptions): Promise<AxiosResponse>;
30
+ makeAdtRequest<T = any, D = any>(options: AbapRequestOptions): Promise<IAdtResponse<T, D>>;
32
31
  /**
33
32
  * Override fetchCsrfToken to handle JWT auth errors with automatic token refresh
34
33
  */
@@ -1 +1 @@
1
- {"version":3,"file":"JwtAbapConnection.d.ts","sourceRoot":"","sources":["../../src/connection/JwtAbapConnection.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,0BAA0B,CAAC;AAChE,OAAO,EAAc,KAAK,aAAa,EAAE,MAAM,OAAO,CAAC;AACvD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AACxD,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AAC5C,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,qBAAqB,CAAC;AAC9D,OAAO,EAAE,sBAAsB,EAAE,MAAM,6BAA6B,CAAC;AAErE;;;;;;GAMG;AACH,qBAAa,iBAAkB,SAAQ,sBAAsB;IAC3D,OAAO,CAAC,cAAc,CAAC,CAAkB;IACzC,OAAO,CAAC,YAAY,CAAS;gBAG3B,MAAM,EAAE,SAAS,EACjB,MAAM,CAAC,EAAE,OAAO,GAAG,IAAI,EACvB,SAAS,CAAC,EAAE,MAAM,EAClB,cAAc,CAAC,EAAE,eAAe;IAWlC,SAAS,CAAC,wBAAwB,IAAI,MAAM;IAW5C;;;OAGG;YACW,eAAe;IA0B7B;;OAEG;IACG,OAAO,IAAI,OAAO,CAAC,IAAI,CAAC;IAyD9B;;OAEG;IACG,cAAc,CAAC,OAAO,EAAE,kBAAkB,GAAG,OAAO,CAAC,aAAa,CAAC;IAyDzE;;OAEG;cACa,cAAc,CAC5B,GAAG,EAAE,MAAM,EACX,UAAU,SAAI,EACd,UAAU,SAAO,GAChB,OAAO,CAAC,MAAM,CAAC;IA2ClB,OAAO,CAAC,MAAM,CAAC,cAAc;CAa9B"}
1
+ {"version":3,"file":"JwtAbapConnection.d.ts","sourceRoot":"","sources":["../../src/connection/JwtAbapConnection.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,eAAe,EAAE,MAAM,0BAA0B,CAAC;AAE9E,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AACxD,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AAC5C,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,qBAAqB,CAAC;AAC9D,OAAO,EAAE,sBAAsB,EAAE,MAAM,6BAA6B,CAAC;AAErE;;;;;;GAMG;AACH,qBAAa,iBAAkB,SAAQ,sBAAsB;IAC3D,OAAO,CAAC,cAAc,CAAC,CAAkB;IACzC,OAAO,CAAC,YAAY,CAAS;gBAG3B,MAAM,EAAE,SAAS,EACjB,MAAM,CAAC,EAAE,OAAO,GAAG,IAAI,EACvB,SAAS,CAAC,EAAE,MAAM,EAClB,cAAc,CAAC,EAAE,eAAe;IAWlC,SAAS,CAAC,wBAAwB,IAAI,MAAM;IAW5C;;;OAGG;YACW,eAAe;IA0B7B;;OAEG;IACG,OAAO,IAAI,OAAO,CAAC,IAAI,CAAC;IAyD9B;;OAEG;IACG,cAAc,CAAC,CAAC,GAAG,GAAG,EAAE,CAAC,GAAG,GAAG,EACnC,OAAO,EAAE,kBAAkB,GAC1B,OAAO,CAAC,YAAY,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;IAyD9B;;OAEG;cACa,cAAc,CAC5B,GAAG,EAAE,MAAM,EACX,UAAU,SAAI,EACd,UAAU,SAAO,GAChB,OAAO,CAAC,MAAM,CAAC;IA2ClB,OAAO,CAAC,MAAM,CAAC,cAAc;CAa9B"}
@@ -0,0 +1,19 @@
1
+ import type { SapConfig } from '../config/sapConfig.js';
2
+ import type { ILogger } from '../logger.js';
3
+ import { AbstractAbapConnection } from './AbstractAbapConnection.js';
4
+ /**
5
+ * SAML session cookie authentication for SAP systems
6
+ */
7
+ export declare class SamlAbapConnection extends AbstractAbapConnection {
8
+ private sessionCookies;
9
+ constructor(config: SapConfig, logger?: ILogger | null, sessionId?: string);
10
+ /**
11
+ * Connect to SAP system using existing session cookies
12
+ * Fetches CSRF token to establish session context
13
+ */
14
+ connect(): Promise<void>;
15
+ protected buildAuthorizationHeader(): string;
16
+ getAuthHeaders(): Promise<Record<string, string>>;
17
+ private static validateConfig;
18
+ }
19
+ //# sourceMappingURL=SamlAbapConnection.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SamlAbapConnection.d.ts","sourceRoot":"","sources":["../../src/connection/SamlAbapConnection.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AACxD,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AAC5C,OAAO,EAAE,sBAAsB,EAAE,MAAM,6BAA6B,CAAC;AAErE;;GAEG;AACH,qBAAa,kBAAmB,SAAQ,sBAAsB;IAC5D,OAAO,CAAC,cAAc,CAAS;gBAEnB,MAAM,EAAE,SAAS,EAAE,MAAM,CAAC,EAAE,OAAO,GAAG,IAAI,EAAE,SAAS,CAAC,EAAE,MAAM;IAS1E;;;OAGG;IACG,OAAO,IAAI,OAAO,CAAC,IAAI,CAAC;IAiC9B,SAAS,CAAC,wBAAwB,IAAI,MAAM;IAItC,cAAc,IAAI,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAQvD,OAAO,CAAC,MAAM,CAAC,cAAc;CAW9B"}
@@ -0,0 +1,65 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.SamlAbapConnection = void 0;
4
+ const axios_1 = require("axios");
5
+ const AbstractAbapConnection_js_1 = require("./AbstractAbapConnection.js");
6
+ /**
7
+ * SAML session cookie authentication for SAP systems
8
+ */
9
+ class SamlAbapConnection extends AbstractAbapConnection_js_1.AbstractAbapConnection {
10
+ sessionCookies;
11
+ constructor(config, logger, sessionId) {
12
+ SamlAbapConnection.validateConfig(config);
13
+ super(config, logger || null, sessionId);
14
+ this.sessionCookies = config.sessionCookies || '';
15
+ if (this.sessionCookies) {
16
+ this.setInitialCookies(this.sessionCookies);
17
+ }
18
+ }
19
+ /**
20
+ * Connect to SAP system using existing session cookies
21
+ * Fetches CSRF token to establish session context
22
+ */
23
+ async connect() {
24
+ const baseUrl = await this.getBaseUrl();
25
+ const discoveryUrl = `${baseUrl}/sap/bc/adt/discovery`;
26
+ this.logger?.debug(`[DEBUG] SamlAbapConnection - Connecting to SAP system: ${discoveryUrl}`);
27
+ try {
28
+ const token = await this.fetchCsrfToken(discoveryUrl, 3, 1000);
29
+ this.setCsrfToken(token);
30
+ this.logger?.debug('Successfully connected to SAP system', {
31
+ hasCsrfToken: !!this.getCsrfToken(),
32
+ hasCookies: !!this.getCookies(),
33
+ cookieLength: this.getCookies()?.length || 0,
34
+ });
35
+ }
36
+ catch (error) {
37
+ const errorMsg = error instanceof Error ? error.message : String(error);
38
+ this.logger?.warn(`[WARN] SamlAbapConnection - Could not connect to SAP system upfront: ${errorMsg}. Will retry on first request.`);
39
+ if (error instanceof axios_1.AxiosError && error.response?.headers) {
40
+ if (this.getCookies()) {
41
+ this.logger?.debug(`[DEBUG] SamlAbapConnection - Cookies extracted from error response during connect (first 100 chars): ${this.getCookies()?.substring(0, 100)}...`);
42
+ }
43
+ }
44
+ }
45
+ }
46
+ buildAuthorizationHeader() {
47
+ return '';
48
+ }
49
+ async getAuthHeaders() {
50
+ const headers = await super.getAuthHeaders();
51
+ if (this.sessionCookies) {
52
+ headers.Cookie = this.sessionCookies;
53
+ }
54
+ return headers;
55
+ }
56
+ static validateConfig(config) {
57
+ if (config.authType !== 'saml') {
58
+ throw new Error(`SAML connection expects authType "saml", got "${config.authType}"`);
59
+ }
60
+ if (!config.sessionCookies) {
61
+ throw new Error('SAML authentication requires sessionCookies');
62
+ }
63
+ }
64
+ }
65
+ exports.SamlAbapConnection = SamlAbapConnection;
@@ -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;AAI1D,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,CAWhB"}
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;AAK1D,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,CAahB"}
@@ -3,12 +3,15 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.createAbapConnection = createAbapConnection;
4
4
  const BaseAbapConnection_js_1 = require("./BaseAbapConnection.js");
5
5
  const JwtAbapConnection_js_1 = require("./JwtAbapConnection.js");
6
+ const SamlAbapConnection_js_1 = require("./SamlAbapConnection.js");
6
7
  function createAbapConnection(config, logger, sessionId, tokenRefresher) {
7
8
  switch (config.authType) {
8
9
  case 'basic':
9
10
  return new BaseAbapConnection_js_1.BaseAbapConnection(config, logger, sessionId);
10
11
  case 'jwt':
11
12
  return new JwtAbapConnection_js_1.JwtAbapConnection(config, logger, sessionId, tokenRefresher);
13
+ case 'saml':
14
+ return new SamlAbapConnection_js_1.SamlAbapConnection(config, logger, sessionId);
12
15
  default:
13
16
  throw new Error(`Unsupported SAP authentication type: ${config.authType}`);
14
17
  }
package/dist/index.d.ts CHANGED
@@ -5,6 +5,7 @@ export { BaseAbapConnection, BaseAbapConnection as OnPremAbapConnection, } from
5
5
  export { createAbapConnection } from './connection/connectionFactory.js';
6
6
  export { CSRF_CONFIG, CSRF_ERROR_MESSAGES } from './connection/csrfConfig.js';
7
7
  export { JwtAbapConnection, JwtAbapConnection as CloudAbapConnection, } from './connection/JwtAbapConnection.js';
8
+ export { SamlAbapConnection } from './connection/SamlAbapConnection.js';
8
9
  export type { ILogger } from './logger.js';
9
10
  export { getTimeout, getTimeoutConfig, type TimeoutConfig, } from './utils/timeouts.js';
10
11
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,YAAY,EACV,WAAW,EACX,SAAS,GACV,MAAM,uBAAuB,CAAC;AAE/B,OAAO,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAC;AAE3D,YAAY,EACV,cAAc,EACd,kBAAkB,GACnB,MAAM,gCAAgC,CAAC;AAGxC,OAAO,EACL,kBAAkB,EAClB,kBAAkB,IAAI,oBAAoB,GAC3C,MAAM,oCAAoC,CAAC;AAE5C,OAAO,EAAE,oBAAoB,EAAE,MAAM,mCAAmC,CAAC;AAEzE,OAAO,EAAE,WAAW,EAAE,mBAAmB,EAAE,MAAM,4BAA4B,CAAC;AAC9E,OAAO,EACL,iBAAiB,EACjB,iBAAiB,IAAI,mBAAmB,GACzC,MAAM,mCAAmC,CAAC;AAC3C,YAAY,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;AAE3C,OAAO,EACL,UAAU,EACV,gBAAgB,EAChB,KAAK,aAAa,GACnB,MAAM,qBAAqB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,YAAY,EACV,WAAW,EACX,SAAS,GACV,MAAM,uBAAuB,CAAC;AAE/B,OAAO,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAC;AAE3D,YAAY,EACV,cAAc,EACd,kBAAkB,GACnB,MAAM,gCAAgC,CAAC;AAGxC,OAAO,EACL,kBAAkB,EAClB,kBAAkB,IAAI,oBAAoB,GAC3C,MAAM,oCAAoC,CAAC;AAE5C,OAAO,EAAE,oBAAoB,EAAE,MAAM,mCAAmC,CAAC;AAEzE,OAAO,EAAE,WAAW,EAAE,mBAAmB,EAAE,MAAM,4BAA4B,CAAC;AAC9E,OAAO,EACL,iBAAiB,EACjB,iBAAiB,IAAI,mBAAmB,GACzC,MAAM,mCAAmC,CAAC;AAC3C,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/dist/index.js CHANGED
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.getTimeoutConfig = exports.getTimeout = exports.CloudAbapConnection = exports.JwtAbapConnection = exports.CSRF_ERROR_MESSAGES = exports.CSRF_CONFIG = exports.createAbapConnection = exports.OnPremAbapConnection = exports.BaseAbapConnection = exports.sapConfigSignature = void 0;
3
+ exports.getTimeoutConfig = exports.getTimeout = exports.SamlAbapConnection = exports.CloudAbapConnection = exports.JwtAbapConnection = exports.CSRF_ERROR_MESSAGES = exports.CSRF_CONFIG = exports.createAbapConnection = exports.OnPremAbapConnection = exports.BaseAbapConnection = exports.sapConfigSignature = void 0;
4
4
  // Config utilities
5
5
  var sapConfig_js_1 = require("./config/sapConfig.js");
6
6
  Object.defineProperty(exports, "sapConfigSignature", { enumerable: true, get: function () { return sapConfig_js_1.sapConfigSignature; } });
@@ -19,6 +19,8 @@ Object.defineProperty(exports, "CSRF_ERROR_MESSAGES", { enumerable: true, get: f
19
19
  var JwtAbapConnection_js_1 = require("./connection/JwtAbapConnection.js");
20
20
  Object.defineProperty(exports, "JwtAbapConnection", { enumerable: true, get: function () { return JwtAbapConnection_js_1.JwtAbapConnection; } });
21
21
  Object.defineProperty(exports, "CloudAbapConnection", { enumerable: true, get: function () { return JwtAbapConnection_js_1.JwtAbapConnection; } });
22
+ var SamlAbapConnection_js_1 = require("./connection/SamlAbapConnection.js");
23
+ Object.defineProperty(exports, "SamlAbapConnection", { enumerable: true, get: function () { return SamlAbapConnection_js_1.SamlAbapConnection; } });
22
24
  // Timeouts
23
25
  var timeouts_js_1 = require("./utils/timeouts.js");
24
26
  Object.defineProperty(exports, "getTimeout", { enumerable: true, get: function () { return timeouts_js_1.getTimeout; } });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mcp-abap-adt/connection",
3
- "version": "0.2.8",
3
+ "version": "1.0.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": "^0.2.13",
49
+ "@mcp-abap-adt/interfaces": "^2.3.0",
50
50
  "axios": "^1.11.0",
51
51
  "commander": "^14.0.2",
52
52
  "express": "^5.1.0",