@mcp-abap-adt/interfaces-adt-connection 2.0.0 → 2.1.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 +15 -0
- package/README.md +3 -2
- package/dist/IAbapRequestOptions.d.ts +14 -0
- package/dist/IAbapRequestOptions.d.ts.map +1 -1
- package/dist/IAbapRequestOptions.js +6 -0
- package/dist/index.d.ts +2 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +3 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -7,6 +7,21 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
7
7
|
|
|
8
8
|
## [Unreleased]
|
|
9
9
|
|
|
10
|
+
## [2.1.0] - 2026-10-12
|
|
11
|
+
|
|
12
|
+
### Added
|
|
13
|
+
|
|
14
|
+
- **`IAbapRequestOptions.signal?: AbortSignal | undefined`** — the caller no
|
|
15
|
+
longer needs this request. A connection honouring it sends nothing more of
|
|
16
|
+
the request once the signal has aborted: not the request, if it has not left
|
|
17
|
+
yet, and no resend (a CSRF retry, a reconnect). A request already on the wire
|
|
18
|
+
is not recalled — the server may still act on it. Optional: every request
|
|
19
|
+
written for 2.0.0 compiles unchanged, and a connection that ignores the
|
|
20
|
+
field still satisfies `IAbapConnection`.
|
|
21
|
+
- **`ADT_REQUEST_ERROR` / `AdtRequestErrorCode`** — what such a request fails
|
|
22
|
+
with: `ADT_REQUEST_ERROR.ABORTED` (`'ADT_REQUEST_ABORTED'`), as the thrown
|
|
23
|
+
error's `code`. Match on the code, not on a message.
|
|
24
|
+
|
|
10
25
|
## [2.0.0] - 2026-10-05
|
|
11
26
|
|
|
12
27
|
### Changed (breaking)
|
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 two constants; no implementation.
|
|
5
5
|
|
|
6
6
|
```bash
|
|
7
7
|
npm install @mcp-abap-adt/interfaces-adt-connection
|
|
@@ -10,10 +10,11 @@ npm install @mcp-abap-adt/interfaces-adt-connection
|
|
|
10
10
|
| symbol | what it is |
|
|
11
11
|
|---|---|
|
|
12
12
|
| `IAbapConnection` | a connection an ADT request is made through: `makeAdtRequest`, connect/disconnect, the session type |
|
|
13
|
-
| `IAbapRequestOptions` | what one request carries |
|
|
13
|
+
| `IAbapRequestOptions` | what one request carries. Since 2.1.0 it may carry the caller's `signal`: once it aborts, nothing more of the request is sent — not the request, not a resend (a CSRF retry, a reconnect) — and the request fails with `ADT_REQUEST_ERROR.ABORTED`. A request already on the wire is not recalled: the server may still act on it |
|
|
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 |
|
|
17
18
|
| `ITimeoutConfig` | the deadlines a caller gives a connection: `default`, `csrf`, `long` |
|
|
18
19
|
|
|
19
20
|
## Why this package exists
|
|
@@ -5,5 +5,19 @@ 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;
|
|
8
16
|
}
|
|
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];
|
|
9
23
|
//# 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;CAClC"}
|
|
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;IACjC;;;;;;OAMG;IACH,MAAM,CAAC,EAAE,WAAW,GAAG,SAAS,CAAC;CAClC;AAED,qEAAqE;AACrE,eAAO,MAAM,iBAAiB;IAC5B,2EAA2E;;CAEnE,CAAC;AAEX,MAAM,MAAM,mBAAmB,GAC7B,CAAC,OAAO,iBAAiB,CAAC,CAAC,MAAM,OAAO,iBAAiB,CAAC,CAAC"}
|
|
@@ -1,2 +1,8 @@
|
|
|
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,7 +11,8 @@
|
|
|
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 { IAbapRequestOptions } from './IAbapRequestOptions';
|
|
14
|
+
export type { AdtRequestErrorCode, IAbapRequestOptions, } from './IAbapRequestOptions';
|
|
15
|
+
export { ADT_REQUEST_ERROR } from './IAbapRequestOptions';
|
|
15
16
|
export type { AdtSessionErrorCode, ICriticalSection, IDeferredResponseConnection, IRequestProfiling, ISessionLifecycleAware, } from './IConnectionCapabilities';
|
|
16
17
|
export { ADT_SESSION_ERROR } from './IConnectionCapabilities';
|
|
17
18
|
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,EACV,mBAAmB,EACnB,mBAAmB,GACpB,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;AAC1D,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,5 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.ADT_SESSION_ERROR = void 0;
|
|
3
|
+
exports.ADT_SESSION_ERROR = exports.ADT_REQUEST_ERROR = void 0;
|
|
4
|
+
var IAbapRequestOptions_1 = require("./IAbapRequestOptions");
|
|
5
|
+
Object.defineProperty(exports, "ADT_REQUEST_ERROR", { enumerable: true, get: function () { return IAbapRequestOptions_1.ADT_REQUEST_ERROR; } });
|
|
4
6
|
var IConnectionCapabilities_1 = require("./IConnectionCapabilities");
|
|
5
7
|
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": "2.
|
|
3
|
+
"version": "2.1.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",
|