@mcp-abap-adt/interfaces-adt-connection 2.1.0 → 4.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/CHANGELOG.md +37 -0
- package/README.md +3 -4
- package/dist/IAbapConnection.d.ts +3 -2
- package/dist/IAbapConnection.d.ts.map +1 -1
- package/dist/IAbapRequestOptions.d.ts +0 -14
- package/dist/IAbapRequestOptions.d.ts.map +1 -1
- package/dist/IAbapRequestOptions.js +0 -6
- package/dist/index.d.ts +1 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -3
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -7,6 +7,43 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
7
7
|
|
|
8
8
|
## [Unreleased]
|
|
9
9
|
|
|
10
|
+
## [4.0.0] - 2026-11-08
|
|
11
|
+
|
|
12
|
+
### Changed (breaking)
|
|
13
|
+
|
|
14
|
+
- **`IAbapConnection.getBaseUrl(): Promise<string | undefined>`** — was
|
|
15
|
+
`Promise<string>`. It answers the system's HTTP origin, or `undefined` for a
|
|
16
|
+
connection that has none: an RFC connection, whose destination states an RFC
|
|
17
|
+
address and no URL (`@mcp-abap-adt/interfaces-auth-sap` 4.0.0). The absence is
|
|
18
|
+
in the type, so a caller cannot read a URL that is not there.
|
|
19
|
+
|
|
20
|
+
### Migrating to 4.0.0
|
|
21
|
+
|
|
22
|
+
- **A caller narrows the answer** before using it as a string:
|
|
23
|
+
`const url = await connection.getBaseUrl(); if (url !== undefined) { … }`.
|
|
24
|
+
Code that builds an absolute URL on it decides what to do without one — over
|
|
25
|
+
RFC a request carries a path, and no origin is invented.
|
|
26
|
+
- **An implementer** that answers a string still conforms; nothing to do. One
|
|
27
|
+
that has no URL answers `undefined` instead of `''` or a made-up origin.
|
|
28
|
+
|
|
29
|
+
## [3.0.0] - 2026-10-12
|
|
30
|
+
|
|
31
|
+
### Removed (breaking)
|
|
32
|
+
|
|
33
|
+
- **`IAbapRequestOptions.signal`, `ADT_REQUEST_ERROR` and `AdtRequestErrorCode`**
|
|
34
|
+
(added in 2.1.0). A per-request signal has no use against ADT: ABAP neither
|
|
35
|
+
cancels a request that reached it nor rolls back across requests, a
|
|
36
|
+
connection is never shared between threads, and a session closed with a
|
|
37
|
+
logoff releases its locks — measured on premise (BASIS 816, 2026-10-12),
|
|
38
|
+
including a logoff sent while a long request still ran in the same session:
|
|
39
|
+
SAP queued it and the lock was gone afterwards. What a consumer needs at its
|
|
40
|
+
end is the connection's logoff, not a signal.
|
|
41
|
+
|
|
42
|
+
### Migrating from 2.1
|
|
43
|
+
|
|
44
|
+
Drop `signal` from request options and any match on `ADT_REQUEST_ERROR`. Code
|
|
45
|
+
written for 2.0 compiles unchanged.
|
|
46
|
+
|
|
10
47
|
## [2.1.0] - 2026-10-12
|
|
11
48
|
|
|
12
49
|
### Added
|
package/README.md
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
# @mcp-abap-adt/interfaces-adt-connection
|
|
2
2
|
|
|
3
3
|
The ABAP connection contract: what an ADT request is sent through, and what
|
|
4
|
-
comes back off the wire. Types and
|
|
4
|
+
comes back off the wire. Types and one constant; no implementation.
|
|
5
5
|
|
|
6
6
|
```bash
|
|
7
7
|
npm install @mcp-abap-adt/interfaces-adt-connection
|
|
@@ -9,12 +9,11 @@ npm install @mcp-abap-adt/interfaces-adt-connection
|
|
|
9
9
|
|
|
10
10
|
| symbol | what it is |
|
|
11
11
|
|---|---|
|
|
12
|
-
| `IAbapConnection` | a connection an ADT request is made through: `makeAdtRequest`, connect/disconnect, the session type |
|
|
13
|
-
| `IAbapRequestOptions` | what one request carries
|
|
12
|
+
| `IAbapConnection` | a connection an ADT request is made through: `makeAdtRequest`, connect/disconnect, the session type. Since 4.0.0 `getBaseUrl()` answers `Promise<string \| undefined>`: `undefined` for a connection with no HTTP origin (RFC), so a caller narrows before using it — see the CHANGELOG's migration note |
|
|
13
|
+
| `IAbapRequestOptions` | what one request carries |
|
|
14
14
|
| `IAdtWireResponse` | the answer as it came off the wire — extends `IHttpWireResponse` from `interfaces-network` with the headers ADT sends. Since 2.0.0 its `data` is `unknown` unless the caller names the type (`makeAdtRequest<string>(…)`); it was `any` — see the CHANGELOG's migration note |
|
|
15
15
|
| `ISessionLifecycleAware`, `ICriticalSection`, `IRequestProfiling`, `IDeferredResponseConnection` | the connection's capability atoms — a connection honours the ones it can |
|
|
16
16
|
| `ADT_SESSION_ERROR` / `AdtSessionErrorCode` | what a session failure is called |
|
|
17
|
-
| `ADT_REQUEST_ERROR` / `AdtRequestErrorCode` | what a request failure is called: `ADT_REQUEST_ABORTED`, the request's signal aborted before it was sent or before a resend |
|
|
18
17
|
| `ITimeoutConfig` | the deadlines a caller gives a connection: `default`, `csrf`, `long` |
|
|
19
18
|
|
|
20
19
|
## Why this package exists
|
|
@@ -37,9 +37,10 @@ export interface IAbapConnection {
|
|
|
37
37
|
*/
|
|
38
38
|
connect(): Promise<void>;
|
|
39
39
|
/**
|
|
40
|
-
*
|
|
40
|
+
* The SAP system's HTTP origin, or `undefined` for a connection that has
|
|
41
|
+
* none (RFC). A caller narrows before reading it.
|
|
41
42
|
*/
|
|
42
|
-
getBaseUrl(): Promise<string>;
|
|
43
|
+
getBaseUrl(): Promise<string | undefined>;
|
|
43
44
|
/**
|
|
44
45
|
* Get current session ID (for stateful connections)
|
|
45
46
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IAbapConnection.d.ts","sourceRoot":"","sources":["../src/IAbapConnection.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,KAAK,EACV,gBAAgB,EAChB,iBAAiB,EAClB,MAAM,kCAAkC,CAAC;AAC1C,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAEjE,MAAM,MAAM,eAAe,GAAG,gBAAgB,CAAC;AAE/C,MAAM,WAAW,gBAAgB,CAAC,CAAC,G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;AAED;;;;;;;;GAQG;AACH,MAAM,WAAW,eAAe;IAC9B;;;OAGG;IACH,OAAO,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC;IAEzB;;;OAGG;IACH,UAAU,IAAI,OAAO,CAAC,MAAM,GAAG,SAAS,CAAC,CAAC;IAE1C;;OAEG;IACH,YAAY,IAAI,MAAM,GAAG,IAAI,CAAC;IAE9B;;;OAGG;IACH,cAAc,CAAC,IAAI,EAAE,UAAU,GAAG,WAAW,GAAG,IAAI,CAAC;IAErD;;;;;;;;;;OAUG;IACH,cAAc,CAAC,CAAC,GAAG,OAAO,EAAE,CAAC,GAAG,OAAO,EACrC,OAAO,EAAE,mBAAmB,GAC3B,OAAO,CAAC,gBAAgB,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC;CACpC"}
|
|
@@ -5,19 +5,5 @@ export interface IAbapRequestOptions {
|
|
|
5
5
|
data?: unknown;
|
|
6
6
|
params?: unknown;
|
|
7
7
|
headers?: Record<string, string>;
|
|
8
|
-
/**
|
|
9
|
-
* The caller no longer needs this request: nothing more of it is sent.
|
|
10
|
-
*
|
|
11
|
-
* A request the signal aborts before it is sent, or before a resend (a CSRF
|
|
12
|
-
* retry, a reconnect), fails with `ADT_REQUEST_ERROR.ABORTED`. A request
|
|
13
|
-
* already on the wire is not recalled — the server may still act on it.
|
|
14
|
-
*/
|
|
15
|
-
signal?: AbortSignal | undefined;
|
|
16
8
|
}
|
|
17
|
-
/** Error codes a request raises. Match on these, not on messages. */
|
|
18
|
-
export declare const ADT_REQUEST_ERROR: {
|
|
19
|
-
/** The request's signal aborted before it was sent, or before a resend. */
|
|
20
|
-
readonly ABORTED: "ADT_REQUEST_ABORTED";
|
|
21
|
-
};
|
|
22
|
-
export type AdtRequestErrorCode = (typeof ADT_REQUEST_ERROR)[keyof typeof ADT_REQUEST_ERROR];
|
|
23
9
|
//# sourceMappingURL=IAbapRequestOptions.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IAbapRequestOptions.d.ts","sourceRoot":"","sources":["../src/IAbapRequestOptions.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,mBAAmB;IAClC,GAAG,EAAE,MAAM,CAAC;IACZ,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;
|
|
1
|
+
{"version":3,"file":"IAbapRequestOptions.d.ts","sourceRoot":"","sources":["../src/IAbapRequestOptions.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,mBAAmB;IAClC,GAAG,EAAE,MAAM,CAAC;IACZ,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CAClC"}
|
|
@@ -1,8 +1,2 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.ADT_REQUEST_ERROR = void 0;
|
|
4
|
-
/** Error codes a request raises. Match on these, not on messages. */
|
|
5
|
-
exports.ADT_REQUEST_ERROR = {
|
|
6
|
-
/** The request's signal aborted before it was sent, or before a resend. */
|
|
7
|
-
ABORTED: 'ADT_REQUEST_ABORTED',
|
|
8
|
-
};
|
package/dist/index.d.ts
CHANGED
|
@@ -11,8 +11,7 @@
|
|
|
11
11
|
* (decision 35); what separated it is the release rate (decision 38).
|
|
12
12
|
*/
|
|
13
13
|
export type { IAbapConnection, IAdtWireResponse } from './IAbapConnection';
|
|
14
|
-
export type {
|
|
15
|
-
export { ADT_REQUEST_ERROR } from './IAbapRequestOptions';
|
|
14
|
+
export type { IAbapRequestOptions } from './IAbapRequestOptions';
|
|
16
15
|
export type { AdtSessionErrorCode, ICriticalSection, IDeferredResponseConnection, IRequestProfiling, ISessionLifecycleAware, } from './IConnectionCapabilities';
|
|
17
16
|
export { ADT_SESSION_ERROR } from './IConnectionCapabilities';
|
|
18
17
|
export type { ITimeoutConfig } from './ITimeoutConfig';
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AACH,YAAY,EAAE,eAAe,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AAC3E,YAAY,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AACH,YAAY,EAAE,eAAe,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AAC3E,YAAY,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AACjE,YAAY,EACV,mBAAmB,EACnB,gBAAgB,EAChB,2BAA2B,EAC3B,iBAAiB,EACjB,sBAAsB,GACvB,MAAM,2BAA2B,CAAC;AACnC,OAAO,EAAE,iBAAiB,EAAE,MAAM,2BAA2B,CAAC;AAC9D,YAAY,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.ADT_SESSION_ERROR =
|
|
4
|
-
var IAbapRequestOptions_1 = require("./IAbapRequestOptions");
|
|
5
|
-
Object.defineProperty(exports, "ADT_REQUEST_ERROR", { enumerable: true, get: function () { return IAbapRequestOptions_1.ADT_REQUEST_ERROR; } });
|
|
3
|
+
exports.ADT_SESSION_ERROR = void 0;
|
|
6
4
|
var IConnectionCapabilities_1 = require("./IConnectionCapabilities");
|
|
7
5
|
Object.defineProperty(exports, "ADT_SESSION_ERROR", { enumerable: true, get: function () { return IConnectionCapabilities_1.ADT_SESSION_ERROR; } });
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mcp-abap-adt/interfaces-adt-connection",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "4.0.0",
|
|
4
4
|
"description": "The ABAP connection contract: IAbapConnection, its capability atoms, the wire response and the session error codes",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|